[
  {
    "path": ".github/CODEOWNERS",
    "content": "# Lines starting with '#' are comments.\n# Each line is a file pattern followed by one or more owners.\n\n# More details are here: https://help.github.com/articles/about-codeowners/\n\n# The '*' pattern is global owners.\n\n# Order is important. The last matching pattern has the most precedence.\n# The folders are ordered as follows:\n\n# In each subsection folders are ordered first by depth, then alphabetically.\n# This should make it easy to add new rules without breaking existing ones.\n\n* @ionic-team/framework\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "content": "<!-- 🚨 PLEASE READ 🚨\n\nThis issue tracker is for bug reports and feature requests for the Ionic Starter Templates.\n\n- For support questions, see our support page: https://ionicframework.com/support\n- For feature requests, feel free to delete this template and just describe the feature.\n\n-->\n\n**Starter Type:** <!-- ? angular, ionic-angular, ionic1, etc. -->\n**Starter Template:** <!-- ? blank, tabs, etc.  -->\n\n\n**Description:**\n<!-- Please describe the problem you're having. -->\n\n\n**My `ionic info`:**\n<!--\nPost the output of running `ionic info` (within your project, if applicable)\nbelow. `ionic info` is a CLI command that prints out environment information.\n-->\n\n```\n<paste here>\n```\n\n\n**Other Information:**\n<!--\ne.g. stacktraces, related issues, suggestions how to fix, stackoverflow links,\nforum links, etc\n-->\n"
  },
  {
    "path": ".github/ionic-issue-bot.yml",
    "content": "triage:\n  label: triage\n  dryRun: false\n\ncloseAndLock:\n  labels:\n    - label: \"ionitron: support\"\n      message: >\n        Thanks for the issue! This issue appears to be a support request. We\n        use this issue tracker exclusively for bug reports and feature\n        requests. For support questions, please see our [Support\n        Page](https://ionicframework.com/support).\n\n\n        Thank you for using Ionic!\n    - label: \"ionitron: pro\"\n      message: >\n        Thanks for the issue! This issue appears to be related to our\n        commercial products. We use this issue tracker exclusively for bug\n        reports and feature requests. Please [open a support\n        ticket](https://ionicframework.com/support/request) and we'll be happy\n        to assist you.\n\n\n        Thank you for using Ionic!\n    - label: \"ionitron: missing template\"\n      message: >\n        Thanks for the issue! It appears that you have not filled out the\n        provided issue template. We use this issue template in order to gather\n        more information and further assist you. Please create a new issue and\n        ensure the template is fully filled out.\n\n\n        Thank you for using Ionic!\n    - label: \"ionitron: cordova\"\n      message: >\n        Thanks for the issue! We use this issue tracker exclusively for bug\n        reports and feature requests. It appears that this issue is associated\n        with Cordova. Please see Cordova's [Reporting\n        Issues](https://cordova.apache.org/contribute/issues.html) page.\n\n\n        Thank you for using Ionic!\n  close: true\n  lock: true\n  dryRun: false\n\nwrongRepo:\n  repos:\n    - label: \"ionitron: framework\"\n      repo: ionic\n      message: >\n        Thanks for the issue! We use this issue tracker exclusively for bug\n        reports and feature requests. It appears that this issue is associated\n        with the Ionic Framework. I am moving this issue to the Ionic Framework\n        repository. Please track this issue over there.\n\n\n        Thank you for using Ionic!\n    - label: \"ionitron: cli\"\n      repo: ionic-cli\n      message: >\n        Thanks for the issue! We use this issue tracker exclusively for bug\n        reports and feature requests. It appears that this issue is associated\n        with the Ionic CLI. I am moving this issue to the Ionic CLI repository.\n        Please track this issue over there.\n\n\n        Thank you for using Ionic!\n    - label: \"ionitron: capacitor\"\n      repo: capacitor\n      message: >\n        Thanks for the issue! We use this issue tracker exclusively for bug\n        reports and feature requests. It appears that this issue is associated\n        with Capacitor. I am moving this issue to the Capacitor repository.\n        Please track this issue over there.\n\n\n        Thank you for using Ionic!\n    - label: \"ionitron: ionic-native\"\n      repo: ionic-native\n      message: >\n        Thanks for the issue! We use this issue tracker exclusively for bug\n        reports and feature requests. It appears that this issue is associated\n        with Ionic Native. I am moving this issue to the Ionic Native\n        repository. Please track this issue over there.\n\n\n        Thank you for using Ionic!\n    - label: \"ionitron: ionic-site\"\n      repo: ionic-site\n      message: >\n        Thanks for the issue! We use this issue tracker exclusively for bug\n        reports and feature requests. It appears that this issue is associated\n        with the Ionic website. I am moving this issue to the Ionic website\n        repository. Please track this issue over there.\n\n\n        Thank you for using Ionic!\n  close: true\n  lock: true\n  dryRun: false\n"
  },
  {
    "path": ".github/workflows/main.yml",
    "content": "name: Build & Test\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          submodules: true\n\n      - uses: actions/setup-node@v4\n        with:\n          node-version: 20\n\n      - name: Build\n        run: |\n          npm install\n          npm run src:lint\n          npm run src:build\n          npm run starters:find-redundant\n          npm run starters:build -- --current\n\n      - run: tar -cf build.tar build dist\n\n      - uses: actions/upload-artifact@v4\n        with:\n          name: build\n          path: build.tar\n\n  test:\n    strategy:\n      matrix:\n        # We explicitly list each test app so they can\n        # be built in parallel rather than only specifying\n        # \"vue\" which would cause several projects to be built sequentially.\n        framework: ['vue-vite-official-blank', 'vue-vite-official-list', 'vue-vite-official-tabs', 'vue-vite-official-sidemenu', 'vue-official-blank', 'vue-official-list', 'vue-official-tabs', 'vue-official-sidemenu', 'react-vite-official-blank', 'react-vite-official-list', 'react-vite-official-tabs', 'react-vite-official-sidemenu', 'react-official-blank', 'react-official-list', 'react-official-tabs', 'react-official-sidemenu', 'angular-standalone-official-blank', 'angular-standalone-official-list', 'angular-standalone-official-tabs', 'angular-standalone-official-sidemenu', 'angular-official-blank', 'angular-official-list', 'angular-official-tabs', 'angular-official-sidemenu']\n\n    runs-on: ubuntu-latest\n    needs: build\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - uses: actions/download-artifact@v4\n        with:\n          name: build\n\n      - run: tar -xf build.tar\n\n      - uses: actions/setup-node@v4\n        with:\n          node-version: 20\n          cache: npm\n          cache-dependency-path: |\n            build/${{ matrix.framework }}/ionic.starter.json\n            build/${{ matrix.framework }}/package.json\n\n      - name: Test ${{ matrix.framework }}\n        run: |\n          npm install\n          rm -rf node_modules/@types\n          npm run starters:test -- --type=${{ matrix.framework }}\n        \n  # This step allows us to have a required\n  # status check for each matrix job without having\n  # to manually add each matrix run in the branch protection rules.\n  # Source: https://github.community/t/status-check-for-a-matrix-jobs/127354  \n  verify-test:\n    if: ${{ always() }}\n    needs: test\n    runs-on: ubuntu-latest\n    steps:\n      - name: Check build matrix status\n        if: ${{ needs.test.result != 'success' }}\n        run: exit 1\n\n  test-legacy:\n    strategy:\n      matrix:\n        framework: ['ionic-angular', 'ionic1']\n    \n    runs-on: ubuntu-latest\n    needs: build\n    \n    steps:\n      - uses: actions/checkout@v4\n    \n      - uses: actions/download-artifact@v4\n        with:\n          name: build\n    \n      - run: tar -xf build.tar\n    \n      - uses: actions/setup-node@v4\n        with:\n          # Legacy starter apps do not support\n          # node 16+ which is why we have a separate job\n          node-version: 14\n          cache: npm\n          cache-dependency-path: |\n            build/${{ matrix.framework }}-*/ionic.starter.json\n            build/${{ matrix.framework }}-*/package.json\n    \n      - name: Test ${{ matrix.framework }}\n        run: |\n          npm install\n          rm -rf node_modules/@types\n          npm run starters:test -- --type=${{ matrix.framework }}\n  \n  # This step allows us to have a required\n  # status check for each matrix job without having\n  # to manually add each matrix run in the branch protection rules.\n  # Source: https://github.community/t/status-check-for-a-matrix-jobs/127354  \n  verify-test-legacy:\n    if: ${{ always() }}\n    needs: test-legacy\n    runs-on: ubuntu-latest\n    steps:\n      - name: Check build matrix status\n        if: ${{ needs.test-legacy.result != 'success' }}\n        run: exit 1\n\n  deploy:\n    runs-on: ubuntu-latest\n    needs: [verify-test, verify-test-legacy]\n    permissions:\n      contents: read\n      id-token: write\n    if: ${{ github.ref == 'refs/heads/main' }}\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - uses: actions/setup-node@v4\n        with:\n          node-version: 20\n\n      - uses: actions/download-artifact@v4\n        with:\n          name: build\n\n      - run: tar -xf build.tar\n\n      - uses: aws-actions/configure-aws-credentials@v2\n        with:\n          role-to-assume: ${{ secrets.AWS_ROLE_ARN }}\n          aws-region: us-west-2\n\n      - name: Deploy\n        run: |\n          npm install\n          npm run starters:deploy -- --tag latest\n"
  },
  {
    "path": ".github/workflows/wizard-templates.yml",
    "content": "name: Generate Wizard Templates\n\non:\n  schedule:\n    - cron: '30 9 * * *'\n\njobs:\n  wizard-templates:\n    strategy:\n      matrix:\n        framework: ['angular', 'react', 'vue']\n        template: ['list', 'tabs', 'sidemenu']\n\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Install Ionic CLI\n        run: npm install -g @ionic/cli\n\n      - name: Run ionic start\n        run: ionic start __NAME__ ${{ matrix.template }} --type=${{ matrix.framework }} --capacitor --no-link --no-interactive --no-color --confirm\n\n      - name: Run git push\n        run: |\n          git config user.email hi@ionicframework.com\n          git config user.name Ionitron\n          git add __NAME__\n          git commit -m 'Initial commit'\n          git subtree split -P __NAME__ -b wizard/${{ matrix.framework }}-official-${{ matrix.template }}\n          git push -f origin wizard/${{ matrix.framework }}-official-${{ matrix.template }}\n"
  },
  {
    "path": ".gitignore",
    "content": ".idea\nlogs\n*.log\nnpm-debug.log*\n\n.DS_Store\n\nnode_modules/\n\n.env\n\nbuild/*\n!build/.gitkeep\ndist\n\nstarter-checksum*\n"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"ionic-angular/community/ionic-team/example\"]\n\tpath = ionic-angular/community/ionic-team/example\n\turl = https://github.com/ionic-team/starter-example.git\n[submodule \"ionic-angular/community/danielsogl/super\"]\n\tpath = ionic-angular/community/danielsogl/super\n\turl = https://github.com/danielsogl/ionic-super-starter.git\n[submodule \"ionic-angular/community/oktadeveloper/jhipster\"]\n\tpath = ionic-angular/community/oktadeveloper/jhipster\n\turl = https://github.com/oktadeveloper/ionic-jhipster-starter.git\n[submodule \"angular/community/oktadeveloper/jhipster\"]\n\tpath = angular/community/oktadeveloper/jhipster\n\turl = https://github.com/oktadeveloper/ionic-jhipster-starter.git\n[submodule \"angular/community/ionic-team/enterprise-tabs\"]\n\tpath = angular/community/ionic-team/enterprise-tabs\n\turl = https://github.com/ionic-team/ionic-enterprise-starter.git\n[submodule \"react/community/ionic-team/portals\"]\n\tpath = react/community/ionic-team/portals\n\turl = https://github.com/ionic-team/portals-starter-react\n[submodule \"angular/community/ionic-team/portals\"]\n\tpath = angular/community/ionic-team/portals\n\turl = https://github.com/ionic-team/portals-starter-angular\n[submodule \"vue/community/ionic-team/portals\"]\n\tpath = vue/community/ionic-team/portals\n\turl = https://github.com/ionic-team/portals-starter-vue\n[submodule \"vue-vite/community/ionic-team/portals\"]\n\tpath = vue-vite/community/ionic-team/portals\n\turl = https://github.com/ionic-team/portals-starter-vue-vite\n\n# The portals app for React does not\n# have any code that changes between Create React App\n# and Vite which is why we map to the same repo.\n[submodule \"react-vite/community/ionic-team/portals\"]\n\tpath = react-vite/community/ionic-team/portals\n\turl = https://github.com/ionic-team/portals-starter-react\n"
  },
  {
    "path": ".npmrc",
    "content": "package-lock=false\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing\n\n## Getting Started\n\nTo get started, clone the repo, and install dependencies:\n\n```bash\nnpm i\n```\n\nThen build using:\n\n```bash\nnpm run src:build\n```\n\nor build and watch for changes using:\n\n```bash\nnpm run src:watch\n```\n\n> [!NOTE]\n> We use TypeScript, so the code must be compiled before it runs.\n\n## Generating\n\nYou can generate the starters by running:\n\n```bash\nnpm run starters:build -- --current\n```\n\nYou can build a single starter by specifying the path:\n\n```bash\nnpm run starters:build -- angular/official/tabs --current\n```\n\n* Starters are generated by overlaying starter files (located in\n  `<type>/official/<name>/` or `<type>/community/<scope>/<name>/`) onto base\n  files (located in `<type>/base/`) into the `build/` directory.\n* If the `--current` flag is not passed to the build command, the base files will\n  be checked out from the value of the `baseref`.\n* The `baseref` is defined in the starter's manifest file, which is a special\n  file that invokes additional operations on the generated starter files. [Example manifest file](https://github.com/ionic-team/starters/blob/7bcf9aa56289f36a5f03ed24bed76ba8c3ac89fe/vue/official/list/ionic.starter.json#L3).\n\n## Previewing\n\nYou can preview the starters by navigating to the `build` directory and running `ls` to find the name of the starter you want to preview:\n\n```bash\ncd build/\nls\n```\n\nThe commands to serve the app differ slightly based on the framework. View each framework's commands below.\n\n### Angular\n\nNavigate into the starter's directory, install dependencies, then serve the app:\n\n```bash\ncd angular-official-list/\nnpm i\nnpm run start\n```\n\n> [!NOTE]\n> Navigate to http://localhost:4200/ in your browser to preview the app.\n\n### React\n\nNavigate into the starter's directory, install dependencies, then serve the app:\n\n```bash\ncd react-official-list/\nnpm i\nnpm run start\n```\n\n> [!NOTE]\n> The browser will automatically open a tab and navigate to http://localhost:3000/ to preview the app.\n\n### React Vite\n\nNavigate into the starter's directory, install dependencies, then serve the app:\n\n```bash\ncd react-vite-official-list/\nnpm i\nnpm run dev\n```\n\n> [!NOTE]\n> The URL to preview the app defaults to http://localhost:5173/ unless that port is in use. The exact URL will be displayed after running the dev server.\n\n### Vue\n\nNavigate into the starter's directory, install dependencies, then serve the app:\n\n```bash\ncd vue-official-list/\nnpm i\nnpm run serve\n```\n\n> [!NOTE]\n> Navigate to http://localhost:8080/ in your browser to preview the app.\n\n### Vue Vite\n\nNavigate into the starter's directory, install dependencies, then serve the app:\n\n```bash\ncd vue-vite-official-list/\nnpm i\nnpm run dev\n```\n\n> [!NOTE]\n> The URL to preview the app defaults to http://localhost:5173/ unless that port is in use. The exact URL will be displayed after running the dev server.\n\n## Testing\n\nYou can test starters by running:\n\n```bash\nnpm run starters:test\n```\n\nYou can test a single starter by specifying the starter ID (also the starter's\ndirectory name within the `build/` directory):\n\n```bash\nnpm run starters:test -- angular-official-tabs\n```\n\n* Starters must be generated before they can be tested. The test command works\n  with starters generated in the `build/` directory.\n* To test a starter, first the dependencies are installed (`npm install`), and\n  then the `scripts.test` key in the starter's manifest file is executed. This\n  way, each starter can define how it must be tested.\n\n### Manifest Files\n\nThe starter manifest file (named `ionic.starter.json`) is a required JSON file\nat the root of the starter. The build process reads the manifest and takes\nactions based upon what's defined in the file.\n\n| Key            | Description\n|----------------|-------------\n| `name`         | The human-readable name.\n| `baseref`      | The latest git ref (branch or sha) at which the starter is compatible with the base files (located in `<type>/base/`).\n| `welcome`      | _(optional)_ A custom message to be displayed when the user runs `ionic start` on the starter. See [Starter Welcome](#starter-welcome).\n| `gitignore`    | _(optional)_ During build, the defined array of strings will be added to the bottom of the project's `.gitignore` file.\n| `packageJson`  | _(optional)_ During build, the defined keys will be recursively merged into the generated `package.json`.\n| `tsconfigJson` | _(optional)_ During build, the defined keys will be recursively merged into the generated `tsconfig.json`.\n| `tarignore`    | _(optional)_ During deploy, the defined array of strings will be interpreted as globs to ignore files to include in the tar file when deployed.\n| `scripts`      | _(optional)_ An object of scripts that run during build or deploy.\n| `scripts.test` | _(optional)_ During test, after dependencies are installed, the defined script will be executed to test the starter.\n\n### Community Starters\n\nTo submit your own starter,\n\n1. Fork this repo.\n1. Fork or copy the [Example\n   Starter](https://github.com/ionic-team/starter-example).\n1. Add a git submodule for your starter at `<type>/community/<your github\n   name>/<github repo name>`. For example:\n\n    ```bash\n    git submodule add https://github.com/ionic-team/starter-example.git ionic-angular/community/ionic-team/example\n    ```\n\n1. Build your starter. For example:\n\n    ```bash\n    npm run starters:build -- ionic-angular/community/ionic-team/example\n    ```\n\n1. Copy the generated starter into a different directory and test it!\n\nTo update your starter,\n\n1. Push changes to your starter repo freely.\n1. Run `git pull` in your starters fork directory\n   (`ionic-angular/community/ionic-team/example` for example).\n1. Commit the changes to your fork and create a PR.\n\nTips:\n\n* When you `cd` into a git submodule directory (i.e.\n  `ionic-angular/community/ionic-team/example`), git commands operate on the\n  submodule as its own repository.\n* Inside a submodule folder, `git remote add local /path/to/starter/at/local`\n  will add a new [git remote](https://git-scm.com/docs/git-remote) which you can\n  use to pull local changes in. Make commits in your local starter repo, then\n  `git pull local`.\n* New commits in a submodule must also be saved in the base repository for PRs.\n* Don't include a `.gitignore` file. If you need to ignore some files in your\n  starter repo, you can use the private gitignore file located at\n  `.git/info/exclude`. If you need to add entries, you can use the `gitignore`\n  key in your manifest file.\n\n### Starter Welcome\n\nFor a custom message to be displayed for your starter during `ionic start`, you\ncan set the `welcome` key of your starter manifest file to a string. For\nterminal colors and other formatting, you can create a quick script to generate\nthe message, JSON-encode it, and copy it into your manifest file. See [this\nexample\nscript](https://github.com/ionic-team/starters/tree/master/ionic-angular/official/super.welcome.js)\nfor the Super Starter.\n\n## Deploying (Automatic through CI)\n\nStarters are deployed automatically when new commits are pushed to the `master`\nbranch.\n\nDuring the deploy process, the `build/` directory is read and an archive of each\ngenerated starter is created and gzipped and uploaded to an S3 bucket. The S3\nbucket has a CloudFront distribution for close-proximity downloads. The\ndistribution ID is `E1XZ2T0DZXJ521` and can be found [at this\nURL](https://d2ql0qc7j8u4b2.cloudfront.net).\n\n## Deploying (Manually)\n\nFirst, make sure you pull down the latest community starter submodules by running:\n\n```bash\ngit pull --recurse-submodules\n```\n\nIf you have not already initialized the submodules locally run:\n\n```bash\ngit submodule update --init --recursive\n```\n\nThen run:\n\n```bash\nnpm run starters:deploy\n```\n\nYou can use `npm run starters:deploy -- --dry` to test the tar process.\n\nBy default, starters are deployed to the `testing` \"tag\" (`latest` is\nproduction). You can install tagged starters by specifying the `--tag=<tag>`\noption to `ionic start`).\n\n> Note you will need permissions to the S3 bucket to manually deploy\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2017 Ionic\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Ionic Starter Templates\n\n:book: **Start an Ionic app**: See our [Getting\nStarted](https://ionicframework.com/docs) guide.\n\n:mega: **Support**: See our [Support Page][ionic-support] for general\nsupport questions. The issues on GitHub should be reserved for bug reports and\nfeature requests.\n\n:sparkling_heart: **Modify or add starter templates**: See\n[CONTRIBUTING.md](./CONTRIBUTING.md).\n\n### Starters\n\nProject Type                         | Ionic Framework Version | Framework Version | Build Tool               | Template Links                                                            | Notes\n-------------------------------------|-------------------------|-------------------|--------------------------|---------------------------------------------------------------------------| ----\n**`ionic1`**                         | 1                       | AngularJS         |                          | [Base](ionic1/base) / [Starters](ionic1/official)                         | Legacy framework; supports AngularJS only.\n**`ionic-angular`**                  | 2/3                     | Angular (2+)      | `@ionic/app-scripts`     | [Base](ionic-angular/base) / [Starters](ionic-angular/official)           | Uses legacy build tool; Angular CLI unsupported.\n**`angular`**                        | 4+                      | Angular (4+)      | Angular CLI              | [Base](angular/base) / [Starters](angular/official)                       | Modern Angular CLI tooling.\n**`angular-standalone`**             | 6+                      | Angular (8+)      | Angular CLI              | [Base](angular-standalone/base) / [Starters](angular-standalone/official) | Supports standalone components introduced in Angular 8.\n**`react` (Ionic CLI v6 and below)** | 4.11+                   | React (16+)       | `react-scripts`          | [Base](react/base) / [Starters](react/official)                           | Uses Create React App; supports React Hooks.\n**`react` (Ionic CLI v7+)**          | 4.11+                   | React (17+)       | Vite (`vite`)            | [Base](react-vite/base) / [Starters](react-vite/official)                 | Vite-based tooling for modern React development.\n**`vue` (Ionic CLI v6 and below)**   | 5.4+                    | Vue (3+)          | `@vue/cli-service`       | [Base](vue/base) / [Starters](vue/official)                               | Uses Vue CLI; supports Vue Composition API.\n**`vue` (Ionic CLI v7+)**            | 5.4+                    | Vue (3+)          | Vite (`@vite/cli`)       | [Base](vue-vite/base) / [Starters](vue-vite/official)                     | Vite-based tooling for modern Vue development.\n\n### Integrations\n\n* [Cordova](integrations/cordova)\n\n[ionic-support]: https://ionicframework.com/support\n\n[circle-badge]: https://circleci.com/gh/ionic-team/starters.svg?style=shield\n[circle-badge-url]: https://circleci.com/gh/ionic-team/starters\n"
  },
  {
    "path": "angular/base/.browserslistrc",
    "content": "# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.\n# For additional information regarding the format and rule options, please see:\n# https://github.com/browserslist/browserslist#queries\n\n# For the full list of supported browsers by the Angular framework, please see:\n# https://angular.dev/reference/versions#browser-support\n\n# You can see what browsers were selected by your queries by running:\n#   npx browserslist\n\nChrome >=107\nFirefox >=106\nEdge >=107\nSafari >=16.1\niOS >=16.1\n"
  },
  {
    "path": "angular/base/.editorconfig",
    "content": "# Editor configuration, see https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 2\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.ts]\nquote_type = single\n\n[*.md]\nmax_line_length = off\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": "angular/base/.eslintrc.json",
    "content": "{\n  \"root\": true,\n  \"ignorePatterns\": [\"projects/**/*\"],\n  \"overrides\": [\n    {\n      \"files\": [\"*.ts\"],\n      \"parserOptions\": {\n        \"project\": [\"tsconfig.json\"],\n        \"createDefaultProgram\": true\n      },\n      \"extends\": [\n        \"plugin:@angular-eslint/recommended\",\n        \"plugin:@angular-eslint/template/process-inline-templates\"\n      ],\n      \"rules\": {\n        \"@angular-eslint/prefer-standalone\": \"off\",\n        \"@angular-eslint/component-class-suffix\": [\n          \"error\",\n          {\n            \"suffixes\": [\"Page\", \"Component\"]\n          }\n        ],\n        \"@angular-eslint/component-selector\": [\n          \"error\",\n          {\n            \"type\": \"element\",\n            \"prefix\": \"app\",\n            \"style\": \"kebab-case\"\n          }\n        ],\n        \"@angular-eslint/directive-selector\": [\n          \"error\",\n          {\n            \"type\": \"attribute\",\n            \"prefix\": \"app\",\n            \"style\": \"camelCase\"\n          }\n        ]\n      }\n    },\n    {\n      \"files\": [\"*.html\"],\n      \"extends\": [\"plugin:@angular-eslint/template/recommended\"],\n      \"rules\": {}\n    }\n  ]\n}\n"
  },
  {
    "path": "angular/base/.gitignore",
    "content": "# Specifies intentionally untracked files to ignore when using Git\n# http://git-scm.com/docs/gitignore\n\n*~\n*.sw[mnpcod]\n.tmp\n*.tmp\n*.tmp.*\nUserInterfaceState.xcuserstate\n$RECYCLE.BIN/\n\n*.log\nlog.txt\n\n\n/.sourcemaps\n/.versions\n/coverage\n\n# Ionic\n/.ionic\n/www\n/platforms\n/plugins\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-project\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n.history/*\n\n\n# Miscellaneous\n/.angular\n/.angular/cache\n.sass-cache/\n/.nx\n/.nx/cache\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "angular/base/.vscode/extensions.json",
    "content": "{\n    \"recommendations\": [\n       \"Webnative.webnative\"\n    ]\n}\n"
  },
  {
    "path": "angular/base/.vscode/settings.json",
    "content": "{\n  \"typescript.preferences.autoImportFileExcludePatterns\": [\"@ionic/angular/common\", \"@ionic/angular/standalone\"]\n}\n"
  },
  {
    "path": "angular/base/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"app\": {\n      \"projectType\": \"application\",\n      \"schematics\": {},\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular-devkit/build-angular:browser\",\n          \"options\": {\n            \"outputPath\": \"www\",\n            \"index\": \"src/index.html\",\n            \"main\": \"src/main.ts\",\n            \"polyfills\": \"src/polyfills.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"inlineStyleLanguage\": \"scss\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"src/assets\",\n                \"output\": \"assets\"\n              },\n              {\n                \"glob\": \"**/*.svg\",\n                \"input\": \"node_modules/ionicons/dist/ionicons/svg\",\n                \"output\": \"./svg\"\n              }\n            ],\n            \"styles\": [\"src/global.scss\", \"src/theme/variables.scss\"],\n            \"scripts\": []\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"2mb\",\n                  \"maximumError\": \"5mb\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"2kb\",\n                  \"maximumError\": \"4kb\"\n                }\n              ],\n              \"fileReplacements\": [\n                {\n                  \"replace\": \"src/environments/environment.ts\",\n                  \"with\": \"src/environments/environment.prod.ts\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"buildOptimizer\": false,\n              \"optimization\": false,\n              \"vendorChunk\": true,\n              \"extractLicenses\": false,\n              \"sourceMap\": true,\n              \"namedChunks\": true\n            },\n            \"ci\": {\n              \"progress\": false\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular-devkit/build-angular:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"app:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"app:build:development\"\n            },\n            \"ci\": {\n              \"progress\": false\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        },\n        \"extract-i18n\": {\n          \"builder\": \"@angular-devkit/build-angular:extract-i18n\",\n          \"options\": {\n            \"buildTarget\": \"app:build\"\n          }\n        },\n        \"test\": {\n          \"builder\": \"@angular-devkit/build-angular:karma\",\n          \"options\": {\n            \"main\": \"src/test.ts\",\n            \"polyfills\": \"src/polyfills.ts\",\n            \"tsConfig\": \"tsconfig.spec.json\",\n            \"karmaConfig\": \"karma.conf.js\",\n            \"inlineStyleLanguage\": \"scss\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"src/assets\",\n                \"output\": \"assets\"\n              },\n              {\n                \"glob\": \"**/*.svg\",\n                \"input\": \"node_modules/ionicons/dist/ionicons/svg\",\n                \"output\": \"./svg\"\n              }\n            ],\n            \"styles\": [\"src/global.scss\", \"src/theme/variables.scss\"],\n            \"scripts\": []\n          },\n          \"configurations\": {\n            \"ci\": {\n              \"progress\": false,\n              \"watch\": false\n            }\n          }\n        },\n        \"lint\": {\n          \"builder\": \"@angular-eslint/builder:lint\",\n          \"options\": {\n            \"lintFilePatterns\": [\n              \"src/**/*.ts\",\n              \"src/**/*.html\"\n            ]\n          }\n        }\n      }\n    }\n  },\n  \"cli\": {\n    \"schematicCollections\": [\n      \"@ionic/angular-toolkit\"\n    ]\n  },\n  \"schematics\": {\n    \"@ionic/angular-toolkit:component\": {\n      \"styleext\": \"scss\"\n    },\n    \"@ionic/angular-toolkit:page\": {\n      \"styleext\": \"scss\"\n    }\n  }\n}\n"
  },
  {
    "path": "angular/base/ionic.config.json",
    "content": "{\n  \"name\": \"ionic-app-base\",\n  \"app_id\": \"\",\n  \"type\": \"angular\",\n  \"integrations\": {}\n}\n"
  },
  {
    "path": "angular/base/karma.conf.js",
    "content": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/1.0/config/configuration-file.html\n\nmodule.exports = function (config) {\n  config.set({\n    basePath: '',\n    frameworks: ['jasmine', '@angular-devkit/build-angular'],\n    plugins: [\n      require('karma-jasmine'),\n      require('karma-chrome-launcher'),\n      require('karma-jasmine-html-reporter'),\n      require('karma-coverage'),\n      require('@angular-devkit/build-angular/plugins/karma')\n    ],\n    client: {\n      jasmine: {\n        // you can add configuration options for Jasmine here\n        // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html\n        // for example, you can disable the random execution with `random: false`\n        // or set a specific seed with `seed: 4321`\n      },\n      clearContext: false // leave Jasmine Spec Runner output visible in browser\n    },\n    jasmineHtmlReporter: {\n      suppressAll: true // removes the duplicated traces\n    },\n    coverageReporter: {\n      dir: require('path').join(__dirname, './coverage/app'),\n      subdir: '.',\n      reporters: [\n        { type: 'html' },\n        { type: 'text-summary' }\n      ]\n    },\n    reporters: ['progress', 'kjhtml'],\n    port: 9876,\n    colors: true,\n    logLevel: config.LOG_INFO,\n    autoWatch: true,\n    browsers: ['Chrome'],\n    singleRun: false,\n    restartOnFileChange: true\n  });\n};\n"
  },
  {
    "path": "angular/base/package.json",
    "content": "{\n  \"name\": \"ionic-app-base\",\n  \"version\": \"0.0.0\",\n  \"author\": \"Ionic Framework\",\n  \"homepage\": \"https://ionicframework.com/\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"test\": \"ng test\",\n    \"lint\": \"ng lint\"\n  },\n  \"private\": true,\n  \"dependencies\": {\n    \"@angular/animations\": \"^20.0.0\",\n    \"@angular/common\": \"^20.0.0\",\n    \"@angular/compiler\": \"^20.0.0\",\n    \"@angular/core\": \"^20.0.0\",\n    \"@angular/forms\": \"^20.0.0\",\n    \"@angular/platform-browser\": \"^20.0.0\",\n    \"@angular/platform-browser-dynamic\": \"^20.0.0\",\n    \"@angular/router\": \"^20.0.0\",\n    \"@ionic/angular\": \"^8.0.0\",\n    \"ionicons\": \"^7.0.0\",\n    \"rxjs\": \"~7.8.0\",\n    \"tslib\": \"^2.3.0\",\n    \"zone.js\": \"~0.15.0\"\n  },\n  \"devDependencies\": {\n    \"@angular-devkit/build-angular\": \"^20.0.0\",\n    \"@angular-eslint/builder\": \"^20.0.0\",\n    \"@angular-eslint/eslint-plugin\": \"^20.0.0\",\n    \"@angular-eslint/eslint-plugin-template\": \"^20.0.0\",\n    \"@angular-eslint/schematics\": \"^20.0.0\",\n    \"@angular-eslint/template-parser\": \"^20.0.0\",\n    \"@angular/cli\": \"^20.0.0\",\n    \"@angular/compiler-cli\": \"^20.0.0\",\n    \"@angular/language-service\": \"^20.0.0\",\n    \"@ionic/angular-toolkit\": \"^12.0.0\",\n    \"@types/jasmine\": \"~5.1.0\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.18.0\",\n    \"@typescript-eslint/parser\": \"^8.18.0\",\n    \"eslint\": \"^9.16.0\",\n    \"eslint-plugin-import\": \"^2.29.1\",\n    \"eslint-plugin-jsdoc\": \"^48.2.1\",\n    \"eslint-plugin-prefer-arrow\": \"1.2.2\",\n    \"jasmine-core\": \"~5.1.0\",\n    \"jasmine-spec-reporter\": \"~5.0.0\",\n    \"karma\": \"~6.4.0\",\n    \"karma-chrome-launcher\": \"~3.2.0\",\n    \"karma-coverage\": \"~2.2.0\",\n    \"karma-jasmine\": \"~5.1.0\",\n    \"karma-jasmine-html-reporter\": \"~2.1.0\",\n    \"typescript\": \"~5.9.0\"\n  }\n}\n"
  },
  {
    "path": "angular/base/src/app/app.component.html",
    "content": "<ion-app>\n</ion-app>\n"
  },
  {
    "path": "angular/base/src/app/app.component.scss",
    "content": ""
  },
  {
    "path": "angular/base/src/app/app.component.spec.ts",
    "content": "import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { TestBed } from '@angular/core/testing';\n\nimport { AppComponent } from './app.component';\n\ndescribe('AppComponent', () => {\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      declarations: [AppComponent],\n      schemas: [CUSTOM_ELEMENTS_SCHEMA],\n    }).compileComponents();\n  });\n\n  it('should create the app', () => {\n    const fixture = TestBed.createComponent(AppComponent);\n    const app = fixture.componentInstance;\n    expect(app).toBeTruthy();\n  });\n\n});\n"
  },
  {
    "path": "angular/base/src/app/app.component.ts",
    "content": "import { Component } from '@angular/core';\n\n@Component({\n  selector: 'app-root',\n  templateUrl: 'app.component.html',\n  styleUrls: ['app.component.scss'],\n  standalone: false,\n})\nexport class AppComponent {\n  constructor() {}\n}\n"
  },
  {
    "path": "angular/base/src/app/app.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { RouteReuseStrategy } from '@angular/router';\n\nimport { IonicModule, IonicRouteStrategy } from '@ionic/angular';\n\nimport { AppComponent } from './app.component';\n\n@NgModule({\n  declarations: [AppComponent],\n  imports: [BrowserModule, IonicModule.forRoot()],\n  providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],\n  bootstrap: [AppComponent],\n})\nexport class AppModule {}\n"
  },
  {
    "path": "angular/base/src/environments/environment.prod.ts",
    "content": "export const environment = {\n  production: true\n};\n"
  },
  {
    "path": "angular/base/src/environments/environment.ts",
    "content": "// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build` replaces `environment.ts` with `environment.prod.ts`.\n// The list of file replacements can be found in `angular.json`.\n\nexport const environment = {\n  production: false\n};\n\n/*\n * For easier debugging in development mode, you can import the following file\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\n *\n * This import should be commented out in production mode because it will have a negative impact\n * on performance if an error is thrown.\n */\n// import 'zone.js/plugins/zone-error';  // Included with Angular CLI.\n"
  },
  {
    "path": "angular/base/src/global.scss",
    "content": "/*\n * App Global CSS\n * ----------------------------------------------------------------------------\n * Put style rules here that you want to apply globally. These styles are for\n * the entire app and not just one component. Additionally, this file can be\n * used as an entry point to import other CSS/Sass files to be included in the\n * output CSS.\n * For more information on global stylesheets, visit the documentation:\n * https://ionicframework.com/docs/layout/global-stylesheets\n */\n\n/* Core CSS required for Ionic components to work properly */\n@import \"@ionic/angular/css/core.css\";\n\n/* Basic CSS for apps built with Ionic */\n@import \"@ionic/angular/css/normalize.css\";\n@import \"@ionic/angular/css/structure.css\";\n@import \"@ionic/angular/css/typography.css\";\n@import \"@ionic/angular/css/display.css\";\n\n/* Optional CSS utils that can be commented out */\n@import \"@ionic/angular/css/padding.css\";\n@import \"@ionic/angular/css/float-elements.css\";\n@import \"@ionic/angular/css/text-alignment.css\";\n@import \"@ionic/angular/css/text-transformation.css\";\n@import \"@ionic/angular/css/flex-utils.css\";\n\n/**\n * Ionic Dark Mode\n * -----------------------------------------------------\n * For more info, please see:\n * https://ionicframework.com/docs/theming/dark-mode\n */\n\n/* @import \"@ionic/angular/css/palettes/dark.always.css\"; */\n/* @import \"@ionic/angular/css/palettes/dark.class.css\"; */\n@import \"@ionic/angular/css/palettes/dark.system.css\";\n"
  },
  {
    "path": "angular/base/src/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n  <meta charset=\"utf-8\" />\n  <title>Ionic App</title>\n\n  <base href=\"/\" />\n\n  <meta name=\"color-scheme\" content=\"light dark\" />\n  <meta name=\"viewport\" content=\"viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\" />\n  <meta name=\"format-detection\" content=\"telephone=no\" />\n  <meta name=\"msapplication-tap-highlight\" content=\"no\" />\n\n  <link rel=\"icon\" type=\"image/png\" href=\"assets/icon/favicon.png\" />\n\n  <!-- add to homescreen for ios -->\n  <meta name=\"mobile-web-app-capable\" content=\"yes\" />\n  <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\" />\n</head>\n\n<body>\n  <app-root></app-root>\n</body>\n\n</html>\n"
  },
  {
    "path": "angular/base/src/main.ts",
    "content": "import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n  .catch(err => console.log(err));\n"
  },
  {
    "path": "angular/base/src/polyfills.ts",
    "content": "/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfills to this file.\n *\n * This file is divided into 2 sections:\n *   1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.\n *   2. Application imports. Files imported after ZoneJS that should be loaded before your main\n *      file.\n *\n * The current setup is for so-called \"evergreen\" browsers; the last versions of browsers that\n * automatically update themselves. This includes recent versions of Safari, Chrome (including\n * Opera), Edge on the desktop, and iOS and Chrome on mobile.\n *\n * Learn more in https://angular.io/guide/browser-support\n */\n\n/***************************************************************************************************\n * BROWSER POLYFILLS\n */\n\n/**\n * By default, zone.js will patch all possible macroTask and DomEvents\n * user can disable parts of macroTask/DomEvents patch by setting following flags\n * because those flags need to be set before `zone.js` being loaded, and webpack\n * will put import in the top of bundle, so user need to create a separate file\n * in this directory (for example: zone-flags.ts), and put the following flags\n * into that file, and then add the following code before importing zone.js.\n * import './zone-flags';\n *\n * The flags allowed in zone-flags.ts are listed here.\n *\n * The following flags will work for all browsers.\n *\n * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame\n * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick\n * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames\n *\n *  in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js\n *  with the following flag, it will bypass `zone.js` patch for IE/Edge\n *\n *  (window as any).__Zone_enable_cross_context_check = true;\n *\n */\n \nimport './zone-flags';\n\n/***************************************************************************************************\n * Zone JS is required by default for Angular itself.\n */\nimport 'zone.js';  // Included with Angular CLI.\n\n\n/***************************************************************************************************\n * APPLICATION IMPORTS\n */\n"
  },
  {
    "path": "angular/base/src/test.ts",
    "content": "// This file is required by karma.conf.js and loads recursively all the .spec and framework files\n\nimport 'zone.js/testing';\nimport { getTestBed } from '@angular/core/testing';\nimport {\n  BrowserDynamicTestingModule,\n  platformBrowserDynamicTesting\n} from '@angular/platform-browser-dynamic/testing';\n\n// First, initialize the Angular testing environment.\ngetTestBed().initTestEnvironment(\n  BrowserDynamicTestingModule,\n  platformBrowserDynamicTesting(),\n);\n"
  },
  {
    "path": "angular/base/src/theme/variables.scss",
    "content": "// For information on how to create your own theme, please refer to:\n// https://ionicframework.com/docs/theming/\n"
  },
  {
    "path": "angular/base/src/zone-flags.ts",
    "content": "/**\n * Prevents Angular change detection from\n * running with certain Web Component callbacks\n */\n// eslint-disable-next-line no-underscore-dangle\n(window as any).__Zone_disable_customElements = true;\n"
  },
  {
    "path": "angular/base/tsconfig.app.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"files\": [\n    \"src/main.ts\",\n    \"src/polyfills.ts\"\n  ],\n  \"include\": [\n    \"src/**/*.d.ts\"\n  ]\n}\n"
  },
  {
    "path": "angular/base/tsconfig.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"baseUrl\": \"./\",\n    \"outDir\": \"./dist/out-tsc\",\n    \"forceConsistentCasingInFileNames\": true,\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"sourceMap\": true,\n    \"declaration\": false,\n    \"downlevelIteration\": true,\n    \"experimentalDecorators\": true,\n    \"moduleResolution\": \"node\",\n    \"importHelpers\": true,\n    \"target\": \"es2022\",\n    \"module\": \"es2020\",\n    \"lib\": [\n      \"es2018\",\n      \"dom\"\n    ],\n    \"skipLibCheck\": true,\n    \"useDefineForClassFields\": false\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "angular/base/tsconfig.spec.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/spec\",\n    \"types\": [\n      \"jasmine\"\n    ]\n  },\n  \"files\": [\n    \"src/test.ts\",\n    \"src/polyfills.ts\"\n  ],\n  \"include\": [\n    \"src/**/*.spec.ts\",\n    \"src/**/*.d.ts\"\n  ]\n}\n"
  },
  {
    "path": "angular/community/.gitkeep",
    "content": ""
  },
  {
    "path": "angular/official/blank/ionic.starter.json",
    "content": "{\n  \"name\": \"Blank Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless\"\n  }\n}\n"
  },
  {
    "path": "angular/official/blank/src/app/app-routing.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { PreloadAllModules, RouterModule, Routes } from '@angular/router';\n\nconst routes: Routes = [\n  {\n    path: 'home',\n    loadChildren: () => import('./home/home.module').then( m => m.HomePageModule)\n  },\n  {\n    path: '',\n    redirectTo: 'home',\n    pathMatch: 'full'\n  },\n];\n\n@NgModule({\n  imports: [\n    RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })\n  ],\n  exports: [RouterModule]\n})\nexport class AppRoutingModule { }\n"
  },
  {
    "path": "angular/official/blank/src/app/app.component.html",
    "content": "<ion-app>\n  <ion-router-outlet></ion-router-outlet>\n</ion-app>\n"
  },
  {
    "path": "angular/official/blank/src/app/app.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { RouteReuseStrategy } from '@angular/router';\n\nimport { IonicModule, IonicRouteStrategy } from '@ionic/angular';\n\nimport { AppComponent } from './app.component';\nimport { AppRoutingModule } from './app-routing.module';\n\n@NgModule({\n  declarations: [AppComponent],\n  imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],\n  providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],\n  bootstrap: [AppComponent],\n})\nexport class AppModule {}\n"
  },
  {
    "path": "angular/official/blank/src/app/home/home-routing.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { HomePage } from './home.page';\n\nconst routes: Routes = [\n  {\n    path: '',\n    component: HomePage,\n  }\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule]\n})\nexport class HomePageRoutingModule {}\n"
  },
  {
    "path": "angular/official/blank/src/app/home/home.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IonicModule } from '@ionic/angular';\nimport { FormsModule } from '@angular/forms';\nimport { HomePage } from './home.page';\n\nimport { HomePageRoutingModule } from './home-routing.module';\n\n\n@NgModule({\n  imports: [\n    CommonModule,\n    FormsModule,\n    IonicModule,\n    HomePageRoutingModule\n  ],\n  declarations: [HomePage]\n})\nexport class HomePageModule {}\n"
  },
  {
    "path": "angular/official/blank/src/app/home/home.page.html",
    "content": "<ion-header [translucent]=\"true\">\n  <ion-toolbar>\n    <ion-title>\n      Blank\n    </ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content [fullscreen]=\"true\">\n  <ion-header collapse=\"condense\">\n    <ion-toolbar>\n      <ion-title size=\"large\">Blank</ion-title>\n    </ion-toolbar>\n  </ion-header>\n\n  <div id=\"container\">\n    <strong>Ready to create an app?</strong>\n    <p>Start with Ionic <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n  </div>\n</ion-content>\n"
  },
  {
    "path": "angular/official/blank/src/app/home/home.page.scss",
    "content": "#container {\n  text-align: center;\n\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n\n  color: #8c8c8c;\n\n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}"
  },
  {
    "path": "angular/official/blank/src/app/home/home.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { IonicModule } from '@ionic/angular';\n\nimport { HomePage } from './home.page';\n\ndescribe('HomePage', () => {\n  let component: HomePage;\n  let fixture: ComponentFixture<HomePage>;\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      declarations: [HomePage],\n      imports: [IonicModule.forRoot()]\n    }).compileComponents();\n\n    fixture = TestBed.createComponent(HomePage);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular/official/blank/src/app/home/home.page.ts",
    "content": "import { Component } from '@angular/core';\n\n@Component({\n  selector: 'app-home',\n  templateUrl: 'home.page.html',\n  styleUrls: ['home.page.scss'],\n  standalone: false,\n})\nexport class HomePage {\n\n  constructor() {}\n\n}\n"
  },
  {
    "path": "angular/official/list/ionic.config.json",
    "content": "{\n  \"name\": \"list\",\n  \"integrations\": {},\n  \"type\": \"angular\"\n}\n"
  },
  {
    "path": "angular/official/list/ionic.starter.json",
    "content": "{\n  \"name\": \"List Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless\"\n  }\n}\n"
  },
  {
    "path": "angular/official/list/src/app/app-routing.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { PreloadAllModules, RouterModule, Routes } from '@angular/router';\n\nconst routes: Routes = [\n  {\n    path: 'home',\n    loadChildren: () => import('./home/home.module').then( m => m.HomePageModule)\n  },\n  {\n    path: 'message/:id',\n    loadChildren: () => import('./view-message/view-message.module').then( m => m.ViewMessagePageModule)\n  },\n  {\n    path: '',\n    redirectTo: 'home',\n    pathMatch: 'full'\n  },\n];\n\n@NgModule({\n  imports: [\n    RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })\n  ],\n  exports: [RouterModule]\n})\nexport class AppRoutingModule { }\n"
  },
  {
    "path": "angular/official/list/src/app/app.component.html",
    "content": "<ion-app>\n  <ion-router-outlet></ion-router-outlet>\n</ion-app>\n"
  },
  {
    "path": "angular/official/list/src/app/app.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { RouteReuseStrategy } from '@angular/router';\n\nimport { IonicModule, IonicRouteStrategy } from '@ionic/angular';\n\nimport { AppComponent } from './app.component';\nimport { AppRoutingModule } from './app-routing.module';\n\n@NgModule({\n  declarations: [AppComponent],\n  imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],\n  providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],\n  bootstrap: [AppComponent],\n})\nexport class AppModule {}\n"
  },
  {
    "path": "angular/official/list/src/app/home/home-routing.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { HomePage } from './home.page';\n\nconst routes: Routes = [\n  {\n    path: '',\n    component: HomePage\n  }\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule],\n})\nexport class HomePageRoutingModule {}\n"
  },
  {
    "path": "angular/official/list/src/app/home/home.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IonicModule } from '@ionic/angular';\nimport { FormsModule } from '@angular/forms';\n\nimport { HomePage } from './home.page';\nimport { HomePageRoutingModule } from './home-routing.module';\nimport { MessageComponentModule } from '../message/message.module';\n\n@NgModule({\n  imports: [\n    CommonModule,\n    FormsModule,\n    IonicModule,\n    MessageComponentModule,\n    HomePageRoutingModule\n  ],\n  declarations: [HomePage]\n})\nexport class HomePageModule {}\n"
  },
  {
    "path": "angular/official/list/src/app/home/home.page.html",
    "content": "<ion-header [translucent]=\"true\">\n  <ion-toolbar>\n    <ion-title>\n      Inbox\n    </ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content [fullscreen]=\"true\">\n  <ion-refresher slot=\"fixed\" (ionRefresh)=\"refresh($event)\">\n    <ion-refresher-content></ion-refresher-content>\n  </ion-refresher>\n\n  <ion-header collapse=\"condense\">\n    <ion-toolbar>\n      <ion-title size=\"large\">\n        Inbox\n      </ion-title>\n    </ion-toolbar>\n  </ion-header>\n\n  <ion-list>\n    @for (message of getMessages(); track message) {\n      <app-message [message]=\"message\"></app-message>\n    }\n  </ion-list>\n</ion-content>\n"
  },
  {
    "path": "angular/official/list/src/app/home/home.page.scss",
    "content": ""
  },
  {
    "path": "angular/official/list/src/app/home/home.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { RouterModule } from '@angular/router';\nimport { IonicModule } from '@ionic/angular';\n\nimport { MessageComponentModule } from '../message/message.module';\n\nimport { HomePage } from './home.page';\n\ndescribe('HomePage', () => {\n  let component: HomePage;\n  let fixture: ComponentFixture<HomePage>;\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      declarations: [HomePage],\n      imports: [IonicModule.forRoot(), MessageComponentModule, RouterModule.forRoot([])]\n    }).compileComponents();\n\n    fixture = TestBed.createComponent(HomePage);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular/official/list/src/app/home/home.page.ts",
    "content": "import { Component, inject } from '@angular/core';\nimport { RefresherCustomEvent } from '@ionic/angular';\nimport { MessageComponent } from '../message/message.component';\n\nimport { DataService, Message } from '../services/data.service';\n\n@Component({\n  selector: 'app-home',\n  templateUrl: 'home.page.html',\n  styleUrls: ['home.page.scss'],\n  standalone: false,\n})\nexport class HomePage {\n  private data = inject(DataService);\n  constructor() {}\n\n  refresh(ev: any) {\n    setTimeout(() => {\n      (ev as RefresherCustomEvent).detail.complete();\n    }, 3000);\n  }\n\n  getMessages(): Message[] {\n    return this.data.getMessages();\n  }\n}\n"
  },
  {
    "path": "angular/official/list/src/app/message/message.component.html",
    "content": "@if (message) {\n  <ion-item [routerLink]=\"'/message/' + message.id\" [detail]=\"false\">\n    <div slot=\"start\" [class]=\"!message.read ? 'dot dot-unread' : 'dot'\"></div>\n    <ion-label class=\"ion-text-wrap\">\n      <h2>\n        {{ message.fromName }}\n        <span class=\"date\">\n          <ion-note>{{ message.date }}</ion-note>\n          @if (isIos()) {\n            <ion-icon aria-hidden=\"true\" name=\"chevron-forward\" size=\"small\"></ion-icon>\n          }\n        </span>\n      </h2>\n      <h3>{{ message.subject }}</h3>\n      <p>\n        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n      </p>\n    </ion-label>\n  </ion-item>\n}\n"
  },
  {
    "path": "angular/official/list/src/app/message/message.component.scss",
    "content": "ion-item {\n  --padding-start: 0;\n  --inner-padding-end: 0;\n}\n\nion-label {\n  margin-top: 12px;\n  margin-bottom: 12px;\n}\n\nion-item h2 {\n  font-weight: 600;\n  margin: 0;\n  \n  /**\n   * With larger font scales\n   * the date/time should wrap to the next\n   * line. However, there should be\n   * space between the name and the date/time\n   * if they can appear on the same line.\n   */\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: space-between;\n}\n\nion-item p {\n  text-overflow: ellipsis;\n  overflow: hidden;\n  white-space: nowrap;\n  width: 95%;\n}\n\nion-item .date {\n  align-items: center;\n  display: flex;\n}\n\nion-item ion-icon {\n  color: #c9c9ca;\n}\n\nion-item ion-note {\n  font-size: 0.9375rem;\n  margin-right: 8px;\n  font-weight: normal;\n}\n\nion-item ion-note.md {\n  margin-right: 14px;\n}\n\n.dot {\n  display: block;\n  height: 12px;\n  width: 12px;\n  border-radius: 50%;\n  align-self: start;\n  margin: 16px 10px 16px 16px;\n}\n\n.dot-unread {\n  background: var(--ion-color-primary);\n}\n\nion-footer ion-title {\n  font-size: 11px;\n  font-weight: normal;\n}"
  },
  {
    "path": "angular/official/list/src/app/message/message.component.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { RouterModule } from '@angular/router';\nimport { IonicModule } from '@ionic/angular';\n\nimport { MessageComponent } from './message.component';\n\ndescribe('MessageComponent', () => {\n  let component: MessageComponent;\n  let fixture: ComponentFixture<MessageComponent>;\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      declarations: [MessageComponent],\n      imports: [IonicModule.forRoot(), RouterModule.forRoot([])]\n    }).compileComponents();\n\n    fixture = TestBed.createComponent(MessageComponent);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular/official/list/src/app/message/message.component.ts",
    "content": "import { ChangeDetectionStrategy, Component, inject, Input } from '@angular/core';\nimport { Platform } from '@ionic/angular';\nimport { Message } from '../services/data.service';\n\n@Component({\n  selector: 'app-message',\n  templateUrl: './message.component.html',\n  styleUrls: ['./message.component.scss'],\n  standalone: false,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MessageComponent {\n  private platform = inject(Platform);\n  @Input() message?: Message;\n  isIos() {\n    return this.platform.is('ios')\n  }\n}\n"
  },
  {
    "path": "angular/official/list/src/app/message/message.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\n\nimport { IonicModule } from '@ionic/angular';\n\nimport { MessageComponent } from './message.component';\n\n@NgModule({\n  imports: [ CommonModule, FormsModule, IonicModule, RouterModule],\n  declarations: [MessageComponent],\n  exports: [MessageComponent]\n})\nexport class MessageComponentModule {}\n"
  },
  {
    "path": "angular/official/list/src/app/services/data.service.spec.ts",
    "content": "import { TestBed } from '@angular/core/testing';\n\nimport { DataService } from './data.service';\n\ndescribe('DataService', () => {\n  beforeEach(() => TestBed.configureTestingModule({}));\n\n  it('should be created', () => {\n    const service: DataService = TestBed.inject(DataService);\n    expect(service).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular/official/list/src/app/services/data.service.ts",
    "content": "import { Injectable } from '@angular/core';\n\nexport interface Message {\n  fromName: string;\n  subject: string;\n  date: string;\n  id: number;\n  read: boolean;\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class DataService {\n  public messages: Message[] = [\n    {\n      fromName: 'Matt Chorsey',\n      subject: 'New event: Trip to Vegas',\n      date: '9:32 AM',\n      id: 0,\n      read: false\n    },\n    {\n      fromName: 'Lauren Ruthford',\n      subject: 'Long time no chat',\n      date: '6:12 AM',\n      id: 1,\n      read: false\n    },\n    {\n      fromName: 'Jordan Firth',\n      subject: 'Report Results',\n      date: '4:55 AM',\n      id: 2,\n      read: false\n    },\n    {\n      fromName: 'Bill Thomas',\n      subject: 'The situation',\n      date: 'Yesterday',\n      id: 3,\n      read: false\n    },\n    {\n      fromName: 'Joanne Pollan',\n      subject: 'Updated invitation: Swim lessons',\n      date: 'Yesterday',\n      id: 4,\n      read: false\n    },\n    {\n      fromName: 'Andrea Cornerston',\n      subject: 'Last minute ask',\n      date: 'Yesterday',\n      id: 5,\n      read: false\n    },\n    {\n      fromName: 'Moe Chamont',\n      subject: 'Family Calendar - Version 1',\n      date: 'Last Week',\n      id: 6,\n      read: false\n    },\n    {\n      fromName: 'Kelly Richardson',\n      subject: 'Placeholder Headhots',\n      date: 'Last Week',\n      id: 7,\n      read: false\n    }\n  ];\n\n  constructor() { }\n\n  public getMessages(): Message[] {\n    return this.messages;\n  }\n\n  public getMessageById(id: number): Message {\n    return this.messages[id];\n  }\n}\n"
  },
  {
    "path": "angular/official/list/src/app/view-message/view-message-routing.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { ViewMessagePage } from './view-message.page';\n\nconst routes: Routes = [\n  {\n    path: '',\n    component: ViewMessagePage\n  }\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule],\n})\nexport class ViewMessagePageRoutingModule {}\n"
  },
  {
    "path": "angular/official/list/src/app/view-message/view-message.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ViewMessagePage } from './view-message.page';\n\nimport { IonicModule } from '@ionic/angular';\n\nimport { ViewMessagePageRoutingModule } from './view-message-routing.module';\n\n@NgModule({\n  imports: [\n    CommonModule,\n    FormsModule,\n    IonicModule,\n    ViewMessagePageRoutingModule\n  ],\n  declarations: [ViewMessagePage]\n})\nexport class ViewMessagePageModule {}\n"
  },
  {
    "path": "angular/official/list/src/app/view-message/view-message.page.html",
    "content": "<ion-header [translucent]=\"true\">\n  <ion-toolbar>\n    <ion-buttons slot=\"start\">\n      <ion-back-button [text]=\"getBackButtonText()\" defaultHref=\"/\"></ion-back-button>\n    </ion-buttons>\n  </ion-toolbar>\n</ion-header>\n\n@if (message) {\n  <ion-content [fullscreen]=\"true\">\n    <ion-item>\n      <ion-icon aria-hidden=\"true\" name=\"person-circle\" color=\"primary\"></ion-icon>\n      <ion-label class=\"ion-text-wrap\">\n        <h2>\n          {{ message.fromName }}\n          <span class=\"date\">\n            <ion-note>{{ message.date }}</ion-note>\n          </span>\n        </h2>\n        <h3>To: <ion-note>Me</ion-note></h3>\n      </ion-label>\n    </ion-item>\n    <div class=\"ion-padding\">\n      <h1>{{ message.subject }}</h1>\n      <p>\n        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n      </p>\n    </div>\n  </ion-content>\n}\n"
  },
  {
    "path": "angular/official/list/src/app/view-message/view-message.page.scss",
    "content": "ion-item {\n  --inner-padding-end: 0;\n  --background: transparent;\n}\n\nion-label {\n  margin-top: 12px;\n  margin-bottom: 12px;\n}\n\nion-item h2 {\n  font-weight: 600;\n  \n  /**\n   * With larger font scales\n   * the date/time should wrap to the next\n   * line. However, there should be\n   * space between the name and the date/time\n   * if they can appear on the same line.\n   */\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: space-between;\n}\n\nion-item .date {\n  align-items: center;\n  display: flex;\n}\n\nion-item ion-icon {\n  font-size: 42px;\n  margin-right: 8px;\n}\n\nion-item ion-note {\n  font-size: 0.9375rem;\n  margin-right: 12px;\n  font-weight: normal;\n}\n\nh1 {\n  margin: 0;\n  font-weight: bold;\n  font-size: 1.4rem;\n}\n\np {\n  line-height: 1.4;\n}"
  },
  {
    "path": "angular/official/list/src/app/view-message/view-message.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { IonicModule } from '@ionic/angular';\nimport { RouterModule } from '@angular/router';\n\nimport { ViewMessagePageRoutingModule } from './view-message-routing.module';\nimport { ViewMessagePage } from './view-message.page';\n\ndescribe('ViewMessagePage', () => {\n  let component: ViewMessagePage;\n  let fixture: ComponentFixture<ViewMessagePage>;\n\n  beforeEach(async () => {\n    TestBed.configureTestingModule({\n      declarations: [ViewMessagePage],\n      imports: [IonicModule.forRoot(), ViewMessagePageRoutingModule, RouterModule.forRoot([])]\n    }).compileComponents();\n\n    fixture = TestBed.createComponent(ViewMessagePage);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular/official/list/src/app/view-message/view-message.page.ts",
    "content": "\nimport { Component, inject, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { IonicModule, Platform } from '@ionic/angular';\nimport { DataService, Message } from '../services/data.service';\n\n@Component({\n  selector: 'app-view-message',\n  templateUrl: './view-message.page.html',\n  styleUrls: ['./view-message.page.scss'],\n  standalone: false,\n})\nexport class ViewMessagePage implements OnInit {\n  public message!: Message;\n  private data = inject(DataService);\n  private activatedRoute = inject(ActivatedRoute);\n  private platform = inject(Platform);\n\n  constructor() {}\n\n  ngOnInit() {\n    const id = this.activatedRoute.snapshot.paramMap.get('id') as string;\n    this.message = this.data.getMessageById(parseInt(id, 10));\n  }\n\n  getBackButtonText() {\n    const isIos = this.platform.is('ios')\n    return isIos ? 'Inbox' : '';\n  }\n}\n"
  },
  {
    "path": "angular/official/sidemenu/ionic.starter.json",
    "content": "{\n  \"name\": \"Sidemenu Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless\"\n  }\n}\n"
  },
  {
    "path": "angular/official/sidemenu/src/app/app-routing.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { PreloadAllModules, RouterModule, Routes } from '@angular/router';\n\nconst routes: Routes = [\n  {\n    path: '',\n    redirectTo: 'folder/inbox',\n    pathMatch: 'full'\n  },\n  {\n    path: 'folder/:id',\n    loadChildren: () => import('./folder/folder.module').then( m => m.FolderPageModule)\n  }\n];\n\n@NgModule({\n  imports: [\n    RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })\n  ],\n  exports: [RouterModule]\n})\nexport class AppRoutingModule {}\n"
  },
  {
    "path": "angular/official/sidemenu/src/app/app.component.html",
    "content": "<ion-app>\n  <ion-split-pane contentId=\"main-content\">\n    <ion-menu contentId=\"main-content\" type=\"overlay\">\n      <ion-content>\n        <ion-list id=\"inbox-list\">\n          <ion-list-header>Inbox</ion-list-header>\n          <ion-note>hi&#64;ionicframework.com</ion-note>\n\n          @for (p of appPages; track p; let i = $index) {\n            <ion-menu-toggle auto-hide=\"false\">\n              <ion-item routerDirection=\"root\" [routerLink]=\"[p.url]\" lines=\"none\" detail=\"false\" routerLinkActive=\"selected\">\n                <ion-icon aria-hidden=\"true\" slot=\"start\" [ios]=\"p.icon + '-outline'\" [md]=\"p.icon + '-sharp'\"></ion-icon>\n                <ion-label>{{ p.title }}</ion-label>\n              </ion-item>\n            </ion-menu-toggle>\n          }\n        </ion-list>\n\n        <ion-list id=\"labels-list\">\n          <ion-list-header>Labels</ion-list-header>\n\n          @for (label of labels; track label) {\n            <ion-item lines=\"none\">\n              <ion-icon aria-hidden=\"true\" slot=\"start\" ios=\"bookmark-outline\" md=\"bookmark-sharp\"></ion-icon>\n              <ion-label>{{ label }}</ion-label>\n            </ion-item>\n          }\n        </ion-list>\n      </ion-content>\n    </ion-menu>\n    <ion-router-outlet id=\"main-content\"></ion-router-outlet>\n  </ion-split-pane>\n</ion-app>\n"
  },
  {
    "path": "angular/official/sidemenu/src/app/app.component.scss",
    "content": "ion-menu ion-content {\n  --background: var(--ion-item-background, var(--ion-background-color, #fff));\n}\n\nion-menu.md ion-content {\n  --padding-start: 8px;\n  --padding-end: 8px;\n  --padding-top: 20px;\n  --padding-bottom: 20px;\n}\n\nion-menu.md ion-list {\n  padding: 20px 0;\n}\n\nion-menu.md ion-note {\n  margin-bottom: 30px;\n}\n\nion-menu.md ion-list-header,\nion-menu.md ion-note {\n  padding-left: 10px;\n}\n\nion-menu.md ion-list#inbox-list {\n  border-bottom: 1px solid var(--ion-background-color-step-150, #d7d8da);\n}\n\nion-menu.md ion-list#inbox-list ion-list-header {\n  font-size: 22px;\n  font-weight: 600;\n\n  min-height: 20px;\n}\n\nion-menu.md ion-list#labels-list ion-list-header {\n  font-size: 16px;\n\n  margin-bottom: 18px;\n\n  color: #757575;\n\n  min-height: 26px;\n}\n\nion-menu.md ion-item {\n  --padding-start: 10px;\n  --padding-end: 10px;\n  border-radius: 4px;\n}\n\nion-menu.md ion-item.selected {\n  --background: rgba(var(--ion-color-primary-rgb), 0.14);\n}\n\nion-menu.md ion-item.selected ion-icon {\n  color: var(--ion-color-primary);\n}\n\nion-menu.md ion-item ion-icon {\n  color: #616e7e;\n}\n\nion-menu.md ion-item ion-label {\n  font-weight: 500;\n}\n\nion-menu.ios ion-content {\n  --padding-bottom: 20px;\n}\n\nion-menu.ios ion-list {\n  padding: 20px 0 0 0;\n}\n\nion-menu.ios ion-note {\n  line-height: 24px;\n  margin-bottom: 20px;\n}\n\nion-menu.ios ion-item {\n  --padding-start: 16px;\n  --padding-end: 16px;\n  --min-height: 50px;\n}\n\nion-menu.ios ion-item.selected ion-icon {\n  color: var(--ion-color-primary);\n}\n\nion-menu.ios ion-item ion-icon {\n  font-size: 24px;\n  color: #73849a;\n}\n\nion-menu.ios ion-list#labels-list ion-list-header {\n  margin-bottom: 8px;\n}\n\nion-menu.ios ion-list-header,\nion-menu.ios ion-note {\n  padding-left: 16px;\n  padding-right: 16px;\n}\n\nion-menu.ios ion-note {\n  margin-bottom: 8px;\n}\n\nion-note {\n  display: inline-block;\n  font-size: 16px;\n\n  color: var(--ion-color-medium-shade);\n}\n\nion-item.selected {\n  --color: var(--ion-color-primary);\n}"
  },
  {
    "path": "angular/official/sidemenu/src/app/app.component.spec.ts",
    "content": "import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { TestBed } from '@angular/core/testing';\n\nimport { RouterModule } from '@angular/router';\n\nimport { AppComponent } from './app.component';\n\ndescribe('AppComponent', () => {\n\n\n  beforeEach(async () => {\n\n    await TestBed.configureTestingModule({\n      declarations: [AppComponent],\n      schemas: [CUSTOM_ELEMENTS_SCHEMA],\n      imports: [RouterModule.forRoot([])],\n    }).compileComponents();\n  });\n\n  it('should create the app', () => {\n    const fixture = TestBed.createComponent(AppComponent);\n    const app = fixture.componentInstance;\n    expect(app).toBeTruthy();\n  });\n\n  // TODO(ROU-10799): Fix the flaky test.\n  xit('should have menu labels', () => {\n    const fixture = TestBed.createComponent(AppComponent);\n    fixture.detectChanges();\n    const app = fixture.nativeElement;\n    const menuItems = app.querySelectorAll('ion-label');\n    expect(menuItems.length).toEqual(12);\n    expect(menuItems[0].textContent).toContain('Inbox');\n    expect(menuItems[1].textContent).toContain('Outbox');\n  });\n\n  it('should have urls', () => {\n    const fixture = TestBed.createComponent(AppComponent);\n    fixture.detectChanges();\n    const app = fixture.nativeElement;\n    const menuItems = app.querySelectorAll('ion-item');\n    expect(menuItems.length).toEqual(12);\n    expect(menuItems[0].getAttribute('href')).toEqual('/folder/inbox');\n    expect(menuItems[1].getAttribute('href')).toEqual('/folder/outbox');\n  });\n\n});\n"
  },
  {
    "path": "angular/official/sidemenu/src/app/app.component.ts",
    "content": "import { Component } from '@angular/core';\n@Component({\n  selector: 'app-root',\n  templateUrl: 'app.component.html',\n  styleUrls: ['app.component.scss'],\n  standalone: false,\n})\nexport class AppComponent {\n  public appPages = [\n    { title: 'Inbox', url: '/folder/inbox', icon: 'mail' },\n    { title: 'Outbox', url: '/folder/outbox', icon: 'paper-plane' },\n    { title: 'Favorites', url: '/folder/favorites', icon: 'heart' },\n    { title: 'Archived', url: '/folder/archived', icon: 'archive' },\n    { title: 'Trash', url: '/folder/trash', icon: 'trash' },\n    { title: 'Spam', url: '/folder/spam', icon: 'warning' },\n  ];\n  public labels = ['Family', 'Friends', 'Notes', 'Work', 'Travel', 'Reminders'];\n  constructor() {}\n}\n"
  },
  {
    "path": "angular/official/sidemenu/src/app/app.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { RouteReuseStrategy } from '@angular/router';\n\nimport { IonicModule, IonicRouteStrategy } from '@ionic/angular';\n\nimport { AppComponent } from './app.component';\nimport { AppRoutingModule } from './app-routing.module';\n\n@NgModule({\n  declarations: [AppComponent],\n  imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],\n  providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],\n  bootstrap: [AppComponent],\n})\nexport class AppModule {}\n"
  },
  {
    "path": "angular/official/sidemenu/src/app/folder/folder-routing.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { FolderPage } from './folder.page';\n\nconst routes: Routes = [\n  {\n    path: '',\n    component: FolderPage\n  }\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule],\n})\nexport class FolderPageRoutingModule {}\n"
  },
  {
    "path": "angular/official/sidemenu/src/app/folder/folder.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { IonicModule } from '@ionic/angular';\n\nimport { FolderPageRoutingModule } from './folder-routing.module';\n\nimport { FolderPage } from './folder.page';\n\n@NgModule({\n  imports: [\n    CommonModule,\n    FormsModule,\n    IonicModule,\n    FolderPageRoutingModule\n  ],\n  declarations: [FolderPage]\n})\nexport class FolderPageModule {}\n"
  },
  {
    "path": "angular/official/sidemenu/src/app/folder/folder.page.html",
    "content": "<ion-header [translucent]=\"true\">\n  <ion-toolbar>\n    <ion-buttons slot=\"start\">\n      <ion-menu-button></ion-menu-button>\n    </ion-buttons>\n    <ion-title>{{ folder }}</ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content [fullscreen]=\"true\">\n  <ion-header collapse=\"condense\">\n    <ion-toolbar>\n      <ion-title size=\"large\">{{ folder }}</ion-title>\n    </ion-toolbar>\n  </ion-header>\n\n  <div id=\"container\">\n    <strong class=\"capitalize\">{{ folder }}</strong>\n    <p>Explore <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n  </div>\n</ion-content>\n"
  },
  {
    "path": "angular/official/sidemenu/src/app/folder/folder.page.scss",
    "content": "ion-menu-button {\n  color: var(--ion-color-primary);\n}\n\n#container {\n  text-align: center;\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n  color: #8c8c8c;\n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}"
  },
  {
    "path": "angular/official/sidemenu/src/app/folder/folder.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { RouterModule } from '@angular/router';\nimport { IonicModule } from '@ionic/angular';\n\nimport { FolderPage } from './folder.page';\n\ndescribe('FolderPage', () => {\n  let component: FolderPage;\n  let fixture: ComponentFixture<FolderPage>;\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      declarations: [FolderPage],\n      imports: [IonicModule.forRoot(), RouterModule.forRoot([])]\n    }).compileComponents();\n\n    fixture = TestBed.createComponent(FolderPage);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular/official/sidemenu/src/app/folder/folder.page.ts",
    "content": "import { Component, inject, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\n@Component({\n  selector: 'app-folder',\n  templateUrl: './folder.page.html',\n  styleUrls: ['./folder.page.scss'],\n  standalone: false,\n})\nexport class FolderPage implements OnInit {\n  public folder!: string;\n  private activatedRoute = inject(ActivatedRoute);\n  constructor() {}\n\n  ngOnInit() {\n    this.folder = this.activatedRoute.snapshot.paramMap.get('id') as string;\n  }\n}\n"
  },
  {
    "path": "angular/official/tabs/ionic.starter.json",
    "content": "{\n  \"name\": \"Tabs Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless\"\n  }\n}\n"
  },
  {
    "path": "angular/official/tabs/src/app/app-routing.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { PreloadAllModules, RouterModule, Routes } from '@angular/router';\n\nconst routes: Routes = [\n  {\n    path: '',\n    loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)\n  }\n];\n@NgModule({\n  imports: [\n    RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })\n  ],\n  exports: [RouterModule]\n})\nexport class AppRoutingModule {}\n"
  },
  {
    "path": "angular/official/tabs/src/app/app.component.html",
    "content": "<ion-app>\n  <ion-router-outlet></ion-router-outlet>\n</ion-app>\n"
  },
  {
    "path": "angular/official/tabs/src/app/app.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { RouteReuseStrategy } from '@angular/router';\n\nimport { IonicModule, IonicRouteStrategy } from '@ionic/angular';\n\nimport { AppRoutingModule } from './app-routing.module';\nimport { AppComponent } from './app.component';\n\n@NgModule({\n  declarations: [AppComponent],\n  imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],\n  providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],\n  bootstrap: [AppComponent],\n})\nexport class AppModule {}\n"
  },
  {
    "path": "angular/official/tabs/src/app/explore-container/explore-container.component.html",
    "content": "<div id=\"container\">\n  <strong>{{ name }}</strong>\n  <p>Explore <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n</div>"
  },
  {
    "path": "angular/official/tabs/src/app/explore-container/explore-container.component.scss",
    "content": "#container {\n  text-align: center;\n\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n\n  color: #8c8c8c;\n\n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}"
  },
  {
    "path": "angular/official/tabs/src/app/explore-container/explore-container.component.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { IonicModule } from '@ionic/angular';\n\nimport { ExploreContainerComponent } from './explore-container.component';\n\ndescribe('ExploreContainerComponent', () => {\n  let component: ExploreContainerComponent;\n  let fixture: ComponentFixture<ExploreContainerComponent>;\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      declarations: [ExploreContainerComponent],\n      imports: [IonicModule.forRoot()]\n    }).compileComponents();\n\n    fixture = TestBed.createComponent(ExploreContainerComponent);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular/official/tabs/src/app/explore-container/explore-container.component.ts",
    "content": "import { Component, Input } from '@angular/core';\n\n@Component({\n  selector: 'app-explore-container',\n  templateUrl: './explore-container.component.html',\n  styleUrls: ['./explore-container.component.scss'],\n  standalone: false,\n})\nexport class ExploreContainerComponent {\n\n  @Input() name?: string;\n\n}\n"
  },
  {
    "path": "angular/official/tabs/src/app/explore-container/explore-container.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { IonicModule } from '@ionic/angular';\n\nimport { ExploreContainerComponent } from './explore-container.component';\n\n@NgModule({\n  imports: [ CommonModule, FormsModule, IonicModule],\n  declarations: [ExploreContainerComponent],\n  exports: [ExploreContainerComponent]\n})\nexport class ExploreContainerComponentModule {}\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab1/tab1-routing.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { Tab1Page } from './tab1.page';\n\nconst routes: Routes = [\n  {\n    path: '',\n    component: Tab1Page,\n  }\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule]\n})\nexport class Tab1PageRoutingModule {}\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab1/tab1.module.ts",
    "content": "import { IonicModule } from '@ionic/angular';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { Tab1Page } from './tab1.page';\nimport { ExploreContainerComponentModule } from '../explore-container/explore-container.module';\n\nimport { Tab1PageRoutingModule } from './tab1-routing.module';\n\n@NgModule({\n  imports: [\n    IonicModule,\n    CommonModule,\n    FormsModule,\n    ExploreContainerComponentModule,\n    Tab1PageRoutingModule\n  ],\n  declarations: [Tab1Page]\n})\nexport class Tab1PageModule {}\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab1/tab1.page.html",
    "content": "<ion-header [translucent]=\"true\">\n  <ion-toolbar>\n    <ion-title>\n      Tab 1\n    </ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content [fullscreen]=\"true\">\n  <ion-header collapse=\"condense\">\n    <ion-toolbar>\n      <ion-title size=\"large\">Tab 1</ion-title>\n    </ion-toolbar>\n  </ion-header>\n\n  <app-explore-container name=\"Tab 1 page\"></app-explore-container>\n</ion-content>\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab1/tab1.page.scss",
    "content": ""
  },
  {
    "path": "angular/official/tabs/src/app/tab1/tab1.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { IonicModule } from '@ionic/angular';\n\nimport { ExploreContainerComponentModule } from '../explore-container/explore-container.module';\n\nimport { Tab1Page } from './tab1.page';\n\ndescribe('Tab1Page', () => {\n  let component: Tab1Page;\n  let fixture: ComponentFixture<Tab1Page>;\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      declarations: [Tab1Page],\n      imports: [IonicModule.forRoot(), ExploreContainerComponentModule]\n    }).compileComponents();\n\n    fixture = TestBed.createComponent(Tab1Page);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab1/tab1.page.ts",
    "content": "import { Component } from '@angular/core';\n\n@Component({\n  selector: 'app-tab1',\n  templateUrl: 'tab1.page.html',\n  styleUrls: ['tab1.page.scss'],\n  standalone: false,\n})\nexport class Tab1Page {\n\n  constructor() {}\n\n}\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab2/tab2-routing.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { Tab2Page } from './tab2.page';\n\nconst routes: Routes = [\n  {\n    path: '',\n    component: Tab2Page,\n  }\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule]\n})\nexport class Tab2PageRoutingModule {}\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab2/tab2.module.ts",
    "content": "import { IonicModule } from '@ionic/angular';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { Tab2Page } from './tab2.page';\nimport { ExploreContainerComponentModule } from '../explore-container/explore-container.module';\n\nimport { Tab2PageRoutingModule } from './tab2-routing.module';\n\n@NgModule({\n  imports: [\n    IonicModule,\n    CommonModule,\n    FormsModule,\n    ExploreContainerComponentModule,\n    Tab2PageRoutingModule\n  ],\n  declarations: [Tab2Page]\n})\nexport class Tab2PageModule {}\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab2/tab2.page.html",
    "content": "<ion-header [translucent]=\"true\">\n  <ion-toolbar>\n    <ion-title>\n      Tab 2\n    </ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content [fullscreen]=\"true\">\n  <ion-header collapse=\"condense\">\n    <ion-toolbar>\n      <ion-title size=\"large\">Tab 2</ion-title>\n    </ion-toolbar>\n  </ion-header>\n\n  <app-explore-container name=\"Tab 2 page\"></app-explore-container>\n</ion-content>\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab2/tab2.page.scss",
    "content": ""
  },
  {
    "path": "angular/official/tabs/src/app/tab2/tab2.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { IonicModule } from '@ionic/angular';\n\nimport { ExploreContainerComponentModule } from '../explore-container/explore-container.module';\n\nimport { Tab2Page } from './tab2.page';\n\ndescribe('Tab2Page', () => {\n  let component: Tab2Page;\n  let fixture: ComponentFixture<Tab2Page>;\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      declarations: [Tab2Page],\n      imports: [IonicModule.forRoot(), ExploreContainerComponentModule]\n    }).compileComponents();\n\n    fixture = TestBed.createComponent(Tab2Page);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab2/tab2.page.ts",
    "content": "import { Component } from '@angular/core';\n\n@Component({\n  selector: 'app-tab2',\n  templateUrl: 'tab2.page.html',\n  styleUrls: ['tab2.page.scss'],\n  standalone: false,\n})\nexport class Tab2Page {\n\n  constructor() {}\n\n}\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab3/tab3-routing.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { Tab3Page } from './tab3.page';\n\nconst routes: Routes = [\n  {\n    path: '',\n    component: Tab3Page,\n  }\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule]\n})\nexport class Tab3PageRoutingModule {}\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab3/tab3.module.ts",
    "content": "import { IonicModule } from '@ionic/angular';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { Tab3Page } from './tab3.page';\nimport { ExploreContainerComponentModule } from '../explore-container/explore-container.module';\n\nimport { Tab3PageRoutingModule } from './tab3-routing.module';\n\n@NgModule({\n  imports: [\n    IonicModule,\n    CommonModule,\n    FormsModule,\n    ExploreContainerComponentModule,\n    Tab3PageRoutingModule\n  ],\n  declarations: [Tab3Page]\n})\nexport class Tab3PageModule {}\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab3/tab3.page.html",
    "content": "<ion-header [translucent]=\"true\">\n  <ion-toolbar>\n    <ion-title>\n      Tab 3\n    </ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content [fullscreen]=\"true\">\n  <ion-header collapse=\"condense\">\n    <ion-toolbar>\n      <ion-title size=\"large\">Tab 3</ion-title>\n    </ion-toolbar>\n  </ion-header>\n\n  <app-explore-container name=\"Tab 3 page\"></app-explore-container>\n</ion-content>\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab3/tab3.page.scss",
    "content": ""
  },
  {
    "path": "angular/official/tabs/src/app/tab3/tab3.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { IonicModule } from '@ionic/angular';\n\nimport { ExploreContainerComponentModule } from '../explore-container/explore-container.module';\n\nimport { Tab3Page } from './tab3.page';\n\ndescribe('Tab3Page', () => {\n  let component: Tab3Page;\n  let fixture: ComponentFixture<Tab3Page>;\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      declarations: [Tab3Page],\n      imports: [IonicModule.forRoot(), ExploreContainerComponentModule]\n    }).compileComponents();\n\n    fixture = TestBed.createComponent(Tab3Page);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular/official/tabs/src/app/tab3/tab3.page.ts",
    "content": "import { Component } from '@angular/core';\n\n@Component({\n  selector: 'app-tab3',\n  templateUrl: 'tab3.page.html',\n  styleUrls: ['tab3.page.scss'],\n  standalone: false,\n})\nexport class Tab3Page {\n\n  constructor() {}\n\n}\n"
  },
  {
    "path": "angular/official/tabs/src/app/tabs/tabs-routing.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { TabsPage } from './tabs.page';\n\nconst routes: Routes = [\n  {\n    path: 'tabs',\n    component: TabsPage,\n    children: [\n      {\n        path: 'tab1',\n        loadChildren: () => import('../tab1/tab1.module').then(m => m.Tab1PageModule)\n      },\n      {\n        path: 'tab2',\n        loadChildren: () => import('../tab2/tab2.module').then(m => m.Tab2PageModule)\n      },\n      {\n        path: 'tab3',\n        loadChildren: () => import('../tab3/tab3.module').then(m => m.Tab3PageModule)\n      },\n      {\n        path: '',\n        redirectTo: '/tabs/tab1',\n        pathMatch: 'full'\n      }\n    ]\n  },\n  {\n    path: '',\n    redirectTo: '/tabs/tab1',\n    pathMatch: 'full'\n  }\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n})\nexport class TabsPageRoutingModule {}\n"
  },
  {
    "path": "angular/official/tabs/src/app/tabs/tabs.module.ts",
    "content": "import { IonicModule } from '@ionic/angular';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { TabsPageRoutingModule } from './tabs-routing.module';\n\nimport { TabsPage } from './tabs.page';\n\n@NgModule({\n  imports: [\n    IonicModule,\n    CommonModule,\n    FormsModule,\n    TabsPageRoutingModule\n  ],\n  declarations: [TabsPage]\n})\nexport class TabsPageModule {}\n"
  },
  {
    "path": "angular/official/tabs/src/app/tabs/tabs.page.html",
    "content": "<ion-tabs>\n\n  <ion-tab-bar slot=\"bottom\">\n    <ion-tab-button tab=\"tab1\" href=\"/tabs/tab1\">\n      <ion-icon aria-hidden=\"true\" name=\"triangle\"></ion-icon>\n      <ion-label>Tab 1</ion-label>\n    </ion-tab-button>\n\n    <ion-tab-button tab=\"tab2\" href=\"/tabs/tab2\">\n      <ion-icon aria-hidden=\"true\" name=\"ellipse\"></ion-icon>\n      <ion-label>Tab 2</ion-label>\n    </ion-tab-button>\n\n    <ion-tab-button tab=\"tab3\" href=\"/tabs/tab3\">\n      <ion-icon aria-hidden=\"true\" name=\"square\"></ion-icon>\n      <ion-label>Tab 3</ion-label>\n    </ion-tab-button>\n  </ion-tab-bar>\n\n</ion-tabs>\n"
  },
  {
    "path": "angular/official/tabs/src/app/tabs/tabs.page.scss",
    "content": "\n"
  },
  {
    "path": "angular/official/tabs/src/app/tabs/tabs.page.spec.ts",
    "content": "import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { TabsPage } from './tabs.page';\n\ndescribe('TabsPage', () => {\n  let component: TabsPage;\n  let fixture: ComponentFixture<TabsPage>;\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      declarations: [TabsPage],\n      schemas: [CUSTOM_ELEMENTS_SCHEMA],\n    }).compileComponents();\n  });\n\n  beforeEach(() => {\n    fixture = TestBed.createComponent(TabsPage);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular/official/tabs/src/app/tabs/tabs.page.ts",
    "content": "import { Component } from '@angular/core';\n\n@Component({\n  selector: 'app-tabs',\n  templateUrl: 'tabs.page.html',\n  styleUrls: ['tabs.page.scss'],\n  standalone: false,\n})\nexport class TabsPage {\n\n  constructor() {}\n\n}\n"
  },
  {
    "path": "angular-standalone/base/.browserslistrc",
    "content": "# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.\n# For additional information regarding the format and rule options, please see:\n# https://github.com/browserslist/browserslist#queries\n\n# For the full list of supported browsers by the Angular framework, please see:\n# https://angular.dev/reference/versions#browser-support\n\n# You can see what browsers were selected by your queries by running:\n#   npx browserslist\n\nChrome >=107\nFirefox >=106\nEdge >=107\nSafari >=16.1\niOS >=16.1\n"
  },
  {
    "path": "angular-standalone/base/.editorconfig",
    "content": "# Editor configuration, see https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 2\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.ts]\nquote_type = single\n\n[*.md]\nmax_line_length = off\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": "angular-standalone/base/.eslintrc.json",
    "content": "{\n  \"root\": true,\n  \"ignorePatterns\": [\"projects/**/*\"],\n  \"overrides\": [\n    {\n      \"files\": [\"*.ts\"],\n      \"parserOptions\": {\n        \"project\": [\"tsconfig.json\"],\n        \"createDefaultProgram\": true\n      },\n      \"extends\": [\n        \"plugin:@angular-eslint/recommended\",\n        \"plugin:@angular-eslint/template/process-inline-templates\"\n      ],\n      \"rules\": {\n        \"@angular-eslint/component-class-suffix\": [\n          \"error\",\n          {\n            \"suffixes\": [\"Page\", \"Component\"]\n          }\n        ],\n        \"@angular-eslint/component-selector\": [\n          \"error\",\n          {\n            \"type\": \"element\",\n            \"prefix\": \"app\",\n            \"style\": \"kebab-case\"\n          }\n        ],\n        \"@angular-eslint/directive-selector\": [\n          \"error\",\n          {\n            \"type\": \"attribute\",\n            \"prefix\": \"app\",\n            \"style\": \"camelCase\"\n          }\n        ]\n      }\n    },\n    {\n      \"files\": [\"*.html\"],\n      \"extends\": [\"plugin:@angular-eslint/template/recommended\"],\n      \"rules\": {}\n    }\n  ]\n}\n"
  },
  {
    "path": "angular-standalone/base/.gitignore",
    "content": "# Specifies intentionally untracked files to ignore when using Git\n# http://git-scm.com/docs/gitignore\n\n*~\n*.sw[mnpcod]\n.tmp\n*.tmp\n*.tmp.*\nUserInterfaceState.xcuserstate\n$RECYCLE.BIN/\n\n*.log\nlog.txt\n\n\n/.sourcemaps\n/.versions\n/coverage\n\n# Ionic\n/.ionic\n/www\n/platforms\n/plugins\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-project\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n.history/*\n\n\n# Miscellaneous\n/.angular\n/.angular/cache\n.sass-cache/\n/.nx\n/.nx/cache\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "angular-standalone/base/.vscode/extensions.json",
    "content": "{\n    \"recommendations\": [\n       \"Webnative.webnative\"\n    ]\n}\n"
  },
  {
    "path": "angular-standalone/base/.vscode/settings.json",
    "content": "{\n  \"typescript.preferences.autoImportFileExcludePatterns\": [\"@ionic/angular/common\", \"@ionic/angular\"]\n}\n"
  },
  {
    "path": "angular-standalone/base/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"app\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@ionic/angular-toolkit:page\": {\n          \"styleext\": \"scss\",\n          \"standalone\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular-devkit/build-angular:application\",\n          \"options\": {\n            \"outputPath\": {\n              \"base\": \"www\",\n              \"browser\": \"\"\n            },\n            \"index\": \"src/index.html\",\n            \"polyfills\": [\n              \"src/polyfills.ts\"\n            ],\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"inlineStyleLanguage\": \"scss\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"src/assets\",\n                \"output\": \"assets\"\n              }\n            ],\n            \"styles\": [\"src/global.scss\", \"src/theme/variables.scss\"],\n            \"scripts\": [],\n            \"browser\": \"src/main.ts\"\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"2mb\",\n                  \"maximumError\": \"5mb\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"2kb\",\n                  \"maximumError\": \"4kb\"\n                }\n              ],\n              \"fileReplacements\": [\n                {\n                  \"replace\": \"src/environments/environment.ts\",\n                  \"with\": \"src/environments/environment.prod.ts\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true,\n              \"namedChunks\": true\n            },\n            \"ci\": {\n              \"progress\": false\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular-devkit/build-angular:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"app:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"app:build:development\"\n            },\n            \"ci\": {\n              \"progress\": false\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        },\n        \"extract-i18n\": {\n          \"builder\": \"@angular-devkit/build-angular:extract-i18n\",\n          \"options\": {\n            \"buildTarget\": \"app:build\"\n          }\n        },\n        \"test\": {\n          \"builder\": \"@angular-devkit/build-angular:karma\",\n          \"options\": {\n            \"main\": \"src/test.ts\",\n            \"polyfills\": \"src/polyfills.ts\",\n            \"tsConfig\": \"tsconfig.spec.json\",\n            \"karmaConfig\": \"karma.conf.js\",\n            \"inlineStyleLanguage\": \"scss\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"src/assets\",\n                \"output\": \"assets\"\n              }\n            ],\n            \"styles\": [\"src/global.scss\", \"src/theme/variables.scss\"],\n            \"scripts\": []\n          },\n          \"configurations\": {\n            \"ci\": {\n              \"progress\": false,\n              \"watch\": false\n            }\n          }\n        },\n        \"lint\": {\n          \"builder\": \"@angular-eslint/builder:lint\",\n          \"options\": {\n            \"lintFilePatterns\": [\"src/**/*.ts\", \"src/**/*.html\"]\n          }\n        }\n      }\n    }\n  },\n  \"cli\": {\n    \"schematicCollections\": [\"@ionic/angular-toolkit\"]\n  },\n  \"schematics\": {\n    \"@ionic/angular-toolkit:component\": {\n      \"styleext\": \"scss\"\n    },\n    \"@ionic/angular-toolkit:page\": {\n      \"styleext\": \"scss\"\n    },\n    \"@angular-eslint/schematics:application\": {\n      \"setParserOptionsProject\": true\n    },\n    \"@angular-eslint/schematics:library\": {\n      \"setParserOptionsProject\": true\n    }\n  }\n}\n"
  },
  {
    "path": "angular-standalone/base/ionic.config.json",
    "content": "{\n  \"name\": \"ionic-app-base\",\n  \"app_id\": \"\",\n  \"type\": \"angular-standalone\",\n  \"integrations\": {}\n}\n"
  },
  {
    "path": "angular-standalone/base/karma.conf.js",
    "content": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/1.0/config/configuration-file.html\n\nmodule.exports = function (config) {\n  config.set({\n    basePath: '',\n    frameworks: ['jasmine', '@angular-devkit/build-angular'],\n    plugins: [\n      require('karma-jasmine'),\n      require('karma-chrome-launcher'),\n      require('karma-jasmine-html-reporter'),\n      require('karma-coverage'),\n      require('@angular-devkit/build-angular/plugins/karma')\n    ],\n    client: {\n      jasmine: {\n        // you can add configuration options for Jasmine here\n        // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html\n        // for example, you can disable the random execution with `random: false`\n        // or set a specific seed with `seed: 4321`\n      },\n      clearContext: false // leave Jasmine Spec Runner output visible in browser\n    },\n    jasmineHtmlReporter: {\n      suppressAll: true // removes the duplicated traces\n    },\n    coverageReporter: {\n      dir: require('path').join(__dirname, './coverage/app'),\n      subdir: '.',\n      reporters: [\n        { type: 'html' },\n        { type: 'text-summary' }\n      ]\n    },\n    reporters: ['progress', 'kjhtml'],\n    port: 9876,\n    colors: true,\n    logLevel: config.LOG_INFO,\n    autoWatch: true,\n    browsers: ['Chrome'],\n    singleRun: false,\n    restartOnFileChange: true\n  });\n};\n"
  },
  {
    "path": "angular-standalone/base/package.json",
    "content": "{\n  \"name\": \"ionic-app-base\",\n  \"version\": \"0.0.0\",\n  \"author\": \"Ionic Framework\",\n  \"homepage\": \"https://ionicframework.com/\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"test\": \"ng test\",\n    \"lint\": \"ng lint\"\n  },\n  \"private\": true,\n  \"dependencies\": {\n    \"@angular/animations\": \"^20.0.0\",\n    \"@angular/common\": \"^20.0.0\",\n    \"@angular/compiler\": \"^20.0.0\",\n    \"@angular/core\": \"^20.0.0\",\n    \"@angular/forms\": \"^20.0.0\",\n    \"@angular/platform-browser\": \"^20.0.0\",\n    \"@angular/platform-browser-dynamic\": \"^20.0.0\",\n    \"@angular/router\": \"^20.0.0\",\n    \"@ionic/angular\": \"^8.0.0\",\n    \"ionicons\": \"^7.0.0\",\n    \"rxjs\": \"~7.8.0\",\n    \"tslib\": \"^2.3.0\",\n    \"zone.js\": \"~0.15.0\"\n  },\n  \"devDependencies\": {\n    \"@angular-devkit/build-angular\": \"^20.0.0\",\n    \"@angular-eslint/builder\": \"^20.0.0\",\n    \"@angular-eslint/eslint-plugin\": \"^20.0.0\",\n    \"@angular-eslint/eslint-plugin-template\": \"^20.0.0\",\n    \"@angular-eslint/schematics\": \"^20.0.0\",\n    \"@angular-eslint/template-parser\": \"^20.0.0\",\n    \"@angular/cli\": \"^20.0.0\",\n    \"@angular/compiler-cli\": \"^20.0.0\",\n    \"@angular/language-service\": \"^20.0.0\",\n    \"@ionic/angular-toolkit\": \"^12.0.0\",\n    \"@types/jasmine\": \"~5.1.0\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.18.0\",\n    \"@typescript-eslint/parser\": \"^8.18.0\",\n    \"eslint\": \"^9.16.0\",\n    \"eslint-plugin-import\": \"^2.29.1\",\n    \"eslint-plugin-jsdoc\": \"^48.2.1\",\n    \"eslint-plugin-prefer-arrow\": \"1.2.2\",\n    \"jasmine-core\": \"~5.1.0\",\n    \"jasmine-spec-reporter\": \"~5.0.0\",\n    \"karma\": \"~6.4.0\",\n    \"karma-chrome-launcher\": \"~3.2.0\",\n    \"karma-coverage\": \"~2.2.0\",\n    \"karma-jasmine\": \"~5.1.0\",\n    \"karma-jasmine-html-reporter\": \"~2.1.0\",\n    \"typescript\": \"~5.9.0\"\n  }\n}\n"
  },
  {
    "path": "angular-standalone/base/src/app/app.component.html",
    "content": "<ion-app>\n</ion-app>\n"
  },
  {
    "path": "angular-standalone/base/src/app/app.component.scss",
    "content": ""
  },
  {
    "path": "angular-standalone/base/src/app/app.component.spec.ts",
    "content": "import { TestBed } from '@angular/core/testing';\nimport { provideRouter } from '@angular/router';\nimport { AppComponent } from './app.component';\n\ndescribe('AppComponent', () => {\n  it('should create the app', async () => {\n    await TestBed.configureTestingModule({\n      imports: [AppComponent],\n      providers: [provideRouter([])]\n    }).compileComponents();\n    \n    const fixture = TestBed.createComponent(AppComponent);\n    const app = fixture.componentInstance;\n    expect(app).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular-standalone/base/src/app/app.component.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonApp } from '@ionic/angular/standalone';\n\n@Component({\n  selector: 'app-root',\n  templateUrl: 'app.component.html',\n  styleUrls: ['app.component.scss'],\n  imports: [IonApp],\n})\nexport class AppComponent {\n  constructor() {}\n}\n"
  },
  {
    "path": "angular-standalone/base/src/environments/environment.prod.ts",
    "content": "export const environment = {\n  production: true\n};\n"
  },
  {
    "path": "angular-standalone/base/src/environments/environment.ts",
    "content": "// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build` replaces `environment.ts` with `environment.prod.ts`.\n// The list of file replacements can be found in `angular.json`.\n\nexport const environment = {\n  production: false\n};\n\n/*\n * For easier debugging in development mode, you can import the following file\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\n *\n * This import should be commented out in production mode because it will have a negative impact\n * on performance if an error is thrown.\n */\n// import 'zone.js/plugins/zone-error';  // Included with Angular CLI.\n"
  },
  {
    "path": "angular-standalone/base/src/global.scss",
    "content": "/*\n * App Global CSS\n * ----------------------------------------------------------------------------\n * Put style rules here that you want to apply globally. These styles are for\n * the entire app and not just one component. Additionally, this file can be\n * used as an entry point to import other CSS/Sass files to be included in the\n * output CSS.\n * For more information on global stylesheets, visit the documentation:\n * https://ionicframework.com/docs/layout/global-stylesheets\n */\n\n/* Core CSS required for Ionic components to work properly */\n@import \"@ionic/angular/css/core.css\";\n\n/* Basic CSS for apps built with Ionic */\n@import \"@ionic/angular/css/normalize.css\";\n@import \"@ionic/angular/css/structure.css\";\n@import \"@ionic/angular/css/typography.css\";\n@import \"@ionic/angular/css/display.css\";\n\n/* Optional CSS utils that can be commented out */\n@import \"@ionic/angular/css/padding.css\";\n@import \"@ionic/angular/css/float-elements.css\";\n@import \"@ionic/angular/css/text-alignment.css\";\n@import \"@ionic/angular/css/text-transformation.css\";\n@import \"@ionic/angular/css/flex-utils.css\";\n\n/**\n * Ionic Dark Mode\n * -----------------------------------------------------\n * For more info, please see:\n * https://ionicframework.com/docs/theming/dark-mode\n */\n\n/* @import \"@ionic/angular/css/palettes/dark.always.css\"; */\n/* @import \"@ionic/angular/css/palettes/dark.class.css\"; */\n@import '@ionic/angular/css/palettes/dark.system.css';\n"
  },
  {
    "path": "angular-standalone/base/src/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n  <meta charset=\"utf-8\" />\n  <title>Ionic App</title>\n\n  <base href=\"/\" />\n\n  <meta name=\"color-scheme\" content=\"light dark\" />\n  <meta name=\"viewport\" content=\"viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\" />\n  <meta name=\"format-detection\" content=\"telephone=no\" />\n  <meta name=\"msapplication-tap-highlight\" content=\"no\" />\n\n  <link rel=\"icon\" type=\"image/png\" href=\"assets/icon/favicon.png\" />\n\n  <!-- add to homescreen for ios -->\n  <meta name=\"mobile-web-app-capable\" content=\"yes\" />\n  <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\" />\n</head>\n\n<body>\n  <app-root></app-root>\n</body>\n\n</html>\n"
  },
  {
    "path": "angular-standalone/base/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser';\nimport { RouteReuseStrategy, provideRouter, withPreloading, PreloadAllModules } from '@angular/router';\nimport { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular/standalone';\n\nimport { routes } from './app/app.routes';\nimport { AppComponent } from './app/app.component';\n\nbootstrapApplication(AppComponent, {\n  providers: [\n    { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },\n    provideIonicAngular(),\n    provideRouter(routes, withPreloading(PreloadAllModules)),\n  ],\n});\n"
  },
  {
    "path": "angular-standalone/base/src/polyfills.ts",
    "content": "/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfills to this file.\n *\n * This file is divided into 2 sections:\n *   1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.\n *   2. Application imports. Files imported after ZoneJS that should be loaded before your main\n *      file.\n *\n * The current setup is for so-called \"evergreen\" browsers; the last versions of browsers that\n * automatically update themselves. This includes recent versions of Safari, Chrome (including\n * Opera), Edge on the desktop, and iOS and Chrome on mobile.\n *\n * Learn more in https://angular.io/guide/browser-support\n */\n\n/***************************************************************************************************\n * BROWSER POLYFILLS\n */\n\n/**\n * By default, zone.js will patch all possible macroTask and DomEvents\n * user can disable parts of macroTask/DomEvents patch by setting following flags\n * because those flags need to be set before `zone.js` being loaded, and webpack\n * will put import in the top of bundle, so user need to create a separate file\n * in this directory (for example: zone-flags.ts), and put the following flags\n * into that file, and then add the following code before importing zone.js.\n * import './zone-flags';\n *\n * The flags allowed in zone-flags.ts are listed here.\n *\n * The following flags will work for all browsers.\n *\n * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame\n * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick\n * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames\n *\n *  in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js\n *  with the following flag, it will bypass `zone.js` patch for IE/Edge\n *\n *  (window as any).__Zone_enable_cross_context_check = true;\n *\n */\n\nimport './zone-flags';\n\n/***************************************************************************************************\n * Zone JS is required by default for Angular itself.\n */\nimport 'zone.js';  // Included with Angular CLI.\n\n\n/***************************************************************************************************\n * APPLICATION IMPORTS\n */\n"
  },
  {
    "path": "angular-standalone/base/src/test.ts",
    "content": "// This file is required by karma.conf.js and loads recursively all the .spec and framework files\n\nimport 'zone.js/testing';\nimport { getTestBed } from '@angular/core/testing';\nimport {\n  BrowserDynamicTestingModule,\n  platformBrowserDynamicTesting\n} from '@angular/platform-browser-dynamic/testing';\n\n// First, initialize the Angular testing environment.\ngetTestBed().initTestEnvironment(\n  BrowserDynamicTestingModule,\n  platformBrowserDynamicTesting(),\n);\n"
  },
  {
    "path": "angular-standalone/base/src/theme/variables.scss",
    "content": "// For information on how to create your own theme, please refer to:\n// https://ionicframework.com/docs/theming/\n"
  },
  {
    "path": "angular-standalone/base/src/zone-flags.ts",
    "content": "/**\n * Prevents Angular change detection from\n * running with certain Web Component callbacks\n */\n// eslint-disable-next-line no-underscore-dangle\n(window as any).__Zone_disable_customElements = true;\n"
  },
  {
    "path": "angular-standalone/base/tsconfig.app.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"files\": [\n    \"src/main.ts\",\n    \"src/polyfills.ts\"\n  ],\n  \"include\": [\n    \"src/**/*.d.ts\"\n  ]\n}\n"
  },
  {
    "path": "angular-standalone/base/tsconfig.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"baseUrl\": \"./\",\n    \"outDir\": \"./dist/out-tsc\",\n    \"forceConsistentCasingInFileNames\": true,\n    \"esModuleInterop\": true,\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"sourceMap\": true,\n    \"declaration\": false,\n    \"experimentalDecorators\": true,\n    \"moduleResolution\": \"node\",\n    \"importHelpers\": true,\n    \"target\": \"es2022\",\n    \"module\": \"es2020\",\n    \"lib\": [\"es2018\", \"dom\"],\n    \"skipLibCheck\": true,\n    \"useDefineForClassFields\": false\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "angular-standalone/base/tsconfig.spec.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/spec\",\n    \"types\": [\n      \"jasmine\"\n    ]\n  },\n  \"files\": [\n    \"src/test.ts\",\n    \"src/polyfills.ts\"\n  ],\n  \"include\": [\n    \"src/**/*.spec.ts\",\n    \"src/**/*.d.ts\"\n  ]\n}\n"
  },
  {
    "path": "angular-standalone/community/.gitkeep",
    "content": ""
  },
  {
    "path": "angular-standalone/official/blank/ionic.starter.json",
    "content": "{\n  \"name\": \"Blank Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless\"\n  }\n}\n"
  },
  {
    "path": "angular-standalone/official/blank/src/app/app.component.html",
    "content": "<ion-app>\n  <ion-router-outlet></ion-router-outlet>\n</ion-app>\n"
  },
  {
    "path": "angular-standalone/official/blank/src/app/app.component.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonApp, IonRouterOutlet } from '@ionic/angular/standalone';\n\n@Component({\n  selector: 'app-root',\n  templateUrl: 'app.component.html',\n  imports: [IonApp, IonRouterOutlet],\n})\nexport class AppComponent {\n  constructor() {}\n}\n"
  },
  {
    "path": "angular-standalone/official/blank/src/app/app.routes.ts",
    "content": "import { Routes } from '@angular/router';\n\nexport const routes: Routes = [\n  {\n    path: 'home',\n    loadComponent: () => import('./home/home.page').then((m) => m.HomePage),\n  },\n  {\n    path: '',\n    redirectTo: 'home',\n    pathMatch: 'full',\n  },\n];\n"
  },
  {
    "path": "angular-standalone/official/blank/src/app/home/home.page.html",
    "content": "<ion-header [translucent]=\"true\">\n  <ion-toolbar>\n    <ion-title>\n      Blank\n    </ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content [fullscreen]=\"true\">\n  <ion-header collapse=\"condense\">\n    <ion-toolbar>\n      <ion-title size=\"large\">Blank</ion-title>\n    </ion-toolbar>\n  </ion-header>\n\n  <div id=\"container\">\n    <strong>Ready to create an app?</strong>\n    <p>Start with Ionic <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n  </div>\n</ion-content>\n"
  },
  {
    "path": "angular-standalone/official/blank/src/app/home/home.page.scss",
    "content": "#container {\n  text-align: center;\n\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n\n  color: #8c8c8c;\n\n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}"
  },
  {
    "path": "angular-standalone/official/blank/src/app/home/home.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { HomePage } from './home.page';\n\ndescribe('HomePage', () => {\n  let component: HomePage;\n  let fixture: ComponentFixture<HomePage>;\n\n  beforeEach(async () => {\n    fixture = TestBed.createComponent(HomePage);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular-standalone/official/blank/src/app/home/home.page.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';\n\n@Component({\n  selector: 'app-home',\n  templateUrl: 'home.page.html',\n  styleUrls: ['home.page.scss'],\n  imports: [IonHeader, IonToolbar, IonTitle, IonContent],\n})\nexport class HomePage {\n  constructor() {}\n}\n"
  },
  {
    "path": "angular-standalone/official/list/ionic.config.json",
    "content": "{\n  \"name\": \"list\",\n  \"integrations\": {},\n  \"type\": \"angular\"\n}\n"
  },
  {
    "path": "angular-standalone/official/list/ionic.starter.json",
    "content": "{\n  \"name\": \"List Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless\"\n  }\n}\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/app.component.html",
    "content": "<ion-app>\n  <ion-router-outlet></ion-router-outlet>\n</ion-app>\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/app.component.spec.ts",
    "content": "import { TestBed } from '@angular/core/testing';\nimport { provideRouter } from '@angular/router';\n\nimport { AppComponent } from './app.component';\n\ndescribe('AppComponent', () => {\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      imports: [AppComponent],\n      providers: [provideRouter([])]\n    }).compileComponents();\n  });\n\n  it('should create the app', () => {\n    const fixture = TestBed.createComponent(AppComponent);\n    const app = fixture.componentInstance;\n    expect(app).toBeTruthy();\n  });\n\n});\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/app.component.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonApp, IonRouterOutlet } from '@ionic/angular/standalone';\n\n@Component({\n  selector: 'app-root',\n  templateUrl: 'app.component.html',\n  imports: [IonApp, IonRouterOutlet],\n})\nexport class AppComponent {\n  constructor() {}\n}\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/app.routes.ts",
    "content": "import { Routes } from '@angular/router';\n\nexport const routes: Routes = [\n  {\n    path: 'home',\n    loadComponent: () => import('./home/home.page').then((m) => m.HomePage),\n  },\n  {\n    path: 'message/:id',\n    loadComponent: () =>\n      import('./view-message/view-message.page').then((m) => m.ViewMessagePage),\n  },\n  {\n    path: '',\n    redirectTo: 'home',\n    pathMatch: 'full',\n  },\n];\n\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/home/home.page.html",
    "content": "<ion-header [translucent]=\"true\">\n  <ion-toolbar>\n    <ion-title>\n      Inbox\n    </ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content [fullscreen]=\"true\">\n  <ion-refresher slot=\"fixed\" (ionRefresh)=\"refresh($event)\">\n    <ion-refresher-content></ion-refresher-content>\n  </ion-refresher>\n\n  <ion-header collapse=\"condense\">\n    <ion-toolbar>\n      <ion-title size=\"large\">\n        Inbox\n      </ion-title>\n    </ion-toolbar>\n  </ion-header>\n\n  <ion-list>\n    @for (message of getMessages(); track message) {\n      <app-message [message]=\"message\"></app-message>\n    }\n  </ion-list>\n</ion-content>\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/home/home.page.scss",
    "content": ""
  },
  {
    "path": "angular-standalone/official/list/src/app/home/home.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { provideRouter } from '@angular/router';\n\nimport { HomePage } from './home.page';\n\ndescribe('HomePage', () => {\n  let component: HomePage;\n  let fixture: ComponentFixture<HomePage>;\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      imports: [HomePage],\n      providers: [provideRouter([])],\n    }).compileComponents();\n\n    fixture = TestBed.createComponent(HomePage);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/home/home.page.ts",
    "content": "\nimport { Component, inject } from '@angular/core';\nimport { RefresherCustomEvent, IonHeader, IonToolbar, IonTitle, IonContent, IonRefresher, IonRefresherContent, IonList } from '@ionic/angular/standalone';\nimport { MessageComponent } from '../message/message.component';\n\nimport { DataService, Message } from '../services/data.service';\n\n@Component({\n  selector: 'app-home',\n  templateUrl: 'home.page.html',\n  styleUrls: ['home.page.scss'],\n  imports: [IonHeader, IonToolbar, IonTitle, IonContent, IonRefresher, IonRefresherContent, IonList, MessageComponent],\n})\nexport class HomePage {\n  private data = inject(DataService);\n  constructor() {}\n\n  refresh(ev: any) {\n    setTimeout(() => {\n      (ev as RefresherCustomEvent).detail.complete();\n    }, 3000);\n  }\n\n  getMessages(): Message[] {\n    return this.data.getMessages();\n  }\n}\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/message/message.component.html",
    "content": "@if (message) {\n  <ion-item\n    [routerLink]=\"'/message/' + message.id\"\n    [detail]=\"false\"\n    >\n    <div slot=\"start\" [class]=\"!message.read ? 'dot dot-unread' : 'dot'\"></div>\n    <ion-label class=\"ion-text-wrap\">\n      <h2>\n        {{ message.fromName }}\n        <span class=\"date\">\n          <ion-note>{{ message.date }}</ion-note>\n          @if (isIos()) {\n            <ion-icon\n              aria-hidden=\"true\"\n              name=\"chevron-forward\"\n              size=\"small\"\n            ></ion-icon>\n          }\n        </span>\n      </h2>\n      <h3>{{ message.subject }}</h3>\n      <p>\n        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n        tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim\n        veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea\n        commodo consequat. Duis aute irure dolor in reprehenderit in voluptate\n        velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat\n        cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id\n        est laborum.\n      </p>\n    </ion-label>\n  </ion-item>\n}\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/message/message.component.scss",
    "content": "ion-item {\n  --padding-start: 0;\n  --inner-padding-end: 0;\n}\n\nion-label {\n  margin-top: 12px;\n  margin-bottom: 12px;\n}\n\nion-item h2 {\n  font-weight: 600;\n  margin: 0;\n  \n  /**\n   * With larger font scales\n   * the date/time should wrap to the next\n   * line. However, there should be\n   * space between the name and the date/time\n   * if they can appear on the same line.\n   */\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: space-between;\n}\n\nion-item p {\n  text-overflow: ellipsis;\n  overflow: hidden;\n  white-space: nowrap;\n  width: 95%;\n}\n\nion-item .date {\n  align-items: center;\n  display: flex;\n}\n\nion-item ion-icon {\n  color: #c9c9ca;\n}\n\nion-item ion-note {\n  font-size: 0.9375rem;\n  margin-right: 8px;\n  font-weight: normal;\n}\n\nion-item ion-note.md {\n  margin-right: 14px;\n}\n\n.dot {\n  display: block;\n  height: 12px;\n  width: 12px;\n  border-radius: 50%;\n  align-self: start;\n  margin: 16px 10px 16px 16px;\n}\n\n.dot-unread {\n  background: var(--ion-color-primary);\n}\n\nion-footer ion-title {\n  font-size: 11px;\n  font-weight: normal;\n}"
  },
  {
    "path": "angular-standalone/official/list/src/app/message/message.component.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { provideRouter } from '@angular/router';\nimport { ViewMessagePage } from '../view-message/view-message.page';\n\nimport { MessageComponent } from './message.component';\n\ndescribe('MessageComponent', () => {\n  let component: MessageComponent;\n  let fixture: ComponentFixture<MessageComponent>;\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      imports: [MessageComponent, ViewMessagePage],\n      providers: [provideRouter([])]\n    }).compileComponents();\n\n    fixture = TestBed.createComponent(MessageComponent);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/message/message.component.ts",
    "content": "\nimport { ChangeDetectionStrategy, Component, inject, Input } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { Platform, IonItem, IonLabel, IonNote, IonIcon } from '@ionic/angular/standalone';\nimport { addIcons } from 'ionicons';\nimport { chevronForward } from 'ionicons/icons';\nimport { Message } from '../services/data.service';\n\n@Component({\n  selector: 'app-message',\n  templateUrl: './message.component.html',\n  styleUrls: ['./message.component.scss'],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [RouterLink, IonItem, IonLabel, IonNote, IonIcon],\n})\nexport class MessageComponent {\n  private platform = inject(Platform);\n  @Input() message?: Message;\n  isIos() {\n    return this.platform.is('ios')\n  }\n  constructor() {\n    addIcons({ chevronForward });\n  }\n}\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/services/data.service.spec.ts",
    "content": "import { TestBed } from '@angular/core/testing';\n\nimport { DataService } from './data.service';\n\ndescribe('DataService', () => {\n  beforeEach(() => TestBed.configureTestingModule({}));\n\n  it('should be created', () => {\n    const service: DataService = TestBed.inject(DataService);\n    expect(service).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/services/data.service.ts",
    "content": "import { Injectable } from '@angular/core';\n\nexport interface Message {\n  fromName: string;\n  subject: string;\n  date: string;\n  id: number;\n  read: boolean;\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class DataService {\n  public messages: Message[] = [\n    {\n      fromName: 'Matt Chorsey',\n      subject: 'New event: Trip to Vegas',\n      date: '9:32 AM',\n      id: 0,\n      read: false\n    },\n    {\n      fromName: 'Lauren Ruthford',\n      subject: 'Long time no chat',\n      date: '6:12 AM',\n      id: 1,\n      read: false\n    },\n    {\n      fromName: 'Jordan Firth',\n      subject: 'Report Results',\n      date: '4:55 AM',\n      id: 2,\n      read: false\n    },\n    {\n      fromName: 'Bill Thomas',\n      subject: 'The situation',\n      date: 'Yesterday',\n      id: 3,\n      read: false\n    },\n    {\n      fromName: 'Joanne Pollan',\n      subject: 'Updated invitation: Swim lessons',\n      date: 'Yesterday',\n      id: 4,\n      read: false\n    },\n    {\n      fromName: 'Andrea Cornerston',\n      subject: 'Last minute ask',\n      date: 'Yesterday',\n      id: 5,\n      read: false\n    },\n    {\n      fromName: 'Moe Chamont',\n      subject: 'Family Calendar - Version 1',\n      date: 'Last Week',\n      id: 6,\n      read: false\n    },\n    {\n      fromName: 'Kelly Richardson',\n      subject: 'Placeholder Headhots',\n      date: 'Last Week',\n      id: 7,\n      read: false\n    }\n  ];\n\n  constructor() { }\n\n  public getMessages(): Message[] {\n    return this.messages;\n  }\n\n  public getMessageById(id: number): Message {\n    return this.messages[id];\n  }\n}\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/view-message/view-message.page.html",
    "content": "<ion-header [translucent]=\"true\">\n  <ion-toolbar>\n    <ion-buttons slot=\"start\">\n      <ion-back-button\n        [text]=\"getBackButtonText()\"\n        defaultHref=\"/\"\n      ></ion-back-button>\n    </ion-buttons>\n  </ion-toolbar>\n</ion-header>\n\n@if (message) {\n  <ion-content [fullscreen]=\"true\">\n    <ion-item>\n      <ion-icon\n        aria-hidden=\"true\"\n        name=\"person-circle\"\n        color=\"primary\"\n      ></ion-icon>\n      <ion-label class=\"ion-text-wrap\">\n        <h2>\n          {{ message.fromName }}\n          <span class=\"date\">\n            <ion-note>{{ message.date }}</ion-note>\n          </span>\n        </h2>\n        <h3>To: <ion-note>Me</ion-note></h3>\n      </ion-label>\n    </ion-item>\n    <div class=\"ion-padding\">\n      <h1>{{ message.subject }}</h1>\n      <p>\n        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n        tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim\n        veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea\n        commodo consequat. Duis aute irure dolor in reprehenderit in voluptate\n        velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat\n        cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id\n        est laborum.\n      </p>\n    </div>\n  </ion-content>\n}\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/view-message/view-message.page.scss",
    "content": "ion-item {\n  --inner-padding-end: 0;\n  --background: transparent;\n}\n\nion-label {\n  margin-top: 12px;\n  margin-bottom: 12px;\n}\n\nion-item h2 {\n  font-weight: 600;\n\n  /**\n   * With larger font scales\n   * the date/time should wrap to the next\n   * line. However, there should be\n   * space between the name and the date/time\n   * if they can appear on the same line.\n   */\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: space-between;\n}\n\nion-item .date {\n  align-items: center;\n  display: flex;\n}\n\nion-item ion-icon {\n  font-size: 42px;\n  margin-right: 8px;\n}\n\nion-item ion-note {\n  font-size: 0.9375rem;\n  margin-right: 12px;\n  font-weight: normal;\n}\n\nh1 {\n  margin: 0;\n  font-weight: bold;\n  font-size: 1.4rem;\n}\n\np {\n  line-height: 1.4;\n}"
  },
  {
    "path": "angular-standalone/official/list/src/app/view-message/view-message.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { provideRouter } from '@angular/router';\n\nimport { ViewMessagePage } from './view-message.page';\n\ndescribe('ViewMessagePage', () => {\n  let component: ViewMessagePage;\n  let fixture: ComponentFixture<ViewMessagePage>;\n\n  beforeEach(async () => {\n    TestBed.configureTestingModule({\n      imports: [ViewMessagePage],\n      providers: [provideRouter([])],\n    }).compileComponents();\n\n    fixture = TestBed.createComponent(ViewMessagePage);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular-standalone/official/list/src/app/view-message/view-message.page.ts",
    "content": "\nimport { Component, inject, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { Platform, IonHeader, IonToolbar, IonButtons, IonBackButton, IonContent, IonItem, IonIcon, IonLabel, IonNote } from '@ionic/angular/standalone';\nimport { addIcons } from 'ionicons';\nimport { personCircle } from 'ionicons/icons';\nimport { DataService, Message } from '../services/data.service';\n\n@Component({\n  selector: 'app-view-message',\n  templateUrl: './view-message.page.html',\n  styleUrls: ['./view-message.page.scss'],\n  imports: [IonHeader, IonToolbar, IonButtons, IonBackButton, IonContent, IonItem, IonIcon, IonLabel, IonNote],\n})\nexport class ViewMessagePage implements OnInit {\n  public message!: Message;\n  private data = inject(DataService);\n  private activatedRoute = inject(ActivatedRoute);\n  private platform = inject(Platform);\n\n  constructor() {\n    addIcons({ personCircle });\n  }\n\n  ngOnInit() {\n    const id = this.activatedRoute.snapshot.paramMap.get('id') as string;\n    this.message = this.data.getMessageById(parseInt(id, 10));\n  }\n\n  getBackButtonText() {\n    const isIos = this.platform.is('ios')\n    return isIos ? 'Inbox' : '';\n  }\n}\n"
  },
  {
    "path": "angular-standalone/official/sidemenu/ionic.starter.json",
    "content": "{\n  \"name\": \"Sidemenu Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless\"\n  }\n}\n"
  },
  {
    "path": "angular-standalone/official/sidemenu/src/app/app.component.html",
    "content": "<ion-app>\n  <ion-split-pane contentId=\"main-content\">\n    <ion-menu contentId=\"main-content\" type=\"overlay\">\n      <ion-content>\n        <ion-list id=\"inbox-list\">\n          <ion-list-header>Inbox</ion-list-header>\n          <ion-note>hi&#64;ionicframework.com</ion-note>\n\n          @for (p of appPages; track p; let i = $index) {\n            <ion-menu-toggle auto-hide=\"false\">\n              <ion-item routerDirection=\"root\" [routerLink]=\"[p.url]\" lines=\"none\" detail=\"false\" routerLinkActive=\"selected\">\n                <ion-icon aria-hidden=\"true\" slot=\"start\" [ios]=\"p.icon + '-outline'\" [md]=\"p.icon + '-sharp'\"></ion-icon>\n                <ion-label>{{ p.title }}</ion-label>\n              </ion-item>\n            </ion-menu-toggle>\n          }\n        </ion-list>\n\n        <ion-list id=\"labels-list\">\n          <ion-list-header>Labels</ion-list-header>\n\n          @for (label of labels; track label) {\n            <ion-item lines=\"none\">\n              <ion-icon aria-hidden=\"true\" slot=\"start\" ios=\"bookmark-outline\" md=\"bookmark-sharp\"></ion-icon>\n              <ion-label>{{ label }}</ion-label>\n            </ion-item>\n          }\n        </ion-list>\n      </ion-content>\n    </ion-menu>\n    <ion-router-outlet id=\"main-content\"></ion-router-outlet>\n  </ion-split-pane>\n</ion-app>\n"
  },
  {
    "path": "angular-standalone/official/sidemenu/src/app/app.component.scss",
    "content": "ion-menu ion-content {\n  --background: var(--ion-item-background, var(--ion-background-color, #fff));\n}\n\nion-menu.md ion-content {\n  --padding-start: 8px;\n  --padding-end: 8px;\n  --padding-top: 20px;\n  --padding-bottom: 20px;\n}\n\nion-menu.md ion-list {\n  padding: 20px 0;\n}\n\nion-menu.md ion-note {\n  margin-bottom: 30px;\n}\n\nion-menu.md ion-list-header,\nion-menu.md ion-note {\n  padding-left: 10px;\n}\n\nion-menu.md ion-list#inbox-list {\n  border-bottom: 1px solid var(--ion-background-color-step-150, #d7d8da);\n}\n\nion-menu.md ion-list#inbox-list ion-list-header {\n  font-size: 22px;\n  font-weight: 600;\n\n  min-height: 20px;\n}\n\nion-menu.md ion-list#labels-list ion-list-header {\n  font-size: 16px;\n\n  margin-bottom: 18px;\n\n  color: #757575;\n\n  min-height: 26px;\n}\n\nion-menu.md ion-item {\n  --padding-start: 10px;\n  --padding-end: 10px;\n  border-radius: 4px;\n}\n\nion-menu.md ion-item.selected {\n  --background: rgba(var(--ion-color-primary-rgb), 0.14);\n}\n\nion-menu.md ion-item.selected ion-icon {\n  color: var(--ion-color-primary);\n}\n\nion-menu.md ion-item ion-icon {\n  color: #616e7e;\n}\n\nion-menu.md ion-item ion-label {\n  font-weight: 500;\n}\n\nion-menu.ios ion-content {\n  --padding-bottom: 20px;\n}\n\nion-menu.ios ion-list {\n  padding: 20px 0 0 0;\n}\n\nion-menu.ios ion-note {\n  line-height: 24px;\n  margin-bottom: 20px;\n}\n\nion-menu.ios ion-item {\n  --padding-start: 16px;\n  --padding-end: 16px;\n  --min-height: 50px;\n}\n\nion-menu.ios ion-item.selected ion-icon {\n  color: var(--ion-color-primary);\n}\n\nion-menu.ios ion-item ion-icon {\n  font-size: 24px;\n  color: #73849a;\n}\n\nion-menu.ios ion-list#labels-list ion-list-header {\n  margin-bottom: 8px;\n}\n\nion-menu.ios ion-list-header,\nion-menu.ios ion-note {\n  padding-left: 16px;\n  padding-right: 16px;\n}\n\nion-menu.ios ion-note {\n  margin-bottom: 8px;\n}\n\nion-note {\n  display: inline-block;\n  font-size: 16px;\n\n  color: var(--ion-color-medium-shade);\n}\n\nion-item.selected {\n  --color: var(--ion-color-primary);\n}"
  },
  {
    "path": "angular-standalone/official/sidemenu/src/app/app.component.spec.ts",
    "content": "import { TestBed } from '@angular/core/testing';\nimport { provideRouter } from '@angular/router';\n\nimport { AppComponent } from './app.component';\n\ndescribe('AppComponent', () => {\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      imports: [AppComponent],\n      providers: [provideRouter([])]\n    }).compileComponents();\n  });\n\n  it('should create the app', () => {\n    const fixture = TestBed.createComponent(AppComponent);\n    const app = fixture.componentInstance;\n    expect(app).toBeTruthy();\n  });\n\n  it('should have menu labels', () => {\n    const fixture = TestBed.createComponent(AppComponent);\n    fixture.detectChanges();\n    const app = fixture.nativeElement;\n    const menuItems = app.querySelectorAll('ion-label');\n    expect(menuItems.length).toEqual(12);\n    expect(menuItems[0].textContent).toContain('Inbox');\n    expect(menuItems[1].textContent).toContain('Outbox');\n  });\n\n  it('should have urls', () => {\n    const fixture = TestBed.createComponent(AppComponent);\n    fixture.detectChanges();\n    const app = fixture.nativeElement;\n    const menuItems = app.querySelectorAll('ion-item');\n    expect(menuItems.length).toEqual(12);\n    expect(menuItems[0].getAttribute('href')).toEqual(\n      '/folder/inbox'\n    );\n    expect(menuItems[1].getAttribute('href')).toEqual(\n      '/folder/outbox'\n    );\n  });\n});\n"
  },
  {
    "path": "angular-standalone/official/sidemenu/src/app/app.component.ts",
    "content": "\nimport { Component } from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { IonApp, IonSplitPane, IonMenu, IonContent, IonList, IonListHeader, IonNote, IonMenuToggle, IonItem, IonIcon, IonLabel, IonRouterOutlet, IonRouterLink } from '@ionic/angular/standalone';\nimport { addIcons } from 'ionicons';\nimport { mailOutline, mailSharp, paperPlaneOutline, paperPlaneSharp, heartOutline, heartSharp, archiveOutline, archiveSharp, trashOutline, trashSharp, warningOutline, warningSharp, bookmarkOutline, bookmarkSharp } from 'ionicons/icons';\n\n@Component({\n  selector: 'app-root',\n  templateUrl: 'app.component.html',\n  styleUrls: ['app.component.scss'],\n  imports: [RouterLink, RouterLinkActive, IonApp, IonSplitPane, IonMenu, IonContent, IonList, IonListHeader, IonNote, IonMenuToggle, IonItem, IonIcon, IonLabel, IonRouterLink, IonRouterOutlet],\n})\nexport class AppComponent {\n  public appPages = [\n    { title: 'Inbox', url: '/folder/inbox', icon: 'mail' },\n    { title: 'Outbox', url: '/folder/outbox', icon: 'paper-plane' },\n    { title: 'Favorites', url: '/folder/favorites', icon: 'heart' },\n    { title: 'Archived', url: '/folder/archived', icon: 'archive' },\n    { title: 'Trash', url: '/folder/trash', icon: 'trash' },\n    { title: 'Spam', url: '/folder/spam', icon: 'warning' },\n  ];\n  public labels = ['Family', 'Friends', 'Notes', 'Work', 'Travel', 'Reminders'];\n  constructor() {\n    addIcons({ mailOutline, mailSharp, paperPlaneOutline, paperPlaneSharp, heartOutline, heartSharp, archiveOutline, archiveSharp, trashOutline, trashSharp, warningOutline, warningSharp, bookmarkOutline, bookmarkSharp });\n  }\n}\n"
  },
  {
    "path": "angular-standalone/official/sidemenu/src/app/app.routes.ts",
    "content": "import { Routes } from '@angular/router';\n\nexport const routes: Routes = [\n  {\n    path: '',\n    redirectTo: 'folder/inbox',\n    pathMatch: 'full',\n  },\n  {\n    path: 'folder/:id',\n    loadComponent: () =>\n      import('./folder/folder.page').then((m) => m.FolderPage),\n  },\n];\n"
  },
  {
    "path": "angular-standalone/official/sidemenu/src/app/folder/folder.page.html",
    "content": "<ion-header [translucent]=\"true\">\n  <ion-toolbar>\n    <ion-buttons slot=\"start\">\n      <ion-menu-button></ion-menu-button>\n    </ion-buttons>\n    <ion-title>{{ folder }}</ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content [fullscreen]=\"true\">\n  <ion-header collapse=\"condense\">\n    <ion-toolbar>\n      <ion-title size=\"large\">{{ folder }}</ion-title>\n    </ion-toolbar>\n  </ion-header>\n\n  <div id=\"container\">\n    <strong class=\"capitalize\">{{ folder }}</strong>\n    <p>Explore <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n  </div>\n</ion-content>\n"
  },
  {
    "path": "angular-standalone/official/sidemenu/src/app/folder/folder.page.scss",
    "content": "ion-menu-button {\n  color: var(--ion-color-primary);\n}\n\n#container {\n  text-align: center;\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n  color: #8c8c8c;\n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}"
  },
  {
    "path": "angular-standalone/official/sidemenu/src/app/folder/folder.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { provideRouter } from '@angular/router';\n\nimport { FolderPage } from './folder.page';\n\ndescribe('FolderPage', () => {\n  let component: FolderPage;\n  let fixture: ComponentFixture<FolderPage>;\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      imports: [FolderPage],\n      providers: [provideRouter([])]\n    }).compileComponents();\n\n    fixture = TestBed.createComponent(FolderPage);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular-standalone/official/sidemenu/src/app/folder/folder.page.ts",
    "content": "import { Component, inject, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { IonHeader, IonToolbar, IonButtons, IonMenuButton, IonTitle, IonContent } from '@ionic/angular/standalone';\n\n@Component({\n  selector: 'app-folder',\n  templateUrl: './folder.page.html',\n  styleUrls: ['./folder.page.scss'],\n  imports: [IonHeader, IonToolbar, IonButtons, IonMenuButton, IonTitle, IonContent],\n})\nexport class FolderPage implements OnInit {\n  public folder!: string;\n  private activatedRoute = inject(ActivatedRoute);\n  constructor() {}\n\n  ngOnInit() {\n    this.folder = this.activatedRoute.snapshot.paramMap.get('id') as string;\n  }\n}\n"
  },
  {
    "path": "angular-standalone/official/tabs/ionic.starter.json",
    "content": "{\n  \"name\": \"Tabs Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless\"\n  }\n}\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/app.component.html",
    "content": "<ion-app>\n  <ion-router-outlet></ion-router-outlet>\n</ion-app>\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/app.component.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonApp, IonRouterOutlet } from '@ionic/angular/standalone';\n\n@Component({\n  selector: 'app-root',\n  templateUrl: 'app.component.html',\n  imports: [IonApp, IonRouterOutlet],\n})\nexport class AppComponent {\n  constructor() {}\n}\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/app.routes.ts",
    "content": "import { Routes } from '@angular/router';\n\nexport const routes: Routes = [\n  {\n    path: '',\n    loadChildren: () => import('./tabs/tabs.routes').then((m) => m.routes),\n  },\n];\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/explore-container/explore-container.component.html",
    "content": "<div id=\"container\">\n  <strong>{{ name }}</strong>\n  <p>\n    Explore\n    <a\n      target=\"_blank\"\n      rel=\"noopener noreferrer\"\n      href=\"https://ionicframework.com/docs/components\"\n      >UI Components</a\n    >\n  </p>\n</div>\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/explore-container/explore-container.component.scss",
    "content": "#container {\n  text-align: center;\n\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n\n  color: #8c8c8c;\n\n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/explore-container/explore-container.component.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { ExploreContainerComponent } from './explore-container.component';\n\ndescribe('ExploreContainerComponent', () => {\n  let component: ExploreContainerComponent;\n  let fixture: ComponentFixture<ExploreContainerComponent>;\n\n  beforeEach(async () => {\n    fixture = TestBed.createComponent(ExploreContainerComponent);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/explore-container/explore-container.component.ts",
    "content": "import { Component, Input } from '@angular/core';\n\n@Component({\n  selector: 'app-explore-container',\n  templateUrl: './explore-container.component.html',\n  styleUrls: ['./explore-container.component.scss'],\n})\nexport class ExploreContainerComponent {\n  @Input() name?: string;\n}\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tab1/tab1.page.html",
    "content": "<ion-header [translucent]=\"true\">\n  <ion-toolbar>\n    <ion-title>\n      Tab 1\n    </ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content [fullscreen]=\"true\">\n  <ion-header collapse=\"condense\">\n    <ion-toolbar>\n      <ion-title size=\"large\">Tab 1</ion-title>\n    </ion-toolbar>\n  </ion-header>\n\n  <app-explore-container name=\"Tab 1 page\"></app-explore-container>\n</ion-content>\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tab1/tab1.page.scss",
    "content": ""
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tab1/tab1.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { Tab1Page } from './tab1.page';\n\ndescribe('Tab1Page', () => {\n  let component: Tab1Page;\n  let fixture: ComponentFixture<Tab1Page>;\n\n  beforeEach(async () => {\n    fixture = TestBed.createComponent(Tab1Page);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tab1/tab1.page.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';\nimport { ExploreContainerComponent } from '../explore-container/explore-container.component';\n\n@Component({\n  selector: 'app-tab1',\n  templateUrl: 'tab1.page.html',\n  styleUrls: ['tab1.page.scss'],\n  imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent],\n})\nexport class Tab1Page {\n  constructor() {}\n}\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tab2/tab2.page.html",
    "content": "<ion-header [translucent]=\"true\">\n  <ion-toolbar>\n    <ion-title>\n      Tab 2\n    </ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content [fullscreen]=\"true\">\n  <ion-header collapse=\"condense\">\n    <ion-toolbar>\n      <ion-title size=\"large\">Tab 2</ion-title>\n    </ion-toolbar>\n  </ion-header>\n\n  <app-explore-container name=\"Tab 2 page\"></app-explore-container>\n</ion-content>\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tab2/tab2.page.scss",
    "content": ""
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tab2/tab2.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { Tab2Page } from './tab2.page';\n\ndescribe('Tab2Page', () => {\n  let component: Tab2Page;\n  let fixture: ComponentFixture<Tab2Page>;\n\n  beforeEach(async () => {\n    fixture = TestBed.createComponent(Tab2Page);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tab2/tab2.page.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';\nimport { ExploreContainerComponent } from '../explore-container/explore-container.component';\n\n@Component({\n  selector: 'app-tab2',\n  templateUrl: 'tab2.page.html',\n  styleUrls: ['tab2.page.scss'],\n  imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent]\n})\nexport class Tab2Page {\n\n  constructor() {}\n\n}\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tab3/tab3.page.html",
    "content": "<ion-header [translucent]=\"true\">\n  <ion-toolbar>\n    <ion-title>\n      Tab 3\n    </ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content [fullscreen]=\"true\">\n  <ion-header collapse=\"condense\">\n    <ion-toolbar>\n      <ion-title size=\"large\">Tab 3</ion-title>\n    </ion-toolbar>\n  </ion-header>\n\n  <app-explore-container name=\"Tab 3 page\"></app-explore-container>\n</ion-content>\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tab3/tab3.page.scss",
    "content": ""
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tab3/tab3.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { Tab3Page } from './tab3.page';\n\ndescribe('Tab3Page', () => {\n  let component: Tab3Page;\n  let fixture: ComponentFixture<Tab3Page>;\n\n  beforeEach(async () => {\n    fixture = TestBed.createComponent(Tab3Page);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tab3/tab3.page.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';\nimport { ExploreContainerComponent } from '../explore-container/explore-container.component';\n\n@Component({\n  selector: 'app-tab3',\n  templateUrl: 'tab3.page.html',\n  styleUrls: ['tab3.page.scss'],\n  imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent],\n})\nexport class Tab3Page {\n  constructor() {}\n}\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tabs/tabs.page.html",
    "content": "<ion-tabs>\n  <ion-tab-bar slot=\"bottom\">\n    <ion-tab-button tab=\"tab1\" href=\"/tabs/tab1\">\n      <ion-icon aria-hidden=\"true\" name=\"triangle\"></ion-icon>\n      <ion-label>Tab 1</ion-label>\n    </ion-tab-button>\n\n    <ion-tab-button tab=\"tab2\" href=\"/tabs/tab2\">\n      <ion-icon aria-hidden=\"true\" name=\"ellipse\"></ion-icon>\n      <ion-label>Tab 2</ion-label>\n    </ion-tab-button>\n\n    <ion-tab-button tab=\"tab3\" href=\"/tabs/tab3\">\n      <ion-icon aria-hidden=\"true\" name=\"square\"></ion-icon>\n      <ion-label>Tab 3</ion-label>\n    </ion-tab-button>\n  </ion-tab-bar>\n</ion-tabs>\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tabs/tabs.page.scss",
    "content": "\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tabs/tabs.page.spec.ts",
    "content": "import { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { provideRouter } from '@angular/router';\n\nimport { TabsPage } from './tabs.page';\n\ndescribe('TabsPage', () => {\n  let component: TabsPage;\n  let fixture: ComponentFixture<TabsPage>;\n\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      imports: [TabsPage],\n      providers: [provideRouter([])]\n    }).compileComponents();\n  });\n\n  beforeEach(() => {\n    fixture = TestBed.createComponent(TabsPage);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tabs/tabs.page.ts",
    "content": "import { Component, EnvironmentInjector, inject } from '@angular/core';\nimport { IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel } from '@ionic/angular/standalone';\nimport { addIcons } from 'ionicons';\nimport { triangle, ellipse, square } from 'ionicons/icons';\n\n@Component({\n  selector: 'app-tabs',\n  templateUrl: 'tabs.page.html',\n  styleUrls: ['tabs.page.scss'],\n  imports: [IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel],\n})\nexport class TabsPage {\n  public environmentInjector = inject(EnvironmentInjector);\n\n  constructor() {\n    addIcons({ triangle, ellipse, square });\n  }\n}\n"
  },
  {
    "path": "angular-standalone/official/tabs/src/app/tabs/tabs.routes.ts",
    "content": "import { Routes } from '@angular/router';\nimport { TabsPage } from './tabs.page';\n\nexport const routes: Routes = [\n  {\n    path: 'tabs',\n    component: TabsPage,\n    children: [\n      {\n        path: 'tab1',\n        loadComponent: () =>\n          import('../tab1/tab1.page').then((m) => m.Tab1Page),\n      },\n      {\n        path: 'tab2',\n        loadComponent: () =>\n          import('../tab2/tab2.page').then((m) => m.Tab2Page),\n      },\n      {\n        path: 'tab3',\n        loadComponent: () =>\n          import('../tab3/tab3.page').then((m) => m.Tab3Page),\n      },\n      {\n        path: '',\n        redirectTo: '/tabs/tab1',\n        pathMatch: 'full',\n      },\n    ],\n  },\n  {\n    path: '',\n    redirectTo: '/tabs/tab1',\n    pathMatch: 'full',\n  },\n];\n"
  },
  {
    "path": "bin/ionic-starters",
    "content": "#!/usr/bin/env node\n\nconst { run } = require('../');\nrun(process.argv.slice(2), process.env).catch(e => { console.error(e); process.exitCode = 1; });\n"
  },
  {
    "path": "integrations/cordova/config.xml",
    "content": "<?xml version='1.0' encoding='utf-8'?>\n<widget id=\"io.ionic.starter\" version=\"0.0.1\" xmlns=\"http://www.w3.org/ns/widgets\" xmlns:cdv=\"http://cordova.apache.org/ns/1.0\">\n    <name>MyApp</name>\n    <description>An awesome Ionic/Cordova app.</description>\n    <author email=\"hi@ionicframework.com\" href=\"https://ionicframework.com/\">Ionic Framework Team</author>\n    <content src=\"index.html\" />\n    <access origin=\"*\" />\n    <allow-intent href=\"http://*/*\" />\n    <allow-intent href=\"https://*/*\" />\n    <allow-intent href=\"tel:*\" />\n    <allow-intent href=\"sms:*\" />\n    <allow-intent href=\"mailto:*\" />\n    <allow-intent href=\"geo:*\" />\n    <preference name=\"ScrollEnabled\" value=\"false\" />\n    <preference name=\"BackupWebStorage\" value=\"none\" />\n    <preference name=\"SplashMaintainAspectRatio\" value=\"true\" />\n    <preference name=\"FadeSplashScreenDuration\" value=\"300\" />\n\n    <!--\n      Change these to configure how the splashscreen displays and fades in/out.\n      More info here: https://github.com/apache/cordova-plugin-splashscreen\n    -->\n    <preference name=\"SplashShowOnlyFirstTime\" value=\"false\" />\n    <preference name=\"SplashScreen\" value=\"screen\" />\n    <preference name=\"SplashScreenDelay\" value=\"3000\" />\n    <platform name=\"android\">\n        <preference name=\"Scheme\" value=\"http\" />\n        <edit-config file=\"app/src/main/AndroidManifest.xml\" mode=\"merge\" target=\"/manifest/application\" xmlns:android=\"http://schemas.android.com/apk/res/android\">\n            <application android:networkSecurityConfig=\"@xml/network_security_config\" />\n        </edit-config>\n        <resource-file src=\"resources/android/xml/network_security_config.xml\" target=\"app/src/main/res/xml/network_security_config.xml\" />\n        <allow-intent href=\"market:*\" />\n        <icon density=\"ldpi\" src=\"resources/android/icon/drawable-ldpi-icon.png\" />\n        <icon density=\"mdpi\" src=\"resources/android/icon/drawable-mdpi-icon.png\" />\n        <icon density=\"hdpi\" src=\"resources/android/icon/drawable-hdpi-icon.png\" />\n        <icon density=\"xhdpi\" src=\"resources/android/icon/drawable-xhdpi-icon.png\" />\n        <icon density=\"xxhdpi\" src=\"resources/android/icon/drawable-xxhdpi-icon.png\" />\n        <icon density=\"xxxhdpi\" src=\"resources/android/icon/drawable-xxxhdpi-icon.png\" />\n        <splash density=\"land-ldpi\" src=\"resources/android/splash/drawable-land-ldpi-screen.png\" />\n        <splash density=\"land-mdpi\" src=\"resources/android/splash/drawable-land-mdpi-screen.png\" />\n        <splash density=\"land-hdpi\" src=\"resources/android/splash/drawable-land-hdpi-screen.png\" />\n        <splash density=\"land-xhdpi\" src=\"resources/android/splash/drawable-land-xhdpi-screen.png\" />\n        <splash density=\"land-xxhdpi\" src=\"resources/android/splash/drawable-land-xxhdpi-screen.png\" />\n        <splash density=\"land-xxxhdpi\" src=\"resources/android/splash/drawable-land-xxxhdpi-screen.png\" />\n        <splash density=\"port-ldpi\" src=\"resources/android/splash/drawable-port-ldpi-screen.png\" />\n        <splash density=\"port-mdpi\" src=\"resources/android/splash/drawable-port-mdpi-screen.png\" />\n        <splash density=\"port-hdpi\" src=\"resources/android/splash/drawable-port-hdpi-screen.png\" />\n        <splash density=\"port-xhdpi\" src=\"resources/android/splash/drawable-port-xhdpi-screen.png\" />\n        <splash density=\"port-xxhdpi\" src=\"resources/android/splash/drawable-port-xxhdpi-screen.png\" />\n        <splash density=\"port-xxxhdpi\" src=\"resources/android/splash/drawable-port-xxxhdpi-screen.png\" />\n    </platform>\n    <platform name=\"ios\">\n        <allow-intent href=\"itms:*\" />\n        <allow-intent href=\"itms-apps:*\" />\n        <icon height=\"57\" src=\"resources/ios/icon/icon.png\" width=\"57\" />\n        <icon height=\"114\" src=\"resources/ios/icon/icon@2x.png\" width=\"114\" />\n        <icon height=\"29\" src=\"resources/ios/icon/icon-small.png\" width=\"29\" />\n        <icon height=\"58\" src=\"resources/ios/icon/icon-small@2x.png\" width=\"58\" />\n        <icon height=\"87\" src=\"resources/ios/icon/icon-small@3x.png\" width=\"87\" />\n        <icon height=\"20\" src=\"resources/ios/icon/icon-20.png\" width=\"20\" />\n        <icon height=\"40\" src=\"resources/ios/icon/icon-20@2x.png\" width=\"40\" />\n        <icon height=\"60\" src=\"resources/ios/icon/icon-20@3x.png\" width=\"60\" />\n        <icon height=\"48\" src=\"resources/ios/icon/icon-24@2x.png\" width=\"48\" />\n        <icon height=\"55\" src=\"resources/ios/icon/icon-27.5@2x.png\" width=\"55\" />\n        <icon height=\"29\" src=\"resources/ios/icon/icon-29.png\" width=\"29\" />\n        <icon height=\"58\" src=\"resources/ios/icon/icon-29@2x.png\" width=\"58\" />\n        <icon height=\"87\" src=\"resources/ios/icon/icon-29@3x.png\" width=\"87\" />\n        <icon height=\"40\" src=\"resources/ios/icon/icon-40.png\" width=\"40\" />\n        <icon height=\"80\" src=\"resources/ios/icon/icon-40@2x.png\" width=\"80\" />\n        <icon height=\"120\" src=\"resources/ios/icon/icon-40@3x.png\" width=\"120\" />\n        <icon height=\"88\" src=\"resources/ios/icon/icon-44@2x.png\" width=\"88\" />\n        <icon height=\"50\" src=\"resources/ios/icon/icon-50.png\" width=\"50\" />\n        <icon height=\"100\" src=\"resources/ios/icon/icon-50@2x.png\" width=\"100\" />\n        <icon height=\"60\" src=\"resources/ios/icon/icon-60.png\" width=\"60\" />\n        <icon height=\"120\" src=\"resources/ios/icon/icon-60@2x.png\" width=\"120\" />\n        <icon height=\"180\" src=\"resources/ios/icon/icon-60@3x.png\" width=\"180\" />\n        <icon height=\"72\" src=\"resources/ios/icon/icon-72.png\" width=\"72\" />\n        <icon height=\"144\" src=\"resources/ios/icon/icon-72@2x.png\" width=\"144\" />\n        <icon height=\"76\" src=\"resources/ios/icon/icon-76.png\" width=\"76\" />\n        <icon height=\"152\" src=\"resources/ios/icon/icon-76@2x.png\" width=\"152\" />\n        <icon height=\"167\" src=\"resources/ios/icon/icon-83.5@2x.png\" width=\"167\" />\n        <icon height=\"172\" src=\"resources/ios/icon/icon-86@2x.png\" width=\"172\" />\n        <icon height=\"196\" src=\"resources/ios/icon/icon-98@2x.png\" width=\"196\" />\n        <icon height=\"1024\" src=\"resources/ios/icon/icon-1024.png\" width=\"1024\" />\n        <splash height=\"480\" src=\"resources/ios/splash/Default~iphone.png\" width=\"320\" />\n        <splash height=\"960\" src=\"resources/ios/splash/Default@2x~iphone.png\" width=\"640\" />\n        <splash height=\"1024\" src=\"resources/ios/splash/Default-Portrait~ipad.png\" width=\"768\" />\n        <splash height=\"768\" src=\"resources/ios/splash/Default-Landscape~ipad.png\" width=\"1024\" />\n        <splash height=\"1125\" src=\"resources/ios/splash/Default-Landscape-2436h.png\" width=\"2436\" />\n        <splash height=\"1242\" src=\"resources/ios/splash/Default-Landscape-736h.png\" width=\"2208\" />\n        <splash height=\"2048\" src=\"resources/ios/splash/Default-Portrait@2x~ipad.png\" width=\"1536\" />\n        <splash height=\"1536\" src=\"resources/ios/splash/Default-Landscape@2x~ipad.png\" width=\"2048\" />\n        <splash height=\"2732\" src=\"resources/ios/splash/Default-Portrait@~ipadpro.png\" width=\"2048\" />\n        <splash height=\"2048\" src=\"resources/ios/splash/Default-Landscape@~ipadpro.png\" width=\"2732\" />\n        <splash height=\"1136\" src=\"resources/ios/splash/Default-568h@2x~iphone.png\" width=\"640\" />\n        <splash height=\"1334\" src=\"resources/ios/splash/Default-667h.png\" width=\"750\" />\n        <splash height=\"2208\" src=\"resources/ios/splash/Default-736h.png\" width=\"1242\" />\n        <splash height=\"2436\" src=\"resources/ios/splash/Default-2436h.png\" width=\"1125\" />\n        <splash height=\"2732\" src=\"resources/ios/splash/Default@2x~universal~anyany.png\" width=\"2732\" />\n    </platform>\n    <plugin name=\"cordova-plugin-statusbar\" spec=\"2.4.2\" />\n    <plugin name=\"cordova-plugin-device\" spec=\"2.0.2\" />\n    <plugin name=\"cordova-plugin-splashscreen\" spec=\"5.0.2\" />\n    <plugin name=\"cordova-plugin-ionic-webview\" spec=\"^5.0.0\" />\n    <plugin name=\"cordova-plugin-ionic-keyboard\" spec=\"^2.0.5\" />\n</widget>\n"
  },
  {
    "path": "integrations/cordova/resources/README.md",
    "content": "These are Cordova resources. You can replace icon.png and splash.png and run\n`ionic cordova resources` to generate custom icons and splash screens for your\napp. See `ionic cordova resources --help` for details.\n\nCordova reference documentation:\n\n- Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html\n- Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/\n"
  },
  {
    "path": "integrations/cordova/resources/android/xml/network_security_config.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<network-security-config>\n    <domain-config cleartextTrafficPermitted=\"true\">\n        <domain includeSubdomains=\"true\">localhost</domain>\n    </domain-config>\n</network-security-config>\n"
  },
  {
    "path": "ionic-angular/base/.editorconfig",
    "content": "# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs\n# editorconfig.org\n\nroot = true\n\n[*]\nindent_style = space\nindent_size = 2\n\n# We recommend you to keep these unchanged\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[*.md]\ntrim_trailing_whitespace = false"
  },
  {
    "path": "ionic-angular/base/.gitignore",
    "content": "# Specifies intentionally untracked files to ignore when using Git\n# http://git-scm.com/docs/gitignore\n\n*~\n*.sw[mnpcod]\n.tmp\n*.tmp\n*.tmp.*\n*.sublime-project\n*.sublime-workspace\n.DS_Store\nThumbs.db\nUserInterfaceState.xcuserstate\n$RECYCLE.BIN/\n\n*.log\nlog.txt\nnpm-debug.log*\n\n/.idea\n/.ionic\n/.sass-cache\n/.sourcemaps\n/.versions\n/.vscode\n/coverage\n/dist\n/node_modules\n/platforms\n/plugins\n/www\n"
  },
  {
    "path": "ionic-angular/base/ionic.config.json",
    "content": "{\n  \"name\": \"ionic2-app-base\",\n  \"app_id\": \"\",\n  \"type\": \"ionic-angular\",\n  \"integrations\": {}\n}\n"
  },
  {
    "path": "ionic-angular/base/package.json",
    "content": "{\n  \"name\": \"ionic-app-base\",\n  \"version\": \"0.0.0\",\n  \"author\": \"Ionic Framework\",\n  \"homepage\": \"https://ionicframework.com/\",\n  \"private\": true,\n  \"scripts\": {\n    \"start\": \"ionic-app-scripts serve\",\n    \"clean\": \"ionic-app-scripts clean\",\n    \"build\": \"ionic-app-scripts build\",\n    \"lint\": \"ionic-app-scripts lint\"\n  },\n  \"dependencies\": {\n    \"@angular/animations\": \"5.2.11\",\n    \"@angular/common\": \"5.2.11\",\n    \"@angular/compiler\": \"5.2.11\",\n    \"@angular/compiler-cli\": \"5.2.11\",\n    \"@angular/core\": \"5.2.11\",\n    \"@angular/forms\": \"5.2.11\",\n    \"@angular/platform-browser\": \"5.2.11\",\n    \"@angular/platform-browser-dynamic\": \"5.2.11\",\n    \"@ionic-native/core\": \"4.20.0\",\n    \"@ionic-native/splash-screen\": \"4.20.0\",\n    \"@ionic-native/status-bar\": \"4.20.0\",\n    \"@ionic/storage\": \"2.2.0\",\n    \"ionic-angular\": \"3.9.9\",\n    \"ionicons\": \"3.0.0\",\n    \"rxjs\": \"5.5.11\",\n    \"sw-toolbox\": \"3.6.0\",\n    \"zone.js\": \"0.8.29\"\n  },\n  \"devDependencies\": {\n    \"@ionic/app-scripts\": \"3.2.4\",\n    \"typescript\": \"2.6.2\"\n  }\n}\n"
  },
  {
    "path": "ionic-angular/base/src/app/app.scss",
    "content": "// https://ionicframework.com/docs/theming/\n\n\n// App Global Sass\n// --------------------------------------------------\n// Put style rules here that you want to apply globally. These\n// styles are for the entire app and not just one component.\n// Additionally, this file can be also used as an entry point\n// to import other Sass files to be included in the output CSS.\n//\n// Shared Sass variables, which can be used to adjust Ionic's\n// default Sass variables, belong in \"theme/variables.scss\".\n//\n// To declare rules for a specific mode, create a child rule\n// for the .md, .ios, or .wp mode classes. The mode class is\n// automatically applied to the <body> element in the app.\n"
  },
  {
    "path": "ionic-angular/base/src/app/main.ts",
    "content": "import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app.module';\n\nplatformBrowserDynamic().bootstrapModule(AppModule);\n"
  },
  {
    "path": "ionic-angular/base/src/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\" dir=\"ltr\">\n<head>\n  <meta charset=\"UTF-8\">\n  <title>Ionic App</title>\n  <meta name=\"viewport\" content=\"viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\">\n  <meta name=\"format-detection\" content=\"telephone=no\">\n  <meta name=\"msapplication-tap-highlight\" content=\"no\">\n\n  <link rel=\"icon\" type=\"image/x-icon\" href=\"assets/icon/favicon.ico\">\n  <link rel=\"manifest\" href=\"manifest.json\">\n  <meta name=\"theme-color\" content=\"#4e8ef7\">\n\n  <!-- add to homescreen for ios -->\n  <meta name=\"mobile-web-app-capable\" content=\"yes\" />\n  <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\">\n\n  <!-- cordova.js required for cordova apps (remove if not needed) -->\n  <script src=\"cordova.js\"></script>\n\n  <!-- un-comment this code to enable service worker\n  <script>\n    if ('serviceWorker' in navigator) {\n      navigator.serviceWorker.register('service-worker.js')\n        .then(() => console.log('service worker installed'))\n        .catch(err => console.error('Error', err));\n    }\n  </script>-->\n\n  <link href=\"build/main.css\" rel=\"stylesheet\">\n\n</head>\n<body>\n\n  <!-- Ionic's root component and where the app will load -->\n  <ion-app></ion-app>\n\n  <!-- The polyfills js is generated during the build process -->\n  <script src=\"build/polyfills.js\"></script>\n\n  <!-- The vendor js is generated during the build process\n       It contains all of the dependencies in node_modules -->\n  <script src=\"build/vendor.js\"></script>\n\n  <!-- The main bundle js is generated during the build process -->\n  <script src=\"build/main.js\"></script>\n\n</body>\n</html>\n"
  },
  {
    "path": "ionic-angular/base/src/manifest.json",
    "content": "{\n  \"name\": \"Ionic\",\n  \"short_name\": \"Ionic\",\n  \"start_url\": \"index.html\",\n  \"display\": \"standalone\",\n  \"icons\": [{\n    \"src\": \"assets/imgs/logo.png\",\n    \"sizes\": \"512x512\",\n    \"type\": \"image/png\"\n  }],\n  \"background_color\": \"#4e8ef7\",\n  \"theme_color\": \"#4e8ef7\"\n}"
  },
  {
    "path": "ionic-angular/base/src/service-worker.js",
    "content": "/**\n * Check out https://googlechromelabs.github.io/sw-toolbox/ for\n * more info on how to use sw-toolbox to custom configure your service worker.\n */\n\n\n'use strict';\nimportScripts('./build/sw-toolbox.js');\n\nself.toolbox.options.cache = {\n  name: 'ionic-cache'\n};\n\n// pre-cache our key assets\nself.toolbox.precache(\n  [\n    './build/main.js',\n    './build/vendor.js',\n    './build/main.css',\n    './build/polyfills.js',\n    'index.html',\n    'manifest.json'\n  ]\n);\n\n// dynamically cache any other local assets\nself.toolbox.router.any('/*', self.toolbox.fastest);\n\n// for any other requests go to the network, cache,\n// and then only use that cached resource if your user goes offline\nself.toolbox.router.default = self.toolbox.networkFirst;\n"
  },
  {
    "path": "ionic-angular/base/src/theme/variables.scss",
    "content": "// Ionic Variables and Theming. For more info, please see:\n// https://ionicframework.com/docs/theming/\n\n// Font path is used to include ionicons,\n// roboto, and noto sans fonts\n$font-path: \"../assets/fonts\";\n\n\n// The app direction is used to include\n// rtl styles in your app. For more info, please refer to:\n// https://ionicframework.com/docs/theming/rtl-support/\n$app-direction: ltr;\n\n\n@import \"ionic.globals\";\n\n\n// Shared Variables\n// --------------------------------------------------\n// To customize the look and feel of this app, you can override\n// the Sass variables found in Ionic's source scss files.\n// To view all the possible Ionic variables, see:\n// https://ionicframework.com/docs/theming/overriding-ionic-variables/\n\n\n\n\n// Named Color Variables\n// --------------------------------------------------\n// Named colors makes it easy to reuse colors on various components.\n// It's highly recommended to change the default colors\n// to match your app's branding. Ionic uses a Sass map of\n// colors so you can add, rename and remove colors as needed.\n// The \"primary\" color is the only required color in the map.\n\n$colors: (\n  primary:    #488aff,\n  secondary:  #32db64,\n  danger:     #f53d3d,\n  light:      #f4f4f4,\n  dark:       #222\n);\n\n\n// App iOS Variables\n// --------------------------------------------------\n// iOS only Sass variables can go here\n\n\n\n\n// App Material Design Variables\n// --------------------------------------------------\n// Material Design only Sass variables can go here\n\n\n\n\n// App Windows Variables\n// --------------------------------------------------\n// Windows only Sass variables can go here\n\n\n\n\n// App Theme\n// --------------------------------------------------\n// Ionic apps can have different themes applied, which can\n// then be future customized. This import comes last\n// so that the above variables are used and Ionic's\n// default are overridden.\n\n@import \"ionic.theme.default\";\n\n\n// Ionicons\n// --------------------------------------------------\n// The premium icon font for Ionic. For more info, please see:\n// https://ionicframework.com/docs/ionicons/\n\n@import \"ionic.ionicons\";\n\n\n// Fonts\n// --------------------------------------------------\n\n@import \"roboto\";\n@import \"noto-sans\";\n"
  },
  {
    "path": "ionic-angular/base/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"allowSyntheticDefaultImports\": true,\n    \"declaration\": false,\n    \"emitDecoratorMetadata\": true,\n    \"experimentalDecorators\": true,\n    \"lib\": [\n      \"dom\",\n      \"es2015\"\n    ],\n    \"module\": \"es2015\",\n    \"moduleResolution\": \"node\",\n    \"sourceMap\": true,\n    \"target\": \"es5\"\n  },\n  \"include\": [\n    \"src/**/*.ts\"\n  ],\n  \"exclude\": [\n    \"node_modules\",\n    \"src/**/*.spec.ts\",\n    \"src/**/__tests__/*.ts\"\n  ],\n  \"compileOnSave\": false,\n  \"atom\": {\n    \"rewriteTsconfig\": false\n  }\n}\n"
  },
  {
    "path": "ionic-angular/base/tslint.json",
    "content": "{\n  \"rules\": {\n    \"no-duplicate-variable\": true,\n    \"no-unused-variable\": [\n      true\n    ]\n  },\n  \"rulesDirectory\": [\n    \"node_modules/tslint-eslint-rules/dist/rules\"\n  ]\n}\n"
  },
  {
    "path": "ionic-angular/community/.gitkeep",
    "content": ""
  },
  {
    "path": "ionic-angular/official/aws/README.md",
    "content": "# Ionic AWS Starter\n\nThis Ionic starter comes with a pre-configured [AWS Mobile Hub](https://aws.amazon.com/mobile/) project set up to use Amazon DynamoDB, S3, Pinpoint, and Cognito.\n\n## Using the Starter\n\n### Installing Ionic CLI 3.0\n\nThis starter project requires Ionic CLI 3.0, to install, run\n\n```bash\nnpm install -g ionic@latest\n```\n\nMake sure to add `sudo` on Mac and Linux. If you encounter issues installing the Ionic 3 CLI, uninstall the old one using `npm uninstall -g ionic` first.\n\n### Installing AWSMobile CLI\n\n```\nnpm install -g awsmobile-cli\n```\n\n### Creating the Ionic Project\n\nTo create a new Ionic project using this AWS Mobile Hub starter, run\n\n```bash\nionic start myApp aws\n```\n\nWhich will create a new app in `./myApp`.\n\nOnce the app is created, `cd` into it:\n\n```bash\ncd myApp\n```\n\n### Creating AWS Mobile Hub Project\n\nInit AWSMobile project \n\n```bash\nawsmobile init\n\nPlease tell us about your project:\n? Where is your project's source directory:  src\n? Where is your project's distribution directory that stores build artifacts:  www\n? What is your project's build command:  npm run-script build\n? What is your project's start command for local test run:  ionic serve\n\n? What awsmobile project name would you like to use:  ...\n\nSuccessfully created AWS Mobile Hub project: ...\n```\n\n### Configuring AWS Mobile Hub Project\n\nThe starter project gives instructions on how to do this from the\ncommand line, but some have reported bugs with\n[awsmobile](https://github.com/ionic-team/starters/issues/46),\nso here's how to do it in the browser.\n\n#### NoSQL Database\n\nEnable.\n\nCreate a custom table named `tasks`. Make it Private.\n\nAccept `userId` as Partition key.\n\nAdd an attribute `taskId` with type string and make it a Sort key\n\nAdd an attribute `category` with type string.\n\nAdd an attribute `description` with type string.\n\nAdd an attribute `created` with type number.\n\nCreate an index `DateSorted` with userId as Partition key and taskId\nas Sort key.\n\n#### User Sign-In\n\nTurn this on.\n\nSet your password requirements.\n\n\n#### Hosting and Streaming\n\nTurn this on.\n\n#### User File Storage\n\nTurn this on.\n\n### Configuring S3\n\nFrom the AWS Console, go to S3.\n\nSelect the bucket named `<project name>-userfiles-mobilehub-<AWS resource number>`\n\nGo to the Permissions tab. Click on CORS Configuration. Paste the\nfollowing into the editor and save.\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<CORSConfiguration xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">\n<CORSRule>\n    <AllowedOrigin>*</AllowedOrigin>\n    <AllowedMethod>HEAD</AllowedMethod>\n    <AllowedMethod>PUT</AllowedMethod>\n    <AllowedMethod>GET</AllowedMethod>\n    <MaxAgeSeconds>3000</MaxAgeSeconds>\n    <ExposeHeader>x-amz-server-side-encryption</ExposeHeader>\n    <ExposeHeader>x-amz-request-id</ExposeHeader>\n    <ExposeHeader>x-amz-id-2</ExposeHeader>\n    <AllowedHeader>*</AllowedHeader>\n</CORSRule>\n</CORSConfiguration>\n```\n\n\n### Integrating Changes into App\n\nGo back to the command line for your project.\n\n```bash\nawsmobile pull\n```\n\nAnswer yes, when asked \"? sync corresponding contents in backend/ with #current-backend-info/\"\n\n### Install dependencies\n\n\n```bash\nnpm install\n```\n\nThe following commands are needed due to breaking changes in\n[aws-amplify](https://github.com/aws/aws-amplify) 0.4.6.\nThey may not be needed in the future.\n\n```bash\nnpm install @types/zen-observable\nnpm install @types/paho-mqtt\n```\n\n### Running the app\n\nNow the app is configured and wired up to the AWS Mobile Hub and AWS services. To run the app in the browser, run\n\n```bash\nionic serve\n```\n\nTo run the app on device, first add a platform, and then run it:\n\n```bash\nionic cordova platform add ios\nionic cordova run ios\n```\n\nOr open the platform-specific project in the relevant IDE:\n\n```bash\nopen platforms/ios/MyApp.xcodeproj\n```\n\n### Hosting app on Amazon S3\n\nSince your Ionic app is just a web app, it can be hosted as a static website in an Amazon S3 bucket.\n\n```\nnpm run build\nawsmobile publish\n```\n"
  },
  {
    "path": "ionic-angular/official/aws/ionic.starter.json",
    "content": "{\n  \"name\": \"AWS Starter\",\n  \"baseref\": \"main\",\n  \"gitignore\": [\n    \"cors-policy.xml\",\n    \"mobile-hub-project.zip\"\n  ],\n  \"tarignore\": [\n    \".sourcemaps\",\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"packageJson\": {\n    \"dependencies\": {\n      \"@ionic-native/camera\": \"4.5.3\",\n      \"aws-amplify\": \"^0.2.9\"\n    },\n    \"devDependencies\": {\n      \"@types/node\": \"^9.4.0\"\n    }\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/app/app.component.ts",
    "content": "import { Component } from '@angular/core';\nimport { Platform } from 'ionic-angular';\nimport { StatusBar } from '@ionic-native/status-bar';\nimport { SplashScreen } from '@ionic-native/splash-screen';\nimport { Auth } from 'aws-amplify';\n\nimport { TabsPage } from '../pages/tabs/tabs';\nimport { LoginPage } from '../pages/login/login';\n\n@Component({\n  templateUrl: 'app.html'\n})\nexport class MyApp {\n  rootPage:any = null;\n\n  constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {\n    let globalActions = function() {\n      // Okay, so the platform is ready and our plugins are available.\n      // Here you can do any higher level native things you might need.\n      statusBar.styleDefault();\n      splashScreen.hide();\n    };\n\n    platform.ready()\n      .then(() => {\n        Auth.currentAuthenticatedUser()\n          .then(() => { this.rootPage = TabsPage; })\n          .catch(() => { this.rootPage = LoginPage; })\n          .then(() => globalActions());\n      });\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/app/app.html",
    "content": "<ion-nav [root]=\"rootPage\"></ion-nav>\n"
  },
  {
    "path": "ionic-angular/official/aws/src/app/app.module.ts",
    "content": "import { NgModule, ErrorHandler } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';\n\nimport { Camera } from '@ionic-native/camera';\n\nimport { MyApp } from './app.component';\nimport { LoginPage } from '../pages/login/login';\nimport { SignupPage } from '../pages/signup/signup';\nimport { ConfirmSignInPage } from '../pages/confirmSignIn/confirmSignIn';\nimport { ConfirmSignUpPage } from '../pages/confirmSignUp/confirmSignUp';\nimport { SettingsPage } from '../pages/settings/settings';\nimport { AboutPage } from '../pages/about/about';\nimport { AccountPage } from '../pages/account/account';\nimport { TabsPage } from '../pages/tabs/tabs';\nimport { TasksPage } from '../pages/tasks/tasks';\nimport { TasksCreatePage } from '../pages/tasks-create/tasks-create';\n\nimport { StatusBar } from '@ionic-native/status-bar';\nimport { SplashScreen } from '@ionic-native/splash-screen';\n\nimport { DynamoDB } from '../providers/aws.dynamodb';\n\nimport Amplify from 'aws-amplify';\nconst aws_exports = require('../aws-exports').default;\n\nAmplify.configure(aws_exports);\n\n@NgModule({\n  declarations: [\n    MyApp,\n    LoginPage,\n    SignupPage,\n    ConfirmSignInPage,\n    ConfirmSignUpPage,\n    SettingsPage,\n    AboutPage,\n    AccountPage,\n    TabsPage,\n    TasksPage,\n    TasksCreatePage\n  ],\n  imports: [\n    BrowserModule,\n    IonicModule.forRoot(MyApp)\n  ],\n  bootstrap: [IonicApp],\n  entryComponents: [\n    MyApp,\n    LoginPage,\n    SignupPage,\n    ConfirmSignInPage,\n    ConfirmSignUpPage,\n    SettingsPage,\n    AboutPage,\n    AccountPage,\n    TabsPage,\n    TasksPage,\n    TasksCreatePage\n  ],\n  providers: [\n    StatusBar,\n    SplashScreen,\n    {provide: ErrorHandler, useClass: IonicErrorHandler},\n    Camera,\n    DynamoDB\n  ]\n})\nexport class AppModule {}\n\ndeclare var AWS;\nAWS.config.customUserAgent = AWS.config.customUserAgent + ' Ionic';\n"
  },
  {
    "path": "ionic-angular/official/aws/src/assets/aws-sdk.js",
    "content": "// AWS SDK for JavaScript v2.17.0\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// License at https://sdk.amazonaws.com/js/BUNDLE_LICENSE.txt\n(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2015-12-08\",\n    \"endpointPrefix\": \"acm\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"ACM\",\n    \"serviceFullName\": \"AWS Certificate Manager\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"CertificateManager\",\n    \"uid\": \"acm-2015-12-08\"\n  },\n  \"operations\": {\n    \"AddTagsToCertificate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CertificateArn\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"CertificateArn\": {},\n          \"Tags\": {\n            \"shape\": \"S3\"\n          }\n        }\n      }\n    },\n    \"DeleteCertificate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CertificateArn\"\n        ],\n        \"members\": {\n          \"CertificateArn\": {}\n        }\n      }\n    },\n    \"DescribeCertificate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CertificateArn\"\n        ],\n        \"members\": {\n          \"CertificateArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Certificate\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"CertificateArn\": {},\n              \"DomainName\": {},\n              \"SubjectAlternativeNames\": {\n                \"shape\": \"Sc\"\n              },\n              \"DomainValidationOptions\": {\n                \"shape\": \"Sd\"\n              },\n              \"Serial\": {},\n              \"Subject\": {},\n              \"Issuer\": {},\n              \"CreatedAt\": {\n                \"type\": \"timestamp\"\n              },\n              \"IssuedAt\": {\n                \"type\": \"timestamp\"\n              },\n              \"ImportedAt\": {\n                \"type\": \"timestamp\"\n              },\n              \"Status\": {},\n              \"RevokedAt\": {\n                \"type\": \"timestamp\"\n              },\n              \"RevocationReason\": {},\n              \"NotBefore\": {\n                \"type\": \"timestamp\"\n              },\n              \"NotAfter\": {\n                \"type\": \"timestamp\"\n              },\n              \"KeyAlgorithm\": {},\n              \"SignatureAlgorithm\": {},\n              \"InUseBy\": {\n                \"type\": \"list\",\n                \"member\": {}\n              },\n              \"FailureReason\": {},\n              \"Type\": {},\n              \"RenewalSummary\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"RenewalStatus\",\n                  \"DomainValidationOptions\"\n                ],\n                \"members\": {\n                  \"RenewalStatus\": {},\n                  \"DomainValidationOptions\": {\n                    \"shape\": \"Sd\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"GetCertificate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CertificateArn\"\n        ],\n        \"members\": {\n          \"CertificateArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Certificate\": {},\n          \"CertificateChain\": {}\n        }\n      }\n    },\n    \"ImportCertificate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Certificate\",\n          \"PrivateKey\"\n        ],\n        \"members\": {\n          \"CertificateArn\": {},\n          \"Certificate\": {\n            \"type\": \"blob\"\n          },\n          \"PrivateKey\": {\n            \"type\": \"blob\",\n            \"sensitive\": true\n          },\n          \"CertificateChain\": {\n            \"type\": \"blob\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CertificateArn\": {}\n        }\n      }\n    },\n    \"ListCertificates\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CertificateStatuses\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"NextToken\": {},\n          \"MaxItems\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {},\n          \"CertificateSummaryList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"CertificateArn\": {},\n                \"DomainName\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListTagsForCertificate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CertificateArn\"\n        ],\n        \"members\": {\n          \"CertificateArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Tags\": {\n            \"shape\": \"S3\"\n          }\n        }\n      }\n    },\n    \"RemoveTagsFromCertificate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CertificateArn\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"CertificateArn\": {},\n          \"Tags\": {\n            \"shape\": \"S3\"\n          }\n        }\n      }\n    },\n    \"RequestCertificate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\"\n        ],\n        \"members\": {\n          \"DomainName\": {},\n          \"SubjectAlternativeNames\": {\n            \"shape\": \"Sc\"\n          },\n          \"IdempotencyToken\": {},\n          \"DomainValidationOptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"DomainName\",\n                \"ValidationDomain\"\n              ],\n              \"members\": {\n                \"DomainName\": {},\n                \"ValidationDomain\": {}\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CertificateArn\": {}\n        }\n      }\n    },\n    \"ResendValidationEmail\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CertificateArn\",\n          \"Domain\",\n          \"ValidationDomain\"\n        ],\n        \"members\": {\n          \"CertificateArn\": {},\n          \"Domain\": {},\n          \"ValidationDomain\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S3\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Key\"\n        ],\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"Sc\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sd\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\"\n        ],\n        \"members\": {\n          \"DomainName\": {},\n          \"ValidationEmails\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"ValidationDomain\": {},\n          \"ValidationStatus\": {}\n        }\n      }\n    }\n  }\n}\n},{}],2:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"ListCertificates\": {\n      \"input_token\": \"NextToken\",\n      \"limit_key\": \"MaxItems\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"CertificateSummaryList\"\n    }\n  }\n}\n},{}],3:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2015-07-09\",\n    \"endpointPrefix\": \"apigateway\",\n    \"protocol\": \"rest-json\",\n    \"serviceFullName\": \"Amazon API Gateway\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"apigateway-2015-07-09\"\n  },\n  \"operations\": {\n    \"CreateApiKey\": {\n      \"http\": {\n        \"requestUri\": \"/apikeys\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"name\": {},\n          \"description\": {},\n          \"enabled\": {\n            \"type\": \"boolean\"\n          },\n          \"generateDistinctId\": {\n            \"type\": \"boolean\"\n          },\n          \"value\": {},\n          \"stageKeys\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"restApiId\": {},\n                \"stageName\": {}\n              }\n            }\n          },\n          \"customerId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S6\"\n      }\n    },\n    \"CreateAuthorizer\": {\n      \"http\": {\n        \"requestUri\": \"/restapis/{restapi_id}/authorizers\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"name\",\n          \"type\",\n          \"identitySource\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"name\": {},\n          \"type\": {},\n          \"providerARNs\": {\n            \"shape\": \"Sb\"\n          },\n          \"authType\": {},\n          \"authorizerUri\": {},\n          \"authorizerCredentials\": {},\n          \"identitySource\": {},\n          \"identityValidationExpression\": {},\n          \"authorizerResultTtlInSeconds\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Se\"\n      }\n    },\n    \"CreateBasePathMapping\": {\n      \"http\": {\n        \"requestUri\": \"/domainnames/{domain_name}/basepathmappings\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"domainName\",\n          \"restApiId\"\n        ],\n        \"members\": {\n          \"domainName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"domain_name\"\n          },\n          \"basePath\": {},\n          \"restApiId\": {},\n          \"stage\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sg\"\n      }\n    },\n    \"CreateDeployment\": {\n      \"http\": {\n        \"requestUri\": \"/restapis/{restapi_id}/deployments\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"stageName\": {},\n          \"stageDescription\": {},\n          \"description\": {},\n          \"cacheClusterEnabled\": {\n            \"type\": \"boolean\"\n          },\n          \"cacheClusterSize\": {},\n          \"variables\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sl\"\n      }\n    },\n    \"CreateDocumentationPart\": {\n      \"http\": {\n        \"requestUri\": \"/restapis/{restapi_id}/documentation/parts\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"location\",\n          \"properties\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"location\": {\n            \"shape\": \"Sq\"\n          },\n          \"properties\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"St\"\n      }\n    },\n    \"CreateDocumentationVersion\": {\n      \"http\": {\n        \"requestUri\": \"/restapis/{restapi_id}/documentation/versions\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"documentationVersion\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"documentationVersion\": {},\n          \"stageName\": {},\n          \"description\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sv\"\n      }\n    },\n    \"CreateDomainName\": {\n      \"http\": {\n        \"requestUri\": \"/domainnames\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"domainName\",\n          \"certificateName\",\n          \"certificateBody\",\n          \"certificatePrivateKey\",\n          \"certificateChain\"\n        ],\n        \"members\": {\n          \"domainName\": {},\n          \"certificateName\": {},\n          \"certificateBody\": {},\n          \"certificatePrivateKey\": {},\n          \"certificateChain\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sx\"\n      }\n    },\n    \"CreateModel\": {\n      \"http\": {\n        \"requestUri\": \"/restapis/{restapi_id}/models\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"name\",\n          \"contentType\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"name\": {},\n          \"description\": {},\n          \"schema\": {},\n          \"contentType\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sz\"\n      }\n    },\n    \"CreateResource\": {\n      \"http\": {\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{parent_id}\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"parentId\",\n          \"pathPart\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"parentId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"parent_id\"\n          },\n          \"pathPart\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S11\"\n      }\n    },\n    \"CreateRestApi\": {\n      \"http\": {\n        \"requestUri\": \"/restapis\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"name\"\n        ],\n        \"members\": {\n          \"name\": {},\n          \"description\": {},\n          \"version\": {},\n          \"cloneFrom\": {},\n          \"binaryMediaTypes\": {\n            \"shape\": \"S8\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1e\"\n      }\n    },\n    \"CreateStage\": {\n      \"http\": {\n        \"requestUri\": \"/restapis/{restapi_id}/stages\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"stageName\",\n          \"deploymentId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"stageName\": {},\n          \"deploymentId\": {},\n          \"description\": {},\n          \"cacheClusterEnabled\": {\n            \"type\": \"boolean\"\n          },\n          \"cacheClusterSize\": {},\n          \"variables\": {\n            \"shape\": \"Sk\"\n          },\n          \"documentationVersion\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1g\"\n      }\n    },\n    \"CreateUsagePlan\": {\n      \"http\": {\n        \"requestUri\": \"/usageplans\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"name\"\n        ],\n        \"members\": {\n          \"name\": {},\n          \"description\": {},\n          \"apiStages\": {\n            \"shape\": \"S1o\"\n          },\n          \"throttle\": {\n            \"shape\": \"S1q\"\n          },\n          \"quota\": {\n            \"shape\": \"S1r\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1t\"\n      }\n    },\n    \"CreateUsagePlanKey\": {\n      \"http\": {\n        \"requestUri\": \"/usageplans/{usageplanId}/keys\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"usagePlanId\",\n          \"keyId\",\n          \"keyType\"\n        ],\n        \"members\": {\n          \"usagePlanId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"usageplanId\"\n          },\n          \"keyId\": {},\n          \"keyType\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1v\"\n      }\n    },\n    \"DeleteApiKey\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/apikeys/{api_Key}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"apiKey\"\n        ],\n        \"members\": {\n          \"apiKey\": {\n            \"location\": \"uri\",\n            \"locationName\": \"api_Key\"\n          }\n        }\n      }\n    },\n    \"DeleteAuthorizer\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/restapis/{restapi_id}/authorizers/{authorizer_id}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"authorizerId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"authorizerId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"authorizer_id\"\n          }\n        }\n      }\n    },\n    \"DeleteBasePathMapping\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/domainnames/{domain_name}/basepathmappings/{base_path}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"domainName\",\n          \"basePath\"\n        ],\n        \"members\": {\n          \"domainName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"domain_name\"\n          },\n          \"basePath\": {\n            \"location\": \"uri\",\n            \"locationName\": \"base_path\"\n          }\n        }\n      }\n    },\n    \"DeleteClientCertificate\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/clientcertificates/{clientcertificate_id}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"clientCertificateId\"\n        ],\n        \"members\": {\n          \"clientCertificateId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"clientcertificate_id\"\n          }\n        }\n      }\n    },\n    \"DeleteDeployment\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/restapis/{restapi_id}/deployments/{deployment_id}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"deploymentId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"deploymentId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"deployment_id\"\n          }\n        }\n      }\n    },\n    \"DeleteDocumentationPart\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/restapis/{restapi_id}/documentation/parts/{part_id}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"documentationPartId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"documentationPartId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"part_id\"\n          }\n        }\n      }\n    },\n    \"DeleteDocumentationVersion\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/restapis/{restapi_id}/documentation/versions/{doc_version}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"documentationVersion\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"documentationVersion\": {\n            \"location\": \"uri\",\n            \"locationName\": \"doc_version\"\n          }\n        }\n      }\n    },\n    \"DeleteDomainName\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/domainnames/{domain_name}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"domainName\"\n        ],\n        \"members\": {\n          \"domainName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"domain_name\"\n          }\n        }\n      }\n    },\n    \"DeleteIntegration\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration\",\n        \"responseCode\": 204\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          }\n        }\n      }\n    },\n    \"DeleteIntegrationResponse\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}\",\n        \"responseCode\": 204\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\",\n          \"statusCode\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          },\n          \"statusCode\": {\n            \"location\": \"uri\",\n            \"locationName\": \"status_code\"\n          }\n        }\n      }\n    },\n    \"DeleteMethod\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}\",\n        \"responseCode\": 204\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          }\n        }\n      }\n    },\n    \"DeleteMethodResponse\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}\",\n        \"responseCode\": 204\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\",\n          \"statusCode\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          },\n          \"statusCode\": {\n            \"location\": \"uri\",\n            \"locationName\": \"status_code\"\n          }\n        }\n      }\n    },\n    \"DeleteModel\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/restapis/{restapi_id}/models/{model_name}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"modelName\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"modelName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"model_name\"\n          }\n        }\n      }\n    },\n    \"DeleteResource\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          }\n        }\n      }\n    },\n    \"DeleteRestApi\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/restapis/{restapi_id}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          }\n        }\n      }\n    },\n    \"DeleteStage\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/restapis/{restapi_id}/stages/{stage_name}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"stageName\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"stageName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"stage_name\"\n          }\n        }\n      }\n    },\n    \"DeleteUsagePlan\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/usageplans/{usageplanId}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"usagePlanId\"\n        ],\n        \"members\": {\n          \"usagePlanId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"usageplanId\"\n          }\n        }\n      }\n    },\n    \"DeleteUsagePlanKey\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/usageplans/{usageplanId}/keys/{keyId}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"usagePlanId\",\n          \"keyId\"\n        ],\n        \"members\": {\n          \"usagePlanId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"usageplanId\"\n          },\n          \"keyId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"keyId\"\n          }\n        }\n      }\n    },\n    \"FlushStageAuthorizersCache\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/restapis/{restapi_id}/stages/{stage_name}/cache/authorizers\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"stageName\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"stageName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"stage_name\"\n          }\n        }\n      }\n    },\n    \"FlushStageCache\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/restapis/{restapi_id}/stages/{stage_name}/cache/data\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"stageName\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"stageName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"stage_name\"\n          }\n        }\n      }\n    },\n    \"GenerateClientCertificate\": {\n      \"http\": {\n        \"requestUri\": \"/clientcertificates\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"description\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S2h\"\n      }\n    },\n    \"GetAccount\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/account\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"shape\": \"S2j\"\n      }\n    },\n    \"GetApiKey\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/apikeys/{api_Key}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"apiKey\"\n        ],\n        \"members\": {\n          \"apiKey\": {\n            \"location\": \"uri\",\n            \"locationName\": \"api_Key\"\n          },\n          \"includeValue\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"includeValue\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S6\"\n      }\n    },\n    \"GetApiKeys\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/apikeys\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          },\n          \"nameQuery\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"name\"\n          },\n          \"customerId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"customerId\"\n          },\n          \"includeValues\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"includeValues\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"warnings\": {\n            \"shape\": \"S8\"\n          },\n          \"position\": {},\n          \"items\": {\n            \"locationName\": \"item\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S6\"\n            }\n          }\n        }\n      }\n    },\n    \"GetAuthorizer\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/authorizers/{authorizer_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"authorizerId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"authorizerId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"authorizer_id\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Se\"\n      }\n    },\n    \"GetAuthorizers\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/authorizers\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {},\n          \"items\": {\n            \"locationName\": \"item\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Se\"\n            }\n          }\n        }\n      }\n    },\n    \"GetBasePathMapping\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/domainnames/{domain_name}/basepathmappings/{base_path}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"domainName\",\n          \"basePath\"\n        ],\n        \"members\": {\n          \"domainName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"domain_name\"\n          },\n          \"basePath\": {\n            \"location\": \"uri\",\n            \"locationName\": \"base_path\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sg\"\n      }\n    },\n    \"GetBasePathMappings\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/domainnames/{domain_name}/basepathmappings\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"domainName\"\n        ],\n        \"members\": {\n          \"domainName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"domain_name\"\n          },\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {},\n          \"items\": {\n            \"locationName\": \"item\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sg\"\n            }\n          }\n        }\n      }\n    },\n    \"GetClientCertificate\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/clientcertificates/{clientcertificate_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"clientCertificateId\"\n        ],\n        \"members\": {\n          \"clientCertificateId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"clientcertificate_id\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S2h\"\n      }\n    },\n    \"GetClientCertificates\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/clientcertificates\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {},\n          \"items\": {\n            \"locationName\": \"item\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S2h\"\n            }\n          }\n        }\n      }\n    },\n    \"GetDeployment\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/deployments/{deployment_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"deploymentId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"deploymentId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"deployment_id\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sl\"\n      }\n    },\n    \"GetDeployments\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/deployments\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {},\n          \"items\": {\n            \"locationName\": \"item\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sl\"\n            }\n          }\n        }\n      }\n    },\n    \"GetDocumentationPart\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/documentation/parts/{part_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"documentationPartId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"documentationPartId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"part_id\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"St\"\n      }\n    },\n    \"GetDocumentationParts\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/documentation/parts\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"type\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"type\"\n          },\n          \"nameQuery\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"name\"\n          },\n          \"path\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"path\"\n          },\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {},\n          \"items\": {\n            \"locationName\": \"item\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"St\"\n            }\n          }\n        }\n      }\n    },\n    \"GetDocumentationVersion\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/documentation/versions/{doc_version}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"documentationVersion\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"documentationVersion\": {\n            \"location\": \"uri\",\n            \"locationName\": \"doc_version\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sv\"\n      }\n    },\n    \"GetDocumentationVersions\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/documentation/versions\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {},\n          \"items\": {\n            \"locationName\": \"item\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sv\"\n            }\n          }\n        }\n      }\n    },\n    \"GetDomainName\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/domainnames/{domain_name}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"domainName\"\n        ],\n        \"members\": {\n          \"domainName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"domain_name\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sx\"\n      }\n    },\n    \"GetDomainNames\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/domainnames\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {},\n          \"items\": {\n            \"locationName\": \"item\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sx\"\n            }\n          }\n        }\n      }\n    },\n    \"GetExport\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/stages/{stage_name}/exports/{export_type}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"stageName\",\n          \"exportType\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"stageName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"stage_name\"\n          },\n          \"exportType\": {\n            \"location\": \"uri\",\n            \"locationName\": \"export_type\"\n          },\n          \"parameters\": {\n            \"shape\": \"Sk\",\n            \"location\": \"querystring\"\n          },\n          \"accepts\": {\n            \"location\": \"header\",\n            \"locationName\": \"Accept\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"contentType\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Type\"\n          },\n          \"contentDisposition\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Disposition\"\n          },\n          \"body\": {\n            \"type\": \"blob\"\n          }\n        },\n        \"payload\": \"body\"\n      }\n    },\n    \"GetIntegration\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S18\"\n      }\n    },\n    \"GetIntegrationResponse\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\",\n          \"statusCode\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          },\n          \"statusCode\": {\n            \"location\": \"uri\",\n            \"locationName\": \"status_code\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1c\"\n      }\n    },\n    \"GetMethod\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S13\"\n      }\n    },\n    \"GetMethodResponse\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\",\n          \"statusCode\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          },\n          \"statusCode\": {\n            \"location\": \"uri\",\n            \"locationName\": \"status_code\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S16\"\n      }\n    },\n    \"GetModel\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/models/{model_name}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"modelName\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"modelName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"model_name\"\n          },\n          \"flatten\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"flatten\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sz\"\n      }\n    },\n    \"GetModelTemplate\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/models/{model_name}/default_template\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"modelName\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"modelName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"model_name\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"value\": {}\n        }\n      }\n    },\n    \"GetModels\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/models\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {},\n          \"items\": {\n            \"locationName\": \"item\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sz\"\n            }\n          }\n        }\n      }\n    },\n    \"GetResource\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S11\"\n      }\n    },\n    \"GetResources\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {},\n          \"items\": {\n            \"locationName\": \"item\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S11\"\n            }\n          }\n        }\n      }\n    },\n    \"GetRestApi\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1e\"\n      }\n    },\n    \"GetRestApis\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {},\n          \"items\": {\n            \"locationName\": \"item\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1e\"\n            }\n          }\n        }\n      }\n    },\n    \"GetSdk\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/stages/{stage_name}/sdks/{sdk_type}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"stageName\",\n          \"sdkType\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"stageName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"stage_name\"\n          },\n          \"sdkType\": {\n            \"location\": \"uri\",\n            \"locationName\": \"sdk_type\"\n          },\n          \"parameters\": {\n            \"shape\": \"Sk\",\n            \"location\": \"querystring\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"contentType\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Type\"\n          },\n          \"contentDisposition\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Disposition\"\n          },\n          \"body\": {\n            \"type\": \"blob\"\n          }\n        },\n        \"payload\": \"body\"\n      }\n    },\n    \"GetSdkType\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/sdktypes/{sdktype_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"id\"\n        ],\n        \"members\": {\n          \"id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"sdktype_id\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S44\"\n      }\n    },\n    \"GetSdkTypes\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/sdktypes\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {},\n          \"items\": {\n            \"locationName\": \"item\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S44\"\n            }\n          }\n        }\n      }\n    },\n    \"GetStage\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/stages/{stage_name}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"stageName\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"stageName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"stage_name\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1g\"\n      }\n    },\n    \"GetStages\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/restapis/{restapi_id}/stages\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"deploymentId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"deploymentId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"item\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1g\"\n            }\n          }\n        }\n      }\n    },\n    \"GetUsage\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/usageplans/{usageplanId}/usage\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"usagePlanId\",\n          \"startDate\",\n          \"endDate\"\n        ],\n        \"members\": {\n          \"usagePlanId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"usageplanId\"\n          },\n          \"keyId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"keyId\"\n          },\n          \"startDate\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"startDate\"\n          },\n          \"endDate\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"endDate\"\n          },\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S4f\"\n      }\n    },\n    \"GetUsagePlan\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/usageplans/{usageplanId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"usagePlanId\"\n        ],\n        \"members\": {\n          \"usagePlanId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"usageplanId\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1t\"\n      }\n    },\n    \"GetUsagePlanKey\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/usageplans/{usageplanId}/keys/{keyId}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"usagePlanId\",\n          \"keyId\"\n        ],\n        \"members\": {\n          \"usagePlanId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"usageplanId\"\n          },\n          \"keyId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"keyId\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1v\"\n      }\n    },\n    \"GetUsagePlanKeys\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/usageplans/{usageplanId}/keys\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"usagePlanId\"\n        ],\n        \"members\": {\n          \"usagePlanId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"usageplanId\"\n          },\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          },\n          \"nameQuery\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"name\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {},\n          \"items\": {\n            \"locationName\": \"item\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1v\"\n            }\n          }\n        }\n      }\n    },\n    \"GetUsagePlans\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/usageplans\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"position\"\n          },\n          \"keyId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"keyId\"\n          },\n          \"limit\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"limit\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"position\": {},\n          \"items\": {\n            \"locationName\": \"item\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1t\"\n            }\n          }\n        }\n      }\n    },\n    \"ImportApiKeys\": {\n      \"http\": {\n        \"requestUri\": \"/apikeys?mode=import\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"body\",\n          \"format\"\n        ],\n        \"members\": {\n          \"body\": {\n            \"type\": \"blob\"\n          },\n          \"format\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"format\"\n          },\n          \"failOnWarnings\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"failonwarnings\",\n            \"type\": \"boolean\"\n          }\n        },\n        \"payload\": \"body\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ids\": {\n            \"shape\": \"S8\"\n          },\n          \"warnings\": {\n            \"shape\": \"S8\"\n          }\n        }\n      }\n    },\n    \"ImportDocumentationParts\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/restapis/{restapi_id}/documentation/parts\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"body\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"mode\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"mode\"\n          },\n          \"failOnWarnings\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"failonwarnings\",\n            \"type\": \"boolean\"\n          },\n          \"body\": {\n            \"type\": \"blob\"\n          }\n        },\n        \"payload\": \"body\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ids\": {\n            \"shape\": \"S8\"\n          },\n          \"warnings\": {\n            \"shape\": \"S8\"\n          }\n        }\n      }\n    },\n    \"ImportRestApi\": {\n      \"http\": {\n        \"requestUri\": \"/restapis?mode=import\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"body\"\n        ],\n        \"members\": {\n          \"failOnWarnings\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"failonwarnings\",\n            \"type\": \"boolean\"\n          },\n          \"parameters\": {\n            \"shape\": \"Sk\",\n            \"location\": \"querystring\"\n          },\n          \"body\": {\n            \"type\": \"blob\"\n          }\n        },\n        \"payload\": \"body\"\n      },\n      \"output\": {\n        \"shape\": \"S1e\"\n      }\n    },\n    \"PutIntegration\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\",\n          \"type\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          },\n          \"type\": {},\n          \"integrationHttpMethod\": {\n            \"locationName\": \"httpMethod\"\n          },\n          \"uri\": {},\n          \"credentials\": {},\n          \"requestParameters\": {\n            \"shape\": \"Sk\"\n          },\n          \"requestTemplates\": {\n            \"shape\": \"Sk\"\n          },\n          \"passthroughBehavior\": {},\n          \"cacheNamespace\": {},\n          \"cacheKeyParameters\": {\n            \"shape\": \"S8\"\n          },\n          \"contentHandling\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S18\"\n      }\n    },\n    \"PutIntegrationResponse\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\",\n          \"statusCode\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          },\n          \"statusCode\": {\n            \"location\": \"uri\",\n            \"locationName\": \"status_code\"\n          },\n          \"selectionPattern\": {},\n          \"responseParameters\": {\n            \"shape\": \"Sk\"\n          },\n          \"responseTemplates\": {\n            \"shape\": \"Sk\"\n          },\n          \"contentHandling\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1c\"\n      }\n    },\n    \"PutMethod\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\",\n          \"authorizationType\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          },\n          \"authorizationType\": {},\n          \"authorizerId\": {},\n          \"apiKeyRequired\": {\n            \"type\": \"boolean\"\n          },\n          \"operationName\": {},\n          \"requestParameters\": {\n            \"shape\": \"S14\"\n          },\n          \"requestModels\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S13\"\n      }\n    },\n    \"PutMethodResponse\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\",\n          \"statusCode\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          },\n          \"statusCode\": {\n            \"location\": \"uri\",\n            \"locationName\": \"status_code\"\n          },\n          \"responseParameters\": {\n            \"shape\": \"S14\"\n          },\n          \"responseModels\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S16\"\n      }\n    },\n    \"PutRestApi\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/restapis/{restapi_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"body\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"mode\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"mode\"\n          },\n          \"failOnWarnings\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"failonwarnings\",\n            \"type\": \"boolean\"\n          },\n          \"parameters\": {\n            \"shape\": \"Sk\",\n            \"location\": \"querystring\"\n          },\n          \"body\": {\n            \"type\": \"blob\"\n          }\n        },\n        \"payload\": \"body\"\n      },\n      \"output\": {\n        \"shape\": \"S1e\"\n      }\n    },\n    \"TestInvokeAuthorizer\": {\n      \"http\": {\n        \"requestUri\": \"/restapis/{restapi_id}/authorizers/{authorizer_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"authorizerId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"authorizerId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"authorizer_id\"\n          },\n          \"headers\": {\n            \"shape\": \"S55\"\n          },\n          \"pathWithQueryString\": {},\n          \"body\": {},\n          \"stageVariables\": {\n            \"shape\": \"Sk\"\n          },\n          \"additionalContext\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"clientStatus\": {\n            \"type\": \"integer\"\n          },\n          \"log\": {},\n          \"latency\": {\n            \"type\": \"long\"\n          },\n          \"principalId\": {},\n          \"policy\": {},\n          \"authorization\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"shape\": \"S8\"\n            }\n          },\n          \"claims\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      }\n    },\n    \"TestInvokeMethod\": {\n      \"http\": {\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          },\n          \"pathWithQueryString\": {},\n          \"body\": {},\n          \"headers\": {\n            \"shape\": \"S55\"\n          },\n          \"clientCertificateId\": {},\n          \"stageVariables\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"status\": {\n            \"type\": \"integer\"\n          },\n          \"body\": {},\n          \"headers\": {\n            \"shape\": \"S55\"\n          },\n          \"log\": {},\n          \"latency\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    },\n    \"UpdateAccount\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/account\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S2j\"\n      }\n    },\n    \"UpdateApiKey\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/apikeys/{api_Key}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"apiKey\"\n        ],\n        \"members\": {\n          \"apiKey\": {\n            \"location\": \"uri\",\n            \"locationName\": \"api_Key\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S6\"\n      }\n    },\n    \"UpdateAuthorizer\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/restapis/{restapi_id}/authorizers/{authorizer_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"authorizerId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"authorizerId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"authorizer_id\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Se\"\n      }\n    },\n    \"UpdateBasePathMapping\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/domainnames/{domain_name}/basepathmappings/{base_path}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"domainName\",\n          \"basePath\"\n        ],\n        \"members\": {\n          \"domainName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"domain_name\"\n          },\n          \"basePath\": {\n            \"location\": \"uri\",\n            \"locationName\": \"base_path\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sg\"\n      }\n    },\n    \"UpdateClientCertificate\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/clientcertificates/{clientcertificate_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"clientCertificateId\"\n        ],\n        \"members\": {\n          \"clientCertificateId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"clientcertificate_id\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S2h\"\n      }\n    },\n    \"UpdateDeployment\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/restapis/{restapi_id}/deployments/{deployment_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"deploymentId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"deploymentId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"deployment_id\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sl\"\n      }\n    },\n    \"UpdateDocumentationPart\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/restapis/{restapi_id}/documentation/parts/{part_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"documentationPartId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"documentationPartId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"part_id\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"St\"\n      }\n    },\n    \"UpdateDocumentationVersion\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/restapis/{restapi_id}/documentation/versions/{doc_version}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"documentationVersion\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"documentationVersion\": {\n            \"location\": \"uri\",\n            \"locationName\": \"doc_version\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sv\"\n      }\n    },\n    \"UpdateDomainName\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/domainnames/{domain_name}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"domainName\"\n        ],\n        \"members\": {\n          \"domainName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"domain_name\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sx\"\n      }\n    },\n    \"UpdateIntegration\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S18\"\n      }\n    },\n    \"UpdateIntegrationResponse\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\",\n          \"statusCode\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          },\n          \"statusCode\": {\n            \"location\": \"uri\",\n            \"locationName\": \"status_code\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1c\"\n      }\n    },\n    \"UpdateMethod\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S13\"\n      }\n    },\n    \"UpdateMethodResponse\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\",\n          \"httpMethod\",\n          \"statusCode\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"httpMethod\": {\n            \"location\": \"uri\",\n            \"locationName\": \"http_method\"\n          },\n          \"statusCode\": {\n            \"location\": \"uri\",\n            \"locationName\": \"status_code\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S16\"\n      }\n    },\n    \"UpdateModel\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/restapis/{restapi_id}/models/{model_name}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"modelName\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"modelName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"model_name\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sz\"\n      }\n    },\n    \"UpdateResource\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/restapis/{restapi_id}/resources/{resource_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"resourceId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"resourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"resource_id\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S11\"\n      }\n    },\n    \"UpdateRestApi\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/restapis/{restapi_id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1e\"\n      }\n    },\n    \"UpdateStage\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/restapis/{restapi_id}/stages/{stage_name}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"restApiId\",\n          \"stageName\"\n        ],\n        \"members\": {\n          \"restApiId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"restapi_id\"\n          },\n          \"stageName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"stage_name\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1g\"\n      }\n    },\n    \"UpdateUsage\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/usageplans/{usageplanId}/keys/{keyId}/usage\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"usagePlanId\",\n          \"keyId\"\n        ],\n        \"members\": {\n          \"usagePlanId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"usageplanId\"\n          },\n          \"keyId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"keyId\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S4f\"\n      }\n    },\n    \"UpdateUsagePlan\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/usageplans/{usageplanId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"usagePlanId\"\n        ],\n        \"members\": {\n          \"usagePlanId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"usageplanId\"\n          },\n          \"patchOperations\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1t\"\n      }\n    }\n  },\n  \"shapes\": {\n    \"S6\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"id\": {},\n        \"value\": {},\n        \"name\": {},\n        \"customerId\": {},\n        \"description\": {},\n        \"enabled\": {\n          \"type\": \"boolean\"\n        },\n        \"createdDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"lastUpdatedDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"stageKeys\": {\n          \"shape\": \"S8\"\n        }\n      }\n    },\n    \"S8\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sb\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Se\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"id\": {},\n        \"name\": {},\n        \"type\": {},\n        \"providerARNs\": {\n          \"shape\": \"Sb\"\n        },\n        \"authType\": {},\n        \"authorizerUri\": {},\n        \"authorizerCredentials\": {},\n        \"identitySource\": {},\n        \"identityValidationExpression\": {},\n        \"authorizerResultTtlInSeconds\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"Sg\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"basePath\": {},\n        \"restApiId\": {},\n        \"stage\": {}\n      }\n    },\n    \"Sk\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"Sl\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"id\": {},\n        \"description\": {},\n        \"createdDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"apiSummary\": {\n          \"type\": \"map\",\n          \"key\": {},\n          \"value\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"authorizationType\": {},\n                \"apiKeyRequired\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"Sq\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"type\"\n      ],\n      \"members\": {\n        \"type\": {},\n        \"path\": {},\n        \"method\": {},\n        \"statusCode\": {},\n        \"name\": {}\n      }\n    },\n    \"St\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"id\": {},\n        \"location\": {\n          \"shape\": \"Sq\"\n        },\n        \"properties\": {}\n      }\n    },\n    \"Sv\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"version\": {},\n        \"createdDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"description\": {}\n      }\n    },\n    \"Sx\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"domainName\": {},\n        \"certificateName\": {},\n        \"certificateUploadDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"distributionDomainName\": {}\n      }\n    },\n    \"Sz\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"id\": {},\n        \"name\": {},\n        \"description\": {},\n        \"schema\": {},\n        \"contentType\": {}\n      }\n    },\n    \"S11\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"id\": {},\n        \"parentId\": {},\n        \"pathPart\": {},\n        \"path\": {},\n        \"resourceMethods\": {\n          \"type\": \"map\",\n          \"key\": {},\n          \"value\": {\n            \"shape\": \"S13\"\n          }\n        }\n      }\n    },\n    \"S13\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"httpMethod\": {},\n        \"authorizationType\": {},\n        \"authorizerId\": {},\n        \"apiKeyRequired\": {\n          \"type\": \"boolean\"\n        },\n        \"operationName\": {},\n        \"requestParameters\": {\n          \"shape\": \"S14\"\n        },\n        \"requestModels\": {\n          \"shape\": \"Sk\"\n        },\n        \"methodResponses\": {\n          \"type\": \"map\",\n          \"key\": {},\n          \"value\": {\n            \"shape\": \"S16\"\n          }\n        },\n        \"methodIntegration\": {\n          \"shape\": \"S18\"\n        }\n      }\n    },\n    \"S14\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"type\": \"boolean\"\n      }\n    },\n    \"S16\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"statusCode\": {},\n        \"responseParameters\": {\n          \"shape\": \"S14\"\n        },\n        \"responseModels\": {\n          \"shape\": \"Sk\"\n        }\n      }\n    },\n    \"S18\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"type\": {},\n        \"httpMethod\": {},\n        \"uri\": {},\n        \"credentials\": {},\n        \"requestParameters\": {\n          \"shape\": \"Sk\"\n        },\n        \"requestTemplates\": {\n          \"shape\": \"Sk\"\n        },\n        \"passthroughBehavior\": {},\n        \"contentHandling\": {},\n        \"cacheNamespace\": {},\n        \"cacheKeyParameters\": {\n          \"shape\": \"S8\"\n        },\n        \"integrationResponses\": {\n          \"type\": \"map\",\n          \"key\": {},\n          \"value\": {\n            \"shape\": \"S1c\"\n          }\n        }\n      }\n    },\n    \"S1c\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"statusCode\": {},\n        \"selectionPattern\": {},\n        \"responseParameters\": {\n          \"shape\": \"Sk\"\n        },\n        \"responseTemplates\": {\n          \"shape\": \"Sk\"\n        },\n        \"contentHandling\": {}\n      }\n    },\n    \"S1e\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"id\": {},\n        \"name\": {},\n        \"description\": {},\n        \"createdDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"version\": {},\n        \"warnings\": {\n          \"shape\": \"S8\"\n        },\n        \"binaryMediaTypes\": {\n          \"shape\": \"S8\"\n        }\n      }\n    },\n    \"S1g\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"deploymentId\": {},\n        \"clientCertificateId\": {},\n        \"stageName\": {},\n        \"description\": {},\n        \"cacheClusterEnabled\": {\n          \"type\": \"boolean\"\n        },\n        \"cacheClusterSize\": {},\n        \"cacheClusterStatus\": {},\n        \"methodSettings\": {\n          \"type\": \"map\",\n          \"key\": {},\n          \"value\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"metricsEnabled\": {\n                \"type\": \"boolean\"\n              },\n              \"loggingLevel\": {},\n              \"dataTraceEnabled\": {\n                \"type\": \"boolean\"\n              },\n              \"throttlingBurstLimit\": {\n                \"type\": \"integer\"\n              },\n              \"throttlingRateLimit\": {\n                \"type\": \"double\"\n              },\n              \"cachingEnabled\": {\n                \"type\": \"boolean\"\n              },\n              \"cacheTtlInSeconds\": {\n                \"type\": \"integer\"\n              },\n              \"cacheDataEncrypted\": {\n                \"type\": \"boolean\"\n              },\n              \"requireAuthorizationForCacheControl\": {\n                \"type\": \"boolean\"\n              },\n              \"unauthorizedCacheControlHeaderStrategy\": {}\n            }\n          }\n        },\n        \"variables\": {\n          \"shape\": \"Sk\"\n        },\n        \"documentationVersion\": {},\n        \"createdDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"lastUpdatedDate\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S1o\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"apiId\": {},\n          \"stage\": {}\n        }\n      }\n    },\n    \"S1q\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"burstLimit\": {\n          \"type\": \"integer\"\n        },\n        \"rateLimit\": {\n          \"type\": \"double\"\n        }\n      }\n    },\n    \"S1r\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"limit\": {\n          \"type\": \"integer\"\n        },\n        \"offset\": {\n          \"type\": \"integer\"\n        },\n        \"period\": {}\n      }\n    },\n    \"S1t\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"id\": {},\n        \"name\": {},\n        \"description\": {},\n        \"apiStages\": {\n          \"shape\": \"S1o\"\n        },\n        \"throttle\": {\n          \"shape\": \"S1q\"\n        },\n        \"quota\": {\n          \"shape\": \"S1r\"\n        },\n        \"productCode\": {}\n      }\n    },\n    \"S1v\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"id\": {},\n        \"type\": {},\n        \"value\": {},\n        \"name\": {}\n      }\n    },\n    \"S2h\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"clientCertificateId\": {},\n        \"description\": {},\n        \"pemEncodedCertificate\": {},\n        \"createdDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"expirationDate\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S2j\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"cloudwatchRoleArn\": {},\n        \"throttleSettings\": {\n          \"shape\": \"S1q\"\n        },\n        \"features\": {\n          \"shape\": \"S8\"\n        },\n        \"apiKeyVersion\": {}\n      }\n    },\n    \"S44\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"id\": {},\n        \"friendlyName\": {},\n        \"description\": {},\n        \"configurationProperties\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"name\": {},\n              \"friendlyName\": {},\n              \"description\": {},\n              \"required\": {\n                \"type\": \"boolean\"\n              },\n              \"defaultValue\": {}\n            }\n          }\n        }\n      }\n    },\n    \"S4f\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"usagePlanId\": {},\n        \"startDate\": {},\n        \"endDate\": {},\n        \"position\": {},\n        \"items\": {\n          \"locationName\": \"values\",\n          \"type\": \"map\",\n          \"key\": {},\n          \"value\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"list\",\n              \"member\": {\n                \"type\": \"long\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S55\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S5b\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"op\": {},\n          \"path\": {},\n          \"value\": {},\n          \"from\": {}\n        }\n      }\n    }\n  }\n}\n},{}],4:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"GetApiKeys\": {\n      \"input_token\": \"position\",\n      \"output_token\": \"position\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"items\"\n    },\n    \"GetBasePathMappings\": {\n      \"input_token\": \"position\",\n      \"output_token\": \"position\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"items\"\n    },\n    \"GetClientCertificates\": {\n      \"input_token\": \"position\",\n      \"output_token\": \"position\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"items\"\n    },\n    \"GetDeployments\": {\n      \"input_token\": \"position\",\n      \"output_token\": \"position\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"items\"\n    },\n    \"GetDomainNames\": {\n      \"input_token\": \"position\",\n      \"output_token\": \"position\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"items\"\n    },\n    \"GetModels\": {\n      \"input_token\": \"position\",\n      \"output_token\": \"position\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"items\"\n    },\n    \"GetResources\": {\n      \"input_token\": \"position\",\n      \"output_token\": \"position\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"items\"\n    },\n    \"GetRestApis\": {\n      \"input_token\": \"position\",\n      \"output_token\": \"position\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"items\"\n    },\n    \"GetUsage\": {\n      \"input_token\": \"position\",\n      \"output_token\": \"position\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"items\"\n    },\n    \"GetUsagePlans\": {\n      \"input_token\": \"position\",\n      \"output_token\": \"position\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"items\"\n    },\n    \"GetUsagePlanKeys\": {\n      \"input_token\": \"position\",\n      \"output_token\": \"position\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"items\"\n    }\n  }\n}\n\n},{}],5:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2016-02-06\",\n    \"endpointPrefix\": \"autoscaling\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"Application Auto Scaling\",\n    \"signatureVersion\": \"v4\",\n    \"signingName\": \"application-autoscaling\",\n    \"targetPrefix\": \"AnyScaleFrontendService\",\n    \"uid\": \"application-autoscaling-2016-02-06\"\n  },\n  \"operations\": {\n    \"DeleteScalingPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PolicyName\",\n          \"ServiceNamespace\",\n          \"ResourceId\",\n          \"ScalableDimension\"\n        ],\n        \"members\": {\n          \"PolicyName\": {},\n          \"ServiceNamespace\": {},\n          \"ResourceId\": {},\n          \"ScalableDimension\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeregisterScalableTarget\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ServiceNamespace\",\n          \"ResourceId\",\n          \"ScalableDimension\"\n        ],\n        \"members\": {\n          \"ServiceNamespace\": {},\n          \"ResourceId\": {},\n          \"ScalableDimension\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DescribeScalableTargets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ServiceNamespace\"\n        ],\n        \"members\": {\n          \"ServiceNamespace\": {},\n          \"ResourceIds\": {\n            \"shape\": \"S9\"\n          },\n          \"ScalableDimension\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ScalableTargets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"ServiceNamespace\",\n                \"ResourceId\",\n                \"ScalableDimension\",\n                \"MinCapacity\",\n                \"MaxCapacity\",\n                \"RoleARN\",\n                \"CreationTime\"\n              ],\n              \"members\": {\n                \"ServiceNamespace\": {},\n                \"ResourceId\": {},\n                \"ScalableDimension\": {},\n                \"MinCapacity\": {\n                  \"type\": \"integer\"\n                },\n                \"MaxCapacity\": {\n                  \"type\": \"integer\"\n                },\n                \"RoleARN\": {},\n                \"CreationTime\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeScalingActivities\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ServiceNamespace\"\n        ],\n        \"members\": {\n          \"ServiceNamespace\": {},\n          \"ResourceId\": {},\n          \"ScalableDimension\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ScalingActivities\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"ActivityId\",\n                \"ServiceNamespace\",\n                \"ResourceId\",\n                \"ScalableDimension\",\n                \"Description\",\n                \"Cause\",\n                \"StartTime\",\n                \"StatusCode\"\n              ],\n              \"members\": {\n                \"ActivityId\": {},\n                \"ServiceNamespace\": {},\n                \"ResourceId\": {},\n                \"ScalableDimension\": {},\n                \"Description\": {},\n                \"Cause\": {},\n                \"StartTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"EndTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"StatusCode\": {},\n                \"StatusMessage\": {},\n                \"Details\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeScalingPolicies\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ServiceNamespace\"\n        ],\n        \"members\": {\n          \"PolicyNames\": {\n            \"shape\": \"S9\"\n          },\n          \"ServiceNamespace\": {},\n          \"ResourceId\": {},\n          \"ScalableDimension\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ScalingPolicies\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"PolicyARN\",\n                \"PolicyName\",\n                \"ServiceNamespace\",\n                \"ResourceId\",\n                \"ScalableDimension\",\n                \"PolicyType\",\n                \"CreationTime\"\n              ],\n              \"members\": {\n                \"PolicyARN\": {},\n                \"PolicyName\": {},\n                \"ServiceNamespace\": {},\n                \"ResourceId\": {},\n                \"ScalableDimension\": {},\n                \"PolicyType\": {},\n                \"StepScalingPolicyConfiguration\": {\n                  \"shape\": \"St\"\n                },\n                \"Alarms\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"required\": [\n                      \"AlarmName\",\n                      \"AlarmARN\"\n                    ],\n                    \"members\": {\n                      \"AlarmName\": {},\n                      \"AlarmARN\": {}\n                    }\n                  }\n                },\n                \"CreationTime\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"PutScalingPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PolicyName\",\n          \"ServiceNamespace\",\n          \"ResourceId\",\n          \"ScalableDimension\"\n        ],\n        \"members\": {\n          \"PolicyName\": {},\n          \"ServiceNamespace\": {},\n          \"ResourceId\": {},\n          \"ScalableDimension\": {},\n          \"PolicyType\": {},\n          \"StepScalingPolicyConfiguration\": {\n            \"shape\": \"St\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PolicyARN\"\n        ],\n        \"members\": {\n          \"PolicyARN\": {}\n        }\n      }\n    },\n    \"RegisterScalableTarget\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ServiceNamespace\",\n          \"ResourceId\",\n          \"ScalableDimension\"\n        ],\n        \"members\": {\n          \"ServiceNamespace\": {},\n          \"ResourceId\": {},\n          \"ScalableDimension\": {},\n          \"MinCapacity\": {\n            \"type\": \"integer\"\n          },\n          \"MaxCapacity\": {\n            \"type\": \"integer\"\n          },\n          \"RoleARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    }\n  },\n  \"shapes\": {\n    \"S9\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"St\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AdjustmentType\": {},\n        \"StepAdjustments\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"ScalingAdjustment\"\n            ],\n            \"members\": {\n              \"MetricIntervalLowerBound\": {\n                \"type\": \"double\"\n              },\n              \"MetricIntervalUpperBound\": {\n                \"type\": \"double\"\n              },\n              \"ScalingAdjustment\": {\n                \"type\": \"integer\"\n              }\n            }\n          }\n        },\n        \"MinAdjustmentMagnitude\": {\n          \"type\": \"integer\"\n        },\n        \"Cooldown\": {\n          \"type\": \"integer\"\n        },\n        \"MetricAggregationType\": {}\n      }\n    }\n  }\n}\n},{}],6:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeScalableTargets\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"result_key\": \"ScalableTargets\"\n    },\n    \"DescribeScalingPolicies\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"result_key\": \"ScalingPolicies\"\n    },\n    \"DescribeScalingActivities\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"result_key\": \"ScalingActivities\"\n    }\n  }\n}\n\n},{}],7:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2011-01-01\",\n    \"endpointPrefix\": \"autoscaling\",\n    \"protocol\": \"query\",\n    \"serviceFullName\": \"Auto Scaling\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"autoscaling-2011-01-01\",\n    \"xmlNamespace\": \"http://autoscaling.amazonaws.com/doc/2011-01-01/\"\n  },\n  \"operations\": {\n    \"AttachInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\"\n        ],\n        \"members\": {\n          \"InstanceIds\": {\n            \"shape\": \"S2\"\n          },\n          \"AutoScalingGroupName\": {}\n        }\n      }\n    },\n    \"AttachLoadBalancerTargetGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\",\n          \"TargetGroupARNs\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"TargetGroupARNs\": {\n            \"shape\": \"S6\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AttachLoadBalancerTargetGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"AttachLoadBalancers\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\",\n          \"LoadBalancerNames\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"LoadBalancerNames\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AttachLoadBalancersResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CompleteLifecycleAction\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LifecycleHookName\",\n          \"AutoScalingGroupName\",\n          \"LifecycleActionResult\"\n        ],\n        \"members\": {\n          \"LifecycleHookName\": {},\n          \"AutoScalingGroupName\": {},\n          \"LifecycleActionToken\": {},\n          \"LifecycleActionResult\": {},\n          \"InstanceId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CompleteLifecycleActionResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateAutoScalingGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\",\n          \"MinSize\",\n          \"MaxSize\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"LaunchConfigurationName\": {},\n          \"InstanceId\": {},\n          \"MinSize\": {\n            \"type\": \"integer\"\n          },\n          \"MaxSize\": {\n            \"type\": \"integer\"\n          },\n          \"DesiredCapacity\": {\n            \"type\": \"integer\"\n          },\n          \"DefaultCooldown\": {\n            \"type\": \"integer\"\n          },\n          \"AvailabilityZones\": {\n            \"shape\": \"Sn\"\n          },\n          \"LoadBalancerNames\": {\n            \"shape\": \"Sa\"\n          },\n          \"TargetGroupARNs\": {\n            \"shape\": \"S6\"\n          },\n          \"HealthCheckType\": {},\n          \"HealthCheckGracePeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PlacementGroup\": {},\n          \"VPCZoneIdentifier\": {},\n          \"TerminationPolicies\": {\n            \"shape\": \"Sr\"\n          },\n          \"NewInstancesProtectedFromScaleIn\": {\n            \"type\": \"boolean\"\n          },\n          \"Tags\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"CreateLaunchConfiguration\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LaunchConfigurationName\"\n        ],\n        \"members\": {\n          \"LaunchConfigurationName\": {},\n          \"ImageId\": {},\n          \"KeyName\": {},\n          \"SecurityGroups\": {\n            \"shape\": \"S11\"\n          },\n          \"ClassicLinkVPCId\": {},\n          \"ClassicLinkVPCSecurityGroups\": {\n            \"shape\": \"S12\"\n          },\n          \"UserData\": {},\n          \"InstanceId\": {},\n          \"InstanceType\": {},\n          \"KernelId\": {},\n          \"RamdiskId\": {},\n          \"BlockDeviceMappings\": {\n            \"shape\": \"S14\"\n          },\n          \"InstanceMonitoring\": {\n            \"shape\": \"S1d\"\n          },\n          \"SpotPrice\": {},\n          \"IamInstanceProfile\": {},\n          \"EbsOptimized\": {\n            \"type\": \"boolean\"\n          },\n          \"AssociatePublicIpAddress\": {\n            \"type\": \"boolean\"\n          },\n          \"PlacementTenancy\": {}\n        }\n      }\n    },\n    \"CreateOrUpdateTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Tags\"\n        ],\n        \"members\": {\n          \"Tags\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"DeleteAutoScalingGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"ForceDelete\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"DeleteLaunchConfiguration\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LaunchConfigurationName\"\n        ],\n        \"members\": {\n          \"LaunchConfigurationName\": {}\n        }\n      }\n    },\n    \"DeleteLifecycleHook\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LifecycleHookName\",\n          \"AutoScalingGroupName\"\n        ],\n        \"members\": {\n          \"LifecycleHookName\": {},\n          \"AutoScalingGroupName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteLifecycleHookResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteNotificationConfiguration\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\",\n          \"TopicARN\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"TopicARN\": {}\n        }\n      }\n    },\n    \"DeletePolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PolicyName\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"PolicyName\": {}\n        }\n      }\n    },\n    \"DeleteScheduledAction\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\",\n          \"ScheduledActionName\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"ScheduledActionName\": {}\n        }\n      }\n    },\n    \"DeleteTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Tags\"\n        ],\n        \"members\": {\n          \"Tags\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"DescribeAccountLimits\": {\n      \"output\": {\n        \"resultWrapper\": \"DescribeAccountLimitsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"MaxNumberOfAutoScalingGroups\": {\n            \"type\": \"integer\"\n          },\n          \"MaxNumberOfLaunchConfigurations\": {\n            \"type\": \"integer\"\n          },\n          \"NumberOfAutoScalingGroups\": {\n            \"type\": \"integer\"\n          },\n          \"NumberOfLaunchConfigurations\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"DescribeAdjustmentTypes\": {\n      \"output\": {\n        \"resultWrapper\": \"DescribeAdjustmentTypesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"AdjustmentTypes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"AdjustmentType\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeAutoScalingGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AutoScalingGroupNames\": {\n            \"shape\": \"S22\"\n          },\n          \"NextToken\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeAutoScalingGroupsResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroups\"\n        ],\n        \"members\": {\n          \"AutoScalingGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"AutoScalingGroupName\",\n                \"MinSize\",\n                \"MaxSize\",\n                \"DesiredCapacity\",\n                \"DefaultCooldown\",\n                \"AvailabilityZones\",\n                \"HealthCheckType\",\n                \"CreatedTime\"\n              ],\n              \"members\": {\n                \"AutoScalingGroupName\": {},\n                \"AutoScalingGroupARN\": {},\n                \"LaunchConfigurationName\": {},\n                \"MinSize\": {\n                  \"type\": \"integer\"\n                },\n                \"MaxSize\": {\n                  \"type\": \"integer\"\n                },\n                \"DesiredCapacity\": {\n                  \"type\": \"integer\"\n                },\n                \"DefaultCooldown\": {\n                  \"type\": \"integer\"\n                },\n                \"AvailabilityZones\": {\n                  \"shape\": \"Sn\"\n                },\n                \"LoadBalancerNames\": {\n                  \"shape\": \"Sa\"\n                },\n                \"TargetGroupARNs\": {\n                  \"shape\": \"S6\"\n                },\n                \"HealthCheckType\": {},\n                \"HealthCheckGracePeriod\": {\n                  \"type\": \"integer\"\n                },\n                \"Instances\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"required\": [\n                      \"InstanceId\",\n                      \"AvailabilityZone\",\n                      \"LifecycleState\",\n                      \"HealthStatus\",\n                      \"LaunchConfigurationName\",\n                      \"ProtectedFromScaleIn\"\n                    ],\n                    \"members\": {\n                      \"InstanceId\": {},\n                      \"AvailabilityZone\": {},\n                      \"LifecycleState\": {},\n                      \"HealthStatus\": {},\n                      \"LaunchConfigurationName\": {},\n                      \"ProtectedFromScaleIn\": {\n                        \"type\": \"boolean\"\n                      }\n                    }\n                  }\n                },\n                \"CreatedTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"SuspendedProcesses\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"ProcessName\": {},\n                      \"SuspensionReason\": {}\n                    }\n                  }\n                },\n                \"PlacementGroup\": {},\n                \"VPCZoneIdentifier\": {},\n                \"EnabledMetrics\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"Metric\": {},\n                      \"Granularity\": {}\n                    }\n                  }\n                },\n                \"Status\": {},\n                \"Tags\": {\n                  \"shape\": \"S2f\"\n                },\n                \"TerminationPolicies\": {\n                  \"shape\": \"Sr\"\n                },\n                \"NewInstancesProtectedFromScaleIn\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeAutoScalingInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceIds\": {\n            \"shape\": \"S2\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeAutoScalingInstancesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"AutoScalingInstances\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"InstanceId\",\n                \"AutoScalingGroupName\",\n                \"AvailabilityZone\",\n                \"LifecycleState\",\n                \"HealthStatus\",\n                \"LaunchConfigurationName\",\n                \"ProtectedFromScaleIn\"\n              ],\n              \"members\": {\n                \"InstanceId\": {},\n                \"AutoScalingGroupName\": {},\n                \"AvailabilityZone\": {},\n                \"LifecycleState\": {},\n                \"HealthStatus\": {},\n                \"LaunchConfigurationName\": {},\n                \"ProtectedFromScaleIn\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeAutoScalingNotificationTypes\": {\n      \"output\": {\n        \"resultWrapper\": \"DescribeAutoScalingNotificationTypesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"AutoScalingNotificationTypes\": {\n            \"shape\": \"S2m\"\n          }\n        }\n      }\n    },\n    \"DescribeLaunchConfigurations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LaunchConfigurationNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"NextToken\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeLaunchConfigurationsResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"LaunchConfigurations\"\n        ],\n        \"members\": {\n          \"LaunchConfigurations\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"LaunchConfigurationName\",\n                \"ImageId\",\n                \"InstanceType\",\n                \"CreatedTime\"\n              ],\n              \"members\": {\n                \"LaunchConfigurationName\": {},\n                \"LaunchConfigurationARN\": {},\n                \"ImageId\": {},\n                \"KeyName\": {},\n                \"SecurityGroups\": {\n                  \"shape\": \"S11\"\n                },\n                \"ClassicLinkVPCId\": {},\n                \"ClassicLinkVPCSecurityGroups\": {\n                  \"shape\": \"S12\"\n                },\n                \"UserData\": {},\n                \"InstanceType\": {},\n                \"KernelId\": {},\n                \"RamdiskId\": {},\n                \"BlockDeviceMappings\": {\n                  \"shape\": \"S14\"\n                },\n                \"InstanceMonitoring\": {\n                  \"shape\": \"S1d\"\n                },\n                \"SpotPrice\": {},\n                \"IamInstanceProfile\": {},\n                \"CreatedTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"EbsOptimized\": {\n                  \"type\": \"boolean\"\n                },\n                \"AssociatePublicIpAddress\": {\n                  \"type\": \"boolean\"\n                },\n                \"PlacementTenancy\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeLifecycleHookTypes\": {\n      \"output\": {\n        \"resultWrapper\": \"DescribeLifecycleHookTypesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"LifecycleHookTypes\": {\n            \"shape\": \"S2m\"\n          }\n        }\n      }\n    },\n    \"DescribeLifecycleHooks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"LifecycleHookNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeLifecycleHooksResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"LifecycleHooks\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"LifecycleHookName\": {},\n                \"AutoScalingGroupName\": {},\n                \"LifecycleTransition\": {},\n                \"NotificationTargetARN\": {},\n                \"RoleARN\": {},\n                \"NotificationMetadata\": {},\n                \"HeartbeatTimeout\": {\n                  \"type\": \"integer\"\n                },\n                \"GlobalTimeout\": {\n                  \"type\": \"integer\"\n                },\n                \"DefaultResult\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeLoadBalancerTargetGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"NextToken\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeLoadBalancerTargetGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoadBalancerTargetGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"LoadBalancerTargetGroupARN\": {},\n                \"State\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeLoadBalancers\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"NextToken\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeLoadBalancersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoadBalancers\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"LoadBalancerName\": {},\n                \"State\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeMetricCollectionTypes\": {\n      \"output\": {\n        \"resultWrapper\": \"DescribeMetricCollectionTypesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Metrics\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Metric\": {}\n              }\n            }\n          },\n          \"Granularities\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Granularity\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeNotificationConfigurations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AutoScalingGroupNames\": {\n            \"shape\": \"S22\"\n          },\n          \"NextToken\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeNotificationConfigurationsResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"NotificationConfigurations\"\n        ],\n        \"members\": {\n          \"NotificationConfigurations\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"AutoScalingGroupName\": {},\n                \"TopicARN\": {},\n                \"NotificationType\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribePolicies\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"PolicyNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"PolicyTypes\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"NextToken\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribePoliciesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ScalingPolicies\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"AutoScalingGroupName\": {},\n                \"PolicyName\": {},\n                \"PolicyARN\": {},\n                \"PolicyType\": {},\n                \"AdjustmentType\": {},\n                \"MinAdjustmentStep\": {\n                  \"shape\": \"S3p\"\n                },\n                \"MinAdjustmentMagnitude\": {\n                  \"type\": \"integer\"\n                },\n                \"ScalingAdjustment\": {\n                  \"type\": \"integer\"\n                },\n                \"Cooldown\": {\n                  \"type\": \"integer\"\n                },\n                \"StepAdjustments\": {\n                  \"shape\": \"S3s\"\n                },\n                \"MetricAggregationType\": {},\n                \"EstimatedInstanceWarmup\": {\n                  \"type\": \"integer\"\n                },\n                \"Alarms\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"AlarmName\": {},\n                      \"AlarmARN\": {}\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeScalingActivities\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ActivityIds\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"AutoScalingGroupName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeScalingActivitiesResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"Activities\"\n        ],\n        \"members\": {\n          \"Activities\": {\n            \"shape\": \"S41\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeScalingProcessTypes\": {\n      \"output\": {\n        \"resultWrapper\": \"DescribeScalingProcessTypesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Processes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"ProcessName\"\n              ],\n              \"members\": {\n                \"ProcessName\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeScheduledActions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"ScheduledActionNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"NextToken\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeScheduledActionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ScheduledUpdateGroupActions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"AutoScalingGroupName\": {},\n                \"ScheduledActionName\": {},\n                \"ScheduledActionARN\": {},\n                \"Time\": {\n                  \"type\": \"timestamp\"\n                },\n                \"StartTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"EndTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Recurrence\": {},\n                \"MinSize\": {\n                  \"type\": \"integer\"\n                },\n                \"MaxSize\": {\n                  \"type\": \"integer\"\n                },\n                \"DesiredCapacity\": {\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Filters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Values\": {\n                  \"type\": \"list\",\n                  \"member\": {}\n                }\n              }\n            }\n          },\n          \"NextToken\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeTagsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Tags\": {\n            \"shape\": \"S2f\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeTerminationPolicyTypes\": {\n      \"output\": {\n        \"resultWrapper\": \"DescribeTerminationPolicyTypesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TerminationPolicyTypes\": {\n            \"shape\": \"Sr\"\n          }\n        }\n      }\n    },\n    \"DetachInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\",\n          \"ShouldDecrementDesiredCapacity\"\n        ],\n        \"members\": {\n          \"InstanceIds\": {\n            \"shape\": \"S2\"\n          },\n          \"AutoScalingGroupName\": {},\n          \"ShouldDecrementDesiredCapacity\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DetachInstancesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Activities\": {\n            \"shape\": \"S41\"\n          }\n        }\n      }\n    },\n    \"DetachLoadBalancerTargetGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\",\n          \"TargetGroupARNs\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"TargetGroupARNs\": {\n            \"shape\": \"S6\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DetachLoadBalancerTargetGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DetachLoadBalancers\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\",\n          \"LoadBalancerNames\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"LoadBalancerNames\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DetachLoadBalancersResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DisableMetricsCollection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"Metrics\": {\n            \"shape\": \"S4r\"\n          }\n        }\n      }\n    },\n    \"EnableMetricsCollection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\",\n          \"Granularity\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"Metrics\": {\n            \"shape\": \"S4r\"\n          },\n          \"Granularity\": {}\n        }\n      }\n    },\n    \"EnterStandby\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\",\n          \"ShouldDecrementDesiredCapacity\"\n        ],\n        \"members\": {\n          \"InstanceIds\": {\n            \"shape\": \"S2\"\n          },\n          \"AutoScalingGroupName\": {},\n          \"ShouldDecrementDesiredCapacity\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"EnterStandbyResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Activities\": {\n            \"shape\": \"S41\"\n          }\n        }\n      }\n    },\n    \"ExecutePolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PolicyName\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"PolicyName\": {},\n          \"HonorCooldown\": {\n            \"type\": \"boolean\"\n          },\n          \"MetricValue\": {\n            \"type\": \"double\"\n          },\n          \"BreachThreshold\": {\n            \"type\": \"double\"\n          }\n        }\n      }\n    },\n    \"ExitStandby\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\"\n        ],\n        \"members\": {\n          \"InstanceIds\": {\n            \"shape\": \"S2\"\n          },\n          \"AutoScalingGroupName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ExitStandbyResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Activities\": {\n            \"shape\": \"S41\"\n          }\n        }\n      }\n    },\n    \"PutLifecycleHook\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LifecycleHookName\",\n          \"AutoScalingGroupName\"\n        ],\n        \"members\": {\n          \"LifecycleHookName\": {},\n          \"AutoScalingGroupName\": {},\n          \"LifecycleTransition\": {},\n          \"RoleARN\": {},\n          \"NotificationTargetARN\": {},\n          \"NotificationMetadata\": {},\n          \"HeartbeatTimeout\": {\n            \"type\": \"integer\"\n          },\n          \"DefaultResult\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PutLifecycleHookResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"PutNotificationConfiguration\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\",\n          \"TopicARN\",\n          \"NotificationTypes\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"TopicARN\": {},\n          \"NotificationTypes\": {\n            \"shape\": \"S2m\"\n          }\n        }\n      }\n    },\n    \"PutScalingPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\",\n          \"PolicyName\",\n          \"AdjustmentType\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"PolicyName\": {},\n          \"PolicyType\": {},\n          \"AdjustmentType\": {},\n          \"MinAdjustmentStep\": {\n            \"shape\": \"S3p\"\n          },\n          \"MinAdjustmentMagnitude\": {\n            \"type\": \"integer\"\n          },\n          \"ScalingAdjustment\": {\n            \"type\": \"integer\"\n          },\n          \"Cooldown\": {\n            \"type\": \"integer\"\n          },\n          \"MetricAggregationType\": {},\n          \"StepAdjustments\": {\n            \"shape\": \"S3s\"\n          },\n          \"EstimatedInstanceWarmup\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PutScalingPolicyResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"PolicyARN\": {}\n        }\n      }\n    },\n    \"PutScheduledUpdateGroupAction\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\",\n          \"ScheduledActionName\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"ScheduledActionName\": {},\n          \"Time\": {\n            \"type\": \"timestamp\"\n          },\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"Recurrence\": {},\n          \"MinSize\": {\n            \"type\": \"integer\"\n          },\n          \"MaxSize\": {\n            \"type\": \"integer\"\n          },\n          \"DesiredCapacity\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"RecordLifecycleActionHeartbeat\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LifecycleHookName\",\n          \"AutoScalingGroupName\"\n        ],\n        \"members\": {\n          \"LifecycleHookName\": {},\n          \"AutoScalingGroupName\": {},\n          \"LifecycleActionToken\": {},\n          \"InstanceId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RecordLifecycleActionHeartbeatResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"ResumeProcesses\": {\n      \"input\": {\n        \"shape\": \"S58\"\n      }\n    },\n    \"SetDesiredCapacity\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\",\n          \"DesiredCapacity\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"DesiredCapacity\": {\n            \"type\": \"integer\"\n          },\n          \"HonorCooldown\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"SetInstanceHealth\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\",\n          \"HealthStatus\"\n        ],\n        \"members\": {\n          \"InstanceId\": {},\n          \"HealthStatus\": {},\n          \"ShouldRespectGracePeriod\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"SetInstanceProtection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceIds\",\n          \"AutoScalingGroupName\",\n          \"ProtectedFromScaleIn\"\n        ],\n        \"members\": {\n          \"InstanceIds\": {\n            \"shape\": \"S2\"\n          },\n          \"AutoScalingGroupName\": {},\n          \"ProtectedFromScaleIn\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetInstanceProtectionResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SuspendProcesses\": {\n      \"input\": {\n        \"shape\": \"S58\"\n      }\n    },\n    \"TerminateInstanceInAutoScalingGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\",\n          \"ShouldDecrementDesiredCapacity\"\n        ],\n        \"members\": {\n          \"InstanceId\": {},\n          \"ShouldDecrementDesiredCapacity\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"TerminateInstanceInAutoScalingGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Activity\": {\n            \"shape\": \"S42\"\n          }\n        }\n      }\n    },\n    \"UpdateAutoScalingGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutoScalingGroupName\"\n        ],\n        \"members\": {\n          \"AutoScalingGroupName\": {},\n          \"LaunchConfigurationName\": {},\n          \"MinSize\": {\n            \"type\": \"integer\"\n          },\n          \"MaxSize\": {\n            \"type\": \"integer\"\n          },\n          \"DesiredCapacity\": {\n            \"type\": \"integer\"\n          },\n          \"DefaultCooldown\": {\n            \"type\": \"integer\"\n          },\n          \"AvailabilityZones\": {\n            \"shape\": \"Sn\"\n          },\n          \"HealthCheckType\": {},\n          \"HealthCheckGracePeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PlacementGroup\": {},\n          \"VPCZoneIdentifier\": {},\n          \"TerminationPolicies\": {\n            \"shape\": \"Sr\"\n          },\n          \"NewInstancesProtectedFromScaleIn\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S2\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S6\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sa\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sn\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sr\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Su\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Key\"\n        ],\n        \"members\": {\n          \"ResourceId\": {},\n          \"ResourceType\": {},\n          \"Key\": {},\n          \"Value\": {},\n          \"PropagateAtLaunch\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"S11\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S12\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S14\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DeviceName\"\n        ],\n        \"members\": {\n          \"VirtualName\": {},\n          \"DeviceName\": {},\n          \"Ebs\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"SnapshotId\": {},\n              \"VolumeSize\": {\n                \"type\": \"integer\"\n              },\n              \"VolumeType\": {},\n              \"DeleteOnTermination\": {\n                \"type\": \"boolean\"\n              },\n              \"Iops\": {\n                \"type\": \"integer\"\n              },\n              \"Encrypted\": {\n                \"type\": \"boolean\"\n              }\n            }\n          },\n          \"NoDevice\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"S1d\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S22\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S2f\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourceId\": {},\n          \"ResourceType\": {},\n          \"Key\": {},\n          \"Value\": {},\n          \"PropagateAtLaunch\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"S2m\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S3p\": {\n      \"type\": \"integer\",\n      \"deprecated\": true\n    },\n    \"S3s\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ScalingAdjustment\"\n        ],\n        \"members\": {\n          \"MetricIntervalLowerBound\": {\n            \"type\": \"double\"\n          },\n          \"MetricIntervalUpperBound\": {\n            \"type\": \"double\"\n          },\n          \"ScalingAdjustment\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"S41\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S42\"\n      }\n    },\n    \"S42\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"ActivityId\",\n        \"AutoScalingGroupName\",\n        \"Cause\",\n        \"StartTime\",\n        \"StatusCode\"\n      ],\n      \"members\": {\n        \"ActivityId\": {},\n        \"AutoScalingGroupName\": {},\n        \"Description\": {},\n        \"Cause\": {},\n        \"StartTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"EndTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"StatusCode\": {},\n        \"StatusMessage\": {},\n        \"Progress\": {\n          \"type\": \"integer\"\n        },\n        \"Details\": {}\n      }\n    },\n    \"S4r\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S58\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"AutoScalingGroupName\"\n      ],\n      \"members\": {\n        \"AutoScalingGroupName\": {},\n        \"ScalingProcesses\": {\n          \"type\": \"list\",\n          \"member\": {}\n        }\n      }\n    }\n  }\n}\n},{}],8:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeAutoScalingGroups\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"AutoScalingGroups\"\n    },\n    \"DescribeAutoScalingInstances\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"AutoScalingInstances\"\n    },\n    \"DescribeLaunchConfigurations\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"LaunchConfigurations\"\n    },\n    \"DescribeNotificationConfigurations\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"NotificationConfigurations\"\n    },\n    \"DescribePolicies\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"ScalingPolicies\"\n    },\n    \"DescribeScalingActivities\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"Activities\"\n    },\n    \"DescribeScheduledActions\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"ScheduledUpdateGroupActions\"\n    },\n    \"DescribeTags\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"Tags\"\n    }\n  }\n}\n\n},{}],9:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2010-05-15\",\n    \"endpointPrefix\": \"cloudformation\",\n    \"protocol\": \"query\",\n    \"serviceFullName\": \"AWS CloudFormation\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"cloudformation-2010-05-15\",\n    \"xmlNamespace\": \"http://cloudformation.amazonaws.com/doc/2010-05-15/\"\n  },\n  \"operations\": {\n    \"CancelUpdateStack\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackName\"\n        ],\n        \"members\": {\n          \"StackName\": {}\n        }\n      }\n    },\n    \"ContinueUpdateRollback\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackName\"\n        ],\n        \"members\": {\n          \"StackName\": {},\n          \"RoleARN\": {},\n          \"ResourcesToSkip\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ContinueUpdateRollbackResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateChangeSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackName\",\n          \"ChangeSetName\"\n        ],\n        \"members\": {\n          \"StackName\": {},\n          \"TemplateBody\": {},\n          \"TemplateURL\": {},\n          \"UsePreviousTemplate\": {\n            \"type\": \"boolean\"\n          },\n          \"Parameters\": {\n            \"shape\": \"Sd\"\n          },\n          \"Capabilities\": {\n            \"shape\": \"Si\"\n          },\n          \"ResourceTypes\": {\n            \"shape\": \"Sk\"\n          },\n          \"RoleARN\": {},\n          \"NotificationARNs\": {\n            \"shape\": \"Sm\"\n          },\n          \"Tags\": {\n            \"shape\": \"So\"\n          },\n          \"ChangeSetName\": {},\n          \"ClientToken\": {},\n          \"Description\": {},\n          \"ChangeSetType\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateChangeSetResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Id\": {},\n          \"StackId\": {}\n        }\n      }\n    },\n    \"CreateStack\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackName\"\n        ],\n        \"members\": {\n          \"StackName\": {},\n          \"TemplateBody\": {},\n          \"TemplateURL\": {},\n          \"Parameters\": {\n            \"shape\": \"Sd\"\n          },\n          \"DisableRollback\": {\n            \"type\": \"boolean\"\n          },\n          \"TimeoutInMinutes\": {\n            \"type\": \"integer\"\n          },\n          \"NotificationARNs\": {\n            \"shape\": \"Sm\"\n          },\n          \"Capabilities\": {\n            \"shape\": \"Si\"\n          },\n          \"ResourceTypes\": {\n            \"shape\": \"Sk\"\n          },\n          \"RoleARN\": {},\n          \"OnFailure\": {},\n          \"StackPolicyBody\": {},\n          \"StackPolicyURL\": {},\n          \"Tags\": {\n            \"shape\": \"So\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateStackResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackId\": {}\n        }\n      }\n    },\n    \"DeleteChangeSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ChangeSetName\"\n        ],\n        \"members\": {\n          \"ChangeSetName\": {},\n          \"StackName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteChangeSetResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteStack\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackName\"\n        ],\n        \"members\": {\n          \"StackName\": {},\n          \"RetainResources\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"RoleARN\": {}\n        }\n      }\n    },\n    \"DescribeAccountLimits\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeAccountLimitsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"AccountLimits\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Value\": {\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeChangeSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ChangeSetName\"\n        ],\n        \"members\": {\n          \"ChangeSetName\": {},\n          \"StackName\": {},\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeChangeSetResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeSetName\": {},\n          \"ChangeSetId\": {},\n          \"StackId\": {},\n          \"StackName\": {},\n          \"Description\": {},\n          \"Parameters\": {\n            \"shape\": \"Sd\"\n          },\n          \"CreationTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"ExecutionStatus\": {},\n          \"Status\": {},\n          \"StatusReason\": {},\n          \"NotificationARNs\": {\n            \"shape\": \"Sm\"\n          },\n          \"Capabilities\": {\n            \"shape\": \"Si\"\n          },\n          \"Tags\": {\n            \"shape\": \"So\"\n          },\n          \"Changes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Type\": {},\n                \"ResourceChange\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"Action\": {},\n                    \"LogicalResourceId\": {},\n                    \"PhysicalResourceId\": {},\n                    \"ResourceType\": {},\n                    \"Replacement\": {},\n                    \"Scope\": {\n                      \"type\": \"list\",\n                      \"member\": {}\n                    },\n                    \"Details\": {\n                      \"type\": \"list\",\n                      \"member\": {\n                        \"type\": \"structure\",\n                        \"members\": {\n                          \"Target\": {\n                            \"type\": \"structure\",\n                            \"members\": {\n                              \"Attribute\": {},\n                              \"Name\": {},\n                              \"RequiresRecreation\": {}\n                            }\n                          },\n                          \"Evaluation\": {},\n                          \"ChangeSource\": {},\n                          \"CausingEntity\": {}\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeStackEvents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackName\": {},\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeStackEventsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackEvents\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"StackId\",\n                \"EventId\",\n                \"StackName\",\n                \"Timestamp\"\n              ],\n              \"members\": {\n                \"StackId\": {},\n                \"EventId\": {},\n                \"StackName\": {},\n                \"LogicalResourceId\": {},\n                \"PhysicalResourceId\": {},\n                \"ResourceType\": {},\n                \"Timestamp\": {\n                  \"type\": \"timestamp\"\n                },\n                \"ResourceStatus\": {},\n                \"ResourceStatusReason\": {},\n                \"ResourceProperties\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeStackResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackName\",\n          \"LogicalResourceId\"\n        ],\n        \"members\": {\n          \"StackName\": {},\n          \"LogicalResourceId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeStackResourceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackResourceDetail\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"LogicalResourceId\",\n              \"ResourceType\",\n              \"LastUpdatedTimestamp\",\n              \"ResourceStatus\"\n            ],\n            \"members\": {\n              \"StackName\": {},\n              \"StackId\": {},\n              \"LogicalResourceId\": {},\n              \"PhysicalResourceId\": {},\n              \"ResourceType\": {},\n              \"LastUpdatedTimestamp\": {\n                \"type\": \"timestamp\"\n              },\n              \"ResourceStatus\": {},\n              \"ResourceStatusReason\": {},\n              \"Description\": {},\n              \"Metadata\": {}\n            }\n          }\n        }\n      }\n    },\n    \"DescribeStackResources\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackName\": {},\n          \"LogicalResourceId\": {},\n          \"PhysicalResourceId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeStackResourcesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackResources\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"LogicalResourceId\",\n                \"ResourceType\",\n                \"Timestamp\",\n                \"ResourceStatus\"\n              ],\n              \"members\": {\n                \"StackName\": {},\n                \"StackId\": {},\n                \"LogicalResourceId\": {},\n                \"PhysicalResourceId\": {},\n                \"ResourceType\": {},\n                \"Timestamp\": {\n                  \"type\": \"timestamp\"\n                },\n                \"ResourceStatus\": {},\n                \"ResourceStatusReason\": {},\n                \"Description\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeStacks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackName\": {},\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeStacksResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Stacks\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"StackName\",\n                \"CreationTime\",\n                \"StackStatus\"\n              ],\n              \"members\": {\n                \"StackId\": {},\n                \"StackName\": {},\n                \"ChangeSetId\": {},\n                \"Description\": {},\n                \"Parameters\": {\n                  \"shape\": \"Sd\"\n                },\n                \"CreationTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"LastUpdatedTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"StackStatus\": {},\n                \"StackStatusReason\": {},\n                \"DisableRollback\": {\n                  \"type\": \"boolean\"\n                },\n                \"NotificationARNs\": {\n                  \"shape\": \"Sm\"\n                },\n                \"TimeoutInMinutes\": {\n                  \"type\": \"integer\"\n                },\n                \"Capabilities\": {\n                  \"shape\": \"Si\"\n                },\n                \"Outputs\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"OutputKey\": {},\n                      \"OutputValue\": {},\n                      \"Description\": {}\n                    }\n                  }\n                },\n                \"RoleARN\": {},\n                \"Tags\": {\n                  \"shape\": \"So\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"EstimateTemplateCost\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TemplateBody\": {},\n          \"TemplateURL\": {},\n          \"Parameters\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"EstimateTemplateCostResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Url\": {}\n        }\n      }\n    },\n    \"ExecuteChangeSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ChangeSetName\"\n        ],\n        \"members\": {\n          \"ChangeSetName\": {},\n          \"StackName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ExecuteChangeSetResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"GetStackPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackName\"\n        ],\n        \"members\": {\n          \"StackName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetStackPolicyResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackPolicyBody\": {}\n        }\n      }\n    },\n    \"GetTemplate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackName\": {},\n          \"ChangeSetName\": {},\n          \"TemplateStage\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetTemplateResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TemplateBody\": {},\n          \"StagesAvailable\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"GetTemplateSummary\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TemplateBody\": {},\n          \"TemplateURL\": {},\n          \"StackName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetTemplateSummaryResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Parameters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ParameterKey\": {},\n                \"DefaultValue\": {},\n                \"ParameterType\": {},\n                \"NoEcho\": {\n                  \"type\": \"boolean\"\n                },\n                \"Description\": {},\n                \"ParameterConstraints\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"AllowedValues\": {\n                      \"type\": \"list\",\n                      \"member\": {}\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"Description\": {},\n          \"Capabilities\": {\n            \"shape\": \"Si\"\n          },\n          \"CapabilitiesReason\": {},\n          \"ResourceTypes\": {\n            \"shape\": \"Sk\"\n          },\n          \"Version\": {},\n          \"Metadata\": {},\n          \"DeclaredTransforms\": {\n            \"shape\": \"S3k\"\n          }\n        }\n      }\n    },\n    \"ListChangeSets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackName\"\n        ],\n        \"members\": {\n          \"StackName\": {},\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListChangeSetsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Summaries\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"StackId\": {},\n                \"StackName\": {},\n                \"ChangeSetId\": {},\n                \"ChangeSetName\": {},\n                \"ExecutionStatus\": {},\n                \"Status\": {},\n                \"StatusReason\": {},\n                \"CreationTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Description\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListExports\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListExportsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Exports\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ExportingStackId\": {},\n                \"Name\": {},\n                \"Value\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListImports\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ExportName\"\n        ],\n        \"members\": {\n          \"ExportName\": {},\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListImportsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Imports\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListStackResources\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackName\"\n        ],\n        \"members\": {\n          \"StackName\": {},\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListStackResourcesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackResourceSummaries\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"LogicalResourceId\",\n                \"ResourceType\",\n                \"LastUpdatedTimestamp\",\n                \"ResourceStatus\"\n              ],\n              \"members\": {\n                \"LogicalResourceId\": {},\n                \"PhysicalResourceId\": {},\n                \"ResourceType\": {},\n                \"LastUpdatedTimestamp\": {\n                  \"type\": \"timestamp\"\n                },\n                \"ResourceStatus\": {},\n                \"ResourceStatusReason\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListStacks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {},\n          \"StackStatusFilter\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListStacksResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackSummaries\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"StackName\",\n                \"CreationTime\",\n                \"StackStatus\"\n              ],\n              \"members\": {\n                \"StackId\": {},\n                \"StackName\": {},\n                \"TemplateDescription\": {},\n                \"CreationTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"LastUpdatedTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"DeletionTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"StackStatus\": {},\n                \"StackStatusReason\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"SetStackPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackName\"\n        ],\n        \"members\": {\n          \"StackName\": {},\n          \"StackPolicyBody\": {},\n          \"StackPolicyURL\": {}\n        }\n      }\n    },\n    \"SignalResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackName\",\n          \"LogicalResourceId\",\n          \"UniqueId\",\n          \"Status\"\n        ],\n        \"members\": {\n          \"StackName\": {},\n          \"LogicalResourceId\": {},\n          \"UniqueId\": {},\n          \"Status\": {}\n        }\n      }\n    },\n    \"UpdateStack\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackName\"\n        ],\n        \"members\": {\n          \"StackName\": {},\n          \"TemplateBody\": {},\n          \"TemplateURL\": {},\n          \"UsePreviousTemplate\": {\n            \"type\": \"boolean\"\n          },\n          \"StackPolicyDuringUpdateBody\": {},\n          \"StackPolicyDuringUpdateURL\": {},\n          \"Parameters\": {\n            \"shape\": \"Sd\"\n          },\n          \"Capabilities\": {\n            \"shape\": \"Si\"\n          },\n          \"ResourceTypes\": {\n            \"shape\": \"Sk\"\n          },\n          \"RoleARN\": {},\n          \"StackPolicyBody\": {},\n          \"StackPolicyURL\": {},\n          \"NotificationARNs\": {\n            \"shape\": \"Sm\"\n          },\n          \"Tags\": {\n            \"shape\": \"So\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"UpdateStackResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackId\": {}\n        }\n      }\n    },\n    \"ValidateTemplate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TemplateBody\": {},\n          \"TemplateURL\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ValidateTemplateResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Parameters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ParameterKey\": {},\n                \"DefaultValue\": {},\n                \"NoEcho\": {\n                  \"type\": \"boolean\"\n                },\n                \"Description\": {}\n              }\n            }\n          },\n          \"Description\": {},\n          \"Capabilities\": {\n            \"shape\": \"Si\"\n          },\n          \"CapabilitiesReason\": {},\n          \"DeclaredTransforms\": {\n            \"shape\": \"S3k\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"Sd\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ParameterKey\": {},\n          \"ParameterValue\": {},\n          \"UsePreviousValue\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"Si\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sk\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sm\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"So\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"S3k\": {\n      \"type\": \"list\",\n      \"member\": {}\n    }\n  }\n}\n},{}],10:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeStackEvents\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"StackEvents\"\n    },\n    \"DescribeStackResources\": {\n      \"result_key\": \"StackResources\"\n    },\n    \"DescribeStacks\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"Stacks\"\n    },\n    \"ListStackResources\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"StackResourceSummaries\"\n    },\n    \"ListStacks\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"StackSummaries\"\n    }\n  }\n}\n\n},{}],11:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"StackExists\": {\n      \"delay\": 5,\n      \"operation\": \"DescribeStacks\",\n      \"maxAttempts\": 20,\n      \"acceptors\": [\n        {\n          \"matcher\": \"status\",\n          \"expected\": 200,\n          \"state\": \"success\"\n        },\n        {\n          \"matcher\": \"error\",\n          \"expected\": \"ValidationError\",\n          \"state\": \"retry\"\n        }\n      ]\n    },\n    \"StackCreateComplete\": {\n      \"delay\": 30,\n      \"operation\": \"DescribeStacks\",\n      \"maxAttempts\": 120,\n      \"description\": \"Wait until stack status is CREATE_COMPLETE.\",\n      \"acceptors\": [\n        {\n          \"argument\": \"Stacks[].StackStatus\",\n          \"expected\": \"CREATE_COMPLETE\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\"\n        },\n        {\n          \"argument\": \"Stacks[].StackStatus\",\n          \"expected\": \"CREATE_FAILED\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\"\n        },\n        {\n          \"argument\": \"Stacks[].StackStatus\",\n          \"expected\": \"DELETE_COMPLETE\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\"\n        },\n        {\n          \"argument\": \"Stacks[].StackStatus\",\n          \"expected\": \"DELETE_FAILED\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\"\n        },\n        {\n          \"argument\": \"Stacks[].StackStatus\",\n          \"expected\": \"ROLLBACK_FAILED\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\"\n        },\n        {\n          \"argument\": \"Stacks[].StackStatus\",\n          \"expected\": \"ROLLBACK_COMPLETE\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\"\n        },\n        {\n          \"expected\": \"ValidationError\",\n          \"matcher\": \"error\",\n          \"state\": \"failure\"\n        }\n      ]\n    },\n    \"StackDeleteComplete\": {\n      \"delay\": 30,\n      \"operation\": \"DescribeStacks\",\n      \"maxAttempts\": 120,\n      \"description\": \"Wait until stack status is DELETE_COMPLETE.\",\n      \"acceptors\": [\n        {\n          \"argument\": \"Stacks[].StackStatus\",\n          \"expected\": \"DELETE_COMPLETE\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\"\n        },\n        {\n          \"expected\": \"ValidationError\",\n          \"matcher\": \"error\",\n          \"state\": \"success\"\n        },\n        {\n          \"argument\": \"Stacks[].StackStatus\",\n          \"expected\": \"DELETE_FAILED\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\"\n        },\n        {\n          \"argument\": \"Stacks[].StackStatus\",\n          \"expected\": \"CREATE_FAILED\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\"\n        },\n        {\n          \"argument\": \"Stacks[].StackStatus\",\n          \"expected\": \"ROLLBACK_FAILED\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\"\n        },\n        {\n          \"argument\": \"Stacks[].StackStatus\",\n          \"expected\": \"UPDATE_ROLLBACK_FAILED\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\"\n        },\n        {\n          \"argument\": \"Stacks[].StackStatus\",\n          \"expected\": \"UPDATE_ROLLBACK_IN_PROGRESS\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\"\n        }\n      ]\n    },\n    \"StackUpdateComplete\": {\n      \"delay\": 30,\n      \"maxAttempts\": 120,\n      \"operation\": \"DescribeStacks\",\n      \"description\": \"Wait until stack status is UPDATE_COMPLETE.\",\n      \"acceptors\": [\n        {\n          \"argument\": \"Stacks[].StackStatus\",\n          \"expected\": \"UPDATE_COMPLETE\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\"\n        },\n        {\n          \"expected\": \"UPDATE_FAILED\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Stacks[].StackStatus\"\n        },\n        {\n          \"argument\": \"Stacks[].StackStatus\",\n          \"expected\": \"UPDATE_ROLLBACK_FAILED\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\"\n        },\n        {\n          \"expected\": \"UPDATE_ROLLBACK_COMPLETE\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Stacks[].StackStatus\"\n        },\n        {\n          \"expected\": \"ValidationError\",\n          \"matcher\": \"error\",\n          \"state\": \"failure\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],12:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2016-11-25\",\n    \"endpointPrefix\": \"cloudfront\",\n    \"globalEndpoint\": \"cloudfront.amazonaws.com\",\n    \"protocol\": \"rest-xml\",\n    \"serviceAbbreviation\": \"CloudFront\",\n    \"serviceFullName\": \"Amazon CloudFront\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"cloudfront-2016-11-25\"\n  },\n  \"operations\": {\n    \"CreateCloudFrontOriginAccessIdentity\": {\n      \"http\": {\n        \"requestUri\": \"/2016-11-25/origin-access-identity/cloudfront\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CloudFrontOriginAccessIdentityConfig\"\n        ],\n        \"members\": {\n          \"CloudFrontOriginAccessIdentityConfig\": {\n            \"shape\": \"S2\",\n            \"locationName\": \"CloudFrontOriginAccessIdentityConfig\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://cloudfront.amazonaws.com/doc/2016-11-25/\"\n            }\n          }\n        },\n        \"payload\": \"CloudFrontOriginAccessIdentityConfig\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CloudFrontOriginAccessIdentity\": {\n            \"shape\": \"S5\"\n          },\n          \"Location\": {\n            \"location\": \"header\",\n            \"locationName\": \"Location\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          }\n        },\n        \"payload\": \"CloudFrontOriginAccessIdentity\"\n      }\n    },\n    \"CreateDistribution\": {\n      \"http\": {\n        \"requestUri\": \"/2016-11-25/distribution\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DistributionConfig\"\n        ],\n        \"members\": {\n          \"DistributionConfig\": {\n            \"shape\": \"S7\",\n            \"locationName\": \"DistributionConfig\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://cloudfront.amazonaws.com/doc/2016-11-25/\"\n            }\n          }\n        },\n        \"payload\": \"DistributionConfig\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Distribution\": {\n            \"shape\": \"S1s\"\n          },\n          \"Location\": {\n            \"location\": \"header\",\n            \"locationName\": \"Location\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          }\n        },\n        \"payload\": \"Distribution\"\n      }\n    },\n    \"CreateDistributionWithTags\": {\n      \"http\": {\n        \"requestUri\": \"/2016-11-25/distribution?WithTags\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DistributionConfigWithTags\"\n        ],\n        \"members\": {\n          \"DistributionConfigWithTags\": {\n            \"locationName\": \"DistributionConfigWithTags\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://cloudfront.amazonaws.com/doc/2016-11-25/\"\n            },\n            \"type\": \"structure\",\n            \"required\": [\n              \"DistributionConfig\",\n              \"Tags\"\n            ],\n            \"members\": {\n              \"DistributionConfig\": {\n                \"shape\": \"S7\"\n              },\n              \"Tags\": {\n                \"shape\": \"S21\"\n              }\n            }\n          }\n        },\n        \"payload\": \"DistributionConfigWithTags\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Distribution\": {\n            \"shape\": \"S1s\"\n          },\n          \"Location\": {\n            \"location\": \"header\",\n            \"locationName\": \"Location\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          }\n        },\n        \"payload\": \"Distribution\"\n      }\n    },\n    \"CreateInvalidation\": {\n      \"http\": {\n        \"requestUri\": \"/2016-11-25/distribution/{DistributionId}/invalidation\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DistributionId\",\n          \"InvalidationBatch\"\n        ],\n        \"members\": {\n          \"DistributionId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"DistributionId\"\n          },\n          \"InvalidationBatch\": {\n            \"shape\": \"S28\",\n            \"locationName\": \"InvalidationBatch\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://cloudfront.amazonaws.com/doc/2016-11-25/\"\n            }\n          }\n        },\n        \"payload\": \"InvalidationBatch\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Location\": {\n            \"location\": \"header\",\n            \"locationName\": \"Location\"\n          },\n          \"Invalidation\": {\n            \"shape\": \"S2c\"\n          }\n        },\n        \"payload\": \"Invalidation\"\n      }\n    },\n    \"CreateStreamingDistribution\": {\n      \"http\": {\n        \"requestUri\": \"/2016-11-25/streaming-distribution\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamingDistributionConfig\"\n        ],\n        \"members\": {\n          \"StreamingDistributionConfig\": {\n            \"shape\": \"S2e\",\n            \"locationName\": \"StreamingDistributionConfig\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://cloudfront.amazonaws.com/doc/2016-11-25/\"\n            }\n          }\n        },\n        \"payload\": \"StreamingDistributionConfig\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StreamingDistribution\": {\n            \"shape\": \"S2i\"\n          },\n          \"Location\": {\n            \"location\": \"header\",\n            \"locationName\": \"Location\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          }\n        },\n        \"payload\": \"StreamingDistribution\"\n      }\n    },\n    \"CreateStreamingDistributionWithTags\": {\n      \"http\": {\n        \"requestUri\": \"/2016-11-25/streaming-distribution?WithTags\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamingDistributionConfigWithTags\"\n        ],\n        \"members\": {\n          \"StreamingDistributionConfigWithTags\": {\n            \"locationName\": \"StreamingDistributionConfigWithTags\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://cloudfront.amazonaws.com/doc/2016-11-25/\"\n            },\n            \"type\": \"structure\",\n            \"required\": [\n              \"StreamingDistributionConfig\",\n              \"Tags\"\n            ],\n            \"members\": {\n              \"StreamingDistributionConfig\": {\n                \"shape\": \"S2e\"\n              },\n              \"Tags\": {\n                \"shape\": \"S21\"\n              }\n            }\n          }\n        },\n        \"payload\": \"StreamingDistributionConfigWithTags\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StreamingDistribution\": {\n            \"shape\": \"S2i\"\n          },\n          \"Location\": {\n            \"location\": \"header\",\n            \"locationName\": \"Location\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          }\n        },\n        \"payload\": \"StreamingDistribution\"\n      }\n    },\n    \"DeleteCloudFrontOriginAccessIdentity\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2016-11-25/origin-access-identity/cloudfront/{Id}\",\n        \"responseCode\": 204\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"IfMatch\": {\n            \"location\": \"header\",\n            \"locationName\": \"If-Match\"\n          }\n        }\n      }\n    },\n    \"DeleteDistribution\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2016-11-25/distribution/{Id}\",\n        \"responseCode\": 204\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"IfMatch\": {\n            \"location\": \"header\",\n            \"locationName\": \"If-Match\"\n          }\n        }\n      }\n    },\n    \"DeleteStreamingDistribution\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2016-11-25/streaming-distribution/{Id}\",\n        \"responseCode\": 204\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"IfMatch\": {\n            \"location\": \"header\",\n            \"locationName\": \"If-Match\"\n          }\n        }\n      }\n    },\n    \"GetCloudFrontOriginAccessIdentity\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2016-11-25/origin-access-identity/cloudfront/{Id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CloudFrontOriginAccessIdentity\": {\n            \"shape\": \"S5\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          }\n        },\n        \"payload\": \"CloudFrontOriginAccessIdentity\"\n      }\n    },\n    \"GetCloudFrontOriginAccessIdentityConfig\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2016-11-25/origin-access-identity/cloudfront/{Id}/config\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CloudFrontOriginAccessIdentityConfig\": {\n            \"shape\": \"S2\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          }\n        },\n        \"payload\": \"CloudFrontOriginAccessIdentityConfig\"\n      }\n    },\n    \"GetDistribution\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2016-11-25/distribution/{Id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Distribution\": {\n            \"shape\": \"S1s\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          }\n        },\n        \"payload\": \"Distribution\"\n      }\n    },\n    \"GetDistributionConfig\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2016-11-25/distribution/{Id}/config\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DistributionConfig\": {\n            \"shape\": \"S7\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          }\n        },\n        \"payload\": \"DistributionConfig\"\n      }\n    },\n    \"GetInvalidation\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2016-11-25/distribution/{DistributionId}/invalidation/{Id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DistributionId\",\n          \"Id\"\n        ],\n        \"members\": {\n          \"DistributionId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"DistributionId\"\n          },\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Invalidation\": {\n            \"shape\": \"S2c\"\n          }\n        },\n        \"payload\": \"Invalidation\"\n      }\n    },\n    \"GetStreamingDistribution\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2016-11-25/streaming-distribution/{Id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StreamingDistribution\": {\n            \"shape\": \"S2i\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          }\n        },\n        \"payload\": \"StreamingDistribution\"\n      }\n    },\n    \"GetStreamingDistributionConfig\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2016-11-25/streaming-distribution/{Id}/config\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StreamingDistributionConfig\": {\n            \"shape\": \"S2e\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          }\n        },\n        \"payload\": \"StreamingDistributionConfig\"\n      }\n    },\n    \"ListCloudFrontOriginAccessIdentities\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2016-11-25/origin-access-identity/cloudfront\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Marker\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"MaxItems\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CloudFrontOriginAccessIdentityList\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"Marker\",\n              \"MaxItems\",\n              \"IsTruncated\",\n              \"Quantity\"\n            ],\n            \"members\": {\n              \"Marker\": {},\n              \"NextMarker\": {},\n              \"MaxItems\": {\n                \"type\": \"integer\"\n              },\n              \"IsTruncated\": {\n                \"type\": \"boolean\"\n              },\n              \"Quantity\": {\n                \"type\": \"integer\"\n              },\n              \"Items\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"locationName\": \"CloudFrontOriginAccessIdentitySummary\",\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"Id\",\n                    \"S3CanonicalUserId\",\n                    \"Comment\"\n                  ],\n                  \"members\": {\n                    \"Id\": {},\n                    \"S3CanonicalUserId\": {},\n                    \"Comment\": {}\n                  }\n                }\n              }\n            }\n          }\n        },\n        \"payload\": \"CloudFrontOriginAccessIdentityList\"\n      }\n    },\n    \"ListDistributions\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2016-11-25/distribution\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Marker\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"MaxItems\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DistributionList\": {\n            \"shape\": \"S3a\"\n          }\n        },\n        \"payload\": \"DistributionList\"\n      }\n    },\n    \"ListDistributionsByWebACLId\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2016-11-25/distributionsByWebACLId/{WebACLId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WebACLId\"\n        ],\n        \"members\": {\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Marker\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"MaxItems\"\n          },\n          \"WebACLId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"WebACLId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DistributionList\": {\n            \"shape\": \"S3a\"\n          }\n        },\n        \"payload\": \"DistributionList\"\n      }\n    },\n    \"ListInvalidations\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2016-11-25/distribution/{DistributionId}/invalidation\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DistributionId\"\n        ],\n        \"members\": {\n          \"DistributionId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"DistributionId\"\n          },\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Marker\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"MaxItems\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InvalidationList\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"Marker\",\n              \"MaxItems\",\n              \"IsTruncated\",\n              \"Quantity\"\n            ],\n            \"members\": {\n              \"Marker\": {},\n              \"NextMarker\": {},\n              \"MaxItems\": {\n                \"type\": \"integer\"\n              },\n              \"IsTruncated\": {\n                \"type\": \"boolean\"\n              },\n              \"Quantity\": {\n                \"type\": \"integer\"\n              },\n              \"Items\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"locationName\": \"InvalidationSummary\",\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"Id\",\n                    \"CreateTime\",\n                    \"Status\"\n                  ],\n                  \"members\": {\n                    \"Id\": {},\n                    \"CreateTime\": {\n                      \"type\": \"timestamp\"\n                    },\n                    \"Status\": {}\n                  }\n                }\n              }\n            }\n          }\n        },\n        \"payload\": \"InvalidationList\"\n      }\n    },\n    \"ListStreamingDistributions\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2016-11-25/streaming-distribution\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Marker\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"MaxItems\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StreamingDistributionList\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"Marker\",\n              \"MaxItems\",\n              \"IsTruncated\",\n              \"Quantity\"\n            ],\n            \"members\": {\n              \"Marker\": {},\n              \"NextMarker\": {},\n              \"MaxItems\": {\n                \"type\": \"integer\"\n              },\n              \"IsTruncated\": {\n                \"type\": \"boolean\"\n              },\n              \"Quantity\": {\n                \"type\": \"integer\"\n              },\n              \"Items\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"locationName\": \"StreamingDistributionSummary\",\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"Id\",\n                    \"ARN\",\n                    \"Status\",\n                    \"LastModifiedTime\",\n                    \"DomainName\",\n                    \"S3Origin\",\n                    \"Aliases\",\n                    \"TrustedSigners\",\n                    \"Comment\",\n                    \"PriceClass\",\n                    \"Enabled\"\n                  ],\n                  \"members\": {\n                    \"Id\": {},\n                    \"ARN\": {},\n                    \"Status\": {},\n                    \"LastModifiedTime\": {\n                      \"type\": \"timestamp\"\n                    },\n                    \"DomainName\": {},\n                    \"S3Origin\": {\n                      \"shape\": \"S2f\"\n                    },\n                    \"Aliases\": {\n                      \"shape\": \"S8\"\n                    },\n                    \"TrustedSigners\": {\n                      \"shape\": \"Sy\"\n                    },\n                    \"Comment\": {},\n                    \"PriceClass\": {},\n                    \"Enabled\": {\n                      \"type\": \"boolean\"\n                    }\n                  }\n                }\n              }\n            }\n          }\n        },\n        \"payload\": \"StreamingDistributionList\"\n      }\n    },\n    \"ListTagsForResource\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2016-11-25/tagging\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Resource\"\n        ],\n        \"members\": {\n          \"Resource\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Resource\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Tags\"\n        ],\n        \"members\": {\n          \"Tags\": {\n            \"shape\": \"S21\"\n          }\n        },\n        \"payload\": \"Tags\"\n      }\n    },\n    \"TagResource\": {\n      \"http\": {\n        \"requestUri\": \"/2016-11-25/tagging?Operation=Tag\",\n        \"responseCode\": 204\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Resource\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"Resource\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Resource\"\n          },\n          \"Tags\": {\n            \"shape\": \"S21\",\n            \"locationName\": \"Tags\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://cloudfront.amazonaws.com/doc/2016-11-25/\"\n            }\n          }\n        },\n        \"payload\": \"Tags\"\n      }\n    },\n    \"UntagResource\": {\n      \"http\": {\n        \"requestUri\": \"/2016-11-25/tagging?Operation=Untag\",\n        \"responseCode\": 204\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Resource\",\n          \"TagKeys\"\n        ],\n        \"members\": {\n          \"Resource\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Resource\"\n          },\n          \"TagKeys\": {\n            \"locationName\": \"TagKeys\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://cloudfront.amazonaws.com/doc/2016-11-25/\"\n            },\n            \"type\": \"structure\",\n            \"members\": {\n              \"Items\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"locationName\": \"Key\"\n                }\n              }\n            }\n          }\n        },\n        \"payload\": \"TagKeys\"\n      }\n    },\n    \"UpdateCloudFrontOriginAccessIdentity\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/2016-11-25/origin-access-identity/cloudfront/{Id}/config\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CloudFrontOriginAccessIdentityConfig\",\n          \"Id\"\n        ],\n        \"members\": {\n          \"CloudFrontOriginAccessIdentityConfig\": {\n            \"shape\": \"S2\",\n            \"locationName\": \"CloudFrontOriginAccessIdentityConfig\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://cloudfront.amazonaws.com/doc/2016-11-25/\"\n            }\n          },\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"IfMatch\": {\n            \"location\": \"header\",\n            \"locationName\": \"If-Match\"\n          }\n        },\n        \"payload\": \"CloudFrontOriginAccessIdentityConfig\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CloudFrontOriginAccessIdentity\": {\n            \"shape\": \"S5\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          }\n        },\n        \"payload\": \"CloudFrontOriginAccessIdentity\"\n      }\n    },\n    \"UpdateDistribution\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/2016-11-25/distribution/{Id}/config\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DistributionConfig\",\n          \"Id\"\n        ],\n        \"members\": {\n          \"DistributionConfig\": {\n            \"shape\": \"S7\",\n            \"locationName\": \"DistributionConfig\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://cloudfront.amazonaws.com/doc/2016-11-25/\"\n            }\n          },\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"IfMatch\": {\n            \"location\": \"header\",\n            \"locationName\": \"If-Match\"\n          }\n        },\n        \"payload\": \"DistributionConfig\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Distribution\": {\n            \"shape\": \"S1s\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          }\n        },\n        \"payload\": \"Distribution\"\n      }\n    },\n    \"UpdateStreamingDistribution\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/2016-11-25/streaming-distribution/{Id}/config\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamingDistributionConfig\",\n          \"Id\"\n        ],\n        \"members\": {\n          \"StreamingDistributionConfig\": {\n            \"shape\": \"S2e\",\n            \"locationName\": \"StreamingDistributionConfig\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://cloudfront.amazonaws.com/doc/2016-11-25/\"\n            }\n          },\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"IfMatch\": {\n            \"location\": \"header\",\n            \"locationName\": \"If-Match\"\n          }\n        },\n        \"payload\": \"StreamingDistributionConfig\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StreamingDistribution\": {\n            \"shape\": \"S2i\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          }\n        },\n        \"payload\": \"StreamingDistribution\"\n      }\n    }\n  },\n  \"shapes\": {\n    \"S2\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"CallerReference\",\n        \"Comment\"\n      ],\n      \"members\": {\n        \"CallerReference\": {},\n        \"Comment\": {}\n      }\n    },\n    \"S5\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Id\",\n        \"S3CanonicalUserId\"\n      ],\n      \"members\": {\n        \"Id\": {},\n        \"S3CanonicalUserId\": {},\n        \"CloudFrontOriginAccessIdentityConfig\": {\n          \"shape\": \"S2\"\n        }\n      }\n    },\n    \"S7\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"CallerReference\",\n        \"Origins\",\n        \"DefaultCacheBehavior\",\n        \"Comment\",\n        \"Enabled\"\n      ],\n      \"members\": {\n        \"CallerReference\": {},\n        \"Aliases\": {\n          \"shape\": \"S8\"\n        },\n        \"DefaultRootObject\": {},\n        \"Origins\": {\n          \"shape\": \"Sb\"\n        },\n        \"DefaultCacheBehavior\": {\n          \"shape\": \"Sn\"\n        },\n        \"CacheBehaviors\": {\n          \"shape\": \"S1a\"\n        },\n        \"CustomErrorResponses\": {\n          \"shape\": \"S1d\"\n        },\n        \"Comment\": {},\n        \"Logging\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Enabled\",\n            \"IncludeCookies\",\n            \"Bucket\",\n            \"Prefix\"\n          ],\n          \"members\": {\n            \"Enabled\": {\n              \"type\": \"boolean\"\n            },\n            \"IncludeCookies\": {\n              \"type\": \"boolean\"\n            },\n            \"Bucket\": {},\n            \"Prefix\": {}\n          }\n        },\n        \"PriceClass\": {},\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        },\n        \"ViewerCertificate\": {\n          \"shape\": \"S1i\"\n        },\n        \"Restrictions\": {\n          \"shape\": \"S1m\"\n        },\n        \"WebACLId\": {},\n        \"HttpVersion\": {},\n        \"IsIPV6Enabled\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S8\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Quantity\"\n      ],\n      \"members\": {\n        \"Quantity\": {\n          \"type\": \"integer\"\n        },\n        \"Items\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"CNAME\"\n          }\n        }\n      }\n    },\n    \"Sb\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Quantity\"\n      ],\n      \"members\": {\n        \"Quantity\": {\n          \"type\": \"integer\"\n        },\n        \"Items\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Origin\",\n            \"type\": \"structure\",\n            \"required\": [\n              \"Id\",\n              \"DomainName\"\n            ],\n            \"members\": {\n              \"Id\": {},\n              \"DomainName\": {},\n              \"OriginPath\": {},\n              \"CustomHeaders\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"Quantity\"\n                ],\n                \"members\": {\n                  \"Quantity\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Items\": {\n                    \"type\": \"list\",\n                    \"member\": {\n                      \"locationName\": \"OriginCustomHeader\",\n                      \"type\": \"structure\",\n                      \"required\": [\n                        \"HeaderName\",\n                        \"HeaderValue\"\n                      ],\n                      \"members\": {\n                        \"HeaderName\": {},\n                        \"HeaderValue\": {}\n                      }\n                    }\n                  }\n                }\n              },\n              \"S3OriginConfig\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"OriginAccessIdentity\"\n                ],\n                \"members\": {\n                  \"OriginAccessIdentity\": {}\n                }\n              },\n              \"CustomOriginConfig\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"HTTPPort\",\n                  \"HTTPSPort\",\n                  \"OriginProtocolPolicy\"\n                ],\n                \"members\": {\n                  \"HTTPPort\": {\n                    \"type\": \"integer\"\n                  },\n                  \"HTTPSPort\": {\n                    \"type\": \"integer\"\n                  },\n                  \"OriginProtocolPolicy\": {},\n                  \"OriginSslProtocols\": {\n                    \"type\": \"structure\",\n                    \"required\": [\n                      \"Quantity\",\n                      \"Items\"\n                    ],\n                    \"members\": {\n                      \"Quantity\": {\n                        \"type\": \"integer\"\n                      },\n                      \"Items\": {\n                        \"type\": \"list\",\n                        \"member\": {\n                          \"locationName\": \"SslProtocol\"\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"Sn\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"TargetOriginId\",\n        \"ForwardedValues\",\n        \"TrustedSigners\",\n        \"ViewerProtocolPolicy\",\n        \"MinTTL\"\n      ],\n      \"members\": {\n        \"TargetOriginId\": {},\n        \"ForwardedValues\": {\n          \"shape\": \"So\"\n        },\n        \"TrustedSigners\": {\n          \"shape\": \"Sy\"\n        },\n        \"ViewerProtocolPolicy\": {},\n        \"MinTTL\": {\n          \"type\": \"long\"\n        },\n        \"AllowedMethods\": {\n          \"shape\": \"S12\"\n        },\n        \"SmoothStreaming\": {\n          \"type\": \"boolean\"\n        },\n        \"DefaultTTL\": {\n          \"type\": \"long\"\n        },\n        \"MaxTTL\": {\n          \"type\": \"long\"\n        },\n        \"Compress\": {\n          \"type\": \"boolean\"\n        },\n        \"LambdaFunctionAssociations\": {\n          \"shape\": \"S16\"\n        }\n      }\n    },\n    \"So\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"QueryString\",\n        \"Cookies\"\n      ],\n      \"members\": {\n        \"QueryString\": {\n          \"type\": \"boolean\"\n        },\n        \"Cookies\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Forward\"\n          ],\n          \"members\": {\n            \"Forward\": {},\n            \"WhitelistedNames\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Quantity\"\n              ],\n              \"members\": {\n                \"Quantity\": {\n                  \"type\": \"integer\"\n                },\n                \"Items\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"Name\"\n                  }\n                }\n              }\n            }\n          }\n        },\n        \"Headers\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Quantity\"\n          ],\n          \"members\": {\n            \"Quantity\": {\n              \"type\": \"integer\"\n            },\n            \"Items\": {\n              \"type\": \"list\",\n              \"member\": {\n                \"locationName\": \"Name\"\n              }\n            }\n          }\n        },\n        \"QueryStringCacheKeys\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Quantity\"\n          ],\n          \"members\": {\n            \"Quantity\": {\n              \"type\": \"integer\"\n            },\n            \"Items\": {\n              \"type\": \"list\",\n              \"member\": {\n                \"locationName\": \"Name\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"Sy\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Enabled\",\n        \"Quantity\"\n      ],\n      \"members\": {\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        },\n        \"Quantity\": {\n          \"type\": \"integer\"\n        },\n        \"Items\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"AwsAccountNumber\"\n          }\n        }\n      }\n    },\n    \"S12\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Quantity\",\n        \"Items\"\n      ],\n      \"members\": {\n        \"Quantity\": {\n          \"type\": \"integer\"\n        },\n        \"Items\": {\n          \"shape\": \"S13\"\n        },\n        \"CachedMethods\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Quantity\",\n            \"Items\"\n          ],\n          \"members\": {\n            \"Quantity\": {\n              \"type\": \"integer\"\n            },\n            \"Items\": {\n              \"shape\": \"S13\"\n            }\n          }\n        }\n      }\n    },\n    \"S13\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Method\"\n      }\n    },\n    \"S16\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Quantity\"\n      ],\n      \"members\": {\n        \"Quantity\": {\n          \"type\": \"integer\"\n        },\n        \"Items\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"LambdaFunctionAssociation\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"LambdaFunctionARN\": {},\n              \"EventType\": {}\n            }\n          }\n        }\n      }\n    },\n    \"S1a\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Quantity\"\n      ],\n      \"members\": {\n        \"Quantity\": {\n          \"type\": \"integer\"\n        },\n        \"Items\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"CacheBehavior\",\n            \"type\": \"structure\",\n            \"required\": [\n              \"PathPattern\",\n              \"TargetOriginId\",\n              \"ForwardedValues\",\n              \"TrustedSigners\",\n              \"ViewerProtocolPolicy\",\n              \"MinTTL\"\n            ],\n            \"members\": {\n              \"PathPattern\": {},\n              \"TargetOriginId\": {},\n              \"ForwardedValues\": {\n                \"shape\": \"So\"\n              },\n              \"TrustedSigners\": {\n                \"shape\": \"Sy\"\n              },\n              \"ViewerProtocolPolicy\": {},\n              \"MinTTL\": {\n                \"type\": \"long\"\n              },\n              \"AllowedMethods\": {\n                \"shape\": \"S12\"\n              },\n              \"SmoothStreaming\": {\n                \"type\": \"boolean\"\n              },\n              \"DefaultTTL\": {\n                \"type\": \"long\"\n              },\n              \"MaxTTL\": {\n                \"type\": \"long\"\n              },\n              \"Compress\": {\n                \"type\": \"boolean\"\n              },\n              \"LambdaFunctionAssociations\": {\n                \"shape\": \"S16\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S1d\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Quantity\"\n      ],\n      \"members\": {\n        \"Quantity\": {\n          \"type\": \"integer\"\n        },\n        \"Items\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"CustomErrorResponse\",\n            \"type\": \"structure\",\n            \"required\": [\n              \"ErrorCode\"\n            ],\n            \"members\": {\n              \"ErrorCode\": {\n                \"type\": \"integer\"\n              },\n              \"ResponsePagePath\": {},\n              \"ResponseCode\": {},\n              \"ErrorCachingMinTTL\": {\n                \"type\": \"long\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S1i\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CloudFrontDefaultCertificate\": {\n          \"type\": \"boolean\"\n        },\n        \"IAMCertificateId\": {},\n        \"ACMCertificateArn\": {},\n        \"SSLSupportMethod\": {},\n        \"MinimumProtocolVersion\": {},\n        \"Certificate\": {\n          \"deprecated\": true\n        },\n        \"CertificateSource\": {\n          \"deprecated\": true\n        }\n      }\n    },\n    \"S1m\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"GeoRestriction\"\n      ],\n      \"members\": {\n        \"GeoRestriction\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"RestrictionType\",\n            \"Quantity\"\n          ],\n          \"members\": {\n            \"RestrictionType\": {},\n            \"Quantity\": {\n              \"type\": \"integer\"\n            },\n            \"Items\": {\n              \"type\": \"list\",\n              \"member\": {\n                \"locationName\": \"Location\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S1s\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Id\",\n        \"ARN\",\n        \"Status\",\n        \"LastModifiedTime\",\n        \"InProgressInvalidationBatches\",\n        \"DomainName\",\n        \"ActiveTrustedSigners\",\n        \"DistributionConfig\"\n      ],\n      \"members\": {\n        \"Id\": {},\n        \"ARN\": {},\n        \"Status\": {},\n        \"LastModifiedTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"InProgressInvalidationBatches\": {\n          \"type\": \"integer\"\n        },\n        \"DomainName\": {},\n        \"ActiveTrustedSigners\": {\n          \"shape\": \"S1u\"\n        },\n        \"DistributionConfig\": {\n          \"shape\": \"S7\"\n        }\n      }\n    },\n    \"S1u\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Enabled\",\n        \"Quantity\"\n      ],\n      \"members\": {\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        },\n        \"Quantity\": {\n          \"type\": \"integer\"\n        },\n        \"Items\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Signer\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"AwsAccountNumber\": {},\n              \"KeyPairIds\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"Quantity\"\n                ],\n                \"members\": {\n                  \"Quantity\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Items\": {\n                    \"type\": \"list\",\n                    \"member\": {\n                      \"locationName\": \"KeyPairId\"\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S21\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Items\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Tag\",\n            \"type\": \"structure\",\n            \"required\": [\n              \"Key\"\n            ],\n            \"members\": {\n              \"Key\": {},\n              \"Value\": {}\n            }\n          }\n        }\n      }\n    },\n    \"S28\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Paths\",\n        \"CallerReference\"\n      ],\n      \"members\": {\n        \"Paths\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Quantity\"\n          ],\n          \"members\": {\n            \"Quantity\": {\n              \"type\": \"integer\"\n            },\n            \"Items\": {\n              \"type\": \"list\",\n              \"member\": {\n                \"locationName\": \"Path\"\n              }\n            }\n          }\n        },\n        \"CallerReference\": {}\n      }\n    },\n    \"S2c\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Id\",\n        \"Status\",\n        \"CreateTime\",\n        \"InvalidationBatch\"\n      ],\n      \"members\": {\n        \"Id\": {},\n        \"Status\": {},\n        \"CreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"InvalidationBatch\": {\n          \"shape\": \"S28\"\n        }\n      }\n    },\n    \"S2e\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"CallerReference\",\n        \"S3Origin\",\n        \"Comment\",\n        \"TrustedSigners\",\n        \"Enabled\"\n      ],\n      \"members\": {\n        \"CallerReference\": {},\n        \"S3Origin\": {\n          \"shape\": \"S2f\"\n        },\n        \"Aliases\": {\n          \"shape\": \"S8\"\n        },\n        \"Comment\": {},\n        \"Logging\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Enabled\",\n            \"Bucket\",\n            \"Prefix\"\n          ],\n          \"members\": {\n            \"Enabled\": {\n              \"type\": \"boolean\"\n            },\n            \"Bucket\": {},\n            \"Prefix\": {}\n          }\n        },\n        \"TrustedSigners\": {\n          \"shape\": \"Sy\"\n        },\n        \"PriceClass\": {},\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S2f\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"DomainName\",\n        \"OriginAccessIdentity\"\n      ],\n      \"members\": {\n        \"DomainName\": {},\n        \"OriginAccessIdentity\": {}\n      }\n    },\n    \"S2i\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Id\",\n        \"ARN\",\n        \"Status\",\n        \"DomainName\",\n        \"ActiveTrustedSigners\",\n        \"StreamingDistributionConfig\"\n      ],\n      \"members\": {\n        \"Id\": {},\n        \"ARN\": {},\n        \"Status\": {},\n        \"LastModifiedTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"DomainName\": {},\n        \"ActiveTrustedSigners\": {\n          \"shape\": \"S1u\"\n        },\n        \"StreamingDistributionConfig\": {\n          \"shape\": \"S2e\"\n        }\n      }\n    },\n    \"S3a\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Marker\",\n        \"MaxItems\",\n        \"IsTruncated\",\n        \"Quantity\"\n      ],\n      \"members\": {\n        \"Marker\": {},\n        \"NextMarker\": {},\n        \"MaxItems\": {\n          \"type\": \"integer\"\n        },\n        \"IsTruncated\": {\n          \"type\": \"boolean\"\n        },\n        \"Quantity\": {\n          \"type\": \"integer\"\n        },\n        \"Items\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"DistributionSummary\",\n            \"type\": \"structure\",\n            \"required\": [\n              \"Id\",\n              \"ARN\",\n              \"Status\",\n              \"LastModifiedTime\",\n              \"DomainName\",\n              \"Aliases\",\n              \"Origins\",\n              \"DefaultCacheBehavior\",\n              \"CacheBehaviors\",\n              \"CustomErrorResponses\",\n              \"Comment\",\n              \"PriceClass\",\n              \"Enabled\",\n              \"ViewerCertificate\",\n              \"Restrictions\",\n              \"WebACLId\",\n              \"HttpVersion\",\n              \"IsIPV6Enabled\"\n            ],\n            \"members\": {\n              \"Id\": {},\n              \"ARN\": {},\n              \"Status\": {},\n              \"LastModifiedTime\": {\n                \"type\": \"timestamp\"\n              },\n              \"DomainName\": {},\n              \"Aliases\": {\n                \"shape\": \"S8\"\n              },\n              \"Origins\": {\n                \"shape\": \"Sb\"\n              },\n              \"DefaultCacheBehavior\": {\n                \"shape\": \"Sn\"\n              },\n              \"CacheBehaviors\": {\n                \"shape\": \"S1a\"\n              },\n              \"CustomErrorResponses\": {\n                \"shape\": \"S1d\"\n              },\n              \"Comment\": {},\n              \"PriceClass\": {},\n              \"Enabled\": {\n                \"type\": \"boolean\"\n              },\n              \"ViewerCertificate\": {\n                \"shape\": \"S1i\"\n              },\n              \"Restrictions\": {\n                \"shape\": \"S1m\"\n              },\n              \"WebACLId\": {},\n              \"HttpVersion\": {},\n              \"IsIPV6Enabled\": {\n                \"type\": \"boolean\"\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n},{}],13:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"ListCloudFrontOriginAccessIdentities\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"CloudFrontOriginAccessIdentityList.NextMarker\",\n      \"limit_key\": \"MaxItems\",\n      \"more_results\": \"CloudFrontOriginAccessIdentityList.IsTruncated\",\n      \"result_key\": \"CloudFrontOriginAccessIdentityList.Items\"\n    },\n    \"ListDistributions\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"DistributionList.NextMarker\",\n      \"limit_key\": \"MaxItems\",\n      \"more_results\": \"DistributionList.IsTruncated\",\n      \"result_key\": \"DistributionList.Items\"\n    },\n    \"ListInvalidations\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"InvalidationList.NextMarker\",\n      \"limit_key\": \"MaxItems\",\n      \"more_results\": \"InvalidationList.IsTruncated\",\n      \"result_key\": \"InvalidationList.Items\"\n    },\n    \"ListStreamingDistributions\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"StreamingDistributionList.NextMarker\",\n      \"limit_key\": \"MaxItems\",\n      \"more_results\": \"StreamingDistributionList.IsTruncated\",\n      \"result_key\": \"StreamingDistributionList.Items\"\n    }\n  }\n}\n\n},{}],14:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"DistributionDeployed\": {\n      \"delay\": 60,\n      \"operation\": \"GetDistribution\",\n      \"maxAttempts\": 25,\n      \"description\": \"Wait until a distribution is deployed.\",\n      \"acceptors\": [\n        {\n          \"expected\": \"Deployed\",\n          \"matcher\": \"path\",\n          \"state\": \"success\",\n          \"argument\": \"Distribution.Status\"\n        }\n      ]\n    },\n    \"InvalidationCompleted\": {\n      \"delay\": 20,\n      \"operation\": \"GetInvalidation\",\n      \"maxAttempts\": 30,\n      \"description\": \"Wait until an invalidation has completed.\",\n      \"acceptors\": [\n        {\n          \"expected\": \"Completed\",\n          \"matcher\": \"path\",\n          \"state\": \"success\",\n          \"argument\": \"Invalidation.Status\"\n        }\n      ]\n    },\n    \"StreamingDistributionDeployed\": {\n      \"delay\": 60,\n      \"operation\": \"GetStreamingDistribution\",\n      \"maxAttempts\": 25,\n      \"description\": \"Wait until a streaming distribution is deployed.\",\n      \"acceptors\": [\n        {\n          \"expected\": \"Deployed\",\n          \"matcher\": \"path\",\n          \"state\": \"success\",\n          \"argument\": \"StreamingDistribution.Status\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],15:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2014-05-30\",\n    \"endpointPrefix\": \"cloudhsm\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"CloudHSM\",\n    \"serviceFullName\": \"Amazon CloudHSM\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"CloudHsmFrontendService\",\n    \"uid\": \"cloudhsm-2014-05-30\"\n  },\n  \"operations\": {\n    \"AddTagsToResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceArn\",\n          \"TagList\"\n        ],\n        \"members\": {\n          \"ResourceArn\": {},\n          \"TagList\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Status\"\n        ],\n        \"members\": {\n          \"Status\": {}\n        }\n      }\n    },\n    \"CreateHapg\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Label\"\n        ],\n        \"members\": {\n          \"Label\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HapgArn\": {}\n        }\n      }\n    },\n    \"CreateHsm\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubnetId\",\n          \"SshKey\",\n          \"IamRoleArn\",\n          \"SubscriptionType\"\n        ],\n        \"members\": {\n          \"SubnetId\": {\n            \"locationName\": \"SubnetId\"\n          },\n          \"SshKey\": {\n            \"locationName\": \"SshKey\"\n          },\n          \"EniIp\": {\n            \"locationName\": \"EniIp\"\n          },\n          \"IamRoleArn\": {\n            \"locationName\": \"IamRoleArn\"\n          },\n          \"ExternalId\": {\n            \"locationName\": \"ExternalId\"\n          },\n          \"SubscriptionType\": {\n            \"locationName\": \"SubscriptionType\"\n          },\n          \"ClientToken\": {\n            \"locationName\": \"ClientToken\"\n          },\n          \"SyslogIp\": {\n            \"locationName\": \"SyslogIp\"\n          }\n        },\n        \"locationName\": \"CreateHsmRequest\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HsmArn\": {}\n        }\n      }\n    },\n    \"CreateLunaClient\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Certificate\"\n        ],\n        \"members\": {\n          \"Label\": {},\n          \"Certificate\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClientArn\": {}\n        }\n      }\n    },\n    \"DeleteHapg\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HapgArn\"\n        ],\n        \"members\": {\n          \"HapgArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Status\"\n        ],\n        \"members\": {\n          \"Status\": {}\n        }\n      }\n    },\n    \"DeleteHsm\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HsmArn\"\n        ],\n        \"members\": {\n          \"HsmArn\": {\n            \"locationName\": \"HsmArn\"\n          }\n        },\n        \"locationName\": \"DeleteHsmRequest\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Status\"\n        ],\n        \"members\": {\n          \"Status\": {}\n        }\n      }\n    },\n    \"DeleteLunaClient\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClientArn\"\n        ],\n        \"members\": {\n          \"ClientArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Status\"\n        ],\n        \"members\": {\n          \"Status\": {}\n        }\n      }\n    },\n    \"DescribeHapg\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HapgArn\"\n        ],\n        \"members\": {\n          \"HapgArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HapgArn\": {},\n          \"HapgSerial\": {},\n          \"HsmsLastActionFailed\": {\n            \"shape\": \"Sz\"\n          },\n          \"HsmsPendingDeletion\": {\n            \"shape\": \"Sz\"\n          },\n          \"HsmsPendingRegistration\": {\n            \"shape\": \"Sz\"\n          },\n          \"Label\": {},\n          \"LastModifiedTimestamp\": {},\n          \"PartitionSerialList\": {\n            \"shape\": \"S11\"\n          },\n          \"State\": {}\n        }\n      }\n    },\n    \"DescribeHsm\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HsmArn\": {},\n          \"HsmSerialNumber\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HsmArn\": {},\n          \"Status\": {},\n          \"StatusDetails\": {},\n          \"AvailabilityZone\": {},\n          \"EniId\": {},\n          \"EniIp\": {},\n          \"SubscriptionType\": {},\n          \"SubscriptionStartDate\": {},\n          \"SubscriptionEndDate\": {},\n          \"VpcId\": {},\n          \"SubnetId\": {},\n          \"IamRoleArn\": {},\n          \"SerialNumber\": {},\n          \"VendorName\": {},\n          \"HsmType\": {},\n          \"SoftwareVersion\": {},\n          \"SshPublicKey\": {},\n          \"SshKeyLastUpdated\": {},\n          \"ServerCertUri\": {},\n          \"ServerCertLastUpdated\": {},\n          \"Partitions\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"DescribeLunaClient\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClientArn\": {},\n          \"CertificateFingerprint\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClientArn\": {},\n          \"Certificate\": {},\n          \"CertificateFingerprint\": {},\n          \"LastModifiedTimestamp\": {},\n          \"Label\": {}\n        }\n      }\n    },\n    \"GetConfig\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClientArn\",\n          \"ClientVersion\",\n          \"HapgList\"\n        ],\n        \"members\": {\n          \"ClientArn\": {},\n          \"ClientVersion\": {},\n          \"HapgList\": {\n            \"shape\": \"S1i\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConfigType\": {},\n          \"ConfigFile\": {},\n          \"ConfigCred\": {}\n        }\n      }\n    },\n    \"ListAvailableZones\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AZList\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"ListHapgs\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HapgList\"\n        ],\n        \"members\": {\n          \"HapgList\": {\n            \"shape\": \"S1i\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListHsms\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HsmList\": {\n            \"shape\": \"Sz\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListLunaClients\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClientList\"\n        ],\n        \"members\": {\n          \"ClientList\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListTagsForResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceArn\"\n        ],\n        \"members\": {\n          \"ResourceArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TagList\"\n        ],\n        \"members\": {\n          \"TagList\": {\n            \"shape\": \"S3\"\n          }\n        }\n      }\n    },\n    \"ModifyHapg\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HapgArn\"\n        ],\n        \"members\": {\n          \"HapgArn\": {},\n          \"Label\": {},\n          \"PartitionSerialList\": {\n            \"shape\": \"S11\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HapgArn\": {}\n        }\n      }\n    },\n    \"ModifyHsm\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HsmArn\"\n        ],\n        \"members\": {\n          \"HsmArn\": {\n            \"locationName\": \"HsmArn\"\n          },\n          \"SubnetId\": {\n            \"locationName\": \"SubnetId\"\n          },\n          \"EniIp\": {\n            \"locationName\": \"EniIp\"\n          },\n          \"IamRoleArn\": {\n            \"locationName\": \"IamRoleArn\"\n          },\n          \"ExternalId\": {\n            \"locationName\": \"ExternalId\"\n          },\n          \"SyslogIp\": {\n            \"locationName\": \"SyslogIp\"\n          }\n        },\n        \"locationName\": \"ModifyHsmRequest\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HsmArn\": {}\n        }\n      }\n    },\n    \"ModifyLunaClient\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClientArn\",\n          \"Certificate\"\n        ],\n        \"members\": {\n          \"ClientArn\": {},\n          \"Certificate\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClientArn\": {}\n        }\n      }\n    },\n    \"RemoveTagsFromResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceArn\",\n          \"TagKeyList\"\n        ],\n        \"members\": {\n          \"ResourceArn\": {},\n          \"TagKeyList\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Status\"\n        ],\n        \"members\": {\n          \"Status\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S3\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Key\",\n          \"Value\"\n        ],\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"Sz\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S11\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S1i\": {\n      \"type\": \"list\",\n      \"member\": {}\n    }\n  }\n}\n},{}],16:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2013-11-01\",\n    \"endpointPrefix\": \"cloudtrail\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"CloudTrail\",\n    \"serviceFullName\": \"AWS CloudTrail\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101\",\n    \"uid\": \"cloudtrail-2013-11-01\"\n  },\n  \"operations\": {\n    \"AddTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceId\"\n        ],\n        \"members\": {\n          \"ResourceId\": {},\n          \"TagsList\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"idempotent\": true\n    },\n    \"CreateTrail\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"S3BucketName\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"S3BucketName\": {},\n          \"S3KeyPrefix\": {},\n          \"SnsTopicName\": {},\n          \"IncludeGlobalServiceEvents\": {\n            \"type\": \"boolean\"\n          },\n          \"IsMultiRegionTrail\": {\n            \"type\": \"boolean\"\n          },\n          \"EnableLogFileValidation\": {\n            \"type\": \"boolean\"\n          },\n          \"CloudWatchLogsLogGroupArn\": {},\n          \"CloudWatchLogsRoleArn\": {},\n          \"KmsKeyId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Name\": {},\n          \"S3BucketName\": {},\n          \"S3KeyPrefix\": {},\n          \"SnsTopicName\": {\n            \"deprecated\": true\n          },\n          \"SnsTopicARN\": {},\n          \"IncludeGlobalServiceEvents\": {\n            \"type\": \"boolean\"\n          },\n          \"IsMultiRegionTrail\": {\n            \"type\": \"boolean\"\n          },\n          \"TrailARN\": {},\n          \"LogFileValidationEnabled\": {\n            \"type\": \"boolean\"\n          },\n          \"CloudWatchLogsLogGroupArn\": {},\n          \"CloudWatchLogsRoleArn\": {},\n          \"KmsKeyId\": {}\n        }\n      },\n      \"idempotent\": true\n    },\n    \"DeleteTrail\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"idempotent\": true\n    },\n    \"DescribeTrails\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"trailNameList\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"includeShadowTrails\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"trailList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"S3BucketName\": {},\n                \"S3KeyPrefix\": {},\n                \"SnsTopicName\": {\n                  \"deprecated\": true\n                },\n                \"SnsTopicARN\": {},\n                \"IncludeGlobalServiceEvents\": {\n                  \"type\": \"boolean\"\n                },\n                \"IsMultiRegionTrail\": {\n                  \"type\": \"boolean\"\n                },\n                \"HomeRegion\": {},\n                \"TrailARN\": {},\n                \"LogFileValidationEnabled\": {\n                  \"type\": \"boolean\"\n                },\n                \"CloudWatchLogsLogGroupArn\": {},\n                \"CloudWatchLogsRoleArn\": {},\n                \"KmsKeyId\": {},\n                \"HasCustomEventSelectors\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"idempotent\": true\n    },\n    \"GetEventSelectors\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TrailName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TrailARN\": {},\n          \"EventSelectors\": {\n            \"shape\": \"Si\"\n          }\n        }\n      },\n      \"idempotent\": true\n    },\n    \"GetTrailStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IsLogging\": {\n            \"type\": \"boolean\"\n          },\n          \"LatestDeliveryError\": {},\n          \"LatestNotificationError\": {},\n          \"LatestDeliveryTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"LatestNotificationTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"StartLoggingTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"StopLoggingTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"LatestCloudWatchLogsDeliveryError\": {},\n          \"LatestCloudWatchLogsDeliveryTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"LatestDigestDeliveryTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"LatestDigestDeliveryError\": {},\n          \"LatestDeliveryAttemptTime\": {},\n          \"LatestNotificationAttemptTime\": {},\n          \"LatestNotificationAttemptSucceeded\": {},\n          \"LatestDeliveryAttemptSucceeded\": {},\n          \"TimeLoggingStarted\": {},\n          \"TimeLoggingStopped\": {}\n        }\n      },\n      \"idempotent\": true\n    },\n    \"ListPublicKeys\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PublicKeyList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Value\": {\n                  \"type\": \"blob\"\n                },\n                \"ValidityStartTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"ValidityEndTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Fingerprint\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"idempotent\": true\n    },\n    \"ListTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceIdList\"\n        ],\n        \"members\": {\n          \"ResourceIdList\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourceTagList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ResourceId\": {},\n                \"TagsList\": {\n                  \"shape\": \"S3\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"idempotent\": true\n    },\n    \"LookupEvents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LookupAttributes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"AttributeKey\",\n                \"AttributeValue\"\n              ],\n              \"members\": {\n                \"AttributeKey\": {},\n                \"AttributeValue\": {}\n              }\n            }\n          },\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Events\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"EventId\": {},\n                \"EventName\": {},\n                \"EventTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"EventSource\": {},\n                \"Username\": {},\n                \"Resources\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"ResourceType\": {},\n                      \"ResourceName\": {}\n                    }\n                  }\n                },\n                \"CloudTrailEvent\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"idempotent\": true\n    },\n    \"PutEventSelectors\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TrailName\": {},\n          \"EventSelectors\": {\n            \"shape\": \"Si\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TrailARN\": {},\n          \"EventSelectors\": {\n            \"shape\": \"Si\"\n          }\n        }\n      },\n      \"idempotent\": true\n    },\n    \"RemoveTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceId\"\n        ],\n        \"members\": {\n          \"ResourceId\": {},\n          \"TagsList\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"idempotent\": true\n    },\n    \"StartLogging\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"idempotent\": true\n    },\n    \"StopLogging\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"idempotent\": true\n    },\n    \"UpdateTrail\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"S3BucketName\": {},\n          \"S3KeyPrefix\": {},\n          \"SnsTopicName\": {},\n          \"IncludeGlobalServiceEvents\": {\n            \"type\": \"boolean\"\n          },\n          \"IsMultiRegionTrail\": {\n            \"type\": \"boolean\"\n          },\n          \"EnableLogFileValidation\": {\n            \"type\": \"boolean\"\n          },\n          \"CloudWatchLogsLogGroupArn\": {},\n          \"CloudWatchLogsRoleArn\": {},\n          \"KmsKeyId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Name\": {},\n          \"S3BucketName\": {},\n          \"S3KeyPrefix\": {},\n          \"SnsTopicName\": {\n            \"deprecated\": true\n          },\n          \"SnsTopicARN\": {},\n          \"IncludeGlobalServiceEvents\": {\n            \"type\": \"boolean\"\n          },\n          \"IsMultiRegionTrail\": {\n            \"type\": \"boolean\"\n          },\n          \"TrailARN\": {},\n          \"LogFileValidationEnabled\": {\n            \"type\": \"boolean\"\n          },\n          \"CloudWatchLogsLogGroupArn\": {},\n          \"CloudWatchLogsRoleArn\": {},\n          \"KmsKeyId\": {}\n        }\n      },\n      \"idempotent\": true\n    }\n  },\n  \"shapes\": {\n    \"S3\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Key\"\n        ],\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"Si\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReadWriteType\": {},\n          \"IncludeManagementEvents\": {\n            \"type\": \"boolean\"\n          },\n          \"DataResources\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Type\": {},\n                \"Values\": {\n                  \"type\": \"list\",\n                  \"member\": {}\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n},{}],17:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeTrails\": {\n      \"result_key\": \"trailList\"\n    },\n    \"LookupEvents\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"result_key\": \"Events\"\n    }\n  }\n}\n\n},{}],18:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2015-04-13\",\n    \"endpointPrefix\": \"codecommit\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"CodeCommit\",\n    \"serviceFullName\": \"AWS CodeCommit\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"CodeCommit_20150413\",\n    \"uid\": \"codecommit-2015-04-13\"\n  },\n  \"operations\": {\n    \"BatchGetRepositories\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryNames\"\n        ],\n        \"members\": {\n          \"repositoryNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"repositories\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S6\"\n            }\n          },\n          \"repositoriesNotFound\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"CreateBranch\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"branchName\",\n          \"commitId\"\n        ],\n        \"members\": {\n          \"repositoryName\": {},\n          \"branchName\": {},\n          \"commitId\": {}\n        }\n      }\n    },\n    \"CreateRepository\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\"\n        ],\n        \"members\": {\n          \"repositoryName\": {},\n          \"repositoryDescription\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"repositoryMetadata\": {\n            \"shape\": \"S6\"\n          }\n        }\n      }\n    },\n    \"DeleteRepository\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\"\n        ],\n        \"members\": {\n          \"repositoryName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"repositoryId\": {}\n        }\n      }\n    },\n    \"GetBlob\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"blobId\"\n        ],\n        \"members\": {\n          \"repositoryName\": {},\n          \"blobId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"content\"\n        ],\n        \"members\": {\n          \"content\": {\n            \"type\": \"blob\"\n          }\n        }\n      }\n    },\n    \"GetBranch\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"repositoryName\": {},\n          \"branchName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"branch\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"branchName\": {},\n              \"commitId\": {}\n            }\n          }\n        }\n      }\n    },\n    \"GetCommit\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"commitId\"\n        ],\n        \"members\": {\n          \"repositoryName\": {},\n          \"commitId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"commit\"\n        ],\n        \"members\": {\n          \"commit\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"treeId\": {},\n              \"parents\": {\n                \"type\": \"list\",\n                \"member\": {}\n              },\n              \"message\": {},\n              \"author\": {\n                \"shape\": \"Sz\"\n              },\n              \"committer\": {\n                \"shape\": \"Sz\"\n              },\n              \"additionalData\": {}\n            }\n          }\n        }\n      }\n    },\n    \"GetDifferences\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"afterCommitSpecifier\"\n        ],\n        \"members\": {\n          \"repositoryName\": {},\n          \"beforeCommitSpecifier\": {},\n          \"afterCommitSpecifier\": {},\n          \"beforePath\": {},\n          \"afterPath\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"differences\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"beforeBlob\": {\n                  \"shape\": \"S1c\"\n                },\n                \"afterBlob\": {\n                  \"shape\": \"S1c\"\n                },\n                \"changeType\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"GetRepository\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\"\n        ],\n        \"members\": {\n          \"repositoryName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"repositoryMetadata\": {\n            \"shape\": \"S6\"\n          }\n        }\n      }\n    },\n    \"GetRepositoryTriggers\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\"\n        ],\n        \"members\": {\n          \"repositoryName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"configurationId\": {},\n          \"triggers\": {\n            \"shape\": \"S1k\"\n          }\n        }\n      }\n    },\n    \"ListBranches\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\"\n        ],\n        \"members\": {\n          \"repositoryName\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"branches\": {\n            \"shape\": \"S1o\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListRepositories\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"nextToken\": {},\n          \"sortBy\": {},\n          \"order\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"repositories\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"repositoryName\": {},\n                \"repositoryId\": {}\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"PutRepositoryTriggers\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"triggers\"\n        ],\n        \"members\": {\n          \"repositoryName\": {},\n          \"triggers\": {\n            \"shape\": \"S1k\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"configurationId\": {}\n        }\n      }\n    },\n    \"TestRepositoryTriggers\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"triggers\"\n        ],\n        \"members\": {\n          \"repositoryName\": {},\n          \"triggers\": {\n            \"shape\": \"S1k\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"successfulExecutions\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"failedExecutions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"trigger\": {},\n                \"failureMessage\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"UpdateDefaultBranch\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"defaultBranchName\"\n        ],\n        \"members\": {\n          \"repositoryName\": {},\n          \"defaultBranchName\": {}\n        }\n      }\n    },\n    \"UpdateRepositoryDescription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\"\n        ],\n        \"members\": {\n          \"repositoryName\": {},\n          \"repositoryDescription\": {}\n        }\n      }\n    },\n    \"UpdateRepositoryName\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"oldName\",\n          \"newName\"\n        ],\n        \"members\": {\n          \"oldName\": {},\n          \"newName\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S6\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"accountId\": {},\n        \"repositoryId\": {},\n        \"repositoryName\": {},\n        \"repositoryDescription\": {},\n        \"defaultBranch\": {},\n        \"lastModifiedDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"creationDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"cloneUrlHttp\": {},\n        \"cloneUrlSsh\": {},\n        \"Arn\": {}\n      }\n    },\n    \"Sz\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"name\": {},\n        \"email\": {},\n        \"date\": {}\n      }\n    },\n    \"S1c\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"blobId\": {},\n        \"path\": {},\n        \"mode\": {}\n      }\n    },\n    \"S1k\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"name\",\n          \"destinationArn\",\n          \"events\"\n        ],\n        \"members\": {\n          \"name\": {},\n          \"destinationArn\": {},\n          \"customData\": {},\n          \"branches\": {\n            \"shape\": \"S1o\"\n          },\n          \"events\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"S1o\": {\n      \"type\": \"list\",\n      \"member\": {}\n    }\n  }\n}\n},{}],19:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"GetDifferences\": {\n      \"input_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"output_token\": \"NextToken\"\n    },\n    \"ListBranches\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"branches\"\n    },\n    \"ListRepositories\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"repositories\"\n    }\n  }\n}\n},{}],20:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2014-10-06\",\n    \"endpointPrefix\": \"codedeploy\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"CodeDeploy\",\n    \"serviceFullName\": \"AWS CodeDeploy\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"CodeDeploy_20141006\",\n    \"timestampFormat\": \"unixTimestamp\",\n    \"uid\": \"codedeploy-2014-10-06\"\n  },\n  \"operations\": {\n    \"AddTagsToOnPremisesInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"tags\",\n          \"instanceNames\"\n        ],\n        \"members\": {\n          \"tags\": {\n            \"shape\": \"S2\"\n          },\n          \"instanceNames\": {\n            \"shape\": \"S6\"\n          }\n        }\n      }\n    },\n    \"BatchGetApplicationRevisions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"applicationName\",\n          \"revisions\"\n        ],\n        \"members\": {\n          \"applicationName\": {},\n          \"revisions\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"applicationName\": {},\n          \"errorMessage\": {},\n          \"revisions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"revisionLocation\": {\n                  \"shape\": \"Sb\"\n                },\n                \"genericRevisionInfo\": {\n                  \"shape\": \"Sq\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"BatchGetApplications\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"applicationNames\": {\n            \"shape\": \"Sw\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"applicationsInfo\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sz\"\n            }\n          }\n        }\n      }\n    },\n    \"BatchGetDeploymentGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"applicationName\",\n          \"deploymentGroupNames\"\n        ],\n        \"members\": {\n          \"applicationName\": {},\n          \"deploymentGroupNames\": {\n            \"shape\": \"Ss\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"deploymentGroupsInfo\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S15\"\n            }\n          },\n          \"errorMessage\": {}\n        }\n      }\n    },\n    \"BatchGetDeploymentInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"deploymentId\",\n          \"instanceIds\"\n        ],\n        \"members\": {\n          \"deploymentId\": {},\n          \"instanceIds\": {\n            \"shape\": \"S2d\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"instancesSummary\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S2h\"\n            }\n          },\n          \"errorMessage\": {}\n        }\n      }\n    },\n    \"BatchGetDeployments\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"deploymentIds\": {\n            \"shape\": \"S2u\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"deploymentsInfo\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S2x\"\n            }\n          }\n        }\n      }\n    },\n    \"BatchGetOnPremisesInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"instanceNames\": {\n            \"shape\": \"S6\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"instanceInfos\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S3b\"\n            }\n          }\n        }\n      }\n    },\n    \"ContinueDeployment\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"deploymentId\": {}\n        }\n      }\n    },\n    \"CreateApplication\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"applicationName\"\n        ],\n        \"members\": {\n          \"applicationName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"applicationId\": {}\n        }\n      }\n    },\n    \"CreateDeployment\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"applicationName\"\n        ],\n        \"members\": {\n          \"applicationName\": {},\n          \"deploymentGroupName\": {},\n          \"revision\": {\n            \"shape\": \"Sb\"\n          },\n          \"deploymentConfigName\": {},\n          \"description\": {},\n          \"ignoreApplicationStopFailures\": {\n            \"type\": \"boolean\"\n          },\n          \"targetInstances\": {\n            \"shape\": \"S35\"\n          },\n          \"autoRollbackConfiguration\": {\n            \"shape\": \"S1t\"\n          },\n          \"updateOutdatedInstancesOnly\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"deploymentId\": {}\n        }\n      }\n    },\n    \"CreateDeploymentConfig\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"deploymentConfigName\"\n        ],\n        \"members\": {\n          \"deploymentConfigName\": {},\n          \"minimumHealthyHosts\": {\n            \"shape\": \"S3l\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"deploymentConfigId\": {}\n        }\n      }\n    },\n    \"CreateDeploymentGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"applicationName\",\n          \"deploymentGroupName\",\n          \"serviceRoleArn\"\n        ],\n        \"members\": {\n          \"applicationName\": {},\n          \"deploymentGroupName\": {},\n          \"deploymentConfigName\": {},\n          \"ec2TagFilters\": {\n            \"shape\": \"S18\"\n          },\n          \"onPremisesInstanceTagFilters\": {\n            \"shape\": \"S1b\"\n          },\n          \"autoScalingGroups\": {\n            \"shape\": \"S36\"\n          },\n          \"serviceRoleArn\": {},\n          \"triggerConfigurations\": {\n            \"shape\": \"S1j\"\n          },\n          \"alarmConfiguration\": {\n            \"shape\": \"S1p\"\n          },\n          \"autoRollbackConfiguration\": {\n            \"shape\": \"S1t\"\n          },\n          \"deploymentStyle\": {\n            \"shape\": \"S1w\"\n          },\n          \"blueGreenDeploymentConfiguration\": {\n            \"shape\": \"S1z\"\n          },\n          \"loadBalancerInfo\": {\n            \"shape\": \"S27\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"deploymentGroupId\": {}\n        }\n      }\n    },\n    \"DeleteApplication\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"applicationName\"\n        ],\n        \"members\": {\n          \"applicationName\": {}\n        }\n      }\n    },\n    \"DeleteDeploymentConfig\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"deploymentConfigName\"\n        ],\n        \"members\": {\n          \"deploymentConfigName\": {}\n        }\n      }\n    },\n    \"DeleteDeploymentGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"applicationName\",\n          \"deploymentGroupName\"\n        ],\n        \"members\": {\n          \"applicationName\": {},\n          \"deploymentGroupName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"hooksNotCleanedUp\": {\n            \"shape\": \"S1e\"\n          }\n        }\n      }\n    },\n    \"DeregisterOnPremisesInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"instanceName\"\n        ],\n        \"members\": {\n          \"instanceName\": {}\n        }\n      }\n    },\n    \"GetApplication\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"applicationName\"\n        ],\n        \"members\": {\n          \"applicationName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"application\": {\n            \"shape\": \"Sz\"\n          }\n        }\n      }\n    },\n    \"GetApplicationRevision\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"applicationName\",\n          \"revision\"\n        ],\n        \"members\": {\n          \"applicationName\": {},\n          \"revision\": {\n            \"shape\": \"Sb\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"applicationName\": {},\n          \"revision\": {\n            \"shape\": \"Sb\"\n          },\n          \"revisionInfo\": {\n            \"shape\": \"Sq\"\n          }\n        }\n      }\n    },\n    \"GetDeployment\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"deploymentId\"\n        ],\n        \"members\": {\n          \"deploymentId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"deploymentInfo\": {\n            \"shape\": \"S2x\"\n          }\n        }\n      }\n    },\n    \"GetDeploymentConfig\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"deploymentConfigName\"\n        ],\n        \"members\": {\n          \"deploymentConfigName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"deploymentConfigInfo\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"deploymentConfigId\": {},\n              \"deploymentConfigName\": {},\n              \"minimumHealthyHosts\": {\n                \"shape\": \"S3l\"\n              },\n              \"createTime\": {\n                \"type\": \"timestamp\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"GetDeploymentGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"applicationName\",\n          \"deploymentGroupName\"\n        ],\n        \"members\": {\n          \"applicationName\": {},\n          \"deploymentGroupName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"deploymentGroupInfo\": {\n            \"shape\": \"S15\"\n          }\n        }\n      }\n    },\n    \"GetDeploymentInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"deploymentId\",\n          \"instanceId\"\n        ],\n        \"members\": {\n          \"deploymentId\": {},\n          \"instanceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"instanceSummary\": {\n            \"shape\": \"S2h\"\n          }\n        }\n      }\n    },\n    \"GetOnPremisesInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"instanceName\"\n        ],\n        \"members\": {\n          \"instanceName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"instanceInfo\": {\n            \"shape\": \"S3b\"\n          }\n        }\n      }\n    },\n    \"ListApplicationRevisions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"applicationName\"\n        ],\n        \"members\": {\n          \"applicationName\": {},\n          \"sortBy\": {},\n          \"sortOrder\": {},\n          \"s3Bucket\": {},\n          \"s3KeyPrefix\": {},\n          \"deployed\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"revisions\": {\n            \"shape\": \"Sa\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListApplications\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"applications\": {\n            \"shape\": \"Sw\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListDeploymentConfigs\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"deploymentConfigsList\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListDeploymentGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"applicationName\"\n        ],\n        \"members\": {\n          \"applicationName\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"applicationName\": {},\n          \"deploymentGroups\": {\n            \"shape\": \"Ss\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListDeploymentInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"deploymentId\"\n        ],\n        \"members\": {\n          \"deploymentId\": {},\n          \"nextToken\": {},\n          \"instanceStatusFilter\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"instanceTypeFilter\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"instancesList\": {\n            \"shape\": \"S2d\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListDeployments\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"applicationName\": {},\n          \"deploymentGroupName\": {},\n          \"includeOnlyStatuses\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"createTimeRange\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"start\": {\n                \"type\": \"timestamp\"\n              },\n              \"end\": {\n                \"type\": \"timestamp\"\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"deployments\": {\n            \"shape\": \"S2u\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListOnPremisesInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"registrationStatus\": {},\n          \"tagFilters\": {\n            \"shape\": \"S1b\"\n          },\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"instanceNames\": {\n            \"shape\": \"S6\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"RegisterApplicationRevision\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"applicationName\",\n          \"revision\"\n        ],\n        \"members\": {\n          \"applicationName\": {},\n          \"description\": {},\n          \"revision\": {\n            \"shape\": \"Sb\"\n          }\n        }\n      }\n    },\n    \"RegisterOnPremisesInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"instanceName\"\n        ],\n        \"members\": {\n          \"instanceName\": {},\n          \"iamSessionArn\": {},\n          \"iamUserArn\": {}\n        }\n      }\n    },\n    \"RemoveTagsFromOnPremisesInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"tags\",\n          \"instanceNames\"\n        ],\n        \"members\": {\n          \"tags\": {\n            \"shape\": \"S2\"\n          },\n          \"instanceNames\": {\n            \"shape\": \"S6\"\n          }\n        }\n      }\n    },\n    \"SkipWaitTimeForInstanceTermination\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"deploymentId\": {}\n        }\n      }\n    },\n    \"StopDeployment\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"deploymentId\"\n        ],\n        \"members\": {\n          \"deploymentId\": {},\n          \"autoRollbackEnabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"status\": {},\n          \"statusMessage\": {}\n        }\n      }\n    },\n    \"UpdateApplication\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"applicationName\": {},\n          \"newApplicationName\": {}\n        }\n      }\n    },\n    \"UpdateDeploymentGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"applicationName\",\n          \"currentDeploymentGroupName\"\n        ],\n        \"members\": {\n          \"applicationName\": {},\n          \"currentDeploymentGroupName\": {},\n          \"newDeploymentGroupName\": {},\n          \"deploymentConfigName\": {},\n          \"ec2TagFilters\": {\n            \"shape\": \"S18\"\n          },\n          \"onPremisesInstanceTagFilters\": {\n            \"shape\": \"S1b\"\n          },\n          \"autoScalingGroups\": {\n            \"shape\": \"S36\"\n          },\n          \"serviceRoleArn\": {},\n          \"triggerConfigurations\": {\n            \"shape\": \"S1j\"\n          },\n          \"alarmConfiguration\": {\n            \"shape\": \"S1p\"\n          },\n          \"autoRollbackConfiguration\": {\n            \"shape\": \"S1t\"\n          },\n          \"deploymentStyle\": {\n            \"shape\": \"S1w\"\n          },\n          \"blueGreenDeploymentConfiguration\": {\n            \"shape\": \"S1z\"\n          },\n          \"loadBalancerInfo\": {\n            \"shape\": \"S27\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"hooksNotCleanedUp\": {\n            \"shape\": \"S1e\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S2\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"S6\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sa\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"Sb\"\n      }\n    },\n    \"Sb\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"revisionType\": {},\n        \"s3Location\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"bucket\": {},\n            \"key\": {},\n            \"bundleType\": {},\n            \"version\": {},\n            \"eTag\": {}\n          }\n        },\n        \"gitHubLocation\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"repository\": {},\n            \"commitId\": {}\n          }\n        }\n      }\n    },\n    \"Sq\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"description\": {},\n        \"deploymentGroups\": {\n          \"shape\": \"Ss\"\n        },\n        \"firstUsedTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"lastUsedTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"registerTime\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"Ss\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sw\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sz\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"applicationId\": {},\n        \"applicationName\": {},\n        \"createTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"linkedToGitHub\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S15\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"applicationName\": {},\n        \"deploymentGroupId\": {},\n        \"deploymentGroupName\": {},\n        \"deploymentConfigName\": {},\n        \"ec2TagFilters\": {\n          \"shape\": \"S18\"\n        },\n        \"onPremisesInstanceTagFilters\": {\n          \"shape\": \"S1b\"\n        },\n        \"autoScalingGroups\": {\n          \"shape\": \"S1e\"\n        },\n        \"serviceRoleArn\": {},\n        \"targetRevision\": {\n          \"shape\": \"Sb\"\n        },\n        \"triggerConfigurations\": {\n          \"shape\": \"S1j\"\n        },\n        \"alarmConfiguration\": {\n          \"shape\": \"S1p\"\n        },\n        \"autoRollbackConfiguration\": {\n          \"shape\": \"S1t\"\n        },\n        \"deploymentStyle\": {\n          \"shape\": \"S1w\"\n        },\n        \"blueGreenDeploymentConfiguration\": {\n          \"shape\": \"S1z\"\n        },\n        \"loadBalancerInfo\": {\n          \"shape\": \"S27\"\n        }\n      }\n    },\n    \"S18\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {},\n          \"Type\": {}\n        }\n      }\n    },\n    \"S1b\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {},\n          \"Type\": {}\n        }\n      }\n    },\n    \"S1e\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"name\": {},\n          \"hook\": {}\n        }\n      }\n    },\n    \"S1j\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"triggerName\": {},\n          \"triggerTargetArn\": {},\n          \"triggerEvents\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"S1p\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"enabled\": {\n          \"type\": \"boolean\"\n        },\n        \"ignorePollAlarmFailure\": {\n          \"type\": \"boolean\"\n        },\n        \"alarms\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"name\": {}\n            }\n          }\n        }\n      }\n    },\n    \"S1t\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"enabled\": {\n          \"type\": \"boolean\"\n        },\n        \"events\": {\n          \"type\": \"list\",\n          \"member\": {}\n        }\n      }\n    },\n    \"S1w\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"deploymentType\": {},\n        \"deploymentOption\": {}\n      }\n    },\n    \"S1z\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"terminateBlueInstancesOnDeploymentSuccess\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"action\": {},\n            \"terminationWaitTimeInMinutes\": {\n              \"type\": \"integer\"\n            }\n          }\n        },\n        \"deploymentReadyOption\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"actionOnTimeout\": {},\n            \"waitTimeInMinutes\": {\n              \"type\": \"integer\"\n            }\n          }\n        },\n        \"greenFleetProvisioningOption\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"action\": {}\n          }\n        }\n      }\n    },\n    \"S27\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"elbInfoList\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"name\": {}\n            }\n          }\n        }\n      }\n    },\n    \"S2d\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S2h\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"deploymentId\": {},\n        \"instanceId\": {},\n        \"status\": {},\n        \"lastUpdatedAt\": {\n          \"type\": \"timestamp\"\n        },\n        \"lifecycleEvents\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"lifecycleEventName\": {},\n              \"diagnostics\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"errorCode\": {},\n                  \"scriptName\": {},\n                  \"message\": {},\n                  \"logTail\": {}\n                }\n              },\n              \"startTime\": {\n                \"type\": \"timestamp\"\n              },\n              \"endTime\": {\n                \"type\": \"timestamp\"\n              },\n              \"status\": {}\n            }\n          }\n        },\n        \"instanceType\": {}\n      }\n    },\n    \"S2u\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S2x\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"applicationName\": {},\n        \"deploymentGroupName\": {},\n        \"deploymentConfigName\": {},\n        \"deploymentId\": {},\n        \"revision\": {\n          \"shape\": \"Sb\"\n        },\n        \"status\": {},\n        \"errorInformation\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"code\": {},\n            \"message\": {}\n          }\n        },\n        \"createTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"startTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"completeTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"deploymentOverview\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Pending\": {\n              \"type\": \"long\"\n            },\n            \"InProgress\": {\n              \"type\": \"long\"\n            },\n            \"Succeeded\": {\n              \"type\": \"long\"\n            },\n            \"Failed\": {\n              \"type\": \"long\"\n            },\n            \"Skipped\": {\n              \"type\": \"long\"\n            },\n            \"Ready\": {\n              \"type\": \"long\"\n            }\n          }\n        },\n        \"description\": {},\n        \"creator\": {},\n        \"ignoreApplicationStopFailures\": {\n          \"type\": \"boolean\"\n        },\n        \"autoRollbackConfiguration\": {\n          \"shape\": \"S1t\"\n        },\n        \"updateOutdatedInstancesOnly\": {\n          \"type\": \"boolean\"\n        },\n        \"rollbackInfo\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"rollbackDeploymentId\": {},\n            \"rollbackTriggeringDeploymentId\": {},\n            \"rollbackMessage\": {}\n          }\n        },\n        \"deploymentStyle\": {\n          \"shape\": \"S1w\"\n        },\n        \"targetInstances\": {\n          \"shape\": \"S35\"\n        },\n        \"instanceTerminationWaitTimeStarted\": {\n          \"type\": \"boolean\"\n        },\n        \"blueGreenDeploymentConfiguration\": {\n          \"shape\": \"S1z\"\n        },\n        \"loadBalancerInfo\": {\n          \"shape\": \"S27\"\n        },\n        \"additionalDeploymentStatusInfo\": {}\n      }\n    },\n    \"S35\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"tagFilters\": {\n          \"shape\": \"S18\"\n        },\n        \"autoScalingGroups\": {\n          \"shape\": \"S36\"\n        }\n      }\n    },\n    \"S36\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S3b\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"instanceName\": {},\n        \"iamSessionArn\": {},\n        \"iamUserArn\": {},\n        \"instanceArn\": {},\n        \"registerTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"deregisterTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"tags\": {\n          \"shape\": \"S2\"\n        }\n      }\n    },\n    \"S3l\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"value\": {\n          \"type\": \"integer\"\n        },\n        \"type\": {}\n      }\n    }\n  }\n}\n},{}],21:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n  }\n}\n\n},{}],22:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"DeploymentSuccessful\": {\n      \"delay\": 15,\n      \"operation\": \"GetDeployment\",\n      \"maxAttempts\": 120,\n      \"acceptors\": [\n        {\n          \"expected\": \"Succeeded\",\n          \"matcher\": \"path\",\n          \"state\": \"success\",\n          \"argument\": \"deploymentInfo.status\"\n        },\n        {\n          \"expected\": \"Failed\",\n          \"matcher\": \"path\",\n          \"state\": \"failure\",\n          \"argument\": \"deploymentInfo.status\"\n        },\n        {\n          \"expected\": \"Stopped\",\n          \"matcher\": \"path\",\n          \"state\": \"failure\",\n          \"argument\": \"deploymentInfo.status\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],23:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2015-07-09\",\n    \"endpointPrefix\": \"codepipeline\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"CodePipeline\",\n    \"serviceFullName\": \"AWS CodePipeline\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"CodePipeline_20150709\",\n    \"uid\": \"codepipeline-2015-07-09\"\n  },\n  \"operations\": {\n    \"AcknowledgeJob\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"jobId\",\n          \"nonce\"\n        ],\n        \"members\": {\n          \"jobId\": {},\n          \"nonce\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"status\": {}\n        }\n      }\n    },\n    \"AcknowledgeThirdPartyJob\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"jobId\",\n          \"nonce\",\n          \"clientToken\"\n        ],\n        \"members\": {\n          \"jobId\": {},\n          \"nonce\": {},\n          \"clientToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"status\": {}\n        }\n      }\n    },\n    \"CreateCustomActionType\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"category\",\n          \"provider\",\n          \"version\",\n          \"inputArtifactDetails\",\n          \"outputArtifactDetails\"\n        ],\n        \"members\": {\n          \"category\": {},\n          \"provider\": {},\n          \"version\": {},\n          \"settings\": {\n            \"shape\": \"Se\"\n          },\n          \"configurationProperties\": {\n            \"shape\": \"Sh\"\n          },\n          \"inputArtifactDetails\": {\n            \"shape\": \"Sn\"\n          },\n          \"outputArtifactDetails\": {\n            \"shape\": \"Sn\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"actionType\"\n        ],\n        \"members\": {\n          \"actionType\": {\n            \"shape\": \"Sr\"\n          }\n        }\n      }\n    },\n    \"CreatePipeline\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"pipeline\"\n        ],\n        \"members\": {\n          \"pipeline\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"pipeline\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    },\n    \"DeleteCustomActionType\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"category\",\n          \"provider\",\n          \"version\"\n        ],\n        \"members\": {\n          \"category\": {},\n          \"provider\": {},\n          \"version\": {}\n        }\n      }\n    },\n    \"DeletePipeline\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"name\"\n        ],\n        \"members\": {\n          \"name\": {}\n        }\n      }\n    },\n    \"DisableStageTransition\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"pipelineName\",\n          \"stageName\",\n          \"transitionType\",\n          \"reason\"\n        ],\n        \"members\": {\n          \"pipelineName\": {},\n          \"stageName\": {},\n          \"transitionType\": {},\n          \"reason\": {}\n        }\n      }\n    },\n    \"EnableStageTransition\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"pipelineName\",\n          \"stageName\",\n          \"transitionType\"\n        ],\n        \"members\": {\n          \"pipelineName\": {},\n          \"stageName\": {},\n          \"transitionType\": {}\n        }\n      }\n    },\n    \"GetJobDetails\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"jobId\"\n        ],\n        \"members\": {\n          \"jobId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"jobDetails\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"id\": {},\n              \"data\": {\n                \"shape\": \"S1x\"\n              },\n              \"accountId\": {}\n            }\n          }\n        }\n      }\n    },\n    \"GetPipeline\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"name\"\n        ],\n        \"members\": {\n          \"name\": {},\n          \"version\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"pipeline\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    },\n    \"GetPipelineExecution\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"pipelineName\",\n          \"pipelineExecutionId\"\n        ],\n        \"members\": {\n          \"pipelineName\": {},\n          \"pipelineExecutionId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"pipelineExecution\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"pipelineName\": {},\n              \"pipelineVersion\": {\n                \"type\": \"integer\"\n              },\n              \"pipelineExecutionId\": {},\n              \"status\": {},\n              \"artifactRevisions\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"name\": {},\n                    \"revisionId\": {},\n                    \"revisionChangeIdentifier\": {},\n                    \"revisionSummary\": {},\n                    \"created\": {\n                      \"type\": \"timestamp\"\n                    },\n                    \"revisionUrl\": {}\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"GetPipelineState\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"name\"\n        ],\n        \"members\": {\n          \"name\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"pipelineName\": {},\n          \"pipelineVersion\": {\n            \"type\": \"integer\"\n          },\n          \"stageStates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"stageName\": {},\n                \"inboundTransitionState\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"enabled\": {\n                      \"type\": \"boolean\"\n                    },\n                    \"lastChangedBy\": {},\n                    \"lastChangedAt\": {\n                      \"type\": \"timestamp\"\n                    },\n                    \"disabledReason\": {}\n                  }\n                },\n                \"actionStates\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"actionName\": {},\n                      \"currentRevision\": {\n                        \"shape\": \"S32\"\n                      },\n                      \"latestExecution\": {\n                        \"type\": \"structure\",\n                        \"members\": {\n                          \"status\": {},\n                          \"summary\": {},\n                          \"lastStatusChange\": {\n                            \"type\": \"timestamp\"\n                          },\n                          \"token\": {},\n                          \"lastUpdatedBy\": {},\n                          \"externalExecutionId\": {},\n                          \"externalExecutionUrl\": {},\n                          \"percentComplete\": {\n                            \"type\": \"integer\"\n                          },\n                          \"errorDetails\": {\n                            \"type\": \"structure\",\n                            \"members\": {\n                              \"code\": {},\n                              \"message\": {}\n                            }\n                          }\n                        }\n                      },\n                      \"entityUrl\": {},\n                      \"revisionUrl\": {}\n                    }\n                  }\n                },\n                \"latestExecution\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"pipelineExecutionId\",\n                    \"status\"\n                  ],\n                  \"members\": {\n                    \"pipelineExecutionId\": {},\n                    \"status\": {}\n                  }\n                }\n              }\n            }\n          },\n          \"created\": {\n            \"type\": \"timestamp\"\n          },\n          \"updated\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"GetThirdPartyJobDetails\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"jobId\",\n          \"clientToken\"\n        ],\n        \"members\": {\n          \"jobId\": {},\n          \"clientToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"jobDetails\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"id\": {},\n              \"data\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"actionTypeId\": {\n                    \"shape\": \"Ss\"\n                  },\n                  \"actionConfiguration\": {\n                    \"shape\": \"S1y\"\n                  },\n                  \"pipelineContext\": {\n                    \"shape\": \"S1z\"\n                  },\n                  \"inputArtifacts\": {\n                    \"shape\": \"S22\"\n                  },\n                  \"outputArtifacts\": {\n                    \"shape\": \"S22\"\n                  },\n                  \"artifactCredentials\": {\n                    \"shape\": \"S2a\"\n                  },\n                  \"continuationToken\": {},\n                  \"encryptionKey\": {\n                    \"shape\": \"S11\"\n                  }\n                }\n              },\n              \"nonce\": {}\n            }\n          }\n        }\n      }\n    },\n    \"ListActionTypes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"actionOwnerFilter\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"actionTypes\"\n        ],\n        \"members\": {\n          \"actionTypes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sr\"\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListPipelines\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"pipelines\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"name\": {},\n                \"version\": {\n                  \"type\": \"integer\"\n                },\n                \"created\": {\n                  \"type\": \"timestamp\"\n                },\n                \"updated\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"PollForJobs\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"actionTypeId\"\n        ],\n        \"members\": {\n          \"actionTypeId\": {\n            \"shape\": \"Ss\"\n          },\n          \"maxBatchSize\": {\n            \"type\": \"integer\"\n          },\n          \"queryParam\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"jobs\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"id\": {},\n                \"data\": {\n                  \"shape\": \"S1x\"\n                },\n                \"nonce\": {},\n                \"accountId\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"PollForThirdPartyJobs\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"actionTypeId\"\n        ],\n        \"members\": {\n          \"actionTypeId\": {\n            \"shape\": \"Ss\"\n          },\n          \"maxBatchSize\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"jobs\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"clientId\": {},\n                \"jobId\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"PutActionRevision\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"pipelineName\",\n          \"stageName\",\n          \"actionName\",\n          \"actionRevision\"\n        ],\n        \"members\": {\n          \"pipelineName\": {},\n          \"stageName\": {},\n          \"actionName\": {},\n          \"actionRevision\": {\n            \"shape\": \"S32\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"newRevision\": {\n            \"type\": \"boolean\"\n          },\n          \"pipelineExecutionId\": {}\n        }\n      }\n    },\n    \"PutApprovalResult\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"pipelineName\",\n          \"stageName\",\n          \"actionName\",\n          \"result\",\n          \"token\"\n        ],\n        \"members\": {\n          \"pipelineName\": {},\n          \"stageName\": {},\n          \"actionName\": {},\n          \"result\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"summary\",\n              \"status\"\n            ],\n            \"members\": {\n              \"summary\": {},\n              \"status\": {}\n            }\n          },\n          \"token\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"approvedAt\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"PutJobFailureResult\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"jobId\",\n          \"failureDetails\"\n        ],\n        \"members\": {\n          \"jobId\": {},\n          \"failureDetails\": {\n            \"shape\": \"S4c\"\n          }\n        }\n      }\n    },\n    \"PutJobSuccessResult\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"jobId\"\n        ],\n        \"members\": {\n          \"jobId\": {},\n          \"currentRevision\": {\n            \"shape\": \"S4f\"\n          },\n          \"continuationToken\": {},\n          \"executionDetails\": {\n            \"shape\": \"S4h\"\n          }\n        }\n      }\n    },\n    \"PutThirdPartyJobFailureResult\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"jobId\",\n          \"clientToken\",\n          \"failureDetails\"\n        ],\n        \"members\": {\n          \"jobId\": {},\n          \"clientToken\": {},\n          \"failureDetails\": {\n            \"shape\": \"S4c\"\n          }\n        }\n      }\n    },\n    \"PutThirdPartyJobSuccessResult\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"jobId\",\n          \"clientToken\"\n        ],\n        \"members\": {\n          \"jobId\": {},\n          \"clientToken\": {},\n          \"currentRevision\": {\n            \"shape\": \"S4f\"\n          },\n          \"continuationToken\": {},\n          \"executionDetails\": {\n            \"shape\": \"S4h\"\n          }\n        }\n      }\n    },\n    \"RetryStageExecution\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"pipelineName\",\n          \"stageName\",\n          \"pipelineExecutionId\",\n          \"retryMode\"\n        ],\n        \"members\": {\n          \"pipelineName\": {},\n          \"stageName\": {},\n          \"pipelineExecutionId\": {},\n          \"retryMode\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"pipelineExecutionId\": {}\n        }\n      }\n    },\n    \"StartPipelineExecution\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"name\"\n        ],\n        \"members\": {\n          \"name\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"pipelineExecutionId\": {}\n        }\n      }\n    },\n    \"UpdatePipeline\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"pipeline\"\n        ],\n        \"members\": {\n          \"pipeline\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"pipeline\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"Se\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"thirdPartyConfigurationUrl\": {},\n        \"entityUrlTemplate\": {},\n        \"executionUrlTemplate\": {},\n        \"revisionUrlTemplate\": {}\n      }\n    },\n    \"Sh\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"name\",\n          \"required\",\n          \"key\",\n          \"secret\"\n        ],\n        \"members\": {\n          \"name\": {},\n          \"required\": {\n            \"type\": \"boolean\"\n          },\n          \"key\": {\n            \"type\": \"boolean\"\n          },\n          \"secret\": {\n            \"type\": \"boolean\"\n          },\n          \"queryable\": {\n            \"type\": \"boolean\"\n          },\n          \"description\": {},\n          \"type\": {}\n        }\n      }\n    },\n    \"Sn\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"minimumCount\",\n        \"maximumCount\"\n      ],\n      \"members\": {\n        \"minimumCount\": {\n          \"type\": \"integer\"\n        },\n        \"maximumCount\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"Sr\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"id\",\n        \"inputArtifactDetails\",\n        \"outputArtifactDetails\"\n      ],\n      \"members\": {\n        \"id\": {\n          \"shape\": \"Ss\"\n        },\n        \"settings\": {\n          \"shape\": \"Se\"\n        },\n        \"actionConfigurationProperties\": {\n          \"shape\": \"Sh\"\n        },\n        \"inputArtifactDetails\": {\n          \"shape\": \"Sn\"\n        },\n        \"outputArtifactDetails\": {\n          \"shape\": \"Sn\"\n        }\n      }\n    },\n    \"Ss\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"category\",\n        \"owner\",\n        \"provider\",\n        \"version\"\n      ],\n      \"members\": {\n        \"category\": {},\n        \"owner\": {},\n        \"provider\": {},\n        \"version\": {}\n      }\n    },\n    \"Sv\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"name\",\n        \"roleArn\",\n        \"artifactStore\",\n        \"stages\"\n      ],\n      \"members\": {\n        \"name\": {},\n        \"roleArn\": {},\n        \"artifactStore\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"type\",\n            \"location\"\n          ],\n          \"members\": {\n            \"type\": {},\n            \"location\": {},\n            \"encryptionKey\": {\n              \"shape\": \"S11\"\n            }\n          }\n        },\n        \"stages\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"name\",\n              \"actions\"\n            ],\n            \"members\": {\n              \"name\": {},\n              \"blockers\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"name\",\n                    \"type\"\n                  ],\n                  \"members\": {\n                    \"name\": {},\n                    \"type\": {}\n                  }\n                }\n              },\n              \"actions\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"name\",\n                    \"actionTypeId\"\n                  ],\n                  \"members\": {\n                    \"name\": {},\n                    \"actionTypeId\": {\n                      \"shape\": \"Ss\"\n                    },\n                    \"runOrder\": {\n                      \"type\": \"integer\"\n                    },\n                    \"configuration\": {\n                      \"shape\": \"S1f\"\n                    },\n                    \"outputArtifacts\": {\n                      \"type\": \"list\",\n                      \"member\": {\n                        \"type\": \"structure\",\n                        \"required\": [\n                          \"name\"\n                        ],\n                        \"members\": {\n                          \"name\": {}\n                        }\n                      }\n                    },\n                    \"inputArtifacts\": {\n                      \"type\": \"list\",\n                      \"member\": {\n                        \"type\": \"structure\",\n                        \"required\": [\n                          \"name\"\n                        ],\n                        \"members\": {\n                          \"name\": {}\n                        }\n                      }\n                    },\n                    \"roleArn\": {}\n                  }\n                }\n              }\n            }\n          }\n        },\n        \"version\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"S11\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"id\",\n        \"type\"\n      ],\n      \"members\": {\n        \"id\": {},\n        \"type\": {}\n      }\n    },\n    \"S1f\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S1x\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"actionTypeId\": {\n          \"shape\": \"Ss\"\n        },\n        \"actionConfiguration\": {\n          \"shape\": \"S1y\"\n        },\n        \"pipelineContext\": {\n          \"shape\": \"S1z\"\n        },\n        \"inputArtifacts\": {\n          \"shape\": \"S22\"\n        },\n        \"outputArtifacts\": {\n          \"shape\": \"S22\"\n        },\n        \"artifactCredentials\": {\n          \"shape\": \"S2a\"\n        },\n        \"continuationToken\": {},\n        \"encryptionKey\": {\n          \"shape\": \"S11\"\n        }\n      }\n    },\n    \"S1y\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"configuration\": {\n          \"shape\": \"S1f\"\n        }\n      }\n    },\n    \"S1z\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"pipelineName\": {},\n        \"stage\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"name\": {}\n          }\n        },\n        \"action\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"name\": {}\n          }\n        }\n      }\n    },\n    \"S22\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"name\": {},\n          \"revision\": {},\n          \"location\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"type\": {},\n              \"s3Location\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"bucketName\",\n                  \"objectKey\"\n                ],\n                \"members\": {\n                  \"bucketName\": {},\n                  \"objectKey\": {}\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S2a\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"accessKeyId\",\n        \"secretAccessKey\",\n        \"sessionToken\"\n      ],\n      \"members\": {\n        \"accessKeyId\": {},\n        \"secretAccessKey\": {},\n        \"sessionToken\": {}\n      },\n      \"sensitive\": true\n    },\n    \"S32\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"revisionId\",\n        \"revisionChangeId\",\n        \"created\"\n      ],\n      \"members\": {\n        \"revisionId\": {},\n        \"revisionChangeId\": {},\n        \"created\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S4c\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"type\",\n        \"message\"\n      ],\n      \"members\": {\n        \"type\": {},\n        \"message\": {},\n        \"externalExecutionId\": {}\n      }\n    },\n    \"S4f\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"revision\",\n        \"changeIdentifier\"\n      ],\n      \"members\": {\n        \"revision\": {},\n        \"changeIdentifier\": {},\n        \"created\": {\n          \"type\": \"timestamp\"\n        },\n        \"revisionSummary\": {}\n      }\n    },\n    \"S4h\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"summary\": {},\n        \"externalExecutionId\": {},\n        \"percentComplete\": {\n          \"type\": \"integer\"\n        }\n      }\n    }\n  }\n}\n},{}],24:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2014-06-30\",\n    \"endpointPrefix\": \"cognito-identity\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"Amazon Cognito Identity\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"AWSCognitoIdentityService\",\n    \"uid\": \"cognito-identity-2014-06-30\"\n  },\n  \"operations\": {\n    \"CreateIdentityPool\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolName\",\n          \"AllowUnauthenticatedIdentities\"\n        ],\n        \"members\": {\n          \"IdentityPoolName\": {},\n          \"AllowUnauthenticatedIdentities\": {\n            \"type\": \"boolean\"\n          },\n          \"SupportedLoginProviders\": {\n            \"shape\": \"S4\"\n          },\n          \"DeveloperProviderName\": {},\n          \"OpenIdConnectProviderARNs\": {\n            \"shape\": \"S8\"\n          },\n          \"CognitoIdentityProviders\": {\n            \"shape\": \"Sa\"\n          },\n          \"SamlProviderARNs\": {\n            \"shape\": \"Sf\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sg\"\n      }\n    },\n    \"DeleteIdentities\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityIdsToDelete\"\n        ],\n        \"members\": {\n          \"IdentityIdsToDelete\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UnprocessedIdentityIds\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"IdentityId\": {},\n                \"ErrorCode\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DeleteIdentityPool\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {}\n        }\n      }\n    },\n    \"DescribeIdentity\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityId\"\n        ],\n        \"members\": {\n          \"IdentityId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sr\"\n      }\n    },\n    \"DescribeIdentityPool\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sg\"\n      }\n    },\n    \"GetCredentialsForIdentity\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityId\"\n        ],\n        \"members\": {\n          \"IdentityId\": {},\n          \"Logins\": {\n            \"shape\": \"Sw\"\n          },\n          \"CustomRoleArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityId\": {},\n          \"Credentials\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"AccessKeyId\": {},\n              \"SecretKey\": {},\n              \"SessionToken\": {},\n              \"Expiration\": {\n                \"type\": \"timestamp\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"GetId\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\"\n        ],\n        \"members\": {\n          \"AccountId\": {},\n          \"IdentityPoolId\": {},\n          \"Logins\": {\n            \"shape\": \"Sw\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityId\": {}\n        }\n      }\n    },\n    \"GetIdentityPoolRoles\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityPoolId\": {},\n          \"Roles\": {\n            \"shape\": \"S18\"\n          },\n          \"RoleMappings\": {\n            \"shape\": \"S1a\"\n          }\n        }\n      }\n    },\n    \"GetOpenIdToken\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityId\"\n        ],\n        \"members\": {\n          \"IdentityId\": {},\n          \"Logins\": {\n            \"shape\": \"Sw\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityId\": {},\n          \"Token\": {}\n        }\n      }\n    },\n    \"GetOpenIdTokenForDeveloperIdentity\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\",\n          \"Logins\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {},\n          \"IdentityId\": {},\n          \"Logins\": {\n            \"shape\": \"Sw\"\n          },\n          \"TokenDuration\": {\n            \"type\": \"long\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityId\": {},\n          \"Token\": {}\n        }\n      }\n    },\n    \"ListIdentities\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\",\n          \"MaxResults\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {},\n          \"HideDisabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityPoolId\": {},\n          \"Identities\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sr\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListIdentityPools\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"MaxResults\"\n        ],\n        \"members\": {\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityPools\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"IdentityPoolId\": {},\n                \"IdentityPoolName\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"LookupDeveloperIdentity\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {},\n          \"IdentityId\": {},\n          \"DeveloperUserIdentifier\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityId\": {},\n          \"DeveloperUserIdentifierList\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"MergeDeveloperIdentities\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceUserIdentifier\",\n          \"DestinationUserIdentifier\",\n          \"DeveloperProviderName\",\n          \"IdentityPoolId\"\n        ],\n        \"members\": {\n          \"SourceUserIdentifier\": {},\n          \"DestinationUserIdentifier\": {},\n          \"DeveloperProviderName\": {},\n          \"IdentityPoolId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityId\": {}\n        }\n      }\n    },\n    \"SetIdentityPoolRoles\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\",\n          \"Roles\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {},\n          \"Roles\": {\n            \"shape\": \"S18\"\n          },\n          \"RoleMappings\": {\n            \"shape\": \"S1a\"\n          }\n        }\n      }\n    },\n    \"UnlinkDeveloperIdentity\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityId\",\n          \"IdentityPoolId\",\n          \"DeveloperProviderName\",\n          \"DeveloperUserIdentifier\"\n        ],\n        \"members\": {\n          \"IdentityId\": {},\n          \"IdentityPoolId\": {},\n          \"DeveloperProviderName\": {},\n          \"DeveloperUserIdentifier\": {}\n        }\n      }\n    },\n    \"UnlinkIdentity\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityId\",\n          \"Logins\",\n          \"LoginsToRemove\"\n        ],\n        \"members\": {\n          \"IdentityId\": {},\n          \"Logins\": {\n            \"shape\": \"Sw\"\n          },\n          \"LoginsToRemove\": {\n            \"shape\": \"Ss\"\n          }\n        }\n      }\n    },\n    \"UpdateIdentityPool\": {\n      \"input\": {\n        \"shape\": \"Sg\"\n      },\n      \"output\": {\n        \"shape\": \"Sg\"\n      }\n    }\n  },\n  \"shapes\": {\n    \"S4\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S8\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sa\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProviderName\": {},\n          \"ClientId\": {},\n          \"ServerSideTokenCheck\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"Sf\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sg\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"IdentityPoolId\",\n        \"IdentityPoolName\",\n        \"AllowUnauthenticatedIdentities\"\n      ],\n      \"members\": {\n        \"IdentityPoolId\": {},\n        \"IdentityPoolName\": {},\n        \"AllowUnauthenticatedIdentities\": {\n          \"type\": \"boolean\"\n        },\n        \"SupportedLoginProviders\": {\n          \"shape\": \"S4\"\n        },\n        \"DeveloperProviderName\": {},\n        \"OpenIdConnectProviderARNs\": {\n          \"shape\": \"S8\"\n        },\n        \"CognitoIdentityProviders\": {\n          \"shape\": \"Sa\"\n        },\n        \"SamlProviderARNs\": {\n          \"shape\": \"Sf\"\n        }\n      }\n    },\n    \"Sr\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"IdentityId\": {},\n        \"Logins\": {\n          \"shape\": \"Ss\"\n        },\n        \"CreationDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"LastModifiedDate\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"Ss\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sw\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S18\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S1a\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Type\"\n        ],\n        \"members\": {\n          \"Type\": {},\n          \"AmbiguousRoleResolution\": {},\n          \"RulesConfiguration\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"Rules\"\n            ],\n            \"members\": {\n              \"Rules\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"Claim\",\n                    \"MatchType\",\n                    \"Value\",\n                    \"RoleARN\"\n                  ],\n                  \"members\": {\n                    \"Claim\": {},\n                    \"MatchType\": {},\n                    \"Value\": {},\n                    \"RoleARN\": {}\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n},{}],25:[function(require,module,exports){\narguments[4][21][0].apply(exports,arguments)\n},{\"dup\":21}],26:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2016-04-18\",\n    \"endpointPrefix\": \"cognito-idp\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"Amazon Cognito Identity Provider\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"AWSCognitoIdentityProviderService\",\n    \"uid\": \"cognito-idp-2016-04-18\"\n  },\n  \"operations\": {\n    \"AddCustomAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"CustomAttributes\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"CustomAttributes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4\"\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"AdminAddUserToGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\",\n          \"GroupName\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"GroupName\": {}\n        }\n      }\n    },\n    \"AdminConfirmSignUp\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"AdminCreateUser\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"UserAttributes\": {\n            \"shape\": \"Si\"\n          },\n          \"ValidationData\": {\n            \"shape\": \"Si\"\n          },\n          \"TemporaryPassword\": {\n            \"shape\": \"Sm\"\n          },\n          \"ForceAliasCreation\": {\n            \"type\": \"boolean\"\n          },\n          \"MessageAction\": {},\n          \"DesiredDeliveryMediums\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"User\": {\n            \"shape\": \"Ss\"\n          }\n        }\n      }\n    },\n    \"AdminDeleteUser\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"AdminDeleteUserAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\",\n          \"UserAttributeNames\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"UserAttributeNames\": {\n            \"shape\": \"Sz\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"AdminDisableUser\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"AdminEnableUser\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"AdminForgetDevice\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\",\n          \"DeviceKey\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"DeviceKey\": {}\n        }\n      }\n    },\n    \"AdminGetDevice\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DeviceKey\",\n          \"UserPoolId\",\n          \"Username\"\n        ],\n        \"members\": {\n          \"DeviceKey\": {},\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Device\"\n        ],\n        \"members\": {\n          \"Device\": {\n            \"shape\": \"S19\"\n          }\n        }\n      }\n    },\n    \"AdminGetUser\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Username\"\n        ],\n        \"members\": {\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"UserAttributes\": {\n            \"shape\": \"Si\"\n          },\n          \"UserCreateDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"UserLastModifiedDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          },\n          \"UserStatus\": {},\n          \"MFAOptions\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    },\n    \"AdminInitiateAuth\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"ClientId\",\n          \"AuthFlow\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"ClientId\": {\n            \"shape\": \"S1d\"\n          },\n          \"AuthFlow\": {},\n          \"AuthParameters\": {\n            \"shape\": \"S1f\"\n          },\n          \"ClientMetadata\": {\n            \"shape\": \"S1g\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChallengeName\": {},\n          \"Session\": {},\n          \"ChallengeParameters\": {\n            \"shape\": \"S1k\"\n          },\n          \"AuthenticationResult\": {\n            \"shape\": \"S1l\"\n          }\n        }\n      }\n    },\n    \"AdminListDevices\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"PaginationToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Devices\": {\n            \"shape\": \"S1t\"\n          },\n          \"PaginationToken\": {}\n        }\n      }\n    },\n    \"AdminListGroupsForUser\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Username\",\n          \"UserPoolId\"\n        ],\n        \"members\": {\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"UserPoolId\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Groups\": {\n            \"shape\": \"S1x\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"AdminRemoveUserFromGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\",\n          \"GroupName\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"GroupName\": {}\n        }\n      }\n    },\n    \"AdminResetUserPassword\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"AdminRespondToAuthChallenge\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"ClientId\",\n          \"ChallengeName\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"ClientId\": {\n            \"shape\": \"S1d\"\n          },\n          \"ChallengeName\": {},\n          \"ChallengeResponses\": {\n            \"shape\": \"S26\"\n          },\n          \"Session\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChallengeName\": {},\n          \"Session\": {},\n          \"ChallengeParameters\": {\n            \"shape\": \"S1k\"\n          },\n          \"AuthenticationResult\": {\n            \"shape\": \"S1l\"\n          }\n        }\n      }\n    },\n    \"AdminSetUserSettings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\",\n          \"MFAOptions\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"MFAOptions\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"AdminUpdateDeviceStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\",\n          \"DeviceKey\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"DeviceKey\": {},\n          \"DeviceRememberedStatus\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"AdminUpdateUserAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\",\n          \"UserAttributes\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"UserAttributes\": {\n            \"shape\": \"Si\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"AdminUserGlobalSignOut\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"Username\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Username\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"ChangePassword\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PreviousPassword\",\n          \"ProposedPassword\"\n        ],\n        \"members\": {\n          \"PreviousPassword\": {\n            \"shape\": \"Sm\"\n          },\n          \"ProposedPassword\": {\n            \"shape\": \"Sm\"\n          },\n          \"AccessToken\": {\n            \"shape\": \"S1m\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"authtype\": \"none\"\n    },\n    \"ConfirmDevice\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AccessToken\",\n          \"DeviceKey\"\n        ],\n        \"members\": {\n          \"AccessToken\": {\n            \"shape\": \"S1m\"\n          },\n          \"DeviceKey\": {},\n          \"DeviceSecretVerifierConfig\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"PasswordVerifier\": {},\n              \"Salt\": {}\n            }\n          },\n          \"DeviceName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserConfirmationNecessary\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ConfirmForgotPassword\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClientId\",\n          \"Username\",\n          \"ConfirmationCode\",\n          \"Password\"\n        ],\n        \"members\": {\n          \"ClientId\": {\n            \"shape\": \"S1d\"\n          },\n          \"SecretHash\": {\n            \"shape\": \"S2o\"\n          },\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"ConfirmationCode\": {},\n          \"Password\": {\n            \"shape\": \"Sm\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"authtype\": \"none\"\n    },\n    \"ConfirmSignUp\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClientId\",\n          \"Username\",\n          \"ConfirmationCode\"\n        ],\n        \"members\": {\n          \"ClientId\": {\n            \"shape\": \"S1d\"\n          },\n          \"SecretHash\": {\n            \"shape\": \"S2o\"\n          },\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"ConfirmationCode\": {},\n          \"ForceAliasCreation\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"authtype\": \"none\"\n    },\n    \"CreateGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GroupName\",\n          \"UserPoolId\"\n        ],\n        \"members\": {\n          \"GroupName\": {},\n          \"UserPoolId\": {},\n          \"Description\": {},\n          \"RoleArn\": {},\n          \"Precedence\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Group\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"CreateUserImportJob\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"JobName\",\n          \"UserPoolId\",\n          \"CloudWatchLogsRoleArn\"\n        ],\n        \"members\": {\n          \"JobName\": {},\n          \"UserPoolId\": {},\n          \"CloudWatchLogsRoleArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserImportJob\": {\n            \"shape\": \"S2y\"\n          }\n        }\n      }\n    },\n    \"CreateUserPool\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PoolName\"\n        ],\n        \"members\": {\n          \"PoolName\": {},\n          \"Policies\": {\n            \"shape\": \"S36\"\n          },\n          \"LambdaConfig\": {\n            \"shape\": \"S39\"\n          },\n          \"AutoVerifiedAttributes\": {\n            \"shape\": \"S3a\"\n          },\n          \"AliasAttributes\": {\n            \"shape\": \"S3c\"\n          },\n          \"SmsVerificationMessage\": {},\n          \"EmailVerificationMessage\": {},\n          \"EmailVerificationSubject\": {},\n          \"SmsAuthenticationMessage\": {},\n          \"MfaConfiguration\": {},\n          \"DeviceConfiguration\": {\n            \"shape\": \"S3i\"\n          },\n          \"EmailConfiguration\": {\n            \"shape\": \"S3j\"\n          },\n          \"SmsConfiguration\": {\n            \"shape\": \"S3l\"\n          },\n          \"UserPoolTags\": {\n            \"shape\": \"S3m\"\n          },\n          \"AdminCreateUserConfig\": {\n            \"shape\": \"S3n\"\n          },\n          \"Schema\": {\n            \"shape\": \"S3q\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserPool\": {\n            \"shape\": \"S3s\"\n          }\n        }\n      }\n    },\n    \"CreateUserPoolClient\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"ClientName\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"ClientName\": {},\n          \"GenerateSecret\": {\n            \"type\": \"boolean\"\n          },\n          \"RefreshTokenValidity\": {\n            \"type\": \"integer\"\n          },\n          \"ReadAttributes\": {\n            \"shape\": \"S3y\"\n          },\n          \"WriteAttributes\": {\n            \"shape\": \"S3y\"\n          },\n          \"ExplicitAuthFlows\": {\n            \"shape\": \"S40\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserPoolClient\": {\n            \"shape\": \"S43\"\n          }\n        }\n      }\n    },\n    \"DeleteGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GroupName\",\n          \"UserPoolId\"\n        ],\n        \"members\": {\n          \"GroupName\": {},\n          \"UserPoolId\": {}\n        }\n      }\n    },\n    \"DeleteUser\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AccessToken\": {\n            \"shape\": \"S1m\"\n          }\n        }\n      },\n      \"authtype\": \"none\"\n    },\n    \"DeleteUserAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserAttributeNames\"\n        ],\n        \"members\": {\n          \"UserAttributeNames\": {\n            \"shape\": \"Sz\"\n          },\n          \"AccessToken\": {\n            \"shape\": \"S1m\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"authtype\": \"none\"\n    },\n    \"DeleteUserPool\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {}\n        }\n      }\n    },\n    \"DeleteUserPoolClient\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"ClientId\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"ClientId\": {\n            \"shape\": \"S1d\"\n          }\n        }\n      }\n    },\n    \"DescribeUserImportJob\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"JobId\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"JobId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserImportJob\": {\n            \"shape\": \"S2y\"\n          }\n        }\n      }\n    },\n    \"DescribeUserPool\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserPool\": {\n            \"shape\": \"S3s\"\n          }\n        }\n      }\n    },\n    \"DescribeUserPoolClient\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"ClientId\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"ClientId\": {\n            \"shape\": \"S1d\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserPoolClient\": {\n            \"shape\": \"S43\"\n          }\n        }\n      }\n    },\n    \"ForgetDevice\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DeviceKey\"\n        ],\n        \"members\": {\n          \"AccessToken\": {\n            \"shape\": \"S1m\"\n          },\n          \"DeviceKey\": {}\n        }\n      }\n    },\n    \"ForgotPassword\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClientId\",\n          \"Username\"\n        ],\n        \"members\": {\n          \"ClientId\": {\n            \"shape\": \"S1d\"\n          },\n          \"SecretHash\": {\n            \"shape\": \"S2o\"\n          },\n          \"Username\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CodeDeliveryDetails\": {\n            \"shape\": \"S4k\"\n          }\n        }\n      },\n      \"authtype\": \"none\"\n    },\n    \"GetCSVHeader\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserPoolId\": {},\n          \"CSVHeader\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"GetDevice\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DeviceKey\"\n        ],\n        \"members\": {\n          \"DeviceKey\": {},\n          \"AccessToken\": {\n            \"shape\": \"S1m\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Device\"\n        ],\n        \"members\": {\n          \"Device\": {\n            \"shape\": \"S19\"\n          }\n        }\n      }\n    },\n    \"GetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GroupName\",\n          \"UserPoolId\"\n        ],\n        \"members\": {\n          \"GroupName\": {},\n          \"UserPoolId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Group\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"GetUser\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AccessToken\": {\n            \"shape\": \"S1m\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Username\",\n          \"UserAttributes\"\n        ],\n        \"members\": {\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"UserAttributes\": {\n            \"shape\": \"Si\"\n          },\n          \"MFAOptions\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      },\n      \"authtype\": \"none\"\n    },\n    \"GetUserAttributeVerificationCode\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AttributeName\"\n        ],\n        \"members\": {\n          \"AccessToken\": {\n            \"shape\": \"S1m\"\n          },\n          \"AttributeName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CodeDeliveryDetails\": {\n            \"shape\": \"S4k\"\n          }\n        }\n      },\n      \"authtype\": \"none\"\n    },\n    \"GlobalSignOut\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AccessToken\": {\n            \"shape\": \"S1m\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"InitiateAuth\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AuthFlow\",\n          \"ClientId\"\n        ],\n        \"members\": {\n          \"AuthFlow\": {},\n          \"AuthParameters\": {\n            \"shape\": \"S1f\"\n          },\n          \"ClientMetadata\": {\n            \"shape\": \"S1g\"\n          },\n          \"ClientId\": {\n            \"shape\": \"S1d\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChallengeName\": {},\n          \"Session\": {},\n          \"ChallengeParameters\": {\n            \"shape\": \"S1k\"\n          },\n          \"AuthenticationResult\": {\n            \"shape\": \"S1l\"\n          }\n        }\n      }\n    },\n    \"ListDevices\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AccessToken\"\n        ],\n        \"members\": {\n          \"AccessToken\": {\n            \"shape\": \"S1m\"\n          },\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"PaginationToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Devices\": {\n            \"shape\": \"S1t\"\n          },\n          \"PaginationToken\": {}\n        }\n      }\n    },\n    \"ListGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Groups\": {\n            \"shape\": \"S1x\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListUserImportJobs\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"MaxResults\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"PaginationToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserImportJobs\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S2y\"\n            }\n          },\n          \"PaginationToken\": {}\n        }\n      }\n    },\n    \"ListUserPoolClients\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserPoolClients\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ClientId\": {\n                  \"shape\": \"S1d\"\n                },\n                \"UserPoolId\": {},\n                \"ClientName\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListUserPools\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"MaxResults\"\n        ],\n        \"members\": {\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserPools\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Id\": {},\n                \"Name\": {},\n                \"LambdaConfig\": {\n                  \"shape\": \"S39\"\n                },\n                \"Status\": {},\n                \"LastModifiedDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"CreationDate\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListUsers\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"AttributesToGet\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"PaginationToken\": {},\n          \"Filter\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Users\": {\n            \"shape\": \"S5m\"\n          },\n          \"PaginationToken\": {}\n        }\n      }\n    },\n    \"ListUsersInGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"GroupName\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"GroupName\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Users\": {\n            \"shape\": \"S5m\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ResendConfirmationCode\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClientId\",\n          \"Username\"\n        ],\n        \"members\": {\n          \"ClientId\": {\n            \"shape\": \"S1d\"\n          },\n          \"SecretHash\": {\n            \"shape\": \"S2o\"\n          },\n          \"Username\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CodeDeliveryDetails\": {\n            \"shape\": \"S4k\"\n          }\n        }\n      },\n      \"authtype\": \"none\"\n    },\n    \"RespondToAuthChallenge\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClientId\",\n          \"ChallengeName\"\n        ],\n        \"members\": {\n          \"ClientId\": {\n            \"shape\": \"S1d\"\n          },\n          \"ChallengeName\": {},\n          \"Session\": {},\n          \"ChallengeResponses\": {\n            \"shape\": \"S26\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChallengeName\": {},\n          \"Session\": {},\n          \"ChallengeParameters\": {\n            \"shape\": \"S1k\"\n          },\n          \"AuthenticationResult\": {\n            \"shape\": \"S1l\"\n          }\n        }\n      }\n    },\n    \"SetUserSettings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AccessToken\",\n          \"MFAOptions\"\n        ],\n        \"members\": {\n          \"AccessToken\": {\n            \"shape\": \"S1m\"\n          },\n          \"MFAOptions\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"authtype\": \"none\"\n    },\n    \"SignUp\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClientId\",\n          \"Username\",\n          \"Password\"\n        ],\n        \"members\": {\n          \"ClientId\": {\n            \"shape\": \"S1d\"\n          },\n          \"SecretHash\": {\n            \"shape\": \"S2o\"\n          },\n          \"Username\": {\n            \"shape\": \"Sd\"\n          },\n          \"Password\": {\n            \"shape\": \"Sm\"\n          },\n          \"UserAttributes\": {\n            \"shape\": \"Si\"\n          },\n          \"ValidationData\": {\n            \"shape\": \"Si\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserConfirmed\": {\n            \"type\": \"boolean\"\n          },\n          \"CodeDeliveryDetails\": {\n            \"shape\": \"S4k\"\n          }\n        }\n      },\n      \"authtype\": \"none\"\n    },\n    \"StartUserImportJob\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"JobId\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"JobId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserImportJob\": {\n            \"shape\": \"S2y\"\n          }\n        }\n      }\n    },\n    \"StopUserImportJob\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"JobId\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"JobId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserImportJob\": {\n            \"shape\": \"S2y\"\n          }\n        }\n      }\n    },\n    \"UpdateDeviceStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AccessToken\",\n          \"DeviceKey\"\n        ],\n        \"members\": {\n          \"AccessToken\": {\n            \"shape\": \"S1m\"\n          },\n          \"DeviceKey\": {},\n          \"DeviceRememberedStatus\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"UpdateGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GroupName\",\n          \"UserPoolId\"\n        ],\n        \"members\": {\n          \"GroupName\": {},\n          \"UserPoolId\": {},\n          \"Description\": {},\n          \"RoleArn\": {},\n          \"Precedence\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Group\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"UpdateUserAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserAttributes\"\n        ],\n        \"members\": {\n          \"UserAttributes\": {\n            \"shape\": \"Si\"\n          },\n          \"AccessToken\": {\n            \"shape\": \"S1m\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CodeDeliveryDetailsList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4k\"\n            }\n          }\n        }\n      },\n      \"authtype\": \"none\"\n    },\n    \"UpdateUserPool\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"Policies\": {\n            \"shape\": \"S36\"\n          },\n          \"LambdaConfig\": {\n            \"shape\": \"S39\"\n          },\n          \"AutoVerifiedAttributes\": {\n            \"shape\": \"S3a\"\n          },\n          \"SmsVerificationMessage\": {},\n          \"EmailVerificationMessage\": {},\n          \"EmailVerificationSubject\": {},\n          \"SmsAuthenticationMessage\": {},\n          \"MfaConfiguration\": {},\n          \"DeviceConfiguration\": {\n            \"shape\": \"S3i\"\n          },\n          \"EmailConfiguration\": {\n            \"shape\": \"S3j\"\n          },\n          \"SmsConfiguration\": {\n            \"shape\": \"S3l\"\n          },\n          \"UserPoolTags\": {\n            \"shape\": \"S3m\"\n          },\n          \"AdminCreateUserConfig\": {\n            \"shape\": \"S3n\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"UpdateUserPoolClient\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UserPoolId\",\n          \"ClientId\"\n        ],\n        \"members\": {\n          \"UserPoolId\": {},\n          \"ClientId\": {\n            \"shape\": \"S1d\"\n          },\n          \"ClientName\": {},\n          \"RefreshTokenValidity\": {\n            \"type\": \"integer\"\n          },\n          \"ReadAttributes\": {\n            \"shape\": \"S3y\"\n          },\n          \"WriteAttributes\": {\n            \"shape\": \"S3y\"\n          },\n          \"ExplicitAuthFlows\": {\n            \"shape\": \"S40\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserPoolClient\": {\n            \"shape\": \"S43\"\n          }\n        }\n      }\n    },\n    \"VerifyUserAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AttributeName\",\n          \"Code\"\n        ],\n        \"members\": {\n          \"AccessToken\": {\n            \"shape\": \"S1m\"\n          },\n          \"AttributeName\": {},\n          \"Code\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"authtype\": \"none\"\n    }\n  },\n  \"shapes\": {\n    \"S4\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Name\": {},\n        \"AttributeDataType\": {},\n        \"DeveloperOnlyAttribute\": {\n          \"type\": \"boolean\"\n        },\n        \"Mutable\": {\n          \"type\": \"boolean\"\n        },\n        \"Required\": {\n          \"type\": \"boolean\"\n        },\n        \"NumberAttributeConstraints\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"MinValue\": {},\n            \"MaxValue\": {}\n          }\n        },\n        \"StringAttributeConstraints\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"MinLength\": {},\n            \"MaxLength\": {}\n          }\n        }\n      }\n    },\n    \"Sd\": {\n      \"type\": \"string\",\n      \"sensitive\": true\n    },\n    \"Si\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Value\": {\n            \"type\": \"string\",\n            \"sensitive\": true\n          }\n        }\n      }\n    },\n    \"Sm\": {\n      \"type\": \"string\",\n      \"sensitive\": true\n    },\n    \"Ss\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Username\": {\n          \"shape\": \"Sd\"\n        },\n        \"Attributes\": {\n          \"shape\": \"Si\"\n        },\n        \"UserCreateDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"UserLastModifiedDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        },\n        \"UserStatus\": {},\n        \"MFAOptions\": {\n          \"shape\": \"Sv\"\n        }\n      }\n    },\n    \"Sv\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DeliveryMedium\": {},\n          \"AttributeName\": {}\n        }\n      }\n    },\n    \"Sz\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S19\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DeviceKey\": {},\n        \"DeviceAttributes\": {\n          \"shape\": \"Si\"\n        },\n        \"DeviceCreateDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"DeviceLastModifiedDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"DeviceLastAuthenticatedDate\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S1d\": {\n      \"type\": \"string\",\n      \"sensitive\": true\n    },\n    \"S1f\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S1g\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S1k\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S1l\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AccessToken\": {\n          \"shape\": \"S1m\"\n        },\n        \"ExpiresIn\": {\n          \"type\": \"integer\"\n        },\n        \"TokenType\": {},\n        \"RefreshToken\": {\n          \"shape\": \"S1m\"\n        },\n        \"IdToken\": {\n          \"shape\": \"S1m\"\n        },\n        \"NewDeviceMetadata\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"DeviceKey\": {},\n            \"DeviceGroupKey\": {}\n          }\n        }\n      }\n    },\n    \"S1m\": {\n      \"type\": \"string\",\n      \"sensitive\": true\n    },\n    \"S1t\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S19\"\n      }\n    },\n    \"S1x\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S1y\"\n      }\n    },\n    \"S1y\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"GroupName\": {},\n        \"UserPoolId\": {},\n        \"Description\": {},\n        \"RoleArn\": {},\n        \"Precedence\": {\n          \"type\": \"integer\"\n        },\n        \"LastModifiedDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"CreationDate\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S26\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S2o\": {\n      \"type\": \"string\",\n      \"sensitive\": true\n    },\n    \"S2y\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"JobName\": {},\n        \"JobId\": {},\n        \"UserPoolId\": {},\n        \"PreSignedUrl\": {},\n        \"CreationDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"StartDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"CompletionDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"Status\": {},\n        \"CloudWatchLogsRoleArn\": {},\n        \"ImportedUsers\": {\n          \"type\": \"long\"\n        },\n        \"SkippedUsers\": {\n          \"type\": \"long\"\n        },\n        \"FailedUsers\": {\n          \"type\": \"long\"\n        },\n        \"CompletionMessage\": {}\n      }\n    },\n    \"S36\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"PasswordPolicy\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"MinimumLength\": {\n              \"type\": \"integer\"\n            },\n            \"RequireUppercase\": {\n              \"type\": \"boolean\"\n            },\n            \"RequireLowercase\": {\n              \"type\": \"boolean\"\n            },\n            \"RequireNumbers\": {\n              \"type\": \"boolean\"\n            },\n            \"RequireSymbols\": {\n              \"type\": \"boolean\"\n            }\n          }\n        }\n      }\n    },\n    \"S39\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"PreSignUp\": {},\n        \"CustomMessage\": {},\n        \"PostConfirmation\": {},\n        \"PreAuthentication\": {},\n        \"PostAuthentication\": {},\n        \"DefineAuthChallenge\": {},\n        \"CreateAuthChallenge\": {},\n        \"VerifyAuthChallengeResponse\": {}\n      }\n    },\n    \"S3a\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S3c\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S3i\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ChallengeRequiredOnNewDevice\": {\n          \"type\": \"boolean\"\n        },\n        \"DeviceOnlyRememberedOnUserPrompt\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S3j\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"SourceArn\": {},\n        \"ReplyToEmailAddress\": {}\n      }\n    },\n    \"S3l\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"SnsCallerArn\"\n      ],\n      \"members\": {\n        \"SnsCallerArn\": {},\n        \"ExternalId\": {}\n      }\n    },\n    \"S3m\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S3n\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AllowAdminCreateUserOnly\": {\n          \"type\": \"boolean\"\n        },\n        \"UnusedAccountValidityDays\": {\n          \"type\": \"integer\"\n        },\n        \"InviteMessageTemplate\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"SMSMessage\": {},\n            \"EmailMessage\": {},\n            \"EmailSubject\": {}\n          }\n        }\n      }\n    },\n    \"S3q\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S4\"\n      }\n    },\n    \"S3s\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Id\": {},\n        \"Name\": {},\n        \"Policies\": {\n          \"shape\": \"S36\"\n        },\n        \"LambdaConfig\": {\n          \"shape\": \"S39\"\n        },\n        \"Status\": {},\n        \"LastModifiedDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"CreationDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"SchemaAttributes\": {\n          \"shape\": \"S3q\"\n        },\n        \"AutoVerifiedAttributes\": {\n          \"shape\": \"S3a\"\n        },\n        \"AliasAttributes\": {\n          \"shape\": \"S3c\"\n        },\n        \"SmsVerificationMessage\": {},\n        \"EmailVerificationMessage\": {},\n        \"EmailVerificationSubject\": {},\n        \"SmsAuthenticationMessage\": {},\n        \"MfaConfiguration\": {},\n        \"DeviceConfiguration\": {\n          \"shape\": \"S3i\"\n        },\n        \"EstimatedNumberOfUsers\": {\n          \"type\": \"integer\"\n        },\n        \"EmailConfiguration\": {\n          \"shape\": \"S3j\"\n        },\n        \"SmsConfiguration\": {\n          \"shape\": \"S3l\"\n        },\n        \"UserPoolTags\": {\n          \"shape\": \"S3m\"\n        },\n        \"SmsConfigurationFailure\": {},\n        \"EmailConfigurationFailure\": {},\n        \"AdminCreateUserConfig\": {\n          \"shape\": \"S3n\"\n        }\n      }\n    },\n    \"S3y\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S40\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S43\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"UserPoolId\": {},\n        \"ClientName\": {},\n        \"ClientId\": {\n          \"shape\": \"S1d\"\n        },\n        \"ClientSecret\": {\n          \"type\": \"string\",\n          \"sensitive\": true\n        },\n        \"LastModifiedDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"CreationDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"RefreshTokenValidity\": {\n          \"type\": \"integer\"\n        },\n        \"ReadAttributes\": {\n          \"shape\": \"S3y\"\n        },\n        \"WriteAttributes\": {\n          \"shape\": \"S3y\"\n        },\n        \"ExplicitAuthFlows\": {\n          \"shape\": \"S40\"\n        }\n      }\n    },\n    \"S4k\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Destination\": {},\n        \"DeliveryMedium\": {},\n        \"AttributeName\": {}\n      }\n    },\n    \"S5m\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"Ss\"\n      }\n    }\n  }\n}\n},{}],27:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2014-06-30\",\n    \"endpointPrefix\": \"cognito-sync\",\n    \"jsonVersion\": \"1.1\",\n    \"serviceFullName\": \"Amazon Cognito Sync\",\n    \"signatureVersion\": \"v4\",\n    \"protocol\": \"rest-json\",\n    \"uid\": \"cognito-sync-2014-06-30\"\n  },\n  \"operations\": {\n    \"BulkPublish\": {\n      \"http\": {\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/bulkpublish\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityPoolId\": {}\n        }\n      }\n    },\n    \"DeleteDataset\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\",\n          \"IdentityId\",\n          \"DatasetName\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          },\n          \"IdentityId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityId\"\n          },\n          \"DatasetName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"DatasetName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Dataset\": {\n            \"shape\": \"S8\"\n          }\n        }\n      }\n    },\n    \"DescribeDataset\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\",\n          \"IdentityId\",\n          \"DatasetName\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          },\n          \"IdentityId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityId\"\n          },\n          \"DatasetName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"DatasetName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Dataset\": {\n            \"shape\": \"S8\"\n          }\n        }\n      }\n    },\n    \"DescribeIdentityPoolUsage\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/identitypools/{IdentityPoolId}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityPoolUsage\": {\n            \"shape\": \"Sg\"\n          }\n        }\n      }\n    },\n    \"DescribeIdentityUsage\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/identities/{IdentityId}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\",\n          \"IdentityId\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          },\n          \"IdentityId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityUsage\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"IdentityId\": {},\n              \"IdentityPoolId\": {},\n              \"LastModifiedDate\": {\n                \"type\": \"timestamp\"\n              },\n              \"DatasetCount\": {\n                \"type\": \"integer\"\n              },\n              \"DataStorage\": {\n                \"type\": \"long\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"GetBulkPublishDetails\": {\n      \"http\": {\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/getBulkPublishDetails\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityPoolId\": {},\n          \"BulkPublishStartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"BulkPublishCompleteTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"BulkPublishStatus\": {},\n          \"FailureMessage\": {}\n        }\n      }\n    },\n    \"GetCognitoEvents\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/events\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Events\": {\n            \"shape\": \"Sq\"\n          }\n        }\n      }\n    },\n    \"GetIdentityPoolConfiguration\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/configuration\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityPoolId\": {},\n          \"PushSync\": {\n            \"shape\": \"Sv\"\n          },\n          \"CognitoStreams\": {\n            \"shape\": \"Sz\"\n          }\n        }\n      }\n    },\n    \"ListDatasets\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityId\",\n          \"IdentityPoolId\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          },\n          \"IdentityId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityId\"\n          },\n          \"NextToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"nextToken\"\n          },\n          \"MaxResults\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Datasets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S8\"\n            }\n          },\n          \"Count\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListIdentityPoolUsage\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/identitypools\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"nextToken\"\n          },\n          \"MaxResults\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityPoolUsages\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sg\"\n            }\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"Count\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListRecords\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\",\n          \"IdentityId\",\n          \"DatasetName\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          },\n          \"IdentityId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityId\"\n          },\n          \"DatasetName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"DatasetName\"\n          },\n          \"LastSyncCount\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"lastSyncCount\",\n            \"type\": \"long\"\n          },\n          \"NextToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"nextToken\"\n          },\n          \"MaxResults\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          },\n          \"SyncSessionToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"syncSessionToken\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Records\": {\n            \"shape\": \"S1c\"\n          },\n          \"NextToken\": {},\n          \"Count\": {\n            \"type\": \"integer\"\n          },\n          \"DatasetSyncCount\": {\n            \"type\": \"long\"\n          },\n          \"LastModifiedBy\": {},\n          \"MergedDatasetNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"DatasetExists\": {\n            \"type\": \"boolean\"\n          },\n          \"DatasetDeletedAfterRequestedSyncCount\": {\n            \"type\": \"boolean\"\n          },\n          \"SyncSessionToken\": {}\n        }\n      }\n    },\n    \"RegisterDevice\": {\n      \"http\": {\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/identity/{IdentityId}/device\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\",\n          \"IdentityId\",\n          \"Platform\",\n          \"Token\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          },\n          \"IdentityId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityId\"\n          },\n          \"Platform\": {},\n          \"Token\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DeviceId\": {}\n        }\n      }\n    },\n    \"SetCognitoEvents\": {\n      \"http\": {\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/events\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\",\n          \"Events\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          },\n          \"Events\": {\n            \"shape\": \"Sq\"\n          }\n        }\n      }\n    },\n    \"SetIdentityPoolConfiguration\": {\n      \"http\": {\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/configuration\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          },\n          \"PushSync\": {\n            \"shape\": \"Sv\"\n          },\n          \"CognitoStreams\": {\n            \"shape\": \"Sz\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityPoolId\": {},\n          \"PushSync\": {\n            \"shape\": \"Sv\"\n          },\n          \"CognitoStreams\": {\n            \"shape\": \"Sz\"\n          }\n        }\n      }\n    },\n    \"SubscribeToDataset\": {\n      \"http\": {\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\",\n          \"IdentityId\",\n          \"DatasetName\",\n          \"DeviceId\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          },\n          \"IdentityId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityId\"\n          },\n          \"DatasetName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"DatasetName\"\n          },\n          \"DeviceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"DeviceId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"UnsubscribeFromDataset\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\",\n          \"IdentityId\",\n          \"DatasetName\",\n          \"DeviceId\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          },\n          \"IdentityId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityId\"\n          },\n          \"DatasetName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"DatasetName\"\n          },\n          \"DeviceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"DeviceId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"UpdateRecords\": {\n      \"http\": {\n        \"requestUri\": \"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IdentityPoolId\",\n          \"IdentityId\",\n          \"DatasetName\",\n          \"SyncSessionToken\"\n        ],\n        \"members\": {\n          \"IdentityPoolId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityPoolId\"\n          },\n          \"IdentityId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"IdentityId\"\n          },\n          \"DatasetName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"DatasetName\"\n          },\n          \"DeviceId\": {},\n          \"RecordPatches\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Op\",\n                \"Key\",\n                \"SyncCount\"\n              ],\n              \"members\": {\n                \"Op\": {},\n                \"Key\": {},\n                \"Value\": {},\n                \"SyncCount\": {\n                  \"type\": \"long\"\n                },\n                \"DeviceLastModifiedDate\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"SyncSessionToken\": {},\n          \"ClientContext\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-Client-Context\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Records\": {\n            \"shape\": \"S1c\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S8\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"IdentityId\": {},\n        \"DatasetName\": {},\n        \"CreationDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"LastModifiedDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"LastModifiedBy\": {},\n        \"DataStorage\": {\n          \"type\": \"long\"\n        },\n        \"NumRecords\": {\n          \"type\": \"long\"\n        }\n      }\n    },\n    \"Sg\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"IdentityPoolId\": {},\n        \"SyncSessionsCount\": {\n          \"type\": \"long\"\n        },\n        \"DataStorage\": {\n          \"type\": \"long\"\n        },\n        \"LastModifiedDate\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"Sq\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"Sv\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ApplicationArns\": {\n          \"type\": \"list\",\n          \"member\": {}\n        },\n        \"RoleArn\": {}\n      }\n    },\n    \"Sz\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"StreamName\": {},\n        \"RoleArn\": {},\n        \"StreamingStatus\": {}\n      }\n    },\n    \"S1c\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {},\n          \"SyncCount\": {\n            \"type\": \"long\"\n          },\n          \"LastModifiedDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"LastModifiedBy\": {},\n          \"DeviceLastModifiedDate\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    }\n  },\n  \"examples\": {}\n}\n},{}],28:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2014-11-12\",\n    \"endpointPrefix\": \"config\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"Config Service\",\n    \"serviceFullName\": \"AWS Config\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"StarlingDoveService\",\n    \"uid\": \"config-2014-11-12\"\n  },\n  \"operations\": {\n    \"DeleteConfigRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConfigRuleName\"\n        ],\n        \"members\": {\n          \"ConfigRuleName\": {}\n        }\n      }\n    },\n    \"DeleteConfigurationRecorder\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConfigurationRecorderName\"\n        ],\n        \"members\": {\n          \"ConfigurationRecorderName\": {}\n        }\n      }\n    },\n    \"DeleteDeliveryChannel\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DeliveryChannelName\"\n        ],\n        \"members\": {\n          \"DeliveryChannelName\": {}\n        }\n      }\n    },\n    \"DeleteEvaluationResults\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConfigRuleName\"\n        ],\n        \"members\": {\n          \"ConfigRuleName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeliverConfigSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"deliveryChannelName\"\n        ],\n        \"members\": {\n          \"deliveryChannelName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"configSnapshotId\": {}\n        }\n      }\n    },\n    \"DescribeComplianceByConfigRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConfigRuleNames\": {\n            \"shape\": \"Sd\"\n          },\n          \"ComplianceTypes\": {\n            \"shape\": \"Se\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ComplianceByConfigRules\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ConfigRuleName\": {},\n                \"Compliance\": {\n                  \"shape\": \"Sj\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeComplianceByResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourceType\": {},\n          \"ResourceId\": {},\n          \"ComplianceTypes\": {\n            \"shape\": \"Se\"\n          },\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ComplianceByResources\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ResourceType\": {},\n                \"ResourceId\": {},\n                \"Compliance\": {\n                  \"shape\": \"Sj\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeConfigRuleEvaluationStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConfigRuleNames\": {\n            \"shape\": \"Sd\"\n          },\n          \"NextToken\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConfigRulesEvaluationStatus\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ConfigRuleName\": {},\n                \"ConfigRuleArn\": {},\n                \"ConfigRuleId\": {},\n                \"LastSuccessfulInvocationTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"LastFailedInvocationTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"LastSuccessfulEvaluationTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"LastFailedEvaluationTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"FirstActivatedTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"LastErrorCode\": {},\n                \"LastErrorMessage\": {},\n                \"FirstEvaluationStarted\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeConfigRules\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConfigRuleNames\": {\n            \"shape\": \"Sd\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConfigRules\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S13\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeConfigurationRecorderStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConfigurationRecorderNames\": {\n            \"shape\": \"S1i\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConfigurationRecordersStatus\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"name\": {},\n                \"lastStartTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"lastStopTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"recording\": {\n                  \"type\": \"boolean\"\n                },\n                \"lastStatus\": {},\n                \"lastErrorCode\": {},\n                \"lastErrorMessage\": {},\n                \"lastStatusChangeTime\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeConfigurationRecorders\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConfigurationRecorderNames\": {\n            \"shape\": \"S1i\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConfigurationRecorders\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1q\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDeliveryChannelStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DeliveryChannelNames\": {\n            \"shape\": \"S1x\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DeliveryChannelsStatus\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"name\": {},\n                \"configSnapshotDeliveryInfo\": {\n                  \"shape\": \"S21\"\n                },\n                \"configHistoryDeliveryInfo\": {\n                  \"shape\": \"S21\"\n                },\n                \"configStreamDeliveryInfo\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"lastStatus\": {},\n                    \"lastErrorCode\": {},\n                    \"lastErrorMessage\": {},\n                    \"lastStatusChangeTime\": {\n                      \"type\": \"timestamp\"\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDeliveryChannels\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DeliveryChannelNames\": {\n            \"shape\": \"S1x\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DeliveryChannels\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S27\"\n            }\n          }\n        }\n      }\n    },\n    \"GetComplianceDetailsByConfigRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConfigRuleName\"\n        ],\n        \"members\": {\n          \"ConfigRuleName\": {},\n          \"ComplianceTypes\": {\n            \"shape\": \"Se\"\n          },\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EvaluationResults\": {\n            \"shape\": \"S2b\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"GetComplianceDetailsByResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceType\",\n          \"ResourceId\"\n        ],\n        \"members\": {\n          \"ResourceType\": {},\n          \"ResourceId\": {},\n          \"ComplianceTypes\": {\n            \"shape\": \"Se\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EvaluationResults\": {\n            \"shape\": \"S2b\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"GetComplianceSummaryByConfigRule\": {\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ComplianceSummary\": {\n            \"shape\": \"S2i\"\n          }\n        }\n      }\n    },\n    \"GetComplianceSummaryByResourceType\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourceTypes\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ComplianceSummariesByResourceType\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ResourceType\": {},\n                \"ComplianceSummary\": {\n                  \"shape\": \"S2i\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"GetResourceConfigHistory\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"resourceType\",\n          \"resourceId\"\n        ],\n        \"members\": {\n          \"resourceType\": {},\n          \"resourceId\": {},\n          \"laterTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"earlierTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"chronologicalOrder\": {},\n          \"limit\": {\n            \"type\": \"integer\"\n          },\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"configurationItems\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"version\": {},\n                \"accountId\": {},\n                \"configurationItemCaptureTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"configurationItemStatus\": {},\n                \"configurationStateId\": {},\n                \"configurationItemMD5Hash\": {},\n                \"arn\": {},\n                \"resourceType\": {},\n                \"resourceId\": {},\n                \"resourceName\": {},\n                \"awsRegion\": {},\n                \"availabilityZone\": {},\n                \"resourceCreationTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"tags\": {\n                  \"type\": \"map\",\n                  \"key\": {},\n                  \"value\": {}\n                },\n                \"relatedEvents\": {\n                  \"type\": \"list\",\n                  \"member\": {}\n                },\n                \"relationships\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"resourceType\": {},\n                      \"resourceId\": {},\n                      \"resourceName\": {},\n                      \"relationshipName\": {}\n                    }\n                  }\n                },\n                \"configuration\": {},\n                \"supplementaryConfiguration\": {\n                  \"type\": \"map\",\n                  \"key\": {},\n                  \"value\": {}\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListDiscoveredResources\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"resourceType\"\n        ],\n        \"members\": {\n          \"resourceType\": {},\n          \"resourceIds\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"resourceName\": {},\n          \"limit\": {\n            \"type\": \"integer\"\n          },\n          \"includeDeletedResources\": {\n            \"type\": \"boolean\"\n          },\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"resourceIdentifiers\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"resourceType\": {},\n                \"resourceId\": {},\n                \"resourceName\": {},\n                \"resourceDeletionTime\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"PutConfigRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConfigRule\"\n        ],\n        \"members\": {\n          \"ConfigRule\": {\n            \"shape\": \"S13\"\n          }\n        }\n      }\n    },\n    \"PutConfigurationRecorder\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConfigurationRecorder\"\n        ],\n        \"members\": {\n          \"ConfigurationRecorder\": {\n            \"shape\": \"S1q\"\n          }\n        }\n      }\n    },\n    \"PutDeliveryChannel\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DeliveryChannel\"\n        ],\n        \"members\": {\n          \"DeliveryChannel\": {\n            \"shape\": \"S27\"\n          }\n        }\n      }\n    },\n    \"PutEvaluations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResultToken\"\n        ],\n        \"members\": {\n          \"Evaluations\": {\n            \"shape\": \"S3t\"\n          },\n          \"ResultToken\": {},\n          \"TestMode\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FailedEvaluations\": {\n            \"shape\": \"S3t\"\n          }\n        }\n      }\n    },\n    \"StartConfigRulesEvaluation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConfigRuleNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"StartConfigurationRecorder\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConfigurationRecorderName\"\n        ],\n        \"members\": {\n          \"ConfigurationRecorderName\": {}\n        }\n      }\n    },\n    \"StopConfigurationRecorder\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConfigurationRecorderName\"\n        ],\n        \"members\": {\n          \"ConfigurationRecorderName\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"Sd\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Se\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sj\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ComplianceType\": {},\n        \"ComplianceContributorCount\": {\n          \"shape\": \"Sk\"\n        }\n      }\n    },\n    \"Sk\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CappedCount\": {\n          \"type\": \"integer\"\n        },\n        \"CapExceeded\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S13\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Source\"\n      ],\n      \"members\": {\n        \"ConfigRuleName\": {},\n        \"ConfigRuleArn\": {},\n        \"ConfigRuleId\": {},\n        \"Description\": {},\n        \"Scope\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"ComplianceResourceTypes\": {\n              \"type\": \"list\",\n              \"member\": {}\n            },\n            \"TagKey\": {},\n            \"TagValue\": {},\n            \"ComplianceResourceId\": {}\n          }\n        },\n        \"Source\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Owner\",\n            \"SourceIdentifier\"\n          ],\n          \"members\": {\n            \"Owner\": {},\n            \"SourceIdentifier\": {},\n            \"SourceDetails\": {\n              \"type\": \"list\",\n              \"member\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"EventSource\": {},\n                  \"MessageType\": {},\n                  \"MaximumExecutionFrequency\": {}\n                }\n              }\n            }\n          }\n        },\n        \"InputParameters\": {},\n        \"MaximumExecutionFrequency\": {},\n        \"ConfigRuleState\": {}\n      }\n    },\n    \"S1i\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S1q\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"name\": {},\n        \"roleARN\": {},\n        \"recordingGroup\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"allSupported\": {\n              \"type\": \"boolean\"\n            },\n            \"includeGlobalResourceTypes\": {\n              \"type\": \"boolean\"\n            },\n            \"resourceTypes\": {\n              \"type\": \"list\",\n              \"member\": {}\n            }\n          }\n        }\n      }\n    },\n    \"S1x\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S21\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"lastStatus\": {},\n        \"lastErrorCode\": {},\n        \"lastErrorMessage\": {},\n        \"lastAttemptTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"lastSuccessfulTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"nextDeliveryTime\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S27\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"name\": {},\n        \"s3BucketName\": {},\n        \"s3KeyPrefix\": {},\n        \"snsTopicARN\": {},\n        \"configSnapshotDeliveryProperties\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"deliveryFrequency\": {}\n          }\n        }\n      }\n    },\n    \"S2b\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EvaluationResultIdentifier\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"EvaluationResultQualifier\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"ConfigRuleName\": {},\n                  \"ResourceType\": {},\n                  \"ResourceId\": {}\n                }\n              },\n              \"OrderingTimestamp\": {\n                \"type\": \"timestamp\"\n              }\n            }\n          },\n          \"ComplianceType\": {},\n          \"ResultRecordedTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"ConfigRuleInvokedTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"Annotation\": {},\n          \"ResultToken\": {}\n        }\n      }\n    },\n    \"S2i\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CompliantResourceCount\": {\n          \"shape\": \"Sk\"\n        },\n        \"NonCompliantResourceCount\": {\n          \"shape\": \"Sk\"\n        },\n        \"ComplianceSummaryTimestamp\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S3t\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ComplianceResourceType\",\n          \"ComplianceResourceId\",\n          \"ComplianceType\",\n          \"OrderingTimestamp\"\n        ],\n        \"members\": {\n          \"ComplianceResourceType\": {},\n          \"ComplianceResourceId\": {},\n          \"ComplianceType\": {},\n          \"Annotation\": {},\n          \"OrderingTimestamp\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    }\n  }\n}\n},{}],29:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"GetResourceConfigHistory\": {\n      \"input_token\": \"nextToken\",\n      \"limit_key\": \"limit\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"configurationItems\"\n    }\n  }\n}\n},{}],30:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2017-01-06\",\n    \"endpointPrefix\": \"cur\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"AWS Cost and Usage Report Service\",\n    \"signatureVersion\": \"v4\",\n    \"signingName\": \"cur\",\n    \"targetPrefix\": \"AWSOrigamiServiceGatewayService\",\n    \"uid\": \"cur-2017-01-06\"\n  },\n  \"operations\": {\n    \"DeleteReportDefinition\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReportName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResponseMessage\": {}\n        }\n      }\n    },\n    \"DescribeReportDefinitions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReportDefinitions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sa\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"PutReportDefinition\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReportDefinition\"\n        ],\n        \"members\": {\n          \"ReportDefinition\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    }\n  },\n  \"shapes\": {\n    \"Sa\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"ReportName\",\n        \"TimeUnit\",\n        \"Format\",\n        \"Compression\",\n        \"AdditionalSchemaElements\",\n        \"S3Bucket\",\n        \"S3Prefix\",\n        \"S3Region\"\n      ],\n      \"members\": {\n        \"ReportName\": {},\n        \"TimeUnit\": {},\n        \"Format\": {},\n        \"Compression\": {},\n        \"AdditionalSchemaElements\": {\n          \"type\": \"list\",\n          \"member\": {}\n        },\n        \"S3Bucket\": {},\n        \"S3Prefix\": {},\n        \"S3Region\": {},\n        \"AdditionalArtifacts\": {\n          \"type\": \"list\",\n          \"member\": {}\n        }\n      }\n    }\n  }\n}\n},{}],31:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeReportDefinitions\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\"\n    }\n  }\n}\n\n},{}],32:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2015-06-23\",\n    \"endpointPrefix\": \"devicefarm\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"AWS Device Farm\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"DeviceFarm_20150623\",\n    \"uid\": \"devicefarm-2015-06-23\"\n  },\n  \"operations\": {\n    \"CreateDevicePool\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"projectArn\",\n          \"name\",\n          \"rules\"\n        ],\n        \"members\": {\n          \"projectArn\": {},\n          \"name\": {},\n          \"description\": {},\n          \"rules\": {\n            \"shape\": \"S5\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"devicePool\": {\n            \"shape\": \"Sb\"\n          }\n        }\n      }\n    },\n    \"CreateProject\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"name\"\n        ],\n        \"members\": {\n          \"name\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"project\": {\n            \"shape\": \"Sf\"\n          }\n        }\n      }\n    },\n    \"CreateRemoteAccessSession\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"projectArn\",\n          \"deviceArn\"\n        ],\n        \"members\": {\n          \"projectArn\": {},\n          \"deviceArn\": {},\n          \"name\": {},\n          \"configuration\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"billingMethod\": {}\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"remoteAccessSession\": {\n            \"shape\": \"Sl\"\n          }\n        }\n      }\n    },\n    \"CreateUpload\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"projectArn\",\n          \"name\",\n          \"type\"\n        ],\n        \"members\": {\n          \"projectArn\": {},\n          \"name\": {},\n          \"type\": {},\n          \"contentType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"upload\": {\n            \"shape\": \"S12\"\n          }\n        }\n      }\n    },\n    \"DeleteDevicePool\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteProject\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteRemoteAccessSession\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteRun\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteUpload\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"GetAccountSettings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"accountSettings\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"awsAccountNumber\": {},\n              \"unmeteredDevices\": {\n                \"shape\": \"S1k\"\n              },\n              \"unmeteredRemoteAccessDevices\": {\n                \"shape\": \"S1k\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"GetDevice\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"device\": {\n            \"shape\": \"So\"\n          }\n        }\n      }\n    },\n    \"GetDevicePool\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"devicePool\": {\n            \"shape\": \"Sb\"\n          }\n        }\n      }\n    },\n    \"GetDevicePoolCompatibility\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"devicePoolArn\"\n        ],\n        \"members\": {\n          \"devicePoolArn\": {},\n          \"appArn\": {},\n          \"testType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"compatibleDevices\": {\n            \"shape\": \"S1s\"\n          },\n          \"incompatibleDevices\": {\n            \"shape\": \"S1s\"\n          }\n        }\n      }\n    },\n    \"GetJob\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"job\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"GetOfferingStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"current\": {\n            \"shape\": \"S23\"\n          },\n          \"nextPeriod\": {\n            \"shape\": \"S23\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"GetProject\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"project\": {\n            \"shape\": \"Sf\"\n          }\n        }\n      }\n    },\n    \"GetRemoteAccessSession\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"remoteAccessSession\": {\n            \"shape\": \"Sl\"\n          }\n        }\n      }\n    },\n    \"GetRun\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"run\": {\n            \"shape\": \"S2k\"\n          }\n        }\n      }\n    },\n    \"GetSuite\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"suite\": {\n            \"shape\": \"S2n\"\n          }\n        }\n      }\n    },\n    \"GetTest\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"test\": {\n            \"shape\": \"S2q\"\n          }\n        }\n      }\n    },\n    \"GetUpload\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"upload\": {\n            \"shape\": \"S12\"\n          }\n        }\n      }\n    },\n    \"InstallToRemoteAccessSession\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"remoteAccessSessionArn\",\n          \"appArn\"\n        ],\n        \"members\": {\n          \"remoteAccessSessionArn\": {},\n          \"appArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"appUpload\": {\n            \"shape\": \"S12\"\n          }\n        }\n      }\n    },\n    \"ListArtifacts\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\",\n          \"type\"\n        ],\n        \"members\": {\n          \"arn\": {},\n          \"type\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"artifacts\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"arn\": {},\n                \"name\": {},\n                \"type\": {},\n                \"extension\": {},\n                \"url\": {}\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListDevicePools\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {},\n          \"type\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"devicePools\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sb\"\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListDevices\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"arn\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"devices\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"So\"\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListJobs\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"jobs\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1y\"\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListOfferingTransactions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"offeringTransactions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S3d\"\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListOfferings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"offerings\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S27\"\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListProjects\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"arn\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"projects\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sf\"\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListRemoteAccessSessions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"remoteAccessSessions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sl\"\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListRuns\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"runs\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S2k\"\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListSamples\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"samples\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"arn\": {},\n                \"type\": {},\n                \"url\": {}\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListSuites\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"suites\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S2n\"\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListTests\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"tests\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S2q\"\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListUniqueProblems\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"uniqueProblems\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"type\": \"list\",\n              \"member\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"message\": {},\n                  \"problems\": {\n                    \"type\": \"list\",\n                    \"member\": {\n                      \"type\": \"structure\",\n                      \"members\": {\n                        \"run\": {\n                          \"shape\": \"S49\"\n                        },\n                        \"job\": {\n                          \"shape\": \"S49\"\n                        },\n                        \"suite\": {\n                          \"shape\": \"S49\"\n                        },\n                        \"test\": {\n                          \"shape\": \"S49\"\n                        },\n                        \"device\": {\n                          \"shape\": \"So\"\n                        },\n                        \"result\": {},\n                        \"message\": {}\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListUploads\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {},\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"uploads\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S12\"\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"PurchaseOffering\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"offeringId\": {},\n          \"quantity\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"offeringTransaction\": {\n            \"shape\": \"S3d\"\n          }\n        }\n      }\n    },\n    \"RenewOffering\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"offeringId\": {},\n          \"quantity\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"offeringTransaction\": {\n            \"shape\": \"S3d\"\n          }\n        }\n      }\n    },\n    \"ScheduleRun\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"projectArn\",\n          \"devicePoolArn\",\n          \"test\"\n        ],\n        \"members\": {\n          \"projectArn\": {},\n          \"appArn\": {},\n          \"devicePoolArn\": {},\n          \"name\": {},\n          \"test\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"type\"\n            ],\n            \"members\": {\n              \"type\": {},\n              \"testPackageArn\": {},\n              \"filter\": {},\n              \"parameters\": {\n                \"type\": \"map\",\n                \"key\": {},\n                \"value\": {}\n              }\n            }\n          },\n          \"configuration\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"extraDataPackageArn\": {},\n              \"networkProfileArn\": {},\n              \"locale\": {},\n              \"location\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"latitude\",\n                  \"longitude\"\n                ],\n                \"members\": {\n                  \"latitude\": {\n                    \"type\": \"double\"\n                  },\n                  \"longitude\": {\n                    \"type\": \"double\"\n                  }\n                }\n              },\n              \"radios\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"wifi\": {\n                    \"type\": \"boolean\"\n                  },\n                  \"bluetooth\": {\n                    \"type\": \"boolean\"\n                  },\n                  \"nfc\": {\n                    \"type\": \"boolean\"\n                  },\n                  \"gps\": {\n                    \"type\": \"boolean\"\n                  }\n                }\n              },\n              \"auxiliaryApps\": {\n                \"type\": \"list\",\n                \"member\": {}\n              },\n              \"billingMethod\": {}\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"run\": {\n            \"shape\": \"S2k\"\n          }\n        }\n      }\n    },\n    \"StopRemoteAccessSession\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"remoteAccessSession\": {\n            \"shape\": \"Sl\"\n          }\n        }\n      }\n    },\n    \"StopRun\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"run\": {\n            \"shape\": \"S2k\"\n          }\n        }\n      }\n    },\n    \"UpdateDevicePool\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {},\n          \"name\": {},\n          \"description\": {},\n          \"rules\": {\n            \"shape\": \"S5\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"devicePool\": {\n            \"shape\": \"Sb\"\n          }\n        }\n      }\n    },\n    \"UpdateProject\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"arn\"\n        ],\n        \"members\": {\n          \"arn\": {},\n          \"name\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"project\": {\n            \"shape\": \"Sf\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S5\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"attribute\": {},\n          \"operator\": {},\n          \"value\": {}\n        }\n      }\n    },\n    \"Sb\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"arn\": {},\n        \"name\": {},\n        \"description\": {},\n        \"type\": {},\n        \"rules\": {\n          \"shape\": \"S5\"\n        }\n      }\n    },\n    \"Sf\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"arn\": {},\n        \"name\": {},\n        \"created\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"Sl\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"arn\": {},\n        \"name\": {},\n        \"created\": {\n          \"type\": \"timestamp\"\n        },\n        \"status\": {},\n        \"result\": {},\n        \"message\": {},\n        \"started\": {\n          \"type\": \"timestamp\"\n        },\n        \"stopped\": {\n          \"type\": \"timestamp\"\n        },\n        \"device\": {\n          \"shape\": \"So\"\n        },\n        \"billingMethod\": {},\n        \"deviceMinutes\": {\n          \"shape\": \"Sx\"\n        },\n        \"endpoint\": {}\n      }\n    },\n    \"So\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"arn\": {},\n        \"name\": {},\n        \"manufacturer\": {},\n        \"model\": {},\n        \"formFactor\": {},\n        \"platform\": {},\n        \"os\": {},\n        \"cpu\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"frequency\": {},\n            \"architecture\": {},\n            \"clock\": {\n              \"type\": \"double\"\n            }\n          }\n        },\n        \"resolution\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"width\": {\n              \"type\": \"integer\"\n            },\n            \"height\": {\n              \"type\": \"integer\"\n            }\n          }\n        },\n        \"heapSize\": {\n          \"type\": \"long\"\n        },\n        \"memory\": {\n          \"type\": \"long\"\n        },\n        \"image\": {},\n        \"carrier\": {},\n        \"radio\": {},\n        \"remoteAccessEnabled\": {\n          \"type\": \"boolean\"\n        },\n        \"fleetType\": {},\n        \"fleetName\": {}\n      }\n    },\n    \"Sx\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"total\": {\n          \"type\": \"double\"\n        },\n        \"metered\": {\n          \"type\": \"double\"\n        },\n        \"unmetered\": {\n          \"type\": \"double\"\n        }\n      }\n    },\n    \"S12\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"arn\": {},\n        \"name\": {},\n        \"created\": {\n          \"type\": \"timestamp\"\n        },\n        \"type\": {},\n        \"status\": {},\n        \"url\": {},\n        \"metadata\": {},\n        \"contentType\": {},\n        \"message\": {}\n      }\n    },\n    \"S1k\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"type\": \"integer\"\n      }\n    },\n    \"S1s\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"device\": {\n            \"shape\": \"So\"\n          },\n          \"compatible\": {\n            \"type\": \"boolean\"\n          },\n          \"incompatibilityMessages\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"message\": {},\n                \"type\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S1y\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"arn\": {},\n        \"name\": {},\n        \"type\": {},\n        \"created\": {\n          \"type\": \"timestamp\"\n        },\n        \"status\": {},\n        \"result\": {},\n        \"started\": {\n          \"type\": \"timestamp\"\n        },\n        \"stopped\": {\n          \"type\": \"timestamp\"\n        },\n        \"counters\": {\n          \"shape\": \"S1z\"\n        },\n        \"message\": {},\n        \"device\": {\n          \"shape\": \"So\"\n        },\n        \"deviceMinutes\": {\n          \"shape\": \"Sx\"\n        }\n      }\n    },\n    \"S1z\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"total\": {\n          \"type\": \"integer\"\n        },\n        \"passed\": {\n          \"type\": \"integer\"\n        },\n        \"failed\": {\n          \"type\": \"integer\"\n        },\n        \"warned\": {\n          \"type\": \"integer\"\n        },\n        \"errored\": {\n          \"type\": \"integer\"\n        },\n        \"stopped\": {\n          \"type\": \"integer\"\n        },\n        \"skipped\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"S23\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"shape\": \"S25\"\n      }\n    },\n    \"S25\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"type\": {},\n        \"offering\": {\n          \"shape\": \"S27\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\"\n        },\n        \"effectiveOn\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S27\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"id\": {},\n        \"description\": {},\n        \"type\": {},\n        \"platform\": {},\n        \"recurringCharges\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"cost\": {\n                \"shape\": \"S2b\"\n              },\n              \"frequency\": {}\n            }\n          }\n        }\n      }\n    },\n    \"S2b\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"amount\": {\n          \"type\": \"double\"\n        },\n        \"currencyCode\": {}\n      }\n    },\n    \"S2k\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"arn\": {},\n        \"name\": {},\n        \"type\": {},\n        \"platform\": {},\n        \"created\": {\n          \"type\": \"timestamp\"\n        },\n        \"status\": {},\n        \"result\": {},\n        \"started\": {\n          \"type\": \"timestamp\"\n        },\n        \"stopped\": {\n          \"type\": \"timestamp\"\n        },\n        \"counters\": {\n          \"shape\": \"S1z\"\n        },\n        \"message\": {},\n        \"totalJobs\": {\n          \"type\": \"integer\"\n        },\n        \"completedJobs\": {\n          \"type\": \"integer\"\n        },\n        \"billingMethod\": {},\n        \"deviceMinutes\": {\n          \"shape\": \"Sx\"\n        }\n      }\n    },\n    \"S2n\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"arn\": {},\n        \"name\": {},\n        \"type\": {},\n        \"created\": {\n          \"type\": \"timestamp\"\n        },\n        \"status\": {},\n        \"result\": {},\n        \"started\": {\n          \"type\": \"timestamp\"\n        },\n        \"stopped\": {\n          \"type\": \"timestamp\"\n        },\n        \"counters\": {\n          \"shape\": \"S1z\"\n        },\n        \"message\": {},\n        \"deviceMinutes\": {\n          \"shape\": \"Sx\"\n        }\n      }\n    },\n    \"S2q\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"arn\": {},\n        \"name\": {},\n        \"type\": {},\n        \"created\": {\n          \"type\": \"timestamp\"\n        },\n        \"status\": {},\n        \"result\": {},\n        \"started\": {\n          \"type\": \"timestamp\"\n        },\n        \"stopped\": {\n          \"type\": \"timestamp\"\n        },\n        \"counters\": {\n          \"shape\": \"S1z\"\n        },\n        \"message\": {},\n        \"deviceMinutes\": {\n          \"shape\": \"Sx\"\n        }\n      }\n    },\n    \"S3d\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"offeringStatus\": {\n          \"shape\": \"S25\"\n        },\n        \"transactionId\": {},\n        \"createdOn\": {\n          \"type\": \"timestamp\"\n        },\n        \"cost\": {\n          \"shape\": \"S2b\"\n        }\n      }\n    },\n    \"S49\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"arn\": {},\n        \"name\": {}\n      }\n    }\n  }\n}\n},{}],33:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"GetOfferingStatus\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": [\"current\",\"nextPeriod\"]\n    },\n    \"ListArtifacts\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"artifacts\"\n    },\n    \"ListDevicePools\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"devicePools\"\n    },\n    \"ListDevices\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"devices\"\n    },\n    \"ListJobs\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"jobs\"\n    },\n    \"ListOfferingTransactions\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"offeringTransactions\"\n    },\n    \"ListOfferings\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"offerings\"\n    },\n    \"ListProjects\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"projects\"\n    },\n    \"ListRuns\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"runs\"\n    },\n    \"ListSamples\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"samples\"\n    },\n    \"ListSuites\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"suites\"\n    },\n    \"ListTests\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"tests\"\n    },\n    \"ListUniqueProblems\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"uniqueProblems\"\n    },\n    \"ListUploads\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"result_key\": \"uploads\"\n    }\n  }\n}\n\n},{}],34:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2012-10-25\",\n    \"endpointPrefix\": \"directconnect\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"AWS Direct Connect\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"OvertureService\",\n    \"uid\": \"directconnect-2012-10-25\"\n  },\n  \"operations\": {\n    \"AllocateConnectionOnInterconnect\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"bandwidth\",\n          \"connectionName\",\n          \"ownerAccount\",\n          \"interconnectId\",\n          \"vlan\"\n        ],\n        \"members\": {\n          \"bandwidth\": {},\n          \"connectionName\": {},\n          \"ownerAccount\": {},\n          \"interconnectId\": {},\n          \"vlan\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S7\"\n      }\n    },\n    \"AllocateHostedConnection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"connectionId\",\n          \"ownerAccount\",\n          \"bandwidth\",\n          \"connectionName\",\n          \"vlan\"\n        ],\n        \"members\": {\n          \"connectionId\": {},\n          \"ownerAccount\": {},\n          \"bandwidth\": {},\n          \"connectionName\": {},\n          \"vlan\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S7\"\n      }\n    },\n    \"AllocatePrivateVirtualInterface\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"connectionId\",\n          \"ownerAccount\",\n          \"newPrivateVirtualInterfaceAllocation\"\n        ],\n        \"members\": {\n          \"connectionId\": {},\n          \"ownerAccount\": {},\n          \"newPrivateVirtualInterfaceAllocation\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"virtualInterfaceName\",\n              \"vlan\",\n              \"asn\"\n            ],\n            \"members\": {\n              \"virtualInterfaceName\": {},\n              \"vlan\": {\n                \"type\": \"integer\"\n              },\n              \"asn\": {\n                \"type\": \"integer\"\n              },\n              \"authKey\": {},\n              \"amazonAddress\": {},\n              \"addressFamily\": {},\n              \"customerAddress\": {}\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sp\"\n      }\n    },\n    \"AllocatePublicVirtualInterface\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"connectionId\",\n          \"ownerAccount\",\n          \"newPublicVirtualInterfaceAllocation\"\n        ],\n        \"members\": {\n          \"connectionId\": {},\n          \"ownerAccount\": {},\n          \"newPublicVirtualInterfaceAllocation\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"virtualInterfaceName\",\n              \"vlan\",\n              \"asn\"\n            ],\n            \"members\": {\n              \"virtualInterfaceName\": {},\n              \"vlan\": {\n                \"type\": \"integer\"\n              },\n              \"asn\": {\n                \"type\": \"integer\"\n              },\n              \"authKey\": {},\n              \"amazonAddress\": {},\n              \"customerAddress\": {},\n              \"addressFamily\": {},\n              \"routeFilterPrefixes\": {\n                \"shape\": \"Sv\"\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sp\"\n      }\n    },\n    \"AssociateConnectionWithLag\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"connectionId\",\n          \"lagId\"\n        ],\n        \"members\": {\n          \"connectionId\": {},\n          \"lagId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S7\"\n      }\n    },\n    \"AssociateHostedConnection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"connectionId\",\n          \"parentConnectionId\"\n        ],\n        \"members\": {\n          \"connectionId\": {},\n          \"parentConnectionId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S7\"\n      }\n    },\n    \"AssociateVirtualInterface\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"virtualInterfaceId\",\n          \"connectionId\"\n        ],\n        \"members\": {\n          \"virtualInterfaceId\": {},\n          \"connectionId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sp\"\n      }\n    },\n    \"ConfirmConnection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"connectionId\"\n        ],\n        \"members\": {\n          \"connectionId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"connectionState\": {}\n        }\n      }\n    },\n    \"ConfirmPrivateVirtualInterface\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"virtualInterfaceId\",\n          \"virtualGatewayId\"\n        ],\n        \"members\": {\n          \"virtualInterfaceId\": {},\n          \"virtualGatewayId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"virtualInterfaceState\": {}\n        }\n      }\n    },\n    \"ConfirmPublicVirtualInterface\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"virtualInterfaceId\"\n        ],\n        \"members\": {\n          \"virtualInterfaceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"virtualInterfaceState\": {}\n        }\n      }\n    },\n    \"CreateBGPPeer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"virtualInterfaceId\": {},\n          \"newBGPPeer\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"asn\": {\n                \"type\": \"integer\"\n              },\n              \"authKey\": {},\n              \"addressFamily\": {},\n              \"amazonAddress\": {},\n              \"customerAddress\": {}\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"virtualInterface\": {\n            \"shape\": \"Sp\"\n          }\n        }\n      }\n    },\n    \"CreateConnection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"location\",\n          \"bandwidth\",\n          \"connectionName\"\n        ],\n        \"members\": {\n          \"location\": {},\n          \"bandwidth\": {},\n          \"connectionName\": {},\n          \"lagId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S7\"\n      }\n    },\n    \"CreateInterconnect\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"interconnectName\",\n          \"bandwidth\",\n          \"location\"\n        ],\n        \"members\": {\n          \"interconnectName\": {},\n          \"bandwidth\": {},\n          \"location\": {},\n          \"lagId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1j\"\n      }\n    },\n    \"CreateLag\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"numberOfConnections\",\n          \"location\",\n          \"connectionsBandwidth\",\n          \"lagName\"\n        ],\n        \"members\": {\n          \"numberOfConnections\": {\n            \"type\": \"integer\"\n          },\n          \"location\": {},\n          \"connectionsBandwidth\": {},\n          \"lagName\": {},\n          \"connectionId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1o\"\n      }\n    },\n    \"CreatePrivateVirtualInterface\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"connectionId\",\n          \"newPrivateVirtualInterface\"\n        ],\n        \"members\": {\n          \"connectionId\": {},\n          \"newPrivateVirtualInterface\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"virtualInterfaceName\",\n              \"vlan\",\n              \"asn\",\n              \"virtualGatewayId\"\n            ],\n            \"members\": {\n              \"virtualInterfaceName\": {},\n              \"vlan\": {\n                \"type\": \"integer\"\n              },\n              \"asn\": {\n                \"type\": \"integer\"\n              },\n              \"authKey\": {},\n              \"amazonAddress\": {},\n              \"customerAddress\": {},\n              \"addressFamily\": {},\n              \"virtualGatewayId\": {}\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sp\"\n      }\n    },\n    \"CreatePublicVirtualInterface\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"connectionId\",\n          \"newPublicVirtualInterface\"\n        ],\n        \"members\": {\n          \"connectionId\": {},\n          \"newPublicVirtualInterface\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"virtualInterfaceName\",\n              \"vlan\",\n              \"asn\"\n            ],\n            \"members\": {\n              \"virtualInterfaceName\": {},\n              \"vlan\": {\n                \"type\": \"integer\"\n              },\n              \"asn\": {\n                \"type\": \"integer\"\n              },\n              \"authKey\": {},\n              \"amazonAddress\": {},\n              \"customerAddress\": {},\n              \"addressFamily\": {},\n              \"routeFilterPrefixes\": {\n                \"shape\": \"Sv\"\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sp\"\n      }\n    },\n    \"DeleteBGPPeer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"virtualInterfaceId\": {},\n          \"asn\": {\n            \"type\": \"integer\"\n          },\n          \"customerAddress\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"virtualInterface\": {\n            \"shape\": \"Sp\"\n          }\n        }\n      }\n    },\n    \"DeleteConnection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"connectionId\"\n        ],\n        \"members\": {\n          \"connectionId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S7\"\n      }\n    },\n    \"DeleteInterconnect\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"interconnectId\"\n        ],\n        \"members\": {\n          \"interconnectId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"interconnectState\": {}\n        }\n      }\n    },\n    \"DeleteLag\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"lagId\"\n        ],\n        \"members\": {\n          \"lagId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1o\"\n      }\n    },\n    \"DeleteVirtualInterface\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"virtualInterfaceId\"\n        ],\n        \"members\": {\n          \"virtualInterfaceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"virtualInterfaceState\": {}\n        }\n      }\n    },\n    \"DescribeConnectionLoa\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"connectionId\"\n        ],\n        \"members\": {\n          \"connectionId\": {},\n          \"providerName\": {},\n          \"loaContentType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"loa\": {\n            \"shape\": \"S28\"\n          }\n        }\n      }\n    },\n    \"DescribeConnections\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"connectionId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S2b\"\n      }\n    },\n    \"DescribeConnectionsOnInterconnect\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"interconnectId\"\n        ],\n        \"members\": {\n          \"interconnectId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S2b\"\n      }\n    },\n    \"DescribeHostedConnections\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"connectionId\"\n        ],\n        \"members\": {\n          \"connectionId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S2b\"\n      }\n    },\n    \"DescribeInterconnectLoa\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"interconnectId\"\n        ],\n        \"members\": {\n          \"interconnectId\": {},\n          \"providerName\": {},\n          \"loaContentType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"loa\": {\n            \"shape\": \"S28\"\n          }\n        }\n      }\n    },\n    \"DescribeInterconnects\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"interconnectId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"interconnects\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1j\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeLags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"lagId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"lags\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1o\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeLoa\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"connectionId\"\n        ],\n        \"members\": {\n          \"connectionId\": {},\n          \"providerName\": {},\n          \"loaContentType\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S28\"\n      }\n    },\n    \"DescribeLocations\": {\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"locations\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"locationCode\": {},\n                \"locationName\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"resourceArns\"\n        ],\n        \"members\": {\n          \"resourceArns\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"resourceTags\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"resourceArn\": {},\n                \"tags\": {\n                  \"shape\": \"S2x\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeVirtualGateways\": {\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"virtualGateways\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"virtualGatewayId\": {},\n                \"virtualGatewayState\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeVirtualInterfaces\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"connectionId\": {},\n          \"virtualInterfaceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"virtualInterfaces\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sp\"\n            }\n          }\n        }\n      }\n    },\n    \"DisassociateConnectionFromLag\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"connectionId\",\n          \"lagId\"\n        ],\n        \"members\": {\n          \"connectionId\": {},\n          \"lagId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S7\"\n      }\n    },\n    \"TagResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"resourceArn\",\n          \"tags\"\n        ],\n        \"members\": {\n          \"resourceArn\": {},\n          \"tags\": {\n            \"shape\": \"S2x\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"UntagResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"resourceArn\",\n          \"tagKeys\"\n        ],\n        \"members\": {\n          \"resourceArn\": {},\n          \"tagKeys\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"UpdateLag\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"lagId\"\n        ],\n        \"members\": {\n          \"lagId\": {},\n          \"lagName\": {},\n          \"minimumLinks\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1o\"\n      }\n    }\n  },\n  \"shapes\": {\n    \"S7\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ownerAccount\": {},\n        \"connectionId\": {},\n        \"connectionName\": {},\n        \"connectionState\": {},\n        \"region\": {},\n        \"location\": {},\n        \"bandwidth\": {},\n        \"vlan\": {\n          \"type\": \"integer\"\n        },\n        \"partnerName\": {},\n        \"loaIssueTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"lagId\": {},\n        \"awsDevice\": {}\n      }\n    },\n    \"Sp\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ownerAccount\": {},\n        \"virtualInterfaceId\": {},\n        \"location\": {},\n        \"connectionId\": {},\n        \"virtualInterfaceType\": {},\n        \"virtualInterfaceName\": {},\n        \"vlan\": {\n          \"type\": \"integer\"\n        },\n        \"asn\": {\n          \"type\": \"integer\"\n        },\n        \"authKey\": {},\n        \"amazonAddress\": {},\n        \"customerAddress\": {},\n        \"addressFamily\": {},\n        \"virtualInterfaceState\": {},\n        \"customerRouterConfig\": {},\n        \"virtualGatewayId\": {},\n        \"routeFilterPrefixes\": {\n          \"shape\": \"Sv\"\n        },\n        \"bgpPeers\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"asn\": {\n                \"type\": \"integer\"\n              },\n              \"authKey\": {},\n              \"addressFamily\": {},\n              \"amazonAddress\": {},\n              \"customerAddress\": {},\n              \"bgpPeerState\": {},\n              \"bgpStatus\": {}\n            }\n          }\n        }\n      }\n    },\n    \"Sv\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"cidr\": {}\n        }\n      }\n    },\n    \"S1j\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"interconnectId\": {},\n        \"interconnectName\": {},\n        \"interconnectState\": {},\n        \"region\": {},\n        \"location\": {},\n        \"bandwidth\": {},\n        \"loaIssueTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"lagId\": {},\n        \"awsDevice\": {}\n      }\n    },\n    \"S1o\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"connectionsBandwidth\": {},\n        \"numberOfConnections\": {\n          \"type\": \"integer\"\n        },\n        \"lagId\": {},\n        \"ownerAccount\": {},\n        \"lagName\": {},\n        \"lagState\": {},\n        \"location\": {},\n        \"region\": {},\n        \"minimumLinks\": {\n          \"type\": \"integer\"\n        },\n        \"awsDevice\": {},\n        \"connections\": {\n          \"shape\": \"S1q\"\n        },\n        \"allowsHostedConnections\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S1q\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S7\"\n      }\n    },\n    \"S28\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"loaContent\": {\n          \"type\": \"blob\"\n        },\n        \"loaContentType\": {}\n      }\n    },\n    \"S2b\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"connections\": {\n          \"shape\": \"S1q\"\n        }\n      }\n    },\n    \"S2x\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"key\"\n        ],\n        \"members\": {\n          \"key\": {},\n          \"value\": {}\n        }\n      }\n    }\n  }\n}\n},{}],35:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeConnections\": {\n      \"result_key\": \"connections\"\n    },\n    \"DescribeConnectionsOnInterconnect\": {\n      \"result_key\": \"connections\"\n    },\n    \"DescribeInterconnects\": {\n      \"result_key\": \"interconnects\"\n    },\n    \"DescribeLocations\": {\n      \"result_key\": \"locations\"\n    },\n    \"DescribeVirtualGateways\": {\n      \"result_key\": \"virtualGateways\"\n    },\n    \"DescribeVirtualInterfaces\": {\n      \"result_key\": \"virtualInterfaces\"\n    }\n  }\n}\n},{}],36:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2011-12-05\",\n    \"endpointPrefix\": \"dynamodb\",\n    \"jsonVersion\": \"1.0\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"DynamoDB\",\n    \"serviceFullName\": \"Amazon DynamoDB\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"DynamoDB_20111205\",\n    \"uid\": \"dynamodb-2011-12-05\"\n  },\n  \"operations\": {\n    \"BatchGetItem\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RequestItems\"\n        ],\n        \"members\": {\n          \"RequestItems\": {\n            \"shape\": \"S2\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Responses\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Items\": {\n                  \"shape\": \"Sk\"\n                },\n                \"ConsumedCapacityUnits\": {\n                  \"type\": \"double\"\n                }\n              }\n            }\n          },\n          \"UnprocessedKeys\": {\n            \"shape\": \"S2\"\n          }\n        }\n      }\n    },\n    \"BatchWriteItem\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RequestItems\"\n        ],\n        \"members\": {\n          \"RequestItems\": {\n            \"shape\": \"So\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Responses\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ConsumedCapacityUnits\": {\n                  \"type\": \"double\"\n                }\n              }\n            }\n          },\n          \"UnprocessedItems\": {\n            \"shape\": \"So\"\n          }\n        }\n      }\n    },\n    \"CreateTable\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\",\n          \"KeySchema\",\n          \"ProvisionedThroughput\"\n        ],\n        \"members\": {\n          \"TableName\": {},\n          \"KeySchema\": {\n            \"shape\": \"Sy\"\n          },\n          \"ProvisionedThroughput\": {\n            \"shape\": \"S12\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TableDescription\": {\n            \"shape\": \"S15\"\n          }\n        }\n      }\n    },\n    \"DeleteItem\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"TableName\": {},\n          \"Key\": {\n            \"shape\": \"S6\"\n          },\n          \"Expected\": {\n            \"shape\": \"S1b\"\n          },\n          \"ReturnValues\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"shape\": \"Sl\"\n          },\n          \"ConsumedCapacityUnits\": {\n            \"type\": \"double\"\n          }\n        }\n      }\n    },\n    \"DeleteTable\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\"\n        ],\n        \"members\": {\n          \"TableName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TableDescription\": {\n            \"shape\": \"S15\"\n          }\n        }\n      }\n    },\n    \"DescribeTable\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\"\n        ],\n        \"members\": {\n          \"TableName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Table\": {\n            \"shape\": \"S15\"\n          }\n        }\n      }\n    },\n    \"GetItem\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"TableName\": {},\n          \"Key\": {\n            \"shape\": \"S6\"\n          },\n          \"AttributesToGet\": {\n            \"shape\": \"Se\"\n          },\n          \"ConsistentRead\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Item\": {\n            \"shape\": \"Sl\"\n          },\n          \"ConsumedCapacityUnits\": {\n            \"type\": \"double\"\n          }\n        }\n      }\n    },\n    \"ListTables\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ExclusiveStartTableName\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TableNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"LastEvaluatedTableName\": {}\n        }\n      }\n    },\n    \"PutItem\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\",\n          \"Item\"\n        ],\n        \"members\": {\n          \"TableName\": {},\n          \"Item\": {\n            \"shape\": \"Ss\"\n          },\n          \"Expected\": {\n            \"shape\": \"S1b\"\n          },\n          \"ReturnValues\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"shape\": \"Sl\"\n          },\n          \"ConsumedCapacityUnits\": {\n            \"type\": \"double\"\n          }\n        }\n      }\n    },\n    \"Query\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\",\n          \"HashKeyValue\"\n        ],\n        \"members\": {\n          \"TableName\": {},\n          \"AttributesToGet\": {\n            \"shape\": \"Se\"\n          },\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"ConsistentRead\": {\n            \"type\": \"boolean\"\n          },\n          \"Count\": {\n            \"type\": \"boolean\"\n          },\n          \"HashKeyValue\": {\n            \"shape\": \"S7\"\n          },\n          \"RangeKeyCondition\": {\n            \"shape\": \"S1u\"\n          },\n          \"ScanIndexForward\": {\n            \"type\": \"boolean\"\n          },\n          \"ExclusiveStartKey\": {\n            \"shape\": \"S6\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Items\": {\n            \"shape\": \"Sk\"\n          },\n          \"Count\": {\n            \"type\": \"integer\"\n          },\n          \"LastEvaluatedKey\": {\n            \"shape\": \"S6\"\n          },\n          \"ConsumedCapacityUnits\": {\n            \"type\": \"double\"\n          }\n        }\n      }\n    },\n    \"Scan\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\"\n        ],\n        \"members\": {\n          \"TableName\": {},\n          \"AttributesToGet\": {\n            \"shape\": \"Se\"\n          },\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"Count\": {\n            \"type\": \"boolean\"\n          },\n          \"ScanFilter\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"shape\": \"S1u\"\n            }\n          },\n          \"ExclusiveStartKey\": {\n            \"shape\": \"S6\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Items\": {\n            \"shape\": \"Sk\"\n          },\n          \"Count\": {\n            \"type\": \"integer\"\n          },\n          \"ScannedCount\": {\n            \"type\": \"integer\"\n          },\n          \"LastEvaluatedKey\": {\n            \"shape\": \"S6\"\n          },\n          \"ConsumedCapacityUnits\": {\n            \"type\": \"double\"\n          }\n        }\n      }\n    },\n    \"UpdateItem\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\",\n          \"Key\",\n          \"AttributeUpdates\"\n        ],\n        \"members\": {\n          \"TableName\": {},\n          \"Key\": {\n            \"shape\": \"S6\"\n          },\n          \"AttributeUpdates\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Value\": {\n                  \"shape\": \"S7\"\n                },\n                \"Action\": {}\n              }\n            }\n          },\n          \"Expected\": {\n            \"shape\": \"S1b\"\n          },\n          \"ReturnValues\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"shape\": \"Sl\"\n          },\n          \"ConsumedCapacityUnits\": {\n            \"type\": \"double\"\n          }\n        }\n      }\n    },\n    \"UpdateTable\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\",\n          \"ProvisionedThroughput\"\n        ],\n        \"members\": {\n          \"TableName\": {},\n          \"ProvisionedThroughput\": {\n            \"shape\": \"S12\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TableDescription\": {\n            \"shape\": \"S15\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S2\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Keys\"\n        ],\n        \"members\": {\n          \"Keys\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S6\"\n            }\n          },\n          \"AttributesToGet\": {\n            \"shape\": \"Se\"\n          },\n          \"ConsistentRead\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"S6\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"HashKeyElement\"\n      ],\n      \"members\": {\n        \"HashKeyElement\": {\n          \"shape\": \"S7\"\n        },\n        \"RangeKeyElement\": {\n          \"shape\": \"S7\"\n        }\n      }\n    },\n    \"S7\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"S\": {},\n        \"N\": {},\n        \"B\": {\n          \"type\": \"blob\"\n        },\n        \"SS\": {\n          \"type\": \"list\",\n          \"member\": {}\n        },\n        \"NS\": {\n          \"type\": \"list\",\n          \"member\": {}\n        },\n        \"BS\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"blob\"\n          }\n        }\n      }\n    },\n    \"Se\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sk\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"Sl\"\n      }\n    },\n    \"Sl\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"shape\": \"S7\"\n      }\n    },\n    \"So\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"type\": \"list\",\n        \"member\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"PutRequest\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Item\"\n              ],\n              \"members\": {\n                \"Item\": {\n                  \"shape\": \"Ss\"\n                }\n              }\n            },\n            \"DeleteRequest\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Key\"\n              ],\n              \"members\": {\n                \"Key\": {\n                  \"shape\": \"S6\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"Ss\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"shape\": \"S7\"\n      }\n    },\n    \"Sy\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"HashKeyElement\"\n      ],\n      \"members\": {\n        \"HashKeyElement\": {\n          \"shape\": \"Sz\"\n        },\n        \"RangeKeyElement\": {\n          \"shape\": \"Sz\"\n        }\n      }\n    },\n    \"Sz\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"AttributeName\",\n        \"AttributeType\"\n      ],\n      \"members\": {\n        \"AttributeName\": {},\n        \"AttributeType\": {}\n      }\n    },\n    \"S12\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"ReadCapacityUnits\",\n        \"WriteCapacityUnits\"\n      ],\n      \"members\": {\n        \"ReadCapacityUnits\": {\n          \"type\": \"long\"\n        },\n        \"WriteCapacityUnits\": {\n          \"type\": \"long\"\n        }\n      }\n    },\n    \"S15\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"TableName\": {},\n        \"KeySchema\": {\n          \"shape\": \"Sy\"\n        },\n        \"TableStatus\": {},\n        \"CreationDateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"ProvisionedThroughput\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"LastIncreaseDateTime\": {\n              \"type\": \"timestamp\"\n            },\n            \"LastDecreaseDateTime\": {\n              \"type\": \"timestamp\"\n            },\n            \"NumberOfDecreasesToday\": {\n              \"type\": \"long\"\n            },\n            \"ReadCapacityUnits\": {\n              \"type\": \"long\"\n            },\n            \"WriteCapacityUnits\": {\n              \"type\": \"long\"\n            }\n          }\n        },\n        \"TableSizeBytes\": {\n          \"type\": \"long\"\n        },\n        \"ItemCount\": {\n          \"type\": \"long\"\n        }\n      }\n    },\n    \"S1b\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Value\": {\n            \"shape\": \"S7\"\n          },\n          \"Exists\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"S1u\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"ComparisonOperator\"\n      ],\n      \"members\": {\n        \"AttributeValueList\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"S7\"\n          }\n        },\n        \"ComparisonOperator\": {}\n      }\n    }\n  }\n}\n},{}],37:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"BatchGetItem\": {\n      \"input_token\": \"RequestItems\",\n      \"output_token\": \"UnprocessedKeys\"\n    },\n    \"ListTables\": {\n      \"input_token\": \"ExclusiveStartTableName\",\n      \"limit_key\": \"Limit\",\n      \"output_token\": \"LastEvaluatedTableName\",\n      \"result_key\": \"TableNames\"\n    },\n    \"Query\": {\n      \"input_token\": \"ExclusiveStartKey\",\n      \"limit_key\": \"Limit\",\n      \"output_token\": \"LastEvaluatedKey\",\n      \"result_key\": \"Items\"\n    },\n    \"Scan\": {\n      \"input_token\": \"ExclusiveStartKey\",\n      \"limit_key\": \"Limit\",\n      \"output_token\": \"LastEvaluatedKey\",\n      \"result_key\": \"Items\"\n    }\n  }\n}\n},{}],38:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"TableExists\": {\n      \"delay\": 20,\n      \"operation\": \"DescribeTable\",\n      \"maxAttempts\": 25,\n      \"acceptors\": [\n        {\n          \"expected\": \"ACTIVE\",\n          \"matcher\": \"path\",\n          \"state\": \"success\",\n          \"argument\": \"Table.TableStatus\"\n        },\n        {\n          \"expected\": \"ResourceNotFoundException\",\n          \"matcher\": \"error\",\n          \"state\": \"retry\"\n        }\n      ]\n    },\n    \"TableNotExists\": {\n      \"delay\": 20,\n      \"operation\": \"DescribeTable\",\n      \"maxAttempts\": 25,\n      \"acceptors\": [\n        {\n          \"expected\": \"ResourceNotFoundException\",\n          \"matcher\": \"error\",\n          \"state\": \"success\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],39:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2012-08-10\",\n    \"endpointPrefix\": \"dynamodb\",\n    \"jsonVersion\": \"1.0\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"DynamoDB\",\n    \"serviceFullName\": \"Amazon DynamoDB\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"DynamoDB_20120810\",\n    \"uid\": \"dynamodb-2012-08-10\"\n  },\n  \"operations\": {\n    \"BatchGetItem\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RequestItems\"\n        ],\n        \"members\": {\n          \"RequestItems\": {\n            \"shape\": \"S2\"\n          },\n          \"ReturnConsumedCapacity\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Responses\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"shape\": \"Sr\"\n            }\n          },\n          \"UnprocessedKeys\": {\n            \"shape\": \"S2\"\n          },\n          \"ConsumedCapacity\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"BatchWriteItem\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RequestItems\"\n        ],\n        \"members\": {\n          \"RequestItems\": {\n            \"shape\": \"S10\"\n          },\n          \"ReturnConsumedCapacity\": {},\n          \"ReturnItemCollectionMetrics\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UnprocessedItems\": {\n            \"shape\": \"S10\"\n          },\n          \"ItemCollectionMetrics\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"type\": \"list\",\n              \"member\": {\n                \"shape\": \"S1a\"\n              }\n            }\n          },\n          \"ConsumedCapacity\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"CreateTable\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AttributeDefinitions\",\n          \"TableName\",\n          \"KeySchema\",\n          \"ProvisionedThroughput\"\n        ],\n        \"members\": {\n          \"AttributeDefinitions\": {\n            \"shape\": \"S1f\"\n          },\n          \"TableName\": {},\n          \"KeySchema\": {\n            \"shape\": \"S1j\"\n          },\n          \"LocalSecondaryIndexes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"IndexName\",\n                \"KeySchema\",\n                \"Projection\"\n              ],\n              \"members\": {\n                \"IndexName\": {},\n                \"KeySchema\": {\n                  \"shape\": \"S1j\"\n                },\n                \"Projection\": {\n                  \"shape\": \"S1o\"\n                }\n              }\n            }\n          },\n          \"GlobalSecondaryIndexes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"IndexName\",\n                \"KeySchema\",\n                \"Projection\",\n                \"ProvisionedThroughput\"\n              ],\n              \"members\": {\n                \"IndexName\": {},\n                \"KeySchema\": {\n                  \"shape\": \"S1j\"\n                },\n                \"Projection\": {\n                  \"shape\": \"S1o\"\n                },\n                \"ProvisionedThroughput\": {\n                  \"shape\": \"S1u\"\n                }\n              }\n            }\n          },\n          \"ProvisionedThroughput\": {\n            \"shape\": \"S1u\"\n          },\n          \"StreamSpecification\": {\n            \"shape\": \"S1w\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TableDescription\": {\n            \"shape\": \"S20\"\n          }\n        }\n      }\n    },\n    \"DeleteItem\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"TableName\": {},\n          \"Key\": {\n            \"shape\": \"S6\"\n          },\n          \"Expected\": {\n            \"shape\": \"S2e\"\n          },\n          \"ConditionalOperator\": {},\n          \"ReturnValues\": {},\n          \"ReturnConsumedCapacity\": {},\n          \"ReturnItemCollectionMetrics\": {},\n          \"ConditionExpression\": {},\n          \"ExpressionAttributeNames\": {\n            \"shape\": \"Sm\"\n          },\n          \"ExpressionAttributeValues\": {\n            \"shape\": \"S2m\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"shape\": \"Ss\"\n          },\n          \"ConsumedCapacity\": {\n            \"shape\": \"Su\"\n          },\n          \"ItemCollectionMetrics\": {\n            \"shape\": \"S1a\"\n          }\n        }\n      }\n    },\n    \"DeleteTable\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\"\n        ],\n        \"members\": {\n          \"TableName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TableDescription\": {\n            \"shape\": \"S20\"\n          }\n        }\n      }\n    },\n    \"DescribeLimits\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AccountMaxReadCapacityUnits\": {\n            \"type\": \"long\"\n          },\n          \"AccountMaxWriteCapacityUnits\": {\n            \"type\": \"long\"\n          },\n          \"TableMaxReadCapacityUnits\": {\n            \"type\": \"long\"\n          },\n          \"TableMaxWriteCapacityUnits\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    },\n    \"DescribeTable\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\"\n        ],\n        \"members\": {\n          \"TableName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Table\": {\n            \"shape\": \"S20\"\n          }\n        }\n      }\n    },\n    \"GetItem\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"TableName\": {},\n          \"Key\": {\n            \"shape\": \"S6\"\n          },\n          \"AttributesToGet\": {\n            \"shape\": \"Sj\"\n          },\n          \"ConsistentRead\": {\n            \"type\": \"boolean\"\n          },\n          \"ReturnConsumedCapacity\": {},\n          \"ProjectionExpression\": {},\n          \"ExpressionAttributeNames\": {\n            \"shape\": \"Sm\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Item\": {\n            \"shape\": \"Ss\"\n          },\n          \"ConsumedCapacity\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"ListTables\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ExclusiveStartTableName\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TableNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"LastEvaluatedTableName\": {}\n        }\n      }\n    },\n    \"ListTagsOfResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceArn\"\n        ],\n        \"members\": {\n          \"ResourceArn\": {},\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Tags\": {\n            \"shape\": \"S35\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"PutItem\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\",\n          \"Item\"\n        ],\n        \"members\": {\n          \"TableName\": {},\n          \"Item\": {\n            \"shape\": \"S14\"\n          },\n          \"Expected\": {\n            \"shape\": \"S2e\"\n          },\n          \"ReturnValues\": {},\n          \"ReturnConsumedCapacity\": {},\n          \"ReturnItemCollectionMetrics\": {},\n          \"ConditionalOperator\": {},\n          \"ConditionExpression\": {},\n          \"ExpressionAttributeNames\": {\n            \"shape\": \"Sm\"\n          },\n          \"ExpressionAttributeValues\": {\n            \"shape\": \"S2m\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"shape\": \"Ss\"\n          },\n          \"ConsumedCapacity\": {\n            \"shape\": \"Su\"\n          },\n          \"ItemCollectionMetrics\": {\n            \"shape\": \"S1a\"\n          }\n        }\n      }\n    },\n    \"Query\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\"\n        ],\n        \"members\": {\n          \"TableName\": {},\n          \"IndexName\": {},\n          \"Select\": {},\n          \"AttributesToGet\": {\n            \"shape\": \"Sj\"\n          },\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"ConsistentRead\": {\n            \"type\": \"boolean\"\n          },\n          \"KeyConditions\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"shape\": \"S3f\"\n            }\n          },\n          \"QueryFilter\": {\n            \"shape\": \"S3g\"\n          },\n          \"ConditionalOperator\": {},\n          \"ScanIndexForward\": {\n            \"type\": \"boolean\"\n          },\n          \"ExclusiveStartKey\": {\n            \"shape\": \"S6\"\n          },\n          \"ReturnConsumedCapacity\": {},\n          \"ProjectionExpression\": {},\n          \"FilterExpression\": {},\n          \"KeyConditionExpression\": {},\n          \"ExpressionAttributeNames\": {\n            \"shape\": \"Sm\"\n          },\n          \"ExpressionAttributeValues\": {\n            \"shape\": \"S2m\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Items\": {\n            \"shape\": \"Sr\"\n          },\n          \"Count\": {\n            \"type\": \"integer\"\n          },\n          \"ScannedCount\": {\n            \"type\": \"integer\"\n          },\n          \"LastEvaluatedKey\": {\n            \"shape\": \"S6\"\n          },\n          \"ConsumedCapacity\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"Scan\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\"\n        ],\n        \"members\": {\n          \"TableName\": {},\n          \"IndexName\": {},\n          \"AttributesToGet\": {\n            \"shape\": \"Sj\"\n          },\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"Select\": {},\n          \"ScanFilter\": {\n            \"shape\": \"S3g\"\n          },\n          \"ConditionalOperator\": {},\n          \"ExclusiveStartKey\": {\n            \"shape\": \"S6\"\n          },\n          \"ReturnConsumedCapacity\": {},\n          \"TotalSegments\": {\n            \"type\": \"integer\"\n          },\n          \"Segment\": {\n            \"type\": \"integer\"\n          },\n          \"ProjectionExpression\": {},\n          \"FilterExpression\": {},\n          \"ExpressionAttributeNames\": {\n            \"shape\": \"Sm\"\n          },\n          \"ExpressionAttributeValues\": {\n            \"shape\": \"S2m\"\n          },\n          \"ConsistentRead\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Items\": {\n            \"shape\": \"Sr\"\n          },\n          \"Count\": {\n            \"type\": \"integer\"\n          },\n          \"ScannedCount\": {\n            \"type\": \"integer\"\n          },\n          \"LastEvaluatedKey\": {\n            \"shape\": \"S6\"\n          },\n          \"ConsumedCapacity\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"TagResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceArn\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"ResourceArn\": {},\n          \"Tags\": {\n            \"shape\": \"S35\"\n          }\n        }\n      }\n    },\n    \"UntagResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceArn\",\n          \"TagKeys\"\n        ],\n        \"members\": {\n          \"ResourceArn\": {},\n          \"TagKeys\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"UpdateItem\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"TableName\": {},\n          \"Key\": {\n            \"shape\": \"S6\"\n          },\n          \"AttributeUpdates\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Value\": {\n                  \"shape\": \"S8\"\n                },\n                \"Action\": {}\n              }\n            }\n          },\n          \"Expected\": {\n            \"shape\": \"S2e\"\n          },\n          \"ConditionalOperator\": {},\n          \"ReturnValues\": {},\n          \"ReturnConsumedCapacity\": {},\n          \"ReturnItemCollectionMetrics\": {},\n          \"UpdateExpression\": {},\n          \"ConditionExpression\": {},\n          \"ExpressionAttributeNames\": {\n            \"shape\": \"Sm\"\n          },\n          \"ExpressionAttributeValues\": {\n            \"shape\": \"S2m\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"shape\": \"Ss\"\n          },\n          \"ConsumedCapacity\": {\n            \"shape\": \"Su\"\n          },\n          \"ItemCollectionMetrics\": {\n            \"shape\": \"S1a\"\n          }\n        }\n      }\n    },\n    \"UpdateTable\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TableName\"\n        ],\n        \"members\": {\n          \"AttributeDefinitions\": {\n            \"shape\": \"S1f\"\n          },\n          \"TableName\": {},\n          \"ProvisionedThroughput\": {\n            \"shape\": \"S1u\"\n          },\n          \"GlobalSecondaryIndexUpdates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Update\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"IndexName\",\n                    \"ProvisionedThroughput\"\n                  ],\n                  \"members\": {\n                    \"IndexName\": {},\n                    \"ProvisionedThroughput\": {\n                      \"shape\": \"S1u\"\n                    }\n                  }\n                },\n                \"Create\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"IndexName\",\n                    \"KeySchema\",\n                    \"Projection\",\n                    \"ProvisionedThroughput\"\n                  ],\n                  \"members\": {\n                    \"IndexName\": {},\n                    \"KeySchema\": {\n                      \"shape\": \"S1j\"\n                    },\n                    \"Projection\": {\n                      \"shape\": \"S1o\"\n                    },\n                    \"ProvisionedThroughput\": {\n                      \"shape\": \"S1u\"\n                    }\n                  }\n                },\n                \"Delete\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"IndexName\"\n                  ],\n                  \"members\": {\n                    \"IndexName\": {}\n                  }\n                }\n              }\n            }\n          },\n          \"StreamSpecification\": {\n            \"shape\": \"S1w\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TableDescription\": {\n            \"shape\": \"S20\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S2\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Keys\"\n        ],\n        \"members\": {\n          \"Keys\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S6\"\n            }\n          },\n          \"AttributesToGet\": {\n            \"shape\": \"Sj\"\n          },\n          \"ConsistentRead\": {\n            \"type\": \"boolean\"\n          },\n          \"ProjectionExpression\": {},\n          \"ExpressionAttributeNames\": {\n            \"shape\": \"Sm\"\n          }\n        }\n      }\n    },\n    \"S6\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"shape\": \"S8\"\n      }\n    },\n    \"S8\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"S\": {},\n        \"N\": {},\n        \"B\": {\n          \"type\": \"blob\"\n        },\n        \"SS\": {\n          \"type\": \"list\",\n          \"member\": {}\n        },\n        \"NS\": {\n          \"type\": \"list\",\n          \"member\": {}\n        },\n        \"BS\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"blob\"\n          }\n        },\n        \"M\": {\n          \"type\": \"map\",\n          \"key\": {},\n          \"value\": {\n            \"shape\": \"S8\"\n          }\n        },\n        \"L\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"S8\"\n          }\n        },\n        \"NULL\": {\n          \"type\": \"boolean\"\n        },\n        \"BOOL\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"Sj\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sm\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"Sr\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"Ss\"\n      }\n    },\n    \"Ss\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"shape\": \"S8\"\n      }\n    },\n    \"St\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"Su\"\n      }\n    },\n    \"Su\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"TableName\": {},\n        \"CapacityUnits\": {\n          \"type\": \"double\"\n        },\n        \"Table\": {\n          \"shape\": \"Sw\"\n        },\n        \"LocalSecondaryIndexes\": {\n          \"shape\": \"Sx\"\n        },\n        \"GlobalSecondaryIndexes\": {\n          \"shape\": \"Sx\"\n        }\n      }\n    },\n    \"Sw\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CapacityUnits\": {\n          \"type\": \"double\"\n        }\n      }\n    },\n    \"Sx\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"shape\": \"Sw\"\n      }\n    },\n    \"S10\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"type\": \"list\",\n        \"member\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"PutRequest\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Item\"\n              ],\n              \"members\": {\n                \"Item\": {\n                  \"shape\": \"S14\"\n                }\n              }\n            },\n            \"DeleteRequest\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Key\"\n              ],\n              \"members\": {\n                \"Key\": {\n                  \"shape\": \"S6\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S14\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"shape\": \"S8\"\n      }\n    },\n    \"S1a\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ItemCollectionKey\": {\n          \"type\": \"map\",\n          \"key\": {},\n          \"value\": {\n            \"shape\": \"S8\"\n          }\n        },\n        \"SizeEstimateRangeGB\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"double\"\n          }\n        }\n      }\n    },\n    \"S1f\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AttributeName\",\n          \"AttributeType\"\n        ],\n        \"members\": {\n          \"AttributeName\": {},\n          \"AttributeType\": {}\n        }\n      }\n    },\n    \"S1j\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AttributeName\",\n          \"KeyType\"\n        ],\n        \"members\": {\n          \"AttributeName\": {},\n          \"KeyType\": {}\n        }\n      }\n    },\n    \"S1o\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ProjectionType\": {},\n        \"NonKeyAttributes\": {\n          \"type\": \"list\",\n          \"member\": {}\n        }\n      }\n    },\n    \"S1u\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"ReadCapacityUnits\",\n        \"WriteCapacityUnits\"\n      ],\n      \"members\": {\n        \"ReadCapacityUnits\": {\n          \"type\": \"long\"\n        },\n        \"WriteCapacityUnits\": {\n          \"type\": \"long\"\n        }\n      }\n    },\n    \"S1w\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"StreamEnabled\": {\n          \"type\": \"boolean\"\n        },\n        \"StreamViewType\": {}\n      }\n    },\n    \"S20\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AttributeDefinitions\": {\n          \"shape\": \"S1f\"\n        },\n        \"TableName\": {},\n        \"KeySchema\": {\n          \"shape\": \"S1j\"\n        },\n        \"TableStatus\": {},\n        \"CreationDateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"ProvisionedThroughput\": {\n          \"shape\": \"S23\"\n        },\n        \"TableSizeBytes\": {\n          \"type\": \"long\"\n        },\n        \"ItemCount\": {\n          \"type\": \"long\"\n        },\n        \"TableArn\": {},\n        \"LocalSecondaryIndexes\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"IndexName\": {},\n              \"KeySchema\": {\n                \"shape\": \"S1j\"\n              },\n              \"Projection\": {\n                \"shape\": \"S1o\"\n              },\n              \"IndexSizeBytes\": {\n                \"type\": \"long\"\n              },\n              \"ItemCount\": {\n                \"type\": \"long\"\n              },\n              \"IndexArn\": {}\n            }\n          }\n        },\n        \"GlobalSecondaryIndexes\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"IndexName\": {},\n              \"KeySchema\": {\n                \"shape\": \"S1j\"\n              },\n              \"Projection\": {\n                \"shape\": \"S1o\"\n              },\n              \"IndexStatus\": {},\n              \"Backfilling\": {\n                \"type\": \"boolean\"\n              },\n              \"ProvisionedThroughput\": {\n                \"shape\": \"S23\"\n              },\n              \"IndexSizeBytes\": {\n                \"type\": \"long\"\n              },\n              \"ItemCount\": {\n                \"type\": \"long\"\n              },\n              \"IndexArn\": {}\n            }\n          }\n        },\n        \"StreamSpecification\": {\n          \"shape\": \"S1w\"\n        },\n        \"LatestStreamLabel\": {},\n        \"LatestStreamArn\": {}\n      }\n    },\n    \"S23\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"LastIncreaseDateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"LastDecreaseDateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"NumberOfDecreasesToday\": {\n          \"type\": \"long\"\n        },\n        \"ReadCapacityUnits\": {\n          \"type\": \"long\"\n        },\n        \"WriteCapacityUnits\": {\n          \"type\": \"long\"\n        }\n      }\n    },\n    \"S2e\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Value\": {\n            \"shape\": \"S8\"\n          },\n          \"Exists\": {\n            \"type\": \"boolean\"\n          },\n          \"ComparisonOperator\": {},\n          \"AttributeValueList\": {\n            \"shape\": \"S2i\"\n          }\n        }\n      }\n    },\n    \"S2i\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S8\"\n      }\n    },\n    \"S2m\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"shape\": \"S8\"\n      }\n    },\n    \"S35\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Key\",\n          \"Value\"\n        ],\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"S3f\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"ComparisonOperator\"\n      ],\n      \"members\": {\n        \"AttributeValueList\": {\n          \"shape\": \"S2i\"\n        },\n        \"ComparisonOperator\": {}\n      }\n    },\n    \"S3g\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"shape\": \"S3f\"\n      }\n    }\n  }\n}\n},{}],40:[function(require,module,exports){\narguments[4][37][0].apply(exports,arguments)\n},{\"dup\":37}],41:[function(require,module,exports){\narguments[4][38][0].apply(exports,arguments)\n},{\"dup\":38}],42:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2016-11-15\",\n    \"endpointPrefix\": \"ec2\",\n    \"protocol\": \"ec2\",\n    \"serviceAbbreviation\": \"Amazon EC2\",\n    \"serviceFullName\": \"Amazon Elastic Compute Cloud\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"ec2-2016-11-15\",\n    \"xmlNamespace\": \"http://ec2.amazonaws.com/doc/2016-11-15\"\n  },\n  \"operations\": {\n    \"AcceptReservedInstancesExchangeQuote\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReservedInstanceIds\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"ReservedInstanceIds\": {\n            \"shape\": \"S3\",\n            \"locationName\": \"ReservedInstanceId\"\n          },\n          \"TargetConfigurations\": {\n            \"shape\": \"S5\",\n            \"locationName\": \"TargetConfiguration\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ExchangeId\": {\n            \"locationName\": \"exchangeId\"\n          }\n        }\n      }\n    },\n    \"AcceptVpcPeeringConnection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpcPeeringConnectionId\": {\n            \"locationName\": \"vpcPeeringConnectionId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcPeeringConnection\": {\n            \"shape\": \"Sb\",\n            \"locationName\": \"vpcPeeringConnection\"\n          }\n        }\n      }\n    },\n    \"AllocateAddress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"Domain\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PublicIp\": {\n            \"locationName\": \"publicIp\"\n          },\n          \"Domain\": {\n            \"locationName\": \"domain\"\n          },\n          \"AllocationId\": {\n            \"locationName\": \"allocationId\"\n          }\n        }\n      }\n    },\n    \"AllocateHosts\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceType\",\n          \"Quantity\",\n          \"AvailabilityZone\"\n        ],\n        \"members\": {\n          \"AutoPlacement\": {\n            \"locationName\": \"autoPlacement\"\n          },\n          \"ClientToken\": {\n            \"locationName\": \"clientToken\"\n          },\n          \"InstanceType\": {\n            \"locationName\": \"instanceType\"\n          },\n          \"Quantity\": {\n            \"locationName\": \"quantity\",\n            \"type\": \"integer\"\n          },\n          \"AvailabilityZone\": {\n            \"locationName\": \"availabilityZone\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HostIds\": {\n            \"shape\": \"Sr\",\n            \"locationName\": \"hostIdSet\"\n          }\n        }\n      }\n    },\n    \"AssignIpv6Addresses\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"NetworkInterfaceId\"\n        ],\n        \"members\": {\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"Ipv6Addresses\": {\n            \"shape\": \"St\",\n            \"locationName\": \"ipv6Addresses\"\n          },\n          \"Ipv6AddressCount\": {\n            \"locationName\": \"ipv6AddressCount\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"AssignedIpv6Addresses\": {\n            \"shape\": \"St\",\n            \"locationName\": \"assignedIpv6Addresses\"\n          }\n        }\n      }\n    },\n    \"AssignPrivateIpAddresses\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"NetworkInterfaceId\"\n        ],\n        \"members\": {\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"PrivateIpAddresses\": {\n            \"shape\": \"Sw\",\n            \"locationName\": \"privateIpAddress\"\n          },\n          \"SecondaryPrivateIpAddressCount\": {\n            \"locationName\": \"secondaryPrivateIpAddressCount\",\n            \"type\": \"integer\"\n          },\n          \"AllowReassignment\": {\n            \"locationName\": \"allowReassignment\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"AssociateAddress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceId\": {},\n          \"PublicIp\": {},\n          \"AllocationId\": {},\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"PrivateIpAddress\": {\n            \"locationName\": \"privateIpAddress\"\n          },\n          \"AllowReassociation\": {\n            \"locationName\": \"allowReassociation\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AssociationId\": {\n            \"locationName\": \"associationId\"\n          }\n        }\n      }\n    },\n    \"AssociateDhcpOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DhcpOptionsId\",\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"DhcpOptionsId\": {},\n          \"VpcId\": {}\n        }\n      }\n    },\n    \"AssociateIamInstanceProfile\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IamInstanceProfile\",\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"IamInstanceProfile\": {\n            \"shape\": \"S11\"\n          },\n          \"InstanceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IamInstanceProfileAssociation\": {\n            \"shape\": \"S13\",\n            \"locationName\": \"iamInstanceProfileAssociation\"\n          }\n        }\n      }\n    },\n    \"AssociateRouteTable\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubnetId\",\n          \"RouteTableId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SubnetId\": {\n            \"locationName\": \"subnetId\"\n          },\n          \"RouteTableId\": {\n            \"locationName\": \"routeTableId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AssociationId\": {\n            \"locationName\": \"associationId\"\n          }\n        }\n      }\n    },\n    \"AssociateSubnetCidrBlock\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubnetId\",\n          \"Ipv6CidrBlock\"\n        ],\n        \"members\": {\n          \"SubnetId\": {\n            \"locationName\": \"subnetId\"\n          },\n          \"Ipv6CidrBlock\": {\n            \"locationName\": \"ipv6CidrBlock\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SubnetId\": {\n            \"locationName\": \"subnetId\"\n          },\n          \"Ipv6CidrBlockAssociation\": {\n            \"shape\": \"S1a\",\n            \"locationName\": \"ipv6CidrBlockAssociation\"\n          }\n        }\n      }\n    },\n    \"AssociateVpcCidrBlock\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          },\n          \"AmazonProvidedIpv6CidrBlock\": {\n            \"locationName\": \"amazonProvidedIpv6CidrBlock\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          },\n          \"Ipv6CidrBlockAssociation\": {\n            \"shape\": \"S1f\",\n            \"locationName\": \"ipv6CidrBlockAssociation\"\n          }\n        }\n      }\n    },\n    \"AttachClassicLinkVpc\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\",\n          \"VpcId\",\n          \"Groups\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          },\n          \"Groups\": {\n            \"shape\": \"S1j\",\n            \"locationName\": \"SecurityGroupId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Return\": {\n            \"locationName\": \"return\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"AttachInternetGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InternetGatewayId\",\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InternetGatewayId\": {\n            \"locationName\": \"internetGatewayId\"\n          },\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          }\n        }\n      }\n    },\n    \"AttachNetworkInterface\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"NetworkInterfaceId\",\n          \"InstanceId\",\n          \"DeviceIndex\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"DeviceIndex\": {\n            \"locationName\": \"deviceIndex\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AttachmentId\": {\n            \"locationName\": \"attachmentId\"\n          }\n        }\n      }\n    },\n    \"AttachVolume\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeId\",\n          \"InstanceId\",\n          \"Device\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VolumeId\": {},\n          \"InstanceId\": {},\n          \"Device\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1p\"\n      }\n    },\n    \"AttachVpnGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpnGatewayId\",\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpnGatewayId\": {},\n          \"VpcId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcAttachment\": {\n            \"shape\": \"S1t\",\n            \"locationName\": \"attachment\"\n          }\n        }\n      }\n    },\n    \"AuthorizeSecurityGroupEgress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GroupId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"GroupId\": {\n            \"locationName\": \"groupId\"\n          },\n          \"SourceSecurityGroupName\": {\n            \"locationName\": \"sourceSecurityGroupName\"\n          },\n          \"SourceSecurityGroupOwnerId\": {\n            \"locationName\": \"sourceSecurityGroupOwnerId\"\n          },\n          \"IpProtocol\": {\n            \"locationName\": \"ipProtocol\"\n          },\n          \"FromPort\": {\n            \"locationName\": \"fromPort\",\n            \"type\": \"integer\"\n          },\n          \"ToPort\": {\n            \"locationName\": \"toPort\",\n            \"type\": \"integer\"\n          },\n          \"CidrIp\": {\n            \"locationName\": \"cidrIp\"\n          },\n          \"IpPermissions\": {\n            \"shape\": \"S1w\",\n            \"locationName\": \"ipPermissions\"\n          }\n        }\n      }\n    },\n    \"AuthorizeSecurityGroupIngress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"GroupName\": {},\n          \"GroupId\": {},\n          \"SourceSecurityGroupName\": {},\n          \"SourceSecurityGroupOwnerId\": {},\n          \"IpProtocol\": {},\n          \"FromPort\": {\n            \"type\": \"integer\"\n          },\n          \"ToPort\": {\n            \"type\": \"integer\"\n          },\n          \"CidrIp\": {},\n          \"IpPermissions\": {\n            \"shape\": \"S1w\"\n          }\n        }\n      }\n    },\n    \"BundleInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\",\n          \"Storage\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceId\": {},\n          \"Storage\": {\n            \"shape\": \"S28\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BundleTask\": {\n            \"shape\": \"S2c\",\n            \"locationName\": \"bundleInstanceTask\"\n          }\n        }\n      }\n    },\n    \"CancelBundleTask\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BundleId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"BundleId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BundleTask\": {\n            \"shape\": \"S2c\",\n            \"locationName\": \"bundleInstanceTask\"\n          }\n        }\n      }\n    },\n    \"CancelConversionTask\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConversionTaskId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"ConversionTaskId\": {\n            \"locationName\": \"conversionTaskId\"\n          },\n          \"ReasonMessage\": {\n            \"locationName\": \"reasonMessage\"\n          }\n        }\n      }\n    },\n    \"CancelExportTask\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ExportTaskId\"\n        ],\n        \"members\": {\n          \"ExportTaskId\": {\n            \"locationName\": \"exportTaskId\"\n          }\n        }\n      }\n    },\n    \"CancelImportTask\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"ImportTaskId\": {},\n          \"CancelReason\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ImportTaskId\": {\n            \"locationName\": \"importTaskId\"\n          },\n          \"State\": {\n            \"locationName\": \"state\"\n          },\n          \"PreviousState\": {\n            \"locationName\": \"previousState\"\n          }\n        }\n      }\n    },\n    \"CancelReservedInstancesListing\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReservedInstancesListingId\"\n        ],\n        \"members\": {\n          \"ReservedInstancesListingId\": {\n            \"locationName\": \"reservedInstancesListingId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedInstancesListings\": {\n            \"shape\": \"S2n\",\n            \"locationName\": \"reservedInstancesListingsSet\"\n          }\n        }\n      }\n    },\n    \"CancelSpotFleetRequests\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SpotFleetRequestIds\",\n          \"TerminateInstances\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SpotFleetRequestIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"spotFleetRequestId\"\n          },\n          \"TerminateInstances\": {\n            \"locationName\": \"terminateInstances\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UnsuccessfulFleetRequests\": {\n            \"locationName\": \"unsuccessfulFleetRequestSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"SpotFleetRequestId\",\n                \"Error\"\n              ],\n              \"members\": {\n                \"SpotFleetRequestId\": {\n                  \"locationName\": \"spotFleetRequestId\"\n                },\n                \"Error\": {\n                  \"locationName\": \"error\",\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"Code\",\n                    \"Message\"\n                  ],\n                  \"members\": {\n                    \"Code\": {\n                      \"locationName\": \"code\"\n                    },\n                    \"Message\": {\n                      \"locationName\": \"message\"\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"SuccessfulFleetRequests\": {\n            \"locationName\": \"successfulFleetRequestSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"SpotFleetRequestId\",\n                \"CurrentSpotFleetRequestState\",\n                \"PreviousSpotFleetRequestState\"\n              ],\n              \"members\": {\n                \"SpotFleetRequestId\": {\n                  \"locationName\": \"spotFleetRequestId\"\n                },\n                \"CurrentSpotFleetRequestState\": {\n                  \"locationName\": \"currentSpotFleetRequestState\"\n                },\n                \"PreviousSpotFleetRequestState\": {\n                  \"locationName\": \"previousSpotFleetRequestState\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"CancelSpotInstanceRequests\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SpotInstanceRequestIds\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SpotInstanceRequestIds\": {\n            \"shape\": \"S39\",\n            \"locationName\": \"SpotInstanceRequestId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CancelledSpotInstanceRequests\": {\n            \"locationName\": \"spotInstanceRequestSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"SpotInstanceRequestId\": {\n                  \"locationName\": \"spotInstanceRequestId\"\n                },\n                \"State\": {\n                  \"locationName\": \"state\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ConfirmProductInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ProductCode\",\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"ProductCode\": {},\n          \"InstanceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"OwnerId\": {\n            \"locationName\": \"ownerId\"\n          },\n          \"Return\": {\n            \"locationName\": \"return\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"CopyImage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceRegion\",\n          \"SourceImageId\",\n          \"Name\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SourceRegion\": {},\n          \"SourceImageId\": {},\n          \"Name\": {},\n          \"Description\": {},\n          \"ClientToken\": {},\n          \"Encrypted\": {\n            \"locationName\": \"encrypted\",\n            \"type\": \"boolean\"\n          },\n          \"KmsKeyId\": {\n            \"locationName\": \"kmsKeyId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ImageId\": {\n            \"locationName\": \"imageId\"\n          }\n        }\n      }\n    },\n    \"CopySnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceRegion\",\n          \"SourceSnapshotId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SourceRegion\": {},\n          \"SourceSnapshotId\": {},\n          \"Description\": {},\n          \"DestinationRegion\": {\n            \"locationName\": \"destinationRegion\"\n          },\n          \"PresignedUrl\": {\n            \"locationName\": \"presignedUrl\"\n          },\n          \"Encrypted\": {\n            \"locationName\": \"encrypted\",\n            \"type\": \"boolean\"\n          },\n          \"KmsKeyId\": {\n            \"locationName\": \"kmsKeyId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SnapshotId\": {\n            \"locationName\": \"snapshotId\"\n          }\n        }\n      }\n    },\n    \"CreateCustomerGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Type\",\n          \"PublicIp\",\n          \"BgpAsn\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"Type\": {},\n          \"PublicIp\": {\n            \"locationName\": \"IpAddress\"\n          },\n          \"BgpAsn\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CustomerGateway\": {\n            \"shape\": \"S3n\",\n            \"locationName\": \"customerGateway\"\n          }\n        }\n      }\n    },\n    \"CreateDhcpOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DhcpConfigurations\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"DhcpConfigurations\": {\n            \"locationName\": \"dhcpConfiguration\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Key\": {\n                  \"locationName\": \"key\"\n                },\n                \"Values\": {\n                  \"shape\": \"S2z\",\n                  \"locationName\": \"Value\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DhcpOptions\": {\n            \"shape\": \"S3s\",\n            \"locationName\": \"dhcpOptions\"\n          }\n        }\n      }\n    },\n    \"CreateEgressOnlyInternetGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"VpcId\": {},\n          \"ClientToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EgressOnlyInternetGateway\": {\n            \"shape\": \"S3z\",\n            \"locationName\": \"egressOnlyInternetGateway\"\n          },\n          \"ClientToken\": {\n            \"locationName\": \"clientToken\"\n          }\n        }\n      }\n    },\n    \"CreateFlowLogs\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceIds\",\n          \"ResourceType\",\n          \"TrafficType\",\n          \"LogGroupName\",\n          \"DeliverLogsPermissionArn\"\n        ],\n        \"members\": {\n          \"ResourceIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"ResourceId\"\n          },\n          \"ResourceType\": {},\n          \"TrafficType\": {},\n          \"LogGroupName\": {},\n          \"DeliverLogsPermissionArn\": {},\n          \"ClientToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FlowLogIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"flowLogIdSet\"\n          },\n          \"ClientToken\": {\n            \"locationName\": \"clientToken\"\n          },\n          \"Unsuccessful\": {\n            \"shape\": \"S47\",\n            \"locationName\": \"unsuccessful\"\n          }\n        }\n      }\n    },\n    \"CreateImage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\",\n          \"Name\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"Name\": {\n            \"locationName\": \"name\"\n          },\n          \"Description\": {\n            \"locationName\": \"description\"\n          },\n          \"NoReboot\": {\n            \"locationName\": \"noReboot\",\n            \"type\": \"boolean\"\n          },\n          \"BlockDeviceMappings\": {\n            \"shape\": \"S4b\",\n            \"locationName\": \"blockDeviceMapping\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ImageId\": {\n            \"locationName\": \"imageId\"\n          }\n        }\n      }\n    },\n    \"CreateInstanceExportTask\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"Description\": {\n            \"locationName\": \"description\"\n          },\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"TargetEnvironment\": {\n            \"locationName\": \"targetEnvironment\"\n          },\n          \"ExportToS3Task\": {\n            \"locationName\": \"exportToS3\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"DiskImageFormat\": {\n                \"locationName\": \"diskImageFormat\"\n              },\n              \"ContainerFormat\": {\n                \"locationName\": \"containerFormat\"\n              },\n              \"S3Bucket\": {\n                \"locationName\": \"s3Bucket\"\n              },\n              \"S3Prefix\": {\n                \"locationName\": \"s3Prefix\"\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ExportTask\": {\n            \"shape\": \"S4m\",\n            \"locationName\": \"exportTask\"\n          }\n        }\n      }\n    },\n    \"CreateInternetGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InternetGateway\": {\n            \"shape\": \"S4s\",\n            \"locationName\": \"internetGateway\"\n          }\n        }\n      }\n    },\n    \"CreateKeyPair\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyName\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"KeyName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"KeyName\": {\n            \"locationName\": \"keyName\"\n          },\n          \"KeyFingerprint\": {\n            \"locationName\": \"keyFingerprint\"\n          },\n          \"KeyMaterial\": {\n            \"locationName\": \"keyMaterial\"\n          }\n        }\n      }\n    },\n    \"CreateNatGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubnetId\",\n          \"AllocationId\"\n        ],\n        \"members\": {\n          \"SubnetId\": {},\n          \"AllocationId\": {},\n          \"ClientToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NatGateway\": {\n            \"shape\": \"S4x\",\n            \"locationName\": \"natGateway\"\n          },\n          \"ClientToken\": {\n            \"locationName\": \"clientToken\"\n          }\n        }\n      }\n    },\n    \"CreateNetworkAcl\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NetworkAcl\": {\n            \"shape\": \"S54\",\n            \"locationName\": \"networkAcl\"\n          }\n        }\n      }\n    },\n    \"CreateNetworkAclEntry\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"NetworkAclId\",\n          \"RuleNumber\",\n          \"Protocol\",\n          \"RuleAction\",\n          \"Egress\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"NetworkAclId\": {\n            \"locationName\": \"networkAclId\"\n          },\n          \"RuleNumber\": {\n            \"locationName\": \"ruleNumber\",\n            \"type\": \"integer\"\n          },\n          \"Protocol\": {\n            \"locationName\": \"protocol\"\n          },\n          \"RuleAction\": {\n            \"locationName\": \"ruleAction\"\n          },\n          \"Egress\": {\n            \"locationName\": \"egress\",\n            \"type\": \"boolean\"\n          },\n          \"CidrBlock\": {\n            \"locationName\": \"cidrBlock\"\n          },\n          \"Ipv6CidrBlock\": {\n            \"locationName\": \"ipv6CidrBlock\"\n          },\n          \"IcmpTypeCode\": {\n            \"shape\": \"S58\",\n            \"locationName\": \"Icmp\"\n          },\n          \"PortRange\": {\n            \"shape\": \"S59\",\n            \"locationName\": \"portRange\"\n          }\n        }\n      }\n    },\n    \"CreateNetworkInterface\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubnetId\"\n        ],\n        \"members\": {\n          \"SubnetId\": {\n            \"locationName\": \"subnetId\"\n          },\n          \"Description\": {\n            \"locationName\": \"description\"\n          },\n          \"PrivateIpAddress\": {\n            \"locationName\": \"privateIpAddress\"\n          },\n          \"Groups\": {\n            \"shape\": \"S5e\",\n            \"locationName\": \"SecurityGroupId\"\n          },\n          \"PrivateIpAddresses\": {\n            \"shape\": \"S5f\",\n            \"locationName\": \"privateIpAddresses\"\n          },\n          \"SecondaryPrivateIpAddressCount\": {\n            \"locationName\": \"secondaryPrivateIpAddressCount\",\n            \"type\": \"integer\"\n          },\n          \"Ipv6Addresses\": {\n            \"shape\": \"S5h\",\n            \"locationName\": \"ipv6Addresses\"\n          },\n          \"Ipv6AddressCount\": {\n            \"locationName\": \"ipv6AddressCount\",\n            \"type\": \"integer\"\n          },\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NetworkInterface\": {\n            \"shape\": \"S5k\",\n            \"locationName\": \"networkInterface\"\n          }\n        }\n      }\n    },\n    \"CreatePlacementGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GroupName\",\n          \"Strategy\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"GroupName\": {\n            \"locationName\": \"groupName\"\n          },\n          \"Strategy\": {\n            \"locationName\": \"strategy\"\n          }\n        }\n      }\n    },\n    \"CreateReservedInstancesListing\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReservedInstancesId\",\n          \"InstanceCount\",\n          \"PriceSchedules\",\n          \"ClientToken\"\n        ],\n        \"members\": {\n          \"ReservedInstancesId\": {\n            \"locationName\": \"reservedInstancesId\"\n          },\n          \"InstanceCount\": {\n            \"locationName\": \"instanceCount\",\n            \"type\": \"integer\"\n          },\n          \"PriceSchedules\": {\n            \"locationName\": \"priceSchedules\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Term\": {\n                  \"locationName\": \"term\",\n                  \"type\": \"long\"\n                },\n                \"Price\": {\n                  \"locationName\": \"price\",\n                  \"type\": \"double\"\n                },\n                \"CurrencyCode\": {\n                  \"locationName\": \"currencyCode\"\n                }\n              }\n            }\n          },\n          \"ClientToken\": {\n            \"locationName\": \"clientToken\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedInstancesListings\": {\n            \"shape\": \"S2n\",\n            \"locationName\": \"reservedInstancesListingsSet\"\n          }\n        }\n      }\n    },\n    \"CreateRoute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RouteTableId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"RouteTableId\": {\n            \"locationName\": \"routeTableId\"\n          },\n          \"DestinationCidrBlock\": {\n            \"locationName\": \"destinationCidrBlock\"\n          },\n          \"GatewayId\": {\n            \"locationName\": \"gatewayId\"\n          },\n          \"DestinationIpv6CidrBlock\": {\n            \"locationName\": \"destinationIpv6CidrBlock\"\n          },\n          \"EgressOnlyInternetGatewayId\": {\n            \"locationName\": \"egressOnlyInternetGatewayId\"\n          },\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"VpcPeeringConnectionId\": {\n            \"locationName\": \"vpcPeeringConnectionId\"\n          },\n          \"NatGatewayId\": {\n            \"locationName\": \"natGatewayId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Return\": {\n            \"locationName\": \"return\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"CreateRouteTable\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RouteTable\": {\n            \"shape\": \"S65\",\n            \"locationName\": \"routeTable\"\n          }\n        }\n      }\n    },\n    \"CreateSecurityGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GroupName\",\n          \"Description\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"GroupName\": {},\n          \"Description\": {\n            \"locationName\": \"GroupDescription\"\n          },\n          \"VpcId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GroupId\": {\n            \"locationName\": \"groupId\"\n          }\n        }\n      }\n    },\n    \"CreateSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VolumeId\": {},\n          \"Description\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S6h\"\n      }\n    },\n    \"CreateSpotDatafeedSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"Bucket\": {\n            \"locationName\": \"bucket\"\n          },\n          \"Prefix\": {\n            \"locationName\": \"prefix\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SpotDatafeedSubscription\": {\n            \"shape\": \"S6l\",\n            \"locationName\": \"spotDatafeedSubscription\"\n          }\n        }\n      }\n    },\n    \"CreateSubnet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcId\",\n          \"CidrBlock\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpcId\": {},\n          \"CidrBlock\": {},\n          \"Ipv6CidrBlock\": {},\n          \"AvailabilityZone\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Subnet\": {\n            \"shape\": \"S6q\",\n            \"locationName\": \"subnet\"\n          }\n        }\n      }\n    },\n    \"CreateTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Resources\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"Resources\": {\n            \"shape\": \"S6u\",\n            \"locationName\": \"ResourceId\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sj\",\n            \"locationName\": \"Tag\"\n          }\n        }\n      }\n    },\n    \"CreateVolume\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AvailabilityZone\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"Size\": {\n            \"type\": \"integer\"\n          },\n          \"SnapshotId\": {},\n          \"AvailabilityZone\": {},\n          \"VolumeType\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"Encrypted\": {\n            \"locationName\": \"encrypted\",\n            \"type\": \"boolean\"\n          },\n          \"KmsKeyId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S6w\"\n      }\n    },\n    \"CreateVpc\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CidrBlock\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"CidrBlock\": {},\n          \"InstanceTenancy\": {\n            \"locationName\": \"instanceTenancy\"\n          },\n          \"AmazonProvidedIpv6CidrBlock\": {\n            \"locationName\": \"amazonProvidedIpv6CidrBlock\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Vpc\": {\n            \"shape\": \"S72\",\n            \"locationName\": \"vpc\"\n          }\n        }\n      }\n    },\n    \"CreateVpcEndpoint\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcId\",\n          \"ServiceName\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"VpcId\": {},\n          \"ServiceName\": {},\n          \"PolicyDocument\": {},\n          \"RouteTableIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"RouteTableId\"\n          },\n          \"ClientToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcEndpoint\": {\n            \"shape\": \"S77\",\n            \"locationName\": \"vpcEndpoint\"\n          },\n          \"ClientToken\": {\n            \"locationName\": \"clientToken\"\n          }\n        }\n      }\n    },\n    \"CreateVpcPeeringConnection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          },\n          \"PeerVpcId\": {\n            \"locationName\": \"peerVpcId\"\n          },\n          \"PeerOwnerId\": {\n            \"locationName\": \"peerOwnerId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcPeeringConnection\": {\n            \"shape\": \"Sb\",\n            \"locationName\": \"vpcPeeringConnection\"\n          }\n        }\n      }\n    },\n    \"CreateVpnConnection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Type\",\n          \"CustomerGatewayId\",\n          \"VpnGatewayId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"Type\": {},\n          \"CustomerGatewayId\": {},\n          \"VpnGatewayId\": {},\n          \"Options\": {\n            \"locationName\": \"options\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"StaticRoutesOnly\": {\n                \"locationName\": \"staticRoutesOnly\",\n                \"type\": \"boolean\"\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpnConnection\": {\n            \"shape\": \"S7e\",\n            \"locationName\": \"vpnConnection\"\n          }\n        }\n      }\n    },\n    \"CreateVpnConnectionRoute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpnConnectionId\",\n          \"DestinationCidrBlock\"\n        ],\n        \"members\": {\n          \"VpnConnectionId\": {},\n          \"DestinationCidrBlock\": {}\n        }\n      }\n    },\n    \"CreateVpnGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Type\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"Type\": {},\n          \"AvailabilityZone\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpnGateway\": {\n            \"shape\": \"S7q\",\n            \"locationName\": \"vpnGateway\"\n          }\n        }\n      }\n    },\n    \"DeleteCustomerGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CustomerGatewayId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"CustomerGatewayId\": {}\n        }\n      }\n    },\n    \"DeleteDhcpOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DhcpOptionsId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"DhcpOptionsId\": {}\n        }\n      }\n    },\n    \"DeleteEgressOnlyInternetGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EgressOnlyInternetGatewayId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"EgressOnlyInternetGatewayId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReturnCode\": {\n            \"locationName\": \"returnCode\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"DeleteFlowLogs\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FlowLogIds\"\n        ],\n        \"members\": {\n          \"FlowLogIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"FlowLogId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Unsuccessful\": {\n            \"shape\": \"S47\",\n            \"locationName\": \"unsuccessful\"\n          }\n        }\n      }\n    },\n    \"DeleteInternetGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InternetGatewayId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InternetGatewayId\": {\n            \"locationName\": \"internetGatewayId\"\n          }\n        }\n      }\n    },\n    \"DeleteKeyPair\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyName\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"KeyName\": {}\n        }\n      }\n    },\n    \"DeleteNatGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"NatGatewayId\"\n        ],\n        \"members\": {\n          \"NatGatewayId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NatGatewayId\": {\n            \"locationName\": \"natGatewayId\"\n          }\n        }\n      }\n    },\n    \"DeleteNetworkAcl\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"NetworkAclId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"NetworkAclId\": {\n            \"locationName\": \"networkAclId\"\n          }\n        }\n      }\n    },\n    \"DeleteNetworkAclEntry\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"NetworkAclId\",\n          \"RuleNumber\",\n          \"Egress\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"NetworkAclId\": {\n            \"locationName\": \"networkAclId\"\n          },\n          \"RuleNumber\": {\n            \"locationName\": \"ruleNumber\",\n            \"type\": \"integer\"\n          },\n          \"Egress\": {\n            \"locationName\": \"egress\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"DeleteNetworkInterface\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"NetworkInterfaceId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          }\n        }\n      }\n    },\n    \"DeletePlacementGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GroupName\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"GroupName\": {\n            \"locationName\": \"groupName\"\n          }\n        }\n      }\n    },\n    \"DeleteRoute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RouteTableId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"RouteTableId\": {\n            \"locationName\": \"routeTableId\"\n          },\n          \"DestinationCidrBlock\": {\n            \"locationName\": \"destinationCidrBlock\"\n          },\n          \"DestinationIpv6CidrBlock\": {\n            \"locationName\": \"destinationIpv6CidrBlock\"\n          }\n        }\n      }\n    },\n    \"DeleteRouteTable\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RouteTableId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"RouteTableId\": {\n            \"locationName\": \"routeTableId\"\n          }\n        }\n      }\n    },\n    \"DeleteSecurityGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"GroupName\": {},\n          \"GroupId\": {}\n        }\n      }\n    },\n    \"DeleteSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SnapshotId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SnapshotId\": {}\n        }\n      }\n    },\n    \"DeleteSpotDatafeedSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"DeleteSubnet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubnetId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SubnetId\": {}\n        }\n      }\n    },\n    \"DeleteTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Resources\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"Resources\": {\n            \"shape\": \"S6u\",\n            \"locationName\": \"resourceId\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sj\",\n            \"locationName\": \"tag\"\n          }\n        }\n      }\n    },\n    \"DeleteVolume\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VolumeId\": {}\n        }\n      }\n    },\n    \"DeleteVpc\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpcId\": {}\n        }\n      }\n    },\n    \"DeleteVpcEndpoints\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcEndpointIds\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"VpcEndpointIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"VpcEndpointId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Unsuccessful\": {\n            \"shape\": \"S47\",\n            \"locationName\": \"unsuccessful\"\n          }\n        }\n      }\n    },\n    \"DeleteVpcPeeringConnection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcPeeringConnectionId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpcPeeringConnectionId\": {\n            \"locationName\": \"vpcPeeringConnectionId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Return\": {\n            \"locationName\": \"return\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"DeleteVpnConnection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpnConnectionId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpnConnectionId\": {}\n        }\n      }\n    },\n    \"DeleteVpnConnectionRoute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpnConnectionId\",\n          \"DestinationCidrBlock\"\n        ],\n        \"members\": {\n          \"VpnConnectionId\": {},\n          \"DestinationCidrBlock\": {}\n        }\n      }\n    },\n    \"DeleteVpnGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpnGatewayId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpnGatewayId\": {}\n        }\n      }\n    },\n    \"DeregisterImage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ImageId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"ImageId\": {}\n        }\n      }\n    },\n    \"DescribeAccountAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"AttributeNames\": {\n            \"locationName\": \"attributeName\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"attributeName\"\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AccountAttributes\": {\n            \"locationName\": \"accountAttributeSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"AttributeName\": {\n                  \"locationName\": \"attributeName\"\n                },\n                \"AttributeValues\": {\n                  \"locationName\": \"attributeValueSet\",\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"item\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"AttributeValue\": {\n                        \"locationName\": \"attributeValue\"\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeAddresses\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"PublicIps\": {\n            \"locationName\": \"PublicIp\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"PublicIp\"\n            }\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"AllocationIds\": {\n            \"locationName\": \"AllocationId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"AllocationId\"\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Addresses\": {\n            \"locationName\": \"addressesSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"InstanceId\": {\n                  \"locationName\": \"instanceId\"\n                },\n                \"PublicIp\": {\n                  \"locationName\": \"publicIp\"\n                },\n                \"AllocationId\": {\n                  \"locationName\": \"allocationId\"\n                },\n                \"AssociationId\": {\n                  \"locationName\": \"associationId\"\n                },\n                \"Domain\": {\n                  \"locationName\": \"domain\"\n                },\n                \"NetworkInterfaceId\": {\n                  \"locationName\": \"networkInterfaceId\"\n                },\n                \"NetworkInterfaceOwnerId\": {\n                  \"locationName\": \"networkInterfaceOwnerId\"\n                },\n                \"PrivateIpAddress\": {\n                  \"locationName\": \"privateIpAddress\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeAvailabilityZones\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"ZoneNames\": {\n            \"locationName\": \"ZoneName\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ZoneName\"\n            }\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AvailabilityZones\": {\n            \"locationName\": \"availabilityZoneInfo\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ZoneName\": {\n                  \"locationName\": \"zoneName\"\n                },\n                \"State\": {\n                  \"locationName\": \"zoneState\"\n                },\n                \"RegionName\": {\n                  \"locationName\": \"regionName\"\n                },\n                \"Messages\": {\n                  \"locationName\": \"messageSet\",\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"item\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"Message\": {\n                        \"locationName\": \"message\"\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeBundleTasks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"BundleIds\": {\n            \"locationName\": \"BundleId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"BundleId\"\n            }\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BundleTasks\": {\n            \"locationName\": \"bundleInstanceTasksSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S2c\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeClassicLinkInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceIds\": {\n            \"shape\": \"S9g\",\n            \"locationName\": \"InstanceId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          },\n          \"MaxResults\": {\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Instances\": {\n            \"locationName\": \"instancesSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"InstanceId\": {\n                  \"locationName\": \"instanceId\"\n                },\n                \"VpcId\": {\n                  \"locationName\": \"vpcId\"\n                },\n                \"Groups\": {\n                  \"shape\": \"S5m\",\n                  \"locationName\": \"groupSet\"\n                },\n                \"Tags\": {\n                  \"shape\": \"Sj\",\n                  \"locationName\": \"tagSet\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeConversionTasks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"ConversionTaskIds\": {\n            \"locationName\": \"conversionTaskId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConversionTasks\": {\n            \"locationName\": \"conversionTasks\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S9o\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeCustomerGateways\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"CustomerGatewayIds\": {\n            \"locationName\": \"CustomerGatewayId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"CustomerGatewayId\"\n            }\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CustomerGateways\": {\n            \"locationName\": \"customerGatewaySet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S3n\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDhcpOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"DhcpOptionsIds\": {\n            \"locationName\": \"DhcpOptionsId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"DhcpOptionsId\"\n            }\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DhcpOptions\": {\n            \"locationName\": \"dhcpOptionsSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S3s\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEgressOnlyInternetGateways\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"EgressOnlyInternetGatewayIds\": {\n            \"locationName\": \"EgressOnlyInternetGatewayId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\"\n            }\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EgressOnlyInternetGateways\": {\n            \"locationName\": \"egressOnlyInternetGatewaySet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S3z\",\n              \"locationName\": \"item\"\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeExportTasks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ExportTaskIds\": {\n            \"locationName\": \"exportTaskId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ExportTaskId\"\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ExportTasks\": {\n            \"locationName\": \"exportTaskSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4m\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeFlowLogs\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FlowLogIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"FlowLogId\"\n          },\n          \"Filter\": {\n            \"shape\": \"S8x\"\n          },\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FlowLogs\": {\n            \"locationName\": \"flowLogSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"CreationTime\": {\n                  \"locationName\": \"creationTime\",\n                  \"type\": \"timestamp\"\n                },\n                \"FlowLogId\": {\n                  \"locationName\": \"flowLogId\"\n                },\n                \"FlowLogStatus\": {\n                  \"locationName\": \"flowLogStatus\"\n                },\n                \"ResourceId\": {\n                  \"locationName\": \"resourceId\"\n                },\n                \"TrafficType\": {\n                  \"locationName\": \"trafficType\"\n                },\n                \"LogGroupName\": {\n                  \"locationName\": \"logGroupName\"\n                },\n                \"DeliverLogsStatus\": {\n                  \"locationName\": \"deliverLogsStatus\"\n                },\n                \"DeliverLogsErrorMessage\": {\n                  \"locationName\": \"deliverLogsErrorMessage\"\n                },\n                \"DeliverLogsPermissionArn\": {\n                  \"locationName\": \"deliverLogsPermissionArn\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeHostReservationOfferings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"OfferingId\": {},\n          \"MinDuration\": {\n            \"type\": \"integer\"\n          },\n          \"MaxDuration\": {\n            \"type\": \"integer\"\n          },\n          \"Filter\": {\n            \"shape\": \"S8x\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"OfferingSet\": {\n            \"locationName\": \"offeringSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"OfferingId\": {\n                  \"locationName\": \"offeringId\"\n                },\n                \"InstanceFamily\": {\n                  \"locationName\": \"instanceFamily\"\n                },\n                \"PaymentOption\": {\n                  \"locationName\": \"paymentOption\"\n                },\n                \"UpfrontPrice\": {\n                  \"locationName\": \"upfrontPrice\"\n                },\n                \"HourlyPrice\": {\n                  \"locationName\": \"hourlyPrice\"\n                },\n                \"CurrencyCode\": {\n                  \"locationName\": \"currencyCode\"\n                },\n                \"Duration\": {\n                  \"locationName\": \"duration\",\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeHostReservations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HostReservationIdSet\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\"\n            }\n          },\n          \"Filter\": {\n            \"shape\": \"S8x\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HostReservationSet\": {\n            \"locationName\": \"hostReservationSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"HostReservationId\": {\n                  \"locationName\": \"hostReservationId\"\n                },\n                \"HostIdSet\": {\n                  \"shape\": \"Sar\",\n                  \"locationName\": \"hostIdSet\"\n                },\n                \"OfferingId\": {\n                  \"locationName\": \"offeringId\"\n                },\n                \"InstanceFamily\": {\n                  \"locationName\": \"instanceFamily\"\n                },\n                \"PaymentOption\": {\n                  \"locationName\": \"paymentOption\"\n                },\n                \"HourlyPrice\": {\n                  \"locationName\": \"hourlyPrice\"\n                },\n                \"UpfrontPrice\": {\n                  \"locationName\": \"upfrontPrice\"\n                },\n                \"CurrencyCode\": {\n                  \"locationName\": \"currencyCode\"\n                },\n                \"Count\": {\n                  \"locationName\": \"count\",\n                  \"type\": \"integer\"\n                },\n                \"Duration\": {\n                  \"locationName\": \"duration\",\n                  \"type\": \"integer\"\n                },\n                \"End\": {\n                  \"locationName\": \"end\",\n                  \"type\": \"timestamp\"\n                },\n                \"Start\": {\n                  \"locationName\": \"start\",\n                  \"type\": \"timestamp\"\n                },\n                \"State\": {\n                  \"locationName\": \"state\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeHosts\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HostIds\": {\n            \"shape\": \"Sau\",\n            \"locationName\": \"hostId\"\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          },\n          \"MaxResults\": {\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          },\n          \"Filter\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Hosts\": {\n            \"locationName\": \"hostSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"HostId\": {\n                  \"locationName\": \"hostId\"\n                },\n                \"AutoPlacement\": {\n                  \"locationName\": \"autoPlacement\"\n                },\n                \"HostReservationId\": {\n                  \"locationName\": \"hostReservationId\"\n                },\n                \"ClientToken\": {\n                  \"locationName\": \"clientToken\"\n                },\n                \"HostProperties\": {\n                  \"locationName\": \"hostProperties\",\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"Sockets\": {\n                      \"locationName\": \"sockets\",\n                      \"type\": \"integer\"\n                    },\n                    \"Cores\": {\n                      \"locationName\": \"cores\",\n                      \"type\": \"integer\"\n                    },\n                    \"TotalVCpus\": {\n                      \"locationName\": \"totalVCpus\",\n                      \"type\": \"integer\"\n                    },\n                    \"InstanceType\": {\n                      \"locationName\": \"instanceType\"\n                    }\n                  }\n                },\n                \"State\": {\n                  \"locationName\": \"state\"\n                },\n                \"AvailabilityZone\": {\n                  \"locationName\": \"availabilityZone\"\n                },\n                \"Instances\": {\n                  \"locationName\": \"instances\",\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"item\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"InstanceId\": {\n                        \"locationName\": \"instanceId\"\n                      },\n                      \"InstanceType\": {\n                        \"locationName\": \"instanceType\"\n                      }\n                    }\n                  }\n                },\n                \"AvailableCapacity\": {\n                  \"locationName\": \"availableCapacity\",\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"AvailableInstanceCapacity\": {\n                      \"locationName\": \"availableInstanceCapacity\",\n                      \"type\": \"list\",\n                      \"member\": {\n                        \"locationName\": \"item\",\n                        \"type\": \"structure\",\n                        \"members\": {\n                          \"InstanceType\": {\n                            \"locationName\": \"instanceType\"\n                          },\n                          \"AvailableCapacity\": {\n                            \"locationName\": \"availableCapacity\",\n                            \"type\": \"integer\"\n                          },\n                          \"TotalCapacity\": {\n                            \"locationName\": \"totalCapacity\",\n                            \"type\": \"integer\"\n                          }\n                        }\n                      }\n                    },\n                    \"AvailableVCpus\": {\n                      \"locationName\": \"availableVCpus\",\n                      \"type\": \"integer\"\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeIamInstanceProfileAssociations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AssociationIds\": {\n            \"locationName\": \"AssociationId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"AssociationId\"\n            }\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IamInstanceProfileAssociations\": {\n            \"locationName\": \"iamInstanceProfileAssociationSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S13\",\n              \"locationName\": \"item\"\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeIdFormat\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Resource\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Statuses\": {\n            \"shape\": \"Sbd\",\n            \"locationName\": \"statusSet\"\n          }\n        }\n      }\n    },\n    \"DescribeIdentityIdFormat\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PrincipalArn\"\n        ],\n        \"members\": {\n          \"Resource\": {\n            \"locationName\": \"resource\"\n          },\n          \"PrincipalArn\": {\n            \"locationName\": \"principalArn\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Statuses\": {\n            \"shape\": \"Sbd\",\n            \"locationName\": \"statusSet\"\n          }\n        }\n      }\n    },\n    \"DescribeImageAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ImageId\",\n          \"Attribute\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"ImageId\": {},\n          \"Attribute\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ImageId\": {\n            \"locationName\": \"imageId\"\n          },\n          \"LaunchPermissions\": {\n            \"shape\": \"Sbk\",\n            \"locationName\": \"launchPermission\"\n          },\n          \"ProductCodes\": {\n            \"shape\": \"Sbn\",\n            \"locationName\": \"productCodes\"\n          },\n          \"KernelId\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"kernel\"\n          },\n          \"RamdiskId\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"ramdisk\"\n          },\n          \"Description\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"description\"\n          },\n          \"SriovNetSupport\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"sriovNetSupport\"\n          },\n          \"BlockDeviceMappings\": {\n            \"shape\": \"Sbq\",\n            \"locationName\": \"blockDeviceMapping\"\n          }\n        }\n      }\n    },\n    \"DescribeImages\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"ImageIds\": {\n            \"locationName\": \"ImageId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ImageId\"\n            }\n          },\n          \"Owners\": {\n            \"shape\": \"Sbt\",\n            \"locationName\": \"Owner\"\n          },\n          \"ExecutableUsers\": {\n            \"locationName\": \"ExecutableBy\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ExecutableBy\"\n            }\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Images\": {\n            \"locationName\": \"imagesSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ImageId\": {\n                  \"locationName\": \"imageId\"\n                },\n                \"ImageLocation\": {\n                  \"locationName\": \"imageLocation\"\n                },\n                \"State\": {\n                  \"locationName\": \"imageState\"\n                },\n                \"OwnerId\": {\n                  \"locationName\": \"imageOwnerId\"\n                },\n                \"CreationDate\": {\n                  \"locationName\": \"creationDate\"\n                },\n                \"Public\": {\n                  \"locationName\": \"isPublic\",\n                  \"type\": \"boolean\"\n                },\n                \"ProductCodes\": {\n                  \"shape\": \"Sbn\",\n                  \"locationName\": \"productCodes\"\n                },\n                \"Architecture\": {\n                  \"locationName\": \"architecture\"\n                },\n                \"ImageType\": {\n                  \"locationName\": \"imageType\"\n                },\n                \"KernelId\": {\n                  \"locationName\": \"kernelId\"\n                },\n                \"RamdiskId\": {\n                  \"locationName\": \"ramdiskId\"\n                },\n                \"Platform\": {\n                  \"locationName\": \"platform\"\n                },\n                \"SriovNetSupport\": {\n                  \"locationName\": \"sriovNetSupport\"\n                },\n                \"EnaSupport\": {\n                  \"locationName\": \"enaSupport\",\n                  \"type\": \"boolean\"\n                },\n                \"StateReason\": {\n                  \"shape\": \"Sc1\",\n                  \"locationName\": \"stateReason\"\n                },\n                \"ImageOwnerAlias\": {\n                  \"locationName\": \"imageOwnerAlias\"\n                },\n                \"Name\": {\n                  \"locationName\": \"name\"\n                },\n                \"Description\": {\n                  \"locationName\": \"description\"\n                },\n                \"RootDeviceType\": {\n                  \"locationName\": \"rootDeviceType\"\n                },\n                \"RootDeviceName\": {\n                  \"locationName\": \"rootDeviceName\"\n                },\n                \"BlockDeviceMappings\": {\n                  \"shape\": \"Sbq\",\n                  \"locationName\": \"blockDeviceMapping\"\n                },\n                \"VirtualizationType\": {\n                  \"locationName\": \"virtualizationType\"\n                },\n                \"Tags\": {\n                  \"shape\": \"Sj\",\n                  \"locationName\": \"tagSet\"\n                },\n                \"Hypervisor\": {\n                  \"locationName\": \"hypervisor\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeImportImageTasks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"ImportTaskIds\": {\n            \"shape\": \"Sc6\",\n            \"locationName\": \"ImportTaskId\"\n          },\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ImportImageTasks\": {\n            \"locationName\": \"importImageTaskSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ImportTaskId\": {\n                  \"locationName\": \"importTaskId\"\n                },\n                \"Architecture\": {\n                  \"locationName\": \"architecture\"\n                },\n                \"LicenseType\": {\n                  \"locationName\": \"licenseType\"\n                },\n                \"Platform\": {\n                  \"locationName\": \"platform\"\n                },\n                \"Hypervisor\": {\n                  \"locationName\": \"hypervisor\"\n                },\n                \"Description\": {\n                  \"locationName\": \"description\"\n                },\n                \"SnapshotDetails\": {\n                  \"shape\": \"Sca\",\n                  \"locationName\": \"snapshotDetailSet\"\n                },\n                \"ImageId\": {\n                  \"locationName\": \"imageId\"\n                },\n                \"Progress\": {\n                  \"locationName\": \"progress\"\n                },\n                \"StatusMessage\": {\n                  \"locationName\": \"statusMessage\"\n                },\n                \"Status\": {\n                  \"locationName\": \"status\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeImportSnapshotTasks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"ImportTaskIds\": {\n            \"shape\": \"Sc6\",\n            \"locationName\": \"ImportTaskId\"\n          },\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ImportSnapshotTasks\": {\n            \"locationName\": \"importSnapshotTaskSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ImportTaskId\": {\n                  \"locationName\": \"importTaskId\"\n                },\n                \"SnapshotTaskDetail\": {\n                  \"shape\": \"Sch\",\n                  \"locationName\": \"snapshotTaskDetail\"\n                },\n                \"Description\": {\n                  \"locationName\": \"description\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeInstanceAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\",\n          \"Attribute\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"Attribute\": {\n            \"locationName\": \"attribute\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"InstanceType\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"instanceType\"\n          },\n          \"KernelId\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"kernel\"\n          },\n          \"RamdiskId\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"ramdisk\"\n          },\n          \"UserData\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"userData\"\n          },\n          \"DisableApiTermination\": {\n            \"shape\": \"Scl\",\n            \"locationName\": \"disableApiTermination\"\n          },\n          \"InstanceInitiatedShutdownBehavior\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"instanceInitiatedShutdownBehavior\"\n          },\n          \"RootDeviceName\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"rootDeviceName\"\n          },\n          \"BlockDeviceMappings\": {\n            \"shape\": \"Scm\",\n            \"locationName\": \"blockDeviceMapping\"\n          },\n          \"ProductCodes\": {\n            \"shape\": \"Sbn\",\n            \"locationName\": \"productCodes\"\n          },\n          \"EbsOptimized\": {\n            \"shape\": \"Scl\",\n            \"locationName\": \"ebsOptimized\"\n          },\n          \"SriovNetSupport\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"sriovNetSupport\"\n          },\n          \"EnaSupport\": {\n            \"shape\": \"Scl\",\n            \"locationName\": \"enaSupport\"\n          },\n          \"SourceDestCheck\": {\n            \"shape\": \"Scl\",\n            \"locationName\": \"sourceDestCheck\"\n          },\n          \"Groups\": {\n            \"shape\": \"S5m\",\n            \"locationName\": \"groupSet\"\n          }\n        }\n      }\n    },\n    \"DescribeInstanceStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceIds\": {\n            \"shape\": \"S9g\",\n            \"locationName\": \"InstanceId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"IncludeAllInstances\": {\n            \"locationName\": \"includeAllInstances\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceStatuses\": {\n            \"locationName\": \"instanceStatusSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"InstanceId\": {\n                  \"locationName\": \"instanceId\"\n                },\n                \"AvailabilityZone\": {\n                  \"locationName\": \"availabilityZone\"\n                },\n                \"Events\": {\n                  \"locationName\": \"eventsSet\",\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"item\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"Code\": {\n                        \"locationName\": \"code\"\n                      },\n                      \"Description\": {\n                        \"locationName\": \"description\"\n                      },\n                      \"NotBefore\": {\n                        \"locationName\": \"notBefore\",\n                        \"type\": \"timestamp\"\n                      },\n                      \"NotAfter\": {\n                        \"locationName\": \"notAfter\",\n                        \"type\": \"timestamp\"\n                      }\n                    }\n                  }\n                },\n                \"InstanceState\": {\n                  \"shape\": \"Scw\",\n                  \"locationName\": \"instanceState\"\n                },\n                \"SystemStatus\": {\n                  \"shape\": \"Scy\",\n                  \"locationName\": \"systemStatus\"\n                },\n                \"InstanceStatus\": {\n                  \"shape\": \"Scy\",\n                  \"locationName\": \"instanceStatus\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceIds\": {\n            \"shape\": \"S9g\",\n            \"locationName\": \"InstanceId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          },\n          \"MaxResults\": {\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Reservations\": {\n            \"locationName\": \"reservationSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sd7\",\n              \"locationName\": \"item\"\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeInternetGateways\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InternetGatewayIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"internetGatewayId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InternetGateways\": {\n            \"locationName\": \"internetGatewaySet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4s\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeKeyPairs\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"KeyNames\": {\n            \"locationName\": \"KeyName\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"KeyName\"\n            }\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"KeyPairs\": {\n            \"locationName\": \"keySet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"KeyName\": {\n                  \"locationName\": \"keyName\"\n                },\n                \"KeyFingerprint\": {\n                  \"locationName\": \"keyFingerprint\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeMovingAddresses\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"PublicIps\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"publicIp\"\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"filter\"\n          },\n          \"MaxResults\": {\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"MovingAddressStatuses\": {\n            \"locationName\": \"movingAddressStatusSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"PublicIp\": {\n                  \"locationName\": \"publicIp\"\n                },\n                \"MoveStatus\": {\n                  \"locationName\": \"moveStatus\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeNatGateways\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NatGatewayIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"NatGatewayId\"\n          },\n          \"Filter\": {\n            \"shape\": \"S8x\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NatGateways\": {\n            \"locationName\": \"natGatewaySet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4x\",\n              \"locationName\": \"item\"\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeNetworkAcls\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"NetworkAclIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"NetworkAclId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NetworkAcls\": {\n            \"locationName\": \"networkAclSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S54\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeNetworkInterfaceAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"NetworkInterfaceId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"Attribute\": {\n            \"locationName\": \"attribute\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"Description\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"description\"\n          },\n          \"SourceDestCheck\": {\n            \"shape\": \"Scl\",\n            \"locationName\": \"sourceDestCheck\"\n          },\n          \"Groups\": {\n            \"shape\": \"S5m\",\n            \"locationName\": \"groupSet\"\n          },\n          \"Attachment\": {\n            \"shape\": \"S5o\",\n            \"locationName\": \"attachment\"\n          }\n        }\n      }\n    },\n    \"DescribeNetworkInterfaces\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"NetworkInterfaceIds\": {\n            \"locationName\": \"NetworkInterfaceId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\"\n            }\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NetworkInterfaces\": {\n            \"locationName\": \"networkInterfaceSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S5k\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribePlacementGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"GroupNames\": {\n            \"locationName\": \"groupName\",\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PlacementGroups\": {\n            \"locationName\": \"placementGroupSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"GroupName\": {\n                  \"locationName\": \"groupName\"\n                },\n                \"Strategy\": {\n                  \"locationName\": \"strategy\"\n                },\n                \"State\": {\n                  \"locationName\": \"state\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribePrefixLists\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"PrefixListIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"PrefixListId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PrefixLists\": {\n            \"locationName\": \"prefixListSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"PrefixListId\": {\n                  \"locationName\": \"prefixListId\"\n                },\n                \"PrefixListName\": {\n                  \"locationName\": \"prefixListName\"\n                },\n                \"Cidrs\": {\n                  \"shape\": \"S2z\",\n                  \"locationName\": \"cidrSet\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeRegions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"RegionNames\": {\n            \"locationName\": \"RegionName\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"RegionName\"\n            }\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Regions\": {\n            \"locationName\": \"regionInfo\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"RegionName\": {\n                  \"locationName\": \"regionName\"\n                },\n                \"Endpoint\": {\n                  \"locationName\": \"regionEndpoint\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeReservedInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"ReservedInstancesIds\": {\n            \"shape\": \"Ser\",\n            \"locationName\": \"ReservedInstancesId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"OfferingType\": {\n            \"locationName\": \"offeringType\"\n          },\n          \"OfferingClass\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedInstances\": {\n            \"locationName\": \"reservedInstancesSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ReservedInstancesId\": {\n                  \"locationName\": \"reservedInstancesId\"\n                },\n                \"InstanceType\": {\n                  \"locationName\": \"instanceType\"\n                },\n                \"AvailabilityZone\": {\n                  \"locationName\": \"availabilityZone\"\n                },\n                \"Start\": {\n                  \"locationName\": \"start\",\n                  \"type\": \"timestamp\"\n                },\n                \"End\": {\n                  \"locationName\": \"end\",\n                  \"type\": \"timestamp\"\n                },\n                \"Duration\": {\n                  \"locationName\": \"duration\",\n                  \"type\": \"long\"\n                },\n                \"UsagePrice\": {\n                  \"locationName\": \"usagePrice\",\n                  \"type\": \"float\"\n                },\n                \"FixedPrice\": {\n                  \"locationName\": \"fixedPrice\",\n                  \"type\": \"float\"\n                },\n                \"InstanceCount\": {\n                  \"locationName\": \"instanceCount\",\n                  \"type\": \"integer\"\n                },\n                \"ProductDescription\": {\n                  \"locationName\": \"productDescription\"\n                },\n                \"State\": {\n                  \"locationName\": \"state\"\n                },\n                \"Tags\": {\n                  \"shape\": \"Sj\",\n                  \"locationName\": \"tagSet\"\n                },\n                \"InstanceTenancy\": {\n                  \"locationName\": \"instanceTenancy\"\n                },\n                \"CurrencyCode\": {\n                  \"locationName\": \"currencyCode\"\n                },\n                \"OfferingType\": {\n                  \"locationName\": \"offeringType\"\n                },\n                \"RecurringCharges\": {\n                  \"shape\": \"Sf0\",\n                  \"locationName\": \"recurringCharges\"\n                },\n                \"OfferingClass\": {\n                  \"locationName\": \"offeringClass\"\n                },\n                \"Scope\": {\n                  \"locationName\": \"scope\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeReservedInstancesListings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedInstancesId\": {\n            \"locationName\": \"reservedInstancesId\"\n          },\n          \"ReservedInstancesListingId\": {\n            \"locationName\": \"reservedInstancesListingId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedInstancesListings\": {\n            \"shape\": \"S2n\",\n            \"locationName\": \"reservedInstancesListingsSet\"\n          }\n        }\n      }\n    },\n    \"DescribeReservedInstancesModifications\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedInstancesModificationIds\": {\n            \"locationName\": \"ReservedInstancesModificationId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ReservedInstancesModificationId\"\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedInstancesModifications\": {\n            \"locationName\": \"reservedInstancesModificationsSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ReservedInstancesModificationId\": {\n                  \"locationName\": \"reservedInstancesModificationId\"\n                },\n                \"ReservedInstancesIds\": {\n                  \"locationName\": \"reservedInstancesSet\",\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"item\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"ReservedInstancesId\": {\n                        \"locationName\": \"reservedInstancesId\"\n                      }\n                    }\n                  }\n                },\n                \"ModificationResults\": {\n                  \"locationName\": \"modificationResultSet\",\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"item\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"ReservedInstancesId\": {\n                        \"locationName\": \"reservedInstancesId\"\n                      },\n                      \"TargetConfiguration\": {\n                        \"shape\": \"Sff\",\n                        \"locationName\": \"targetConfiguration\"\n                      }\n                    }\n                  }\n                },\n                \"CreateDate\": {\n                  \"locationName\": \"createDate\",\n                  \"type\": \"timestamp\"\n                },\n                \"UpdateDate\": {\n                  \"locationName\": \"updateDate\",\n                  \"type\": \"timestamp\"\n                },\n                \"EffectiveDate\": {\n                  \"locationName\": \"effectiveDate\",\n                  \"type\": \"timestamp\"\n                },\n                \"Status\": {\n                  \"locationName\": \"status\"\n                },\n                \"StatusMessage\": {\n                  \"locationName\": \"statusMessage\"\n                },\n                \"ClientToken\": {\n                  \"locationName\": \"clientToken\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeReservedInstancesOfferings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"ReservedInstancesOfferingIds\": {\n            \"locationName\": \"ReservedInstancesOfferingId\",\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"InstanceType\": {},\n          \"AvailabilityZone\": {},\n          \"ProductDescription\": {},\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"InstanceTenancy\": {\n            \"locationName\": \"instanceTenancy\"\n          },\n          \"OfferingType\": {\n            \"locationName\": \"offeringType\"\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          },\n          \"MaxResults\": {\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          },\n          \"IncludeMarketplace\": {\n            \"type\": \"boolean\"\n          },\n          \"MinDuration\": {\n            \"type\": \"long\"\n          },\n          \"MaxDuration\": {\n            \"type\": \"long\"\n          },\n          \"MaxInstanceCount\": {\n            \"type\": \"integer\"\n          },\n          \"OfferingClass\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedInstancesOfferings\": {\n            \"locationName\": \"reservedInstancesOfferingsSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ReservedInstancesOfferingId\": {\n                  \"locationName\": \"reservedInstancesOfferingId\"\n                },\n                \"InstanceType\": {\n                  \"locationName\": \"instanceType\"\n                },\n                \"AvailabilityZone\": {\n                  \"locationName\": \"availabilityZone\"\n                },\n                \"Duration\": {\n                  \"locationName\": \"duration\",\n                  \"type\": \"long\"\n                },\n                \"UsagePrice\": {\n                  \"locationName\": \"usagePrice\",\n                  \"type\": \"float\"\n                },\n                \"FixedPrice\": {\n                  \"locationName\": \"fixedPrice\",\n                  \"type\": \"float\"\n                },\n                \"ProductDescription\": {\n                  \"locationName\": \"productDescription\"\n                },\n                \"InstanceTenancy\": {\n                  \"locationName\": \"instanceTenancy\"\n                },\n                \"CurrencyCode\": {\n                  \"locationName\": \"currencyCode\"\n                },\n                \"OfferingType\": {\n                  \"locationName\": \"offeringType\"\n                },\n                \"RecurringCharges\": {\n                  \"shape\": \"Sf0\",\n                  \"locationName\": \"recurringCharges\"\n                },\n                \"Marketplace\": {\n                  \"locationName\": \"marketplace\",\n                  \"type\": \"boolean\"\n                },\n                \"PricingDetails\": {\n                  \"locationName\": \"pricingDetailsSet\",\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"item\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"Price\": {\n                        \"locationName\": \"price\",\n                        \"type\": \"double\"\n                      },\n                      \"Count\": {\n                        \"locationName\": \"count\",\n                        \"type\": \"integer\"\n                      }\n                    }\n                  }\n                },\n                \"OfferingClass\": {\n                  \"locationName\": \"offeringClass\"\n                },\n                \"Scope\": {\n                  \"locationName\": \"scope\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeRouteTables\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"RouteTableIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"RouteTableId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RouteTables\": {\n            \"locationName\": \"routeTableSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S65\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeScheduledInstanceAvailability\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Recurrence\",\n          \"FirstSlotStartTimeRange\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"Recurrence\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Frequency\": {},\n              \"Interval\": {\n                \"type\": \"integer\"\n              },\n              \"OccurrenceDays\": {\n                \"locationName\": \"OccurrenceDay\",\n                \"type\": \"list\",\n                \"member\": {\n                  \"locationName\": \"OccurenceDay\",\n                  \"type\": \"integer\"\n                }\n              },\n              \"OccurrenceRelativeToEnd\": {\n                \"type\": \"boolean\"\n              },\n              \"OccurrenceUnit\": {}\n            }\n          },\n          \"FirstSlotStartTimeRange\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"EarliestTime\",\n              \"LatestTime\"\n            ],\n            \"members\": {\n              \"EarliestTime\": {\n                \"type\": \"timestamp\"\n              },\n              \"LatestTime\": {\n                \"type\": \"timestamp\"\n              }\n            }\n          },\n          \"MinSlotDurationInHours\": {\n            \"type\": \"integer\"\n          },\n          \"MaxSlotDurationInHours\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          },\n          \"ScheduledInstanceAvailabilitySet\": {\n            \"locationName\": \"scheduledInstanceAvailabilitySet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"InstanceType\": {\n                  \"locationName\": \"instanceType\"\n                },\n                \"Platform\": {\n                  \"locationName\": \"platform\"\n                },\n                \"NetworkPlatform\": {\n                  \"locationName\": \"networkPlatform\"\n                },\n                \"AvailabilityZone\": {\n                  \"locationName\": \"availabilityZone\"\n                },\n                \"PurchaseToken\": {\n                  \"locationName\": \"purchaseToken\"\n                },\n                \"SlotDurationInHours\": {\n                  \"locationName\": \"slotDurationInHours\",\n                  \"type\": \"integer\"\n                },\n                \"Recurrence\": {\n                  \"shape\": \"Sfx\",\n                  \"locationName\": \"recurrence\"\n                },\n                \"FirstSlotStartTime\": {\n                  \"locationName\": \"firstSlotStartTime\",\n                  \"type\": \"timestamp\"\n                },\n                \"HourlyPrice\": {\n                  \"locationName\": \"hourlyPrice\"\n                },\n                \"TotalScheduledInstanceHours\": {\n                  \"locationName\": \"totalScheduledInstanceHours\",\n                  \"type\": \"integer\"\n                },\n                \"AvailableInstanceCount\": {\n                  \"locationName\": \"availableInstanceCount\",\n                  \"type\": \"integer\"\n                },\n                \"MinTermDurationInDays\": {\n                  \"locationName\": \"minTermDurationInDays\",\n                  \"type\": \"integer\"\n                },\n                \"MaxTermDurationInDays\": {\n                  \"locationName\": \"maxTermDurationInDays\",\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeScheduledInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"ScheduledInstanceIds\": {\n            \"locationName\": \"ScheduledInstanceId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ScheduledInstanceId\"\n            }\n          },\n          \"SlotStartTimeRange\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"EarliestTime\": {\n                \"type\": \"timestamp\"\n              },\n              \"LatestTime\": {\n                \"type\": \"timestamp\"\n              }\n            }\n          },\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          },\n          \"ScheduledInstanceSet\": {\n            \"locationName\": \"scheduledInstanceSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sg4\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeSecurityGroupReferences\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GroupId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"GroupId\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SecurityGroupReferenceSet\": {\n            \"locationName\": \"securityGroupReferenceSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"GroupId\",\n                \"ReferencingVpcId\"\n              ],\n              \"members\": {\n                \"GroupId\": {\n                  \"locationName\": \"groupId\"\n                },\n                \"ReferencingVpcId\": {\n                  \"locationName\": \"referencingVpcId\"\n                },\n                \"VpcPeeringConnectionId\": {\n                  \"locationName\": \"vpcPeeringConnectionId\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeSecurityGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"GroupNames\": {\n            \"shape\": \"Sgb\",\n            \"locationName\": \"GroupName\"\n          },\n          \"GroupIds\": {\n            \"shape\": \"S1j\",\n            \"locationName\": \"GroupId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SecurityGroups\": {\n            \"locationName\": \"securityGroupInfo\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"OwnerId\": {\n                  \"locationName\": \"ownerId\"\n                },\n                \"GroupName\": {\n                  \"locationName\": \"groupName\"\n                },\n                \"GroupId\": {\n                  \"locationName\": \"groupId\"\n                },\n                \"Description\": {\n                  \"locationName\": \"groupDescription\"\n                },\n                \"IpPermissions\": {\n                  \"shape\": \"S1w\",\n                  \"locationName\": \"ipPermissions\"\n                },\n                \"IpPermissionsEgress\": {\n                  \"shape\": \"S1w\",\n                  \"locationName\": \"ipPermissionsEgress\"\n                },\n                \"VpcId\": {\n                  \"locationName\": \"vpcId\"\n                },\n                \"Tags\": {\n                  \"shape\": \"Sj\",\n                  \"locationName\": \"tagSet\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeSnapshotAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SnapshotId\",\n          \"Attribute\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SnapshotId\": {},\n          \"Attribute\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SnapshotId\": {\n            \"locationName\": \"snapshotId\"\n          },\n          \"CreateVolumePermissions\": {\n            \"shape\": \"Sgi\",\n            \"locationName\": \"createVolumePermission\"\n          },\n          \"ProductCodes\": {\n            \"shape\": \"Sbn\",\n            \"locationName\": \"productCodes\"\n          }\n        }\n      }\n    },\n    \"DescribeSnapshots\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SnapshotIds\": {\n            \"locationName\": \"SnapshotId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"SnapshotId\"\n            }\n          },\n          \"OwnerIds\": {\n            \"shape\": \"Sbt\",\n            \"locationName\": \"Owner\"\n          },\n          \"RestorableByUserIds\": {\n            \"locationName\": \"RestorableBy\",\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Snapshots\": {\n            \"locationName\": \"snapshotSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S6h\",\n              \"locationName\": \"item\"\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeSpotDatafeedSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SpotDatafeedSubscription\": {\n            \"shape\": \"S6l\",\n            \"locationName\": \"spotDatafeedSubscription\"\n          }\n        }\n      }\n    },\n    \"DescribeSpotFleetInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SpotFleetRequestId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SpotFleetRequestId\": {\n            \"locationName\": \"spotFleetRequestId\"\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          },\n          \"MaxResults\": {\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SpotFleetRequestId\",\n          \"ActiveInstances\"\n        ],\n        \"members\": {\n          \"SpotFleetRequestId\": {\n            \"locationName\": \"spotFleetRequestId\"\n          },\n          \"ActiveInstances\": {\n            \"locationName\": \"activeInstanceSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"InstanceType\": {\n                  \"locationName\": \"instanceType\"\n                },\n                \"InstanceId\": {\n                  \"locationName\": \"instanceId\"\n                },\n                \"SpotInstanceRequestId\": {\n                  \"locationName\": \"spotInstanceRequestId\"\n                },\n                \"InstanceHealth\": {\n                  \"locationName\": \"instanceHealth\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeSpotFleetRequestHistory\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SpotFleetRequestId\",\n          \"StartTime\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SpotFleetRequestId\": {\n            \"locationName\": \"spotFleetRequestId\"\n          },\n          \"EventType\": {\n            \"locationName\": \"eventType\"\n          },\n          \"StartTime\": {\n            \"locationName\": \"startTime\",\n            \"type\": \"timestamp\"\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          },\n          \"MaxResults\": {\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SpotFleetRequestId\",\n          \"StartTime\",\n          \"LastEvaluatedTime\",\n          \"HistoryRecords\"\n        ],\n        \"members\": {\n          \"SpotFleetRequestId\": {\n            \"locationName\": \"spotFleetRequestId\"\n          },\n          \"StartTime\": {\n            \"locationName\": \"startTime\",\n            \"type\": \"timestamp\"\n          },\n          \"LastEvaluatedTime\": {\n            \"locationName\": \"lastEvaluatedTime\",\n            \"type\": \"timestamp\"\n          },\n          \"HistoryRecords\": {\n            \"locationName\": \"historyRecordSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"Timestamp\",\n                \"EventType\",\n                \"EventInformation\"\n              ],\n              \"members\": {\n                \"Timestamp\": {\n                  \"locationName\": \"timestamp\",\n                  \"type\": \"timestamp\"\n                },\n                \"EventType\": {\n                  \"locationName\": \"eventType\"\n                },\n                \"EventInformation\": {\n                  \"locationName\": \"eventInformation\",\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"InstanceId\": {\n                      \"locationName\": \"instanceId\"\n                    },\n                    \"EventSubType\": {\n                      \"locationName\": \"eventSubType\"\n                    },\n                    \"EventDescription\": {\n                      \"locationName\": \"eventDescription\"\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeSpotFleetRequests\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SpotFleetRequestIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"spotFleetRequestId\"\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          },\n          \"MaxResults\": {\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SpotFleetRequestConfigs\"\n        ],\n        \"members\": {\n          \"SpotFleetRequestConfigs\": {\n            \"locationName\": \"spotFleetRequestConfigSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"SpotFleetRequestId\",\n                \"SpotFleetRequestState\",\n                \"SpotFleetRequestConfig\",\n                \"CreateTime\"\n              ],\n              \"members\": {\n                \"SpotFleetRequestId\": {\n                  \"locationName\": \"spotFleetRequestId\"\n                },\n                \"SpotFleetRequestState\": {\n                  \"locationName\": \"spotFleetRequestState\"\n                },\n                \"SpotFleetRequestConfig\": {\n                  \"shape\": \"Sh6\",\n                  \"locationName\": \"spotFleetRequestConfig\"\n                },\n                \"CreateTime\": {\n                  \"locationName\": \"createTime\",\n                  \"type\": \"timestamp\"\n                },\n                \"ActivityStatus\": {\n                  \"locationName\": \"activityStatus\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeSpotInstanceRequests\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SpotInstanceRequestIds\": {\n            \"shape\": \"S39\",\n            \"locationName\": \"SpotInstanceRequestId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SpotInstanceRequests\": {\n            \"shape\": \"Shj\",\n            \"locationName\": \"spotInstanceRequestSet\"\n          }\n        }\n      }\n    },\n    \"DescribeSpotPriceHistory\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"StartTime\": {\n            \"locationName\": \"startTime\",\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"locationName\": \"endTime\",\n            \"type\": \"timestamp\"\n          },\n          \"InstanceTypes\": {\n            \"locationName\": \"InstanceType\",\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"ProductDescriptions\": {\n            \"locationName\": \"ProductDescription\",\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"AvailabilityZone\": {\n            \"locationName\": \"availabilityZone\"\n          },\n          \"MaxResults\": {\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SpotPriceHistory\": {\n            \"locationName\": \"spotPriceHistorySet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"InstanceType\": {\n                  \"locationName\": \"instanceType\"\n                },\n                \"ProductDescription\": {\n                  \"locationName\": \"productDescription\"\n                },\n                \"SpotPrice\": {\n                  \"locationName\": \"spotPrice\"\n                },\n                \"Timestamp\": {\n                  \"locationName\": \"timestamp\",\n                  \"type\": \"timestamp\"\n                },\n                \"AvailabilityZone\": {\n                  \"locationName\": \"availabilityZone\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeStaleSecurityGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"VpcId\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StaleSecurityGroupSet\": {\n            \"locationName\": \"staleSecurityGroupSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"GroupId\"\n              ],\n              \"members\": {\n                \"GroupId\": {\n                  \"locationName\": \"groupId\"\n                },\n                \"GroupName\": {\n                  \"locationName\": \"groupName\"\n                },\n                \"Description\": {\n                  \"locationName\": \"description\"\n                },\n                \"VpcId\": {\n                  \"locationName\": \"vpcId\"\n                },\n                \"StaleIpPermissions\": {\n                  \"shape\": \"Si0\",\n                  \"locationName\": \"staleIpPermissions\"\n                },\n                \"StaleIpPermissionsEgress\": {\n                  \"shape\": \"Si0\",\n                  \"locationName\": \"staleIpPermissionsEgress\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeSubnets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SubnetIds\": {\n            \"locationName\": \"SubnetId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"SubnetId\"\n            }\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Subnets\": {\n            \"locationName\": \"subnetSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S6q\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"MaxResults\": {\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Tags\": {\n            \"locationName\": \"tagSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ResourceId\": {\n                  \"locationName\": \"resourceId\"\n                },\n                \"ResourceType\": {\n                  \"locationName\": \"resourceType\"\n                },\n                \"Key\": {\n                  \"locationName\": \"key\"\n                },\n                \"Value\": {\n                  \"locationName\": \"value\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeVolumeAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VolumeId\": {},\n          \"Attribute\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VolumeId\": {\n            \"locationName\": \"volumeId\"\n          },\n          \"AutoEnableIO\": {\n            \"shape\": \"Scl\",\n            \"locationName\": \"autoEnableIO\"\n          },\n          \"ProductCodes\": {\n            \"shape\": \"Sbn\",\n            \"locationName\": \"productCodes\"\n          }\n        }\n      }\n    },\n    \"DescribeVolumeStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VolumeIds\": {\n            \"shape\": \"Sii\",\n            \"locationName\": \"VolumeId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VolumeStatuses\": {\n            \"locationName\": \"volumeStatusSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"VolumeId\": {\n                  \"locationName\": \"volumeId\"\n                },\n                \"AvailabilityZone\": {\n                  \"locationName\": \"availabilityZone\"\n                },\n                \"VolumeStatus\": {\n                  \"locationName\": \"volumeStatus\",\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"Status\": {\n                      \"locationName\": \"status\"\n                    },\n                    \"Details\": {\n                      \"locationName\": \"details\",\n                      \"type\": \"list\",\n                      \"member\": {\n                        \"locationName\": \"item\",\n                        \"type\": \"structure\",\n                        \"members\": {\n                          \"Name\": {\n                            \"locationName\": \"name\"\n                          },\n                          \"Status\": {\n                            \"locationName\": \"status\"\n                          }\n                        }\n                      }\n                    }\n                  }\n                },\n                \"Events\": {\n                  \"locationName\": \"eventsSet\",\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"item\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"EventType\": {\n                        \"locationName\": \"eventType\"\n                      },\n                      \"Description\": {\n                        \"locationName\": \"description\"\n                      },\n                      \"NotBefore\": {\n                        \"locationName\": \"notBefore\",\n                        \"type\": \"timestamp\"\n                      },\n                      \"NotAfter\": {\n                        \"locationName\": \"notAfter\",\n                        \"type\": \"timestamp\"\n                      },\n                      \"EventId\": {\n                        \"locationName\": \"eventId\"\n                      }\n                    }\n                  }\n                },\n                \"Actions\": {\n                  \"locationName\": \"actionsSet\",\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"item\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"Code\": {\n                        \"locationName\": \"code\"\n                      },\n                      \"Description\": {\n                        \"locationName\": \"description\"\n                      },\n                      \"EventType\": {\n                        \"locationName\": \"eventType\"\n                      },\n                      \"EventId\": {\n                        \"locationName\": \"eventId\"\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeVolumes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VolumeIds\": {\n            \"shape\": \"Sii\",\n            \"locationName\": \"VolumeId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          },\n          \"MaxResults\": {\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Volumes\": {\n            \"locationName\": \"volumeSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S6w\",\n              \"locationName\": \"item\"\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeVolumesModifications\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"VolumeIds\": {\n            \"shape\": \"Sii\",\n            \"locationName\": \"VolumeId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VolumesModifications\": {\n            \"locationName\": \"volumeModificationSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sj1\",\n              \"locationName\": \"item\"\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeVpcAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcId\",\n          \"Attribute\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpcId\": {},\n          \"Attribute\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          },\n          \"EnableDnsSupport\": {\n            \"shape\": \"Scl\",\n            \"locationName\": \"enableDnsSupport\"\n          },\n          \"EnableDnsHostnames\": {\n            \"shape\": \"Scl\",\n            \"locationName\": \"enableDnsHostnames\"\n          }\n        }\n      }\n    },\n    \"DescribeVpcClassicLink\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpcIds\": {\n            \"shape\": \"Sj7\",\n            \"locationName\": \"VpcId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Vpcs\": {\n            \"locationName\": \"vpcSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"VpcId\": {\n                  \"locationName\": \"vpcId\"\n                },\n                \"ClassicLinkEnabled\": {\n                  \"locationName\": \"classicLinkEnabled\",\n                  \"type\": \"boolean\"\n                },\n                \"Tags\": {\n                  \"shape\": \"Sj\",\n                  \"locationName\": \"tagSet\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeVpcClassicLinkDnsSupport\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcIds\": {\n            \"shape\": \"Sj7\"\n          },\n          \"MaxResults\": {\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Vpcs\": {\n            \"locationName\": \"vpcs\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"VpcId\": {\n                  \"locationName\": \"vpcId\"\n                },\n                \"ClassicLinkDnsSupported\": {\n                  \"locationName\": \"classicLinkDnsSupported\",\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeVpcEndpointServices\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ServiceNames\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"serviceNameSet\"\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeVpcEndpoints\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"VpcEndpointIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"VpcEndpointId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcEndpoints\": {\n            \"locationName\": \"vpcEndpointSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S77\",\n              \"locationName\": \"item\"\n            }\n          },\n          \"NextToken\": {\n            \"locationName\": \"nextToken\"\n          }\n        }\n      }\n    },\n    \"DescribeVpcPeeringConnections\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpcPeeringConnectionIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"VpcPeeringConnectionId\"\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcPeeringConnections\": {\n            \"locationName\": \"vpcPeeringConnectionSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sb\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeVpcs\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpcIds\": {\n            \"locationName\": \"VpcId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"VpcId\"\n            }\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Vpcs\": {\n            \"locationName\": \"vpcSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S72\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeVpnConnections\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpnConnectionIds\": {\n            \"locationName\": \"VpnConnectionId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"VpnConnectionId\"\n            }\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpnConnections\": {\n            \"locationName\": \"vpnConnectionSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S7e\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeVpnGateways\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpnGatewayIds\": {\n            \"locationName\": \"VpnGatewayId\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"VpnGatewayId\"\n            }\n          },\n          \"Filters\": {\n            \"shape\": \"S8x\",\n            \"locationName\": \"Filter\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpnGateways\": {\n            \"locationName\": \"vpnGatewaySet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S7q\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"DetachClassicLinkVpc\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\",\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Return\": {\n            \"locationName\": \"return\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"DetachInternetGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InternetGatewayId\",\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InternetGatewayId\": {\n            \"locationName\": \"internetGatewayId\"\n          },\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          }\n        }\n      }\n    },\n    \"DetachNetworkInterface\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AttachmentId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"AttachmentId\": {\n            \"locationName\": \"attachmentId\"\n          },\n          \"Force\": {\n            \"locationName\": \"force\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"DetachVolume\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VolumeId\": {},\n          \"InstanceId\": {},\n          \"Device\": {},\n          \"Force\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1p\"\n      }\n    },\n    \"DetachVpnGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpnGatewayId\",\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpnGatewayId\": {},\n          \"VpcId\": {}\n        }\n      }\n    },\n    \"DisableVgwRoutePropagation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RouteTableId\",\n          \"GatewayId\"\n        ],\n        \"members\": {\n          \"RouteTableId\": {},\n          \"GatewayId\": {}\n        }\n      }\n    },\n    \"DisableVpcClassicLink\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Return\": {\n            \"locationName\": \"return\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"DisableVpcClassicLinkDnsSupport\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Return\": {\n            \"locationName\": \"return\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"DisassociateAddress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"PublicIp\": {},\n          \"AssociationId\": {}\n        }\n      }\n    },\n    \"DisassociateIamInstanceProfile\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AssociationId\"\n        ],\n        \"members\": {\n          \"AssociationId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IamInstanceProfileAssociation\": {\n            \"shape\": \"S13\",\n            \"locationName\": \"iamInstanceProfileAssociation\"\n          }\n        }\n      }\n    },\n    \"DisassociateRouteTable\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AssociationId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"AssociationId\": {\n            \"locationName\": \"associationId\"\n          }\n        }\n      }\n    },\n    \"DisassociateSubnetCidrBlock\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AssociationId\"\n        ],\n        \"members\": {\n          \"AssociationId\": {\n            \"locationName\": \"associationId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SubnetId\": {\n            \"locationName\": \"subnetId\"\n          },\n          \"Ipv6CidrBlockAssociation\": {\n            \"shape\": \"S1a\",\n            \"locationName\": \"ipv6CidrBlockAssociation\"\n          }\n        }\n      }\n    },\n    \"DisassociateVpcCidrBlock\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AssociationId\"\n        ],\n        \"members\": {\n          \"AssociationId\": {\n            \"locationName\": \"associationId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          },\n          \"Ipv6CidrBlockAssociation\": {\n            \"shape\": \"S1f\",\n            \"locationName\": \"ipv6CidrBlockAssociation\"\n          }\n        }\n      }\n    },\n    \"EnableVgwRoutePropagation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RouteTableId\",\n          \"GatewayId\"\n        ],\n        \"members\": {\n          \"RouteTableId\": {},\n          \"GatewayId\": {}\n        }\n      }\n    },\n    \"EnableVolumeIO\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VolumeId\": {\n            \"locationName\": \"volumeId\"\n          }\n        }\n      }\n    },\n    \"EnableVpcClassicLink\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Return\": {\n            \"locationName\": \"return\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"EnableVpcClassicLinkDnsSupport\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Return\": {\n            \"locationName\": \"return\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"GetConsoleOutput\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"Timestamp\": {\n            \"locationName\": \"timestamp\",\n            \"type\": \"timestamp\"\n          },\n          \"Output\": {\n            \"locationName\": \"output\"\n          }\n        }\n      }\n    },\n    \"GetConsoleScreenshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"InstanceId\": {},\n          \"WakeUp\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"ImageData\": {\n            \"locationName\": \"imageData\"\n          }\n        }\n      }\n    },\n    \"GetHostReservationPurchasePreview\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OfferingId\",\n          \"HostIdSet\"\n        ],\n        \"members\": {\n          \"OfferingId\": {},\n          \"HostIdSet\": {\n            \"shape\": \"Skt\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Purchase\": {\n            \"shape\": \"Skv\",\n            \"locationName\": \"purchase\"\n          },\n          \"TotalUpfrontPrice\": {\n            \"locationName\": \"totalUpfrontPrice\"\n          },\n          \"TotalHourlyPrice\": {\n            \"locationName\": \"totalHourlyPrice\"\n          },\n          \"CurrencyCode\": {\n            \"locationName\": \"currencyCode\"\n          }\n        }\n      }\n    },\n    \"GetPasswordData\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"Timestamp\": {\n            \"locationName\": \"timestamp\",\n            \"type\": \"timestamp\"\n          },\n          \"PasswordData\": {\n            \"locationName\": \"passwordData\"\n          }\n        }\n      }\n    },\n    \"GetReservedInstancesExchangeQuote\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReservedInstanceIds\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"ReservedInstanceIds\": {\n            \"shape\": \"S3\",\n            \"locationName\": \"ReservedInstanceId\"\n          },\n          \"TargetConfigurations\": {\n            \"shape\": \"S5\",\n            \"locationName\": \"TargetConfiguration\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedInstanceValueSet\": {\n            \"locationName\": \"reservedInstanceValueSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ReservedInstanceId\": {\n                  \"locationName\": \"reservedInstanceId\"\n                },\n                \"ReservationValue\": {\n                  \"shape\": \"Sl3\",\n                  \"locationName\": \"reservationValue\"\n                }\n              }\n            }\n          },\n          \"ReservedInstanceValueRollup\": {\n            \"shape\": \"Sl3\",\n            \"locationName\": \"reservedInstanceValueRollup\"\n          },\n          \"TargetConfigurationValueSet\": {\n            \"locationName\": \"targetConfigurationValueSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"TargetConfiguration\": {\n                  \"locationName\": \"targetConfiguration\",\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"OfferingId\": {\n                      \"locationName\": \"offeringId\"\n                    },\n                    \"InstanceCount\": {\n                      \"locationName\": \"instanceCount\",\n                      \"type\": \"integer\"\n                    }\n                  }\n                },\n                \"ReservationValue\": {\n                  \"shape\": \"Sl3\",\n                  \"locationName\": \"reservationValue\"\n                }\n              }\n            }\n          },\n          \"TargetConfigurationValueRollup\": {\n            \"shape\": \"Sl3\",\n            \"locationName\": \"targetConfigurationValueRollup\"\n          },\n          \"PaymentDue\": {\n            \"locationName\": \"paymentDue\"\n          },\n          \"CurrencyCode\": {\n            \"locationName\": \"currencyCode\"\n          },\n          \"OutputReservedInstancesWillExpireAt\": {\n            \"locationName\": \"outputReservedInstancesWillExpireAt\",\n            \"type\": \"timestamp\"\n          },\n          \"IsValidExchange\": {\n            \"locationName\": \"isValidExchange\",\n            \"type\": \"boolean\"\n          },\n          \"ValidationFailureReason\": {\n            \"locationName\": \"validationFailureReason\"\n          }\n        }\n      }\n    },\n    \"ImportImage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"Description\": {},\n          \"DiskContainers\": {\n            \"locationName\": \"DiskContainer\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Description\": {},\n                \"Format\": {},\n                \"Url\": {},\n                \"UserBucket\": {\n                  \"shape\": \"Sla\"\n                },\n                \"DeviceName\": {},\n                \"SnapshotId\": {}\n              }\n            }\n          },\n          \"LicenseType\": {},\n          \"Hypervisor\": {},\n          \"Architecture\": {},\n          \"Platform\": {},\n          \"ClientData\": {\n            \"shape\": \"Slb\"\n          },\n          \"ClientToken\": {},\n          \"RoleName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ImportTaskId\": {\n            \"locationName\": \"importTaskId\"\n          },\n          \"Architecture\": {\n            \"locationName\": \"architecture\"\n          },\n          \"LicenseType\": {\n            \"locationName\": \"licenseType\"\n          },\n          \"Platform\": {\n            \"locationName\": \"platform\"\n          },\n          \"Hypervisor\": {\n            \"locationName\": \"hypervisor\"\n          },\n          \"Description\": {\n            \"locationName\": \"description\"\n          },\n          \"SnapshotDetails\": {\n            \"shape\": \"Sca\",\n            \"locationName\": \"snapshotDetailSet\"\n          },\n          \"ImageId\": {\n            \"locationName\": \"imageId\"\n          },\n          \"Progress\": {\n            \"locationName\": \"progress\"\n          },\n          \"StatusMessage\": {\n            \"locationName\": \"statusMessage\"\n          },\n          \"Status\": {\n            \"locationName\": \"status\"\n          }\n        }\n      }\n    },\n    \"ImportInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Platform\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"Description\": {\n            \"locationName\": \"description\"\n          },\n          \"LaunchSpecification\": {\n            \"locationName\": \"launchSpecification\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Architecture\": {\n                \"locationName\": \"architecture\"\n              },\n              \"GroupNames\": {\n                \"shape\": \"Slf\",\n                \"locationName\": \"GroupName\"\n              },\n              \"GroupIds\": {\n                \"shape\": \"S5e\",\n                \"locationName\": \"GroupId\"\n              },\n              \"AdditionalInfo\": {\n                \"locationName\": \"additionalInfo\"\n              },\n              \"UserData\": {\n                \"locationName\": \"userData\",\n                \"type\": \"structure\",\n                \"members\": {\n                  \"Data\": {\n                    \"locationName\": \"data\"\n                  }\n                }\n              },\n              \"InstanceType\": {\n                \"locationName\": \"instanceType\"\n              },\n              \"Placement\": {\n                \"shape\": \"Sdb\",\n                \"locationName\": \"placement\"\n              },\n              \"Monitoring\": {\n                \"locationName\": \"monitoring\",\n                \"type\": \"boolean\"\n              },\n              \"SubnetId\": {\n                \"locationName\": \"subnetId\"\n              },\n              \"InstanceInitiatedShutdownBehavior\": {\n                \"locationName\": \"instanceInitiatedShutdownBehavior\"\n              },\n              \"PrivateIpAddress\": {\n                \"locationName\": \"privateIpAddress\"\n              }\n            }\n          },\n          \"DiskImages\": {\n            \"locationName\": \"diskImage\",\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Image\": {\n                  \"shape\": \"Slk\"\n                },\n                \"Description\": {},\n                \"Volume\": {\n                  \"shape\": \"Sll\"\n                }\n              }\n            }\n          },\n          \"Platform\": {\n            \"locationName\": \"platform\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConversionTask\": {\n            \"shape\": \"S9o\",\n            \"locationName\": \"conversionTask\"\n          }\n        }\n      }\n    },\n    \"ImportKeyPair\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyName\",\n          \"PublicKeyMaterial\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"KeyName\": {\n            \"locationName\": \"keyName\"\n          },\n          \"PublicKeyMaterial\": {\n            \"locationName\": \"publicKeyMaterial\",\n            \"type\": \"blob\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"KeyName\": {\n            \"locationName\": \"keyName\"\n          },\n          \"KeyFingerprint\": {\n            \"locationName\": \"keyFingerprint\"\n          }\n        }\n      }\n    },\n    \"ImportSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"Description\": {},\n          \"DiskContainer\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Description\": {},\n              \"Format\": {},\n              \"Url\": {},\n              \"UserBucket\": {\n                \"shape\": \"Sla\"\n              }\n            }\n          },\n          \"ClientData\": {\n            \"shape\": \"Slb\"\n          },\n          \"ClientToken\": {},\n          \"RoleName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ImportTaskId\": {\n            \"locationName\": \"importTaskId\"\n          },\n          \"SnapshotTaskDetail\": {\n            \"shape\": \"Sch\",\n            \"locationName\": \"snapshotTaskDetail\"\n          },\n          \"Description\": {\n            \"locationName\": \"description\"\n          }\n        }\n      }\n    },\n    \"ImportVolume\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AvailabilityZone\",\n          \"Image\",\n          \"Volume\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"AvailabilityZone\": {\n            \"locationName\": \"availabilityZone\"\n          },\n          \"Image\": {\n            \"shape\": \"Slk\",\n            \"locationName\": \"image\"\n          },\n          \"Description\": {\n            \"locationName\": \"description\"\n          },\n          \"Volume\": {\n            \"shape\": \"Sll\",\n            \"locationName\": \"volume\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConversionTask\": {\n            \"shape\": \"S9o\",\n            \"locationName\": \"conversionTask\"\n          }\n        }\n      }\n    },\n    \"ModifyHosts\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostIds\",\n          \"AutoPlacement\"\n        ],\n        \"members\": {\n          \"HostIds\": {\n            \"shape\": \"Sau\",\n            \"locationName\": \"hostId\"\n          },\n          \"AutoPlacement\": {\n            \"locationName\": \"autoPlacement\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Successful\": {\n            \"shape\": \"Sr\",\n            \"locationName\": \"successful\"\n          },\n          \"Unsuccessful\": {\n            \"shape\": \"Slw\",\n            \"locationName\": \"unsuccessful\"\n          }\n        }\n      }\n    },\n    \"ModifyIdFormat\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Resource\",\n          \"UseLongIds\"\n        ],\n        \"members\": {\n          \"Resource\": {},\n          \"UseLongIds\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ModifyIdentityIdFormat\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Resource\",\n          \"UseLongIds\",\n          \"PrincipalArn\"\n        ],\n        \"members\": {\n          \"Resource\": {\n            \"locationName\": \"resource\"\n          },\n          \"UseLongIds\": {\n            \"locationName\": \"useLongIds\",\n            \"type\": \"boolean\"\n          },\n          \"PrincipalArn\": {\n            \"locationName\": \"principalArn\"\n          }\n        }\n      }\n    },\n    \"ModifyImageAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ImageId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"ImageId\": {},\n          \"Attribute\": {},\n          \"OperationType\": {},\n          \"UserIds\": {\n            \"shape\": \"Sm1\",\n            \"locationName\": \"UserId\"\n          },\n          \"UserGroups\": {\n            \"locationName\": \"UserGroup\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"UserGroup\"\n            }\n          },\n          \"ProductCodes\": {\n            \"locationName\": \"ProductCode\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ProductCode\"\n            }\n          },\n          \"Value\": {},\n          \"LaunchPermission\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Add\": {\n                \"shape\": \"Sbk\"\n              },\n              \"Remove\": {\n                \"shape\": \"Sbk\"\n              }\n            }\n          },\n          \"Description\": {\n            \"shape\": \"S3w\"\n          }\n        }\n      }\n    },\n    \"ModifyInstanceAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"Attribute\": {\n            \"locationName\": \"attribute\"\n          },\n          \"Value\": {\n            \"locationName\": \"value\"\n          },\n          \"BlockDeviceMappings\": {\n            \"locationName\": \"blockDeviceMapping\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"DeviceName\": {\n                  \"locationName\": \"deviceName\"\n                },\n                \"Ebs\": {\n                  \"locationName\": \"ebs\",\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"VolumeId\": {\n                      \"locationName\": \"volumeId\"\n                    },\n                    \"DeleteOnTermination\": {\n                      \"locationName\": \"deleteOnTermination\",\n                      \"type\": \"boolean\"\n                    }\n                  }\n                },\n                \"VirtualName\": {\n                  \"locationName\": \"virtualName\"\n                },\n                \"NoDevice\": {\n                  \"locationName\": \"noDevice\"\n                }\n              }\n            }\n          },\n          \"SourceDestCheck\": {\n            \"shape\": \"Scl\"\n          },\n          \"DisableApiTermination\": {\n            \"shape\": \"Scl\",\n            \"locationName\": \"disableApiTermination\"\n          },\n          \"InstanceType\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"instanceType\"\n          },\n          \"Kernel\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"kernel\"\n          },\n          \"Ramdisk\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"ramdisk\"\n          },\n          \"UserData\": {\n            \"locationName\": \"userData\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Value\": {\n                \"locationName\": \"value\",\n                \"type\": \"blob\"\n              }\n            }\n          },\n          \"InstanceInitiatedShutdownBehavior\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"instanceInitiatedShutdownBehavior\"\n          },\n          \"Groups\": {\n            \"shape\": \"S1j\",\n            \"locationName\": \"GroupId\"\n          },\n          \"EbsOptimized\": {\n            \"shape\": \"Scl\",\n            \"locationName\": \"ebsOptimized\"\n          },\n          \"SriovNetSupport\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"sriovNetSupport\"\n          },\n          \"EnaSupport\": {\n            \"shape\": \"Scl\",\n            \"locationName\": \"enaSupport\"\n          }\n        }\n      }\n    },\n    \"ModifyInstancePlacement\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"Tenancy\": {\n            \"locationName\": \"tenancy\"\n          },\n          \"Affinity\": {\n            \"locationName\": \"affinity\"\n          },\n          \"HostId\": {\n            \"locationName\": \"hostId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Return\": {\n            \"locationName\": \"return\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ModifyNetworkInterfaceAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"NetworkInterfaceId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"Description\": {\n            \"shape\": \"S3w\",\n            \"locationName\": \"description\"\n          },\n          \"SourceDestCheck\": {\n            \"shape\": \"Scl\",\n            \"locationName\": \"sourceDestCheck\"\n          },\n          \"Groups\": {\n            \"shape\": \"S5e\",\n            \"locationName\": \"SecurityGroupId\"\n          },\n          \"Attachment\": {\n            \"locationName\": \"attachment\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"AttachmentId\": {\n                \"locationName\": \"attachmentId\"\n              },\n              \"DeleteOnTermination\": {\n                \"locationName\": \"deleteOnTermination\",\n                \"type\": \"boolean\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ModifyReservedInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReservedInstancesIds\",\n          \"TargetConfigurations\"\n        ],\n        \"members\": {\n          \"ClientToken\": {\n            \"locationName\": \"clientToken\"\n          },\n          \"ReservedInstancesIds\": {\n            \"shape\": \"Ser\",\n            \"locationName\": \"ReservedInstancesId\"\n          },\n          \"TargetConfigurations\": {\n            \"locationName\": \"ReservedInstancesConfigurationSetItemType\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sff\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedInstancesModificationId\": {\n            \"locationName\": \"reservedInstancesModificationId\"\n          }\n        }\n      }\n    },\n    \"ModifySnapshotAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SnapshotId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SnapshotId\": {},\n          \"Attribute\": {},\n          \"OperationType\": {},\n          \"UserIds\": {\n            \"shape\": \"Sm1\",\n            \"locationName\": \"UserId\"\n          },\n          \"GroupNames\": {\n            \"shape\": \"Sgb\",\n            \"locationName\": \"UserGroup\"\n          },\n          \"CreateVolumePermission\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Add\": {\n                \"shape\": \"Sgi\"\n              },\n              \"Remove\": {\n                \"shape\": \"Sgi\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ModifySpotFleetRequest\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SpotFleetRequestId\"\n        ],\n        \"members\": {\n          \"SpotFleetRequestId\": {\n            \"locationName\": \"spotFleetRequestId\"\n          },\n          \"TargetCapacity\": {\n            \"locationName\": \"targetCapacity\",\n            \"type\": \"integer\"\n          },\n          \"ExcessCapacityTerminationPolicy\": {\n            \"locationName\": \"excessCapacityTerminationPolicy\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Return\": {\n            \"locationName\": \"return\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ModifySubnetAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubnetId\"\n        ],\n        \"members\": {\n          \"SubnetId\": {\n            \"locationName\": \"subnetId\"\n          },\n          \"MapPublicIpOnLaunch\": {\n            \"shape\": \"Scl\"\n          },\n          \"AssignIpv6AddressOnCreation\": {\n            \"shape\": \"Scl\"\n          }\n        }\n      }\n    },\n    \"ModifyVolume\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"VolumeId\": {},\n          \"Size\": {\n            \"type\": \"integer\"\n          },\n          \"VolumeType\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VolumeModification\": {\n            \"shape\": \"Sj1\",\n            \"locationName\": \"volumeModification\"\n          }\n        }\n      }\n    },\n    \"ModifyVolumeAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VolumeId\": {},\n          \"AutoEnableIO\": {\n            \"shape\": \"Scl\"\n          }\n        }\n      }\n    },\n    \"ModifyVpcAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          },\n          \"EnableDnsSupport\": {\n            \"shape\": \"Scl\"\n          },\n          \"EnableDnsHostnames\": {\n            \"shape\": \"Scl\"\n          }\n        }\n      }\n    },\n    \"ModifyVpcEndpoint\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcEndpointId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"VpcEndpointId\": {},\n          \"ResetPolicy\": {\n            \"type\": \"boolean\"\n          },\n          \"PolicyDocument\": {},\n          \"AddRouteTableIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"AddRouteTableId\"\n          },\n          \"RemoveRouteTableIds\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"RemoveRouteTableId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Return\": {\n            \"locationName\": \"return\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ModifyVpcPeeringConnectionOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcPeeringConnectionId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"VpcPeeringConnectionId\": {},\n          \"RequesterPeeringConnectionOptions\": {\n            \"shape\": \"Smv\"\n          },\n          \"AccepterPeeringConnectionOptions\": {\n            \"shape\": \"Smv\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RequesterPeeringConnectionOptions\": {\n            \"shape\": \"Smx\",\n            \"locationName\": \"requesterPeeringConnectionOptions\"\n          },\n          \"AccepterPeeringConnectionOptions\": {\n            \"shape\": \"Smx\",\n            \"locationName\": \"accepterPeeringConnectionOptions\"\n          }\n        }\n      }\n    },\n    \"MonitorInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceIds\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceIds\": {\n            \"shape\": \"S9g\",\n            \"locationName\": \"InstanceId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceMonitorings\": {\n            \"shape\": \"Sn0\",\n            \"locationName\": \"instancesSet\"\n          }\n        }\n      }\n    },\n    \"MoveAddressToVpc\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PublicIp\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"PublicIp\": {\n            \"locationName\": \"publicIp\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AllocationId\": {\n            \"locationName\": \"allocationId\"\n          },\n          \"Status\": {\n            \"locationName\": \"status\"\n          }\n        }\n      }\n    },\n    \"PurchaseHostReservation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OfferingId\",\n          \"HostIdSet\"\n        ],\n        \"members\": {\n          \"OfferingId\": {},\n          \"HostIdSet\": {\n            \"shape\": \"Skt\"\n          },\n          \"LimitPrice\": {},\n          \"CurrencyCode\": {},\n          \"ClientToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Purchase\": {\n            \"shape\": \"Skv\",\n            \"locationName\": \"purchase\"\n          },\n          \"TotalUpfrontPrice\": {\n            \"locationName\": \"totalUpfrontPrice\"\n          },\n          \"TotalHourlyPrice\": {\n            \"locationName\": \"totalHourlyPrice\"\n          },\n          \"CurrencyCode\": {\n            \"locationName\": \"currencyCode\"\n          },\n          \"ClientToken\": {\n            \"locationName\": \"clientToken\"\n          }\n        }\n      }\n    },\n    \"PurchaseReservedInstancesOffering\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReservedInstancesOfferingId\",\n          \"InstanceCount\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"ReservedInstancesOfferingId\": {},\n          \"InstanceCount\": {\n            \"type\": \"integer\"\n          },\n          \"LimitPrice\": {\n            \"locationName\": \"limitPrice\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Amount\": {\n                \"locationName\": \"amount\",\n                \"type\": \"double\"\n              },\n              \"CurrencyCode\": {\n                \"locationName\": \"currencyCode\"\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedInstancesId\": {\n            \"locationName\": \"reservedInstancesId\"\n          }\n        }\n      }\n    },\n    \"PurchaseScheduledInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PurchaseRequests\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"ClientToken\": {\n            \"idempotencyToken\": true\n          },\n          \"PurchaseRequests\": {\n            \"locationName\": \"PurchaseRequest\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"PurchaseRequest\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"PurchaseToken\",\n                \"InstanceCount\"\n              ],\n              \"members\": {\n                \"PurchaseToken\": {},\n                \"InstanceCount\": {\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ScheduledInstanceSet\": {\n            \"locationName\": \"scheduledInstanceSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sg4\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"RebootInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceIds\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceIds\": {\n            \"shape\": \"S9g\",\n            \"locationName\": \"InstanceId\"\n          }\n        }\n      }\n    },\n    \"RegisterImage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"ImageLocation\": {},\n          \"Name\": {\n            \"locationName\": \"name\"\n          },\n          \"Description\": {\n            \"locationName\": \"description\"\n          },\n          \"Architecture\": {\n            \"locationName\": \"architecture\"\n          },\n          \"KernelId\": {\n            \"locationName\": \"kernelId\"\n          },\n          \"RamdiskId\": {\n            \"locationName\": \"ramdiskId\"\n          },\n          \"BillingProducts\": {\n            \"locationName\": \"BillingProduct\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\"\n            }\n          },\n          \"RootDeviceName\": {\n            \"locationName\": \"rootDeviceName\"\n          },\n          \"BlockDeviceMappings\": {\n            \"shape\": \"S4b\",\n            \"locationName\": \"BlockDeviceMapping\"\n          },\n          \"VirtualizationType\": {\n            \"locationName\": \"virtualizationType\"\n          },\n          \"SriovNetSupport\": {\n            \"locationName\": \"sriovNetSupport\"\n          },\n          \"EnaSupport\": {\n            \"locationName\": \"enaSupport\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ImageId\": {\n            \"locationName\": \"imageId\"\n          }\n        }\n      }\n    },\n    \"RejectVpcPeeringConnection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VpcPeeringConnectionId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"VpcPeeringConnectionId\": {\n            \"locationName\": \"vpcPeeringConnectionId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Return\": {\n            \"locationName\": \"return\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ReleaseAddress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"PublicIp\": {},\n          \"AllocationId\": {}\n        }\n      }\n    },\n    \"ReleaseHosts\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostIds\"\n        ],\n        \"members\": {\n          \"HostIds\": {\n            \"shape\": \"Sau\",\n            \"locationName\": \"hostId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Successful\": {\n            \"shape\": \"Sr\",\n            \"locationName\": \"successful\"\n          },\n          \"Unsuccessful\": {\n            \"shape\": \"Slw\",\n            \"locationName\": \"unsuccessful\"\n          }\n        }\n      }\n    },\n    \"ReplaceIamInstanceProfileAssociation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IamInstanceProfile\",\n          \"AssociationId\"\n        ],\n        \"members\": {\n          \"IamInstanceProfile\": {\n            \"shape\": \"S11\"\n          },\n          \"AssociationId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IamInstanceProfileAssociation\": {\n            \"shape\": \"S13\",\n            \"locationName\": \"iamInstanceProfileAssociation\"\n          }\n        }\n      }\n    },\n    \"ReplaceNetworkAclAssociation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AssociationId\",\n          \"NetworkAclId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"AssociationId\": {\n            \"locationName\": \"associationId\"\n          },\n          \"NetworkAclId\": {\n            \"locationName\": \"networkAclId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NewAssociationId\": {\n            \"locationName\": \"newAssociationId\"\n          }\n        }\n      }\n    },\n    \"ReplaceNetworkAclEntry\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"NetworkAclId\",\n          \"RuleNumber\",\n          \"Protocol\",\n          \"RuleAction\",\n          \"Egress\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"NetworkAclId\": {\n            \"locationName\": \"networkAclId\"\n          },\n          \"RuleNumber\": {\n            \"locationName\": \"ruleNumber\",\n            \"type\": \"integer\"\n          },\n          \"Protocol\": {\n            \"locationName\": \"protocol\"\n          },\n          \"RuleAction\": {\n            \"locationName\": \"ruleAction\"\n          },\n          \"Egress\": {\n            \"locationName\": \"egress\",\n            \"type\": \"boolean\"\n          },\n          \"CidrBlock\": {\n            \"locationName\": \"cidrBlock\"\n          },\n          \"Ipv6CidrBlock\": {\n            \"locationName\": \"ipv6CidrBlock\"\n          },\n          \"IcmpTypeCode\": {\n            \"shape\": \"S58\",\n            \"locationName\": \"Icmp\"\n          },\n          \"PortRange\": {\n            \"shape\": \"S59\",\n            \"locationName\": \"portRange\"\n          }\n        }\n      }\n    },\n    \"ReplaceRoute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RouteTableId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"RouteTableId\": {\n            \"locationName\": \"routeTableId\"\n          },\n          \"DestinationCidrBlock\": {\n            \"locationName\": \"destinationCidrBlock\"\n          },\n          \"GatewayId\": {\n            \"locationName\": \"gatewayId\"\n          },\n          \"DestinationIpv6CidrBlock\": {\n            \"locationName\": \"destinationIpv6CidrBlock\"\n          },\n          \"EgressOnlyInternetGatewayId\": {\n            \"locationName\": \"egressOnlyInternetGatewayId\"\n          },\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"VpcPeeringConnectionId\": {\n            \"locationName\": \"vpcPeeringConnectionId\"\n          },\n          \"NatGatewayId\": {\n            \"locationName\": \"natGatewayId\"\n          }\n        }\n      }\n    },\n    \"ReplaceRouteTableAssociation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AssociationId\",\n          \"RouteTableId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"AssociationId\": {\n            \"locationName\": \"associationId\"\n          },\n          \"RouteTableId\": {\n            \"locationName\": \"routeTableId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NewAssociationId\": {\n            \"locationName\": \"newAssociationId\"\n          }\n        }\n      }\n    },\n    \"ReportInstanceStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Instances\",\n          \"Status\",\n          \"ReasonCodes\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"Instances\": {\n            \"shape\": \"S9g\",\n            \"locationName\": \"instanceId\"\n          },\n          \"Status\": {\n            \"locationName\": \"status\"\n          },\n          \"StartTime\": {\n            \"locationName\": \"startTime\",\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"locationName\": \"endTime\",\n            \"type\": \"timestamp\"\n          },\n          \"ReasonCodes\": {\n            \"locationName\": \"reasonCode\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\"\n            }\n          },\n          \"Description\": {\n            \"locationName\": \"description\"\n          }\n        }\n      }\n    },\n    \"RequestSpotFleet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SpotFleetRequestConfig\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SpotFleetRequestConfig\": {\n            \"shape\": \"Sh6\",\n            \"locationName\": \"spotFleetRequestConfig\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SpotFleetRequestId\"\n        ],\n        \"members\": {\n          \"SpotFleetRequestId\": {\n            \"locationName\": \"spotFleetRequestId\"\n          }\n        }\n      }\n    },\n    \"RequestSpotInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SpotPrice\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SpotPrice\": {\n            \"locationName\": \"spotPrice\"\n          },\n          \"ClientToken\": {\n            \"locationName\": \"clientToken\"\n          },\n          \"InstanceCount\": {\n            \"locationName\": \"instanceCount\",\n            \"type\": \"integer\"\n          },\n          \"Type\": {\n            \"locationName\": \"type\"\n          },\n          \"ValidFrom\": {\n            \"locationName\": \"validFrom\",\n            \"type\": \"timestamp\"\n          },\n          \"ValidUntil\": {\n            \"locationName\": \"validUntil\",\n            \"type\": \"timestamp\"\n          },\n          \"LaunchGroup\": {\n            \"locationName\": \"launchGroup\"\n          },\n          \"AvailabilityZoneGroup\": {\n            \"locationName\": \"availabilityZoneGroup\"\n          },\n          \"BlockDurationMinutes\": {\n            \"locationName\": \"blockDurationMinutes\",\n            \"type\": \"integer\"\n          },\n          \"LaunchSpecification\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"ImageId\": {\n                \"locationName\": \"imageId\"\n              },\n              \"KeyName\": {\n                \"locationName\": \"keyName\"\n              },\n              \"SecurityGroups\": {\n                \"shape\": \"S2z\",\n                \"locationName\": \"SecurityGroup\"\n              },\n              \"UserData\": {\n                \"locationName\": \"userData\"\n              },\n              \"AddressingType\": {\n                \"locationName\": \"addressingType\"\n              },\n              \"InstanceType\": {\n                \"locationName\": \"instanceType\"\n              },\n              \"Placement\": {\n                \"shape\": \"Sh9\",\n                \"locationName\": \"placement\"\n              },\n              \"KernelId\": {\n                \"locationName\": \"kernelId\"\n              },\n              \"RamdiskId\": {\n                \"locationName\": \"ramdiskId\"\n              },\n              \"BlockDeviceMappings\": {\n                \"shape\": \"Sbq\",\n                \"locationName\": \"blockDeviceMapping\"\n              },\n              \"SubnetId\": {\n                \"locationName\": \"subnetId\"\n              },\n              \"NetworkInterfaces\": {\n                \"shape\": \"Shb\",\n                \"locationName\": \"NetworkInterface\"\n              },\n              \"IamInstanceProfile\": {\n                \"shape\": \"S11\",\n                \"locationName\": \"iamInstanceProfile\"\n              },\n              \"EbsOptimized\": {\n                \"locationName\": \"ebsOptimized\",\n                \"type\": \"boolean\"\n              },\n              \"Monitoring\": {\n                \"shape\": \"Shp\",\n                \"locationName\": \"monitoring\"\n              },\n              \"SecurityGroupIds\": {\n                \"shape\": \"S2z\",\n                \"locationName\": \"SecurityGroupId\"\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SpotInstanceRequests\": {\n            \"shape\": \"Shj\",\n            \"locationName\": \"spotInstanceRequestSet\"\n          }\n        }\n      }\n    },\n    \"ResetImageAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ImageId\",\n          \"Attribute\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"ImageId\": {},\n          \"Attribute\": {}\n        }\n      }\n    },\n    \"ResetInstanceAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\",\n          \"Attribute\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"Attribute\": {\n            \"locationName\": \"attribute\"\n          }\n        }\n      }\n    },\n    \"ResetNetworkInterfaceAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"NetworkInterfaceId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"SourceDestCheck\": {\n            \"locationName\": \"sourceDestCheck\"\n          }\n        }\n      }\n    },\n    \"ResetSnapshotAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SnapshotId\",\n          \"Attribute\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"SnapshotId\": {},\n          \"Attribute\": {}\n        }\n      }\n    },\n    \"RestoreAddressToClassic\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PublicIp\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"PublicIp\": {\n            \"locationName\": \"publicIp\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Status\": {\n            \"locationName\": \"status\"\n          },\n          \"PublicIp\": {\n            \"locationName\": \"publicIp\"\n          }\n        }\n      }\n    },\n    \"RevokeSecurityGroupEgress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GroupId\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"GroupId\": {\n            \"locationName\": \"groupId\"\n          },\n          \"SourceSecurityGroupName\": {\n            \"locationName\": \"sourceSecurityGroupName\"\n          },\n          \"SourceSecurityGroupOwnerId\": {\n            \"locationName\": \"sourceSecurityGroupOwnerId\"\n          },\n          \"IpProtocol\": {\n            \"locationName\": \"ipProtocol\"\n          },\n          \"FromPort\": {\n            \"locationName\": \"fromPort\",\n            \"type\": \"integer\"\n          },\n          \"ToPort\": {\n            \"locationName\": \"toPort\",\n            \"type\": \"integer\"\n          },\n          \"CidrIp\": {\n            \"locationName\": \"cidrIp\"\n          },\n          \"IpPermissions\": {\n            \"shape\": \"S1w\",\n            \"locationName\": \"ipPermissions\"\n          }\n        }\n      }\n    },\n    \"RevokeSecurityGroupIngress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"GroupName\": {},\n          \"GroupId\": {},\n          \"SourceSecurityGroupName\": {},\n          \"SourceSecurityGroupOwnerId\": {},\n          \"IpProtocol\": {},\n          \"FromPort\": {\n            \"type\": \"integer\"\n          },\n          \"ToPort\": {\n            \"type\": \"integer\"\n          },\n          \"CidrIp\": {},\n          \"IpPermissions\": {\n            \"shape\": \"S1w\"\n          }\n        }\n      }\n    },\n    \"RunInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ImageId\",\n          \"MinCount\",\n          \"MaxCount\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"ImageId\": {},\n          \"MinCount\": {\n            \"type\": \"integer\"\n          },\n          \"MaxCount\": {\n            \"type\": \"integer\"\n          },\n          \"KeyName\": {},\n          \"SecurityGroups\": {\n            \"shape\": \"Slf\",\n            \"locationName\": \"SecurityGroup\"\n          },\n          \"SecurityGroupIds\": {\n            \"shape\": \"S5e\",\n            \"locationName\": \"SecurityGroupId\"\n          },\n          \"UserData\": {},\n          \"InstanceType\": {},\n          \"Placement\": {\n            \"shape\": \"Sdb\"\n          },\n          \"KernelId\": {},\n          \"RamdiskId\": {},\n          \"BlockDeviceMappings\": {\n            \"shape\": \"S4b\",\n            \"locationName\": \"BlockDeviceMapping\"\n          },\n          \"Monitoring\": {\n            \"shape\": \"Shp\"\n          },\n          \"SubnetId\": {},\n          \"DisableApiTermination\": {\n            \"locationName\": \"disableApiTermination\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceInitiatedShutdownBehavior\": {\n            \"locationName\": \"instanceInitiatedShutdownBehavior\"\n          },\n          \"PrivateIpAddress\": {\n            \"locationName\": \"privateIpAddress\"\n          },\n          \"Ipv6Addresses\": {\n            \"shape\": \"S5h\",\n            \"locationName\": \"Ipv6Address\"\n          },\n          \"Ipv6AddressCount\": {\n            \"type\": \"integer\"\n          },\n          \"ClientToken\": {\n            \"locationName\": \"clientToken\"\n          },\n          \"AdditionalInfo\": {\n            \"locationName\": \"additionalInfo\"\n          },\n          \"NetworkInterfaces\": {\n            \"shape\": \"Shb\",\n            \"locationName\": \"networkInterface\"\n          },\n          \"IamInstanceProfile\": {\n            \"shape\": \"S11\",\n            \"locationName\": \"iamInstanceProfile\"\n          },\n          \"EbsOptimized\": {\n            \"locationName\": \"ebsOptimized\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sd7\"\n      }\n    },\n    \"RunScheduledInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ScheduledInstanceId\",\n          \"LaunchSpecification\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"type\": \"boolean\"\n          },\n          \"ClientToken\": {\n            \"idempotencyToken\": true\n          },\n          \"InstanceCount\": {\n            \"type\": \"integer\"\n          },\n          \"ScheduledInstanceId\": {},\n          \"LaunchSpecification\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"ImageId\"\n            ],\n            \"members\": {\n              \"ImageId\": {},\n              \"KeyName\": {},\n              \"SecurityGroupIds\": {\n                \"shape\": \"Soh\",\n                \"locationName\": \"SecurityGroupId\"\n              },\n              \"UserData\": {},\n              \"Placement\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"AvailabilityZone\": {},\n                  \"GroupName\": {}\n                }\n              },\n              \"KernelId\": {},\n              \"InstanceType\": {},\n              \"RamdiskId\": {},\n              \"BlockDeviceMappings\": {\n                \"locationName\": \"BlockDeviceMapping\",\n                \"type\": \"list\",\n                \"member\": {\n                  \"locationName\": \"BlockDeviceMapping\",\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"DeviceName\": {},\n                    \"NoDevice\": {},\n                    \"VirtualName\": {},\n                    \"Ebs\": {\n                      \"type\": \"structure\",\n                      \"members\": {\n                        \"SnapshotId\": {},\n                        \"VolumeSize\": {\n                          \"type\": \"integer\"\n                        },\n                        \"DeleteOnTermination\": {\n                          \"type\": \"boolean\"\n                        },\n                        \"VolumeType\": {},\n                        \"Iops\": {\n                          \"type\": \"integer\"\n                        },\n                        \"Encrypted\": {\n                          \"type\": \"boolean\"\n                        }\n                      }\n                    }\n                  }\n                }\n              },\n              \"Monitoring\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"Enabled\": {\n                    \"type\": \"boolean\"\n                  }\n                }\n              },\n              \"SubnetId\": {},\n              \"NetworkInterfaces\": {\n                \"locationName\": \"NetworkInterface\",\n                \"type\": \"list\",\n                \"member\": {\n                  \"locationName\": \"NetworkInterface\",\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"NetworkInterfaceId\": {},\n                    \"DeviceIndex\": {\n                      \"type\": \"integer\"\n                    },\n                    \"SubnetId\": {},\n                    \"Description\": {},\n                    \"PrivateIpAddress\": {},\n                    \"PrivateIpAddressConfigs\": {\n                      \"locationName\": \"PrivateIpAddressConfig\",\n                      \"type\": \"list\",\n                      \"member\": {\n                        \"locationName\": \"PrivateIpAddressConfigSet\",\n                        \"type\": \"structure\",\n                        \"members\": {\n                          \"PrivateIpAddress\": {},\n                          \"Primary\": {\n                            \"type\": \"boolean\"\n                          }\n                        }\n                      }\n                    },\n                    \"SecondaryPrivateIpAddressCount\": {\n                      \"type\": \"integer\"\n                    },\n                    \"AssociatePublicIpAddress\": {\n                      \"type\": \"boolean\"\n                    },\n                    \"Groups\": {\n                      \"shape\": \"Soh\",\n                      \"locationName\": \"Group\"\n                    },\n                    \"DeleteOnTermination\": {\n                      \"type\": \"boolean\"\n                    },\n                    \"Ipv6Addresses\": {\n                      \"locationName\": \"Ipv6Address\",\n                      \"type\": \"list\",\n                      \"member\": {\n                        \"locationName\": \"Ipv6Address\",\n                        \"type\": \"structure\",\n                        \"members\": {\n                          \"Ipv6Address\": {}\n                        }\n                      }\n                    },\n                    \"Ipv6AddressCount\": {\n                      \"type\": \"integer\"\n                    }\n                  }\n                }\n              },\n              \"IamInstanceProfile\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"Arn\": {},\n                  \"Name\": {}\n                }\n              },\n              \"EbsOptimized\": {\n                \"type\": \"boolean\"\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceIdSet\": {\n            \"locationName\": \"instanceIdSet\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"StartInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceIds\"\n        ],\n        \"members\": {\n          \"InstanceIds\": {\n            \"shape\": \"S9g\",\n            \"locationName\": \"InstanceId\"\n          },\n          \"AdditionalInfo\": {\n            \"locationName\": \"additionalInfo\"\n          },\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StartingInstances\": {\n            \"shape\": \"Soz\",\n            \"locationName\": \"instancesSet\"\n          }\n        }\n      }\n    },\n    \"StopInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceIds\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceIds\": {\n            \"shape\": \"S9g\",\n            \"locationName\": \"InstanceId\"\n          },\n          \"Force\": {\n            \"locationName\": \"force\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StoppingInstances\": {\n            \"shape\": \"Soz\",\n            \"locationName\": \"instancesSet\"\n          }\n        }\n      }\n    },\n    \"TerminateInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceIds\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceIds\": {\n            \"shape\": \"S9g\",\n            \"locationName\": \"InstanceId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TerminatingInstances\": {\n            \"shape\": \"Soz\",\n            \"locationName\": \"instancesSet\"\n          }\n        }\n      }\n    },\n    \"UnassignIpv6Addresses\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"NetworkInterfaceId\",\n          \"Ipv6Addresses\"\n        ],\n        \"members\": {\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"Ipv6Addresses\": {\n            \"shape\": \"St\",\n            \"locationName\": \"ipv6Addresses\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"UnassignedIpv6Addresses\": {\n            \"shape\": \"St\",\n            \"locationName\": \"unassignedIpv6Addresses\"\n          }\n        }\n      }\n    },\n    \"UnassignPrivateIpAddresses\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"NetworkInterfaceId\",\n          \"PrivateIpAddresses\"\n        ],\n        \"members\": {\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"PrivateIpAddresses\": {\n            \"shape\": \"Sw\",\n            \"locationName\": \"privateIpAddress\"\n          }\n        }\n      }\n    },\n    \"UnmonitorInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceIds\"\n        ],\n        \"members\": {\n          \"DryRun\": {\n            \"locationName\": \"dryRun\",\n            \"type\": \"boolean\"\n          },\n          \"InstanceIds\": {\n            \"shape\": \"S9g\",\n            \"locationName\": \"InstanceId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceMonitorings\": {\n            \"shape\": \"Sn0\",\n            \"locationName\": \"instancesSet\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S3\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"ReservedInstanceId\"\n      }\n    },\n    \"S5\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"TargetConfigurationRequest\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"OfferingId\"\n        ],\n        \"members\": {\n          \"OfferingId\": {},\n          \"InstanceCount\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"Sb\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AccepterVpcInfo\": {\n          \"shape\": \"Sc\",\n          \"locationName\": \"accepterVpcInfo\"\n        },\n        \"ExpirationTime\": {\n          \"locationName\": \"expirationTime\",\n          \"type\": \"timestamp\"\n        },\n        \"RequesterVpcInfo\": {\n          \"shape\": \"Sc\",\n          \"locationName\": \"requesterVpcInfo\"\n        },\n        \"Status\": {\n          \"locationName\": \"status\",\n          \"type\": \"structure\",\n          \"members\": {\n            \"Code\": {\n              \"locationName\": \"code\"\n            },\n            \"Message\": {\n              \"locationName\": \"message\"\n            }\n          }\n        },\n        \"Tags\": {\n          \"shape\": \"Sj\",\n          \"locationName\": \"tagSet\"\n        },\n        \"VpcPeeringConnectionId\": {\n          \"locationName\": \"vpcPeeringConnectionId\"\n        }\n      }\n    },\n    \"Sc\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CidrBlock\": {\n          \"locationName\": \"cidrBlock\"\n        },\n        \"OwnerId\": {\n          \"locationName\": \"ownerId\"\n        },\n        \"VpcId\": {\n          \"locationName\": \"vpcId\"\n        },\n        \"Ipv6CidrBlockSet\": {\n          \"locationName\": \"ipv6CidrBlockSet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Ipv6CidrBlock\": {\n                \"locationName\": \"ipv6CidrBlock\"\n              }\n            }\n          }\n        },\n        \"PeeringOptions\": {\n          \"locationName\": \"peeringOptions\",\n          \"type\": \"structure\",\n          \"members\": {\n            \"AllowEgressFromLocalClassicLinkToRemoteVpc\": {\n              \"locationName\": \"allowEgressFromLocalClassicLinkToRemoteVpc\",\n              \"type\": \"boolean\"\n            },\n            \"AllowEgressFromLocalVpcToRemoteClassicLink\": {\n              \"locationName\": \"allowEgressFromLocalVpcToRemoteClassicLink\",\n              \"type\": \"boolean\"\n            },\n            \"AllowDnsResolutionFromRemoteVpc\": {\n              \"locationName\": \"allowDnsResolutionFromRemoteVpc\",\n              \"type\": \"boolean\"\n            }\n          }\n        }\n      }\n    },\n    \"Sj\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {\n            \"locationName\": \"key\"\n          },\n          \"Value\": {\n            \"locationName\": \"value\"\n          }\n        }\n      }\n    },\n    \"Sr\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\"\n      }\n    },\n    \"St\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\"\n      }\n    },\n    \"Sw\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"PrivateIpAddress\"\n      }\n    },\n    \"S11\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Arn\": {\n          \"locationName\": \"arn\"\n        },\n        \"Name\": {\n          \"locationName\": \"name\"\n        }\n      }\n    },\n    \"S13\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AssociationId\": {\n          \"locationName\": \"associationId\"\n        },\n        \"InstanceId\": {\n          \"locationName\": \"instanceId\"\n        },\n        \"IamInstanceProfile\": {\n          \"shape\": \"S14\",\n          \"locationName\": \"iamInstanceProfile\"\n        },\n        \"State\": {\n          \"locationName\": \"state\"\n        },\n        \"Timestamp\": {\n          \"locationName\": \"timestamp\",\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S14\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Arn\": {\n          \"locationName\": \"arn\"\n        },\n        \"Id\": {\n          \"locationName\": \"id\"\n        }\n      }\n    },\n    \"S1a\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Ipv6CidrBlock\": {\n          \"locationName\": \"ipv6CidrBlock\"\n        },\n        \"Ipv6CidrBlockState\": {\n          \"locationName\": \"ipv6CidrBlockState\",\n          \"type\": \"structure\",\n          \"members\": {\n            \"State\": {\n              \"locationName\": \"state\"\n            },\n            \"StatusMessage\": {\n              \"locationName\": \"statusMessage\"\n            }\n          }\n        },\n        \"AssociationId\": {\n          \"locationName\": \"associationId\"\n        }\n      }\n    },\n    \"S1f\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Ipv6CidrBlock\": {\n          \"locationName\": \"ipv6CidrBlock\"\n        },\n        \"Ipv6CidrBlockState\": {\n          \"locationName\": \"ipv6CidrBlockState\",\n          \"type\": \"structure\",\n          \"members\": {\n            \"State\": {\n              \"locationName\": \"state\"\n            },\n            \"StatusMessage\": {\n              \"locationName\": \"statusMessage\"\n            }\n          }\n        },\n        \"AssociationId\": {\n          \"locationName\": \"associationId\"\n        }\n      }\n    },\n    \"S1j\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"groupId\"\n      }\n    },\n    \"S1p\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"VolumeId\": {\n          \"locationName\": \"volumeId\"\n        },\n        \"InstanceId\": {\n          \"locationName\": \"instanceId\"\n        },\n        \"Device\": {\n          \"locationName\": \"device\"\n        },\n        \"State\": {\n          \"locationName\": \"status\"\n        },\n        \"AttachTime\": {\n          \"locationName\": \"attachTime\",\n          \"type\": \"timestamp\"\n        },\n        \"DeleteOnTermination\": {\n          \"locationName\": \"deleteOnTermination\",\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S1t\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"VpcId\": {\n          \"locationName\": \"vpcId\"\n        },\n        \"State\": {\n          \"locationName\": \"state\"\n        }\n      }\n    },\n    \"S1w\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"IpProtocol\": {\n            \"locationName\": \"ipProtocol\"\n          },\n          \"FromPort\": {\n            \"locationName\": \"fromPort\",\n            \"type\": \"integer\"\n          },\n          \"ToPort\": {\n            \"locationName\": \"toPort\",\n            \"type\": \"integer\"\n          },\n          \"UserIdGroupPairs\": {\n            \"locationName\": \"groups\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1z\",\n              \"locationName\": \"item\"\n            }\n          },\n          \"IpRanges\": {\n            \"locationName\": \"ipRanges\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"CidrIp\": {\n                  \"locationName\": \"cidrIp\"\n                }\n              }\n            }\n          },\n          \"Ipv6Ranges\": {\n            \"locationName\": \"ipv6Ranges\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"CidrIpv6\": {\n                  \"locationName\": \"cidrIpv6\"\n                }\n              }\n            }\n          },\n          \"PrefixListIds\": {\n            \"locationName\": \"prefixListIds\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"PrefixListId\": {\n                  \"locationName\": \"prefixListId\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S1z\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"UserId\": {\n          \"locationName\": \"userId\"\n        },\n        \"GroupName\": {\n          \"locationName\": \"groupName\"\n        },\n        \"GroupId\": {\n          \"locationName\": \"groupId\"\n        },\n        \"VpcId\": {\n          \"locationName\": \"vpcId\"\n        },\n        \"VpcPeeringConnectionId\": {\n          \"locationName\": \"vpcPeeringConnectionId\"\n        },\n        \"PeeringStatus\": {\n          \"locationName\": \"peeringStatus\"\n        }\n      }\n    },\n    \"S28\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"S3\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Bucket\": {\n              \"locationName\": \"bucket\"\n            },\n            \"Prefix\": {\n              \"locationName\": \"prefix\"\n            },\n            \"AWSAccessKeyId\": {},\n            \"UploadPolicy\": {\n              \"locationName\": \"uploadPolicy\",\n              \"type\": \"blob\"\n            },\n            \"UploadPolicySignature\": {\n              \"locationName\": \"uploadPolicySignature\"\n            }\n          }\n        }\n      }\n    },\n    \"S2c\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"InstanceId\": {\n          \"locationName\": \"instanceId\"\n        },\n        \"BundleId\": {\n          \"locationName\": \"bundleId\"\n        },\n        \"State\": {\n          \"locationName\": \"state\"\n        },\n        \"StartTime\": {\n          \"locationName\": \"startTime\",\n          \"type\": \"timestamp\"\n        },\n        \"UpdateTime\": {\n          \"locationName\": \"updateTime\",\n          \"type\": \"timestamp\"\n        },\n        \"Storage\": {\n          \"shape\": \"S28\",\n          \"locationName\": \"storage\"\n        },\n        \"Progress\": {\n          \"locationName\": \"progress\"\n        },\n        \"BundleTaskError\": {\n          \"locationName\": \"error\",\n          \"type\": \"structure\",\n          \"members\": {\n            \"Code\": {\n              \"locationName\": \"code\"\n            },\n            \"Message\": {\n              \"locationName\": \"message\"\n            }\n          }\n        }\n      }\n    },\n    \"S2n\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedInstancesListingId\": {\n            \"locationName\": \"reservedInstancesListingId\"\n          },\n          \"ReservedInstancesId\": {\n            \"locationName\": \"reservedInstancesId\"\n          },\n          \"CreateDate\": {\n            \"locationName\": \"createDate\",\n            \"type\": \"timestamp\"\n          },\n          \"UpdateDate\": {\n            \"locationName\": \"updateDate\",\n            \"type\": \"timestamp\"\n          },\n          \"Status\": {\n            \"locationName\": \"status\"\n          },\n          \"StatusMessage\": {\n            \"locationName\": \"statusMessage\"\n          },\n          \"InstanceCounts\": {\n            \"locationName\": \"instanceCounts\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"State\": {\n                  \"locationName\": \"state\"\n                },\n                \"InstanceCount\": {\n                  \"locationName\": \"instanceCount\",\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          },\n          \"PriceSchedules\": {\n            \"locationName\": \"priceSchedules\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Term\": {\n                  \"locationName\": \"term\",\n                  \"type\": \"long\"\n                },\n                \"Price\": {\n                  \"locationName\": \"price\",\n                  \"type\": \"double\"\n                },\n                \"CurrencyCode\": {\n                  \"locationName\": \"currencyCode\"\n                },\n                \"Active\": {\n                  \"locationName\": \"active\",\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          },\n          \"Tags\": {\n            \"shape\": \"Sj\",\n            \"locationName\": \"tagSet\"\n          },\n          \"ClientToken\": {\n            \"locationName\": \"clientToken\"\n          }\n        }\n      }\n    },\n    \"S2z\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\"\n      }\n    },\n    \"S39\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SpotInstanceRequestId\"\n      }\n    },\n    \"S3n\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CustomerGatewayId\": {\n          \"locationName\": \"customerGatewayId\"\n        },\n        \"State\": {\n          \"locationName\": \"state\"\n        },\n        \"Type\": {\n          \"locationName\": \"type\"\n        },\n        \"IpAddress\": {\n          \"locationName\": \"ipAddress\"\n        },\n        \"BgpAsn\": {\n          \"locationName\": \"bgpAsn\"\n        },\n        \"Tags\": {\n          \"shape\": \"Sj\",\n          \"locationName\": \"tagSet\"\n        }\n      }\n    },\n    \"S3s\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DhcpOptionsId\": {\n          \"locationName\": \"dhcpOptionsId\"\n        },\n        \"DhcpConfigurations\": {\n          \"locationName\": \"dhcpConfigurationSet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Key\": {\n                \"locationName\": \"key\"\n              },\n              \"Values\": {\n                \"locationName\": \"valueSet\",\n                \"type\": \"list\",\n                \"member\": {\n                  \"shape\": \"S3w\",\n                  \"locationName\": \"item\"\n                }\n              }\n            }\n          }\n        },\n        \"Tags\": {\n          \"shape\": \"Sj\",\n          \"locationName\": \"tagSet\"\n        }\n      }\n    },\n    \"S3w\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Value\": {\n          \"locationName\": \"value\"\n        }\n      }\n    },\n    \"S3z\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"EgressOnlyInternetGatewayId\": {\n          \"locationName\": \"egressOnlyInternetGatewayId\"\n        },\n        \"Attachments\": {\n          \"shape\": \"S41\",\n          \"locationName\": \"attachmentSet\"\n        }\n      }\n    },\n    \"S41\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcId\": {\n            \"locationName\": \"vpcId\"\n          },\n          \"State\": {\n            \"locationName\": \"state\"\n          }\n        }\n      }\n    },\n    \"S47\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S48\",\n        \"locationName\": \"item\"\n      }\n    },\n    \"S48\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Error\"\n      ],\n      \"members\": {\n        \"ResourceId\": {\n          \"locationName\": \"resourceId\"\n        },\n        \"Error\": {\n          \"locationName\": \"error\",\n          \"type\": \"structure\",\n          \"required\": [\n            \"Code\",\n            \"Message\"\n          ],\n          \"members\": {\n            \"Code\": {\n              \"locationName\": \"code\"\n            },\n            \"Message\": {\n              \"locationName\": \"message\"\n            }\n          }\n        }\n      }\n    },\n    \"S4b\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S4c\",\n        \"locationName\": \"BlockDeviceMapping\"\n      }\n    },\n    \"S4c\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"VirtualName\": {\n          \"locationName\": \"virtualName\"\n        },\n        \"DeviceName\": {\n          \"locationName\": \"deviceName\"\n        },\n        \"Ebs\": {\n          \"locationName\": \"ebs\",\n          \"type\": \"structure\",\n          \"members\": {\n            \"SnapshotId\": {\n              \"locationName\": \"snapshotId\"\n            },\n            \"VolumeSize\": {\n              \"locationName\": \"volumeSize\",\n              \"type\": \"integer\"\n            },\n            \"DeleteOnTermination\": {\n              \"locationName\": \"deleteOnTermination\",\n              \"type\": \"boolean\"\n            },\n            \"VolumeType\": {\n              \"locationName\": \"volumeType\"\n            },\n            \"Iops\": {\n              \"locationName\": \"iops\",\n              \"type\": \"integer\"\n            },\n            \"Encrypted\": {\n              \"locationName\": \"encrypted\",\n              \"type\": \"boolean\"\n            }\n          }\n        },\n        \"NoDevice\": {\n          \"locationName\": \"noDevice\"\n        }\n      }\n    },\n    \"S4m\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ExportTaskId\": {\n          \"locationName\": \"exportTaskId\"\n        },\n        \"Description\": {\n          \"locationName\": \"description\"\n        },\n        \"State\": {\n          \"locationName\": \"state\"\n        },\n        \"StatusMessage\": {\n          \"locationName\": \"statusMessage\"\n        },\n        \"InstanceExportDetails\": {\n          \"locationName\": \"instanceExport\",\n          \"type\": \"structure\",\n          \"members\": {\n            \"InstanceId\": {\n              \"locationName\": \"instanceId\"\n            },\n            \"TargetEnvironment\": {\n              \"locationName\": \"targetEnvironment\"\n            }\n          }\n        },\n        \"ExportToS3Task\": {\n          \"locationName\": \"exportToS3\",\n          \"type\": \"structure\",\n          \"members\": {\n            \"DiskImageFormat\": {\n              \"locationName\": \"diskImageFormat\"\n            },\n            \"ContainerFormat\": {\n              \"locationName\": \"containerFormat\"\n            },\n            \"S3Bucket\": {\n              \"locationName\": \"s3Bucket\"\n            },\n            \"S3Key\": {\n              \"locationName\": \"s3Key\"\n            }\n          }\n        }\n      }\n    },\n    \"S4s\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"InternetGatewayId\": {\n          \"locationName\": \"internetGatewayId\"\n        },\n        \"Attachments\": {\n          \"shape\": \"S41\",\n          \"locationName\": \"attachmentSet\"\n        },\n        \"Tags\": {\n          \"shape\": \"Sj\",\n          \"locationName\": \"tagSet\"\n        }\n      }\n    },\n    \"S4x\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"VpcId\": {\n          \"locationName\": \"vpcId\"\n        },\n        \"SubnetId\": {\n          \"locationName\": \"subnetId\"\n        },\n        \"NatGatewayId\": {\n          \"locationName\": \"natGatewayId\"\n        },\n        \"CreateTime\": {\n          \"locationName\": \"createTime\",\n          \"type\": \"timestamp\"\n        },\n        \"DeleteTime\": {\n          \"locationName\": \"deleteTime\",\n          \"type\": \"timestamp\"\n        },\n        \"NatGatewayAddresses\": {\n          \"locationName\": \"natGatewayAddressSet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"PublicIp\": {\n                \"locationName\": \"publicIp\"\n              },\n              \"AllocationId\": {\n                \"locationName\": \"allocationId\"\n              },\n              \"PrivateIp\": {\n                \"locationName\": \"privateIp\"\n              },\n              \"NetworkInterfaceId\": {\n                \"locationName\": \"networkInterfaceId\"\n              }\n            }\n          }\n        },\n        \"State\": {\n          \"locationName\": \"state\"\n        },\n        \"FailureCode\": {\n          \"locationName\": \"failureCode\"\n        },\n        \"FailureMessage\": {\n          \"locationName\": \"failureMessage\"\n        },\n        \"ProvisionedBandwidth\": {\n          \"locationName\": \"provisionedBandwidth\",\n          \"type\": \"structure\",\n          \"members\": {\n            \"Provisioned\": {\n              \"locationName\": \"provisioned\"\n            },\n            \"Requested\": {\n              \"locationName\": \"requested\"\n            },\n            \"RequestTime\": {\n              \"locationName\": \"requestTime\",\n              \"type\": \"timestamp\"\n            },\n            \"ProvisionTime\": {\n              \"locationName\": \"provisionTime\",\n              \"type\": \"timestamp\"\n            },\n            \"Status\": {\n              \"locationName\": \"status\"\n            }\n          }\n        }\n      }\n    },\n    \"S54\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"NetworkAclId\": {\n          \"locationName\": \"networkAclId\"\n        },\n        \"VpcId\": {\n          \"locationName\": \"vpcId\"\n        },\n        \"IsDefault\": {\n          \"locationName\": \"default\",\n          \"type\": \"boolean\"\n        },\n        \"Entries\": {\n          \"locationName\": \"entrySet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"RuleNumber\": {\n                \"locationName\": \"ruleNumber\",\n                \"type\": \"integer\"\n              },\n              \"Protocol\": {\n                \"locationName\": \"protocol\"\n              },\n              \"RuleAction\": {\n                \"locationName\": \"ruleAction\"\n              },\n              \"Egress\": {\n                \"locationName\": \"egress\",\n                \"type\": \"boolean\"\n              },\n              \"CidrBlock\": {\n                \"locationName\": \"cidrBlock\"\n              },\n              \"Ipv6CidrBlock\": {\n                \"locationName\": \"ipv6CidrBlock\"\n              },\n              \"IcmpTypeCode\": {\n                \"shape\": \"S58\",\n                \"locationName\": \"icmpTypeCode\"\n              },\n              \"PortRange\": {\n                \"shape\": \"S59\",\n                \"locationName\": \"portRange\"\n              }\n            }\n          }\n        },\n        \"Associations\": {\n          \"locationName\": \"associationSet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"NetworkAclAssociationId\": {\n                \"locationName\": \"networkAclAssociationId\"\n              },\n              \"NetworkAclId\": {\n                \"locationName\": \"networkAclId\"\n              },\n              \"SubnetId\": {\n                \"locationName\": \"subnetId\"\n              }\n            }\n          }\n        },\n        \"Tags\": {\n          \"shape\": \"Sj\",\n          \"locationName\": \"tagSet\"\n        }\n      }\n    },\n    \"S58\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Type\": {\n          \"locationName\": \"type\",\n          \"type\": \"integer\"\n        },\n        \"Code\": {\n          \"locationName\": \"code\",\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"S59\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"From\": {\n          \"locationName\": \"from\",\n          \"type\": \"integer\"\n        },\n        \"To\": {\n          \"locationName\": \"to\",\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"S5e\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SecurityGroupId\"\n      }\n    },\n    \"S5f\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"PrivateIpAddress\"\n        ],\n        \"members\": {\n          \"PrivateIpAddress\": {\n            \"locationName\": \"privateIpAddress\"\n          },\n          \"Primary\": {\n            \"locationName\": \"primary\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"S5h\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Ipv6Address\": {\n            \"locationName\": \"ipv6Address\"\n          }\n        }\n      }\n    },\n    \"S5k\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"NetworkInterfaceId\": {\n          \"locationName\": \"networkInterfaceId\"\n        },\n        \"SubnetId\": {\n          \"locationName\": \"subnetId\"\n        },\n        \"VpcId\": {\n          \"locationName\": \"vpcId\"\n        },\n        \"AvailabilityZone\": {\n          \"locationName\": \"availabilityZone\"\n        },\n        \"Description\": {\n          \"locationName\": \"description\"\n        },\n        \"OwnerId\": {\n          \"locationName\": \"ownerId\"\n        },\n        \"RequesterId\": {\n          \"locationName\": \"requesterId\"\n        },\n        \"RequesterManaged\": {\n          \"locationName\": \"requesterManaged\",\n          \"type\": \"boolean\"\n        },\n        \"Status\": {\n          \"locationName\": \"status\"\n        },\n        \"MacAddress\": {\n          \"locationName\": \"macAddress\"\n        },\n        \"PrivateIpAddress\": {\n          \"locationName\": \"privateIpAddress\"\n        },\n        \"PrivateDnsName\": {\n          \"locationName\": \"privateDnsName\"\n        },\n        \"SourceDestCheck\": {\n          \"locationName\": \"sourceDestCheck\",\n          \"type\": \"boolean\"\n        },\n        \"Groups\": {\n          \"shape\": \"S5m\",\n          \"locationName\": \"groupSet\"\n        },\n        \"Attachment\": {\n          \"shape\": \"S5o\",\n          \"locationName\": \"attachment\"\n        },\n        \"Association\": {\n          \"shape\": \"S5p\",\n          \"locationName\": \"association\"\n        },\n        \"TagSet\": {\n          \"shape\": \"Sj\",\n          \"locationName\": \"tagSet\"\n        },\n        \"PrivateIpAddresses\": {\n          \"locationName\": \"privateIpAddressesSet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"PrivateIpAddress\": {\n                \"locationName\": \"privateIpAddress\"\n              },\n              \"PrivateDnsName\": {\n                \"locationName\": \"privateDnsName\"\n              },\n              \"Primary\": {\n                \"locationName\": \"primary\",\n                \"type\": \"boolean\"\n              },\n              \"Association\": {\n                \"shape\": \"S5p\",\n                \"locationName\": \"association\"\n              }\n            }\n          }\n        },\n        \"Ipv6Addresses\": {\n          \"locationName\": \"ipv6AddressesSet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Ipv6Address\": {\n                \"locationName\": \"ipv6Address\"\n              }\n            }\n          }\n        },\n        \"InterfaceType\": {\n          \"locationName\": \"interfaceType\"\n        }\n      }\n    },\n    \"S5m\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"GroupName\": {\n            \"locationName\": \"groupName\"\n          },\n          \"GroupId\": {\n            \"locationName\": \"groupId\"\n          }\n        }\n      }\n    },\n    \"S5o\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AttachmentId\": {\n          \"locationName\": \"attachmentId\"\n        },\n        \"InstanceId\": {\n          \"locationName\": \"instanceId\"\n        },\n        \"InstanceOwnerId\": {\n          \"locationName\": \"instanceOwnerId\"\n        },\n        \"DeviceIndex\": {\n          \"locationName\": \"deviceIndex\",\n          \"type\": \"integer\"\n        },\n        \"Status\": {\n          \"locationName\": \"status\"\n        },\n        \"AttachTime\": {\n          \"locationName\": \"attachTime\",\n          \"type\": \"timestamp\"\n        },\n        \"DeleteOnTermination\": {\n          \"locationName\": \"deleteOnTermination\",\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S5p\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"PublicIp\": {\n          \"locationName\": \"publicIp\"\n        },\n        \"PublicDnsName\": {\n          \"locationName\": \"publicDnsName\"\n        },\n        \"IpOwnerId\": {\n          \"locationName\": \"ipOwnerId\"\n        },\n        \"AllocationId\": {\n          \"locationName\": \"allocationId\"\n        },\n        \"AssociationId\": {\n          \"locationName\": \"associationId\"\n        }\n      }\n    },\n    \"S65\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"RouteTableId\": {\n          \"locationName\": \"routeTableId\"\n        },\n        \"VpcId\": {\n          \"locationName\": \"vpcId\"\n        },\n        \"Routes\": {\n          \"locationName\": \"routeSet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"DestinationCidrBlock\": {\n                \"locationName\": \"destinationCidrBlock\"\n              },\n              \"DestinationPrefixListId\": {\n                \"locationName\": \"destinationPrefixListId\"\n              },\n              \"GatewayId\": {\n                \"locationName\": \"gatewayId\"\n              },\n              \"InstanceId\": {\n                \"locationName\": \"instanceId\"\n              },\n              \"InstanceOwnerId\": {\n                \"locationName\": \"instanceOwnerId\"\n              },\n              \"NetworkInterfaceId\": {\n                \"locationName\": \"networkInterfaceId\"\n              },\n              \"VpcPeeringConnectionId\": {\n                \"locationName\": \"vpcPeeringConnectionId\"\n              },\n              \"NatGatewayId\": {\n                \"locationName\": \"natGatewayId\"\n              },\n              \"State\": {\n                \"locationName\": \"state\"\n              },\n              \"Origin\": {\n                \"locationName\": \"origin\"\n              },\n              \"DestinationIpv6CidrBlock\": {\n                \"locationName\": \"destinationIpv6CidrBlock\"\n              },\n              \"EgressOnlyInternetGatewayId\": {\n                \"locationName\": \"egressOnlyInternetGatewayId\"\n              }\n            }\n          }\n        },\n        \"Associations\": {\n          \"locationName\": \"associationSet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"RouteTableAssociationId\": {\n                \"locationName\": \"routeTableAssociationId\"\n              },\n              \"RouteTableId\": {\n                \"locationName\": \"routeTableId\"\n              },\n              \"SubnetId\": {\n                \"locationName\": \"subnetId\"\n              },\n              \"Main\": {\n                \"locationName\": \"main\",\n                \"type\": \"boolean\"\n              }\n            }\n          }\n        },\n        \"Tags\": {\n          \"shape\": \"Sj\",\n          \"locationName\": \"tagSet\"\n        },\n        \"PropagatingVgws\": {\n          \"locationName\": \"propagatingVgwSet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"GatewayId\": {\n                \"locationName\": \"gatewayId\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S6h\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"SnapshotId\": {\n          \"locationName\": \"snapshotId\"\n        },\n        \"VolumeId\": {\n          \"locationName\": \"volumeId\"\n        },\n        \"State\": {\n          \"locationName\": \"status\"\n        },\n        \"StateMessage\": {\n          \"locationName\": \"statusMessage\"\n        },\n        \"StartTime\": {\n          \"locationName\": \"startTime\",\n          \"type\": \"timestamp\"\n        },\n        \"Progress\": {\n          \"locationName\": \"progress\"\n        },\n        \"OwnerId\": {\n          \"locationName\": \"ownerId\"\n        },\n        \"Description\": {\n          \"locationName\": \"description\"\n        },\n        \"VolumeSize\": {\n          \"locationName\": \"volumeSize\",\n          \"type\": \"integer\"\n        },\n        \"OwnerAlias\": {\n          \"locationName\": \"ownerAlias\"\n        },\n        \"Tags\": {\n          \"shape\": \"Sj\",\n          \"locationName\": \"tagSet\"\n        },\n        \"Encrypted\": {\n          \"locationName\": \"encrypted\",\n          \"type\": \"boolean\"\n        },\n        \"KmsKeyId\": {\n          \"locationName\": \"kmsKeyId\"\n        },\n        \"DataEncryptionKeyId\": {\n          \"locationName\": \"dataEncryptionKeyId\"\n        }\n      }\n    },\n    \"S6l\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"OwnerId\": {\n          \"locationName\": \"ownerId\"\n        },\n        \"Bucket\": {\n          \"locationName\": \"bucket\"\n        },\n        \"Prefix\": {\n          \"locationName\": \"prefix\"\n        },\n        \"State\": {\n          \"locationName\": \"state\"\n        },\n        \"Fault\": {\n          \"shape\": \"S6n\",\n          \"locationName\": \"fault\"\n        }\n      }\n    },\n    \"S6n\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Code\": {\n          \"locationName\": \"code\"\n        },\n        \"Message\": {\n          \"locationName\": \"message\"\n        }\n      }\n    },\n    \"S6q\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"SubnetId\": {\n          \"locationName\": \"subnetId\"\n        },\n        \"State\": {\n          \"locationName\": \"state\"\n        },\n        \"VpcId\": {\n          \"locationName\": \"vpcId\"\n        },\n        \"CidrBlock\": {\n          \"locationName\": \"cidrBlock\"\n        },\n        \"Ipv6CidrBlockAssociationSet\": {\n          \"locationName\": \"ipv6CidrBlockAssociationSet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"S1a\",\n            \"locationName\": \"item\"\n          }\n        },\n        \"AssignIpv6AddressOnCreation\": {\n          \"locationName\": \"assignIpv6AddressOnCreation\",\n          \"type\": \"boolean\"\n        },\n        \"AvailableIpAddressCount\": {\n          \"locationName\": \"availableIpAddressCount\",\n          \"type\": \"integer\"\n        },\n        \"AvailabilityZone\": {\n          \"locationName\": \"availabilityZone\"\n        },\n        \"DefaultForAz\": {\n          \"locationName\": \"defaultForAz\",\n          \"type\": \"boolean\"\n        },\n        \"MapPublicIpOnLaunch\": {\n          \"locationName\": \"mapPublicIpOnLaunch\",\n          \"type\": \"boolean\"\n        },\n        \"Tags\": {\n          \"shape\": \"Sj\",\n          \"locationName\": \"tagSet\"\n        }\n      }\n    },\n    \"S6u\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S6w\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"VolumeId\": {\n          \"locationName\": \"volumeId\"\n        },\n        \"Size\": {\n          \"locationName\": \"size\",\n          \"type\": \"integer\"\n        },\n        \"SnapshotId\": {\n          \"locationName\": \"snapshotId\"\n        },\n        \"AvailabilityZone\": {\n          \"locationName\": \"availabilityZone\"\n        },\n        \"State\": {\n          \"locationName\": \"status\"\n        },\n        \"CreateTime\": {\n          \"locationName\": \"createTime\",\n          \"type\": \"timestamp\"\n        },\n        \"Attachments\": {\n          \"locationName\": \"attachmentSet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"S1p\",\n            \"locationName\": \"item\"\n          }\n        },\n        \"Tags\": {\n          \"shape\": \"Sj\",\n          \"locationName\": \"tagSet\"\n        },\n        \"VolumeType\": {\n          \"locationName\": \"volumeType\"\n        },\n        \"Iops\": {\n          \"locationName\": \"iops\",\n          \"type\": \"integer\"\n        },\n        \"Encrypted\": {\n          \"locationName\": \"encrypted\",\n          \"type\": \"boolean\"\n        },\n        \"KmsKeyId\": {\n          \"locationName\": \"kmsKeyId\"\n        }\n      }\n    },\n    \"S72\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"VpcId\": {\n          \"locationName\": \"vpcId\"\n        },\n        \"State\": {\n          \"locationName\": \"state\"\n        },\n        \"CidrBlock\": {\n          \"locationName\": \"cidrBlock\"\n        },\n        \"DhcpOptionsId\": {\n          \"locationName\": \"dhcpOptionsId\"\n        },\n        \"Tags\": {\n          \"shape\": \"Sj\",\n          \"locationName\": \"tagSet\"\n        },\n        \"InstanceTenancy\": {\n          \"locationName\": \"instanceTenancy\"\n        },\n        \"IsDefault\": {\n          \"locationName\": \"isDefault\",\n          \"type\": \"boolean\"\n        },\n        \"Ipv6CidrBlockAssociationSet\": {\n          \"locationName\": \"ipv6CidrBlockAssociationSet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"S1f\",\n            \"locationName\": \"item\"\n          }\n        }\n      }\n    },\n    \"S77\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"VpcEndpointId\": {\n          \"locationName\": \"vpcEndpointId\"\n        },\n        \"VpcId\": {\n          \"locationName\": \"vpcId\"\n        },\n        \"ServiceName\": {\n          \"locationName\": \"serviceName\"\n        },\n        \"State\": {\n          \"locationName\": \"state\"\n        },\n        \"PolicyDocument\": {\n          \"locationName\": \"policyDocument\"\n        },\n        \"RouteTableIds\": {\n          \"shape\": \"S2z\",\n          \"locationName\": \"routeTableIdSet\"\n        },\n        \"CreationTimestamp\": {\n          \"locationName\": \"creationTimestamp\",\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S7e\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"VpnConnectionId\": {\n          \"locationName\": \"vpnConnectionId\"\n        },\n        \"State\": {\n          \"locationName\": \"state\"\n        },\n        \"CustomerGatewayConfiguration\": {\n          \"locationName\": \"customerGatewayConfiguration\"\n        },\n        \"Type\": {\n          \"locationName\": \"type\"\n        },\n        \"CustomerGatewayId\": {\n          \"locationName\": \"customerGatewayId\"\n        },\n        \"VpnGatewayId\": {\n          \"locationName\": \"vpnGatewayId\"\n        },\n        \"Tags\": {\n          \"shape\": \"Sj\",\n          \"locationName\": \"tagSet\"\n        },\n        \"VgwTelemetry\": {\n          \"locationName\": \"vgwTelemetry\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"OutsideIpAddress\": {\n                \"locationName\": \"outsideIpAddress\"\n              },\n              \"Status\": {\n                \"locationName\": \"status\"\n              },\n              \"LastStatusChange\": {\n                \"locationName\": \"lastStatusChange\",\n                \"type\": \"timestamp\"\n              },\n              \"StatusMessage\": {\n                \"locationName\": \"statusMessage\"\n              },\n              \"AcceptedRouteCount\": {\n                \"locationName\": \"acceptedRouteCount\",\n                \"type\": \"integer\"\n              }\n            }\n          }\n        },\n        \"Options\": {\n          \"locationName\": \"options\",\n          \"type\": \"structure\",\n          \"members\": {\n            \"StaticRoutesOnly\": {\n              \"locationName\": \"staticRoutesOnly\",\n              \"type\": \"boolean\"\n            }\n          }\n        },\n        \"Routes\": {\n          \"locationName\": \"routes\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"DestinationCidrBlock\": {\n                \"locationName\": \"destinationCidrBlock\"\n              },\n              \"Source\": {\n                \"locationName\": \"source\"\n              },\n              \"State\": {\n                \"locationName\": \"state\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S7q\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"VpnGatewayId\": {\n          \"locationName\": \"vpnGatewayId\"\n        },\n        \"State\": {\n          \"locationName\": \"state\"\n        },\n        \"Type\": {\n          \"locationName\": \"type\"\n        },\n        \"AvailabilityZone\": {\n          \"locationName\": \"availabilityZone\"\n        },\n        \"VpcAttachments\": {\n          \"locationName\": \"attachments\",\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"S1t\",\n            \"locationName\": \"item\"\n          }\n        },\n        \"Tags\": {\n          \"shape\": \"Sj\",\n          \"locationName\": \"tagSet\"\n        }\n      }\n    },\n    \"S8x\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Filter\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Name\": {},\n          \"Values\": {\n            \"shape\": \"S2z\",\n            \"locationName\": \"Value\"\n          }\n        }\n      }\n    },\n    \"S9g\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"InstanceId\"\n      }\n    },\n    \"S9o\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"ConversionTaskId\",\n        \"State\"\n      ],\n      \"members\": {\n        \"ConversionTaskId\": {\n          \"locationName\": \"conversionTaskId\"\n        },\n        \"ExpirationTime\": {\n          \"locationName\": \"expirationTime\"\n        },\n        \"ImportInstance\": {\n          \"locationName\": \"importInstance\",\n          \"type\": \"structure\",\n          \"required\": [\n            \"Volumes\"\n          ],\n          \"members\": {\n            \"Volumes\": {\n              \"locationName\": \"volumes\",\n              \"type\": \"list\",\n              \"member\": {\n                \"locationName\": \"item\",\n                \"type\": \"structure\",\n                \"required\": [\n                  \"BytesConverted\",\n                  \"AvailabilityZone\",\n                  \"Image\",\n                  \"Volume\",\n                  \"Status\"\n                ],\n                \"members\": {\n                  \"BytesConverted\": {\n                    \"locationName\": \"bytesConverted\",\n                    \"type\": \"long\"\n                  },\n                  \"AvailabilityZone\": {\n                    \"locationName\": \"availabilityZone\"\n                  },\n                  \"Image\": {\n                    \"shape\": \"S9s\",\n                    \"locationName\": \"image\"\n                  },\n                  \"Volume\": {\n                    \"shape\": \"S9t\",\n                    \"locationName\": \"volume\"\n                  },\n                  \"Status\": {\n                    \"locationName\": \"status\"\n                  },\n                  \"StatusMessage\": {\n                    \"locationName\": \"statusMessage\"\n                  },\n                  \"Description\": {\n                    \"locationName\": \"description\"\n                  }\n                }\n              }\n            },\n            \"InstanceId\": {\n              \"locationName\": \"instanceId\"\n            },\n            \"Platform\": {\n              \"locationName\": \"platform\"\n            },\n            \"Description\": {\n              \"locationName\": \"description\"\n            }\n          }\n        },\n        \"ImportVolume\": {\n          \"locationName\": \"importVolume\",\n          \"type\": \"structure\",\n          \"required\": [\n            \"BytesConverted\",\n            \"AvailabilityZone\",\n            \"Image\",\n            \"Volume\"\n          ],\n          \"members\": {\n            \"BytesConverted\": {\n              \"locationName\": \"bytesConverted\",\n              \"type\": \"long\"\n            },\n            \"AvailabilityZone\": {\n              \"locationName\": \"availabilityZone\"\n            },\n            \"Description\": {\n              \"locationName\": \"description\"\n            },\n            \"Image\": {\n              \"shape\": \"S9s\",\n              \"locationName\": \"image\"\n            },\n            \"Volume\": {\n              \"shape\": \"S9t\",\n              \"locationName\": \"volume\"\n            }\n          }\n        },\n        \"State\": {\n          \"locationName\": \"state\"\n        },\n        \"StatusMessage\": {\n          \"locationName\": \"statusMessage\"\n        },\n        \"Tags\": {\n          \"shape\": \"Sj\",\n          \"locationName\": \"tagSet\"\n        }\n      }\n    },\n    \"S9s\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Format\",\n        \"Size\",\n        \"ImportManifestUrl\"\n      ],\n      \"members\": {\n        \"Format\": {\n          \"locationName\": \"format\"\n        },\n        \"Size\": {\n          \"locationName\": \"size\",\n          \"type\": \"long\"\n        },\n        \"ImportManifestUrl\": {\n          \"locationName\": \"importManifestUrl\"\n        },\n        \"Checksum\": {\n          \"locationName\": \"checksum\"\n        }\n      }\n    },\n    \"S9t\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Id\"\n      ],\n      \"members\": {\n        \"Size\": {\n          \"locationName\": \"size\",\n          \"type\": \"long\"\n        },\n        \"Id\": {\n          \"locationName\": \"id\"\n        }\n      }\n    },\n    \"Sar\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\"\n      }\n    },\n    \"Sau\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\"\n      }\n    },\n    \"Sbd\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Resource\": {\n            \"locationName\": \"resource\"\n          },\n          \"UseLongIds\": {\n            \"locationName\": \"useLongIds\",\n            \"type\": \"boolean\"\n          },\n          \"Deadline\": {\n            \"locationName\": \"deadline\",\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"Sbk\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserId\": {\n            \"locationName\": \"userId\"\n          },\n          \"Group\": {\n            \"locationName\": \"group\"\n          }\n        }\n      }\n    },\n    \"Sbn\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProductCodeId\": {\n            \"locationName\": \"productCode\"\n          },\n          \"ProductCodeType\": {\n            \"locationName\": \"type\"\n          }\n        }\n      }\n    },\n    \"Sbq\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S4c\",\n        \"locationName\": \"item\"\n      }\n    },\n    \"Sbt\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Owner\"\n      }\n    },\n    \"Sc1\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Code\": {\n          \"locationName\": \"code\"\n        },\n        \"Message\": {\n          \"locationName\": \"message\"\n        }\n      }\n    },\n    \"Sc6\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"ImportTaskId\"\n      }\n    },\n    \"Sca\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DiskImageSize\": {\n            \"locationName\": \"diskImageSize\",\n            \"type\": \"double\"\n          },\n          \"Description\": {\n            \"locationName\": \"description\"\n          },\n          \"Format\": {\n            \"locationName\": \"format\"\n          },\n          \"Url\": {\n            \"locationName\": \"url\"\n          },\n          \"UserBucket\": {\n            \"shape\": \"Scc\",\n            \"locationName\": \"userBucket\"\n          },\n          \"DeviceName\": {\n            \"locationName\": \"deviceName\"\n          },\n          \"SnapshotId\": {\n            \"locationName\": \"snapshotId\"\n          },\n          \"Progress\": {\n            \"locationName\": \"progress\"\n          },\n          \"StatusMessage\": {\n            \"locationName\": \"statusMessage\"\n          },\n          \"Status\": {\n            \"locationName\": \"status\"\n          }\n        }\n      }\n    },\n    \"Scc\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"S3Bucket\": {\n          \"locationName\": \"s3Bucket\"\n        },\n        \"S3Key\": {\n          \"locationName\": \"s3Key\"\n        }\n      }\n    },\n    \"Sch\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DiskImageSize\": {\n          \"locationName\": \"diskImageSize\",\n          \"type\": \"double\"\n        },\n        \"Description\": {\n          \"locationName\": \"description\"\n        },\n        \"Format\": {\n          \"locationName\": \"format\"\n        },\n        \"Url\": {\n          \"locationName\": \"url\"\n        },\n        \"UserBucket\": {\n          \"shape\": \"Scc\",\n          \"locationName\": \"userBucket\"\n        },\n        \"SnapshotId\": {\n          \"locationName\": \"snapshotId\"\n        },\n        \"Progress\": {\n          \"locationName\": \"progress\"\n        },\n        \"StatusMessage\": {\n          \"locationName\": \"statusMessage\"\n        },\n        \"Status\": {\n          \"locationName\": \"status\"\n        }\n      }\n    },\n    \"Scl\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Value\": {\n          \"locationName\": \"value\",\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"Scm\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DeviceName\": {\n            \"locationName\": \"deviceName\"\n          },\n          \"Ebs\": {\n            \"locationName\": \"ebs\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"VolumeId\": {\n                \"locationName\": \"volumeId\"\n              },\n              \"Status\": {\n                \"locationName\": \"status\"\n              },\n              \"AttachTime\": {\n                \"locationName\": \"attachTime\",\n                \"type\": \"timestamp\"\n              },\n              \"DeleteOnTermination\": {\n                \"locationName\": \"deleteOnTermination\",\n                \"type\": \"boolean\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"Scw\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Code\": {\n          \"locationName\": \"code\",\n          \"type\": \"integer\"\n        },\n        \"Name\": {\n          \"locationName\": \"name\"\n        }\n      }\n    },\n    \"Scy\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Status\": {\n          \"locationName\": \"status\"\n        },\n        \"Details\": {\n          \"locationName\": \"details\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Name\": {\n                \"locationName\": \"name\"\n              },\n              \"Status\": {\n                \"locationName\": \"status\"\n              },\n              \"ImpairedSince\": {\n                \"locationName\": \"impairedSince\",\n                \"type\": \"timestamp\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"Sd7\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ReservationId\": {\n          \"locationName\": \"reservationId\"\n        },\n        \"OwnerId\": {\n          \"locationName\": \"ownerId\"\n        },\n        \"RequesterId\": {\n          \"locationName\": \"requesterId\"\n        },\n        \"Groups\": {\n          \"shape\": \"S5m\",\n          \"locationName\": \"groupSet\"\n        },\n        \"Instances\": {\n          \"locationName\": \"instancesSet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"InstanceId\": {\n                \"locationName\": \"instanceId\"\n              },\n              \"ImageId\": {\n                \"locationName\": \"imageId\"\n              },\n              \"State\": {\n                \"shape\": \"Scw\",\n                \"locationName\": \"instanceState\"\n              },\n              \"PrivateDnsName\": {\n                \"locationName\": \"privateDnsName\"\n              },\n              \"PublicDnsName\": {\n                \"locationName\": \"dnsName\"\n              },\n              \"StateTransitionReason\": {\n                \"locationName\": \"reason\"\n              },\n              \"KeyName\": {\n                \"locationName\": \"keyName\"\n              },\n              \"AmiLaunchIndex\": {\n                \"locationName\": \"amiLaunchIndex\",\n                \"type\": \"integer\"\n              },\n              \"ProductCodes\": {\n                \"shape\": \"Sbn\",\n                \"locationName\": \"productCodes\"\n              },\n              \"InstanceType\": {\n                \"locationName\": \"instanceType\"\n              },\n              \"LaunchTime\": {\n                \"locationName\": \"launchTime\",\n                \"type\": \"timestamp\"\n              },\n              \"Placement\": {\n                \"shape\": \"Sdb\",\n                \"locationName\": \"placement\"\n              },\n              \"KernelId\": {\n                \"locationName\": \"kernelId\"\n              },\n              \"RamdiskId\": {\n                \"locationName\": \"ramdiskId\"\n              },\n              \"Platform\": {\n                \"locationName\": \"platform\"\n              },\n              \"Monitoring\": {\n                \"shape\": \"Sdc\",\n                \"locationName\": \"monitoring\"\n              },\n              \"SubnetId\": {\n                \"locationName\": \"subnetId\"\n              },\n              \"VpcId\": {\n                \"locationName\": \"vpcId\"\n              },\n              \"PrivateIpAddress\": {\n                \"locationName\": \"privateIpAddress\"\n              },\n              \"PublicIpAddress\": {\n                \"locationName\": \"ipAddress\"\n              },\n              \"StateReason\": {\n                \"shape\": \"Sc1\",\n                \"locationName\": \"stateReason\"\n              },\n              \"Architecture\": {\n                \"locationName\": \"architecture\"\n              },\n              \"RootDeviceType\": {\n                \"locationName\": \"rootDeviceType\"\n              },\n              \"RootDeviceName\": {\n                \"locationName\": \"rootDeviceName\"\n              },\n              \"BlockDeviceMappings\": {\n                \"shape\": \"Scm\",\n                \"locationName\": \"blockDeviceMapping\"\n              },\n              \"VirtualizationType\": {\n                \"locationName\": \"virtualizationType\"\n              },\n              \"InstanceLifecycle\": {\n                \"locationName\": \"instanceLifecycle\"\n              },\n              \"SpotInstanceRequestId\": {\n                \"locationName\": \"spotInstanceRequestId\"\n              },\n              \"ClientToken\": {\n                \"locationName\": \"clientToken\"\n              },\n              \"Tags\": {\n                \"shape\": \"Sj\",\n                \"locationName\": \"tagSet\"\n              },\n              \"SecurityGroups\": {\n                \"shape\": \"S5m\",\n                \"locationName\": \"groupSet\"\n              },\n              \"SourceDestCheck\": {\n                \"locationName\": \"sourceDestCheck\",\n                \"type\": \"boolean\"\n              },\n              \"Hypervisor\": {\n                \"locationName\": \"hypervisor\"\n              },\n              \"NetworkInterfaces\": {\n                \"locationName\": \"networkInterfaceSet\",\n                \"type\": \"list\",\n                \"member\": {\n                  \"locationName\": \"item\",\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"NetworkInterfaceId\": {\n                      \"locationName\": \"networkInterfaceId\"\n                    },\n                    \"SubnetId\": {\n                      \"locationName\": \"subnetId\"\n                    },\n                    \"VpcId\": {\n                      \"locationName\": \"vpcId\"\n                    },\n                    \"Description\": {\n                      \"locationName\": \"description\"\n                    },\n                    \"OwnerId\": {\n                      \"locationName\": \"ownerId\"\n                    },\n                    \"Status\": {\n                      \"locationName\": \"status\"\n                    },\n                    \"MacAddress\": {\n                      \"locationName\": \"macAddress\"\n                    },\n                    \"PrivateIpAddress\": {\n                      \"locationName\": \"privateIpAddress\"\n                    },\n                    \"PrivateDnsName\": {\n                      \"locationName\": \"privateDnsName\"\n                    },\n                    \"SourceDestCheck\": {\n                      \"locationName\": \"sourceDestCheck\",\n                      \"type\": \"boolean\"\n                    },\n                    \"Groups\": {\n                      \"shape\": \"S5m\",\n                      \"locationName\": \"groupSet\"\n                    },\n                    \"Attachment\": {\n                      \"locationName\": \"attachment\",\n                      \"type\": \"structure\",\n                      \"members\": {\n                        \"AttachmentId\": {\n                          \"locationName\": \"attachmentId\"\n                        },\n                        \"DeviceIndex\": {\n                          \"locationName\": \"deviceIndex\",\n                          \"type\": \"integer\"\n                        },\n                        \"Status\": {\n                          \"locationName\": \"status\"\n                        },\n                        \"AttachTime\": {\n                          \"locationName\": \"attachTime\",\n                          \"type\": \"timestamp\"\n                        },\n                        \"DeleteOnTermination\": {\n                          \"locationName\": \"deleteOnTermination\",\n                          \"type\": \"boolean\"\n                        }\n                      }\n                    },\n                    \"Association\": {\n                      \"shape\": \"Sdi\",\n                      \"locationName\": \"association\"\n                    },\n                    \"PrivateIpAddresses\": {\n                      \"locationName\": \"privateIpAddressesSet\",\n                      \"type\": \"list\",\n                      \"member\": {\n                        \"locationName\": \"item\",\n                        \"type\": \"structure\",\n                        \"members\": {\n                          \"PrivateIpAddress\": {\n                            \"locationName\": \"privateIpAddress\"\n                          },\n                          \"PrivateDnsName\": {\n                            \"locationName\": \"privateDnsName\"\n                          },\n                          \"Primary\": {\n                            \"locationName\": \"primary\",\n                            \"type\": \"boolean\"\n                          },\n                          \"Association\": {\n                            \"shape\": \"Sdi\",\n                            \"locationName\": \"association\"\n                          }\n                        }\n                      }\n                    },\n                    \"Ipv6Addresses\": {\n                      \"shape\": \"S5h\",\n                      \"locationName\": \"ipv6AddressesSet\"\n                    }\n                  }\n                }\n              },\n              \"IamInstanceProfile\": {\n                \"shape\": \"S14\",\n                \"locationName\": \"iamInstanceProfile\"\n              },\n              \"EbsOptimized\": {\n                \"locationName\": \"ebsOptimized\",\n                \"type\": \"boolean\"\n              },\n              \"SriovNetSupport\": {\n                \"locationName\": \"sriovNetSupport\"\n              },\n              \"EnaSupport\": {\n                \"locationName\": \"enaSupport\",\n                \"type\": \"boolean\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"Sdb\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AvailabilityZone\": {\n          \"locationName\": \"availabilityZone\"\n        },\n        \"GroupName\": {\n          \"locationName\": \"groupName\"\n        },\n        \"Tenancy\": {\n          \"locationName\": \"tenancy\"\n        },\n        \"HostId\": {\n          \"locationName\": \"hostId\"\n        },\n        \"Affinity\": {\n          \"locationName\": \"affinity\"\n        }\n      }\n    },\n    \"Sdc\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"State\": {\n          \"locationName\": \"state\"\n        }\n      }\n    },\n    \"Sdi\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"PublicIp\": {\n          \"locationName\": \"publicIp\"\n        },\n        \"PublicDnsName\": {\n          \"locationName\": \"publicDnsName\"\n        },\n        \"IpOwnerId\": {\n          \"locationName\": \"ipOwnerId\"\n        }\n      }\n    },\n    \"Ser\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"ReservedInstancesId\"\n      }\n    },\n    \"Sf0\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Frequency\": {\n            \"locationName\": \"frequency\"\n          },\n          \"Amount\": {\n            \"locationName\": \"amount\",\n            \"type\": \"double\"\n          }\n        }\n      }\n    },\n    \"Sff\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AvailabilityZone\": {\n          \"locationName\": \"availabilityZone\"\n        },\n        \"Platform\": {\n          \"locationName\": \"platform\"\n        },\n        \"InstanceCount\": {\n          \"locationName\": \"instanceCount\",\n          \"type\": \"integer\"\n        },\n        \"InstanceType\": {\n          \"locationName\": \"instanceType\"\n        },\n        \"Scope\": {\n          \"locationName\": \"scope\"\n        }\n      }\n    },\n    \"Sfx\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Frequency\": {\n          \"locationName\": \"frequency\"\n        },\n        \"Interval\": {\n          \"locationName\": \"interval\",\n          \"type\": \"integer\"\n        },\n        \"OccurrenceDaySet\": {\n          \"locationName\": \"occurrenceDaySet\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"integer\"\n          }\n        },\n        \"OccurrenceRelativeToEnd\": {\n          \"locationName\": \"occurrenceRelativeToEnd\",\n          \"type\": \"boolean\"\n        },\n        \"OccurrenceUnit\": {\n          \"locationName\": \"occurrenceUnit\"\n        }\n      }\n    },\n    \"Sg4\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ScheduledInstanceId\": {\n          \"locationName\": \"scheduledInstanceId\"\n        },\n        \"InstanceType\": {\n          \"locationName\": \"instanceType\"\n        },\n        \"Platform\": {\n          \"locationName\": \"platform\"\n        },\n        \"NetworkPlatform\": {\n          \"locationName\": \"networkPlatform\"\n        },\n        \"AvailabilityZone\": {\n          \"locationName\": \"availabilityZone\"\n        },\n        \"SlotDurationInHours\": {\n          \"locationName\": \"slotDurationInHours\",\n          \"type\": \"integer\"\n        },\n        \"Recurrence\": {\n          \"shape\": \"Sfx\",\n          \"locationName\": \"recurrence\"\n        },\n        \"PreviousSlotEndTime\": {\n          \"locationName\": \"previousSlotEndTime\",\n          \"type\": \"timestamp\"\n        },\n        \"NextSlotStartTime\": {\n          \"locationName\": \"nextSlotStartTime\",\n          \"type\": \"timestamp\"\n        },\n        \"HourlyPrice\": {\n          \"locationName\": \"hourlyPrice\"\n        },\n        \"TotalScheduledInstanceHours\": {\n          \"locationName\": \"totalScheduledInstanceHours\",\n          \"type\": \"integer\"\n        },\n        \"InstanceCount\": {\n          \"locationName\": \"instanceCount\",\n          \"type\": \"integer\"\n        },\n        \"TermStartDate\": {\n          \"locationName\": \"termStartDate\",\n          \"type\": \"timestamp\"\n        },\n        \"TermEndDate\": {\n          \"locationName\": \"termEndDate\",\n          \"type\": \"timestamp\"\n        },\n        \"CreateDate\": {\n          \"locationName\": \"createDate\",\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"Sgb\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"GroupName\"\n      }\n    },\n    \"Sgi\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserId\": {\n            \"locationName\": \"userId\"\n          },\n          \"Group\": {\n            \"locationName\": \"group\"\n          }\n        }\n      }\n    },\n    \"Sh6\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"SpotPrice\",\n        \"TargetCapacity\",\n        \"IamFleetRole\",\n        \"LaunchSpecifications\"\n      ],\n      \"members\": {\n        \"ClientToken\": {\n          \"locationName\": \"clientToken\"\n        },\n        \"SpotPrice\": {\n          \"locationName\": \"spotPrice\"\n        },\n        \"TargetCapacity\": {\n          \"locationName\": \"targetCapacity\",\n          \"type\": \"integer\"\n        },\n        \"ValidFrom\": {\n          \"locationName\": \"validFrom\",\n          \"type\": \"timestamp\"\n        },\n        \"ValidUntil\": {\n          \"locationName\": \"validUntil\",\n          \"type\": \"timestamp\"\n        },\n        \"TerminateInstancesWithExpiration\": {\n          \"locationName\": \"terminateInstancesWithExpiration\",\n          \"type\": \"boolean\"\n        },\n        \"IamFleetRole\": {\n          \"locationName\": \"iamFleetRole\"\n        },\n        \"LaunchSpecifications\": {\n          \"locationName\": \"launchSpecifications\",\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"item\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"ImageId\": {\n                \"locationName\": \"imageId\"\n              },\n              \"KeyName\": {\n                \"locationName\": \"keyName\"\n              },\n              \"SecurityGroups\": {\n                \"shape\": \"S5m\",\n                \"locationName\": \"groupSet\"\n              },\n              \"UserData\": {\n                \"locationName\": \"userData\"\n              },\n              \"AddressingType\": {\n                \"locationName\": \"addressingType\"\n              },\n              \"InstanceType\": {\n                \"locationName\": \"instanceType\"\n              },\n              \"Placement\": {\n                \"shape\": \"Sh9\",\n                \"locationName\": \"placement\"\n              },\n              \"KernelId\": {\n                \"locationName\": \"kernelId\"\n              },\n              \"RamdiskId\": {\n                \"locationName\": \"ramdiskId\"\n              },\n              \"BlockDeviceMappings\": {\n                \"shape\": \"Sbq\",\n                \"locationName\": \"blockDeviceMapping\"\n              },\n              \"Monitoring\": {\n                \"locationName\": \"monitoring\",\n                \"type\": \"structure\",\n                \"members\": {\n                  \"Enabled\": {\n                    \"locationName\": \"enabled\",\n                    \"type\": \"boolean\"\n                  }\n                }\n              },\n              \"SubnetId\": {\n                \"locationName\": \"subnetId\"\n              },\n              \"NetworkInterfaces\": {\n                \"shape\": \"Shb\",\n                \"locationName\": \"networkInterfaceSet\"\n              },\n              \"IamInstanceProfile\": {\n                \"shape\": \"S11\",\n                \"locationName\": \"iamInstanceProfile\"\n              },\n              \"EbsOptimized\": {\n                \"locationName\": \"ebsOptimized\",\n                \"type\": \"boolean\"\n              },\n              \"WeightedCapacity\": {\n                \"locationName\": \"weightedCapacity\",\n                \"type\": \"double\"\n              },\n              \"SpotPrice\": {\n                \"locationName\": \"spotPrice\"\n              }\n            }\n          }\n        },\n        \"ExcessCapacityTerminationPolicy\": {\n          \"locationName\": \"excessCapacityTerminationPolicy\"\n        },\n        \"AllocationStrategy\": {\n          \"locationName\": \"allocationStrategy\"\n        },\n        \"FulfilledCapacity\": {\n          \"locationName\": \"fulfilledCapacity\",\n          \"type\": \"double\"\n        },\n        \"Type\": {\n          \"locationName\": \"type\"\n        },\n        \"ReplaceUnhealthyInstances\": {\n          \"locationName\": \"replaceUnhealthyInstances\",\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"Sh9\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AvailabilityZone\": {\n          \"locationName\": \"availabilityZone\"\n        },\n        \"GroupName\": {\n          \"locationName\": \"groupName\"\n        },\n        \"Tenancy\": {\n          \"locationName\": \"tenancy\"\n        }\n      }\n    },\n    \"Shb\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"NetworkInterfaceId\": {\n            \"locationName\": \"networkInterfaceId\"\n          },\n          \"DeviceIndex\": {\n            \"locationName\": \"deviceIndex\",\n            \"type\": \"integer\"\n          },\n          \"SubnetId\": {\n            \"locationName\": \"subnetId\"\n          },\n          \"Description\": {\n            \"locationName\": \"description\"\n          },\n          \"PrivateIpAddress\": {\n            \"locationName\": \"privateIpAddress\"\n          },\n          \"Groups\": {\n            \"shape\": \"S5e\",\n            \"locationName\": \"SecurityGroupId\"\n          },\n          \"DeleteOnTermination\": {\n            \"locationName\": \"deleteOnTermination\",\n            \"type\": \"boolean\"\n          },\n          \"PrivateIpAddresses\": {\n            \"shape\": \"S5f\",\n            \"locationName\": \"privateIpAddressesSet\",\n            \"queryName\": \"PrivateIpAddresses\"\n          },\n          \"SecondaryPrivateIpAddressCount\": {\n            \"locationName\": \"secondaryPrivateIpAddressCount\",\n            \"type\": \"integer\"\n          },\n          \"AssociatePublicIpAddress\": {\n            \"locationName\": \"associatePublicIpAddress\",\n            \"type\": \"boolean\"\n          },\n          \"Ipv6Addresses\": {\n            \"shape\": \"S5h\",\n            \"locationName\": \"ipv6AddressesSet\",\n            \"queryName\": \"Ipv6Addresses\"\n          },\n          \"Ipv6AddressCount\": {\n            \"locationName\": \"ipv6AddressCount\",\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"Shj\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"SpotInstanceRequestId\": {\n            \"locationName\": \"spotInstanceRequestId\"\n          },\n          \"SpotPrice\": {\n            \"locationName\": \"spotPrice\"\n          },\n          \"Type\": {\n            \"locationName\": \"type\"\n          },\n          \"State\": {\n            \"locationName\": \"state\"\n          },\n          \"Fault\": {\n            \"shape\": \"S6n\",\n            \"locationName\": \"fault\"\n          },\n          \"Status\": {\n            \"locationName\": \"status\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Code\": {\n                \"locationName\": \"code\"\n              },\n              \"UpdateTime\": {\n                \"locationName\": \"updateTime\",\n                \"type\": \"timestamp\"\n              },\n              \"Message\": {\n                \"locationName\": \"message\"\n              }\n            }\n          },\n          \"ValidFrom\": {\n            \"locationName\": \"validFrom\",\n            \"type\": \"timestamp\"\n          },\n          \"ValidUntil\": {\n            \"locationName\": \"validUntil\",\n            \"type\": \"timestamp\"\n          },\n          \"LaunchGroup\": {\n            \"locationName\": \"launchGroup\"\n          },\n          \"AvailabilityZoneGroup\": {\n            \"locationName\": \"availabilityZoneGroup\"\n          },\n          \"LaunchSpecification\": {\n            \"locationName\": \"launchSpecification\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"ImageId\": {\n                \"locationName\": \"imageId\"\n              },\n              \"KeyName\": {\n                \"locationName\": \"keyName\"\n              },\n              \"SecurityGroups\": {\n                \"shape\": \"S5m\",\n                \"locationName\": \"groupSet\"\n              },\n              \"UserData\": {\n                \"locationName\": \"userData\"\n              },\n              \"AddressingType\": {\n                \"locationName\": \"addressingType\"\n              },\n              \"InstanceType\": {\n                \"locationName\": \"instanceType\"\n              },\n              \"Placement\": {\n                \"shape\": \"Sh9\",\n                \"locationName\": \"placement\"\n              },\n              \"KernelId\": {\n                \"locationName\": \"kernelId\"\n              },\n              \"RamdiskId\": {\n                \"locationName\": \"ramdiskId\"\n              },\n              \"BlockDeviceMappings\": {\n                \"shape\": \"Sbq\",\n                \"locationName\": \"blockDeviceMapping\"\n              },\n              \"SubnetId\": {\n                \"locationName\": \"subnetId\"\n              },\n              \"NetworkInterfaces\": {\n                \"shape\": \"Shb\",\n                \"locationName\": \"networkInterfaceSet\"\n              },\n              \"IamInstanceProfile\": {\n                \"shape\": \"S11\",\n                \"locationName\": \"iamInstanceProfile\"\n              },\n              \"EbsOptimized\": {\n                \"locationName\": \"ebsOptimized\",\n                \"type\": \"boolean\"\n              },\n              \"Monitoring\": {\n                \"shape\": \"Shp\",\n                \"locationName\": \"monitoring\"\n              }\n            }\n          },\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"CreateTime\": {\n            \"locationName\": \"createTime\",\n            \"type\": \"timestamp\"\n          },\n          \"ProductDescription\": {\n            \"locationName\": \"productDescription\"\n          },\n          \"BlockDurationMinutes\": {\n            \"locationName\": \"blockDurationMinutes\",\n            \"type\": \"integer\"\n          },\n          \"ActualBlockHourlyPrice\": {\n            \"locationName\": \"actualBlockHourlyPrice\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sj\",\n            \"locationName\": \"tagSet\"\n          },\n          \"LaunchedAvailabilityZone\": {\n            \"locationName\": \"launchedAvailabilityZone\"\n          }\n        }\n      }\n    },\n    \"Shp\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Enabled\"\n      ],\n      \"members\": {\n        \"Enabled\": {\n          \"locationName\": \"enabled\",\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"Si0\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"FromPort\": {\n            \"locationName\": \"fromPort\",\n            \"type\": \"integer\"\n          },\n          \"IpProtocol\": {\n            \"locationName\": \"ipProtocol\"\n          },\n          \"IpRanges\": {\n            \"locationName\": \"ipRanges\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\"\n            }\n          },\n          \"PrefixListIds\": {\n            \"locationName\": \"prefixListIds\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"item\"\n            }\n          },\n          \"ToPort\": {\n            \"locationName\": \"toPort\",\n            \"type\": \"integer\"\n          },\n          \"UserIdGroupPairs\": {\n            \"locationName\": \"groups\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1z\",\n              \"locationName\": \"item\"\n            }\n          }\n        }\n      }\n    },\n    \"Sii\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"VolumeId\"\n      }\n    },\n    \"Sj1\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"VolumeId\": {\n          \"locationName\": \"volumeId\"\n        },\n        \"ModificationState\": {\n          \"locationName\": \"modificationState\"\n        },\n        \"StatusMessage\": {\n          \"locationName\": \"statusMessage\"\n        },\n        \"TargetSize\": {\n          \"locationName\": \"targetSize\",\n          \"type\": \"integer\"\n        },\n        \"TargetIops\": {\n          \"locationName\": \"targetIops\",\n          \"type\": \"integer\"\n        },\n        \"TargetVolumeType\": {\n          \"locationName\": \"targetVolumeType\"\n        },\n        \"OriginalSize\": {\n          \"locationName\": \"originalSize\",\n          \"type\": \"integer\"\n        },\n        \"OriginalIops\": {\n          \"locationName\": \"originalIops\",\n          \"type\": \"integer\"\n        },\n        \"OriginalVolumeType\": {\n          \"locationName\": \"originalVolumeType\"\n        },\n        \"Progress\": {\n          \"locationName\": \"progress\",\n          \"type\": \"long\"\n        },\n        \"StartTime\": {\n          \"locationName\": \"startTime\",\n          \"type\": \"timestamp\"\n        },\n        \"EndTime\": {\n          \"locationName\": \"endTime\",\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"Sj7\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"VpcId\"\n      }\n    },\n    \"Skt\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\"\n      }\n    },\n    \"Skv\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HostReservationId\": {\n            \"locationName\": \"hostReservationId\"\n          },\n          \"HostIdSet\": {\n            \"shape\": \"Sar\",\n            \"locationName\": \"hostIdSet\"\n          },\n          \"InstanceFamily\": {\n            \"locationName\": \"instanceFamily\"\n          },\n          \"PaymentOption\": {\n            \"locationName\": \"paymentOption\"\n          },\n          \"UpfrontPrice\": {\n            \"locationName\": \"upfrontPrice\"\n          },\n          \"HourlyPrice\": {\n            \"locationName\": \"hourlyPrice\"\n          },\n          \"CurrencyCode\": {\n            \"locationName\": \"currencyCode\"\n          },\n          \"Duration\": {\n            \"locationName\": \"duration\",\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"Sl3\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"RemainingTotalValue\": {\n          \"locationName\": \"remainingTotalValue\"\n        },\n        \"RemainingUpfrontValue\": {\n          \"locationName\": \"remainingUpfrontValue\"\n        },\n        \"HourlyPrice\": {\n          \"locationName\": \"hourlyPrice\"\n        }\n      }\n    },\n    \"Sla\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"S3Bucket\": {},\n        \"S3Key\": {}\n      }\n    },\n    \"Slb\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"UploadStart\": {\n          \"type\": \"timestamp\"\n        },\n        \"UploadEnd\": {\n          \"type\": \"timestamp\"\n        },\n        \"UploadSize\": {\n          \"type\": \"double\"\n        },\n        \"Comment\": {}\n      }\n    },\n    \"Slf\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SecurityGroup\"\n      }\n    },\n    \"Slk\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Format\",\n        \"Bytes\",\n        \"ImportManifestUrl\"\n      ],\n      \"members\": {\n        \"Format\": {\n          \"locationName\": \"format\"\n        },\n        \"Bytes\": {\n          \"locationName\": \"bytes\",\n          \"type\": \"long\"\n        },\n        \"ImportManifestUrl\": {\n          \"locationName\": \"importManifestUrl\"\n        }\n      }\n    },\n    \"Sll\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Size\"\n      ],\n      \"members\": {\n        \"Size\": {\n          \"locationName\": \"size\",\n          \"type\": \"long\"\n        }\n      }\n    },\n    \"Slw\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S48\",\n        \"locationName\": \"item\"\n      }\n    },\n    \"Sm1\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"UserId\"\n      }\n    },\n    \"Smv\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AllowEgressFromLocalClassicLinkToRemoteVpc\": {\n          \"type\": \"boolean\"\n        },\n        \"AllowEgressFromLocalVpcToRemoteClassicLink\": {\n          \"type\": \"boolean\"\n        },\n        \"AllowDnsResolutionFromRemoteVpc\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"Smx\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AllowEgressFromLocalClassicLinkToRemoteVpc\": {\n          \"locationName\": \"allowEgressFromLocalClassicLinkToRemoteVpc\",\n          \"type\": \"boolean\"\n        },\n        \"AllowEgressFromLocalVpcToRemoteClassicLink\": {\n          \"locationName\": \"allowEgressFromLocalVpcToRemoteClassicLink\",\n          \"type\": \"boolean\"\n        },\n        \"AllowDnsResolutionFromRemoteVpc\": {\n          \"locationName\": \"allowDnsResolutionFromRemoteVpc\",\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"Sn0\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"Monitoring\": {\n            \"shape\": \"Sdc\",\n            \"locationName\": \"monitoring\"\n          }\n        }\n      }\n    },\n    \"Soh\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SecurityGroupId\"\n      }\n    },\n    \"Soz\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"item\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceId\": {\n            \"locationName\": \"instanceId\"\n          },\n          \"CurrentState\": {\n            \"shape\": \"Scw\",\n            \"locationName\": \"currentState\"\n          },\n          \"PreviousState\": {\n            \"shape\": \"Scw\",\n            \"locationName\": \"previousState\"\n          }\n        }\n      }\n    }\n  }\n}\n},{}],43:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeAccountAttributes\": {\n      \"result_key\": \"AccountAttributes\"\n    },\n    \"DescribeAddresses\": {\n      \"result_key\": \"Addresses\"\n    },\n    \"DescribeAvailabilityZones\": {\n      \"result_key\": \"AvailabilityZones\"\n    },\n    \"DescribeBundleTasks\": {\n      \"result_key\": \"BundleTasks\"\n    },\n    \"DescribeConversionTasks\": {\n      \"result_key\": \"ConversionTasks\"\n    },\n    \"DescribeCustomerGateways\": {\n      \"result_key\": \"CustomerGateways\"\n    },\n    \"DescribeDhcpOptions\": {\n      \"result_key\": \"DhcpOptions\"\n    },\n    \"DescribeExportTasks\": {\n      \"result_key\": \"ExportTasks\"\n    },\n    \"DescribeImages\": {\n      \"result_key\": \"Images\"\n    },\n    \"DescribeInstanceStatus\": {\n      \"input_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"InstanceStatuses\"\n    },\n    \"DescribeInstances\": {\n      \"input_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"Reservations\"\n    },\n    \"DescribeInternetGateways\": {\n      \"result_key\": \"InternetGateways\"\n    },\n    \"DescribeKeyPairs\": {\n      \"result_key\": \"KeyPairs\"\n    },\n    \"DescribeNatGateways\": {\n      \"input_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"NatGateways\"\n    },\n    \"DescribeNetworkAcls\": {\n      \"result_key\": \"NetworkAcls\"\n    },\n    \"DescribeNetworkInterfaces\": {\n      \"result_key\": \"NetworkInterfaces\"\n    },\n    \"DescribePlacementGroups\": {\n      \"result_key\": \"PlacementGroups\"\n    },\n    \"DescribeRegions\": {\n      \"result_key\": \"Regions\"\n    },\n    \"DescribeReservedInstances\": {\n      \"result_key\": \"ReservedInstances\"\n    },\n    \"DescribeReservedInstancesListings\": {\n      \"result_key\": \"ReservedInstancesListings\"\n    },\n    \"DescribeReservedInstancesModifications\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"ReservedInstancesModifications\"\n    },\n    \"DescribeReservedInstancesOfferings\": {\n      \"input_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"ReservedInstancesOfferings\"\n    },\n    \"DescribeRouteTables\": {\n      \"result_key\": \"RouteTables\"\n    },\n    \"DescribeSecurityGroups\": {\n      \"result_key\": \"SecurityGroups\"\n    },\n    \"DescribeSnapshots\": {\n      \"input_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"Snapshots\"\n    },\n    \"DescribeSpotFleetRequests\": {\n      \"input_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"SpotFleetRequestConfigs\"\n    },\n    \"DescribeSpotInstanceRequests\": {\n      \"result_key\": \"SpotInstanceRequests\"\n    },\n    \"DescribeSpotPriceHistory\": {\n      \"input_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"SpotPriceHistory\"\n    },\n    \"DescribeSubnets\": {\n      \"result_key\": \"Subnets\"\n    },\n    \"DescribeTags\": {\n      \"input_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"Tags\"\n    },\n    \"DescribeVolumeStatus\": {\n      \"input_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"VolumeStatuses\"\n    },\n    \"DescribeVolumes\": {\n      \"input_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"Volumes\"\n    },\n    \"DescribeVpcPeeringConnections\": {\n      \"result_key\": \"VpcPeeringConnections\"\n    },\n    \"DescribeVpcs\": {\n      \"result_key\": \"Vpcs\"\n    },\n    \"DescribeVpnConnections\": {\n      \"result_key\": \"VpnConnections\"\n    },\n    \"DescribeVpnGateways\": {\n      \"result_key\": \"VpnGateways\"\n    }\n  }\n}\n},{}],44:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"InstanceExists\": {\n      \"delay\": 5,\n      \"maxAttempts\": 40,\n      \"operation\": \"DescribeInstances\",\n      \"acceptors\": [\n        {\n          \"matcher\": \"path\",\n          \"expected\": true,\n          \"argument\": \"length(Reservations[]) > `0`\",\n          \"state\": \"success\"\n        },\n        {\n          \"matcher\": \"error\",\n          \"expected\": \"InvalidInstanceID.NotFound\",\n          \"state\": \"retry\"\n        }\n      ]\n    },\n    \"BundleTaskComplete\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeBundleTasks\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"complete\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"BundleTasks[].State\"\n        },\n        {\n          \"expected\": \"failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"BundleTasks[].State\"\n        }\n      ]\n    },\n    \"ConversionTaskCancelled\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeConversionTasks\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"cancelled\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"ConversionTasks[].State\"\n        }\n      ]\n    },\n    \"ConversionTaskCompleted\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeConversionTasks\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"completed\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"ConversionTasks[].State\"\n        },\n        {\n          \"expected\": \"cancelled\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"ConversionTasks[].State\"\n        },\n        {\n          \"expected\": \"cancelling\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"ConversionTasks[].State\"\n        }\n      ]\n    },\n    \"ConversionTaskDeleted\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeConversionTasks\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"deleted\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"ConversionTasks[].State\"\n        }\n      ]\n    },\n    \"CustomerGatewayAvailable\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeCustomerGateways\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"available\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"CustomerGateways[].State\"\n        },\n        {\n          \"expected\": \"deleted\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"CustomerGateways[].State\"\n        },\n        {\n          \"expected\": \"deleting\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"CustomerGateways[].State\"\n        }\n      ]\n    },\n    \"ExportTaskCancelled\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeExportTasks\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"cancelled\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"ExportTasks[].State\"\n        }\n      ]\n    },\n    \"ExportTaskCompleted\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeExportTasks\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"completed\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"ExportTasks[].State\"\n        }\n      ]\n    },\n    \"ImageExists\": {\n      \"operation\": \"DescribeImages\",\n      \"maxAttempts\": 40,\n      \"delay\": 15,\n      \"acceptors\": [\n        {\n          \"matcher\": \"path\",\n          \"expected\": true,\n          \"argument\": \"length(Images[]) > `0`\",\n          \"state\": \"success\"\n        },\n        {\n          \"matcher\": \"error\",\n          \"expected\": \"InvalidAMIID.NotFound\",\n          \"state\": \"retry\"\n        }\n      ]\n    },\n    \"ImageAvailable\": {\n      \"operation\": \"DescribeImages\",\n      \"maxAttempts\": 40,\n      \"delay\": 15,\n      \"acceptors\": [\n        {\n          \"state\": \"success\",\n          \"matcher\": \"pathAll\",\n          \"argument\": \"Images[].State\",\n          \"expected\": \"available\"\n        },\n        {\n          \"state\": \"failure\",\n          \"matcher\": \"pathAny\",\n          \"argument\": \"Images[].State\",\n          \"expected\": \"failed\"\n        }\n      ]\n    },\n    \"InstanceRunning\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeInstances\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"running\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Reservations[].Instances[].State.Name\"\n        },\n        {\n          \"expected\": \"shutting-down\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Reservations[].Instances[].State.Name\"\n        },\n        {\n          \"expected\": \"terminated\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Reservations[].Instances[].State.Name\"\n        },\n        {\n          \"expected\": \"stopping\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Reservations[].Instances[].State.Name\"\n        },\n        {\n          \"matcher\": \"error\",\n          \"expected\": \"InvalidInstanceID.NotFound\",\n          \"state\": \"retry\"\n        }\n      ]\n    },\n    \"InstanceStatusOk\": {\n      \"operation\": \"DescribeInstanceStatus\",\n      \"maxAttempts\": 40,\n      \"delay\": 15,\n      \"acceptors\": [\n        {\n          \"state\": \"success\",\n          \"matcher\": \"pathAll\",\n          \"argument\": \"InstanceStatuses[].InstanceStatus.Status\",\n          \"expected\": \"ok\"\n        },\n        {\n          \"matcher\": \"error\",\n          \"expected\": \"InvalidInstanceID.NotFound\",\n          \"state\": \"retry\"\n        }\n      ]\n    },\n    \"InstanceStopped\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeInstances\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"stopped\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Reservations[].Instances[].State.Name\"\n        },\n        {\n          \"expected\": \"pending\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Reservations[].Instances[].State.Name\"\n        },\n        {\n          \"expected\": \"terminated\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Reservations[].Instances[].State.Name\"\n        }\n      ]\n    },\n    \"InstanceTerminated\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeInstances\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"terminated\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Reservations[].Instances[].State.Name\"\n        },\n        {\n          \"expected\": \"pending\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Reservations[].Instances[].State.Name\"\n        },\n        {\n          \"expected\": \"stopping\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Reservations[].Instances[].State.Name\"\n        }\n      ]\n    },\n    \"KeyPairExists\": {\n      \"operation\": \"DescribeKeyPairs\",\n      \"delay\": 5,\n      \"maxAttempts\": 6,\n      \"acceptors\": [\n        {\n          \"expected\": true,\n          \"matcher\": \"path\",\n          \"state\": \"success\",\n          \"argument\": \"length(KeyPairs[].KeyName) > `0`\"\n        },\n        {\n          \"expected\": \"InvalidKeyPair.NotFound\",\n          \"matcher\": \"error\",\n          \"state\": \"retry\"\n        }\n      ]\n    },\n    \"NatGatewayAvailable\": {\n      \"operation\": \"DescribeNatGateways\",\n      \"delay\": 15,\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"state\": \"success\",\n          \"matcher\": \"pathAll\",\n          \"argument\": \"NatGateways[].State\",\n          \"expected\": \"available\"\n        },\n        {\n          \"state\": \"failure\",\n          \"matcher\": \"pathAny\",\n          \"argument\": \"NatGateways[].State\",\n          \"expected\": \"failed\"\n        },\n        {\n          \"state\": \"failure\",\n          \"matcher\": \"pathAny\",\n          \"argument\": \"NatGateways[].State\",\n          \"expected\": \"deleting\"\n        },\n        {\n          \"state\": \"failure\",\n          \"matcher\": \"pathAny\",\n          \"argument\": \"NatGateways[].State\",\n          \"expected\": \"deleted\"\n        },\n        {\n          \"state\": \"retry\",\n          \"matcher\": \"error\",\n          \"expected\": \"NatGatewayNotFound\"\n        }\n      ]\n    },\n    \"NetworkInterfaceAvailable\": {\n      \"operation\": \"DescribeNetworkInterfaces\",\n      \"delay\": 20,\n      \"maxAttempts\": 10,\n      \"acceptors\": [\n        {\n          \"expected\": \"available\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"NetworkInterfaces[].Status\"\n        },\n        {\n          \"expected\": \"InvalidNetworkInterfaceID.NotFound\",\n          \"matcher\": \"error\",\n          \"state\": \"failure\"\n        }\n      ]\n    },\n    \"PasswordDataAvailable\": {\n      \"operation\": \"GetPasswordData\",\n      \"maxAttempts\": 40,\n      \"delay\": 15,\n      \"acceptors\": [\n        {\n          \"state\": \"success\",\n          \"matcher\": \"path\",\n          \"argument\": \"length(PasswordData) > `0`\",\n          \"expected\": true\n        }\n      ]\n    },\n    \"SnapshotCompleted\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeSnapshots\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"completed\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Snapshots[].State\"\n        }\n      ]\n    },\n    \"SpotInstanceRequestFulfilled\": {\n      \"operation\": \"DescribeSpotInstanceRequests\",\n      \"maxAttempts\": 40,\n      \"delay\": 15,\n      \"acceptors\": [\n        {\n          \"state\": \"success\",\n          \"matcher\": \"pathAll\",\n          \"argument\": \"SpotInstanceRequests[].Status.Code\",\n          \"expected\": \"fulfilled\"\n        },\n        {\n          \"state\": \"failure\",\n          \"matcher\": \"pathAny\",\n          \"argument\": \"SpotInstanceRequests[].Status.Code\",\n          \"expected\": \"schedule-expired\"\n        },\n        {\n          \"state\": \"failure\",\n          \"matcher\": \"pathAny\",\n          \"argument\": \"SpotInstanceRequests[].Status.Code\",\n          \"expected\": \"canceled-before-fulfillment\"\n        },\n        {\n          \"state\": \"failure\",\n          \"matcher\": \"pathAny\",\n          \"argument\": \"SpotInstanceRequests[].Status.Code\",\n          \"expected\": \"bad-parameters\"\n        },\n        {\n          \"state\": \"failure\",\n          \"matcher\": \"pathAny\",\n          \"argument\": \"SpotInstanceRequests[].Status.Code\",\n          \"expected\": \"system-error\"\n        }\n      ]\n    },\n    \"SubnetAvailable\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeSubnets\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"available\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Subnets[].State\"\n        }\n      ]\n    },\n    \"SystemStatusOk\": {\n      \"operation\": \"DescribeInstanceStatus\",\n      \"maxAttempts\": 40,\n      \"delay\": 15,\n      \"acceptors\": [\n        {\n          \"state\": \"success\",\n          \"matcher\": \"pathAll\",\n          \"argument\": \"InstanceStatuses[].SystemStatus.Status\",\n          \"expected\": \"ok\"\n        }\n      ]\n    },\n    \"VolumeAvailable\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeVolumes\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"available\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Volumes[].State\"\n        },\n        {\n          \"expected\": \"deleted\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Volumes[].State\"\n        }\n      ]\n    },\n    \"VolumeDeleted\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeVolumes\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"deleted\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Volumes[].State\"\n        },\n        {\n          \"matcher\": \"error\",\n          \"expected\": \"InvalidVolume.NotFound\",\n          \"state\": \"success\"\n        }\n      ]\n    },\n    \"VolumeInUse\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeVolumes\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"in-use\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Volumes[].State\"\n        },\n        {\n          \"expected\": \"deleted\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Volumes[].State\"\n        }\n      ]\n    },\n    \"VpcAvailable\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeVpcs\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"available\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Vpcs[].State\"\n        }\n      ]\n    },\n    \"VpcExists\": {\n      \"operation\": \"DescribeVpcs\",\n      \"delay\": 1,\n      \"maxAttempts\": 5,\n      \"acceptors\": [\n        {\n          \"matcher\": \"status\",\n          \"expected\": 200,\n          \"state\": \"success\"\n        },\n        {\n          \"matcher\": \"error\",\n          \"expected\": \"InvalidVpcID.NotFound\",\n          \"state\": \"retry\"\n        }\n      ]\n    },\n    \"VpnConnectionAvailable\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeVpnConnections\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"available\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"VpnConnections[].State\"\n        },\n        {\n          \"expected\": \"deleting\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"VpnConnections[].State\"\n        },\n        {\n          \"expected\": \"deleted\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"VpnConnections[].State\"\n        }\n      ]\n    },\n    \"VpnConnectionDeleted\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeVpnConnections\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"deleted\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"VpnConnections[].State\"\n        },\n        {\n          \"expected\": \"pending\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"VpnConnections[].State\"\n        }\n      ]\n    },\n    \"VpcPeeringConnectionExists\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeVpcPeeringConnections\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"matcher\": \"status\",\n          \"expected\": 200,\n          \"state\": \"success\"\n        },\n        {\n          \"matcher\": \"error\",\n          \"expected\": \"InvalidVpcPeeringConnectionID.NotFound\",\n          \"state\": \"retry\"\n        }\n      ]\n    },\n    \"VpcPeeringConnectionDeleted\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeVpcPeeringConnections\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"deleted\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"VpcPeeringConnections[].Status.Code\"\n        },\n        {\n          \"matcher\": \"error\",\n          \"expected\": \"InvalidVpcPeeringConnectionID.NotFound\",\n          \"state\": \"success\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],45:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"ecr-2015-09-21\",\n    \"apiVersion\": \"2015-09-21\",\n    \"endpointPrefix\": \"ecr\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"Amazon ECR\",\n    \"serviceFullName\": \"Amazon EC2 Container Registry\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"AmazonEC2ContainerRegistry_V20150921\"\n  },\n  \"operations\": {\n    \"BatchCheckLayerAvailability\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"layerDigests\"\n        ],\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"layerDigests\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"layers\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"layerDigest\": {},\n                \"layerAvailability\": {},\n                \"layerSize\": {\n                  \"type\": \"long\"\n                },\n                \"mediaType\": {}\n              }\n            }\n          },\n          \"failures\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"layerDigest\": {},\n                \"failureCode\": {},\n                \"failureReason\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"BatchDeleteImage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"imageIds\"\n        ],\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"imageIds\": {\n            \"shape\": \"Si\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"imageIds\": {\n            \"shape\": \"Si\"\n          },\n          \"failures\": {\n            \"shape\": \"Sn\"\n          }\n        }\n      }\n    },\n    \"BatchGetImage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"imageIds\"\n        ],\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"imageIds\": {\n            \"shape\": \"Si\"\n          },\n          \"acceptedMediaTypes\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"images\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sv\"\n            }\n          },\n          \"failures\": {\n            \"shape\": \"Sn\"\n          }\n        }\n      }\n    },\n    \"CompleteLayerUpload\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"uploadId\",\n          \"layerDigests\"\n        ],\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"uploadId\": {},\n          \"layerDigests\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"uploadId\": {},\n          \"layerDigest\": {}\n        }\n      }\n    },\n    \"CreateRepository\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\"\n        ],\n        \"members\": {\n          \"repositoryName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"repository\": {\n            \"shape\": \"S13\"\n          }\n        }\n      }\n    },\n    \"DeleteRepository\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\"\n        ],\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"force\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"repository\": {\n            \"shape\": \"S13\"\n          }\n        }\n      }\n    },\n    \"DeleteRepositoryPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\"\n        ],\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"policyText\": {}\n        }\n      }\n    },\n    \"DescribeImages\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\"\n        ],\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"imageIds\": {\n            \"shape\": \"Si\"\n          },\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          },\n          \"filter\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"tagStatus\": {}\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"imageDetails\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"registryId\": {},\n                \"repositoryName\": {},\n                \"imageDigest\": {},\n                \"imageTags\": {\n                  \"type\": \"list\",\n                  \"member\": {}\n                },\n                \"imageSizeInBytes\": {\n                  \"type\": \"long\"\n                },\n                \"imagePushedAt\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"DescribeRepositories\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"repositories\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S13\"\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"GetAuthorizationToken\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"registryIds\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"authorizationData\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"authorizationToken\": {},\n                \"expiresAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"proxyEndpoint\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"GetDownloadUrlForLayer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"layerDigest\"\n        ],\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"layerDigest\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"downloadUrl\": {},\n          \"layerDigest\": {}\n        }\n      }\n    },\n    \"GetRepositoryPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\"\n        ],\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"policyText\": {}\n        }\n      }\n    },\n    \"InitiateLayerUpload\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\"\n        ],\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"uploadId\": {},\n          \"partSize\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    },\n    \"ListImages\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\"\n        ],\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          },\n          \"filter\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"tagStatus\": {}\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"imageIds\": {\n            \"shape\": \"Si\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"PutImage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"imageManifest\"\n        ],\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"imageManifest\": {},\n          \"imageTag\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"image\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    },\n    \"SetRepositoryPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"policyText\"\n        ],\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"policyText\": {},\n          \"force\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"policyText\": {}\n        }\n      }\n    },\n    \"UploadLayerPart\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"repositoryName\",\n          \"uploadId\",\n          \"partFirstByte\",\n          \"partLastByte\",\n          \"layerPartBlob\"\n        ],\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"uploadId\": {},\n          \"partFirstByte\": {\n            \"type\": \"long\"\n          },\n          \"partLastByte\": {\n            \"type\": \"long\"\n          },\n          \"layerPartBlob\": {\n            \"type\": \"blob\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"registryId\": {},\n          \"repositoryName\": {},\n          \"uploadId\": {},\n          \"lastByteReceived\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"Si\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"Sj\"\n      }\n    },\n    \"Sj\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"imageDigest\": {},\n        \"imageTag\": {}\n      }\n    },\n    \"Sn\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"imageId\": {\n            \"shape\": \"Sj\"\n          },\n          \"failureCode\": {},\n          \"failureReason\": {}\n        }\n      }\n    },\n    \"Sv\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"registryId\": {},\n        \"repositoryName\": {},\n        \"imageId\": {\n          \"shape\": \"Sj\"\n        },\n        \"imageManifest\": {}\n      }\n    },\n    \"S13\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"repositoryArn\": {},\n        \"registryId\": {},\n        \"repositoryName\": {},\n        \"repositoryUri\": {},\n        \"createdAt\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    }\n  }\n}\n},{}],46:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"ListImages\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"limit_key\": \"maxResults\",\n      \"result_key\": \"imageIds\"\n    },\n    \"DescribeImages\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"limit_key\": \"maxResults\",\n      \"result_key\": \"imageDetails\"\n    },\n    \"DescribeRepositories\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"limit_key\": \"maxResults\",\n      \"result_key\": \"repositories\"\n    }\n  }\n}\n\n},{}],47:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2014-11-13\",\n    \"endpointPrefix\": \"ecs\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"Amazon ECS\",\n    \"serviceFullName\": \"Amazon EC2 Container Service\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"AmazonEC2ContainerServiceV20141113\",\n    \"uid\": \"ecs-2014-11-13\"\n  },\n  \"operations\": {\n    \"CreateCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"clusterName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"cluster\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"CreateService\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"serviceName\",\n          \"taskDefinition\",\n          \"desiredCount\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"serviceName\": {},\n          \"taskDefinition\": {},\n          \"loadBalancers\": {\n            \"shape\": \"S7\"\n          },\n          \"desiredCount\": {\n            \"type\": \"integer\"\n          },\n          \"clientToken\": {},\n          \"role\": {},\n          \"deploymentConfiguration\": {\n            \"shape\": \"Sa\"\n          },\n          \"placementConstraints\": {\n            \"shape\": \"Sb\"\n          },\n          \"placementStrategy\": {\n            \"shape\": \"Se\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"service\": {\n            \"shape\": \"Si\"\n          }\n        }\n      }\n    },\n    \"DeleteAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"attributes\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"attributes\": {\n            \"shape\": \"Sp\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"attributes\": {\n            \"shape\": \"Sp\"\n          }\n        }\n      }\n    },\n    \"DeleteCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"cluster\"\n        ],\n        \"members\": {\n          \"cluster\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"cluster\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"DeleteService\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"service\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"service\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"service\": {\n            \"shape\": \"Si\"\n          }\n        }\n      }\n    },\n    \"DeregisterContainerInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"containerInstance\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"containerInstance\": {},\n          \"force\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"containerInstance\": {\n            \"shape\": \"S10\"\n          }\n        }\n      }\n    },\n    \"DeregisterTaskDefinition\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"taskDefinition\"\n        ],\n        \"members\": {\n          \"taskDefinition\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"taskDefinition\": {\n            \"shape\": \"S1b\"\n          }\n        }\n      }\n    },\n    \"DescribeClusters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"clusters\": {\n            \"shape\": \"S16\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"clusters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4\"\n            }\n          },\n          \"failures\": {\n            \"shape\": \"S28\"\n          }\n        }\n      }\n    },\n    \"DescribeContainerInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"containerInstances\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"containerInstances\": {\n            \"shape\": \"S16\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"containerInstances\": {\n            \"shape\": \"S2c\"\n          },\n          \"failures\": {\n            \"shape\": \"S28\"\n          }\n        }\n      }\n    },\n    \"DescribeServices\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"services\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"services\": {\n            \"shape\": \"S16\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"services\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Si\"\n            }\n          },\n          \"failures\": {\n            \"shape\": \"S28\"\n          }\n        }\n      }\n    },\n    \"DescribeTaskDefinition\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"taskDefinition\"\n        ],\n        \"members\": {\n          \"taskDefinition\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"taskDefinition\": {\n            \"shape\": \"S1b\"\n          }\n        }\n      }\n    },\n    \"DescribeTasks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"tasks\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"tasks\": {\n            \"shape\": \"S16\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"tasks\": {\n            \"shape\": \"S2k\"\n          },\n          \"failures\": {\n            \"shape\": \"S28\"\n          }\n        }\n      }\n    },\n    \"DiscoverPollEndpoint\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"containerInstance\": {},\n          \"cluster\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"endpoint\": {},\n          \"telemetryEndpoint\": {}\n        }\n      }\n    },\n    \"ListAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"targetType\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"targetType\": {},\n          \"attributeName\": {},\n          \"attributeValue\": {},\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"attributes\": {\n            \"shape\": \"Sp\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListClusters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"clusterArns\": {\n            \"shape\": \"S16\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListContainerInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"cluster\": {},\n          \"filter\": {},\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          },\n          \"status\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"containerInstanceArns\": {\n            \"shape\": \"S16\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListServices\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"cluster\": {},\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"serviceArns\": {\n            \"shape\": \"S16\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListTaskDefinitionFamilies\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"familyPrefix\": {},\n          \"status\": {},\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"families\": {\n            \"shape\": \"S16\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListTaskDefinitions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"familyPrefix\": {},\n          \"status\": {},\n          \"sort\": {},\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"taskDefinitionArns\": {\n            \"shape\": \"S16\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListTasks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"cluster\": {},\n          \"containerInstance\": {},\n          \"family\": {},\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          },\n          \"startedBy\": {},\n          \"serviceName\": {},\n          \"desiredStatus\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"taskArns\": {\n            \"shape\": \"S16\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"PutAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"attributes\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"attributes\": {\n            \"shape\": \"Sp\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"attributes\": {\n            \"shape\": \"Sp\"\n          }\n        }\n      }\n    },\n    \"RegisterContainerInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"cluster\": {},\n          \"instanceIdentityDocument\": {},\n          \"instanceIdentityDocumentSignature\": {},\n          \"totalResources\": {\n            \"shape\": \"S13\"\n          },\n          \"versionInfo\": {\n            \"shape\": \"S12\"\n          },\n          \"containerInstanceArn\": {},\n          \"attributes\": {\n            \"shape\": \"Sp\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"containerInstance\": {\n            \"shape\": \"S10\"\n          }\n        }\n      }\n    },\n    \"RegisterTaskDefinition\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"family\",\n          \"containerDefinitions\"\n        ],\n        \"members\": {\n          \"family\": {},\n          \"taskRoleArn\": {},\n          \"networkMode\": {},\n          \"containerDefinitions\": {\n            \"shape\": \"S1c\"\n          },\n          \"volumes\": {\n            \"shape\": \"S1x\"\n          },\n          \"placementConstraints\": {\n            \"shape\": \"S22\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"taskDefinition\": {\n            \"shape\": \"S1b\"\n          }\n        }\n      }\n    },\n    \"RunTask\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"taskDefinition\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"taskDefinition\": {},\n          \"overrides\": {\n            \"shape\": \"S2m\"\n          },\n          \"count\": {\n            \"type\": \"integer\"\n          },\n          \"startedBy\": {},\n          \"group\": {},\n          \"placementConstraints\": {\n            \"shape\": \"Sb\"\n          },\n          \"placementStrategy\": {\n            \"shape\": \"Se\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"tasks\": {\n            \"shape\": \"S2k\"\n          },\n          \"failures\": {\n            \"shape\": \"S28\"\n          }\n        }\n      }\n    },\n    \"StartTask\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"taskDefinition\",\n          \"containerInstances\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"taskDefinition\": {},\n          \"overrides\": {\n            \"shape\": \"S2m\"\n          },\n          \"containerInstances\": {\n            \"shape\": \"S16\"\n          },\n          \"startedBy\": {},\n          \"group\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"tasks\": {\n            \"shape\": \"S2k\"\n          },\n          \"failures\": {\n            \"shape\": \"S28\"\n          }\n        }\n      }\n    },\n    \"StopTask\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"task\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"task\": {},\n          \"reason\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"task\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      }\n    },\n    \"SubmitContainerStateChange\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"cluster\": {},\n          \"task\": {},\n          \"containerName\": {},\n          \"status\": {},\n          \"exitCode\": {\n            \"type\": \"integer\"\n          },\n          \"reason\": {},\n          \"networkBindings\": {\n            \"shape\": \"S2r\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"acknowledgment\": {}\n        }\n      }\n    },\n    \"SubmitTaskStateChange\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"cluster\": {},\n          \"task\": {},\n          \"status\": {},\n          \"reason\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"acknowledgment\": {}\n        }\n      }\n    },\n    \"UpdateContainerAgent\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"containerInstance\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"containerInstance\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"containerInstance\": {\n            \"shape\": \"S10\"\n          }\n        }\n      }\n    },\n    \"UpdateContainerInstancesState\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"containerInstances\",\n          \"status\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"containerInstances\": {\n            \"shape\": \"S16\"\n          },\n          \"status\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"containerInstances\": {\n            \"shape\": \"S2c\"\n          },\n          \"failures\": {\n            \"shape\": \"S28\"\n          }\n        }\n      }\n    },\n    \"UpdateService\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"service\"\n        ],\n        \"members\": {\n          \"cluster\": {},\n          \"service\": {},\n          \"desiredCount\": {\n            \"type\": \"integer\"\n          },\n          \"taskDefinition\": {},\n          \"deploymentConfiguration\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"service\": {\n            \"shape\": \"Si\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S4\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"clusterArn\": {},\n        \"clusterName\": {},\n        \"status\": {},\n        \"registeredContainerInstancesCount\": {\n          \"type\": \"integer\"\n        },\n        \"runningTasksCount\": {\n          \"type\": \"integer\"\n        },\n        \"pendingTasksCount\": {\n          \"type\": \"integer\"\n        },\n        \"activeServicesCount\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"S7\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"targetGroupArn\": {},\n          \"loadBalancerName\": {},\n          \"containerName\": {},\n          \"containerPort\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"Sa\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"maximumPercent\": {\n          \"type\": \"integer\"\n        },\n        \"minimumHealthyPercent\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"Sb\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"type\": {},\n          \"expression\": {}\n        }\n      }\n    },\n    \"Se\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"type\": {},\n          \"field\": {}\n        }\n      }\n    },\n    \"Si\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"serviceArn\": {},\n        \"serviceName\": {},\n        \"clusterArn\": {},\n        \"loadBalancers\": {\n          \"shape\": \"S7\"\n        },\n        \"status\": {},\n        \"desiredCount\": {\n          \"type\": \"integer\"\n        },\n        \"runningCount\": {\n          \"type\": \"integer\"\n        },\n        \"pendingCount\": {\n          \"type\": \"integer\"\n        },\n        \"taskDefinition\": {},\n        \"deploymentConfiguration\": {\n          \"shape\": \"Sa\"\n        },\n        \"deployments\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"id\": {},\n              \"status\": {},\n              \"taskDefinition\": {},\n              \"desiredCount\": {\n                \"type\": \"integer\"\n              },\n              \"pendingCount\": {\n                \"type\": \"integer\"\n              },\n              \"runningCount\": {\n                \"type\": \"integer\"\n              },\n              \"createdAt\": {\n                \"type\": \"timestamp\"\n              },\n              \"updatedAt\": {\n                \"type\": \"timestamp\"\n              }\n            }\n          }\n        },\n        \"roleArn\": {},\n        \"events\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"id\": {},\n              \"createdAt\": {\n                \"type\": \"timestamp\"\n              },\n              \"message\": {}\n            }\n          }\n        },\n        \"createdAt\": {\n          \"type\": \"timestamp\"\n        },\n        \"placementConstraints\": {\n          \"shape\": \"Sb\"\n        },\n        \"placementStrategy\": {\n          \"shape\": \"Se\"\n        }\n      }\n    },\n    \"Sp\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"Sq\"\n      }\n    },\n    \"Sq\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"name\"\n      ],\n      \"members\": {\n        \"name\": {},\n        \"value\": {},\n        \"targetType\": {},\n        \"targetId\": {}\n      }\n    },\n    \"S10\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"containerInstanceArn\": {},\n        \"ec2InstanceId\": {},\n        \"version\": {\n          \"type\": \"long\"\n        },\n        \"versionInfo\": {\n          \"shape\": \"S12\"\n        },\n        \"remainingResources\": {\n          \"shape\": \"S13\"\n        },\n        \"registeredResources\": {\n          \"shape\": \"S13\"\n        },\n        \"status\": {},\n        \"agentConnected\": {\n          \"type\": \"boolean\"\n        },\n        \"runningTasksCount\": {\n          \"type\": \"integer\"\n        },\n        \"pendingTasksCount\": {\n          \"type\": \"integer\"\n        },\n        \"agentUpdateStatus\": {},\n        \"attributes\": {\n          \"shape\": \"Sp\"\n        }\n      }\n    },\n    \"S12\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"agentVersion\": {},\n        \"agentHash\": {},\n        \"dockerVersion\": {}\n      }\n    },\n    \"S13\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"name\": {},\n          \"type\": {},\n          \"doubleValue\": {\n            \"type\": \"double\"\n          },\n          \"longValue\": {\n            \"type\": \"long\"\n          },\n          \"integerValue\": {\n            \"type\": \"integer\"\n          },\n          \"stringSetValue\": {\n            \"shape\": \"S16\"\n          }\n        }\n      }\n    },\n    \"S16\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S1b\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"taskDefinitionArn\": {},\n        \"containerDefinitions\": {\n          \"shape\": \"S1c\"\n        },\n        \"family\": {},\n        \"taskRoleArn\": {},\n        \"networkMode\": {},\n        \"revision\": {\n          \"type\": \"integer\"\n        },\n        \"volumes\": {\n          \"shape\": \"S1x\"\n        },\n        \"status\": {},\n        \"requiresAttributes\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"Sq\"\n          }\n        },\n        \"placementConstraints\": {\n          \"shape\": \"S22\"\n        }\n      }\n    },\n    \"S1c\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"name\": {},\n          \"image\": {},\n          \"cpu\": {\n            \"type\": \"integer\"\n          },\n          \"memory\": {\n            \"type\": \"integer\"\n          },\n          \"memoryReservation\": {\n            \"type\": \"integer\"\n          },\n          \"links\": {\n            \"shape\": \"S16\"\n          },\n          \"portMappings\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"containerPort\": {\n                  \"type\": \"integer\"\n                },\n                \"hostPort\": {\n                  \"type\": \"integer\"\n                },\n                \"protocol\": {}\n              }\n            }\n          },\n          \"essential\": {\n            \"type\": \"boolean\"\n          },\n          \"entryPoint\": {\n            \"shape\": \"S16\"\n          },\n          \"command\": {\n            \"shape\": \"S16\"\n          },\n          \"environment\": {\n            \"shape\": \"S1h\"\n          },\n          \"mountPoints\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"sourceVolume\": {},\n                \"containerPath\": {},\n                \"readOnly\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          },\n          \"volumesFrom\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"sourceContainer\": {},\n                \"readOnly\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          },\n          \"hostname\": {},\n          \"user\": {},\n          \"workingDirectory\": {},\n          \"disableNetworking\": {\n            \"type\": \"boolean\"\n          },\n          \"privileged\": {\n            \"type\": \"boolean\"\n          },\n          \"readonlyRootFilesystem\": {\n            \"type\": \"boolean\"\n          },\n          \"dnsServers\": {\n            \"shape\": \"S16\"\n          },\n          \"dnsSearchDomains\": {\n            \"shape\": \"S16\"\n          },\n          \"extraHosts\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"hostname\",\n                \"ipAddress\"\n              ],\n              \"members\": {\n                \"hostname\": {},\n                \"ipAddress\": {}\n              }\n            }\n          },\n          \"dockerSecurityOptions\": {\n            \"shape\": \"S16\"\n          },\n          \"dockerLabels\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {}\n          },\n          \"ulimits\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"name\",\n                \"softLimit\",\n                \"hardLimit\"\n              ],\n              \"members\": {\n                \"name\": {},\n                \"softLimit\": {\n                  \"type\": \"integer\"\n                },\n                \"hardLimit\": {\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          },\n          \"logConfiguration\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"logDriver\"\n            ],\n            \"members\": {\n              \"logDriver\": {},\n              \"options\": {\n                \"type\": \"map\",\n                \"key\": {},\n                \"value\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S1h\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"name\": {},\n          \"value\": {}\n        }\n      }\n    },\n    \"S1x\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"name\": {},\n          \"host\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"sourcePath\": {}\n            }\n          }\n        }\n      }\n    },\n    \"S22\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"type\": {},\n          \"expression\": {}\n        }\n      }\n    },\n    \"S28\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"arn\": {},\n          \"reason\": {}\n        }\n      }\n    },\n    \"S2c\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S10\"\n      }\n    },\n    \"S2k\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S2l\"\n      }\n    },\n    \"S2l\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"taskArn\": {},\n        \"clusterArn\": {},\n        \"taskDefinitionArn\": {},\n        \"containerInstanceArn\": {},\n        \"overrides\": {\n          \"shape\": \"S2m\"\n        },\n        \"lastStatus\": {},\n        \"desiredStatus\": {},\n        \"containers\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"containerArn\": {},\n              \"taskArn\": {},\n              \"name\": {},\n              \"lastStatus\": {},\n              \"exitCode\": {\n                \"type\": \"integer\"\n              },\n              \"reason\": {},\n              \"networkBindings\": {\n                \"shape\": \"S2r\"\n              }\n            }\n          }\n        },\n        \"startedBy\": {},\n        \"version\": {\n          \"type\": \"long\"\n        },\n        \"stoppedReason\": {},\n        \"createdAt\": {\n          \"type\": \"timestamp\"\n        },\n        \"startedAt\": {\n          \"type\": \"timestamp\"\n        },\n        \"stoppedAt\": {\n          \"type\": \"timestamp\"\n        },\n        \"group\": {}\n      }\n    },\n    \"S2m\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"containerOverrides\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"name\": {},\n              \"command\": {\n                \"shape\": \"S16\"\n              },\n              \"environment\": {\n                \"shape\": \"S1h\"\n              }\n            }\n          }\n        },\n        \"taskRoleArn\": {}\n      }\n    },\n    \"S2r\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"bindIP\": {},\n          \"containerPort\": {\n            \"type\": \"integer\"\n          },\n          \"hostPort\": {\n            \"type\": \"integer\"\n          },\n          \"protocol\": {}\n        }\n      }\n    }\n  }\n}\n},{}],48:[function(require,module,exports){\nmodule.exports={\n\t\"pagination\": {\n\t\t\"ListClusters\": {\n\t\t\t\"input_token\": \"nextToken\",\n\t\t\t\"output_token\": \"nextToken\",\n\t\t\t\"limit_key\": \"maxResults\",\n\t\t\t\"result_key\": \"clusterArns\"\n\t\t},\n\t\t\"ListContainerInstances\": {\n\t\t\t\"input_token\": \"nextToken\",\n\t\t\t\"output_token\": \"nextToken\",\n\t\t\t\"limit_key\": \"maxResults\",\n\t\t\t\"result_key\": \"containerInstanceArns\"\n\t\t},\n\t\t\"ListTaskDefinitions\": {\n\t\t\t\"input_token\": \"nextToken\",\n\t\t\t\"output_token\": \"nextToken\",\n\t\t\t\"limit_key\": \"maxResults\",\n\t\t\t\"result_key\": \"taskDefinitionArns\"\n\t\t},\n\t\t\"ListTaskDefinitionFamilies\": {\n\t\t\t\"input_token\": \"nextToken\",\n\t\t\t\"output_token\": \"nextToken\",\n\t\t\t\"limit_key\": \"maxResults\",\n\t\t\t\"result_key\": \"families\"\n\t\t},\n\t\t\"ListTasks\": {\n\t\t\t\"input_token\": \"nextToken\",\n\t\t\t\"output_token\": \"nextToken\",\n\t\t\t\"limit_key\": \"maxResults\",\n\t\t\t\"result_key\": \"taskArns\"\n\t\t},\n\t\t\"ListServices\": {\n\t\t\t\"input_token\": \"nextToken\",\n\t\t\t\"output_token\": \"nextToken\",\n\t\t\t\"limit_key\": \"maxResults\",\n\t\t\t\"result_key\": \"serviceArns\"\n\t\t}\n\t}\n}\n\n},{}],49:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"TasksRunning\": {\n      \"delay\": 6,\n      \"operation\": \"DescribeTasks\",\n      \"maxAttempts\": 100,\n      \"acceptors\": [\n        {\n          \"expected\": \"STOPPED\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"tasks[].lastStatus\"\n        },\n        {\n          \"expected\": \"MISSING\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"failures[].reason\"\n        },\n        {\n          \"expected\": \"RUNNING\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"tasks[].lastStatus\"\n        }\n      ]\n    },\n    \"TasksStopped\": {\n      \"delay\": 6,\n      \"operation\": \"DescribeTasks\",\n      \"maxAttempts\": 100,\n      \"acceptors\": [\n        {\n          \"expected\": \"STOPPED\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"tasks[].lastStatus\"\n        }\n      ]\n    },\n    \"ServicesStable\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeServices\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"MISSING\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"failures[].reason\"\n        },\n        {\n          \"expected\": \"DRAINING\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"services[].status\"\n        },\n        {\n          \"expected\": \"INACTIVE\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"services[].status\"\n        },\n        {\n          \"expected\": true,\n          \"matcher\": \"path\",\n          \"state\": \"success\",\n          \"argument\": \"length(services[?!(length(deployments) == `1` && runningCount == desiredCount)]) == `0`\"\n        }\n      ]\n    },\n    \"ServicesInactive\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeServices\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": \"MISSING\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"failures[].reason\"\n        },\n        {\n          \"expected\": \"INACTIVE\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"success\",\n          \"argument\": \"services[].status\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],50:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2015-02-02\",\n    \"endpointPrefix\": \"elasticache\",\n    \"protocol\": \"query\",\n    \"serviceFullName\": \"Amazon ElastiCache\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"elasticache-2015-02-02\",\n    \"xmlNamespace\": \"http://elasticache.amazonaws.com/doc/2015-02-02/\"\n  },\n  \"operations\": {\n    \"AddTagsToResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"ResourceName\": {},\n          \"Tags\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S5\",\n        \"resultWrapper\": \"AddTagsToResourceResult\"\n      }\n    },\n    \"AuthorizeCacheSecurityGroupIngress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheSecurityGroupName\",\n          \"EC2SecurityGroupName\",\n          \"EC2SecurityGroupOwnerId\"\n        ],\n        \"members\": {\n          \"CacheSecurityGroupName\": {},\n          \"EC2SecurityGroupName\": {},\n          \"EC2SecurityGroupOwnerId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AuthorizeCacheSecurityGroupIngressResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheSecurityGroup\": {\n            \"shape\": \"S8\"\n          }\n        }\n      }\n    },\n    \"CopySnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceSnapshotName\",\n          \"TargetSnapshotName\"\n        ],\n        \"members\": {\n          \"SourceSnapshotName\": {},\n          \"TargetSnapshotName\": {},\n          \"TargetBucket\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CopySnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Snapshot\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"CreateCacheCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheClusterId\"\n        ],\n        \"members\": {\n          \"CacheClusterId\": {},\n          \"ReplicationGroupId\": {},\n          \"AZMode\": {},\n          \"PreferredAvailabilityZone\": {},\n          \"PreferredAvailabilityZones\": {\n            \"shape\": \"So\"\n          },\n          \"NumCacheNodes\": {\n            \"type\": \"integer\"\n          },\n          \"CacheNodeType\": {},\n          \"Engine\": {},\n          \"EngineVersion\": {},\n          \"CacheParameterGroupName\": {},\n          \"CacheSubnetGroupName\": {},\n          \"CacheSecurityGroupNames\": {\n            \"shape\": \"Sp\"\n          },\n          \"SecurityGroupIds\": {\n            \"shape\": \"Sq\"\n          },\n          \"Tags\": {\n            \"shape\": \"S3\"\n          },\n          \"SnapshotArns\": {\n            \"shape\": \"Sr\"\n          },\n          \"SnapshotName\": {},\n          \"PreferredMaintenanceWindow\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"NotificationTopicArn\": {},\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"SnapshotRetentionLimit\": {\n            \"type\": \"integer\"\n          },\n          \"SnapshotWindow\": {},\n          \"AuthToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateCacheClusterResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheCluster\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"CreateCacheParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheParameterGroupName\",\n          \"CacheParameterGroupFamily\",\n          \"Description\"\n        ],\n        \"members\": {\n          \"CacheParameterGroupName\": {},\n          \"CacheParameterGroupFamily\": {},\n          \"Description\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateCacheParameterGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheParameterGroup\": {\n            \"shape\": \"S19\"\n          }\n        }\n      }\n    },\n    \"CreateCacheSecurityGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheSecurityGroupName\",\n          \"Description\"\n        ],\n        \"members\": {\n          \"CacheSecurityGroupName\": {},\n          \"Description\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateCacheSecurityGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheSecurityGroup\": {\n            \"shape\": \"S8\"\n          }\n        }\n      }\n    },\n    \"CreateCacheSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheSubnetGroupName\",\n          \"CacheSubnetGroupDescription\",\n          \"SubnetIds\"\n        ],\n        \"members\": {\n          \"CacheSubnetGroupName\": {},\n          \"CacheSubnetGroupDescription\": {},\n          \"SubnetIds\": {\n            \"shape\": \"S1d\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateCacheSubnetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheSubnetGroup\": {\n            \"shape\": \"S1f\"\n          }\n        }\n      }\n    },\n    \"CreateReplicationGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReplicationGroupId\",\n          \"ReplicationGroupDescription\"\n        ],\n        \"members\": {\n          \"ReplicationGroupId\": {},\n          \"ReplicationGroupDescription\": {},\n          \"PrimaryClusterId\": {},\n          \"AutomaticFailoverEnabled\": {\n            \"type\": \"boolean\"\n          },\n          \"NumCacheClusters\": {\n            \"type\": \"integer\"\n          },\n          \"PreferredCacheClusterAZs\": {\n            \"shape\": \"Sl\"\n          },\n          \"NumNodeGroups\": {\n            \"type\": \"integer\"\n          },\n          \"ReplicasPerNodeGroup\": {\n            \"type\": \"integer\"\n          },\n          \"NodeGroupConfiguration\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sk\",\n              \"locationName\": \"NodeGroupConfiguration\"\n            }\n          },\n          \"CacheNodeType\": {},\n          \"Engine\": {},\n          \"EngineVersion\": {},\n          \"CacheParameterGroupName\": {},\n          \"CacheSubnetGroupName\": {},\n          \"CacheSecurityGroupNames\": {\n            \"shape\": \"Sp\"\n          },\n          \"SecurityGroupIds\": {\n            \"shape\": \"Sq\"\n          },\n          \"Tags\": {\n            \"shape\": \"S3\"\n          },\n          \"SnapshotArns\": {\n            \"shape\": \"Sr\"\n          },\n          \"SnapshotName\": {},\n          \"PreferredMaintenanceWindow\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"NotificationTopicArn\": {},\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"SnapshotRetentionLimit\": {\n            \"type\": \"integer\"\n          },\n          \"SnapshotWindow\": {},\n          \"AuthToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateReplicationGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReplicationGroup\": {\n            \"shape\": \"S1m\"\n          }\n        }\n      }\n    },\n    \"CreateSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SnapshotName\"\n        ],\n        \"members\": {\n          \"ReplicationGroupId\": {},\n          \"CacheClusterId\": {},\n          \"SnapshotName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Snapshot\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"DeleteCacheCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheClusterId\"\n        ],\n        \"members\": {\n          \"CacheClusterId\": {},\n          \"FinalSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteCacheClusterResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheCluster\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"DeleteCacheParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheParameterGroupName\"\n        ],\n        \"members\": {\n          \"CacheParameterGroupName\": {}\n        }\n      }\n    },\n    \"DeleteCacheSecurityGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheSecurityGroupName\"\n        ],\n        \"members\": {\n          \"CacheSecurityGroupName\": {}\n        }\n      }\n    },\n    \"DeleteCacheSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheSubnetGroupName\"\n        ],\n        \"members\": {\n          \"CacheSubnetGroupName\": {}\n        }\n      }\n    },\n    \"DeleteReplicationGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReplicationGroupId\"\n        ],\n        \"members\": {\n          \"ReplicationGroupId\": {},\n          \"RetainPrimaryCluster\": {\n            \"type\": \"boolean\"\n          },\n          \"FinalSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteReplicationGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReplicationGroup\": {\n            \"shape\": \"S1m\"\n          }\n        }\n      }\n    },\n    \"DeleteSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SnapshotName\"\n        ],\n        \"members\": {\n          \"SnapshotName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Snapshot\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"DescribeCacheClusters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheClusterId\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"ShowCacheNodeInfo\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeCacheClustersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"CacheClusters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Su\",\n              \"locationName\": \"CacheCluster\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeCacheEngineVersions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Engine\": {},\n          \"EngineVersion\": {},\n          \"CacheParameterGroupFamily\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"DefaultOnly\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeCacheEngineVersionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"CacheEngineVersions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"CacheEngineVersion\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Engine\": {},\n                \"EngineVersion\": {},\n                \"CacheParameterGroupFamily\": {},\n                \"CacheEngineDescription\": {},\n                \"CacheEngineVersionDescription\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeCacheParameterGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheParameterGroupName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeCacheParameterGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"CacheParameterGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S19\",\n              \"locationName\": \"CacheParameterGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeCacheParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheParameterGroupName\"\n        ],\n        \"members\": {\n          \"CacheParameterGroupName\": {},\n          \"Source\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeCacheParametersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"Parameters\": {\n            \"shape\": \"S2h\"\n          },\n          \"CacheNodeTypeSpecificParameters\": {\n            \"shape\": \"S2k\"\n          }\n        }\n      }\n    },\n    \"DescribeCacheSecurityGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheSecurityGroupName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeCacheSecurityGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"CacheSecurityGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S8\",\n              \"locationName\": \"CacheSecurityGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeCacheSubnetGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheSubnetGroupName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeCacheSubnetGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"CacheSubnetGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1f\",\n              \"locationName\": \"CacheSubnetGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEngineDefaultParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheParameterGroupFamily\"\n        ],\n        \"members\": {\n          \"CacheParameterGroupFamily\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEngineDefaultParametersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EngineDefaults\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"CacheParameterGroupFamily\": {},\n              \"Marker\": {},\n              \"Parameters\": {\n                \"shape\": \"S2h\"\n              },\n              \"CacheNodeTypeSpecificParameters\": {\n                \"shape\": \"S2k\"\n              }\n            },\n            \"wrapper\": true\n          }\n        }\n      }\n    },\n    \"DescribeEvents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SourceIdentifier\": {},\n          \"SourceType\": {},\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"Duration\": {\n            \"type\": \"integer\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"Events\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Event\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"SourceIdentifier\": {},\n                \"SourceType\": {},\n                \"Message\": {},\n                \"Date\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeReplicationGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReplicationGroupId\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReplicationGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ReplicationGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1m\",\n              \"locationName\": \"ReplicationGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeReservedCacheNodes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedCacheNodeId\": {},\n          \"ReservedCacheNodesOfferingId\": {},\n          \"CacheNodeType\": {},\n          \"Duration\": {},\n          \"ProductDescription\": {},\n          \"OfferingType\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReservedCacheNodesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ReservedCacheNodes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S38\",\n              \"locationName\": \"ReservedCacheNode\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeReservedCacheNodesOfferings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedCacheNodesOfferingId\": {},\n          \"CacheNodeType\": {},\n          \"Duration\": {},\n          \"ProductDescription\": {},\n          \"OfferingType\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReservedCacheNodesOfferingsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ReservedCacheNodesOfferings\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ReservedCacheNodesOffering\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ReservedCacheNodesOfferingId\": {},\n                \"CacheNodeType\": {},\n                \"Duration\": {\n                  \"type\": \"integer\"\n                },\n                \"FixedPrice\": {\n                  \"type\": \"double\"\n                },\n                \"UsagePrice\": {\n                  \"type\": \"double\"\n                },\n                \"ProductDescription\": {},\n                \"OfferingType\": {},\n                \"RecurringCharges\": {\n                  \"shape\": \"S3a\"\n                }\n              },\n              \"wrapper\": true\n            }\n          }\n        }\n      }\n    },\n    \"DescribeSnapshots\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReplicationGroupId\": {},\n          \"CacheClusterId\": {},\n          \"SnapshotName\": {},\n          \"SnapshotSource\": {},\n          \"Marker\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"ShowNodeGroupConfig\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeSnapshotsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"Snapshots\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sd\",\n              \"locationName\": \"Snapshot\"\n            }\n          }\n        }\n      }\n    },\n    \"ListAllowedNodeTypeModifications\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheClusterId\": {},\n          \"ReplicationGroupId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListAllowedNodeTypeModificationsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ScaleUpModifications\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"ListTagsForResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\"\n        ],\n        \"members\": {\n          \"ResourceName\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S5\",\n        \"resultWrapper\": \"ListTagsForResourceResult\"\n      }\n    },\n    \"ModifyCacheCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheClusterId\"\n        ],\n        \"members\": {\n          \"CacheClusterId\": {},\n          \"NumCacheNodes\": {\n            \"type\": \"integer\"\n          },\n          \"CacheNodeIdsToRemove\": {\n            \"shape\": \"Sy\"\n          },\n          \"AZMode\": {},\n          \"NewAvailabilityZones\": {\n            \"shape\": \"So\"\n          },\n          \"CacheSecurityGroupNames\": {\n            \"shape\": \"Sp\"\n          },\n          \"SecurityGroupIds\": {\n            \"shape\": \"Sq\"\n          },\n          \"PreferredMaintenanceWindow\": {},\n          \"NotificationTopicArn\": {},\n          \"CacheParameterGroupName\": {},\n          \"NotificationTopicStatus\": {},\n          \"ApplyImmediately\": {\n            \"type\": \"boolean\"\n          },\n          \"EngineVersion\": {},\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"SnapshotRetentionLimit\": {\n            \"type\": \"integer\"\n          },\n          \"SnapshotWindow\": {},\n          \"CacheNodeType\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyCacheClusterResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheCluster\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"ModifyCacheParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheParameterGroupName\",\n          \"ParameterNameValues\"\n        ],\n        \"members\": {\n          \"CacheParameterGroupName\": {},\n          \"ParameterNameValues\": {\n            \"shape\": \"S3q\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S3s\",\n        \"resultWrapper\": \"ModifyCacheParameterGroupResult\"\n      }\n    },\n    \"ModifyCacheSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheSubnetGroupName\"\n        ],\n        \"members\": {\n          \"CacheSubnetGroupName\": {},\n          \"CacheSubnetGroupDescription\": {},\n          \"SubnetIds\": {\n            \"shape\": \"S1d\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyCacheSubnetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheSubnetGroup\": {\n            \"shape\": \"S1f\"\n          }\n        }\n      }\n    },\n    \"ModifyReplicationGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReplicationGroupId\"\n        ],\n        \"members\": {\n          \"ReplicationGroupId\": {},\n          \"ReplicationGroupDescription\": {},\n          \"PrimaryClusterId\": {},\n          \"SnapshottingClusterId\": {},\n          \"AutomaticFailoverEnabled\": {\n            \"type\": \"boolean\"\n          },\n          \"CacheSecurityGroupNames\": {\n            \"shape\": \"Sp\"\n          },\n          \"SecurityGroupIds\": {\n            \"shape\": \"Sq\"\n          },\n          \"PreferredMaintenanceWindow\": {},\n          \"NotificationTopicArn\": {},\n          \"CacheParameterGroupName\": {},\n          \"NotificationTopicStatus\": {},\n          \"ApplyImmediately\": {\n            \"type\": \"boolean\"\n          },\n          \"EngineVersion\": {},\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"SnapshotRetentionLimit\": {\n            \"type\": \"integer\"\n          },\n          \"SnapshotWindow\": {},\n          \"CacheNodeType\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyReplicationGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReplicationGroup\": {\n            \"shape\": \"S1m\"\n          }\n        }\n      }\n    },\n    \"PurchaseReservedCacheNodesOffering\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReservedCacheNodesOfferingId\"\n        ],\n        \"members\": {\n          \"ReservedCacheNodesOfferingId\": {},\n          \"ReservedCacheNodeId\": {},\n          \"CacheNodeCount\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PurchaseReservedCacheNodesOfferingResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedCacheNode\": {\n            \"shape\": \"S38\"\n          }\n        }\n      }\n    },\n    \"RebootCacheCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheClusterId\",\n          \"CacheNodeIdsToReboot\"\n        ],\n        \"members\": {\n          \"CacheClusterId\": {},\n          \"CacheNodeIdsToReboot\": {\n            \"shape\": \"Sy\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RebootCacheClusterResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheCluster\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"RemoveTagsFromResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\",\n          \"TagKeys\"\n        ],\n        \"members\": {\n          \"ResourceName\": {},\n          \"TagKeys\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S5\",\n        \"resultWrapper\": \"RemoveTagsFromResourceResult\"\n      }\n    },\n    \"ResetCacheParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheParameterGroupName\"\n        ],\n        \"members\": {\n          \"CacheParameterGroupName\": {},\n          \"ResetAllParameters\": {\n            \"type\": \"boolean\"\n          },\n          \"ParameterNameValues\": {\n            \"shape\": \"S3q\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S3s\",\n        \"resultWrapper\": \"ResetCacheParameterGroupResult\"\n      }\n    },\n    \"RevokeCacheSecurityGroupIngress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CacheSecurityGroupName\",\n          \"EC2SecurityGroupName\",\n          \"EC2SecurityGroupOwnerId\"\n        ],\n        \"members\": {\n          \"CacheSecurityGroupName\": {},\n          \"EC2SecurityGroupName\": {},\n          \"EC2SecurityGroupOwnerId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RevokeCacheSecurityGroupIngressResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"CacheSecurityGroup\": {\n            \"shape\": \"S8\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S3\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Tag\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"S5\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"TagList\": {\n          \"shape\": \"S3\"\n        }\n      }\n    },\n    \"S8\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"OwnerId\": {},\n        \"CacheSecurityGroupName\": {},\n        \"Description\": {},\n        \"EC2SecurityGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"EC2SecurityGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Status\": {},\n              \"EC2SecurityGroupName\": {},\n              \"EC2SecurityGroupOwnerId\": {}\n            }\n          }\n        }\n      },\n      \"wrapper\": true\n    },\n    \"Sd\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"SnapshotName\": {},\n        \"ReplicationGroupId\": {},\n        \"ReplicationGroupDescription\": {},\n        \"CacheClusterId\": {},\n        \"SnapshotStatus\": {},\n        \"SnapshotSource\": {},\n        \"CacheNodeType\": {},\n        \"Engine\": {},\n        \"EngineVersion\": {},\n        \"NumCacheNodes\": {\n          \"type\": \"integer\"\n        },\n        \"PreferredAvailabilityZone\": {},\n        \"CacheClusterCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"PreferredMaintenanceWindow\": {},\n        \"TopicArn\": {},\n        \"Port\": {\n          \"type\": \"integer\"\n        },\n        \"CacheParameterGroupName\": {},\n        \"CacheSubnetGroupName\": {},\n        \"VpcId\": {},\n        \"AutoMinorVersionUpgrade\": {\n          \"type\": \"boolean\"\n        },\n        \"SnapshotRetentionLimit\": {\n          \"type\": \"integer\"\n        },\n        \"SnapshotWindow\": {},\n        \"NumNodeGroups\": {\n          \"type\": \"integer\"\n        },\n        \"AutomaticFailover\": {},\n        \"NodeSnapshots\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"NodeSnapshot\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"CacheClusterId\": {},\n              \"NodeGroupId\": {},\n              \"CacheNodeId\": {},\n              \"NodeGroupConfiguration\": {\n                \"shape\": \"Sk\"\n              },\n              \"CacheSize\": {},\n              \"CacheNodeCreateTime\": {\n                \"type\": \"timestamp\"\n              },\n              \"SnapshotCreateTime\": {\n                \"type\": \"timestamp\"\n              }\n            },\n            \"wrapper\": true\n          }\n        }\n      },\n      \"wrapper\": true\n    },\n    \"Sk\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Slots\": {},\n        \"ReplicaCount\": {\n          \"type\": \"integer\"\n        },\n        \"PrimaryAvailabilityZone\": {},\n        \"ReplicaAvailabilityZones\": {\n          \"shape\": \"Sl\"\n        }\n      }\n    },\n    \"Sl\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"AvailabilityZone\"\n      }\n    },\n    \"So\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"PreferredAvailabilityZone\"\n      }\n    },\n    \"Sp\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"CacheSecurityGroupName\"\n      }\n    },\n    \"Sq\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SecurityGroupId\"\n      }\n    },\n    \"Sr\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SnapshotArn\"\n      }\n    },\n    \"Su\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CacheClusterId\": {},\n        \"ConfigurationEndpoint\": {\n          \"shape\": \"Sv\"\n        },\n        \"ClientDownloadLandingPage\": {},\n        \"CacheNodeType\": {},\n        \"Engine\": {},\n        \"EngineVersion\": {},\n        \"CacheClusterStatus\": {},\n        \"NumCacheNodes\": {\n          \"type\": \"integer\"\n        },\n        \"PreferredAvailabilityZone\": {},\n        \"CacheClusterCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"PreferredMaintenanceWindow\": {},\n        \"PendingModifiedValues\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"NumCacheNodes\": {\n              \"type\": \"integer\"\n            },\n            \"CacheNodeIdsToRemove\": {\n              \"shape\": \"Sy\"\n            },\n            \"EngineVersion\": {},\n            \"CacheNodeType\": {}\n          }\n        },\n        \"NotificationConfiguration\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"TopicArn\": {},\n            \"TopicStatus\": {}\n          }\n        },\n        \"CacheSecurityGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"CacheSecurityGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"CacheSecurityGroupName\": {},\n              \"Status\": {}\n            }\n          }\n        },\n        \"CacheParameterGroup\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"CacheParameterGroupName\": {},\n            \"ParameterApplyStatus\": {},\n            \"CacheNodeIdsToReboot\": {\n              \"shape\": \"Sy\"\n            }\n          }\n        },\n        \"CacheSubnetGroupName\": {},\n        \"CacheNodes\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"CacheNode\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"CacheNodeId\": {},\n              \"CacheNodeStatus\": {},\n              \"CacheNodeCreateTime\": {\n                \"type\": \"timestamp\"\n              },\n              \"Endpoint\": {\n                \"shape\": \"Sv\"\n              },\n              \"ParameterGroupStatus\": {},\n              \"SourceCacheNodeId\": {},\n              \"CustomerAvailabilityZone\": {}\n            }\n          }\n        },\n        \"AutoMinorVersionUpgrade\": {\n          \"type\": \"boolean\"\n        },\n        \"SecurityGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"SecurityGroupId\": {},\n              \"Status\": {}\n            }\n          }\n        },\n        \"ReplicationGroupId\": {},\n        \"SnapshotRetentionLimit\": {\n          \"type\": \"integer\"\n        },\n        \"SnapshotWindow\": {}\n      },\n      \"wrapper\": true\n    },\n    \"Sv\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Address\": {},\n        \"Port\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"Sy\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"CacheNodeId\"\n      }\n    },\n    \"S19\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CacheParameterGroupName\": {},\n        \"CacheParameterGroupFamily\": {},\n        \"Description\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S1d\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SubnetIdentifier\"\n      }\n    },\n    \"S1f\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CacheSubnetGroupName\": {},\n        \"CacheSubnetGroupDescription\": {},\n        \"VpcId\": {},\n        \"Subnets\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Subnet\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"SubnetIdentifier\": {},\n              \"SubnetAvailabilityZone\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"Name\": {}\n                },\n                \"wrapper\": true\n              }\n            }\n          }\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S1m\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ReplicationGroupId\": {},\n        \"Description\": {},\n        \"Status\": {},\n        \"PendingModifiedValues\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"PrimaryClusterId\": {},\n            \"AutomaticFailoverStatus\": {}\n          }\n        },\n        \"MemberClusters\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"ClusterId\"\n          }\n        },\n        \"NodeGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"NodeGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"NodeGroupId\": {},\n              \"Status\": {},\n              \"PrimaryEndpoint\": {\n                \"shape\": \"Sv\"\n              },\n              \"Slots\": {},\n              \"NodeGroupMembers\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"locationName\": \"NodeGroupMember\",\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"CacheClusterId\": {},\n                    \"CacheNodeId\": {},\n                    \"ReadEndpoint\": {\n                      \"shape\": \"Sv\"\n                    },\n                    \"PreferredAvailabilityZone\": {},\n                    \"CurrentRole\": {}\n                  }\n                }\n              }\n            }\n          }\n        },\n        \"SnapshottingClusterId\": {},\n        \"AutomaticFailover\": {},\n        \"ConfigurationEndpoint\": {\n          \"shape\": \"Sv\"\n        },\n        \"SnapshotRetentionLimit\": {\n          \"type\": \"integer\"\n        },\n        \"SnapshotWindow\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S2h\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Parameter\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ParameterName\": {},\n          \"ParameterValue\": {},\n          \"Description\": {},\n          \"Source\": {},\n          \"DataType\": {},\n          \"AllowedValues\": {},\n          \"IsModifiable\": {\n            \"type\": \"boolean\"\n          },\n          \"MinimumEngineVersion\": {},\n          \"ChangeType\": {}\n        }\n      }\n    },\n    \"S2k\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"CacheNodeTypeSpecificParameter\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ParameterName\": {},\n          \"Description\": {},\n          \"Source\": {},\n          \"DataType\": {},\n          \"AllowedValues\": {},\n          \"IsModifiable\": {\n            \"type\": \"boolean\"\n          },\n          \"MinimumEngineVersion\": {},\n          \"CacheNodeTypeSpecificValues\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"CacheNodeTypeSpecificValue\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"CacheNodeType\": {},\n                \"Value\": {}\n              }\n            }\n          },\n          \"ChangeType\": {}\n        }\n      }\n    },\n    \"S38\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ReservedCacheNodeId\": {},\n        \"ReservedCacheNodesOfferingId\": {},\n        \"CacheNodeType\": {},\n        \"StartTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Duration\": {\n          \"type\": \"integer\"\n        },\n        \"FixedPrice\": {\n          \"type\": \"double\"\n        },\n        \"UsagePrice\": {\n          \"type\": \"double\"\n        },\n        \"CacheNodeCount\": {\n          \"type\": \"integer\"\n        },\n        \"ProductDescription\": {},\n        \"OfferingType\": {},\n        \"State\": {},\n        \"RecurringCharges\": {\n          \"shape\": \"S3a\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S3a\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"RecurringCharge\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"RecurringChargeAmount\": {\n            \"type\": \"double\"\n          },\n          \"RecurringChargeFrequency\": {}\n        },\n        \"wrapper\": true\n      }\n    },\n    \"S3q\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"ParameterNameValue\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ParameterName\": {},\n          \"ParameterValue\": {}\n        }\n      }\n    },\n    \"S3s\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CacheParameterGroupName\": {}\n      }\n    }\n  }\n}\n},{}],51:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeCacheClusters\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"CacheClusters\"\n    },\n    \"DescribeCacheEngineVersions\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"CacheEngineVersions\"\n    },\n    \"DescribeCacheParameterGroups\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"CacheParameterGroups\"\n    },\n    \"DescribeCacheParameters\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"Parameters\"\n    },\n    \"DescribeCacheSecurityGroups\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"CacheSecurityGroups\"\n    },\n    \"DescribeCacheSubnetGroups\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"CacheSubnetGroups\"\n    },\n    \"DescribeEngineDefaultParameters\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"EngineDefaults.Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"EngineDefaults.Parameters\"\n    },\n    \"DescribeEvents\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"Events\"\n    },\n    \"DescribeReservedCacheNodes\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"ReservedCacheNodes\"\n    },\n    \"DescribeReservedCacheNodesOfferings\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"ReservedCacheNodesOfferings\"\n    },\n    \"DescribeReplicationGroups\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"ReplicationGroups\"\n    },\n    \"DescribeSnapshots\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"Snapshots\"\n    }\n  }\n}\n\n},{}],52:[function(require,module,exports){\nmodule.exports={\n    \"version\":2,\n    \"waiters\":{\n        \"CacheClusterAvailable\":{\n            \"acceptors\":[\n                {\n                    \"argument\":\"CacheClusters[].CacheClusterStatus\",\n                    \"expected\":\"available\",\n                    \"matcher\":\"pathAll\",\n                    \"state\":\"success\"\n                },\n                {\n                    \"argument\":\"CacheClusters[].CacheClusterStatus\",\n                    \"expected\":\"deleted\",\n                    \"matcher\":\"pathAny\",\n                    \"state\":\"failure\"\n                },\n                {\n                    \"argument\":\"CacheClusters[].CacheClusterStatus\",\n                    \"expected\":\"deleting\",\n                    \"matcher\":\"pathAny\",\n                    \"state\":\"failure\"\n                },\n                {\n                    \"argument\":\"CacheClusters[].CacheClusterStatus\",\n                    \"expected\":\"incompatible-network\",\n                    \"matcher\":\"pathAny\",\n                    \"state\":\"failure\"\n                },\n                {\n                    \"argument\":\"CacheClusters[].CacheClusterStatus\",\n                    \"expected\":\"restore-failed\",\n                    \"matcher\":\"pathAny\",\n                    \"state\":\"failure\"\n                }\n            ],\n            \"delay\":15,\n            \"description\":\"Wait until ElastiCache cluster is available.\",\n            \"maxAttempts\":40,\n            \"operation\":\"DescribeCacheClusters\"\n        },\n        \"CacheClusterDeleted\":{\n            \"acceptors\":[\n                {\n                    \"argument\":\"CacheClusters[].CacheClusterStatus\",\n                    \"expected\":\"deleted\",\n                    \"matcher\":\"pathAll\",\n                    \"state\":\"success\"\n                },\n                {\n                    \"expected\":\"CacheClusterNotFound\",\n                    \"matcher\":\"error\",\n                    \"state\":\"success\"\n                },\n                {\n                    \"argument\":\"CacheClusters[].CacheClusterStatus\",\n                    \"expected\":\"available\",\n                    \"matcher\":\"pathAny\",\n                    \"state\":\"failure\"\n                },\n                {\n                    \"argument\":\"CacheClusters[].CacheClusterStatus\",\n                    \"expected\":\"creating\",\n                    \"matcher\":\"pathAny\",\n                    \"state\":\"failure\"\n                },\n                {\n                    \"argument\":\"CacheClusters[].CacheClusterStatus\",\n                    \"expected\":\"incompatible-network\",\n                    \"matcher\":\"pathAny\",\n                    \"state\":\"failure\"\n                },\n                {\n                    \"argument\":\"CacheClusters[].CacheClusterStatus\",\n                    \"expected\":\"modifying\",\n                    \"matcher\":\"pathAny\",\n                    \"state\":\"failure\"\n                },\n                {\n                    \"argument\":\"CacheClusters[].CacheClusterStatus\",\n                    \"expected\":\"restore-failed\",\n                    \"matcher\":\"pathAny\",\n                    \"state\":\"failure\"\n                },\n                {\n                    \"argument\":\"CacheClusters[].CacheClusterStatus\",\n                    \"expected\":\"snapshotting\",\n                    \"matcher\":\"pathAny\",\n                    \"state\":\"failure\"\n                }\n            ],\n            \"delay\":15,\n            \"description\":\"Wait until ElastiCache cluster is deleted.\",\n            \"maxAttempts\":40,\n            \"operation\":\"DescribeCacheClusters\"\n        },\n        \"ReplicationGroupAvailable\":{\n            \"acceptors\":[\n                {\n                    \"argument\":\"ReplicationGroups[].Status\",\n                    \"expected\":\"available\",\n                    \"matcher\":\"pathAll\",\n                    \"state\":\"success\"\n                },\n                {\n                    \"argument\":\"ReplicationGroups[].Status\",\n                    \"expected\":\"deleted\",\n                    \"matcher\":\"pathAny\",\n                    \"state\":\"failure\"\n                }\n            ],\n            \"delay\":15,\n            \"description\":\"Wait until ElastiCache replication group is available.\",\n            \"maxAttempts\":40,\n            \"operation\":\"DescribeReplicationGroups\"\n        },\n        \"ReplicationGroupDeleted\":{\n            \"acceptors\":[\n                {\n                    \"argument\":\"ReplicationGroups[].Status\",\n                    \"expected\":\"deleted\",\n                    \"matcher\":\"pathAll\",\n                    \"state\":\"success\"\n                },\n                {\n                    \"argument\":\"ReplicationGroups[].Status\",\n                    \"expected\":\"available\",\n                    \"matcher\":\"pathAny\",\n                    \"state\":\"failure\"\n                },\n                {\n                    \"expected\":\"ReplicationGroupNotFoundFault\",\n                    \"matcher\":\"error\",\n                    \"state\":\"success\"\n                }\n            ],\n            \"delay\":15,\n            \"description\":\"Wait until ElastiCache replication group is deleted.\",\n            \"maxAttempts\":40,\n            \"operation\":\"DescribeReplicationGroups\"\n        }\n    }\n}\n\n},{}],53:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2010-12-01\",\n    \"endpointPrefix\": \"elasticbeanstalk\",\n    \"protocol\": \"query\",\n    \"serviceAbbreviation\": \"Elastic Beanstalk\",\n    \"serviceFullName\": \"AWS Elastic Beanstalk\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"elasticbeanstalk-2010-12-01\",\n    \"xmlNamespace\": \"http://elasticbeanstalk.amazonaws.com/docs/2010-12-01/\"\n  },\n  \"operations\": {\n    \"AbortEnvironmentUpdate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EnvironmentId\": {},\n          \"EnvironmentName\": {}\n        }\n      }\n    },\n    \"ApplyEnvironmentManagedAction\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ActionId\"\n        ],\n        \"members\": {\n          \"EnvironmentName\": {},\n          \"EnvironmentId\": {},\n          \"ActionId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ApplyEnvironmentManagedActionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ActionId\": {},\n          \"ActionDescription\": {},\n          \"ActionType\": {},\n          \"Status\": {}\n        }\n      }\n    },\n    \"CheckDNSAvailability\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CNAMEPrefix\"\n        ],\n        \"members\": {\n          \"CNAMEPrefix\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CheckDNSAvailabilityResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Available\": {\n            \"type\": \"boolean\"\n          },\n          \"FullyQualifiedCNAME\": {}\n        }\n      }\n    },\n    \"ComposeEnvironments\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ApplicationName\": {},\n          \"GroupName\": {},\n          \"VersionLabels\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Si\",\n        \"resultWrapper\": \"ComposeEnvironmentsResult\"\n      }\n    },\n    \"CreateApplication\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ApplicationName\"\n        ],\n        \"members\": {\n          \"ApplicationName\": {},\n          \"Description\": {},\n          \"ResourceLifecycleConfig\": {\n            \"shape\": \"S14\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1a\",\n        \"resultWrapper\": \"CreateApplicationResult\"\n      }\n    },\n    \"CreateApplicationVersion\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ApplicationName\",\n          \"VersionLabel\"\n        ],\n        \"members\": {\n          \"ApplicationName\": {},\n          \"VersionLabel\": {},\n          \"Description\": {},\n          \"SourceBuildInformation\": {\n            \"shape\": \"S1f\"\n          },\n          \"SourceBundle\": {\n            \"shape\": \"S1j\"\n          },\n          \"BuildConfiguration\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"CodeBuildServiceRole\",\n              \"Image\"\n            ],\n            \"members\": {\n              \"ArtifactName\": {},\n              \"CodeBuildServiceRole\": {},\n              \"ComputeType\": {},\n              \"Image\": {},\n              \"TimeoutInMinutes\": {\n                \"type\": \"integer\"\n              }\n            }\n          },\n          \"AutoCreateApplication\": {\n            \"type\": \"boolean\"\n          },\n          \"Process\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1r\",\n        \"resultWrapper\": \"CreateApplicationVersionResult\"\n      }\n    },\n    \"CreateConfigurationTemplate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ApplicationName\",\n          \"TemplateName\"\n        ],\n        \"members\": {\n          \"ApplicationName\": {},\n          \"TemplateName\": {},\n          \"SolutionStackName\": {},\n          \"SourceConfiguration\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"ApplicationName\": {},\n              \"TemplateName\": {}\n            }\n          },\n          \"EnvironmentId\": {},\n          \"Description\": {},\n          \"OptionSettings\": {\n            \"shape\": \"S1w\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S22\",\n        \"resultWrapper\": \"CreateConfigurationTemplateResult\"\n      }\n    },\n    \"CreateEnvironment\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ApplicationName\"\n        ],\n        \"members\": {\n          \"ApplicationName\": {},\n          \"EnvironmentName\": {},\n          \"GroupName\": {},\n          \"Description\": {},\n          \"CNAMEPrefix\": {},\n          \"Tier\": {\n            \"shape\": \"S10\"\n          },\n          \"Tags\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Key\": {},\n                \"Value\": {}\n              }\n            }\n          },\n          \"VersionLabel\": {},\n          \"TemplateName\": {},\n          \"SolutionStackName\": {},\n          \"OptionSettings\": {\n            \"shape\": \"S1w\"\n          },\n          \"OptionsToRemove\": {\n            \"shape\": \"S29\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sk\",\n        \"resultWrapper\": \"CreateEnvironmentResult\"\n      }\n    },\n    \"CreateStorageLocation\": {\n      \"output\": {\n        \"resultWrapper\": \"CreateStorageLocationResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"S3Bucket\": {}\n        }\n      }\n    },\n    \"DeleteApplication\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ApplicationName\"\n        ],\n        \"members\": {\n          \"ApplicationName\": {},\n          \"TerminateEnvByForce\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"DeleteApplicationVersion\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ApplicationName\",\n          \"VersionLabel\"\n        ],\n        \"members\": {\n          \"ApplicationName\": {},\n          \"VersionLabel\": {},\n          \"DeleteSourceBundle\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"DeleteConfigurationTemplate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ApplicationName\",\n          \"TemplateName\"\n        ],\n        \"members\": {\n          \"ApplicationName\": {},\n          \"TemplateName\": {}\n        }\n      }\n    },\n    \"DeleteEnvironmentConfiguration\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ApplicationName\",\n          \"EnvironmentName\"\n        ],\n        \"members\": {\n          \"ApplicationName\": {},\n          \"EnvironmentName\": {}\n        }\n      }\n    },\n    \"DescribeApplicationVersions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ApplicationName\": {},\n          \"VersionLabels\": {\n            \"shape\": \"S1c\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeApplicationVersionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ApplicationVersions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1s\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeApplications\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ApplicationNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeApplicationsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Applications\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1b\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeConfigurationOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ApplicationName\": {},\n          \"TemplateName\": {},\n          \"EnvironmentName\": {},\n          \"SolutionStackName\": {},\n          \"Options\": {\n            \"shape\": \"S29\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeConfigurationOptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"SolutionStackName\": {},\n          \"Options\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Namespace\": {},\n                \"Name\": {},\n                \"DefaultValue\": {},\n                \"ChangeSeverity\": {},\n                \"UserDefined\": {\n                  \"type\": \"boolean\"\n                },\n                \"ValueType\": {},\n                \"ValueOptions\": {\n                  \"type\": \"list\",\n                  \"member\": {}\n                },\n                \"MinValue\": {\n                  \"type\": \"integer\"\n                },\n                \"MaxValue\": {\n                  \"type\": \"integer\"\n                },\n                \"MaxLength\": {\n                  \"type\": \"integer\"\n                },\n                \"Regex\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"Pattern\": {},\n                    \"Label\": {}\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeConfigurationSettings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ApplicationName\"\n        ],\n        \"members\": {\n          \"ApplicationName\": {},\n          \"TemplateName\": {},\n          \"EnvironmentName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeConfigurationSettingsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConfigurationSettings\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S22\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEnvironmentHealth\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EnvironmentName\": {},\n          \"EnvironmentId\": {},\n          \"AttributeNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEnvironmentHealthResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EnvironmentName\": {},\n          \"HealthStatus\": {},\n          \"Status\": {},\n          \"Color\": {},\n          \"Causes\": {\n            \"shape\": \"S3e\"\n          },\n          \"ApplicationMetrics\": {\n            \"shape\": \"S3g\"\n          },\n          \"InstancesHealth\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"NoData\": {\n                \"type\": \"integer\"\n              },\n              \"Unknown\": {\n                \"type\": \"integer\"\n              },\n              \"Pending\": {\n                \"type\": \"integer\"\n              },\n              \"Ok\": {\n                \"type\": \"integer\"\n              },\n              \"Info\": {\n                \"type\": \"integer\"\n              },\n              \"Warning\": {\n                \"type\": \"integer\"\n              },\n              \"Degraded\": {\n                \"type\": \"integer\"\n              },\n              \"Severe\": {\n                \"type\": \"integer\"\n              }\n            }\n          },\n          \"RefreshedAt\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"DescribeEnvironmentManagedActionHistory\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EnvironmentId\": {},\n          \"EnvironmentName\": {},\n          \"NextToken\": {},\n          \"MaxItems\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEnvironmentManagedActionHistoryResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ManagedActionHistoryItems\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ActionId\": {},\n                \"ActionType\": {},\n                \"ActionDescription\": {},\n                \"FailureType\": {},\n                \"Status\": {},\n                \"FailureDescription\": {},\n                \"ExecutedTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"FinishedTime\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeEnvironmentManagedActions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EnvironmentName\": {},\n          \"EnvironmentId\": {},\n          \"Status\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEnvironmentManagedActionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ManagedActions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ActionId\": {},\n                \"ActionDescription\": {},\n                \"ActionType\": {},\n                \"Status\": {},\n                \"WindowStartTime\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEnvironmentResources\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EnvironmentId\": {},\n          \"EnvironmentName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEnvironmentResourcesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EnvironmentResources\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"EnvironmentName\": {},\n              \"AutoScalingGroups\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"Name\": {}\n                  }\n                }\n              },\n              \"Instances\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"Id\": {}\n                  }\n                }\n              },\n              \"LaunchConfigurations\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"Name\": {}\n                  }\n                }\n              },\n              \"LoadBalancers\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"Name\": {}\n                  }\n                }\n              },\n              \"Triggers\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"Name\": {}\n                  }\n                }\n              },\n              \"Queues\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"Name\": {},\n                    \"URL\": {}\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEnvironments\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ApplicationName\": {},\n          \"VersionLabel\": {},\n          \"EnvironmentIds\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"EnvironmentNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"IncludeDeleted\": {\n            \"type\": \"boolean\"\n          },\n          \"IncludedDeletedBackTo\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Si\",\n        \"resultWrapper\": \"DescribeEnvironmentsResult\"\n      }\n    },\n    \"DescribeEvents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ApplicationName\": {},\n          \"VersionLabel\": {},\n          \"TemplateName\": {},\n          \"EnvironmentId\": {},\n          \"EnvironmentName\": {},\n          \"RequestId\": {},\n          \"Severity\": {},\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Events\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"EventDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Message\": {},\n                \"ApplicationName\": {},\n                \"VersionLabel\": {},\n                \"TemplateName\": {},\n                \"EnvironmentName\": {},\n                \"RequestId\": {},\n                \"Severity\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeInstancesHealth\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EnvironmentName\": {},\n          \"EnvironmentId\": {},\n          \"AttributeNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeInstancesHealthResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceHealthList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"InstanceId\": {},\n                \"HealthStatus\": {},\n                \"Color\": {},\n                \"Causes\": {\n                  \"shape\": \"S3e\"\n                },\n                \"LaunchedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"ApplicationMetrics\": {\n                  \"shape\": \"S3g\"\n                },\n                \"System\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"CPUUtilization\": {\n                      \"type\": \"structure\",\n                      \"members\": {\n                        \"User\": {\n                          \"type\": \"double\"\n                        },\n                        \"Nice\": {\n                          \"type\": \"double\"\n                        },\n                        \"System\": {\n                          \"type\": \"double\"\n                        },\n                        \"Idle\": {\n                          \"type\": \"double\"\n                        },\n                        \"IOWait\": {\n                          \"type\": \"double\"\n                        },\n                        \"IRQ\": {\n                          \"type\": \"double\"\n                        },\n                        \"SoftIRQ\": {\n                          \"type\": \"double\"\n                        }\n                      }\n                    },\n                    \"LoadAverage\": {\n                      \"type\": \"list\",\n                      \"member\": {\n                        \"type\": \"double\"\n                      }\n                    }\n                  }\n                },\n                \"Deployment\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"VersionLabel\": {},\n                    \"DeploymentId\": {\n                      \"type\": \"long\"\n                    },\n                    \"Status\": {},\n                    \"DeploymentTime\": {\n                      \"type\": \"timestamp\"\n                    }\n                  }\n                },\n                \"AvailabilityZone\": {},\n                \"InstanceType\": {}\n              }\n            }\n          },\n          \"RefreshedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListAvailableSolutionStacks\": {\n      \"output\": {\n        \"resultWrapper\": \"ListAvailableSolutionStacksResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"SolutionStacks\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"SolutionStackDetails\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"SolutionStackName\": {},\n                \"PermittedFileTypes\": {\n                  \"type\": \"list\",\n                  \"member\": {}\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"RebuildEnvironment\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EnvironmentId\": {},\n          \"EnvironmentName\": {}\n        }\n      }\n    },\n    \"RequestEnvironmentInfo\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InfoType\"\n        ],\n        \"members\": {\n          \"EnvironmentId\": {},\n          \"EnvironmentName\": {},\n          \"InfoType\": {}\n        }\n      }\n    },\n    \"RestartAppServer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EnvironmentId\": {},\n          \"EnvironmentName\": {}\n        }\n      }\n    },\n    \"RetrieveEnvironmentInfo\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InfoType\"\n        ],\n        \"members\": {\n          \"EnvironmentId\": {},\n          \"EnvironmentName\": {},\n          \"InfoType\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RetrieveEnvironmentInfoResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EnvironmentInfo\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"InfoType\": {},\n                \"Ec2InstanceId\": {},\n                \"SampleTimestamp\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Message\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"SwapEnvironmentCNAMEs\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SourceEnvironmentId\": {},\n          \"SourceEnvironmentName\": {},\n          \"DestinationEnvironmentId\": {},\n          \"DestinationEnvironmentName\": {}\n        }\n      }\n    },\n    \"TerminateEnvironment\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EnvironmentId\": {},\n          \"EnvironmentName\": {},\n          \"TerminateResources\": {\n            \"type\": \"boolean\"\n          },\n          \"ForceTerminate\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sk\",\n        \"resultWrapper\": \"TerminateEnvironmentResult\"\n      }\n    },\n    \"UpdateApplication\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ApplicationName\"\n        ],\n        \"members\": {\n          \"ApplicationName\": {},\n          \"Description\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1a\",\n        \"resultWrapper\": \"UpdateApplicationResult\"\n      }\n    },\n    \"UpdateApplicationResourceLifecycle\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ApplicationName\",\n          \"ResourceLifecycleConfig\"\n        ],\n        \"members\": {\n          \"ApplicationName\": {},\n          \"ResourceLifecycleConfig\": {\n            \"shape\": \"S14\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"UpdateApplicationResourceLifecycleResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ApplicationName\": {},\n          \"ResourceLifecycleConfig\": {\n            \"shape\": \"S14\"\n          }\n        }\n      }\n    },\n    \"UpdateApplicationVersion\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ApplicationName\",\n          \"VersionLabel\"\n        ],\n        \"members\": {\n          \"ApplicationName\": {},\n          \"VersionLabel\": {},\n          \"Description\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1r\",\n        \"resultWrapper\": \"UpdateApplicationVersionResult\"\n      }\n    },\n    \"UpdateConfigurationTemplate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ApplicationName\",\n          \"TemplateName\"\n        ],\n        \"members\": {\n          \"ApplicationName\": {},\n          \"TemplateName\": {},\n          \"Description\": {},\n          \"OptionSettings\": {\n            \"shape\": \"S1w\"\n          },\n          \"OptionsToRemove\": {\n            \"shape\": \"S29\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S22\",\n        \"resultWrapper\": \"UpdateConfigurationTemplateResult\"\n      }\n    },\n    \"UpdateEnvironment\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ApplicationName\": {},\n          \"EnvironmentId\": {},\n          \"EnvironmentName\": {},\n          \"GroupName\": {},\n          \"Description\": {},\n          \"Tier\": {\n            \"shape\": \"S10\"\n          },\n          \"VersionLabel\": {},\n          \"TemplateName\": {},\n          \"SolutionStackName\": {},\n          \"OptionSettings\": {\n            \"shape\": \"S1w\"\n          },\n          \"OptionsToRemove\": {\n            \"shape\": \"S29\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sk\",\n        \"resultWrapper\": \"UpdateEnvironmentResult\"\n      }\n    },\n    \"ValidateConfigurationSettings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ApplicationName\",\n          \"OptionSettings\"\n        ],\n        \"members\": {\n          \"ApplicationName\": {},\n          \"TemplateName\": {},\n          \"EnvironmentName\": {},\n          \"OptionSettings\": {\n            \"shape\": \"S1w\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ValidateConfigurationSettingsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Messages\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Message\": {},\n                \"Severity\": {},\n                \"Namespace\": {},\n                \"OptionName\": {}\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"Si\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Environments\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      }\n    },\n    \"Sk\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"EnvironmentName\": {},\n        \"EnvironmentId\": {},\n        \"ApplicationName\": {},\n        \"VersionLabel\": {},\n        \"SolutionStackName\": {},\n        \"TemplateName\": {},\n        \"Description\": {},\n        \"EndpointURL\": {},\n        \"CNAME\": {},\n        \"DateCreated\": {\n          \"type\": \"timestamp\"\n        },\n        \"DateUpdated\": {\n          \"type\": \"timestamp\"\n        },\n        \"Status\": {},\n        \"AbortableOperationInProgress\": {\n          \"type\": \"boolean\"\n        },\n        \"Health\": {},\n        \"HealthStatus\": {},\n        \"Resources\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"LoadBalancer\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"LoadBalancerName\": {},\n                \"Domain\": {},\n                \"Listeners\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"Protocol\": {},\n                      \"Port\": {\n                        \"type\": \"integer\"\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        },\n        \"Tier\": {\n          \"shape\": \"S10\"\n        },\n        \"EnvironmentLinks\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"LinkName\": {},\n              \"EnvironmentName\": {}\n            }\n          }\n        }\n      }\n    },\n    \"S10\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Name\": {},\n        \"Type\": {},\n        \"Version\": {}\n      }\n    },\n    \"S14\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ServiceRole\": {},\n        \"VersionLifecycleConfig\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"MaxCountRule\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Enabled\"\n              ],\n              \"members\": {\n                \"Enabled\": {\n                  \"type\": \"boolean\"\n                },\n                \"MaxCount\": {\n                  \"type\": \"integer\"\n                },\n                \"DeleteSourceFromS3\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            },\n            \"MaxAgeRule\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Enabled\"\n              ],\n              \"members\": {\n                \"Enabled\": {\n                  \"type\": \"boolean\"\n                },\n                \"MaxAgeInDays\": {\n                  \"type\": \"integer\"\n                },\n                \"DeleteSourceFromS3\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S1a\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Application\": {\n          \"shape\": \"S1b\"\n        }\n      }\n    },\n    \"S1b\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ApplicationName\": {},\n        \"Description\": {},\n        \"DateCreated\": {\n          \"type\": \"timestamp\"\n        },\n        \"DateUpdated\": {\n          \"type\": \"timestamp\"\n        },\n        \"Versions\": {\n          \"shape\": \"S1c\"\n        },\n        \"ConfigurationTemplates\": {\n          \"type\": \"list\",\n          \"member\": {}\n        },\n        \"ResourceLifecycleConfig\": {\n          \"shape\": \"S14\"\n        }\n      }\n    },\n    \"S1c\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S1f\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"SourceType\",\n        \"SourceRepository\",\n        \"SourceLocation\"\n      ],\n      \"members\": {\n        \"SourceType\": {},\n        \"SourceRepository\": {},\n        \"SourceLocation\": {}\n      }\n    },\n    \"S1j\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"S3Bucket\": {},\n        \"S3Key\": {}\n      }\n    },\n    \"S1r\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ApplicationVersion\": {\n          \"shape\": \"S1s\"\n        }\n      }\n    },\n    \"S1s\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ApplicationName\": {},\n        \"Description\": {},\n        \"VersionLabel\": {},\n        \"SourceBuildInformation\": {\n          \"shape\": \"S1f\"\n        },\n        \"BuildArn\": {},\n        \"SourceBundle\": {\n          \"shape\": \"S1j\"\n        },\n        \"DateCreated\": {\n          \"type\": \"timestamp\"\n        },\n        \"DateUpdated\": {\n          \"type\": \"timestamp\"\n        },\n        \"Status\": {}\n      }\n    },\n    \"S1w\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourceName\": {},\n          \"Namespace\": {},\n          \"OptionName\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"S22\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"SolutionStackName\": {},\n        \"ApplicationName\": {},\n        \"TemplateName\": {},\n        \"Description\": {},\n        \"EnvironmentName\": {},\n        \"DeploymentStatus\": {},\n        \"DateCreated\": {\n          \"type\": \"timestamp\"\n        },\n        \"DateUpdated\": {\n          \"type\": \"timestamp\"\n        },\n        \"OptionSettings\": {\n          \"shape\": \"S1w\"\n        }\n      }\n    },\n    \"S29\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourceName\": {},\n          \"Namespace\": {},\n          \"OptionName\": {}\n        }\n      }\n    },\n    \"S3e\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S3g\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Duration\": {\n          \"type\": \"integer\"\n        },\n        \"RequestCount\": {\n          \"type\": \"integer\"\n        },\n        \"StatusCodes\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Status2xx\": {\n              \"type\": \"integer\"\n            },\n            \"Status3xx\": {\n              \"type\": \"integer\"\n            },\n            \"Status4xx\": {\n              \"type\": \"integer\"\n            },\n            \"Status5xx\": {\n              \"type\": \"integer\"\n            }\n          }\n        },\n        \"Latency\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"P999\": {\n              \"type\": \"double\"\n            },\n            \"P99\": {\n              \"type\": \"double\"\n            },\n            \"P95\": {\n              \"type\": \"double\"\n            },\n            \"P90\": {\n              \"type\": \"double\"\n            },\n            \"P85\": {\n              \"type\": \"double\"\n            },\n            \"P75\": {\n              \"type\": \"double\"\n            },\n            \"P50\": {\n              \"type\": \"double\"\n            },\n            \"P10\": {\n              \"type\": \"double\"\n            }\n          }\n        }\n      }\n    }\n  }\n}\n},{}],54:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeApplicationVersions\": {\n      \"result_key\": \"ApplicationVersions\"\n    },\n    \"DescribeApplications\": {\n      \"result_key\": \"Applications\"\n    },\n    \"DescribeConfigurationOptions\": {\n      \"result_key\": \"Options\"\n    },\n    \"DescribeEnvironments\": {\n      \"result_key\": \"Environments\"\n    },\n    \"DescribeEvents\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"Events\"\n    },\n    \"ListAvailableSolutionStacks\": {\n      \"result_key\": \"SolutionStacks\"\n    }\n  }\n}\n\n},{}],55:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"elasticloadbalancing-2012-06-01\",\n    \"apiVersion\": \"2012-06-01\",\n    \"endpointPrefix\": \"elasticloadbalancing\",\n    \"protocol\": \"query\",\n    \"serviceFullName\": \"Elastic Load Balancing\",\n    \"signatureVersion\": \"v4\",\n    \"xmlNamespace\": \"http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/\"\n  },\n  \"operations\": {\n    \"AddTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerNames\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"LoadBalancerNames\": {\n            \"shape\": \"S2\"\n          },\n          \"Tags\": {\n            \"shape\": \"S4\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AddTagsResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"ApplySecurityGroupsToLoadBalancer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"SecurityGroups\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"SecurityGroups\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ApplySecurityGroupsToLoadBalancerResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"SecurityGroups\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      }\n    },\n    \"AttachLoadBalancerToSubnets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"Subnets\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"Subnets\": {\n            \"shape\": \"Se\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AttachLoadBalancerToSubnetsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Subnets\": {\n            \"shape\": \"Se\"\n          }\n        }\n      }\n    },\n    \"ConfigureHealthCheck\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"HealthCheck\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"HealthCheck\": {\n            \"shape\": \"Si\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ConfigureHealthCheckResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"HealthCheck\": {\n            \"shape\": \"Si\"\n          }\n        }\n      }\n    },\n    \"CreateAppCookieStickinessPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"PolicyName\",\n          \"CookieName\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"PolicyName\": {},\n          \"CookieName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateAppCookieStickinessPolicyResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateLBCookieStickinessPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"PolicyName\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"PolicyName\": {},\n          \"CookieExpirationPeriod\": {\n            \"type\": \"long\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateLBCookieStickinessPolicyResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateLoadBalancer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"Listeners\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"Listeners\": {\n            \"shape\": \"Sx\"\n          },\n          \"AvailabilityZones\": {\n            \"shape\": \"S13\"\n          },\n          \"Subnets\": {\n            \"shape\": \"Se\"\n          },\n          \"SecurityGroups\": {\n            \"shape\": \"Sa\"\n          },\n          \"Scheme\": {},\n          \"Tags\": {\n            \"shape\": \"S4\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateLoadBalancerResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DNSName\": {}\n        }\n      }\n    },\n    \"CreateLoadBalancerListeners\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"Listeners\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"Listeners\": {\n            \"shape\": \"Sx\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateLoadBalancerListenersResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateLoadBalancerPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"PolicyName\",\n          \"PolicyTypeName\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"PolicyName\": {},\n          \"PolicyTypeName\": {},\n          \"PolicyAttributes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"AttributeName\": {},\n                \"AttributeValue\": {}\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateLoadBalancerPolicyResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteLoadBalancer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteLoadBalancerResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteLoadBalancerListeners\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"LoadBalancerPorts\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"LoadBalancerPorts\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"integer\"\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteLoadBalancerListenersResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteLoadBalancerPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"PolicyName\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"PolicyName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteLoadBalancerPolicyResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeregisterInstancesFromLoadBalancer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"Instances\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"Instances\": {\n            \"shape\": \"S1p\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeregisterInstancesFromLoadBalancerResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Instances\": {\n            \"shape\": \"S1p\"\n          }\n        }\n      }\n    },\n    \"DescribeInstanceHealth\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"Instances\": {\n            \"shape\": \"S1p\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeInstanceHealthResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceStates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"InstanceId\": {},\n                \"State\": {},\n                \"ReasonCode\": {},\n                \"Description\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeLoadBalancerAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeLoadBalancerAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoadBalancerAttributes\": {\n            \"shape\": \"S22\"\n          }\n        }\n      }\n    },\n    \"DescribeLoadBalancerPolicies\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"PolicyNames\": {\n            \"shape\": \"S2k\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeLoadBalancerPoliciesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"PolicyDescriptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"PolicyName\": {},\n                \"PolicyTypeName\": {},\n                \"PolicyAttributeDescriptions\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"AttributeName\": {},\n                      \"AttributeValue\": {}\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeLoadBalancerPolicyTypes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PolicyTypeNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeLoadBalancerPolicyTypesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"PolicyTypeDescriptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"PolicyTypeName\": {},\n                \"Description\": {},\n                \"PolicyAttributeTypeDescriptions\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"AttributeName\": {},\n                      \"AttributeType\": {},\n                      \"Description\": {},\n                      \"DefaultValue\": {},\n                      \"Cardinality\": {}\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeLoadBalancers\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoadBalancerNames\": {\n            \"shape\": \"S2\"\n          },\n          \"Marker\": {},\n          \"PageSize\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeLoadBalancersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoadBalancerDescriptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"LoadBalancerName\": {},\n                \"DNSName\": {},\n                \"CanonicalHostedZoneName\": {},\n                \"CanonicalHostedZoneNameID\": {},\n                \"ListenerDescriptions\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"Listener\": {\n                        \"shape\": \"Sy\"\n                      },\n                      \"PolicyNames\": {\n                        \"shape\": \"S2k\"\n                      }\n                    }\n                  }\n                },\n                \"Policies\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"AppCookieStickinessPolicies\": {\n                      \"type\": \"list\",\n                      \"member\": {\n                        \"type\": \"structure\",\n                        \"members\": {\n                          \"PolicyName\": {},\n                          \"CookieName\": {}\n                        }\n                      }\n                    },\n                    \"LBCookieStickinessPolicies\": {\n                      \"type\": \"list\",\n                      \"member\": {\n                        \"type\": \"structure\",\n                        \"members\": {\n                          \"PolicyName\": {},\n                          \"CookieExpirationPeriod\": {\n                            \"type\": \"long\"\n                          }\n                        }\n                      }\n                    },\n                    \"OtherPolicies\": {\n                      \"shape\": \"S2k\"\n                    }\n                  }\n                },\n                \"BackendServerDescriptions\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"InstancePort\": {\n                        \"type\": \"integer\"\n                      },\n                      \"PolicyNames\": {\n                        \"shape\": \"S2k\"\n                      }\n                    }\n                  }\n                },\n                \"AvailabilityZones\": {\n                  \"shape\": \"S13\"\n                },\n                \"Subnets\": {\n                  \"shape\": \"Se\"\n                },\n                \"VPCId\": {},\n                \"Instances\": {\n                  \"shape\": \"S1p\"\n                },\n                \"HealthCheck\": {\n                  \"shape\": \"Si\"\n                },\n                \"SourceSecurityGroup\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"OwnerAlias\": {},\n                    \"GroupName\": {}\n                  }\n                },\n                \"SecurityGroups\": {\n                  \"shape\": \"Sa\"\n                },\n                \"CreatedTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Scheme\": {}\n              }\n            }\n          },\n          \"NextMarker\": {}\n        }\n      }\n    },\n    \"DescribeTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerNames\"\n        ],\n        \"members\": {\n          \"LoadBalancerNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeTagsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TagDescriptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"LoadBalancerName\": {},\n                \"Tags\": {\n                  \"shape\": \"S4\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DetachLoadBalancerFromSubnets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"Subnets\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"Subnets\": {\n            \"shape\": \"Se\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DetachLoadBalancerFromSubnetsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Subnets\": {\n            \"shape\": \"Se\"\n          }\n        }\n      }\n    },\n    \"DisableAvailabilityZonesForLoadBalancer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"AvailabilityZones\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"AvailabilityZones\": {\n            \"shape\": \"S13\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DisableAvailabilityZonesForLoadBalancerResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"AvailabilityZones\": {\n            \"shape\": \"S13\"\n          }\n        }\n      }\n    },\n    \"EnableAvailabilityZonesForLoadBalancer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"AvailabilityZones\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"AvailabilityZones\": {\n            \"shape\": \"S13\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"EnableAvailabilityZonesForLoadBalancerResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"AvailabilityZones\": {\n            \"shape\": \"S13\"\n          }\n        }\n      }\n    },\n    \"ModifyLoadBalancerAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"LoadBalancerAttributes\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"LoadBalancerAttributes\": {\n            \"shape\": \"S22\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyLoadBalancerAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"LoadBalancerAttributes\": {\n            \"shape\": \"S22\"\n          }\n        }\n      }\n    },\n    \"RegisterInstancesWithLoadBalancer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"Instances\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"Instances\": {\n            \"shape\": \"S1p\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RegisterInstancesWithLoadBalancerResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Instances\": {\n            \"shape\": \"S1p\"\n          }\n        }\n      }\n    },\n    \"RemoveTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerNames\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"LoadBalancerNames\": {\n            \"shape\": \"S2\"\n          },\n          \"Tags\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Key\": {}\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RemoveTagsResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SetLoadBalancerListenerSSLCertificate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"LoadBalancerPort\",\n          \"SSLCertificateId\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"LoadBalancerPort\": {\n            \"type\": \"integer\"\n          },\n          \"SSLCertificateId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetLoadBalancerListenerSSLCertificateResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SetLoadBalancerPoliciesForBackendServer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"InstancePort\",\n          \"PolicyNames\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"InstancePort\": {\n            \"type\": \"integer\"\n          },\n          \"PolicyNames\": {\n            \"shape\": \"S2k\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetLoadBalancerPoliciesForBackendServerResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SetLoadBalancerPoliciesOfListener\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerName\",\n          \"LoadBalancerPort\",\n          \"PolicyNames\"\n        ],\n        \"members\": {\n          \"LoadBalancerName\": {},\n          \"LoadBalancerPort\": {\n            \"type\": \"integer\"\n          },\n          \"PolicyNames\": {\n            \"shape\": \"S2k\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetLoadBalancerPoliciesOfListenerResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    }\n  },\n  \"shapes\": {\n    \"S2\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S4\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Key\"\n        ],\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"Sa\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Se\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Si\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Target\",\n        \"Interval\",\n        \"Timeout\",\n        \"UnhealthyThreshold\",\n        \"HealthyThreshold\"\n      ],\n      \"members\": {\n        \"Target\": {},\n        \"Interval\": {\n          \"type\": \"integer\"\n        },\n        \"Timeout\": {\n          \"type\": \"integer\"\n        },\n        \"UnhealthyThreshold\": {\n          \"type\": \"integer\"\n        },\n        \"HealthyThreshold\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"Sx\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"Sy\"\n      }\n    },\n    \"Sy\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Protocol\",\n        \"LoadBalancerPort\",\n        \"InstancePort\"\n      ],\n      \"members\": {\n        \"Protocol\": {},\n        \"LoadBalancerPort\": {\n          \"type\": \"integer\"\n        },\n        \"InstanceProtocol\": {},\n        \"InstancePort\": {\n          \"type\": \"integer\"\n        },\n        \"SSLCertificateId\": {}\n      }\n    },\n    \"S13\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S1p\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceId\": {}\n        }\n      }\n    },\n    \"S22\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CrossZoneLoadBalancing\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Enabled\"\n          ],\n          \"members\": {\n            \"Enabled\": {\n              \"type\": \"boolean\"\n            }\n          }\n        },\n        \"AccessLog\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Enabled\"\n          ],\n          \"members\": {\n            \"Enabled\": {\n              \"type\": \"boolean\"\n            },\n            \"S3BucketName\": {},\n            \"EmitInterval\": {\n              \"type\": \"integer\"\n            },\n            \"S3BucketPrefix\": {}\n          }\n        },\n        \"ConnectionDraining\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Enabled\"\n          ],\n          \"members\": {\n            \"Enabled\": {\n              \"type\": \"boolean\"\n            },\n            \"Timeout\": {\n              \"type\": \"integer\"\n            }\n          }\n        },\n        \"ConnectionSettings\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"IdleTimeout\"\n          ],\n          \"members\": {\n            \"IdleTimeout\": {\n              \"type\": \"integer\"\n            }\n          }\n        },\n        \"AdditionalAttributes\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Key\": {},\n              \"Value\": {}\n            }\n          }\n        }\n      }\n    },\n    \"S2k\": {\n      \"type\": \"list\",\n      \"member\": {}\n    }\n  }\n}\n},{}],56:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeInstanceHealth\": {\n      \"result_key\": \"InstanceStates\"\n    },\n    \"DescribeLoadBalancerPolicies\": {\n      \"result_key\": \"PolicyDescriptions\"\n    },\n    \"DescribeLoadBalancerPolicyTypes\": {\n      \"result_key\": \"PolicyTypeDescriptions\"\n    },\n    \"DescribeLoadBalancers\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"NextMarker\",\n      \"result_key\": \"LoadBalancerDescriptions\"\n    }\n  }\n}\n\n},{}],57:[function(require,module,exports){\nmodule.exports={\n    \"version\":2,\n    \"waiters\":{\n        \"InstanceDeregistered\": {\n          \"delay\": 15,\n          \"operation\": \"DescribeInstanceHealth\",\n          \"maxAttempts\": 40,\n          \"acceptors\": [\n            {\n              \"expected\": \"OutOfService\",\n              \"matcher\": \"pathAll\",\n              \"state\": \"success\",\n              \"argument\": \"InstanceStates[].State\"\n            },\n            {\n              \"matcher\": \"error\",\n              \"expected\": \"InvalidInstance\",\n              \"state\": \"success\"\n            }\n          ]\n        },\n        \"AnyInstanceInService\":{\n            \"acceptors\":[\n                {\n                    \"argument\":\"InstanceStates[].State\",\n                    \"expected\":\"InService\",\n                    \"matcher\":\"pathAny\",\n                    \"state\":\"success\"\n                }\n            ],\n            \"delay\":15,\n            \"maxAttempts\":40,\n            \"operation\":\"DescribeInstanceHealth\"\n        },\n        \"InstanceInService\":{\n            \"acceptors\":[\n                {\n                    \"argument\":\"InstanceStates[].State\",\n                    \"expected\":\"InService\",\n                    \"matcher\":\"pathAll\",\n                    \"state\":\"success\"\n                }\n            ],\n            \"delay\":15,\n            \"maxAttempts\":40,\n            \"operation\":\"DescribeInstanceHealth\"\n        }\n    }\n}\n\n},{}],58:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2015-12-01\",\n    \"endpointPrefix\": \"elasticloadbalancing\",\n    \"protocol\": \"query\",\n    \"serviceAbbreviation\": \"Elastic Load Balancing v2\",\n    \"serviceFullName\": \"Elastic Load Balancing\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"elasticloadbalancingv2-2015-12-01\",\n    \"xmlNamespace\": \"http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/\"\n  },\n  \"operations\": {\n    \"AddTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceArns\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"ResourceArns\": {\n            \"shape\": \"S2\"\n          },\n          \"Tags\": {\n            \"shape\": \"S4\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AddTagsResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateListener\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerArn\",\n          \"Protocol\",\n          \"Port\",\n          \"DefaultActions\"\n        ],\n        \"members\": {\n          \"LoadBalancerArn\": {},\n          \"Protocol\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"SslPolicy\": {},\n          \"Certificates\": {\n            \"shape\": \"Se\"\n          },\n          \"DefaultActions\": {\n            \"shape\": \"Sh\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateListenerResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Listeners\": {\n            \"shape\": \"Sm\"\n          }\n        }\n      }\n    },\n    \"CreateLoadBalancer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Subnets\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Subnets\": {\n            \"shape\": \"Sr\"\n          },\n          \"SecurityGroups\": {\n            \"shape\": \"St\"\n          },\n          \"Scheme\": {},\n          \"Tags\": {\n            \"shape\": \"S4\"\n          },\n          \"IpAddressType\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateLoadBalancerResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoadBalancers\": {\n            \"shape\": \"Sy\"\n          }\n        }\n      }\n    },\n    \"CreateRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ListenerArn\",\n          \"Conditions\",\n          \"Priority\",\n          \"Actions\"\n        ],\n        \"members\": {\n          \"ListenerArn\": {},\n          \"Conditions\": {\n            \"shape\": \"S1c\"\n          },\n          \"Priority\": {\n            \"type\": \"integer\"\n          },\n          \"Actions\": {\n            \"shape\": \"Sh\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateRuleResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Rules\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      }\n    },\n    \"CreateTargetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Protocol\",\n          \"Port\",\n          \"VpcId\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Protocol\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"VpcId\": {},\n          \"HealthCheckProtocol\": {},\n          \"HealthCheckPort\": {},\n          \"HealthCheckPath\": {},\n          \"HealthCheckIntervalSeconds\": {\n            \"type\": \"integer\"\n          },\n          \"HealthCheckTimeoutSeconds\": {\n            \"type\": \"integer\"\n          },\n          \"HealthyThresholdCount\": {\n            \"type\": \"integer\"\n          },\n          \"UnhealthyThresholdCount\": {\n            \"type\": \"integer\"\n          },\n          \"Matcher\": {\n            \"shape\": \"S1v\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateTargetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TargetGroups\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"DeleteListener\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ListenerArn\"\n        ],\n        \"members\": {\n          \"ListenerArn\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteListenerResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteLoadBalancer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerArn\"\n        ],\n        \"members\": {\n          \"LoadBalancerArn\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteLoadBalancerResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleArn\"\n        ],\n        \"members\": {\n          \"RuleArn\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteRuleResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteTargetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TargetGroupArn\"\n        ],\n        \"members\": {\n          \"TargetGroupArn\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteTargetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeregisterTargets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TargetGroupArn\",\n          \"Targets\"\n        ],\n        \"members\": {\n          \"TargetGroupArn\": {},\n          \"Targets\": {\n            \"shape\": \"S2a\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeregisterTargetsResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DescribeListeners\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoadBalancerArn\": {},\n          \"ListenerArns\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"Marker\": {},\n          \"PageSize\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeListenersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Listeners\": {\n            \"shape\": \"Sm\"\n          },\n          \"NextMarker\": {}\n        }\n      }\n    },\n    \"DescribeLoadBalancerAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerArn\"\n        ],\n        \"members\": {\n          \"LoadBalancerArn\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeLoadBalancerAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      }\n    },\n    \"DescribeLoadBalancers\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoadBalancerArns\": {\n            \"shape\": \"S20\"\n          },\n          \"Names\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"Marker\": {},\n          \"PageSize\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeLoadBalancersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoadBalancers\": {\n            \"shape\": \"Sy\"\n          },\n          \"NextMarker\": {}\n        }\n      }\n    },\n    \"DescribeRules\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ListenerArn\": {},\n          \"RuleArns\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeRulesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Rules\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      }\n    },\n    \"DescribeSSLPolicies\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Names\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"Marker\": {},\n          \"PageSize\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeSSLPoliciesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"SslPolicies\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"SslProtocols\": {\n                  \"type\": \"list\",\n                  \"member\": {}\n                },\n                \"Ciphers\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"Name\": {},\n                      \"Priority\": {\n                        \"type\": \"integer\"\n                      }\n                    }\n                  }\n                },\n                \"Name\": {}\n              }\n            }\n          },\n          \"NextMarker\": {}\n        }\n      }\n    },\n    \"DescribeTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceArns\"\n        ],\n        \"members\": {\n          \"ResourceArns\": {\n            \"shape\": \"S2\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeTagsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TagDescriptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ResourceArn\": {},\n                \"Tags\": {\n                  \"shape\": \"S4\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeTargetGroupAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TargetGroupArn\"\n        ],\n        \"members\": {\n          \"TargetGroupArn\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeTargetGroupAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"shape\": \"S3c\"\n          }\n        }\n      }\n    },\n    \"DescribeTargetGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoadBalancerArn\": {},\n          \"TargetGroupArns\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"Names\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"Marker\": {},\n          \"PageSize\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeTargetGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TargetGroups\": {\n            \"shape\": \"S1y\"\n          },\n          \"NextMarker\": {}\n        }\n      }\n    },\n    \"DescribeTargetHealth\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TargetGroupArn\"\n        ],\n        \"members\": {\n          \"TargetGroupArn\": {},\n          \"Targets\": {\n            \"shape\": \"S2a\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeTargetHealthResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TargetHealthDescriptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Target\": {\n                  \"shape\": \"S2b\"\n                },\n                \"HealthCheckPort\": {},\n                \"TargetHealth\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"State\": {},\n                    \"Reason\": {},\n                    \"Description\": {}\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ModifyListener\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ListenerArn\"\n        ],\n        \"members\": {\n          \"ListenerArn\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"Protocol\": {},\n          \"SslPolicy\": {},\n          \"Certificates\": {\n            \"shape\": \"Se\"\n          },\n          \"DefaultActions\": {\n            \"shape\": \"Sh\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyListenerResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Listeners\": {\n            \"shape\": \"Sm\"\n          }\n        }\n      }\n    },\n    \"ModifyLoadBalancerAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerArn\",\n          \"Attributes\"\n        ],\n        \"members\": {\n          \"LoadBalancerArn\": {},\n          \"Attributes\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyLoadBalancerAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      }\n    },\n    \"ModifyRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleArn\"\n        ],\n        \"members\": {\n          \"RuleArn\": {},\n          \"Conditions\": {\n            \"shape\": \"S1c\"\n          },\n          \"Actions\": {\n            \"shape\": \"Sh\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyRuleResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Rules\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      }\n    },\n    \"ModifyTargetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TargetGroupArn\"\n        ],\n        \"members\": {\n          \"TargetGroupArn\": {},\n          \"HealthCheckProtocol\": {},\n          \"HealthCheckPort\": {},\n          \"HealthCheckPath\": {},\n          \"HealthCheckIntervalSeconds\": {\n            \"type\": \"integer\"\n          },\n          \"HealthCheckTimeoutSeconds\": {\n            \"type\": \"integer\"\n          },\n          \"HealthyThresholdCount\": {\n            \"type\": \"integer\"\n          },\n          \"UnhealthyThresholdCount\": {\n            \"type\": \"integer\"\n          },\n          \"Matcher\": {\n            \"shape\": \"S1v\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyTargetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TargetGroups\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"ModifyTargetGroupAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TargetGroupArn\",\n          \"Attributes\"\n        ],\n        \"members\": {\n          \"TargetGroupArn\": {},\n          \"Attributes\": {\n            \"shape\": \"S3c\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyTargetGroupAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"shape\": \"S3c\"\n          }\n        }\n      }\n    },\n    \"RegisterTargets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TargetGroupArn\",\n          \"Targets\"\n        ],\n        \"members\": {\n          \"TargetGroupArn\": {},\n          \"Targets\": {\n            \"shape\": \"S2a\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RegisterTargetsResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"RemoveTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceArns\",\n          \"TagKeys\"\n        ],\n        \"members\": {\n          \"ResourceArns\": {\n            \"shape\": \"S2\"\n          },\n          \"TagKeys\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RemoveTagsResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SetIpAddressType\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerArn\",\n          \"IpAddressType\"\n        ],\n        \"members\": {\n          \"LoadBalancerArn\": {},\n          \"IpAddressType\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetIpAddressTypeResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"IpAddressType\": {}\n        }\n      }\n    },\n    \"SetRulePriorities\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RulePriorities\"\n        ],\n        \"members\": {\n          \"RulePriorities\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"RuleArn\": {},\n                \"Priority\": {\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetRulePrioritiesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Rules\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      }\n    },\n    \"SetSecurityGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerArn\",\n          \"SecurityGroups\"\n        ],\n        \"members\": {\n          \"LoadBalancerArn\": {},\n          \"SecurityGroups\": {\n            \"shape\": \"St\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetSecurityGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"SecurityGroupIds\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"SetSubnets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LoadBalancerArn\",\n          \"Subnets\"\n        ],\n        \"members\": {\n          \"LoadBalancerArn\": {},\n          \"Subnets\": {\n            \"shape\": \"Sr\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetSubnetsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"AvailabilityZones\": {\n            \"shape\": \"S18\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S2\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S4\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Key\"\n        ],\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"Se\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CertificateArn\": {}\n        }\n      }\n    },\n    \"Sh\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Type\",\n          \"TargetGroupArn\"\n        ],\n        \"members\": {\n          \"Type\": {},\n          \"TargetGroupArn\": {}\n        }\n      }\n    },\n    \"Sm\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ListenerArn\": {},\n          \"LoadBalancerArn\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"Protocol\": {},\n          \"Certificates\": {\n            \"shape\": \"Se\"\n          },\n          \"SslPolicy\": {},\n          \"DefaultActions\": {\n            \"shape\": \"Sh\"\n          }\n        }\n      }\n    },\n    \"Sr\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"St\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sy\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoadBalancerArn\": {},\n          \"DNSName\": {},\n          \"CanonicalHostedZoneId\": {},\n          \"CreatedTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"LoadBalancerName\": {},\n          \"Scheme\": {},\n          \"VpcId\": {},\n          \"State\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Code\": {},\n              \"Reason\": {}\n            }\n          },\n          \"Type\": {},\n          \"AvailabilityZones\": {\n            \"shape\": \"S18\"\n          },\n          \"SecurityGroups\": {\n            \"shape\": \"St\"\n          },\n          \"IpAddressType\": {}\n        }\n      }\n    },\n    \"S18\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ZoneName\": {},\n          \"SubnetId\": {}\n        }\n      }\n    },\n    \"S1c\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Field\": {},\n          \"Values\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"S1j\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RuleArn\": {},\n          \"Priority\": {},\n          \"Conditions\": {\n            \"shape\": \"S1c\"\n          },\n          \"Actions\": {\n            \"shape\": \"Sh\"\n          },\n          \"IsDefault\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"S1v\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"HttpCode\"\n      ],\n      \"members\": {\n        \"HttpCode\": {}\n      }\n    },\n    \"S1y\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TargetGroupArn\": {},\n          \"TargetGroupName\": {},\n          \"Protocol\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"VpcId\": {},\n          \"HealthCheckProtocol\": {},\n          \"HealthCheckPort\": {},\n          \"HealthCheckIntervalSeconds\": {\n            \"type\": \"integer\"\n          },\n          \"HealthCheckTimeoutSeconds\": {\n            \"type\": \"integer\"\n          },\n          \"HealthyThresholdCount\": {\n            \"type\": \"integer\"\n          },\n          \"UnhealthyThresholdCount\": {\n            \"type\": \"integer\"\n          },\n          \"HealthCheckPath\": {},\n          \"Matcher\": {\n            \"shape\": \"S1v\"\n          },\n          \"LoadBalancerArns\": {\n            \"shape\": \"S20\"\n          }\n        }\n      }\n    },\n    \"S20\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S2a\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S2b\"\n      }\n    },\n    \"S2b\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Id\"\n      ],\n      \"members\": {\n        \"Id\": {},\n        \"Port\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"S2l\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"S3c\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    }\n  }\n}\n},{}],59:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeListeners\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"NextMarker\",\n      \"result_key\": \"Listeners\"\n    },\n    \"DescribeLoadBalancers\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"NextMarker\",\n      \"result_key\": \"LoadBalancers\"\n    },\n    \"DescribeTargetGroups\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"NextMarker\",\n      \"result_key\": \"TargetGroups\"\n    }\n  }\n}\n},{}],60:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"elasticmapreduce-2009-03-31\",\n    \"apiVersion\": \"2009-03-31\",\n    \"endpointPrefix\": \"elasticmapreduce\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"Amazon EMR\",\n    \"serviceFullName\": \"Amazon Elastic MapReduce\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"ElasticMapReduce\",\n    \"timestampFormat\": \"unixTimestamp\"\n  },\n  \"operations\": {\n    \"AddInstanceGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceGroups\",\n          \"JobFlowId\"\n        ],\n        \"members\": {\n          \"InstanceGroups\": {\n            \"shape\": \"S2\"\n          },\n          \"JobFlowId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"JobFlowId\": {},\n          \"InstanceGroupIds\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"AddJobFlowSteps\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"JobFlowId\",\n          \"Steps\"\n        ],\n        \"members\": {\n          \"JobFlowId\": {},\n          \"Steps\": {\n            \"shape\": \"S10\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StepIds\": {\n            \"shape\": \"S19\"\n          }\n        }\n      }\n    },\n    \"AddTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceId\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"ResourceId\": {},\n          \"Tags\": {\n            \"shape\": \"S1c\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CancelSteps\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterId\": {},\n          \"StepIds\": {\n            \"shape\": \"S19\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CancelStepsInfoList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"StepId\": {},\n                \"Status\": {},\n                \"Reason\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"CreateSecurityConfiguration\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"SecurityConfiguration\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"SecurityConfiguration\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"CreationDateTime\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"CreationDateTime\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"DeleteSecurityConfiguration\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DescribeCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterId\"\n        ],\n        \"members\": {\n          \"ClusterId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Cluster\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Id\": {},\n              \"Name\": {},\n              \"Status\": {\n                \"shape\": \"S1u\"\n              },\n              \"Ec2InstanceAttributes\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"Ec2KeyName\": {},\n                  \"Ec2SubnetId\": {},\n                  \"Ec2AvailabilityZone\": {},\n                  \"IamInstanceProfile\": {},\n                  \"EmrManagedMasterSecurityGroup\": {},\n                  \"EmrManagedSlaveSecurityGroup\": {},\n                  \"ServiceAccessSecurityGroup\": {},\n                  \"AdditionalMasterSecurityGroups\": {\n                    \"shape\": \"S20\"\n                  },\n                  \"AdditionalSlaveSecurityGroups\": {\n                    \"shape\": \"S20\"\n                  }\n                }\n              },\n              \"LogUri\": {},\n              \"RequestedAmiVersion\": {},\n              \"RunningAmiVersion\": {},\n              \"ReleaseLabel\": {},\n              \"AutoTerminate\": {\n                \"type\": \"boolean\"\n              },\n              \"TerminationProtected\": {\n                \"type\": \"boolean\"\n              },\n              \"VisibleToAllUsers\": {\n                \"type\": \"boolean\"\n              },\n              \"Applications\": {\n                \"shape\": \"S22\"\n              },\n              \"Tags\": {\n                \"shape\": \"S1c\"\n              },\n              \"ServiceRole\": {},\n              \"NormalizedInstanceHours\": {\n                \"type\": \"integer\"\n              },\n              \"MasterPublicDnsName\": {},\n              \"Configurations\": {\n                \"shape\": \"S9\"\n              },\n              \"SecurityConfiguration\": {},\n              \"AutoScalingRole\": {},\n              \"ScaleDownBehavior\": {}\n            }\n          }\n        }\n      }\n    },\n    \"DescribeJobFlows\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CreatedAfter\": {\n            \"type\": \"timestamp\"\n          },\n          \"CreatedBefore\": {\n            \"type\": \"timestamp\"\n          },\n          \"JobFlowIds\": {\n            \"shape\": \"S17\"\n          },\n          \"JobFlowStates\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"JobFlows\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"JobFlowId\",\n                \"Name\",\n                \"ExecutionStatusDetail\",\n                \"Instances\"\n              ],\n              \"members\": {\n                \"JobFlowId\": {},\n                \"Name\": {},\n                \"LogUri\": {},\n                \"AmiVersion\": {},\n                \"ExecutionStatusDetail\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"State\",\n                    \"CreationDateTime\"\n                  ],\n                  \"members\": {\n                    \"State\": {},\n                    \"CreationDateTime\": {\n                      \"type\": \"timestamp\"\n                    },\n                    \"StartDateTime\": {\n                      \"type\": \"timestamp\"\n                    },\n                    \"ReadyDateTime\": {\n                      \"type\": \"timestamp\"\n                    },\n                    \"EndDateTime\": {\n                      \"type\": \"timestamp\"\n                    },\n                    \"LastStateChangeReason\": {}\n                  }\n                },\n                \"Instances\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"MasterInstanceType\",\n                    \"SlaveInstanceType\",\n                    \"InstanceCount\"\n                  ],\n                  \"members\": {\n                    \"MasterInstanceType\": {},\n                    \"MasterPublicDnsName\": {},\n                    \"MasterInstanceId\": {},\n                    \"SlaveInstanceType\": {},\n                    \"InstanceCount\": {\n                      \"type\": \"integer\"\n                    },\n                    \"InstanceGroups\": {\n                      \"type\": \"list\",\n                      \"member\": {\n                        \"type\": \"structure\",\n                        \"required\": [\n                          \"Market\",\n                          \"InstanceRole\",\n                          \"InstanceType\",\n                          \"InstanceRequestCount\",\n                          \"InstanceRunningCount\",\n                          \"State\",\n                          \"CreationDateTime\"\n                        ],\n                        \"members\": {\n                          \"InstanceGroupId\": {},\n                          \"Name\": {},\n                          \"Market\": {},\n                          \"InstanceRole\": {},\n                          \"BidPrice\": {},\n                          \"InstanceType\": {},\n                          \"InstanceRequestCount\": {\n                            \"type\": \"integer\"\n                          },\n                          \"InstanceRunningCount\": {\n                            \"type\": \"integer\"\n                          },\n                          \"State\": {},\n                          \"LastStateChangeReason\": {},\n                          \"CreationDateTime\": {\n                            \"type\": \"timestamp\"\n                          },\n                          \"StartDateTime\": {\n                            \"type\": \"timestamp\"\n                          },\n                          \"ReadyDateTime\": {\n                            \"type\": \"timestamp\"\n                          },\n                          \"EndDateTime\": {\n                            \"type\": \"timestamp\"\n                          }\n                        }\n                      }\n                    },\n                    \"NormalizedInstanceHours\": {\n                      \"type\": \"integer\"\n                    },\n                    \"Ec2KeyName\": {},\n                    \"Ec2SubnetId\": {},\n                    \"Placement\": {\n                      \"shape\": \"S2g\"\n                    },\n                    \"KeepJobFlowAliveWhenNoSteps\": {\n                      \"type\": \"boolean\"\n                    },\n                    \"TerminationProtected\": {\n                      \"type\": \"boolean\"\n                    },\n                    \"HadoopVersion\": {}\n                  }\n                },\n                \"Steps\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"required\": [\n                      \"StepConfig\",\n                      \"ExecutionStatusDetail\"\n                    ],\n                    \"members\": {\n                      \"StepConfig\": {\n                        \"shape\": \"S11\"\n                      },\n                      \"ExecutionStatusDetail\": {\n                        \"type\": \"structure\",\n                        \"required\": [\n                          \"State\",\n                          \"CreationDateTime\"\n                        ],\n                        \"members\": {\n                          \"State\": {},\n                          \"CreationDateTime\": {\n                            \"type\": \"timestamp\"\n                          },\n                          \"StartDateTime\": {\n                            \"type\": \"timestamp\"\n                          },\n                          \"EndDateTime\": {\n                            \"type\": \"timestamp\"\n                          },\n                          \"LastStateChangeReason\": {}\n                        }\n                      }\n                    }\n                  }\n                },\n                \"BootstrapActions\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"BootstrapActionConfig\": {\n                        \"shape\": \"S2n\"\n                      }\n                    }\n                  }\n                },\n                \"SupportedProducts\": {\n                  \"shape\": \"S2p\"\n                },\n                \"VisibleToAllUsers\": {\n                  \"type\": \"boolean\"\n                },\n                \"JobFlowRole\": {},\n                \"ServiceRole\": {},\n                \"AutoScalingRole\": {},\n                \"ScaleDownBehavior\": {}\n              }\n            }\n          }\n        }\n      },\n      \"deprecated\": true\n    },\n    \"DescribeSecurityConfiguration\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Name\": {},\n          \"SecurityConfiguration\": {},\n          \"CreationDateTime\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"DescribeStep\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterId\",\n          \"StepId\"\n        ],\n        \"members\": {\n          \"ClusterId\": {},\n          \"StepId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Step\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Id\": {},\n              \"Name\": {},\n              \"Config\": {\n                \"shape\": \"S2v\"\n              },\n              \"ActionOnFailure\": {},\n              \"Status\": {\n                \"shape\": \"S2w\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListBootstrapActions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterId\"\n        ],\n        \"members\": {\n          \"ClusterId\": {},\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BootstrapActions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"ScriptPath\": {},\n                \"Args\": {\n                  \"shape\": \"S20\"\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"ListClusters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CreatedAfter\": {\n            \"type\": \"timestamp\"\n          },\n          \"CreatedBefore\": {\n            \"type\": \"timestamp\"\n          },\n          \"ClusterStates\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Clusters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Id\": {},\n                \"Name\": {},\n                \"Status\": {\n                  \"shape\": \"S1u\"\n                },\n                \"NormalizedInstanceHours\": {\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"ListInstanceGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterId\"\n        ],\n        \"members\": {\n          \"ClusterId\": {},\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Id\": {},\n                \"Name\": {},\n                \"Market\": {},\n                \"InstanceGroupType\": {},\n                \"BidPrice\": {},\n                \"InstanceType\": {},\n                \"RequestedInstanceCount\": {\n                  \"type\": \"integer\"\n                },\n                \"RunningInstanceCount\": {\n                  \"type\": \"integer\"\n                },\n                \"Status\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"State\": {},\n                    \"StateChangeReason\": {\n                      \"type\": \"structure\",\n                      \"members\": {\n                        \"Code\": {},\n                        \"Message\": {}\n                      }\n                    },\n                    \"Timeline\": {\n                      \"type\": \"structure\",\n                      \"members\": {\n                        \"CreationDateTime\": {\n                          \"type\": \"timestamp\"\n                        },\n                        \"ReadyDateTime\": {\n                          \"type\": \"timestamp\"\n                        },\n                        \"EndDateTime\": {\n                          \"type\": \"timestamp\"\n                        }\n                      }\n                    }\n                  }\n                },\n                \"Configurations\": {\n                  \"shape\": \"S9\"\n                },\n                \"EbsBlockDevices\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"VolumeSpecification\": {\n                        \"shape\": \"Sg\"\n                      },\n                      \"Device\": {}\n                    }\n                  }\n                },\n                \"EbsOptimized\": {\n                  \"type\": \"boolean\"\n                },\n                \"ShrinkPolicy\": {\n                  \"shape\": \"S3o\"\n                },\n                \"AutoScalingPolicy\": {\n                  \"shape\": \"S3s\"\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"ListInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterId\"\n        ],\n        \"members\": {\n          \"ClusterId\": {},\n          \"InstanceGroupId\": {},\n          \"InstanceGroupTypes\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"InstanceStates\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Instances\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Id\": {},\n                \"Ec2InstanceId\": {},\n                \"PublicDnsName\": {},\n                \"PublicIpAddress\": {},\n                \"PrivateDnsName\": {},\n                \"PrivateIpAddress\": {},\n                \"Status\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"State\": {},\n                    \"StateChangeReason\": {\n                      \"type\": \"structure\",\n                      \"members\": {\n                        \"Code\": {},\n                        \"Message\": {}\n                      }\n                    },\n                    \"Timeline\": {\n                      \"type\": \"structure\",\n                      \"members\": {\n                        \"CreationDateTime\": {\n                          \"type\": \"timestamp\"\n                        },\n                        \"ReadyDateTime\": {\n                          \"type\": \"timestamp\"\n                        },\n                        \"EndDateTime\": {\n                          \"type\": \"timestamp\"\n                        }\n                      }\n                    }\n                  }\n                },\n                \"InstanceGroupId\": {},\n                \"EbsVolumes\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"Device\": {},\n                      \"VolumeId\": {}\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"ListSecurityConfigurations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SecurityConfigurations\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"CreationDateTime\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"ListSteps\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterId\"\n        ],\n        \"members\": {\n          \"ClusterId\": {},\n          \"StepStates\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"StepIds\": {\n            \"shape\": \"S17\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Steps\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Id\": {},\n                \"Name\": {},\n                \"Config\": {\n                  \"shape\": \"S2v\"\n                },\n                \"ActionOnFailure\": {},\n                \"Status\": {\n                  \"shape\": \"S2w\"\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"ModifyInstanceGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterId\": {},\n          \"InstanceGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"InstanceGroupId\"\n              ],\n              \"members\": {\n                \"InstanceGroupId\": {},\n                \"InstanceCount\": {\n                  \"type\": \"integer\"\n                },\n                \"EC2InstanceIdsToTerminate\": {\n                  \"type\": \"list\",\n                  \"member\": {}\n                },\n                \"ShrinkPolicy\": {\n                  \"shape\": \"S3o\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"PutAutoScalingPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterId\",\n          \"InstanceGroupId\",\n          \"AutoScalingPolicy\"\n        ],\n        \"members\": {\n          \"ClusterId\": {},\n          \"InstanceGroupId\": {},\n          \"AutoScalingPolicy\": {\n            \"shape\": \"Si\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterId\": {},\n          \"InstanceGroupId\": {},\n          \"AutoScalingPolicy\": {\n            \"shape\": \"S3s\"\n          }\n        }\n      }\n    },\n    \"RemoveAutoScalingPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterId\",\n          \"InstanceGroupId\"\n        ],\n        \"members\": {\n          \"ClusterId\": {},\n          \"InstanceGroupId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"RemoveTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceId\",\n          \"TagKeys\"\n        ],\n        \"members\": {\n          \"ResourceId\": {},\n          \"TagKeys\": {\n            \"shape\": \"S20\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"RunJobFlow\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Instances\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"LogUri\": {},\n          \"AdditionalInfo\": {},\n          \"AmiVersion\": {},\n          \"ReleaseLabel\": {},\n          \"Instances\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"MasterInstanceType\": {},\n              \"SlaveInstanceType\": {},\n              \"InstanceCount\": {\n                \"type\": \"integer\"\n              },\n              \"InstanceGroups\": {\n                \"shape\": \"S2\"\n              },\n              \"Ec2KeyName\": {},\n              \"Placement\": {\n                \"shape\": \"S2g\"\n              },\n              \"KeepJobFlowAliveWhenNoSteps\": {\n                \"type\": \"boolean\"\n              },\n              \"TerminationProtected\": {\n                \"type\": \"boolean\"\n              },\n              \"HadoopVersion\": {},\n              \"Ec2SubnetId\": {},\n              \"EmrManagedMasterSecurityGroup\": {},\n              \"EmrManagedSlaveSecurityGroup\": {},\n              \"ServiceAccessSecurityGroup\": {},\n              \"AdditionalMasterSecurityGroups\": {\n                \"shape\": \"S4v\"\n              },\n              \"AdditionalSlaveSecurityGroups\": {\n                \"shape\": \"S4v\"\n              }\n            }\n          },\n          \"Steps\": {\n            \"shape\": \"S10\"\n          },\n          \"BootstrapActions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S2n\"\n            }\n          },\n          \"SupportedProducts\": {\n            \"shape\": \"S2p\"\n          },\n          \"NewSupportedProducts\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Args\": {\n                  \"shape\": \"S17\"\n                }\n              }\n            }\n          },\n          \"Applications\": {\n            \"shape\": \"S22\"\n          },\n          \"Configurations\": {\n            \"shape\": \"S9\"\n          },\n          \"VisibleToAllUsers\": {\n            \"type\": \"boolean\"\n          },\n          \"JobFlowRole\": {},\n          \"ServiceRole\": {},\n          \"Tags\": {\n            \"shape\": \"S1c\"\n          },\n          \"SecurityConfiguration\": {},\n          \"AutoScalingRole\": {},\n          \"ScaleDownBehavior\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"JobFlowId\": {}\n        }\n      }\n    },\n    \"SetTerminationProtection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"JobFlowIds\",\n          \"TerminationProtected\"\n        ],\n        \"members\": {\n          \"JobFlowIds\": {\n            \"shape\": \"S17\"\n          },\n          \"TerminationProtected\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"SetVisibleToAllUsers\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"JobFlowIds\",\n          \"VisibleToAllUsers\"\n        ],\n        \"members\": {\n          \"JobFlowIds\": {\n            \"shape\": \"S17\"\n          },\n          \"VisibleToAllUsers\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"TerminateJobFlows\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"JobFlowIds\"\n        ],\n        \"members\": {\n          \"JobFlowIds\": {\n            \"shape\": \"S17\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S2\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceRole\",\n          \"InstanceType\",\n          \"InstanceCount\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Market\": {},\n          \"InstanceRole\": {},\n          \"BidPrice\": {},\n          \"InstanceType\": {},\n          \"InstanceCount\": {\n            \"type\": \"integer\"\n          },\n          \"Configurations\": {\n            \"shape\": \"S9\"\n          },\n          \"EbsConfiguration\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"EbsBlockDeviceConfigs\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"VolumeSpecification\"\n                  ],\n                  \"members\": {\n                    \"VolumeSpecification\": {\n                      \"shape\": \"Sg\"\n                    },\n                    \"VolumesPerInstance\": {\n                      \"type\": \"integer\"\n                    }\n                  }\n                }\n              },\n              \"EbsOptimized\": {\n                \"type\": \"boolean\"\n              }\n            }\n          },\n          \"AutoScalingPolicy\": {\n            \"shape\": \"Si\"\n          }\n        }\n      }\n    },\n    \"S9\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Classification\": {},\n          \"Configurations\": {\n            \"shape\": \"S9\"\n          },\n          \"Properties\": {\n            \"shape\": \"Sc\"\n          }\n        }\n      }\n    },\n    \"Sc\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"Sg\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"VolumeType\",\n        \"SizeInGB\"\n      ],\n      \"members\": {\n        \"VolumeType\": {},\n        \"Iops\": {\n          \"type\": \"integer\"\n        },\n        \"SizeInGB\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"Si\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Constraints\",\n        \"Rules\"\n      ],\n      \"members\": {\n        \"Constraints\": {\n          \"shape\": \"Sj\"\n        },\n        \"Rules\": {\n          \"shape\": \"Sk\"\n        }\n      }\n    },\n    \"Sj\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"MinCapacity\",\n        \"MaxCapacity\"\n      ],\n      \"members\": {\n        \"MinCapacity\": {\n          \"type\": \"integer\"\n        },\n        \"MaxCapacity\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"Sk\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Action\",\n          \"Trigger\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Description\": {},\n          \"Action\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"SimpleScalingPolicyConfiguration\"\n            ],\n            \"members\": {\n              \"Market\": {},\n              \"SimpleScalingPolicyConfiguration\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"ScalingAdjustment\"\n                ],\n                \"members\": {\n                  \"AdjustmentType\": {},\n                  \"ScalingAdjustment\": {\n                    \"type\": \"integer\"\n                  },\n                  \"CoolDown\": {\n                    \"type\": \"integer\"\n                  }\n                }\n              }\n            }\n          },\n          \"Trigger\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"CloudWatchAlarmDefinition\"\n            ],\n            \"members\": {\n              \"CloudWatchAlarmDefinition\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"ComparisonOperator\",\n                  \"MetricName\",\n                  \"Period\",\n                  \"Threshold\"\n                ],\n                \"members\": {\n                  \"ComparisonOperator\": {},\n                  \"EvaluationPeriods\": {\n                    \"type\": \"integer\"\n                  },\n                  \"MetricName\": {},\n                  \"Namespace\": {},\n                  \"Period\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Statistic\": {},\n                  \"Threshold\": {\n                    \"type\": \"double\"\n                  },\n                  \"Unit\": {},\n                  \"Dimensions\": {\n                    \"type\": \"list\",\n                    \"member\": {\n                      \"type\": \"structure\",\n                      \"members\": {\n                        \"Key\": {},\n                        \"Value\": {}\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S10\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S11\"\n      }\n    },\n    \"S11\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Name\",\n        \"HadoopJarStep\"\n      ],\n      \"members\": {\n        \"Name\": {},\n        \"ActionOnFailure\": {},\n        \"HadoopJarStep\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Jar\"\n          ],\n          \"members\": {\n            \"Properties\": {\n              \"type\": \"list\",\n              \"member\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"Key\": {},\n                  \"Value\": {}\n                }\n              }\n            },\n            \"Jar\": {},\n            \"MainClass\": {},\n            \"Args\": {\n              \"shape\": \"S17\"\n            }\n          }\n        }\n      }\n    },\n    \"S17\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S19\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S1c\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"S1u\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"State\": {},\n        \"StateChangeReason\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Code\": {},\n            \"Message\": {}\n          }\n        },\n        \"Timeline\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"CreationDateTime\": {\n              \"type\": \"timestamp\"\n            },\n            \"ReadyDateTime\": {\n              \"type\": \"timestamp\"\n            },\n            \"EndDateTime\": {\n              \"type\": \"timestamp\"\n            }\n          }\n        }\n      }\n    },\n    \"S20\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S22\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Name\": {},\n          \"Version\": {},\n          \"Args\": {\n            \"shape\": \"S20\"\n          },\n          \"AdditionalInfo\": {\n            \"shape\": \"Sc\"\n          }\n        }\n      }\n    },\n    \"S2g\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"AvailabilityZone\"\n      ],\n      \"members\": {\n        \"AvailabilityZone\": {}\n      }\n    },\n    \"S2n\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Name\",\n        \"ScriptBootstrapAction\"\n      ],\n      \"members\": {\n        \"Name\": {},\n        \"ScriptBootstrapAction\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Path\"\n          ],\n          \"members\": {\n            \"Path\": {},\n            \"Args\": {\n              \"shape\": \"S17\"\n            }\n          }\n        }\n      }\n    },\n    \"S2p\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S2v\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Jar\": {},\n        \"Properties\": {\n          \"shape\": \"Sc\"\n        },\n        \"MainClass\": {},\n        \"Args\": {\n          \"shape\": \"S20\"\n        }\n      }\n    },\n    \"S2w\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"State\": {},\n        \"StateChangeReason\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Code\": {},\n            \"Message\": {}\n          }\n        },\n        \"FailureDetails\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Reason\": {},\n            \"Message\": {},\n            \"LogFile\": {}\n          }\n        },\n        \"Timeline\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"CreationDateTime\": {\n              \"type\": \"timestamp\"\n            },\n            \"StartDateTime\": {\n              \"type\": \"timestamp\"\n            },\n            \"EndDateTime\": {\n              \"type\": \"timestamp\"\n            }\n          }\n        }\n      }\n    },\n    \"S3o\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DecommissionTimeout\": {\n          \"type\": \"integer\"\n        },\n        \"InstanceResizePolicy\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"InstancesToTerminate\": {\n              \"shape\": \"S3q\"\n            },\n            \"InstancesToProtect\": {\n              \"shape\": \"S3q\"\n            },\n            \"InstanceTerminationTimeout\": {\n              \"type\": \"integer\"\n            }\n          }\n        }\n      }\n    },\n    \"S3q\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S3s\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Status\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"State\": {},\n            \"StateChangeReason\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Code\": {},\n                \"Message\": {}\n              }\n            }\n          }\n        },\n        \"Constraints\": {\n          \"shape\": \"Sj\"\n        },\n        \"Rules\": {\n          \"shape\": \"Sk\"\n        }\n      }\n    },\n    \"S4v\": {\n      \"type\": \"list\",\n      \"member\": {}\n    }\n  }\n}\n},{}],61:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeJobFlows\": {\n      \"result_key\": \"JobFlows\"\n    },\n    \"ListBootstrapActions\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"BootstrapActions\"\n    },\n    \"ListClusters\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"Clusters\"\n    },\n    \"ListInstanceGroups\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"InstanceGroups\"\n    },\n    \"ListInstances\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"Instances\"\n    },\n    \"ListSteps\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"Steps\"\n    }\n  }\n}\n\n},{}],62:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"ClusterRunning\": {\n      \"delay\": 30,\n      \"operation\": \"DescribeCluster\",\n      \"maxAttempts\": 60,\n      \"acceptors\": [\n        {\n          \"state\": \"success\",\n          \"matcher\": \"path\",\n          \"argument\": \"Cluster.Status.State\",\n          \"expected\": \"RUNNING\"\n        },\n        {\n          \"state\": \"success\",\n          \"matcher\": \"path\",\n          \"argument\": \"Cluster.Status.State\",\n          \"expected\": \"WAITING\"\n        },\n        {\n          \"state\": \"failure\",\n          \"matcher\": \"path\",\n          \"argument\": \"Cluster.Status.State\",\n          \"expected\": \"TERMINATING\"\n        },\n        {\n          \"state\": \"failure\",\n          \"matcher\": \"path\",\n          \"argument\": \"Cluster.Status.State\",\n          \"expected\": \"TERMINATED\"\n        },\n        {\n          \"state\": \"failure\",\n          \"matcher\": \"path\",\n          \"argument\": \"Cluster.Status.State\",\n          \"expected\": \"TERMINATED_WITH_ERRORS\"\n        }\n      ]\n    },\n    \"StepComplete\": {\n      \"delay\": 30,\n      \"operation\": \"DescribeStep\",\n      \"maxAttempts\": 60,\n      \"acceptors\": [\n        {\n          \"state\": \"success\",\n          \"matcher\": \"path\",\n          \"argument\": \"Step.Status.State\",\n          \"expected\": \"COMPLETED\"\n        },\n        {\n          \"state\": \"failure\",\n          \"matcher\": \"path\",\n          \"argument\": \"Step.Status.State\",\n          \"expected\": \"FAILED\"\n        },\n        {\n          \"state\": \"failure\",\n          \"matcher\": \"path\",\n          \"argument\": \"Step.Status.State\",\n          \"expected\": \"CANCELLED\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],63:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"elastictranscoder-2012-09-25\",\n    \"apiVersion\": \"2012-09-25\",\n    \"endpointPrefix\": \"elastictranscoder\",\n    \"protocol\": \"rest-json\",\n    \"serviceFullName\": \"Amazon Elastic Transcoder\",\n    \"signatureVersion\": \"v4\"\n  },\n  \"operations\": {\n    \"CancelJob\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2012-09-25/jobs/{Id}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateJob\": {\n      \"http\": {\n        \"requestUri\": \"/2012-09-25/jobs\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PipelineId\"\n        ],\n        \"members\": {\n          \"PipelineId\": {},\n          \"Input\": {\n            \"shape\": \"S5\"\n          },\n          \"Inputs\": {\n            \"shape\": \"St\"\n          },\n          \"Output\": {\n            \"shape\": \"Su\"\n          },\n          \"Outputs\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Su\"\n            }\n          },\n          \"OutputKeyPrefix\": {},\n          \"Playlists\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Format\": {},\n                \"OutputKeys\": {\n                  \"shape\": \"S1l\"\n                },\n                \"HlsContentProtection\": {\n                  \"shape\": \"S1m\"\n                },\n                \"PlayReadyDrm\": {\n                  \"shape\": \"S1q\"\n                }\n              }\n            }\n          },\n          \"UserMetadata\": {\n            \"shape\": \"S1v\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Job\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"CreatePipeline\": {\n      \"http\": {\n        \"requestUri\": \"/2012-09-25/pipelines\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"InputBucket\",\n          \"Role\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"InputBucket\": {},\n          \"OutputBucket\": {},\n          \"Role\": {},\n          \"AwsKmsKeyArn\": {},\n          \"Notifications\": {\n            \"shape\": \"S2a\"\n          },\n          \"ContentConfig\": {\n            \"shape\": \"S2c\"\n          },\n          \"ThumbnailConfig\": {\n            \"shape\": \"S2c\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Pipeline\": {\n            \"shape\": \"S2l\"\n          },\n          \"Warnings\": {\n            \"shape\": \"S2n\"\n          }\n        }\n      }\n    },\n    \"CreatePreset\": {\n      \"http\": {\n        \"requestUri\": \"/2012-09-25/presets\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Container\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Description\": {},\n          \"Container\": {},\n          \"Video\": {\n            \"shape\": \"S2r\"\n          },\n          \"Audio\": {\n            \"shape\": \"S37\"\n          },\n          \"Thumbnails\": {\n            \"shape\": \"S3i\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Preset\": {\n            \"shape\": \"S3m\"\n          },\n          \"Warning\": {}\n        }\n      }\n    },\n    \"DeletePipeline\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2012-09-25/pipelines/{Id}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeletePreset\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2012-09-25/presets/{Id}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"ListJobsByPipeline\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2012-09-25/jobsByPipeline/{PipelineId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PipelineId\"\n        ],\n        \"members\": {\n          \"PipelineId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"PipelineId\"\n          },\n          \"Ascending\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Ascending\"\n          },\n          \"PageToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"PageToken\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Jobs\": {\n            \"shape\": \"S3v\"\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"ListJobsByStatus\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2012-09-25/jobsByStatus/{Status}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Status\"\n        ],\n        \"members\": {\n          \"Status\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Status\"\n          },\n          \"Ascending\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Ascending\"\n          },\n          \"PageToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"PageToken\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Jobs\": {\n            \"shape\": \"S3v\"\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"ListPipelines\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2012-09-25/pipelines\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Ascending\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Ascending\"\n          },\n          \"PageToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"PageToken\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Pipelines\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S2l\"\n            }\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"ListPresets\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2012-09-25/presets\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Ascending\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Ascending\"\n          },\n          \"PageToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"PageToken\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Presets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S3m\"\n            }\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"ReadJob\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2012-09-25/jobs/{Id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Job\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"ReadPipeline\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2012-09-25/pipelines/{Id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Pipeline\": {\n            \"shape\": \"S2l\"\n          },\n          \"Warnings\": {\n            \"shape\": \"S2n\"\n          }\n        }\n      }\n    },\n    \"ReadPreset\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2012-09-25/presets/{Id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Preset\": {\n            \"shape\": \"S3m\"\n          }\n        }\n      }\n    },\n    \"TestRole\": {\n      \"http\": {\n        \"requestUri\": \"/2012-09-25/roleTests\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Role\",\n          \"InputBucket\",\n          \"OutputBucket\",\n          \"Topics\"\n        ],\n        \"members\": {\n          \"Role\": {},\n          \"InputBucket\": {},\n          \"OutputBucket\": {},\n          \"Topics\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        },\n        \"deprecated\": true\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Success\": {},\n          \"Messages\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        },\n        \"deprecated\": true\n      },\n      \"deprecated\": true\n    },\n    \"UpdatePipeline\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/2012-09-25/pipelines/{Id}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"Name\": {},\n          \"InputBucket\": {},\n          \"Role\": {},\n          \"AwsKmsKeyArn\": {},\n          \"Notifications\": {\n            \"shape\": \"S2a\"\n          },\n          \"ContentConfig\": {\n            \"shape\": \"S2c\"\n          },\n          \"ThumbnailConfig\": {\n            \"shape\": \"S2c\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Pipeline\": {\n            \"shape\": \"S2l\"\n          },\n          \"Warnings\": {\n            \"shape\": \"S2n\"\n          }\n        }\n      }\n    },\n    \"UpdatePipelineNotifications\": {\n      \"http\": {\n        \"requestUri\": \"/2012-09-25/pipelines/{Id}/notifications\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\",\n          \"Notifications\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"Notifications\": {\n            \"shape\": \"S2a\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Pipeline\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      }\n    },\n    \"UpdatePipelineStatus\": {\n      \"http\": {\n        \"requestUri\": \"/2012-09-25/pipelines/{Id}/status\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\",\n          \"Status\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"Status\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Pipeline\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S5\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Key\": {},\n        \"FrameRate\": {},\n        \"Resolution\": {},\n        \"AspectRatio\": {},\n        \"Interlaced\": {},\n        \"Container\": {},\n        \"Encryption\": {\n          \"shape\": \"Sc\"\n        },\n        \"TimeSpan\": {\n          \"shape\": \"Sg\"\n        },\n        \"InputCaptions\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"MergePolicy\": {},\n            \"CaptionSources\": {\n              \"shape\": \"Sk\"\n            }\n          }\n        },\n        \"DetectedProperties\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Width\": {\n              \"type\": \"integer\"\n            },\n            \"Height\": {\n              \"type\": \"integer\"\n            },\n            \"FrameRate\": {},\n            \"FileSize\": {\n              \"type\": \"long\"\n            },\n            \"DurationMillis\": {\n              \"type\": \"long\"\n            }\n          }\n        }\n      }\n    },\n    \"Sc\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Mode\": {},\n        \"Key\": {},\n        \"KeyMd5\": {},\n        \"InitializationVector\": {}\n      }\n    },\n    \"Sg\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"StartTime\": {},\n        \"Duration\": {}\n      }\n    },\n    \"Sk\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Language\": {},\n          \"TimeOffset\": {},\n          \"Label\": {},\n          \"Encryption\": {\n            \"shape\": \"Sc\"\n          }\n        }\n      }\n    },\n    \"St\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S5\"\n      }\n    },\n    \"Su\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Key\": {},\n        \"ThumbnailPattern\": {},\n        \"ThumbnailEncryption\": {\n          \"shape\": \"Sc\"\n        },\n        \"Rotate\": {},\n        \"PresetId\": {},\n        \"SegmentDuration\": {},\n        \"Watermarks\": {\n          \"shape\": \"Sx\"\n        },\n        \"AlbumArt\": {\n          \"shape\": \"S11\"\n        },\n        \"Composition\": {\n          \"shape\": \"S19\",\n          \"deprecated\": true\n        },\n        \"Captions\": {\n          \"shape\": \"S1b\"\n        },\n        \"Encryption\": {\n          \"shape\": \"Sc\"\n        }\n      }\n    },\n    \"Sx\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PresetWatermarkId\": {},\n          \"InputKey\": {},\n          \"Encryption\": {\n            \"shape\": \"Sc\"\n          }\n        }\n      }\n    },\n    \"S11\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"MergePolicy\": {},\n        \"Artwork\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"InputKey\": {},\n              \"MaxWidth\": {},\n              \"MaxHeight\": {},\n              \"SizingPolicy\": {},\n              \"PaddingPolicy\": {},\n              \"AlbumArtFormat\": {},\n              \"Encryption\": {\n                \"shape\": \"Sc\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S19\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TimeSpan\": {\n            \"shape\": \"Sg\"\n          }\n        },\n        \"deprecated\": true\n      },\n      \"deprecated\": true\n    },\n    \"S1b\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"MergePolicy\": {\n          \"deprecated\": true\n        },\n        \"CaptionSources\": {\n          \"shape\": \"Sk\",\n          \"deprecated\": true\n        },\n        \"CaptionFormats\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Format\": {},\n              \"Pattern\": {},\n              \"Encryption\": {\n                \"shape\": \"Sc\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S1l\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S1m\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Method\": {},\n        \"Key\": {},\n        \"KeyMd5\": {},\n        \"InitializationVector\": {},\n        \"LicenseAcquisitionUrl\": {},\n        \"KeyStoragePolicy\": {}\n      }\n    },\n    \"S1q\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Format\": {},\n        \"Key\": {},\n        \"KeyMd5\": {},\n        \"KeyId\": {},\n        \"InitializationVector\": {},\n        \"LicenseAcquisitionUrl\": {}\n      }\n    },\n    \"S1v\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S1y\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Id\": {},\n        \"Arn\": {},\n        \"PipelineId\": {},\n        \"Input\": {\n          \"shape\": \"S5\"\n        },\n        \"Inputs\": {\n          \"shape\": \"St\"\n        },\n        \"Output\": {\n          \"shape\": \"S1z\"\n        },\n        \"Outputs\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"S1z\"\n          }\n        },\n        \"OutputKeyPrefix\": {},\n        \"Playlists\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Name\": {},\n              \"Format\": {},\n              \"OutputKeys\": {\n                \"shape\": \"S1l\"\n              },\n              \"HlsContentProtection\": {\n                \"shape\": \"S1m\"\n              },\n              \"PlayReadyDrm\": {\n                \"shape\": \"S1q\"\n              },\n              \"Status\": {},\n              \"StatusDetail\": {}\n            }\n          }\n        },\n        \"Status\": {},\n        \"UserMetadata\": {\n          \"shape\": \"S1v\"\n        },\n        \"Timing\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"SubmitTimeMillis\": {\n              \"type\": \"long\"\n            },\n            \"StartTimeMillis\": {\n              \"type\": \"long\"\n            },\n            \"FinishTimeMillis\": {\n              \"type\": \"long\"\n            }\n          }\n        }\n      }\n    },\n    \"S1z\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Id\": {},\n        \"Key\": {},\n        \"ThumbnailPattern\": {},\n        \"ThumbnailEncryption\": {\n          \"shape\": \"Sc\"\n        },\n        \"Rotate\": {},\n        \"PresetId\": {},\n        \"SegmentDuration\": {},\n        \"Status\": {},\n        \"StatusDetail\": {},\n        \"Duration\": {\n          \"type\": \"long\"\n        },\n        \"Width\": {\n          \"type\": \"integer\"\n        },\n        \"Height\": {\n          \"type\": \"integer\"\n        },\n        \"FrameRate\": {},\n        \"FileSize\": {\n          \"type\": \"long\"\n        },\n        \"DurationMillis\": {\n          \"type\": \"long\"\n        },\n        \"Watermarks\": {\n          \"shape\": \"Sx\"\n        },\n        \"AlbumArt\": {\n          \"shape\": \"S11\"\n        },\n        \"Composition\": {\n          \"shape\": \"S19\",\n          \"deprecated\": true\n        },\n        \"Captions\": {\n          \"shape\": \"S1b\"\n        },\n        \"Encryption\": {\n          \"shape\": \"Sc\"\n        },\n        \"AppliedColorSpaceConversion\": {}\n      }\n    },\n    \"S2a\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Progressing\": {},\n        \"Completed\": {},\n        \"Warning\": {},\n        \"Error\": {}\n      }\n    },\n    \"S2c\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Bucket\": {},\n        \"StorageClass\": {},\n        \"Permissions\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"GranteeType\": {},\n              \"Grantee\": {},\n              \"Access\": {\n                \"type\": \"list\",\n                \"member\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S2l\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Id\": {},\n        \"Arn\": {},\n        \"Name\": {},\n        \"Status\": {},\n        \"InputBucket\": {},\n        \"OutputBucket\": {},\n        \"Role\": {},\n        \"AwsKmsKeyArn\": {},\n        \"Notifications\": {\n          \"shape\": \"S2a\"\n        },\n        \"ContentConfig\": {\n          \"shape\": \"S2c\"\n        },\n        \"ThumbnailConfig\": {\n          \"shape\": \"S2c\"\n        }\n      }\n    },\n    \"S2n\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Code\": {},\n          \"Message\": {}\n        }\n      }\n    },\n    \"S2r\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Codec\": {},\n        \"CodecOptions\": {\n          \"type\": \"map\",\n          \"key\": {},\n          \"value\": {}\n        },\n        \"KeyframesMaxDist\": {},\n        \"FixedGOP\": {},\n        \"BitRate\": {},\n        \"FrameRate\": {},\n        \"MaxFrameRate\": {},\n        \"Resolution\": {},\n        \"AspectRatio\": {},\n        \"MaxWidth\": {},\n        \"MaxHeight\": {},\n        \"DisplayAspectRatio\": {},\n        \"SizingPolicy\": {},\n        \"PaddingPolicy\": {},\n        \"Watermarks\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Id\": {},\n              \"MaxWidth\": {},\n              \"MaxHeight\": {},\n              \"SizingPolicy\": {},\n              \"HorizontalAlign\": {},\n              \"HorizontalOffset\": {},\n              \"VerticalAlign\": {},\n              \"VerticalOffset\": {},\n              \"Opacity\": {},\n              \"Target\": {}\n            }\n          }\n        }\n      }\n    },\n    \"S37\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Codec\": {},\n        \"SampleRate\": {},\n        \"BitRate\": {},\n        \"Channels\": {},\n        \"AudioPackingMode\": {},\n        \"CodecOptions\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Profile\": {},\n            \"BitDepth\": {},\n            \"BitOrder\": {},\n            \"Signed\": {}\n          }\n        }\n      }\n    },\n    \"S3i\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Format\": {},\n        \"Interval\": {},\n        \"Resolution\": {},\n        \"AspectRatio\": {},\n        \"MaxWidth\": {},\n        \"MaxHeight\": {},\n        \"SizingPolicy\": {},\n        \"PaddingPolicy\": {}\n      }\n    },\n    \"S3m\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Id\": {},\n        \"Arn\": {},\n        \"Name\": {},\n        \"Description\": {},\n        \"Container\": {},\n        \"Audio\": {\n          \"shape\": \"S37\"\n        },\n        \"Video\": {\n          \"shape\": \"S2r\"\n        },\n        \"Thumbnails\": {\n          \"shape\": \"S3i\"\n        },\n        \"Type\": {}\n      }\n    },\n    \"S3v\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S1y\"\n      }\n    }\n  }\n}\n},{}],64:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"ListJobsByPipeline\": {\n      \"input_token\": \"PageToken\",\n      \"output_token\": \"NextPageToken\",\n      \"result_key\": \"Jobs\"\n    },\n    \"ListJobsByStatus\": {\n      \"input_token\": \"PageToken\",\n      \"output_token\": \"NextPageToken\",\n      \"result_key\": \"Jobs\"\n    },\n    \"ListPipelines\": {\n      \"input_token\": \"PageToken\",\n      \"output_token\": \"NextPageToken\",\n      \"result_key\": \"Pipelines\"\n    },\n    \"ListPresets\": {\n      \"input_token\": \"PageToken\",\n      \"output_token\": \"NextPageToken\",\n      \"result_key\": \"Presets\"\n    }\n  }\n}\n\n},{}],65:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"JobComplete\": {\n      \"delay\": 30,\n      \"operation\": \"ReadJob\",\n      \"maxAttempts\": 120,\n      \"acceptors\": [\n        {\n          \"expected\": \"Complete\",\n          \"matcher\": \"path\",\n          \"state\": \"success\",\n          \"argument\": \"Job.Status\"\n        },\n        {\n          \"expected\": \"Canceled\",\n          \"matcher\": \"path\",\n          \"state\": \"failure\",\n          \"argument\": \"Job.Status\"\n        },\n        {\n          \"expected\": \"Error\",\n          \"matcher\": \"path\",\n          \"state\": \"failure\",\n          \"argument\": \"Job.Status\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],66:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"email-2010-12-01\",\n    \"apiVersion\": \"2010-12-01\",\n    \"endpointPrefix\": \"email\",\n    \"protocol\": \"query\",\n    \"serviceAbbreviation\": \"Amazon SES\",\n    \"serviceFullName\": \"Amazon Simple Email Service\",\n    \"signatureVersion\": \"v4\",\n    \"signingName\": \"ses\",\n    \"xmlNamespace\": \"http://ses.amazonaws.com/doc/2010-12-01/\"\n  },\n  \"operations\": {\n    \"CloneReceiptRuleSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleSetName\",\n          \"OriginalRuleSetName\"\n        ],\n        \"members\": {\n          \"RuleSetName\": {},\n          \"OriginalRuleSetName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CloneReceiptRuleSetResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateConfigurationSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConfigurationSet\"\n        ],\n        \"members\": {\n          \"ConfigurationSet\": {\n            \"shape\": \"S5\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateConfigurationSetResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateConfigurationSetEventDestination\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConfigurationSetName\",\n          \"EventDestination\"\n        ],\n        \"members\": {\n          \"ConfigurationSetName\": {},\n          \"EventDestination\": {\n            \"shape\": \"S9\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateConfigurationSetEventDestinationResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateReceiptFilter\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Filter\"\n        ],\n        \"members\": {\n          \"Filter\": {\n            \"shape\": \"So\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateReceiptFilterResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateReceiptRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleSetName\",\n          \"Rule\"\n        ],\n        \"members\": {\n          \"RuleSetName\": {},\n          \"After\": {},\n          \"Rule\": {\n            \"shape\": \"Sw\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateReceiptRuleResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateReceiptRuleSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleSetName\"\n        ],\n        \"members\": {\n          \"RuleSetName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateReceiptRuleSetResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteConfigurationSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConfigurationSetName\"\n        ],\n        \"members\": {\n          \"ConfigurationSetName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteConfigurationSetResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteConfigurationSetEventDestination\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConfigurationSetName\",\n          \"EventDestinationName\"\n        ],\n        \"members\": {\n          \"ConfigurationSetName\": {},\n          \"EventDestinationName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteConfigurationSetEventDestinationResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteIdentity\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identity\"\n        ],\n        \"members\": {\n          \"Identity\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteIdentityResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteIdentityPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identity\",\n          \"PolicyName\"\n        ],\n        \"members\": {\n          \"Identity\": {},\n          \"PolicyName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteIdentityPolicyResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteReceiptFilter\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FilterName\"\n        ],\n        \"members\": {\n          \"FilterName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteReceiptFilterResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteReceiptRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleSetName\",\n          \"RuleName\"\n        ],\n        \"members\": {\n          \"RuleSetName\": {},\n          \"RuleName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteReceiptRuleResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteReceiptRuleSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleSetName\"\n        ],\n        \"members\": {\n          \"RuleSetName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteReceiptRuleSetResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteVerifiedEmailAddress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EmailAddress\"\n        ],\n        \"members\": {\n          \"EmailAddress\": {}\n        }\n      }\n    },\n    \"DescribeActiveReceiptRuleSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeActiveReceiptRuleSetResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Metadata\": {\n            \"shape\": \"S26\"\n          },\n          \"Rules\": {\n            \"shape\": \"S28\"\n          }\n        }\n      }\n    },\n    \"DescribeConfigurationSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConfigurationSetName\"\n        ],\n        \"members\": {\n          \"ConfigurationSetName\": {},\n          \"ConfigurationSetAttributeNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeConfigurationSetResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConfigurationSet\": {\n            \"shape\": \"S5\"\n          },\n          \"EventDestinations\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S9\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeReceiptRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleSetName\",\n          \"RuleName\"\n        ],\n        \"members\": {\n          \"RuleSetName\": {},\n          \"RuleName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReceiptRuleResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Rule\": {\n            \"shape\": \"Sw\"\n          }\n        }\n      }\n    },\n    \"DescribeReceiptRuleSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleSetName\"\n        ],\n        \"members\": {\n          \"RuleSetName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReceiptRuleSetResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Metadata\": {\n            \"shape\": \"S26\"\n          },\n          \"Rules\": {\n            \"shape\": \"S28\"\n          }\n        }\n      }\n    },\n    \"GetIdentityDkimAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identities\"\n        ],\n        \"members\": {\n          \"Identities\": {\n            \"shape\": \"S2j\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetIdentityDkimAttributesResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"DkimAttributes\"\n        ],\n        \"members\": {\n          \"DkimAttributes\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"DkimEnabled\",\n                \"DkimVerificationStatus\"\n              ],\n              \"members\": {\n                \"DkimEnabled\": {\n                  \"type\": \"boolean\"\n                },\n                \"DkimVerificationStatus\": {},\n                \"DkimTokens\": {\n                  \"shape\": \"S2o\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"GetIdentityMailFromDomainAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identities\"\n        ],\n        \"members\": {\n          \"Identities\": {\n            \"shape\": \"S2j\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetIdentityMailFromDomainAttributesResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"MailFromDomainAttributes\"\n        ],\n        \"members\": {\n          \"MailFromDomainAttributes\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"MailFromDomain\",\n                \"MailFromDomainStatus\",\n                \"BehaviorOnMXFailure\"\n              ],\n              \"members\": {\n                \"MailFromDomain\": {},\n                \"MailFromDomainStatus\": {},\n                \"BehaviorOnMXFailure\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"GetIdentityNotificationAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identities\"\n        ],\n        \"members\": {\n          \"Identities\": {\n            \"shape\": \"S2j\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetIdentityNotificationAttributesResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"NotificationAttributes\"\n        ],\n        \"members\": {\n          \"NotificationAttributes\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"BounceTopic\",\n                \"ComplaintTopic\",\n                \"DeliveryTopic\",\n                \"ForwardingEnabled\"\n              ],\n              \"members\": {\n                \"BounceTopic\": {},\n                \"ComplaintTopic\": {},\n                \"DeliveryTopic\": {},\n                \"ForwardingEnabled\": {\n                  \"type\": \"boolean\"\n                },\n                \"HeadersInBounceNotificationsEnabled\": {\n                  \"type\": \"boolean\"\n                },\n                \"HeadersInComplaintNotificationsEnabled\": {\n                  \"type\": \"boolean\"\n                },\n                \"HeadersInDeliveryNotificationsEnabled\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"GetIdentityPolicies\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identity\",\n          \"PolicyNames\"\n        ],\n        \"members\": {\n          \"Identity\": {},\n          \"PolicyNames\": {\n            \"shape\": \"S33\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetIdentityPoliciesResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"Policies\"\n        ],\n        \"members\": {\n          \"Policies\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {}\n          }\n        }\n      }\n    },\n    \"GetIdentityVerificationAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identities\"\n        ],\n        \"members\": {\n          \"Identities\": {\n            \"shape\": \"S2j\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetIdentityVerificationAttributesResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"VerificationAttributes\"\n        ],\n        \"members\": {\n          \"VerificationAttributes\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"VerificationStatus\"\n              ],\n              \"members\": {\n                \"VerificationStatus\": {},\n                \"VerificationToken\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"GetSendQuota\": {\n      \"output\": {\n        \"resultWrapper\": \"GetSendQuotaResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Max24HourSend\": {\n            \"type\": \"double\"\n          },\n          \"MaxSendRate\": {\n            \"type\": \"double\"\n          },\n          \"SentLast24Hours\": {\n            \"type\": \"double\"\n          }\n        }\n      }\n    },\n    \"GetSendStatistics\": {\n      \"output\": {\n        \"resultWrapper\": \"GetSendStatisticsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"SendDataPoints\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Timestamp\": {\n                  \"type\": \"timestamp\"\n                },\n                \"DeliveryAttempts\": {\n                  \"type\": \"long\"\n                },\n                \"Bounces\": {\n                  \"type\": \"long\"\n                },\n                \"Complaints\": {\n                  \"type\": \"long\"\n                },\n                \"Rejects\": {\n                  \"type\": \"long\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListConfigurationSets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {},\n          \"MaxItems\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListConfigurationSetsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConfigurationSets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S5\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListIdentities\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IdentityType\": {},\n          \"NextToken\": {},\n          \"MaxItems\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListIdentitiesResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identities\"\n        ],\n        \"members\": {\n          \"Identities\": {\n            \"shape\": \"S2j\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListIdentityPolicies\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identity\"\n        ],\n        \"members\": {\n          \"Identity\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListIdentityPoliciesResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"PolicyNames\"\n        ],\n        \"members\": {\n          \"PolicyNames\": {\n            \"shape\": \"S33\"\n          }\n        }\n      }\n    },\n    \"ListReceiptFilters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListReceiptFiltersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Filters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"So\"\n            }\n          }\n        }\n      }\n    },\n    \"ListReceiptRuleSets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListReceiptRuleSetsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"RuleSets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S26\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListVerifiedEmailAddresses\": {\n      \"output\": {\n        \"resultWrapper\": \"ListVerifiedEmailAddressesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"VerifiedEmailAddresses\": {\n            \"shape\": \"S40\"\n          }\n        }\n      }\n    },\n    \"PutIdentityPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identity\",\n          \"PolicyName\",\n          \"Policy\"\n        ],\n        \"members\": {\n          \"Identity\": {},\n          \"PolicyName\": {},\n          \"Policy\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PutIdentityPolicyResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"ReorderReceiptRuleSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleSetName\",\n          \"RuleNames\"\n        ],\n        \"members\": {\n          \"RuleSetName\": {},\n          \"RuleNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ReorderReceiptRuleSetResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SendBounce\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OriginalMessageId\",\n          \"BounceSender\",\n          \"BouncedRecipientInfoList\"\n        ],\n        \"members\": {\n          \"OriginalMessageId\": {},\n          \"BounceSender\": {},\n          \"Explanation\": {},\n          \"MessageDsn\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"ReportingMta\"\n            ],\n            \"members\": {\n              \"ReportingMta\": {},\n              \"ArrivalDate\": {\n                \"type\": \"timestamp\"\n              },\n              \"ExtensionFields\": {\n                \"shape\": \"S4c\"\n              }\n            }\n          },\n          \"BouncedRecipientInfoList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Recipient\"\n              ],\n              \"members\": {\n                \"Recipient\": {},\n                \"RecipientArn\": {},\n                \"BounceType\": {},\n                \"RecipientDsnFields\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"Action\",\n                    \"Status\"\n                  ],\n                  \"members\": {\n                    \"FinalRecipient\": {},\n                    \"Action\": {},\n                    \"RemoteMta\": {},\n                    \"Status\": {},\n                    \"DiagnosticCode\": {},\n                    \"LastAttemptDate\": {\n                      \"type\": \"timestamp\"\n                    },\n                    \"ExtensionFields\": {\n                      \"shape\": \"S4c\"\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"BounceSenderArn\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SendBounceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"MessageId\": {}\n        }\n      }\n    },\n    \"SendEmail\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Source\",\n          \"Destination\",\n          \"Message\"\n        ],\n        \"members\": {\n          \"Source\": {},\n          \"Destination\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"ToAddresses\": {\n                \"shape\": \"S40\"\n              },\n              \"CcAddresses\": {\n                \"shape\": \"S40\"\n              },\n              \"BccAddresses\": {\n                \"shape\": \"S40\"\n              }\n            }\n          },\n          \"Message\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"Subject\",\n              \"Body\"\n            ],\n            \"members\": {\n              \"Subject\": {\n                \"shape\": \"S4t\"\n              },\n              \"Body\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"Text\": {\n                    \"shape\": \"S4t\"\n                  },\n                  \"Html\": {\n                    \"shape\": \"S4t\"\n                  }\n                }\n              }\n            }\n          },\n          \"ReplyToAddresses\": {\n            \"shape\": \"S40\"\n          },\n          \"ReturnPath\": {},\n          \"SourceArn\": {},\n          \"ReturnPathArn\": {},\n          \"Tags\": {\n            \"shape\": \"S4x\"\n          },\n          \"ConfigurationSetName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SendEmailResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"MessageId\"\n        ],\n        \"members\": {\n          \"MessageId\": {}\n        }\n      }\n    },\n    \"SendRawEmail\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RawMessage\"\n        ],\n        \"members\": {\n          \"Source\": {},\n          \"Destinations\": {\n            \"shape\": \"S40\"\n          },\n          \"RawMessage\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"Data\"\n            ],\n            \"members\": {\n              \"Data\": {\n                \"type\": \"blob\"\n              }\n            }\n          },\n          \"FromArn\": {},\n          \"SourceArn\": {},\n          \"ReturnPathArn\": {},\n          \"Tags\": {\n            \"shape\": \"S4x\"\n          },\n          \"ConfigurationSetName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SendRawEmailResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"MessageId\"\n        ],\n        \"members\": {\n          \"MessageId\": {}\n        }\n      }\n    },\n    \"SetActiveReceiptRuleSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RuleSetName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetActiveReceiptRuleSetResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SetIdentityDkimEnabled\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identity\",\n          \"DkimEnabled\"\n        ],\n        \"members\": {\n          \"Identity\": {},\n          \"DkimEnabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetIdentityDkimEnabledResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SetIdentityFeedbackForwardingEnabled\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identity\",\n          \"ForwardingEnabled\"\n        ],\n        \"members\": {\n          \"Identity\": {},\n          \"ForwardingEnabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetIdentityFeedbackForwardingEnabledResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SetIdentityHeadersInNotificationsEnabled\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identity\",\n          \"NotificationType\",\n          \"Enabled\"\n        ],\n        \"members\": {\n          \"Identity\": {},\n          \"NotificationType\": {},\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetIdentityHeadersInNotificationsEnabledResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SetIdentityMailFromDomain\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identity\"\n        ],\n        \"members\": {\n          \"Identity\": {},\n          \"MailFromDomain\": {},\n          \"BehaviorOnMXFailure\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetIdentityMailFromDomainResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SetIdentityNotificationTopic\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Identity\",\n          \"NotificationType\"\n        ],\n        \"members\": {\n          \"Identity\": {},\n          \"NotificationType\": {},\n          \"SnsTopic\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetIdentityNotificationTopicResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SetReceiptRulePosition\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleSetName\",\n          \"RuleName\"\n        ],\n        \"members\": {\n          \"RuleSetName\": {},\n          \"RuleName\": {},\n          \"After\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetReceiptRulePositionResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"UpdateConfigurationSetEventDestination\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ConfigurationSetName\",\n          \"EventDestination\"\n        ],\n        \"members\": {\n          \"ConfigurationSetName\": {},\n          \"EventDestination\": {\n            \"shape\": \"S9\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"UpdateConfigurationSetEventDestinationResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"UpdateReceiptRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleSetName\",\n          \"Rule\"\n        ],\n        \"members\": {\n          \"RuleSetName\": {},\n          \"Rule\": {\n            \"shape\": \"Sw\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"UpdateReceiptRuleResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"VerifyDomainDkim\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Domain\"\n        ],\n        \"members\": {\n          \"Domain\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"VerifyDomainDkimResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"DkimTokens\"\n        ],\n        \"members\": {\n          \"DkimTokens\": {\n            \"shape\": \"S2o\"\n          }\n        }\n      }\n    },\n    \"VerifyDomainIdentity\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Domain\"\n        ],\n        \"members\": {\n          \"Domain\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"VerifyDomainIdentityResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"VerificationToken\"\n        ],\n        \"members\": {\n          \"VerificationToken\": {}\n        }\n      }\n    },\n    \"VerifyEmailAddress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EmailAddress\"\n        ],\n        \"members\": {\n          \"EmailAddress\": {}\n        }\n      }\n    },\n    \"VerifyEmailIdentity\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EmailAddress\"\n        ],\n        \"members\": {\n          \"EmailAddress\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"VerifyEmailIdentityResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    }\n  },\n  \"shapes\": {\n    \"S5\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Name\"\n      ],\n      \"members\": {\n        \"Name\": {}\n      }\n    },\n    \"S9\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Name\",\n        \"MatchingEventTypes\"\n      ],\n      \"members\": {\n        \"Name\": {},\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        },\n        \"MatchingEventTypes\": {\n          \"type\": \"list\",\n          \"member\": {}\n        },\n        \"KinesisFirehoseDestination\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"IAMRoleARN\",\n            \"DeliveryStreamARN\"\n          ],\n          \"members\": {\n            \"IAMRoleARN\": {},\n            \"DeliveryStreamARN\": {}\n          }\n        },\n        \"CloudWatchDestination\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"DimensionConfigurations\"\n          ],\n          \"members\": {\n            \"DimensionConfigurations\": {\n              \"type\": \"list\",\n              \"member\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"DimensionName\",\n                  \"DimensionValueSource\",\n                  \"DefaultDimensionValue\"\n                ],\n                \"members\": {\n                  \"DimensionName\": {},\n                  \"DimensionValueSource\": {},\n                  \"DefaultDimensionValue\": {}\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"So\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Name\",\n        \"IpFilter\"\n      ],\n      \"members\": {\n        \"Name\": {},\n        \"IpFilter\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Policy\",\n            \"Cidr\"\n          ],\n          \"members\": {\n            \"Policy\": {},\n            \"Cidr\": {}\n          }\n        }\n      }\n    },\n    \"Sw\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Name\"\n      ],\n      \"members\": {\n        \"Name\": {},\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        },\n        \"TlsPolicy\": {},\n        \"Recipients\": {\n          \"type\": \"list\",\n          \"member\": {}\n        },\n        \"Actions\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"S3Action\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"BucketName\"\n                ],\n                \"members\": {\n                  \"TopicArn\": {},\n                  \"BucketName\": {},\n                  \"ObjectKeyPrefix\": {},\n                  \"KmsKeyArn\": {}\n                }\n              },\n              \"BounceAction\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"SmtpReplyCode\",\n                  \"Message\",\n                  \"Sender\"\n                ],\n                \"members\": {\n                  \"TopicArn\": {},\n                  \"SmtpReplyCode\": {},\n                  \"StatusCode\": {},\n                  \"Message\": {},\n                  \"Sender\": {}\n                }\n              },\n              \"WorkmailAction\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"OrganizationArn\"\n                ],\n                \"members\": {\n                  \"TopicArn\": {},\n                  \"OrganizationArn\": {}\n                }\n              },\n              \"LambdaAction\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"FunctionArn\"\n                ],\n                \"members\": {\n                  \"TopicArn\": {},\n                  \"FunctionArn\": {},\n                  \"InvocationType\": {}\n                }\n              },\n              \"StopAction\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"Scope\"\n                ],\n                \"members\": {\n                  \"Scope\": {},\n                  \"TopicArn\": {}\n                }\n              },\n              \"AddHeaderAction\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"HeaderName\",\n                  \"HeaderValue\"\n                ],\n                \"members\": {\n                  \"HeaderName\": {},\n                  \"HeaderValue\": {}\n                }\n              },\n              \"SNSAction\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"TopicArn\"\n                ],\n                \"members\": {\n                  \"TopicArn\": {},\n                  \"Encoding\": {}\n                }\n              }\n            }\n          }\n        },\n        \"ScanEnabled\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S26\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Name\": {},\n        \"CreatedTimestamp\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S28\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"Sw\"\n      }\n    },\n    \"S2j\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S2o\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S33\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S40\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S4c\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Value\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"S4t\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Data\"\n      ],\n      \"members\": {\n        \"Data\": {},\n        \"Charset\": {}\n      }\n    },\n    \"S4x\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Value\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Value\": {}\n        }\n      }\n    }\n  }\n}\n},{}],67:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"ListIdentities\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxItems\",\n      \"result_key\": \"Identities\"\n    },\n    \"ListVerifiedEmailAddresses\": {\n      \"result_key\": \"VerifiedEmailAddresses\"\n    }\n  }\n}\n\n},{}],68:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"IdentityExists\": {\n      \"delay\": 3,\n      \"operation\": \"GetIdentityVerificationAttributes\",\n      \"maxAttempts\": 20,\n      \"acceptors\": [\n        {\n          \"expected\": \"Success\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"VerificationAttributes.*.VerificationStatus\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],69:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"events-2015-10-07\",\n    \"apiVersion\": \"2015-10-07\",\n    \"endpointPrefix\": \"events\",\n    \"jsonVersion\": \"1.1\",\n    \"serviceFullName\": \"Amazon CloudWatch Events\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"AWSEvents\",\n    \"protocol\": \"json\"\n  },\n  \"operations\": {\n    \"DeleteRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {}\n        }\n      }\n    },\n    \"DescribeRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Name\": {},\n          \"Arn\": {},\n          \"EventPattern\": {},\n          \"ScheduleExpression\": {},\n          \"State\": {},\n          \"Description\": {},\n          \"RoleArn\": {}\n        }\n      }\n    },\n    \"DisableRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {}\n        }\n      }\n    },\n    \"EnableRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {}\n        }\n      }\n    },\n    \"ListRuleNamesByTarget\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TargetArn\"\n        ],\n        \"members\": {\n          \"TargetArn\": {},\n          \"NextToken\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RuleNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListRules\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NamePrefix\": {},\n          \"NextToken\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Rules\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Arn\": {},\n                \"EventPattern\": {},\n                \"State\": {},\n                \"Description\": {},\n                \"ScheduleExpression\": {},\n                \"RoleArn\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListTargetsByRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Rule\"\n        ],\n        \"members\": {\n          \"Rule\": {},\n          \"NextToken\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Targets\": {\n            \"shape\": \"Sp\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"PutEvents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Entries\"\n        ],\n        \"members\": {\n          \"Entries\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Time\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Source\": {},\n                \"Resources\": {\n                  \"type\": \"list\",\n                  \"member\": {}\n                },\n                \"DetailType\": {},\n                \"Detail\": {}\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FailedEntryCount\": {\n            \"type\": \"integer\"\n          },\n          \"Entries\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"EventId\": {},\n                \"ErrorCode\": {},\n                \"ErrorMessage\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"PutRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"ScheduleExpression\": {},\n          \"EventPattern\": {},\n          \"State\": {},\n          \"Description\": {},\n          \"RoleArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RuleArn\": {}\n        }\n      }\n    },\n    \"PutTargets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Rule\",\n          \"Targets\"\n        ],\n        \"members\": {\n          \"Rule\": {},\n          \"Targets\": {\n            \"shape\": \"Sp\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FailedEntryCount\": {\n            \"type\": \"integer\"\n          },\n          \"FailedEntries\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"TargetId\": {},\n                \"ErrorCode\": {},\n                \"ErrorMessage\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"RemoveTargets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Rule\",\n          \"Ids\"\n        ],\n        \"members\": {\n          \"Rule\": {},\n          \"Ids\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FailedEntryCount\": {\n            \"type\": \"integer\"\n          },\n          \"FailedEntries\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"TargetId\": {},\n                \"ErrorCode\": {},\n                \"ErrorMessage\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"TestEventPattern\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EventPattern\",\n          \"Event\"\n        ],\n        \"members\": {\n          \"EventPattern\": {},\n          \"Event\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Result\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"Sp\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\",\n          \"Arn\"\n        ],\n        \"members\": {\n          \"Id\": {},\n          \"Arn\": {},\n          \"Input\": {},\n          \"InputPath\": {}\n        }\n      }\n    }\n  },\n  \"examples\": {}\n}\n},{}],70:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2015-08-04\",\n    \"endpointPrefix\": \"firehose\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"Firehose\",\n    \"serviceFullName\": \"Amazon Kinesis Firehose\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"Firehose_20150804\",\n    \"uid\": \"firehose-2015-08-04\"\n  },\n  \"operations\": {\n    \"CreateDeliveryStream\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DeliveryStreamName\"\n        ],\n        \"members\": {\n          \"DeliveryStreamName\": {},\n          \"S3DestinationConfiguration\": {\n            \"shape\": \"S3\",\n            \"deprecated\": true\n          },\n          \"ExtendedS3DestinationConfiguration\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"RoleARN\",\n              \"BucketARN\"\n            ],\n            \"members\": {\n              \"RoleARN\": {},\n              \"BucketARN\": {},\n              \"Prefix\": {},\n              \"BufferingHints\": {\n                \"shape\": \"S7\"\n              },\n              \"CompressionFormat\": {},\n              \"EncryptionConfiguration\": {\n                \"shape\": \"Sb\"\n              },\n              \"CloudWatchLoggingOptions\": {\n                \"shape\": \"Sf\"\n              },\n              \"ProcessingConfiguration\": {\n                \"shape\": \"Sk\"\n              },\n              \"S3BackupMode\": {},\n              \"S3BackupConfiguration\": {\n                \"shape\": \"S3\"\n              }\n            }\n          },\n          \"RedshiftDestinationConfiguration\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"RoleARN\",\n              \"ClusterJDBCURL\",\n              \"CopyCommand\",\n              \"Username\",\n              \"Password\",\n              \"S3Configuration\"\n            ],\n            \"members\": {\n              \"RoleARN\": {},\n              \"ClusterJDBCURL\": {},\n              \"CopyCommand\": {\n                \"shape\": \"Sv\"\n              },\n              \"Username\": {\n                \"shape\": \"Sz\"\n              },\n              \"Password\": {\n                \"shape\": \"S10\"\n              },\n              \"RetryOptions\": {\n                \"shape\": \"S11\"\n              },\n              \"S3Configuration\": {\n                \"shape\": \"S3\"\n              },\n              \"ProcessingConfiguration\": {\n                \"shape\": \"Sk\"\n              },\n              \"S3BackupMode\": {},\n              \"S3BackupConfiguration\": {\n                \"shape\": \"S3\"\n              },\n              \"CloudWatchLoggingOptions\": {\n                \"shape\": \"Sf\"\n              }\n            }\n          },\n          \"ElasticsearchDestinationConfiguration\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"RoleARN\",\n              \"DomainARN\",\n              \"IndexName\",\n              \"TypeName\",\n              \"S3Configuration\"\n            ],\n            \"members\": {\n              \"RoleARN\": {},\n              \"DomainARN\": {},\n              \"IndexName\": {},\n              \"TypeName\": {},\n              \"IndexRotationPeriod\": {},\n              \"BufferingHints\": {\n                \"shape\": \"S19\"\n              },\n              \"RetryOptions\": {\n                \"shape\": \"S1c\"\n              },\n              \"S3BackupMode\": {},\n              \"S3Configuration\": {\n                \"shape\": \"S3\"\n              },\n              \"ProcessingConfiguration\": {\n                \"shape\": \"Sk\"\n              },\n              \"CloudWatchLoggingOptions\": {\n                \"shape\": \"Sf\"\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DeliveryStreamARN\": {}\n        }\n      }\n    },\n    \"DeleteDeliveryStream\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DeliveryStreamName\"\n        ],\n        \"members\": {\n          \"DeliveryStreamName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DescribeDeliveryStream\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DeliveryStreamName\"\n        ],\n        \"members\": {\n          \"DeliveryStreamName\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"ExclusiveStartDestinationId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DeliveryStreamDescription\"\n        ],\n        \"members\": {\n          \"DeliveryStreamDescription\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"DeliveryStreamName\",\n              \"DeliveryStreamARN\",\n              \"DeliveryStreamStatus\",\n              \"VersionId\",\n              \"Destinations\",\n              \"HasMoreDestinations\"\n            ],\n            \"members\": {\n              \"DeliveryStreamName\": {},\n              \"DeliveryStreamARN\": {},\n              \"DeliveryStreamStatus\": {},\n              \"VersionId\": {},\n              \"CreateTimestamp\": {\n                \"type\": \"timestamp\"\n              },\n              \"LastUpdateTimestamp\": {\n                \"type\": \"timestamp\"\n              },\n              \"Destinations\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"DestinationId\"\n                  ],\n                  \"members\": {\n                    \"DestinationId\": {},\n                    \"S3DestinationDescription\": {\n                      \"shape\": \"S1t\"\n                    },\n                    \"ExtendedS3DestinationDescription\": {\n                      \"type\": \"structure\",\n                      \"required\": [\n                        \"RoleARN\",\n                        \"BucketARN\",\n                        \"BufferingHints\",\n                        \"CompressionFormat\",\n                        \"EncryptionConfiguration\"\n                      ],\n                      \"members\": {\n                        \"RoleARN\": {},\n                        \"BucketARN\": {},\n                        \"Prefix\": {},\n                        \"BufferingHints\": {\n                          \"shape\": \"S7\"\n                        },\n                        \"CompressionFormat\": {},\n                        \"EncryptionConfiguration\": {\n                          \"shape\": \"Sb\"\n                        },\n                        \"CloudWatchLoggingOptions\": {\n                          \"shape\": \"Sf\"\n                        },\n                        \"ProcessingConfiguration\": {\n                          \"shape\": \"Sk\"\n                        },\n                        \"S3BackupMode\": {},\n                        \"S3BackupDescription\": {\n                          \"shape\": \"S1t\"\n                        }\n                      }\n                    },\n                    \"RedshiftDestinationDescription\": {\n                      \"type\": \"structure\",\n                      \"required\": [\n                        \"RoleARN\",\n                        \"ClusterJDBCURL\",\n                        \"CopyCommand\",\n                        \"Username\",\n                        \"S3DestinationDescription\"\n                      ],\n                      \"members\": {\n                        \"RoleARN\": {},\n                        \"ClusterJDBCURL\": {},\n                        \"CopyCommand\": {\n                          \"shape\": \"Sv\"\n                        },\n                        \"Username\": {\n                          \"shape\": \"Sz\"\n                        },\n                        \"RetryOptions\": {\n                          \"shape\": \"S11\"\n                        },\n                        \"S3DestinationDescription\": {\n                          \"shape\": \"S1t\"\n                        },\n                        \"ProcessingConfiguration\": {\n                          \"shape\": \"Sk\"\n                        },\n                        \"S3BackupMode\": {},\n                        \"S3BackupDescription\": {\n                          \"shape\": \"S1t\"\n                        },\n                        \"CloudWatchLoggingOptions\": {\n                          \"shape\": \"Sf\"\n                        }\n                      }\n                    },\n                    \"ElasticsearchDestinationDescription\": {\n                      \"type\": \"structure\",\n                      \"members\": {\n                        \"RoleARN\": {},\n                        \"DomainARN\": {},\n                        \"IndexName\": {},\n                        \"TypeName\": {},\n                        \"IndexRotationPeriod\": {},\n                        \"BufferingHints\": {\n                          \"shape\": \"S19\"\n                        },\n                        \"RetryOptions\": {\n                          \"shape\": \"S1c\"\n                        },\n                        \"S3BackupMode\": {},\n                        \"S3DestinationDescription\": {\n                          \"shape\": \"S1t\"\n                        },\n                        \"ProcessingConfiguration\": {\n                          \"shape\": \"Sk\"\n                        },\n                        \"CloudWatchLoggingOptions\": {\n                          \"shape\": \"Sf\"\n                        }\n                      }\n                    }\n                  }\n                }\n              },\n              \"HasMoreDestinations\": {\n                \"type\": \"boolean\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListDeliveryStreams\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"ExclusiveStartDeliveryStreamName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DeliveryStreamNames\",\n          \"HasMoreDeliveryStreams\"\n        ],\n        \"members\": {\n          \"DeliveryStreamNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"HasMoreDeliveryStreams\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"PutRecord\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DeliveryStreamName\",\n          \"Record\"\n        ],\n        \"members\": {\n          \"DeliveryStreamName\": {},\n          \"Record\": {\n            \"shape\": \"S22\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RecordId\"\n        ],\n        \"members\": {\n          \"RecordId\": {}\n        }\n      }\n    },\n    \"PutRecordBatch\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DeliveryStreamName\",\n          \"Records\"\n        ],\n        \"members\": {\n          \"DeliveryStreamName\": {},\n          \"Records\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S22\"\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FailedPutCount\",\n          \"RequestResponses\"\n        ],\n        \"members\": {\n          \"FailedPutCount\": {\n            \"type\": \"integer\"\n          },\n          \"RequestResponses\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"RecordId\": {},\n                \"ErrorCode\": {},\n                \"ErrorMessage\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"UpdateDestination\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DeliveryStreamName\",\n          \"CurrentDeliveryStreamVersionId\",\n          \"DestinationId\"\n        ],\n        \"members\": {\n          \"DeliveryStreamName\": {},\n          \"CurrentDeliveryStreamVersionId\": {},\n          \"DestinationId\": {},\n          \"S3DestinationUpdate\": {\n            \"shape\": \"S2f\",\n            \"deprecated\": true\n          },\n          \"ExtendedS3DestinationUpdate\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"RoleARN\": {},\n              \"BucketARN\": {},\n              \"Prefix\": {},\n              \"BufferingHints\": {\n                \"shape\": \"S7\"\n              },\n              \"CompressionFormat\": {},\n              \"EncryptionConfiguration\": {\n                \"shape\": \"Sb\"\n              },\n              \"CloudWatchLoggingOptions\": {\n                \"shape\": \"Sf\"\n              },\n              \"ProcessingConfiguration\": {\n                \"shape\": \"Sk\"\n              },\n              \"S3BackupMode\": {},\n              \"S3BackupUpdate\": {\n                \"shape\": \"S2f\"\n              }\n            }\n          },\n          \"RedshiftDestinationUpdate\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"RoleARN\": {},\n              \"ClusterJDBCURL\": {},\n              \"CopyCommand\": {\n                \"shape\": \"Sv\"\n              },\n              \"Username\": {\n                \"shape\": \"Sz\"\n              },\n              \"Password\": {\n                \"shape\": \"S10\"\n              },\n              \"RetryOptions\": {\n                \"shape\": \"S11\"\n              },\n              \"S3Update\": {\n                \"shape\": \"S2f\"\n              },\n              \"ProcessingConfiguration\": {\n                \"shape\": \"Sk\"\n              },\n              \"S3BackupMode\": {},\n              \"S3BackupUpdate\": {\n                \"shape\": \"S2f\"\n              },\n              \"CloudWatchLoggingOptions\": {\n                \"shape\": \"Sf\"\n              }\n            }\n          },\n          \"ElasticsearchDestinationUpdate\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"RoleARN\": {},\n              \"DomainARN\": {},\n              \"IndexName\": {},\n              \"TypeName\": {},\n              \"IndexRotationPeriod\": {},\n              \"BufferingHints\": {\n                \"shape\": \"S19\"\n              },\n              \"RetryOptions\": {\n                \"shape\": \"S1c\"\n              },\n              \"S3Update\": {\n                \"shape\": \"S2f\"\n              },\n              \"ProcessingConfiguration\": {\n                \"shape\": \"Sk\"\n              },\n              \"CloudWatchLoggingOptions\": {\n                \"shape\": \"Sf\"\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    }\n  },\n  \"shapes\": {\n    \"S3\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"RoleARN\",\n        \"BucketARN\"\n      ],\n      \"members\": {\n        \"RoleARN\": {},\n        \"BucketARN\": {},\n        \"Prefix\": {},\n        \"BufferingHints\": {\n          \"shape\": \"S7\"\n        },\n        \"CompressionFormat\": {},\n        \"EncryptionConfiguration\": {\n          \"shape\": \"Sb\"\n        },\n        \"CloudWatchLoggingOptions\": {\n          \"shape\": \"Sf\"\n        }\n      }\n    },\n    \"S7\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"SizeInMBs\": {\n          \"type\": \"integer\"\n        },\n        \"IntervalInSeconds\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"Sb\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"NoEncryptionConfig\": {},\n        \"KMSEncryptionConfig\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"AWSKMSKeyARN\"\n          ],\n          \"members\": {\n            \"AWSKMSKeyARN\": {}\n          }\n        }\n      }\n    },\n    \"Sf\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        },\n        \"LogGroupName\": {},\n        \"LogStreamName\": {}\n      }\n    },\n    \"Sk\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        },\n        \"Processors\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"Type\"\n            ],\n            \"members\": {\n              \"Type\": {},\n              \"Parameters\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"ParameterName\",\n                    \"ParameterValue\"\n                  ],\n                  \"members\": {\n                    \"ParameterName\": {},\n                    \"ParameterValue\": {}\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"Sv\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"DataTableName\"\n      ],\n      \"members\": {\n        \"DataTableName\": {},\n        \"DataTableColumns\": {},\n        \"CopyOptions\": {}\n      }\n    },\n    \"Sz\": {\n      \"type\": \"string\",\n      \"sensitive\": true\n    },\n    \"S10\": {\n      \"type\": \"string\",\n      \"sensitive\": true\n    },\n    \"S11\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DurationInSeconds\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"S19\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"IntervalInSeconds\": {\n          \"type\": \"integer\"\n        },\n        \"SizeInMBs\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"S1c\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DurationInSeconds\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"S1t\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"RoleARN\",\n        \"BucketARN\",\n        \"BufferingHints\",\n        \"CompressionFormat\",\n        \"EncryptionConfiguration\"\n      ],\n      \"members\": {\n        \"RoleARN\": {},\n        \"BucketARN\": {},\n        \"Prefix\": {},\n        \"BufferingHints\": {\n          \"shape\": \"S7\"\n        },\n        \"CompressionFormat\": {},\n        \"EncryptionConfiguration\": {\n          \"shape\": \"Sb\"\n        },\n        \"CloudWatchLoggingOptions\": {\n          \"shape\": \"Sf\"\n        }\n      }\n    },\n    \"S22\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Data\"\n      ],\n      \"members\": {\n        \"Data\": {\n          \"type\": \"blob\"\n        }\n      }\n    },\n    \"S2f\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"RoleARN\": {},\n        \"BucketARN\": {},\n        \"Prefix\": {},\n        \"BufferingHints\": {\n          \"shape\": \"S7\"\n        },\n        \"CompressionFormat\": {},\n        \"EncryptionConfiguration\": {\n          \"shape\": \"Sb\"\n        },\n        \"CloudWatchLoggingOptions\": {\n          \"shape\": \"Sf\"\n        }\n      }\n    }\n  }\n}\n},{}],71:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"gamelift-2015-10-01\",\n    \"apiVersion\": \"2015-10-01\",\n    \"endpointPrefix\": \"gamelift\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"Amazon GameLift\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"GameLift\"\n  },\n  \"operations\": {\n    \"CreateAlias\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"RoutingStrategy\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Description\": {},\n          \"RoutingStrategy\": {\n            \"shape\": \"S4\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Alias\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"CreateBuild\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Name\": {},\n          \"Version\": {},\n          \"StorageLocation\": {\n            \"shape\": \"Sd\"\n          },\n          \"OperatingSystem\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Build\": {\n            \"shape\": \"Sh\"\n          },\n          \"UploadCredentials\": {\n            \"shape\": \"Sl\"\n          },\n          \"StorageLocation\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"CreateFleet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"BuildId\",\n          \"EC2InstanceType\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Description\": {},\n          \"BuildId\": {},\n          \"ServerLaunchPath\": {},\n          \"ServerLaunchParameters\": {},\n          \"LogPaths\": {\n            \"shape\": \"Sn\"\n          },\n          \"EC2InstanceType\": {},\n          \"EC2InboundPermissions\": {\n            \"shape\": \"Sp\"\n          },\n          \"NewGameSessionProtectionPolicy\": {},\n          \"RuntimeConfiguration\": {\n            \"shape\": \"Sv\"\n          },\n          \"ResourceCreationLimitPolicy\": {\n            \"shape\": \"Sz\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetAttributes\": {\n            \"shape\": \"S12\"\n          }\n        }\n      }\n    },\n    \"CreateGameSession\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"MaximumPlayerSessionCount\"\n        ],\n        \"members\": {\n          \"FleetId\": {},\n          \"AliasId\": {},\n          \"MaximumPlayerSessionCount\": {\n            \"type\": \"integer\"\n          },\n          \"Name\": {},\n          \"GameProperties\": {\n            \"shape\": \"S15\"\n          },\n          \"CreatorId\": {},\n          \"GameSessionId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GameSession\": {\n            \"shape\": \"S1b\"\n          }\n        }\n      }\n    },\n    \"CreatePlayerSession\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GameSessionId\",\n          \"PlayerId\"\n        ],\n        \"members\": {\n          \"GameSessionId\": {},\n          \"PlayerId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PlayerSession\": {\n            \"shape\": \"S1i\"\n          }\n        }\n      }\n    },\n    \"CreatePlayerSessions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GameSessionId\",\n          \"PlayerIds\"\n        ],\n        \"members\": {\n          \"GameSessionId\": {},\n          \"PlayerIds\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PlayerSessions\": {\n            \"shape\": \"S1o\"\n          }\n        }\n      }\n    },\n    \"DeleteAlias\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AliasId\"\n        ],\n        \"members\": {\n          \"AliasId\": {}\n        }\n      }\n    },\n    \"DeleteBuild\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BuildId\"\n        ],\n        \"members\": {\n          \"BuildId\": {}\n        }\n      }\n    },\n    \"DeleteFleet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FleetId\"\n        ],\n        \"members\": {\n          \"FleetId\": {}\n        }\n      }\n    },\n    \"DeleteScalingPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"FleetId\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"FleetId\": {}\n        }\n      }\n    },\n    \"DescribeAlias\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AliasId\"\n        ],\n        \"members\": {\n          \"AliasId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Alias\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"DescribeBuild\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BuildId\"\n        ],\n        \"members\": {\n          \"BuildId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Build\": {\n            \"shape\": \"Sh\"\n          }\n        }\n      }\n    },\n    \"DescribeEC2InstanceLimits\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EC2InstanceType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EC2InstanceLimits\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"EC2InstanceType\": {},\n                \"CurrentInstances\": {\n                  \"type\": \"integer\"\n                },\n                \"InstanceLimit\": {\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeFleetAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetIds\": {\n            \"shape\": \"S22\"\n          },\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetAttributes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S12\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeFleetCapacity\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetIds\": {\n            \"shape\": \"S22\"\n          },\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetCapacity\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"FleetId\": {},\n                \"InstanceType\": {},\n                \"InstanceCounts\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"DESIRED\": {\n                      \"type\": \"integer\"\n                    },\n                    \"MINIMUM\": {\n                      \"type\": \"integer\"\n                    },\n                    \"MAXIMUM\": {\n                      \"type\": \"integer\"\n                    },\n                    \"PENDING\": {\n                      \"type\": \"integer\"\n                    },\n                    \"ACTIVE\": {\n                      \"type\": \"integer\"\n                    },\n                    \"IDLE\": {\n                      \"type\": \"integer\"\n                    },\n                    \"TERMINATING\": {\n                      \"type\": \"integer\"\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeFleetEvents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FleetId\"\n        ],\n        \"members\": {\n          \"FleetId\": {},\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Events\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"EventId\": {},\n                \"ResourceId\": {},\n                \"EventCode\": {},\n                \"Message\": {},\n                \"EventTime\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeFleetPortSettings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FleetId\"\n        ],\n        \"members\": {\n          \"FleetId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InboundPermissions\": {\n            \"shape\": \"Sp\"\n          }\n        }\n      }\n    },\n    \"DescribeFleetUtilization\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetIds\": {\n            \"shape\": \"S22\"\n          },\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetUtilization\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"FleetId\": {},\n                \"ActiveServerProcessCount\": {\n                  \"type\": \"integer\"\n                },\n                \"ActiveGameSessionCount\": {\n                  \"type\": \"integer\"\n                },\n                \"CurrentPlayerSessionCount\": {\n                  \"type\": \"integer\"\n                },\n                \"MaximumPlayerSessionCount\": {\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeGameSessionDetails\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetId\": {},\n          \"GameSessionId\": {},\n          \"AliasId\": {},\n          \"StatusFilter\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GameSessionDetails\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"GameSession\": {\n                  \"shape\": \"S1b\"\n                },\n                \"ProtectionPolicy\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeGameSessions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetId\": {},\n          \"GameSessionId\": {},\n          \"AliasId\": {},\n          \"StatusFilter\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GameSessions\": {\n            \"shape\": \"S2r\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FleetId\"\n        ],\n        \"members\": {\n          \"FleetId\": {},\n          \"InstanceId\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Instances\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"FleetId\": {},\n                \"InstanceId\": {},\n                \"IpAddress\": {},\n                \"OperatingSystem\": {},\n                \"Type\": {},\n                \"Status\": {},\n                \"CreationTime\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribePlayerSessions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GameSessionId\": {},\n          \"PlayerId\": {},\n          \"PlayerSessionId\": {},\n          \"PlayerSessionStatusFilter\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PlayerSessions\": {\n            \"shape\": \"S1o\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeRuntimeConfiguration\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FleetId\"\n        ],\n        \"members\": {\n          \"FleetId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RuntimeConfiguration\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    },\n    \"DescribeScalingPolicies\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FleetId\"\n        ],\n        \"members\": {\n          \"FleetId\": {},\n          \"StatusFilter\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ScalingPolicies\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"FleetId\": {},\n                \"Name\": {},\n                \"Status\": {},\n                \"ScalingAdjustment\": {\n                  \"type\": \"integer\"\n                },\n                \"ScalingAdjustmentType\": {},\n                \"ComparisonOperator\": {},\n                \"Threshold\": {\n                  \"type\": \"double\"\n                },\n                \"EvaluationPeriods\": {\n                  \"type\": \"integer\"\n                },\n                \"MetricName\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"GetGameSessionLogUrl\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GameSessionId\"\n        ],\n        \"members\": {\n          \"GameSessionId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PreSignedUrl\": {}\n        }\n      }\n    },\n    \"GetInstanceAccess\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FleetId\",\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"FleetId\": {},\n          \"InstanceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceAccess\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"FleetId\": {},\n              \"InstanceId\": {},\n              \"IpAddress\": {},\n              \"OperatingSystem\": {},\n              \"Credentials\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"UserName\": {},\n                  \"Secret\": {}\n                },\n                \"sensitive\": true\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListAliases\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RoutingStrategyType\": {},\n          \"Name\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Aliases\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S9\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListBuilds\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Status\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Builds\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sh\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListFleets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BuildId\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetIds\": {\n            \"shape\": \"S22\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"PutScalingPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"FleetId\",\n          \"ScalingAdjustment\",\n          \"ScalingAdjustmentType\",\n          \"Threshold\",\n          \"ComparisonOperator\",\n          \"EvaluationPeriods\",\n          \"MetricName\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"FleetId\": {},\n          \"ScalingAdjustment\": {\n            \"type\": \"integer\"\n          },\n          \"ScalingAdjustmentType\": {},\n          \"Threshold\": {\n            \"type\": \"double\"\n          },\n          \"ComparisonOperator\": {},\n          \"EvaluationPeriods\": {\n            \"type\": \"integer\"\n          },\n          \"MetricName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Name\": {}\n        }\n      }\n    },\n    \"RequestUploadCredentials\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BuildId\"\n        ],\n        \"members\": {\n          \"BuildId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UploadCredentials\": {\n            \"shape\": \"Sl\"\n          },\n          \"StorageLocation\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"ResolveAlias\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AliasId\"\n        ],\n        \"members\": {\n          \"AliasId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetId\": {}\n        }\n      }\n    },\n    \"SearchGameSessions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetId\": {},\n          \"AliasId\": {},\n          \"FilterExpression\": {},\n          \"SortExpression\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GameSessions\": {\n            \"shape\": \"S2r\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"UpdateAlias\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AliasId\"\n        ],\n        \"members\": {\n          \"AliasId\": {},\n          \"Name\": {},\n          \"Description\": {},\n          \"RoutingStrategy\": {\n            \"shape\": \"S4\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Alias\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"UpdateBuild\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BuildId\"\n        ],\n        \"members\": {\n          \"BuildId\": {},\n          \"Name\": {},\n          \"Version\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Build\": {\n            \"shape\": \"Sh\"\n          }\n        }\n      }\n    },\n    \"UpdateFleetAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FleetId\"\n        ],\n        \"members\": {\n          \"FleetId\": {},\n          \"Name\": {},\n          \"Description\": {},\n          \"NewGameSessionProtectionPolicy\": {},\n          \"ResourceCreationLimitPolicy\": {\n            \"shape\": \"Sz\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetId\": {}\n        }\n      }\n    },\n    \"UpdateFleetCapacity\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FleetId\"\n        ],\n        \"members\": {\n          \"FleetId\": {},\n          \"DesiredInstances\": {\n            \"type\": \"integer\"\n          },\n          \"MinSize\": {\n            \"type\": \"integer\"\n          },\n          \"MaxSize\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetId\": {}\n        }\n      }\n    },\n    \"UpdateFleetPortSettings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FleetId\"\n        ],\n        \"members\": {\n          \"FleetId\": {},\n          \"InboundPermissionAuthorizations\": {\n            \"shape\": \"Sp\"\n          },\n          \"InboundPermissionRevocations\": {\n            \"shape\": \"Sp\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FleetId\": {}\n        }\n      }\n    },\n    \"UpdateGameSession\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GameSessionId\"\n        ],\n        \"members\": {\n          \"GameSessionId\": {},\n          \"MaximumPlayerSessionCount\": {\n            \"type\": \"integer\"\n          },\n          \"Name\": {},\n          \"PlayerSessionCreationPolicy\": {},\n          \"ProtectionPolicy\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GameSession\": {\n            \"shape\": \"S1b\"\n          }\n        }\n      }\n    },\n    \"UpdateRuntimeConfiguration\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FleetId\",\n          \"RuntimeConfiguration\"\n        ],\n        \"members\": {\n          \"FleetId\": {},\n          \"RuntimeConfiguration\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RuntimeConfiguration\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S4\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Type\": {},\n        \"FleetId\": {},\n        \"Message\": {}\n      }\n    },\n    \"S9\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AliasId\": {},\n        \"Name\": {},\n        \"Description\": {},\n        \"RoutingStrategy\": {\n          \"shape\": \"S4\"\n        },\n        \"CreationTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"LastUpdatedTime\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"Sd\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Bucket\": {},\n        \"Key\": {},\n        \"RoleArn\": {}\n      }\n    },\n    \"Sh\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"BuildId\": {},\n        \"Name\": {},\n        \"Version\": {},\n        \"Status\": {},\n        \"SizeOnDisk\": {\n          \"type\": \"long\"\n        },\n        \"OperatingSystem\": {},\n        \"CreationTime\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"Sl\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AccessKeyId\": {},\n        \"SecretAccessKey\": {},\n        \"SessionToken\": {}\n      },\n      \"sensitive\": true\n    },\n    \"Sn\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sp\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FromPort\",\n          \"ToPort\",\n          \"IpRange\",\n          \"Protocol\"\n        ],\n        \"members\": {\n          \"FromPort\": {\n            \"type\": \"integer\"\n          },\n          \"ToPort\": {\n            \"type\": \"integer\"\n          },\n          \"IpRange\": {},\n          \"Protocol\": {}\n        }\n      }\n    },\n    \"Sv\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ServerProcesses\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"LaunchPath\",\n              \"ConcurrentExecutions\"\n            ],\n            \"members\": {\n              \"LaunchPath\": {},\n              \"Parameters\": {},\n              \"ConcurrentExecutions\": {\n                \"type\": \"integer\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"Sz\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"NewGameSessionsPerCreator\": {\n          \"type\": \"integer\"\n        },\n        \"PolicyPeriodInMinutes\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"S12\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"FleetId\": {},\n        \"Description\": {},\n        \"Name\": {},\n        \"CreationTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"TerminationTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Status\": {},\n        \"BuildId\": {},\n        \"ServerLaunchPath\": {},\n        \"ServerLaunchParameters\": {},\n        \"LogPaths\": {\n          \"shape\": \"Sn\"\n        },\n        \"NewGameSessionProtectionPolicy\": {},\n        \"OperatingSystem\": {},\n        \"ResourceCreationLimitPolicy\": {\n          \"shape\": \"Sz\"\n        }\n      }\n    },\n    \"S15\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Key\",\n          \"Value\"\n        ],\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"S1b\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"GameSessionId\": {},\n        \"Name\": {},\n        \"FleetId\": {},\n        \"CreationTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"TerminationTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"CurrentPlayerSessionCount\": {\n          \"type\": \"integer\"\n        },\n        \"MaximumPlayerSessionCount\": {\n          \"type\": \"integer\"\n        },\n        \"Status\": {},\n        \"GameProperties\": {\n          \"shape\": \"S15\"\n        },\n        \"IpAddress\": {},\n        \"Port\": {\n          \"type\": \"integer\"\n        },\n        \"PlayerSessionCreationPolicy\": {},\n        \"CreatorId\": {}\n      }\n    },\n    \"S1i\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"PlayerSessionId\": {},\n        \"PlayerId\": {},\n        \"GameSessionId\": {},\n        \"FleetId\": {},\n        \"CreationTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"TerminationTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Status\": {},\n        \"IpAddress\": {},\n        \"Port\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"S1o\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S1i\"\n      }\n    },\n    \"S22\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S2r\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S1b\"\n      }\n    }\n  }\n}\n},{}],72:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2016-02-16\",\n    \"endpointPrefix\": \"inspector\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"Amazon Inspector\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"InspectorService\",\n    \"uid\": \"inspector-2016-02-16\"\n  },\n  \"operations\": {\n    \"AddAttributesToFindings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"findingArns\",\n          \"attributes\"\n        ],\n        \"members\": {\n          \"findingArns\": {\n            \"shape\": \"S2\"\n          },\n          \"attributes\": {\n            \"shape\": \"S4\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"failedItems\"\n        ],\n        \"members\": {\n          \"failedItems\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"CreateAssessmentTarget\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentTargetName\",\n          \"resourceGroupArn\"\n        ],\n        \"members\": {\n          \"assessmentTargetName\": {},\n          \"resourceGroupArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentTargetArn\"\n        ],\n        \"members\": {\n          \"assessmentTargetArn\": {}\n        }\n      }\n    },\n    \"CreateAssessmentTemplate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentTargetArn\",\n          \"assessmentTemplateName\",\n          \"durationInSeconds\",\n          \"rulesPackageArns\"\n        ],\n        \"members\": {\n          \"assessmentTargetArn\": {},\n          \"assessmentTemplateName\": {},\n          \"durationInSeconds\": {\n            \"type\": \"integer\"\n          },\n          \"rulesPackageArns\": {\n            \"shape\": \"Sj\"\n          },\n          \"userAttributesForFindings\": {\n            \"shape\": \"S4\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentTemplateArn\"\n        ],\n        \"members\": {\n          \"assessmentTemplateArn\": {}\n        }\n      }\n    },\n    \"CreateResourceGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"resourceGroupTags\"\n        ],\n        \"members\": {\n          \"resourceGroupTags\": {\n            \"shape\": \"Sm\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"resourceGroupArn\"\n        ],\n        \"members\": {\n          \"resourceGroupArn\": {}\n        }\n      }\n    },\n    \"DeleteAssessmentRun\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentRunArn\"\n        ],\n        \"members\": {\n          \"assessmentRunArn\": {}\n        }\n      }\n    },\n    \"DeleteAssessmentTarget\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentTargetArn\"\n        ],\n        \"members\": {\n          \"assessmentTargetArn\": {}\n        }\n      }\n    },\n    \"DeleteAssessmentTemplate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentTemplateArn\"\n        ],\n        \"members\": {\n          \"assessmentTemplateArn\": {}\n        }\n      }\n    },\n    \"DescribeAssessmentRuns\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentRunArns\"\n        ],\n        \"members\": {\n          \"assessmentRunArns\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentRuns\",\n          \"failedItems\"\n        ],\n        \"members\": {\n          \"assessmentRuns\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"arn\",\n                \"name\",\n                \"assessmentTemplateArn\",\n                \"state\",\n                \"durationInSeconds\",\n                \"rulesPackageArns\",\n                \"userAttributesForFindings\",\n                \"createdAt\",\n                \"stateChangedAt\",\n                \"dataCollected\",\n                \"stateChanges\",\n                \"notifications\"\n              ],\n              \"members\": {\n                \"arn\": {},\n                \"name\": {},\n                \"assessmentTemplateArn\": {},\n                \"state\": {},\n                \"durationInSeconds\": {\n                  \"type\": \"integer\"\n                },\n                \"rulesPackageArns\": {\n                  \"type\": \"list\",\n                  \"member\": {}\n                },\n                \"userAttributesForFindings\": {\n                  \"shape\": \"S4\"\n                },\n                \"createdAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"startedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"completedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"stateChangedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"dataCollected\": {\n                  \"type\": \"boolean\"\n                },\n                \"stateChanges\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"required\": [\n                      \"stateChangedAt\",\n                      \"state\"\n                    ],\n                    \"members\": {\n                      \"stateChangedAt\": {\n                        \"type\": \"timestamp\"\n                      },\n                      \"state\": {}\n                    }\n                  }\n                },\n                \"notifications\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"required\": [\n                      \"date\",\n                      \"event\",\n                      \"error\"\n                    ],\n                    \"members\": {\n                      \"date\": {\n                        \"type\": \"timestamp\"\n                      },\n                      \"event\": {},\n                      \"message\": {},\n                      \"error\": {\n                        \"type\": \"boolean\"\n                      },\n                      \"snsTopicArn\": {},\n                      \"snsPublishStatusCode\": {}\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"failedItems\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"DescribeAssessmentTargets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentTargetArns\"\n        ],\n        \"members\": {\n          \"assessmentTargetArns\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentTargets\",\n          \"failedItems\"\n        ],\n        \"members\": {\n          \"assessmentTargets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"arn\",\n                \"name\",\n                \"resourceGroupArn\",\n                \"createdAt\",\n                \"updatedAt\"\n              ],\n              \"members\": {\n                \"arn\": {},\n                \"name\": {},\n                \"resourceGroupArn\": {},\n                \"createdAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"updatedAt\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"failedItems\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"DescribeAssessmentTemplates\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentTemplateArns\"\n        ],\n        \"members\": {\n          \"assessmentTemplateArns\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentTemplates\",\n          \"failedItems\"\n        ],\n        \"members\": {\n          \"assessmentTemplates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"arn\",\n                \"name\",\n                \"assessmentTargetArn\",\n                \"durationInSeconds\",\n                \"rulesPackageArns\",\n                \"userAttributesForFindings\",\n                \"createdAt\"\n              ],\n              \"members\": {\n                \"arn\": {},\n                \"name\": {},\n                \"assessmentTargetArn\": {},\n                \"durationInSeconds\": {\n                  \"type\": \"integer\"\n                },\n                \"rulesPackageArns\": {\n                  \"shape\": \"Sj\"\n                },\n                \"userAttributesForFindings\": {\n                  \"shape\": \"S4\"\n                },\n                \"createdAt\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"failedItems\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"DescribeCrossAccountAccessRole\": {\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"roleArn\",\n          \"valid\",\n          \"registeredAt\"\n        ],\n        \"members\": {\n          \"roleArn\": {},\n          \"valid\": {\n            \"type\": \"boolean\"\n          },\n          \"registeredAt\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"DescribeFindings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"findingArns\"\n        ],\n        \"members\": {\n          \"findingArns\": {\n            \"shape\": \"Sv\"\n          },\n          \"locale\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"findings\",\n          \"failedItems\"\n        ],\n        \"members\": {\n          \"findings\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"arn\",\n                \"attributes\",\n                \"userAttributes\",\n                \"createdAt\",\n                \"updatedAt\"\n              ],\n              \"members\": {\n                \"arn\": {},\n                \"schemaVersion\": {\n                  \"type\": \"integer\"\n                },\n                \"service\": {},\n                \"serviceAttributes\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"schemaVersion\"\n                  ],\n                  \"members\": {\n                    \"schemaVersion\": {\n                      \"type\": \"integer\"\n                    },\n                    \"assessmentRunArn\": {},\n                    \"rulesPackageArn\": {}\n                  }\n                },\n                \"assetType\": {},\n                \"assetAttributes\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"schemaVersion\"\n                  ],\n                  \"members\": {\n                    \"schemaVersion\": {\n                      \"type\": \"integer\"\n                    },\n                    \"agentId\": {},\n                    \"autoScalingGroup\": {},\n                    \"amiId\": {},\n                    \"hostname\": {},\n                    \"ipv4Addresses\": {\n                      \"type\": \"list\",\n                      \"member\": {}\n                    }\n                  }\n                },\n                \"id\": {},\n                \"title\": {},\n                \"description\": {},\n                \"recommendation\": {},\n                \"severity\": {},\n                \"numericSeverity\": {\n                  \"type\": \"double\"\n                },\n                \"confidence\": {\n                  \"type\": \"integer\"\n                },\n                \"indicatorOfCompromise\": {\n                  \"type\": \"boolean\"\n                },\n                \"attributes\": {\n                  \"shape\": \"S24\"\n                },\n                \"userAttributes\": {\n                  \"shape\": \"S4\"\n                },\n                \"createdAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"updatedAt\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"failedItems\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"DescribeResourceGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"resourceGroupArns\"\n        ],\n        \"members\": {\n          \"resourceGroupArns\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"resourceGroups\",\n          \"failedItems\"\n        ],\n        \"members\": {\n          \"resourceGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"arn\",\n                \"tags\",\n                \"createdAt\"\n              ],\n              \"members\": {\n                \"arn\": {},\n                \"tags\": {\n                  \"shape\": \"Sm\"\n                },\n                \"createdAt\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"failedItems\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"DescribeRulesPackages\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"rulesPackageArns\"\n        ],\n        \"members\": {\n          \"rulesPackageArns\": {\n            \"shape\": \"Sv\"\n          },\n          \"locale\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"rulesPackages\",\n          \"failedItems\"\n        ],\n        \"members\": {\n          \"rulesPackages\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"arn\",\n                \"name\",\n                \"version\",\n                \"provider\"\n              ],\n              \"members\": {\n                \"arn\": {},\n                \"name\": {},\n                \"version\": {},\n                \"provider\": {},\n                \"description\": {}\n              }\n            }\n          },\n          \"failedItems\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"GetTelemetryMetadata\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentRunArn\"\n        ],\n        \"members\": {\n          \"assessmentRunArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"telemetryMetadata\"\n        ],\n        \"members\": {\n          \"telemetryMetadata\": {\n            \"shape\": \"S2i\"\n          }\n        }\n      }\n    },\n    \"ListAssessmentRunAgents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentRunArn\"\n        ],\n        \"members\": {\n          \"assessmentRunArn\": {},\n          \"filter\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"agentHealths\",\n              \"agentHealthCodes\"\n            ],\n            \"members\": {\n              \"agentHealths\": {\n                \"type\": \"list\",\n                \"member\": {}\n              },\n              \"agentHealthCodes\": {\n                \"type\": \"list\",\n                \"member\": {}\n              }\n            }\n          },\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentRunAgents\"\n        ],\n        \"members\": {\n          \"assessmentRunAgents\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"agentId\",\n                \"assessmentRunArn\",\n                \"agentHealth\",\n                \"agentHealthCode\",\n                \"telemetryMetadata\"\n              ],\n              \"members\": {\n                \"agentId\": {},\n                \"assessmentRunArn\": {},\n                \"agentHealth\": {},\n                \"agentHealthCode\": {},\n                \"agentHealthDetails\": {},\n                \"autoScalingGroup\": {},\n                \"telemetryMetadata\": {\n                  \"shape\": \"S2i\"\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListAssessmentRuns\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"assessmentTemplateArns\": {\n            \"shape\": \"S2y\"\n          },\n          \"filter\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"namePattern\": {},\n              \"states\": {\n                \"type\": \"list\",\n                \"member\": {}\n              },\n              \"durationRange\": {\n                \"shape\": \"S32\"\n              },\n              \"rulesPackageArns\": {\n                \"shape\": \"S33\"\n              },\n              \"startTimeRange\": {\n                \"shape\": \"S34\"\n              },\n              \"completionTimeRange\": {\n                \"shape\": \"S34\"\n              },\n              \"stateChangeTimeRange\": {\n                \"shape\": \"S34\"\n              }\n            }\n          },\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentRunArns\"\n        ],\n        \"members\": {\n          \"assessmentRunArns\": {\n            \"shape\": \"S36\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListAssessmentTargets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"filter\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"assessmentTargetNamePattern\": {}\n            }\n          },\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentTargetArns\"\n        ],\n        \"members\": {\n          \"assessmentTargetArns\": {\n            \"shape\": \"S36\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListAssessmentTemplates\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"assessmentTargetArns\": {\n            \"shape\": \"S2y\"\n          },\n          \"filter\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"namePattern\": {},\n              \"durationRange\": {\n                \"shape\": \"S32\"\n              },\n              \"rulesPackageArns\": {\n                \"shape\": \"S33\"\n              }\n            }\n          },\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentTemplateArns\"\n        ],\n        \"members\": {\n          \"assessmentTemplateArns\": {\n            \"shape\": \"S36\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListEventSubscriptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"resourceArn\": {},\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"subscriptions\"\n        ],\n        \"members\": {\n          \"subscriptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"resourceArn\",\n                \"topicArn\",\n                \"eventSubscriptions\"\n              ],\n              \"members\": {\n                \"resourceArn\": {},\n                \"topicArn\": {},\n                \"eventSubscriptions\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"required\": [\n                      \"event\",\n                      \"subscribedAt\"\n                    ],\n                    \"members\": {\n                      \"event\": {},\n                      \"subscribedAt\": {\n                        \"type\": \"timestamp\"\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListFindings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"assessmentRunArns\": {\n            \"shape\": \"S2y\"\n          },\n          \"filter\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"agentIds\": {\n                \"type\": \"list\",\n                \"member\": {}\n              },\n              \"autoScalingGroups\": {\n                \"type\": \"list\",\n                \"member\": {}\n              },\n              \"ruleNames\": {\n                \"type\": \"list\",\n                \"member\": {}\n              },\n              \"severities\": {\n                \"type\": \"list\",\n                \"member\": {}\n              },\n              \"rulesPackageArns\": {\n                \"shape\": \"S33\"\n              },\n              \"attributes\": {\n                \"shape\": \"S24\"\n              },\n              \"userAttributes\": {\n                \"shape\": \"S24\"\n              },\n              \"creationTimeRange\": {\n                \"shape\": \"S34\"\n              }\n            }\n          },\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"findingArns\"\n        ],\n        \"members\": {\n          \"findingArns\": {\n            \"shape\": \"S36\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListRulesPackages\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"rulesPackageArns\"\n        ],\n        \"members\": {\n          \"rulesPackageArns\": {\n            \"shape\": \"S36\"\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListTagsForResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"resourceArn\"\n        ],\n        \"members\": {\n          \"resourceArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"tags\"\n        ],\n        \"members\": {\n          \"tags\": {\n            \"shape\": \"S3w\"\n          }\n        }\n      }\n    },\n    \"PreviewAgents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"previewAgentsArn\"\n        ],\n        \"members\": {\n          \"previewAgentsArn\": {},\n          \"nextToken\": {},\n          \"maxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"agentPreviews\"\n        ],\n        \"members\": {\n          \"agentPreviews\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"agentId\"\n              ],\n              \"members\": {\n                \"agentId\": {},\n                \"autoScalingGroup\": {}\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"RegisterCrossAccountAccessRole\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"roleArn\"\n        ],\n        \"members\": {\n          \"roleArn\": {}\n        }\n      }\n    },\n    \"RemoveAttributesFromFindings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"findingArns\",\n          \"attributeKeys\"\n        ],\n        \"members\": {\n          \"findingArns\": {\n            \"shape\": \"S2\"\n          },\n          \"attributeKeys\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"failedItems\"\n        ],\n        \"members\": {\n          \"failedItems\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"SetTagsForResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"resourceArn\"\n        ],\n        \"members\": {\n          \"resourceArn\": {},\n          \"tags\": {\n            \"shape\": \"S3w\"\n          }\n        }\n      }\n    },\n    \"StartAssessmentRun\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentTemplateArn\"\n        ],\n        \"members\": {\n          \"assessmentTemplateArn\": {},\n          \"assessmentRunName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentRunArn\"\n        ],\n        \"members\": {\n          \"assessmentRunArn\": {}\n        }\n      }\n    },\n    \"StopAssessmentRun\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentRunArn\"\n        ],\n        \"members\": {\n          \"assessmentRunArn\": {}\n        }\n      }\n    },\n    \"SubscribeToEvent\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"resourceArn\",\n          \"event\",\n          \"topicArn\"\n        ],\n        \"members\": {\n          \"resourceArn\": {},\n          \"event\": {},\n          \"topicArn\": {}\n        }\n      }\n    },\n    \"UnsubscribeFromEvent\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"resourceArn\",\n          \"event\",\n          \"topicArn\"\n        ],\n        \"members\": {\n          \"resourceArn\": {},\n          \"event\": {},\n          \"topicArn\": {}\n        }\n      }\n    },\n    \"UpdateAssessmentTarget\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"assessmentTargetArn\",\n          \"assessmentTargetName\",\n          \"resourceGroupArn\"\n        ],\n        \"members\": {\n          \"assessmentTargetArn\": {},\n          \"assessmentTargetName\": {},\n          \"resourceGroupArn\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S2\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S4\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S5\"\n      }\n    },\n    \"S5\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"key\"\n      ],\n      \"members\": {\n        \"key\": {},\n        \"value\": {}\n      }\n    },\n    \"S9\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"failureCode\",\n          \"retryable\"\n        ],\n        \"members\": {\n          \"failureCode\": {},\n          \"retryable\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"Sj\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sm\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"key\"\n        ],\n        \"members\": {\n          \"key\": {},\n          \"value\": {}\n        }\n      }\n    },\n    \"Sv\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S24\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S5\"\n      }\n    },\n    \"S2i\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"messageType\",\n          \"count\"\n        ],\n        \"members\": {\n          \"messageType\": {},\n          \"count\": {\n            \"type\": \"long\"\n          },\n          \"dataSize\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    },\n    \"S2y\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S32\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"minSeconds\": {\n          \"type\": \"integer\"\n        },\n        \"maxSeconds\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"S33\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S34\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"beginDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"endDate\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S36\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S3w\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"key\"\n        ],\n        \"members\": {\n          \"key\": {},\n          \"value\": {}\n        }\n      }\n    }\n  }\n}\n},{}],73:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"iot-2015-05-28\",\n    \"apiVersion\": \"2015-05-28\",\n    \"endpointPrefix\": \"iot\",\n    \"serviceFullName\": \"AWS IoT\",\n    \"signatureVersion\": \"v4\",\n    \"signingName\": \"execute-api\",\n    \"protocol\": \"rest-json\"\n  },\n  \"operations\": {\n    \"AcceptCertificateTransfer\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/accept-certificate-transfer/{certificateId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"certificateId\"\n        ],\n        \"members\": {\n          \"certificateId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"certificateId\"\n          },\n          \"setAsActive\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"setAsActive\",\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"AttachPrincipalPolicy\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/principal-policies/{policyName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"policyName\",\n          \"principal\"\n        ],\n        \"members\": {\n          \"policyName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"policyName\"\n          },\n          \"principal\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amzn-iot-principal\"\n          }\n        }\n      }\n    },\n    \"AttachThingPrincipal\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/things/{thingName}/principals\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"thingName\",\n          \"principal\"\n        ],\n        \"members\": {\n          \"thingName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"thingName\"\n          },\n          \"principal\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amzn-principal\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CancelCertificateTransfer\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/cancel-certificate-transfer/{certificateId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"certificateId\"\n        ],\n        \"members\": {\n          \"certificateId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"certificateId\"\n          }\n        }\n      }\n    },\n    \"CreateCertificateFromCsr\": {\n      \"http\": {\n        \"requestUri\": \"/certificates\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"certificateSigningRequest\"\n        ],\n        \"members\": {\n          \"certificateSigningRequest\": {},\n          \"setAsActive\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"setAsActive\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"certificateArn\": {},\n          \"certificateId\": {},\n          \"certificatePem\": {}\n        }\n      }\n    },\n    \"CreateKeysAndCertificate\": {\n      \"http\": {\n        \"requestUri\": \"/keys-and-certificate\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"setAsActive\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"setAsActive\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"certificateArn\": {},\n          \"certificateId\": {},\n          \"certificatePem\": {},\n          \"keyPair\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"PublicKey\": {},\n              \"PrivateKey\": {\n                \"type\": \"string\",\n                \"sensitive\": true\n              }\n            }\n          }\n        }\n      }\n    },\n    \"CreatePolicy\": {\n      \"http\": {\n        \"requestUri\": \"/policies/{policyName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"policyName\",\n          \"policyDocument\"\n        ],\n        \"members\": {\n          \"policyName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"policyName\"\n          },\n          \"policyDocument\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"policyName\": {},\n          \"policyArn\": {},\n          \"policyDocument\": {},\n          \"policyVersionId\": {}\n        }\n      }\n    },\n    \"CreatePolicyVersion\": {\n      \"http\": {\n        \"requestUri\": \"/policies/{policyName}/version\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"policyName\",\n          \"policyDocument\"\n        ],\n        \"members\": {\n          \"policyName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"policyName\"\n          },\n          \"policyDocument\": {},\n          \"setAsDefault\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"setAsDefault\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"policyArn\": {},\n          \"policyDocument\": {},\n          \"policyVersionId\": {},\n          \"isDefaultVersion\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"CreateThing\": {\n      \"http\": {\n        \"requestUri\": \"/things/{thingName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"thingName\"\n        ],\n        \"members\": {\n          \"thingName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"thingName\"\n          },\n          \"thingTypeName\": {},\n          \"attributePayload\": {\n            \"shape\": \"Sw\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"thingName\": {},\n          \"thingArn\": {}\n        }\n      }\n    },\n    \"CreateThingType\": {\n      \"http\": {\n        \"requestUri\": \"/thing-types/{thingTypeName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"thingTypeName\"\n        ],\n        \"members\": {\n          \"thingTypeName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"thingTypeName\"\n          },\n          \"thingTypeProperties\": {\n            \"shape\": \"S14\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"thingTypeName\": {},\n          \"thingTypeArn\": {}\n        }\n      }\n    },\n    \"CreateTopicRule\": {\n      \"http\": {\n        \"requestUri\": \"/rules/{ruleName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ruleName\",\n          \"topicRulePayload\"\n        ],\n        \"members\": {\n          \"ruleName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"ruleName\"\n          },\n          \"topicRulePayload\": {\n            \"shape\": \"S1b\"\n          }\n        },\n        \"payload\": \"topicRulePayload\"\n      }\n    },\n    \"DeleteCACertificate\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/cacertificate/{caCertificateId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"certificateId\"\n        ],\n        \"members\": {\n          \"certificateId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"caCertificateId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteCertificate\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/certificates/{certificateId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"certificateId\"\n        ],\n        \"members\": {\n          \"certificateId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"certificateId\"\n          }\n        }\n      }\n    },\n    \"DeletePolicy\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/policies/{policyName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"policyName\"\n        ],\n        \"members\": {\n          \"policyName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"policyName\"\n          }\n        }\n      }\n    },\n    \"DeletePolicyVersion\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/policies/{policyName}/version/{policyVersionId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"policyName\",\n          \"policyVersionId\"\n        ],\n        \"members\": {\n          \"policyName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"policyName\"\n          },\n          \"policyVersionId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"policyVersionId\"\n          }\n        }\n      }\n    },\n    \"DeleteRegistrationCode\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/registrationcode\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteThing\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/things/{thingName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"thingName\"\n        ],\n        \"members\": {\n          \"thingName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"thingName\"\n          },\n          \"expectedVersion\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"expectedVersion\",\n            \"type\": \"long\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteThingType\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/thing-types/{thingTypeName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"thingTypeName\"\n        ],\n        \"members\": {\n          \"thingTypeName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"thingTypeName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteTopicRule\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/rules/{ruleName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ruleName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"ruleName\"\n          }\n        },\n        \"required\": [\n          \"ruleName\"\n        ]\n      }\n    },\n    \"DeprecateThingType\": {\n      \"http\": {\n        \"requestUri\": \"/thing-types/{thingTypeName}/deprecate\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"thingTypeName\"\n        ],\n        \"members\": {\n          \"thingTypeName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"thingTypeName\"\n          },\n          \"undoDeprecate\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DescribeCACertificate\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/cacertificate/{caCertificateId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"certificateId\"\n        ],\n        \"members\": {\n          \"certificateId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"caCertificateId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"certificateDescription\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"certificateArn\": {},\n              \"certificateId\": {},\n              \"status\": {},\n              \"certificatePem\": {},\n              \"ownedBy\": {},\n              \"creationDate\": {\n                \"type\": \"timestamp\"\n              },\n              \"autoRegistrationStatus\": {}\n            }\n          }\n        }\n      }\n    },\n    \"DescribeCertificate\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/certificates/{certificateId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"certificateId\"\n        ],\n        \"members\": {\n          \"certificateId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"certificateId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"certificateDescription\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"certificateArn\": {},\n              \"certificateId\": {},\n              \"caCertificateId\": {},\n              \"status\": {},\n              \"certificatePem\": {},\n              \"ownedBy\": {},\n              \"previousOwnedBy\": {},\n              \"creationDate\": {\n                \"type\": \"timestamp\"\n              },\n              \"lastModifiedDate\": {\n                \"type\": \"timestamp\"\n              },\n              \"transferData\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"transferMessage\": {},\n                  \"rejectReason\": {},\n                  \"transferDate\": {\n                    \"type\": \"timestamp\"\n                  },\n                  \"acceptDate\": {\n                    \"type\": \"timestamp\"\n                  },\n                  \"rejectDate\": {\n                    \"type\": \"timestamp\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEndpoint\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/endpoint\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"endpointAddress\": {}\n        }\n      }\n    },\n    \"DescribeThing\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/things/{thingName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"thingName\"\n        ],\n        \"members\": {\n          \"thingName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"thingName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"defaultClientId\": {},\n          \"thingName\": {},\n          \"thingTypeName\": {},\n          \"attributes\": {\n            \"shape\": \"Sx\"\n          },\n          \"version\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    },\n    \"DescribeThingType\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/thing-types/{thingTypeName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"thingTypeName\"\n        ],\n        \"members\": {\n          \"thingTypeName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"thingTypeName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"thingTypeName\": {},\n          \"thingTypeProperties\": {\n            \"shape\": \"S14\"\n          },\n          \"thingTypeMetadata\": {\n            \"shape\": \"S3u\"\n          }\n        }\n      }\n    },\n    \"DetachPrincipalPolicy\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/principal-policies/{policyName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"policyName\",\n          \"principal\"\n        ],\n        \"members\": {\n          \"policyName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"policyName\"\n          },\n          \"principal\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amzn-iot-principal\"\n          }\n        }\n      }\n    },\n    \"DetachThingPrincipal\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/things/{thingName}/principals\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"thingName\",\n          \"principal\"\n        ],\n        \"members\": {\n          \"thingName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"thingName\"\n          },\n          \"principal\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amzn-principal\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DisableTopicRule\": {\n      \"http\": {\n        \"requestUri\": \"/rules/{ruleName}/disable\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ruleName\"\n        ],\n        \"members\": {\n          \"ruleName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"ruleName\"\n          }\n        }\n      }\n    },\n    \"EnableTopicRule\": {\n      \"http\": {\n        \"requestUri\": \"/rules/{ruleName}/enable\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ruleName\"\n        ],\n        \"members\": {\n          \"ruleName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"ruleName\"\n          }\n        }\n      }\n    },\n    \"GetLoggingOptions\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/loggingOptions\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"roleArn\": {},\n          \"logLevel\": {}\n        }\n      }\n    },\n    \"GetPolicy\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/policies/{policyName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"policyName\"\n        ],\n        \"members\": {\n          \"policyName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"policyName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"policyName\": {},\n          \"policyArn\": {},\n          \"policyDocument\": {},\n          \"defaultVersionId\": {}\n        }\n      }\n    },\n    \"GetPolicyVersion\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/policies/{policyName}/version/{policyVersionId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"policyName\",\n          \"policyVersionId\"\n        ],\n        \"members\": {\n          \"policyName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"policyName\"\n          },\n          \"policyVersionId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"policyVersionId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"policyArn\": {},\n          \"policyName\": {},\n          \"policyDocument\": {},\n          \"policyVersionId\": {},\n          \"isDefaultVersion\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"GetRegistrationCode\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/registrationcode\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"registrationCode\": {}\n        }\n      }\n    },\n    \"GetTopicRule\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/rules/{ruleName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ruleName\"\n        ],\n        \"members\": {\n          \"ruleName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"ruleName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ruleArn\": {},\n          \"rule\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"ruleName\": {},\n              \"sql\": {},\n              \"description\": {},\n              \"createdAt\": {\n                \"type\": \"timestamp\"\n              },\n              \"actions\": {\n                \"shape\": \"S1e\"\n              },\n              \"ruleDisabled\": {\n                \"type\": \"boolean\"\n              },\n              \"awsIotSqlVersion\": {}\n            }\n          }\n        }\n      }\n    },\n    \"ListCACertificates\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/cacertificates\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"pageSize\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"pageSize\",\n            \"type\": \"integer\"\n          },\n          \"marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"marker\"\n          },\n          \"ascendingOrder\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"isAscendingOrder\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"certificates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"certificateArn\": {},\n                \"certificateId\": {},\n                \"status\": {},\n                \"creationDate\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"nextMarker\": {}\n        }\n      }\n    },\n    \"ListCertificates\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/certificates\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"pageSize\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"pageSize\",\n            \"type\": \"integer\"\n          },\n          \"marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"marker\"\n          },\n          \"ascendingOrder\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"isAscendingOrder\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"certificates\": {\n            \"shape\": \"S4r\"\n          },\n          \"nextMarker\": {}\n        }\n      }\n    },\n    \"ListCertificatesByCA\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/certificates-by-ca/{caCertificateId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"caCertificateId\"\n        ],\n        \"members\": {\n          \"caCertificateId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"caCertificateId\"\n          },\n          \"pageSize\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"pageSize\",\n            \"type\": \"integer\"\n          },\n          \"marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"marker\"\n          },\n          \"ascendingOrder\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"isAscendingOrder\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"certificates\": {\n            \"shape\": \"S4r\"\n          },\n          \"nextMarker\": {}\n        }\n      }\n    },\n    \"ListOutgoingCertificates\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/certificates-out-going\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"pageSize\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"pageSize\",\n            \"type\": \"integer\"\n          },\n          \"marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"marker\"\n          },\n          \"ascendingOrder\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"isAscendingOrder\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"outgoingCertificates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"certificateArn\": {},\n                \"certificateId\": {},\n                \"transferredTo\": {},\n                \"transferDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"transferMessage\": {},\n                \"creationDate\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"nextMarker\": {}\n        }\n      }\n    },\n    \"ListPolicies\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/policies\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"marker\"\n          },\n          \"pageSize\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"pageSize\",\n            \"type\": \"integer\"\n          },\n          \"ascendingOrder\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"isAscendingOrder\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"policies\": {\n            \"shape\": \"S51\"\n          },\n          \"nextMarker\": {}\n        }\n      }\n    },\n    \"ListPolicyPrincipals\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/policy-principals\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"policyName\"\n        ],\n        \"members\": {\n          \"policyName\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amzn-iot-policy\"\n          },\n          \"marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"marker\"\n          },\n          \"pageSize\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"pageSize\",\n            \"type\": \"integer\"\n          },\n          \"ascendingOrder\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"isAscendingOrder\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"principals\": {\n            \"shape\": \"S55\"\n          },\n          \"nextMarker\": {}\n        }\n      }\n    },\n    \"ListPolicyVersions\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/policies/{policyName}/version\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"policyName\"\n        ],\n        \"members\": {\n          \"policyName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"policyName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"policyVersions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"versionId\": {},\n                \"isDefaultVersion\": {\n                  \"type\": \"boolean\"\n                },\n                \"createDate\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListPrincipalPolicies\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/principal-policies\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"principal\"\n        ],\n        \"members\": {\n          \"principal\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amzn-iot-principal\"\n          },\n          \"marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"marker\"\n          },\n          \"pageSize\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"pageSize\",\n            \"type\": \"integer\"\n          },\n          \"ascendingOrder\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"isAscendingOrder\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"policies\": {\n            \"shape\": \"S51\"\n          },\n          \"nextMarker\": {}\n        }\n      }\n    },\n    \"ListPrincipalThings\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/principals/things\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"principal\"\n        ],\n        \"members\": {\n          \"nextToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"nextToken\"\n          },\n          \"maxResults\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          },\n          \"principal\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amzn-principal\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"things\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListThingPrincipals\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/things/{thingName}/principals\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"thingName\"\n        ],\n        \"members\": {\n          \"thingName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"thingName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"principals\": {\n            \"shape\": \"S55\"\n          }\n        }\n      }\n    },\n    \"ListThingTypes\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/thing-types\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"nextToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"nextToken\"\n          },\n          \"maxResults\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          },\n          \"thingTypeName\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"thingTypeName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"thingTypes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"thingTypeName\": {},\n                \"thingTypeProperties\": {\n                  \"shape\": \"S14\"\n                },\n                \"thingTypeMetadata\": {\n                  \"shape\": \"S3u\"\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListThings\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/things\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"nextToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"nextToken\"\n          },\n          \"maxResults\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          },\n          \"attributeName\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"attributeName\"\n          },\n          \"attributeValue\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"attributeValue\"\n          },\n          \"thingTypeName\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"thingTypeName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"things\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"thingName\": {},\n                \"thingTypeName\": {},\n                \"attributes\": {\n                  \"shape\": \"Sx\"\n                },\n                \"version\": {\n                  \"type\": \"long\"\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListTopicRules\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/rules\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"topic\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"topic\"\n          },\n          \"maxResults\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxResults\",\n            \"type\": \"integer\"\n          },\n          \"nextToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"nextToken\"\n          },\n          \"ruleDisabled\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"ruleDisabled\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"rules\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ruleArn\": {},\n                \"ruleName\": {},\n                \"topicPattern\": {},\n                \"createdAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"ruleDisabled\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"RegisterCACertificate\": {\n      \"http\": {\n        \"requestUri\": \"/cacertificate\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"caCertificate\",\n          \"verificationCertificate\"\n        ],\n        \"members\": {\n          \"caCertificate\": {},\n          \"verificationCertificate\": {},\n          \"setAsActive\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"setAsActive\",\n            \"type\": \"boolean\"\n          },\n          \"allowAutoRegistration\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"allowAutoRegistration\",\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"certificateArn\": {},\n          \"certificateId\": {}\n        }\n      }\n    },\n    \"RegisterCertificate\": {\n      \"http\": {\n        \"requestUri\": \"/certificate/register\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"certificatePem\"\n        ],\n        \"members\": {\n          \"certificatePem\": {},\n          \"caCertificatePem\": {},\n          \"setAsActive\": {\n            \"deprecated\": true,\n            \"location\": \"querystring\",\n            \"locationName\": \"setAsActive\",\n            \"type\": \"boolean\"\n          },\n          \"status\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"certificateArn\": {},\n          \"certificateId\": {}\n        }\n      }\n    },\n    \"RejectCertificateTransfer\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/reject-certificate-transfer/{certificateId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"certificateId\"\n        ],\n        \"members\": {\n          \"certificateId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"certificateId\"\n          },\n          \"rejectReason\": {}\n        }\n      }\n    },\n    \"ReplaceTopicRule\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/rules/{ruleName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ruleName\",\n          \"topicRulePayload\"\n        ],\n        \"members\": {\n          \"ruleName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"ruleName\"\n          },\n          \"topicRulePayload\": {\n            \"shape\": \"S1b\"\n          }\n        },\n        \"payload\": \"topicRulePayload\"\n      }\n    },\n    \"SetDefaultPolicyVersion\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/policies/{policyName}/version/{policyVersionId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"policyName\",\n          \"policyVersionId\"\n        ],\n        \"members\": {\n          \"policyName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"policyName\"\n          },\n          \"policyVersionId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"policyVersionId\"\n          }\n        }\n      }\n    },\n    \"SetLoggingOptions\": {\n      \"http\": {\n        \"requestUri\": \"/loggingOptions\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"loggingOptionsPayload\"\n        ],\n        \"members\": {\n          \"loggingOptionsPayload\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"roleArn\"\n            ],\n            \"members\": {\n              \"roleArn\": {},\n              \"logLevel\": {}\n            }\n          }\n        },\n        \"payload\": \"loggingOptionsPayload\"\n      }\n    },\n    \"TransferCertificate\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/transfer-certificate/{certificateId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"certificateId\",\n          \"targetAwsAccount\"\n        ],\n        \"members\": {\n          \"certificateId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"certificateId\"\n          },\n          \"targetAwsAccount\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"targetAwsAccount\"\n          },\n          \"transferMessage\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"transferredCertificateArn\": {}\n        }\n      }\n    },\n    \"UpdateCACertificate\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/cacertificate/{caCertificateId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"certificateId\"\n        ],\n        \"members\": {\n          \"certificateId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"caCertificateId\"\n          },\n          \"newStatus\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"newStatus\"\n          },\n          \"newAutoRegistrationStatus\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"newAutoRegistrationStatus\"\n          }\n        }\n      }\n    },\n    \"UpdateCertificate\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/certificates/{certificateId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"certificateId\",\n          \"newStatus\"\n        ],\n        \"members\": {\n          \"certificateId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"certificateId\"\n          },\n          \"newStatus\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"newStatus\"\n          }\n        }\n      }\n    },\n    \"UpdateThing\": {\n      \"http\": {\n        \"method\": \"PATCH\",\n        \"requestUri\": \"/things/{thingName}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"thingName\"\n        ],\n        \"members\": {\n          \"thingName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"thingName\"\n          },\n          \"thingTypeName\": {},\n          \"attributePayload\": {\n            \"shape\": \"Sw\"\n          },\n          \"expectedVersion\": {\n            \"type\": \"long\"\n          },\n          \"removeThingType\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    }\n  },\n  \"shapes\": {\n    \"Sw\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"attributes\": {\n          \"shape\": \"Sx\"\n        },\n        \"merge\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"Sx\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S14\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"thingTypeDescription\": {},\n        \"searchableAttributes\": {\n          \"type\": \"list\",\n          \"member\": {}\n        }\n      }\n    },\n    \"S1b\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"sql\",\n        \"actions\"\n      ],\n      \"members\": {\n        \"sql\": {},\n        \"description\": {},\n        \"actions\": {\n          \"shape\": \"S1e\"\n        },\n        \"ruleDisabled\": {\n          \"type\": \"boolean\"\n        },\n        \"awsIotSqlVersion\": {}\n      }\n    },\n    \"S1e\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"dynamoDB\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"tableName\",\n              \"roleArn\",\n              \"hashKeyField\",\n              \"hashKeyValue\"\n            ],\n            \"members\": {\n              \"tableName\": {},\n              \"roleArn\": {},\n              \"operation\": {},\n              \"hashKeyField\": {},\n              \"hashKeyValue\": {},\n              \"hashKeyType\": {},\n              \"rangeKeyField\": {},\n              \"rangeKeyValue\": {},\n              \"rangeKeyType\": {},\n              \"payloadField\": {}\n            }\n          },\n          \"dynamoDBv2\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"roleArn\": {},\n              \"putItem\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"tableName\"\n                ],\n                \"members\": {\n                  \"tableName\": {}\n                }\n              }\n            }\n          },\n          \"lambda\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"functionArn\"\n            ],\n            \"members\": {\n              \"functionArn\": {}\n            }\n          },\n          \"sns\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"targetArn\",\n              \"roleArn\"\n            ],\n            \"members\": {\n              \"targetArn\": {},\n              \"roleArn\": {},\n              \"messageFormat\": {}\n            }\n          },\n          \"sqs\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"roleArn\",\n              \"queueUrl\"\n            ],\n            \"members\": {\n              \"roleArn\": {},\n              \"queueUrl\": {},\n              \"useBase64\": {\n                \"type\": \"boolean\"\n              }\n            }\n          },\n          \"kinesis\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"roleArn\",\n              \"streamName\"\n            ],\n            \"members\": {\n              \"roleArn\": {},\n              \"streamName\": {},\n              \"partitionKey\": {}\n            }\n          },\n          \"republish\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"roleArn\",\n              \"topic\"\n            ],\n            \"members\": {\n              \"roleArn\": {},\n              \"topic\": {}\n            }\n          },\n          \"s3\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"roleArn\",\n              \"bucketName\",\n              \"key\"\n            ],\n            \"members\": {\n              \"roleArn\": {},\n              \"bucketName\": {},\n              \"key\": {},\n              \"cannedAcl\": {}\n            }\n          },\n          \"firehose\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"roleArn\",\n              \"deliveryStreamName\"\n            ],\n            \"members\": {\n              \"roleArn\": {},\n              \"deliveryStreamName\": {},\n              \"separator\": {}\n            }\n          },\n          \"cloudwatchMetric\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"roleArn\",\n              \"metricNamespace\",\n              \"metricName\",\n              \"metricValue\",\n              \"metricUnit\"\n            ],\n            \"members\": {\n              \"roleArn\": {},\n              \"metricNamespace\": {},\n              \"metricName\": {},\n              \"metricValue\": {},\n              \"metricUnit\": {},\n              \"metricTimestamp\": {}\n            }\n          },\n          \"cloudwatchAlarm\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"roleArn\",\n              \"alarmName\",\n              \"stateReason\",\n              \"stateValue\"\n            ],\n            \"members\": {\n              \"roleArn\": {},\n              \"alarmName\": {},\n              \"stateReason\": {},\n              \"stateValue\": {}\n            }\n          },\n          \"elasticsearch\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"roleArn\",\n              \"endpoint\",\n              \"index\",\n              \"type\",\n              \"id\"\n            ],\n            \"members\": {\n              \"roleArn\": {},\n              \"endpoint\": {},\n              \"index\": {},\n              \"type\": {},\n              \"id\": {}\n            }\n          }\n        }\n      }\n    },\n    \"S3u\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"deprecated\": {\n          \"type\": \"boolean\"\n        },\n        \"deprecationDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"creationDate\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S4r\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"certificateArn\": {},\n          \"certificateId\": {},\n          \"status\": {},\n          \"creationDate\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"S51\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"policyName\": {},\n          \"policyArn\": {}\n        }\n      }\n    },\n    \"S55\": {\n      \"type\": \"list\",\n      \"member\": {}\n    }\n  },\n  \"examples\": {}\n}\n},{}],74:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"iot-data-2015-05-28\",\n    \"apiVersion\": \"2015-05-28\",\n    \"endpointPrefix\": \"data.iot\",\n    \"protocol\": \"rest-json\",\n    \"serviceFullName\": \"AWS IoT Data Plane\",\n    \"signatureVersion\": \"v4\",\n    \"signingName\": \"iotdata\"\n  },\n  \"operations\": {\n    \"DeleteThingShadow\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/things/{thingName}/shadow\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"thingName\"\n        ],\n        \"members\": {\n          \"thingName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"thingName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"payload\"\n        ],\n        \"members\": {\n          \"payload\": {\n            \"type\": \"blob\"\n          }\n        },\n        \"payload\": \"payload\"\n      }\n    },\n    \"GetThingShadow\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/things/{thingName}/shadow\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"thingName\"\n        ],\n        \"members\": {\n          \"thingName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"thingName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"payload\": {\n            \"type\": \"blob\"\n          }\n        },\n        \"payload\": \"payload\"\n      }\n    },\n    \"Publish\": {\n      \"http\": {\n        \"requestUri\": \"/topics/{topic}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"topic\"\n        ],\n        \"members\": {\n          \"topic\": {\n            \"location\": \"uri\",\n            \"locationName\": \"topic\"\n          },\n          \"qos\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"qos\",\n            \"type\": \"integer\"\n          },\n          \"payload\": {\n            \"type\": \"blob\"\n          }\n        },\n        \"payload\": \"payload\"\n      }\n    },\n    \"UpdateThingShadow\": {\n      \"http\": {\n        \"requestUri\": \"/things/{thingName}/shadow\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"thingName\",\n          \"payload\"\n        ],\n        \"members\": {\n          \"thingName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"thingName\"\n          },\n          \"payload\": {\n            \"type\": \"blob\"\n          }\n        },\n        \"payload\": \"payload\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"payload\": {\n            \"type\": \"blob\"\n          }\n        },\n        \"payload\": \"payload\"\n      }\n    }\n  },\n  \"shapes\": {}\n}\n},{}],75:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"kinesis-2013-12-02\",\n    \"apiVersion\": \"2013-12-02\",\n    \"endpointPrefix\": \"kinesis\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"Kinesis\",\n    \"serviceFullName\": \"Amazon Kinesis\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"Kinesis_20131202\"\n  },\n  \"operations\": {\n    \"AddTagsToStream\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"StreamName\": {},\n          \"Tags\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {}\n          }\n        }\n      }\n    },\n    \"CreateStream\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\",\n          \"ShardCount\"\n        ],\n        \"members\": {\n          \"StreamName\": {},\n          \"ShardCount\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"DecreaseStreamRetentionPeriod\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\",\n          \"RetentionPeriodHours\"\n        ],\n        \"members\": {\n          \"StreamName\": {},\n          \"RetentionPeriodHours\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"DeleteStream\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\"\n        ],\n        \"members\": {\n          \"StreamName\": {}\n        }\n      }\n    },\n    \"DescribeLimits\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ShardLimit\",\n          \"OpenShardCount\"\n        ],\n        \"members\": {\n          \"ShardLimit\": {\n            \"type\": \"integer\"\n          },\n          \"OpenShardCount\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"DescribeStream\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\"\n        ],\n        \"members\": {\n          \"StreamName\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"ExclusiveStartShardId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamDescription\"\n        ],\n        \"members\": {\n          \"StreamDescription\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"StreamName\",\n              \"StreamARN\",\n              \"StreamStatus\",\n              \"Shards\",\n              \"HasMoreShards\",\n              \"RetentionPeriodHours\",\n              \"StreamCreationTimestamp\",\n              \"EnhancedMonitoring\"\n            ],\n            \"members\": {\n              \"StreamName\": {},\n              \"StreamARN\": {},\n              \"StreamStatus\": {},\n              \"Shards\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"ShardId\",\n                    \"HashKeyRange\",\n                    \"SequenceNumberRange\"\n                  ],\n                  \"members\": {\n                    \"ShardId\": {},\n                    \"ParentShardId\": {},\n                    \"AdjacentParentShardId\": {},\n                    \"HashKeyRange\": {\n                      \"type\": \"structure\",\n                      \"required\": [\n                        \"StartingHashKey\",\n                        \"EndingHashKey\"\n                      ],\n                      \"members\": {\n                        \"StartingHashKey\": {},\n                        \"EndingHashKey\": {}\n                      }\n                    },\n                    \"SequenceNumberRange\": {\n                      \"type\": \"structure\",\n                      \"required\": [\n                        \"StartingSequenceNumber\"\n                      ],\n                      \"members\": {\n                        \"StartingSequenceNumber\": {},\n                        \"EndingSequenceNumber\": {}\n                      }\n                    }\n                  }\n                }\n              },\n              \"HasMoreShards\": {\n                \"type\": \"boolean\"\n              },\n              \"RetentionPeriodHours\": {\n                \"type\": \"integer\"\n              },\n              \"StreamCreationTimestamp\": {\n                \"type\": \"timestamp\"\n              },\n              \"EnhancedMonitoring\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"ShardLevelMetrics\": {\n                      \"shape\": \"Su\"\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DisableEnhancedMonitoring\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\",\n          \"ShardLevelMetrics\"\n        ],\n        \"members\": {\n          \"StreamName\": {},\n          \"ShardLevelMetrics\": {\n            \"shape\": \"Su\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sx\"\n      }\n    },\n    \"EnableEnhancedMonitoring\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\",\n          \"ShardLevelMetrics\"\n        ],\n        \"members\": {\n          \"StreamName\": {},\n          \"ShardLevelMetrics\": {\n            \"shape\": \"Su\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sx\"\n      }\n    },\n    \"GetRecords\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ShardIterator\"\n        ],\n        \"members\": {\n          \"ShardIterator\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Records\"\n        ],\n        \"members\": {\n          \"Records\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"SequenceNumber\",\n                \"Data\",\n                \"PartitionKey\"\n              ],\n              \"members\": {\n                \"SequenceNumber\": {},\n                \"ApproximateArrivalTimestamp\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Data\": {\n                  \"type\": \"blob\"\n                },\n                \"PartitionKey\": {}\n              }\n            }\n          },\n          \"NextShardIterator\": {},\n          \"MillisBehindLatest\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    },\n    \"GetShardIterator\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\",\n          \"ShardId\",\n          \"ShardIteratorType\"\n        ],\n        \"members\": {\n          \"StreamName\": {},\n          \"ShardId\": {},\n          \"ShardIteratorType\": {},\n          \"StartingSequenceNumber\": {},\n          \"Timestamp\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ShardIterator\": {}\n        }\n      }\n    },\n    \"IncreaseStreamRetentionPeriod\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\",\n          \"RetentionPeriodHours\"\n        ],\n        \"members\": {\n          \"StreamName\": {},\n          \"RetentionPeriodHours\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"ListStreams\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"ExclusiveStartStreamName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamNames\",\n          \"HasMoreStreams\"\n        ],\n        \"members\": {\n          \"StreamNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"HasMoreStreams\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ListTagsForStream\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\"\n        ],\n        \"members\": {\n          \"StreamName\": {},\n          \"ExclusiveStartTagKey\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Tags\",\n          \"HasMoreTags\"\n        ],\n        \"members\": {\n          \"Tags\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Key\"\n              ],\n              \"members\": {\n                \"Key\": {},\n                \"Value\": {}\n              }\n            }\n          },\n          \"HasMoreTags\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"MergeShards\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\",\n          \"ShardToMerge\",\n          \"AdjacentShardToMerge\"\n        ],\n        \"members\": {\n          \"StreamName\": {},\n          \"ShardToMerge\": {},\n          \"AdjacentShardToMerge\": {}\n        }\n      }\n    },\n    \"PutRecord\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\",\n          \"Data\",\n          \"PartitionKey\"\n        ],\n        \"members\": {\n          \"StreamName\": {},\n          \"Data\": {\n            \"type\": \"blob\"\n          },\n          \"PartitionKey\": {},\n          \"ExplicitHashKey\": {},\n          \"SequenceNumberForOrdering\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ShardId\",\n          \"SequenceNumber\"\n        ],\n        \"members\": {\n          \"ShardId\": {},\n          \"SequenceNumber\": {}\n        }\n      }\n    },\n    \"PutRecords\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Records\",\n          \"StreamName\"\n        ],\n        \"members\": {\n          \"Records\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Data\",\n                \"PartitionKey\"\n              ],\n              \"members\": {\n                \"Data\": {\n                  \"type\": \"blob\"\n                },\n                \"ExplicitHashKey\": {},\n                \"PartitionKey\": {}\n              }\n            }\n          },\n          \"StreamName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Records\"\n        ],\n        \"members\": {\n          \"FailedRecordCount\": {\n            \"type\": \"integer\"\n          },\n          \"Records\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"SequenceNumber\": {},\n                \"ShardId\": {},\n                \"ErrorCode\": {},\n                \"ErrorMessage\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"RemoveTagsFromStream\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\",\n          \"TagKeys\"\n        ],\n        \"members\": {\n          \"StreamName\": {},\n          \"TagKeys\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"SplitShard\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\",\n          \"ShardToSplit\",\n          \"NewStartingHashKey\"\n        ],\n        \"members\": {\n          \"StreamName\": {},\n          \"ShardToSplit\": {},\n          \"NewStartingHashKey\": {}\n        }\n      }\n    },\n    \"UpdateShardCount\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamName\",\n          \"TargetShardCount\",\n          \"ScalingType\"\n        ],\n        \"members\": {\n          \"StreamName\": {},\n          \"TargetShardCount\": {\n            \"type\": \"integer\"\n          },\n          \"ScalingType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StreamName\": {},\n          \"CurrentShardCount\": {\n            \"type\": \"integer\"\n          },\n          \"TargetShardCount\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"Su\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sx\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"StreamName\": {},\n        \"CurrentShardLevelMetrics\": {\n          \"shape\": \"Su\"\n        },\n        \"DesiredShardLevelMetrics\": {\n          \"shape\": \"Su\"\n        }\n      }\n    }\n  }\n}\n},{}],76:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeStream\": {\n      \"input_token\": \"ExclusiveStartShardId\",\n      \"limit_key\": \"Limit\",\n      \"more_results\": \"StreamDescription.HasMoreShards\",\n      \"output_token\": \"StreamDescription.Shards[-1].ShardId\",\n      \"result_key\": \"StreamDescription.Shards\"\n    },\n    \"ListStreams\": {\n      \"input_token\": \"ExclusiveStartStreamName\",\n      \"limit_key\": \"Limit\",\n      \"more_results\": \"HasMoreStreams\",\n      \"output_token\": \"StreamNames[-1]\",\n      \"result_key\": \"StreamNames\"\n    }\n  }\n}\n\n},{}],77:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"StreamExists\": {\n      \"delay\": 10,\n      \"operation\": \"DescribeStream\",\n      \"maxAttempts\": 18,\n      \"acceptors\": [\n        {\n          \"expected\": \"ACTIVE\",\n          \"matcher\": \"path\",\n          \"state\": \"success\",\n          \"argument\": \"StreamDescription.StreamStatus\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],78:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2014-11-01\",\n    \"endpointPrefix\": \"kms\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"KMS\",\n    \"serviceFullName\": \"AWS Key Management Service\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"TrentService\",\n    \"uid\": \"kms-2014-11-01\"\n  },\n  \"operations\": {\n    \"CancelKeyDeletion\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\"\n        ],\n        \"members\": {\n          \"KeyId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"KeyId\": {}\n        }\n      }\n    },\n    \"CreateAlias\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AliasName\",\n          \"TargetKeyId\"\n        ],\n        \"members\": {\n          \"AliasName\": {},\n          \"TargetKeyId\": {}\n        }\n      }\n    },\n    \"CreateGrant\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\",\n          \"GranteePrincipal\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"GranteePrincipal\": {},\n          \"RetiringPrincipal\": {},\n          \"Operations\": {\n            \"shape\": \"S8\"\n          },\n          \"Constraints\": {\n            \"shape\": \"Sa\"\n          },\n          \"GrantTokens\": {\n            \"shape\": \"Se\"\n          },\n          \"Name\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GrantToken\": {},\n          \"GrantId\": {}\n        }\n      }\n    },\n    \"CreateKey\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Policy\": {},\n          \"Description\": {},\n          \"KeyUsage\": {},\n          \"Origin\": {},\n          \"BypassPolicyLockoutSafetyCheck\": {\n            \"type\": \"boolean\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sp\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"KeyMetadata\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"Decrypt\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CiphertextBlob\"\n        ],\n        \"members\": {\n          \"CiphertextBlob\": {\n            \"type\": \"blob\"\n          },\n          \"EncryptionContext\": {\n            \"shape\": \"Sb\"\n          },\n          \"GrantTokens\": {\n            \"shape\": \"Se\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"KeyId\": {},\n          \"Plaintext\": {\n            \"shape\": \"S13\"\n          }\n        }\n      }\n    },\n    \"DeleteAlias\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AliasName\"\n        ],\n        \"members\": {\n          \"AliasName\": {}\n        }\n      }\n    },\n    \"DeleteImportedKeyMaterial\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\"\n        ],\n        \"members\": {\n          \"KeyId\": {}\n        }\n      }\n    },\n    \"DescribeKey\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"GrantTokens\": {\n            \"shape\": \"Se\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"KeyMetadata\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"DisableKey\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\"\n        ],\n        \"members\": {\n          \"KeyId\": {}\n        }\n      }\n    },\n    \"DisableKeyRotation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\"\n        ],\n        \"members\": {\n          \"KeyId\": {}\n        }\n      }\n    },\n    \"EnableKey\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\"\n        ],\n        \"members\": {\n          \"KeyId\": {}\n        }\n      }\n    },\n    \"EnableKeyRotation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\"\n        ],\n        \"members\": {\n          \"KeyId\": {}\n        }\n      }\n    },\n    \"Encrypt\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\",\n          \"Plaintext\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"Plaintext\": {\n            \"shape\": \"S13\"\n          },\n          \"EncryptionContext\": {\n            \"shape\": \"Sb\"\n          },\n          \"GrantTokens\": {\n            \"shape\": \"Se\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CiphertextBlob\": {\n            \"type\": \"blob\"\n          },\n          \"KeyId\": {}\n        }\n      }\n    },\n    \"GenerateDataKey\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"EncryptionContext\": {\n            \"shape\": \"Sb\"\n          },\n          \"NumberOfBytes\": {\n            \"type\": \"integer\"\n          },\n          \"KeySpec\": {},\n          \"GrantTokens\": {\n            \"shape\": \"Se\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CiphertextBlob\": {\n            \"type\": \"blob\"\n          },\n          \"Plaintext\": {\n            \"shape\": \"S13\"\n          },\n          \"KeyId\": {}\n        }\n      }\n    },\n    \"GenerateDataKeyWithoutPlaintext\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"EncryptionContext\": {\n            \"shape\": \"Sb\"\n          },\n          \"KeySpec\": {},\n          \"NumberOfBytes\": {\n            \"type\": \"integer\"\n          },\n          \"GrantTokens\": {\n            \"shape\": \"Se\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CiphertextBlob\": {\n            \"type\": \"blob\"\n          },\n          \"KeyId\": {}\n        }\n      }\n    },\n    \"GenerateRandom\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NumberOfBytes\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Plaintext\": {\n            \"shape\": \"S13\"\n          }\n        }\n      }\n    },\n    \"GetKeyPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\",\n          \"PolicyName\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"PolicyName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Policy\": {}\n        }\n      }\n    },\n    \"GetKeyRotationStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\"\n        ],\n        \"members\": {\n          \"KeyId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"KeyRotationEnabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"GetParametersForImport\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\",\n          \"WrappingAlgorithm\",\n          \"WrappingKeySpec\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"WrappingAlgorithm\": {},\n          \"WrappingKeySpec\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"KeyId\": {},\n          \"ImportToken\": {\n            \"type\": \"blob\"\n          },\n          \"PublicKey\": {\n            \"shape\": \"S13\"\n          },\n          \"ParametersValidTo\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"ImportKeyMaterial\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\",\n          \"ImportToken\",\n          \"EncryptedKeyMaterial\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"ImportToken\": {\n            \"type\": \"blob\"\n          },\n          \"EncryptedKeyMaterial\": {\n            \"type\": \"blob\"\n          },\n          \"ValidTo\": {\n            \"type\": \"timestamp\"\n          },\n          \"ExpirationModel\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"ListAliases\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Aliases\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"AliasName\": {},\n                \"AliasArn\": {},\n                \"TargetKeyId\": {}\n              }\n            }\n          },\n          \"NextMarker\": {},\n          \"Truncated\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ListGrants\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\"\n        ],\n        \"members\": {\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"KeyId\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S24\"\n      }\n    },\n    \"ListKeyPolicies\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PolicyNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"NextMarker\": {},\n          \"Truncated\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ListKeys\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Keys\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"KeyId\": {},\n                \"KeyArn\": {}\n              }\n            }\n          },\n          \"NextMarker\": {},\n          \"Truncated\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ListResourceTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Tags\": {\n            \"shape\": \"Sp\"\n          },\n          \"NextMarker\": {},\n          \"Truncated\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ListRetirableGrants\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RetiringPrincipal\"\n        ],\n        \"members\": {\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"RetiringPrincipal\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S24\"\n      }\n    },\n    \"PutKeyPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\",\n          \"PolicyName\",\n          \"Policy\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"PolicyName\": {},\n          \"Policy\": {},\n          \"BypassPolicyLockoutSafetyCheck\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ReEncrypt\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CiphertextBlob\",\n          \"DestinationKeyId\"\n        ],\n        \"members\": {\n          \"CiphertextBlob\": {\n            \"type\": \"blob\"\n          },\n          \"SourceEncryptionContext\": {\n            \"shape\": \"Sb\"\n          },\n          \"DestinationKeyId\": {},\n          \"DestinationEncryptionContext\": {\n            \"shape\": \"Sb\"\n          },\n          \"GrantTokens\": {\n            \"shape\": \"Se\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CiphertextBlob\": {\n            \"type\": \"blob\"\n          },\n          \"SourceKeyId\": {},\n          \"KeyId\": {}\n        }\n      }\n    },\n    \"RetireGrant\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GrantToken\": {},\n          \"KeyId\": {},\n          \"GrantId\": {}\n        }\n      }\n    },\n    \"RevokeGrant\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\",\n          \"GrantId\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"GrantId\": {}\n        }\n      }\n    },\n    \"ScheduleKeyDeletion\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"PendingWindowInDays\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"KeyId\": {},\n          \"DeletionDate\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"TagResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"Tags\": {\n            \"shape\": \"Sp\"\n          }\n        }\n      }\n    },\n    \"UntagResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\",\n          \"TagKeys\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"TagKeys\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"UpdateAlias\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AliasName\",\n          \"TargetKeyId\"\n        ],\n        \"members\": {\n          \"AliasName\": {},\n          \"TargetKeyId\": {}\n        }\n      }\n    },\n    \"UpdateKeyDescription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"KeyId\",\n          \"Description\"\n        ],\n        \"members\": {\n          \"KeyId\": {},\n          \"Description\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S8\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sa\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"EncryptionContextSubset\": {\n          \"shape\": \"Sb\"\n        },\n        \"EncryptionContextEquals\": {\n          \"shape\": \"Sb\"\n        }\n      }\n    },\n    \"Sb\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"Se\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sp\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TagKey\",\n          \"TagValue\"\n        ],\n        \"members\": {\n          \"TagKey\": {},\n          \"TagValue\": {}\n        }\n      }\n    },\n    \"Su\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"KeyId\"\n      ],\n      \"members\": {\n        \"AWSAccountId\": {},\n        \"KeyId\": {},\n        \"Arn\": {},\n        \"CreationDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        },\n        \"Description\": {},\n        \"KeyUsage\": {},\n        \"KeyState\": {},\n        \"DeletionDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"ValidTo\": {\n          \"type\": \"timestamp\"\n        },\n        \"Origin\": {},\n        \"ExpirationModel\": {}\n      }\n    },\n    \"S13\": {\n      \"type\": \"blob\",\n      \"sensitive\": true\n    },\n    \"S24\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Grants\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"KeyId\": {},\n              \"GrantId\": {},\n              \"Name\": {},\n              \"CreationDate\": {\n                \"type\": \"timestamp\"\n              },\n              \"GranteePrincipal\": {},\n              \"RetiringPrincipal\": {},\n              \"IssuingAccount\": {},\n              \"Operations\": {\n                \"shape\": \"S8\"\n              },\n              \"Constraints\": {\n                \"shape\": \"Sa\"\n              }\n            }\n          }\n        },\n        \"NextMarker\": {},\n        \"Truncated\": {\n          \"type\": \"boolean\"\n        }\n      }\n    }\n  }\n}\n},{}],79:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"ListAliases\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"Limit\",\n      \"more_results\": \"Truncated\",\n      \"output_token\": \"NextMarker\",\n      \"result_key\": \"Aliases\"\n    },\n    \"ListGrants\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"Limit\",\n      \"more_results\": \"Truncated\",\n      \"output_token\": \"NextMarker\",\n      \"result_key\": \"Grants\"\n    },\n    \"ListKeyPolicies\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"Limit\",\n      \"more_results\": \"Truncated\",\n      \"output_token\": \"NextMarker\",\n      \"result_key\": \"PolicyNames\"\n    },\n    \"ListKeys\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"Limit\",\n      \"more_results\": \"Truncated\",\n      \"output_token\": \"NextMarker\",\n      \"result_key\": \"Keys\"\n    }\n  }\n}\n},{}],80:[function(require,module,exports){\nmodule.exports={\n  \"metadata\": {\n    \"apiVersion\": \"2014-11-11\",\n    \"endpointPrefix\": \"lambda\",\n    \"serviceFullName\": \"AWS Lambda\",\n    \"signatureVersion\": \"v4\",\n    \"protocol\": \"rest-json\"\n  },\n  \"operations\": {\n    \"AddEventSource\": {\n      \"http\": {\n        \"requestUri\": \"/2014-11-13/event-source-mappings/\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EventSource\",\n          \"FunctionName\",\n          \"Role\"\n        ],\n        \"members\": {\n          \"EventSource\": {},\n          \"FunctionName\": {},\n          \"Role\": {},\n          \"BatchSize\": {\n            \"type\": \"integer\"\n          },\n          \"Parameters\": {\n            \"shape\": \"S6\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S7\"\n      }\n    },\n    \"DeleteFunction\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2014-11-13/functions/{FunctionName}\",\n        \"responseCode\": 204\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          }\n        }\n      }\n    },\n    \"GetEventSource\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2014-11-13/event-source-mappings/{UUID}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UUID\"\n        ],\n        \"members\": {\n          \"UUID\": {\n            \"location\": \"uri\",\n            \"locationName\": \"UUID\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S7\"\n      }\n    },\n    \"GetFunction\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2014-11-13/functions/{FunctionName}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Configuration\": {\n            \"shape\": \"Se\"\n          },\n          \"Code\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"RepositoryType\": {},\n              \"Location\": {}\n            }\n          }\n        }\n      }\n    },\n    \"GetFunctionConfiguration\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2014-11-13/functions/{FunctionName}/configuration\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Se\"\n      }\n    },\n    \"InvokeAsync\": {\n      \"http\": {\n        \"requestUri\": \"/2014-11-13/functions/{FunctionName}/invoke-async/\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\",\n          \"InvokeArgs\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"InvokeArgs\": {\n            \"shape\": \"Sq\"\n          }\n        },\n        \"payload\": \"InvokeArgs\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Status\": {\n            \"location\": \"statusCode\",\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"ListEventSources\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2014-11-13/event-source-mappings/\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSourceArn\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"EventSource\"\n          },\n          \"FunctionName\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Marker\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"MaxItems\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"EventSources\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S7\"\n            }\n          }\n        }\n      }\n    },\n    \"ListFunctions\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2014-11-13/functions/\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Marker\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"MaxItems\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"Functions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Se\"\n            }\n          }\n        }\n      }\n    },\n    \"RemoveEventSource\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2014-11-13/event-source-mappings/{UUID}\",\n        \"responseCode\": 204\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UUID\"\n        ],\n        \"members\": {\n          \"UUID\": {\n            \"location\": \"uri\",\n            \"locationName\": \"UUID\"\n          }\n        }\n      }\n    },\n    \"UpdateFunctionConfiguration\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/2014-11-13/functions/{FunctionName}/configuration\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"Role\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Role\"\n          },\n          \"Handler\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Handler\"\n          },\n          \"Description\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Description\"\n          },\n          \"Timeout\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Timeout\",\n            \"type\": \"integer\"\n          },\n          \"MemorySize\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"MemorySize\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Se\"\n      }\n    },\n    \"UploadFunction\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/2014-11-13/functions/{FunctionName}\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\",\n          \"FunctionZip\",\n          \"Runtime\",\n          \"Role\",\n          \"Handler\",\n          \"Mode\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"FunctionZip\": {\n            \"shape\": \"Sq\"\n          },\n          \"Runtime\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Runtime\"\n          },\n          \"Role\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Role\"\n          },\n          \"Handler\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Handler\"\n          },\n          \"Mode\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Mode\"\n          },\n          \"Description\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Description\"\n          },\n          \"Timeout\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Timeout\",\n            \"type\": \"integer\"\n          },\n          \"MemorySize\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"MemorySize\",\n            \"type\": \"integer\"\n          }\n        },\n        \"payload\": \"FunctionZip\"\n      },\n      \"output\": {\n        \"shape\": \"Se\"\n      }\n    }\n  },\n  \"shapes\": {\n    \"S6\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S7\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"UUID\": {},\n        \"BatchSize\": {\n          \"type\": \"integer\"\n        },\n        \"EventSource\": {},\n        \"FunctionName\": {},\n        \"Parameters\": {\n          \"shape\": \"S6\"\n        },\n        \"Role\": {},\n        \"LastModified\": {\n          \"type\": \"timestamp\"\n        },\n        \"IsActive\": {\n          \"type\": \"boolean\"\n        },\n        \"Status\": {}\n      }\n    },\n    \"Se\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"FunctionName\": {},\n        \"FunctionARN\": {},\n        \"ConfigurationId\": {},\n        \"Runtime\": {},\n        \"Role\": {},\n        \"Handler\": {},\n        \"Mode\": {},\n        \"CodeSize\": {\n          \"type\": \"long\"\n        },\n        \"Description\": {},\n        \"Timeout\": {\n          \"type\": \"integer\"\n        },\n        \"MemorySize\": {\n          \"type\": \"integer\"\n        },\n        \"LastModified\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"Sq\": {\n      \"type\": \"blob\",\n      \"streaming\": true\n    }\n  }\n}\n},{}],81:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"ListEventSources\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"NextMarker\",\n      \"limit_key\": \"MaxItems\",\n      \"result_key\": \"EventSources\"\n    },\n    \"ListFunctions\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"NextMarker\",\n      \"limit_key\": \"MaxItems\",\n      \"result_key\": \"Functions\"\n    }\n  }\n}\n\n},{}],82:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2015-03-31\",\n    \"endpointPrefix\": \"lambda\",\n    \"protocol\": \"rest-json\",\n    \"serviceFullName\": \"AWS Lambda\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"lambda-2015-03-31\"\n  },\n  \"operations\": {\n    \"AddPermission\": {\n      \"http\": {\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}/policy\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\",\n          \"StatementId\",\n          \"Action\",\n          \"Principal\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"StatementId\": {},\n          \"Action\": {},\n          \"Principal\": {},\n          \"SourceArn\": {},\n          \"SourceAccount\": {},\n          \"EventSourceToken\": {},\n          \"Qualifier\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Qualifier\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Statement\": {}\n        }\n      }\n    },\n    \"CreateAlias\": {\n      \"http\": {\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}/aliases\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\",\n          \"Name\",\n          \"FunctionVersion\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"Name\": {},\n          \"FunctionVersion\": {},\n          \"Description\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sg\"\n      }\n    },\n    \"CreateEventSourceMapping\": {\n      \"http\": {\n        \"requestUri\": \"/2015-03-31/event-source-mappings/\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EventSourceArn\",\n          \"FunctionName\",\n          \"StartingPosition\"\n        ],\n        \"members\": {\n          \"EventSourceArn\": {},\n          \"FunctionName\": {},\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          },\n          \"BatchSize\": {\n            \"type\": \"integer\"\n          },\n          \"StartingPosition\": {},\n          \"StartingPositionTimestamp\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sn\"\n      }\n    },\n    \"CreateFunction\": {\n      \"http\": {\n        \"requestUri\": \"/2015-03-31/functions\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\",\n          \"Runtime\",\n          \"Role\",\n          \"Handler\",\n          \"Code\"\n        ],\n        \"members\": {\n          \"FunctionName\": {},\n          \"Runtime\": {},\n          \"Role\": {},\n          \"Handler\": {},\n          \"Code\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"ZipFile\": {\n                \"shape\": \"St\"\n              },\n              \"S3Bucket\": {},\n              \"S3Key\": {},\n              \"S3ObjectVersion\": {}\n            }\n          },\n          \"Description\": {},\n          \"Timeout\": {\n            \"type\": \"integer\"\n          },\n          \"MemorySize\": {\n            \"type\": \"integer\"\n          },\n          \"Publish\": {\n            \"type\": \"boolean\"\n          },\n          \"VpcConfig\": {\n            \"shape\": \"S10\"\n          },\n          \"DeadLetterConfig\": {\n            \"shape\": \"S15\"\n          },\n          \"Environment\": {\n            \"shape\": \"S17\"\n          },\n          \"KMSKeyArn\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1c\"\n      }\n    },\n    \"DeleteAlias\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}/aliases/{Name}\",\n        \"responseCode\": 204\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\",\n          \"Name\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"Name\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Name\"\n          }\n        }\n      }\n    },\n    \"DeleteEventSourceMapping\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2015-03-31/event-source-mappings/{UUID}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UUID\"\n        ],\n        \"members\": {\n          \"UUID\": {\n            \"location\": \"uri\",\n            \"locationName\": \"UUID\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sn\"\n      }\n    },\n    \"DeleteFunction\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}\",\n        \"responseCode\": 204\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"Qualifier\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Qualifier\"\n          }\n        }\n      }\n    },\n    \"GetAccountSettings\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2016-08-19/account-settings/\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AccountLimit\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"TotalCodeSize\": {\n                \"type\": \"long\"\n              },\n              \"CodeSizeUnzipped\": {\n                \"type\": \"long\"\n              },\n              \"CodeSizeZipped\": {\n                \"type\": \"long\"\n              },\n              \"ConcurrentExecutions\": {\n                \"type\": \"integer\"\n              }\n            }\n          },\n          \"AccountUsage\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"TotalCodeSize\": {\n                \"type\": \"long\"\n              },\n              \"FunctionCount\": {\n                \"type\": \"long\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"GetAlias\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}/aliases/{Name}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\",\n          \"Name\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"Name\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Name\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sg\"\n      }\n    },\n    \"GetEventSourceMapping\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2015-03-31/event-source-mappings/{UUID}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UUID\"\n        ],\n        \"members\": {\n          \"UUID\": {\n            \"location\": \"uri\",\n            \"locationName\": \"UUID\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sn\"\n      }\n    },\n    \"GetFunction\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"Qualifier\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Qualifier\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Configuration\": {\n            \"shape\": \"S1c\"\n          },\n          \"Code\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"RepositoryType\": {},\n              \"Location\": {}\n            }\n          }\n        }\n      }\n    },\n    \"GetFunctionConfiguration\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}/configuration\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"Qualifier\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Qualifier\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1c\"\n      }\n    },\n    \"GetPolicy\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}/policy\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"Qualifier\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Qualifier\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Policy\": {}\n        }\n      }\n    },\n    \"Invoke\": {\n      \"http\": {\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}/invocations\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"InvocationType\": {\n            \"location\": \"header\",\n            \"locationName\": \"X-Amz-Invocation-Type\"\n          },\n          \"LogType\": {\n            \"location\": \"header\",\n            \"locationName\": \"X-Amz-Log-Type\"\n          },\n          \"ClientContext\": {\n            \"location\": \"header\",\n            \"locationName\": \"X-Amz-Client-Context\"\n          },\n          \"Payload\": {\n            \"shape\": \"St\"\n          },\n          \"Qualifier\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Qualifier\"\n          }\n        },\n        \"payload\": \"Payload\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StatusCode\": {\n            \"location\": \"statusCode\",\n            \"type\": \"integer\"\n          },\n          \"FunctionError\": {\n            \"location\": \"header\",\n            \"locationName\": \"X-Amz-Function-Error\"\n          },\n          \"LogResult\": {\n            \"location\": \"header\",\n            \"locationName\": \"X-Amz-Log-Result\"\n          },\n          \"Payload\": {\n            \"shape\": \"St\"\n          }\n        },\n        \"payload\": \"Payload\"\n      }\n    },\n    \"InvokeAsync\": {\n      \"http\": {\n        \"requestUri\": \"/2014-11-13/functions/{FunctionName}/invoke-async/\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\",\n          \"InvokeArgs\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"InvokeArgs\": {\n            \"type\": \"blob\",\n            \"streaming\": true\n          }\n        },\n        \"deprecated\": true,\n        \"payload\": \"InvokeArgs\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Status\": {\n            \"location\": \"statusCode\",\n            \"type\": \"integer\"\n          }\n        },\n        \"deprecated\": true\n      },\n      \"deprecated\": true\n    },\n    \"ListAliases\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}/aliases\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"FunctionVersion\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"FunctionVersion\"\n          },\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Marker\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"MaxItems\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"Aliases\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sg\"\n            }\n          }\n        }\n      }\n    },\n    \"ListEventSourceMappings\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2015-03-31/event-source-mappings/\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSourceArn\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"EventSourceArn\"\n          },\n          \"FunctionName\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Marker\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"MaxItems\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"EventSourceMappings\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sn\"\n            }\n          }\n        }\n      }\n    },\n    \"ListFunctions\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2015-03-31/functions/\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Marker\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"MaxItems\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"Functions\": {\n            \"shape\": \"S2h\"\n          }\n        }\n      }\n    },\n    \"ListVersionsByFunction\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}/versions\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Marker\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"MaxItems\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"Versions\": {\n            \"shape\": \"S2h\"\n          }\n        }\n      }\n    },\n    \"PublishVersion\": {\n      \"http\": {\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}/versions\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"CodeSha256\": {},\n          \"Description\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1c\"\n      }\n    },\n    \"RemovePermission\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}/policy/{StatementId}\",\n        \"responseCode\": 204\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\",\n          \"StatementId\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"StatementId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"StatementId\"\n          },\n          \"Qualifier\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"Qualifier\"\n          }\n        }\n      }\n    },\n    \"UpdateAlias\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}/aliases/{Name}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\",\n          \"Name\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"Name\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Name\"\n          },\n          \"FunctionVersion\": {},\n          \"Description\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sg\"\n      }\n    },\n    \"UpdateEventSourceMapping\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/2015-03-31/event-source-mappings/{UUID}\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UUID\"\n        ],\n        \"members\": {\n          \"UUID\": {\n            \"location\": \"uri\",\n            \"locationName\": \"UUID\"\n          },\n          \"FunctionName\": {},\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          },\n          \"BatchSize\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"Sn\"\n      }\n    },\n    \"UpdateFunctionCode\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}/code\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"ZipFile\": {\n            \"shape\": \"St\"\n          },\n          \"S3Bucket\": {},\n          \"S3Key\": {},\n          \"S3ObjectVersion\": {},\n          \"Publish\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1c\"\n      }\n    },\n    \"UpdateFunctionConfiguration\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/2015-03-31/functions/{FunctionName}/configuration\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FunctionName\"\n        ],\n        \"members\": {\n          \"FunctionName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"FunctionName\"\n          },\n          \"Role\": {},\n          \"Handler\": {},\n          \"Description\": {},\n          \"Timeout\": {\n            \"type\": \"integer\"\n          },\n          \"MemorySize\": {\n            \"type\": \"integer\"\n          },\n          \"VpcConfig\": {\n            \"shape\": \"S10\"\n          },\n          \"Environment\": {\n            \"shape\": \"S17\"\n          },\n          \"Runtime\": {},\n          \"DeadLetterConfig\": {\n            \"shape\": \"S15\"\n          },\n          \"KMSKeyArn\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S1c\"\n      }\n    }\n  },\n  \"shapes\": {\n    \"Sg\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AliasArn\": {},\n        \"Name\": {},\n        \"FunctionVersion\": {},\n        \"Description\": {}\n      }\n    },\n    \"Sn\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"UUID\": {},\n        \"BatchSize\": {\n          \"type\": \"integer\"\n        },\n        \"EventSourceArn\": {},\n        \"FunctionArn\": {},\n        \"LastModified\": {\n          \"type\": \"timestamp\"\n        },\n        \"LastProcessingResult\": {},\n        \"State\": {},\n        \"StateTransitionReason\": {}\n      }\n    },\n    \"St\": {\n      \"type\": \"blob\",\n      \"sensitive\": true\n    },\n    \"S10\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"SubnetIds\": {\n          \"shape\": \"S11\"\n        },\n        \"SecurityGroupIds\": {\n          \"shape\": \"S13\"\n        }\n      }\n    },\n    \"S11\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S13\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S15\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"TargetArn\": {}\n      }\n    },\n    \"S17\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Variables\": {\n          \"shape\": \"S18\"\n        }\n      }\n    },\n    \"S18\": {\n      \"type\": \"map\",\n      \"key\": {\n        \"type\": \"string\",\n        \"sensitive\": true\n      },\n      \"value\": {\n        \"type\": \"string\",\n        \"sensitive\": true\n      },\n      \"sensitive\": true\n    },\n    \"S1c\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"FunctionName\": {},\n        \"FunctionArn\": {},\n        \"Runtime\": {},\n        \"Role\": {},\n        \"Handler\": {},\n        \"CodeSize\": {\n          \"type\": \"long\"\n        },\n        \"Description\": {},\n        \"Timeout\": {\n          \"type\": \"integer\"\n        },\n        \"MemorySize\": {\n          \"type\": \"integer\"\n        },\n        \"LastModified\": {},\n        \"CodeSha256\": {},\n        \"Version\": {},\n        \"VpcConfig\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"SubnetIds\": {\n              \"shape\": \"S11\"\n            },\n            \"SecurityGroupIds\": {\n              \"shape\": \"S13\"\n            },\n            \"VpcId\": {}\n          }\n        },\n        \"DeadLetterConfig\": {\n          \"shape\": \"S15\"\n        },\n        \"Environment\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Variables\": {\n              \"shape\": \"S18\"\n            },\n            \"Error\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ErrorCode\": {},\n                \"Message\": {\n                  \"type\": \"string\",\n                  \"sensitive\": true\n                }\n              }\n            }\n          }\n        },\n        \"KMSKeyArn\": {}\n      }\n    },\n    \"S2h\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S1c\"\n      }\n    }\n  }\n}\n},{}],83:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"ListEventSourceMappings\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"NextMarker\",\n      \"limit_key\": \"MaxItems\",\n      \"result_key\": \"EventSourceMappings\"\n    },\n    \"ListFunctions\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"NextMarker\",\n      \"limit_key\": \"MaxItems\",\n      \"result_key\": \"Functions\"\n    }\n  }\n}\n\n},{}],84:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2014-03-28\",\n    \"endpointPrefix\": \"logs\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"Amazon CloudWatch Logs\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"Logs_20140328\",\n    \"uid\": \"logs-2014-03-28\"\n  },\n  \"operations\": {\n    \"CancelExportTask\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"taskId\"\n        ],\n        \"members\": {\n          \"taskId\": {}\n        }\n      }\n    },\n    \"CreateExportTask\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\",\n          \"from\",\n          \"to\",\n          \"destination\"\n        ],\n        \"members\": {\n          \"taskName\": {},\n          \"logGroupName\": {},\n          \"logStreamNamePrefix\": {},\n          \"from\": {\n            \"type\": \"long\"\n          },\n          \"to\": {\n            \"type\": \"long\"\n          },\n          \"destination\": {},\n          \"destinationPrefix\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"taskId\": {}\n        }\n      }\n    },\n    \"CreateLogGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"tags\": {\n            \"shape\": \"Sc\"\n          }\n        }\n      }\n    },\n    \"CreateLogStream\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\",\n          \"logStreamName\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"logStreamName\": {}\n        }\n      }\n    },\n    \"DeleteDestination\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"destinationName\"\n        ],\n        \"members\": {\n          \"destinationName\": {}\n        }\n      }\n    },\n    \"DeleteLogGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\"\n        ],\n        \"members\": {\n          \"logGroupName\": {}\n        }\n      }\n    },\n    \"DeleteLogStream\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\",\n          \"logStreamName\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"logStreamName\": {}\n        }\n      }\n    },\n    \"DeleteMetricFilter\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\",\n          \"filterName\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"filterName\": {}\n        }\n      }\n    },\n    \"DeleteRetentionPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\"\n        ],\n        \"members\": {\n          \"logGroupName\": {}\n        }\n      }\n    },\n    \"DeleteSubscriptionFilter\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\",\n          \"filterName\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"filterName\": {}\n        }\n      }\n    },\n    \"DescribeDestinations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DestinationNamePrefix\": {},\n          \"nextToken\": {},\n          \"limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"destinations\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"St\"\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"DescribeExportTasks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"taskId\": {},\n          \"statusCode\": {},\n          \"nextToken\": {},\n          \"limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"exportTasks\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"taskId\": {},\n                \"taskName\": {},\n                \"logGroupName\": {},\n                \"from\": {\n                  \"type\": \"long\"\n                },\n                \"to\": {\n                  \"type\": \"long\"\n                },\n                \"destination\": {},\n                \"destinationPrefix\": {},\n                \"status\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"code\": {},\n                    \"message\": {}\n                  }\n                },\n                \"executionInfo\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"creationTime\": {\n                      \"type\": \"long\"\n                    },\n                    \"completionTime\": {\n                      \"type\": \"long\"\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"DescribeLogGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"logGroupNamePrefix\": {},\n          \"nextToken\": {},\n          \"limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"logGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"logGroupName\": {},\n                \"creationTime\": {\n                  \"type\": \"long\"\n                },\n                \"retentionInDays\": {\n                  \"type\": \"integer\"\n                },\n                \"metricFilterCount\": {\n                  \"type\": \"integer\"\n                },\n                \"arn\": {},\n                \"storedBytes\": {\n                  \"type\": \"long\"\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"DescribeLogStreams\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"logStreamNamePrefix\": {},\n          \"orderBy\": {},\n          \"descending\": {\n            \"type\": \"boolean\"\n          },\n          \"nextToken\": {},\n          \"limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"logStreams\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"logStreamName\": {},\n                \"creationTime\": {\n                  \"type\": \"long\"\n                },\n                \"firstEventTimestamp\": {\n                  \"type\": \"long\"\n                },\n                \"lastEventTimestamp\": {\n                  \"type\": \"long\"\n                },\n                \"lastIngestionTime\": {\n                  \"type\": \"long\"\n                },\n                \"uploadSequenceToken\": {},\n                \"arn\": {},\n                \"storedBytes\": {\n                  \"type\": \"long\"\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"DescribeMetricFilters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"logGroupName\": {},\n          \"filterNamePrefix\": {},\n          \"nextToken\": {},\n          \"limit\": {\n            \"type\": \"integer\"\n          },\n          \"metricName\": {},\n          \"metricNamespace\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"metricFilters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"filterName\": {},\n                \"filterPattern\": {},\n                \"metricTransformations\": {\n                  \"shape\": \"S1r\"\n                },\n                \"creationTime\": {\n                  \"type\": \"long\"\n                },\n                \"logGroupName\": {}\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"DescribeSubscriptionFilters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"filterNamePrefix\": {},\n          \"nextToken\": {},\n          \"limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"subscriptionFilters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"filterName\": {},\n                \"logGroupName\": {},\n                \"filterPattern\": {},\n                \"destinationArn\": {},\n                \"roleArn\": {},\n                \"distribution\": {},\n                \"creationTime\": {\n                  \"type\": \"long\"\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"FilterLogEvents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"logStreamNames\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"startTime\": {\n            \"type\": \"long\"\n          },\n          \"endTime\": {\n            \"type\": \"long\"\n          },\n          \"filterPattern\": {},\n          \"nextToken\": {},\n          \"limit\": {\n            \"type\": \"integer\"\n          },\n          \"interleaved\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"events\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"logStreamName\": {},\n                \"timestamp\": {\n                  \"type\": \"long\"\n                },\n                \"message\": {},\n                \"ingestionTime\": {\n                  \"type\": \"long\"\n                },\n                \"eventId\": {}\n              }\n            }\n          },\n          \"searchedLogStreams\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"logStreamName\": {},\n                \"searchedCompletely\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"GetLogEvents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\",\n          \"logStreamName\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"logStreamName\": {},\n          \"startTime\": {\n            \"type\": \"long\"\n          },\n          \"endTime\": {\n            \"type\": \"long\"\n          },\n          \"nextToken\": {},\n          \"limit\": {\n            \"type\": \"integer\"\n          },\n          \"startFromHead\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"events\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"timestamp\": {\n                  \"type\": \"long\"\n                },\n                \"message\": {},\n                \"ingestionTime\": {\n                  \"type\": \"long\"\n                }\n              }\n            }\n          },\n          \"nextForwardToken\": {},\n          \"nextBackwardToken\": {}\n        }\n      }\n    },\n    \"ListTagsLogGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\"\n        ],\n        \"members\": {\n          \"logGroupName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"tags\": {\n            \"shape\": \"Sc\"\n          }\n        }\n      }\n    },\n    \"PutDestination\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"destinationName\",\n          \"targetArn\",\n          \"roleArn\"\n        ],\n        \"members\": {\n          \"destinationName\": {},\n          \"targetArn\": {},\n          \"roleArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"destination\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"PutDestinationPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"destinationName\",\n          \"accessPolicy\"\n        ],\n        \"members\": {\n          \"destinationName\": {},\n          \"accessPolicy\": {}\n        }\n      }\n    },\n    \"PutLogEvents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\",\n          \"logStreamName\",\n          \"logEvents\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"logStreamName\": {},\n          \"logEvents\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"timestamp\",\n                \"message\"\n              ],\n              \"members\": {\n                \"timestamp\": {\n                  \"type\": \"long\"\n                },\n                \"message\": {}\n              }\n            }\n          },\n          \"sequenceToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"nextSequenceToken\": {},\n          \"rejectedLogEventsInfo\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"tooNewLogEventStartIndex\": {\n                \"type\": \"integer\"\n              },\n              \"tooOldLogEventEndIndex\": {\n                \"type\": \"integer\"\n              },\n              \"expiredLogEventEndIndex\": {\n                \"type\": \"integer\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"PutMetricFilter\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\",\n          \"filterName\",\n          \"filterPattern\",\n          \"metricTransformations\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"filterName\": {},\n          \"filterPattern\": {},\n          \"metricTransformations\": {\n            \"shape\": \"S1r\"\n          }\n        }\n      }\n    },\n    \"PutRetentionPolicy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\",\n          \"retentionInDays\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"retentionInDays\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"PutSubscriptionFilter\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\",\n          \"filterName\",\n          \"filterPattern\",\n          \"destinationArn\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"filterName\": {},\n          \"filterPattern\": {},\n          \"destinationArn\": {},\n          \"roleArn\": {},\n          \"distribution\": {}\n        }\n      }\n    },\n    \"TagLogGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\",\n          \"tags\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"tags\": {\n            \"shape\": \"Sc\"\n          }\n        }\n      }\n    },\n    \"TestMetricFilter\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"filterPattern\",\n          \"logEventMessages\"\n        ],\n        \"members\": {\n          \"filterPattern\": {},\n          \"logEventMessages\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"matches\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"eventNumber\": {\n                  \"type\": \"long\"\n                },\n                \"eventMessage\": {},\n                \"extractedValues\": {\n                  \"type\": \"map\",\n                  \"key\": {},\n                  \"value\": {}\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"UntagLogGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"logGroupName\",\n          \"tags\"\n        ],\n        \"members\": {\n          \"logGroupName\": {},\n          \"tags\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"Sc\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"St\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"destinationName\": {},\n        \"targetArn\": {},\n        \"roleArn\": {},\n        \"accessPolicy\": {},\n        \"arn\": {},\n        \"creationTime\": {\n          \"type\": \"long\"\n        }\n      }\n    },\n    \"S1r\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"metricName\",\n          \"metricNamespace\",\n          \"metricValue\"\n        ],\n        \"members\": {\n          \"metricName\": {},\n          \"metricNamespace\": {},\n          \"metricValue\": {},\n          \"defaultValue\": {\n            \"type\": \"double\"\n          }\n        }\n      }\n    }\n  }\n}\n},{}],85:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeDestinations\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"destinations\"\n    },\n    \"DescribeLogGroups\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"logGroups\"\n    },\n    \"DescribeLogStreams\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"logStreams\"\n    },\n    \"DescribeMetricFilters\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"metricFilters\"\n    },\n    \"DescribeSubscriptionFilters\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"subscriptionFilters\"\n    },\n    \"FilterLogEvents\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextToken\",\n      \"limit_key\": \"limit\",\n      \"result_key\": [\n        \"events\",\n        \"searchedLogStreams\"\n      ]\n    },\n    \"GetLogEvents\": {\n      \"input_token\": \"nextToken\",\n      \"output_token\": \"nextForwardToken\",\n      \"limit_key\": \"limit\",\n      \"result_key\": \"events\"\n    }\n  }\n}\n\n},{}],86:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"machinelearning-2014-12-12\",\n    \"apiVersion\": \"2014-12-12\",\n    \"endpointPrefix\": \"machinelearning\",\n    \"jsonVersion\": \"1.1\",\n    \"serviceFullName\": \"Amazon Machine Learning\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"AmazonML_20141212\",\n    \"protocol\": \"json\"\n  },\n  \"operations\": {\n    \"AddTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Tags\",\n          \"ResourceId\",\n          \"ResourceType\"\n        ],\n        \"members\": {\n          \"Tags\": {\n            \"shape\": \"S2\"\n          },\n          \"ResourceId\": {},\n          \"ResourceType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourceId\": {},\n          \"ResourceType\": {}\n        }\n      }\n    },\n    \"CreateBatchPrediction\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BatchPredictionId\",\n          \"MLModelId\",\n          \"BatchPredictionDataSourceId\",\n          \"OutputUri\"\n        ],\n        \"members\": {\n          \"BatchPredictionId\": {},\n          \"BatchPredictionName\": {},\n          \"MLModelId\": {},\n          \"BatchPredictionDataSourceId\": {},\n          \"OutputUri\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BatchPredictionId\": {}\n        }\n      }\n    },\n    \"CreateDataSourceFromRDS\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DataSourceId\",\n          \"RDSData\",\n          \"RoleARN\"\n        ],\n        \"members\": {\n          \"DataSourceId\": {},\n          \"DataSourceName\": {},\n          \"RDSData\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"DatabaseInformation\",\n              \"SelectSqlQuery\",\n              \"DatabaseCredentials\",\n              \"S3StagingLocation\",\n              \"ResourceRole\",\n              \"ServiceRole\",\n              \"SubnetId\",\n              \"SecurityGroupIds\"\n            ],\n            \"members\": {\n              \"DatabaseInformation\": {\n                \"shape\": \"Sf\"\n              },\n              \"SelectSqlQuery\": {},\n              \"DatabaseCredentials\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"Username\",\n                  \"Password\"\n                ],\n                \"members\": {\n                  \"Username\": {},\n                  \"Password\": {}\n                }\n              },\n              \"S3StagingLocation\": {},\n              \"DataRearrangement\": {},\n              \"DataSchema\": {},\n              \"DataSchemaUri\": {},\n              \"ResourceRole\": {},\n              \"ServiceRole\": {},\n              \"SubnetId\": {},\n              \"SecurityGroupIds\": {\n                \"type\": \"list\",\n                \"member\": {}\n              }\n            }\n          },\n          \"RoleARN\": {},\n          \"ComputeStatistics\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DataSourceId\": {}\n        }\n      }\n    },\n    \"CreateDataSourceFromRedshift\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DataSourceId\",\n          \"DataSpec\",\n          \"RoleARN\"\n        ],\n        \"members\": {\n          \"DataSourceId\": {},\n          \"DataSourceName\": {},\n          \"DataSpec\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"DatabaseInformation\",\n              \"SelectSqlQuery\",\n              \"DatabaseCredentials\",\n              \"S3StagingLocation\"\n            ],\n            \"members\": {\n              \"DatabaseInformation\": {\n                \"shape\": \"Sy\"\n              },\n              \"SelectSqlQuery\": {},\n              \"DatabaseCredentials\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"Username\",\n                  \"Password\"\n                ],\n                \"members\": {\n                  \"Username\": {},\n                  \"Password\": {}\n                }\n              },\n              \"S3StagingLocation\": {},\n              \"DataRearrangement\": {},\n              \"DataSchema\": {},\n              \"DataSchemaUri\": {}\n            }\n          },\n          \"RoleARN\": {},\n          \"ComputeStatistics\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DataSourceId\": {}\n        }\n      }\n    },\n    \"CreateDataSourceFromS3\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DataSourceId\",\n          \"DataSpec\"\n        ],\n        \"members\": {\n          \"DataSourceId\": {},\n          \"DataSourceName\": {},\n          \"DataSpec\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"DataLocationS3\"\n            ],\n            \"members\": {\n              \"DataLocationS3\": {},\n              \"DataRearrangement\": {},\n              \"DataSchema\": {},\n              \"DataSchemaLocationS3\": {}\n            }\n          },\n          \"ComputeStatistics\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DataSourceId\": {}\n        }\n      }\n    },\n    \"CreateEvaluation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EvaluationId\",\n          \"MLModelId\",\n          \"EvaluationDataSourceId\"\n        ],\n        \"members\": {\n          \"EvaluationId\": {},\n          \"EvaluationName\": {},\n          \"MLModelId\": {},\n          \"EvaluationDataSourceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EvaluationId\": {}\n        }\n      }\n    },\n    \"CreateMLModel\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"MLModelId\",\n          \"MLModelType\",\n          \"TrainingDataSourceId\"\n        ],\n        \"members\": {\n          \"MLModelId\": {},\n          \"MLModelName\": {},\n          \"MLModelType\": {},\n          \"Parameters\": {\n            \"shape\": \"S1d\"\n          },\n          \"TrainingDataSourceId\": {},\n          \"Recipe\": {},\n          \"RecipeUri\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"MLModelId\": {}\n        }\n      }\n    },\n    \"CreateRealtimeEndpoint\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"MLModelId\"\n        ],\n        \"members\": {\n          \"MLModelId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"MLModelId\": {},\n          \"RealtimeEndpointInfo\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      }\n    },\n    \"DeleteBatchPrediction\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BatchPredictionId\"\n        ],\n        \"members\": {\n          \"BatchPredictionId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BatchPredictionId\": {}\n        }\n      }\n    },\n    \"DeleteDataSource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DataSourceId\"\n        ],\n        \"members\": {\n          \"DataSourceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DataSourceId\": {}\n        }\n      }\n    },\n    \"DeleteEvaluation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EvaluationId\"\n        ],\n        \"members\": {\n          \"EvaluationId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EvaluationId\": {}\n        }\n      }\n    },\n    \"DeleteMLModel\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"MLModelId\"\n        ],\n        \"members\": {\n          \"MLModelId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"MLModelId\": {}\n        }\n      }\n    },\n    \"DeleteRealtimeEndpoint\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"MLModelId\"\n        ],\n        \"members\": {\n          \"MLModelId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"MLModelId\": {},\n          \"RealtimeEndpointInfo\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      }\n    },\n    \"DeleteTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TagKeys\",\n          \"ResourceId\",\n          \"ResourceType\"\n        ],\n        \"members\": {\n          \"TagKeys\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"ResourceId\": {},\n          \"ResourceType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourceId\": {},\n          \"ResourceType\": {}\n        }\n      }\n    },\n    \"DescribeBatchPredictions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FilterVariable\": {},\n          \"EQ\": {},\n          \"GT\": {},\n          \"LT\": {},\n          \"GE\": {},\n          \"LE\": {},\n          \"NE\": {},\n          \"Prefix\": {},\n          \"SortOrder\": {},\n          \"NextToken\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Results\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"BatchPredictionId\": {},\n                \"MLModelId\": {},\n                \"BatchPredictionDataSourceId\": {},\n                \"InputDataLocationS3\": {},\n                \"CreatedByIamUser\": {},\n                \"CreatedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"LastUpdatedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Name\": {},\n                \"Status\": {},\n                \"OutputUri\": {},\n                \"Message\": {},\n                \"ComputeTime\": {\n                  \"type\": \"long\"\n                },\n                \"FinishedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"StartedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"TotalRecordCount\": {\n                  \"type\": \"long\"\n                },\n                \"InvalidRecordCount\": {\n                  \"type\": \"long\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeDataSources\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FilterVariable\": {},\n          \"EQ\": {},\n          \"GT\": {},\n          \"LT\": {},\n          \"GE\": {},\n          \"LE\": {},\n          \"NE\": {},\n          \"Prefix\": {},\n          \"SortOrder\": {},\n          \"NextToken\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Results\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"DataSourceId\": {},\n                \"DataLocationS3\": {},\n                \"DataRearrangement\": {},\n                \"CreatedByIamUser\": {},\n                \"CreatedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"LastUpdatedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"DataSizeInBytes\": {\n                  \"type\": \"long\"\n                },\n                \"NumberOfFiles\": {\n                  \"type\": \"long\"\n                },\n                \"Name\": {},\n                \"Status\": {},\n                \"Message\": {},\n                \"RedshiftMetadata\": {\n                  \"shape\": \"S2i\"\n                },\n                \"RDSMetadata\": {\n                  \"shape\": \"S2j\"\n                },\n                \"RoleARN\": {},\n                \"ComputeStatistics\": {\n                  \"type\": \"boolean\"\n                },\n                \"ComputeTime\": {\n                  \"type\": \"long\"\n                },\n                \"FinishedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"StartedAt\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeEvaluations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FilterVariable\": {},\n          \"EQ\": {},\n          \"GT\": {},\n          \"LT\": {},\n          \"GE\": {},\n          \"LE\": {},\n          \"NE\": {},\n          \"Prefix\": {},\n          \"SortOrder\": {},\n          \"NextToken\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Results\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"EvaluationId\": {},\n                \"MLModelId\": {},\n                \"EvaluationDataSourceId\": {},\n                \"InputDataLocationS3\": {},\n                \"CreatedByIamUser\": {},\n                \"CreatedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"LastUpdatedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Name\": {},\n                \"Status\": {},\n                \"PerformanceMetrics\": {\n                  \"shape\": \"S2q\"\n                },\n                \"Message\": {},\n                \"ComputeTime\": {\n                  \"type\": \"long\"\n                },\n                \"FinishedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"StartedAt\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeMLModels\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FilterVariable\": {},\n          \"EQ\": {},\n          \"GT\": {},\n          \"LT\": {},\n          \"GE\": {},\n          \"LE\": {},\n          \"NE\": {},\n          \"Prefix\": {},\n          \"SortOrder\": {},\n          \"NextToken\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Results\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"MLModelId\": {},\n                \"TrainingDataSourceId\": {},\n                \"CreatedByIamUser\": {},\n                \"CreatedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"LastUpdatedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Name\": {},\n                \"Status\": {},\n                \"SizeInBytes\": {\n                  \"type\": \"long\"\n                },\n                \"EndpointInfo\": {\n                  \"shape\": \"S1j\"\n                },\n                \"TrainingParameters\": {\n                  \"shape\": \"S1d\"\n                },\n                \"InputDataLocationS3\": {},\n                \"Algorithm\": {},\n                \"MLModelType\": {},\n                \"ScoreThreshold\": {\n                  \"type\": \"float\"\n                },\n                \"ScoreThresholdLastUpdatedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Message\": {},\n                \"ComputeTime\": {\n                  \"type\": \"long\"\n                },\n                \"FinishedAt\": {\n                  \"type\": \"timestamp\"\n                },\n                \"StartedAt\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceId\",\n          \"ResourceType\"\n        ],\n        \"members\": {\n          \"ResourceId\": {},\n          \"ResourceType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourceId\": {},\n          \"ResourceType\": {},\n          \"Tags\": {\n            \"shape\": \"S2\"\n          }\n        }\n      }\n    },\n    \"GetBatchPrediction\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BatchPredictionId\"\n        ],\n        \"members\": {\n          \"BatchPredictionId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BatchPredictionId\": {},\n          \"MLModelId\": {},\n          \"BatchPredictionDataSourceId\": {},\n          \"InputDataLocationS3\": {},\n          \"CreatedByIamUser\": {},\n          \"CreatedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"LastUpdatedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"Name\": {},\n          \"Status\": {},\n          \"OutputUri\": {},\n          \"LogUri\": {},\n          \"Message\": {},\n          \"ComputeTime\": {\n            \"type\": \"long\"\n          },\n          \"FinishedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"StartedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"TotalRecordCount\": {\n            \"type\": \"long\"\n          },\n          \"InvalidRecordCount\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    },\n    \"GetDataSource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DataSourceId\"\n        ],\n        \"members\": {\n          \"DataSourceId\": {},\n          \"Verbose\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DataSourceId\": {},\n          \"DataLocationS3\": {},\n          \"DataRearrangement\": {},\n          \"CreatedByIamUser\": {},\n          \"CreatedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"LastUpdatedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"DataSizeInBytes\": {\n            \"type\": \"long\"\n          },\n          \"NumberOfFiles\": {\n            \"type\": \"long\"\n          },\n          \"Name\": {},\n          \"Status\": {},\n          \"LogUri\": {},\n          \"Message\": {},\n          \"RedshiftMetadata\": {\n            \"shape\": \"S2i\"\n          },\n          \"RDSMetadata\": {\n            \"shape\": \"S2j\"\n          },\n          \"RoleARN\": {},\n          \"ComputeStatistics\": {\n            \"type\": \"boolean\"\n          },\n          \"ComputeTime\": {\n            \"type\": \"long\"\n          },\n          \"FinishedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"StartedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"DataSourceSchema\": {}\n        }\n      }\n    },\n    \"GetEvaluation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EvaluationId\"\n        ],\n        \"members\": {\n          \"EvaluationId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EvaluationId\": {},\n          \"MLModelId\": {},\n          \"EvaluationDataSourceId\": {},\n          \"InputDataLocationS3\": {},\n          \"CreatedByIamUser\": {},\n          \"CreatedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"LastUpdatedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"Name\": {},\n          \"Status\": {},\n          \"PerformanceMetrics\": {\n            \"shape\": \"S2q\"\n          },\n          \"LogUri\": {},\n          \"Message\": {},\n          \"ComputeTime\": {\n            \"type\": \"long\"\n          },\n          \"FinishedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"StartedAt\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"GetMLModel\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"MLModelId\"\n        ],\n        \"members\": {\n          \"MLModelId\": {},\n          \"Verbose\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"MLModelId\": {},\n          \"TrainingDataSourceId\": {},\n          \"CreatedByIamUser\": {},\n          \"CreatedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"LastUpdatedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"Name\": {},\n          \"Status\": {},\n          \"SizeInBytes\": {\n            \"type\": \"long\"\n          },\n          \"EndpointInfo\": {\n            \"shape\": \"S1j\"\n          },\n          \"TrainingParameters\": {\n            \"shape\": \"S1d\"\n          },\n          \"InputDataLocationS3\": {},\n          \"MLModelType\": {},\n          \"ScoreThreshold\": {\n            \"type\": \"float\"\n          },\n          \"ScoreThresholdLastUpdatedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"LogUri\": {},\n          \"Message\": {},\n          \"ComputeTime\": {\n            \"type\": \"long\"\n          },\n          \"FinishedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"StartedAt\": {\n            \"type\": \"timestamp\"\n          },\n          \"Recipe\": {},\n          \"Schema\": {}\n        }\n      }\n    },\n    \"Predict\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"MLModelId\",\n          \"Record\",\n          \"PredictEndpoint\"\n        ],\n        \"members\": {\n          \"MLModelId\": {},\n          \"Record\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {}\n          },\n          \"PredictEndpoint\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Prediction\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"predictedLabel\": {},\n              \"predictedValue\": {\n                \"type\": \"float\"\n              },\n              \"predictedScores\": {\n                \"type\": \"map\",\n                \"key\": {},\n                \"value\": {\n                  \"type\": \"float\"\n                }\n              },\n              \"details\": {\n                \"type\": \"map\",\n                \"key\": {},\n                \"value\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"UpdateBatchPrediction\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BatchPredictionId\",\n          \"BatchPredictionName\"\n        ],\n        \"members\": {\n          \"BatchPredictionId\": {},\n          \"BatchPredictionName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BatchPredictionId\": {}\n        }\n      }\n    },\n    \"UpdateDataSource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DataSourceId\",\n          \"DataSourceName\"\n        ],\n        \"members\": {\n          \"DataSourceId\": {},\n          \"DataSourceName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DataSourceId\": {}\n        }\n      }\n    },\n    \"UpdateEvaluation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EvaluationId\",\n          \"EvaluationName\"\n        ],\n        \"members\": {\n          \"EvaluationId\": {},\n          \"EvaluationName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EvaluationId\": {}\n        }\n      }\n    },\n    \"UpdateMLModel\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"MLModelId\"\n        ],\n        \"members\": {\n          \"MLModelId\": {},\n          \"MLModelName\": {},\n          \"ScoreThreshold\": {\n            \"type\": \"float\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"MLModelId\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S2\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"Sf\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"InstanceIdentifier\",\n        \"DatabaseName\"\n      ],\n      \"members\": {\n        \"InstanceIdentifier\": {},\n        \"DatabaseName\": {}\n      }\n    },\n    \"Sy\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"DatabaseName\",\n        \"ClusterIdentifier\"\n      ],\n      \"members\": {\n        \"DatabaseName\": {},\n        \"ClusterIdentifier\": {}\n      }\n    },\n    \"S1d\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S1j\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"PeakRequestsPerSecond\": {\n          \"type\": \"integer\"\n        },\n        \"CreatedAt\": {\n          \"type\": \"timestamp\"\n        },\n        \"EndpointUrl\": {},\n        \"EndpointStatus\": {}\n      }\n    },\n    \"S2i\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"RedshiftDatabase\": {\n          \"shape\": \"Sy\"\n        },\n        \"DatabaseUserName\": {},\n        \"SelectSqlQuery\": {}\n      }\n    },\n    \"S2j\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Database\": {\n          \"shape\": \"Sf\"\n        },\n        \"DatabaseUserName\": {},\n        \"SelectSqlQuery\": {},\n        \"ResourceRole\": {},\n        \"ServiceRole\": {},\n        \"DataPipelineId\": {}\n      }\n    },\n    \"S2q\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Properties\": {\n          \"type\": \"map\",\n          \"key\": {},\n          \"value\": {}\n        }\n      }\n    }\n  },\n  \"examples\": {}\n}\n},{}],87:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeBatchPredictions\": {\n      \"limit_key\": \"Limit\",\n      \"output_token\": \"NextToken\",\n      \"input_token\": \"NextToken\",\n      \"result_key\": \"Results\"\n    },\n    \"DescribeDataSources\": {\n      \"limit_key\": \"Limit\",\n      \"output_token\": \"NextToken\",\n      \"input_token\": \"NextToken\",\n      \"result_key\": \"Results\"\n    },\n    \"DescribeEvaluations\": {\n      \"limit_key\": \"Limit\",\n      \"output_token\": \"NextToken\",\n      \"input_token\": \"NextToken\",\n      \"result_key\": \"Results\"\n    },\n    \"DescribeMLModels\": {\n      \"limit_key\": \"Limit\",\n      \"output_token\": \"NextToken\",\n      \"input_token\": \"NextToken\",\n      \"result_key\": \"Results\"\n    }\n  }\n}\n\n},{}],88:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"DataSourceAvailable\": {\n      \"delay\": 30,\n      \"operation\": \"DescribeDataSources\",\n      \"maxAttempts\": 60,\n      \"acceptors\": [\n        {\n          \"expected\": \"COMPLETED\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Results[].Status\"\n        },\n        {\n          \"expected\": \"FAILED\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Results[].Status\"\n        }\n      ]\n    },\n    \"MLModelAvailable\": {\n      \"delay\": 30,\n      \"operation\": \"DescribeMLModels\",\n      \"maxAttempts\": 60,\n      \"acceptors\": [\n        {\n          \"expected\": \"COMPLETED\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Results[].Status\"\n        },\n        {\n          \"expected\": \"FAILED\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Results[].Status\"\n        }\n      ]\n    },\n    \"EvaluationAvailable\": {\n      \"delay\": 30,\n      \"operation\": \"DescribeEvaluations\",\n      \"maxAttempts\": 60,\n      \"acceptors\": [\n        {\n          \"expected\": \"COMPLETED\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Results[].Status\"\n        },\n        {\n          \"expected\": \"FAILED\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Results[].Status\"\n        }\n      ]\n    },\n    \"BatchPredictionAvailable\": {\n      \"delay\": 30,\n      \"operation\": \"DescribeBatchPredictions\",\n      \"maxAttempts\": 60,\n      \"acceptors\": [\n        {\n          \"expected\": \"COMPLETED\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Results[].Status\"\n        },\n        {\n          \"expected\": \"FAILED\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Results[].Status\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],89:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2015-07-01\",\n    \"endpointPrefix\": \"marketplacecommerceanalytics\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"AWS Marketplace Commerce Analytics\",\n    \"signatureVersion\": \"v4\",\n    \"signingName\": \"marketplacecommerceanalytics\",\n    \"targetPrefix\": \"MarketplaceCommerceAnalytics20150701\",\n    \"uid\": \"marketplacecommerceanalytics-2015-07-01\"\n  },\n  \"operations\": {\n    \"GenerateDataSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"dataSetType\",\n          \"dataSetPublicationDate\",\n          \"roleNameArn\",\n          \"destinationS3BucketName\",\n          \"snsTopicArn\"\n        ],\n        \"members\": {\n          \"dataSetType\": {},\n          \"dataSetPublicationDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"roleNameArn\": {},\n          \"destinationS3BucketName\": {},\n          \"destinationS3Prefix\": {},\n          \"snsTopicArn\": {},\n          \"customerDefinedValues\": {\n            \"shape\": \"S8\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"dataSetRequestId\": {}\n        }\n      }\n    },\n    \"StartSupportDataExport\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"dataSetType\",\n          \"fromDate\",\n          \"roleNameArn\",\n          \"destinationS3BucketName\",\n          \"snsTopicArn\"\n        ],\n        \"members\": {\n          \"dataSetType\": {},\n          \"fromDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"roleNameArn\": {},\n          \"destinationS3BucketName\": {},\n          \"destinationS3Prefix\": {},\n          \"snsTopicArn\": {},\n          \"customerDefinedValues\": {\n            \"shape\": \"S8\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"dataSetRequestId\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S8\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    }\n  }\n}\n},{}],90:[function(require,module,exports){\nmodule.exports={\n  \"acm\": {\n    \"name\": \"ACM\",\n    \"cors\": true\n  },\n  \"apigateway\": {\n    \"name\": \"APIGateway\",\n    \"cors\": true\n  },\n  \"applicationautoscaling\": {\n    \"prefix\": \"application-autoscaling\",\n    \"name\": \"ApplicationAutoScaling\",\n    \"cors\": true\n  },\n  \"appstream\": {\n    \"name\": \"AppStream\"\n  },\n  \"autoscaling\": {\n    \"name\": \"AutoScaling\",\n    \"cors\": true\n  },\n  \"batch\": {\n    \"name\": \"Batch\"\n  },\n  \"budgets\": {\n    \"name\": \"Budgets\"\n  },\n  \"clouddirectory\": {\n    \"name\": \"CloudDirectory\"\n  },\n  \"cloudformation\": {\n    \"name\": \"CloudFormation\",\n    \"cors\": true\n  },\n  \"cloudfront\": {\n    \"name\": \"CloudFront\",\n    \"versions\": [\n      \"2013-05-12*\",\n      \"2013-11-11*\",\n      \"2014-05-31*\",\n      \"2014-10-21*\",\n      \"2014-11-06*\",\n      \"2015-04-17*\",\n      \"2015-07-27*\",\n      \"2015-09-17*\",\n      \"2016-01-13*\",\n      \"2016-01-28*\",\n      \"2016-08-01*\",\n      \"2016-08-20*\",\n      \"2016-09-07*\",\n      \"2016-09-29*\"\n    ],\n    \"cors\": true\n  },\n  \"cloudhsm\": {\n    \"name\": \"CloudHSM\",\n    \"cors\": true\n  },\n  \"cloudsearch\": {\n    \"name\": \"CloudSearch\"\n  },\n  \"cloudsearchdomain\": {\n    \"name\": \"CloudSearchDomain\"\n  },\n  \"cloudtrail\": {\n    \"name\": \"CloudTrail\",\n    \"cors\": true\n  },\n  \"cloudwatch\": {\n    \"prefix\": \"monitoring\",\n    \"name\": \"CloudWatch\",\n    \"cors\": true\n  },\n  \"cloudwatchevents\": {\n    \"prefix\": \"events\",\n    \"name\": \"CloudWatchEvents\",\n    \"versions\": [\n      \"2014-02-03*\"\n    ],\n    \"cors\": true\n  },\n  \"cloudwatchlogs\": {\n    \"prefix\": \"logs\",\n    \"name\": \"CloudWatchLogs\",\n    \"cors\": true\n  },\n  \"codebuild\": {\n    \"name\": \"CodeBuild\"\n  },\n  \"codecommit\": {\n    \"name\": \"CodeCommit\",\n    \"cors\": true\n  },\n  \"codedeploy\": {\n    \"name\": \"CodeDeploy\",\n    \"cors\": true\n  },\n  \"codepipeline\": {\n    \"name\": \"CodePipeline\",\n    \"cors\": true\n  },\n  \"cognitoidentity\": {\n    \"prefix\": \"cognito-identity\",\n    \"name\": \"CognitoIdentity\",\n    \"cors\": true\n  },\n  \"cognitoidentityserviceprovider\": {\n    \"prefix\": \"cognito-idp\",\n    \"name\": \"CognitoIdentityServiceProvider\",\n    \"cors\": true\n  },\n  \"cognitosync\": {\n    \"prefix\": \"cognito-sync\",\n    \"name\": \"CognitoSync\",\n    \"cors\": true\n  },\n  \"configservice\": {\n    \"prefix\": \"config\",\n    \"name\": \"ConfigService\",\n    \"cors\": true\n  },\n  \"cur\": {\n    \"name\": \"CUR\",\n    \"cors\": true\n  },\n  \"datapipeline\": {\n    \"name\": \"DataPipeline\"\n  },\n  \"devicefarm\": {\n    \"name\": \"DeviceFarm\",\n    \"cors\": true\n  },\n  \"directconnect\": {\n    \"name\": \"DirectConnect\",\n    \"cors\": true\n  },\n  \"directoryservice\": {\n    \"prefix\": \"ds\",\n    \"name\": \"DirectoryService\"\n  },\n  \"discovery\": {\n    \"name\": \"Discovery\"\n  },\n  \"dms\": {\n    \"name\": \"DMS\"\n  },\n  \"dynamodb\": {\n    \"name\": \"DynamoDB\",\n    \"cors\": true\n  },\n  \"dynamodbstreams\": {\n    \"prefix\": \"streams.dynamodb\",\n    \"name\": \"DynamoDBStreams\",\n    \"cors\": true\n  },\n  \"ec2\": {\n    \"name\": \"EC2\",\n    \"versions\": [\n      \"2013-06-15*\",\n      \"2013-10-15*\",\n      \"2014-02-01*\",\n      \"2014-05-01*\",\n      \"2014-06-15*\",\n      \"2014-09-01*\",\n      \"2014-10-01*\",\n      \"2015-03-01*\",\n      \"2015-04-15*\",\n      \"2015-10-01*\",\n      \"2016-04-01*\",\n      \"2016-09-15*\"\n    ],\n    \"cors\": true\n  },\n  \"ecr\": {\n    \"name\": \"ECR\",\n    \"cors\": true\n  },\n  \"ecs\": {\n    \"name\": \"ECS\",\n    \"cors\": true\n  },\n  \"efs\": {\n    \"prefix\": \"elasticfilesystem\",\n    \"name\": \"EFS\"\n  },\n  \"elasticache\": {\n    \"name\": \"ElastiCache\",\n    \"versions\": [\n      \"2012-11-15*\",\n      \"2014-03-24*\",\n      \"2014-07-15*\",\n      \"2014-09-30*\"\n    ],\n    \"cors\": true\n  },\n  \"elasticbeanstalk\": {\n    \"name\": \"ElasticBeanstalk\",\n    \"cors\": true\n  },\n  \"elb\": {\n    \"prefix\": \"elasticloadbalancing\",\n    \"name\": \"ELB\",\n    \"cors\": true\n  },\n  \"elbv2\": {\n    \"prefix\": \"elasticloadbalancingv2\",\n    \"name\": \"ELBv2\",\n    \"cors\": true\n  },\n  \"emr\": {\n    \"prefix\": \"elasticmapreduce\",\n    \"name\": \"EMR\",\n    \"cors\": true\n  },\n  \"es\": {\n    \"name\": \"ES\"\n  },\n  \"elastictranscoder\": {\n    \"name\": \"ElasticTranscoder\",\n    \"cors\": true\n  },\n  \"firehose\": {\n    \"name\": \"Firehose\",\n    \"cors\": true\n  },\n  \"gamelift\": {\n    \"name\": \"GameLift\",\n    \"cors\": true\n  },\n  \"glacier\": {\n    \"name\": \"Glacier\"\n  },\n  \"health\": {\n    \"name\": \"Health\"\n  },\n  \"iam\": {\n    \"name\": \"IAM\"\n  },\n  \"importexport\": {\n    \"name\": \"ImportExport\"\n  },\n  \"inspector\": {\n    \"name\": \"Inspector\",\n    \"versions\": [\n      \"2015-08-18*\"\n    ],\n    \"cors\": true\n  },\n  \"iot\": {\n    \"name\": \"Iot\",\n    \"cors\": true\n  },\n  \"iotdata\": {\n    \"prefix\": \"iot-data\",\n    \"name\": \"IotData\",\n    \"cors\": true\n  },\n  \"kinesis\": {\n    \"name\": \"Kinesis\",\n    \"cors\": true\n  },\n  \"kinesisanalytics\": {\n    \"name\": \"KinesisAnalytics\"\n  },\n  \"kms\": {\n    \"name\": \"KMS\",\n    \"cors\": true\n  },\n  \"lambda\": {\n    \"name\": \"Lambda\",\n    \"cors\": true\n  },\n  \"lexruntime\": {\n    \"prefix\": \"runtime.lex\",\n    \"name\": \"LexRuntime\",\n    \"cors\": true\n  },\n  \"lightsail\": {\n    \"name\": \"Lightsail\"\n  },\n  \"machinelearning\": {\n    \"name\": \"MachineLearning\",\n    \"cors\": true\n  },\n  \"marketplacecommerceanalytics\": {\n    \"name\": \"MarketplaceCommerceAnalytics\",\n    \"cors\": true\n  },\n  \"marketplacemetering\": {\n    \"prefix\": \"meteringmarketplace\",\n    \"name\": \"MarketplaceMetering\"\n  },\n  \"mobileanalytics\": {\n    \"name\": \"MobileAnalytics\",\n    \"cors\": true\n  },\n  \"opsworks\": {\n    \"name\": \"OpsWorks\",\n    \"cors\": true\n  },\n  \"opsworkscm\": {\n    \"name\": \"OpsWorksCM\"\n  },\n  \"pinpoint\": {\n    \"name\": \"Pinpoint\"\n  },\n  \"polly\": {\n    \"name\": \"Polly\",\n    \"cors\": true\n  },\n  \"rds\": {\n    \"name\": \"RDS\",\n    \"versions\": [\n      \"2014-09-01*\"\n    ],\n    \"cors\": true\n  },\n  \"redshift\": {\n    \"name\": \"Redshift\",\n    \"cors\": true\n  },\n  \"rekognition\": {\n    \"name\": \"Rekognition\",\n    \"cors\": true\n  },\n  \"route53\": {\n    \"name\": \"Route53\",\n    \"cors\": true\n  },\n  \"route53domains\": {\n    \"name\": \"Route53Domains\",\n    \"cors\": true\n  },\n  \"s3\": {\n    \"name\": \"S3\",\n    \"dualstackAvailable\": true,\n    \"cors\": true\n  },\n  \"servicecatalog\": {\n    \"name\": \"ServiceCatalog\",\n    \"cors\": true\n  },\n  \"ses\": {\n    \"prefix\": \"email\",\n    \"name\": \"SES\",\n    \"cors\": true\n  },\n  \"shield\": {\n    \"name\": \"Shield\"\n  },\n  \"simpledb\": {\n    \"prefix\": \"sdb\",\n    \"name\": \"SimpleDB\"\n  },\n  \"sms\": {\n    \"name\": \"SMS\"\n  },\n  \"snowball\": {\n    \"name\": \"Snowball\"\n  },\n  \"sns\": {\n    \"name\": \"SNS\",\n    \"cors\": true\n  },\n  \"sqs\": {\n    \"name\": \"SQS\",\n    \"cors\": true\n  },\n  \"ssm\": {\n    \"name\": \"SSM\",\n    \"cors\": true\n  },\n  \"storagegateway\": {\n    \"name\": \"StorageGateway\",\n    \"cors\": true\n  },\n  \"stepfunctions\": {\n    \"prefix\": \"states\",\n    \"name\": \"StepFunctions\"\n  },\n  \"sts\": {\n    \"name\": \"STS\",\n    \"cors\": true\n  },\n  \"support\": {\n    \"name\": \"Support\"\n  },\n  \"swf\": {\n    \"name\": \"SWF\"\n  },\n  \"xray\": {\n    \"name\": \"XRay\"\n  },\n  \"waf\": {\n    \"name\": \"WAF\",\n    \"cors\": true\n  },\n  \"wafregional\": {\n    \"prefix\": \"waf-regional\",\n    \"name\": \"WAFRegional\"\n  },\n  \"workspaces\": {\n    \"name\": \"WorkSpaces\"\n  }\n}\n\n},{}],91:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2014-06-05\",\n    \"endpointPrefix\": \"mobileanalytics\",\n    \"serviceFullName\": \"Amazon Mobile Analytics\",\n    \"signatureVersion\": \"v4\",\n    \"protocol\": \"rest-json\"\n  },\n  \"operations\": {\n    \"PutEvents\": {\n      \"http\": {\n        \"requestUri\": \"/2014-06-05/events\",\n        \"responseCode\": 202\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"events\",\n          \"clientContext\"\n        ],\n        \"members\": {\n          \"events\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"eventType\",\n                \"timestamp\"\n              ],\n              \"members\": {\n                \"eventType\": {},\n                \"timestamp\": {},\n                \"session\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"id\": {},\n                    \"duration\": {\n                      \"type\": \"long\"\n                    },\n                    \"startTimestamp\": {},\n                    \"stopTimestamp\": {}\n                  }\n                },\n                \"version\": {},\n                \"attributes\": {\n                  \"type\": \"map\",\n                  \"key\": {},\n                  \"value\": {}\n                },\n                \"metrics\": {\n                  \"type\": \"map\",\n                  \"key\": {},\n                  \"value\": {\n                    \"type\": \"double\"\n                  }\n                }\n              }\n            }\n          },\n          \"clientContext\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-Client-Context\"\n          },\n          \"clientContextEncoding\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-Client-Context-Encoding\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {}\n}\n},{}],92:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"monitoring-2010-08-01\",\n    \"apiVersion\": \"2010-08-01\",\n    \"endpointPrefix\": \"monitoring\",\n    \"protocol\": \"query\",\n    \"serviceAbbreviation\": \"CloudWatch\",\n    \"serviceFullName\": \"Amazon CloudWatch\",\n    \"signatureVersion\": \"v4\",\n    \"xmlNamespace\": \"http://monitoring.amazonaws.com/doc/2010-08-01/\"\n  },\n  \"operations\": {\n    \"DeleteAlarms\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AlarmNames\"\n        ],\n        \"members\": {\n          \"AlarmNames\": {\n            \"shape\": \"S2\"\n          }\n        }\n      }\n    },\n    \"DescribeAlarmHistory\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AlarmName\": {},\n          \"HistoryItemType\": {},\n          \"StartDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeAlarmHistoryResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"AlarmHistoryItems\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"AlarmName\": {},\n                \"Timestamp\": {\n                  \"type\": \"timestamp\"\n                },\n                \"HistoryItemType\": {},\n                \"HistorySummary\": {},\n                \"HistoryData\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeAlarms\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AlarmNames\": {\n            \"shape\": \"S2\"\n          },\n          \"AlarmNamePrefix\": {},\n          \"StateValue\": {},\n          \"ActionPrefix\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeAlarmsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"MetricAlarms\": {\n            \"shape\": \"Sj\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeAlarmsForMetric\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"MetricName\",\n          \"Namespace\"\n        ],\n        \"members\": {\n          \"MetricName\": {},\n          \"Namespace\": {},\n          \"Statistic\": {},\n          \"ExtendedStatistic\": {},\n          \"Dimensions\": {\n            \"shape\": \"Sw\"\n          },\n          \"Period\": {\n            \"type\": \"integer\"\n          },\n          \"Unit\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeAlarmsForMetricResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"MetricAlarms\": {\n            \"shape\": \"Sj\"\n          }\n        }\n      }\n    },\n    \"DisableAlarmActions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AlarmNames\"\n        ],\n        \"members\": {\n          \"AlarmNames\": {\n            \"shape\": \"S2\"\n          }\n        }\n      }\n    },\n    \"EnableAlarmActions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AlarmNames\"\n        ],\n        \"members\": {\n          \"AlarmNames\": {\n            \"shape\": \"S2\"\n          }\n        }\n      }\n    },\n    \"GetMetricStatistics\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Namespace\",\n          \"MetricName\",\n          \"StartTime\",\n          \"EndTime\",\n          \"Period\"\n        ],\n        \"members\": {\n          \"Namespace\": {},\n          \"MetricName\": {},\n          \"Dimensions\": {\n            \"shape\": \"Sw\"\n          },\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"Period\": {\n            \"type\": \"integer\"\n          },\n          \"Statistics\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"ExtendedStatistics\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"Unit\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetMetricStatisticsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Label\": {},\n          \"Datapoints\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Timestamp\": {\n                  \"type\": \"timestamp\"\n                },\n                \"SampleCount\": {\n                  \"type\": \"double\"\n                },\n                \"Average\": {\n                  \"type\": \"double\"\n                },\n                \"Sum\": {\n                  \"type\": \"double\"\n                },\n                \"Minimum\": {\n                  \"type\": \"double\"\n                },\n                \"Maximum\": {\n                  \"type\": \"double\"\n                },\n                \"Unit\": {},\n                \"ExtendedStatistics\": {\n                  \"type\": \"map\",\n                  \"key\": {},\n                  \"value\": {\n                    \"type\": \"double\"\n                  }\n                }\n              },\n              \"xmlOrder\": [\n                \"Timestamp\",\n                \"SampleCount\",\n                \"Average\",\n                \"Sum\",\n                \"Minimum\",\n                \"Maximum\",\n                \"Unit\",\n                \"ExtendedStatistics\"\n              ]\n            }\n          }\n        }\n      }\n    },\n    \"ListMetrics\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Namespace\": {},\n          \"MetricName\": {},\n          \"Dimensions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Name\"\n              ],\n              \"members\": {\n                \"Name\": {},\n                \"Value\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListMetricsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Metrics\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Namespace\": {},\n                \"MetricName\": {},\n                \"Dimensions\": {\n                  \"shape\": \"Sw\"\n                }\n              },\n              \"xmlOrder\": [\n                \"Namespace\",\n                \"MetricName\",\n                \"Dimensions\"\n              ]\n            }\n          },\n          \"NextToken\": {}\n        },\n        \"xmlOrder\": [\n          \"Metrics\",\n          \"NextToken\"\n        ]\n      }\n    },\n    \"PutMetricAlarm\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AlarmName\",\n          \"MetricName\",\n          \"Namespace\",\n          \"Period\",\n          \"EvaluationPeriods\",\n          \"Threshold\",\n          \"ComparisonOperator\"\n        ],\n        \"members\": {\n          \"AlarmName\": {},\n          \"AlarmDescription\": {},\n          \"ActionsEnabled\": {\n            \"type\": \"boolean\"\n          },\n          \"OKActions\": {\n            \"shape\": \"So\"\n          },\n          \"AlarmActions\": {\n            \"shape\": \"So\"\n          },\n          \"InsufficientDataActions\": {\n            \"shape\": \"So\"\n          },\n          \"MetricName\": {},\n          \"Namespace\": {},\n          \"Statistic\": {},\n          \"ExtendedStatistic\": {},\n          \"Dimensions\": {\n            \"shape\": \"Sw\"\n          },\n          \"Period\": {\n            \"type\": \"integer\"\n          },\n          \"Unit\": {},\n          \"EvaluationPeriods\": {\n            \"type\": \"integer\"\n          },\n          \"Threshold\": {\n            \"type\": \"double\"\n          },\n          \"ComparisonOperator\": {}\n        }\n      }\n    },\n    \"PutMetricData\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Namespace\",\n          \"MetricData\"\n        ],\n        \"members\": {\n          \"Namespace\": {},\n          \"MetricData\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"MetricName\"\n              ],\n              \"members\": {\n                \"MetricName\": {},\n                \"Dimensions\": {\n                  \"shape\": \"Sw\"\n                },\n                \"Timestamp\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Value\": {\n                  \"type\": \"double\"\n                },\n                \"StatisticValues\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"SampleCount\",\n                    \"Sum\",\n                    \"Minimum\",\n                    \"Maximum\"\n                  ],\n                  \"members\": {\n                    \"SampleCount\": {\n                      \"type\": \"double\"\n                    },\n                    \"Sum\": {\n                      \"type\": \"double\"\n                    },\n                    \"Minimum\": {\n                      \"type\": \"double\"\n                    },\n                    \"Maximum\": {\n                      \"type\": \"double\"\n                    }\n                  }\n                },\n                \"Unit\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"SetAlarmState\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AlarmName\",\n          \"StateValue\",\n          \"StateReason\"\n        ],\n        \"members\": {\n          \"AlarmName\": {},\n          \"StateValue\": {},\n          \"StateReason\": {},\n          \"StateReasonData\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S2\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sj\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AlarmName\": {},\n          \"AlarmArn\": {},\n          \"AlarmDescription\": {},\n          \"AlarmConfigurationUpdatedTimestamp\": {\n            \"type\": \"timestamp\"\n          },\n          \"ActionsEnabled\": {\n            \"type\": \"boolean\"\n          },\n          \"OKActions\": {\n            \"shape\": \"So\"\n          },\n          \"AlarmActions\": {\n            \"shape\": \"So\"\n          },\n          \"InsufficientDataActions\": {\n            \"shape\": \"So\"\n          },\n          \"StateValue\": {},\n          \"StateReason\": {},\n          \"StateReasonData\": {},\n          \"StateUpdatedTimestamp\": {\n            \"type\": \"timestamp\"\n          },\n          \"MetricName\": {},\n          \"Namespace\": {},\n          \"Statistic\": {},\n          \"ExtendedStatistic\": {},\n          \"Dimensions\": {\n            \"shape\": \"Sw\"\n          },\n          \"Period\": {\n            \"type\": \"integer\"\n          },\n          \"Unit\": {},\n          \"EvaluationPeriods\": {\n            \"type\": \"integer\"\n          },\n          \"Threshold\": {\n            \"type\": \"double\"\n          },\n          \"ComparisonOperator\": {}\n        },\n        \"xmlOrder\": [\n          \"AlarmName\",\n          \"AlarmArn\",\n          \"AlarmDescription\",\n          \"AlarmConfigurationUpdatedTimestamp\",\n          \"ActionsEnabled\",\n          \"OKActions\",\n          \"AlarmActions\",\n          \"InsufficientDataActions\",\n          \"StateValue\",\n          \"StateReason\",\n          \"StateReasonData\",\n          \"StateUpdatedTimestamp\",\n          \"MetricName\",\n          \"Namespace\",\n          \"Statistic\",\n          \"Dimensions\",\n          \"Period\",\n          \"Unit\",\n          \"EvaluationPeriods\",\n          \"Threshold\",\n          \"ComparisonOperator\",\n          \"ExtendedStatistic\"\n        ]\n      }\n    },\n    \"So\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sw\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Value\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Value\": {}\n        },\n        \"xmlOrder\": [\n          \"Name\",\n          \"Value\"\n        ]\n      }\n    }\n  }\n}\n},{}],93:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeAlarmHistory\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"AlarmHistoryItems\"\n    },\n    \"DescribeAlarms\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"MetricAlarms\"\n    },\n    \"DescribeAlarmsForMetric\": {\n      \"result_key\": \"MetricAlarms\"\n    },\n    \"ListMetrics\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"Metrics\"\n    }\n  }\n}\n\n},{}],94:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"AlarmExists\": {\n      \"delay\": 5,\n      \"maxAttempts\": 40,\n      \"operation\": \"DescribeAlarms\",\n      \"acceptors\": [\n        {\n          \"matcher\": \"path\",\n          \"expected\": true,\n          \"argument\": \"length(MetricAlarms[]) > `0`\",\n          \"state\": \"success\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],95:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"opsworks-2013-02-18\",\n    \"apiVersion\": \"2013-02-18\",\n    \"endpointPrefix\": \"opsworks\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"AWS OpsWorks\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"OpsWorks_20130218\"\n  },\n  \"operations\": {\n    \"AssignInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\",\n          \"LayerIds\"\n        ],\n        \"members\": {\n          \"InstanceId\": {},\n          \"LayerIds\": {\n            \"shape\": \"S3\"\n          }\n        }\n      }\n    },\n    \"AssignVolume\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeId\"\n        ],\n        \"members\": {\n          \"VolumeId\": {},\n          \"InstanceId\": {}\n        }\n      }\n    },\n    \"AssociateElasticIp\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ElasticIp\"\n        ],\n        \"members\": {\n          \"ElasticIp\": {},\n          \"InstanceId\": {}\n        }\n      }\n    },\n    \"AttachElasticLoadBalancer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ElasticLoadBalancerName\",\n          \"LayerId\"\n        ],\n        \"members\": {\n          \"ElasticLoadBalancerName\": {},\n          \"LayerId\": {}\n        }\n      }\n    },\n    \"CloneStack\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceStackId\",\n          \"ServiceRoleArn\"\n        ],\n        \"members\": {\n          \"SourceStackId\": {},\n          \"Name\": {},\n          \"Region\": {},\n          \"VpcId\": {},\n          \"Attributes\": {\n            \"shape\": \"S8\"\n          },\n          \"ServiceRoleArn\": {},\n          \"DefaultInstanceProfileArn\": {},\n          \"DefaultOs\": {},\n          \"HostnameTheme\": {},\n          \"DefaultAvailabilityZone\": {},\n          \"DefaultSubnetId\": {},\n          \"CustomJson\": {},\n          \"ConfigurationManager\": {\n            \"shape\": \"Sa\"\n          },\n          \"ChefConfiguration\": {\n            \"shape\": \"Sb\"\n          },\n          \"UseCustomCookbooks\": {\n            \"type\": \"boolean\"\n          },\n          \"UseOpsworksSecurityGroups\": {\n            \"type\": \"boolean\"\n          },\n          \"CustomCookbooksSource\": {\n            \"shape\": \"Sd\"\n          },\n          \"DefaultSshKeyName\": {},\n          \"ClonePermissions\": {\n            \"type\": \"boolean\"\n          },\n          \"CloneAppIds\": {\n            \"shape\": \"S3\"\n          },\n          \"DefaultRootDeviceType\": {},\n          \"AgentVersion\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackId\": {}\n        }\n      }\n    },\n    \"CreateApp\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\",\n          \"Name\",\n          \"Type\"\n        ],\n        \"members\": {\n          \"StackId\": {},\n          \"Shortname\": {},\n          \"Name\": {},\n          \"Description\": {},\n          \"DataSources\": {\n            \"shape\": \"Si\"\n          },\n          \"Type\": {},\n          \"AppSource\": {\n            \"shape\": \"Sd\"\n          },\n          \"Domains\": {\n            \"shape\": \"S3\"\n          },\n          \"EnableSsl\": {\n            \"type\": \"boolean\"\n          },\n          \"SslConfiguration\": {\n            \"shape\": \"Sl\"\n          },\n          \"Attributes\": {\n            \"shape\": \"Sm\"\n          },\n          \"Environment\": {\n            \"shape\": \"So\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AppId\": {}\n        }\n      }\n    },\n    \"CreateDeployment\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\",\n          \"Command\"\n        ],\n        \"members\": {\n          \"StackId\": {},\n          \"AppId\": {},\n          \"InstanceIds\": {\n            \"shape\": \"S3\"\n          },\n          \"LayerIds\": {\n            \"shape\": \"S3\"\n          },\n          \"Command\": {\n            \"shape\": \"Ss\"\n          },\n          \"Comment\": {},\n          \"CustomJson\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DeploymentId\": {}\n        }\n      }\n    },\n    \"CreateInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\",\n          \"LayerIds\",\n          \"InstanceType\"\n        ],\n        \"members\": {\n          \"StackId\": {},\n          \"LayerIds\": {\n            \"shape\": \"S3\"\n          },\n          \"InstanceType\": {},\n          \"AutoScalingType\": {},\n          \"Hostname\": {},\n          \"Os\": {},\n          \"AmiId\": {},\n          \"SshKeyName\": {},\n          \"AvailabilityZone\": {},\n          \"VirtualizationType\": {},\n          \"SubnetId\": {},\n          \"Architecture\": {},\n          \"RootDeviceType\": {},\n          \"BlockDeviceMappings\": {\n            \"shape\": \"Sz\"\n          },\n          \"InstallUpdatesOnBoot\": {\n            \"type\": \"boolean\"\n          },\n          \"EbsOptimized\": {\n            \"type\": \"boolean\"\n          },\n          \"AgentVersion\": {},\n          \"Tenancy\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceId\": {}\n        }\n      }\n    },\n    \"CreateLayer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\",\n          \"Type\",\n          \"Name\",\n          \"Shortname\"\n        ],\n        \"members\": {\n          \"StackId\": {},\n          \"Type\": {},\n          \"Name\": {},\n          \"Shortname\": {},\n          \"Attributes\": {\n            \"shape\": \"S17\"\n          },\n          \"CustomInstanceProfileArn\": {},\n          \"CustomJson\": {},\n          \"CustomSecurityGroupIds\": {\n            \"shape\": \"S3\"\n          },\n          \"Packages\": {\n            \"shape\": \"S3\"\n          },\n          \"VolumeConfigurations\": {\n            \"shape\": \"S19\"\n          },\n          \"EnableAutoHealing\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoAssignElasticIps\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoAssignPublicIps\": {\n            \"type\": \"boolean\"\n          },\n          \"CustomRecipes\": {\n            \"shape\": \"S1b\"\n          },\n          \"InstallUpdatesOnBoot\": {\n            \"type\": \"boolean\"\n          },\n          \"UseEbsOptimizedInstances\": {\n            \"type\": \"boolean\"\n          },\n          \"LifecycleEventConfiguration\": {\n            \"shape\": \"S1c\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LayerId\": {}\n        }\n      }\n    },\n    \"CreateStack\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Region\",\n          \"ServiceRoleArn\",\n          \"DefaultInstanceProfileArn\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Region\": {},\n          \"VpcId\": {},\n          \"Attributes\": {\n            \"shape\": \"S8\"\n          },\n          \"ServiceRoleArn\": {},\n          \"DefaultInstanceProfileArn\": {},\n          \"DefaultOs\": {},\n          \"HostnameTheme\": {},\n          \"DefaultAvailabilityZone\": {},\n          \"DefaultSubnetId\": {},\n          \"CustomJson\": {},\n          \"ConfigurationManager\": {\n            \"shape\": \"Sa\"\n          },\n          \"ChefConfiguration\": {\n            \"shape\": \"Sb\"\n          },\n          \"UseCustomCookbooks\": {\n            \"type\": \"boolean\"\n          },\n          \"UseOpsworksSecurityGroups\": {\n            \"type\": \"boolean\"\n          },\n          \"CustomCookbooksSource\": {\n            \"shape\": \"Sd\"\n          },\n          \"DefaultSshKeyName\": {},\n          \"DefaultRootDeviceType\": {},\n          \"AgentVersion\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackId\": {}\n        }\n      }\n    },\n    \"CreateUserProfile\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IamUserArn\"\n        ],\n        \"members\": {\n          \"IamUserArn\": {},\n          \"SshUsername\": {},\n          \"SshPublicKey\": {},\n          \"AllowSelfManagement\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IamUserArn\": {}\n        }\n      }\n    },\n    \"DeleteApp\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AppId\"\n        ],\n        \"members\": {\n          \"AppId\": {}\n        }\n      }\n    },\n    \"DeleteInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {},\n          \"DeleteElasticIp\": {\n            \"type\": \"boolean\"\n          },\n          \"DeleteVolumes\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"DeleteLayer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LayerId\"\n        ],\n        \"members\": {\n          \"LayerId\": {}\n        }\n      }\n    },\n    \"DeleteStack\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\"\n        ],\n        \"members\": {\n          \"StackId\": {}\n        }\n      }\n    },\n    \"DeleteUserProfile\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IamUserArn\"\n        ],\n        \"members\": {\n          \"IamUserArn\": {}\n        }\n      }\n    },\n    \"DeregisterEcsCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EcsClusterArn\"\n        ],\n        \"members\": {\n          \"EcsClusterArn\": {}\n        }\n      }\n    },\n    \"DeregisterElasticIp\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ElasticIp\"\n        ],\n        \"members\": {\n          \"ElasticIp\": {}\n        }\n      }\n    },\n    \"DeregisterInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {}\n        }\n      }\n    },\n    \"DeregisterRdsDbInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RdsDbInstanceArn\"\n        ],\n        \"members\": {\n          \"RdsDbInstanceArn\": {}\n        }\n      }\n    },\n    \"DeregisterVolume\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeId\"\n        ],\n        \"members\": {\n          \"VolumeId\": {}\n        }\n      }\n    },\n    \"DescribeAgentVersions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackId\": {},\n          \"ConfigurationManager\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AgentVersions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Version\": {},\n                \"ConfigurationManager\": {\n                  \"shape\": \"Sa\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeApps\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackId\": {},\n          \"AppIds\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Apps\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"AppId\": {},\n                \"StackId\": {},\n                \"Shortname\": {},\n                \"Name\": {},\n                \"Description\": {},\n                \"DataSources\": {\n                  \"shape\": \"Si\"\n                },\n                \"Type\": {},\n                \"AppSource\": {\n                  \"shape\": \"Sd\"\n                },\n                \"Domains\": {\n                  \"shape\": \"S3\"\n                },\n                \"EnableSsl\": {\n                  \"type\": \"boolean\"\n                },\n                \"SslConfiguration\": {\n                  \"shape\": \"Sl\"\n                },\n                \"Attributes\": {\n                  \"shape\": \"Sm\"\n                },\n                \"CreatedAt\": {},\n                \"Environment\": {\n                  \"shape\": \"So\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeCommands\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DeploymentId\": {},\n          \"InstanceId\": {},\n          \"CommandIds\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Commands\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"CommandId\": {},\n                \"InstanceId\": {},\n                \"DeploymentId\": {},\n                \"CreatedAt\": {},\n                \"AcknowledgedAt\": {},\n                \"CompletedAt\": {},\n                \"Status\": {},\n                \"ExitCode\": {\n                  \"type\": \"integer\"\n                },\n                \"LogUrl\": {},\n                \"Type\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDeployments\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackId\": {},\n          \"AppId\": {},\n          \"DeploymentIds\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Deployments\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"DeploymentId\": {},\n                \"StackId\": {},\n                \"AppId\": {},\n                \"CreatedAt\": {},\n                \"CompletedAt\": {},\n                \"Duration\": {\n                  \"type\": \"integer\"\n                },\n                \"IamUserArn\": {},\n                \"Comment\": {},\n                \"Command\": {\n                  \"shape\": \"Ss\"\n                },\n                \"Status\": {},\n                \"CustomJson\": {},\n                \"InstanceIds\": {\n                  \"shape\": \"S3\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEcsClusters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EcsClusterArns\": {\n            \"shape\": \"S3\"\n          },\n          \"StackId\": {},\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EcsClusters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"EcsClusterArn\": {},\n                \"EcsClusterName\": {},\n                \"StackId\": {},\n                \"RegisteredAt\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeElasticIps\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceId\": {},\n          \"StackId\": {},\n          \"Ips\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ElasticIps\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Ip\": {},\n                \"Name\": {},\n                \"Domain\": {},\n                \"Region\": {},\n                \"InstanceId\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeElasticLoadBalancers\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackId\": {},\n          \"LayerIds\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ElasticLoadBalancers\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ElasticLoadBalancerName\": {},\n                \"Region\": {},\n                \"DnsName\": {},\n                \"StackId\": {},\n                \"LayerId\": {},\n                \"VpcId\": {},\n                \"AvailabilityZones\": {\n                  \"shape\": \"S3\"\n                },\n                \"SubnetIds\": {\n                  \"shape\": \"S3\"\n                },\n                \"Ec2InstanceIds\": {\n                  \"shape\": \"S3\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackId\": {},\n          \"LayerId\": {},\n          \"InstanceIds\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Instances\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"AgentVersion\": {},\n                \"AmiId\": {},\n                \"Architecture\": {},\n                \"AutoScalingType\": {},\n                \"AvailabilityZone\": {},\n                \"BlockDeviceMappings\": {\n                  \"shape\": \"Sz\"\n                },\n                \"CreatedAt\": {},\n                \"EbsOptimized\": {\n                  \"type\": \"boolean\"\n                },\n                \"Ec2InstanceId\": {},\n                \"EcsClusterArn\": {},\n                \"EcsContainerInstanceArn\": {},\n                \"ElasticIp\": {},\n                \"Hostname\": {},\n                \"InfrastructureClass\": {},\n                \"InstallUpdatesOnBoot\": {\n                  \"type\": \"boolean\"\n                },\n                \"InstanceId\": {},\n                \"InstanceProfileArn\": {},\n                \"InstanceType\": {},\n                \"LastServiceErrorId\": {},\n                \"LayerIds\": {\n                  \"shape\": \"S3\"\n                },\n                \"Os\": {},\n                \"Platform\": {},\n                \"PrivateDns\": {},\n                \"PrivateIp\": {},\n                \"PublicDns\": {},\n                \"PublicIp\": {},\n                \"RegisteredBy\": {},\n                \"ReportedAgentVersion\": {},\n                \"ReportedOs\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"Family\": {},\n                    \"Name\": {},\n                    \"Version\": {}\n                  }\n                },\n                \"RootDeviceType\": {},\n                \"RootDeviceVolumeId\": {},\n                \"SecurityGroupIds\": {\n                  \"shape\": \"S3\"\n                },\n                \"SshHostDsaKeyFingerprint\": {},\n                \"SshHostRsaKeyFingerprint\": {},\n                \"SshKeyName\": {},\n                \"StackId\": {},\n                \"Status\": {},\n                \"SubnetId\": {},\n                \"Tenancy\": {},\n                \"VirtualizationType\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeLayers\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackId\": {},\n          \"LayerIds\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Layers\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"StackId\": {},\n                \"LayerId\": {},\n                \"Type\": {},\n                \"Name\": {},\n                \"Shortname\": {},\n                \"Attributes\": {\n                  \"shape\": \"S17\"\n                },\n                \"CustomInstanceProfileArn\": {},\n                \"CustomJson\": {},\n                \"CustomSecurityGroupIds\": {\n                  \"shape\": \"S3\"\n                },\n                \"DefaultSecurityGroupNames\": {\n                  \"shape\": \"S3\"\n                },\n                \"Packages\": {\n                  \"shape\": \"S3\"\n                },\n                \"VolumeConfigurations\": {\n                  \"shape\": \"S19\"\n                },\n                \"EnableAutoHealing\": {\n                  \"type\": \"boolean\"\n                },\n                \"AutoAssignElasticIps\": {\n                  \"type\": \"boolean\"\n                },\n                \"AutoAssignPublicIps\": {\n                  \"type\": \"boolean\"\n                },\n                \"DefaultRecipes\": {\n                  \"shape\": \"S1b\"\n                },\n                \"CustomRecipes\": {\n                  \"shape\": \"S1b\"\n                },\n                \"CreatedAt\": {},\n                \"InstallUpdatesOnBoot\": {\n                  \"type\": \"boolean\"\n                },\n                \"UseEbsOptimizedInstances\": {\n                  \"type\": \"boolean\"\n                },\n                \"LifecycleEventConfiguration\": {\n                  \"shape\": \"S1c\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeLoadBasedAutoScaling\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LayerIds\"\n        ],\n        \"members\": {\n          \"LayerIds\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoadBasedAutoScalingConfigurations\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"LayerId\": {},\n                \"Enable\": {\n                  \"type\": \"boolean\"\n                },\n                \"UpScaling\": {\n                  \"shape\": \"S30\"\n                },\n                \"DownScaling\": {\n                  \"shape\": \"S30\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeMyUserProfile\": {\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserProfile\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"IamUserArn\": {},\n              \"Name\": {},\n              \"SshUsername\": {},\n              \"SshPublicKey\": {}\n            }\n          }\n        }\n      }\n    },\n    \"DescribePermissions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IamUserArn\": {},\n          \"StackId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Permissions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"StackId\": {},\n                \"IamUserArn\": {},\n                \"AllowSsh\": {\n                  \"type\": \"boolean\"\n                },\n                \"AllowSudo\": {\n                  \"type\": \"boolean\"\n                },\n                \"Level\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeRaidArrays\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceId\": {},\n          \"StackId\": {},\n          \"RaidArrayIds\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RaidArrays\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"RaidArrayId\": {},\n                \"InstanceId\": {},\n                \"Name\": {},\n                \"RaidLevel\": {\n                  \"type\": \"integer\"\n                },\n                \"NumberOfDisks\": {\n                  \"type\": \"integer\"\n                },\n                \"Size\": {\n                  \"type\": \"integer\"\n                },\n                \"Device\": {},\n                \"MountPoint\": {},\n                \"AvailabilityZone\": {},\n                \"CreatedAt\": {},\n                \"StackId\": {},\n                \"VolumeType\": {},\n                \"Iops\": {\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeRdsDbInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\"\n        ],\n        \"members\": {\n          \"StackId\": {},\n          \"RdsDbInstanceArns\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RdsDbInstances\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"RdsDbInstanceArn\": {},\n                \"DbInstanceIdentifier\": {},\n                \"DbUser\": {},\n                \"DbPassword\": {},\n                \"Region\": {},\n                \"Address\": {},\n                \"Engine\": {},\n                \"StackId\": {},\n                \"MissingOnRds\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeServiceErrors\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackId\": {},\n          \"InstanceId\": {},\n          \"ServiceErrorIds\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ServiceErrors\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ServiceErrorId\": {},\n                \"StackId\": {},\n                \"InstanceId\": {},\n                \"Type\": {},\n                \"Message\": {},\n                \"CreatedAt\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeStackProvisioningParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\"\n        ],\n        \"members\": {\n          \"StackId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AgentInstallerUrl\": {},\n          \"Parameters\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {}\n          }\n        }\n      }\n    },\n    \"DescribeStackSummary\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\"\n        ],\n        \"members\": {\n          \"StackId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackSummary\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"StackId\": {},\n              \"Name\": {},\n              \"Arn\": {},\n              \"LayersCount\": {\n                \"type\": \"integer\"\n              },\n              \"AppsCount\": {\n                \"type\": \"integer\"\n              },\n              \"InstancesCount\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"Assigning\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Booting\": {\n                    \"type\": \"integer\"\n                  },\n                  \"ConnectionLost\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Deregistering\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Online\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Pending\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Rebooting\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Registered\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Registering\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Requested\": {\n                    \"type\": \"integer\"\n                  },\n                  \"RunningSetup\": {\n                    \"type\": \"integer\"\n                  },\n                  \"SetupFailed\": {\n                    \"type\": \"integer\"\n                  },\n                  \"ShuttingDown\": {\n                    \"type\": \"integer\"\n                  },\n                  \"StartFailed\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Stopped\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Stopping\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Terminated\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Terminating\": {\n                    \"type\": \"integer\"\n                  },\n                  \"Unassigning\": {\n                    \"type\": \"integer\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeStacks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StackIds\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Stacks\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"StackId\": {},\n                \"Name\": {},\n                \"Arn\": {},\n                \"Region\": {},\n                \"VpcId\": {},\n                \"Attributes\": {\n                  \"shape\": \"S8\"\n                },\n                \"ServiceRoleArn\": {},\n                \"DefaultInstanceProfileArn\": {},\n                \"DefaultOs\": {},\n                \"HostnameTheme\": {},\n                \"DefaultAvailabilityZone\": {},\n                \"DefaultSubnetId\": {},\n                \"CustomJson\": {},\n                \"ConfigurationManager\": {\n                  \"shape\": \"Sa\"\n                },\n                \"ChefConfiguration\": {\n                  \"shape\": \"Sb\"\n                },\n                \"UseCustomCookbooks\": {\n                  \"type\": \"boolean\"\n                },\n                \"UseOpsworksSecurityGroups\": {\n                  \"type\": \"boolean\"\n                },\n                \"CustomCookbooksSource\": {\n                  \"shape\": \"Sd\"\n                },\n                \"DefaultSshKeyName\": {},\n                \"CreatedAt\": {},\n                \"DefaultRootDeviceType\": {},\n                \"AgentVersion\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeTimeBasedAutoScaling\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceIds\"\n        ],\n        \"members\": {\n          \"InstanceIds\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TimeBasedAutoScalingConfigurations\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"InstanceId\": {},\n                \"AutoScalingSchedule\": {\n                  \"shape\": \"S40\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeUserProfiles\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IamUserArns\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserProfiles\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"IamUserArn\": {},\n                \"Name\": {},\n                \"SshUsername\": {},\n                \"SshPublicKey\": {},\n                \"AllowSelfManagement\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeVolumes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceId\": {},\n          \"StackId\": {},\n          \"RaidArrayId\": {},\n          \"VolumeIds\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Volumes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"VolumeId\": {},\n                \"Ec2VolumeId\": {},\n                \"Name\": {},\n                \"RaidArrayId\": {},\n                \"InstanceId\": {},\n                \"Status\": {},\n                \"Size\": {\n                  \"type\": \"integer\"\n                },\n                \"Device\": {},\n                \"MountPoint\": {},\n                \"Region\": {},\n                \"AvailabilityZone\": {},\n                \"VolumeType\": {},\n                \"Iops\": {\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DetachElasticLoadBalancer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ElasticLoadBalancerName\",\n          \"LayerId\"\n        ],\n        \"members\": {\n          \"ElasticLoadBalancerName\": {},\n          \"LayerId\": {}\n        }\n      }\n    },\n    \"DisassociateElasticIp\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ElasticIp\"\n        ],\n        \"members\": {\n          \"ElasticIp\": {}\n        }\n      }\n    },\n    \"GetHostnameSuggestion\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LayerId\"\n        ],\n        \"members\": {\n          \"LayerId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LayerId\": {},\n          \"Hostname\": {}\n        }\n      }\n    },\n    \"GrantAccess\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {},\n          \"ValidForInMinutes\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TemporaryCredential\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Username\": {},\n              \"Password\": {},\n              \"ValidForInMinutes\": {\n                \"type\": \"integer\"\n              },\n              \"InstanceId\": {}\n            }\n          }\n        }\n      }\n    },\n    \"RebootInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {}\n        }\n      }\n    },\n    \"RegisterEcsCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EcsClusterArn\",\n          \"StackId\"\n        ],\n        \"members\": {\n          \"EcsClusterArn\": {},\n          \"StackId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EcsClusterArn\": {}\n        }\n      }\n    },\n    \"RegisterElasticIp\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ElasticIp\",\n          \"StackId\"\n        ],\n        \"members\": {\n          \"ElasticIp\": {},\n          \"StackId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ElasticIp\": {}\n        }\n      }\n    },\n    \"RegisterInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\"\n        ],\n        \"members\": {\n          \"StackId\": {},\n          \"Hostname\": {},\n          \"PublicIp\": {},\n          \"PrivateIp\": {},\n          \"RsaPublicKey\": {},\n          \"RsaPublicKeyFingerprint\": {},\n          \"InstanceIdentity\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Document\": {},\n              \"Signature\": {}\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceId\": {}\n        }\n      }\n    },\n    \"RegisterRdsDbInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\",\n          \"RdsDbInstanceArn\",\n          \"DbUser\",\n          \"DbPassword\"\n        ],\n        \"members\": {\n          \"StackId\": {},\n          \"RdsDbInstanceArn\": {},\n          \"DbUser\": {},\n          \"DbPassword\": {}\n        }\n      }\n    },\n    \"RegisterVolume\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\"\n        ],\n        \"members\": {\n          \"Ec2VolumeId\": {},\n          \"StackId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VolumeId\": {}\n        }\n      }\n    },\n    \"SetLoadBasedAutoScaling\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LayerId\"\n        ],\n        \"members\": {\n          \"LayerId\": {},\n          \"Enable\": {\n            \"type\": \"boolean\"\n          },\n          \"UpScaling\": {\n            \"shape\": \"S30\"\n          },\n          \"DownScaling\": {\n            \"shape\": \"S30\"\n          }\n        }\n      }\n    },\n    \"SetPermission\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\",\n          \"IamUserArn\"\n        ],\n        \"members\": {\n          \"StackId\": {},\n          \"IamUserArn\": {},\n          \"AllowSsh\": {\n            \"type\": \"boolean\"\n          },\n          \"AllowSudo\": {\n            \"type\": \"boolean\"\n          },\n          \"Level\": {}\n        }\n      }\n    },\n    \"SetTimeBasedAutoScaling\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {},\n          \"AutoScalingSchedule\": {\n            \"shape\": \"S40\"\n          }\n        }\n      }\n    },\n    \"StartInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {}\n        }\n      }\n    },\n    \"StartStack\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\"\n        ],\n        \"members\": {\n          \"StackId\": {}\n        }\n      }\n    },\n    \"StopInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {}\n        }\n      }\n    },\n    \"StopStack\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\"\n        ],\n        \"members\": {\n          \"StackId\": {}\n        }\n      }\n    },\n    \"UnassignInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {}\n        }\n      }\n    },\n    \"UnassignVolume\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeId\"\n        ],\n        \"members\": {\n          \"VolumeId\": {}\n        }\n      }\n    },\n    \"UpdateApp\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AppId\"\n        ],\n        \"members\": {\n          \"AppId\": {},\n          \"Name\": {},\n          \"Description\": {},\n          \"DataSources\": {\n            \"shape\": \"Si\"\n          },\n          \"Type\": {},\n          \"AppSource\": {\n            \"shape\": \"Sd\"\n          },\n          \"Domains\": {\n            \"shape\": \"S3\"\n          },\n          \"EnableSsl\": {\n            \"type\": \"boolean\"\n          },\n          \"SslConfiguration\": {\n            \"shape\": \"Sl\"\n          },\n          \"Attributes\": {\n            \"shape\": \"Sm\"\n          },\n          \"Environment\": {\n            \"shape\": \"So\"\n          }\n        }\n      }\n    },\n    \"UpdateElasticIp\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ElasticIp\"\n        ],\n        \"members\": {\n          \"ElasticIp\": {},\n          \"Name\": {}\n        }\n      }\n    },\n    \"UpdateInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {},\n          \"LayerIds\": {\n            \"shape\": \"S3\"\n          },\n          \"InstanceType\": {},\n          \"AutoScalingType\": {},\n          \"Hostname\": {},\n          \"Os\": {},\n          \"AmiId\": {},\n          \"SshKeyName\": {},\n          \"Architecture\": {},\n          \"InstallUpdatesOnBoot\": {\n            \"type\": \"boolean\"\n          },\n          \"EbsOptimized\": {\n            \"type\": \"boolean\"\n          },\n          \"AgentVersion\": {}\n        }\n      }\n    },\n    \"UpdateLayer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"LayerId\"\n        ],\n        \"members\": {\n          \"LayerId\": {},\n          \"Name\": {},\n          \"Shortname\": {},\n          \"Attributes\": {\n            \"shape\": \"S17\"\n          },\n          \"CustomInstanceProfileArn\": {},\n          \"CustomJson\": {},\n          \"CustomSecurityGroupIds\": {\n            \"shape\": \"S3\"\n          },\n          \"Packages\": {\n            \"shape\": \"S3\"\n          },\n          \"VolumeConfigurations\": {\n            \"shape\": \"S19\"\n          },\n          \"EnableAutoHealing\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoAssignElasticIps\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoAssignPublicIps\": {\n            \"type\": \"boolean\"\n          },\n          \"CustomRecipes\": {\n            \"shape\": \"S1b\"\n          },\n          \"InstallUpdatesOnBoot\": {\n            \"type\": \"boolean\"\n          },\n          \"UseEbsOptimizedInstances\": {\n            \"type\": \"boolean\"\n          },\n          \"LifecycleEventConfiguration\": {\n            \"shape\": \"S1c\"\n          }\n        }\n      }\n    },\n    \"UpdateMyUserProfile\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SshPublicKey\": {}\n        }\n      }\n    },\n    \"UpdateRdsDbInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RdsDbInstanceArn\"\n        ],\n        \"members\": {\n          \"RdsDbInstanceArn\": {},\n          \"DbUser\": {},\n          \"DbPassword\": {}\n        }\n      }\n    },\n    \"UpdateStack\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StackId\"\n        ],\n        \"members\": {\n          \"StackId\": {},\n          \"Name\": {},\n          \"Attributes\": {\n            \"shape\": \"S8\"\n          },\n          \"ServiceRoleArn\": {},\n          \"DefaultInstanceProfileArn\": {},\n          \"DefaultOs\": {},\n          \"HostnameTheme\": {},\n          \"DefaultAvailabilityZone\": {},\n          \"DefaultSubnetId\": {},\n          \"CustomJson\": {},\n          \"ConfigurationManager\": {\n            \"shape\": \"Sa\"\n          },\n          \"ChefConfiguration\": {\n            \"shape\": \"Sb\"\n          },\n          \"UseCustomCookbooks\": {\n            \"type\": \"boolean\"\n          },\n          \"CustomCookbooksSource\": {\n            \"shape\": \"Sd\"\n          },\n          \"DefaultSshKeyName\": {},\n          \"DefaultRootDeviceType\": {},\n          \"UseOpsworksSecurityGroups\": {\n            \"type\": \"boolean\"\n          },\n          \"AgentVersion\": {}\n        }\n      }\n    },\n    \"UpdateUserProfile\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IamUserArn\"\n        ],\n        \"members\": {\n          \"IamUserArn\": {},\n          \"SshUsername\": {},\n          \"SshPublicKey\": {},\n          \"AllowSelfManagement\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"UpdateVolume\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeId\"\n        ],\n        \"members\": {\n          \"VolumeId\": {},\n          \"Name\": {},\n          \"MountPoint\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S3\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S8\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"Sa\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Name\": {},\n        \"Version\": {}\n      }\n    },\n    \"Sb\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ManageBerkshelf\": {\n          \"type\": \"boolean\"\n        },\n        \"BerkshelfVersion\": {}\n      }\n    },\n    \"Sd\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Type\": {},\n        \"Url\": {},\n        \"Username\": {},\n        \"Password\": {},\n        \"SshKey\": {},\n        \"Revision\": {}\n      }\n    },\n    \"Si\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Type\": {},\n          \"Arn\": {},\n          \"DatabaseName\": {}\n        }\n      }\n    },\n    \"Sl\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Certificate\",\n        \"PrivateKey\"\n      ],\n      \"members\": {\n        \"Certificate\": {},\n        \"PrivateKey\": {},\n        \"Chain\": {}\n      }\n    },\n    \"Sm\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"So\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Key\",\n          \"Value\"\n        ],\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {},\n          \"Secure\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"Ss\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Name\"\n      ],\n      \"members\": {\n        \"Name\": {},\n        \"Args\": {\n          \"type\": \"map\",\n          \"key\": {},\n          \"value\": {\n            \"shape\": \"S3\"\n          }\n        }\n      }\n    },\n    \"Sz\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DeviceName\": {},\n          \"NoDevice\": {},\n          \"VirtualName\": {},\n          \"Ebs\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"SnapshotId\": {},\n              \"Iops\": {\n                \"type\": \"integer\"\n              },\n              \"VolumeSize\": {\n                \"type\": \"integer\"\n              },\n              \"VolumeType\": {},\n              \"DeleteOnTermination\": {\n                \"type\": \"boolean\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S17\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S19\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"MountPoint\",\n          \"NumberOfDisks\",\n          \"Size\"\n        ],\n        \"members\": {\n          \"MountPoint\": {},\n          \"RaidLevel\": {\n            \"type\": \"integer\"\n          },\n          \"NumberOfDisks\": {\n            \"type\": \"integer\"\n          },\n          \"Size\": {\n            \"type\": \"integer\"\n          },\n          \"VolumeType\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"S1b\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Setup\": {\n          \"shape\": \"S3\"\n        },\n        \"Configure\": {\n          \"shape\": \"S3\"\n        },\n        \"Deploy\": {\n          \"shape\": \"S3\"\n        },\n        \"Undeploy\": {\n          \"shape\": \"S3\"\n        },\n        \"Shutdown\": {\n          \"shape\": \"S3\"\n        }\n      }\n    },\n    \"S1c\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Shutdown\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"ExecutionTimeout\": {\n              \"type\": \"integer\"\n            },\n            \"DelayUntilElbConnectionsDrained\": {\n              \"type\": \"boolean\"\n            }\n          }\n        }\n      }\n    },\n    \"S30\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"InstanceCount\": {\n          \"type\": \"integer\"\n        },\n        \"ThresholdsWaitTime\": {\n          \"type\": \"integer\"\n        },\n        \"IgnoreMetricsTime\": {\n          \"type\": \"integer\"\n        },\n        \"CpuThreshold\": {\n          \"type\": \"double\"\n        },\n        \"MemoryThreshold\": {\n          \"type\": \"double\"\n        },\n        \"LoadThreshold\": {\n          \"type\": \"double\"\n        },\n        \"Alarms\": {\n          \"shape\": \"S3\"\n        }\n      }\n    },\n    \"S40\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Monday\": {\n          \"shape\": \"S41\"\n        },\n        \"Tuesday\": {\n          \"shape\": \"S41\"\n        },\n        \"Wednesday\": {\n          \"shape\": \"S41\"\n        },\n        \"Thursday\": {\n          \"shape\": \"S41\"\n        },\n        \"Friday\": {\n          \"shape\": \"S41\"\n        },\n        \"Saturday\": {\n          \"shape\": \"S41\"\n        },\n        \"Sunday\": {\n          \"shape\": \"S41\"\n        }\n      }\n    },\n    \"S41\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    }\n  }\n}\n},{}],96:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeApps\": {\n      \"result_key\": \"Apps\"\n    },\n    \"DescribeCommands\": {\n      \"result_key\": \"Commands\"\n    },\n    \"DescribeDeployments\": {\n      \"result_key\": \"Deployments\"\n    },\n    \"DescribeEcsClusters\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"result_key\": \"EcsClusters\"\n    },\n    \"DescribeElasticIps\": {\n      \"result_key\": \"ElasticIps\"\n    },\n    \"DescribeElasticLoadBalancers\": {\n      \"result_key\": \"ElasticLoadBalancers\"\n    },\n    \"DescribeInstances\": {\n      \"result_key\": \"Instances\"\n    },\n    \"DescribeLayers\": {\n      \"result_key\": \"Layers\"\n    },\n    \"DescribeLoadBasedAutoScaling\": {\n      \"result_key\": \"LoadBasedAutoScalingConfigurations\"\n    },\n    \"DescribePermissions\": {\n      \"result_key\": \"Permissions\"\n    },\n    \"DescribeRaidArrays\": {\n      \"result_key\": \"RaidArrays\"\n    },\n    \"DescribeServiceErrors\": {\n      \"result_key\": \"ServiceErrors\"\n    },\n    \"DescribeStacks\": {\n      \"result_key\": \"Stacks\"\n    },\n    \"DescribeTimeBasedAutoScaling\": {\n      \"result_key\": \"TimeBasedAutoScalingConfigurations\"\n    },\n    \"DescribeUserProfiles\": {\n      \"result_key\": \"UserProfiles\"\n    },\n    \"DescribeVolumes\": {\n      \"result_key\": \"Volumes\"\n    }\n  }\n}\n\n},{}],97:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"AppExists\": {\n      \"delay\": 1,\n      \"operation\": \"DescribeApps\",\n      \"maxAttempts\": 40,\n      \"acceptors\": [\n        {\n          \"expected\": 200,\n          \"matcher\": \"status\",\n          \"state\": \"success\"\n        },\n        {\n          \"matcher\": \"status\",\n          \"expected\": 400,\n          \"state\": \"failure\"\n        }\n      ]\n    },\n    \"DeploymentSuccessful\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeDeployments\",\n      \"maxAttempts\": 40,\n      \"description\": \"Wait until a deployment has completed successfully\",\n      \"acceptors\": [\n        {\n          \"expected\": \"successful\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Deployments[].Status\"\n        },\n        {\n          \"expected\": \"failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Deployments[].Status\"\n        }\n      ]\n    },\n    \"InstanceOnline\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeInstances\",\n      \"maxAttempts\": 40,\n      \"description\": \"Wait until OpsWorks instance is online.\",\n      \"acceptors\": [\n        {\n          \"expected\": \"online\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"setup_failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"shutting_down\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"start_failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"stopped\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"stopping\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"terminating\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"terminated\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"stop_failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        }\n      ]\n    },\n    \"InstanceRegistered\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeInstances\",\n      \"maxAttempts\": 40,\n      \"description\": \"Wait until OpsWorks instance is registered.\",\n      \"acceptors\": [\n        {\n          \"expected\": \"registered\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"setup_failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"shutting_down\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"stopped\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"stopping\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"terminating\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"terminated\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"stop_failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        }\n      ]\n    },\n    \"InstanceStopped\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeInstances\",\n      \"maxAttempts\": 40,\n      \"description\": \"Wait until OpsWorks instance is stopped.\",\n      \"acceptors\": [\n        {\n          \"expected\": \"stopped\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"booting\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"online\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"pending\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"rebooting\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"requested\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"running_setup\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"setup_failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"start_failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"stop_failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        }\n      ]\n    },\n    \"InstanceTerminated\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeInstances\",\n      \"maxAttempts\": 40,\n      \"description\": \"Wait until OpsWorks instance is terminated.\",\n      \"acceptors\": [\n        {\n          \"expected\": \"terminated\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"ResourceNotFoundException\",\n          \"matcher\": \"error\",\n          \"state\": \"success\"\n        },\n        {\n          \"expected\": \"booting\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"online\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"pending\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"rebooting\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"requested\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"running_setup\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"setup_failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        },\n        {\n          \"expected\": \"start_failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Instances[].Status\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],98:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2016-06-10\",\n    \"endpointPrefix\": \"polly\",\n    \"protocol\": \"rest-json\",\n    \"serviceFullName\": \"Amazon Polly\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"polly-2016-06-10\"\n  },\n  \"operations\": {\n    \"DeleteLexicon\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/v1/lexicons/{LexiconName}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {\n            \"shape\": \"S2\",\n            \"location\": \"uri\",\n            \"locationName\": \"LexiconName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DescribeVoices\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/v1/voices\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LanguageCode\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"LanguageCode\"\n          },\n          \"NextToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"NextToken\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Voices\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Gender\": {},\n                \"Id\": {},\n                \"LanguageCode\": {},\n                \"LanguageName\": {},\n                \"Name\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"GetLexicon\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/v1/lexicons/{LexiconName}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {\n            \"shape\": \"S2\",\n            \"location\": \"uri\",\n            \"locationName\": \"LexiconName\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Lexicon\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Content\": {},\n              \"Name\": {\n                \"shape\": \"S2\"\n              }\n            }\n          },\n          \"LexiconAttributes\": {\n            \"shape\": \"Si\"\n          }\n        }\n      }\n    },\n    \"ListLexicons\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/v1/lexicons\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"NextToken\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Lexicons\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {\n                  \"shape\": \"S2\"\n                },\n                \"Attributes\": {\n                  \"shape\": \"Si\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"PutLexicon\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/v1/lexicons/{LexiconName}\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Content\"\n        ],\n        \"members\": {\n          \"Name\": {\n            \"shape\": \"S2\",\n            \"location\": \"uri\",\n            \"locationName\": \"LexiconName\"\n          },\n          \"Content\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SynthesizeSpeech\": {\n      \"http\": {\n        \"requestUri\": \"/v1/speech\",\n        \"responseCode\": 200\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OutputFormat\",\n          \"Text\",\n          \"VoiceId\"\n        ],\n        \"members\": {\n          \"LexiconNames\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S2\"\n            }\n          },\n          \"OutputFormat\": {},\n          \"SampleRate\": {},\n          \"Text\": {},\n          \"TextType\": {},\n          \"VoiceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AudioStream\": {\n            \"type\": \"blob\",\n            \"streaming\": true\n          },\n          \"ContentType\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Type\"\n          },\n          \"RequestCharacters\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amzn-RequestCharacters\",\n            \"type\": \"integer\"\n          }\n        },\n        \"payload\": \"AudioStream\"\n      }\n    }\n  },\n  \"shapes\": {\n    \"S2\": {\n      \"type\": \"string\",\n      \"sensitive\": true\n    },\n    \"Si\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Alphabet\": {},\n        \"LanguageCode\": {},\n        \"LastModified\": {\n          \"type\": \"timestamp\"\n        },\n        \"LexiconArn\": {},\n        \"LexemesCount\": {\n          \"type\": \"integer\"\n        },\n        \"Size\": {\n          \"type\": \"integer\"\n        }\n      }\n    }\n  }\n}\n},{}],99:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2013-01-10\",\n    \"endpointPrefix\": \"rds\",\n    \"protocol\": \"query\",\n    \"serviceAbbreviation\": \"Amazon RDS\",\n    \"serviceFullName\": \"Amazon Relational Database Service\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"rds-2013-01-10\",\n    \"xmlNamespace\": \"http://rds.amazonaws.com/doc/2013-01-10/\"\n  },\n  \"operations\": {\n    \"AddSourceIdentifierToSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\",\n          \"SourceIdentifier\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SourceIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AddSourceIdentifierToSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"AddTagsToResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"ResourceName\": {},\n          \"Tags\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"AuthorizeDBSecurityGroupIngress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"CIDRIP\": {},\n          \"EC2SecurityGroupName\": {},\n          \"EC2SecurityGroupId\": {},\n          \"EC2SecurityGroupOwnerId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AuthorizeDBSecurityGroupIngressResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroup\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"CopyDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceDBSnapshotIdentifier\",\n          \"TargetDBSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"SourceDBSnapshotIdentifier\": {},\n          \"TargetDBSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CopyDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshot\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      }\n    },\n    \"CreateDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"AllocatedStorage\",\n          \"DBInstanceClass\",\n          \"Engine\",\n          \"MasterUsername\",\n          \"MasterUserPassword\"\n        ],\n        \"members\": {\n          \"DBName\": {},\n          \"DBInstanceIdentifier\": {},\n          \"AllocatedStorage\": {\n            \"type\": \"integer\"\n          },\n          \"DBInstanceClass\": {},\n          \"Engine\": {},\n          \"MasterUsername\": {},\n          \"MasterUserPassword\": {},\n          \"DBSecurityGroups\": {\n            \"shape\": \"Sp\"\n          },\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"Sq\"\n          },\n          \"AvailabilityZone\": {},\n          \"DBSubnetGroupName\": {},\n          \"PreferredMaintenanceWindow\": {},\n          \"DBParameterGroupName\": {},\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PreferredBackupWindow\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"EngineVersion\": {},\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"LicenseModel\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"CharacterSetName\": {},\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"CreateDBInstanceReadReplica\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"SourceDBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"SourceDBInstanceIdentifier\": {},\n          \"DBInstanceClass\": {},\n          \"AvailabilityZone\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBInstanceReadReplicaResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"CreateDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\",\n          \"DBParameterGroupFamily\",\n          \"Description\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"DBParameterGroupFamily\": {},\n          \"Description\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBParameterGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBParameterGroup\": {\n            \"shape\": \"S1c\"\n          }\n        }\n      }\n    },\n    \"CreateDBSecurityGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\",\n          \"DBSecurityGroupDescription\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"DBSecurityGroupDescription\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBSecurityGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroup\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"CreateDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSnapshotIdentifier\",\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBSnapshotIdentifier\": {},\n          \"DBInstanceIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshot\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      }\n    },\n    \"CreateDBSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSubnetGroupName\",\n          \"DBSubnetGroupDescription\",\n          \"SubnetIds\"\n        ],\n        \"members\": {\n          \"DBSubnetGroupName\": {},\n          \"DBSubnetGroupDescription\": {},\n          \"SubnetIds\": {\n            \"shape\": \"S1i\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBSubnetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSubnetGroup\": {\n            \"shape\": \"S11\"\n          }\n        }\n      }\n    },\n    \"CreateEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\",\n          \"SnsTopicArn\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SnsTopicArn\": {},\n          \"SourceType\": {},\n          \"EventCategories\": {\n            \"shape\": \"S6\"\n          },\n          \"SourceIds\": {\n            \"shape\": \"S5\"\n          },\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateEventSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"CreateOptionGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OptionGroupName\",\n          \"EngineName\",\n          \"MajorEngineVersion\",\n          \"OptionGroupDescription\"\n        ],\n        \"members\": {\n          \"OptionGroupName\": {},\n          \"EngineName\": {},\n          \"MajorEngineVersion\": {},\n          \"OptionGroupDescription\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateOptionGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroup\": {\n            \"shape\": \"S1o\"\n          }\n        }\n      }\n    },\n    \"DeleteDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"SkipFinalSnapshot\": {\n            \"type\": \"boolean\"\n          },\n          \"FinalDBSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"DeleteDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {}\n        }\n      }\n    },\n    \"DeleteDBSecurityGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {}\n        }\n      }\n    },\n    \"DeleteDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"DBSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshot\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      }\n    },\n    \"DeleteDBSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSubnetGroupName\"\n        ],\n        \"members\": {\n          \"DBSubnetGroupName\": {}\n        }\n      }\n    },\n    \"DeleteEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteEventSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"DeleteOptionGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OptionGroupName\"\n        ],\n        \"members\": {\n          \"OptionGroupName\": {}\n        }\n      }\n    },\n    \"DescribeDBEngineVersions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Engine\": {},\n          \"EngineVersion\": {},\n          \"DBParameterGroupFamily\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"DefaultOnly\": {\n            \"type\": \"boolean\"\n          },\n          \"ListSupportedCharacterSets\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBEngineVersionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBEngineVersions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"DBEngineVersion\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Engine\": {},\n                \"EngineVersion\": {},\n                \"DBParameterGroupFamily\": {},\n                \"DBEngineDescription\": {},\n                \"DBEngineVersionDescription\": {},\n                \"DefaultCharacterSet\": {\n                  \"shape\": \"S25\"\n                },\n                \"SupportedCharacterSets\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"shape\": \"S25\",\n                    \"locationName\": \"CharacterSet\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBInstancesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBInstances\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"St\",\n              \"locationName\": \"DBInstance\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBParameterGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBParameterGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBParameterGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1c\",\n              \"locationName\": \"DBParameterGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"Source\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBParametersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Parameters\": {\n            \"shape\": \"S2f\"\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeDBSecurityGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBSecurityGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBSecurityGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sd\",\n              \"locationName\": \"DBSecurityGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBSnapshots\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"DBSnapshotIdentifier\": {},\n          \"SnapshotType\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBSnapshotsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBSnapshots\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sk\",\n              \"locationName\": \"DBSnapshot\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBSubnetGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSubnetGroupName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBSubnetGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBSubnetGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S11\",\n              \"locationName\": \"DBSubnetGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEngineDefaultParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupFamily\"\n        ],\n        \"members\": {\n          \"DBParameterGroupFamily\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEngineDefaultParametersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EngineDefaults\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"DBParameterGroupFamily\": {},\n              \"Marker\": {},\n              \"Parameters\": {\n                \"shape\": \"S2f\"\n              }\n            },\n            \"wrapper\": true\n          }\n        }\n      }\n    },\n    \"DescribeEventCategories\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SourceType\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventCategoriesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventCategoriesMapList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"EventCategoriesMap\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"SourceType\": {},\n                \"EventCategories\": {\n                  \"shape\": \"S6\"\n                }\n              },\n              \"wrapper\": true\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEventSubscriptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventSubscriptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"EventSubscriptionsList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4\",\n              \"locationName\": \"EventSubscription\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEvents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SourceIdentifier\": {},\n          \"SourceType\": {},\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"Duration\": {\n            \"type\": \"integer\"\n          },\n          \"EventCategories\": {\n            \"shape\": \"S6\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"Events\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Event\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"SourceIdentifier\": {},\n                \"SourceType\": {},\n                \"Message\": {},\n                \"EventCategories\": {\n                  \"shape\": \"S6\"\n                },\n                \"Date\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeOptionGroupOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EngineName\"\n        ],\n        \"members\": {\n          \"EngineName\": {},\n          \"MajorEngineVersion\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeOptionGroupOptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroupOptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"OptionGroupOption\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Description\": {},\n                \"EngineName\": {},\n                \"MajorEngineVersion\": {},\n                \"MinimumRequiredMinorEngineVersion\": {},\n                \"PortRequired\": {\n                  \"type\": \"boolean\"\n                },\n                \"DefaultPort\": {\n                  \"type\": \"integer\"\n                },\n                \"OptionsDependedOn\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"OptionName\"\n                  }\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeOptionGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroupName\": {},\n          \"Marker\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"EngineName\": {},\n          \"MajorEngineVersion\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeOptionGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroupsList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1o\",\n              \"locationName\": \"OptionGroup\"\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeOrderableDBInstanceOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Engine\"\n        ],\n        \"members\": {\n          \"Engine\": {},\n          \"EngineVersion\": {},\n          \"DBInstanceClass\": {},\n          \"LicenseModel\": {},\n          \"Vpc\": {\n            \"type\": \"boolean\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeOrderableDBInstanceOptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OrderableDBInstanceOptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"OrderableDBInstanceOption\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Engine\": {},\n                \"EngineVersion\": {},\n                \"DBInstanceClass\": {},\n                \"LicenseModel\": {},\n                \"AvailabilityZones\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"shape\": \"S14\",\n                    \"locationName\": \"AvailabilityZone\"\n                  }\n                },\n                \"MultiAZCapable\": {\n                  \"type\": \"boolean\"\n                },\n                \"ReadReplicaCapable\": {\n                  \"type\": \"boolean\"\n                },\n                \"Vpc\": {\n                  \"type\": \"boolean\"\n                }\n              },\n              \"wrapper\": true\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeReservedDBInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedDBInstanceId\": {},\n          \"ReservedDBInstancesOfferingId\": {},\n          \"DBInstanceClass\": {},\n          \"Duration\": {},\n          \"ProductDescription\": {},\n          \"OfferingType\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReservedDBInstancesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ReservedDBInstances\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S3m\",\n              \"locationName\": \"ReservedDBInstance\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeReservedDBInstancesOfferings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedDBInstancesOfferingId\": {},\n          \"DBInstanceClass\": {},\n          \"Duration\": {},\n          \"ProductDescription\": {},\n          \"OfferingType\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReservedDBInstancesOfferingsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ReservedDBInstancesOfferings\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ReservedDBInstancesOffering\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ReservedDBInstancesOfferingId\": {},\n                \"DBInstanceClass\": {},\n                \"Duration\": {\n                  \"type\": \"integer\"\n                },\n                \"FixedPrice\": {\n                  \"type\": \"double\"\n                },\n                \"UsagePrice\": {\n                  \"type\": \"double\"\n                },\n                \"CurrencyCode\": {},\n                \"ProductDescription\": {},\n                \"OfferingType\": {},\n                \"MultiAZ\": {\n                  \"type\": \"boolean\"\n                },\n                \"RecurringCharges\": {\n                  \"shape\": \"S3o\"\n                }\n              },\n              \"wrapper\": true\n            }\n          }\n        }\n      }\n    },\n    \"ListTagsForResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\"\n        ],\n        \"members\": {\n          \"ResourceName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListTagsForResourceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TagList\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"ModifyDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"AllocatedStorage\": {\n            \"type\": \"integer\"\n          },\n          \"DBInstanceClass\": {},\n          \"DBSecurityGroups\": {\n            \"shape\": \"Sp\"\n          },\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"Sq\"\n          },\n          \"ApplyImmediately\": {\n            \"type\": \"boolean\"\n          },\n          \"MasterUserPassword\": {},\n          \"DBParameterGroupName\": {},\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PreferredBackupWindow\": {},\n          \"PreferredMaintenanceWindow\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"EngineVersion\": {},\n          \"AllowMajorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"NewDBInstanceIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"ModifyDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\",\n          \"Parameters\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"Parameters\": {\n            \"shape\": \"S2f\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S3z\",\n        \"resultWrapper\": \"ModifyDBParameterGroupResult\"\n      }\n    },\n    \"ModifyDBSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSubnetGroupName\",\n          \"SubnetIds\"\n        ],\n        \"members\": {\n          \"DBSubnetGroupName\": {},\n          \"DBSubnetGroupDescription\": {},\n          \"SubnetIds\": {\n            \"shape\": \"S1i\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyDBSubnetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSubnetGroup\": {\n            \"shape\": \"S11\"\n          }\n        }\n      }\n    },\n    \"ModifyEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SnsTopicArn\": {},\n          \"SourceType\": {},\n          \"EventCategories\": {\n            \"shape\": \"S6\"\n          },\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyEventSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"ModifyOptionGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OptionGroupName\"\n        ],\n        \"members\": {\n          \"OptionGroupName\": {},\n          \"OptionsToInclude\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"OptionConfiguration\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"OptionName\"\n              ],\n              \"members\": {\n                \"OptionName\": {},\n                \"Port\": {\n                  \"type\": \"integer\"\n                },\n                \"DBSecurityGroupMemberships\": {\n                  \"shape\": \"Sp\"\n                },\n                \"VpcSecurityGroupMemberships\": {\n                  \"shape\": \"Sq\"\n                }\n              }\n            }\n          },\n          \"OptionsToRemove\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"ApplyImmediately\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyOptionGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroup\": {\n            \"shape\": \"S1o\"\n          }\n        }\n      }\n    },\n    \"PromoteReadReplica\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PreferredBackupWindow\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PromoteReadReplicaResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"PurchaseReservedDBInstancesOffering\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReservedDBInstancesOfferingId\"\n        ],\n        \"members\": {\n          \"ReservedDBInstancesOfferingId\": {},\n          \"ReservedDBInstanceId\": {},\n          \"DBInstanceCount\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PurchaseReservedDBInstancesOfferingResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedDBInstance\": {\n            \"shape\": \"S3m\"\n          }\n        }\n      }\n    },\n    \"RebootDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"ForceFailover\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RebootDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"RemoveSourceIdentifierFromSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\",\n          \"SourceIdentifier\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SourceIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RemoveSourceIdentifierFromSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"RemoveTagsFromResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\",\n          \"TagKeys\"\n        ],\n        \"members\": {\n          \"ResourceName\": {},\n          \"TagKeys\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"ResetDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"ResetAllParameters\": {\n            \"type\": \"boolean\"\n          },\n          \"Parameters\": {\n            \"shape\": \"S2f\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S3z\",\n        \"resultWrapper\": \"ResetDBParameterGroupResult\"\n      }\n    },\n    \"RestoreDBInstanceFromDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"DBSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"DBSnapshotIdentifier\": {},\n          \"DBInstanceClass\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"AvailabilityZone\": {},\n          \"DBSubnetGroupName\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"LicenseModel\": {},\n          \"DBName\": {},\n          \"Engine\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RestoreDBInstanceFromDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"RestoreDBInstanceToPointInTime\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceDBInstanceIdentifier\",\n          \"TargetDBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"SourceDBInstanceIdentifier\": {},\n          \"TargetDBInstanceIdentifier\": {},\n          \"RestoreTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"UseLatestRestorableTime\": {\n            \"type\": \"boolean\"\n          },\n          \"DBInstanceClass\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"AvailabilityZone\": {},\n          \"DBSubnetGroupName\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"LicenseModel\": {},\n          \"DBName\": {},\n          \"Engine\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RestoreDBInstanceToPointInTimeResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"RevokeDBSecurityGroupIngress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"CIDRIP\": {},\n          \"EC2SecurityGroupName\": {},\n          \"EC2SecurityGroupId\": {},\n          \"EC2SecurityGroupOwnerId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RevokeDBSecurityGroupIngressResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroup\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S4\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Id\": {},\n        \"CustomerAwsId\": {},\n        \"CustSubscriptionId\": {},\n        \"SnsTopicArn\": {},\n        \"Status\": {},\n        \"SubscriptionCreationTime\": {},\n        \"SourceType\": {},\n        \"SourceIdsList\": {\n          \"shape\": \"S5\"\n        },\n        \"EventCategoriesList\": {\n          \"shape\": \"S6\"\n        },\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S5\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SourceId\"\n      }\n    },\n    \"S6\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"EventCategory\"\n      }\n    },\n    \"S9\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Tag\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"Sd\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"OwnerId\": {},\n        \"DBSecurityGroupName\": {},\n        \"DBSecurityGroupDescription\": {},\n        \"VpcId\": {},\n        \"EC2SecurityGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"EC2SecurityGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Status\": {},\n              \"EC2SecurityGroupName\": {},\n              \"EC2SecurityGroupId\": {},\n              \"EC2SecurityGroupOwnerId\": {}\n            }\n          }\n        },\n        \"IPRanges\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"IPRange\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Status\": {},\n              \"CIDRIP\": {}\n            }\n          }\n        }\n      },\n      \"wrapper\": true\n    },\n    \"Sk\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBSnapshotIdentifier\": {},\n        \"DBInstanceIdentifier\": {},\n        \"SnapshotCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Engine\": {},\n        \"AllocatedStorage\": {\n          \"type\": \"integer\"\n        },\n        \"Status\": {},\n        \"Port\": {\n          \"type\": \"integer\"\n        },\n        \"AvailabilityZone\": {},\n        \"VpcId\": {},\n        \"InstanceCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"MasterUsername\": {},\n        \"EngineVersion\": {},\n        \"LicenseModel\": {},\n        \"SnapshotType\": {},\n        \"Iops\": {\n          \"type\": \"integer\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"Sp\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"DBSecurityGroupName\"\n      }\n    },\n    \"Sq\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"VpcSecurityGroupId\"\n      }\n    },\n    \"St\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBInstanceIdentifier\": {},\n        \"DBInstanceClass\": {},\n        \"Engine\": {},\n        \"DBInstanceStatus\": {},\n        \"MasterUsername\": {},\n        \"DBName\": {},\n        \"Endpoint\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Address\": {},\n            \"Port\": {\n              \"type\": \"integer\"\n            }\n          }\n        },\n        \"AllocatedStorage\": {\n          \"type\": \"integer\"\n        },\n        \"InstanceCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"PreferredBackupWindow\": {},\n        \"BackupRetentionPeriod\": {\n          \"type\": \"integer\"\n        },\n        \"DBSecurityGroups\": {\n          \"shape\": \"Sv\"\n        },\n        \"VpcSecurityGroups\": {\n          \"shape\": \"Sx\"\n        },\n        \"DBParameterGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"DBParameterGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"DBParameterGroupName\": {},\n              \"ParameterApplyStatus\": {}\n            }\n          }\n        },\n        \"AvailabilityZone\": {},\n        \"DBSubnetGroup\": {\n          \"shape\": \"S11\"\n        },\n        \"PreferredMaintenanceWindow\": {},\n        \"PendingModifiedValues\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"DBInstanceClass\": {},\n            \"AllocatedStorage\": {\n              \"type\": \"integer\"\n            },\n            \"MasterUserPassword\": {},\n            \"Port\": {\n              \"type\": \"integer\"\n            },\n            \"BackupRetentionPeriod\": {\n              \"type\": \"integer\"\n            },\n            \"MultiAZ\": {\n              \"type\": \"boolean\"\n            },\n            \"EngineVersion\": {},\n            \"Iops\": {\n              \"type\": \"integer\"\n            },\n            \"DBInstanceIdentifier\": {}\n          }\n        },\n        \"LatestRestorableTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"MultiAZ\": {\n          \"type\": \"boolean\"\n        },\n        \"EngineVersion\": {},\n        \"AutoMinorVersionUpgrade\": {\n          \"type\": \"boolean\"\n        },\n        \"ReadReplicaSourceDBInstanceIdentifier\": {},\n        \"ReadReplicaDBInstanceIdentifiers\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"ReadReplicaDBInstanceIdentifier\"\n          }\n        },\n        \"LicenseModel\": {},\n        \"Iops\": {\n          \"type\": \"integer\"\n        },\n        \"OptionGroupMembership\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"OptionGroupName\": {},\n            \"Status\": {}\n          }\n        },\n        \"CharacterSetName\": {},\n        \"SecondaryAvailabilityZone\": {},\n        \"PubliclyAccessible\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"Sv\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"DBSecurityGroup\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"Status\": {}\n        }\n      }\n    },\n    \"Sx\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"VpcSecurityGroupMembership\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcSecurityGroupId\": {},\n          \"Status\": {}\n        }\n      }\n    },\n    \"S11\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBSubnetGroupName\": {},\n        \"DBSubnetGroupDescription\": {},\n        \"VpcId\": {},\n        \"SubnetGroupStatus\": {},\n        \"Subnets\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Subnet\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"SubnetIdentifier\": {},\n              \"SubnetAvailabilityZone\": {\n                \"shape\": \"S14\"\n              },\n              \"SubnetStatus\": {}\n            }\n          }\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S14\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Name\": {},\n        \"ProvisionedIopsCapable\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S1c\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBParameterGroupName\": {},\n        \"DBParameterGroupFamily\": {},\n        \"Description\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S1i\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SubnetIdentifier\"\n      }\n    },\n    \"S1o\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"OptionGroupName\": {},\n        \"OptionGroupDescription\": {},\n        \"EngineName\": {},\n        \"MajorEngineVersion\": {},\n        \"Options\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Option\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"OptionName\": {},\n              \"OptionDescription\": {},\n              \"Port\": {\n                \"type\": \"integer\"\n              },\n              \"DBSecurityGroupMemberships\": {\n                \"shape\": \"Sv\"\n              },\n              \"VpcSecurityGroupMemberships\": {\n                \"shape\": \"Sx\"\n              }\n            }\n          }\n        },\n        \"AllowsVpcAndNonVpcInstanceMemberships\": {\n          \"type\": \"boolean\"\n        },\n        \"VpcId\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S25\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CharacterSetName\": {},\n        \"CharacterSetDescription\": {}\n      }\n    },\n    \"S2f\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Parameter\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ParameterName\": {},\n          \"ParameterValue\": {},\n          \"Description\": {},\n          \"Source\": {},\n          \"ApplyType\": {},\n          \"DataType\": {},\n          \"AllowedValues\": {},\n          \"IsModifiable\": {\n            \"type\": \"boolean\"\n          },\n          \"MinimumEngineVersion\": {},\n          \"ApplyMethod\": {}\n        }\n      }\n    },\n    \"S3m\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ReservedDBInstanceId\": {},\n        \"ReservedDBInstancesOfferingId\": {},\n        \"DBInstanceClass\": {},\n        \"StartTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Duration\": {\n          \"type\": \"integer\"\n        },\n        \"FixedPrice\": {\n          \"type\": \"double\"\n        },\n        \"UsagePrice\": {\n          \"type\": \"double\"\n        },\n        \"CurrencyCode\": {},\n        \"DBInstanceCount\": {\n          \"type\": \"integer\"\n        },\n        \"ProductDescription\": {},\n        \"OfferingType\": {},\n        \"MultiAZ\": {\n          \"type\": \"boolean\"\n        },\n        \"State\": {},\n        \"RecurringCharges\": {\n          \"shape\": \"S3o\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S3o\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"RecurringCharge\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"RecurringChargeAmount\": {\n            \"type\": \"double\"\n          },\n          \"RecurringChargeFrequency\": {}\n        },\n        \"wrapper\": true\n      }\n    },\n    \"S3z\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBParameterGroupName\": {}\n      }\n    }\n  }\n}\n},{}],100:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeDBEngineVersions\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"DBEngineVersions\"\n    },\n    \"DescribeDBInstances\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"DBInstances\"\n    },\n    \"DescribeDBParameterGroups\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"DBParameterGroups\"\n    },\n    \"DescribeDBParameters\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"Parameters\"\n    },\n    \"DescribeDBSecurityGroups\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"DBSecurityGroups\"\n    },\n    \"DescribeDBSnapshots\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"DBSnapshots\"\n    },\n    \"DescribeDBSubnetGroups\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"DBSubnetGroups\"\n    },\n    \"DescribeEngineDefaultParameters\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"EngineDefaults.Marker\",\n      \"result_key\": \"EngineDefaults.Parameters\"\n    },\n    \"DescribeEventSubscriptions\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"EventSubscriptionsList\"\n    },\n    \"DescribeEvents\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"Events\"\n    },\n    \"DescribeOptionGroupOptions\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"OptionGroupOptions\"\n    },\n    \"DescribeOptionGroups\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"OptionGroupsList\"\n    },\n    \"DescribeOrderableDBInstanceOptions\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"OrderableDBInstanceOptions\"\n    },\n    \"DescribeReservedDBInstances\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"ReservedDBInstances\"\n    },\n    \"DescribeReservedDBInstancesOfferings\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"ReservedDBInstancesOfferings\"\n    },\n    \"ListTagsForResource\": {\n      \"result_key\": \"TagList\"\n    }\n  }\n}\n},{}],101:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2013-02-12\",\n    \"endpointPrefix\": \"rds\",\n    \"protocol\": \"query\",\n    \"serviceAbbreviation\": \"Amazon RDS\",\n    \"serviceFullName\": \"Amazon Relational Database Service\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"rds-2013-02-12\",\n    \"xmlNamespace\": \"http://rds.amazonaws.com/doc/2013-02-12/\"\n  },\n  \"operations\": {\n    \"AddSourceIdentifierToSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\",\n          \"SourceIdentifier\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SourceIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AddSourceIdentifierToSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"AddTagsToResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"ResourceName\": {},\n          \"Tags\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"AuthorizeDBSecurityGroupIngress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"CIDRIP\": {},\n          \"EC2SecurityGroupName\": {},\n          \"EC2SecurityGroupId\": {},\n          \"EC2SecurityGroupOwnerId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AuthorizeDBSecurityGroupIngressResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroup\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"CopyDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceDBSnapshotIdentifier\",\n          \"TargetDBSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"SourceDBSnapshotIdentifier\": {},\n          \"TargetDBSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CopyDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshot\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      }\n    },\n    \"CreateDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"AllocatedStorage\",\n          \"DBInstanceClass\",\n          \"Engine\",\n          \"MasterUsername\",\n          \"MasterUserPassword\"\n        ],\n        \"members\": {\n          \"DBName\": {},\n          \"DBInstanceIdentifier\": {},\n          \"AllocatedStorage\": {\n            \"type\": \"integer\"\n          },\n          \"DBInstanceClass\": {},\n          \"Engine\": {},\n          \"MasterUsername\": {},\n          \"MasterUserPassword\": {},\n          \"DBSecurityGroups\": {\n            \"shape\": \"Sp\"\n          },\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"Sq\"\n          },\n          \"AvailabilityZone\": {},\n          \"DBSubnetGroupName\": {},\n          \"PreferredMaintenanceWindow\": {},\n          \"DBParameterGroupName\": {},\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PreferredBackupWindow\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"EngineVersion\": {},\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"LicenseModel\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"CharacterSetName\": {},\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"CreateDBInstanceReadReplica\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"SourceDBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"SourceDBInstanceIdentifier\": {},\n          \"DBInstanceClass\": {},\n          \"AvailabilityZone\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBInstanceReadReplicaResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"CreateDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\",\n          \"DBParameterGroupFamily\",\n          \"Description\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"DBParameterGroupFamily\": {},\n          \"Description\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBParameterGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBParameterGroup\": {\n            \"shape\": \"S1d\"\n          }\n        }\n      }\n    },\n    \"CreateDBSecurityGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\",\n          \"DBSecurityGroupDescription\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"DBSecurityGroupDescription\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBSecurityGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroup\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"CreateDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSnapshotIdentifier\",\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBSnapshotIdentifier\": {},\n          \"DBInstanceIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshot\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      }\n    },\n    \"CreateDBSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSubnetGroupName\",\n          \"DBSubnetGroupDescription\",\n          \"SubnetIds\"\n        ],\n        \"members\": {\n          \"DBSubnetGroupName\": {},\n          \"DBSubnetGroupDescription\": {},\n          \"SubnetIds\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBSubnetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSubnetGroup\": {\n            \"shape\": \"S11\"\n          }\n        }\n      }\n    },\n    \"CreateEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\",\n          \"SnsTopicArn\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SnsTopicArn\": {},\n          \"SourceType\": {},\n          \"EventCategories\": {\n            \"shape\": \"S6\"\n          },\n          \"SourceIds\": {\n            \"shape\": \"S5\"\n          },\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateEventSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"CreateOptionGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OptionGroupName\",\n          \"EngineName\",\n          \"MajorEngineVersion\",\n          \"OptionGroupDescription\"\n        ],\n        \"members\": {\n          \"OptionGroupName\": {},\n          \"EngineName\": {},\n          \"MajorEngineVersion\": {},\n          \"OptionGroupDescription\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateOptionGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroup\": {\n            \"shape\": \"S1p\"\n          }\n        }\n      }\n    },\n    \"DeleteDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"SkipFinalSnapshot\": {\n            \"type\": \"boolean\"\n          },\n          \"FinalDBSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"DeleteDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {}\n        }\n      }\n    },\n    \"DeleteDBSecurityGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {}\n        }\n      }\n    },\n    \"DeleteDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"DBSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshot\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      }\n    },\n    \"DeleteDBSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSubnetGroupName\"\n        ],\n        \"members\": {\n          \"DBSubnetGroupName\": {}\n        }\n      }\n    },\n    \"DeleteEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteEventSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"DeleteOptionGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OptionGroupName\"\n        ],\n        \"members\": {\n          \"OptionGroupName\": {}\n        }\n      }\n    },\n    \"DescribeDBEngineVersions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Engine\": {},\n          \"EngineVersion\": {},\n          \"DBParameterGroupFamily\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"DefaultOnly\": {\n            \"type\": \"boolean\"\n          },\n          \"ListSupportedCharacterSets\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBEngineVersionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBEngineVersions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"DBEngineVersion\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Engine\": {},\n                \"EngineVersion\": {},\n                \"DBParameterGroupFamily\": {},\n                \"DBEngineDescription\": {},\n                \"DBEngineVersionDescription\": {},\n                \"DefaultCharacterSet\": {\n                  \"shape\": \"S28\"\n                },\n                \"SupportedCharacterSets\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"shape\": \"S28\",\n                    \"locationName\": \"CharacterSet\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBInstancesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBInstances\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"St\",\n              \"locationName\": \"DBInstance\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBLogFiles\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"FilenameContains\": {},\n          \"FileLastWritten\": {\n            \"type\": \"long\"\n          },\n          \"FileSize\": {\n            \"type\": \"long\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBLogFilesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DescribeDBLogFiles\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"DescribeDBLogFilesDetails\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"LogFileName\": {},\n                \"LastWritten\": {\n                  \"type\": \"long\"\n                },\n                \"Size\": {\n                  \"type\": \"long\"\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeDBParameterGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBParameterGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBParameterGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1d\",\n              \"locationName\": \"DBParameterGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"Source\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBParametersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Parameters\": {\n            \"shape\": \"S2n\"\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeDBSecurityGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBSecurityGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBSecurityGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sd\",\n              \"locationName\": \"DBSecurityGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBSnapshots\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"DBSnapshotIdentifier\": {},\n          \"SnapshotType\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBSnapshotsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBSnapshots\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sk\",\n              \"locationName\": \"DBSnapshot\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBSubnetGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSubnetGroupName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBSubnetGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBSubnetGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S11\",\n              \"locationName\": \"DBSubnetGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEngineDefaultParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupFamily\"\n        ],\n        \"members\": {\n          \"DBParameterGroupFamily\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEngineDefaultParametersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EngineDefaults\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"DBParameterGroupFamily\": {},\n              \"Marker\": {},\n              \"Parameters\": {\n                \"shape\": \"S2n\"\n              }\n            },\n            \"wrapper\": true\n          }\n        }\n      }\n    },\n    \"DescribeEventCategories\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SourceType\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventCategoriesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventCategoriesMapList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"EventCategoriesMap\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"SourceType\": {},\n                \"EventCategories\": {\n                  \"shape\": \"S6\"\n                }\n              },\n              \"wrapper\": true\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEventSubscriptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventSubscriptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"EventSubscriptionsList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4\",\n              \"locationName\": \"EventSubscription\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEvents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SourceIdentifier\": {},\n          \"SourceType\": {},\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"Duration\": {\n            \"type\": \"integer\"\n          },\n          \"EventCategories\": {\n            \"shape\": \"S6\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"Events\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Event\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"SourceIdentifier\": {},\n                \"SourceType\": {},\n                \"Message\": {},\n                \"EventCategories\": {\n                  \"shape\": \"S6\"\n                },\n                \"Date\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeOptionGroupOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EngineName\"\n        ],\n        \"members\": {\n          \"EngineName\": {},\n          \"MajorEngineVersion\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeOptionGroupOptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroupOptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"OptionGroupOption\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Description\": {},\n                \"EngineName\": {},\n                \"MajorEngineVersion\": {},\n                \"MinimumRequiredMinorEngineVersion\": {},\n                \"PortRequired\": {\n                  \"type\": \"boolean\"\n                },\n                \"DefaultPort\": {\n                  \"type\": \"integer\"\n                },\n                \"OptionsDependedOn\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"OptionName\"\n                  }\n                },\n                \"Persistent\": {\n                  \"type\": \"boolean\"\n                },\n                \"OptionGroupOptionSettings\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"OptionGroupOptionSetting\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"SettingName\": {},\n                      \"SettingDescription\": {},\n                      \"DefaultValue\": {},\n                      \"ApplyType\": {},\n                      \"AllowedValues\": {},\n                      \"IsModifiable\": {\n                        \"type\": \"boolean\"\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeOptionGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroupName\": {},\n          \"Marker\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"EngineName\": {},\n          \"MajorEngineVersion\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeOptionGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroupsList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1p\",\n              \"locationName\": \"OptionGroup\"\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeOrderableDBInstanceOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Engine\"\n        ],\n        \"members\": {\n          \"Engine\": {},\n          \"EngineVersion\": {},\n          \"DBInstanceClass\": {},\n          \"LicenseModel\": {},\n          \"Vpc\": {\n            \"type\": \"boolean\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeOrderableDBInstanceOptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OrderableDBInstanceOptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"OrderableDBInstanceOption\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Engine\": {},\n                \"EngineVersion\": {},\n                \"DBInstanceClass\": {},\n                \"LicenseModel\": {},\n                \"AvailabilityZones\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"shape\": \"S14\",\n                    \"locationName\": \"AvailabilityZone\"\n                  }\n                },\n                \"MultiAZCapable\": {\n                  \"type\": \"boolean\"\n                },\n                \"ReadReplicaCapable\": {\n                  \"type\": \"boolean\"\n                },\n                \"Vpc\": {\n                  \"type\": \"boolean\"\n                }\n              },\n              \"wrapper\": true\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeReservedDBInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedDBInstanceId\": {},\n          \"ReservedDBInstancesOfferingId\": {},\n          \"DBInstanceClass\": {},\n          \"Duration\": {},\n          \"ProductDescription\": {},\n          \"OfferingType\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReservedDBInstancesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ReservedDBInstances\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S3w\",\n              \"locationName\": \"ReservedDBInstance\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeReservedDBInstancesOfferings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedDBInstancesOfferingId\": {},\n          \"DBInstanceClass\": {},\n          \"Duration\": {},\n          \"ProductDescription\": {},\n          \"OfferingType\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReservedDBInstancesOfferingsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ReservedDBInstancesOfferings\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ReservedDBInstancesOffering\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ReservedDBInstancesOfferingId\": {},\n                \"DBInstanceClass\": {},\n                \"Duration\": {\n                  \"type\": \"integer\"\n                },\n                \"FixedPrice\": {\n                  \"type\": \"double\"\n                },\n                \"UsagePrice\": {\n                  \"type\": \"double\"\n                },\n                \"CurrencyCode\": {},\n                \"ProductDescription\": {},\n                \"OfferingType\": {},\n                \"MultiAZ\": {\n                  \"type\": \"boolean\"\n                },\n                \"RecurringCharges\": {\n                  \"shape\": \"S3y\"\n                }\n              },\n              \"wrapper\": true\n            }\n          }\n        }\n      }\n    },\n    \"DownloadDBLogFilePortion\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"LogFileName\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"LogFileName\": {},\n          \"Marker\": {},\n          \"NumberOfLines\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DownloadDBLogFilePortionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"LogFileData\": {},\n          \"Marker\": {},\n          \"AdditionalDataPending\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ListTagsForResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\"\n        ],\n        \"members\": {\n          \"ResourceName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListTagsForResourceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TagList\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"ModifyDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"AllocatedStorage\": {\n            \"type\": \"integer\"\n          },\n          \"DBInstanceClass\": {},\n          \"DBSecurityGroups\": {\n            \"shape\": \"Sp\"\n          },\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"Sq\"\n          },\n          \"ApplyImmediately\": {\n            \"type\": \"boolean\"\n          },\n          \"MasterUserPassword\": {},\n          \"DBParameterGroupName\": {},\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PreferredBackupWindow\": {},\n          \"PreferredMaintenanceWindow\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"EngineVersion\": {},\n          \"AllowMajorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"NewDBInstanceIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"ModifyDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\",\n          \"Parameters\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"Parameters\": {\n            \"shape\": \"S2n\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S4b\",\n        \"resultWrapper\": \"ModifyDBParameterGroupResult\"\n      }\n    },\n    \"ModifyDBSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSubnetGroupName\",\n          \"SubnetIds\"\n        ],\n        \"members\": {\n          \"DBSubnetGroupName\": {},\n          \"DBSubnetGroupDescription\": {},\n          \"SubnetIds\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyDBSubnetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSubnetGroup\": {\n            \"shape\": \"S11\"\n          }\n        }\n      }\n    },\n    \"ModifyEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SnsTopicArn\": {},\n          \"SourceType\": {},\n          \"EventCategories\": {\n            \"shape\": \"S6\"\n          },\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyEventSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"ModifyOptionGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OptionGroupName\"\n        ],\n        \"members\": {\n          \"OptionGroupName\": {},\n          \"OptionsToInclude\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"OptionConfiguration\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"OptionName\"\n              ],\n              \"members\": {\n                \"OptionName\": {},\n                \"Port\": {\n                  \"type\": \"integer\"\n                },\n                \"DBSecurityGroupMemberships\": {\n                  \"shape\": \"Sp\"\n                },\n                \"VpcSecurityGroupMemberships\": {\n                  \"shape\": \"Sq\"\n                },\n                \"OptionSettings\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"shape\": \"S1t\",\n                    \"locationName\": \"OptionSetting\"\n                  }\n                }\n              }\n            }\n          },\n          \"OptionsToRemove\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"ApplyImmediately\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyOptionGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroup\": {\n            \"shape\": \"S1p\"\n          }\n        }\n      }\n    },\n    \"PromoteReadReplica\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PreferredBackupWindow\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PromoteReadReplicaResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"PurchaseReservedDBInstancesOffering\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReservedDBInstancesOfferingId\"\n        ],\n        \"members\": {\n          \"ReservedDBInstancesOfferingId\": {},\n          \"ReservedDBInstanceId\": {},\n          \"DBInstanceCount\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PurchaseReservedDBInstancesOfferingResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedDBInstance\": {\n            \"shape\": \"S3w\"\n          }\n        }\n      }\n    },\n    \"RebootDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"ForceFailover\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RebootDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"RemoveSourceIdentifierFromSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\",\n          \"SourceIdentifier\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SourceIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RemoveSourceIdentifierFromSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"RemoveTagsFromResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\",\n          \"TagKeys\"\n        ],\n        \"members\": {\n          \"ResourceName\": {},\n          \"TagKeys\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"ResetDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"ResetAllParameters\": {\n            \"type\": \"boolean\"\n          },\n          \"Parameters\": {\n            \"shape\": \"S2n\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S4b\",\n        \"resultWrapper\": \"ResetDBParameterGroupResult\"\n      }\n    },\n    \"RestoreDBInstanceFromDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"DBSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"DBSnapshotIdentifier\": {},\n          \"DBInstanceClass\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"AvailabilityZone\": {},\n          \"DBSubnetGroupName\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"LicenseModel\": {},\n          \"DBName\": {},\n          \"Engine\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RestoreDBInstanceFromDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"RestoreDBInstanceToPointInTime\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceDBInstanceIdentifier\",\n          \"TargetDBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"SourceDBInstanceIdentifier\": {},\n          \"TargetDBInstanceIdentifier\": {},\n          \"RestoreTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"UseLatestRestorableTime\": {\n            \"type\": \"boolean\"\n          },\n          \"DBInstanceClass\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"AvailabilityZone\": {},\n          \"DBSubnetGroupName\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"LicenseModel\": {},\n          \"DBName\": {},\n          \"Engine\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RestoreDBInstanceToPointInTimeResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"RevokeDBSecurityGroupIngress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"CIDRIP\": {},\n          \"EC2SecurityGroupName\": {},\n          \"EC2SecurityGroupId\": {},\n          \"EC2SecurityGroupOwnerId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RevokeDBSecurityGroupIngressResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroup\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S4\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CustomerAwsId\": {},\n        \"CustSubscriptionId\": {},\n        \"SnsTopicArn\": {},\n        \"Status\": {},\n        \"SubscriptionCreationTime\": {},\n        \"SourceType\": {},\n        \"SourceIdsList\": {\n          \"shape\": \"S5\"\n        },\n        \"EventCategoriesList\": {\n          \"shape\": \"S6\"\n        },\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S5\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SourceId\"\n      }\n    },\n    \"S6\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"EventCategory\"\n      }\n    },\n    \"S9\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Tag\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"Sd\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"OwnerId\": {},\n        \"DBSecurityGroupName\": {},\n        \"DBSecurityGroupDescription\": {},\n        \"VpcId\": {},\n        \"EC2SecurityGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"EC2SecurityGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Status\": {},\n              \"EC2SecurityGroupName\": {},\n              \"EC2SecurityGroupId\": {},\n              \"EC2SecurityGroupOwnerId\": {}\n            }\n          }\n        },\n        \"IPRanges\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"IPRange\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Status\": {},\n              \"CIDRIP\": {}\n            }\n          }\n        }\n      },\n      \"wrapper\": true\n    },\n    \"Sk\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBSnapshotIdentifier\": {},\n        \"DBInstanceIdentifier\": {},\n        \"SnapshotCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Engine\": {},\n        \"AllocatedStorage\": {\n          \"type\": \"integer\"\n        },\n        \"Status\": {},\n        \"Port\": {\n          \"type\": \"integer\"\n        },\n        \"AvailabilityZone\": {},\n        \"VpcId\": {},\n        \"InstanceCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"MasterUsername\": {},\n        \"EngineVersion\": {},\n        \"LicenseModel\": {},\n        \"SnapshotType\": {},\n        \"Iops\": {\n          \"type\": \"integer\"\n        },\n        \"OptionGroupName\": {}\n      },\n      \"wrapper\": true\n    },\n    \"Sp\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"DBSecurityGroupName\"\n      }\n    },\n    \"Sq\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"VpcSecurityGroupId\"\n      }\n    },\n    \"St\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBInstanceIdentifier\": {},\n        \"DBInstanceClass\": {},\n        \"Engine\": {},\n        \"DBInstanceStatus\": {},\n        \"MasterUsername\": {},\n        \"DBName\": {},\n        \"Endpoint\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Address\": {},\n            \"Port\": {\n              \"type\": \"integer\"\n            }\n          }\n        },\n        \"AllocatedStorage\": {\n          \"type\": \"integer\"\n        },\n        \"InstanceCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"PreferredBackupWindow\": {},\n        \"BackupRetentionPeriod\": {\n          \"type\": \"integer\"\n        },\n        \"DBSecurityGroups\": {\n          \"shape\": \"Sv\"\n        },\n        \"VpcSecurityGroups\": {\n          \"shape\": \"Sx\"\n        },\n        \"DBParameterGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"DBParameterGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"DBParameterGroupName\": {},\n              \"ParameterApplyStatus\": {}\n            }\n          }\n        },\n        \"AvailabilityZone\": {},\n        \"DBSubnetGroup\": {\n          \"shape\": \"S11\"\n        },\n        \"PreferredMaintenanceWindow\": {},\n        \"PendingModifiedValues\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"DBInstanceClass\": {},\n            \"AllocatedStorage\": {\n              \"type\": \"integer\"\n            },\n            \"MasterUserPassword\": {},\n            \"Port\": {\n              \"type\": \"integer\"\n            },\n            \"BackupRetentionPeriod\": {\n              \"type\": \"integer\"\n            },\n            \"MultiAZ\": {\n              \"type\": \"boolean\"\n            },\n            \"EngineVersion\": {},\n            \"Iops\": {\n              \"type\": \"integer\"\n            },\n            \"DBInstanceIdentifier\": {}\n          }\n        },\n        \"LatestRestorableTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"MultiAZ\": {\n          \"type\": \"boolean\"\n        },\n        \"EngineVersion\": {},\n        \"AutoMinorVersionUpgrade\": {\n          \"type\": \"boolean\"\n        },\n        \"ReadReplicaSourceDBInstanceIdentifier\": {},\n        \"ReadReplicaDBInstanceIdentifiers\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"ReadReplicaDBInstanceIdentifier\"\n          }\n        },\n        \"LicenseModel\": {},\n        \"Iops\": {\n          \"type\": \"integer\"\n        },\n        \"OptionGroupMemberships\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"OptionGroupMembership\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"OptionGroupName\": {},\n              \"Status\": {}\n            }\n          }\n        },\n        \"CharacterSetName\": {},\n        \"SecondaryAvailabilityZone\": {},\n        \"PubliclyAccessible\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"Sv\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"DBSecurityGroup\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"Status\": {}\n        }\n      }\n    },\n    \"Sx\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"VpcSecurityGroupMembership\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcSecurityGroupId\": {},\n          \"Status\": {}\n        }\n      }\n    },\n    \"S11\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBSubnetGroupName\": {},\n        \"DBSubnetGroupDescription\": {},\n        \"VpcId\": {},\n        \"SubnetGroupStatus\": {},\n        \"Subnets\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Subnet\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"SubnetIdentifier\": {},\n              \"SubnetAvailabilityZone\": {\n                \"shape\": \"S14\"\n              },\n              \"SubnetStatus\": {}\n            }\n          }\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S14\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Name\": {},\n        \"ProvisionedIopsCapable\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S1d\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBParameterGroupName\": {},\n        \"DBParameterGroupFamily\": {},\n        \"Description\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S1j\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SubnetIdentifier\"\n      }\n    },\n    \"S1p\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"OptionGroupName\": {},\n        \"OptionGroupDescription\": {},\n        \"EngineName\": {},\n        \"MajorEngineVersion\": {},\n        \"Options\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Option\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"OptionName\": {},\n              \"OptionDescription\": {},\n              \"Persistent\": {\n                \"type\": \"boolean\"\n              },\n              \"Port\": {\n                \"type\": \"integer\"\n              },\n              \"OptionSettings\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"shape\": \"S1t\",\n                  \"locationName\": \"OptionSetting\"\n                }\n              },\n              \"DBSecurityGroupMemberships\": {\n                \"shape\": \"Sv\"\n              },\n              \"VpcSecurityGroupMemberships\": {\n                \"shape\": \"Sx\"\n              }\n            }\n          }\n        },\n        \"AllowsVpcAndNonVpcInstanceMemberships\": {\n          \"type\": \"boolean\"\n        },\n        \"VpcId\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S1t\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Name\": {},\n        \"Value\": {},\n        \"DefaultValue\": {},\n        \"Description\": {},\n        \"ApplyType\": {},\n        \"DataType\": {},\n        \"AllowedValues\": {},\n        \"IsModifiable\": {\n          \"type\": \"boolean\"\n        },\n        \"IsCollection\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S28\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CharacterSetName\": {},\n        \"CharacterSetDescription\": {}\n      }\n    },\n    \"S2n\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Parameter\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ParameterName\": {},\n          \"ParameterValue\": {},\n          \"Description\": {},\n          \"Source\": {},\n          \"ApplyType\": {},\n          \"DataType\": {},\n          \"AllowedValues\": {},\n          \"IsModifiable\": {\n            \"type\": \"boolean\"\n          },\n          \"MinimumEngineVersion\": {},\n          \"ApplyMethod\": {}\n        }\n      }\n    },\n    \"S3w\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ReservedDBInstanceId\": {},\n        \"ReservedDBInstancesOfferingId\": {},\n        \"DBInstanceClass\": {},\n        \"StartTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Duration\": {\n          \"type\": \"integer\"\n        },\n        \"FixedPrice\": {\n          \"type\": \"double\"\n        },\n        \"UsagePrice\": {\n          \"type\": \"double\"\n        },\n        \"CurrencyCode\": {},\n        \"DBInstanceCount\": {\n          \"type\": \"integer\"\n        },\n        \"ProductDescription\": {},\n        \"OfferingType\": {},\n        \"MultiAZ\": {\n          \"type\": \"boolean\"\n        },\n        \"State\": {},\n        \"RecurringCharges\": {\n          \"shape\": \"S3y\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S3y\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"RecurringCharge\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"RecurringChargeAmount\": {\n            \"type\": \"double\"\n          },\n          \"RecurringChargeFrequency\": {}\n        },\n        \"wrapper\": true\n      }\n    },\n    \"S4b\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBParameterGroupName\": {}\n      }\n    }\n  }\n}\n},{}],102:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeDBEngineVersions\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"DBEngineVersions\"\n    },\n    \"DescribeDBInstances\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"DBInstances\"\n    },\n    \"DescribeDBLogFiles\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"DescribeDBLogFiles\"\n    },\n    \"DescribeDBParameterGroups\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"DBParameterGroups\"\n    },\n    \"DescribeDBParameters\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"Parameters\"\n    },\n    \"DescribeDBSecurityGroups\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"DBSecurityGroups\"\n    },\n    \"DescribeDBSnapshots\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"DBSnapshots\"\n    },\n    \"DescribeDBSubnetGroups\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"DBSubnetGroups\"\n    },\n    \"DescribeEngineDefaultParameters\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"EngineDefaults.Marker\",\n      \"result_key\": \"EngineDefaults.Parameters\"\n    },\n    \"DescribeEventSubscriptions\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"EventSubscriptionsList\"\n    },\n    \"DescribeEvents\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"Events\"\n    },\n    \"DescribeOptionGroupOptions\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"OptionGroupOptions\"\n    },\n    \"DescribeOptionGroups\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"OptionGroupsList\"\n    },\n    \"DescribeOrderableDBInstanceOptions\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"OrderableDBInstanceOptions\"\n    },\n    \"DescribeReservedDBInstances\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"ReservedDBInstances\"\n    },\n    \"DescribeReservedDBInstancesOfferings\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"ReservedDBInstancesOfferings\"\n    },\n    \"DownloadDBLogFilePortion\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"NumberOfLines\",\n      \"more_results\": \"AdditionalDataPending\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"LogFileData\"\n    },\n    \"ListTagsForResource\": {\n      \"result_key\": \"TagList\"\n    }\n  }\n}\n},{}],103:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2013-09-09\",\n    \"endpointPrefix\": \"rds\",\n    \"protocol\": \"query\",\n    \"serviceAbbreviation\": \"Amazon RDS\",\n    \"serviceFullName\": \"Amazon Relational Database Service\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"rds-2013-09-09\",\n    \"xmlNamespace\": \"http://rds.amazonaws.com/doc/2013-09-09/\"\n  },\n  \"operations\": {\n    \"AddSourceIdentifierToSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\",\n          \"SourceIdentifier\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SourceIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AddSourceIdentifierToSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"AddTagsToResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"ResourceName\": {},\n          \"Tags\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"AuthorizeDBSecurityGroupIngress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"CIDRIP\": {},\n          \"EC2SecurityGroupName\": {},\n          \"EC2SecurityGroupId\": {},\n          \"EC2SecurityGroupOwnerId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AuthorizeDBSecurityGroupIngressResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroup\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"CopyDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceDBSnapshotIdentifier\",\n          \"TargetDBSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"SourceDBSnapshotIdentifier\": {},\n          \"TargetDBSnapshotIdentifier\": {},\n          \"Tags\": {\n            \"shape\": \"S9\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CopyDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshot\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      }\n    },\n    \"CreateDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"AllocatedStorage\",\n          \"DBInstanceClass\",\n          \"Engine\",\n          \"MasterUsername\",\n          \"MasterUserPassword\"\n        ],\n        \"members\": {\n          \"DBName\": {},\n          \"DBInstanceIdentifier\": {},\n          \"AllocatedStorage\": {\n            \"type\": \"integer\"\n          },\n          \"DBInstanceClass\": {},\n          \"Engine\": {},\n          \"MasterUsername\": {},\n          \"MasterUserPassword\": {},\n          \"DBSecurityGroups\": {\n            \"shape\": \"Sp\"\n          },\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"Sq\"\n          },\n          \"AvailabilityZone\": {},\n          \"DBSubnetGroupName\": {},\n          \"PreferredMaintenanceWindow\": {},\n          \"DBParameterGroupName\": {},\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PreferredBackupWindow\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"EngineVersion\": {},\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"LicenseModel\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"CharacterSetName\": {},\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"Tags\": {\n            \"shape\": \"S9\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"CreateDBInstanceReadReplica\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"SourceDBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"SourceDBInstanceIdentifier\": {},\n          \"DBInstanceClass\": {},\n          \"AvailabilityZone\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"Tags\": {\n            \"shape\": \"S9\"\n          },\n          \"DBSubnetGroupName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBInstanceReadReplicaResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"CreateDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\",\n          \"DBParameterGroupFamily\",\n          \"Description\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"DBParameterGroupFamily\": {},\n          \"Description\": {},\n          \"Tags\": {\n            \"shape\": \"S9\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBParameterGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBParameterGroup\": {\n            \"shape\": \"S1f\"\n          }\n        }\n      }\n    },\n    \"CreateDBSecurityGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\",\n          \"DBSecurityGroupDescription\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"DBSecurityGroupDescription\": {},\n          \"Tags\": {\n            \"shape\": \"S9\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBSecurityGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroup\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"CreateDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSnapshotIdentifier\",\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBSnapshotIdentifier\": {},\n          \"DBInstanceIdentifier\": {},\n          \"Tags\": {\n            \"shape\": \"S9\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshot\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      }\n    },\n    \"CreateDBSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSubnetGroupName\",\n          \"DBSubnetGroupDescription\",\n          \"SubnetIds\"\n        ],\n        \"members\": {\n          \"DBSubnetGroupName\": {},\n          \"DBSubnetGroupDescription\": {},\n          \"SubnetIds\": {\n            \"shape\": \"S1l\"\n          },\n          \"Tags\": {\n            \"shape\": \"S9\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBSubnetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSubnetGroup\": {\n            \"shape\": \"S11\"\n          }\n        }\n      }\n    },\n    \"CreateEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\",\n          \"SnsTopicArn\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SnsTopicArn\": {},\n          \"SourceType\": {},\n          \"EventCategories\": {\n            \"shape\": \"S6\"\n          },\n          \"SourceIds\": {\n            \"shape\": \"S5\"\n          },\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          },\n          \"Tags\": {\n            \"shape\": \"S9\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateEventSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"CreateOptionGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OptionGroupName\",\n          \"EngineName\",\n          \"MajorEngineVersion\",\n          \"OptionGroupDescription\"\n        ],\n        \"members\": {\n          \"OptionGroupName\": {},\n          \"EngineName\": {},\n          \"MajorEngineVersion\": {},\n          \"OptionGroupDescription\": {},\n          \"Tags\": {\n            \"shape\": \"S9\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateOptionGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroup\": {\n            \"shape\": \"S1r\"\n          }\n        }\n      }\n    },\n    \"DeleteDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"SkipFinalSnapshot\": {\n            \"type\": \"boolean\"\n          },\n          \"FinalDBSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"DeleteDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {}\n        }\n      }\n    },\n    \"DeleteDBSecurityGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {}\n        }\n      }\n    },\n    \"DeleteDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"DBSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshot\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      }\n    },\n    \"DeleteDBSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSubnetGroupName\"\n        ],\n        \"members\": {\n          \"DBSubnetGroupName\": {}\n        }\n      }\n    },\n    \"DeleteEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteEventSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"DeleteOptionGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OptionGroupName\"\n        ],\n        \"members\": {\n          \"OptionGroupName\": {}\n        }\n      }\n    },\n    \"DescribeDBEngineVersions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Engine\": {},\n          \"EngineVersion\": {},\n          \"DBParameterGroupFamily\": {},\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"DefaultOnly\": {\n            \"type\": \"boolean\"\n          },\n          \"ListSupportedCharacterSets\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBEngineVersionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBEngineVersions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"DBEngineVersion\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Engine\": {},\n                \"EngineVersion\": {},\n                \"DBParameterGroupFamily\": {},\n                \"DBEngineDescription\": {},\n                \"DBEngineVersionDescription\": {},\n                \"DefaultCharacterSet\": {\n                  \"shape\": \"S2d\"\n                },\n                \"SupportedCharacterSets\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"shape\": \"S2d\",\n                    \"locationName\": \"CharacterSet\"\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBInstancesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBInstances\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"St\",\n              \"locationName\": \"DBInstance\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBLogFiles\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"FilenameContains\": {},\n          \"FileLastWritten\": {\n            \"type\": \"long\"\n          },\n          \"FileSize\": {\n            \"type\": \"long\"\n          },\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBLogFilesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DescribeDBLogFiles\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"DescribeDBLogFilesDetails\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"LogFileName\": {},\n                \"LastWritten\": {\n                  \"type\": \"long\"\n                },\n                \"Size\": {\n                  \"type\": \"long\"\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeDBParameterGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBParameterGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBParameterGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1f\",\n              \"locationName\": \"DBParameterGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"Source\": {},\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBParametersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Parameters\": {\n            \"shape\": \"S2s\"\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeDBSecurityGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBSecurityGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBSecurityGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sd\",\n              \"locationName\": \"DBSecurityGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBSnapshots\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"DBSnapshotIdentifier\": {},\n          \"SnapshotType\": {},\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBSnapshotsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBSnapshots\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sk\",\n              \"locationName\": \"DBSnapshot\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBSubnetGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSubnetGroupName\": {},\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBSubnetGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBSubnetGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S11\",\n              \"locationName\": \"DBSubnetGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEngineDefaultParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupFamily\"\n        ],\n        \"members\": {\n          \"DBParameterGroupFamily\": {},\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEngineDefaultParametersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EngineDefaults\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"DBParameterGroupFamily\": {},\n              \"Marker\": {},\n              \"Parameters\": {\n                \"shape\": \"S2s\"\n              }\n            },\n            \"wrapper\": true\n          }\n        }\n      }\n    },\n    \"DescribeEventCategories\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SourceType\": {},\n          \"Filters\": {\n            \"shape\": \"S27\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventCategoriesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventCategoriesMapList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"EventCategoriesMap\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"SourceType\": {},\n                \"EventCategories\": {\n                  \"shape\": \"S6\"\n                }\n              },\n              \"wrapper\": true\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEventSubscriptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventSubscriptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"EventSubscriptionsList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4\",\n              \"locationName\": \"EventSubscription\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEvents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SourceIdentifier\": {},\n          \"SourceType\": {},\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"Duration\": {\n            \"type\": \"integer\"\n          },\n          \"EventCategories\": {\n            \"shape\": \"S6\"\n          },\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"Events\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Event\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"SourceIdentifier\": {},\n                \"SourceType\": {},\n                \"Message\": {},\n                \"EventCategories\": {\n                  \"shape\": \"S6\"\n                },\n                \"Date\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeOptionGroupOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EngineName\"\n        ],\n        \"members\": {\n          \"EngineName\": {},\n          \"MajorEngineVersion\": {},\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeOptionGroupOptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroupOptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"OptionGroupOption\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Description\": {},\n                \"EngineName\": {},\n                \"MajorEngineVersion\": {},\n                \"MinimumRequiredMinorEngineVersion\": {},\n                \"PortRequired\": {\n                  \"type\": \"boolean\"\n                },\n                \"DefaultPort\": {\n                  \"type\": \"integer\"\n                },\n                \"OptionsDependedOn\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"OptionName\"\n                  }\n                },\n                \"Persistent\": {\n                  \"type\": \"boolean\"\n                },\n                \"Permanent\": {\n                  \"type\": \"boolean\"\n                },\n                \"OptionGroupOptionSettings\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"OptionGroupOptionSetting\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"SettingName\": {},\n                      \"SettingDescription\": {},\n                      \"DefaultValue\": {},\n                      \"ApplyType\": {},\n                      \"AllowedValues\": {},\n                      \"IsModifiable\": {\n                        \"type\": \"boolean\"\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeOptionGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroupName\": {},\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"Marker\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"EngineName\": {},\n          \"MajorEngineVersion\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeOptionGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroupsList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1r\",\n              \"locationName\": \"OptionGroup\"\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeOrderableDBInstanceOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Engine\"\n        ],\n        \"members\": {\n          \"Engine\": {},\n          \"EngineVersion\": {},\n          \"DBInstanceClass\": {},\n          \"LicenseModel\": {},\n          \"Vpc\": {\n            \"type\": \"boolean\"\n          },\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeOrderableDBInstanceOptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OrderableDBInstanceOptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"OrderableDBInstanceOption\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Engine\": {},\n                \"EngineVersion\": {},\n                \"DBInstanceClass\": {},\n                \"LicenseModel\": {},\n                \"AvailabilityZones\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"shape\": \"S14\",\n                    \"locationName\": \"AvailabilityZone\"\n                  }\n                },\n                \"MultiAZCapable\": {\n                  \"type\": \"boolean\"\n                },\n                \"ReadReplicaCapable\": {\n                  \"type\": \"boolean\"\n                },\n                \"Vpc\": {\n                  \"type\": \"boolean\"\n                }\n              },\n              \"wrapper\": true\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeReservedDBInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedDBInstanceId\": {},\n          \"ReservedDBInstancesOfferingId\": {},\n          \"DBInstanceClass\": {},\n          \"Duration\": {},\n          \"ProductDescription\": {},\n          \"OfferingType\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReservedDBInstancesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ReservedDBInstances\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S41\",\n              \"locationName\": \"ReservedDBInstance\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeReservedDBInstancesOfferings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedDBInstancesOfferingId\": {},\n          \"DBInstanceClass\": {},\n          \"Duration\": {},\n          \"ProductDescription\": {},\n          \"OfferingType\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"Filters\": {\n            \"shape\": \"S27\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReservedDBInstancesOfferingsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ReservedDBInstancesOfferings\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ReservedDBInstancesOffering\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ReservedDBInstancesOfferingId\": {},\n                \"DBInstanceClass\": {},\n                \"Duration\": {\n                  \"type\": \"integer\"\n                },\n                \"FixedPrice\": {\n                  \"type\": \"double\"\n                },\n                \"UsagePrice\": {\n                  \"type\": \"double\"\n                },\n                \"CurrencyCode\": {},\n                \"ProductDescription\": {},\n                \"OfferingType\": {},\n                \"MultiAZ\": {\n                  \"type\": \"boolean\"\n                },\n                \"RecurringCharges\": {\n                  \"shape\": \"S43\"\n                }\n              },\n              \"wrapper\": true\n            }\n          }\n        }\n      }\n    },\n    \"DownloadDBLogFilePortion\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"LogFileName\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"LogFileName\": {},\n          \"Marker\": {},\n          \"NumberOfLines\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DownloadDBLogFilePortionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"LogFileData\": {},\n          \"Marker\": {},\n          \"AdditionalDataPending\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ListTagsForResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\"\n        ],\n        \"members\": {\n          \"ResourceName\": {},\n          \"Filters\": {\n            \"shape\": \"S27\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListTagsForResourceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TagList\": {\n            \"shape\": \"S9\"\n          }\n        }\n      }\n    },\n    \"ModifyDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"AllocatedStorage\": {\n            \"type\": \"integer\"\n          },\n          \"DBInstanceClass\": {},\n          \"DBSecurityGroups\": {\n            \"shape\": \"Sp\"\n          },\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"Sq\"\n          },\n          \"ApplyImmediately\": {\n            \"type\": \"boolean\"\n          },\n          \"MasterUserPassword\": {},\n          \"DBParameterGroupName\": {},\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PreferredBackupWindow\": {},\n          \"PreferredMaintenanceWindow\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"EngineVersion\": {},\n          \"AllowMajorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"NewDBInstanceIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"ModifyDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\",\n          \"Parameters\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"Parameters\": {\n            \"shape\": \"S2s\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S4g\",\n        \"resultWrapper\": \"ModifyDBParameterGroupResult\"\n      }\n    },\n    \"ModifyDBSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSubnetGroupName\",\n          \"SubnetIds\"\n        ],\n        \"members\": {\n          \"DBSubnetGroupName\": {},\n          \"DBSubnetGroupDescription\": {},\n          \"SubnetIds\": {\n            \"shape\": \"S1l\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyDBSubnetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSubnetGroup\": {\n            \"shape\": \"S11\"\n          }\n        }\n      }\n    },\n    \"ModifyEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SnsTopicArn\": {},\n          \"SourceType\": {},\n          \"EventCategories\": {\n            \"shape\": \"S6\"\n          },\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyEventSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"ModifyOptionGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OptionGroupName\"\n        ],\n        \"members\": {\n          \"OptionGroupName\": {},\n          \"OptionsToInclude\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"OptionConfiguration\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"OptionName\"\n              ],\n              \"members\": {\n                \"OptionName\": {},\n                \"Port\": {\n                  \"type\": \"integer\"\n                },\n                \"DBSecurityGroupMemberships\": {\n                  \"shape\": \"Sp\"\n                },\n                \"VpcSecurityGroupMemberships\": {\n                  \"shape\": \"Sq\"\n                },\n                \"OptionSettings\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"shape\": \"S1v\",\n                    \"locationName\": \"OptionSetting\"\n                  }\n                }\n              }\n            }\n          },\n          \"OptionsToRemove\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"ApplyImmediately\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyOptionGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroup\": {\n            \"shape\": \"S1r\"\n          }\n        }\n      }\n    },\n    \"PromoteReadReplica\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PreferredBackupWindow\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PromoteReadReplicaResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"PurchaseReservedDBInstancesOffering\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReservedDBInstancesOfferingId\"\n        ],\n        \"members\": {\n          \"ReservedDBInstancesOfferingId\": {},\n          \"ReservedDBInstanceId\": {},\n          \"DBInstanceCount\": {\n            \"type\": \"integer\"\n          },\n          \"Tags\": {\n            \"shape\": \"S9\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PurchaseReservedDBInstancesOfferingResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedDBInstance\": {\n            \"shape\": \"S41\"\n          }\n        }\n      }\n    },\n    \"RebootDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"ForceFailover\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RebootDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"RemoveSourceIdentifierFromSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\",\n          \"SourceIdentifier\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SourceIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RemoveSourceIdentifierFromSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"RemoveTagsFromResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\",\n          \"TagKeys\"\n        ],\n        \"members\": {\n          \"ResourceName\": {},\n          \"TagKeys\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"ResetDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"ResetAllParameters\": {\n            \"type\": \"boolean\"\n          },\n          \"Parameters\": {\n            \"shape\": \"S2s\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S4g\",\n        \"resultWrapper\": \"ResetDBParameterGroupResult\"\n      }\n    },\n    \"RestoreDBInstanceFromDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"DBSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"DBSnapshotIdentifier\": {},\n          \"DBInstanceClass\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"AvailabilityZone\": {},\n          \"DBSubnetGroupName\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"LicenseModel\": {},\n          \"DBName\": {},\n          \"Engine\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"Tags\": {\n            \"shape\": \"S9\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RestoreDBInstanceFromDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"RestoreDBInstanceToPointInTime\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceDBInstanceIdentifier\",\n          \"TargetDBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"SourceDBInstanceIdentifier\": {},\n          \"TargetDBInstanceIdentifier\": {},\n          \"RestoreTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"UseLatestRestorableTime\": {\n            \"type\": \"boolean\"\n          },\n          \"DBInstanceClass\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"AvailabilityZone\": {},\n          \"DBSubnetGroupName\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"LicenseModel\": {},\n          \"DBName\": {},\n          \"Engine\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"Tags\": {\n            \"shape\": \"S9\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RestoreDBInstanceToPointInTimeResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"St\"\n          }\n        }\n      }\n    },\n    \"RevokeDBSecurityGroupIngress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"CIDRIP\": {},\n          \"EC2SecurityGroupName\": {},\n          \"EC2SecurityGroupId\": {},\n          \"EC2SecurityGroupOwnerId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RevokeDBSecurityGroupIngressResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroup\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S4\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CustomerAwsId\": {},\n        \"CustSubscriptionId\": {},\n        \"SnsTopicArn\": {},\n        \"Status\": {},\n        \"SubscriptionCreationTime\": {},\n        \"SourceType\": {},\n        \"SourceIdsList\": {\n          \"shape\": \"S5\"\n        },\n        \"EventCategoriesList\": {\n          \"shape\": \"S6\"\n        },\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S5\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SourceId\"\n      }\n    },\n    \"S6\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"EventCategory\"\n      }\n    },\n    \"S9\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Tag\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"Sd\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"OwnerId\": {},\n        \"DBSecurityGroupName\": {},\n        \"DBSecurityGroupDescription\": {},\n        \"VpcId\": {},\n        \"EC2SecurityGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"EC2SecurityGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Status\": {},\n              \"EC2SecurityGroupName\": {},\n              \"EC2SecurityGroupId\": {},\n              \"EC2SecurityGroupOwnerId\": {}\n            }\n          }\n        },\n        \"IPRanges\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"IPRange\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Status\": {},\n              \"CIDRIP\": {}\n            }\n          }\n        }\n      },\n      \"wrapper\": true\n    },\n    \"Sk\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBSnapshotIdentifier\": {},\n        \"DBInstanceIdentifier\": {},\n        \"SnapshotCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Engine\": {},\n        \"AllocatedStorage\": {\n          \"type\": \"integer\"\n        },\n        \"Status\": {},\n        \"Port\": {\n          \"type\": \"integer\"\n        },\n        \"AvailabilityZone\": {},\n        \"VpcId\": {},\n        \"InstanceCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"MasterUsername\": {},\n        \"EngineVersion\": {},\n        \"LicenseModel\": {},\n        \"SnapshotType\": {},\n        \"Iops\": {\n          \"type\": \"integer\"\n        },\n        \"OptionGroupName\": {},\n        \"PercentProgress\": {\n          \"type\": \"integer\"\n        },\n        \"SourceRegion\": {}\n      },\n      \"wrapper\": true\n    },\n    \"Sp\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"DBSecurityGroupName\"\n      }\n    },\n    \"Sq\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"VpcSecurityGroupId\"\n      }\n    },\n    \"St\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBInstanceIdentifier\": {},\n        \"DBInstanceClass\": {},\n        \"Engine\": {},\n        \"DBInstanceStatus\": {},\n        \"MasterUsername\": {},\n        \"DBName\": {},\n        \"Endpoint\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Address\": {},\n            \"Port\": {\n              \"type\": \"integer\"\n            }\n          }\n        },\n        \"AllocatedStorage\": {\n          \"type\": \"integer\"\n        },\n        \"InstanceCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"PreferredBackupWindow\": {},\n        \"BackupRetentionPeriod\": {\n          \"type\": \"integer\"\n        },\n        \"DBSecurityGroups\": {\n          \"shape\": \"Sv\"\n        },\n        \"VpcSecurityGroups\": {\n          \"shape\": \"Sx\"\n        },\n        \"DBParameterGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"DBParameterGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"DBParameterGroupName\": {},\n              \"ParameterApplyStatus\": {}\n            }\n          }\n        },\n        \"AvailabilityZone\": {},\n        \"DBSubnetGroup\": {\n          \"shape\": \"S11\"\n        },\n        \"PreferredMaintenanceWindow\": {},\n        \"PendingModifiedValues\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"DBInstanceClass\": {},\n            \"AllocatedStorage\": {\n              \"type\": \"integer\"\n            },\n            \"MasterUserPassword\": {},\n            \"Port\": {\n              \"type\": \"integer\"\n            },\n            \"BackupRetentionPeriod\": {\n              \"type\": \"integer\"\n            },\n            \"MultiAZ\": {\n              \"type\": \"boolean\"\n            },\n            \"EngineVersion\": {},\n            \"Iops\": {\n              \"type\": \"integer\"\n            },\n            \"DBInstanceIdentifier\": {}\n          }\n        },\n        \"LatestRestorableTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"MultiAZ\": {\n          \"type\": \"boolean\"\n        },\n        \"EngineVersion\": {},\n        \"AutoMinorVersionUpgrade\": {\n          \"type\": \"boolean\"\n        },\n        \"ReadReplicaSourceDBInstanceIdentifier\": {},\n        \"ReadReplicaDBInstanceIdentifiers\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"ReadReplicaDBInstanceIdentifier\"\n          }\n        },\n        \"LicenseModel\": {},\n        \"Iops\": {\n          \"type\": \"integer\"\n        },\n        \"OptionGroupMemberships\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"OptionGroupMembership\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"OptionGroupName\": {},\n              \"Status\": {}\n            }\n          }\n        },\n        \"CharacterSetName\": {},\n        \"SecondaryAvailabilityZone\": {},\n        \"PubliclyAccessible\": {\n          \"type\": \"boolean\"\n        },\n        \"StatusInfos\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"DBInstanceStatusInfo\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"StatusType\": {},\n              \"Normal\": {\n                \"type\": \"boolean\"\n              },\n              \"Status\": {},\n              \"Message\": {}\n            }\n          }\n        }\n      },\n      \"wrapper\": true\n    },\n    \"Sv\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"DBSecurityGroup\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"Status\": {}\n        }\n      }\n    },\n    \"Sx\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"VpcSecurityGroupMembership\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcSecurityGroupId\": {},\n          \"Status\": {}\n        }\n      }\n    },\n    \"S11\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBSubnetGroupName\": {},\n        \"DBSubnetGroupDescription\": {},\n        \"VpcId\": {},\n        \"SubnetGroupStatus\": {},\n        \"Subnets\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Subnet\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"SubnetIdentifier\": {},\n              \"SubnetAvailabilityZone\": {\n                \"shape\": \"S14\"\n              },\n              \"SubnetStatus\": {}\n            }\n          }\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S14\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Name\": {},\n        \"ProvisionedIopsCapable\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S1f\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBParameterGroupName\": {},\n        \"DBParameterGroupFamily\": {},\n        \"Description\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S1l\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SubnetIdentifier\"\n      }\n    },\n    \"S1r\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"OptionGroupName\": {},\n        \"OptionGroupDescription\": {},\n        \"EngineName\": {},\n        \"MajorEngineVersion\": {},\n        \"Options\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Option\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"OptionName\": {},\n              \"OptionDescription\": {},\n              \"Persistent\": {\n                \"type\": \"boolean\"\n              },\n              \"Permanent\": {\n                \"type\": \"boolean\"\n              },\n              \"Port\": {\n                \"type\": \"integer\"\n              },\n              \"OptionSettings\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"shape\": \"S1v\",\n                  \"locationName\": \"OptionSetting\"\n                }\n              },\n              \"DBSecurityGroupMemberships\": {\n                \"shape\": \"Sv\"\n              },\n              \"VpcSecurityGroupMemberships\": {\n                \"shape\": \"Sx\"\n              }\n            }\n          }\n        },\n        \"AllowsVpcAndNonVpcInstanceMemberships\": {\n          \"type\": \"boolean\"\n        },\n        \"VpcId\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S1v\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Name\": {},\n        \"Value\": {},\n        \"DefaultValue\": {},\n        \"Description\": {},\n        \"ApplyType\": {},\n        \"DataType\": {},\n        \"AllowedValues\": {},\n        \"IsModifiable\": {\n          \"type\": \"boolean\"\n        },\n        \"IsCollection\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S27\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Filter\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Values\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Values\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Value\"\n            }\n          }\n        }\n      }\n    },\n    \"S2d\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CharacterSetName\": {},\n        \"CharacterSetDescription\": {}\n      }\n    },\n    \"S2s\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Parameter\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ParameterName\": {},\n          \"ParameterValue\": {},\n          \"Description\": {},\n          \"Source\": {},\n          \"ApplyType\": {},\n          \"DataType\": {},\n          \"AllowedValues\": {},\n          \"IsModifiable\": {\n            \"type\": \"boolean\"\n          },\n          \"MinimumEngineVersion\": {},\n          \"ApplyMethod\": {}\n        }\n      }\n    },\n    \"S41\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ReservedDBInstanceId\": {},\n        \"ReservedDBInstancesOfferingId\": {},\n        \"DBInstanceClass\": {},\n        \"StartTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Duration\": {\n          \"type\": \"integer\"\n        },\n        \"FixedPrice\": {\n          \"type\": \"double\"\n        },\n        \"UsagePrice\": {\n          \"type\": \"double\"\n        },\n        \"CurrencyCode\": {},\n        \"DBInstanceCount\": {\n          \"type\": \"integer\"\n        },\n        \"ProductDescription\": {},\n        \"OfferingType\": {},\n        \"MultiAZ\": {\n          \"type\": \"boolean\"\n        },\n        \"State\": {},\n        \"RecurringCharges\": {\n          \"shape\": \"S43\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S43\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"RecurringCharge\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"RecurringChargeAmount\": {\n            \"type\": \"double\"\n          },\n          \"RecurringChargeFrequency\": {}\n        },\n        \"wrapper\": true\n      }\n    },\n    \"S4g\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBParameterGroupName\": {}\n      }\n    }\n  }\n}\n},{}],104:[function(require,module,exports){\narguments[4][102][0].apply(exports,arguments)\n},{\"dup\":102}],105:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"DBInstanceAvailable\": {\n      \"delay\": 30,\n      \"operation\": \"DescribeDBInstances\",\n      \"maxAttempts\": 60,\n      \"acceptors\": [\n        {\n          \"expected\": \"available\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"deleted\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"deleting\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"incompatible-restore\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"incompatible-parameters\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"incompatible-parameters\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"incompatible-restore\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        }\n      ]\n    },\n    \"DBInstanceDeleted\": {\n      \"delay\": 30,\n      \"operation\": \"DescribeDBInstances\",\n      \"maxAttempts\": 60,\n      \"acceptors\": [\n        {\n          \"expected\": \"deleted\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"creating\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"modifying\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"rebooting\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"resetting-master-credentials\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],106:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2014-10-31\",\n    \"endpointPrefix\": \"rds\",\n    \"protocol\": \"query\",\n    \"serviceAbbreviation\": \"Amazon RDS\",\n    \"serviceFullName\": \"Amazon Relational Database Service\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"rds-2014-10-31\",\n    \"xmlNamespace\": \"http://rds.amazonaws.com/doc/2014-10-31/\"\n  },\n  \"operations\": {\n    \"AddRoleToDBCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterIdentifier\",\n          \"RoleArn\"\n        ],\n        \"members\": {\n          \"DBClusterIdentifier\": {},\n          \"RoleArn\": {}\n        }\n      }\n    },\n    \"AddSourceIdentifierToSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\",\n          \"SourceIdentifier\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SourceIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AddSourceIdentifierToSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S5\"\n          }\n        }\n      }\n    },\n    \"AddTagsToResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"ResourceName\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      }\n    },\n    \"ApplyPendingMaintenanceAction\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceIdentifier\",\n          \"ApplyAction\",\n          \"OptInType\"\n        ],\n        \"members\": {\n          \"ResourceIdentifier\": {},\n          \"ApplyAction\": {},\n          \"OptInType\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ApplyPendingMaintenanceActionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourcePendingMaintenanceActions\": {\n            \"shape\": \"Se\"\n          }\n        }\n      }\n    },\n    \"AuthorizeDBSecurityGroupIngress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"CIDRIP\": {},\n          \"EC2SecurityGroupName\": {},\n          \"EC2SecurityGroupId\": {},\n          \"EC2SecurityGroupOwnerId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AuthorizeDBSecurityGroupIngressResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroup\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      }\n    },\n    \"CopyDBClusterParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceDBClusterParameterGroupIdentifier\",\n          \"TargetDBClusterParameterGroupIdentifier\",\n          \"TargetDBClusterParameterGroupDescription\"\n        ],\n        \"members\": {\n          \"SourceDBClusterParameterGroupIdentifier\": {},\n          \"TargetDBClusterParameterGroupIdentifier\": {},\n          \"TargetDBClusterParameterGroupDescription\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CopyDBClusterParameterGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBClusterParameterGroup\": {\n            \"shape\": \"Sr\"\n          }\n        }\n      }\n    },\n    \"CopyDBClusterSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceDBClusterSnapshotIdentifier\",\n          \"TargetDBClusterSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"SourceDBClusterSnapshotIdentifier\": {},\n          \"TargetDBClusterSnapshotIdentifier\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CopyDBClusterSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBClusterSnapshot\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"CopyDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceDBParameterGroupIdentifier\",\n          \"TargetDBParameterGroupIdentifier\",\n          \"TargetDBParameterGroupDescription\"\n        ],\n        \"members\": {\n          \"SourceDBParameterGroupIdentifier\": {},\n          \"TargetDBParameterGroupIdentifier\": {},\n          \"TargetDBParameterGroupDescription\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CopyDBParameterGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBParameterGroup\": {\n            \"shape\": \"Sz\"\n          }\n        }\n      }\n    },\n    \"CopyDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceDBSnapshotIdentifier\",\n          \"TargetDBSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"SourceDBSnapshotIdentifier\": {},\n          \"TargetDBSnapshotIdentifier\": {},\n          \"KmsKeyId\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          },\n          \"CopyTags\": {\n            \"type\": \"boolean\"\n          },\n          \"PreSignedUrl\": {},\n          \"SourceRegion\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CopyDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshot\": {\n            \"shape\": \"S13\"\n          }\n        }\n      }\n    },\n    \"CopyOptionGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceOptionGroupIdentifier\",\n          \"TargetOptionGroupIdentifier\",\n          \"TargetOptionGroupDescription\"\n        ],\n        \"members\": {\n          \"SourceOptionGroupIdentifier\": {},\n          \"TargetOptionGroupIdentifier\": {},\n          \"TargetOptionGroupDescription\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CopyOptionGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroup\": {\n            \"shape\": \"S17\"\n          }\n        }\n      }\n    },\n    \"CreateDBCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterIdentifier\",\n          \"Engine\"\n        ],\n        \"members\": {\n          \"AvailabilityZones\": {\n            \"shape\": \"Sv\"\n          },\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"CharacterSetName\": {},\n          \"DatabaseName\": {},\n          \"DBClusterIdentifier\": {},\n          \"DBClusterParameterGroupName\": {},\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"S1h\"\n          },\n          \"DBSubnetGroupName\": {},\n          \"Engine\": {},\n          \"EngineVersion\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"MasterUsername\": {},\n          \"MasterUserPassword\": {},\n          \"OptionGroupName\": {},\n          \"PreferredBackupWindow\": {},\n          \"PreferredMaintenanceWindow\": {},\n          \"ReplicationSourceIdentifier\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          },\n          \"StorageEncrypted\": {\n            \"type\": \"boolean\"\n          },\n          \"KmsKeyId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBClusterResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBCluster\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      }\n    },\n    \"CreateDBClusterParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterParameterGroupName\",\n          \"DBParameterGroupFamily\",\n          \"Description\"\n        ],\n        \"members\": {\n          \"DBClusterParameterGroupName\": {},\n          \"DBParameterGroupFamily\": {},\n          \"Description\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBClusterParameterGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBClusterParameterGroup\": {\n            \"shape\": \"Sr\"\n          }\n        }\n      }\n    },\n    \"CreateDBClusterSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterSnapshotIdentifier\",\n          \"DBClusterIdentifier\"\n        ],\n        \"members\": {\n          \"DBClusterSnapshotIdentifier\": {},\n          \"DBClusterIdentifier\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBClusterSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBClusterSnapshot\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"CreateDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"DBInstanceClass\",\n          \"Engine\"\n        ],\n        \"members\": {\n          \"DBName\": {},\n          \"DBInstanceIdentifier\": {},\n          \"AllocatedStorage\": {\n            \"type\": \"integer\"\n          },\n          \"DBInstanceClass\": {},\n          \"Engine\": {},\n          \"MasterUsername\": {},\n          \"MasterUserPassword\": {},\n          \"DBSecurityGroups\": {\n            \"shape\": \"S1w\"\n          },\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"S1h\"\n          },\n          \"AvailabilityZone\": {},\n          \"DBSubnetGroupName\": {},\n          \"PreferredMaintenanceWindow\": {},\n          \"DBParameterGroupName\": {},\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PreferredBackupWindow\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"EngineVersion\": {},\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"LicenseModel\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"CharacterSetName\": {},\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          },\n          \"DBClusterIdentifier\": {},\n          \"StorageType\": {},\n          \"TdeCredentialArn\": {},\n          \"TdeCredentialPassword\": {},\n          \"StorageEncrypted\": {\n            \"type\": \"boolean\"\n          },\n          \"KmsKeyId\": {},\n          \"Domain\": {},\n          \"CopyTagsToSnapshot\": {\n            \"type\": \"boolean\"\n          },\n          \"MonitoringInterval\": {\n            \"type\": \"integer\"\n          },\n          \"MonitoringRoleArn\": {},\n          \"DomainIAMRoleName\": {},\n          \"PromotionTier\": {\n            \"type\": \"integer\"\n          },\n          \"Timezone\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"CreateDBInstanceReadReplica\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"SourceDBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"SourceDBInstanceIdentifier\": {},\n          \"DBInstanceClass\": {},\n          \"AvailabilityZone\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          },\n          \"DBSubnetGroupName\": {},\n          \"StorageType\": {},\n          \"CopyTagsToSnapshot\": {\n            \"type\": \"boolean\"\n          },\n          \"MonitoringInterval\": {\n            \"type\": \"integer\"\n          },\n          \"MonitoringRoleArn\": {},\n          \"KmsKeyId\": {},\n          \"PreSignedUrl\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBInstanceReadReplicaResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"CreateDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\",\n          \"DBParameterGroupFamily\",\n          \"Description\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"DBParameterGroupFamily\": {},\n          \"Description\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBParameterGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBParameterGroup\": {\n            \"shape\": \"Sz\"\n          }\n        }\n      }\n    },\n    \"CreateDBSecurityGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\",\n          \"DBSecurityGroupDescription\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"DBSecurityGroupDescription\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBSecurityGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroup\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      }\n    },\n    \"CreateDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSnapshotIdentifier\",\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBSnapshotIdentifier\": {},\n          \"DBInstanceIdentifier\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshot\": {\n            \"shape\": \"S13\"\n          }\n        }\n      }\n    },\n    \"CreateDBSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSubnetGroupName\",\n          \"DBSubnetGroupDescription\",\n          \"SubnetIds\"\n        ],\n        \"members\": {\n          \"DBSubnetGroupName\": {},\n          \"DBSubnetGroupDescription\": {},\n          \"SubnetIds\": {\n            \"shape\": \"S2o\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateDBSubnetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSubnetGroup\": {\n            \"shape\": \"S22\"\n          }\n        }\n      }\n    },\n    \"CreateEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\",\n          \"SnsTopicArn\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SnsTopicArn\": {},\n          \"SourceType\": {},\n          \"EventCategories\": {\n            \"shape\": \"S7\"\n          },\n          \"SourceIds\": {\n            \"shape\": \"S6\"\n          },\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateEventSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S5\"\n          }\n        }\n      }\n    },\n    \"CreateOptionGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OptionGroupName\",\n          \"EngineName\",\n          \"MajorEngineVersion\",\n          \"OptionGroupDescription\"\n        ],\n        \"members\": {\n          \"OptionGroupName\": {},\n          \"EngineName\": {},\n          \"MajorEngineVersion\": {},\n          \"OptionGroupDescription\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateOptionGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroup\": {\n            \"shape\": \"S17\"\n          }\n        }\n      }\n    },\n    \"DeleteDBCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterIdentifier\"\n        ],\n        \"members\": {\n          \"DBClusterIdentifier\": {},\n          \"SkipFinalSnapshot\": {\n            \"type\": \"boolean\"\n          },\n          \"FinalDBSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteDBClusterResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBCluster\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      }\n    },\n    \"DeleteDBClusterParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBClusterParameterGroupName\": {}\n        }\n      }\n    },\n    \"DeleteDBClusterSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"DBClusterSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteDBClusterSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBClusterSnapshot\": {\n            \"shape\": \"Su\"\n          }\n        }\n      }\n    },\n    \"DeleteDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"SkipFinalSnapshot\": {\n            \"type\": \"boolean\"\n          },\n          \"FinalDBSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"DeleteDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {}\n        }\n      }\n    },\n    \"DeleteDBSecurityGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {}\n        }\n      }\n    },\n    \"DeleteDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"DBSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshot\": {\n            \"shape\": \"S13\"\n          }\n        }\n      }\n    },\n    \"DeleteDBSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSubnetGroupName\"\n        ],\n        \"members\": {\n          \"DBSubnetGroupName\": {}\n        }\n      }\n    },\n    \"DeleteEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteEventSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S5\"\n          }\n        }\n      }\n    },\n    \"DeleteOptionGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OptionGroupName\"\n        ],\n        \"members\": {\n          \"OptionGroupName\": {}\n        }\n      }\n    },\n    \"DescribeAccountAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeAccountAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"AccountQuotas\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"AccountQuota\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"AccountQuotaName\": {},\n                \"Used\": {\n                  \"type\": \"long\"\n                },\n                \"Max\": {\n                  \"type\": \"long\"\n                }\n              },\n              \"wrapper\": true\n            }\n          }\n        }\n      }\n    },\n    \"DescribeCertificates\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CertificateIdentifier\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeCertificatesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Certificates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Certificate\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"CertificateIdentifier\": {},\n                \"CertificateType\": {},\n                \"Thumbprint\": {},\n                \"ValidFrom\": {\n                  \"type\": \"timestamp\"\n                },\n                \"ValidTill\": {\n                  \"type\": \"timestamp\"\n                },\n                \"CertificateArn\": {}\n              },\n              \"wrapper\": true\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeDBClusterParameterGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBClusterParameterGroupName\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBClusterParameterGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBClusterParameterGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sr\",\n              \"locationName\": \"DBClusterParameterGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBClusterParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBClusterParameterGroupName\": {},\n          \"Source\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBClusterParametersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Parameters\": {\n            \"shape\": \"S3q\"\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeDBClusterSnapshotAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"DBClusterSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBClusterSnapshotAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBClusterSnapshotAttributesResult\": {\n            \"shape\": \"S3v\"\n          }\n        }\n      }\n    },\n    \"DescribeDBClusterSnapshots\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBClusterIdentifier\": {},\n          \"DBClusterSnapshotIdentifier\": {},\n          \"SnapshotType\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"IncludeShared\": {\n            \"type\": \"boolean\"\n          },\n          \"IncludePublic\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBClusterSnapshotsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBClusterSnapshots\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Su\",\n              \"locationName\": \"DBClusterSnapshot\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBClusters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBClusterIdentifier\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBClustersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBClusters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1j\",\n              \"locationName\": \"DBCluster\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBEngineVersions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Engine\": {},\n          \"EngineVersion\": {},\n          \"DBParameterGroupFamily\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"DefaultOnly\": {\n            \"type\": \"boolean\"\n          },\n          \"ListSupportedCharacterSets\": {\n            \"type\": \"boolean\"\n          },\n          \"ListSupportedTimezones\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBEngineVersionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBEngineVersions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"DBEngineVersion\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Engine\": {},\n                \"EngineVersion\": {},\n                \"DBParameterGroupFamily\": {},\n                \"DBEngineDescription\": {},\n                \"DBEngineVersionDescription\": {},\n                \"DefaultCharacterSet\": {\n                  \"shape\": \"S49\"\n                },\n                \"SupportedCharacterSets\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"shape\": \"S49\",\n                    \"locationName\": \"CharacterSet\"\n                  }\n                },\n                \"ValidUpgradeTarget\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"UpgradeTarget\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"Engine\": {},\n                      \"EngineVersion\": {},\n                      \"Description\": {},\n                      \"AutoUpgrade\": {\n                        \"type\": \"boolean\"\n                      },\n                      \"IsMajorVersionUpgrade\": {\n                        \"type\": \"boolean\"\n                      }\n                    }\n                  }\n                },\n                \"SupportedTimezones\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"Timezone\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"TimezoneName\": {}\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBInstancesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBInstances\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1y\",\n              \"locationName\": \"DBInstance\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBLogFiles\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"FilenameContains\": {},\n          \"FileLastWritten\": {\n            \"type\": \"long\"\n          },\n          \"FileSize\": {\n            \"type\": \"long\"\n          },\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBLogFilesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DescribeDBLogFiles\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"DescribeDBLogFilesDetails\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"LogFileName\": {},\n                \"LastWritten\": {\n                  \"type\": \"long\"\n                },\n                \"Size\": {\n                  \"type\": \"long\"\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeDBParameterGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBParameterGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBParameterGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sz\",\n              \"locationName\": \"DBParameterGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"Source\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBParametersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Parameters\": {\n            \"shape\": \"S3q\"\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeDBSecurityGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBSecurityGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBSecurityGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sk\",\n              \"locationName\": \"DBSecurityGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBSnapshotAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"DBSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBSnapshotAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshotAttributesResult\": {\n            \"shape\": \"S4w\"\n          }\n        }\n      }\n    },\n    \"DescribeDBSnapshots\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"DBSnapshotIdentifier\": {},\n          \"SnapshotType\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"IncludeShared\": {\n            \"type\": \"boolean\"\n          },\n          \"IncludePublic\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBSnapshotsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBSnapshots\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S13\",\n              \"locationName\": \"DBSnapshot\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDBSubnetGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSubnetGroupName\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDBSubnetGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"DBSubnetGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S22\",\n              \"locationName\": \"DBSubnetGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEngineDefaultClusterParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupFamily\"\n        ],\n        \"members\": {\n          \"DBParameterGroupFamily\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEngineDefaultClusterParametersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EngineDefaults\": {\n            \"shape\": \"S57\"\n          }\n        }\n      }\n    },\n    \"DescribeEngineDefaultParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupFamily\"\n        ],\n        \"members\": {\n          \"DBParameterGroupFamily\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEngineDefaultParametersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EngineDefaults\": {\n            \"shape\": \"S57\"\n          }\n        }\n      }\n    },\n    \"DescribeEventCategories\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SourceType\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventCategoriesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventCategoriesMapList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"EventCategoriesMap\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"SourceType\": {},\n                \"EventCategories\": {\n                  \"shape\": \"S7\"\n                }\n              },\n              \"wrapper\": true\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEventSubscriptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventSubscriptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"EventSubscriptionsList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S5\",\n              \"locationName\": \"EventSubscription\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEvents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SourceIdentifier\": {},\n          \"SourceType\": {},\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"Duration\": {\n            \"type\": \"integer\"\n          },\n          \"EventCategories\": {\n            \"shape\": \"S7\"\n          },\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"Events\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Event\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"SourceIdentifier\": {},\n                \"SourceType\": {},\n                \"Message\": {},\n                \"EventCategories\": {\n                  \"shape\": \"S7\"\n                },\n                \"Date\": {\n                  \"type\": \"timestamp\"\n                },\n                \"SourceArn\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeOptionGroupOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EngineName\"\n        ],\n        \"members\": {\n          \"EngineName\": {},\n          \"MajorEngineVersion\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeOptionGroupOptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroupOptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"OptionGroupOption\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Description\": {},\n                \"EngineName\": {},\n                \"MajorEngineVersion\": {},\n                \"MinimumRequiredMinorEngineVersion\": {},\n                \"PortRequired\": {\n                  \"type\": \"boolean\"\n                },\n                \"DefaultPort\": {\n                  \"type\": \"integer\"\n                },\n                \"OptionsDependedOn\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"OptionName\"\n                  }\n                },\n                \"OptionsConflictsWith\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"OptionConflictName\"\n                  }\n                },\n                \"Persistent\": {\n                  \"type\": \"boolean\"\n                },\n                \"Permanent\": {\n                  \"type\": \"boolean\"\n                },\n                \"OptionGroupOptionSettings\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"OptionGroupOptionSetting\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"SettingName\": {},\n                      \"SettingDescription\": {},\n                      \"DefaultValue\": {},\n                      \"ApplyType\": {},\n                      \"AllowedValues\": {},\n                      \"IsModifiable\": {\n                        \"type\": \"boolean\"\n                      }\n                    }\n                  }\n                },\n                \"OptionGroupOptionVersions\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"OptionVersion\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"Version\": {},\n                      \"IsDefault\": {\n                        \"type\": \"boolean\"\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeOptionGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroupName\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"Marker\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"EngineName\": {},\n          \"MajorEngineVersion\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeOptionGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroupsList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S17\",\n              \"locationName\": \"OptionGroup\"\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeOrderableDBInstanceOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Engine\"\n        ],\n        \"members\": {\n          \"Engine\": {},\n          \"EngineVersion\": {},\n          \"DBInstanceClass\": {},\n          \"LicenseModel\": {},\n          \"Vpc\": {\n            \"type\": \"boolean\"\n          },\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeOrderableDBInstanceOptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OrderableDBInstanceOptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"OrderableDBInstanceOption\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Engine\": {},\n                \"EngineVersion\": {},\n                \"DBInstanceClass\": {},\n                \"LicenseModel\": {},\n                \"AvailabilityZones\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"shape\": \"S25\",\n                    \"locationName\": \"AvailabilityZone\"\n                  }\n                },\n                \"MultiAZCapable\": {\n                  \"type\": \"boolean\"\n                },\n                \"ReadReplicaCapable\": {\n                  \"type\": \"boolean\"\n                },\n                \"Vpc\": {\n                  \"type\": \"boolean\"\n                },\n                \"SupportsStorageEncryption\": {\n                  \"type\": \"boolean\"\n                },\n                \"StorageType\": {},\n                \"SupportsIops\": {\n                  \"type\": \"boolean\"\n                },\n                \"SupportsEnhancedMonitoring\": {\n                  \"type\": \"boolean\"\n                }\n              },\n              \"wrapper\": true\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribePendingMaintenanceActions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourceIdentifier\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"Marker\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribePendingMaintenanceActionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"PendingMaintenanceActions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Se\",\n              \"locationName\": \"ResourcePendingMaintenanceActions\"\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeReservedDBInstances\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedDBInstanceId\": {},\n          \"ReservedDBInstancesOfferingId\": {},\n          \"DBInstanceClass\": {},\n          \"Duration\": {},\n          \"ProductDescription\": {},\n          \"OfferingType\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReservedDBInstancesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ReservedDBInstances\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S6a\",\n              \"locationName\": \"ReservedDBInstance\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeReservedDBInstancesOfferings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedDBInstancesOfferingId\": {},\n          \"DBInstanceClass\": {},\n          \"Duration\": {},\n          \"ProductDescription\": {},\n          \"OfferingType\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReservedDBInstancesOfferingsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ReservedDBInstancesOfferings\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ReservedDBInstancesOffering\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ReservedDBInstancesOfferingId\": {},\n                \"DBInstanceClass\": {},\n                \"Duration\": {\n                  \"type\": \"integer\"\n                },\n                \"FixedPrice\": {\n                  \"type\": \"double\"\n                },\n                \"UsagePrice\": {\n                  \"type\": \"double\"\n                },\n                \"CurrencyCode\": {},\n                \"ProductDescription\": {},\n                \"OfferingType\": {},\n                \"MultiAZ\": {\n                  \"type\": \"boolean\"\n                },\n                \"RecurringCharges\": {\n                  \"shape\": \"S6c\"\n                }\n              },\n              \"wrapper\": true\n            }\n          }\n        }\n      }\n    },\n    \"DescribeSourceRegions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RegionName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeSourceRegionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"SourceRegions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"SourceRegion\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"RegionName\": {},\n                \"Endpoint\": {},\n                \"Status\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DownloadDBLogFilePortion\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"LogFileName\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"LogFileName\": {},\n          \"Marker\": {},\n          \"NumberOfLines\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DownloadDBLogFilePortionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"LogFileData\": {},\n          \"Marker\": {},\n          \"AdditionalDataPending\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"FailoverDBCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBClusterIdentifier\": {},\n          \"TargetDBInstanceIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"FailoverDBClusterResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBCluster\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      }\n    },\n    \"ListTagsForResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\"\n        ],\n        \"members\": {\n          \"ResourceName\": {},\n          \"Filters\": {\n            \"shape\": \"S3f\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListTagsForResourceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TagList\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      }\n    },\n    \"ModifyDBCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterIdentifier\"\n        ],\n        \"members\": {\n          \"DBClusterIdentifier\": {},\n          \"NewDBClusterIdentifier\": {},\n          \"ApplyImmediately\": {\n            \"type\": \"boolean\"\n          },\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"DBClusterParameterGroupName\": {},\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"S1h\"\n          },\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"MasterUserPassword\": {},\n          \"OptionGroupName\": {},\n          \"PreferredBackupWindow\": {},\n          \"PreferredMaintenanceWindow\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyDBClusterResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBCluster\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      }\n    },\n    \"ModifyDBClusterParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterParameterGroupName\",\n          \"Parameters\"\n        ],\n        \"members\": {\n          \"DBClusterParameterGroupName\": {},\n          \"Parameters\": {\n            \"shape\": \"S3q\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S6v\",\n        \"resultWrapper\": \"ModifyDBClusterParameterGroupResult\"\n      }\n    },\n    \"ModifyDBClusterSnapshotAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterSnapshotIdentifier\",\n          \"AttributeName\"\n        ],\n        \"members\": {\n          \"DBClusterSnapshotIdentifier\": {},\n          \"AttributeName\": {},\n          \"ValuesToAdd\": {\n            \"shape\": \"S3y\"\n          },\n          \"ValuesToRemove\": {\n            \"shape\": \"S3y\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyDBClusterSnapshotAttributeResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBClusterSnapshotAttributesResult\": {\n            \"shape\": \"S3v\"\n          }\n        }\n      }\n    },\n    \"ModifyDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"AllocatedStorage\": {\n            \"type\": \"integer\"\n          },\n          \"DBInstanceClass\": {},\n          \"DBSubnetGroupName\": {},\n          \"DBSecurityGroups\": {\n            \"shape\": \"S1w\"\n          },\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"S1h\"\n          },\n          \"ApplyImmediately\": {\n            \"type\": \"boolean\"\n          },\n          \"MasterUserPassword\": {},\n          \"DBParameterGroupName\": {},\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PreferredBackupWindow\": {},\n          \"PreferredMaintenanceWindow\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"EngineVersion\": {},\n          \"AllowMajorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"LicenseModel\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"NewDBInstanceIdentifier\": {},\n          \"StorageType\": {},\n          \"TdeCredentialArn\": {},\n          \"TdeCredentialPassword\": {},\n          \"CACertificateIdentifier\": {},\n          \"Domain\": {},\n          \"CopyTagsToSnapshot\": {\n            \"type\": \"boolean\"\n          },\n          \"MonitoringInterval\": {\n            \"type\": \"integer\"\n          },\n          \"DBPortNumber\": {\n            \"type\": \"integer\"\n          },\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"MonitoringRoleArn\": {},\n          \"DomainIAMRoleName\": {},\n          \"PromotionTier\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"ModifyDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\",\n          \"Parameters\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"Parameters\": {\n            \"shape\": \"S3q\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S71\",\n        \"resultWrapper\": \"ModifyDBParameterGroupResult\"\n      }\n    },\n    \"ModifyDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"DBSnapshotIdentifier\": {},\n          \"EngineVersion\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshot\": {\n            \"shape\": \"S13\"\n          }\n        }\n      }\n    },\n    \"ModifyDBSnapshotAttribute\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSnapshotIdentifier\",\n          \"AttributeName\"\n        ],\n        \"members\": {\n          \"DBSnapshotIdentifier\": {},\n          \"AttributeName\": {},\n          \"ValuesToAdd\": {\n            \"shape\": \"S3y\"\n          },\n          \"ValuesToRemove\": {\n            \"shape\": \"S3y\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyDBSnapshotAttributeResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSnapshotAttributesResult\": {\n            \"shape\": \"S4w\"\n          }\n        }\n      }\n    },\n    \"ModifyDBSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSubnetGroupName\",\n          \"SubnetIds\"\n        ],\n        \"members\": {\n          \"DBSubnetGroupName\": {},\n          \"DBSubnetGroupDescription\": {},\n          \"SubnetIds\": {\n            \"shape\": \"S2o\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyDBSubnetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSubnetGroup\": {\n            \"shape\": \"S22\"\n          }\n        }\n      }\n    },\n    \"ModifyEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SnsTopicArn\": {},\n          \"SourceType\": {},\n          \"EventCategories\": {\n            \"shape\": \"S7\"\n          },\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyEventSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S5\"\n          }\n        }\n      }\n    },\n    \"ModifyOptionGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OptionGroupName\"\n        ],\n        \"members\": {\n          \"OptionGroupName\": {},\n          \"OptionsToInclude\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"OptionConfiguration\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"OptionName\"\n              ],\n              \"members\": {\n                \"OptionName\": {},\n                \"Port\": {\n                  \"type\": \"integer\"\n                },\n                \"OptionVersion\": {},\n                \"DBSecurityGroupMemberships\": {\n                  \"shape\": \"S1w\"\n                },\n                \"VpcSecurityGroupMemberships\": {\n                  \"shape\": \"S1h\"\n                },\n                \"OptionSettings\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"shape\": \"S1b\",\n                    \"locationName\": \"OptionSetting\"\n                  }\n                }\n              }\n            }\n          },\n          \"OptionsToRemove\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"ApplyImmediately\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyOptionGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OptionGroup\": {\n            \"shape\": \"S17\"\n          }\n        }\n      }\n    },\n    \"PromoteReadReplica\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PreferredBackupWindow\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PromoteReadReplicaResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"PromoteReadReplicaDBCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterIdentifier\"\n        ],\n        \"members\": {\n          \"DBClusterIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PromoteReadReplicaDBClusterResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBCluster\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      }\n    },\n    \"PurchaseReservedDBInstancesOffering\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReservedDBInstancesOfferingId\"\n        ],\n        \"members\": {\n          \"ReservedDBInstancesOfferingId\": {},\n          \"ReservedDBInstanceId\": {},\n          \"DBInstanceCount\": {\n            \"type\": \"integer\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PurchaseReservedDBInstancesOfferingResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedDBInstance\": {\n            \"shape\": \"S6a\"\n          }\n        }\n      }\n    },\n    \"RebootDBInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"ForceFailover\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RebootDBInstanceResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"RemoveRoleFromDBCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterIdentifier\",\n          \"RoleArn\"\n        ],\n        \"members\": {\n          \"DBClusterIdentifier\": {},\n          \"RoleArn\": {}\n        }\n      }\n    },\n    \"RemoveSourceIdentifierFromSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\",\n          \"SourceIdentifier\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SourceIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RemoveSourceIdentifierFromSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S5\"\n          }\n        }\n      }\n    },\n    \"RemoveTagsFromResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\",\n          \"TagKeys\"\n        ],\n        \"members\": {\n          \"ResourceName\": {},\n          \"TagKeys\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"ResetDBClusterParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBClusterParameterGroupName\": {},\n          \"ResetAllParameters\": {\n            \"type\": \"boolean\"\n          },\n          \"Parameters\": {\n            \"shape\": \"S3q\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S6v\",\n        \"resultWrapper\": \"ResetDBClusterParameterGroupResult\"\n      }\n    },\n    \"ResetDBParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBParameterGroupName\"\n        ],\n        \"members\": {\n          \"DBParameterGroupName\": {},\n          \"ResetAllParameters\": {\n            \"type\": \"boolean\"\n          },\n          \"Parameters\": {\n            \"shape\": \"S3q\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S71\",\n        \"resultWrapper\": \"ResetDBParameterGroupResult\"\n      }\n    },\n    \"RestoreDBClusterFromS3\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterIdentifier\",\n          \"Engine\",\n          \"MasterUsername\",\n          \"MasterUserPassword\",\n          \"SourceEngine\",\n          \"SourceEngineVersion\",\n          \"S3BucketName\",\n          \"S3IngestionRoleArn\"\n        ],\n        \"members\": {\n          \"AvailabilityZones\": {\n            \"shape\": \"Sv\"\n          },\n          \"BackupRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"CharacterSetName\": {},\n          \"DatabaseName\": {},\n          \"DBClusterIdentifier\": {},\n          \"DBClusterParameterGroupName\": {},\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"S1h\"\n          },\n          \"DBSubnetGroupName\": {},\n          \"Engine\": {},\n          \"EngineVersion\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"MasterUsername\": {},\n          \"MasterUserPassword\": {},\n          \"OptionGroupName\": {},\n          \"PreferredBackupWindow\": {},\n          \"PreferredMaintenanceWindow\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          },\n          \"StorageEncrypted\": {\n            \"type\": \"boolean\"\n          },\n          \"KmsKeyId\": {},\n          \"SourceEngine\": {},\n          \"SourceEngineVersion\": {},\n          \"S3BucketName\": {},\n          \"S3Prefix\": {},\n          \"S3IngestionRoleArn\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RestoreDBClusterFromS3Result\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBCluster\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      }\n    },\n    \"RestoreDBClusterFromSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterIdentifier\",\n          \"SnapshotIdentifier\",\n          \"Engine\"\n        ],\n        \"members\": {\n          \"AvailabilityZones\": {\n            \"shape\": \"Sv\"\n          },\n          \"DBClusterIdentifier\": {},\n          \"SnapshotIdentifier\": {},\n          \"Engine\": {},\n          \"EngineVersion\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"DBSubnetGroupName\": {},\n          \"DatabaseName\": {},\n          \"OptionGroupName\": {},\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"S1h\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          },\n          \"KmsKeyId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RestoreDBClusterFromSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBCluster\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      }\n    },\n    \"RestoreDBClusterToPointInTime\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBClusterIdentifier\",\n          \"SourceDBClusterIdentifier\"\n        ],\n        \"members\": {\n          \"DBClusterIdentifier\": {},\n          \"SourceDBClusterIdentifier\": {},\n          \"RestoreToTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"UseLatestRestorableTime\": {\n            \"type\": \"boolean\"\n          },\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"DBSubnetGroupName\": {},\n          \"OptionGroupName\": {},\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"S1h\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          },\n          \"KmsKeyId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RestoreDBClusterToPointInTimeResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBCluster\": {\n            \"shape\": \"S1j\"\n          }\n        }\n      }\n    },\n    \"RestoreDBInstanceFromDBSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBInstanceIdentifier\",\n          \"DBSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"DBInstanceIdentifier\": {},\n          \"DBSnapshotIdentifier\": {},\n          \"DBInstanceClass\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"AvailabilityZone\": {},\n          \"DBSubnetGroupName\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"LicenseModel\": {},\n          \"DBName\": {},\n          \"Engine\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          },\n          \"StorageType\": {},\n          \"TdeCredentialArn\": {},\n          \"TdeCredentialPassword\": {},\n          \"Domain\": {},\n          \"CopyTagsToSnapshot\": {\n            \"type\": \"boolean\"\n          },\n          \"DomainIAMRoleName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RestoreDBInstanceFromDBSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"RestoreDBInstanceToPointInTime\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceDBInstanceIdentifier\",\n          \"TargetDBInstanceIdentifier\"\n        ],\n        \"members\": {\n          \"SourceDBInstanceIdentifier\": {},\n          \"TargetDBInstanceIdentifier\": {},\n          \"RestoreTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"UseLatestRestorableTime\": {\n            \"type\": \"boolean\"\n          },\n          \"DBInstanceClass\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"AvailabilityZone\": {},\n          \"DBSubnetGroupName\": {},\n          \"MultiAZ\": {\n            \"type\": \"boolean\"\n          },\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"AutoMinorVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"LicenseModel\": {},\n          \"DBName\": {},\n          \"Engine\": {},\n          \"Iops\": {\n            \"type\": \"integer\"\n          },\n          \"OptionGroupName\": {},\n          \"CopyTagsToSnapshot\": {\n            \"type\": \"boolean\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sa\"\n          },\n          \"StorageType\": {},\n          \"TdeCredentialArn\": {},\n          \"TdeCredentialPassword\": {},\n          \"Domain\": {},\n          \"DomainIAMRoleName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RestoreDBInstanceToPointInTimeResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBInstance\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"RevokeDBSecurityGroupIngress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DBSecurityGroupName\"\n        ],\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"CIDRIP\": {},\n          \"EC2SecurityGroupName\": {},\n          \"EC2SecurityGroupId\": {},\n          \"EC2SecurityGroupOwnerId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RevokeDBSecurityGroupIngressResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroup\": {\n            \"shape\": \"Sk\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S5\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CustomerAwsId\": {},\n        \"CustSubscriptionId\": {},\n        \"SnsTopicArn\": {},\n        \"Status\": {},\n        \"SubscriptionCreationTime\": {},\n        \"SourceType\": {},\n        \"SourceIdsList\": {\n          \"shape\": \"S6\"\n        },\n        \"EventCategoriesList\": {\n          \"shape\": \"S7\"\n        },\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        },\n        \"EventSubscriptionArn\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S6\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SourceId\"\n      }\n    },\n    \"S7\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"EventCategory\"\n      }\n    },\n    \"Sa\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Tag\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"Se\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ResourceIdentifier\": {},\n        \"PendingMaintenanceActionDetails\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"PendingMaintenanceAction\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Action\": {},\n              \"AutoAppliedAfterDate\": {\n                \"type\": \"timestamp\"\n              },\n              \"ForcedApplyDate\": {\n                \"type\": \"timestamp\"\n              },\n              \"OptInStatus\": {},\n              \"CurrentApplyDate\": {\n                \"type\": \"timestamp\"\n              },\n              \"Description\": {}\n            }\n          }\n        }\n      },\n      \"wrapper\": true\n    },\n    \"Sk\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"OwnerId\": {},\n        \"DBSecurityGroupName\": {},\n        \"DBSecurityGroupDescription\": {},\n        \"VpcId\": {},\n        \"EC2SecurityGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"EC2SecurityGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Status\": {},\n              \"EC2SecurityGroupName\": {},\n              \"EC2SecurityGroupId\": {},\n              \"EC2SecurityGroupOwnerId\": {}\n            }\n          }\n        },\n        \"IPRanges\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"IPRange\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Status\": {},\n              \"CIDRIP\": {}\n            }\n          }\n        },\n        \"DBSecurityGroupArn\": {}\n      },\n      \"wrapper\": true\n    },\n    \"Sr\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBClusterParameterGroupName\": {},\n        \"DBParameterGroupFamily\": {},\n        \"Description\": {},\n        \"DBClusterParameterGroupArn\": {}\n      },\n      \"wrapper\": true\n    },\n    \"Su\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AvailabilityZones\": {\n          \"shape\": \"Sv\"\n        },\n        \"DBClusterSnapshotIdentifier\": {},\n        \"DBClusterIdentifier\": {},\n        \"SnapshotCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Engine\": {},\n        \"AllocatedStorage\": {\n          \"type\": \"integer\"\n        },\n        \"Status\": {},\n        \"Port\": {\n          \"type\": \"integer\"\n        },\n        \"VpcId\": {},\n        \"ClusterCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"MasterUsername\": {},\n        \"EngineVersion\": {},\n        \"LicenseModel\": {},\n        \"SnapshotType\": {},\n        \"PercentProgress\": {\n          \"type\": \"integer\"\n        },\n        \"StorageEncrypted\": {\n          \"type\": \"boolean\"\n        },\n        \"KmsKeyId\": {},\n        \"DBClusterSnapshotArn\": {}\n      },\n      \"wrapper\": true\n    },\n    \"Sv\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"AvailabilityZone\"\n      }\n    },\n    \"Sz\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBParameterGroupName\": {},\n        \"DBParameterGroupFamily\": {},\n        \"Description\": {},\n        \"DBParameterGroupArn\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S13\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBSnapshotIdentifier\": {},\n        \"DBInstanceIdentifier\": {},\n        \"SnapshotCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Engine\": {},\n        \"AllocatedStorage\": {\n          \"type\": \"integer\"\n        },\n        \"Status\": {},\n        \"Port\": {\n          \"type\": \"integer\"\n        },\n        \"AvailabilityZone\": {},\n        \"VpcId\": {},\n        \"InstanceCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"MasterUsername\": {},\n        \"EngineVersion\": {},\n        \"LicenseModel\": {},\n        \"SnapshotType\": {},\n        \"Iops\": {\n          \"type\": \"integer\"\n        },\n        \"OptionGroupName\": {},\n        \"PercentProgress\": {\n          \"type\": \"integer\"\n        },\n        \"SourceRegion\": {},\n        \"SourceDBSnapshotIdentifier\": {},\n        \"StorageType\": {},\n        \"TdeCredentialArn\": {},\n        \"Encrypted\": {\n          \"type\": \"boolean\"\n        },\n        \"KmsKeyId\": {},\n        \"DBSnapshotArn\": {},\n        \"Timezone\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S17\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"OptionGroupName\": {},\n        \"OptionGroupDescription\": {},\n        \"EngineName\": {},\n        \"MajorEngineVersion\": {},\n        \"Options\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Option\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"OptionName\": {},\n              \"OptionDescription\": {},\n              \"Persistent\": {\n                \"type\": \"boolean\"\n              },\n              \"Permanent\": {\n                \"type\": \"boolean\"\n              },\n              \"Port\": {\n                \"type\": \"integer\"\n              },\n              \"OptionVersion\": {},\n              \"OptionSettings\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"shape\": \"S1b\",\n                  \"locationName\": \"OptionSetting\"\n                }\n              },\n              \"DBSecurityGroupMemberships\": {\n                \"shape\": \"S1c\"\n              },\n              \"VpcSecurityGroupMemberships\": {\n                \"shape\": \"S1e\"\n              }\n            }\n          }\n        },\n        \"AllowsVpcAndNonVpcInstanceMemberships\": {\n          \"type\": \"boolean\"\n        },\n        \"VpcId\": {},\n        \"OptionGroupArn\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S1b\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Name\": {},\n        \"Value\": {},\n        \"DefaultValue\": {},\n        \"Description\": {},\n        \"ApplyType\": {},\n        \"DataType\": {},\n        \"AllowedValues\": {},\n        \"IsModifiable\": {\n          \"type\": \"boolean\"\n        },\n        \"IsCollection\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S1c\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"DBSecurityGroup\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DBSecurityGroupName\": {},\n          \"Status\": {}\n        }\n      }\n    },\n    \"S1e\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"VpcSecurityGroupMembership\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"VpcSecurityGroupId\": {},\n          \"Status\": {}\n        }\n      }\n    },\n    \"S1h\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"VpcSecurityGroupId\"\n      }\n    },\n    \"S1j\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"AllocatedStorage\": {\n          \"type\": \"integer\"\n        },\n        \"AvailabilityZones\": {\n          \"shape\": \"Sv\"\n        },\n        \"BackupRetentionPeriod\": {\n          \"type\": \"integer\"\n        },\n        \"CharacterSetName\": {},\n        \"DatabaseName\": {},\n        \"DBClusterIdentifier\": {},\n        \"DBClusterParameterGroup\": {},\n        \"DBSubnetGroup\": {},\n        \"Status\": {},\n        \"PercentProgress\": {},\n        \"EarliestRestorableTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Endpoint\": {},\n        \"ReaderEndpoint\": {},\n        \"MultiAZ\": {\n          \"type\": \"boolean\"\n        },\n        \"Engine\": {},\n        \"EngineVersion\": {},\n        \"LatestRestorableTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Port\": {\n          \"type\": \"integer\"\n        },\n        \"MasterUsername\": {},\n        \"DBClusterOptionGroupMemberships\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"DBClusterOptionGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"DBClusterOptionGroupName\": {},\n              \"Status\": {}\n            }\n          }\n        },\n        \"PreferredBackupWindow\": {},\n        \"PreferredMaintenanceWindow\": {},\n        \"ReplicationSourceIdentifier\": {},\n        \"ReadReplicaIdentifiers\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"ReadReplicaIdentifier\"\n          }\n        },\n        \"DBClusterMembers\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"DBClusterMember\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"DBInstanceIdentifier\": {},\n              \"IsClusterWriter\": {\n                \"type\": \"boolean\"\n              },\n              \"DBClusterParameterGroupStatus\": {},\n              \"PromotionTier\": {\n                \"type\": \"integer\"\n              }\n            },\n            \"wrapper\": true\n          }\n        },\n        \"VpcSecurityGroups\": {\n          \"shape\": \"S1e\"\n        },\n        \"HostedZoneId\": {},\n        \"StorageEncrypted\": {\n          \"type\": \"boolean\"\n        },\n        \"KmsKeyId\": {},\n        \"DbClusterResourceId\": {},\n        \"DBClusterArn\": {},\n        \"AssociatedRoles\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"DBClusterRole\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"RoleArn\": {},\n              \"Status\": {}\n            }\n          }\n        },\n        \"ClusterCreateTime\": {\n          \"type\": \"timestamp\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S1w\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"DBSecurityGroupName\"\n      }\n    },\n    \"S1y\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBInstanceIdentifier\": {},\n        \"DBInstanceClass\": {},\n        \"Engine\": {},\n        \"DBInstanceStatus\": {},\n        \"MasterUsername\": {},\n        \"DBName\": {},\n        \"Endpoint\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Address\": {},\n            \"Port\": {\n              \"type\": \"integer\"\n            },\n            \"HostedZoneId\": {}\n          }\n        },\n        \"AllocatedStorage\": {\n          \"type\": \"integer\"\n        },\n        \"InstanceCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"PreferredBackupWindow\": {},\n        \"BackupRetentionPeriod\": {\n          \"type\": \"integer\"\n        },\n        \"DBSecurityGroups\": {\n          \"shape\": \"S1c\"\n        },\n        \"VpcSecurityGroups\": {\n          \"shape\": \"S1e\"\n        },\n        \"DBParameterGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"DBParameterGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"DBParameterGroupName\": {},\n              \"ParameterApplyStatus\": {}\n            }\n          }\n        },\n        \"AvailabilityZone\": {},\n        \"DBSubnetGroup\": {\n          \"shape\": \"S22\"\n        },\n        \"PreferredMaintenanceWindow\": {},\n        \"PendingModifiedValues\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"DBInstanceClass\": {},\n            \"AllocatedStorage\": {\n              \"type\": \"integer\"\n            },\n            \"MasterUserPassword\": {},\n            \"Port\": {\n              \"type\": \"integer\"\n            },\n            \"BackupRetentionPeriod\": {\n              \"type\": \"integer\"\n            },\n            \"MultiAZ\": {\n              \"type\": \"boolean\"\n            },\n            \"EngineVersion\": {},\n            \"LicenseModel\": {},\n            \"Iops\": {\n              \"type\": \"integer\"\n            },\n            \"DBInstanceIdentifier\": {},\n            \"StorageType\": {},\n            \"CACertificateIdentifier\": {},\n            \"DBSubnetGroupName\": {}\n          }\n        },\n        \"LatestRestorableTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"MultiAZ\": {\n          \"type\": \"boolean\"\n        },\n        \"EngineVersion\": {},\n        \"AutoMinorVersionUpgrade\": {\n          \"type\": \"boolean\"\n        },\n        \"ReadReplicaSourceDBInstanceIdentifier\": {},\n        \"ReadReplicaDBInstanceIdentifiers\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"ReadReplicaDBInstanceIdentifier\"\n          }\n        },\n        \"ReadReplicaDBClusterIdentifiers\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"ReadReplicaDBClusterIdentifier\"\n          }\n        },\n        \"LicenseModel\": {},\n        \"Iops\": {\n          \"type\": \"integer\"\n        },\n        \"OptionGroupMemberships\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"OptionGroupMembership\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"OptionGroupName\": {},\n              \"Status\": {}\n            }\n          }\n        },\n        \"CharacterSetName\": {},\n        \"SecondaryAvailabilityZone\": {},\n        \"PubliclyAccessible\": {\n          \"type\": \"boolean\"\n        },\n        \"StatusInfos\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"DBInstanceStatusInfo\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"StatusType\": {},\n              \"Normal\": {\n                \"type\": \"boolean\"\n              },\n              \"Status\": {},\n              \"Message\": {}\n            }\n          }\n        },\n        \"StorageType\": {},\n        \"TdeCredentialArn\": {},\n        \"DbInstancePort\": {\n          \"type\": \"integer\"\n        },\n        \"DBClusterIdentifier\": {},\n        \"StorageEncrypted\": {\n          \"type\": \"boolean\"\n        },\n        \"KmsKeyId\": {},\n        \"DbiResourceId\": {},\n        \"CACertificateIdentifier\": {},\n        \"DomainMemberships\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"DomainMembership\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Domain\": {},\n              \"Status\": {},\n              \"FQDN\": {},\n              \"IAMRoleName\": {}\n            }\n          }\n        },\n        \"CopyTagsToSnapshot\": {\n          \"type\": \"boolean\"\n        },\n        \"MonitoringInterval\": {\n          \"type\": \"integer\"\n        },\n        \"EnhancedMonitoringResourceArn\": {},\n        \"MonitoringRoleArn\": {},\n        \"PromotionTier\": {\n          \"type\": \"integer\"\n        },\n        \"DBInstanceArn\": {},\n        \"Timezone\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S22\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBSubnetGroupName\": {},\n        \"DBSubnetGroupDescription\": {},\n        \"VpcId\": {},\n        \"SubnetGroupStatus\": {},\n        \"Subnets\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Subnet\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"SubnetIdentifier\": {},\n              \"SubnetAvailabilityZone\": {\n                \"shape\": \"S25\"\n              },\n              \"SubnetStatus\": {}\n            }\n          }\n        },\n        \"DBSubnetGroupArn\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S25\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Name\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S2o\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SubnetIdentifier\"\n      }\n    },\n    \"S3f\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Filter\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Values\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Values\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Value\"\n            }\n          }\n        }\n      }\n    },\n    \"S3q\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Parameter\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ParameterName\": {},\n          \"ParameterValue\": {},\n          \"Description\": {},\n          \"Source\": {},\n          \"ApplyType\": {},\n          \"DataType\": {},\n          \"AllowedValues\": {},\n          \"IsModifiable\": {\n            \"type\": \"boolean\"\n          },\n          \"MinimumEngineVersion\": {},\n          \"ApplyMethod\": {}\n        }\n      }\n    },\n    \"S3v\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBClusterSnapshotIdentifier\": {},\n        \"DBClusterSnapshotAttributes\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"DBClusterSnapshotAttribute\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"AttributeName\": {},\n              \"AttributeValues\": {\n                \"shape\": \"S3y\"\n              }\n            }\n          }\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S3y\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"AttributeValue\"\n      }\n    },\n    \"S49\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CharacterSetName\": {},\n        \"CharacterSetDescription\": {}\n      }\n    },\n    \"S4w\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBSnapshotIdentifier\": {},\n        \"DBSnapshotAttributes\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"DBSnapshotAttribute\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"AttributeName\": {},\n              \"AttributeValues\": {\n                \"shape\": \"S3y\"\n              }\n            },\n            \"wrapper\": true\n          }\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S57\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBParameterGroupFamily\": {},\n        \"Marker\": {},\n        \"Parameters\": {\n          \"shape\": \"S3q\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S6a\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ReservedDBInstanceId\": {},\n        \"ReservedDBInstancesOfferingId\": {},\n        \"DBInstanceClass\": {},\n        \"StartTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Duration\": {\n          \"type\": \"integer\"\n        },\n        \"FixedPrice\": {\n          \"type\": \"double\"\n        },\n        \"UsagePrice\": {\n          \"type\": \"double\"\n        },\n        \"CurrencyCode\": {},\n        \"DBInstanceCount\": {\n          \"type\": \"integer\"\n        },\n        \"ProductDescription\": {},\n        \"OfferingType\": {},\n        \"MultiAZ\": {\n          \"type\": \"boolean\"\n        },\n        \"State\": {},\n        \"RecurringCharges\": {\n          \"shape\": \"S6c\"\n        },\n        \"ReservedDBInstanceArn\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S6c\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"RecurringCharge\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"RecurringChargeAmount\": {\n            \"type\": \"double\"\n          },\n          \"RecurringChargeFrequency\": {}\n        },\n        \"wrapper\": true\n      }\n    },\n    \"S6v\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBClusterParameterGroupName\": {}\n      }\n    },\n    \"S71\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DBParameterGroupName\": {}\n      }\n    }\n  }\n}\n},{}],107:[function(require,module,exports){\narguments[4][102][0].apply(exports,arguments)\n},{\"dup\":102}],108:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"DBInstanceAvailable\": {\n      \"delay\": 30,\n      \"operation\": \"DescribeDBInstances\",\n      \"maxAttempts\": 60,\n      \"acceptors\": [\n        {\n          \"expected\": \"available\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"deleted\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"deleting\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"incompatible-restore\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"incompatible-parameters\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        }\n      ]\n    },\n    \"DBInstanceDeleted\": {\n      \"delay\": 30,\n      \"operation\": \"DescribeDBInstances\",\n      \"maxAttempts\": 60,\n      \"acceptors\": [\n        {\n          \"expected\": \"deleted\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"DBInstanceNotFound\",\n          \"matcher\": \"error\",\n          \"state\": \"success\"\n        },\n        {\n          \"expected\": \"creating\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"modifying\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"rebooting\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        },\n        {\n          \"expected\": \"resetting-master-credentials\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"DBInstances[].DBInstanceStatus\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],109:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"redshift-2012-12-01\",\n    \"apiVersion\": \"2012-12-01\",\n    \"endpointPrefix\": \"redshift\",\n    \"protocol\": \"query\",\n    \"serviceFullName\": \"Amazon Redshift\",\n    \"signatureVersion\": \"v4\",\n    \"xmlNamespace\": \"http://redshift.amazonaws.com/doc/2012-12-01/\"\n  },\n  \"operations\": {\n    \"AuthorizeClusterSecurityGroupIngress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterSecurityGroupName\"\n        ],\n        \"members\": {\n          \"ClusterSecurityGroupName\": {},\n          \"CIDRIP\": {},\n          \"EC2SecurityGroupName\": {},\n          \"EC2SecurityGroupOwnerId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AuthorizeClusterSecurityGroupIngressResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterSecurityGroup\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"AuthorizeSnapshotAccess\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SnapshotIdentifier\",\n          \"AccountWithRestoreAccess\"\n        ],\n        \"members\": {\n          \"SnapshotIdentifier\": {},\n          \"SnapshotClusterIdentifier\": {},\n          \"AccountWithRestoreAccess\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AuthorizeSnapshotAccessResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Snapshot\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"CopyClusterSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceSnapshotIdentifier\",\n          \"TargetSnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"SourceSnapshotIdentifier\": {},\n          \"SourceSnapshotClusterIdentifier\": {},\n          \"TargetSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CopyClusterSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Snapshot\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"CreateCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\",\n          \"NodeType\",\n          \"MasterUsername\",\n          \"MasterUserPassword\"\n        ],\n        \"members\": {\n          \"DBName\": {},\n          \"ClusterIdentifier\": {},\n          \"ClusterType\": {},\n          \"NodeType\": {},\n          \"MasterUsername\": {},\n          \"MasterUserPassword\": {},\n          \"ClusterSecurityGroups\": {\n            \"shape\": \"Sp\"\n          },\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"Sq\"\n          },\n          \"ClusterSubnetGroupName\": {},\n          \"AvailabilityZone\": {},\n          \"PreferredMaintenanceWindow\": {},\n          \"ClusterParameterGroupName\": {},\n          \"AutomatedSnapshotRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"ClusterVersion\": {},\n          \"AllowVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"NumberOfNodes\": {\n            \"type\": \"integer\"\n          },\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"Encrypted\": {\n            \"type\": \"boolean\"\n          },\n          \"HsmClientCertificateIdentifier\": {},\n          \"HsmConfigurationIdentifier\": {},\n          \"ElasticIp\": {},\n          \"Tags\": {\n            \"shape\": \"S7\"\n          },\n          \"KmsKeyId\": {},\n          \"EnhancedVpcRouting\": {\n            \"type\": \"boolean\"\n          },\n          \"AdditionalInfo\": {},\n          \"IamRoles\": {\n            \"shape\": \"St\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateClusterResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Cluster\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    },\n    \"CreateClusterParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ParameterGroupName\",\n          \"ParameterGroupFamily\",\n          \"Description\"\n        ],\n        \"members\": {\n          \"ParameterGroupName\": {},\n          \"ParameterGroupFamily\": {},\n          \"Description\": {},\n          \"Tags\": {\n            \"shape\": \"S7\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateClusterParameterGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterParameterGroup\": {\n            \"shape\": \"S1g\"\n          }\n        }\n      }\n    },\n    \"CreateClusterSecurityGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterSecurityGroupName\",\n          \"Description\"\n        ],\n        \"members\": {\n          \"ClusterSecurityGroupName\": {},\n          \"Description\": {},\n          \"Tags\": {\n            \"shape\": \"S7\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateClusterSecurityGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterSecurityGroup\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"CreateClusterSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SnapshotIdentifier\",\n          \"ClusterIdentifier\"\n        ],\n        \"members\": {\n          \"SnapshotIdentifier\": {},\n          \"ClusterIdentifier\": {},\n          \"Tags\": {\n            \"shape\": \"S7\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateClusterSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Snapshot\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"CreateClusterSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterSubnetGroupName\",\n          \"Description\",\n          \"SubnetIds\"\n        ],\n        \"members\": {\n          \"ClusterSubnetGroupName\": {},\n          \"Description\": {},\n          \"SubnetIds\": {\n            \"shape\": \"S1m\"\n          },\n          \"Tags\": {\n            \"shape\": \"S7\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateClusterSubnetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterSubnetGroup\": {\n            \"shape\": \"S1o\"\n          }\n        }\n      }\n    },\n    \"CreateEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\",\n          \"SnsTopicArn\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SnsTopicArn\": {},\n          \"SourceType\": {},\n          \"SourceIds\": {\n            \"shape\": \"S1t\"\n          },\n          \"EventCategories\": {\n            \"shape\": \"S1u\"\n          },\n          \"Severity\": {},\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          },\n          \"Tags\": {\n            \"shape\": \"S7\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateEventSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S1w\"\n          }\n        }\n      }\n    },\n    \"CreateHsmClientCertificate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HsmClientCertificateIdentifier\"\n        ],\n        \"members\": {\n          \"HsmClientCertificateIdentifier\": {},\n          \"Tags\": {\n            \"shape\": \"S7\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateHsmClientCertificateResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"HsmClientCertificate\": {\n            \"shape\": \"S1z\"\n          }\n        }\n      }\n    },\n    \"CreateHsmConfiguration\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HsmConfigurationIdentifier\",\n          \"Description\",\n          \"HsmIpAddress\",\n          \"HsmPartitionName\",\n          \"HsmPartitionPassword\",\n          \"HsmServerPublicCertificate\"\n        ],\n        \"members\": {\n          \"HsmConfigurationIdentifier\": {},\n          \"Description\": {},\n          \"HsmIpAddress\": {},\n          \"HsmPartitionName\": {},\n          \"HsmPartitionPassword\": {},\n          \"HsmServerPublicCertificate\": {},\n          \"Tags\": {\n            \"shape\": \"S7\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateHsmConfigurationResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"HsmConfiguration\": {\n            \"shape\": \"S22\"\n          }\n        }\n      }\n    },\n    \"CreateSnapshotCopyGrant\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SnapshotCopyGrantName\"\n        ],\n        \"members\": {\n          \"SnapshotCopyGrantName\": {},\n          \"KmsKeyId\": {},\n          \"Tags\": {\n            \"shape\": \"S7\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateSnapshotCopyGrantResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"SnapshotCopyGrant\": {\n            \"shape\": \"S25\"\n          }\n        }\n      }\n    },\n    \"CreateTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"ResourceName\": {},\n          \"Tags\": {\n            \"shape\": \"S7\"\n          }\n        }\n      }\n    },\n    \"DeleteCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\"\n        ],\n        \"members\": {\n          \"ClusterIdentifier\": {},\n          \"SkipFinalClusterSnapshot\": {\n            \"type\": \"boolean\"\n          },\n          \"FinalClusterSnapshotIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteClusterResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Cluster\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    },\n    \"DeleteClusterParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ParameterGroupName\"\n        ],\n        \"members\": {\n          \"ParameterGroupName\": {}\n        }\n      }\n    },\n    \"DeleteClusterSecurityGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterSecurityGroupName\"\n        ],\n        \"members\": {\n          \"ClusterSecurityGroupName\": {}\n        }\n      }\n    },\n    \"DeleteClusterSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"SnapshotIdentifier\": {},\n          \"SnapshotClusterIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteClusterSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Snapshot\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"DeleteClusterSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterSubnetGroupName\"\n        ],\n        \"members\": {\n          \"ClusterSubnetGroupName\": {}\n        }\n      }\n    },\n    \"DeleteEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {}\n        }\n      }\n    },\n    \"DeleteHsmClientCertificate\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HsmClientCertificateIdentifier\"\n        ],\n        \"members\": {\n          \"HsmClientCertificateIdentifier\": {}\n        }\n      }\n    },\n    \"DeleteHsmConfiguration\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HsmConfigurationIdentifier\"\n        ],\n        \"members\": {\n          \"HsmConfigurationIdentifier\": {}\n        }\n      }\n    },\n    \"DeleteSnapshotCopyGrant\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SnapshotCopyGrantName\"\n        ],\n        \"members\": {\n          \"SnapshotCopyGrantName\": {}\n        }\n      }\n    },\n    \"DeleteTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceName\",\n          \"TagKeys\"\n        ],\n        \"members\": {\n          \"ResourceName\": {},\n          \"TagKeys\": {\n            \"shape\": \"S2j\"\n          }\n        }\n      }\n    },\n    \"DescribeClusterParameterGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ParameterGroupName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"TagKeys\": {\n            \"shape\": \"S2j\"\n          },\n          \"TagValues\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeClusterParameterGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ParameterGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1g\",\n              \"locationName\": \"ClusterParameterGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeClusterParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ParameterGroupName\"\n        ],\n        \"members\": {\n          \"ParameterGroupName\": {},\n          \"Source\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeClusterParametersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Parameters\": {\n            \"shape\": \"S2q\"\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeClusterSecurityGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterSecurityGroupName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"TagKeys\": {\n            \"shape\": \"S2j\"\n          },\n          \"TagValues\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeClusterSecurityGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ClusterSecurityGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4\",\n              \"locationName\": \"ClusterSecurityGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeClusterSnapshots\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterIdentifier\": {},\n          \"SnapshotIdentifier\": {},\n          \"SnapshotType\": {},\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"OwnerAccount\": {},\n          \"TagKeys\": {\n            \"shape\": \"S2j\"\n          },\n          \"TagValues\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeClusterSnapshotsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"Snapshots\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sd\",\n              \"locationName\": \"Snapshot\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeClusterSubnetGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterSubnetGroupName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"TagKeys\": {\n            \"shape\": \"S2j\"\n          },\n          \"TagValues\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeClusterSubnetGroupsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ClusterSubnetGroups\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1o\",\n              \"locationName\": \"ClusterSubnetGroup\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeClusterVersions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterVersion\": {},\n          \"ClusterParameterGroupFamily\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeClusterVersionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ClusterVersions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ClusterVersion\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ClusterVersion\": {},\n                \"ClusterParameterGroupFamily\": {},\n                \"Description\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeClusters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterIdentifier\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"TagKeys\": {\n            \"shape\": \"S2j\"\n          },\n          \"TagValues\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeClustersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"Clusters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sv\",\n              \"locationName\": \"Cluster\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeDefaultClusterParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ParameterGroupFamily\"\n        ],\n        \"members\": {\n          \"ParameterGroupFamily\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeDefaultClusterParametersResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DefaultClusterParameters\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"ParameterGroupFamily\": {},\n              \"Marker\": {},\n              \"Parameters\": {\n                \"shape\": \"S2q\"\n              }\n            },\n            \"wrapper\": true\n          }\n        }\n      }\n    },\n    \"DescribeEventCategories\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SourceType\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventCategoriesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventCategoriesMapList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"EventCategoriesMap\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"SourceType\": {},\n                \"Events\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"EventInfoMap\",\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"EventId\": {},\n                      \"EventCategories\": {\n                        \"shape\": \"S1u\"\n                      },\n                      \"EventDescription\": {},\n                      \"Severity\": {}\n                    },\n                    \"wrapper\": true\n                  }\n                }\n              },\n              \"wrapper\": true\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEventSubscriptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventSubscriptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"EventSubscriptionsList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1w\",\n              \"locationName\": \"EventSubscription\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeEvents\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SourceIdentifier\": {},\n          \"SourceType\": {},\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"Duration\": {\n            \"type\": \"integer\"\n          },\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeEventsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"Events\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Event\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"SourceIdentifier\": {},\n                \"SourceType\": {},\n                \"Message\": {},\n                \"EventCategories\": {\n                  \"shape\": \"S1u\"\n                },\n                \"Severity\": {},\n                \"Date\": {\n                  \"type\": \"timestamp\"\n                },\n                \"EventId\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeHsmClientCertificates\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HsmClientCertificateIdentifier\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"TagKeys\": {\n            \"shape\": \"S2j\"\n          },\n          \"TagValues\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeHsmClientCertificatesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"HsmClientCertificates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1z\",\n              \"locationName\": \"HsmClientCertificate\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeHsmConfigurations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HsmConfigurationIdentifier\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"TagKeys\": {\n            \"shape\": \"S2j\"\n          },\n          \"TagValues\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeHsmConfigurationsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"HsmConfigurations\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S22\",\n              \"locationName\": \"HsmConfiguration\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeLoggingStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\"\n        ],\n        \"members\": {\n          \"ClusterIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S3x\",\n        \"resultWrapper\": \"DescribeLoggingStatusResult\"\n      }\n    },\n    \"DescribeOrderableClusterOptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterVersion\": {},\n          \"NodeType\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeOrderableClusterOptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"OrderableClusterOptions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"OrderableClusterOption\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ClusterVersion\": {},\n                \"ClusterType\": {},\n                \"NodeType\": {},\n                \"AvailabilityZones\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"shape\": \"S1r\",\n                    \"locationName\": \"AvailabilityZone\"\n                  }\n                }\n              },\n              \"wrapper\": true\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeReservedNodeOfferings\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedNodeOfferingId\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReservedNodeOfferingsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ReservedNodeOfferings\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ReservedNodeOffering\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"ReservedNodeOfferingId\": {},\n                \"NodeType\": {},\n                \"Duration\": {\n                  \"type\": \"integer\"\n                },\n                \"FixedPrice\": {\n                  \"type\": \"double\"\n                },\n                \"UsagePrice\": {\n                  \"type\": \"double\"\n                },\n                \"CurrencyCode\": {},\n                \"OfferingType\": {},\n                \"RecurringCharges\": {\n                  \"shape\": \"S47\"\n                }\n              },\n              \"wrapper\": true\n            }\n          }\n        }\n      }\n    },\n    \"DescribeReservedNodes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedNodeId\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeReservedNodesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"ReservedNodes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4c\",\n              \"locationName\": \"ReservedNode\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeResize\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\"\n        ],\n        \"members\": {\n          \"ClusterIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeResizeResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TargetNodeType\": {},\n          \"TargetNumberOfNodes\": {\n            \"type\": \"integer\"\n          },\n          \"TargetClusterType\": {},\n          \"Status\": {},\n          \"ImportTablesCompleted\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"ImportTablesInProgress\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"ImportTablesNotStarted\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"AvgResizeRateInMegaBytesPerSecond\": {\n            \"type\": \"double\"\n          },\n          \"TotalResizeDataInMegaBytes\": {\n            \"type\": \"long\"\n          },\n          \"ProgressInMegaBytes\": {\n            \"type\": \"long\"\n          },\n          \"ElapsedTimeInSeconds\": {\n            \"type\": \"long\"\n          },\n          \"EstimatedTimeToCompletionInSeconds\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    },\n    \"DescribeSnapshotCopyGrants\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SnapshotCopyGrantName\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"TagKeys\": {\n            \"shape\": \"S2j\"\n          },\n          \"TagValues\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeSnapshotCopyGrantsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"SnapshotCopyGrants\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S25\",\n              \"locationName\": \"SnapshotCopyGrant\"\n            }\n          }\n        }\n      }\n    },\n    \"DescribeTableRestoreStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterIdentifier\": {},\n          \"TableRestoreRequestId\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeTableRestoreStatusResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TableRestoreStatusDetails\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4q\",\n              \"locationName\": \"TableRestoreStatus\"\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeTags\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourceName\": {},\n          \"ResourceType\": {},\n          \"MaxRecords\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {},\n          \"TagKeys\": {\n            \"shape\": \"S2j\"\n          },\n          \"TagValues\": {\n            \"shape\": \"S2l\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DescribeTagsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TaggedResources\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"TaggedResource\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Tag\": {\n                  \"shape\": \"S8\"\n                },\n                \"ResourceName\": {},\n                \"ResourceType\": {}\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DisableLogging\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\"\n        ],\n        \"members\": {\n          \"ClusterIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S3x\",\n        \"resultWrapper\": \"DisableLoggingResult\"\n      }\n    },\n    \"DisableSnapshotCopy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\"\n        ],\n        \"members\": {\n          \"ClusterIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DisableSnapshotCopyResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Cluster\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    },\n    \"EnableLogging\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\",\n          \"BucketName\"\n        ],\n        \"members\": {\n          \"ClusterIdentifier\": {},\n          \"BucketName\": {},\n          \"S3KeyPrefix\": {}\n        }\n      },\n      \"output\": {\n        \"shape\": \"S3x\",\n        \"resultWrapper\": \"EnableLoggingResult\"\n      }\n    },\n    \"EnableSnapshotCopy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\",\n          \"DestinationRegion\"\n        ],\n        \"members\": {\n          \"ClusterIdentifier\": {},\n          \"DestinationRegion\": {},\n          \"RetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"SnapshotCopyGrantName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"EnableSnapshotCopyResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Cluster\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    },\n    \"ModifyCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\"\n        ],\n        \"members\": {\n          \"ClusterIdentifier\": {},\n          \"ClusterType\": {},\n          \"NodeType\": {},\n          \"NumberOfNodes\": {\n            \"type\": \"integer\"\n          },\n          \"ClusterSecurityGroups\": {\n            \"shape\": \"Sp\"\n          },\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"Sq\"\n          },\n          \"MasterUserPassword\": {},\n          \"ClusterParameterGroupName\": {},\n          \"AutomatedSnapshotRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"PreferredMaintenanceWindow\": {},\n          \"ClusterVersion\": {},\n          \"AllowVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"HsmClientCertificateIdentifier\": {},\n          \"HsmConfigurationIdentifier\": {},\n          \"NewClusterIdentifier\": {},\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"ElasticIp\": {},\n          \"EnhancedVpcRouting\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyClusterResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Cluster\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    },\n    \"ModifyClusterIamRoles\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\"\n        ],\n        \"members\": {\n          \"ClusterIdentifier\": {},\n          \"AddIamRoles\": {\n            \"shape\": \"St\"\n          },\n          \"RemoveIamRoles\": {\n            \"shape\": \"St\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyClusterIamRolesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Cluster\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    },\n    \"ModifyClusterParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ParameterGroupName\",\n          \"Parameters\"\n        ],\n        \"members\": {\n          \"ParameterGroupName\": {},\n          \"Parameters\": {\n            \"shape\": \"S2q\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S57\",\n        \"resultWrapper\": \"ModifyClusterParameterGroupResult\"\n      }\n    },\n    \"ModifyClusterSubnetGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterSubnetGroupName\",\n          \"SubnetIds\"\n        ],\n        \"members\": {\n          \"ClusterSubnetGroupName\": {},\n          \"Description\": {},\n          \"SubnetIds\": {\n            \"shape\": \"S1m\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyClusterSubnetGroupResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterSubnetGroup\": {\n            \"shape\": \"S1o\"\n          }\n        }\n      }\n    },\n    \"ModifyEventSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionName\"\n        ],\n        \"members\": {\n          \"SubscriptionName\": {},\n          \"SnsTopicArn\": {},\n          \"SourceType\": {},\n          \"SourceIds\": {\n            \"shape\": \"S1t\"\n          },\n          \"EventCategories\": {\n            \"shape\": \"S1u\"\n          },\n          \"Severity\": {},\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifyEventSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EventSubscription\": {\n            \"shape\": \"S1w\"\n          }\n        }\n      }\n    },\n    \"ModifySnapshotCopyRetentionPeriod\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\",\n          \"RetentionPeriod\"\n        ],\n        \"members\": {\n          \"ClusterIdentifier\": {},\n          \"RetentionPeriod\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ModifySnapshotCopyRetentionPeriodResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Cluster\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    },\n    \"PurchaseReservedNodeOffering\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ReservedNodeOfferingId\"\n        ],\n        \"members\": {\n          \"ReservedNodeOfferingId\": {},\n          \"NodeCount\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PurchaseReservedNodeOfferingResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReservedNode\": {\n            \"shape\": \"S4c\"\n          }\n        }\n      }\n    },\n    \"RebootCluster\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\"\n        ],\n        \"members\": {\n          \"ClusterIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RebootClusterResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Cluster\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    },\n    \"ResetClusterParameterGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ParameterGroupName\"\n        ],\n        \"members\": {\n          \"ParameterGroupName\": {},\n          \"ResetAllParameters\": {\n            \"type\": \"boolean\"\n          },\n          \"Parameters\": {\n            \"shape\": \"S2q\"\n          }\n        }\n      },\n      \"output\": {\n        \"shape\": \"S57\",\n        \"resultWrapper\": \"ResetClusterParameterGroupResult\"\n      }\n    },\n    \"RestoreFromClusterSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\",\n          \"SnapshotIdentifier\"\n        ],\n        \"members\": {\n          \"ClusterIdentifier\": {},\n          \"SnapshotIdentifier\": {},\n          \"SnapshotClusterIdentifier\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"AvailabilityZone\": {},\n          \"AllowVersionUpgrade\": {\n            \"type\": \"boolean\"\n          },\n          \"ClusterSubnetGroupName\": {},\n          \"PubliclyAccessible\": {\n            \"type\": \"boolean\"\n          },\n          \"OwnerAccount\": {},\n          \"HsmClientCertificateIdentifier\": {},\n          \"HsmConfigurationIdentifier\": {},\n          \"ElasticIp\": {},\n          \"ClusterParameterGroupName\": {},\n          \"ClusterSecurityGroups\": {\n            \"shape\": \"Sp\"\n          },\n          \"VpcSecurityGroupIds\": {\n            \"shape\": \"Sq\"\n          },\n          \"PreferredMaintenanceWindow\": {},\n          \"AutomatedSnapshotRetentionPeriod\": {\n            \"type\": \"integer\"\n          },\n          \"KmsKeyId\": {},\n          \"NodeType\": {},\n          \"EnhancedVpcRouting\": {\n            \"type\": \"boolean\"\n          },\n          \"AdditionalInfo\": {},\n          \"IamRoles\": {\n            \"shape\": \"St\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RestoreFromClusterSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Cluster\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    },\n    \"RestoreTableFromClusterSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\",\n          \"SnapshotIdentifier\",\n          \"SourceDatabaseName\",\n          \"SourceTableName\",\n          \"NewTableName\"\n        ],\n        \"members\": {\n          \"ClusterIdentifier\": {},\n          \"SnapshotIdentifier\": {},\n          \"SourceDatabaseName\": {},\n          \"SourceSchemaName\": {},\n          \"SourceTableName\": {},\n          \"TargetDatabaseName\": {},\n          \"TargetSchemaName\": {},\n          \"NewTableName\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RestoreTableFromClusterSnapshotResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TableRestoreStatus\": {\n            \"shape\": \"S4q\"\n          }\n        }\n      }\n    },\n    \"RevokeClusterSecurityGroupIngress\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterSecurityGroupName\"\n        ],\n        \"members\": {\n          \"ClusterSecurityGroupName\": {},\n          \"CIDRIP\": {},\n          \"EC2SecurityGroupName\": {},\n          \"EC2SecurityGroupOwnerId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RevokeClusterSecurityGroupIngressResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ClusterSecurityGroup\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"RevokeSnapshotAccess\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SnapshotIdentifier\",\n          \"AccountWithRestoreAccess\"\n        ],\n        \"members\": {\n          \"SnapshotIdentifier\": {},\n          \"SnapshotClusterIdentifier\": {},\n          \"AccountWithRestoreAccess\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RevokeSnapshotAccessResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Snapshot\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"RotateEncryptionKey\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClusterIdentifier\"\n        ],\n        \"members\": {\n          \"ClusterIdentifier\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"RotateEncryptionKeyResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Cluster\": {\n            \"shape\": \"Sv\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S4\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ClusterSecurityGroupName\": {},\n        \"Description\": {},\n        \"EC2SecurityGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"EC2SecurityGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Status\": {},\n              \"EC2SecurityGroupName\": {},\n              \"EC2SecurityGroupOwnerId\": {},\n              \"Tags\": {\n                \"shape\": \"S7\"\n              }\n            }\n          }\n        },\n        \"IPRanges\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"IPRange\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Status\": {},\n              \"CIDRIP\": {},\n              \"Tags\": {\n                \"shape\": \"S7\"\n              }\n            }\n          }\n        },\n        \"Tags\": {\n          \"shape\": \"S7\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S7\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S8\",\n        \"locationName\": \"Tag\"\n      }\n    },\n    \"S8\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Key\": {},\n        \"Value\": {}\n      }\n    },\n    \"Sd\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"SnapshotIdentifier\": {},\n        \"ClusterIdentifier\": {},\n        \"SnapshotCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Status\": {},\n        \"Port\": {\n          \"type\": \"integer\"\n        },\n        \"AvailabilityZone\": {},\n        \"ClusterCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"MasterUsername\": {},\n        \"ClusterVersion\": {},\n        \"SnapshotType\": {},\n        \"NodeType\": {},\n        \"NumberOfNodes\": {\n          \"type\": \"integer\"\n        },\n        \"DBName\": {},\n        \"VpcId\": {},\n        \"Encrypted\": {\n          \"type\": \"boolean\"\n        },\n        \"KmsKeyId\": {},\n        \"EncryptedWithHSM\": {\n          \"type\": \"boolean\"\n        },\n        \"AccountsWithRestoreAccess\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"AccountWithRestoreAccess\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"AccountId\": {}\n            }\n          }\n        },\n        \"OwnerAccount\": {},\n        \"TotalBackupSizeInMegaBytes\": {\n          \"type\": \"double\"\n        },\n        \"ActualIncrementalBackupSizeInMegaBytes\": {\n          \"type\": \"double\"\n        },\n        \"BackupProgressInMegaBytes\": {\n          \"type\": \"double\"\n        },\n        \"CurrentBackupRateInMegaBytesPerSecond\": {\n          \"type\": \"double\"\n        },\n        \"EstimatedSecondsToCompletion\": {\n          \"type\": \"long\"\n        },\n        \"ElapsedTimeInSeconds\": {\n          \"type\": \"long\"\n        },\n        \"SourceRegion\": {},\n        \"Tags\": {\n          \"shape\": \"S7\"\n        },\n        \"RestorableNodeTypes\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"NodeType\"\n          }\n        },\n        \"EnhancedVpcRouting\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"Sp\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"ClusterSecurityGroupName\"\n      }\n    },\n    \"Sq\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"VpcSecurityGroupId\"\n      }\n    },\n    \"St\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"IamRoleArn\"\n      }\n    },\n    \"Sv\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ClusterIdentifier\": {},\n        \"NodeType\": {},\n        \"ClusterStatus\": {},\n        \"ModifyStatus\": {},\n        \"MasterUsername\": {},\n        \"DBName\": {},\n        \"Endpoint\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Address\": {},\n            \"Port\": {\n              \"type\": \"integer\"\n            }\n          }\n        },\n        \"ClusterCreateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"AutomatedSnapshotRetentionPeriod\": {\n          \"type\": \"integer\"\n        },\n        \"ClusterSecurityGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"ClusterSecurityGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"ClusterSecurityGroupName\": {},\n              \"Status\": {}\n            }\n          }\n        },\n        \"VpcSecurityGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"VpcSecurityGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"VpcSecurityGroupId\": {},\n              \"Status\": {}\n            }\n          }\n        },\n        \"ClusterParameterGroups\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"ClusterParameterGroup\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"ParameterGroupName\": {},\n              \"ParameterApplyStatus\": {},\n              \"ClusterParameterStatusList\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"ParameterName\": {},\n                    \"ParameterApplyStatus\": {},\n                    \"ParameterApplyErrorDescription\": {}\n                  }\n                }\n              }\n            }\n          }\n        },\n        \"ClusterSubnetGroupName\": {},\n        \"VpcId\": {},\n        \"AvailabilityZone\": {},\n        \"PreferredMaintenanceWindow\": {},\n        \"PendingModifiedValues\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"MasterUserPassword\": {},\n            \"NodeType\": {},\n            \"NumberOfNodes\": {\n              \"type\": \"integer\"\n            },\n            \"ClusterType\": {},\n            \"ClusterVersion\": {},\n            \"AutomatedSnapshotRetentionPeriod\": {\n              \"type\": \"integer\"\n            },\n            \"ClusterIdentifier\": {},\n            \"PubliclyAccessible\": {\n              \"type\": \"boolean\"\n            },\n            \"EnhancedVpcRouting\": {\n              \"type\": \"boolean\"\n            }\n          }\n        },\n        \"ClusterVersion\": {},\n        \"AllowVersionUpgrade\": {\n          \"type\": \"boolean\"\n        },\n        \"NumberOfNodes\": {\n          \"type\": \"integer\"\n        },\n        \"PubliclyAccessible\": {\n          \"type\": \"boolean\"\n        },\n        \"Encrypted\": {\n          \"type\": \"boolean\"\n        },\n        \"RestoreStatus\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Status\": {},\n            \"CurrentRestoreRateInMegaBytesPerSecond\": {\n              \"type\": \"double\"\n            },\n            \"SnapshotSizeInMegaBytes\": {\n              \"type\": \"long\"\n            },\n            \"ProgressInMegaBytes\": {\n              \"type\": \"long\"\n            },\n            \"ElapsedTimeInSeconds\": {\n              \"type\": \"long\"\n            },\n            \"EstimatedTimeToCompletionInSeconds\": {\n              \"type\": \"long\"\n            }\n          }\n        },\n        \"HsmStatus\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"HsmClientCertificateIdentifier\": {},\n            \"HsmConfigurationIdentifier\": {},\n            \"Status\": {}\n          }\n        },\n        \"ClusterSnapshotCopyStatus\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"DestinationRegion\": {},\n            \"RetentionPeriod\": {\n              \"type\": \"long\"\n            },\n            \"SnapshotCopyGrantName\": {}\n          }\n        },\n        \"ClusterPublicKey\": {},\n        \"ClusterNodes\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"NodeRole\": {},\n              \"PrivateIPAddress\": {},\n              \"PublicIPAddress\": {}\n            }\n          }\n        },\n        \"ElasticIpStatus\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"ElasticIp\": {},\n            \"Status\": {}\n          }\n        },\n        \"ClusterRevisionNumber\": {},\n        \"Tags\": {\n          \"shape\": \"S7\"\n        },\n        \"KmsKeyId\": {},\n        \"EnhancedVpcRouting\": {\n          \"type\": \"boolean\"\n        },\n        \"IamRoles\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"ClusterIamRole\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"IamRoleArn\": {},\n              \"ApplyStatus\": {}\n            }\n          }\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S1g\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ParameterGroupName\": {},\n        \"ParameterGroupFamily\": {},\n        \"Description\": {},\n        \"Tags\": {\n          \"shape\": \"S7\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S1m\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SubnetIdentifier\"\n      }\n    },\n    \"S1o\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ClusterSubnetGroupName\": {},\n        \"Description\": {},\n        \"VpcId\": {},\n        \"SubnetGroupStatus\": {},\n        \"Subnets\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Subnet\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"SubnetIdentifier\": {},\n              \"SubnetAvailabilityZone\": {\n                \"shape\": \"S1r\"\n              },\n              \"SubnetStatus\": {}\n            }\n          }\n        },\n        \"Tags\": {\n          \"shape\": \"S7\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S1r\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Name\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S1t\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"SourceId\"\n      }\n    },\n    \"S1u\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"EventCategory\"\n      }\n    },\n    \"S1w\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CustomerAwsId\": {},\n        \"CustSubscriptionId\": {},\n        \"SnsTopicArn\": {},\n        \"Status\": {},\n        \"SubscriptionCreationTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"SourceType\": {},\n        \"SourceIdsList\": {\n          \"shape\": \"S1t\"\n        },\n        \"EventCategoriesList\": {\n          \"shape\": \"S1u\"\n        },\n        \"Severity\": {},\n        \"Enabled\": {\n          \"type\": \"boolean\"\n        },\n        \"Tags\": {\n          \"shape\": \"S7\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S1z\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"HsmClientCertificateIdentifier\": {},\n        \"HsmClientCertificatePublicKey\": {},\n        \"Tags\": {\n          \"shape\": \"S7\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S22\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"HsmConfigurationIdentifier\": {},\n        \"Description\": {},\n        \"HsmIpAddress\": {},\n        \"HsmPartitionName\": {},\n        \"Tags\": {\n          \"shape\": \"S7\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S25\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"SnapshotCopyGrantName\": {},\n        \"KmsKeyId\": {},\n        \"Tags\": {\n          \"shape\": \"S7\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S2j\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"TagKey\"\n      }\n    },\n    \"S2l\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"TagValue\"\n      }\n    },\n    \"S2q\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Parameter\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"ParameterName\": {},\n          \"ParameterValue\": {},\n          \"Description\": {},\n          \"Source\": {},\n          \"DataType\": {},\n          \"AllowedValues\": {},\n          \"ApplyType\": {},\n          \"IsModifiable\": {\n            \"type\": \"boolean\"\n          },\n          \"MinimumEngineVersion\": {}\n        }\n      }\n    },\n    \"S3x\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"LoggingEnabled\": {\n          \"type\": \"boolean\"\n        },\n        \"BucketName\": {},\n        \"S3KeyPrefix\": {},\n        \"LastSuccessfulDeliveryTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"LastFailureTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"LastFailureMessage\": {}\n      }\n    },\n    \"S47\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"RecurringCharge\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"RecurringChargeAmount\": {\n            \"type\": \"double\"\n          },\n          \"RecurringChargeFrequency\": {}\n        },\n        \"wrapper\": true\n      }\n    },\n    \"S4c\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ReservedNodeId\": {},\n        \"ReservedNodeOfferingId\": {},\n        \"NodeType\": {},\n        \"StartTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Duration\": {\n          \"type\": \"integer\"\n        },\n        \"FixedPrice\": {\n          \"type\": \"double\"\n        },\n        \"UsagePrice\": {\n          \"type\": \"double\"\n        },\n        \"CurrencyCode\": {},\n        \"NodeCount\": {\n          \"type\": \"integer\"\n        },\n        \"State\": {},\n        \"OfferingType\": {},\n        \"RecurringCharges\": {\n          \"shape\": \"S47\"\n        }\n      },\n      \"wrapper\": true\n    },\n    \"S4q\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"TableRestoreRequestId\": {},\n        \"Status\": {},\n        \"Message\": {},\n        \"RequestTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"ProgressInMegaBytes\": {\n          \"type\": \"long\"\n        },\n        \"TotalDataInMegaBytes\": {\n          \"type\": \"long\"\n        },\n        \"ClusterIdentifier\": {},\n        \"SnapshotIdentifier\": {},\n        \"SourceDatabaseName\": {},\n        \"SourceSchemaName\": {},\n        \"SourceTableName\": {},\n        \"TargetDatabaseName\": {},\n        \"TargetSchemaName\": {},\n        \"NewTableName\": {}\n      },\n      \"wrapper\": true\n    },\n    \"S57\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ParameterGroupName\": {},\n        \"ParameterGroupStatus\": {}\n      }\n    }\n  }\n}\n},{}],110:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeClusterParameterGroups\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"ParameterGroups\"\n    },\n    \"DescribeClusterParameters\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"Parameters\"\n    },\n    \"DescribeClusterSecurityGroups\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"ClusterSecurityGroups\"\n    },\n    \"DescribeClusterSnapshots\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"Snapshots\"\n    },\n    \"DescribeClusterSubnetGroups\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"ClusterSubnetGroups\"\n    },\n    \"DescribeClusterVersions\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"ClusterVersions\"\n    },\n    \"DescribeClusters\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"Clusters\"\n    },\n    \"DescribeDefaultClusterParameters\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"DefaultClusterParameters.Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"DefaultClusterParameters.Parameters\"\n    },\n    \"DescribeEventSubscriptions\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"EventSubscriptionsList\"\n    },\n    \"DescribeEvents\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"Events\"\n    },\n    \"DescribeHsmClientCertificates\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"HsmClientCertificates\"\n    },\n    \"DescribeHsmConfigurations\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"HsmConfigurations\"\n    },\n    \"DescribeOrderableClusterOptions\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"OrderableClusterOptions\"\n    },\n    \"DescribeReservedNodeOfferings\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"ReservedNodeOfferings\"\n    },\n    \"DescribeReservedNodes\": {\n      \"input_token\": \"Marker\",\n      \"output_token\": \"Marker\",\n      \"limit_key\": \"MaxRecords\",\n      \"result_key\": \"ReservedNodes\"\n    }\n  }\n}\n\n},{}],111:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"ClusterAvailable\": {\n      \"delay\": 60,\n      \"operation\": \"DescribeClusters\",\n      \"maxAttempts\": 30,\n      \"acceptors\": [\n        {\n          \"expected\": \"available\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Clusters[].ClusterStatus\"\n        },\n        {\n          \"expected\": \"deleting\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Clusters[].ClusterStatus\"\n        },\n        {\n          \"expected\": \"ClusterNotFound\",\n          \"matcher\": \"error\",\n          \"state\": \"retry\"\n        }\n      ]\n    },\n    \"ClusterDeleted\": {\n      \"delay\": 60,\n      \"operation\": \"DescribeClusters\",\n      \"maxAttempts\": 30,\n      \"acceptors\": [\n        {\n          \"expected\": \"ClusterNotFound\",\n          \"matcher\": \"error\",\n          \"state\": \"success\"\n        },\n        {\n          \"expected\": \"creating\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Clusters[].ClusterStatus\"\n        },\n        {\n          \"expected\": \"modifying\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Clusters[].ClusterStatus\"\n        }\n      ]\n    },\n    \"ClusterRestored\": {\n      \"operation\": \"DescribeClusters\",\n      \"maxAttempts\": 30,\n      \"delay\": 60,\n      \"acceptors\": [\n        {\n          \"state\": \"success\",\n          \"matcher\": \"pathAll\",\n          \"argument\": \"Clusters[].RestoreStatus.Status\",\n          \"expected\": \"completed\"\n        },\n        {\n          \"state\": \"failure\",\n          \"matcher\": \"pathAny\",\n          \"argument\": \"Clusters[].ClusterStatus\",\n          \"expected\": \"deleting\"\n        }\n      ]\n    },\n    \"SnapshotAvailable\": {\n      \"delay\": 15,\n      \"operation\": \"DescribeClusterSnapshots\",\n      \"maxAttempts\": 20,\n      \"acceptors\": [\n        {\n          \"expected\": \"available\",\n          \"matcher\": \"pathAll\",\n          \"state\": \"success\",\n          \"argument\": \"Snapshots[].Status\"\n        },\n        {\n          \"expected\": \"failed\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Snapshots[].Status\"\n        },\n        {\n          \"expected\": \"deleted\",\n          \"matcher\": \"pathAny\",\n          \"state\": \"failure\",\n          \"argument\": \"Snapshots[].Status\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],112:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2016-06-27\",\n    \"endpointPrefix\": \"rekognition\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"Amazon Rekognition\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"RekognitionService\",\n    \"uid\": \"rekognition-2016-06-27\"\n  },\n  \"operations\": {\n    \"CompareFaces\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SourceImage\",\n          \"TargetImage\"\n        ],\n        \"members\": {\n          \"SourceImage\": {\n            \"shape\": \"S2\"\n          },\n          \"TargetImage\": {\n            \"shape\": \"S2\"\n          },\n          \"SimilarityThreshold\": {\n            \"type\": \"float\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SourceImageFace\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"BoundingBox\": {\n                \"shape\": \"Sb\"\n              },\n              \"Confidence\": {\n                \"type\": \"float\"\n              }\n            }\n          },\n          \"FaceMatches\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Similarity\": {\n                  \"type\": \"float\"\n                },\n                \"Face\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"BoundingBox\": {\n                      \"shape\": \"Sb\"\n                    },\n                    \"Confidence\": {\n                      \"type\": \"float\"\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"CreateCollection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CollectionId\"\n        ],\n        \"members\": {\n          \"CollectionId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StatusCode\": {\n            \"type\": \"integer\"\n          },\n          \"CollectionArn\": {}\n        }\n      }\n    },\n    \"DeleteCollection\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CollectionId\"\n        ],\n        \"members\": {\n          \"CollectionId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StatusCode\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"DeleteFaces\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CollectionId\",\n          \"FaceIds\"\n        ],\n        \"members\": {\n          \"CollectionId\": {},\n          \"FaceIds\": {\n            \"shape\": \"So\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DeletedFaces\": {\n            \"shape\": \"So\"\n          }\n        }\n      }\n    },\n    \"DetectFaces\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Image\"\n        ],\n        \"members\": {\n          \"Image\": {\n            \"shape\": \"S2\"\n          },\n          \"Attributes\": {\n            \"shape\": \"Ss\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FaceDetails\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sw\"\n            }\n          },\n          \"OrientationCorrection\": {}\n        }\n      }\n    },\n    \"DetectLabels\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Image\"\n        ],\n        \"members\": {\n          \"Image\": {\n            \"shape\": \"S2\"\n          },\n          \"MaxLabels\": {\n            \"type\": \"integer\"\n          },\n          \"MinConfidence\": {\n            \"type\": \"float\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Labels\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Confidence\": {\n                  \"type\": \"float\"\n                }\n              }\n            }\n          },\n          \"OrientationCorrection\": {}\n        }\n      }\n    },\n    \"IndexFaces\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CollectionId\",\n          \"Image\"\n        ],\n        \"members\": {\n          \"CollectionId\": {},\n          \"Image\": {\n            \"shape\": \"S2\"\n          },\n          \"ExternalImageId\": {},\n          \"DetectionAttributes\": {\n            \"shape\": \"Ss\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FaceRecords\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Face\": {\n                  \"shape\": \"S1r\"\n                },\n                \"FaceDetail\": {\n                  \"shape\": \"Sw\"\n                }\n              }\n            }\n          },\n          \"OrientationCorrection\": {}\n        }\n      }\n    },\n    \"ListCollections\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CollectionIds\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListFaces\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CollectionId\"\n        ],\n        \"members\": {\n          \"CollectionId\": {},\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Faces\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1r\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"SearchFaces\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CollectionId\",\n          \"FaceId\"\n        ],\n        \"members\": {\n          \"CollectionId\": {},\n          \"FaceId\": {},\n          \"MaxFaces\": {\n            \"type\": \"integer\"\n          },\n          \"FaceMatchThreshold\": {\n            \"type\": \"float\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SearchedFaceId\": {},\n          \"FaceMatches\": {\n            \"shape\": \"S24\"\n          }\n        }\n      }\n    },\n    \"SearchFacesByImage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CollectionId\",\n          \"Image\"\n        ],\n        \"members\": {\n          \"CollectionId\": {},\n          \"Image\": {\n            \"shape\": \"S2\"\n          },\n          \"MaxFaces\": {\n            \"type\": \"integer\"\n          },\n          \"FaceMatchThreshold\": {\n            \"type\": \"float\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SearchedFaceBoundingBox\": {\n            \"shape\": \"Sb\"\n          },\n          \"SearchedFaceConfidence\": {\n            \"type\": \"float\"\n          },\n          \"FaceMatches\": {\n            \"shape\": \"S24\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S2\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Bytes\": {\n          \"type\": \"blob\"\n        },\n        \"S3Object\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Bucket\": {},\n            \"Name\": {},\n            \"Version\": {}\n          }\n        }\n      }\n    },\n    \"Sb\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Width\": {\n          \"type\": \"float\"\n        },\n        \"Height\": {\n          \"type\": \"float\"\n        },\n        \"Left\": {\n          \"type\": \"float\"\n        },\n        \"Top\": {\n          \"type\": \"float\"\n        }\n      }\n    },\n    \"So\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Ss\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sw\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"BoundingBox\": {\n          \"shape\": \"Sb\"\n        },\n        \"AgeRange\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Low\": {\n              \"type\": \"integer\"\n            },\n            \"High\": {\n              \"type\": \"integer\"\n            }\n          }\n        },\n        \"Smile\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Value\": {\n              \"type\": \"boolean\"\n            },\n            \"Confidence\": {\n              \"type\": \"float\"\n            }\n          }\n        },\n        \"Eyeglasses\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Value\": {\n              \"type\": \"boolean\"\n            },\n            \"Confidence\": {\n              \"type\": \"float\"\n            }\n          }\n        },\n        \"Sunglasses\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Value\": {\n              \"type\": \"boolean\"\n            },\n            \"Confidence\": {\n              \"type\": \"float\"\n            }\n          }\n        },\n        \"Gender\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Value\": {},\n            \"Confidence\": {\n              \"type\": \"float\"\n            }\n          }\n        },\n        \"Beard\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Value\": {\n              \"type\": \"boolean\"\n            },\n            \"Confidence\": {\n              \"type\": \"float\"\n            }\n          }\n        },\n        \"Mustache\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Value\": {\n              \"type\": \"boolean\"\n            },\n            \"Confidence\": {\n              \"type\": \"float\"\n            }\n          }\n        },\n        \"EyesOpen\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Value\": {\n              \"type\": \"boolean\"\n            },\n            \"Confidence\": {\n              \"type\": \"float\"\n            }\n          }\n        },\n        \"MouthOpen\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Value\": {\n              \"type\": \"boolean\"\n            },\n            \"Confidence\": {\n              \"type\": \"float\"\n            }\n          }\n        },\n        \"Emotions\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Type\": {},\n              \"Confidence\": {\n                \"type\": \"float\"\n              }\n            }\n          }\n        },\n        \"Landmarks\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Type\": {},\n              \"X\": {\n                \"type\": \"float\"\n              },\n              \"Y\": {\n                \"type\": \"float\"\n              }\n            }\n          }\n        },\n        \"Pose\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Roll\": {\n              \"type\": \"float\"\n            },\n            \"Yaw\": {\n              \"type\": \"float\"\n            },\n            \"Pitch\": {\n              \"type\": \"float\"\n            }\n          }\n        },\n        \"Quality\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Brightness\": {\n              \"type\": \"float\"\n            },\n            \"Sharpness\": {\n              \"type\": \"float\"\n            }\n          }\n        },\n        \"Confidence\": {\n          \"type\": \"float\"\n        }\n      }\n    },\n    \"S1r\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"FaceId\": {},\n        \"BoundingBox\": {\n          \"shape\": \"Sb\"\n        },\n        \"ImageId\": {},\n        \"ExternalImageId\": {},\n        \"Confidence\": {\n          \"type\": \"float\"\n        }\n      }\n    },\n    \"S24\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Similarity\": {\n            \"type\": \"float\"\n          },\n          \"Face\": {\n            \"shape\": \"S1r\"\n          }\n        }\n      }\n    }\n  }\n}\n},{}],113:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"ListCollections\": {\n      \"input_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"CollectionIds\"\n    },\n    \"ListFaces\": {\n      \"input_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"Faces\"\n    }\n  }\n}\n},{}],114:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2013-04-01\",\n    \"endpointPrefix\": \"route53\",\n    \"globalEndpoint\": \"route53.amazonaws.com\",\n    \"protocol\": \"rest-xml\",\n    \"serviceAbbreviation\": \"Route 53\",\n    \"serviceFullName\": \"Amazon Route 53\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"route53-2013-04-01\"\n  },\n  \"operations\": {\n    \"AssociateVPCWithHostedZone\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/hostedzone/{Id}/associatevpc\"\n      },\n      \"input\": {\n        \"locationName\": \"AssociateVPCWithHostedZoneRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZoneId\",\n          \"VPC\"\n        ],\n        \"members\": {\n          \"HostedZoneId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"VPC\": {\n            \"shape\": \"S3\"\n          },\n          \"Comment\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ChangeInfo\"\n        ],\n        \"members\": {\n          \"ChangeInfo\": {\n            \"shape\": \"S8\"\n          }\n        }\n      }\n    },\n    \"ChangeResourceRecordSets\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/hostedzone/{Id}/rrset/\"\n      },\n      \"input\": {\n        \"locationName\": \"ChangeResourceRecordSetsRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZoneId\",\n          \"ChangeBatch\"\n        ],\n        \"members\": {\n          \"HostedZoneId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"ChangeBatch\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"Changes\"\n            ],\n            \"members\": {\n              \"Comment\": {},\n              \"Changes\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"locationName\": \"Change\",\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"Action\",\n                    \"ResourceRecordSet\"\n                  ],\n                  \"members\": {\n                    \"Action\": {},\n                    \"ResourceRecordSet\": {\n                      \"shape\": \"Sh\"\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ChangeInfo\"\n        ],\n        \"members\": {\n          \"ChangeInfo\": {\n            \"shape\": \"S8\"\n          }\n        }\n      }\n    },\n    \"ChangeTagsForResource\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/tags/{ResourceType}/{ResourceId}\"\n      },\n      \"input\": {\n        \"locationName\": \"ChangeTagsForResourceRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceType\",\n          \"ResourceId\"\n        ],\n        \"members\": {\n          \"ResourceType\": {\n            \"location\": \"uri\",\n            \"locationName\": \"ResourceType\"\n          },\n          \"ResourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"ResourceId\"\n          },\n          \"AddTags\": {\n            \"shape\": \"S14\"\n          },\n          \"RemoveTagKeys\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Key\"\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateHealthCheck\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/healthcheck\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"locationName\": \"CreateHealthCheckRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"CallerReference\",\n          \"HealthCheckConfig\"\n        ],\n        \"members\": {\n          \"CallerReference\": {},\n          \"HealthCheckConfig\": {\n            \"shape\": \"S1c\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HealthCheck\",\n          \"Location\"\n        ],\n        \"members\": {\n          \"HealthCheck\": {\n            \"shape\": \"S1x\"\n          },\n          \"Location\": {\n            \"location\": \"header\",\n            \"locationName\": \"Location\"\n          }\n        }\n      }\n    },\n    \"CreateHostedZone\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/hostedzone\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"locationName\": \"CreateHostedZoneRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"CallerReference\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"VPC\": {\n            \"shape\": \"S3\"\n          },\n          \"CallerReference\": {},\n          \"HostedZoneConfig\": {\n            \"shape\": \"S2d\"\n          },\n          \"DelegationSetId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZone\",\n          \"ChangeInfo\",\n          \"DelegationSet\",\n          \"Location\"\n        ],\n        \"members\": {\n          \"HostedZone\": {\n            \"shape\": \"S2g\"\n          },\n          \"ChangeInfo\": {\n            \"shape\": \"S8\"\n          },\n          \"DelegationSet\": {\n            \"shape\": \"S2i\"\n          },\n          \"VPC\": {\n            \"shape\": \"S3\"\n          },\n          \"Location\": {\n            \"location\": \"header\",\n            \"locationName\": \"Location\"\n          }\n        }\n      }\n    },\n    \"CreateReusableDelegationSet\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/delegationset\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"locationName\": \"CreateReusableDelegationSetRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"CallerReference\"\n        ],\n        \"members\": {\n          \"CallerReference\": {},\n          \"HostedZoneId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DelegationSet\",\n          \"Location\"\n        ],\n        \"members\": {\n          \"DelegationSet\": {\n            \"shape\": \"S2i\"\n          },\n          \"Location\": {\n            \"location\": \"header\",\n            \"locationName\": \"Location\"\n          }\n        }\n      }\n    },\n    \"CreateTrafficPolicy\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/trafficpolicy\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"locationName\": \"CreateTrafficPolicyRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Document\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Document\": {},\n          \"Comment\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TrafficPolicy\",\n          \"Location\"\n        ],\n        \"members\": {\n          \"TrafficPolicy\": {\n            \"shape\": \"S2r\"\n          },\n          \"Location\": {\n            \"location\": \"header\",\n            \"locationName\": \"Location\"\n          }\n        }\n      }\n    },\n    \"CreateTrafficPolicyInstance\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/trafficpolicyinstance\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"locationName\": \"CreateTrafficPolicyInstanceRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZoneId\",\n          \"Name\",\n          \"TTL\",\n          \"TrafficPolicyId\",\n          \"TrafficPolicyVersion\"\n        ],\n        \"members\": {\n          \"HostedZoneId\": {},\n          \"Name\": {},\n          \"TTL\": {\n            \"type\": \"long\"\n          },\n          \"TrafficPolicyId\": {},\n          \"TrafficPolicyVersion\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TrafficPolicyInstance\",\n          \"Location\"\n        ],\n        \"members\": {\n          \"TrafficPolicyInstance\": {\n            \"shape\": \"S2w\"\n          },\n          \"Location\": {\n            \"location\": \"header\",\n            \"locationName\": \"Location\"\n          }\n        }\n      }\n    },\n    \"CreateTrafficPolicyVersion\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/trafficpolicy/{Id}\",\n        \"responseCode\": 201\n      },\n      \"input\": {\n        \"locationName\": \"CreateTrafficPolicyVersionRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\",\n          \"Document\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"Document\": {},\n          \"Comment\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TrafficPolicy\",\n          \"Location\"\n        ],\n        \"members\": {\n          \"TrafficPolicy\": {\n            \"shape\": \"S2r\"\n          },\n          \"Location\": {\n            \"location\": \"header\",\n            \"locationName\": \"Location\"\n          }\n        }\n      }\n    },\n    \"CreateVPCAssociationAuthorization\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/hostedzone/{Id}/authorizevpcassociation\"\n      },\n      \"input\": {\n        \"locationName\": \"CreateVPCAssociationAuthorizationRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZoneId\",\n          \"VPC\"\n        ],\n        \"members\": {\n          \"HostedZoneId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"VPC\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZoneId\",\n          \"VPC\"\n        ],\n        \"members\": {\n          \"HostedZoneId\": {},\n          \"VPC\": {\n            \"shape\": \"S3\"\n          }\n        }\n      }\n    },\n    \"DeleteHealthCheck\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2013-04-01/healthcheck/{HealthCheckId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HealthCheckId\"\n        ],\n        \"members\": {\n          \"HealthCheckId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"HealthCheckId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteHostedZone\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2013-04-01/hostedzone/{Id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ChangeInfo\"\n        ],\n        \"members\": {\n          \"ChangeInfo\": {\n            \"shape\": \"S8\"\n          }\n        }\n      }\n    },\n    \"DeleteReusableDelegationSet\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2013-04-01/delegationset/{Id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteTrafficPolicy\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2013-04-01/trafficpolicy/{Id}/{Version}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\",\n          \"Version\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"Version\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Version\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteTrafficPolicyInstance\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/2013-04-01/trafficpolicyinstance/{Id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteVPCAssociationAuthorization\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/hostedzone/{Id}/deauthorizevpcassociation\"\n      },\n      \"input\": {\n        \"locationName\": \"DeleteVPCAssociationAuthorizationRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZoneId\",\n          \"VPC\"\n        ],\n        \"members\": {\n          \"HostedZoneId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"VPC\": {\n            \"shape\": \"S3\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DisassociateVPCFromHostedZone\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/hostedzone/{Id}/disassociatevpc\"\n      },\n      \"input\": {\n        \"locationName\": \"DisassociateVPCFromHostedZoneRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZoneId\",\n          \"VPC\"\n        ],\n        \"members\": {\n          \"HostedZoneId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"VPC\": {\n            \"shape\": \"S3\"\n          },\n          \"Comment\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ChangeInfo\"\n        ],\n        \"members\": {\n          \"ChangeInfo\": {\n            \"shape\": \"S8\"\n          }\n        }\n      }\n    },\n    \"GetChange\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/change/{Id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ChangeInfo\"\n        ],\n        \"members\": {\n          \"ChangeInfo\": {\n            \"shape\": \"S8\"\n          }\n        }\n      }\n    },\n    \"GetCheckerIpRanges\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/checkeripranges\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CheckerIpRanges\"\n        ],\n        \"members\": {\n          \"CheckerIpRanges\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"GetGeoLocation\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/geolocation\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ContinentCode\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"continentcode\"\n          },\n          \"CountryCode\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"countrycode\"\n          },\n          \"SubdivisionCode\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"subdivisioncode\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GeoLocationDetails\"\n        ],\n        \"members\": {\n          \"GeoLocationDetails\": {\n            \"shape\": \"S3q\"\n          }\n        }\n      }\n    },\n    \"GetHealthCheck\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/healthcheck/{HealthCheckId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HealthCheckId\"\n        ],\n        \"members\": {\n          \"HealthCheckId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"HealthCheckId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HealthCheck\"\n        ],\n        \"members\": {\n          \"HealthCheck\": {\n            \"shape\": \"S1x\"\n          }\n        }\n      }\n    },\n    \"GetHealthCheckCount\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/healthcheckcount\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HealthCheckCount\"\n        ],\n        \"members\": {\n          \"HealthCheckCount\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    },\n    \"GetHealthCheckLastFailureReason\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HealthCheckId\"\n        ],\n        \"members\": {\n          \"HealthCheckId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"HealthCheckId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HealthCheckObservations\"\n        ],\n        \"members\": {\n          \"HealthCheckObservations\": {\n            \"shape\": \"S41\"\n          }\n        }\n      }\n    },\n    \"GetHealthCheckStatus\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/healthcheck/{HealthCheckId}/status\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HealthCheckId\"\n        ],\n        \"members\": {\n          \"HealthCheckId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"HealthCheckId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HealthCheckObservations\"\n        ],\n        \"members\": {\n          \"HealthCheckObservations\": {\n            \"shape\": \"S41\"\n          }\n        }\n      }\n    },\n    \"GetHostedZone\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/hostedzone/{Id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZone\"\n        ],\n        \"members\": {\n          \"HostedZone\": {\n            \"shape\": \"S2g\"\n          },\n          \"DelegationSet\": {\n            \"shape\": \"S2i\"\n          },\n          \"VPCs\": {\n            \"shape\": \"S49\"\n          }\n        }\n      }\n    },\n    \"GetHostedZoneCount\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/hostedzonecount\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZoneCount\"\n        ],\n        \"members\": {\n          \"HostedZoneCount\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    },\n    \"GetReusableDelegationSet\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/delegationset/{Id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DelegationSet\"\n        ],\n        \"members\": {\n          \"DelegationSet\": {\n            \"shape\": \"S2i\"\n          }\n        }\n      }\n    },\n    \"GetTrafficPolicy\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/trafficpolicy/{Id}/{Version}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\",\n          \"Version\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"Version\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Version\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TrafficPolicy\"\n        ],\n        \"members\": {\n          \"TrafficPolicy\": {\n            \"shape\": \"S2r\"\n          }\n        }\n      }\n    },\n    \"GetTrafficPolicyInstance\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/trafficpolicyinstance/{Id}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TrafficPolicyInstance\"\n        ],\n        \"members\": {\n          \"TrafficPolicyInstance\": {\n            \"shape\": \"S2w\"\n          }\n        }\n      }\n    },\n    \"GetTrafficPolicyInstanceCount\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/trafficpolicyinstancecount\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TrafficPolicyInstanceCount\"\n        ],\n        \"members\": {\n          \"TrafficPolicyInstanceCount\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"ListGeoLocations\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/geolocations\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StartContinentCode\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"startcontinentcode\"\n          },\n          \"StartCountryCode\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"startcountrycode\"\n          },\n          \"StartSubdivisionCode\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"startsubdivisioncode\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxitems\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GeoLocationDetailsList\",\n          \"IsTruncated\",\n          \"MaxItems\"\n        ],\n        \"members\": {\n          \"GeoLocationDetailsList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S3q\",\n              \"locationName\": \"GeoLocationDetails\"\n            }\n          },\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"NextContinentCode\": {},\n          \"NextCountryCode\": {},\n          \"NextSubdivisionCode\": {},\n          \"MaxItems\": {}\n        }\n      }\n    },\n    \"ListHealthChecks\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/healthcheck\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"marker\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxitems\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HealthChecks\",\n          \"Marker\",\n          \"IsTruncated\",\n          \"MaxItems\"\n        ],\n        \"members\": {\n          \"HealthChecks\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1x\",\n              \"locationName\": \"HealthCheck\"\n            }\n          },\n          \"Marker\": {},\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"NextMarker\": {},\n          \"MaxItems\": {}\n        }\n      }\n    },\n    \"ListHostedZones\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/hostedzone\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"marker\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxitems\"\n          },\n          \"DelegationSetId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"delegationsetid\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZones\",\n          \"Marker\",\n          \"IsTruncated\",\n          \"MaxItems\"\n        ],\n        \"members\": {\n          \"HostedZones\": {\n            \"shape\": \"S4x\"\n          },\n          \"Marker\": {},\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"NextMarker\": {},\n          \"MaxItems\": {}\n        }\n      }\n    },\n    \"ListHostedZonesByName\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/hostedzonesbyname\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DNSName\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"dnsname\"\n          },\n          \"HostedZoneId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"hostedzoneid\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxitems\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZones\",\n          \"IsTruncated\",\n          \"MaxItems\"\n        ],\n        \"members\": {\n          \"HostedZones\": {\n            \"shape\": \"S4x\"\n          },\n          \"DNSName\": {},\n          \"HostedZoneId\": {},\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"NextDNSName\": {},\n          \"NextHostedZoneId\": {},\n          \"MaxItems\": {}\n        }\n      }\n    },\n    \"ListResourceRecordSets\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/hostedzone/{Id}/rrset\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZoneId\"\n        ],\n        \"members\": {\n          \"HostedZoneId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"StartRecordName\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"name\"\n          },\n          \"StartRecordType\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"type\"\n          },\n          \"StartRecordIdentifier\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"identifier\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxitems\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceRecordSets\",\n          \"IsTruncated\",\n          \"MaxItems\"\n        ],\n        \"members\": {\n          \"ResourceRecordSets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sh\",\n              \"locationName\": \"ResourceRecordSet\"\n            }\n          },\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"NextRecordName\": {},\n          \"NextRecordType\": {},\n          \"NextRecordIdentifier\": {},\n          \"MaxItems\": {}\n        }\n      }\n    },\n    \"ListReusableDelegationSets\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/delegationset\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"marker\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxitems\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DelegationSets\",\n          \"Marker\",\n          \"IsTruncated\",\n          \"MaxItems\"\n        ],\n        \"members\": {\n          \"DelegationSets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S2i\",\n              \"locationName\": \"DelegationSet\"\n            }\n          },\n          \"Marker\": {},\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"NextMarker\": {},\n          \"MaxItems\": {}\n        }\n      }\n    },\n    \"ListTagsForResource\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/tags/{ResourceType}/{ResourceId}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceType\",\n          \"ResourceId\"\n        ],\n        \"members\": {\n          \"ResourceType\": {\n            \"location\": \"uri\",\n            \"locationName\": \"ResourceType\"\n          },\n          \"ResourceId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"ResourceId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceTagSet\"\n        ],\n        \"members\": {\n          \"ResourceTagSet\": {\n            \"shape\": \"S58\"\n          }\n        }\n      }\n    },\n    \"ListTagsForResources\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/tags/{ResourceType}\"\n      },\n      \"input\": {\n        \"locationName\": \"ListTagsForResourcesRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceType\",\n          \"ResourceIds\"\n        ],\n        \"members\": {\n          \"ResourceType\": {\n            \"location\": \"uri\",\n            \"locationName\": \"ResourceType\"\n          },\n          \"ResourceIds\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ResourceId\"\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceTagSets\"\n        ],\n        \"members\": {\n          \"ResourceTagSets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S58\",\n              \"locationName\": \"ResourceTagSet\"\n            }\n          }\n        }\n      }\n    },\n    \"ListTrafficPolicies\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/trafficpolicies\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TrafficPolicyIdMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"trafficpolicyid\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxitems\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TrafficPolicySummaries\",\n          \"IsTruncated\",\n          \"TrafficPolicyIdMarker\",\n          \"MaxItems\"\n        ],\n        \"members\": {\n          \"TrafficPolicySummaries\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"TrafficPolicySummary\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"Id\",\n                \"Name\",\n                \"Type\",\n                \"LatestVersion\",\n                \"TrafficPolicyCount\"\n              ],\n              \"members\": {\n                \"Id\": {},\n                \"Name\": {},\n                \"Type\": {},\n                \"LatestVersion\": {\n                  \"type\": \"integer\"\n                },\n                \"TrafficPolicyCount\": {\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          },\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"TrafficPolicyIdMarker\": {},\n          \"MaxItems\": {}\n        }\n      }\n    },\n    \"ListTrafficPolicyInstances\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/trafficpolicyinstances\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"HostedZoneIdMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"hostedzoneid\"\n          },\n          \"TrafficPolicyInstanceNameMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"trafficpolicyinstancename\"\n          },\n          \"TrafficPolicyInstanceTypeMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"trafficpolicyinstancetype\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxitems\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TrafficPolicyInstances\",\n          \"IsTruncated\",\n          \"MaxItems\"\n        ],\n        \"members\": {\n          \"TrafficPolicyInstances\": {\n            \"shape\": \"S5j\"\n          },\n          \"HostedZoneIdMarker\": {},\n          \"TrafficPolicyInstanceNameMarker\": {},\n          \"TrafficPolicyInstanceTypeMarker\": {},\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"MaxItems\": {}\n        }\n      }\n    },\n    \"ListTrafficPolicyInstancesByHostedZone\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/trafficpolicyinstances/hostedzone\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZoneId\"\n        ],\n        \"members\": {\n          \"HostedZoneId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"id\"\n          },\n          \"TrafficPolicyInstanceNameMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"trafficpolicyinstancename\"\n          },\n          \"TrafficPolicyInstanceTypeMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"trafficpolicyinstancetype\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxitems\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TrafficPolicyInstances\",\n          \"IsTruncated\",\n          \"MaxItems\"\n        ],\n        \"members\": {\n          \"TrafficPolicyInstances\": {\n            \"shape\": \"S5j\"\n          },\n          \"TrafficPolicyInstanceNameMarker\": {},\n          \"TrafficPolicyInstanceTypeMarker\": {},\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"MaxItems\": {}\n        }\n      }\n    },\n    \"ListTrafficPolicyInstancesByPolicy\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/trafficpolicyinstances/trafficpolicy\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TrafficPolicyId\",\n          \"TrafficPolicyVersion\"\n        ],\n        \"members\": {\n          \"TrafficPolicyId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"id\"\n          },\n          \"TrafficPolicyVersion\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"version\",\n            \"type\": \"integer\"\n          },\n          \"HostedZoneIdMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"hostedzoneid\"\n          },\n          \"TrafficPolicyInstanceNameMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"trafficpolicyinstancename\"\n          },\n          \"TrafficPolicyInstanceTypeMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"trafficpolicyinstancetype\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxitems\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TrafficPolicyInstances\",\n          \"IsTruncated\",\n          \"MaxItems\"\n        ],\n        \"members\": {\n          \"TrafficPolicyInstances\": {\n            \"shape\": \"S5j\"\n          },\n          \"HostedZoneIdMarker\": {},\n          \"TrafficPolicyInstanceNameMarker\": {},\n          \"TrafficPolicyInstanceTypeMarker\": {},\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"MaxItems\": {}\n        }\n      }\n    },\n    \"ListTrafficPolicyVersions\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/trafficpolicies/{Id}/versions\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"TrafficPolicyVersionMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"trafficpolicyversion\"\n          },\n          \"MaxItems\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxitems\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TrafficPolicies\",\n          \"IsTruncated\",\n          \"TrafficPolicyVersionMarker\",\n          \"MaxItems\"\n        ],\n        \"members\": {\n          \"TrafficPolicies\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S2r\",\n              \"locationName\": \"TrafficPolicy\"\n            }\n          },\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"TrafficPolicyVersionMarker\": {},\n          \"MaxItems\": {}\n        }\n      }\n    },\n    \"ListVPCAssociationAuthorizations\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/hostedzone/{Id}/authorizevpcassociation\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZoneId\"\n        ],\n        \"members\": {\n          \"HostedZoneId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"NextToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"nexttoken\"\n          },\n          \"MaxResults\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"maxresults\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZoneId\",\n          \"VPCs\"\n        ],\n        \"members\": {\n          \"HostedZoneId\": {},\n          \"NextToken\": {},\n          \"VPCs\": {\n            \"shape\": \"S49\"\n          }\n        }\n      }\n    },\n    \"TestDNSAnswer\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/2013-04-01/testdnsanswer\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZoneId\",\n          \"RecordName\",\n          \"RecordType\"\n        ],\n        \"members\": {\n          \"HostedZoneId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"hostedzoneid\"\n          },\n          \"RecordName\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"recordname\"\n          },\n          \"RecordType\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"recordtype\"\n          },\n          \"ResolverIP\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"resolverip\"\n          },\n          \"EDNS0ClientSubnetIP\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"edns0clientsubnetip\"\n          },\n          \"EDNS0ClientSubnetMask\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"edns0clientsubnetmask\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Nameserver\",\n          \"RecordName\",\n          \"RecordType\",\n          \"RecordData\",\n          \"ResponseCode\",\n          \"Protocol\"\n        ],\n        \"members\": {\n          \"Nameserver\": {},\n          \"RecordName\": {},\n          \"RecordType\": {},\n          \"RecordData\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"RecordDataEntry\"\n            }\n          },\n          \"ResponseCode\": {},\n          \"Protocol\": {}\n        }\n      }\n    },\n    \"UpdateHealthCheck\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/healthcheck/{HealthCheckId}\"\n      },\n      \"input\": {\n        \"locationName\": \"UpdateHealthCheckRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"HealthCheckId\"\n        ],\n        \"members\": {\n          \"HealthCheckId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"HealthCheckId\"\n          },\n          \"HealthCheckVersion\": {\n            \"type\": \"long\"\n          },\n          \"IPAddress\": {},\n          \"Port\": {\n            \"type\": \"integer\"\n          },\n          \"ResourcePath\": {},\n          \"FullyQualifiedDomainName\": {},\n          \"SearchString\": {},\n          \"FailureThreshold\": {\n            \"type\": \"integer\"\n          },\n          \"Inverted\": {\n            \"type\": \"boolean\"\n          },\n          \"HealthThreshold\": {\n            \"type\": \"integer\"\n          },\n          \"ChildHealthChecks\": {\n            \"shape\": \"S1o\"\n          },\n          \"EnableSNI\": {\n            \"type\": \"boolean\"\n          },\n          \"Regions\": {\n            \"shape\": \"S1q\"\n          },\n          \"AlarmIdentifier\": {\n            \"shape\": \"S1s\"\n          },\n          \"InsufficientDataHealthStatus\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HealthCheck\"\n        ],\n        \"members\": {\n          \"HealthCheck\": {\n            \"shape\": \"S1x\"\n          }\n        }\n      }\n    },\n    \"UpdateHostedZoneComment\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/hostedzone/{Id}\"\n      },\n      \"input\": {\n        \"locationName\": \"UpdateHostedZoneCommentRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"Comment\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"HostedZone\"\n        ],\n        \"members\": {\n          \"HostedZone\": {\n            \"shape\": \"S2g\"\n          }\n        }\n      }\n    },\n    \"UpdateTrafficPolicyComment\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/trafficpolicy/{Id}/{Version}\"\n      },\n      \"input\": {\n        \"locationName\": \"UpdateTrafficPolicyCommentRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\",\n          \"Version\",\n          \"Comment\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"Version\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Version\",\n            \"type\": \"integer\"\n          },\n          \"Comment\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TrafficPolicy\"\n        ],\n        \"members\": {\n          \"TrafficPolicy\": {\n            \"shape\": \"S2r\"\n          }\n        }\n      }\n    },\n    \"UpdateTrafficPolicyInstance\": {\n      \"http\": {\n        \"requestUri\": \"/2013-04-01/trafficpolicyinstance/{Id}\"\n      },\n      \"input\": {\n        \"locationName\": \"UpdateTrafficPolicyInstanceRequest\",\n        \"xmlNamespace\": {\n          \"uri\": \"https://route53.amazonaws.com/doc/2013-04-01/\"\n        },\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\",\n          \"TTL\",\n          \"TrafficPolicyId\",\n          \"TrafficPolicyVersion\"\n        ],\n        \"members\": {\n          \"Id\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Id\"\n          },\n          \"TTL\": {\n            \"type\": \"long\"\n          },\n          \"TrafficPolicyId\": {},\n          \"TrafficPolicyVersion\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TrafficPolicyInstance\"\n        ],\n        \"members\": {\n          \"TrafficPolicyInstance\": {\n            \"shape\": \"S2w\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S3\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"VPCRegion\": {},\n        \"VPCId\": {}\n      }\n    },\n    \"S8\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Id\",\n        \"Status\",\n        \"SubmittedAt\"\n      ],\n      \"members\": {\n        \"Id\": {},\n        \"Status\": {},\n        \"SubmittedAt\": {\n          \"type\": \"timestamp\"\n        },\n        \"Comment\": {}\n      }\n    },\n    \"Sh\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Name\",\n        \"Type\"\n      ],\n      \"members\": {\n        \"Name\": {},\n        \"Type\": {},\n        \"SetIdentifier\": {},\n        \"Weight\": {\n          \"type\": \"long\"\n        },\n        \"Region\": {},\n        \"GeoLocation\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"ContinentCode\": {},\n            \"CountryCode\": {},\n            \"SubdivisionCode\": {}\n          }\n        },\n        \"Failover\": {},\n        \"TTL\": {\n          \"type\": \"long\"\n        },\n        \"ResourceRecords\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"ResourceRecord\",\n            \"type\": \"structure\",\n            \"required\": [\n              \"Value\"\n            ],\n            \"members\": {\n              \"Value\": {}\n            }\n          }\n        },\n        \"AliasTarget\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"HostedZoneId\",\n            \"DNSName\",\n            \"EvaluateTargetHealth\"\n          ],\n          \"members\": {\n            \"HostedZoneId\": {},\n            \"DNSName\": {},\n            \"EvaluateTargetHealth\": {\n              \"type\": \"boolean\"\n            }\n          }\n        },\n        \"HealthCheckId\": {},\n        \"TrafficPolicyInstanceId\": {}\n      }\n    },\n    \"S14\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Tag\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"S1c\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Type\"\n      ],\n      \"members\": {\n        \"IPAddress\": {},\n        \"Port\": {\n          \"type\": \"integer\"\n        },\n        \"Type\": {},\n        \"ResourcePath\": {},\n        \"FullyQualifiedDomainName\": {},\n        \"SearchString\": {},\n        \"RequestInterval\": {\n          \"type\": \"integer\"\n        },\n        \"FailureThreshold\": {\n          \"type\": \"integer\"\n        },\n        \"MeasureLatency\": {\n          \"type\": \"boolean\"\n        },\n        \"Inverted\": {\n          \"type\": \"boolean\"\n        },\n        \"HealthThreshold\": {\n          \"type\": \"integer\"\n        },\n        \"ChildHealthChecks\": {\n          \"shape\": \"S1o\"\n        },\n        \"EnableSNI\": {\n          \"type\": \"boolean\"\n        },\n        \"Regions\": {\n          \"shape\": \"S1q\"\n        },\n        \"AlarmIdentifier\": {\n          \"shape\": \"S1s\"\n        },\n        \"InsufficientDataHealthStatus\": {}\n      }\n    },\n    \"S1o\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"ChildHealthCheck\"\n      }\n    },\n    \"S1q\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Region\"\n      }\n    },\n    \"S1s\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Region\",\n        \"Name\"\n      ],\n      \"members\": {\n        \"Region\": {},\n        \"Name\": {}\n      }\n    },\n    \"S1x\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Id\",\n        \"CallerReference\",\n        \"HealthCheckConfig\",\n        \"HealthCheckVersion\"\n      ],\n      \"members\": {\n        \"Id\": {},\n        \"CallerReference\": {},\n        \"HealthCheckConfig\": {\n          \"shape\": \"S1c\"\n        },\n        \"HealthCheckVersion\": {\n          \"type\": \"long\"\n        },\n        \"CloudWatchAlarmConfiguration\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"EvaluationPeriods\",\n            \"Threshold\",\n            \"ComparisonOperator\",\n            \"Period\",\n            \"MetricName\",\n            \"Namespace\",\n            \"Statistic\"\n          ],\n          \"members\": {\n            \"EvaluationPeriods\": {\n              \"type\": \"integer\"\n            },\n            \"Threshold\": {\n              \"type\": \"double\"\n            },\n            \"ComparisonOperator\": {},\n            \"Period\": {\n              \"type\": \"integer\"\n            },\n            \"MetricName\": {},\n            \"Namespace\": {},\n            \"Statistic\": {},\n            \"Dimensions\": {\n              \"type\": \"list\",\n              \"member\": {\n                \"locationName\": \"Dimension\",\n                \"type\": \"structure\",\n                \"required\": [\n                  \"Name\",\n                  \"Value\"\n                ],\n                \"members\": {\n                  \"Name\": {},\n                  \"Value\": {}\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S2d\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Comment\": {},\n        \"PrivateZone\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S2g\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Id\",\n        \"Name\",\n        \"CallerReference\"\n      ],\n      \"members\": {\n        \"Id\": {},\n        \"Name\": {},\n        \"CallerReference\": {},\n        \"Config\": {\n          \"shape\": \"S2d\"\n        },\n        \"ResourceRecordSetCount\": {\n          \"type\": \"long\"\n        }\n      }\n    },\n    \"S2i\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"NameServers\"\n      ],\n      \"members\": {\n        \"Id\": {},\n        \"CallerReference\": {},\n        \"NameServers\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"NameServer\"\n          }\n        }\n      }\n    },\n    \"S2r\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Id\",\n        \"Version\",\n        \"Name\",\n        \"Type\",\n        \"Document\"\n      ],\n      \"members\": {\n        \"Id\": {},\n        \"Version\": {\n          \"type\": \"integer\"\n        },\n        \"Name\": {},\n        \"Type\": {},\n        \"Document\": {},\n        \"Comment\": {}\n      }\n    },\n    \"S2w\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Id\",\n        \"HostedZoneId\",\n        \"Name\",\n        \"TTL\",\n        \"State\",\n        \"Message\",\n        \"TrafficPolicyId\",\n        \"TrafficPolicyVersion\",\n        \"TrafficPolicyType\"\n      ],\n      \"members\": {\n        \"Id\": {},\n        \"HostedZoneId\": {},\n        \"Name\": {},\n        \"TTL\": {\n          \"type\": \"long\"\n        },\n        \"State\": {},\n        \"Message\": {},\n        \"TrafficPolicyId\": {},\n        \"TrafficPolicyVersion\": {\n          \"type\": \"integer\"\n        },\n        \"TrafficPolicyType\": {}\n      }\n    },\n    \"S3q\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ContinentCode\": {},\n        \"ContinentName\": {},\n        \"CountryCode\": {},\n        \"CountryName\": {},\n        \"SubdivisionCode\": {},\n        \"SubdivisionName\": {}\n      }\n    },\n    \"S41\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"HealthCheckObservation\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Region\": {},\n          \"IPAddress\": {},\n          \"StatusReport\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Status\": {},\n              \"CheckedTime\": {\n                \"type\": \"timestamp\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S49\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S3\",\n        \"locationName\": \"VPC\"\n      }\n    },\n    \"S4x\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S2g\",\n        \"locationName\": \"HostedZone\"\n      }\n    },\n    \"S58\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ResourceType\": {},\n        \"ResourceId\": {},\n        \"Tags\": {\n          \"shape\": \"S14\"\n        }\n      }\n    },\n    \"S5j\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S2w\",\n        \"locationName\": \"TrafficPolicyInstance\"\n      }\n    }\n  }\n}\n},{}],115:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"ListHealthChecks\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxItems\",\n      \"more_results\": \"IsTruncated\",\n      \"output_token\": \"NextMarker\",\n      \"result_key\": \"HealthChecks\"\n    },\n    \"ListHostedZones\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"MaxItems\",\n      \"more_results\": \"IsTruncated\",\n      \"output_token\": \"NextMarker\",\n      \"result_key\": \"HostedZones\"\n    },\n    \"ListResourceRecordSets\": {\n      \"input_token\": [\n        \"StartRecordName\",\n        \"StartRecordType\",\n        \"StartRecordIdentifier\"\n      ],\n      \"limit_key\": \"MaxItems\",\n      \"more_results\": \"IsTruncated\",\n      \"output_token\": [\n        \"NextRecordName\",\n        \"NextRecordType\",\n        \"NextRecordIdentifier\"\n      ],\n      \"result_key\": \"ResourceRecordSets\"\n    }\n  }\n}\n},{}],116:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"ResourceRecordSetsChanged\": {\n      \"delay\": 30,\n      \"maxAttempts\": 60,\n      \"operation\": \"GetChange\",\n      \"acceptors\": [\n        {\n          \"matcher\": \"path\",\n          \"expected\": \"INSYNC\",\n          \"argument\": \"ChangeInfo.Status\",\n          \"state\": \"success\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],117:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"route53domains-2014-05-15\",\n    \"apiVersion\": \"2014-05-15\",\n    \"endpointPrefix\": \"route53domains\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"Amazon Route 53 Domains\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"Route53Domains_v20140515\"\n  },\n  \"operations\": {\n    \"CheckDomainAvailability\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\"\n        ],\n        \"members\": {\n          \"DomainName\": {},\n          \"IdnLangCode\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Availability\"\n        ],\n        \"members\": {\n          \"Availability\": {}\n        }\n      }\n    },\n    \"DeleteTagsForDomain\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\",\n          \"TagsToDelete\"\n        ],\n        \"members\": {\n          \"DomainName\": {},\n          \"TagsToDelete\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DisableDomainAutoRenew\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\"\n        ],\n        \"members\": {\n          \"DomainName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DisableDomainTransferLock\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\"\n        ],\n        \"members\": {\n          \"DomainName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OperationId\"\n        ],\n        \"members\": {\n          \"OperationId\": {}\n        }\n      }\n    },\n    \"EnableDomainAutoRenew\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\"\n        ],\n        \"members\": {\n          \"DomainName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"EnableDomainTransferLock\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\"\n        ],\n        \"members\": {\n          \"DomainName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OperationId\"\n        ],\n        \"members\": {\n          \"OperationId\": {}\n        }\n      }\n    },\n    \"GetContactReachabilityStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"domainName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"domainName\": {},\n          \"status\": {}\n        }\n      }\n    },\n    \"GetDomainDetail\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\"\n        ],\n        \"members\": {\n          \"DomainName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\",\n          \"Nameservers\",\n          \"AdminContact\",\n          \"RegistrantContact\",\n          \"TechContact\"\n        ],\n        \"members\": {\n          \"DomainName\": {},\n          \"Nameservers\": {\n            \"shape\": \"So\"\n          },\n          \"AutoRenew\": {\n            \"type\": \"boolean\"\n          },\n          \"AdminContact\": {\n            \"shape\": \"Su\"\n          },\n          \"RegistrantContact\": {\n            \"shape\": \"Su\"\n          },\n          \"TechContact\": {\n            \"shape\": \"Su\"\n          },\n          \"AdminPrivacy\": {\n            \"type\": \"boolean\"\n          },\n          \"RegistrantPrivacy\": {\n            \"type\": \"boolean\"\n          },\n          \"TechPrivacy\": {\n            \"type\": \"boolean\"\n          },\n          \"RegistrarName\": {},\n          \"WhoIsServer\": {},\n          \"RegistrarUrl\": {},\n          \"AbuseContactEmail\": {},\n          \"AbuseContactPhone\": {},\n          \"RegistryDomainId\": {},\n          \"CreationDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"UpdatedDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"ExpirationDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"Reseller\": {},\n          \"DnsSec\": {},\n          \"StatusList\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"GetDomainSuggestions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\",\n          \"SuggestionCount\",\n          \"OnlyAvailable\"\n        ],\n        \"members\": {\n          \"DomainName\": {},\n          \"SuggestionCount\": {\n            \"type\": \"integer\"\n          },\n          \"OnlyAvailable\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SuggestionsList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"DomainName\": {},\n                \"Availability\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"GetOperationDetail\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OperationId\"\n        ],\n        \"members\": {\n          \"OperationId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"OperationId\": {},\n          \"Status\": {},\n          \"Message\": {},\n          \"DomainName\": {},\n          \"Type\": {},\n          \"SubmittedDate\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"ListDomains\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"MaxItems\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Domains\"\n        ],\n        \"members\": {\n          \"Domains\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"DomainName\"\n              ],\n              \"members\": {\n                \"DomainName\": {},\n                \"AutoRenew\": {\n                  \"type\": \"boolean\"\n                },\n                \"TransferLock\": {\n                  \"type\": \"boolean\"\n                },\n                \"Expiry\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"NextPageMarker\": {}\n        }\n      }\n    },\n    \"ListOperations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"MaxItems\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Operations\"\n        ],\n        \"members\": {\n          \"Operations\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"OperationId\",\n                \"Status\",\n                \"Type\",\n                \"SubmittedDate\"\n              ],\n              \"members\": {\n                \"OperationId\": {},\n                \"Status\": {},\n                \"Type\": {},\n                \"SubmittedDate\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"NextPageMarker\": {}\n        }\n      }\n    },\n    \"ListTagsForDomain\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\"\n        ],\n        \"members\": {\n          \"DomainName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TagList\"\n        ],\n        \"members\": {\n          \"TagList\": {\n            \"shape\": \"S24\"\n          }\n        }\n      }\n    },\n    \"RegisterDomain\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\",\n          \"DurationInYears\",\n          \"AdminContact\",\n          \"RegistrantContact\",\n          \"TechContact\"\n        ],\n        \"members\": {\n          \"DomainName\": {},\n          \"IdnLangCode\": {},\n          \"DurationInYears\": {\n            \"type\": \"integer\"\n          },\n          \"AutoRenew\": {\n            \"type\": \"boolean\"\n          },\n          \"AdminContact\": {\n            \"shape\": \"Su\"\n          },\n          \"RegistrantContact\": {\n            \"shape\": \"Su\"\n          },\n          \"TechContact\": {\n            \"shape\": \"Su\"\n          },\n          \"PrivacyProtectAdminContact\": {\n            \"type\": \"boolean\"\n          },\n          \"PrivacyProtectRegistrantContact\": {\n            \"type\": \"boolean\"\n          },\n          \"PrivacyProtectTechContact\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OperationId\"\n        ],\n        \"members\": {\n          \"OperationId\": {}\n        }\n      }\n    },\n    \"RenewDomain\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\",\n          \"CurrentExpiryYear\"\n        ],\n        \"members\": {\n          \"DomainName\": {},\n          \"DurationInYears\": {\n            \"type\": \"integer\"\n          },\n          \"CurrentExpiryYear\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OperationId\"\n        ],\n        \"members\": {\n          \"OperationId\": {}\n        }\n      }\n    },\n    \"ResendContactReachabilityEmail\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"domainName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"domainName\": {},\n          \"emailAddress\": {},\n          \"isAlreadyVerified\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"RetrieveDomainAuthCode\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\"\n        ],\n        \"members\": {\n          \"DomainName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AuthCode\"\n        ],\n        \"members\": {\n          \"AuthCode\": {\n            \"shape\": \"S2h\"\n          }\n        }\n      }\n    },\n    \"TransferDomain\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\",\n          \"DurationInYears\",\n          \"AdminContact\",\n          \"RegistrantContact\",\n          \"TechContact\"\n        ],\n        \"members\": {\n          \"DomainName\": {},\n          \"IdnLangCode\": {},\n          \"DurationInYears\": {\n            \"type\": \"integer\"\n          },\n          \"Nameservers\": {\n            \"shape\": \"So\"\n          },\n          \"AuthCode\": {\n            \"shape\": \"S2h\"\n          },\n          \"AutoRenew\": {\n            \"type\": \"boolean\"\n          },\n          \"AdminContact\": {\n            \"shape\": \"Su\"\n          },\n          \"RegistrantContact\": {\n            \"shape\": \"Su\"\n          },\n          \"TechContact\": {\n            \"shape\": \"Su\"\n          },\n          \"PrivacyProtectAdminContact\": {\n            \"type\": \"boolean\"\n          },\n          \"PrivacyProtectRegistrantContact\": {\n            \"type\": \"boolean\"\n          },\n          \"PrivacyProtectTechContact\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OperationId\"\n        ],\n        \"members\": {\n          \"OperationId\": {}\n        }\n      }\n    },\n    \"UpdateDomainContact\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\"\n        ],\n        \"members\": {\n          \"DomainName\": {},\n          \"AdminContact\": {\n            \"shape\": \"Su\"\n          },\n          \"RegistrantContact\": {\n            \"shape\": \"Su\"\n          },\n          \"TechContact\": {\n            \"shape\": \"Su\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OperationId\"\n        ],\n        \"members\": {\n          \"OperationId\": {}\n        }\n      }\n    },\n    \"UpdateDomainContactPrivacy\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\"\n        ],\n        \"members\": {\n          \"DomainName\": {},\n          \"AdminPrivacy\": {\n            \"type\": \"boolean\"\n          },\n          \"RegistrantPrivacy\": {\n            \"type\": \"boolean\"\n          },\n          \"TechPrivacy\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OperationId\"\n        ],\n        \"members\": {\n          \"OperationId\": {}\n        }\n      }\n    },\n    \"UpdateDomainNameservers\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\",\n          \"Nameservers\"\n        ],\n        \"members\": {\n          \"DomainName\": {},\n          \"FIAuthKey\": {},\n          \"Nameservers\": {\n            \"shape\": \"So\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"OperationId\"\n        ],\n        \"members\": {\n          \"OperationId\": {}\n        }\n      }\n    },\n    \"UpdateTagsForDomain\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DomainName\"\n        ],\n        \"members\": {\n          \"DomainName\": {},\n          \"TagsToUpdate\": {\n            \"shape\": \"S24\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"ViewBilling\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Start\": {\n            \"type\": \"timestamp\"\n          },\n          \"End\": {\n            \"type\": \"timestamp\"\n          },\n          \"Marker\": {},\n          \"MaxItems\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextPageMarker\": {},\n          \"BillingRecords\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"DomainName\": {},\n                \"Operation\": {},\n                \"InvoiceId\": {},\n                \"BillDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Price\": {\n                  \"type\": \"double\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"So\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"GlueIps\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"Su\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"FirstName\": {},\n        \"LastName\": {},\n        \"ContactType\": {},\n        \"OrganizationName\": {},\n        \"AddressLine1\": {},\n        \"AddressLine2\": {},\n        \"City\": {},\n        \"State\": {},\n        \"CountryCode\": {},\n        \"ZipCode\": {},\n        \"PhoneNumber\": {},\n        \"Email\": {},\n        \"Fax\": {},\n        \"ExtraParams\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"Name\",\n              \"Value\"\n            ],\n            \"members\": {\n              \"Name\": {},\n              \"Value\": {}\n            }\n          }\n        }\n      },\n      \"sensitive\": true\n    },\n    \"S24\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"S2h\": {\n      \"type\": \"string\",\n      \"sensitive\": true\n    }\n  }\n}\n},{}],118:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"1.0\",\n  \"pagination\": {\n    \"ListDomains\": {\n      \"limit_key\": \"MaxItems\",\n      \"input_token\": \"Marker\",\n      \"output_token\": \"NextPageMarker\",\n      \"result_key\": \"Domains\"\n    },\n    \"ListOperations\": {\n      \"limit_key\": \"MaxItems\",\n      \"input_token\": \"Marker\",\n      \"output_token\": \"NextPageMarker\",\n      \"result_key\": \"Operations\"\n    }\n  }\n}\n\n},{}],119:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2016-11-28\",\n    \"endpointPrefix\": \"runtime.lex\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"rest-json\",\n    \"serviceFullName\": \"Amazon Lex Runtime Service\",\n    \"signatureVersion\": \"v4\",\n    \"signingName\": \"lex\",\n    \"uid\": \"runtime.lex-2016-11-28\"\n  },\n  \"operations\": {\n    \"PostText\": {\n      \"http\": {\n        \"requestUri\": \"/bot/{botName}/alias/{botAlias}/user/{userId}/text\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"botName\",\n          \"botAlias\",\n          \"userId\",\n          \"inputText\"\n        ],\n        \"members\": {\n          \"botName\": {\n            \"location\": \"uri\",\n            \"locationName\": \"botName\"\n          },\n          \"botAlias\": {\n            \"location\": \"uri\",\n            \"locationName\": \"botAlias\"\n          },\n          \"userId\": {\n            \"location\": \"uri\",\n            \"locationName\": \"userId\"\n          },\n          \"sessionAttributes\": {\n            \"shape\": \"S5\"\n          },\n          \"inputText\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"intentName\": {},\n          \"slots\": {\n            \"shape\": \"S5\"\n          },\n          \"sessionAttributes\": {\n            \"shape\": \"S5\"\n          },\n          \"message\": {},\n          \"dialogState\": {},\n          \"slotToElicit\": {},\n          \"responseCard\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"version\": {},\n              \"contentType\": {},\n              \"genericAttachments\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"title\": {},\n                    \"subTitle\": {},\n                    \"attachmentLinkUrl\": {},\n                    \"imageUrl\": {},\n                    \"buttons\": {\n                      \"type\": \"list\",\n                      \"member\": {\n                        \"type\": \"structure\",\n                        \"required\": [\n                          \"text\",\n                          \"value\"\n                        ],\n                        \"members\": {\n                          \"text\": {},\n                          \"value\": {}\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S5\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    }\n  }\n}\n},{}],120:[function(require,module,exports){\narguments[4][21][0].apply(exports,arguments)\n},{\"dup\":21}],121:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2006-03-01\",\n    \"checksumFormat\": \"md5\",\n    \"endpointPrefix\": \"s3\",\n    \"globalEndpoint\": \"s3.amazonaws.com\",\n    \"protocol\": \"rest-xml\",\n    \"serviceAbbreviation\": \"Amazon S3\",\n    \"serviceFullName\": \"Amazon Simple Storage Service\",\n    \"signatureVersion\": \"s3\",\n    \"timestampFormat\": \"rfc822\",\n    \"uid\": \"s3-2006-03-01\"\n  },\n  \"operations\": {\n    \"AbortMultipartUpload\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/{Bucket}/{Key+}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\",\n          \"UploadId\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"UploadId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"uploadId\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          }\n        }\n      }\n    },\n    \"CompleteMultipartUpload\": {\n      \"http\": {\n        \"requestUri\": \"/{Bucket}/{Key+}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\",\n          \"UploadId\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"MultipartUpload\": {\n            \"locationName\": \"CompleteMultipartUpload\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            },\n            \"type\": \"structure\",\n            \"members\": {\n              \"Parts\": {\n                \"locationName\": \"Part\",\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"ETag\": {},\n                    \"PartNumber\": {\n                      \"type\": \"integer\"\n                    }\n                  }\n                },\n                \"flattened\": true\n              }\n            }\n          },\n          \"UploadId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"uploadId\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          }\n        },\n        \"payload\": \"MultipartUpload\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Location\": {},\n          \"Bucket\": {},\n          \"Key\": {},\n          \"Expiration\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-expiration\"\n          },\n          \"ETag\": {},\n          \"ServerSideEncryption\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption\"\n          },\n          \"VersionId\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-version-id\"\n          },\n          \"SSEKMSKeyId\": {\n            \"shape\": \"Sj\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-aws-kms-key-id\"\n          },\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          }\n        }\n      }\n    },\n    \"CopyObject\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}/{Key+}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"CopySource\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"ACL\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-acl\"\n          },\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"CacheControl\": {\n            \"location\": \"header\",\n            \"locationName\": \"Cache-Control\"\n          },\n          \"ContentDisposition\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Disposition\"\n          },\n          \"ContentEncoding\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Encoding\"\n          },\n          \"ContentLanguage\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Language\"\n          },\n          \"ContentType\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Type\"\n          },\n          \"CopySource\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source\"\n          },\n          \"CopySourceIfMatch\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-if-match\"\n          },\n          \"CopySourceIfModifiedSince\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-if-modified-since\",\n            \"type\": \"timestamp\"\n          },\n          \"CopySourceIfNoneMatch\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-if-none-match\"\n          },\n          \"CopySourceIfUnmodifiedSince\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-if-unmodified-since\",\n            \"type\": \"timestamp\"\n          },\n          \"Expires\": {\n            \"location\": \"header\",\n            \"locationName\": \"Expires\",\n            \"type\": \"timestamp\"\n          },\n          \"GrantFullControl\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-full-control\"\n          },\n          \"GrantRead\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-read\"\n          },\n          \"GrantReadACP\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-read-acp\"\n          },\n          \"GrantWriteACP\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-write-acp\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"Metadata\": {\n            \"shape\": \"S11\",\n            \"location\": \"headers\",\n            \"locationName\": \"x-amz-meta-\"\n          },\n          \"MetadataDirective\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-metadata-directive\"\n          },\n          \"TaggingDirective\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-tagging-directive\"\n          },\n          \"ServerSideEncryption\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption\"\n          },\n          \"StorageClass\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-storage-class\"\n          },\n          \"WebsiteRedirectLocation\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-website-redirect-location\"\n          },\n          \"SSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-algorithm\"\n          },\n          \"SSECustomerKey\": {\n            \"shape\": \"S19\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key\"\n          },\n          \"SSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key-MD5\"\n          },\n          \"SSEKMSKeyId\": {\n            \"shape\": \"Sj\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-aws-kms-key-id\"\n          },\n          \"CopySourceSSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-server-side-encryption-customer-algorithm\"\n          },\n          \"CopySourceSSECustomerKey\": {\n            \"shape\": \"S1c\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-server-side-encryption-customer-key\"\n          },\n          \"CopySourceSSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-server-side-encryption-customer-key-MD5\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          },\n          \"Tagging\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-tagging\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CopyObjectResult\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"ETag\": {},\n              \"LastModified\": {\n                \"type\": \"timestamp\"\n              }\n            }\n          },\n          \"Expiration\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-expiration\"\n          },\n          \"CopySourceVersionId\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-version-id\"\n          },\n          \"VersionId\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-version-id\"\n          },\n          \"ServerSideEncryption\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption\"\n          },\n          \"SSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-algorithm\"\n          },\n          \"SSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key-MD5\"\n          },\n          \"SSEKMSKeyId\": {\n            \"shape\": \"Sj\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-aws-kms-key-id\"\n          },\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          }\n        },\n        \"payload\": \"CopyObjectResult\"\n      },\n      \"alias\": \"PutObjectCopy\"\n    },\n    \"CreateBucket\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"ACL\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-acl\"\n          },\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"CreateBucketConfiguration\": {\n            \"locationName\": \"CreateBucketConfiguration\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            },\n            \"type\": \"structure\",\n            \"members\": {\n              \"LocationConstraint\": {}\n            }\n          },\n          \"GrantFullControl\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-full-control\"\n          },\n          \"GrantRead\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-read\"\n          },\n          \"GrantReadACP\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-read-acp\"\n          },\n          \"GrantWrite\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-write\"\n          },\n          \"GrantWriteACP\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-write-acp\"\n          }\n        },\n        \"payload\": \"CreateBucketConfiguration\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Location\": {\n            \"location\": \"header\",\n            \"locationName\": \"Location\"\n          }\n        }\n      },\n      \"alias\": \"PutBucket\"\n    },\n    \"CreateMultipartUpload\": {\n      \"http\": {\n        \"requestUri\": \"/{Bucket}/{Key+}?uploads\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"ACL\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-acl\"\n          },\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"CacheControl\": {\n            \"location\": \"header\",\n            \"locationName\": \"Cache-Control\"\n          },\n          \"ContentDisposition\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Disposition\"\n          },\n          \"ContentEncoding\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Encoding\"\n          },\n          \"ContentLanguage\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Language\"\n          },\n          \"ContentType\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Type\"\n          },\n          \"Expires\": {\n            \"location\": \"header\",\n            \"locationName\": \"Expires\",\n            \"type\": \"timestamp\"\n          },\n          \"GrantFullControl\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-full-control\"\n          },\n          \"GrantRead\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-read\"\n          },\n          \"GrantReadACP\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-read-acp\"\n          },\n          \"GrantWriteACP\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-write-acp\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"Metadata\": {\n            \"shape\": \"S11\",\n            \"location\": \"headers\",\n            \"locationName\": \"x-amz-meta-\"\n          },\n          \"ServerSideEncryption\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption\"\n          },\n          \"StorageClass\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-storage-class\"\n          },\n          \"WebsiteRedirectLocation\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-website-redirect-location\"\n          },\n          \"SSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-algorithm\"\n          },\n          \"SSECustomerKey\": {\n            \"shape\": \"S19\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key\"\n          },\n          \"SSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key-MD5\"\n          },\n          \"SSEKMSKeyId\": {\n            \"shape\": \"Sj\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-aws-kms-key-id\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AbortDate\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-abort-date\",\n            \"type\": \"timestamp\"\n          },\n          \"AbortRuleId\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-abort-rule-id\"\n          },\n          \"Bucket\": {\n            \"locationName\": \"Bucket\"\n          },\n          \"Key\": {},\n          \"UploadId\": {},\n          \"ServerSideEncryption\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption\"\n          },\n          \"SSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-algorithm\"\n          },\n          \"SSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key-MD5\"\n          },\n          \"SSEKMSKeyId\": {\n            \"shape\": \"Sj\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-aws-kms-key-id\"\n          },\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          }\n        }\n      },\n      \"alias\": \"InitiateMultipartUpload\"\n    },\n    \"DeleteBucket\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/{Bucket}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      }\n    },\n    \"DeleteBucketAnalyticsConfiguration\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/{Bucket}?analytics\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Id\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Id\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"id\"\n          }\n        }\n      }\n    },\n    \"DeleteBucketCors\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/{Bucket}?cors\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      }\n    },\n    \"DeleteBucketInventoryConfiguration\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/{Bucket}?inventory\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Id\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Id\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"id\"\n          }\n        }\n      }\n    },\n    \"DeleteBucketLifecycle\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/{Bucket}?lifecycle\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      }\n    },\n    \"DeleteBucketMetricsConfiguration\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/{Bucket}?metrics\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Id\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Id\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"id\"\n          }\n        }\n      }\n    },\n    \"DeleteBucketPolicy\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/{Bucket}?policy\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      }\n    },\n    \"DeleteBucketReplication\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/{Bucket}?replication\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      }\n    },\n    \"DeleteBucketTagging\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/{Bucket}?tagging\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      }\n    },\n    \"DeleteBucketWebsite\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/{Bucket}?website\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      }\n    },\n    \"DeleteObject\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/{Bucket}/{Key+}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"MFA\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-mfa\"\n          },\n          \"VersionId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"versionId\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DeleteMarker\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-delete-marker\",\n            \"type\": \"boolean\"\n          },\n          \"VersionId\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-version-id\"\n          },\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          }\n        }\n      }\n    },\n    \"DeleteObjectTagging\": {\n      \"http\": {\n        \"method\": \"DELETE\",\n        \"requestUri\": \"/{Bucket}/{Key+}?tagging\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"VersionId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"versionId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VersionId\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-version-id\"\n          }\n        }\n      }\n    },\n    \"DeleteObjects\": {\n      \"http\": {\n        \"requestUri\": \"/{Bucket}?delete\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Delete\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Delete\": {\n            \"locationName\": \"Delete\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            },\n            \"type\": \"structure\",\n            \"required\": [\n              \"Objects\"\n            ],\n            \"members\": {\n              \"Objects\": {\n                \"locationName\": \"Object\",\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"Key\"\n                  ],\n                  \"members\": {\n                    \"Key\": {},\n                    \"VersionId\": {}\n                  }\n                },\n                \"flattened\": true\n              },\n              \"Quiet\": {\n                \"type\": \"boolean\"\n              }\n            }\n          },\n          \"MFA\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-mfa\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          }\n        },\n        \"payload\": \"Delete\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Deleted\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Key\": {},\n                \"VersionId\": {},\n                \"DeleteMarker\": {\n                  \"type\": \"boolean\"\n                },\n                \"DeleteMarkerVersionId\": {}\n              }\n            },\n            \"flattened\": true\n          },\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          },\n          \"Errors\": {\n            \"locationName\": \"Error\",\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Key\": {},\n                \"VersionId\": {},\n                \"Code\": {},\n                \"Message\": {}\n              }\n            },\n            \"flattened\": true\n          }\n        }\n      },\n      \"alias\": \"DeleteMultipleObjects\"\n    },\n    \"GetBucketAccelerateConfiguration\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?accelerate\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Status\": {}\n        }\n      }\n    },\n    \"GetBucketAcl\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?acl\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Owner\": {\n            \"shape\": \"S2u\"\n          },\n          \"Grants\": {\n            \"shape\": \"S2x\",\n            \"locationName\": \"AccessControlList\"\n          }\n        }\n      }\n    },\n    \"GetBucketAnalyticsConfiguration\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?analytics\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Id\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Id\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AnalyticsConfiguration\": {\n            \"shape\": \"S36\"\n          }\n        },\n        \"payload\": \"AnalyticsConfiguration\"\n      }\n    },\n    \"GetBucketCors\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?cors\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CORSRules\": {\n            \"shape\": \"S3m\",\n            \"locationName\": \"CORSRule\"\n          }\n        }\n      }\n    },\n    \"GetBucketInventoryConfiguration\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?inventory\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Id\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Id\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InventoryConfiguration\": {\n            \"shape\": \"S3z\"\n          }\n        },\n        \"payload\": \"InventoryConfiguration\"\n      }\n    },\n    \"GetBucketLifecycle\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?lifecycle\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Rules\": {\n            \"shape\": \"S4c\",\n            \"locationName\": \"Rule\"\n          }\n        }\n      },\n      \"deprecated\": true\n    },\n    \"GetBucketLifecycleConfiguration\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?lifecycle\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Rules\": {\n            \"shape\": \"S4r\",\n            \"locationName\": \"Rule\"\n          }\n        }\n      }\n    },\n    \"GetBucketLocation\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?location\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LocationConstraint\": {}\n        }\n      }\n    },\n    \"GetBucketLogging\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?logging\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LoggingEnabled\": {\n            \"shape\": \"S51\"\n          }\n        }\n      }\n    },\n    \"GetBucketMetricsConfiguration\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?metrics\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Id\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Id\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"id\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"MetricsConfiguration\": {\n            \"shape\": \"S59\"\n          }\n        },\n        \"payload\": \"MetricsConfiguration\"\n      }\n    },\n    \"GetBucketNotification\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?notification\"\n      },\n      \"input\": {\n        \"shape\": \"S5c\"\n      },\n      \"output\": {\n        \"shape\": \"S5d\"\n      },\n      \"deprecated\": true\n    },\n    \"GetBucketNotificationConfiguration\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?notification\"\n      },\n      \"input\": {\n        \"shape\": \"S5c\"\n      },\n      \"output\": {\n        \"shape\": \"S5o\"\n      }\n    },\n    \"GetBucketPolicy\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?policy\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Policy\": {}\n        },\n        \"payload\": \"Policy\"\n      }\n    },\n    \"GetBucketReplication\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?replication\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ReplicationConfiguration\": {\n            \"shape\": \"S67\"\n          }\n        },\n        \"payload\": \"ReplicationConfiguration\"\n      }\n    },\n    \"GetBucketRequestPayment\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?requestPayment\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Payer\": {}\n        }\n      }\n    },\n    \"GetBucketTagging\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?tagging\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TagSet\"\n        ],\n        \"members\": {\n          \"TagSet\": {\n            \"shape\": \"S3c\"\n          }\n        }\n      }\n    },\n    \"GetBucketVersioning\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?versioning\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Status\": {},\n          \"MFADelete\": {\n            \"locationName\": \"MfaDelete\"\n          }\n        }\n      }\n    },\n    \"GetBucketWebsite\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?website\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RedirectAllRequestsTo\": {\n            \"shape\": \"S6o\"\n          },\n          \"IndexDocument\": {\n            \"shape\": \"S6r\"\n          },\n          \"ErrorDocument\": {\n            \"shape\": \"S6t\"\n          },\n          \"RoutingRules\": {\n            \"shape\": \"S6u\"\n          }\n        }\n      }\n    },\n    \"GetObject\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}/{Key+}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"IfMatch\": {\n            \"location\": \"header\",\n            \"locationName\": \"If-Match\"\n          },\n          \"IfModifiedSince\": {\n            \"location\": \"header\",\n            \"locationName\": \"If-Modified-Since\",\n            \"type\": \"timestamp\"\n          },\n          \"IfNoneMatch\": {\n            \"location\": \"header\",\n            \"locationName\": \"If-None-Match\"\n          },\n          \"IfUnmodifiedSince\": {\n            \"location\": \"header\",\n            \"locationName\": \"If-Unmodified-Since\",\n            \"type\": \"timestamp\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"Range\": {\n            \"location\": \"header\",\n            \"locationName\": \"Range\"\n          },\n          \"ResponseCacheControl\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"response-cache-control\"\n          },\n          \"ResponseContentDisposition\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"response-content-disposition\"\n          },\n          \"ResponseContentEncoding\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"response-content-encoding\"\n          },\n          \"ResponseContentLanguage\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"response-content-language\"\n          },\n          \"ResponseContentType\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"response-content-type\"\n          },\n          \"ResponseExpires\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"response-expires\",\n            \"type\": \"timestamp\"\n          },\n          \"VersionId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"versionId\"\n          },\n          \"SSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-algorithm\"\n          },\n          \"SSECustomerKey\": {\n            \"shape\": \"S19\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key\"\n          },\n          \"SSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key-MD5\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          },\n          \"PartNumber\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"partNumber\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Body\": {\n            \"streaming\": true,\n            \"type\": \"blob\"\n          },\n          \"DeleteMarker\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-delete-marker\",\n            \"type\": \"boolean\"\n          },\n          \"AcceptRanges\": {\n            \"location\": \"header\",\n            \"locationName\": \"accept-ranges\"\n          },\n          \"Expiration\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-expiration\"\n          },\n          \"Restore\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-restore\"\n          },\n          \"LastModified\": {\n            \"location\": \"header\",\n            \"locationName\": \"Last-Modified\",\n            \"type\": \"timestamp\"\n          },\n          \"ContentLength\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Length\",\n            \"type\": \"long\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          },\n          \"MissingMeta\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-missing-meta\",\n            \"type\": \"integer\"\n          },\n          \"VersionId\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-version-id\"\n          },\n          \"CacheControl\": {\n            \"location\": \"header\",\n            \"locationName\": \"Cache-Control\"\n          },\n          \"ContentDisposition\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Disposition\"\n          },\n          \"ContentEncoding\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Encoding\"\n          },\n          \"ContentLanguage\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Language\"\n          },\n          \"ContentRange\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Range\"\n          },\n          \"ContentType\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Type\"\n          },\n          \"Expires\": {\n            \"location\": \"header\",\n            \"locationName\": \"Expires\",\n            \"type\": \"timestamp\"\n          },\n          \"WebsiteRedirectLocation\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-website-redirect-location\"\n          },\n          \"ServerSideEncryption\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption\"\n          },\n          \"Metadata\": {\n            \"shape\": \"S11\",\n            \"location\": \"headers\",\n            \"locationName\": \"x-amz-meta-\"\n          },\n          \"SSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-algorithm\"\n          },\n          \"SSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key-MD5\"\n          },\n          \"SSEKMSKeyId\": {\n            \"shape\": \"Sj\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-aws-kms-key-id\"\n          },\n          \"StorageClass\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-storage-class\"\n          },\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          },\n          \"ReplicationStatus\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-replication-status\"\n          },\n          \"PartsCount\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-mp-parts-count\",\n            \"type\": \"integer\"\n          },\n          \"TagCount\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-tagging-count\",\n            \"type\": \"integer\"\n          }\n        },\n        \"payload\": \"Body\"\n      }\n    },\n    \"GetObjectAcl\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}/{Key+}?acl\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"VersionId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"versionId\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Owner\": {\n            \"shape\": \"S2u\"\n          },\n          \"Grants\": {\n            \"shape\": \"S2x\",\n            \"locationName\": \"AccessControlList\"\n          },\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          }\n        }\n      }\n    },\n    \"GetObjectTagging\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}/{Key+}?tagging\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"VersionId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"versionId\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TagSet\"\n        ],\n        \"members\": {\n          \"VersionId\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-version-id\"\n          },\n          \"TagSet\": {\n            \"shape\": \"S3c\"\n          }\n        }\n      }\n    },\n    \"GetObjectTorrent\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}/{Key+}?torrent\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Body\": {\n            \"streaming\": true,\n            \"type\": \"blob\"\n          },\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          }\n        },\n        \"payload\": \"Body\"\n      }\n    },\n    \"HeadBucket\": {\n      \"http\": {\n        \"method\": \"HEAD\",\n        \"requestUri\": \"/{Bucket}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          }\n        }\n      }\n    },\n    \"HeadObject\": {\n      \"http\": {\n        \"method\": \"HEAD\",\n        \"requestUri\": \"/{Bucket}/{Key+}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"IfMatch\": {\n            \"location\": \"header\",\n            \"locationName\": \"If-Match\"\n          },\n          \"IfModifiedSince\": {\n            \"location\": \"header\",\n            \"locationName\": \"If-Modified-Since\",\n            \"type\": \"timestamp\"\n          },\n          \"IfNoneMatch\": {\n            \"location\": \"header\",\n            \"locationName\": \"If-None-Match\"\n          },\n          \"IfUnmodifiedSince\": {\n            \"location\": \"header\",\n            \"locationName\": \"If-Unmodified-Since\",\n            \"type\": \"timestamp\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"Range\": {\n            \"location\": \"header\",\n            \"locationName\": \"Range\"\n          },\n          \"VersionId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"versionId\"\n          },\n          \"SSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-algorithm\"\n          },\n          \"SSECustomerKey\": {\n            \"shape\": \"S19\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key\"\n          },\n          \"SSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key-MD5\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          },\n          \"PartNumber\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"partNumber\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DeleteMarker\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-delete-marker\",\n            \"type\": \"boolean\"\n          },\n          \"AcceptRanges\": {\n            \"location\": \"header\",\n            \"locationName\": \"accept-ranges\"\n          },\n          \"Expiration\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-expiration\"\n          },\n          \"Restore\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-restore\"\n          },\n          \"LastModified\": {\n            \"location\": \"header\",\n            \"locationName\": \"Last-Modified\",\n            \"type\": \"timestamp\"\n          },\n          \"ContentLength\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Length\",\n            \"type\": \"long\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          },\n          \"MissingMeta\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-missing-meta\",\n            \"type\": \"integer\"\n          },\n          \"VersionId\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-version-id\"\n          },\n          \"CacheControl\": {\n            \"location\": \"header\",\n            \"locationName\": \"Cache-Control\"\n          },\n          \"ContentDisposition\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Disposition\"\n          },\n          \"ContentEncoding\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Encoding\"\n          },\n          \"ContentLanguage\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Language\"\n          },\n          \"ContentType\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Type\"\n          },\n          \"Expires\": {\n            \"location\": \"header\",\n            \"locationName\": \"Expires\",\n            \"type\": \"timestamp\"\n          },\n          \"WebsiteRedirectLocation\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-website-redirect-location\"\n          },\n          \"ServerSideEncryption\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption\"\n          },\n          \"Metadata\": {\n            \"shape\": \"S11\",\n            \"location\": \"headers\",\n            \"locationName\": \"x-amz-meta-\"\n          },\n          \"SSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-algorithm\"\n          },\n          \"SSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key-MD5\"\n          },\n          \"SSEKMSKeyId\": {\n            \"shape\": \"Sj\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-aws-kms-key-id\"\n          },\n          \"StorageClass\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-storage-class\"\n          },\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          },\n          \"ReplicationStatus\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-replication-status\"\n          },\n          \"PartsCount\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-mp-parts-count\",\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"ListBucketAnalyticsConfigurations\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?analytics\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"ContinuationToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"continuation-token\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"ContinuationToken\": {},\n          \"NextContinuationToken\": {},\n          \"AnalyticsConfigurationList\": {\n            \"locationName\": \"AnalyticsConfiguration\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S36\"\n            },\n            \"flattened\": true\n          }\n        }\n      }\n    },\n    \"ListBucketInventoryConfigurations\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?inventory\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"ContinuationToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"continuation-token\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ContinuationToken\": {},\n          \"InventoryConfigurationList\": {\n            \"locationName\": \"InventoryConfiguration\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S3z\"\n            },\n            \"flattened\": true\n          },\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"NextContinuationToken\": {}\n        }\n      }\n    },\n    \"ListBucketMetricsConfigurations\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?metrics\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"ContinuationToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"continuation-token\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"ContinuationToken\": {},\n          \"NextContinuationToken\": {},\n          \"MetricsConfigurationList\": {\n            \"locationName\": \"MetricsConfiguration\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S59\"\n            },\n            \"flattened\": true\n          }\n        }\n      }\n    },\n    \"ListBuckets\": {\n      \"http\": {\n        \"method\": \"GET\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Buckets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Bucket\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"CreationDate\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"Owner\": {\n            \"shape\": \"S2u\"\n          }\n        }\n      },\n      \"alias\": \"GetService\"\n    },\n    \"ListMultipartUploads\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?uploads\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Delimiter\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"delimiter\"\n          },\n          \"EncodingType\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"encoding-type\"\n          },\n          \"KeyMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"key-marker\"\n          },\n          \"MaxUploads\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"max-uploads\",\n            \"type\": \"integer\"\n          },\n          \"Prefix\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"prefix\"\n          },\n          \"UploadIdMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"upload-id-marker\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Bucket\": {},\n          \"KeyMarker\": {},\n          \"UploadIdMarker\": {},\n          \"NextKeyMarker\": {},\n          \"Prefix\": {},\n          \"Delimiter\": {},\n          \"NextUploadIdMarker\": {},\n          \"MaxUploads\": {\n            \"type\": \"integer\"\n          },\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"Uploads\": {\n            \"locationName\": \"Upload\",\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"UploadId\": {},\n                \"Key\": {},\n                \"Initiated\": {\n                  \"type\": \"timestamp\"\n                },\n                \"StorageClass\": {},\n                \"Owner\": {\n                  \"shape\": \"S2u\"\n                },\n                \"Initiator\": {\n                  \"shape\": \"S8q\"\n                }\n              }\n            },\n            \"flattened\": true\n          },\n          \"CommonPrefixes\": {\n            \"shape\": \"S8r\"\n          },\n          \"EncodingType\": {}\n        }\n      }\n    },\n    \"ListObjectVersions\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?versions\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Delimiter\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"delimiter\"\n          },\n          \"EncodingType\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"encoding-type\"\n          },\n          \"KeyMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"key-marker\"\n          },\n          \"MaxKeys\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"max-keys\",\n            \"type\": \"integer\"\n          },\n          \"Prefix\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"prefix\"\n          },\n          \"VersionIdMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"version-id-marker\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"KeyMarker\": {},\n          \"VersionIdMarker\": {},\n          \"NextKeyMarker\": {},\n          \"NextVersionIdMarker\": {},\n          \"Versions\": {\n            \"locationName\": \"Version\",\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ETag\": {},\n                \"Size\": {\n                  \"type\": \"integer\"\n                },\n                \"StorageClass\": {},\n                \"Key\": {},\n                \"VersionId\": {},\n                \"IsLatest\": {\n                  \"type\": \"boolean\"\n                },\n                \"LastModified\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Owner\": {\n                  \"shape\": \"S2u\"\n                }\n              }\n            },\n            \"flattened\": true\n          },\n          \"DeleteMarkers\": {\n            \"locationName\": \"DeleteMarker\",\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Owner\": {\n                  \"shape\": \"S2u\"\n                },\n                \"Key\": {},\n                \"VersionId\": {},\n                \"IsLatest\": {\n                  \"type\": \"boolean\"\n                },\n                \"LastModified\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            },\n            \"flattened\": true\n          },\n          \"Name\": {},\n          \"Prefix\": {},\n          \"Delimiter\": {},\n          \"MaxKeys\": {\n            \"type\": \"integer\"\n          },\n          \"CommonPrefixes\": {\n            \"shape\": \"S8r\"\n          },\n          \"EncodingType\": {}\n        }\n      },\n      \"alias\": \"GetBucketObjectVersions\"\n    },\n    \"ListObjects\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Delimiter\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"delimiter\"\n          },\n          \"EncodingType\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"encoding-type\"\n          },\n          \"Marker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"marker\"\n          },\n          \"MaxKeys\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"max-keys\",\n            \"type\": \"integer\"\n          },\n          \"Prefix\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"prefix\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"Marker\": {},\n          \"NextMarker\": {},\n          \"Contents\": {\n            \"shape\": \"S99\"\n          },\n          \"Name\": {},\n          \"Prefix\": {},\n          \"Delimiter\": {},\n          \"MaxKeys\": {\n            \"type\": \"integer\"\n          },\n          \"CommonPrefixes\": {\n            \"shape\": \"S8r\"\n          },\n          \"EncodingType\": {}\n        }\n      },\n      \"alias\": \"GetBucket\"\n    },\n    \"ListObjectsV2\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}?list-type=2\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Delimiter\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"delimiter\"\n          },\n          \"EncodingType\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"encoding-type\"\n          },\n          \"MaxKeys\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"max-keys\",\n            \"type\": \"integer\"\n          },\n          \"Prefix\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"prefix\"\n          },\n          \"ContinuationToken\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"continuation-token\"\n          },\n          \"FetchOwner\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"fetch-owner\",\n            \"type\": \"boolean\"\n          },\n          \"StartAfter\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"start-after\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"Contents\": {\n            \"shape\": \"S99\"\n          },\n          \"Name\": {},\n          \"Prefix\": {},\n          \"Delimiter\": {},\n          \"MaxKeys\": {\n            \"type\": \"integer\"\n          },\n          \"CommonPrefixes\": {\n            \"shape\": \"S8r\"\n          },\n          \"EncodingType\": {},\n          \"KeyCount\": {\n            \"type\": \"integer\"\n          },\n          \"ContinuationToken\": {},\n          \"NextContinuationToken\": {},\n          \"StartAfter\": {}\n        }\n      }\n    },\n    \"ListParts\": {\n      \"http\": {\n        \"method\": \"GET\",\n        \"requestUri\": \"/{Bucket}/{Key+}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\",\n          \"UploadId\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"MaxParts\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"max-parts\",\n            \"type\": \"integer\"\n          },\n          \"PartNumberMarker\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"part-number-marker\",\n            \"type\": \"integer\"\n          },\n          \"UploadId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"uploadId\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AbortDate\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-abort-date\",\n            \"type\": \"timestamp\"\n          },\n          \"AbortRuleId\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-abort-rule-id\"\n          },\n          \"Bucket\": {},\n          \"Key\": {},\n          \"UploadId\": {},\n          \"PartNumberMarker\": {\n            \"type\": \"integer\"\n          },\n          \"NextPartNumberMarker\": {\n            \"type\": \"integer\"\n          },\n          \"MaxParts\": {\n            \"type\": \"integer\"\n          },\n          \"IsTruncated\": {\n            \"type\": \"boolean\"\n          },\n          \"Parts\": {\n            \"locationName\": \"Part\",\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"PartNumber\": {\n                  \"type\": \"integer\"\n                },\n                \"LastModified\": {\n                  \"type\": \"timestamp\"\n                },\n                \"ETag\": {},\n                \"Size\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"flattened\": true\n          },\n          \"Initiator\": {\n            \"shape\": \"S8q\"\n          },\n          \"Owner\": {\n            \"shape\": \"S2u\"\n          },\n          \"StorageClass\": {},\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          }\n        }\n      }\n    },\n    \"PutBucketAccelerateConfiguration\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?accelerate\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"AccelerateConfiguration\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"AccelerateConfiguration\": {\n            \"locationName\": \"AccelerateConfiguration\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            },\n            \"type\": \"structure\",\n            \"members\": {\n              \"Status\": {}\n            }\n          }\n        },\n        \"payload\": \"AccelerateConfiguration\"\n      }\n    },\n    \"PutBucketAcl\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?acl\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"ACL\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-acl\"\n          },\n          \"AccessControlPolicy\": {\n            \"shape\": \"S9r\",\n            \"locationName\": \"AccessControlPolicy\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            }\n          },\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          },\n          \"GrantFullControl\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-full-control\"\n          },\n          \"GrantRead\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-read\"\n          },\n          \"GrantReadACP\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-read-acp\"\n          },\n          \"GrantWrite\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-write\"\n          },\n          \"GrantWriteACP\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-write-acp\"\n          }\n        },\n        \"payload\": \"AccessControlPolicy\"\n      }\n    },\n    \"PutBucketAnalyticsConfiguration\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?analytics\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Id\",\n          \"AnalyticsConfiguration\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Id\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"id\"\n          },\n          \"AnalyticsConfiguration\": {\n            \"shape\": \"S36\",\n            \"locationName\": \"AnalyticsConfiguration\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            }\n          }\n        },\n        \"payload\": \"AnalyticsConfiguration\"\n      }\n    },\n    \"PutBucketCors\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?cors\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"CORSConfiguration\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"CORSConfiguration\": {\n            \"locationName\": \"CORSConfiguration\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            },\n            \"type\": \"structure\",\n            \"required\": [\n              \"CORSRules\"\n            ],\n            \"members\": {\n              \"CORSRules\": {\n                \"shape\": \"S3m\",\n                \"locationName\": \"CORSRule\"\n              }\n            }\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          }\n        },\n        \"payload\": \"CORSConfiguration\"\n      }\n    },\n    \"PutBucketInventoryConfiguration\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?inventory\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Id\",\n          \"InventoryConfiguration\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Id\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"id\"\n          },\n          \"InventoryConfiguration\": {\n            \"shape\": \"S3z\",\n            \"locationName\": \"InventoryConfiguration\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            }\n          }\n        },\n        \"payload\": \"InventoryConfiguration\"\n      }\n    },\n    \"PutBucketLifecycle\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?lifecycle\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          },\n          \"LifecycleConfiguration\": {\n            \"locationName\": \"LifecycleConfiguration\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            },\n            \"type\": \"structure\",\n            \"required\": [\n              \"Rules\"\n            ],\n            \"members\": {\n              \"Rules\": {\n                \"shape\": \"S4c\",\n                \"locationName\": \"Rule\"\n              }\n            }\n          }\n        },\n        \"payload\": \"LifecycleConfiguration\"\n      },\n      \"deprecated\": true\n    },\n    \"PutBucketLifecycleConfiguration\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?lifecycle\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"LifecycleConfiguration\": {\n            \"locationName\": \"LifecycleConfiguration\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            },\n            \"type\": \"structure\",\n            \"required\": [\n              \"Rules\"\n            ],\n            \"members\": {\n              \"Rules\": {\n                \"shape\": \"S4r\",\n                \"locationName\": \"Rule\"\n              }\n            }\n          }\n        },\n        \"payload\": \"LifecycleConfiguration\"\n      }\n    },\n    \"PutBucketLogging\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?logging\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"BucketLoggingStatus\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"BucketLoggingStatus\": {\n            \"locationName\": \"BucketLoggingStatus\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            },\n            \"type\": \"structure\",\n            \"members\": {\n              \"LoggingEnabled\": {\n                \"shape\": \"S51\"\n              }\n            }\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          }\n        },\n        \"payload\": \"BucketLoggingStatus\"\n      }\n    },\n    \"PutBucketMetricsConfiguration\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?metrics\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Id\",\n          \"MetricsConfiguration\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Id\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"id\"\n          },\n          \"MetricsConfiguration\": {\n            \"shape\": \"S59\",\n            \"locationName\": \"MetricsConfiguration\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            }\n          }\n        },\n        \"payload\": \"MetricsConfiguration\"\n      }\n    },\n    \"PutBucketNotification\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?notification\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"NotificationConfiguration\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          },\n          \"NotificationConfiguration\": {\n            \"shape\": \"S5d\",\n            \"locationName\": \"NotificationConfiguration\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            }\n          }\n        },\n        \"payload\": \"NotificationConfiguration\"\n      },\n      \"deprecated\": true\n    },\n    \"PutBucketNotificationConfiguration\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?notification\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"NotificationConfiguration\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"NotificationConfiguration\": {\n            \"shape\": \"S5o\",\n            \"locationName\": \"NotificationConfiguration\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            }\n          }\n        },\n        \"payload\": \"NotificationConfiguration\"\n      }\n    },\n    \"PutBucketPolicy\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?policy\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Policy\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          },\n          \"Policy\": {}\n        },\n        \"payload\": \"Policy\"\n      }\n    },\n    \"PutBucketReplication\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?replication\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"ReplicationConfiguration\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          },\n          \"ReplicationConfiguration\": {\n            \"shape\": \"S67\",\n            \"locationName\": \"ReplicationConfiguration\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            }\n          }\n        },\n        \"payload\": \"ReplicationConfiguration\"\n      }\n    },\n    \"PutBucketRequestPayment\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?requestPayment\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"RequestPaymentConfiguration\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          },\n          \"RequestPaymentConfiguration\": {\n            \"locationName\": \"RequestPaymentConfiguration\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            },\n            \"type\": \"structure\",\n            \"required\": [\n              \"Payer\"\n            ],\n            \"members\": {\n              \"Payer\": {}\n            }\n          }\n        },\n        \"payload\": \"RequestPaymentConfiguration\"\n      }\n    },\n    \"PutBucketTagging\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?tagging\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Tagging\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          },\n          \"Tagging\": {\n            \"shape\": \"Sab\",\n            \"locationName\": \"Tagging\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            }\n          }\n        },\n        \"payload\": \"Tagging\"\n      }\n    },\n    \"PutBucketVersioning\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?versioning\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"VersioningConfiguration\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          },\n          \"MFA\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-mfa\"\n          },\n          \"VersioningConfiguration\": {\n            \"locationName\": \"VersioningConfiguration\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            },\n            \"type\": \"structure\",\n            \"members\": {\n              \"MFADelete\": {\n                \"locationName\": \"MfaDelete\"\n              },\n              \"Status\": {}\n            }\n          }\n        },\n        \"payload\": \"VersioningConfiguration\"\n      }\n    },\n    \"PutBucketWebsite\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}?website\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"WebsiteConfiguration\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          },\n          \"WebsiteConfiguration\": {\n            \"locationName\": \"WebsiteConfiguration\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            },\n            \"type\": \"structure\",\n            \"members\": {\n              \"ErrorDocument\": {\n                \"shape\": \"S6t\"\n              },\n              \"IndexDocument\": {\n                \"shape\": \"S6r\"\n              },\n              \"RedirectAllRequestsTo\": {\n                \"shape\": \"S6o\"\n              },\n              \"RoutingRules\": {\n                \"shape\": \"S6u\"\n              }\n            }\n          }\n        },\n        \"payload\": \"WebsiteConfiguration\"\n      }\n    },\n    \"PutObject\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}/{Key+}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"ACL\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-acl\"\n          },\n          \"Body\": {\n            \"streaming\": true,\n            \"type\": \"blob\"\n          },\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"CacheControl\": {\n            \"location\": \"header\",\n            \"locationName\": \"Cache-Control\"\n          },\n          \"ContentDisposition\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Disposition\"\n          },\n          \"ContentEncoding\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Encoding\"\n          },\n          \"ContentLanguage\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Language\"\n          },\n          \"ContentLength\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Length\",\n            \"type\": \"long\"\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          },\n          \"ContentType\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Type\"\n          },\n          \"Expires\": {\n            \"location\": \"header\",\n            \"locationName\": \"Expires\",\n            \"type\": \"timestamp\"\n          },\n          \"GrantFullControl\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-full-control\"\n          },\n          \"GrantRead\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-read\"\n          },\n          \"GrantReadACP\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-read-acp\"\n          },\n          \"GrantWriteACP\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-write-acp\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"Metadata\": {\n            \"shape\": \"S11\",\n            \"location\": \"headers\",\n            \"locationName\": \"x-amz-meta-\"\n          },\n          \"ServerSideEncryption\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption\"\n          },\n          \"StorageClass\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-storage-class\"\n          },\n          \"WebsiteRedirectLocation\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-website-redirect-location\"\n          },\n          \"SSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-algorithm\"\n          },\n          \"SSECustomerKey\": {\n            \"shape\": \"S19\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key\"\n          },\n          \"SSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key-MD5\"\n          },\n          \"SSEKMSKeyId\": {\n            \"shape\": \"Sj\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-aws-kms-key-id\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          },\n          \"Tagging\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-tagging\"\n          }\n        },\n        \"payload\": \"Body\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Expiration\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-expiration\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          },\n          \"ServerSideEncryption\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption\"\n          },\n          \"VersionId\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-version-id\"\n          },\n          \"SSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-algorithm\"\n          },\n          \"SSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key-MD5\"\n          },\n          \"SSEKMSKeyId\": {\n            \"shape\": \"Sj\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-aws-kms-key-id\"\n          },\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          }\n        }\n      }\n    },\n    \"PutObjectAcl\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}/{Key+}?acl\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"ACL\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-acl\"\n          },\n          \"AccessControlPolicy\": {\n            \"shape\": \"S9r\",\n            \"locationName\": \"AccessControlPolicy\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            }\n          },\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          },\n          \"GrantFullControl\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-full-control\"\n          },\n          \"GrantRead\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-read\"\n          },\n          \"GrantReadACP\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-read-acp\"\n          },\n          \"GrantWrite\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-write\"\n          },\n          \"GrantWriteACP\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-grant-write-acp\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          },\n          \"VersionId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"versionId\"\n          }\n        },\n        \"payload\": \"AccessControlPolicy\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          }\n        }\n      }\n    },\n    \"PutObjectTagging\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}/{Key+}?tagging\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\",\n          \"Tagging\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"VersionId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"versionId\"\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          },\n          \"Tagging\": {\n            \"shape\": \"Sab\",\n            \"locationName\": \"Tagging\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            }\n          }\n        },\n        \"payload\": \"Tagging\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VersionId\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-version-id\"\n          }\n        }\n      }\n    },\n    \"RestoreObject\": {\n      \"http\": {\n        \"requestUri\": \"/{Bucket}/{Key+}?restore\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"VersionId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"versionId\"\n          },\n          \"RestoreRequest\": {\n            \"locationName\": \"RestoreRequest\",\n            \"xmlNamespace\": {\n              \"uri\": \"http://s3.amazonaws.com/doc/2006-03-01/\"\n            },\n            \"type\": \"structure\",\n            \"required\": [\n              \"Days\"\n            ],\n            \"members\": {\n              \"Days\": {\n                \"type\": \"integer\"\n              },\n              \"GlacierJobParameters\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"Tier\"\n                ],\n                \"members\": {\n                  \"Tier\": {}\n                }\n              }\n            }\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          }\n        },\n        \"payload\": \"RestoreRequest\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          }\n        }\n      },\n      \"alias\": \"PostObjectRestore\"\n    },\n    \"UploadPart\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}/{Key+}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"Key\",\n          \"PartNumber\",\n          \"UploadId\"\n        ],\n        \"members\": {\n          \"Body\": {\n            \"streaming\": true,\n            \"type\": \"blob\"\n          },\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"ContentLength\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-Length\",\n            \"type\": \"long\"\n          },\n          \"ContentMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"Content-MD5\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"PartNumber\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"partNumber\",\n            \"type\": \"integer\"\n          },\n          \"UploadId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"uploadId\"\n          },\n          \"SSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-algorithm\"\n          },\n          \"SSECustomerKey\": {\n            \"shape\": \"S19\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key\"\n          },\n          \"SSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key-MD5\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          }\n        },\n        \"payload\": \"Body\"\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ServerSideEncryption\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption\"\n          },\n          \"ETag\": {\n            \"location\": \"header\",\n            \"locationName\": \"ETag\"\n          },\n          \"SSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-algorithm\"\n          },\n          \"SSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key-MD5\"\n          },\n          \"SSEKMSKeyId\": {\n            \"shape\": \"Sj\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-aws-kms-key-id\"\n          },\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          }\n        }\n      }\n    },\n    \"UploadPartCopy\": {\n      \"http\": {\n        \"method\": \"PUT\",\n        \"requestUri\": \"/{Bucket}/{Key+}\"\n      },\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Bucket\",\n          \"CopySource\",\n          \"Key\",\n          \"PartNumber\",\n          \"UploadId\"\n        ],\n        \"members\": {\n          \"Bucket\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Bucket\"\n          },\n          \"CopySource\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source\"\n          },\n          \"CopySourceIfMatch\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-if-match\"\n          },\n          \"CopySourceIfModifiedSince\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-if-modified-since\",\n            \"type\": \"timestamp\"\n          },\n          \"CopySourceIfNoneMatch\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-if-none-match\"\n          },\n          \"CopySourceIfUnmodifiedSince\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-if-unmodified-since\",\n            \"type\": \"timestamp\"\n          },\n          \"CopySourceRange\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-range\"\n          },\n          \"Key\": {\n            \"location\": \"uri\",\n            \"locationName\": \"Key\"\n          },\n          \"PartNumber\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"partNumber\",\n            \"type\": \"integer\"\n          },\n          \"UploadId\": {\n            \"location\": \"querystring\",\n            \"locationName\": \"uploadId\"\n          },\n          \"SSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-algorithm\"\n          },\n          \"SSECustomerKey\": {\n            \"shape\": \"S19\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key\"\n          },\n          \"SSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key-MD5\"\n          },\n          \"CopySourceSSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-server-side-encryption-customer-algorithm\"\n          },\n          \"CopySourceSSECustomerKey\": {\n            \"shape\": \"S1c\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-server-side-encryption-customer-key\"\n          },\n          \"CopySourceSSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-server-side-encryption-customer-key-MD5\"\n          },\n          \"RequestPayer\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-payer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CopySourceVersionId\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-copy-source-version-id\"\n          },\n          \"CopyPartResult\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"ETag\": {},\n              \"LastModified\": {\n                \"type\": \"timestamp\"\n              }\n            }\n          },\n          \"ServerSideEncryption\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption\"\n          },\n          \"SSECustomerAlgorithm\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-algorithm\"\n          },\n          \"SSECustomerKeyMD5\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-customer-key-MD5\"\n          },\n          \"SSEKMSKeyId\": {\n            \"shape\": \"Sj\",\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-server-side-encryption-aws-kms-key-id\"\n          },\n          \"RequestCharged\": {\n            \"location\": \"header\",\n            \"locationName\": \"x-amz-request-charged\"\n          }\n        },\n        \"payload\": \"CopyPartResult\"\n      }\n    }\n  },\n  \"shapes\": {\n    \"Sj\": {\n      \"type\": \"string\",\n      \"sensitive\": true\n    },\n    \"S11\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S19\": {\n      \"type\": \"blob\",\n      \"sensitive\": true\n    },\n    \"S1c\": {\n      \"type\": \"blob\",\n      \"sensitive\": true\n    },\n    \"S2u\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DisplayName\": {},\n        \"ID\": {}\n      }\n    },\n    \"S2x\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"Grant\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Grantee\": {\n            \"shape\": \"S2z\"\n          },\n          \"Permission\": {}\n        }\n      }\n    },\n    \"S2z\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Type\"\n      ],\n      \"members\": {\n        \"DisplayName\": {},\n        \"EmailAddress\": {},\n        \"ID\": {},\n        \"Type\": {\n          \"locationName\": \"xsi:type\",\n          \"xmlAttribute\": true\n        },\n        \"URI\": {}\n      },\n      \"xmlNamespace\": {\n        \"prefix\": \"xsi\",\n        \"uri\": \"http://www.w3.org/2001/XMLSchema-instance\"\n      }\n    },\n    \"S36\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Id\",\n        \"StorageClassAnalysis\"\n      ],\n      \"members\": {\n        \"Id\": {},\n        \"Filter\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Prefix\": {},\n            \"Tag\": {\n              \"shape\": \"S39\"\n            },\n            \"And\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Prefix\": {},\n                \"Tags\": {\n                  \"shape\": \"S3c\",\n                  \"flattened\": true,\n                  \"locationName\": \"Tag\"\n                }\n              }\n            }\n          }\n        },\n        \"StorageClassAnalysis\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"DataExport\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"OutputSchemaVersion\",\n                \"Destination\"\n              ],\n              \"members\": {\n                \"OutputSchemaVersion\": {},\n                \"Destination\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"S3BucketDestination\"\n                  ],\n                  \"members\": {\n                    \"S3BucketDestination\": {\n                      \"type\": \"structure\",\n                      \"required\": [\n                        \"Format\",\n                        \"Bucket\"\n                      ],\n                      \"members\": {\n                        \"Format\": {},\n                        \"BucketAccountId\": {},\n                        \"Bucket\": {},\n                        \"Prefix\": {}\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S39\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Key\",\n        \"Value\"\n      ],\n      \"members\": {\n        \"Key\": {},\n        \"Value\": {}\n      }\n    },\n    \"S3c\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"S39\",\n        \"locationName\": \"Tag\"\n      }\n    },\n    \"S3m\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AllowedMethods\",\n          \"AllowedOrigins\"\n        ],\n        \"members\": {\n          \"AllowedHeaders\": {\n            \"locationName\": \"AllowedHeader\",\n            \"type\": \"list\",\n            \"member\": {},\n            \"flattened\": true\n          },\n          \"AllowedMethods\": {\n            \"locationName\": \"AllowedMethod\",\n            \"type\": \"list\",\n            \"member\": {},\n            \"flattened\": true\n          },\n          \"AllowedOrigins\": {\n            \"locationName\": \"AllowedOrigin\",\n            \"type\": \"list\",\n            \"member\": {},\n            \"flattened\": true\n          },\n          \"ExposeHeaders\": {\n            \"locationName\": \"ExposeHeader\",\n            \"type\": \"list\",\n            \"member\": {},\n            \"flattened\": true\n          },\n          \"MaxAgeSeconds\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"flattened\": true\n    },\n    \"S3z\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Destination\",\n        \"IsEnabled\",\n        \"Id\",\n        \"IncludedObjectVersions\",\n        \"Schedule\"\n      ],\n      \"members\": {\n        \"Destination\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"S3BucketDestination\"\n          ],\n          \"members\": {\n            \"S3BucketDestination\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Bucket\",\n                \"Format\"\n              ],\n              \"members\": {\n                \"AccountId\": {},\n                \"Bucket\": {},\n                \"Format\": {},\n                \"Prefix\": {}\n              }\n            }\n          }\n        },\n        \"IsEnabled\": {\n          \"type\": \"boolean\"\n        },\n        \"Filter\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Prefix\"\n          ],\n          \"members\": {\n            \"Prefix\": {}\n          }\n        },\n        \"Id\": {},\n        \"IncludedObjectVersions\": {},\n        \"OptionalFields\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Field\"\n          }\n        },\n        \"Schedule\": {\n          \"type\": \"structure\",\n          \"required\": [\n            \"Frequency\"\n          ],\n          \"members\": {\n            \"Frequency\": {}\n          }\n        }\n      }\n    },\n    \"S4c\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Prefix\",\n          \"Status\"\n        ],\n        \"members\": {\n          \"Expiration\": {\n            \"shape\": \"S4e\"\n          },\n          \"ID\": {},\n          \"Prefix\": {},\n          \"Status\": {},\n          \"Transition\": {\n            \"shape\": \"S4j\"\n          },\n          \"NoncurrentVersionTransition\": {\n            \"shape\": \"S4l\"\n          },\n          \"NoncurrentVersionExpiration\": {\n            \"shape\": \"S4m\"\n          },\n          \"AbortIncompleteMultipartUpload\": {\n            \"shape\": \"S4n\"\n          }\n        }\n      },\n      \"flattened\": true\n    },\n    \"S4e\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Date\": {\n          \"shape\": \"S4f\"\n        },\n        \"Days\": {\n          \"type\": \"integer\"\n        },\n        \"ExpiredObjectDeleteMarker\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"S4f\": {\n      \"type\": \"timestamp\",\n      \"timestampFormat\": \"iso8601\"\n    },\n    \"S4j\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Date\": {\n          \"shape\": \"S4f\"\n        },\n        \"Days\": {\n          \"type\": \"integer\"\n        },\n        \"StorageClass\": {}\n      }\n    },\n    \"S4l\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"NoncurrentDays\": {\n          \"type\": \"integer\"\n        },\n        \"StorageClass\": {}\n      }\n    },\n    \"S4m\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"NoncurrentDays\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"S4n\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"DaysAfterInitiation\": {\n          \"type\": \"integer\"\n        }\n      }\n    },\n    \"S4r\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Status\"\n        ],\n        \"members\": {\n          \"Expiration\": {\n            \"shape\": \"S4e\"\n          },\n          \"ID\": {},\n          \"Prefix\": {\n            \"deprecated\": true\n          },\n          \"Filter\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Prefix\": {},\n              \"Tag\": {\n                \"shape\": \"S39\"\n              },\n              \"And\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"Prefix\": {},\n                  \"Tags\": {\n                    \"shape\": \"S3c\",\n                    \"flattened\": true,\n                    \"locationName\": \"Tag\"\n                  }\n                }\n              }\n            }\n          },\n          \"Status\": {},\n          \"Transitions\": {\n            \"locationName\": \"Transition\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4j\"\n            },\n            \"flattened\": true\n          },\n          \"NoncurrentVersionTransitions\": {\n            \"locationName\": \"NoncurrentVersionTransition\",\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4l\"\n            },\n            \"flattened\": true\n          },\n          \"NoncurrentVersionExpiration\": {\n            \"shape\": \"S4m\"\n          },\n          \"AbortIncompleteMultipartUpload\": {\n            \"shape\": \"S4n\"\n          }\n        }\n      },\n      \"flattened\": true\n    },\n    \"S51\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"TargetBucket\": {},\n        \"TargetGrants\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"Grant\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Grantee\": {\n                \"shape\": \"S2z\"\n              },\n              \"Permission\": {}\n            }\n          }\n        },\n        \"TargetPrefix\": {}\n      }\n    },\n    \"S59\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Id\"\n      ],\n      \"members\": {\n        \"Id\": {},\n        \"Filter\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Prefix\": {},\n            \"Tag\": {\n              \"shape\": \"S39\"\n            },\n            \"And\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Prefix\": {},\n                \"Tags\": {\n                  \"shape\": \"S3c\",\n                  \"flattened\": true,\n                  \"locationName\": \"Tag\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S5c\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Bucket\"\n      ],\n      \"members\": {\n        \"Bucket\": {\n          \"location\": \"uri\",\n          \"locationName\": \"Bucket\"\n        }\n      }\n    },\n    \"S5d\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"TopicConfiguration\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Id\": {},\n            \"Events\": {\n              \"shape\": \"S5g\",\n              \"locationName\": \"Event\"\n            },\n            \"Event\": {\n              \"deprecated\": true\n            },\n            \"Topic\": {}\n          }\n        },\n        \"QueueConfiguration\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Id\": {},\n            \"Event\": {\n              \"deprecated\": true\n            },\n            \"Events\": {\n              \"shape\": \"S5g\",\n              \"locationName\": \"Event\"\n            },\n            \"Queue\": {}\n          }\n        },\n        \"CloudFunctionConfiguration\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"Id\": {},\n            \"Event\": {\n              \"deprecated\": true\n            },\n            \"Events\": {\n              \"shape\": \"S5g\",\n              \"locationName\": \"Event\"\n            },\n            \"CloudFunction\": {},\n            \"InvocationRole\": {}\n          }\n        }\n      }\n    },\n    \"S5g\": {\n      \"type\": \"list\",\n      \"member\": {},\n      \"flattened\": true\n    },\n    \"S5o\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"TopicConfigurations\": {\n          \"locationName\": \"TopicConfiguration\",\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"TopicArn\",\n              \"Events\"\n            ],\n            \"members\": {\n              \"Id\": {},\n              \"TopicArn\": {\n                \"locationName\": \"Topic\"\n              },\n              \"Events\": {\n                \"shape\": \"S5g\",\n                \"locationName\": \"Event\"\n              },\n              \"Filter\": {\n                \"shape\": \"S5r\"\n              }\n            }\n          },\n          \"flattened\": true\n        },\n        \"QueueConfigurations\": {\n          \"locationName\": \"QueueConfiguration\",\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"QueueArn\",\n              \"Events\"\n            ],\n            \"members\": {\n              \"Id\": {},\n              \"QueueArn\": {\n                \"locationName\": \"Queue\"\n              },\n              \"Events\": {\n                \"shape\": \"S5g\",\n                \"locationName\": \"Event\"\n              },\n              \"Filter\": {\n                \"shape\": \"S5r\"\n              }\n            }\n          },\n          \"flattened\": true\n        },\n        \"LambdaFunctionConfigurations\": {\n          \"locationName\": \"CloudFunctionConfiguration\",\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"LambdaFunctionArn\",\n              \"Events\"\n            ],\n            \"members\": {\n              \"Id\": {},\n              \"LambdaFunctionArn\": {\n                \"locationName\": \"CloudFunction\"\n              },\n              \"Events\": {\n                \"shape\": \"S5g\",\n                \"locationName\": \"Event\"\n              },\n              \"Filter\": {\n                \"shape\": \"S5r\"\n              }\n            }\n          },\n          \"flattened\": true\n        }\n      }\n    },\n    \"S5r\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Key\": {\n          \"locationName\": \"S3Key\",\n          \"type\": \"structure\",\n          \"members\": {\n            \"FilterRules\": {\n              \"locationName\": \"FilterRule\",\n              \"type\": \"list\",\n              \"member\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"Name\": {},\n                  \"Value\": {}\n                }\n              },\n              \"flattened\": true\n            }\n          }\n        }\n      }\n    },\n    \"S67\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Role\",\n        \"Rules\"\n      ],\n      \"members\": {\n        \"Role\": {},\n        \"Rules\": {\n          \"locationName\": \"Rule\",\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"Prefix\",\n              \"Status\",\n              \"Destination\"\n            ],\n            \"members\": {\n              \"ID\": {},\n              \"Prefix\": {},\n              \"Status\": {},\n              \"Destination\": {\n                \"type\": \"structure\",\n                \"required\": [\n                  \"Bucket\"\n                ],\n                \"members\": {\n                  \"Bucket\": {},\n                  \"StorageClass\": {}\n                }\n              }\n            }\n          },\n          \"flattened\": true\n        }\n      }\n    },\n    \"S6o\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"HostName\"\n      ],\n      \"members\": {\n        \"HostName\": {},\n        \"Protocol\": {}\n      }\n    },\n    \"S6r\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Suffix\"\n      ],\n      \"members\": {\n        \"Suffix\": {}\n      }\n    },\n    \"S6t\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Key\"\n      ],\n      \"members\": {\n        \"Key\": {}\n      }\n    },\n    \"S6u\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"RoutingRule\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"Redirect\"\n        ],\n        \"members\": {\n          \"Condition\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"HttpErrorCodeReturnedEquals\": {},\n              \"KeyPrefixEquals\": {}\n            }\n          },\n          \"Redirect\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"HostName\": {},\n              \"HttpRedirectCode\": {},\n              \"Protocol\": {},\n              \"ReplaceKeyPrefixWith\": {},\n              \"ReplaceKeyWith\": {}\n            }\n          }\n        }\n      }\n    },\n    \"S8q\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ID\": {},\n        \"DisplayName\": {}\n      }\n    },\n    \"S8r\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Prefix\": {}\n        }\n      },\n      \"flattened\": true\n    },\n    \"S99\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"LastModified\": {\n            \"type\": \"timestamp\"\n          },\n          \"ETag\": {},\n          \"Size\": {\n            \"type\": \"integer\"\n          },\n          \"StorageClass\": {},\n          \"Owner\": {\n            \"shape\": \"S2u\"\n          }\n        }\n      },\n      \"flattened\": true\n    },\n    \"S9r\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Grants\": {\n          \"shape\": \"S2x\",\n          \"locationName\": \"AccessControlList\"\n        },\n        \"Owner\": {\n          \"shape\": \"S2u\"\n        }\n      }\n    },\n    \"Sab\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"TagSet\"\n      ],\n      \"members\": {\n        \"TagSet\": {\n          \"shape\": \"S3c\"\n        }\n      }\n    }\n  }\n}\n},{}],122:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"ListBuckets\": {\n      \"result_key\": \"Buckets\"\n    },\n    \"ListMultipartUploads\": {\n      \"limit_key\": \"MaxUploads\",\n      \"more_results\": \"IsTruncated\",\n      \"output_token\": [\n        \"NextKeyMarker\",\n        \"NextUploadIdMarker\"\n      ],\n      \"input_token\": [\n        \"KeyMarker\",\n        \"UploadIdMarker\"\n      ],\n      \"result_key\": [\n        \"Uploads\",\n        \"CommonPrefixes\"\n      ]\n    },\n    \"ListObjectVersions\": {\n      \"more_results\": \"IsTruncated\",\n      \"limit_key\": \"MaxKeys\",\n      \"output_token\": [\n        \"NextKeyMarker\",\n        \"NextVersionIdMarker\"\n      ],\n      \"input_token\": [\n        \"KeyMarker\",\n        \"VersionIdMarker\"\n      ],\n      \"result_key\": [\n        \"Versions\",\n        \"DeleteMarkers\",\n        \"CommonPrefixes\"\n      ]\n    },\n    \"ListObjects\": {\n      \"more_results\": \"IsTruncated\",\n      \"limit_key\": \"MaxKeys\",\n      \"output_token\": \"NextMarker || Contents[-1].Key\",\n      \"input_token\": \"Marker\",\n      \"result_key\": [\n        \"Contents\",\n        \"CommonPrefixes\"\n      ]\n    },\n    \"ListObjectsV2\": {\n      \"limit_key\": \"MaxKeys\",\n      \"output_token\": \"NextContinuationToken\",\n      \"input_token\": \"ContinuationToken\",\n      \"result_key\": [\n        \"Contents\",\n        \"CommonPrefixes\"\n      ]\n    },\n    \"ListParts\": {\n      \"more_results\": \"IsTruncated\",\n      \"limit_key\": \"MaxParts\",\n      \"output_token\": \"NextPartNumberMarker\",\n      \"input_token\": \"PartNumberMarker\",\n      \"result_key\": \"Parts\"\n    }\n  }\n}\n\n},{}],123:[function(require,module,exports){\nmodule.exports={\n  \"version\": 2,\n  \"waiters\": {\n    \"BucketExists\": {\n      \"delay\": 5,\n      \"operation\": \"HeadBucket\",\n      \"maxAttempts\": 20,\n      \"acceptors\": [\n        {\n          \"expected\": 200,\n          \"matcher\": \"status\",\n          \"state\": \"success\"\n        },\n        {\n          \"expected\": 301,\n          \"matcher\": \"status\",\n          \"state\": \"success\"\n        },\n        {\n          \"expected\": 403,\n          \"matcher\": \"status\",\n          \"state\": \"success\"\n        },\n        {\n          \"expected\": 404,\n          \"matcher\": \"status\",\n          \"state\": \"retry\"\n        }\n      ]\n    },\n    \"BucketNotExists\": {\n      \"delay\": 5,\n      \"operation\": \"HeadBucket\",\n      \"maxAttempts\": 20,\n      \"acceptors\": [\n        {\n          \"expected\": 404,\n          \"matcher\": \"status\",\n          \"state\": \"success\"\n        }\n      ]\n    },\n    \"ObjectExists\": {\n      \"delay\": 5,\n      \"operation\": \"HeadObject\",\n      \"maxAttempts\": 20,\n      \"acceptors\": [\n        {\n          \"expected\": 200,\n          \"matcher\": \"status\",\n          \"state\": \"success\"\n        },\n        {\n          \"expected\": 404,\n          \"matcher\": \"status\",\n          \"state\": \"retry\"\n        }\n      ]\n    },\n    \"ObjectNotExists\": {\n      \"delay\": 5,\n      \"operation\": \"HeadObject\",\n      \"maxAttempts\": 20,\n      \"acceptors\": [\n        {\n          \"expected\": 404,\n          \"matcher\": \"status\",\n          \"state\": \"success\"\n        }\n      ]\n    }\n  }\n}\n\n},{}],124:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"servicecatalog-2015-12-10\",\n    \"apiVersion\": \"2015-12-10\",\n    \"endpointPrefix\": \"servicecatalog\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"AWS Service Catalog\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"AWS242ServiceCatalogService\"\n  },\n  \"operations\": {\n    \"AcceptPortfolioShare\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PortfolioId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"PortfolioId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"AssociatePrincipalWithPortfolio\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PortfolioId\",\n          \"PrincipalARN\",\n          \"PrincipalType\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"PortfolioId\": {},\n          \"PrincipalARN\": {},\n          \"PrincipalType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"AssociateProductWithPortfolio\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ProductId\",\n          \"PortfolioId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"ProductId\": {},\n          \"PortfolioId\": {},\n          \"SourcePortfolioId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateConstraint\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PortfolioId\",\n          \"ProductId\",\n          \"Parameters\",\n          \"Type\",\n          \"IdempotencyToken\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"PortfolioId\": {},\n          \"ProductId\": {},\n          \"Parameters\": {},\n          \"Type\": {},\n          \"Description\": {},\n          \"IdempotencyToken\": {\n            \"idempotencyToken\": true\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConstraintDetail\": {\n            \"shape\": \"Sh\"\n          },\n          \"ConstraintParameters\": {},\n          \"Status\": {}\n        }\n      }\n    },\n    \"CreatePortfolio\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DisplayName\",\n          \"ProviderName\",\n          \"IdempotencyToken\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"DisplayName\": {},\n          \"Description\": {},\n          \"ProviderName\": {},\n          \"Tags\": {\n            \"shape\": \"So\"\n          },\n          \"IdempotencyToken\": {\n            \"idempotencyToken\": true\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PortfolioDetail\": {\n            \"shape\": \"St\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sw\"\n          }\n        }\n      }\n    },\n    \"CreatePortfolioShare\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PortfolioId\",\n          \"AccountId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"PortfolioId\": {},\n          \"AccountId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateProduct\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Owner\",\n          \"ProductType\",\n          \"ProvisioningArtifactParameters\",\n          \"IdempotencyToken\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"Name\": {},\n          \"Owner\": {},\n          \"Description\": {},\n          \"Distributor\": {},\n          \"SupportDescription\": {},\n          \"SupportEmail\": {},\n          \"SupportUrl\": {},\n          \"ProductType\": {},\n          \"Tags\": {\n            \"shape\": \"So\"\n          },\n          \"ProvisioningArtifactParameters\": {\n            \"shape\": \"S17\"\n          },\n          \"IdempotencyToken\": {\n            \"idempotencyToken\": true\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProductViewDetail\": {\n            \"shape\": \"S1f\"\n          },\n          \"ProvisioningArtifactDetail\": {\n            \"shape\": \"S1k\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sw\"\n          }\n        }\n      }\n    },\n    \"CreateProvisioningArtifact\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ProductId\",\n          \"Parameters\",\n          \"IdempotencyToken\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"ProductId\": {},\n          \"Parameters\": {\n            \"shape\": \"S17\"\n          },\n          \"IdempotencyToken\": {\n            \"idempotencyToken\": true\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProvisioningArtifactDetail\": {\n            \"shape\": \"S1k\"\n          },\n          \"Info\": {\n            \"shape\": \"S1a\"\n          },\n          \"Status\": {}\n        }\n      }\n    },\n    \"DeleteConstraint\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"Id\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeletePortfolio\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"Id\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeletePortfolioShare\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PortfolioId\",\n          \"AccountId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"PortfolioId\": {},\n          \"AccountId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteProduct\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"Id\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteProvisioningArtifact\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ProductId\",\n          \"ProvisioningArtifactId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"ProductId\": {},\n          \"ProvisioningArtifactId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DescribeConstraint\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"Id\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConstraintDetail\": {\n            \"shape\": \"Sh\"\n          },\n          \"ConstraintParameters\": {},\n          \"Status\": {}\n        }\n      }\n    },\n    \"DescribePortfolio\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"Id\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PortfolioDetail\": {\n            \"shape\": \"St\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sw\"\n          }\n        }\n      }\n    },\n    \"DescribeProduct\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"Id\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProductViewSummary\": {\n            \"shape\": \"S1g\"\n          },\n          \"ProvisioningArtifacts\": {\n            \"shape\": \"S23\"\n          }\n        }\n      }\n    },\n    \"DescribeProductAsAdmin\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"Id\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProductViewDetail\": {\n            \"shape\": \"S1f\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sw\"\n          }\n        }\n      }\n    },\n    \"DescribeProductView\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"Id\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProductViewSummary\": {\n            \"shape\": \"S1g\"\n          },\n          \"ProvisioningArtifacts\": {\n            \"shape\": \"S23\"\n          }\n        }\n      }\n    },\n    \"DescribeProvisioningArtifact\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ProvisioningArtifactId\",\n          \"ProductId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"ProvisioningArtifactId\": {},\n          \"ProductId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProvisioningArtifactDetail\": {\n            \"shape\": \"S1k\"\n          },\n          \"Info\": {\n            \"shape\": \"S1a\"\n          },\n          \"Status\": {}\n        }\n      }\n    },\n    \"DescribeProvisioningParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ProductId\",\n          \"ProvisioningArtifactId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"ProductId\": {},\n          \"ProvisioningArtifactId\": {},\n          \"PathId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProvisioningArtifactParameters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ParameterKey\": {},\n                \"DefaultValue\": {},\n                \"ParameterType\": {},\n                \"IsNoEcho\": {\n                  \"type\": \"boolean\"\n                },\n                \"Description\": {},\n                \"ParameterConstraints\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"AllowedValues\": {\n                      \"type\": \"list\",\n                      \"member\": {}\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"ConstraintSummaries\": {\n            \"shape\": \"S2o\"\n          },\n          \"UsageInstructions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Type\": {},\n                \"Value\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeRecord\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"Id\": {},\n          \"PageToken\": {},\n          \"PageSize\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RecordDetail\": {\n            \"shape\": \"S2y\"\n          },\n          \"RecordOutputs\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"OutputKey\": {},\n                \"OutputValue\": {},\n                \"Description\": {}\n              }\n            }\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"DisassociatePrincipalFromPortfolio\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PortfolioId\",\n          \"PrincipalARN\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"PortfolioId\": {},\n          \"PrincipalARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DisassociateProductFromPortfolio\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ProductId\",\n          \"PortfolioId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"ProductId\": {},\n          \"PortfolioId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"ListAcceptedPortfolioShares\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"PageToken\": {},\n          \"PageSize\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PortfolioDetails\": {\n            \"shape\": \"S3m\"\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"ListConstraintsForPortfolio\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PortfolioId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"PortfolioId\": {},\n          \"ProductId\": {},\n          \"PageSize\": {\n            \"type\": \"integer\"\n          },\n          \"PageToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConstraintDetails\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Sh\"\n            }\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"ListLaunchPaths\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ProductId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"ProductId\": {},\n          \"PageSize\": {\n            \"type\": \"integer\"\n          },\n          \"PageToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"LaunchPathSummaries\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Id\": {},\n                \"ConstraintSummaries\": {\n                  \"shape\": \"S2o\"\n                },\n                \"Tags\": {\n                  \"shape\": \"Sw\"\n                },\n                \"Name\": {}\n              }\n            }\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"ListPortfolioAccess\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PortfolioId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"PortfolioId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AccountIds\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"ListPortfolios\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"PageToken\": {},\n          \"PageSize\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PortfolioDetails\": {\n            \"shape\": \"S3m\"\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"ListPortfoliosForProduct\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ProductId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"ProductId\": {},\n          \"PageToken\": {},\n          \"PageSize\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PortfolioDetails\": {\n            \"shape\": \"S3m\"\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"ListPrincipalsForPortfolio\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PortfolioId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"PortfolioId\": {},\n          \"PageSize\": {\n            \"type\": \"integer\"\n          },\n          \"PageToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Principals\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"PrincipalARN\": {},\n                \"PrincipalType\": {}\n              }\n            }\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"ListProvisioningArtifacts\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ProductId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"ProductId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProvisioningArtifactDetails\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1k\"\n            }\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"ListRecordHistory\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"AccessLevelFilter\": {\n            \"shape\": \"S4a\"\n          },\n          \"SearchFilter\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Key\": {},\n              \"Value\": {}\n            }\n          },\n          \"PageSize\": {\n            \"type\": \"integer\"\n          },\n          \"PageToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RecordDetails\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S2y\"\n            }\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"ProvisionProduct\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ProductId\",\n          \"ProvisioningArtifactId\",\n          \"ProvisionedProductName\",\n          \"ProvisionToken\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"ProductId\": {},\n          \"ProvisioningArtifactId\": {},\n          \"PathId\": {},\n          \"ProvisionedProductName\": {},\n          \"ProvisioningParameters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Key\": {},\n                \"Value\": {}\n              }\n            }\n          },\n          \"Tags\": {\n            \"shape\": \"Sw\"\n          },\n          \"NotificationArns\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"ProvisionToken\": {\n            \"idempotencyToken\": true\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RecordDetail\": {\n            \"shape\": \"S2y\"\n          }\n        }\n      }\n    },\n    \"RejectPortfolioShare\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PortfolioId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"PortfolioId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"ScanProvisionedProducts\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"AccessLevelFilter\": {\n            \"shape\": \"S4a\"\n          },\n          \"PageSize\": {\n            \"type\": \"integer\"\n          },\n          \"PageToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProvisionedProducts\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Arn\": {},\n                \"Type\": {},\n                \"Id\": {},\n                \"Status\": {},\n                \"StatusMessage\": {},\n                \"CreatedTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"IdempotencyToken\": {},\n                \"LastRecordId\": {}\n              }\n            }\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"SearchProducts\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"Filters\": {\n            \"shape\": \"S50\"\n          },\n          \"PageSize\": {\n            \"type\": \"integer\"\n          },\n          \"SortBy\": {},\n          \"SortOrder\": {},\n          \"PageToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProductViewSummaries\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1g\"\n            }\n          },\n          \"ProductViewAggregations\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {\n              \"type\": \"list\",\n              \"member\": {\n                \"type\": \"structure\",\n                \"members\": {\n                  \"Value\": {},\n                  \"ApproximateCount\": {\n                    \"type\": \"integer\"\n                  }\n                }\n              }\n            }\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"SearchProductsAsAdmin\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"PortfolioId\": {},\n          \"Filters\": {\n            \"shape\": \"S50\"\n          },\n          \"SortBy\": {},\n          \"SortOrder\": {},\n          \"PageToken\": {},\n          \"PageSize\": {\n            \"type\": \"integer\"\n          },\n          \"ProductSource\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProductViewDetails\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1f\"\n            }\n          },\n          \"NextPageToken\": {}\n        }\n      }\n    },\n    \"TerminateProvisionedProduct\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TerminateToken\"\n        ],\n        \"members\": {\n          \"ProvisionedProductName\": {},\n          \"ProvisionedProductId\": {},\n          \"TerminateToken\": {\n            \"idempotencyToken\": true\n          },\n          \"IgnoreErrors\": {\n            \"type\": \"boolean\"\n          },\n          \"AcceptLanguage\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RecordDetail\": {\n            \"shape\": \"S2y\"\n          }\n        }\n      }\n    },\n    \"UpdateConstraint\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"Id\": {},\n          \"Description\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ConstraintDetail\": {\n            \"shape\": \"Sh\"\n          },\n          \"ConstraintParameters\": {},\n          \"Status\": {}\n        }\n      }\n    },\n    \"UpdatePortfolio\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"Id\": {},\n          \"DisplayName\": {},\n          \"Description\": {},\n          \"ProviderName\": {},\n          \"AddTags\": {\n            \"shape\": \"So\"\n          },\n          \"RemoveTags\": {\n            \"shape\": \"S5o\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"PortfolioDetail\": {\n            \"shape\": \"St\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sw\"\n          }\n        }\n      }\n    },\n    \"UpdateProduct\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"Id\": {},\n          \"Name\": {},\n          \"Owner\": {},\n          \"Description\": {},\n          \"Distributor\": {},\n          \"SupportDescription\": {},\n          \"SupportEmail\": {},\n          \"SupportUrl\": {},\n          \"AddTags\": {\n            \"shape\": \"So\"\n          },\n          \"RemoveTags\": {\n            \"shape\": \"S5o\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProductViewDetail\": {\n            \"shape\": \"S1f\"\n          },\n          \"Tags\": {\n            \"shape\": \"Sw\"\n          }\n        }\n      }\n    },\n    \"UpdateProvisionedProduct\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"UpdateToken\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"ProvisionedProductName\": {},\n          \"ProvisionedProductId\": {},\n          \"ProductId\": {},\n          \"ProvisioningArtifactId\": {},\n          \"PathId\": {},\n          \"ProvisioningParameters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Key\": {},\n                \"Value\": {},\n                \"UsePreviousValue\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          },\n          \"UpdateToken\": {\n            \"idempotencyToken\": true\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"RecordDetail\": {\n            \"shape\": \"S2y\"\n          }\n        }\n      }\n    },\n    \"UpdateProvisioningArtifact\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ProductId\",\n          \"ProvisioningArtifactId\"\n        ],\n        \"members\": {\n          \"AcceptLanguage\": {},\n          \"ProductId\": {},\n          \"ProvisioningArtifactId\": {},\n          \"Name\": {},\n          \"Description\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ProvisioningArtifactDetail\": {\n            \"shape\": \"S1k\"\n          },\n          \"Info\": {\n            \"shape\": \"S1a\"\n          },\n          \"Status\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"Sh\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ConstraintId\": {},\n        \"Type\": {},\n        \"Description\": {},\n        \"Owner\": {}\n      }\n    },\n    \"So\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"Sp\"\n      }\n    },\n    \"Sp\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Key\",\n        \"Value\"\n      ],\n      \"members\": {\n        \"Key\": {},\n        \"Value\": {}\n      }\n    },\n    \"St\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Id\": {},\n        \"ARN\": {},\n        \"DisplayName\": {},\n        \"Description\": {},\n        \"CreatedTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"ProviderName\": {}\n      }\n    },\n    \"Sw\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"Sp\"\n      }\n    },\n    \"S17\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Info\"\n      ],\n      \"members\": {\n        \"Name\": {},\n        \"Description\": {},\n        \"Info\": {\n          \"shape\": \"S1a\"\n        },\n        \"Type\": {}\n      }\n    },\n    \"S1a\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S1f\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"ProductViewSummary\": {\n          \"shape\": \"S1g\"\n        },\n        \"Status\": {},\n        \"ProductARN\": {},\n        \"CreatedTime\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S1g\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Id\": {},\n        \"ProductId\": {},\n        \"Name\": {},\n        \"Owner\": {},\n        \"ShortDescription\": {},\n        \"Type\": {},\n        \"Distributor\": {},\n        \"HasDefaultPath\": {\n          \"type\": \"boolean\"\n        },\n        \"SupportEmail\": {},\n        \"SupportDescription\": {},\n        \"SupportUrl\": {}\n      }\n    },\n    \"S1k\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Id\": {},\n        \"Name\": {},\n        \"Description\": {},\n        \"Type\": {},\n        \"CreatedTime\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S23\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Id\": {},\n          \"Name\": {},\n          \"Description\": {},\n          \"CreatedTime\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"S2o\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Type\": {},\n          \"Description\": {}\n        }\n      }\n    },\n    \"S2y\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"RecordId\": {},\n        \"ProvisionedProductName\": {},\n        \"Status\": {},\n        \"CreatedTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"UpdatedTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"ProvisionedProductType\": {},\n        \"RecordType\": {},\n        \"ProvisionedProductId\": {},\n        \"ProductId\": {},\n        \"ProvisioningArtifactId\": {},\n        \"PathId\": {},\n        \"RecordErrors\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Code\": {},\n              \"Description\": {}\n            }\n          }\n        },\n        \"RecordTags\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Key\": {},\n              \"Value\": {}\n            }\n          }\n        }\n      }\n    },\n    \"S3m\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"shape\": \"St\"\n      }\n    },\n    \"S4a\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Key\": {},\n        \"Value\": {}\n      }\n    },\n    \"S50\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"type\": \"list\",\n        \"member\": {}\n      }\n    },\n    \"S5o\": {\n      \"type\": \"list\",\n      \"member\": {}\n    }\n  }\n}\n},{}],125:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"sns-2010-03-31\",\n    \"apiVersion\": \"2010-03-31\",\n    \"endpointPrefix\": \"sns\",\n    \"protocol\": \"query\",\n    \"serviceAbbreviation\": \"Amazon SNS\",\n    \"serviceFullName\": \"Amazon Simple Notification Service\",\n    \"signatureVersion\": \"v4\",\n    \"xmlNamespace\": \"http://sns.amazonaws.com/doc/2010-03-31/\"\n  },\n  \"operations\": {\n    \"AddPermission\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TopicArn\",\n          \"Label\",\n          \"AWSAccountId\",\n          \"ActionName\"\n        ],\n        \"members\": {\n          \"TopicArn\": {},\n          \"Label\": {},\n          \"AWSAccountId\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"ActionName\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"CheckIfPhoneNumberIsOptedOut\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"phoneNumber\"\n        ],\n        \"members\": {\n          \"phoneNumber\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CheckIfPhoneNumberIsOptedOutResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"isOptedOut\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"ConfirmSubscription\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TopicArn\",\n          \"Token\"\n        ],\n        \"members\": {\n          \"TopicArn\": {},\n          \"Token\": {},\n          \"AuthenticateOnUnsubscribe\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ConfirmSubscriptionResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"SubscriptionArn\": {}\n        }\n      }\n    },\n    \"CreatePlatformApplication\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Platform\",\n          \"Attributes\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Platform\": {},\n          \"Attributes\": {\n            \"shape\": \"Sj\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreatePlatformApplicationResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"PlatformApplicationArn\": {}\n        }\n      }\n    },\n    \"CreatePlatformEndpoint\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PlatformApplicationArn\",\n          \"Token\"\n        ],\n        \"members\": {\n          \"PlatformApplicationArn\": {},\n          \"Token\": {},\n          \"CustomUserData\": {},\n          \"Attributes\": {\n            \"shape\": \"Sj\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreatePlatformEndpointResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"EndpointArn\": {}\n        }\n      }\n    },\n    \"CreateTopic\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateTopicResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"TopicArn\": {}\n        }\n      }\n    },\n    \"DeleteEndpoint\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EndpointArn\"\n        ],\n        \"members\": {\n          \"EndpointArn\": {}\n        }\n      }\n    },\n    \"DeletePlatformApplication\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PlatformApplicationArn\"\n        ],\n        \"members\": {\n          \"PlatformApplicationArn\": {}\n        }\n      }\n    },\n    \"DeleteTopic\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TopicArn\"\n        ],\n        \"members\": {\n          \"TopicArn\": {}\n        }\n      }\n    },\n    \"GetEndpointAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EndpointArn\"\n        ],\n        \"members\": {\n          \"EndpointArn\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetEndpointAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"shape\": \"Sj\"\n          }\n        }\n      }\n    },\n    \"GetPlatformApplicationAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PlatformApplicationArn\"\n        ],\n        \"members\": {\n          \"PlatformApplicationArn\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetPlatformApplicationAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"shape\": \"Sj\"\n          }\n        }\n      }\n    },\n    \"GetSMSAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"attributes\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetSMSAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"attributes\": {\n            \"shape\": \"Sj\"\n          }\n        }\n      }\n    },\n    \"GetSubscriptionAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionArn\"\n        ],\n        \"members\": {\n          \"SubscriptionArn\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetSubscriptionAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {}\n          }\n        }\n      }\n    },\n    \"GetTopicAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TopicArn\"\n        ],\n        \"members\": {\n          \"TopicArn\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetTopicAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"type\": \"map\",\n            \"key\": {},\n            \"value\": {}\n          }\n        }\n      }\n    },\n    \"ListEndpointsByPlatformApplication\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PlatformApplicationArn\"\n        ],\n        \"members\": {\n          \"PlatformApplicationArn\": {},\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListEndpointsByPlatformApplicationResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Endpoints\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"EndpointArn\": {},\n                \"Attributes\": {\n                  \"shape\": \"Sj\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListPhoneNumbersOptedOut\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"nextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListPhoneNumbersOptedOutResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"phoneNumbers\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"nextToken\": {}\n        }\n      }\n    },\n    \"ListPlatformApplications\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListPlatformApplicationsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"PlatformApplications\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"PlatformApplicationArn\": {},\n                \"Attributes\": {\n                  \"shape\": \"Sj\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListSubscriptions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListSubscriptionsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Subscriptions\": {\n            \"shape\": \"S1n\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListSubscriptionsByTopic\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TopicArn\"\n        ],\n        \"members\": {\n          \"TopicArn\": {},\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListSubscriptionsByTopicResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Subscriptions\": {\n            \"shape\": \"S1n\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListTopics\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListTopicsResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Topics\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"TopicArn\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"OptInPhoneNumber\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"phoneNumber\"\n        ],\n        \"members\": {\n          \"phoneNumber\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"OptInPhoneNumberResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"Publish\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Message\"\n        ],\n        \"members\": {\n          \"TopicArn\": {},\n          \"TargetArn\": {},\n          \"PhoneNumber\": {},\n          \"Message\": {},\n          \"Subject\": {},\n          \"MessageStructure\": {},\n          \"MessageAttributes\": {\n            \"type\": \"map\",\n            \"key\": {\n              \"locationName\": \"Name\"\n            },\n            \"value\": {\n              \"locationName\": \"Value\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"DataType\"\n              ],\n              \"members\": {\n                \"DataType\": {},\n                \"StringValue\": {},\n                \"BinaryValue\": {\n                  \"type\": \"blob\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"PublishResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"MessageId\": {}\n        }\n      }\n    },\n    \"RemovePermission\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TopicArn\",\n          \"Label\"\n        ],\n        \"members\": {\n          \"TopicArn\": {},\n          \"Label\": {}\n        }\n      }\n    },\n    \"SetEndpointAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EndpointArn\",\n          \"Attributes\"\n        ],\n        \"members\": {\n          \"EndpointArn\": {},\n          \"Attributes\": {\n            \"shape\": \"Sj\"\n          }\n        }\n      }\n    },\n    \"SetPlatformApplicationAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PlatformApplicationArn\",\n          \"Attributes\"\n        ],\n        \"members\": {\n          \"PlatformApplicationArn\": {},\n          \"Attributes\": {\n            \"shape\": \"Sj\"\n          }\n        }\n      }\n    },\n    \"SetSMSAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"attributes\"\n        ],\n        \"members\": {\n          \"attributes\": {\n            \"shape\": \"Sj\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SetSMSAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SetSubscriptionAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionArn\",\n          \"AttributeName\"\n        ],\n        \"members\": {\n          \"SubscriptionArn\": {},\n          \"AttributeName\": {},\n          \"AttributeValue\": {}\n        }\n      }\n    },\n    \"SetTopicAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TopicArn\",\n          \"AttributeName\"\n        ],\n        \"members\": {\n          \"TopicArn\": {},\n          \"AttributeName\": {},\n          \"AttributeValue\": {}\n        }\n      }\n    },\n    \"Subscribe\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TopicArn\",\n          \"Protocol\"\n        ],\n        \"members\": {\n          \"TopicArn\": {},\n          \"Protocol\": {},\n          \"Endpoint\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SubscribeResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"SubscriptionArn\": {}\n        }\n      }\n    },\n    \"Unsubscribe\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SubscriptionArn\"\n        ],\n        \"members\": {\n          \"SubscriptionArn\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"Sj\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {}\n    },\n    \"S1n\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SubscriptionArn\": {},\n          \"Owner\": {},\n          \"Protocol\": {},\n          \"Endpoint\": {},\n          \"TopicArn\": {}\n        }\n      }\n    }\n  }\n}\n},{}],126:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"ListEndpointsByPlatformApplication\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"Endpoints\"\n    },\n    \"ListPlatformApplications\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"PlatformApplications\"\n    },\n    \"ListSubscriptions\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"Subscriptions\"\n    },\n    \"ListSubscriptionsByTopic\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"Subscriptions\"\n    },\n    \"ListTopics\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"result_key\": \"Topics\"\n    }\n  }\n}\n\n},{}],127:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2012-11-05\",\n    \"endpointPrefix\": \"sqs\",\n    \"protocol\": \"query\",\n    \"serviceAbbreviation\": \"Amazon SQS\",\n    \"serviceFullName\": \"Amazon Simple Queue Service\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"sqs-2012-11-05\",\n    \"xmlNamespace\": \"http://queue.amazonaws.com/doc/2012-11-05/\"\n  },\n  \"operations\": {\n    \"AddPermission\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueUrl\",\n          \"Label\",\n          \"AWSAccountIds\",\n          \"Actions\"\n        ],\n        \"members\": {\n          \"QueueUrl\": {},\n          \"Label\": {},\n          \"AWSAccountIds\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"AWSAccountId\"\n            },\n            \"flattened\": true\n          },\n          \"Actions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ActionName\"\n            },\n            \"flattened\": true\n          }\n        }\n      }\n    },\n    \"ChangeMessageVisibility\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueUrl\",\n          \"ReceiptHandle\",\n          \"VisibilityTimeout\"\n        ],\n        \"members\": {\n          \"QueueUrl\": {},\n          \"ReceiptHandle\": {},\n          \"VisibilityTimeout\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"ChangeMessageVisibilityBatch\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueUrl\",\n          \"Entries\"\n        ],\n        \"members\": {\n          \"QueueUrl\": {},\n          \"Entries\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ChangeMessageVisibilityBatchRequestEntry\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"Id\",\n                \"ReceiptHandle\"\n              ],\n              \"members\": {\n                \"Id\": {},\n                \"ReceiptHandle\": {},\n                \"VisibilityTimeout\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"flattened\": true\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ChangeMessageVisibilityBatchResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"Successful\",\n          \"Failed\"\n        ],\n        \"members\": {\n          \"Successful\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ChangeMessageVisibilityBatchResultEntry\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"Id\"\n              ],\n              \"members\": {\n                \"Id\": {}\n              }\n            },\n            \"flattened\": true\n          },\n          \"Failed\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"CreateQueue\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueName\"\n        ],\n        \"members\": {\n          \"QueueName\": {},\n          \"Attributes\": {\n            \"shape\": \"Sh\",\n            \"locationName\": \"Attribute\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"CreateQueueResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"QueueUrl\": {}\n        }\n      }\n    },\n    \"DeleteMessage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueUrl\",\n          \"ReceiptHandle\"\n        ],\n        \"members\": {\n          \"QueueUrl\": {},\n          \"ReceiptHandle\": {}\n        }\n      }\n    },\n    \"DeleteMessageBatch\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueUrl\",\n          \"Entries\"\n        ],\n        \"members\": {\n          \"QueueUrl\": {},\n          \"Entries\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"DeleteMessageBatchRequestEntry\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"Id\",\n                \"ReceiptHandle\"\n              ],\n              \"members\": {\n                \"Id\": {},\n                \"ReceiptHandle\": {}\n              }\n            },\n            \"flattened\": true\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DeleteMessageBatchResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"Successful\",\n          \"Failed\"\n        ],\n        \"members\": {\n          \"Successful\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"DeleteMessageBatchResultEntry\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"Id\"\n              ],\n              \"members\": {\n                \"Id\": {}\n              }\n            },\n            \"flattened\": true\n          },\n          \"Failed\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"DeleteQueue\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueUrl\"\n        ],\n        \"members\": {\n          \"QueueUrl\": {}\n        }\n      }\n    },\n    \"GetQueueAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueUrl\"\n        ],\n        \"members\": {\n          \"QueueUrl\": {},\n          \"AttributeNames\": {\n            \"shape\": \"St\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetQueueAttributesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Attributes\": {\n            \"shape\": \"Sh\",\n            \"locationName\": \"Attribute\"\n          }\n        }\n      }\n    },\n    \"GetQueueUrl\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueName\"\n        ],\n        \"members\": {\n          \"QueueName\": {},\n          \"QueueOwnerAWSAccountId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetQueueUrlResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"QueueUrl\": {}\n        }\n      }\n    },\n    \"ListDeadLetterSourceQueues\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueUrl\"\n        ],\n        \"members\": {\n          \"QueueUrl\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListDeadLetterSourceQueuesResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"queueUrls\"\n        ],\n        \"members\": {\n          \"queueUrls\": {\n            \"shape\": \"Sz\"\n          }\n        }\n      }\n    },\n    \"ListQueues\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"QueueNamePrefix\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ListQueuesResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"QueueUrls\": {\n            \"shape\": \"Sz\"\n          }\n        }\n      }\n    },\n    \"PurgeQueue\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueUrl\"\n        ],\n        \"members\": {\n          \"QueueUrl\": {}\n        }\n      }\n    },\n    \"ReceiveMessage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueUrl\"\n        ],\n        \"members\": {\n          \"QueueUrl\": {},\n          \"AttributeNames\": {\n            \"shape\": \"St\"\n          },\n          \"MessageAttributeNames\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"MessageAttributeName\"\n            },\n            \"flattened\": true\n          },\n          \"MaxNumberOfMessages\": {\n            \"type\": \"integer\"\n          },\n          \"VisibilityTimeout\": {\n            \"type\": \"integer\"\n          },\n          \"WaitTimeSeconds\": {\n            \"type\": \"integer\"\n          },\n          \"ReceiveRequestAttemptId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"ReceiveMessageResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Messages\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Message\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"MessageId\": {},\n                \"ReceiptHandle\": {},\n                \"MD5OfBody\": {},\n                \"Body\": {},\n                \"Attributes\": {\n                  \"locationName\": \"Attribute\",\n                  \"type\": \"map\",\n                  \"key\": {\n                    \"locationName\": \"Name\"\n                  },\n                  \"value\": {\n                    \"locationName\": \"Value\"\n                  },\n                  \"flattened\": true\n                },\n                \"MD5OfMessageAttributes\": {},\n                \"MessageAttributes\": {\n                  \"shape\": \"S1b\",\n                  \"locationName\": \"MessageAttribute\"\n                }\n              }\n            },\n            \"flattened\": true\n          }\n        }\n      }\n    },\n    \"RemovePermission\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueUrl\",\n          \"Label\"\n        ],\n        \"members\": {\n          \"QueueUrl\": {},\n          \"Label\": {}\n        }\n      }\n    },\n    \"SendMessage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueUrl\",\n          \"MessageBody\"\n        ],\n        \"members\": {\n          \"QueueUrl\": {},\n          \"MessageBody\": {},\n          \"DelaySeconds\": {\n            \"type\": \"integer\"\n          },\n          \"MessageAttributes\": {\n            \"shape\": \"S1b\",\n            \"locationName\": \"MessageAttribute\"\n          },\n          \"MessageDeduplicationId\": {},\n          \"MessageGroupId\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SendMessageResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"MD5OfMessageBody\": {},\n          \"MD5OfMessageAttributes\": {},\n          \"MessageId\": {},\n          \"SequenceNumber\": {}\n        }\n      }\n    },\n    \"SendMessageBatch\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueUrl\",\n          \"Entries\"\n        ],\n        \"members\": {\n          \"QueueUrl\": {},\n          \"Entries\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"SendMessageBatchRequestEntry\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"Id\",\n                \"MessageBody\"\n              ],\n              \"members\": {\n                \"Id\": {},\n                \"MessageBody\": {},\n                \"DelaySeconds\": {\n                  \"type\": \"integer\"\n                },\n                \"MessageAttributes\": {\n                  \"shape\": \"S1b\",\n                  \"locationName\": \"MessageAttribute\"\n                },\n                \"MessageDeduplicationId\": {},\n                \"MessageGroupId\": {}\n              }\n            },\n            \"flattened\": true\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"SendMessageBatchResult\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"Successful\",\n          \"Failed\"\n        ],\n        \"members\": {\n          \"Successful\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"SendMessageBatchResultEntry\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"Id\",\n                \"MessageId\",\n                \"MD5OfMessageBody\"\n              ],\n              \"members\": {\n                \"Id\": {},\n                \"MessageId\": {},\n                \"MD5OfMessageBody\": {},\n                \"MD5OfMessageAttributes\": {},\n                \"SequenceNumber\": {}\n              }\n            },\n            \"flattened\": true\n          },\n          \"Failed\": {\n            \"shape\": \"Sd\"\n          }\n        }\n      }\n    },\n    \"SetQueueAttributes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"QueueUrl\",\n          \"Attributes\"\n        ],\n        \"members\": {\n          \"QueueUrl\": {},\n          \"Attributes\": {\n            \"shape\": \"Sh\",\n            \"locationName\": \"Attribute\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"Sd\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"BatchResultErrorEntry\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"Id\",\n          \"SenderFault\",\n          \"Code\"\n        ],\n        \"members\": {\n          \"Id\": {},\n          \"SenderFault\": {\n            \"type\": \"boolean\"\n          },\n          \"Code\": {},\n          \"Message\": {}\n        }\n      },\n      \"flattened\": true\n    },\n    \"Sh\": {\n      \"type\": \"map\",\n      \"key\": {\n        \"locationName\": \"Name\"\n      },\n      \"value\": {\n        \"locationName\": \"Value\"\n      },\n      \"flattened\": true,\n      \"locationName\": \"Attribute\"\n    },\n    \"St\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"AttributeName\"\n      },\n      \"flattened\": true\n    },\n    \"Sz\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"QueueUrl\"\n      },\n      \"flattened\": true\n    },\n    \"S1b\": {\n      \"type\": \"map\",\n      \"key\": {\n        \"locationName\": \"Name\"\n      },\n      \"value\": {\n        \"locationName\": \"Value\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"DataType\"\n        ],\n        \"members\": {\n          \"StringValue\": {},\n          \"BinaryValue\": {\n            \"type\": \"blob\"\n          },\n          \"StringListValues\": {\n            \"flattened\": true,\n            \"locationName\": \"StringListValue\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"StringListValue\"\n            }\n          },\n          \"BinaryListValues\": {\n            \"flattened\": true,\n            \"locationName\": \"BinaryListValue\",\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"BinaryListValue\",\n              \"type\": \"blob\"\n            }\n          },\n          \"DataType\": {}\n        }\n      },\n      \"flattened\": true\n    }\n  }\n}\n},{}],128:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"ListQueues\": {\n      \"result_key\": \"QueueUrls\"\n    }\n  }\n}\n\n},{}],129:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2014-11-06\",\n    \"endpointPrefix\": \"ssm\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"Amazon SSM\",\n    \"serviceFullName\": \"Amazon Simple Systems Manager (SSM)\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"AmazonSSM\",\n    \"uid\": \"ssm-2014-11-06\"\n  },\n  \"operations\": {\n    \"AddTagsToResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceType\",\n          \"ResourceId\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"ResourceType\": {},\n          \"ResourceId\": {},\n          \"Tags\": {\n            \"shape\": \"S4\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CancelCommand\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CommandId\"\n        ],\n        \"members\": {\n          \"CommandId\": {},\n          \"InstanceIds\": {\n            \"shape\": \"Sb\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"CreateActivation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IamRole\"\n        ],\n        \"members\": {\n          \"Description\": {},\n          \"DefaultInstanceName\": {},\n          \"IamRole\": {},\n          \"RegistrationLimit\": {\n            \"type\": \"integer\"\n          },\n          \"ExpirationDate\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ActivationId\": {},\n          \"ActivationCode\": {}\n        }\n      }\n    },\n    \"CreateAssociation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"DocumentVersion\": {},\n          \"InstanceId\": {},\n          \"Parameters\": {\n            \"shape\": \"Sq\"\n          },\n          \"Targets\": {\n            \"shape\": \"Su\"\n          },\n          \"ScheduleExpression\": {},\n          \"OutputLocation\": {\n            \"shape\": \"S10\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AssociationDescription\": {\n            \"shape\": \"S16\"\n          }\n        }\n      }\n    },\n    \"CreateAssociationBatch\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Entries\"\n        ],\n        \"members\": {\n          \"Entries\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S1j\",\n              \"locationName\": \"entries\"\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Successful\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S16\",\n              \"locationName\": \"AssociationDescription\"\n            }\n          },\n          \"Failed\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"FailedCreateAssociationEntry\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Entry\": {\n                  \"shape\": \"S1j\"\n                },\n                \"Message\": {},\n                \"Fault\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"CreateDocument\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Content\",\n          \"Name\"\n        ],\n        \"members\": {\n          \"Content\": {},\n          \"Name\": {},\n          \"DocumentType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DocumentDescription\": {\n            \"shape\": \"S1u\"\n          }\n        }\n      }\n    },\n    \"CreateMaintenanceWindow\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Schedule\",\n          \"Duration\",\n          \"Cutoff\",\n          \"AllowUnassociatedTargets\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Schedule\": {},\n          \"Duration\": {\n            \"type\": \"integer\"\n          },\n          \"Cutoff\": {\n            \"type\": \"integer\"\n          },\n          \"AllowUnassociatedTargets\": {\n            \"type\": \"boolean\"\n          },\n          \"ClientToken\": {\n            \"idempotencyToken\": true\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WindowId\": {}\n        }\n      }\n    },\n    \"CreatePatchBaseline\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"GlobalFilters\": {\n            \"shape\": \"S2m\"\n          },\n          \"ApprovalRules\": {\n            \"shape\": \"S2s\"\n          },\n          \"ApprovedPatches\": {\n            \"shape\": \"S2w\"\n          },\n          \"RejectedPatches\": {\n            \"shape\": \"S2w\"\n          },\n          \"Description\": {},\n          \"ClientToken\": {\n            \"idempotencyToken\": true\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BaselineId\": {}\n        }\n      }\n    },\n    \"DeleteActivation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ActivationId\"\n        ],\n        \"members\": {\n          \"ActivationId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteAssociation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Name\": {},\n          \"InstanceId\": {},\n          \"AssociationId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteDocument\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeleteMaintenanceWindow\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WindowId\"\n        ],\n        \"members\": {\n          \"WindowId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WindowId\": {}\n        }\n      }\n    },\n    \"DeleteParameter\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeletePatchBaseline\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BaselineId\"\n        ],\n        \"members\": {\n          \"BaselineId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BaselineId\": {}\n        }\n      }\n    },\n    \"DeregisterManagedInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"DeregisterPatchBaselineForPatchGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BaselineId\",\n          \"PatchGroup\"\n        ],\n        \"members\": {\n          \"BaselineId\": {},\n          \"PatchGroup\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BaselineId\": {},\n          \"PatchGroup\": {}\n        }\n      }\n    },\n    \"DeregisterTargetFromMaintenanceWindow\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WindowId\",\n          \"WindowTargetId\"\n        ],\n        \"members\": {\n          \"WindowId\": {},\n          \"WindowTargetId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WindowId\": {},\n          \"WindowTargetId\": {}\n        }\n      }\n    },\n    \"DeregisterTaskFromMaintenanceWindow\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WindowId\",\n          \"WindowTaskId\"\n        ],\n        \"members\": {\n          \"WindowId\": {},\n          \"WindowTaskId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WindowId\": {},\n          \"WindowTaskId\": {}\n        }\n      }\n    },\n    \"DescribeActivations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Filters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"FilterKey\": {},\n                \"FilterValues\": {\n                  \"type\": \"list\",\n                  \"member\": {}\n                }\n              }\n            }\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ActivationList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"ActivationId\": {},\n                \"Description\": {},\n                \"DefaultInstanceName\": {},\n                \"IamRole\": {},\n                \"RegistrationLimit\": {\n                  \"type\": \"integer\"\n                },\n                \"RegistrationsCount\": {\n                  \"type\": \"integer\"\n                },\n                \"ExpirationDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Expired\": {\n                  \"type\": \"boolean\"\n                },\n                \"CreatedDate\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeAssociation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Name\": {},\n          \"InstanceId\": {},\n          \"AssociationId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AssociationDescription\": {\n            \"shape\": \"S16\"\n          }\n        }\n      }\n    },\n    \"DescribeAutomationExecutions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Filters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Key\",\n                \"Values\"\n              ],\n              \"members\": {\n                \"Key\": {},\n                \"Values\": {\n                  \"type\": \"list\",\n                  \"member\": {}\n                }\n              }\n            }\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AutomationExecutionMetadataList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"AutomationExecutionId\": {},\n                \"DocumentName\": {},\n                \"DocumentVersion\": {},\n                \"AutomationExecutionStatus\": {},\n                \"ExecutionStartTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"ExecutionEndTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"ExecutedBy\": {},\n                \"LogFile\": {},\n                \"Outputs\": {\n                  \"shape\": \"S4h\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeAvailablePatches\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Filters\": {\n            \"shape\": \"S4m\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Patches\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S4u\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeDocument\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"DocumentVersion\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Document\": {\n            \"shape\": \"S1u\"\n          }\n        }\n      }\n    },\n    \"DescribeDocumentPermission\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"PermissionType\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"PermissionType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AccountIds\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      }\n    },\n    \"DescribeEffectiveInstanceAssociations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Associations\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"AssociationId\": {},\n                \"InstanceId\": {},\n                \"Content\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeEffectivePatchesForPatchBaseline\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BaselineId\"\n        ],\n        \"members\": {\n          \"BaselineId\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"EffectivePatches\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Patch\": {\n                  \"shape\": \"S4u\"\n                },\n                \"PatchStatus\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"DeploymentStatus\": {},\n                    \"ApprovalDate\": {\n                      \"type\": \"timestamp\"\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeInstanceAssociationsStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceAssociationStatusInfos\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"AssociationId\": {},\n                \"Name\": {},\n                \"DocumentVersion\": {},\n                \"InstanceId\": {},\n                \"ExecutionDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Status\": {},\n                \"DetailedStatus\": {},\n                \"ExecutionSummary\": {},\n                \"ErrorCode\": {},\n                \"OutputUrl\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"S3OutputUrl\": {\n                      \"type\": \"structure\",\n                      \"members\": {\n                        \"OutputUrl\": {}\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeInstanceInformation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceInformationFilterList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"InstanceInformationFilter\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"key\",\n                \"valueSet\"\n              ],\n              \"members\": {\n                \"key\": {},\n                \"valueSet\": {\n                  \"shape\": \"S61\"\n                }\n              }\n            }\n          },\n          \"Filters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"InstanceInformationStringFilter\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"Key\",\n                \"Values\"\n              ],\n              \"members\": {\n                \"Key\": {},\n                \"Values\": {\n                  \"shape\": \"S61\"\n                }\n              }\n            }\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceInformationList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"InstanceInformation\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"InstanceId\": {},\n                \"PingStatus\": {},\n                \"LastPingDateTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"AgentVersion\": {},\n                \"IsLatestVersion\": {\n                  \"type\": \"boolean\"\n                },\n                \"PlatformType\": {},\n                \"PlatformName\": {},\n                \"PlatformVersion\": {},\n                \"ActivationId\": {},\n                \"IamRole\": {},\n                \"RegistrationDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"ResourceType\": {},\n                \"Name\": {},\n                \"IPAddress\": {},\n                \"ComputerName\": {},\n                \"AssociationStatus\": {},\n                \"LastAssociationExecutionDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"LastSuccessfulAssociationExecutionDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"AssociationOverview\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"DetailedStatus\": {},\n                    \"InstanceAssociationStatusAggregatedCount\": {\n                      \"type\": \"map\",\n                      \"key\": {},\n                      \"value\": {\n                        \"type\": \"integer\"\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeInstancePatchStates\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceIds\"\n        ],\n        \"members\": {\n          \"InstanceIds\": {\n            \"shape\": \"Sb\"\n          },\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstancePatchStates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S6l\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeInstancePatchStatesForPatchGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PatchGroup\"\n        ],\n        \"members\": {\n          \"PatchGroup\": {},\n          \"Filters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Key\",\n                \"Values\",\n                \"Type\"\n              ],\n              \"members\": {\n                \"Key\": {},\n                \"Values\": {\n                  \"type\": \"list\",\n                  \"member\": {}\n                },\n                \"Type\": {}\n              }\n            }\n          },\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstancePatchStates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S6l\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeInstancePatches\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {},\n          \"Filters\": {\n            \"shape\": \"S4m\"\n          },\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Patches\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Title\",\n                \"KBId\",\n                \"Classification\",\n                \"Severity\",\n                \"State\",\n                \"InstalledTime\"\n              ],\n              \"members\": {\n                \"Title\": {},\n                \"KBId\": {},\n                \"Classification\": {},\n                \"Severity\": {},\n                \"State\": {},\n                \"InstalledTime\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeMaintenanceWindowExecutionTaskInvocations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WindowExecutionId\",\n          \"TaskId\"\n        ],\n        \"members\": {\n          \"WindowExecutionId\": {},\n          \"TaskId\": {},\n          \"Filters\": {\n            \"shape\": \"S7f\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WindowExecutionTaskInvocationIdentities\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"WindowExecutionId\": {},\n                \"TaskExecutionId\": {},\n                \"InvocationId\": {},\n                \"ExecutionId\": {},\n                \"Parameters\": {\n                  \"type\": \"string\",\n                  \"sensitive\": true\n                },\n                \"Status\": {},\n                \"StatusDetails\": {},\n                \"StartTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"EndTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"OwnerInformation\": {\n                  \"shape\": \"S6n\"\n                },\n                \"WindowTargetId\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeMaintenanceWindowExecutionTasks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WindowExecutionId\"\n        ],\n        \"members\": {\n          \"WindowExecutionId\": {},\n          \"Filters\": {\n            \"shape\": \"S7f\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WindowExecutionTaskIdentities\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"WindowExecutionId\": {},\n                \"TaskExecutionId\": {},\n                \"Status\": {},\n                \"StatusDetails\": {},\n                \"StartTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"EndTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"TaskArn\": {},\n                \"TaskType\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeMaintenanceWindowExecutions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WindowId\"\n        ],\n        \"members\": {\n          \"WindowId\": {},\n          \"Filters\": {\n            \"shape\": \"S7f\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WindowExecutions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"WindowId\": {},\n                \"WindowExecutionId\": {},\n                \"Status\": {},\n                \"StatusDetails\": {},\n                \"StartTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"EndTime\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeMaintenanceWindowTargets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WindowId\"\n        ],\n        \"members\": {\n          \"WindowId\": {},\n          \"Filters\": {\n            \"shape\": \"S7f\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Targets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"WindowId\": {},\n                \"WindowTargetId\": {},\n                \"ResourceType\": {},\n                \"Targets\": {\n                  \"shape\": \"Su\"\n                },\n                \"OwnerInformation\": {\n                  \"shape\": \"S6n\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeMaintenanceWindowTasks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WindowId\"\n        ],\n        \"members\": {\n          \"WindowId\": {},\n          \"Filters\": {\n            \"shape\": \"S7f\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Tasks\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"WindowId\": {},\n                \"WindowTaskId\": {},\n                \"TaskArn\": {},\n                \"Type\": {},\n                \"Targets\": {\n                  \"shape\": \"Su\"\n                },\n                \"TaskParameters\": {\n                  \"shape\": \"S8d\"\n                },\n                \"Priority\": {\n                  \"type\": \"integer\"\n                },\n                \"LoggingInfo\": {\n                  \"shape\": \"S8j\"\n                },\n                \"ServiceRoleArn\": {},\n                \"MaxConcurrency\": {},\n                \"MaxErrors\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeMaintenanceWindows\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Filters\": {\n            \"shape\": \"S7f\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WindowIdentities\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"WindowId\": {},\n                \"Name\": {},\n                \"Enabled\": {\n                  \"type\": \"boolean\"\n                },\n                \"Duration\": {\n                  \"type\": \"integer\"\n                },\n                \"Cutoff\": {\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribeParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Filters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Values\"\n              ],\n              \"members\": {\n                \"Key\": {},\n                \"Values\": {\n                  \"type\": \"list\",\n                  \"member\": {}\n                }\n              }\n            }\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Parameters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Type\": {},\n                \"KeyId\": {},\n                \"LastModifiedDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"LastModifiedUser\": {},\n                \"Description\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribePatchBaselines\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Filters\": {\n            \"shape\": \"S4m\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BaselineIdentities\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S96\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"DescribePatchGroupState\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PatchGroup\"\n        ],\n        \"members\": {\n          \"PatchGroup\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Instances\": {\n            \"type\": \"integer\"\n          },\n          \"InstancesWithInstalledPatches\": {\n            \"type\": \"integer\"\n          },\n          \"InstancesWithInstalledOtherPatches\": {\n            \"type\": \"integer\"\n          },\n          \"InstancesWithMissingPatches\": {\n            \"type\": \"integer\"\n          },\n          \"InstancesWithFailedPatches\": {\n            \"type\": \"integer\"\n          },\n          \"InstancesWithNotApplicablePatches\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"DescribePatchGroups\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Mappings\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"PatchGroup\": {},\n                \"BaselineIdentity\": {\n                  \"shape\": \"S96\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"GetAutomationExecution\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutomationExecutionId\"\n        ],\n        \"members\": {\n          \"AutomationExecutionId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AutomationExecution\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"AutomationExecutionId\": {},\n              \"DocumentName\": {},\n              \"DocumentVersion\": {},\n              \"ExecutionStartTime\": {\n                \"type\": \"timestamp\"\n              },\n              \"ExecutionEndTime\": {\n                \"type\": \"timestamp\"\n              },\n              \"AutomationExecutionStatus\": {},\n              \"StepExecutions\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"StepName\": {},\n                    \"Action\": {},\n                    \"ExecutionStartTime\": {\n                      \"type\": \"timestamp\"\n                    },\n                    \"ExecutionEndTime\": {\n                      \"type\": \"timestamp\"\n                    },\n                    \"StepStatus\": {},\n                    \"ResponseCode\": {},\n                    \"Inputs\": {\n                      \"type\": \"map\",\n                      \"key\": {},\n                      \"value\": {}\n                    },\n                    \"Outputs\": {\n                      \"shape\": \"S4h\"\n                    },\n                    \"Response\": {},\n                    \"FailureMessage\": {}\n                  }\n                }\n              },\n              \"Parameters\": {\n                \"shape\": \"S4h\"\n              },\n              \"Outputs\": {\n                \"shape\": \"S4h\"\n              },\n              \"FailureMessage\": {}\n            }\n          }\n        }\n      }\n    },\n    \"GetCommandInvocation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"CommandId\",\n          \"InstanceId\"\n        ],\n        \"members\": {\n          \"CommandId\": {},\n          \"InstanceId\": {},\n          \"PluginName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CommandId\": {},\n          \"InstanceId\": {},\n          \"Comment\": {},\n          \"DocumentName\": {},\n          \"PluginName\": {},\n          \"ResponseCode\": {\n            \"type\": \"integer\"\n          },\n          \"ExecutionStartDateTime\": {},\n          \"ExecutionElapsedTime\": {},\n          \"ExecutionEndDateTime\": {},\n          \"Status\": {},\n          \"StatusDetails\": {},\n          \"StandardOutputContent\": {},\n          \"StandardOutputUrl\": {},\n          \"StandardErrorContent\": {},\n          \"StandardErrorUrl\": {}\n        }\n      }\n    },\n    \"GetDefaultPatchBaseline\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BaselineId\": {}\n        }\n      }\n    },\n    \"GetDeployablePatchSnapshotForInstance\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\",\n          \"SnapshotId\"\n        ],\n        \"members\": {\n          \"InstanceId\": {},\n          \"SnapshotId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"InstanceId\": {},\n          \"SnapshotId\": {},\n          \"SnapshotDownloadUrl\": {}\n        }\n      }\n    },\n    \"GetDocument\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"DocumentVersion\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Name\": {},\n          \"DocumentVersion\": {},\n          \"Content\": {},\n          \"DocumentType\": {}\n        }\n      }\n    },\n    \"GetInventory\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Filters\": {\n            \"shape\": \"Sa4\"\n          },\n          \"ResultAttributes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"ResultAttribute\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"TypeName\"\n              ],\n              \"members\": {\n                \"TypeName\": {}\n              }\n            }\n          },\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Entities\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Entity\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Id\": {},\n                \"Data\": {\n                  \"type\": \"map\",\n                  \"key\": {},\n                  \"value\": {\n                    \"type\": \"structure\",\n                    \"required\": [\n                      \"TypeName\",\n                      \"SchemaVersion\",\n                      \"Content\"\n                    ],\n                    \"members\": {\n                      \"TypeName\": {},\n                      \"SchemaVersion\": {},\n                      \"CaptureTime\": {},\n                      \"ContentHash\": {},\n                      \"Content\": {\n                        \"shape\": \"San\"\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"GetInventorySchema\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TypeName\": {},\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Schemas\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"TypeName\",\n                \"Attributes\"\n              ],\n              \"members\": {\n                \"TypeName\": {},\n                \"Version\": {},\n                \"Attributes\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"locationName\": \"Attribute\",\n                    \"type\": \"structure\",\n                    \"required\": [\n                      \"Name\",\n                      \"DataType\"\n                    ],\n                    \"members\": {\n                      \"Name\": {},\n                      \"DataType\": {}\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"GetMaintenanceWindow\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WindowId\"\n        ],\n        \"members\": {\n          \"WindowId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WindowId\": {},\n          \"Name\": {},\n          \"Schedule\": {},\n          \"Duration\": {\n            \"type\": \"integer\"\n          },\n          \"Cutoff\": {\n            \"type\": \"integer\"\n          },\n          \"AllowUnassociatedTargets\": {\n            \"type\": \"boolean\"\n          },\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          },\n          \"CreatedDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"ModifiedDate\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"GetMaintenanceWindowExecution\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WindowExecutionId\"\n        ],\n        \"members\": {\n          \"WindowExecutionId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WindowExecutionId\": {},\n          \"TaskIds\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"Status\": {},\n          \"StatusDetails\": {},\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"GetMaintenanceWindowExecutionTask\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WindowExecutionId\",\n          \"TaskId\"\n        ],\n        \"members\": {\n          \"WindowExecutionId\": {},\n          \"TaskId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WindowExecutionId\": {},\n          \"TaskExecutionId\": {},\n          \"TaskArn\": {},\n          \"ServiceRole\": {},\n          \"Type\": {},\n          \"TaskParameters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"S8d\"\n            },\n            \"sensitive\": true\n          },\n          \"Priority\": {\n            \"type\": \"integer\"\n          },\n          \"MaxConcurrency\": {},\n          \"MaxErrors\": {},\n          \"Status\": {},\n          \"StatusDetails\": {},\n          \"StartTime\": {\n            \"type\": \"timestamp\"\n          },\n          \"EndTime\": {\n            \"type\": \"timestamp\"\n          }\n        }\n      }\n    },\n    \"GetParameterHistory\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"WithDecryption\": {\n            \"type\": \"boolean\"\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Parameters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Type\": {},\n                \"KeyId\": {},\n                \"LastModifiedDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"LastModifiedUser\": {},\n                \"Description\": {},\n                \"Value\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"GetParameters\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Names\"\n        ],\n        \"members\": {\n          \"Names\": {\n            \"shape\": \"Sbf\"\n          },\n          \"WithDecryption\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Parameters\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Type\": {},\n                \"Value\": {}\n              }\n            }\n          },\n          \"InvalidParameters\": {\n            \"shape\": \"Sbf\"\n          }\n        }\n      }\n    },\n    \"GetPatchBaseline\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BaselineId\"\n        ],\n        \"members\": {\n          \"BaselineId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BaselineId\": {},\n          \"Name\": {},\n          \"GlobalFilters\": {\n            \"shape\": \"S2m\"\n          },\n          \"ApprovalRules\": {\n            \"shape\": \"S2s\"\n          },\n          \"ApprovedPatches\": {\n            \"shape\": \"S2w\"\n          },\n          \"RejectedPatches\": {\n            \"shape\": \"S2w\"\n          },\n          \"PatchGroups\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"CreatedDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"ModifiedDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"Description\": {}\n        }\n      }\n    },\n    \"GetPatchBaselineForPatchGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"PatchGroup\"\n        ],\n        \"members\": {\n          \"PatchGroup\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BaselineId\": {},\n          \"PatchGroup\": {}\n        }\n      }\n    },\n    \"ListAssociations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AssociationFilterList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"AssociationFilter\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"key\",\n                \"value\"\n              ],\n              \"members\": {\n                \"key\": {},\n                \"value\": {}\n              }\n            }\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Associations\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Association\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"InstanceId\": {},\n                \"AssociationId\": {},\n                \"DocumentVersion\": {},\n                \"Targets\": {\n                  \"shape\": \"Su\"\n                },\n                \"LastExecutionDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Overview\": {\n                  \"shape\": \"S1c\"\n                },\n                \"ScheduleExpression\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListCommandInvocations\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CommandId\": {},\n          \"InstanceId\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {},\n          \"Filters\": {\n            \"shape\": \"Sby\"\n          },\n          \"Details\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CommandInvocations\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"CommandId\": {},\n                \"InstanceId\": {},\n                \"InstanceName\": {},\n                \"Comment\": {},\n                \"DocumentName\": {},\n                \"RequestedDateTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Status\": {},\n                \"StatusDetails\": {},\n                \"TraceOutput\": {},\n                \"StandardOutputUrl\": {},\n                \"StandardErrorUrl\": {},\n                \"CommandPlugins\": {\n                  \"type\": \"list\",\n                  \"member\": {\n                    \"type\": \"structure\",\n                    \"members\": {\n                      \"Name\": {},\n                      \"Status\": {},\n                      \"StatusDetails\": {},\n                      \"ResponseCode\": {\n                        \"type\": \"integer\"\n                      },\n                      \"ResponseStartDateTime\": {\n                        \"type\": \"timestamp\"\n                      },\n                      \"ResponseFinishDateTime\": {\n                        \"type\": \"timestamp\"\n                      },\n                      \"Output\": {},\n                      \"StandardOutputUrl\": {},\n                      \"StandardErrorUrl\": {},\n                      \"OutputS3Region\": {},\n                      \"OutputS3BucketName\": {},\n                      \"OutputS3KeyPrefix\": {}\n                    }\n                  }\n                },\n                \"ServiceRole\": {},\n                \"NotificationConfig\": {\n                  \"shape\": \"Scb\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListCommands\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CommandId\": {},\n          \"InstanceId\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {},\n          \"Filters\": {\n            \"shape\": \"Sby\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Commands\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"shape\": \"Scj\"\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListDocumentVersions\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DocumentVersions\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"DocumentVersion\": {},\n                \"CreatedDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"IsDefaultVersion\": {\n                  \"type\": \"boolean\"\n                }\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListDocuments\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DocumentFilterList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"DocumentFilter\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"key\",\n                \"value\"\n              ],\n              \"members\": {\n                \"key\": {},\n                \"value\": {}\n              }\n            }\n          },\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          },\n          \"NextToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DocumentIdentifiers\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"DocumentIdentifier\",\n              \"type\": \"structure\",\n              \"members\": {\n                \"Name\": {},\n                \"Owner\": {},\n                \"PlatformTypes\": {\n                  \"shape\": \"S28\"\n                },\n                \"DocumentVersion\": {},\n                \"DocumentType\": {},\n                \"SchemaVersion\": {}\n              }\n            }\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListInventoryEntries\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\",\n          \"TypeName\"\n        ],\n        \"members\": {\n          \"InstanceId\": {},\n          \"TypeName\": {},\n          \"Filters\": {\n            \"shape\": \"Sa4\"\n          },\n          \"NextToken\": {},\n          \"MaxResults\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TypeName\": {},\n          \"InstanceId\": {},\n          \"SchemaVersion\": {},\n          \"CaptureTime\": {},\n          \"Entries\": {\n            \"shape\": \"San\"\n          },\n          \"NextToken\": {}\n        }\n      }\n    },\n    \"ListTagsForResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceType\",\n          \"ResourceId\"\n        ],\n        \"members\": {\n          \"ResourceType\": {},\n          \"ResourceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TagList\": {\n            \"shape\": \"S4\"\n          }\n        }\n      }\n    },\n    \"ModifyDocumentPermission\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"PermissionType\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"PermissionType\": {},\n          \"AccountIdsToAdd\": {\n            \"shape\": \"S5b\"\n          },\n          \"AccountIdsToRemove\": {\n            \"shape\": \"S5b\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"PutInventory\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\",\n          \"Items\"\n        ],\n        \"members\": {\n          \"InstanceId\": {},\n          \"Items\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"Item\",\n              \"type\": \"structure\",\n              \"required\": [\n                \"TypeName\",\n                \"SchemaVersion\",\n                \"CaptureTime\"\n              ],\n              \"members\": {\n                \"TypeName\": {},\n                \"SchemaVersion\": {},\n                \"CaptureTime\": {},\n                \"ContentHash\": {},\n                \"Content\": {\n                  \"shape\": \"San\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"PutParameter\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"Value\",\n          \"Type\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Description\": {},\n          \"Value\": {},\n          \"Type\": {},\n          \"KeyId\": {},\n          \"Overwrite\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"RegisterDefaultPatchBaseline\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BaselineId\"\n        ],\n        \"members\": {\n          \"BaselineId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BaselineId\": {}\n        }\n      }\n    },\n    \"RegisterPatchBaselineForPatchGroup\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BaselineId\",\n          \"PatchGroup\"\n        ],\n        \"members\": {\n          \"BaselineId\": {},\n          \"PatchGroup\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BaselineId\": {},\n          \"PatchGroup\": {}\n        }\n      }\n    },\n    \"RegisterTargetWithMaintenanceWindow\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WindowId\",\n          \"ResourceType\",\n          \"Targets\"\n        ],\n        \"members\": {\n          \"WindowId\": {},\n          \"ResourceType\": {},\n          \"Targets\": {\n            \"shape\": \"Su\"\n          },\n          \"OwnerInformation\": {\n            \"shape\": \"S6n\"\n          },\n          \"ClientToken\": {\n            \"idempotencyToken\": true\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WindowTargetId\": {}\n        }\n      }\n    },\n    \"RegisterTaskWithMaintenanceWindow\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WindowId\",\n          \"Targets\",\n          \"TaskArn\",\n          \"ServiceRoleArn\",\n          \"TaskType\",\n          \"MaxConcurrency\",\n          \"MaxErrors\"\n        ],\n        \"members\": {\n          \"WindowId\": {},\n          \"Targets\": {\n            \"shape\": \"Su\"\n          },\n          \"TaskArn\": {},\n          \"ServiceRoleArn\": {},\n          \"TaskType\": {},\n          \"TaskParameters\": {\n            \"shape\": \"S8d\"\n          },\n          \"Priority\": {\n            \"type\": \"integer\"\n          },\n          \"MaxConcurrency\": {},\n          \"MaxErrors\": {},\n          \"LoggingInfo\": {\n            \"shape\": \"S8j\"\n          },\n          \"ClientToken\": {\n            \"idempotencyToken\": true\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WindowTaskId\": {}\n        }\n      }\n    },\n    \"RemoveTagsFromResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceType\",\n          \"ResourceId\",\n          \"TagKeys\"\n        ],\n        \"members\": {\n          \"ResourceType\": {},\n          \"ResourceId\": {},\n          \"TagKeys\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"SendCommand\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DocumentName\"\n        ],\n        \"members\": {\n          \"InstanceIds\": {\n            \"shape\": \"Sb\"\n          },\n          \"Targets\": {\n            \"shape\": \"Su\"\n          },\n          \"DocumentName\": {},\n          \"DocumentHash\": {},\n          \"DocumentHashType\": {},\n          \"TimeoutSeconds\": {\n            \"type\": \"integer\"\n          },\n          \"Comment\": {},\n          \"Parameters\": {\n            \"shape\": \"Sq\"\n          },\n          \"OutputS3Region\": {},\n          \"OutputS3BucketName\": {},\n          \"OutputS3KeyPrefix\": {},\n          \"MaxConcurrency\": {},\n          \"MaxErrors\": {},\n          \"ServiceRoleArn\": {},\n          \"NotificationConfig\": {\n            \"shape\": \"Scb\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Command\": {\n            \"shape\": \"Scj\"\n          }\n        }\n      }\n    },\n    \"StartAutomationExecution\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"DocumentName\"\n        ],\n        \"members\": {\n          \"DocumentName\": {},\n          \"DocumentVersion\": {},\n          \"Parameters\": {\n            \"shape\": \"S4h\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AutomationExecutionId\": {}\n        }\n      }\n    },\n    \"StopAutomationExecution\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AutomationExecutionId\"\n        ],\n        \"members\": {\n          \"AutomationExecutionId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"UpdateAssociation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"AssociationId\"\n        ],\n        \"members\": {\n          \"AssociationId\": {},\n          \"Parameters\": {\n            \"shape\": \"Sq\"\n          },\n          \"DocumentVersion\": {},\n          \"ScheduleExpression\": {},\n          \"OutputLocation\": {\n            \"shape\": \"S10\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AssociationDescription\": {\n            \"shape\": \"S16\"\n          }\n        }\n      }\n    },\n    \"UpdateAssociationStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"InstanceId\",\n          \"AssociationStatus\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"InstanceId\": {},\n          \"AssociationStatus\": {\n            \"shape\": \"S18\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"AssociationDescription\": {\n            \"shape\": \"S16\"\n          }\n        }\n      }\n    },\n    \"UpdateDocument\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Content\",\n          \"Name\"\n        ],\n        \"members\": {\n          \"Content\": {},\n          \"Name\": {},\n          \"DocumentVersion\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DocumentDescription\": {\n            \"shape\": \"S1u\"\n          }\n        }\n      }\n    },\n    \"UpdateDocumentDefaultVersion\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"DocumentVersion\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"DocumentVersion\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Description\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"Name\": {},\n              \"DefaultVersion\": {}\n            }\n          }\n        }\n      }\n    },\n    \"UpdateMaintenanceWindow\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WindowId\"\n        ],\n        \"members\": {\n          \"WindowId\": {},\n          \"Name\": {},\n          \"Schedule\": {},\n          \"Duration\": {\n            \"type\": \"integer\"\n          },\n          \"Cutoff\": {\n            \"type\": \"integer\"\n          },\n          \"AllowUnassociatedTargets\": {\n            \"type\": \"boolean\"\n          },\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WindowId\": {},\n          \"Name\": {},\n          \"Schedule\": {},\n          \"Duration\": {\n            \"type\": \"integer\"\n          },\n          \"Cutoff\": {\n            \"type\": \"integer\"\n          },\n          \"AllowUnassociatedTargets\": {\n            \"type\": \"boolean\"\n          },\n          \"Enabled\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    },\n    \"UpdateManagedInstanceRole\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"InstanceId\",\n          \"IamRole\"\n        ],\n        \"members\": {\n          \"InstanceId\": {},\n          \"IamRole\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      }\n    },\n    \"UpdatePatchBaseline\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"BaselineId\"\n        ],\n        \"members\": {\n          \"BaselineId\": {},\n          \"Name\": {},\n          \"GlobalFilters\": {\n            \"shape\": \"S2m\"\n          },\n          \"ApprovalRules\": {\n            \"shape\": \"S2s\"\n          },\n          \"ApprovedPatches\": {\n            \"shape\": \"S2w\"\n          },\n          \"RejectedPatches\": {\n            \"shape\": \"S2w\"\n          },\n          \"Description\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"BaselineId\": {},\n          \"Name\": {},\n          \"GlobalFilters\": {\n            \"shape\": \"S2m\"\n          },\n          \"ApprovalRules\": {\n            \"shape\": \"S2s\"\n          },\n          \"ApprovedPatches\": {\n            \"shape\": \"S2w\"\n          },\n          \"RejectedPatches\": {\n            \"shape\": \"S2w\"\n          },\n          \"CreatedDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"ModifiedDate\": {\n            \"type\": \"timestamp\"\n          },\n          \"Description\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S4\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Key\",\n          \"Value\"\n        ],\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"Sb\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sq\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"type\": \"list\",\n        \"member\": {}\n      }\n    },\n    \"Su\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Values\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"S10\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"S3Location\": {\n          \"type\": \"structure\",\n          \"members\": {\n            \"OutputS3Region\": {},\n            \"OutputS3BucketName\": {},\n            \"OutputS3KeyPrefix\": {}\n          }\n        }\n      }\n    },\n    \"S16\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Name\": {},\n        \"InstanceId\": {},\n        \"Date\": {\n          \"type\": \"timestamp\"\n        },\n        \"LastUpdateAssociationDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"Status\": {\n          \"shape\": \"S18\"\n        },\n        \"Overview\": {\n          \"shape\": \"S1c\"\n        },\n        \"DocumentVersion\": {},\n        \"Parameters\": {\n          \"shape\": \"Sq\"\n        },\n        \"AssociationId\": {},\n        \"Targets\": {\n          \"shape\": \"Su\"\n        },\n        \"ScheduleExpression\": {},\n        \"OutputLocation\": {\n          \"shape\": \"S10\"\n        },\n        \"LastExecutionDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"LastSuccessfulExecutionDate\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"S18\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Date\",\n        \"Name\",\n        \"Message\"\n      ],\n      \"members\": {\n        \"Date\": {\n          \"type\": \"timestamp\"\n        },\n        \"Name\": {},\n        \"Message\": {},\n        \"AdditionalInfo\": {}\n      }\n    },\n    \"S1c\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Status\": {},\n        \"DetailedStatus\": {},\n        \"AssociationStatusAggregatedCount\": {\n          \"type\": \"map\",\n          \"key\": {},\n          \"value\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"S1j\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Name\"\n      ],\n      \"members\": {\n        \"Name\": {},\n        \"InstanceId\": {},\n        \"Parameters\": {\n          \"shape\": \"Sq\"\n        },\n        \"DocumentVersion\": {},\n        \"Targets\": {\n          \"shape\": \"Su\"\n        },\n        \"ScheduleExpression\": {},\n        \"OutputLocation\": {\n          \"shape\": \"S10\"\n        }\n      }\n    },\n    \"S1u\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Sha1\": {},\n        \"Hash\": {},\n        \"HashType\": {},\n        \"Name\": {},\n        \"Owner\": {},\n        \"CreatedDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"Status\": {},\n        \"DocumentVersion\": {},\n        \"Description\": {},\n        \"Parameters\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"locationName\": \"DocumentParameter\",\n            \"type\": \"structure\",\n            \"members\": {\n              \"Name\": {},\n              \"Type\": {},\n              \"Description\": {},\n              \"DefaultValue\": {}\n            }\n          }\n        },\n        \"PlatformTypes\": {\n          \"shape\": \"S28\"\n        },\n        \"DocumentType\": {},\n        \"SchemaVersion\": {},\n        \"LatestVersion\": {},\n        \"DefaultVersion\": {}\n      }\n    },\n    \"S28\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"PlatformType\"\n      }\n    },\n    \"S2m\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"PatchFilters\"\n      ],\n      \"members\": {\n        \"PatchFilters\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"Key\",\n              \"Values\"\n            ],\n            \"members\": {\n              \"Key\": {},\n              \"Values\": {\n                \"type\": \"list\",\n                \"member\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S2s\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"PatchRules\"\n      ],\n      \"members\": {\n        \"PatchRules\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"PatchFilterGroup\",\n              \"ApproveAfterDays\"\n            ],\n            \"members\": {\n              \"PatchFilterGroup\": {\n                \"shape\": \"S2m\"\n              },\n              \"ApproveAfterDays\": {\n                \"type\": \"integer\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"S2w\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S4h\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"type\": \"list\",\n        \"member\": {}\n      }\n    },\n    \"S4m\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Values\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"S4u\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"Id\": {},\n        \"ReleaseDate\": {\n          \"type\": \"timestamp\"\n        },\n        \"Title\": {},\n        \"Description\": {},\n        \"ContentUrl\": {},\n        \"Vendor\": {},\n        \"ProductFamily\": {},\n        \"Product\": {},\n        \"Classification\": {},\n        \"MsrcSeverity\": {},\n        \"KbNumber\": {},\n        \"MsrcNumber\": {},\n        \"Language\": {}\n      }\n    },\n    \"S5b\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"AccountId\"\n      }\n    },\n    \"S61\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"InstanceInformationFilterValue\"\n      }\n    },\n    \"S6l\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"InstanceId\",\n        \"PatchGroup\",\n        \"BaselineId\",\n        \"OperationStartTime\",\n        \"OperationEndTime\",\n        \"Operation\"\n      ],\n      \"members\": {\n        \"InstanceId\": {},\n        \"PatchGroup\": {},\n        \"BaselineId\": {},\n        \"SnapshotId\": {},\n        \"OwnerInformation\": {\n          \"shape\": \"S6n\"\n        },\n        \"InstalledCount\": {\n          \"type\": \"integer\"\n        },\n        \"InstalledOtherCount\": {\n          \"type\": \"integer\"\n        },\n        \"MissingCount\": {\n          \"type\": \"integer\"\n        },\n        \"FailedCount\": {\n          \"type\": \"integer\"\n        },\n        \"NotApplicableCount\": {\n          \"type\": \"integer\"\n        },\n        \"OperationStartTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"OperationEndTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Operation\": {}\n      }\n    },\n    \"S6n\": {\n      \"type\": \"string\",\n      \"sensitive\": true\n    },\n    \"S7f\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Key\": {},\n          \"Values\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"S8d\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Values\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"string\",\n              \"sensitive\": true\n            },\n            \"sensitive\": true\n          }\n        },\n        \"sensitive\": true\n      },\n      \"sensitive\": true\n    },\n    \"S8j\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"S3BucketName\",\n        \"S3Region\"\n      ],\n      \"members\": {\n        \"S3BucketName\": {},\n        \"S3KeyPrefix\": {},\n        \"S3Region\": {}\n      }\n    },\n    \"S96\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"BaselineId\": {},\n        \"BaselineName\": {},\n        \"BaselineDescription\": {},\n        \"DefaultBaseline\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"Sa4\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"locationName\": \"InventoryFilter\",\n        \"type\": \"structure\",\n        \"required\": [\n          \"Key\",\n          \"Values\"\n        ],\n        \"members\": {\n          \"Key\": {},\n          \"Values\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"locationName\": \"FilterValue\"\n            }\n          },\n          \"Type\": {}\n        }\n      }\n    },\n    \"San\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"map\",\n        \"key\": {},\n        \"value\": {}\n      }\n    },\n    \"Sbf\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sby\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"key\",\n          \"value\"\n        ],\n        \"members\": {\n          \"key\": {},\n          \"value\": {}\n        }\n      }\n    },\n    \"Scb\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"NotificationArn\": {},\n        \"NotificationEvents\": {\n          \"type\": \"list\",\n          \"member\": {}\n        },\n        \"NotificationType\": {}\n      }\n    },\n    \"Scj\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"CommandId\": {},\n        \"DocumentName\": {},\n        \"Comment\": {},\n        \"ExpiresAfter\": {\n          \"type\": \"timestamp\"\n        },\n        \"Parameters\": {\n          \"shape\": \"Sq\"\n        },\n        \"InstanceIds\": {\n          \"shape\": \"Sb\"\n        },\n        \"Targets\": {\n          \"shape\": \"Su\"\n        },\n        \"RequestedDateTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"Status\": {},\n        \"StatusDetails\": {},\n        \"OutputS3Region\": {},\n        \"OutputS3BucketName\": {},\n        \"OutputS3KeyPrefix\": {},\n        \"MaxConcurrency\": {},\n        \"MaxErrors\": {},\n        \"TargetCount\": {\n          \"type\": \"integer\"\n        },\n        \"CompletedCount\": {\n          \"type\": \"integer\"\n        },\n        \"ErrorCount\": {\n          \"type\": \"integer\"\n        },\n        \"ServiceRole\": {},\n        \"NotificationConfig\": {\n          \"shape\": \"Scb\"\n        }\n      }\n    }\n  }\n}\n},{}],130:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeInstanceInformation\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"result_key\": \"InstanceInformationList\"\n    },\n    \"ListAssociations\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"result_key\": \"Associations\"\n    },\n    \"ListCommandInvocations\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"result_key\": \"CommandInvocations\"\n    },\n    \"ListCommands\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"result_key\": \"Commands\"\n    },\n    \"ListDocuments\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"result_key\": \"DocumentIdentifiers\"\n    },\n    \"DescribeActivations\": {\n      \"input_token\": \"NextToken\",\n      \"output_token\": \"NextToken\",\n      \"limit_key\": \"MaxResults\",\n      \"result_key\": \"ActivationList\"\n    }\n  }\n}\n\n},{}],131:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2013-06-30\",\n    \"endpointPrefix\": \"storagegateway\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"AWS Storage Gateway\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"StorageGateway_20130630\",\n    \"uid\": \"storagegateway-2013-06-30\"\n  },\n  \"operations\": {\n    \"ActivateGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ActivationKey\",\n          \"GatewayName\",\n          \"GatewayTimezone\",\n          \"GatewayRegion\"\n        ],\n        \"members\": {\n          \"ActivationKey\": {},\n          \"GatewayName\": {},\n          \"GatewayTimezone\": {},\n          \"GatewayRegion\": {},\n          \"GatewayType\": {},\n          \"TapeDriveType\": {},\n          \"MediumChangerType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      }\n    },\n    \"AddCache\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\",\n          \"DiskIds\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"DiskIds\": {\n            \"shape\": \"Sc\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      }\n    },\n    \"AddTagsToResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceARN\",\n          \"Tags\"\n        ],\n        \"members\": {\n          \"ResourceARN\": {},\n          \"Tags\": {\n            \"shape\": \"Sh\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourceARN\": {}\n        }\n      }\n    },\n    \"AddUploadBuffer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\",\n          \"DiskIds\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"DiskIds\": {\n            \"shape\": \"Sc\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      }\n    },\n    \"AddWorkingStorage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\",\n          \"DiskIds\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"DiskIds\": {\n            \"shape\": \"Sc\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      }\n    },\n    \"CancelArchival\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\",\n          \"TapeARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"TapeARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TapeARN\": {}\n        }\n      }\n    },\n    \"CancelRetrieval\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\",\n          \"TapeARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"TapeARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TapeARN\": {}\n        }\n      }\n    },\n    \"CreateCachediSCSIVolume\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\",\n          \"VolumeSizeInBytes\",\n          \"TargetName\",\n          \"NetworkInterfaceId\",\n          \"ClientToken\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"VolumeSizeInBytes\": {\n            \"type\": \"long\"\n          },\n          \"SnapshotId\": {},\n          \"TargetName\": {},\n          \"SourceVolumeARN\": {},\n          \"NetworkInterfaceId\": {},\n          \"ClientToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VolumeARN\": {},\n          \"TargetARN\": {}\n        }\n      }\n    },\n    \"CreateNFSFileShare\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ClientToken\",\n          \"GatewayARN\",\n          \"Role\",\n          \"LocationARN\"\n        ],\n        \"members\": {\n          \"ClientToken\": {},\n          \"NFSFileShareDefaults\": {\n            \"shape\": \"S15\"\n          },\n          \"GatewayARN\": {},\n          \"KMSEncrypted\": {\n            \"type\": \"boolean\"\n          },\n          \"KMSKey\": {},\n          \"Role\": {},\n          \"LocationARN\": {},\n          \"DefaultStorageClass\": {},\n          \"ClientList\": {\n            \"shape\": \"S1d\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FileShareARN\": {}\n        }\n      }\n    },\n    \"CreateSnapshot\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeARN\",\n          \"SnapshotDescription\"\n        ],\n        \"members\": {\n          \"VolumeARN\": {},\n          \"SnapshotDescription\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VolumeARN\": {},\n          \"SnapshotId\": {}\n        }\n      }\n    },\n    \"CreateSnapshotFromVolumeRecoveryPoint\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeARN\",\n          \"SnapshotDescription\"\n        ],\n        \"members\": {\n          \"VolumeARN\": {},\n          \"SnapshotDescription\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SnapshotId\": {},\n          \"VolumeARN\": {},\n          \"VolumeRecoveryPointTime\": {}\n        }\n      }\n    },\n    \"CreateStorediSCSIVolume\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\",\n          \"DiskId\",\n          \"PreserveExistingData\",\n          \"TargetName\",\n          \"NetworkInterfaceId\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"DiskId\": {},\n          \"SnapshotId\": {},\n          \"PreserveExistingData\": {\n            \"type\": \"boolean\"\n          },\n          \"TargetName\": {},\n          \"NetworkInterfaceId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VolumeARN\": {},\n          \"VolumeSizeInBytes\": {\n            \"type\": \"long\"\n          },\n          \"TargetARN\": {}\n        }\n      }\n    },\n    \"CreateTapeWithBarcode\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\",\n          \"TapeSizeInBytes\",\n          \"TapeBarcode\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"TapeSizeInBytes\": {\n            \"type\": \"long\"\n          },\n          \"TapeBarcode\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TapeARN\": {}\n        }\n      }\n    },\n    \"CreateTapes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\",\n          \"TapeSizeInBytes\",\n          \"ClientToken\",\n          \"NumTapesToCreate\",\n          \"TapeBarcodePrefix\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"TapeSizeInBytes\": {\n            \"type\": \"long\"\n          },\n          \"ClientToken\": {},\n          \"NumTapesToCreate\": {\n            \"type\": \"integer\"\n          },\n          \"TapeBarcodePrefix\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TapeARNs\": {\n            \"shape\": \"S1y\"\n          }\n        }\n      }\n    },\n    \"DeleteBandwidthRateLimit\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\",\n          \"BandwidthType\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"BandwidthType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      }\n    },\n    \"DeleteChapCredentials\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TargetARN\",\n          \"InitiatorName\"\n        ],\n        \"members\": {\n          \"TargetARN\": {},\n          \"InitiatorName\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TargetARN\": {},\n          \"InitiatorName\": {}\n        }\n      }\n    },\n    \"DeleteFileShare\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FileShareARN\"\n        ],\n        \"members\": {\n          \"FileShareARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FileShareARN\": {}\n        }\n      }\n    },\n    \"DeleteGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      }\n    },\n    \"DeleteSnapshotSchedule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeARN\"\n        ],\n        \"members\": {\n          \"VolumeARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VolumeARN\": {}\n        }\n      }\n    },\n    \"DeleteTape\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\",\n          \"TapeARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"TapeARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TapeARN\": {}\n        }\n      }\n    },\n    \"DeleteTapeArchive\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TapeARN\"\n        ],\n        \"members\": {\n          \"TapeARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TapeARN\": {}\n        }\n      }\n    },\n    \"DeleteVolume\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeARN\"\n        ],\n        \"members\": {\n          \"VolumeARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VolumeARN\": {}\n        }\n      }\n    },\n    \"DescribeBandwidthRateLimit\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {},\n          \"AverageUploadRateLimitInBitsPerSec\": {\n            \"type\": \"long\"\n          },\n          \"AverageDownloadRateLimitInBitsPerSec\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    },\n    \"DescribeCache\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {},\n          \"DiskIds\": {\n            \"shape\": \"Sc\"\n          },\n          \"CacheAllocatedInBytes\": {\n            \"type\": \"long\"\n          },\n          \"CacheUsedPercentage\": {\n            \"type\": \"double\"\n          },\n          \"CacheDirtyPercentage\": {\n            \"type\": \"double\"\n          },\n          \"CacheHitPercentage\": {\n            \"type\": \"double\"\n          },\n          \"CacheMissPercentage\": {\n            \"type\": \"double\"\n          }\n        }\n      }\n    },\n    \"DescribeCachediSCSIVolumes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeARNs\"\n        ],\n        \"members\": {\n          \"VolumeARNs\": {\n            \"shape\": \"S2p\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"CachediSCSIVolumes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"VolumeARN\": {},\n                \"VolumeId\": {},\n                \"VolumeType\": {},\n                \"VolumeStatus\": {},\n                \"VolumeSizeInBytes\": {\n                  \"type\": \"long\"\n                },\n                \"VolumeProgress\": {\n                  \"type\": \"double\"\n                },\n                \"SourceSnapshotId\": {},\n                \"VolumeiSCSIAttributes\": {\n                  \"shape\": \"S2x\"\n                },\n                \"CreatedDate\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeChapCredentials\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TargetARN\"\n        ],\n        \"members\": {\n          \"TargetARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChapCredentials\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"TargetARN\": {},\n                \"SecretToAuthenticateInitiator\": {},\n                \"InitiatorName\": {},\n                \"SecretToAuthenticateTarget\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeGatewayInformation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {},\n          \"GatewayId\": {},\n          \"GatewayName\": {},\n          \"GatewayTimezone\": {},\n          \"GatewayState\": {},\n          \"GatewayNetworkInterfaces\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"Ipv4Address\": {},\n                \"MacAddress\": {},\n                \"Ipv6Address\": {}\n              }\n            }\n          },\n          \"GatewayType\": {},\n          \"NextUpdateAvailabilityDate\": {},\n          \"LastSoftwareUpdate\": {}\n        }\n      }\n    },\n    \"DescribeMaintenanceStartTime\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {},\n          \"HourOfDay\": {\n            \"type\": \"integer\"\n          },\n          \"MinuteOfHour\": {\n            \"type\": \"integer\"\n          },\n          \"DayOfWeek\": {\n            \"type\": \"integer\"\n          },\n          \"Timezone\": {}\n        }\n      }\n    },\n    \"DescribeNFSFileShares\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FileShareARNList\"\n        ],\n        \"members\": {\n          \"FileShareARNList\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NFSFileShareInfoList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"NFSFileShareDefaults\": {\n                  \"shape\": \"S15\"\n                },\n                \"FileShareARN\": {},\n                \"FileShareId\": {},\n                \"FileShareStatus\": {},\n                \"GatewayARN\": {},\n                \"KMSEncrypted\": {\n                  \"type\": \"boolean\"\n                },\n                \"KMSKey\": {},\n                \"Path\": {},\n                \"Role\": {},\n                \"LocationARN\": {},\n                \"DefaultStorageClass\": {},\n                \"ClientList\": {\n                  \"shape\": \"S1d\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeSnapshotSchedule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeARN\"\n        ],\n        \"members\": {\n          \"VolumeARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VolumeARN\": {},\n          \"StartAt\": {\n            \"type\": \"integer\"\n          },\n          \"RecurrenceInHours\": {\n            \"type\": \"integer\"\n          },\n          \"Description\": {},\n          \"Timezone\": {}\n        }\n      }\n    },\n    \"DescribeStorediSCSIVolumes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeARNs\"\n        ],\n        \"members\": {\n          \"VolumeARNs\": {\n            \"shape\": \"S2p\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StorediSCSIVolumes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"VolumeARN\": {},\n                \"VolumeId\": {},\n                \"VolumeType\": {},\n                \"VolumeStatus\": {},\n                \"VolumeSizeInBytes\": {\n                  \"type\": \"long\"\n                },\n                \"VolumeProgress\": {\n                  \"type\": \"double\"\n                },\n                \"VolumeDiskId\": {},\n                \"SourceSnapshotId\": {},\n                \"PreservedExistingData\": {\n                  \"type\": \"boolean\"\n                },\n                \"VolumeiSCSIAttributes\": {\n                  \"shape\": \"S2x\"\n                },\n                \"CreatedDate\": {\n                  \"type\": \"timestamp\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"DescribeTapeArchives\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TapeARNs\": {\n            \"shape\": \"S1y\"\n          },\n          \"Marker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TapeArchives\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"TapeARN\": {},\n                \"TapeBarcode\": {},\n                \"TapeCreatedDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"TapeSizeInBytes\": {\n                  \"type\": \"long\"\n                },\n                \"CompletionTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"RetrievedTo\": {},\n                \"TapeStatus\": {}\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeTapeRecoveryPoints\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"Marker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {},\n          \"TapeRecoveryPointInfos\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"TapeARN\": {},\n                \"TapeRecoveryPointTime\": {\n                  \"type\": \"timestamp\"\n                },\n                \"TapeSizeInBytes\": {\n                  \"type\": \"long\"\n                },\n                \"TapeStatus\": {}\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeTapes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"TapeARNs\": {\n            \"shape\": \"S1y\"\n          },\n          \"Marker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Tapes\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"TapeARN\": {},\n                \"TapeBarcode\": {},\n                \"TapeCreatedDate\": {\n                  \"type\": \"timestamp\"\n                },\n                \"TapeSizeInBytes\": {\n                  \"type\": \"long\"\n                },\n                \"TapeStatus\": {},\n                \"VTLDevice\": {},\n                \"Progress\": {\n                  \"type\": \"double\"\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeUploadBuffer\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {},\n          \"DiskIds\": {\n            \"shape\": \"Sc\"\n          },\n          \"UploadBufferUsedInBytes\": {\n            \"type\": \"long\"\n          },\n          \"UploadBufferAllocatedInBytes\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    },\n    \"DescribeVTLDevices\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"VTLDeviceARNs\": {\n            \"type\": \"list\",\n            \"member\": {}\n          },\n          \"Marker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {},\n          \"VTLDevices\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"VTLDeviceARN\": {},\n                \"VTLDeviceType\": {},\n                \"VTLDeviceVendor\": {},\n                \"VTLDeviceProductIdentifier\": {},\n                \"DeviceiSCSIAttributes\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"TargetARN\": {},\n                    \"NetworkInterfaceId\": {},\n                    \"NetworkInterfacePort\": {\n                      \"type\": \"integer\"\n                    },\n                    \"ChapEnabled\": {\n                      \"type\": \"boolean\"\n                    }\n                  }\n                }\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"DescribeWorkingStorage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {},\n          \"DiskIds\": {\n            \"shape\": \"Sc\"\n          },\n          \"WorkingStorageUsedInBytes\": {\n            \"type\": \"long\"\n          },\n          \"WorkingStorageAllocatedInBytes\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    },\n    \"DisableGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      }\n    },\n    \"ListFileShares\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"Marker\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"NextMarker\": {},\n          \"FileShareInfoList\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"FileShareARN\": {},\n                \"FileShareId\": {},\n                \"FileShareStatus\": {},\n                \"GatewayARN\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListGateways\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Marker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Gateways\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"GatewayId\": {},\n                \"GatewayARN\": {},\n                \"GatewayType\": {},\n                \"GatewayOperationalState\": {},\n                \"GatewayName\": {}\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"ListLocalDisks\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {},\n          \"Disks\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"DiskId\": {},\n                \"DiskPath\": {},\n                \"DiskNode\": {},\n                \"DiskStatus\": {},\n                \"DiskSizeInBytes\": {\n                  \"type\": \"long\"\n                },\n                \"DiskAllocationType\": {},\n                \"DiskAllocationResource\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListTagsForResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceARN\"\n        ],\n        \"members\": {\n          \"ResourceARN\": {},\n          \"Marker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourceARN\": {},\n          \"Marker\": {},\n          \"Tags\": {\n            \"shape\": \"Sh\"\n          }\n        }\n      }\n    },\n    \"ListTapes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TapeARNs\": {\n            \"shape\": \"S1y\"\n          },\n          \"Marker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TapeInfos\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"TapeARN\": {},\n                \"TapeBarcode\": {},\n                \"TapeSizeInBytes\": {\n                  \"type\": \"long\"\n                },\n                \"TapeStatus\": {},\n                \"GatewayARN\": {}\n              }\n            }\n          },\n          \"Marker\": {}\n        }\n      }\n    },\n    \"ListVolumeInitiators\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeARN\"\n        ],\n        \"members\": {\n          \"VolumeARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Initiators\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      }\n    },\n    \"ListVolumeRecoveryPoints\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {},\n          \"VolumeRecoveryPointInfos\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"VolumeARN\": {},\n                \"VolumeSizeInBytes\": {\n                  \"type\": \"long\"\n                },\n                \"VolumeUsageInBytes\": {\n                  \"type\": \"long\"\n                },\n                \"VolumeRecoveryPointTime\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListVolumes\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {},\n          \"Marker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {},\n          \"Marker\": {},\n          \"VolumeInfos\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"VolumeARN\": {},\n                \"VolumeId\": {},\n                \"GatewayARN\": {},\n                \"GatewayId\": {},\n                \"VolumeType\": {},\n                \"VolumeSizeInBytes\": {\n                  \"type\": \"long\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"RemoveTagsFromResource\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ResourceARN\",\n          \"TagKeys\"\n        ],\n        \"members\": {\n          \"ResourceARN\": {},\n          \"TagKeys\": {\n            \"type\": \"list\",\n            \"member\": {}\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ResourceARN\": {}\n        }\n      }\n    },\n    \"ResetCache\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      }\n    },\n    \"RetrieveTapeArchive\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TapeARN\",\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"TapeARN\": {},\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TapeARN\": {}\n        }\n      }\n    },\n    \"RetrieveTapeRecoveryPoint\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TapeARN\",\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"TapeARN\": {},\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TapeARN\": {}\n        }\n      }\n    },\n    \"SetLocalConsolePassword\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\",\n          \"LocalConsolePassword\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"LocalConsolePassword\": {\n            \"type\": \"string\",\n            \"sensitive\": true\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      }\n    },\n    \"ShutdownGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      }\n    },\n    \"StartGateway\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      }\n    },\n    \"UpdateBandwidthRateLimit\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"AverageUploadRateLimitInBitsPerSec\": {\n            \"type\": \"long\"\n          },\n          \"AverageDownloadRateLimitInBitsPerSec\": {\n            \"type\": \"long\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      }\n    },\n    \"UpdateChapCredentials\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"TargetARN\",\n          \"SecretToAuthenticateInitiator\",\n          \"InitiatorName\"\n        ],\n        \"members\": {\n          \"TargetARN\": {},\n          \"SecretToAuthenticateInitiator\": {},\n          \"InitiatorName\": {},\n          \"SecretToAuthenticateTarget\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TargetARN\": {},\n          \"InitiatorName\": {}\n        }\n      }\n    },\n    \"UpdateGatewayInformation\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"GatewayName\": {},\n          \"GatewayTimezone\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {},\n          \"GatewayName\": {}\n        }\n      }\n    },\n    \"UpdateGatewaySoftwareNow\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      }\n    },\n    \"UpdateMaintenanceStartTime\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"GatewayARN\",\n          \"HourOfDay\",\n          \"MinuteOfHour\",\n          \"DayOfWeek\"\n        ],\n        \"members\": {\n          \"GatewayARN\": {},\n          \"HourOfDay\": {\n            \"type\": \"integer\"\n          },\n          \"MinuteOfHour\": {\n            \"type\": \"integer\"\n          },\n          \"DayOfWeek\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"GatewayARN\": {}\n        }\n      }\n    },\n    \"UpdateNFSFileShare\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"FileShareARN\"\n        ],\n        \"members\": {\n          \"FileShareARN\": {},\n          \"KMSEncrypted\": {\n            \"type\": \"boolean\"\n          },\n          \"KMSKey\": {},\n          \"NFSFileShareDefaults\": {\n            \"shape\": \"S15\"\n          },\n          \"DefaultStorageClass\": {},\n          \"ClientList\": {\n            \"shape\": \"S1d\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"FileShareARN\": {}\n        }\n      }\n    },\n    \"UpdateSnapshotSchedule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VolumeARN\",\n          \"StartAt\",\n          \"RecurrenceInHours\"\n        ],\n        \"members\": {\n          \"VolumeARN\": {},\n          \"StartAt\": {\n            \"type\": \"integer\"\n          },\n          \"RecurrenceInHours\": {\n            \"type\": \"integer\"\n          },\n          \"Description\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VolumeARN\": {}\n        }\n      }\n    },\n    \"UpdateVTLDeviceType\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"VTLDeviceARN\",\n          \"DeviceType\"\n        ],\n        \"members\": {\n          \"VTLDeviceARN\": {},\n          \"DeviceType\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"VTLDeviceARN\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"Sc\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"Sh\": {\n      \"type\": \"list\",\n      \"member\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Key\",\n          \"Value\"\n        ],\n        \"members\": {\n          \"Key\": {},\n          \"Value\": {}\n        }\n      }\n    },\n    \"S15\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"FileMode\": {},\n        \"DirectoryMode\": {},\n        \"GroupId\": {\n          \"type\": \"long\"\n        },\n        \"OwnerId\": {\n          \"type\": \"long\"\n        }\n      }\n    },\n    \"S1d\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S1y\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S2p\": {\n      \"type\": \"list\",\n      \"member\": {}\n    },\n    \"S2x\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"TargetARN\": {},\n        \"NetworkInterfaceId\": {},\n        \"NetworkInterfacePort\": {\n          \"type\": \"integer\"\n        },\n        \"LunNumber\": {\n          \"type\": \"integer\"\n        },\n        \"ChapEnabled\": {\n          \"type\": \"boolean\"\n        }\n      }\n    }\n  }\n}\n},{}],132:[function(require,module,exports){\nmodule.exports={\n  \"pagination\": {\n    \"DescribeCachediSCSIVolumes\": {\n      \"result_key\": \"CachediSCSIVolumes\"\n    },\n    \"DescribeStorediSCSIVolumes\": {\n      \"result_key\": \"StorediSCSIVolumes\"\n    },\n    \"DescribeTapeArchives\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"Limit\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"TapeArchives\"\n    },\n    \"DescribeTapeRecoveryPoints\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"Limit\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"TapeRecoveryPointInfos\"\n    },\n    \"DescribeTapes\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"Limit\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"Tapes\"\n    },\n    \"DescribeVTLDevices\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"Limit\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"VTLDevices\"\n    },\n    \"ListGateways\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"Limit\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"Gateways\"\n    },\n    \"ListLocalDisks\": {\n      \"result_key\": \"Disks\"\n    },\n    \"ListVolumeRecoveryPoints\": {\n      \"result_key\": \"VolumeRecoveryPointInfos\"\n    },\n    \"ListVolumes\": {\n      \"input_token\": \"Marker\",\n      \"limit_key\": \"Limit\",\n      \"output_token\": \"Marker\",\n      \"result_key\": \"VolumeInfos\"\n    }\n  }\n}\n},{}],133:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2012-08-10\",\n    \"endpointPrefix\": \"streams.dynamodb\",\n    \"jsonVersion\": \"1.0\",\n    \"protocol\": \"json\",\n    \"serviceFullName\": \"Amazon DynamoDB Streams\",\n    \"signatureVersion\": \"v4\",\n    \"signingName\": \"dynamodb\",\n    \"targetPrefix\": \"DynamoDBStreams_20120810\",\n    \"uid\": \"streams-dynamodb-2012-08-10\"\n  },\n  \"operations\": {\n    \"DescribeStream\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamArn\"\n        ],\n        \"members\": {\n          \"StreamArn\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"ExclusiveStartShardId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"StreamDescription\": {\n            \"type\": \"structure\",\n            \"members\": {\n              \"StreamArn\": {},\n              \"StreamLabel\": {},\n              \"StreamStatus\": {},\n              \"StreamViewType\": {},\n              \"CreationRequestDateTime\": {\n                \"type\": \"timestamp\"\n              },\n              \"TableName\": {},\n              \"KeySchema\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"required\": [\n                    \"AttributeName\",\n                    \"KeyType\"\n                  ],\n                  \"members\": {\n                    \"AttributeName\": {},\n                    \"KeyType\": {}\n                  }\n                }\n              },\n              \"Shards\": {\n                \"type\": \"list\",\n                \"member\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"ShardId\": {},\n                    \"SequenceNumberRange\": {\n                      \"type\": \"structure\",\n                      \"members\": {\n                        \"StartingSequenceNumber\": {},\n                        \"EndingSequenceNumber\": {}\n                      }\n                    },\n                    \"ParentShardId\": {}\n                  }\n                }\n              },\n              \"LastEvaluatedShardId\": {}\n            }\n          }\n        }\n      }\n    },\n    \"GetRecords\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ShardIterator\"\n        ],\n        \"members\": {\n          \"ShardIterator\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Records\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"eventID\": {},\n                \"eventName\": {},\n                \"eventVersion\": {},\n                \"eventSource\": {},\n                \"awsRegion\": {},\n                \"dynamodb\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"ApproximateCreationDateTime\": {\n                      \"type\": \"timestamp\"\n                    },\n                    \"Keys\": {\n                      \"shape\": \"Sr\"\n                    },\n                    \"NewImage\": {\n                      \"shape\": \"Sr\"\n                    },\n                    \"OldImage\": {\n                      \"shape\": \"Sr\"\n                    },\n                    \"SequenceNumber\": {},\n                    \"SizeBytes\": {\n                      \"type\": \"long\"\n                    },\n                    \"StreamViewType\": {}\n                  }\n                }\n              }\n            }\n          },\n          \"NextShardIterator\": {}\n        }\n      }\n    },\n    \"GetShardIterator\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"StreamArn\",\n          \"ShardId\",\n          \"ShardIteratorType\"\n        ],\n        \"members\": {\n          \"StreamArn\": {},\n          \"ShardId\": {},\n          \"ShardIteratorType\": {},\n          \"SequenceNumber\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ShardIterator\": {}\n        }\n      }\n    },\n    \"ListStreams\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"TableName\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          },\n          \"ExclusiveStartStreamArn\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Streams\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"members\": {\n                \"StreamArn\": {},\n                \"TableName\": {},\n                \"StreamLabel\": {}\n              }\n            }\n          },\n          \"LastEvaluatedStreamArn\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"Sr\": {\n      \"type\": \"map\",\n      \"key\": {},\n      \"value\": {\n        \"shape\": \"St\"\n      }\n    },\n    \"St\": {\n      \"type\": \"structure\",\n      \"members\": {\n        \"S\": {},\n        \"N\": {},\n        \"B\": {\n          \"type\": \"blob\"\n        },\n        \"SS\": {\n          \"type\": \"list\",\n          \"member\": {}\n        },\n        \"NS\": {\n          \"type\": \"list\",\n          \"member\": {}\n        },\n        \"BS\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"type\": \"blob\"\n          }\n        },\n        \"M\": {\n          \"type\": \"map\",\n          \"key\": {},\n          \"value\": {\n            \"shape\": \"St\"\n          }\n        },\n        \"L\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"St\"\n          }\n        },\n        \"NULL\": {\n          \"type\": \"boolean\"\n        },\n        \"BOOL\": {\n          \"type\": \"boolean\"\n        }\n      }\n    }\n  }\n}\n},{}],134:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"apiVersion\": \"2011-06-15\",\n    \"endpointPrefix\": \"sts\",\n    \"globalEndpoint\": \"sts.amazonaws.com\",\n    \"protocol\": \"query\",\n    \"serviceAbbreviation\": \"AWS STS\",\n    \"serviceFullName\": \"AWS Security Token Service\",\n    \"signatureVersion\": \"v4\",\n    \"uid\": \"sts-2011-06-15\",\n    \"xmlNamespace\": \"https://sts.amazonaws.com/doc/2011-06-15/\"\n  },\n  \"operations\": {\n    \"AssumeRole\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RoleArn\",\n          \"RoleSessionName\"\n        ],\n        \"members\": {\n          \"RoleArn\": {},\n          \"RoleSessionName\": {},\n          \"Policy\": {},\n          \"DurationSeconds\": {\n            \"type\": \"integer\"\n          },\n          \"ExternalId\": {},\n          \"SerialNumber\": {},\n          \"TokenCode\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AssumeRoleResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Credentials\": {\n            \"shape\": \"Sa\"\n          },\n          \"AssumedRoleUser\": {\n            \"shape\": \"Sf\"\n          },\n          \"PackedPolicySize\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"AssumeRoleWithSAML\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RoleArn\",\n          \"PrincipalArn\",\n          \"SAMLAssertion\"\n        ],\n        \"members\": {\n          \"RoleArn\": {},\n          \"PrincipalArn\": {},\n          \"SAMLAssertion\": {},\n          \"Policy\": {},\n          \"DurationSeconds\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AssumeRoleWithSAMLResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Credentials\": {\n            \"shape\": \"Sa\"\n          },\n          \"AssumedRoleUser\": {\n            \"shape\": \"Sf\"\n          },\n          \"PackedPolicySize\": {\n            \"type\": \"integer\"\n          },\n          \"Subject\": {},\n          \"SubjectType\": {},\n          \"Issuer\": {},\n          \"Audience\": {},\n          \"NameQualifier\": {}\n        }\n      }\n    },\n    \"AssumeRoleWithWebIdentity\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RoleArn\",\n          \"RoleSessionName\",\n          \"WebIdentityToken\"\n        ],\n        \"members\": {\n          \"RoleArn\": {},\n          \"RoleSessionName\": {},\n          \"WebIdentityToken\": {},\n          \"ProviderId\": {},\n          \"Policy\": {},\n          \"DurationSeconds\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"AssumeRoleWithWebIdentityResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Credentials\": {\n            \"shape\": \"Sa\"\n          },\n          \"SubjectFromWebIdentityToken\": {},\n          \"AssumedRoleUser\": {\n            \"shape\": \"Sf\"\n          },\n          \"PackedPolicySize\": {\n            \"type\": \"integer\"\n          },\n          \"Provider\": {},\n          \"Audience\": {}\n        }\n      }\n    },\n    \"DecodeAuthorizationMessage\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"EncodedMessage\"\n        ],\n        \"members\": {\n          \"EncodedMessage\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"DecodeAuthorizationMessageResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"DecodedMessage\": {}\n        }\n      }\n    },\n    \"GetCallerIdentity\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetCallerIdentityResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"UserId\": {},\n          \"Account\": {},\n          \"Arn\": {}\n        }\n      }\n    },\n    \"GetFederationToken\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"Policy\": {},\n          \"DurationSeconds\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetFederationTokenResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Credentials\": {\n            \"shape\": \"Sa\"\n          },\n          \"FederatedUser\": {\n            \"type\": \"structure\",\n            \"required\": [\n              \"FederatedUserId\",\n              \"Arn\"\n            ],\n            \"members\": {\n              \"FederatedUserId\": {},\n              \"Arn\": {}\n            }\n          },\n          \"PackedPolicySize\": {\n            \"type\": \"integer\"\n          }\n        }\n      }\n    },\n    \"GetSessionToken\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"DurationSeconds\": {\n            \"type\": \"integer\"\n          },\n          \"SerialNumber\": {},\n          \"TokenCode\": {}\n        }\n      },\n      \"output\": {\n        \"resultWrapper\": \"GetSessionTokenResult\",\n        \"type\": \"structure\",\n        \"members\": {\n          \"Credentials\": {\n            \"shape\": \"Sa\"\n          }\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"Sa\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"AccessKeyId\",\n        \"SecretAccessKey\",\n        \"SessionToken\",\n        \"Expiration\"\n      ],\n      \"members\": {\n        \"AccessKeyId\": {},\n        \"SecretAccessKey\": {},\n        \"SessionToken\": {},\n        \"Expiration\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    },\n    \"Sf\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"AssumedRoleId\",\n        \"Arn\"\n      ],\n      \"members\": {\n        \"AssumedRoleId\": {},\n        \"Arn\": {}\n      }\n    }\n  }\n}\n},{}],135:[function(require,module,exports){\nmodule.exports={\n  \"version\": \"2.0\",\n  \"metadata\": {\n    \"uid\": \"waf-2015-08-24\",\n    \"apiVersion\": \"2015-08-24\",\n    \"endpointPrefix\": \"waf\",\n    \"jsonVersion\": \"1.1\",\n    \"protocol\": \"json\",\n    \"serviceAbbreviation\": \"WAF\",\n    \"serviceFullName\": \"AWS WAF\",\n    \"signatureVersion\": \"v4\",\n    \"targetPrefix\": \"AWSWAF_20150824\"\n  },\n  \"operations\": {\n    \"CreateByteMatchSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ByteMatchSet\": {\n            \"shape\": \"S5\"\n          },\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"CreateIPSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IPSet\": {\n            \"shape\": \"Sh\"\n          },\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"CreateRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"MetricName\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"MetricName\": {},\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Rule\": {\n            \"shape\": \"Sp\"\n          },\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"CreateSizeConstraintSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SizeConstraintSet\": {\n            \"shape\": \"Sw\"\n          },\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"CreateSqlInjectionMatchSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SqlInjectionMatchSet\": {\n            \"shape\": \"S13\"\n          },\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"CreateWebACL\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"MetricName\",\n          \"DefaultAction\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"MetricName\": {},\n          \"DefaultAction\": {\n            \"shape\": \"S17\"\n          },\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WebACL\": {\n            \"shape\": \"S1a\"\n          },\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"CreateXssMatchSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"Name\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"Name\": {},\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"XssMatchSet\": {\n            \"shape\": \"S1g\"\n          },\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"DeleteByteMatchSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ByteMatchSetId\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"ByteMatchSetId\": {},\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"DeleteIPSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IPSetId\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"IPSetId\": {},\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"DeleteRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleId\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"RuleId\": {},\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"DeleteSizeConstraintSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SizeConstraintSetId\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"SizeConstraintSetId\": {},\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"DeleteSqlInjectionMatchSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SqlInjectionMatchSetId\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"SqlInjectionMatchSetId\": {},\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"DeleteWebACL\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WebACLId\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"WebACLId\": {},\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"DeleteXssMatchSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"XssMatchSetId\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"XssMatchSetId\": {},\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"GetByteMatchSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ByteMatchSetId\"\n        ],\n        \"members\": {\n          \"ByteMatchSetId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ByteMatchSet\": {\n            \"shape\": \"S5\"\n          }\n        }\n      }\n    },\n    \"GetChangeToken\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {}\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"GetChangeTokenStatus\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeTokenStatus\": {}\n        }\n      }\n    },\n    \"GetIPSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IPSetId\"\n        ],\n        \"members\": {\n          \"IPSetId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"IPSet\": {\n            \"shape\": \"Sh\"\n          }\n        }\n      }\n    },\n    \"GetRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleId\"\n        ],\n        \"members\": {\n          \"RuleId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"Rule\": {\n            \"shape\": \"Sp\"\n          }\n        }\n      }\n    },\n    \"GetSampledRequests\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WebAclId\",\n          \"RuleId\",\n          \"TimeWindow\",\n          \"MaxItems\"\n        ],\n        \"members\": {\n          \"WebAclId\": {},\n          \"RuleId\": {},\n          \"TimeWindow\": {\n            \"shape\": \"S29\"\n          },\n          \"MaxItems\": {\n            \"type\": \"long\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SampledRequests\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Request\",\n                \"Weight\"\n              ],\n              \"members\": {\n                \"Request\": {\n                  \"type\": \"structure\",\n                  \"members\": {\n                    \"ClientIP\": {},\n                    \"Country\": {},\n                    \"URI\": {},\n                    \"Method\": {},\n                    \"HTTPVersion\": {},\n                    \"Headers\": {\n                      \"type\": \"list\",\n                      \"member\": {\n                        \"type\": \"structure\",\n                        \"members\": {\n                          \"Name\": {},\n                          \"Value\": {}\n                        }\n                      }\n                    }\n                  }\n                },\n                \"Weight\": {\n                  \"type\": \"long\"\n                },\n                \"Timestamp\": {\n                  \"type\": \"timestamp\"\n                },\n                \"Action\": {}\n              }\n            }\n          },\n          \"PopulationSize\": {\n            \"type\": \"long\"\n          },\n          \"TimeWindow\": {\n            \"shape\": \"S29\"\n          }\n        }\n      }\n    },\n    \"GetSizeConstraintSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SizeConstraintSetId\"\n        ],\n        \"members\": {\n          \"SizeConstraintSetId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SizeConstraintSet\": {\n            \"shape\": \"Sw\"\n          }\n        }\n      }\n    },\n    \"GetSqlInjectionMatchSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SqlInjectionMatchSetId\"\n        ],\n        \"members\": {\n          \"SqlInjectionMatchSetId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"SqlInjectionMatchSet\": {\n            \"shape\": \"S13\"\n          }\n        }\n      }\n    },\n    \"GetWebACL\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WebACLId\"\n        ],\n        \"members\": {\n          \"WebACLId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"WebACL\": {\n            \"shape\": \"S1a\"\n          }\n        }\n      }\n    },\n    \"GetXssMatchSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"XssMatchSetId\"\n        ],\n        \"members\": {\n          \"XssMatchSetId\": {}\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"XssMatchSet\": {\n            \"shape\": \"S1g\"\n          }\n        }\n      }\n    },\n    \"ListByteMatchSets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"ByteMatchSets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"ByteMatchSetId\",\n                \"Name\"\n              ],\n              \"members\": {\n                \"ByteMatchSetId\": {},\n                \"Name\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListIPSets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"IPSets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"IPSetId\",\n                \"Name\"\n              ],\n              \"members\": {\n                \"IPSetId\": {},\n                \"Name\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListRules\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"Rules\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"RuleId\",\n                \"Name\"\n              ],\n              \"members\": {\n                \"RuleId\": {},\n                \"Name\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListSizeConstraintSets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"SizeConstraintSets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"SizeConstraintSetId\",\n                \"Name\"\n              ],\n              \"members\": {\n                \"SizeConstraintSetId\": {},\n                \"Name\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListSqlInjectionMatchSets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"SqlInjectionMatchSets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"SqlInjectionMatchSetId\",\n                \"Name\"\n              ],\n              \"members\": {\n                \"SqlInjectionMatchSetId\": {},\n                \"Name\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListWebACLs\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"WebACLs\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"WebACLId\",\n                \"Name\"\n              ],\n              \"members\": {\n                \"WebACLId\": {},\n                \"Name\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"ListXssMatchSets\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"Limit\": {\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"NextMarker\": {},\n          \"XssMatchSets\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"XssMatchSetId\",\n                \"Name\"\n              ],\n              \"members\": {\n                \"XssMatchSetId\": {},\n                \"Name\": {}\n              }\n            }\n          }\n        }\n      }\n    },\n    \"UpdateByteMatchSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"ByteMatchSetId\",\n          \"ChangeToken\",\n          \"Updates\"\n        ],\n        \"members\": {\n          \"ByteMatchSetId\": {},\n          \"ChangeToken\": {},\n          \"Updates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Action\",\n                \"ByteMatchTuple\"\n              ],\n              \"members\": {\n                \"Action\": {},\n                \"ByteMatchTuple\": {\n                  \"shape\": \"S8\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"UpdateIPSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"IPSetId\",\n          \"ChangeToken\",\n          \"Updates\"\n        ],\n        \"members\": {\n          \"IPSetId\": {},\n          \"ChangeToken\": {},\n          \"Updates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Action\",\n                \"IPSetDescriptor\"\n              ],\n              \"members\": {\n                \"Action\": {},\n                \"IPSetDescriptor\": {\n                  \"shape\": \"Sj\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"UpdateRule\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"RuleId\",\n          \"ChangeToken\",\n          \"Updates\"\n        ],\n        \"members\": {\n          \"RuleId\": {},\n          \"ChangeToken\": {},\n          \"Updates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Action\",\n                \"Predicate\"\n              ],\n              \"members\": {\n                \"Action\": {},\n                \"Predicate\": {\n                  \"shape\": \"Sr\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"UpdateSizeConstraintSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SizeConstraintSetId\",\n          \"ChangeToken\",\n          \"Updates\"\n        ],\n        \"members\": {\n          \"SizeConstraintSetId\": {},\n          \"ChangeToken\": {},\n          \"Updates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Action\",\n                \"SizeConstraint\"\n              ],\n              \"members\": {\n                \"Action\": {},\n                \"SizeConstraint\": {\n                  \"shape\": \"Sy\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"UpdateSqlInjectionMatchSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"SqlInjectionMatchSetId\",\n          \"ChangeToken\",\n          \"Updates\"\n        ],\n        \"members\": {\n          \"SqlInjectionMatchSetId\": {},\n          \"ChangeToken\": {},\n          \"Updates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Action\",\n                \"SqlInjectionMatchTuple\"\n              ],\n              \"members\": {\n                \"Action\": {},\n                \"SqlInjectionMatchTuple\": {\n                  \"shape\": \"S15\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"UpdateWebACL\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"WebACLId\",\n          \"ChangeToken\"\n        ],\n        \"members\": {\n          \"WebACLId\": {},\n          \"ChangeToken\": {},\n          \"Updates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Action\",\n                \"ActivatedRule\"\n              ],\n              \"members\": {\n                \"Action\": {},\n                \"ActivatedRule\": {\n                  \"shape\": \"S1c\"\n                }\n              }\n            }\n          },\n          \"DefaultAction\": {\n            \"shape\": \"S17\"\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    },\n    \"UpdateXssMatchSet\": {\n      \"input\": {\n        \"type\": \"structure\",\n        \"required\": [\n          \"XssMatchSetId\",\n          \"ChangeToken\",\n          \"Updates\"\n        ],\n        \"members\": {\n          \"XssMatchSetId\": {},\n          \"ChangeToken\": {},\n          \"Updates\": {\n            \"type\": \"list\",\n            \"member\": {\n              \"type\": \"structure\",\n              \"required\": [\n                \"Action\",\n                \"XssMatchTuple\"\n              ],\n              \"members\": {\n                \"Action\": {},\n                \"XssMatchTuple\": {\n                  \"shape\": \"S1i\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"output\": {\n        \"type\": \"structure\",\n        \"members\": {\n          \"ChangeToken\": {}\n        }\n      }\n    }\n  },\n  \"shapes\": {\n    \"S5\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"ByteMatchSetId\",\n        \"ByteMatchTuples\"\n      ],\n      \"members\": {\n        \"ByteMatchSetId\": {},\n        \"Name\": {},\n        \"ByteMatchTuples\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"S8\"\n          }\n        }\n      }\n    },\n    \"S8\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"FieldToMatch\",\n        \"TargetString\",\n        \"TextTransformation\",\n        \"PositionalConstraint\"\n      ],\n      \"members\": {\n        \"FieldToMatch\": {\n          \"shape\": \"S9\"\n        },\n        \"TargetString\": {\n          \"type\": \"blob\"\n        },\n        \"TextTransformation\": {},\n        \"PositionalConstraint\": {}\n      }\n    },\n    \"S9\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Type\"\n      ],\n      \"members\": {\n        \"Type\": {},\n        \"Data\": {}\n      }\n    },\n    \"Sh\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"IPSetId\",\n        \"IPSetDescriptors\"\n      ],\n      \"members\": {\n        \"IPSetId\": {},\n        \"Name\": {},\n        \"IPSetDescriptors\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"Sj\"\n          }\n        }\n      }\n    },\n    \"Sj\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Type\",\n        \"Value\"\n      ],\n      \"members\": {\n        \"Type\": {},\n        \"Value\": {}\n      }\n    },\n    \"Sp\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"RuleId\",\n        \"Predicates\"\n      ],\n      \"members\": {\n        \"RuleId\": {},\n        \"Name\": {},\n        \"MetricName\": {},\n        \"Predicates\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"Sr\"\n          }\n        }\n      }\n    },\n    \"Sr\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Negated\",\n        \"Type\",\n        \"DataId\"\n      ],\n      \"members\": {\n        \"Negated\": {\n          \"type\": \"boolean\"\n        },\n        \"Type\": {},\n        \"DataId\": {}\n      }\n    },\n    \"Sw\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"SizeConstraintSetId\",\n        \"SizeConstraints\"\n      ],\n      \"members\": {\n        \"SizeConstraintSetId\": {},\n        \"Name\": {},\n        \"SizeConstraints\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"Sy\"\n          }\n        }\n      }\n    },\n    \"Sy\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"FieldToMatch\",\n        \"TextTransformation\",\n        \"ComparisonOperator\",\n        \"Size\"\n      ],\n      \"members\": {\n        \"FieldToMatch\": {\n          \"shape\": \"S9\"\n        },\n        \"TextTransformation\": {},\n        \"ComparisonOperator\": {},\n        \"Size\": {\n          \"type\": \"long\"\n        }\n      }\n    },\n    \"S13\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"SqlInjectionMatchSetId\",\n        \"SqlInjectionMatchTuples\"\n      ],\n      \"members\": {\n        \"SqlInjectionMatchSetId\": {},\n        \"Name\": {},\n        \"SqlInjectionMatchTuples\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"S15\"\n          }\n        }\n      }\n    },\n    \"S15\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"FieldToMatch\",\n        \"TextTransformation\"\n      ],\n      \"members\": {\n        \"FieldToMatch\": {\n          \"shape\": \"S9\"\n        },\n        \"TextTransformation\": {}\n      }\n    },\n    \"S17\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Type\"\n      ],\n      \"members\": {\n        \"Type\": {}\n      }\n    },\n    \"S1a\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"WebACLId\",\n        \"DefaultAction\",\n        \"Rules\"\n      ],\n      \"members\": {\n        \"WebACLId\": {},\n        \"Name\": {},\n        \"MetricName\": {},\n        \"DefaultAction\": {\n          \"shape\": \"S17\"\n        },\n        \"Rules\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"S1c\"\n          }\n        }\n      }\n    },\n    \"S1c\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"Priority\",\n        \"RuleId\",\n        \"Action\"\n      ],\n      \"members\": {\n        \"Priority\": {\n          \"type\": \"integer\"\n        },\n        \"RuleId\": {},\n        \"Action\": {\n          \"shape\": \"S17\"\n        }\n      }\n    },\n    \"S1g\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"XssMatchSetId\",\n        \"XssMatchTuples\"\n      ],\n      \"members\": {\n        \"XssMatchSetId\": {},\n        \"Name\": {},\n        \"XssMatchTuples\": {\n          \"type\": \"list\",\n          \"member\": {\n            \"shape\": \"S1i\"\n          }\n        }\n      }\n    },\n    \"S1i\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"FieldToMatch\",\n        \"TextTransformation\"\n      ],\n      \"members\": {\n        \"FieldToMatch\": {\n          \"shape\": \"S9\"\n        },\n        \"TextTransformation\": {}\n      }\n    },\n    \"S29\": {\n      \"type\": \"structure\",\n      \"required\": [\n        \"StartTime\",\n        \"EndTime\"\n      ],\n      \"members\": {\n        \"StartTime\": {\n          \"type\": \"timestamp\"\n        },\n        \"EndTime\": {\n          \"type\": \"timestamp\"\n        }\n      }\n    }\n  }\n}\n},{}],136:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['acm'] = {};\nAWS.ACM = Service.defineService('acm', ['2015-12-08']);\nObject.defineProperty(apiLoader.services['acm'], '2015-12-08', {\n  get: function get() {\n    var model = require('../apis/acm-2015-12-08.min.json');\n    model.paginators = require('../apis/acm-2015-12-08.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.ACM;\n\n},{\"../apis/acm-2015-12-08.min.json\":1,\"../apis/acm-2015-12-08.paginators.json\":2,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],137:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['apigateway'] = {};\nAWS.APIGateway = Service.defineService('apigateway', ['2015-07-09']);\nrequire('../lib/services/apigateway');\nObject.defineProperty(apiLoader.services['apigateway'], '2015-07-09', {\n  get: function get() {\n    var model = require('../apis/apigateway-2015-07-09.min.json');\n    model.paginators = require('../apis/apigateway-2015-07-09.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.APIGateway;\n\n},{\"../apis/apigateway-2015-07-09.min.json\":3,\"../apis/apigateway-2015-07-09.paginators.json\":4,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239,\"../lib/services/apigateway\":240}],138:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['applicationautoscaling'] = {};\nAWS.ApplicationAutoScaling = Service.defineService('applicationautoscaling', ['2016-02-06']);\nObject.defineProperty(apiLoader.services['applicationautoscaling'], '2016-02-06', {\n  get: function get() {\n    var model = require('../apis/application-autoscaling-2016-02-06.min.json');\n    model.paginators = require('../apis/application-autoscaling-2016-02-06.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.ApplicationAutoScaling;\n\n},{\"../apis/application-autoscaling-2016-02-06.min.json\":5,\"../apis/application-autoscaling-2016-02-06.paginators.json\":6,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],139:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['autoscaling'] = {};\nAWS.AutoScaling = Service.defineService('autoscaling', ['2011-01-01']);\nObject.defineProperty(apiLoader.services['autoscaling'], '2011-01-01', {\n  get: function get() {\n    var model = require('../apis/autoscaling-2011-01-01.min.json');\n    model.paginators = require('../apis/autoscaling-2011-01-01.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.AutoScaling;\n\n},{\"../apis/autoscaling-2011-01-01.min.json\":7,\"../apis/autoscaling-2011-01-01.paginators.json\":8,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],140:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\n\nmodule.exports = {\n  ACM: require('./acm'),\n  APIGateway: require('./apigateway'),\n  ApplicationAutoScaling: require('./applicationautoscaling'),\n  AutoScaling: require('./autoscaling'),\n  CloudFormation: require('./cloudformation'),\n  CloudFront: require('./cloudfront'),\n  CloudHSM: require('./cloudhsm'),\n  CloudTrail: require('./cloudtrail'),\n  CloudWatch: require('./cloudwatch'),\n  CloudWatchEvents: require('./cloudwatchevents'),\n  CloudWatchLogs: require('./cloudwatchlogs'),\n  CodeCommit: require('./codecommit'),\n  CodeDeploy: require('./codedeploy'),\n  CodePipeline: require('./codepipeline'),\n  CognitoIdentity: require('./cognitoidentity'),\n  CognitoIdentityServiceProvider: require('./cognitoidentityserviceprovider'),\n  CognitoSync: require('./cognitosync'),\n  ConfigService: require('./configservice'),\n  CUR: require('./cur'),\n  DeviceFarm: require('./devicefarm'),\n  DirectConnect: require('./directconnect'),\n  DynamoDB: require('./dynamodb'),\n  DynamoDBStreams: require('./dynamodbstreams'),\n  EC2: require('./ec2'),\n  ECR: require('./ecr'),\n  ECS: require('./ecs'),\n  ElastiCache: require('./elasticache'),\n  ElasticBeanstalk: require('./elasticbeanstalk'),\n  ELB: require('./elb'),\n  ELBv2: require('./elbv2'),\n  EMR: require('./emr'),\n  ElasticTranscoder: require('./elastictranscoder'),\n  Firehose: require('./firehose'),\n  GameLift: require('./gamelift'),\n  Inspector: require('./inspector'),\n  Iot: require('./iot'),\n  IotData: require('./iotdata'),\n  Kinesis: require('./kinesis'),\n  KMS: require('./kms'),\n  Lambda: require('./lambda'),\n  LexRuntime: require('./lexruntime'),\n  MachineLearning: require('./machinelearning'),\n  MarketplaceCommerceAnalytics: require('./marketplacecommerceanalytics'),\n  MobileAnalytics: require('./mobileanalytics'),\n  OpsWorks: require('./opsworks'),\n  Polly: require('./polly'),\n  RDS: require('./rds'),\n  Redshift: require('./redshift'),\n  Rekognition: require('./rekognition'),\n  Route53: require('./route53'),\n  Route53Domains: require('./route53domains'),\n  S3: require('./s3'),\n  ServiceCatalog: require('./servicecatalog'),\n  SES: require('./ses'),\n  SNS: require('./sns'),\n  SQS: require('./sqs'),\n  SSM: require('./ssm'),\n  StorageGateway: require('./storagegateway'),\n  STS: require('./sts'),\n  WAF: require('./waf')\n};\n},{\"../lib/core\":201,\"../lib/node_loader\":198,\"./acm\":136,\"./apigateway\":137,\"./applicationautoscaling\":138,\"./autoscaling\":139,\"./cloudformation\":141,\"./cloudfront\":142,\"./cloudhsm\":143,\"./cloudtrail\":144,\"./cloudwatch\":145,\"./cloudwatchevents\":146,\"./cloudwatchlogs\":147,\"./codecommit\":148,\"./codedeploy\":149,\"./codepipeline\":150,\"./cognitoidentity\":151,\"./cognitoidentityserviceprovider\":152,\"./cognitosync\":153,\"./configservice\":154,\"./cur\":155,\"./devicefarm\":156,\"./directconnect\":157,\"./dynamodb\":158,\"./dynamodbstreams\":159,\"./ec2\":160,\"./ecr\":161,\"./ecs\":162,\"./elasticache\":163,\"./elasticbeanstalk\":164,\"./elastictranscoder\":165,\"./elb\":166,\"./elbv2\":167,\"./emr\":168,\"./firehose\":169,\"./gamelift\":170,\"./inspector\":171,\"./iot\":172,\"./iotdata\":173,\"./kinesis\":174,\"./kms\":175,\"./lambda\":176,\"./lexruntime\":177,\"./machinelearning\":178,\"./marketplacecommerceanalytics\":179,\"./mobileanalytics\":180,\"./opsworks\":181,\"./polly\":182,\"./rds\":183,\"./redshift\":184,\"./rekognition\":185,\"./route53\":186,\"./route53domains\":187,\"./s3\":188,\"./servicecatalog\":189,\"./ses\":190,\"./sns\":191,\"./sqs\":192,\"./ssm\":193,\"./storagegateway\":194,\"./sts\":195,\"./waf\":196}],141:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['cloudformation'] = {};\nAWS.CloudFormation = Service.defineService('cloudformation', ['2010-05-15']);\nObject.defineProperty(apiLoader.services['cloudformation'], '2010-05-15', {\n  get: function get() {\n    var model = require('../apis/cloudformation-2010-05-15.min.json');\n    model.paginators = require('../apis/cloudformation-2010-05-15.paginators.json').pagination;\n    model.waiters = require('../apis/cloudformation-2010-05-15.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.CloudFormation;\n\n},{\"../apis/cloudformation-2010-05-15.min.json\":9,\"../apis/cloudformation-2010-05-15.paginators.json\":10,\"../apis/cloudformation-2010-05-15.waiters2.json\":11,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],142:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['cloudfront'] = {};\nAWS.CloudFront = Service.defineService('cloudfront', ['2013-05-12*', '2013-11-11*', '2014-05-31*', '2014-10-21*', '2014-11-06*', '2015-04-17*', '2015-07-27*', '2015-09-17*', '2016-01-13*', '2016-01-28*', '2016-08-01*', '2016-08-20*', '2016-09-07*', '2016-09-29*', '2016-11-25']);\nrequire('../lib/services/cloudfront');\nObject.defineProperty(apiLoader.services['cloudfront'], '2016-11-25', {\n  get: function get() {\n    var model = require('../apis/cloudfront-2016-11-25.min.json');\n    model.paginators = require('../apis/cloudfront-2016-11-25.paginators.json').pagination;\n    model.waiters = require('../apis/cloudfront-2016-11-25.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.CloudFront;\n\n},{\"../apis/cloudfront-2016-11-25.min.json\":12,\"../apis/cloudfront-2016-11-25.paginators.json\":13,\"../apis/cloudfront-2016-11-25.waiters2.json\":14,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239,\"../lib/services/cloudfront\":241}],143:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['cloudhsm'] = {};\nAWS.CloudHSM = Service.defineService('cloudhsm', ['2014-05-30']);\nObject.defineProperty(apiLoader.services['cloudhsm'], '2014-05-30', {\n  get: function get() {\n    var model = require('../apis/cloudhsm-2014-05-30.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.CloudHSM;\n\n},{\"../apis/cloudhsm-2014-05-30.min.json\":15,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],144:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['cloudtrail'] = {};\nAWS.CloudTrail = Service.defineService('cloudtrail', ['2013-11-01']);\nObject.defineProperty(apiLoader.services['cloudtrail'], '2013-11-01', {\n  get: function get() {\n    var model = require('../apis/cloudtrail-2013-11-01.min.json');\n    model.paginators = require('../apis/cloudtrail-2013-11-01.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.CloudTrail;\n\n},{\"../apis/cloudtrail-2013-11-01.min.json\":16,\"../apis/cloudtrail-2013-11-01.paginators.json\":17,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],145:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['cloudwatch'] = {};\nAWS.CloudWatch = Service.defineService('cloudwatch', ['2010-08-01']);\nObject.defineProperty(apiLoader.services['cloudwatch'], '2010-08-01', {\n  get: function get() {\n    var model = require('../apis/monitoring-2010-08-01.min.json');\n    model.paginators = require('../apis/monitoring-2010-08-01.paginators.json').pagination;\n    model.waiters = require('../apis/monitoring-2010-08-01.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.CloudWatch;\n\n},{\"../apis/monitoring-2010-08-01.min.json\":92,\"../apis/monitoring-2010-08-01.paginators.json\":93,\"../apis/monitoring-2010-08-01.waiters2.json\":94,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],146:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['cloudwatchevents'] = {};\nAWS.CloudWatchEvents = Service.defineService('cloudwatchevents', ['2014-02-03*', '2015-10-07']);\nObject.defineProperty(apiLoader.services['cloudwatchevents'], '2015-10-07', {\n  get: function get() {\n    var model = require('../apis/events-2015-10-07.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.CloudWatchEvents;\n\n},{\"../apis/events-2015-10-07.min.json\":69,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],147:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['cloudwatchlogs'] = {};\nAWS.CloudWatchLogs = Service.defineService('cloudwatchlogs', ['2014-03-28']);\nObject.defineProperty(apiLoader.services['cloudwatchlogs'], '2014-03-28', {\n  get: function get() {\n    var model = require('../apis/logs-2014-03-28.min.json');\n    model.paginators = require('../apis/logs-2014-03-28.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.CloudWatchLogs;\n\n},{\"../apis/logs-2014-03-28.min.json\":84,\"../apis/logs-2014-03-28.paginators.json\":85,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],148:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['codecommit'] = {};\nAWS.CodeCommit = Service.defineService('codecommit', ['2015-04-13']);\nObject.defineProperty(apiLoader.services['codecommit'], '2015-04-13', {\n  get: function get() {\n    var model = require('../apis/codecommit-2015-04-13.min.json');\n    model.paginators = require('../apis/codecommit-2015-04-13.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.CodeCommit;\n\n},{\"../apis/codecommit-2015-04-13.min.json\":18,\"../apis/codecommit-2015-04-13.paginators.json\":19,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],149:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['codedeploy'] = {};\nAWS.CodeDeploy = Service.defineService('codedeploy', ['2014-10-06']);\nObject.defineProperty(apiLoader.services['codedeploy'], '2014-10-06', {\n  get: function get() {\n    var model = require('../apis/codedeploy-2014-10-06.min.json');\n    model.paginators = require('../apis/codedeploy-2014-10-06.paginators.json').pagination;\n    model.waiters = require('../apis/codedeploy-2014-10-06.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.CodeDeploy;\n\n},{\"../apis/codedeploy-2014-10-06.min.json\":20,\"../apis/codedeploy-2014-10-06.paginators.json\":21,\"../apis/codedeploy-2014-10-06.waiters2.json\":22,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],150:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['codepipeline'] = {};\nAWS.CodePipeline = Service.defineService('codepipeline', ['2015-07-09']);\nObject.defineProperty(apiLoader.services['codepipeline'], '2015-07-09', {\n  get: function get() {\n    var model = require('../apis/codepipeline-2015-07-09.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.CodePipeline;\n\n},{\"../apis/codepipeline-2015-07-09.min.json\":23,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],151:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['cognitoidentity'] = {};\nAWS.CognitoIdentity = Service.defineService('cognitoidentity', ['2014-06-30']);\nrequire('../lib/services/cognitoidentity');\nObject.defineProperty(apiLoader.services['cognitoidentity'], '2014-06-30', {\n  get: function get() {\n    var model = require('../apis/cognito-identity-2014-06-30.min.json');\n    model.paginators = require('../apis/cognito-identity-2014-06-30.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.CognitoIdentity;\n\n},{\"../apis/cognito-identity-2014-06-30.min.json\":24,\"../apis/cognito-identity-2014-06-30.paginators.json\":25,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239,\"../lib/services/cognitoidentity\":242}],152:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['cognitoidentityserviceprovider'] = {};\nAWS.CognitoIdentityServiceProvider = Service.defineService('cognitoidentityserviceprovider', ['2016-04-18']);\nObject.defineProperty(apiLoader.services['cognitoidentityserviceprovider'], '2016-04-18', {\n  get: function get() {\n    var model = require('../apis/cognito-idp-2016-04-18.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.CognitoIdentityServiceProvider;\n\n},{\"../apis/cognito-idp-2016-04-18.min.json\":26,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],153:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['cognitosync'] = {};\nAWS.CognitoSync = Service.defineService('cognitosync', ['2014-06-30']);\nObject.defineProperty(apiLoader.services['cognitosync'], '2014-06-30', {\n  get: function get() {\n    var model = require('../apis/cognito-sync-2014-06-30.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.CognitoSync;\n\n},{\"../apis/cognito-sync-2014-06-30.min.json\":27,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],154:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['configservice'] = {};\nAWS.ConfigService = Service.defineService('configservice', ['2014-11-12']);\nObject.defineProperty(apiLoader.services['configservice'], '2014-11-12', {\n  get: function get() {\n    var model = require('../apis/config-2014-11-12.min.json');\n    model.paginators = require('../apis/config-2014-11-12.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.ConfigService;\n\n},{\"../apis/config-2014-11-12.min.json\":28,\"../apis/config-2014-11-12.paginators.json\":29,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],155:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['cur'] = {};\nAWS.CUR = Service.defineService('cur', ['2017-01-06']);\nObject.defineProperty(apiLoader.services['cur'], '2017-01-06', {\n  get: function get() {\n    var model = require('../apis/cur-2017-01-06.min.json');\n    model.paginators = require('../apis/cur-2017-01-06.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.CUR;\n\n},{\"../apis/cur-2017-01-06.min.json\":30,\"../apis/cur-2017-01-06.paginators.json\":31,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],156:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['devicefarm'] = {};\nAWS.DeviceFarm = Service.defineService('devicefarm', ['2015-06-23']);\nObject.defineProperty(apiLoader.services['devicefarm'], '2015-06-23', {\n  get: function get() {\n    var model = require('../apis/devicefarm-2015-06-23.min.json');\n    model.paginators = require('../apis/devicefarm-2015-06-23.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.DeviceFarm;\n\n},{\"../apis/devicefarm-2015-06-23.min.json\":32,\"../apis/devicefarm-2015-06-23.paginators.json\":33,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],157:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['directconnect'] = {};\nAWS.DirectConnect = Service.defineService('directconnect', ['2012-10-25']);\nObject.defineProperty(apiLoader.services['directconnect'], '2012-10-25', {\n  get: function get() {\n    var model = require('../apis/directconnect-2012-10-25.min.json');\n    model.paginators = require('../apis/directconnect-2012-10-25.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.DirectConnect;\n\n},{\"../apis/directconnect-2012-10-25.min.json\":34,\"../apis/directconnect-2012-10-25.paginators.json\":35,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],158:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['dynamodb'] = {};\nAWS.DynamoDB = Service.defineService('dynamodb', ['2011-12-05', '2012-08-10']);\nrequire('../lib/services/dynamodb');\nObject.defineProperty(apiLoader.services['dynamodb'], '2011-12-05', {\n  get: function get() {\n    var model = require('../apis/dynamodb-2011-12-05.min.json');\n    model.paginators = require('../apis/dynamodb-2011-12-05.paginators.json').pagination;\n    model.waiters = require('../apis/dynamodb-2011-12-05.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\nObject.defineProperty(apiLoader.services['dynamodb'], '2012-08-10', {\n  get: function get() {\n    var model = require('../apis/dynamodb-2012-08-10.min.json');\n    model.paginators = require('../apis/dynamodb-2012-08-10.paginators.json').pagination;\n    model.waiters = require('../apis/dynamodb-2012-08-10.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.DynamoDB;\n\n},{\"../apis/dynamodb-2011-12-05.min.json\":36,\"../apis/dynamodb-2011-12-05.paginators.json\":37,\"../apis/dynamodb-2011-12-05.waiters2.json\":38,\"../apis/dynamodb-2012-08-10.min.json\":39,\"../apis/dynamodb-2012-08-10.paginators.json\":40,\"../apis/dynamodb-2012-08-10.waiters2.json\":41,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239,\"../lib/services/dynamodb\":243}],159:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['dynamodbstreams'] = {};\nAWS.DynamoDBStreams = Service.defineService('dynamodbstreams', ['2012-08-10']);\nObject.defineProperty(apiLoader.services['dynamodbstreams'], '2012-08-10', {\n  get: function get() {\n    var model = require('../apis/streams.dynamodb-2012-08-10.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.DynamoDBStreams;\n\n},{\"../apis/streams.dynamodb-2012-08-10.min.json\":133,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],160:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['ec2'] = {};\nAWS.EC2 = Service.defineService('ec2', ['2013-06-15*', '2013-10-15*', '2014-02-01*', '2014-05-01*', '2014-06-15*', '2014-09-01*', '2014-10-01*', '2015-03-01*', '2015-04-15*', '2015-10-01*', '2016-04-01*', '2016-09-15*', '2016-11-15']);\nrequire('../lib/services/ec2');\nObject.defineProperty(apiLoader.services['ec2'], '2016-11-15', {\n  get: function get() {\n    var model = require('../apis/ec2-2016-11-15.min.json');\n    model.paginators = require('../apis/ec2-2016-11-15.paginators.json').pagination;\n    model.waiters = require('../apis/ec2-2016-11-15.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.EC2;\n\n},{\"../apis/ec2-2016-11-15.min.json\":42,\"../apis/ec2-2016-11-15.paginators.json\":43,\"../apis/ec2-2016-11-15.waiters2.json\":44,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239,\"../lib/services/ec2\":244}],161:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['ecr'] = {};\nAWS.ECR = Service.defineService('ecr', ['2015-09-21']);\nObject.defineProperty(apiLoader.services['ecr'], '2015-09-21', {\n  get: function get() {\n    var model = require('../apis/ecr-2015-09-21.min.json');\n    model.paginators = require('../apis/ecr-2015-09-21.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.ECR;\n\n},{\"../apis/ecr-2015-09-21.min.json\":45,\"../apis/ecr-2015-09-21.paginators.json\":46,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],162:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['ecs'] = {};\nAWS.ECS = Service.defineService('ecs', ['2014-11-13']);\nObject.defineProperty(apiLoader.services['ecs'], '2014-11-13', {\n  get: function get() {\n    var model = require('../apis/ecs-2014-11-13.min.json');\n    model.paginators = require('../apis/ecs-2014-11-13.paginators.json').pagination;\n    model.waiters = require('../apis/ecs-2014-11-13.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.ECS;\n\n},{\"../apis/ecs-2014-11-13.min.json\":47,\"../apis/ecs-2014-11-13.paginators.json\":48,\"../apis/ecs-2014-11-13.waiters2.json\":49,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],163:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['elasticache'] = {};\nAWS.ElastiCache = Service.defineService('elasticache', ['2012-11-15*', '2014-03-24*', '2014-07-15*', '2014-09-30*', '2015-02-02']);\nObject.defineProperty(apiLoader.services['elasticache'], '2015-02-02', {\n  get: function get() {\n    var model = require('../apis/elasticache-2015-02-02.min.json');\n    model.paginators = require('../apis/elasticache-2015-02-02.paginators.json').pagination;\n    model.waiters = require('../apis/elasticache-2015-02-02.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.ElastiCache;\n\n},{\"../apis/elasticache-2015-02-02.min.json\":50,\"../apis/elasticache-2015-02-02.paginators.json\":51,\"../apis/elasticache-2015-02-02.waiters2.json\":52,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],164:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['elasticbeanstalk'] = {};\nAWS.ElasticBeanstalk = Service.defineService('elasticbeanstalk', ['2010-12-01']);\nObject.defineProperty(apiLoader.services['elasticbeanstalk'], '2010-12-01', {\n  get: function get() {\n    var model = require('../apis/elasticbeanstalk-2010-12-01.min.json');\n    model.paginators = require('../apis/elasticbeanstalk-2010-12-01.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.ElasticBeanstalk;\n\n},{\"../apis/elasticbeanstalk-2010-12-01.min.json\":53,\"../apis/elasticbeanstalk-2010-12-01.paginators.json\":54,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],165:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['elastictranscoder'] = {};\nAWS.ElasticTranscoder = Service.defineService('elastictranscoder', ['2012-09-25']);\nObject.defineProperty(apiLoader.services['elastictranscoder'], '2012-09-25', {\n  get: function get() {\n    var model = require('../apis/elastictranscoder-2012-09-25.min.json');\n    model.paginators = require('../apis/elastictranscoder-2012-09-25.paginators.json').pagination;\n    model.waiters = require('../apis/elastictranscoder-2012-09-25.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.ElasticTranscoder;\n\n},{\"../apis/elastictranscoder-2012-09-25.min.json\":63,\"../apis/elastictranscoder-2012-09-25.paginators.json\":64,\"../apis/elastictranscoder-2012-09-25.waiters2.json\":65,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],166:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['elb'] = {};\nAWS.ELB = Service.defineService('elb', ['2012-06-01']);\nObject.defineProperty(apiLoader.services['elb'], '2012-06-01', {\n  get: function get() {\n    var model = require('../apis/elasticloadbalancing-2012-06-01.min.json');\n    model.paginators = require('../apis/elasticloadbalancing-2012-06-01.paginators.json').pagination;\n    model.waiters = require('../apis/elasticloadbalancing-2012-06-01.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.ELB;\n\n},{\"../apis/elasticloadbalancing-2012-06-01.min.json\":55,\"../apis/elasticloadbalancing-2012-06-01.paginators.json\":56,\"../apis/elasticloadbalancing-2012-06-01.waiters2.json\":57,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],167:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['elbv2'] = {};\nAWS.ELBv2 = Service.defineService('elbv2', ['2015-12-01']);\nObject.defineProperty(apiLoader.services['elbv2'], '2015-12-01', {\n  get: function get() {\n    var model = require('../apis/elasticloadbalancingv2-2015-12-01.min.json');\n    model.paginators = require('../apis/elasticloadbalancingv2-2015-12-01.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.ELBv2;\n\n},{\"../apis/elasticloadbalancingv2-2015-12-01.min.json\":58,\"../apis/elasticloadbalancingv2-2015-12-01.paginators.json\":59,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],168:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['emr'] = {};\nAWS.EMR = Service.defineService('emr', ['2009-03-31']);\nObject.defineProperty(apiLoader.services['emr'], '2009-03-31', {\n  get: function get() {\n    var model = require('../apis/elasticmapreduce-2009-03-31.min.json');\n    model.paginators = require('../apis/elasticmapreduce-2009-03-31.paginators.json').pagination;\n    model.waiters = require('../apis/elasticmapreduce-2009-03-31.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.EMR;\n\n},{\"../apis/elasticmapreduce-2009-03-31.min.json\":60,\"../apis/elasticmapreduce-2009-03-31.paginators.json\":61,\"../apis/elasticmapreduce-2009-03-31.waiters2.json\":62,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],169:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['firehose'] = {};\nAWS.Firehose = Service.defineService('firehose', ['2015-08-04']);\nObject.defineProperty(apiLoader.services['firehose'], '2015-08-04', {\n  get: function get() {\n    var model = require('../apis/firehose-2015-08-04.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.Firehose;\n\n},{\"../apis/firehose-2015-08-04.min.json\":70,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],170:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['gamelift'] = {};\nAWS.GameLift = Service.defineService('gamelift', ['2015-10-01']);\nObject.defineProperty(apiLoader.services['gamelift'], '2015-10-01', {\n  get: function get() {\n    var model = require('../apis/gamelift-2015-10-01.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.GameLift;\n\n},{\"../apis/gamelift-2015-10-01.min.json\":71,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],171:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['inspector'] = {};\nAWS.Inspector = Service.defineService('inspector', ['2015-08-18*', '2016-02-16']);\nObject.defineProperty(apiLoader.services['inspector'], '2016-02-16', {\n  get: function get() {\n    var model = require('../apis/inspector-2016-02-16.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.Inspector;\n\n},{\"../apis/inspector-2016-02-16.min.json\":72,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],172:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['iot'] = {};\nAWS.Iot = Service.defineService('iot', ['2015-05-28']);\nObject.defineProperty(apiLoader.services['iot'], '2015-05-28', {\n  get: function get() {\n    var model = require('../apis/iot-2015-05-28.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.Iot;\n\n},{\"../apis/iot-2015-05-28.min.json\":73,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],173:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['iotdata'] = {};\nAWS.IotData = Service.defineService('iotdata', ['2015-05-28']);\nrequire('../lib/services/iotdata');\nObject.defineProperty(apiLoader.services['iotdata'], '2015-05-28', {\n  get: function get() {\n    var model = require('../apis/iot-data-2015-05-28.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.IotData;\n\n},{\"../apis/iot-data-2015-05-28.min.json\":74,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239,\"../lib/services/iotdata\":245}],174:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['kinesis'] = {};\nAWS.Kinesis = Service.defineService('kinesis', ['2013-12-02']);\nObject.defineProperty(apiLoader.services['kinesis'], '2013-12-02', {\n  get: function get() {\n    var model = require('../apis/kinesis-2013-12-02.min.json');\n    model.paginators = require('../apis/kinesis-2013-12-02.paginators.json').pagination;\n    model.waiters = require('../apis/kinesis-2013-12-02.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.Kinesis;\n\n},{\"../apis/kinesis-2013-12-02.min.json\":75,\"../apis/kinesis-2013-12-02.paginators.json\":76,\"../apis/kinesis-2013-12-02.waiters2.json\":77,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],175:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['kms'] = {};\nAWS.KMS = Service.defineService('kms', ['2014-11-01']);\nObject.defineProperty(apiLoader.services['kms'], '2014-11-01', {\n  get: function get() {\n    var model = require('../apis/kms-2014-11-01.min.json');\n    model.paginators = require('../apis/kms-2014-11-01.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.KMS;\n\n},{\"../apis/kms-2014-11-01.min.json\":78,\"../apis/kms-2014-11-01.paginators.json\":79,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],176:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['lambda'] = {};\nAWS.Lambda = Service.defineService('lambda', ['2014-11-11', '2015-03-31']);\nObject.defineProperty(apiLoader.services['lambda'], '2014-11-11', {\n  get: function get() {\n    var model = require('../apis/lambda-2014-11-11.min.json');\n    model.paginators = require('../apis/lambda-2014-11-11.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\nObject.defineProperty(apiLoader.services['lambda'], '2015-03-31', {\n  get: function get() {\n    var model = require('../apis/lambda-2015-03-31.min.json');\n    model.paginators = require('../apis/lambda-2015-03-31.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.Lambda;\n\n},{\"../apis/lambda-2014-11-11.min.json\":80,\"../apis/lambda-2014-11-11.paginators.json\":81,\"../apis/lambda-2015-03-31.min.json\":82,\"../apis/lambda-2015-03-31.paginators.json\":83,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],177:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['lexruntime'] = {};\nAWS.LexRuntime = Service.defineService('lexruntime', ['2016-11-28']);\nObject.defineProperty(apiLoader.services['lexruntime'], '2016-11-28', {\n  get: function get() {\n    var model = require('../apis/runtime.lex-2016-11-28.min.json');\n    model.paginators = require('../apis/runtime.lex-2016-11-28.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.LexRuntime;\n\n},{\"../apis/runtime.lex-2016-11-28.min.json\":119,\"../apis/runtime.lex-2016-11-28.paginators.json\":120,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],178:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['machinelearning'] = {};\nAWS.MachineLearning = Service.defineService('machinelearning', ['2014-12-12']);\nrequire('../lib/services/machinelearning');\nObject.defineProperty(apiLoader.services['machinelearning'], '2014-12-12', {\n  get: function get() {\n    var model = require('../apis/machinelearning-2014-12-12.min.json');\n    model.paginators = require('../apis/machinelearning-2014-12-12.paginators.json').pagination;\n    model.waiters = require('../apis/machinelearning-2014-12-12.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.MachineLearning;\n\n},{\"../apis/machinelearning-2014-12-12.min.json\":86,\"../apis/machinelearning-2014-12-12.paginators.json\":87,\"../apis/machinelearning-2014-12-12.waiters2.json\":88,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239,\"../lib/services/machinelearning\":246}],179:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['marketplacecommerceanalytics'] = {};\nAWS.MarketplaceCommerceAnalytics = Service.defineService('marketplacecommerceanalytics', ['2015-07-01']);\nObject.defineProperty(apiLoader.services['marketplacecommerceanalytics'], '2015-07-01', {\n  get: function get() {\n    var model = require('../apis/marketplacecommerceanalytics-2015-07-01.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.MarketplaceCommerceAnalytics;\n\n},{\"../apis/marketplacecommerceanalytics-2015-07-01.min.json\":89,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],180:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['mobileanalytics'] = {};\nAWS.MobileAnalytics = Service.defineService('mobileanalytics', ['2014-06-05']);\nObject.defineProperty(apiLoader.services['mobileanalytics'], '2014-06-05', {\n  get: function get() {\n    var model = require('../apis/mobileanalytics-2014-06-05.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.MobileAnalytics;\n\n},{\"../apis/mobileanalytics-2014-06-05.min.json\":91,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],181:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['opsworks'] = {};\nAWS.OpsWorks = Service.defineService('opsworks', ['2013-02-18']);\nObject.defineProperty(apiLoader.services['opsworks'], '2013-02-18', {\n  get: function get() {\n    var model = require('../apis/opsworks-2013-02-18.min.json');\n    model.paginators = require('../apis/opsworks-2013-02-18.paginators.json').pagination;\n    model.waiters = require('../apis/opsworks-2013-02-18.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.OpsWorks;\n\n},{\"../apis/opsworks-2013-02-18.min.json\":95,\"../apis/opsworks-2013-02-18.paginators.json\":96,\"../apis/opsworks-2013-02-18.waiters2.json\":97,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],182:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['polly'] = {};\nAWS.Polly = Service.defineService('polly', ['2016-06-10']);\nrequire('../lib/services/polly');\nObject.defineProperty(apiLoader.services['polly'], '2016-06-10', {\n  get: function get() {\n    var model = require('../apis/polly-2016-06-10.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.Polly;\n\n},{\"../apis/polly-2016-06-10.min.json\":98,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239,\"../lib/services/polly\":247}],183:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['rds'] = {};\nAWS.RDS = Service.defineService('rds', ['2013-01-10', '2013-02-12', '2013-09-09', '2014-09-01*', '2014-10-31']);\nrequire('../lib/services/rds');\nObject.defineProperty(apiLoader.services['rds'], '2013-01-10', {\n  get: function get() {\n    var model = require('../apis/rds-2013-01-10.min.json');\n    model.paginators = require('../apis/rds-2013-01-10.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2013-02-12', {\n  get: function get() {\n    var model = require('../apis/rds-2013-02-12.min.json');\n    model.paginators = require('../apis/rds-2013-02-12.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2013-09-09', {\n  get: function get() {\n    var model = require('../apis/rds-2013-09-09.min.json');\n    model.paginators = require('../apis/rds-2013-09-09.paginators.json').pagination;\n    model.waiters = require('../apis/rds-2013-09-09.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2014-10-31', {\n  get: function get() {\n    var model = require('../apis/rds-2014-10-31.min.json');\n    model.paginators = require('../apis/rds-2014-10-31.paginators.json').pagination;\n    model.waiters = require('../apis/rds-2014-10-31.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.RDS;\n\n},{\"../apis/rds-2013-01-10.min.json\":99,\"../apis/rds-2013-01-10.paginators.json\":100,\"../apis/rds-2013-02-12.min.json\":101,\"../apis/rds-2013-02-12.paginators.json\":102,\"../apis/rds-2013-09-09.min.json\":103,\"../apis/rds-2013-09-09.paginators.json\":104,\"../apis/rds-2013-09-09.waiters2.json\":105,\"../apis/rds-2014-10-31.min.json\":106,\"../apis/rds-2014-10-31.paginators.json\":107,\"../apis/rds-2014-10-31.waiters2.json\":108,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239,\"../lib/services/rds\":248}],184:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['redshift'] = {};\nAWS.Redshift = Service.defineService('redshift', ['2012-12-01']);\nObject.defineProperty(apiLoader.services['redshift'], '2012-12-01', {\n  get: function get() {\n    var model = require('../apis/redshift-2012-12-01.min.json');\n    model.paginators = require('../apis/redshift-2012-12-01.paginators.json').pagination;\n    model.waiters = require('../apis/redshift-2012-12-01.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.Redshift;\n\n},{\"../apis/redshift-2012-12-01.min.json\":109,\"../apis/redshift-2012-12-01.paginators.json\":110,\"../apis/redshift-2012-12-01.waiters2.json\":111,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],185:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['rekognition'] = {};\nAWS.Rekognition = Service.defineService('rekognition', ['2016-06-27']);\nObject.defineProperty(apiLoader.services['rekognition'], '2016-06-27', {\n  get: function get() {\n    var model = require('../apis/rekognition-2016-06-27.min.json');\n    model.paginators = require('../apis/rekognition-2016-06-27.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.Rekognition;\n\n},{\"../apis/rekognition-2016-06-27.min.json\":112,\"../apis/rekognition-2016-06-27.paginators.json\":113,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],186:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['route53'] = {};\nAWS.Route53 = Service.defineService('route53', ['2013-04-01']);\nrequire('../lib/services/route53');\nObject.defineProperty(apiLoader.services['route53'], '2013-04-01', {\n  get: function get() {\n    var model = require('../apis/route53-2013-04-01.min.json');\n    model.paginators = require('../apis/route53-2013-04-01.paginators.json').pagination;\n    model.waiters = require('../apis/route53-2013-04-01.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.Route53;\n\n},{\"../apis/route53-2013-04-01.min.json\":114,\"../apis/route53-2013-04-01.paginators.json\":115,\"../apis/route53-2013-04-01.waiters2.json\":116,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239,\"../lib/services/route53\":249}],187:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['route53domains'] = {};\nAWS.Route53Domains = Service.defineService('route53domains', ['2014-05-15']);\nObject.defineProperty(apiLoader.services['route53domains'], '2014-05-15', {\n  get: function get() {\n    var model = require('../apis/route53domains-2014-05-15.min.json');\n    model.paginators = require('../apis/route53domains-2014-05-15.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.Route53Domains;\n\n},{\"../apis/route53domains-2014-05-15.min.json\":117,\"../apis/route53domains-2014-05-15.paginators.json\":118,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],188:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['s3'] = {};\nAWS.S3 = Service.defineService('s3', ['2006-03-01']);\nrequire('../lib/services/s3');\nObject.defineProperty(apiLoader.services['s3'], '2006-03-01', {\n  get: function get() {\n    var model = require('../apis/s3-2006-03-01.min.json');\n    model.paginators = require('../apis/s3-2006-03-01.paginators.json').pagination;\n    model.waiters = require('../apis/s3-2006-03-01.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.S3;\n\n},{\"../apis/s3-2006-03-01.min.json\":121,\"../apis/s3-2006-03-01.paginators.json\":122,\"../apis/s3-2006-03-01.waiters2.json\":123,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239,\"../lib/services/s3\":250}],189:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['servicecatalog'] = {};\nAWS.ServiceCatalog = Service.defineService('servicecatalog', ['2015-12-10']);\nObject.defineProperty(apiLoader.services['servicecatalog'], '2015-12-10', {\n  get: function get() {\n    var model = require('../apis/servicecatalog-2015-12-10.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.ServiceCatalog;\n\n},{\"../apis/servicecatalog-2015-12-10.min.json\":124,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],190:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['ses'] = {};\nAWS.SES = Service.defineService('ses', ['2010-12-01']);\nObject.defineProperty(apiLoader.services['ses'], '2010-12-01', {\n  get: function get() {\n    var model = require('../apis/email-2010-12-01.min.json');\n    model.paginators = require('../apis/email-2010-12-01.paginators.json').pagination;\n    model.waiters = require('../apis/email-2010-12-01.waiters2.json').waiters;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.SES;\n\n},{\"../apis/email-2010-12-01.min.json\":66,\"../apis/email-2010-12-01.paginators.json\":67,\"../apis/email-2010-12-01.waiters2.json\":68,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],191:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['sns'] = {};\nAWS.SNS = Service.defineService('sns', ['2010-03-31']);\nObject.defineProperty(apiLoader.services['sns'], '2010-03-31', {\n  get: function get() {\n    var model = require('../apis/sns-2010-03-31.min.json');\n    model.paginators = require('../apis/sns-2010-03-31.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.SNS;\n\n},{\"../apis/sns-2010-03-31.min.json\":125,\"../apis/sns-2010-03-31.paginators.json\":126,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],192:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['sqs'] = {};\nAWS.SQS = Service.defineService('sqs', ['2012-11-05']);\nrequire('../lib/services/sqs');\nObject.defineProperty(apiLoader.services['sqs'], '2012-11-05', {\n  get: function get() {\n    var model = require('../apis/sqs-2012-11-05.min.json');\n    model.paginators = require('../apis/sqs-2012-11-05.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.SQS;\n\n},{\"../apis/sqs-2012-11-05.min.json\":127,\"../apis/sqs-2012-11-05.paginators.json\":128,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239,\"../lib/services/sqs\":251}],193:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['ssm'] = {};\nAWS.SSM = Service.defineService('ssm', ['2014-11-06']);\nObject.defineProperty(apiLoader.services['ssm'], '2014-11-06', {\n  get: function get() {\n    var model = require('../apis/ssm-2014-11-06.min.json');\n    model.paginators = require('../apis/ssm-2014-11-06.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.SSM;\n\n},{\"../apis/ssm-2014-11-06.min.json\":129,\"../apis/ssm-2014-11-06.paginators.json\":130,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],194:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['storagegateway'] = {};\nAWS.StorageGateway = Service.defineService('storagegateway', ['2013-06-30']);\nObject.defineProperty(apiLoader.services['storagegateway'], '2013-06-30', {\n  get: function get() {\n    var model = require('../apis/storagegateway-2013-06-30.min.json');\n    model.paginators = require('../apis/storagegateway-2013-06-30.paginators.json').pagination;\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.StorageGateway;\n\n},{\"../apis/storagegateway-2013-06-30.min.json\":131,\"../apis/storagegateway-2013-06-30.paginators.json\":132,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],195:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['sts'] = {};\nAWS.STS = Service.defineService('sts', ['2011-06-15']);\nrequire('../lib/services/sts');\nObject.defineProperty(apiLoader.services['sts'], '2011-06-15', {\n  get: function get() {\n    var model = require('../apis/sts-2011-06-15.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.STS;\n\n},{\"../apis/sts-2011-06-15.min.json\":134,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239,\"../lib/services/sts\":252}],196:[function(require,module,exports){\nrequire('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = require('../lib/service');\nvar apiLoader = require('../lib/api_loader');\n\napiLoader.services['waf'] = {};\nAWS.WAF = Service.defineService('waf', ['2015-08-24']);\nObject.defineProperty(apiLoader.services['waf'], '2015-08-24', {\n  get: function get() {\n    var model = require('../apis/waf-2015-08-24.min.json');\n    return model;\n  },\n  enumerable: true,\n  configurable: true\n});\n\nmodule.exports = AWS.WAF;\n\n},{\"../apis/waf-2015-08-24.min.json\":135,\"../lib/api_loader\":197,\"../lib/core\":201,\"../lib/node_loader\":198,\"../lib/service\":239}],197:[function(require,module,exports){\nvar AWS = require('./core');\n\nAWS.apiLoader = function(svc, version) {\n  if (!AWS.apiLoader.services.hasOwnProperty(svc)) {\n    throw new Error('InvalidService: Failed to load api for ' + svc);\n  }\n  return AWS.apiLoader.services[svc][version];\n};\n\nAWS.apiLoader.services = {};\n\nmodule.exports = AWS.apiLoader;\n},{\"./core\":201}],198:[function(require,module,exports){\n(function (process){\nvar util = require('./util');\n\nutil.crypto.lib = require('crypto-browserify');\nutil.Buffer = require('buffer/').Buffer;\nutil.url = require('url/');\nutil.querystring = require('querystring/');\n\nvar AWS = require('./core');\n\nrequire('./api_loader');\n\nAWS.XML.Parser = require('./xml/browser_parser');\n\nrequire('./http/xhr');\n\nif (typeof process === 'undefined') {\n  process = {\n    browser: true\n  };\n}\n}).call(this,require('_process'))\n},{\"./api_loader\":197,\"./core\":201,\"./http/xhr\":215,\"./util\":261,\"./xml/browser_parser\":262,\"_process\":266,\"buffer/\":274,\"crypto-browserify\":279,\"querystring/\":287,\"url/\":288}],199:[function(require,module,exports){\nvar AWS = require('../core'),\n    url = AWS.util.url,\n    crypto = AWS.util.crypto.lib,\n    base64Encode = AWS.util.base64.encode,\n    inherit = AWS.util.inherit;\n\nvar queryEncode = function (string) {\n    var replacements = {\n        '+': '-',\n        '=': '_',\n        '/': '~'\n    };\n    return string.replace(/[\\+=\\/]/g, function (match) {\n        return replacements[match];\n    });\n};\n\nvar signPolicy = function (policy, privateKey) {\n    var sign = crypto.createSign('RSA-SHA1');\n    sign.write(policy);\n    return queryEncode(sign.sign(privateKey, 'base64'))\n};\n\nvar signWithCannedPolicy = function (url, expires, keyPairId, privateKey) {\n    var policy = JSON.stringify({\n        Statement: [\n            {\n                Resource: url,\n                Condition: { DateLessThan: { 'AWS:EpochTime': expires } }\n            }\n        ]\n    });\n\n    return {\n        Expires: expires,\n        'Key-Pair-Id': keyPairId,\n        Signature: signPolicy(policy.toString(), privateKey)\n    };\n};\n\nvar signWithCustomPolicy = function (policy, keyPairId, privateKey) {\n    policy = policy.replace(/\\s/mg, policy);\n\n    return {\n        Policy: queryEncode(base64Encode(policy)),\n        'Key-Pair-Id': keyPairId,\n        Signature: signPolicy(policy, privateKey)\n    }\n};\n\nvar determineScheme = function (url) {\n    var parts = url.split('://');\n    if (parts.length < 2) {\n        throw new Error('Invalid URL.');\n    }\n\n    return parts[0].replace('*', '');\n};\n\nvar getRtmpUrl = function (rtmpUrl) {\n    var parsed = url.parse(rtmpUrl);\n    return parsed.path.replace(/^\\//, '') + (parsed.hash || '');\n};\n\nvar getResource = function (url) {\n    switch (determineScheme(url)) {\n        case 'http':\n        case 'https':\n            return url;\n        case 'rtmp':\n            return getRtmpUrl(url);\n        default:\n            throw new Error('Invalid URI scheme. Scheme must be one of'\n                + ' http, https, or rtmp');\n    }\n};\n\nvar handleError = function (err, callback) {\n    if (!callback || typeof callback !== 'function') {\n        throw err;\n    }\n\n    callback(err);\n};\n\nvar handleSuccess = function (result, callback) {\n    if (!callback || typeof callback !== 'function') {\n        return result;\n    }\n\n    callback(null, result);\n};\n\nAWS.CloudFront.Signer = inherit({\n\n    constructor: function Signer(keyPairId, privateKey) {\n        if (keyPairId === void 0 || privateKey === void 0) {\n            throw new Error('A key pair ID and private key are required');\n        }\n\n        this.keyPairId = keyPairId;\n        this.privateKey = privateKey;\n    },\n\n\n    getSignedCookie: function (options, cb) {\n        var signatureHash = 'policy' in options\n            ? signWithCustomPolicy(options.policy, this.keyPairId, this.privateKey)\n            : signWithCannedPolicy(options.url, options.expires, this.keyPairId, this.privateKey);\n\n        var cookieHash = {};\n        for (var key in signatureHash) {\n            if (Object.prototype.hasOwnProperty.call(signatureHash, key)) {\n                cookieHash['CloudFront-' + key] = signatureHash[key];\n            }\n        }\n\n        return handleSuccess(cookieHash, cb);\n    },\n\n\n    getSignedUrl: function (options, cb) {\n        try {\n            var resource = getResource(options.url);\n        } catch (err) {\n            return handleError(err, cb);\n        }\n\n        var parsedUrl = url.parse(options.url, true),\n            signatureHash = Object.prototype.hasOwnProperty.call(options, 'policy')\n                ? signWithCustomPolicy(options.policy, this.keyPairId, this.privateKey)\n                : signWithCannedPolicy(resource, options.expires, this.keyPairId, this.privateKey);\n\n        parsedUrl.search = null;\n        for (var key in signatureHash) {\n            if (Object.prototype.hasOwnProperty.call(signatureHash, key)) {\n                parsedUrl.query[key] = signatureHash[key];\n            }\n        }\n\n        try {\n            var signedUrl = determineScheme(options.url) === 'rtmp'\n                    ? getRtmpUrl(url.format(parsedUrl))\n                    : url.format(parsedUrl);\n        } catch (err) {\n            return handleError(err, cb);\n        }\n\n        return handleSuccess(signedUrl, cb);\n    }\n});\n\nmodule.exports = AWS.CloudFront.Signer;\n\n},{\"../core\":201}],200:[function(require,module,exports){\nvar AWS = require('./core');\nrequire('./credentials');\nrequire('./credentials/credential_provider_chain');\nvar PromisesDependency;\n\n\nAWS.Config = AWS.util.inherit({\n\n\n\n  constructor: function Config(options) {\n    if (options === undefined) options = {};\n    options = this.extractCredentials(options);\n\n    AWS.util.each.call(this, this.keys, function (key, value) {\n      this.set(key, options[key], value);\n    });\n  },\n\n\n\n\n  getCredentials: function getCredentials(callback) {\n    var self = this;\n\n    function finish(err) {\n      callback(err, err ? null : self.credentials);\n    }\n\n    function credError(msg, err) {\n      return new AWS.util.error(err || new Error(), {\n        code: 'CredentialsError', message: msg\n      });\n    }\n\n    function getAsyncCredentials() {\n      self.credentials.get(function(err) {\n        if (err) {\n          var msg = 'Could not load credentials from ' +\n            self.credentials.constructor.name;\n          err = credError(msg, err);\n        }\n        finish(err);\n      });\n    }\n\n    function getStaticCredentials() {\n      var err = null;\n      if (!self.credentials.accessKeyId || !self.credentials.secretAccessKey) {\n        err = credError('Missing credentials');\n      }\n      finish(err);\n    }\n\n    if (self.credentials) {\n      if (typeof self.credentials.get === 'function') {\n        getAsyncCredentials();\n      } else { // static credentials\n        getStaticCredentials();\n      }\n    } else if (self.credentialProvider) {\n      self.credentialProvider.resolve(function(err, creds) {\n        if (err) {\n          err = credError('Could not load credentials from any providers', err);\n        }\n        self.credentials = creds;\n        finish(err);\n      });\n    } else {\n      finish(credError('No credentials to load'));\n    }\n  },\n\n\n\n\n  update: function update(options, allowUnknownKeys) {\n    allowUnknownKeys = allowUnknownKeys || false;\n    options = this.extractCredentials(options);\n    AWS.util.each.call(this, options, function (key, value) {\n      if (allowUnknownKeys || Object.prototype.hasOwnProperty.call(this.keys, key) ||\n          AWS.Service.hasService(key)) {\n        this.set(key, value);\n      }\n    });\n  },\n\n\n  loadFromPath: function loadFromPath(path) {\n    this.clear();\n\n    var options = JSON.parse(AWS.util.readFileSync(path));\n    var fileSystemCreds = new AWS.FileSystemCredentials(path);\n    var chain = new AWS.CredentialProviderChain();\n    chain.providers.unshift(fileSystemCreds);\n    chain.resolve(function (err, creds) {\n      if (err) throw err;\n      else options.credentials = creds;\n    });\n\n    this.constructor(options);\n\n    return this;\n  },\n\n\n  clear: function clear() {\n\n    AWS.util.each.call(this, this.keys, function (key) {\n      delete this[key];\n    });\n\n    this.set('credentials', undefined);\n    this.set('credentialProvider', undefined);\n  },\n\n\n  set: function set(property, value, defaultValue) {\n    if (value === undefined) {\n      if (defaultValue === undefined) {\n        defaultValue = this.keys[property];\n      }\n      if (typeof defaultValue === 'function') {\n        this[property] = defaultValue.call(this);\n      } else {\n        this[property] = defaultValue;\n      }\n    } else if (property === 'httpOptions' && this[property]) {\n      this[property] = AWS.util.merge(this[property], value);\n    } else {\n      this[property] = value;\n    }\n  },\n\n\n  keys: {\n    credentials: null,\n    credentialProvider: null,\n    region: null,\n    logger: null,\n    apiVersions: {},\n    apiVersion: null,\n    endpoint: undefined,\n    httpOptions: {\n      timeout: 120000\n    },\n    maxRetries: undefined,\n    maxRedirects: 10,\n    paramValidation: true,\n    sslEnabled: true,\n    s3ForcePathStyle: false,\n    s3BucketEndpoint: false,\n    s3DisableBodySigning: true,\n    computeChecksums: true,\n    convertResponseTypes: true,\n    correctClockSkew: false,\n    customUserAgent: null,\n    dynamoDbCrc32: true,\n    systemClockOffset: 0,\n    signatureVersion: null,\n    signatureCache: true,\n    retryDelayOptions: {\n      base: 100\n    },\n    useAccelerateEndpoint: false\n  },\n\n\n  extractCredentials: function extractCredentials(options) {\n    if (options.accessKeyId && options.secretAccessKey) {\n      options = AWS.util.copy(options);\n      options.credentials = new AWS.Credentials(options);\n    }\n    return options;\n  },\n\n\n  setPromisesDependency: function setPromisesDependency(dep) {\n    PromisesDependency = dep;\n    if (dep === null && typeof Promise === 'function') {\n      PromisesDependency = Promise;\n    }\n    var constructors = [AWS.Request, AWS.Credentials, AWS.CredentialProviderChain];\n    if (AWS.S3 && AWS.S3.ManagedUpload) constructors.push(AWS.S3.ManagedUpload);\n    AWS.util.addPromises(constructors, PromisesDependency);\n  },\n\n\n  getPromisesDependency: function getPromisesDependency() {\n    return PromisesDependency;\n  }\n});\n\n\nAWS.config = new AWS.Config();\n\n},{\"./core\":201,\"./credentials\":202,\"./credentials/credential_provider_chain\":204}],201:[function(require,module,exports){\n\nvar AWS = { util: require('./util') };\n\n\nvar _hidden = {}; _hidden.toString(); // hack to parse macro\n\nmodule.exports = AWS;\n\nAWS.util.update(AWS, {\n\n\n  VERSION: '2.17.0',\n\n\n  Signers: {},\n\n\n  Protocol: {\n    Json: require('./protocol/json'),\n    Query: require('./protocol/query'),\n    Rest: require('./protocol/rest'),\n    RestJson: require('./protocol/rest_json'),\n    RestXml: require('./protocol/rest_xml')\n  },\n\n\n  XML: {\n    Builder: require('./xml/builder'),\n    Parser: null // conditionally set based on environment\n  },\n\n\n  JSON: {\n    Builder: require('./json/builder'),\n    Parser: require('./json/parser')\n  },\n\n\n  Model: {\n    Api: require('./model/api'),\n    Operation: require('./model/operation'),\n    Shape: require('./model/shape'),\n    Paginator: require('./model/paginator'),\n    ResourceWaiter: require('./model/resource_waiter')\n  },\n\n  util: require('./util'),\n\n\n  apiLoader: function() { throw new Error('No API loader set'); }\n});\n\nrequire('./service');\nrequire('./config');\n\nrequire('./credentials');\nrequire('./credentials/credential_provider_chain');\nrequire('./credentials/temporary_credentials');\nrequire('./credentials/web_identity_credentials');\nrequire('./credentials/cognito_identity_credentials');\nrequire('./credentials/saml_credentials');\n\nrequire('./http');\nrequire('./sequential_executor');\nrequire('./event_listeners');\nrequire('./request');\nrequire('./response');\nrequire('./resource_waiter');\nrequire('./signers/request_signer');\nrequire('./param_validator');\n\n\nAWS.events = new AWS.SequentialExecutor();\n\n},{\"./config\":200,\"./credentials\":202,\"./credentials/cognito_identity_credentials\":203,\"./credentials/credential_provider_chain\":204,\"./credentials/saml_credentials\":205,\"./credentials/temporary_credentials\":206,\"./credentials/web_identity_credentials\":207,\"./event_listeners\":213,\"./http\":214,\"./json/builder\":216,\"./json/parser\":217,\"./model/api\":218,\"./model/operation\":220,\"./model/paginator\":221,\"./model/resource_waiter\":222,\"./model/shape\":223,\"./param_validator\":224,\"./protocol/json\":226,\"./protocol/query\":227,\"./protocol/rest\":228,\"./protocol/rest_json\":229,\"./protocol/rest_xml\":230,\"./request\":234,\"./resource_waiter\":235,\"./response\":236,\"./sequential_executor\":238,\"./service\":239,\"./signers/request_signer\":254,\"./util\":261,\"./xml/builder\":263}],202:[function(require,module,exports){\nvar AWS = require('./core');\n\n\nAWS.Credentials = AWS.util.inherit({\n\n  constructor: function Credentials() {\n    AWS.util.hideProperties(this, ['secretAccessKey']);\n\n    this.expired = false;\n    this.expireTime = null;\n    if (arguments.length === 1 && typeof arguments[0] === 'object') {\n      var creds = arguments[0].credentials || arguments[0];\n      this.accessKeyId = creds.accessKeyId;\n      this.secretAccessKey = creds.secretAccessKey;\n      this.sessionToken = creds.sessionToken;\n    } else {\n      this.accessKeyId = arguments[0];\n      this.secretAccessKey = arguments[1];\n      this.sessionToken = arguments[2];\n    }\n  },\n\n\n  expiryWindow: 15,\n\n\n  needsRefresh: function needsRefresh() {\n    var currentTime = AWS.util.date.getDate().getTime();\n    var adjustedTime = new Date(currentTime + this.expiryWindow * 1000);\n\n    if (this.expireTime && adjustedTime > this.expireTime) {\n      return true;\n    } else {\n      return this.expired || !this.accessKeyId || !this.secretAccessKey;\n    }\n  },\n\n\n  get: function get(callback) {\n    var self = this;\n    if (this.needsRefresh()) {\n      this.refresh(function(err) {\n        if (!err) self.expired = false; // reset expired flag\n        if (callback) callback(err);\n      });\n    } else if (callback) {\n      callback();\n    }\n  },\n\n\n\n\n\n\n  refresh: function refresh(callback) {\n    this.expired = false;\n    callback();\n  }\n});\n\n\nAWS.Credentials.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n  this.prototype.getPromise = AWS.util.promisifyMethod('get', PromiseDependency);\n  this.prototype.refreshPromise = AWS.util.promisifyMethod('refresh', PromiseDependency);\n};\n\n\nAWS.Credentials.deletePromisesFromClass = function deletePromisesFromClass() {\n  delete this.prototype.getPromise;\n  delete this.prototype.refreshPromise;\n};\n\nAWS.util.addPromises(AWS.Credentials);\n\n},{\"./core\":201}],203:[function(require,module,exports){\nvar AWS = require('../core');\nvar CognitoIdentity = require('../../clients/cognitoidentity');\nvar STS = require('../../clients/sts');\n\n\nAWS.CognitoIdentityCredentials = AWS.util.inherit(AWS.Credentials, {\n\n  localStorageKey: {\n    id: 'aws.cognito.identity-id.',\n    providers: 'aws.cognito.identity-providers.'\n  },\n\n\n  constructor: function CognitoIdentityCredentials(params, clientConfig) {\n    AWS.Credentials.call(this);\n    this.expired = true;\n    this.params = params;\n    this.data = null;\n    this._identityId = null;\n    this._clientConfig = AWS.util.copy(clientConfig || {});\n    this.loadCachedId();\n    var self = this;\n    Object.defineProperty(this, 'identityId', {\n      get: function() {\n        self.loadCachedId();\n        return self._identityId || self.params.IdentityId;\n      },\n      set: function(identityId) {\n        self._identityId = identityId;\n      }\n    });\n  },\n\n\n  refresh: function refresh(callback) {\n    var self = this;\n    self.createClients();\n    self.data = null;\n    self._identityId = null;\n    self.getId(function(err) {\n      if (!err) {\n        if (!self.params.RoleArn) {\n          self.getCredentialsForIdentity(callback);\n        } else {\n          self.getCredentialsFromSTS(callback);\n        }\n      } else {\n        self.clearIdOnNotAuthorized(err);\n        callback(err);\n      }\n    });\n  },\n\n\n  clearCachedId: function clearCache() {\n    this._identityId = null;\n    delete this.params.IdentityId;\n\n    var poolId = this.params.IdentityPoolId;\n    var loginId = this.params.LoginId || '';\n    delete this.storage[this.localStorageKey.id + poolId + loginId];\n    delete this.storage[this.localStorageKey.providers + poolId + loginId];\n  },\n\n\n  clearIdOnNotAuthorized: function clearIdOnNotAuthorized(err) {\n    var self = this;\n    if (err.code == 'NotAuthorizedException') {\n      self.clearCachedId();\n    }\n  },\n\n\n  getId: function getId(callback) {\n    var self = this;\n    if (typeof self.params.IdentityId === 'string') {\n      return callback(null, self.params.IdentityId);\n    }\n\n    self.cognito.getId(function(err, data) {\n      if (!err && data.IdentityId) {\n        self.params.IdentityId = data.IdentityId;\n        callback(null, data.IdentityId);\n      } else {\n        callback(err);\n      }\n    });\n  },\n\n\n\n  loadCredentials: function loadCredentials(data, credentials) {\n    if (!data || !credentials) return;\n    credentials.expired = false;\n    credentials.accessKeyId = data.Credentials.AccessKeyId;\n    credentials.secretAccessKey = data.Credentials.SecretKey;\n    credentials.sessionToken = data.Credentials.SessionToken;\n    credentials.expireTime = data.Credentials.Expiration;\n  },\n\n\n  getCredentialsForIdentity: function getCredentialsForIdentity(callback) {\n    var self = this;\n    self.cognito.getCredentialsForIdentity(function(err, data) {\n      if (!err) {\n        self.cacheId(data);\n        self.data = data;\n        self.loadCredentials(self.data, self);\n      } else {\n        self.clearIdOnNotAuthorized(err);\n      }\n      callback(err);\n    });\n  },\n\n\n  getCredentialsFromSTS: function getCredentialsFromSTS(callback) {\n    var self = this;\n    self.cognito.getOpenIdToken(function(err, data) {\n      if (!err) {\n        self.cacheId(data);\n        self.params.WebIdentityToken = data.Token;\n        self.webIdentityCredentials.refresh(function(webErr) {\n          if (!webErr) {\n            self.data = self.webIdentityCredentials.data;\n            self.sts.credentialsFrom(self.data, self);\n          }\n          callback(webErr);\n        });\n      } else {\n        self.clearIdOnNotAuthorized(err);\n        callback(err);\n      }\n    });\n  },\n\n\n  loadCachedId: function loadCachedId() {\n    var self = this;\n\n    if (AWS.util.isBrowser() && !self.params.IdentityId) {\n      var id = self.getStorage('id');\n      if (id && self.params.Logins) {\n        var actualProviders = Object.keys(self.params.Logins);\n        var cachedProviders =\n          (self.getStorage('providers') || '').split(',');\n\n        var intersect = cachedProviders.filter(function(n) {\n          return actualProviders.indexOf(n) !== -1;\n        });\n        if (intersect.length !== 0) {\n          self.params.IdentityId = id;\n        }\n      } else if (id) {\n        self.params.IdentityId = id;\n      }\n    }\n  },\n\n\n  createClients: function() {\n    var clientConfig = this._clientConfig;\n    this.webIdentityCredentials = this.webIdentityCredentials ||\n      new AWS.WebIdentityCredentials(this.params, clientConfig);\n    if (!this.cognito) {\n      var cognitoConfig = AWS.util.merge({}, clientConfig);\n      cognitoConfig.params = this.params;\n      this.cognito = new CognitoIdentity(cognitoConfig);\n    }\n    this.sts = this.sts || new STS(clientConfig);\n  },\n\n\n  cacheId: function cacheId(data) {\n    this._identityId = data.IdentityId;\n    this.params.IdentityId = this._identityId;\n\n    if (AWS.util.isBrowser()) {\n      this.setStorage('id', data.IdentityId);\n\n      if (this.params.Logins) {\n        this.setStorage('providers', Object.keys(this.params.Logins).join(','));\n      }\n    }\n  },\n\n\n  getStorage: function getStorage(key) {\n    return this.storage[this.localStorageKey[key] + this.params.IdentityPoolId + (this.params.LoginId || '')];\n  },\n\n\n  setStorage: function setStorage(key, val) {\n    try {\n      this.storage[this.localStorageKey[key] + this.params.IdentityPoolId + (this.params.LoginId || '')] = val;\n    } catch (_) {}\n  },\n\n\n  storage: (function() {\n    try {\n      var storage = AWS.util.isBrowser() && window.localStorage !== null && typeof window.localStorage === 'object' ?\n          window.localStorage : {};\n\n      storage['aws.test-storage'] = 'foobar';\n      delete storage['aws.test-storage'];\n\n      return storage;\n    } catch (_) {\n      return {};\n    }\n  })()\n});\n\n},{\"../../clients/cognitoidentity\":151,\"../../clients/sts\":195,\"../core\":201}],204:[function(require,module,exports){\nvar AWS = require('../core');\n\n\nAWS.CredentialProviderChain = AWS.util.inherit(AWS.Credentials, {\n\n\n  constructor: function CredentialProviderChain(providers) {\n    if (providers) {\n      this.providers = providers;\n    } else {\n      this.providers = AWS.CredentialProviderChain.defaultProviders.slice(0);\n    }\n  },\n\n\n\n\n  resolve: function resolve(callback) {\n    if (this.providers.length === 0) {\n      callback(new Error('No providers'));\n      return this;\n    }\n\n    var index = 0;\n    var providers = this.providers.slice(0);\n\n    function resolveNext(err, creds) {\n      if ((!err && creds) || index === providers.length) {\n        callback(err, creds);\n        return;\n      }\n\n      var provider = providers[index++];\n      if (typeof provider === 'function') {\n        creds = provider.call();\n      } else {\n        creds = provider;\n      }\n\n      if (creds.get) {\n        creds.get(function(getErr) {\n          resolveNext(getErr, getErr ? null : creds);\n        });\n      } else {\n        resolveNext(null, creds);\n      }\n    }\n\n    resolveNext();\n    return this;\n  }\n});\n\n\nAWS.CredentialProviderChain.defaultProviders = [];\n\n\nAWS.CredentialProviderChain.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n  this.prototype.resolvePromise = AWS.util.promisifyMethod('resolve', PromiseDependency);\n};\n\n\nAWS.CredentialProviderChain.deletePromisesFromClass = function deletePromisesFromClass() {\n  delete this.prototype.resolvePromise;\n};\n\nAWS.util.addPromises(AWS.CredentialProviderChain);\n\n},{\"../core\":201}],205:[function(require,module,exports){\nvar AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n\nAWS.SAMLCredentials = AWS.util.inherit(AWS.Credentials, {\n\n  constructor: function SAMLCredentials(params) {\n    AWS.Credentials.call(this);\n    this.expired = true;\n    this.params = params;\n  },\n\n\n  refresh: function refresh(callback) {\n    var self = this;\n    self.createClients();\n    if (!callback) callback = function(err) { if (err) throw err; };\n\n    self.service.assumeRoleWithSAML(function (err, data) {\n      if (!err) {\n        self.service.credentialsFrom(data, self);\n      }\n      callback(err);\n    });\n  },\n\n\n  createClients: function() {\n    this.service = this.service || new STS({params: this.params});\n  }\n\n});\n\n},{\"../../clients/sts\":195,\"../core\":201}],206:[function(require,module,exports){\nvar AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n\nAWS.TemporaryCredentials = AWS.util.inherit(AWS.Credentials, {\n\n  constructor: function TemporaryCredentials(params, masterCredentials) {\n    AWS.Credentials.call(this);\n    this.loadMasterCredentials(masterCredentials);\n    this.expired = true;\n\n    this.params = params || {};\n    if (this.params.RoleArn) {\n      this.params.RoleSessionName =\n        this.params.RoleSessionName || 'temporary-credentials';\n    }\n  },\n\n\n  refresh: function refresh(callback) {\n    var self = this;\n    self.createClients();\n    if (!callback) callback = function(err) { if (err) throw err; };\n\n    self.service.config.credentials = self.masterCredentials;\n    var operation = self.params.RoleArn ?\n      self.service.assumeRole : self.service.getSessionToken;\n    operation.call(self.service, function (err, data) {\n      if (!err) {\n        self.service.credentialsFrom(data, self);\n      }\n      callback(err);\n    });\n  },\n\n\n  loadMasterCredentials: function loadMasterCredentials(masterCredentials) {\n    this.masterCredentials = masterCredentials || AWS.config.credentials;\n    while (this.masterCredentials.masterCredentials) {\n      this.masterCredentials = this.masterCredentials.masterCredentials;\n    }\n  },\n\n\n  createClients: function() {\n    this.service = this.service || new STS({params: this.params});\n  }\n\n});\n\n},{\"../../clients/sts\":195,\"../core\":201}],207:[function(require,module,exports){\nvar AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n\nAWS.WebIdentityCredentials = AWS.util.inherit(AWS.Credentials, {\n\n  constructor: function WebIdentityCredentials(params, clientConfig) {\n    AWS.Credentials.call(this);\n    this.expired = true;\n    this.params = params;\n    this.params.RoleSessionName = this.params.RoleSessionName || 'web-identity';\n    this.data = null;\n    this._clientConfig = AWS.util.copy(clientConfig || {});\n  },\n\n\n  refresh: function refresh(callback) {\n    var self = this;\n    self.createClients();\n    if (!callback) callback = function(err) { if (err) throw err; };\n\n    self.service.assumeRoleWithWebIdentity(function (err, data) {\n      self.data = null;\n      if (!err) {\n        self.data = data;\n        self.service.credentialsFrom(data, self);\n      }\n      callback(err);\n    });\n  },\n\n\n  createClients: function() {\n    if (!this.service) {\n      var stsConfig = AWS.util.merge({}, this._clientConfig);\n      stsConfig.params = this.params;\n      this.service = new STS(stsConfig);\n    }\n  }\n\n});\n\n},{\"../../clients/sts\":195,\"../core\":201}],208:[function(require,module,exports){\nvar util = require('../core').util;\nvar typeOf = require('./types').typeOf;\nvar DynamoDBSet = require('./set');\n\nfunction convertInput(data, options) {\n  options = options || {};\n  var type = typeOf(data);\n  if (type === 'Object') {\n    var map = {M: {}};\n    for (var key in data) {\n      map['M'][key] = convertInput(data[key], options);\n    }\n    return map;\n  } else if (type === 'Array') {\n    var list = {L: []};\n    for (var i = 0; i < data.length; i++) {\n      list['L'].push(convertInput(data[i], options));\n    }\n    return list;\n  } else if (type === 'Set') {\n    return formatSet(data, options);\n  } else if (type === 'String') {\n    if (data.length === 0 && options.convertEmptyValues) {\n      return convertInput(null);\n    }\n    return { 'S': data };\n  } else if (type === 'Number') {\n    return { 'N': data.toString() };\n  } else if (type === 'Binary') {\n    if (data.length === 0 && options.convertEmptyValues) {\n      return convertInput(null);\n    }\n    return { 'B': data };\n  } else if (type === 'Boolean') {\n    return {'BOOL': data};\n  } else if (type === 'null') {\n    return {'NULL': true};\n  }\n}\n\nfunction formatSet(data, options) {\n  options = options || {};\n  var values = data.values;\n  if (options.convertEmptyValues) {\n    values = filterEmptySetValues(data);\n    if (values.length === 0) {\n      return convertInput(null);\n    }\n  }\n\n  var map = {};\n  switch (data.type) {\n    case 'String': map['SS'] = values; break;\n    case 'Binary': map['BS'] = values; break;\n    case 'Number': map['NS'] = values.map(function (value) {\n      return value.toString();\n    });\n  }\n  return map;\n}\n\nfunction filterEmptySetValues(set) {\n    var nonEmptyValues = [];\n    var potentiallyEmptyTypes = {\n        String: true,\n        Binary: true,\n        Number: false\n    };\n    if (potentiallyEmptyTypes[set.type]) {\n        for (var i = 0; i < set.values.length; i++) {\n            if (set.values[i].length === 0) {\n                continue;\n            }\n            nonEmptyValues.push(set.values[i]);\n        }\n\n        return nonEmptyValues;\n    }\n\n    return set.values;\n}\n\nfunction convertOutput(data) {\n  var list, map, i;\n  for (var type in data) {\n    var values = data[type];\n    if (type === 'M') {\n      map = {};\n      for (var key in values) {\n        map[key] = convertOutput(values[key]);\n      }\n      return map;\n    } else if (type === 'L') {\n      list = [];\n      for (i = 0; i < values.length; i++) {\n        list.push(convertOutput(values[i]));\n      }\n      return list;\n    } else if (type === 'SS') {\n      list = [];\n      for (i = 0; i < values.length; i++) {\n        list.push(values[i] + '');\n      }\n      return new DynamoDBSet(list);\n    } else if (type === 'NS') {\n      list = [];\n      for (i = 0; i < values.length; i++) {\n        list.push(Number(values[i]));\n      }\n      return new DynamoDBSet(list);\n    } else if (type === 'BS') {\n      list = [];\n      for (i = 0; i < values.length; i++) {\n        list.push(new util.Buffer(values[i]));\n      }\n      return new DynamoDBSet(list);\n    } else if (type === 'S') {\n      return values + '';\n    } else if (type === 'N') {\n      return Number(values);\n    } else if (type === 'B') {\n      return new util.Buffer(values);\n    } else if (type === 'BOOL') {\n      return (values === 'true' || values === 'TRUE' || values === true);\n    } else if (type === 'NULL') {\n      return null;\n    }\n  }\n}\n\nmodule.exports = {\n  input: convertInput,\n  output: convertOutput\n};\n\n},{\"../core\":201,\"./set\":210,\"./types\":212}],209:[function(require,module,exports){\nvar AWS = require('../core');\nvar Translator = require('./translator');\nvar DynamoDBSet = require('./set');\n\n\nAWS.DynamoDB.DocumentClient = AWS.util.inherit({\n\n\n  operations: {\n    batchGetItem: 'batchGet',\n    batchWriteItem: 'batchWrite',\n    putItem: 'put',\n    getItem: 'get',\n    deleteItem: 'delete',\n    updateItem: 'update',\n    scan: 'scan',\n    query: 'query'\n  },\n\n\n  constructor: function DocumentClient(options) {\n    var self = this;\n    self.options = options || {};\n    self.configure(self.options);\n  },\n\n\n  configure: function configure(options) {\n    var self = this;\n    self.service = options.service;\n    self.bindServiceObject(options);\n    self.attrValue = options.attrValue =\n      self.service.api.operations.putItem.input.members.Item.value.shape;\n  },\n\n\n  bindServiceObject: function bindServiceObject(options) {\n    var self = this;\n    options = options || {};\n\n    if (!self.service) {\n      self.service = new AWS.DynamoDB(options);\n    } else {\n      var config = AWS.util.copy(self.service.config);\n      self.service = new self.service.constructor.__super__(config);\n      self.service.config.params =\n        AWS.util.merge(self.service.config.params || {}, options.params);\n    }\n  },\n\n\n  batchGet: function(params, callback) {\n    var self = this;\n    var request = self.service.batchGetItem(params);\n    self.setupRequest(request);\n    self.setupResponse(request);\n    if (typeof callback === 'function') {\n      request.send(callback);\n    }\n    return request;\n  },\n\n\n  batchWrite: function(params, callback) {\n    var self = this;\n    var request = self.service.batchWriteItem(params);\n    self.setupRequest(request);\n    self.setupResponse(request);\n    if (typeof callback === 'function') {\n      request.send(callback);\n    }\n    return request;\n  },\n\n\n  delete: function(params, callback) {\n    var self = this;\n    var request = self.service.deleteItem(params);\n    self.setupRequest(request);\n    self.setupResponse(request);\n    if (typeof callback === 'function') {\n      request.send(callback);\n    }\n    return request;\n  },\n\n\n  get: function(params, callback) {\n    var self = this;\n    var request = self.service.getItem(params);\n    self.setupRequest(request);\n    self.setupResponse(request);\n    if (typeof callback === 'function') {\n      request.send(callback);\n    }\n    return request;\n  },\n\n\n  put: function put(params, callback) {\n    var self = this;\n    var request = self.service.putItem(params);\n    self.setupRequest(request);\n    self.setupResponse(request);\n    if (typeof callback === 'function') {\n      request.send(callback);\n    }\n    return request;\n  },\n\n\n  update: function(params, callback) {\n    var self = this;\n    var request = self.service.updateItem(params);\n    self.setupRequest(request);\n    self.setupResponse(request);\n    if (typeof callback === 'function') {\n      request.send(callback);\n    }\n    return request;\n  },\n\n\n  scan: function(params, callback) {\n    var self = this;\n    var request = self.service.scan(params);\n    self.setupRequest(request);\n    self.setupResponse(request);\n    if (typeof callback === 'function') {\n      request.send(callback);\n    }\n    return request;\n  },\n\n\n  query: function(params, callback) {\n    var self = this;\n    var request = self.service.query(params);\n    self.setupRequest(request);\n    self.setupResponse(request);\n    if (typeof callback === 'function') {\n      request.send(callback);\n    }\n    return request;\n  },\n\n\n  createSet: function(list, options) {\n    options = options || {};\n    return new DynamoDBSet(list, options);\n  },\n\n\n  getTranslator: function() {\n    return new Translator(this.options);\n  },\n\n\n  setupRequest: function setupRequest(request) {\n    var self = this;\n    var translator = self.getTranslator();\n    var operation = request.operation;\n    var inputShape = request.service.api.operations[operation].input;\n    request._events.validate.unshift(function(req) {\n      req.rawParams = AWS.util.copy(req.params);\n      req.params = translator.translateInput(req.rawParams, inputShape);\n    });\n  },\n\n\n  setupResponse: function setupResponse(request) {\n    var self = this;\n    var translator = self.getTranslator();\n    var outputShape = self.service.api.operations[request.operation].output;\n    request.on('extractData', function(response) {\n      response.data = translator.translateOutput(response.data, outputShape);\n    });\n\n    var response = request.response;\n    response.nextPage = function(cb) {\n      var resp = this;\n      var req = resp.request;\n      var config;\n      var service = req.service;\n      var operation = req.operation;\n      try {\n        config = service.paginationConfig(operation, true);\n      } catch (e) { resp.error = e; }\n\n      if (!resp.hasNextPage()) {\n        if (cb) cb(resp.error, null);\n        else if (resp.error) throw resp.error;\n        return null;\n      }\n\n      var params = AWS.util.copy(req.rawParams);\n      if (!resp.nextPageTokens) {\n        return cb ? cb(null, null) : null;\n      } else {\n        var inputTokens = config.inputToken;\n        if (typeof inputTokens === 'string') inputTokens = [inputTokens];\n        for (var i = 0; i < inputTokens.length; i++) {\n          params[inputTokens[i]] = resp.nextPageTokens[i];\n        }\n        return self[operation](params, cb);\n      }\n    };\n  }\n\n});\n\nmodule.exports = AWS.DynamoDB.DocumentClient;\n\n},{\"../core\":201,\"./set\":210,\"./translator\":211}],210:[function(require,module,exports){\nvar util = require('../core').util;\nvar typeOf = require('./types').typeOf;\n\nvar DynamoDBSet = util.inherit({\n\n  constructor: function Set(list, options) {\n    options = options || {};\n    this.initialize(list, options.validate);\n  },\n\n  initialize: function(list, validate) {\n    var self = this;\n    self.values = [].concat(list);\n    self.detectType();\n    if (validate) {\n      self.validate();\n    }\n  },\n\n  detectType: function() {\n    var self = this;\n    var value = self.values[0];\n    if (typeOf(value) === 'String') {\n      self.type = 'String';\n    } else if (typeOf(value) === 'Number') {\n      self.type = 'Number';\n    } else if (typeOf(value) === 'Binary') {\n      self.type = 'Binary';\n    } else {\n      throw util.error(new Error(), {\n        code: 'InvalidSetType',\n        message: 'Sets can contain string, number, or binary values'\n      });\n    }\n  },\n\n  validate: function() {\n    var self = this;\n    var length = self.values.length;\n    var values = self.values;\n    for (var i = 0; i < length; i++) {\n      if (typeOf(values[i]) !== self.type) {\n        throw util.error(new Error(), {\n          code: 'InvalidType',\n          message: self.type + ' Set contains ' + typeOf(values[i]) + ' value'\n        });\n      }\n    }\n  }\n\n});\n\nmodule.exports = DynamoDBSet;\n\n},{\"../core\":201,\"./types\":212}],211:[function(require,module,exports){\nvar util = require('../core').util;\nvar convert = require('./converter');\n\nvar Translator = function(options) {\n  options = options || {};\n  this.attrValue = options.attrValue;\n  this.convertEmptyValues = Boolean(options.convertEmptyValues);\n};\n\nTranslator.prototype.translateInput = function(value, shape) {\n  this.mode = 'input';\n  return this.translate(value, shape);\n};\n\nTranslator.prototype.translateOutput = function(value, shape) {\n  this.mode = 'output';\n  return this.translate(value, shape);\n};\n\nTranslator.prototype.translate = function(value, shape) {\n  var self = this;\n  if (!shape || value === undefined) return undefined;\n\n  if (shape.shape === self.attrValue) {\n    return convert[self.mode](value, {convertEmptyValues: self.convertEmptyValues});\n  }\n  switch (shape.type) {\n    case 'structure': return self.translateStructure(value, shape);\n    case 'map': return self.translateMap(value, shape);\n    case 'list': return self.translateList(value, shape);\n    default: return self.translateScalar(value, shape);\n  }\n};\n\nTranslator.prototype.translateStructure = function(structure, shape) {\n  var self = this;\n  if (structure == null) return undefined;\n\n  var struct = {};\n  util.each(structure, function(name, value) {\n    var memberShape = shape.members[name];\n    if (memberShape) {\n      var result = self.translate(value, memberShape);\n      if (result !== undefined) struct[name] = result;\n    }\n  });\n  return struct;\n};\n\nTranslator.prototype.translateList = function(list, shape) {\n  var self = this;\n  if (list == null) return undefined;\n\n  var out = [];\n  util.arrayEach(list, function(value) {\n    var result = self.translate(value, shape.member);\n    if (result === undefined) out.push(null);\n    else out.push(result);\n  });\n  return out;\n};\n\nTranslator.prototype.translateMap = function(map, shape) {\n  var self = this;\n  if (map == null) return undefined;\n\n  var out = {};\n  util.each(map, function(key, value) {\n    var result = self.translate(value, shape.value);\n    if (result === undefined) out[key] = null;\n    else out[key] = result;\n  });\n  return out;\n};\n\nTranslator.prototype.translateScalar = function(value, shape) {\n  return shape.toType(value);\n};\n\nmodule.exports = Translator;\n\n},{\"../core\":201,\"./converter\":208}],212:[function(require,module,exports){\nvar util = require('../core').util;\n\nfunction typeOf(data) {\n  if (data === null && typeof data === 'object') {\n    return 'null';\n  } else if (data !== undefined && isBinary(data)) {\n    return 'Binary';\n  } else if (data !== undefined && data.constructor) {\n    return util.typeName(data.constructor);\n  } else if (data !== undefined && typeof data === 'object') {\n    return 'Object';\n  } else {\n    return 'undefined';\n  }\n}\n\nfunction isBinary(data) {\n  var types = [\n    'Buffer', 'File', 'Blob', 'ArrayBuffer', 'DataView',\n    'Int8Array', 'Uint8Array', 'Uint8ClampedArray',\n    'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array',\n    'Float32Array', 'Float64Array'\n  ];\n  if (util.isNode()) {\n    var Stream = util.stream.Stream;\n    if (util.Buffer.isBuffer(data) || data instanceof Stream)\n      return true;\n  } else {\n    for (var i = 0; i < types.length; i++) {\n      if (data !== undefined && data.constructor) {\n        if (util.isType(data, types[i])) return true;\n        if (util.typeName(data.constructor) === types[i]) return true;\n      }\n    }\n  }\n  return false;\n}\n\nmodule.exports = {\n  typeOf: typeOf,\n  isBinary: isBinary\n};\n\n},{\"../core\":201}],213:[function(require,module,exports){\nvar AWS = require('./core');\nvar SequentialExecutor = require('./sequential_executor');\n\nAWS.EventListeners = {\n\n  Core: {} /* doc hack */\n};\n\nAWS.EventListeners = {\n  Core: new SequentialExecutor().addNamedListeners(function(add, addAsync) {\n    addAsync('VALIDATE_CREDENTIALS', 'validate',\n        function VALIDATE_CREDENTIALS(req, done) {\n      if (!req.service.api.signatureVersion) return done(); // none\n      req.service.config.getCredentials(function(err) {\n        if (err) {\n          req.response.error = AWS.util.error(err,\n            {code: 'CredentialsError', message: 'Missing credentials in config'});\n        }\n        done();\n      });\n    });\n\n    add('VALIDATE_REGION', 'validate', function VALIDATE_REGION(req) {\n      if (!req.service.config.region && !req.service.isGlobalEndpoint) {\n        req.response.error = AWS.util.error(new Error(),\n          {code: 'ConfigError', message: 'Missing region in config'});\n      }\n    });\n\n    add('BUILD_IDEMPOTENCY_TOKENS', 'validate', function BUILD_IDEMPOTENCY_TOKENS(req) {\n      var operation = req.service.api.operations[req.operation];\n      if (!operation) {\n        return;\n      }\n      var idempotentMembers = operation.idempotentMembers;\n      if (!idempotentMembers.length) {\n        return;\n      }\n      var params = AWS.util.copy(req.params);\n      for (var i = 0, iLen = idempotentMembers.length; i < iLen; i++) {\n        if (!params[idempotentMembers[i]]) {\n          params[idempotentMembers[i]] = AWS.util.uuid.v4();\n        }\n      }\n      req.params = params;\n    });\n\n    add('VALIDATE_PARAMETERS', 'validate', function VALIDATE_PARAMETERS(req) {\n      var rules = req.service.api.operations[req.operation].input;\n      var validation = req.service.config.paramValidation;\n      new AWS.ParamValidator(validation).validate(rules, req.params);\n    });\n\n    addAsync('COMPUTE_SHA256', 'afterBuild', function COMPUTE_SHA256(req, done) {\n      req.haltHandlersOnError();\n      if (!req.service.api.signatureVersion) return done(); // none\n      if (req.service.getSignerClass(req) === AWS.Signers.V4) {\n        var body = req.httpRequest.body || '';\n        AWS.util.computeSha256(body, function(err, sha) {\n          if (err) {\n            done(err);\n          }\n          else {\n            req.httpRequest.headers['X-Amz-Content-Sha256'] = sha;\n            done();\n          }\n        });\n      } else {\n        done();\n      }\n    });\n\n    add('SET_CONTENT_LENGTH', 'afterBuild', function SET_CONTENT_LENGTH(req) {\n      if (req.httpRequest.headers['Content-Length'] === undefined) {\n        var length = AWS.util.string.byteLength(req.httpRequest.body);\n        req.httpRequest.headers['Content-Length'] = length;\n      }\n    });\n\n    add('SET_HTTP_HOST', 'afterBuild', function SET_HTTP_HOST(req) {\n      req.httpRequest.headers['Host'] = req.httpRequest.endpoint.host;\n    });\n\n    add('RESTART', 'restart', function RESTART() {\n      var err = this.response.error;\n      if (!err || !err.retryable) return;\n\n      this.httpRequest = new AWS.HttpRequest(\n        this.service.endpoint,\n        this.service.region\n      );\n\n      if (this.response.retryCount < this.service.config.maxRetries) {\n        this.response.retryCount++;\n      } else {\n        this.response.error = null;\n      }\n    });\n\n    addAsync('SIGN', 'sign', function SIGN(req, done) {\n      var service = req.service;\n      if (!service.api.signatureVersion) return done(); // none\n\n      service.config.getCredentials(function (err, credentials) {\n        if (err) {\n          req.response.error = err;\n          return done();\n        }\n\n        try {\n          var date = AWS.util.date.getDate();\n          var SignerClass = service.getSignerClass(req);\n          var signer = new SignerClass(req.httpRequest,\n            service.api.signingName || service.api.endpointPrefix,\n           service.config.signatureCache);\n          signer.setServiceClientId(service._clientId);\n\n          delete req.httpRequest.headers['Authorization'];\n          delete req.httpRequest.headers['Date'];\n          delete req.httpRequest.headers['X-Amz-Date'];\n\n          signer.addAuthorization(credentials, date);\n          req.signedAt = date;\n        } catch (e) {\n          req.response.error = e;\n        }\n        done();\n      });\n    });\n\n    add('VALIDATE_RESPONSE', 'validateResponse', function VALIDATE_RESPONSE(resp) {\n      if (this.service.successfulResponse(resp, this)) {\n        resp.data = {};\n        resp.error = null;\n      } else {\n        resp.data = null;\n        resp.error = AWS.util.error(new Error(),\n          {code: 'UnknownError', message: 'An unknown error occurred.'});\n      }\n    });\n\n    addAsync('SEND', 'send', function SEND(resp, done) {\n      resp.httpResponse._abortCallback = done;\n      resp.error = null;\n      resp.data = null;\n\n      function callback(httpResp) {\n        resp.httpResponse.stream = httpResp;\n\n        httpResp.on('headers', function onHeaders(statusCode, headers) {\n          resp.request.emit('httpHeaders', [statusCode, headers, resp]);\n\n          if (!resp.httpResponse.streaming) {\n            if (AWS.HttpClient.streamsApiVersion === 2) { // streams2 API check\n              httpResp.on('readable', function onReadable() {\n                var data = httpResp.read();\n                if (data !== null) {\n                  resp.request.emit('httpData', [data, resp]);\n                }\n              });\n            } else { // legacy streams API\n              httpResp.on('data', function onData(data) {\n                resp.request.emit('httpData', [data, resp]);\n              });\n            }\n          }\n        });\n\n        httpResp.on('end', function onEnd() {\n          resp.request.emit('httpDone');\n          done();\n        });\n      }\n\n      function progress(httpResp) {\n        httpResp.on('sendProgress', function onSendProgress(value) {\n          resp.request.emit('httpUploadProgress', [value, resp]);\n        });\n\n        httpResp.on('receiveProgress', function onReceiveProgress(value) {\n          resp.request.emit('httpDownloadProgress', [value, resp]);\n        });\n      }\n\n      function error(err) {\n        resp.error = AWS.util.error(err, {\n          code: 'NetworkingError',\n          region: resp.request.httpRequest.region,\n          hostname: resp.request.httpRequest.endpoint.hostname,\n          retryable: true\n        });\n        resp.request.emit('httpError', [resp.error, resp], function() {\n          done();\n        });\n      }\n\n      function executeSend() {\n        var http = AWS.HttpClient.getInstance();\n        var httpOptions = resp.request.service.config.httpOptions || {};\n        try {\n          var stream = http.handleRequest(resp.request.httpRequest, httpOptions,\n                                          callback, error);\n          progress(stream);\n        } catch (err) {\n          error(err);\n        }\n      }\n\n      var timeDiff = (AWS.util.date.getDate() - this.signedAt) / 1000;\n      if (timeDiff >= 60 * 10) { // if we signed 10min ago, re-sign\n        this.emit('sign', [this], function(err) {\n          if (err) done(err);\n          else executeSend();\n        });\n      } else {\n        executeSend();\n      }\n    });\n\n    add('HTTP_HEADERS', 'httpHeaders',\n        function HTTP_HEADERS(statusCode, headers, resp) {\n      resp.httpResponse.statusCode = statusCode;\n      resp.httpResponse.headers = headers;\n      resp.httpResponse.body = new AWS.util.Buffer('');\n      resp.httpResponse.buffers = [];\n      resp.httpResponse.numBytes = 0;\n      var dateHeader = headers.date || headers.Date;\n      if (dateHeader) {\n        var serverTime = Date.parse(dateHeader);\n        if (resp.request.service.config.correctClockSkew\n            && AWS.util.isClockSkewed(serverTime)) {\n          AWS.util.applyClockOffset(serverTime);\n        }\n      }\n    });\n\n    add('HTTP_DATA', 'httpData', function HTTP_DATA(chunk, resp) {\n      if (chunk) {\n        if (AWS.util.isNode()) {\n          resp.httpResponse.numBytes += chunk.length;\n\n          var total = resp.httpResponse.headers['content-length'];\n          var progress = { loaded: resp.httpResponse.numBytes, total: total };\n          resp.request.emit('httpDownloadProgress', [progress, resp]);\n        }\n\n        resp.httpResponse.buffers.push(new AWS.util.Buffer(chunk));\n      }\n    });\n\n    add('HTTP_DONE', 'httpDone', function HTTP_DONE(resp) {\n      if (resp.httpResponse.buffers && resp.httpResponse.buffers.length > 0) {\n        var body = AWS.util.buffer.concat(resp.httpResponse.buffers);\n        resp.httpResponse.body = body;\n      }\n      delete resp.httpResponse.numBytes;\n      delete resp.httpResponse.buffers;\n    });\n\n    add('FINALIZE_ERROR', 'retry', function FINALIZE_ERROR(resp) {\n      if (resp.httpResponse.statusCode) {\n        resp.error.statusCode = resp.httpResponse.statusCode;\n        if (resp.error.retryable === undefined) {\n          resp.error.retryable = this.service.retryableError(resp.error, this);\n        }\n      }\n    });\n\n    add('INVALIDATE_CREDENTIALS', 'retry', function INVALIDATE_CREDENTIALS(resp) {\n      if (!resp.error) return;\n      switch (resp.error.code) {\n        case 'RequestExpired': // EC2 only\n        case 'ExpiredTokenException':\n        case 'ExpiredToken':\n          resp.error.retryable = true;\n          resp.request.service.config.credentials.expired = true;\n      }\n    });\n\n    add('EXPIRED_SIGNATURE', 'retry', function EXPIRED_SIGNATURE(resp) {\n      var err = resp.error;\n      if (!err) return;\n      if (typeof err.code === 'string' && typeof err.message === 'string') {\n        if (err.code.match(/Signature/) && err.message.match(/expired/)) {\n          resp.error.retryable = true;\n        }\n      }\n    });\n\n    add('CLOCK_SKEWED', 'retry', function CLOCK_SKEWED(resp) {\n      if (!resp.error) return;\n      if (this.service.clockSkewError(resp.error)\n          && this.service.config.correctClockSkew\n          && AWS.config.isClockSkewed) {\n        resp.error.retryable = true;\n      }\n    });\n\n    add('REDIRECT', 'retry', function REDIRECT(resp) {\n      if (resp.error && resp.error.statusCode >= 300 &&\n          resp.error.statusCode < 400 && resp.httpResponse.headers['location']) {\n        this.httpRequest.endpoint =\n          new AWS.Endpoint(resp.httpResponse.headers['location']);\n        this.httpRequest.headers['Host'] = this.httpRequest.endpoint.host;\n        resp.error.redirect = true;\n        resp.error.retryable = true;\n      }\n    });\n\n    add('RETRY_CHECK', 'retry', function RETRY_CHECK(resp) {\n      if (resp.error) {\n        if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) {\n          resp.error.retryDelay = 0;\n        } else if (resp.retryCount < resp.maxRetries) {\n          resp.error.retryDelay = this.service.retryDelays(resp.retryCount) || 0;\n        }\n      }\n    });\n\n    addAsync('RESET_RETRY_STATE', 'afterRetry', function RESET_RETRY_STATE(resp, done) {\n      var delay, willRetry = false;\n\n      if (resp.error) {\n        delay = resp.error.retryDelay || 0;\n        if (resp.error.retryable && resp.retryCount < resp.maxRetries) {\n          resp.retryCount++;\n          willRetry = true;\n        } else if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) {\n          resp.redirectCount++;\n          willRetry = true;\n        }\n      }\n\n      if (willRetry) {\n        resp.error = null;\n        setTimeout(done, delay);\n      } else {\n        done();\n      }\n    });\n  }),\n\n  CorePost: new SequentialExecutor().addNamedListeners(function(add) {\n    add('EXTRACT_REQUEST_ID', 'extractData', AWS.util.extractRequestId);\n    add('EXTRACT_REQUEST_ID', 'extractError', AWS.util.extractRequestId);\n\n    add('ENOTFOUND_ERROR', 'httpError', function ENOTFOUND_ERROR(err) {\n      if (err.code === 'NetworkingError' && err.errno === 'ENOTFOUND') {\n        var message = 'Inaccessible host: `' + err.hostname +\n          '\\'. This service may not be available in the `' + err.region +\n          '\\' region.';\n        this.response.error = AWS.util.error(new Error(message), {\n          code: 'UnknownEndpoint',\n          region: err.region,\n          hostname: err.hostname,\n          retryable: true,\n          originalError: err\n        });\n      }\n    });\n  }),\n\n  Logger: new SequentialExecutor().addNamedListeners(function(add) {\n    add('LOG_REQUEST', 'complete', function LOG_REQUEST(resp) {\n      var req = resp.request;\n      var logger = req.service.config.logger;\n      if (!logger) return;\n\n      function buildMessage() {\n        var time = AWS.util.date.getDate().getTime();\n        var delta = (time - req.startTime.getTime()) / 1000;\n        var ansi = logger.isTTY ? true : false;\n        var status = resp.httpResponse.statusCode;\n        var params = require('util').inspect(req.params, true, null);\n\n        var message = '';\n        if (ansi) message += '\\x1B[33m';\n        message += '[AWS ' + req.service.serviceIdentifier + ' ' + status;\n        message += ' ' + delta.toString() + 's ' + resp.retryCount + ' retries]';\n        if (ansi) message += '\\x1B[0;1m';\n        message += ' ' + AWS.util.string.lowerFirst(req.operation);\n        message += '(' + params + ')';\n        if (ansi) message += '\\x1B[0m';\n        return message;\n      }\n\n      var line = buildMessage();\n      if (typeof logger.log === 'function') {\n        logger.log(line);\n      } else if (typeof logger.write === 'function') {\n        logger.write(line + '\\n');\n      }\n    });\n  }),\n\n  Json: new SequentialExecutor().addNamedListeners(function(add) {\n    var svc = require('./protocol/json');\n    add('BUILD', 'build', svc.buildRequest);\n    add('EXTRACT_DATA', 'extractData', svc.extractData);\n    add('EXTRACT_ERROR', 'extractError', svc.extractError);\n  }),\n\n  Rest: new SequentialExecutor().addNamedListeners(function(add) {\n    var svc = require('./protocol/rest');\n    add('BUILD', 'build', svc.buildRequest);\n    add('EXTRACT_DATA', 'extractData', svc.extractData);\n    add('EXTRACT_ERROR', 'extractError', svc.extractError);\n  }),\n\n  RestJson: new SequentialExecutor().addNamedListeners(function(add) {\n    var svc = require('./protocol/rest_json');\n    add('BUILD', 'build', svc.buildRequest);\n    add('EXTRACT_DATA', 'extractData', svc.extractData);\n    add('EXTRACT_ERROR', 'extractError', svc.extractError);\n  }),\n\n  RestXml: new SequentialExecutor().addNamedListeners(function(add) {\n    var svc = require('./protocol/rest_xml');\n    add('BUILD', 'build', svc.buildRequest);\n    add('EXTRACT_DATA', 'extractData', svc.extractData);\n    add('EXTRACT_ERROR', 'extractError', svc.extractError);\n  }),\n\n  Query: new SequentialExecutor().addNamedListeners(function(add) {\n    var svc = require('./protocol/query');\n    add('BUILD', 'build', svc.buildRequest);\n    add('EXTRACT_DATA', 'extractData', svc.extractData);\n    add('EXTRACT_ERROR', 'extractError', svc.extractError);\n  })\n};\n\n},{\"./core\":201,\"./protocol/json\":226,\"./protocol/query\":227,\"./protocol/rest\":228,\"./protocol/rest_json\":229,\"./protocol/rest_xml\":230,\"./sequential_executor\":238,\"util\":273}],214:[function(require,module,exports){\nvar AWS = require('./core');\nvar inherit = AWS.util.inherit;\n\n\nAWS.Endpoint = inherit({\n\n\n  constructor: function Endpoint(endpoint, config) {\n    AWS.util.hideProperties(this, ['slashes', 'auth', 'hash', 'search', 'query']);\n\n    if (typeof endpoint === 'undefined' || endpoint === null) {\n      throw new Error('Invalid endpoint: ' + endpoint);\n    } else if (typeof endpoint !== 'string') {\n      return AWS.util.copy(endpoint);\n    }\n\n    if (!endpoint.match(/^http/)) {\n      var useSSL = config && config.sslEnabled !== undefined ?\n        config.sslEnabled : AWS.config.sslEnabled;\n      endpoint = (useSSL ? 'https' : 'http') + '://' + endpoint;\n    }\n\n    AWS.util.update(this, AWS.util.urlParse(endpoint));\n\n    if (this.port) {\n      this.port = parseInt(this.port, 10);\n    } else {\n      this.port = this.protocol === 'https:' ? 443 : 80;\n    }\n  }\n\n});\n\n\nAWS.HttpRequest = inherit({\n\n\n  constructor: function HttpRequest(endpoint, region) {\n    endpoint = new AWS.Endpoint(endpoint);\n    this.method = 'POST';\n    this.path = endpoint.path || '/';\n    this.headers = {};\n    this.body = '';\n    this.endpoint = endpoint;\n    this.region = region;\n    this._userAgent = '';\n    this.setUserAgent();\n  },\n\n\n  setUserAgent: function setUserAgent() {\n    this._userAgent = this.headers[this.getUserAgentHeaderName()] = AWS.util.userAgent();\n  },\n\n  getUserAgentHeaderName: function getUserAgentHeaderName() {\n    var prefix = AWS.util.isBrowser() ? 'X-Amz-' : '';\n    return prefix + 'User-Agent';\n  },\n\n\n  appendToUserAgent: function appendToUserAgent(agentPartial) {\n    if (typeof agentPartial === 'string' && agentPartial) {\n      this._userAgent += ' ' + agentPartial;\n    }\n    this.headers[this.getUserAgentHeaderName()] = this._userAgent;\n  },\n\n\n  getUserAgent: function getUserAgent() {\n    return this._userAgent;\n  },\n\n\n  pathname: function pathname() {\n    return this.path.split('?', 1)[0];\n  },\n\n\n  search: function search() {\n    var query = this.path.split('?', 2)[1];\n    if (query) {\n      query = AWS.util.queryStringParse(query);\n      return AWS.util.queryParamsToString(query);\n    }\n    return '';\n  }\n\n});\n\n\nAWS.HttpResponse = inherit({\n\n\n  constructor: function HttpResponse() {\n    this.statusCode = undefined;\n    this.headers = {};\n    this.body = undefined;\n    this.streaming = false;\n    this.stream = null;\n  },\n\n\n  createUnbufferedStream: function createUnbufferedStream() {\n    this.streaming = true;\n    return this.stream;\n  }\n});\n\n\nAWS.HttpClient = inherit({});\n\n\nAWS.HttpClient.getInstance = function getInstance() {\n  if (this.singleton === undefined) {\n    this.singleton = new this();\n  }\n  return this.singleton;\n};\n\n},{\"./core\":201}],215:[function(require,module,exports){\nvar AWS = require('../core');\nvar EventEmitter = require('events').EventEmitter;\nrequire('../http');\n\n\nAWS.XHRClient = AWS.util.inherit({\n  handleRequest: function handleRequest(httpRequest, httpOptions, callback, errCallback) {\n    var self = this;\n    var endpoint = httpRequest.endpoint;\n    var emitter = new EventEmitter();\n    var href = endpoint.protocol + '//' + endpoint.hostname;\n    if (endpoint.port !== 80 && endpoint.port !== 443) {\n      href += ':' + endpoint.port;\n    }\n    href += httpRequest.path;\n\n    var xhr = new XMLHttpRequest(), headersEmitted = false;\n    httpRequest.stream = xhr;\n\n    xhr.addEventListener('readystatechange', function() {\n      try {\n        if (xhr.status === 0) return; // 0 code is invalid\n      } catch (e) { return; }\n\n      if (this.readyState >= this.HEADERS_RECEIVED && !headersEmitted) {\n        try { xhr.responseType = 'arraybuffer'; } catch (e) {}\n        emitter.statusCode = xhr.status;\n        emitter.headers = self.parseHeaders(xhr.getAllResponseHeaders());\n        emitter.emit('headers', emitter.statusCode, emitter.headers);\n        headersEmitted = true;\n      }\n      if (this.readyState === this.DONE) {\n        self.finishRequest(xhr, emitter);\n      }\n    }, false);\n    xhr.upload.addEventListener('progress', function (evt) {\n      emitter.emit('sendProgress', evt);\n    });\n    xhr.addEventListener('progress', function (evt) {\n      emitter.emit('receiveProgress', evt);\n    }, false);\n    xhr.addEventListener('timeout', function () {\n      errCallback(AWS.util.error(new Error('Timeout'), {code: 'TimeoutError'}));\n    }, false);\n    xhr.addEventListener('error', function () {\n      errCallback(AWS.util.error(new Error('Network Failure'), {\n        code: 'NetworkingError'\n      }));\n    }, false);\n\n    callback(emitter);\n    xhr.open(httpRequest.method, href, httpOptions.xhrAsync !== false);\n    AWS.util.each(httpRequest.headers, function (key, value) {\n      if (key !== 'Content-Length' && key !== 'User-Agent' && key !== 'Host') {\n        xhr.setRequestHeader(key, value);\n      }\n    });\n\n    if (httpOptions.timeout && httpOptions.xhrAsync !== false) {\n      xhr.timeout = httpOptions.timeout;\n    }\n\n    if (httpOptions.xhrWithCredentials) {\n      xhr.withCredentials = true;\n    }\n\n    try {\n      xhr.send(httpRequest.body);\n    } catch (err) {\n      if (httpRequest.body && typeof httpRequest.body.buffer === 'object') {\n        xhr.send(httpRequest.body.buffer); // send ArrayBuffer directly\n      } else {\n        throw err;\n      }\n    }\n\n    return emitter;\n  },\n\n  parseHeaders: function parseHeaders(rawHeaders) {\n    var headers = {};\n    AWS.util.arrayEach(rawHeaders.split(/\\r?\\n/), function (line) {\n      var key = line.split(':', 1)[0];\n      var value = line.substring(key.length + 2);\n      if (key.length > 0) headers[key.toLowerCase()] = value;\n    });\n    return headers;\n  },\n\n  finishRequest: function finishRequest(xhr, emitter) {\n    var buffer;\n    if (xhr.responseType === 'arraybuffer' && xhr.response) {\n      var ab = xhr.response;\n      buffer = new AWS.util.Buffer(ab.byteLength);\n      var view = new Uint8Array(ab);\n      for (var i = 0; i < buffer.length; ++i) {\n        buffer[i] = view[i];\n      }\n    }\n\n    try {\n      if (!buffer && typeof xhr.responseText === 'string') {\n        buffer = new AWS.util.Buffer(xhr.responseText);\n      }\n    } catch (e) {}\n\n    if (buffer) emitter.emit('data', buffer);\n    emitter.emit('end');\n  }\n});\n\n\nAWS.HttpClient.prototype = AWS.XHRClient.prototype;\n\n\nAWS.HttpClient.streamsApiVersion = 1;\n\n},{\"../core\":201,\"../http\":214,\"events\":265}],216:[function(require,module,exports){\nvar util = require('../util');\n\nfunction JsonBuilder() { }\n\nJsonBuilder.prototype.build = function(value, shape) {\n  return JSON.stringify(translate(value, shape));\n};\n\nfunction translate(value, shape) {\n  if (!shape || value === undefined || value === null) return undefined;\n\n  switch (shape.type) {\n    case 'structure': return translateStructure(value, shape);\n    case 'map': return translateMap(value, shape);\n    case 'list': return translateList(value, shape);\n    default: return translateScalar(value, shape);\n  }\n}\n\nfunction translateStructure(structure, shape) {\n  var struct = {};\n  util.each(structure, function(name, value) {\n    var memberShape = shape.members[name];\n    if (memberShape) {\n      if (memberShape.location !== 'body') return;\n      var locationName = memberShape.isLocationName ? memberShape.name : name;\n      var result = translate(value, memberShape);\n      if (result !== undefined) struct[locationName] = result;\n    }\n  });\n  return struct;\n}\n\nfunction translateList(list, shape) {\n  var out = [];\n  util.arrayEach(list, function(value) {\n    var result = translate(value, shape.member);\n    if (result !== undefined) out.push(result);\n  });\n  return out;\n}\n\nfunction translateMap(map, shape) {\n  var out = {};\n  util.each(map, function(key, value) {\n    var result = translate(value, shape.value);\n    if (result !== undefined) out[key] = result;\n  });\n  return out;\n}\n\nfunction translateScalar(value, shape) {\n  return shape.toWireFormat(value);\n}\n\nmodule.exports = JsonBuilder;\n\n},{\"../util\":261}],217:[function(require,module,exports){\nvar util = require('../util');\n\nfunction JsonParser() { }\n\nJsonParser.prototype.parse = function(value, shape) {\n  return translate(JSON.parse(value), shape);\n};\n\nfunction translate(value, shape) {\n  if (!shape || value === undefined) return undefined;\n\n  switch (shape.type) {\n    case 'structure': return translateStructure(value, shape);\n    case 'map': return translateMap(value, shape);\n    case 'list': return translateList(value, shape);\n    default: return translateScalar(value, shape);\n  }\n}\n\nfunction translateStructure(structure, shape) {\n  if (structure == null) return undefined;\n\n  var struct = {};\n  var shapeMembers = shape.members;\n  util.each(shapeMembers, function(name, memberShape) {\n    var locationName = memberShape.isLocationName ? memberShape.name : name;\n    if (Object.prototype.hasOwnProperty.call(structure, locationName)) {\n      var value = structure[locationName];\n      var result = translate(value, memberShape);\n      if (result !== undefined) struct[name] = result;\n    }\n  });\n  return struct;\n}\n\nfunction translateList(list, shape) {\n  if (list == null) return undefined;\n\n  var out = [];\n  util.arrayEach(list, function(value) {\n    var result = translate(value, shape.member);\n    if (result === undefined) out.push(null);\n    else out.push(result);\n  });\n  return out;\n}\n\nfunction translateMap(map, shape) {\n  if (map == null) return undefined;\n\n  var out = {};\n  util.each(map, function(key, value) {\n    var result = translate(value, shape.value);\n    if (result === undefined) out[key] = null;\n    else out[key] = result;\n  });\n  return out;\n}\n\nfunction translateScalar(value, shape) {\n  return shape.toType(value);\n}\n\nmodule.exports = JsonParser;\n\n},{\"../util\":261}],218:[function(require,module,exports){\nvar Collection = require('./collection');\nvar Operation = require('./operation');\nvar Shape = require('./shape');\nvar Paginator = require('./paginator');\nvar ResourceWaiter = require('./resource_waiter');\n\nvar util = require('../util');\nvar property = util.property;\nvar memoizedProperty = util.memoizedProperty;\n\nfunction Api(api, options) {\n  api = api || {};\n  options = options || {};\n  options.api = this;\n\n  api.metadata = api.metadata || {};\n\n  property(this, 'isApi', true, false);\n  property(this, 'apiVersion', api.metadata.apiVersion);\n  property(this, 'endpointPrefix', api.metadata.endpointPrefix);\n  property(this, 'signingName', api.metadata.signingName);\n  property(this, 'globalEndpoint', api.metadata.globalEndpoint);\n  property(this, 'signatureVersion', api.metadata.signatureVersion);\n  property(this, 'jsonVersion', api.metadata.jsonVersion);\n  property(this, 'targetPrefix', api.metadata.targetPrefix);\n  property(this, 'protocol', api.metadata.protocol);\n  property(this, 'timestampFormat', api.metadata.timestampFormat);\n  property(this, 'xmlNamespaceUri', api.metadata.xmlNamespace);\n  property(this, 'abbreviation', api.metadata.serviceAbbreviation);\n  property(this, 'fullName', api.metadata.serviceFullName);\n\n  memoizedProperty(this, 'className', function() {\n    var name = api.metadata.serviceAbbreviation || api.metadata.serviceFullName;\n    if (!name) return null;\n\n    name = name.replace(/^Amazon|AWS\\s*|\\(.*|\\s+|\\W+/g, '');\n    if (name === 'ElasticLoadBalancing') name = 'ELB';\n    return name;\n  });\n\n  property(this, 'operations', new Collection(api.operations, options, function(name, operation) {\n    return new Operation(name, operation, options);\n  }, util.string.lowerFirst));\n\n  property(this, 'shapes', new Collection(api.shapes, options, function(name, shape) {\n    return Shape.create(shape, options);\n  }));\n\n  property(this, 'paginators', new Collection(api.paginators, options, function(name, paginator) {\n    return new Paginator(name, paginator, options);\n  }));\n\n  property(this, 'waiters', new Collection(api.waiters, options, function(name, waiter) {\n    return new ResourceWaiter(name, waiter, options);\n  }, util.string.lowerFirst));\n\n  if (options.documentation) {\n    property(this, 'documentation', api.documentation);\n    property(this, 'documentationUrl', api.documentationUrl);\n  }\n}\n\nmodule.exports = Api;\n\n},{\"../util\":261,\"./collection\":219,\"./operation\":220,\"./paginator\":221,\"./resource_waiter\":222,\"./shape\":223}],219:[function(require,module,exports){\nvar memoizedProperty = require('../util').memoizedProperty;\n\nfunction memoize(name, value, fn, nameTr) {\n  memoizedProperty(this, nameTr(name), function() {\n    return fn(name, value);\n  });\n}\n\nfunction Collection(iterable, options, fn, nameTr) {\n  nameTr = nameTr || String;\n  var self = this;\n\n  for (var id in iterable) {\n    if (Object.prototype.hasOwnProperty.call(iterable, id)) {\n      memoize.call(self, id, iterable[id], fn, nameTr);\n    }\n  }\n}\n\nmodule.exports = Collection;\n\n},{\"../util\":261}],220:[function(require,module,exports){\nvar Shape = require('./shape');\n\nvar util = require('../util');\nvar property = util.property;\nvar memoizedProperty = util.memoizedProperty;\n\nfunction Operation(name, operation, options) {\n  var self = this;\n  options = options || {};\n\n  property(this, 'name', operation.name || name);\n  property(this, 'api', options.api, false);\n\n  operation.http = operation.http || {};\n  property(this, 'httpMethod', operation.http.method || 'POST');\n  property(this, 'httpPath', operation.http.requestUri || '/');\n  property(this, 'authtype', operation.authtype || '');\n\n  memoizedProperty(this, 'input', function() {\n    if (!operation.input) {\n      return new Shape.create({type: 'structure'}, options);\n    }\n    return Shape.create(operation.input, options);\n  });\n\n  memoizedProperty(this, 'output', function() {\n    if (!operation.output) {\n      return new Shape.create({type: 'structure'}, options);\n    }\n    return Shape.create(operation.output, options);\n  });\n\n  memoizedProperty(this, 'errors', function() {\n    var list = [];\n    if (!operation.errors) return null;\n\n    for (var i = 0; i < operation.errors.length; i++) {\n      list.push(Shape.create(operation.errors[i], options));\n    }\n\n    return list;\n  });\n\n  memoizedProperty(this, 'paginator', function() {\n    return options.api.paginators[name];\n  });\n\n  if (options.documentation) {\n    property(this, 'documentation', operation.documentation);\n    property(this, 'documentationUrl', operation.documentationUrl);\n  }\n\n  memoizedProperty(this, 'idempotentMembers', function() {\n    var idempotentMembers = [];\n    var input = self.input;\n    var members = input.members;\n    if (!input.members) {\n      return idempotentMembers;\n    }\n    for (var name in members) {\n      if (!members.hasOwnProperty(name)) {\n        continue;\n      }\n      if (members[name].isIdempotent === true) {\n        idempotentMembers.push(name);\n      }\n    }\n    return idempotentMembers;\n  });\n\n}\n\nmodule.exports = Operation;\n\n},{\"../util\":261,\"./shape\":223}],221:[function(require,module,exports){\nvar property = require('../util').property;\n\nfunction Paginator(name, paginator) {\n  property(this, 'inputToken', paginator.input_token);\n  property(this, 'limitKey', paginator.limit_key);\n  property(this, 'moreResults', paginator.more_results);\n  property(this, 'outputToken', paginator.output_token);\n  property(this, 'resultKey', paginator.result_key);\n}\n\nmodule.exports = Paginator;\n\n},{\"../util\":261}],222:[function(require,module,exports){\nvar util = require('../util');\nvar property = util.property;\n\nfunction ResourceWaiter(name, waiter, options) {\n  options = options || {};\n  property(this, 'name', name);\n  property(this, 'api', options.api, false);\n\n  if (waiter.operation) {\n    property(this, 'operation', util.string.lowerFirst(waiter.operation));\n  }\n\n  var self = this;\n  var keys = [\n    'type',\n    'description',\n    'delay',\n    'maxAttempts',\n    'acceptors'\n  ];\n\n  keys.forEach(function(key) {\n    var value = waiter[key];\n    if (value) {\n      property(self, key, value);\n    }\n  });\n}\n\nmodule.exports = ResourceWaiter;\n\n},{\"../util\":261}],223:[function(require,module,exports){\nvar Collection = require('./collection');\n\nvar util = require('../util');\n\nfunction property(obj, name, value) {\n  if (value !== null && value !== undefined) {\n    util.property.apply(this, arguments);\n  }\n}\n\nfunction memoizedProperty(obj, name) {\n  if (!obj.constructor.prototype[name]) {\n    util.memoizedProperty.apply(this, arguments);\n  }\n}\n\nfunction Shape(shape, options, memberName) {\n  options = options || {};\n\n  property(this, 'shape', shape.shape);\n  property(this, 'api', options.api, false);\n  property(this, 'type', shape.type);\n  property(this, 'enum', shape.enum);\n  property(this, 'min', shape.min);\n  property(this, 'max', shape.max);\n  property(this, 'pattern', shape.pattern);\n  property(this, 'location', shape.location || this.location || 'body');\n  property(this, 'name', this.name || shape.xmlName || shape.queryName ||\n    shape.locationName || memberName);\n  property(this, 'isStreaming', shape.streaming || this.isStreaming || false);\n  property(this, 'isComposite', shape.isComposite || false);\n  property(this, 'isShape', true, false);\n  property(this, 'isQueryName', shape.queryName ? true : false, false);\n  property(this, 'isLocationName', shape.locationName ? true : false, false);\n  property(this, 'isIdempotent', shape.idempotencyToken === true);\n\n  if (options.documentation) {\n    property(this, 'documentation', shape.documentation);\n    property(this, 'documentationUrl', shape.documentationUrl);\n  }\n\n  if (shape.xmlAttribute) {\n    property(this, 'isXmlAttribute', shape.xmlAttribute || false);\n  }\n\n  property(this, 'defaultValue', null);\n  this.toWireFormat = function(value) {\n    if (value === null || value === undefined) return '';\n    return value;\n  };\n  this.toType = function(value) { return value; };\n}\n\n\nShape.normalizedTypes = {\n  character: 'string',\n  double: 'float',\n  long: 'integer',\n  short: 'integer',\n  biginteger: 'integer',\n  bigdecimal: 'float',\n  blob: 'binary'\n};\n\n\nShape.types = {\n  'structure': StructureShape,\n  'list': ListShape,\n  'map': MapShape,\n  'boolean': BooleanShape,\n  'timestamp': TimestampShape,\n  'float': FloatShape,\n  'integer': IntegerShape,\n  'string': StringShape,\n  'base64': Base64Shape,\n  'binary': BinaryShape\n};\n\nShape.resolve = function resolve(shape, options) {\n  if (shape.shape) {\n    var refShape = options.api.shapes[shape.shape];\n    if (!refShape) {\n      throw new Error('Cannot find shape reference: ' + shape.shape);\n    }\n\n    return refShape;\n  } else {\n    return null;\n  }\n};\n\nShape.create = function create(shape, options, memberName) {\n  if (shape.isShape) return shape;\n\n  var refShape = Shape.resolve(shape, options);\n  if (refShape) {\n    var filteredKeys = Object.keys(shape);\n    if (!options.documentation) {\n      filteredKeys = filteredKeys.filter(function(name) {\n        return !name.match(/documentation/);\n      });\n    }\n    if (filteredKeys === ['shape']) { // no inline customizations\n      return refShape;\n    }\n\n    var InlineShape = function() {\n      refShape.constructor.call(this, shape, options, memberName);\n    };\n    InlineShape.prototype = refShape;\n    return new InlineShape();\n  } else {\n    if (!shape.type) {\n      if (shape.members) shape.type = 'structure';\n      else if (shape.member) shape.type = 'list';\n      else if (shape.key) shape.type = 'map';\n      else shape.type = 'string';\n    }\n\n    var origType = shape.type;\n    if (Shape.normalizedTypes[shape.type]) {\n      shape.type = Shape.normalizedTypes[shape.type];\n    }\n\n    if (Shape.types[shape.type]) {\n      return new Shape.types[shape.type](shape, options, memberName);\n    } else {\n      throw new Error('Unrecognized shape type: ' + origType);\n    }\n  }\n};\n\nfunction CompositeShape(shape) {\n  Shape.apply(this, arguments);\n  property(this, 'isComposite', true);\n\n  if (shape.flattened) {\n    property(this, 'flattened', shape.flattened || false);\n  }\n}\n\nfunction StructureShape(shape, options) {\n  var requiredMap = null, firstInit = !this.isShape;\n\n  CompositeShape.apply(this, arguments);\n\n  if (firstInit) {\n    property(this, 'defaultValue', function() { return {}; });\n    property(this, 'members', {});\n    property(this, 'memberNames', []);\n    property(this, 'required', []);\n    property(this, 'isRequired', function() { return false; });\n  }\n\n  if (shape.members) {\n    property(this, 'members', new Collection(shape.members, options, function(name, member) {\n      return Shape.create(member, options, name);\n    }));\n    memoizedProperty(this, 'memberNames', function() {\n      return shape.xmlOrder || Object.keys(shape.members);\n    });\n  }\n\n  if (shape.required) {\n    property(this, 'required', shape.required);\n    property(this, 'isRequired', function(name) {\n      if (!requiredMap) {\n        requiredMap = {};\n        for (var i = 0; i < shape.required.length; i++) {\n          requiredMap[shape.required[i]] = true;\n        }\n      }\n\n      return requiredMap[name];\n    }, false, true);\n  }\n\n  property(this, 'resultWrapper', shape.resultWrapper || null);\n\n  if (shape.payload) {\n    property(this, 'payload', shape.payload);\n  }\n\n  if (typeof shape.xmlNamespace === 'string') {\n    property(this, 'xmlNamespaceUri', shape.xmlNamespace);\n  } else if (typeof shape.xmlNamespace === 'object') {\n    property(this, 'xmlNamespacePrefix', shape.xmlNamespace.prefix);\n    property(this, 'xmlNamespaceUri', shape.xmlNamespace.uri);\n  }\n}\n\nfunction ListShape(shape, options) {\n  var self = this, firstInit = !this.isShape;\n  CompositeShape.apply(this, arguments);\n\n  if (firstInit) {\n    property(this, 'defaultValue', function() { return []; });\n  }\n\n  if (shape.member) {\n    memoizedProperty(this, 'member', function() {\n      return Shape.create(shape.member, options);\n    });\n  }\n\n  if (this.flattened) {\n    var oldName = this.name;\n    memoizedProperty(this, 'name', function() {\n      return self.member.name || oldName;\n    });\n  }\n}\n\nfunction MapShape(shape, options) {\n  var firstInit = !this.isShape;\n  CompositeShape.apply(this, arguments);\n\n  if (firstInit) {\n    property(this, 'defaultValue', function() { return {}; });\n    property(this, 'key', Shape.create({type: 'string'}, options));\n    property(this, 'value', Shape.create({type: 'string'}, options));\n  }\n\n  if (shape.key) {\n    memoizedProperty(this, 'key', function() {\n      return Shape.create(shape.key, options);\n    });\n  }\n  if (shape.value) {\n    memoizedProperty(this, 'value', function() {\n      return Shape.create(shape.value, options);\n    });\n  }\n}\n\nfunction TimestampShape(shape) {\n  var self = this;\n  Shape.apply(this, arguments);\n\n  if (this.location === 'header') {\n    property(this, 'timestampFormat', 'rfc822');\n  } else if (shape.timestampFormat) {\n    property(this, 'timestampFormat', shape.timestampFormat);\n  } else if (this.api) {\n    if (this.api.timestampFormat) {\n      property(this, 'timestampFormat', this.api.timestampFormat);\n    } else {\n      switch (this.api.protocol) {\n        case 'json':\n        case 'rest-json':\n          property(this, 'timestampFormat', 'unixTimestamp');\n          break;\n        case 'rest-xml':\n        case 'query':\n        case 'ec2':\n          property(this, 'timestampFormat', 'iso8601');\n          break;\n      }\n    }\n  }\n\n  this.toType = function(value) {\n    if (value === null || value === undefined) return null;\n    if (typeof value.toUTCString === 'function') return value;\n    return typeof value === 'string' || typeof value === 'number' ?\n           util.date.parseTimestamp(value) : null;\n  };\n\n  this.toWireFormat = function(value) {\n    return util.date.format(value, self.timestampFormat);\n  };\n}\n\nfunction StringShape() {\n  Shape.apply(this, arguments);\n\n  if (this.api) {\n    switch (this.api.protocol) {\n      case 'rest-xml':\n      case 'query':\n      case 'ec2':\n        this.toType = function(value) { return value || ''; };\n    }\n  }\n}\n\nfunction FloatShape() {\n  Shape.apply(this, arguments);\n\n  this.toType = function(value) {\n    if (value === null || value === undefined) return null;\n    return parseFloat(value);\n  };\n  this.toWireFormat = this.toType;\n}\n\nfunction IntegerShape() {\n  Shape.apply(this, arguments);\n\n  this.toType = function(value) {\n    if (value === null || value === undefined) return null;\n    return parseInt(value, 10);\n  };\n  this.toWireFormat = this.toType;\n}\n\nfunction BinaryShape() {\n  Shape.apply(this, arguments);\n  this.toType = util.base64.decode;\n  this.toWireFormat = util.base64.encode;\n}\n\nfunction Base64Shape() {\n  BinaryShape.apply(this, arguments);\n}\n\nfunction BooleanShape() {\n  Shape.apply(this, arguments);\n\n  this.toType = function(value) {\n    if (typeof value === 'boolean') return value;\n    if (value === null || value === undefined) return null;\n    return value === 'true';\n  };\n}\n\n\nShape.shapes = {\n  StructureShape: StructureShape,\n  ListShape: ListShape,\n  MapShape: MapShape,\n  StringShape: StringShape,\n  BooleanShape: BooleanShape,\n  Base64Shape: Base64Shape\n};\n\nmodule.exports = Shape;\n\n},{\"../util\":261,\"./collection\":219}],224:[function(require,module,exports){\nvar AWS = require('./core');\n\n\nAWS.ParamValidator = AWS.util.inherit({\n\n  constructor: function ParamValidator(validation) {\n    if (validation === true || validation === undefined) {\n      validation = {'min': true};\n    }\n    this.validation = validation;\n  },\n\n  validate: function validate(shape, params, context) {\n    this.errors = [];\n    this.validateMember(shape, params || {}, context || 'params');\n\n    if (this.errors.length > 1) {\n      var msg = this.errors.join('\\n* ');\n      msg = 'There were ' + this.errors.length +\n        ' validation errors:\\n* ' + msg;\n      throw AWS.util.error(new Error(msg),\n        {code: 'MultipleValidationErrors', errors: this.errors});\n    } else if (this.errors.length === 1) {\n      throw this.errors[0];\n    } else {\n      return true;\n    }\n  },\n\n  fail: function fail(code, message) {\n    this.errors.push(AWS.util.error(new Error(message), {code: code}));\n  },\n\n  validateStructure: function validateStructure(shape, params, context) {\n    this.validateType(params, context, ['object'], 'structure');\n\n    var paramName;\n    for (var i = 0; shape.required && i < shape.required.length; i++) {\n      paramName = shape.required[i];\n      var value = params[paramName];\n      if (value === undefined || value === null) {\n        this.fail('MissingRequiredParameter',\n          'Missing required key \\'' + paramName + '\\' in ' + context);\n      }\n    }\n\n    for (paramName in params) {\n      if (!Object.prototype.hasOwnProperty.call(params, paramName)) continue;\n\n      var paramValue = params[paramName],\n          memberShape = shape.members[paramName];\n\n      if (memberShape !== undefined) {\n        var memberContext = [context, paramName].join('.');\n        this.validateMember(memberShape, paramValue, memberContext);\n      } else {\n        this.fail('UnexpectedParameter',\n          'Unexpected key \\'' + paramName + '\\' found in ' + context);\n      }\n    }\n\n    return true;\n  },\n\n  validateMember: function validateMember(shape, param, context) {\n    switch (shape.type) {\n      case 'structure':\n        return this.validateStructure(shape, param, context);\n      case 'list':\n        return this.validateList(shape, param, context);\n      case 'map':\n        return this.validateMap(shape, param, context);\n      default:\n        return this.validateScalar(shape, param, context);\n    }\n  },\n\n  validateList: function validateList(shape, params, context) {\n    if (this.validateType(params, context, [Array])) {\n      this.validateRange(shape, params.length, context, 'list member count');\n      for (var i = 0; i < params.length; i++) {\n        this.validateMember(shape.member, params[i], context + '[' + i + ']');\n      }\n    }\n  },\n\n  validateMap: function validateMap(shape, params, context) {\n    if (this.validateType(params, context, ['object'], 'map')) {\n      var mapCount = 0;\n      for (var param in params) {\n        if (!Object.prototype.hasOwnProperty.call(params, param)) continue;\n        this.validateMember(shape.key, param,\n                            context + '[key=\\'' + param + '\\']')\n        this.validateMember(shape.value, params[param],\n                            context + '[\\'' + param + '\\']');\n        mapCount++;\n      }\n      this.validateRange(shape, mapCount, context, 'map member count');\n    }\n  },\n\n  validateScalar: function validateScalar(shape, value, context) {\n    switch (shape.type) {\n      case null:\n      case undefined:\n      case 'string':\n        return this.validateString(shape, value, context);\n      case 'base64':\n      case 'binary':\n        return this.validatePayload(value, context);\n      case 'integer':\n      case 'float':\n        return this.validateNumber(shape, value, context);\n      case 'boolean':\n        return this.validateType(value, context, ['boolean']);\n      case 'timestamp':\n        return this.validateType(value, context, [Date,\n          /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$/, 'number'],\n          'Date object, ISO-8601 string, or a UNIX timestamp');\n      default:\n        return this.fail('UnkownType', 'Unhandled type ' +\n                         shape.type + ' for ' + context);\n    }\n  },\n\n  validateString: function validateString(shape, value, context) {\n    if (this.validateType(value, context, ['string'])) {\n      this.validateEnum(shape, value, context);\n      this.validateRange(shape, value.length, context, 'string length');\n      this.validatePattern(shape, value, context);\n    }\n  },\n\n  validatePattern: function validatePattern(shape, value, context) {\n    if (this.validation['pattern'] && shape['pattern'] !== undefined) {\n      if (!(new RegExp(shape['pattern'])).test(value)) {\n        this.fail('PatternMatchError', 'Provided value \"' + value + '\" '\n          + 'does not match regex pattern /' + shape['pattern'] + '/ for '\n          + context);\n      }\n    }\n  },\n\n  validateRange: function validateRange(shape, value, context, descriptor) {\n    if (this.validation['min']) {\n      if (shape['min'] !== undefined && value < shape['min']) {\n        this.fail('MinRangeError', 'Expected ' + descriptor + ' >= '\n          + shape['min'] + ', but found ' + value + ' for ' + context);\n      }\n    }\n    if (this.validation['max']) {\n      if (shape['max'] !== undefined && value > shape['max']) {\n        this.fail('MaxRangeError', 'Expected ' + descriptor + ' <= '\n          + shape['max'] + ', but found ' + value + ' for ' + context);\n      }\n    }\n  },\n\n  validateEnum: function validateRange(shape, value, context) {\n    if (this.validation['enum'] && shape['enum'] !== undefined) {\n      if (shape['enum'].indexOf(value) === -1) {\n        this.fail('EnumError', 'Found string value of ' + value + ', but '\n          + 'expected ' + shape['enum'].join('|') + ' for ' + context);\n      }\n    }\n  },\n\n  validateType: function validateType(value, context, acceptedTypes, type) {\n    if (value === null || value === undefined) return false;\n\n    var foundInvalidType = false;\n    for (var i = 0; i < acceptedTypes.length; i++) {\n      if (typeof acceptedTypes[i] === 'string') {\n        if (typeof value === acceptedTypes[i]) return true;\n      } else if (acceptedTypes[i] instanceof RegExp) {\n        if ((value || '').toString().match(acceptedTypes[i])) return true;\n      } else {\n        if (value instanceof acceptedTypes[i]) return true;\n        if (AWS.util.isType(value, acceptedTypes[i])) return true;\n        if (!type && !foundInvalidType) acceptedTypes = acceptedTypes.slice();\n        acceptedTypes[i] = AWS.util.typeName(acceptedTypes[i]);\n      }\n      foundInvalidType = true;\n    }\n\n    var acceptedType = type;\n    if (!acceptedType) {\n      acceptedType = acceptedTypes.join(', ').replace(/,([^,]+)$/, ', or$1');\n    }\n\n    var vowel = acceptedType.match(/^[aeiou]/i) ? 'n' : '';\n    this.fail('InvalidParameterType', 'Expected ' + context + ' to be a' +\n              vowel + ' ' + acceptedType);\n    return false;\n  },\n\n  validateNumber: function validateNumber(shape, value, context) {\n    if (value === null || value === undefined) return;\n    if (typeof value === 'string') {\n      var castedValue = parseFloat(value);\n      if (castedValue.toString() === value) value = castedValue;\n    }\n    if (this.validateType(value, context, ['number'])) {\n      this.validateRange(shape, value, context, 'numeric value');\n    }\n  },\n\n  validatePayload: function validatePayload(value, context) {\n    if (value === null || value === undefined) return;\n    if (typeof value === 'string') return;\n    if (value && typeof value.byteLength === 'number') return; // typed arrays\n    if (AWS.util.isNode()) { // special check for buffer/stream in Node.js\n      var Stream = AWS.util.stream.Stream;\n      if (AWS.util.Buffer.isBuffer(value) || value instanceof Stream) return;\n    }\n\n    var types = ['Buffer', 'Stream', 'File', 'Blob', 'ArrayBuffer', 'DataView'];\n    if (value) {\n      for (var i = 0; i < types.length; i++) {\n        if (AWS.util.isType(value, types[i])) return;\n        if (AWS.util.typeName(value.constructor) === types[i]) return;\n      }\n    }\n\n    this.fail('InvalidParameterType', 'Expected ' + context + ' to be a ' +\n      'string, Buffer, Stream, Blob, or typed array object');\n  }\n});\n\n},{\"./core\":201}],225:[function(require,module,exports){\nvar AWS = require('../core');\nvar rest = require('../protocol/rest');\n\n\nAWS.Polly.Presigner = AWS.util.inherit({\n\n    constructor: function Signer(options) {\n        options = options || {};\n        this.options = options;\n        this.service = options.service;\n        this.bindServiceObject(options);\n        this._operations = {};\n    },\n\n\n    bindServiceObject: function bindServiceObject(options) {\n        options = options || {};\n        if (!this.service) {\n            this.service = new AWS.Polly(options);\n        } else {\n            var config = AWS.util.copy(this.service.config);\n            this.service = new this.service.constructor.__super__(config);\n            this.service.config.params = AWS.util.merge(this.service.config.params || {}, options.params);\n        }\n    },\n\n\n    modifyInputMembers: function modifyInputMembers(input) {\n        var modifiedInput = AWS.util.copy(input);\n        modifiedInput.members = AWS.util.copy(input.members);\n        AWS.util.each(input.members, function(name, member) {\n            modifiedInput.members[name] = AWS.util.copy(member);\n            if (!member.location || member.location === 'body') {\n                modifiedInput.members[name].location = 'querystring';\n                modifiedInput.members[name].locationName = name;\n            }\n        });\n        return modifiedInput;\n    },\n\n\n    convertPostToGet: function convertPostToGet(req) {\n        req.httpRequest.method = 'GET';\n\n        var operation = req.service.api.operations[req.operation];\n        var input = this._operations[req.operation];\n        if (!input) {\n            this._operations[req.operation] = input = this.modifyInputMembers(operation.input);\n        }\n\n        var uri = rest.generateURI(req.httpRequest.endpoint.path, operation.httpPath, input, req.params);\n\n        req.httpRequest.path = uri;\n        req.httpRequest.body = '';\n\n        delete req.httpRequest.headers['Content-Length'];\n        delete req.httpRequest.headers['Content-Type'];\n    },\n\n\n    getSynthesizeSpeechUrl: function getSynthesizeSpeechUrl(params, expires, callback) {\n        var self = this;\n        var request = this.service.makeRequest('synthesizeSpeech', params);\n        request.removeAllListeners('build');\n        request.on('build', function(req) {\n            self.convertPostToGet(req);\n        });\n        return request.presign(expires, callback);\n    }\n});\n\n},{\"../core\":201,\"../protocol/rest\":228}],226:[function(require,module,exports){\nvar util = require('../util');\nvar JsonBuilder = require('../json/builder');\nvar JsonParser = require('../json/parser');\n\nfunction buildRequest(req) {\n  var httpRequest = req.httpRequest;\n  var api = req.service.api;\n  var target = api.targetPrefix + '.' + api.operations[req.operation].name;\n  var version = api.jsonVersion || '1.0';\n  var input = api.operations[req.operation].input;\n  var builder = new JsonBuilder();\n\n  if (version === 1) version = '1.0';\n  httpRequest.body = builder.build(req.params || {}, input);\n  httpRequest.headers['Content-Type'] = 'application/x-amz-json-' + version;\n  httpRequest.headers['X-Amz-Target'] = target;\n}\n\nfunction extractError(resp) {\n  var error = {};\n  var httpResponse = resp.httpResponse;\n\n  error.code = httpResponse.headers['x-amzn-errortype'] || 'UnknownError';\n  if (typeof error.code === 'string') {\n    error.code = error.code.split(':')[0];\n  }\n\n  if (httpResponse.body.length > 0) {\n    var e = JSON.parse(httpResponse.body.toString());\n    if (e.__type || e.code) {\n      error.code = (e.__type || e.code).split('#').pop();\n    }\n    if (error.code === 'RequestEntityTooLarge') {\n      error.message = 'Request body must be less than 1 MB';\n    } else {\n      error.message = (e.message || e.Message || null);\n    }\n  } else {\n    error.statusCode = httpResponse.statusCode;\n    error.message = httpResponse.statusCode.toString();\n  }\n\n  resp.error = util.error(new Error(), error);\n}\n\nfunction extractData(resp) {\n  var body = resp.httpResponse.body.toString() || '{}';\n  if (resp.request.service.config.convertResponseTypes === false) {\n    resp.data = JSON.parse(body);\n  } else {\n    var operation = resp.request.service.api.operations[resp.request.operation];\n    var shape = operation.output || {};\n    var parser = new JsonParser();\n    resp.data = parser.parse(body, shape);\n  }\n}\n\nmodule.exports = {\n  buildRequest: buildRequest,\n  extractError: extractError,\n  extractData: extractData\n};\n\n},{\"../json/builder\":216,\"../json/parser\":217,\"../util\":261}],227:[function(require,module,exports){\nvar AWS = require('../core');\nvar util = require('../util');\nvar QueryParamSerializer = require('../query/query_param_serializer');\nvar Shape = require('../model/shape');\n\nfunction buildRequest(req) {\n  var operation = req.service.api.operations[req.operation];\n  var httpRequest = req.httpRequest;\n  httpRequest.headers['Content-Type'] =\n    'application/x-www-form-urlencoded; charset=utf-8';\n  httpRequest.params = {\n    Version: req.service.api.apiVersion,\n    Action: operation.name\n  };\n\n  var builder = new QueryParamSerializer();\n  builder.serialize(req.params, operation.input, function(name, value) {\n    httpRequest.params[name] = value;\n  });\n  httpRequest.body = util.queryParamsToString(httpRequest.params);\n}\n\nfunction extractError(resp) {\n  var data, body = resp.httpResponse.body.toString();\n  if (body.match('<UnknownOperationException')) {\n    data = {\n      Code: 'UnknownOperation',\n      Message: 'Unknown operation ' + resp.request.operation\n    };\n  } else {\n    data = new AWS.XML.Parser().parse(body);\n  }\n\n  if (data.requestId && !resp.requestId) resp.requestId = data.requestId;\n  if (data.Errors) data = data.Errors;\n  if (data.Error) data = data.Error;\n  if (data.Code) {\n    resp.error = util.error(new Error(), {\n      code: data.Code,\n      message: data.Message\n    });\n  } else {\n    resp.error = util.error(new Error(), {\n      code: resp.httpResponse.statusCode,\n      message: null\n    });\n  }\n}\n\nfunction extractData(resp) {\n  var req = resp.request;\n  var operation = req.service.api.operations[req.operation];\n  var shape = operation.output || {};\n  var origRules = shape;\n\n  if (origRules.resultWrapper) {\n    var tmp = Shape.create({type: 'structure'});\n    tmp.members[origRules.resultWrapper] = shape;\n    tmp.memberNames = [origRules.resultWrapper];\n    util.property(shape, 'name', shape.resultWrapper);\n    shape = tmp;\n  }\n\n  var parser = new AWS.XML.Parser();\n\n  if (shape && shape.members && !shape.members._XAMZRequestId) {\n    var requestIdShape = Shape.create(\n      { type: 'string' },\n      { api: { protocol: 'query' } },\n      'requestId'\n    );\n    shape.members._XAMZRequestId = requestIdShape;\n  }\n\n  var data = parser.parse(resp.httpResponse.body.toString(), shape);\n  resp.requestId = data._XAMZRequestId || data.requestId;\n\n  if (data._XAMZRequestId) delete data._XAMZRequestId;\n\n  if (origRules.resultWrapper) {\n    if (data[origRules.resultWrapper]) {\n      util.update(data, data[origRules.resultWrapper]);\n      delete data[origRules.resultWrapper];\n    }\n  }\n\n  resp.data = data;\n}\n\nmodule.exports = {\n  buildRequest: buildRequest,\n  extractError: extractError,\n  extractData: extractData\n};\n\n},{\"../core\":201,\"../model/shape\":223,\"../query/query_param_serializer\":231,\"../util\":261}],228:[function(require,module,exports){\nvar util = require('../util');\n\nfunction populateMethod(req) {\n  req.httpRequest.method = req.service.api.operations[req.operation].httpMethod;\n}\n\nfunction generateURI(endpointPath, operationPath, input, params) {\n  var uri = [endpointPath, operationPath].join('/');\n  uri = uri.replace(/\\/+/g, '/');\n\n  var queryString = {}, queryStringSet = false;\n  util.each(input.members, function (name, member) {\n    var paramValue = params[name];\n    if (paramValue === null || paramValue === undefined) return;\n    if (member.location === 'uri') {\n      var regex = new RegExp('\\\\{' + member.name + '(\\\\+)?\\\\}');\n      uri = uri.replace(regex, function(_, plus) {\n        var fn = plus ? util.uriEscapePath : util.uriEscape;\n        return fn(String(paramValue));\n      });\n    } else if (member.location === 'querystring') {\n      queryStringSet = true;\n\n      if (member.type === 'list') {\n        queryString[member.name] = paramValue.map(function(val) {\n          return util.uriEscape(String(val));\n        });\n      } else if (member.type === 'map') {\n        util.each(paramValue, function(key, value) {\n          if (Array.isArray(value)) {\n            queryString[key] = value.map(function(val) {\n              return util.uriEscape(String(val));\n            });\n          } else {\n            queryString[key] = util.uriEscape(String(value));\n          }\n        });\n      } else {\n        queryString[member.name] = util.uriEscape(String(paramValue));\n      }\n    }\n  });\n\n  if (queryStringSet) {\n    uri += (uri.indexOf('?') >= 0 ? '&' : '?');\n    var parts = [];\n    util.arrayEach(Object.keys(queryString).sort(), function(key) {\n      if (!Array.isArray(queryString[key])) {\n        queryString[key] = [queryString[key]];\n      }\n      for (var i = 0; i < queryString[key].length; i++) {\n        parts.push(util.uriEscape(String(key)) + '=' + queryString[key][i]);\n      }\n    });\n    uri += parts.join('&');\n  }\n\n  return uri;\n}\n\nfunction populateURI(req) {\n  var operation = req.service.api.operations[req.operation];\n  var input = operation.input;\n\n  var uri = generateURI(req.httpRequest.endpoint.path, operation.httpPath, input, req.params);\n  req.httpRequest.path = uri;\n}\n\nfunction populateHeaders(req) {\n  var operation = req.service.api.operations[req.operation];\n  util.each(operation.input.members, function (name, member) {\n    var value = req.params[name];\n    if (value === null || value === undefined) return;\n\n    if (member.location === 'headers' && member.type === 'map') {\n      util.each(value, function(key, memberValue) {\n        req.httpRequest.headers[member.name + key] = memberValue;\n      });\n    } else if (member.location === 'header') {\n      value = member.toWireFormat(value).toString();\n      req.httpRequest.headers[member.name] = value;\n    }\n  });\n}\n\nfunction buildRequest(req) {\n  populateMethod(req);\n  populateURI(req);\n  populateHeaders(req);\n}\n\nfunction extractError() {\n}\n\nfunction extractData(resp) {\n  var req = resp.request;\n  var data = {};\n  var r = resp.httpResponse;\n  var operation = req.service.api.operations[req.operation];\n  var output = operation.output;\n\n  var headers = {};\n  util.each(r.headers, function (k, v) {\n    headers[k.toLowerCase()] = v;\n  });\n\n  util.each(output.members, function(name, member) {\n    var header = (member.name || name).toLowerCase();\n    if (member.location === 'headers' && member.type === 'map') {\n      data[name] = {};\n      var location = member.isLocationName ? member.name : '';\n      var pattern = new RegExp('^' + location + '(.+)', 'i');\n      util.each(r.headers, function (k, v) {\n        var result = k.match(pattern);\n        if (result !== null) {\n          data[name][result[1]] = v;\n        }\n      });\n    } else if (member.location === 'header') {\n      if (headers[header] !== undefined) {\n        data[name] = headers[header];\n      }\n    } else if (member.location === 'statusCode') {\n      data[name] = parseInt(r.statusCode, 10);\n    }\n  });\n\n  resp.data = data;\n}\n\nmodule.exports = {\n  buildRequest: buildRequest,\n  extractError: extractError,\n  extractData: extractData,\n  generateURI: generateURI\n};\n\n},{\"../util\":261}],229:[function(require,module,exports){\nvar util = require('../util');\nvar Rest = require('./rest');\nvar Json = require('./json');\nvar JsonBuilder = require('../json/builder');\nvar JsonParser = require('../json/parser');\n\nfunction populateBody(req) {\n  var builder = new JsonBuilder();\n  var input = req.service.api.operations[req.operation].input;\n\n  if (input.payload) {\n    var params = {};\n    var payloadShape = input.members[input.payload];\n    params = req.params[input.payload];\n    if (params === undefined) return;\n\n    if (payloadShape.type === 'structure') {\n      req.httpRequest.body = builder.build(params, payloadShape);\n    } else { // non-JSON payload\n      req.httpRequest.body = params;\n    }\n  } else {\n    req.httpRequest.body = builder.build(req.params, input);\n  }\n}\n\nfunction buildRequest(req) {\n  Rest.buildRequest(req);\n\n  if (['GET', 'HEAD', 'DELETE'].indexOf(req.httpRequest.method) < 0) {\n    populateBody(req);\n  }\n}\n\nfunction extractError(resp) {\n  Json.extractError(resp);\n}\n\nfunction extractData(resp) {\n  Rest.extractData(resp);\n\n  var req = resp.request;\n  var rules = req.service.api.operations[req.operation].output || {};\n  if (rules.payload) {\n    var payloadMember = rules.members[rules.payload];\n    var body = resp.httpResponse.body;\n    if (payloadMember.isStreaming) {\n      resp.data[rules.payload] = body;\n    } else if (payloadMember.type === 'structure' || payloadMember.type === 'list') {\n      var parser = new JsonParser();\n      resp.data[rules.payload] = parser.parse(body, payloadMember);\n    } else {\n      resp.data[rules.payload] = body.toString();\n    }\n  } else {\n    var data = resp.data;\n    Json.extractData(resp);\n    resp.data = util.merge(data, resp.data);\n  }\n}\n\nmodule.exports = {\n  buildRequest: buildRequest,\n  extractError: extractError,\n  extractData: extractData\n};\n\n},{\"../json/builder\":216,\"../json/parser\":217,\"../util\":261,\"./json\":226,\"./rest\":228}],230:[function(require,module,exports){\nvar AWS = require('../core');\nvar util = require('../util');\nvar Rest = require('./rest');\n\nfunction populateBody(req) {\n  var input = req.service.api.operations[req.operation].input;\n  var builder = new AWS.XML.Builder();\n  var params = req.params;\n\n  var payload = input.payload;\n  if (payload) {\n    var payloadMember = input.members[payload];\n    params = params[payload];\n    if (params === undefined) return;\n\n    if (payloadMember.type === 'structure') {\n      var rootElement = payloadMember.name;\n      req.httpRequest.body = builder.toXML(params, payloadMember, rootElement, true);\n    } else { // non-xml payload\n      req.httpRequest.body = params;\n    }\n  } else {\n    req.httpRequest.body = builder.toXML(params, input, input.name ||\n      input.shape || util.string.upperFirst(req.operation) + 'Request');\n  }\n}\n\nfunction buildRequest(req) {\n  Rest.buildRequest(req);\n\n  if (['GET', 'HEAD'].indexOf(req.httpRequest.method) < 0) {\n    populateBody(req);\n  }\n}\n\nfunction extractError(resp) {\n  Rest.extractError(resp);\n\n  var data = new AWS.XML.Parser().parse(resp.httpResponse.body.toString());\n  if (data.Errors) data = data.Errors;\n  if (data.Error) data = data.Error;\n  if (data.Code) {\n    resp.error = util.error(new Error(), {\n      code: data.Code,\n      message: data.Message\n    });\n  } else {\n    resp.error = util.error(new Error(), {\n      code: resp.httpResponse.statusCode,\n      message: null\n    });\n  }\n}\n\nfunction extractData(resp) {\n  Rest.extractData(resp);\n\n  var parser;\n  var req = resp.request;\n  var body = resp.httpResponse.body;\n  var operation = req.service.api.operations[req.operation];\n  var output = operation.output;\n\n  var payload = output.payload;\n  if (payload) {\n    var payloadMember = output.members[payload];\n    if (payloadMember.isStreaming) {\n      resp.data[payload] = body;\n    } else if (payloadMember.type === 'structure') {\n      parser = new AWS.XML.Parser();\n      resp.data[payload] = parser.parse(body.toString(), payloadMember);\n    } else {\n      resp.data[payload] = body.toString();\n    }\n  } else if (body.length > 0) {\n    parser = new AWS.XML.Parser();\n    var data = parser.parse(body.toString(), output);\n    util.update(resp.data, data);\n  }\n}\n\nmodule.exports = {\n  buildRequest: buildRequest,\n  extractError: extractError,\n  extractData: extractData\n};\n\n},{\"../core\":201,\"../util\":261,\"./rest\":228}],231:[function(require,module,exports){\nvar util = require('../util');\n\nfunction QueryParamSerializer() {\n}\n\nQueryParamSerializer.prototype.serialize = function(params, shape, fn) {\n  serializeStructure('', params, shape, fn);\n};\n\nfunction ucfirst(shape) {\n  if (shape.isQueryName || shape.api.protocol !== 'ec2') {\n    return shape.name;\n  } else {\n    return shape.name[0].toUpperCase() + shape.name.substr(1);\n  }\n}\n\nfunction serializeStructure(prefix, struct, rules, fn) {\n  util.each(rules.members, function(name, member) {\n    var value = struct[name];\n    if (value === null || value === undefined) return;\n\n    var memberName = ucfirst(member);\n    memberName = prefix ? prefix + '.' + memberName : memberName;\n    serializeMember(memberName, value, member, fn);\n  });\n}\n\nfunction serializeMap(name, map, rules, fn) {\n  var i = 1;\n  util.each(map, function (key, value) {\n    var prefix = rules.flattened ? '.' : '.entry.';\n    var position = prefix + (i++) + '.';\n    var keyName = position + (rules.key.name || 'key');\n    var valueName = position + (rules.value.name || 'value');\n    serializeMember(name + keyName, key, rules.key, fn);\n    serializeMember(name + valueName, value, rules.value, fn);\n  });\n}\n\nfunction serializeList(name, list, rules, fn) {\n  var memberRules = rules.member || {};\n\n  if (list.length === 0) {\n    fn.call(this, name, null);\n    return;\n  }\n\n  util.arrayEach(list, function (v, n) {\n    var suffix = '.' + (n + 1);\n    if (rules.api.protocol === 'ec2') {\n      suffix = suffix + ''; // make linter happy\n    } else if (rules.flattened) {\n      if (memberRules.name) {\n        var parts = name.split('.');\n        parts.pop();\n        parts.push(ucfirst(memberRules));\n        name = parts.join('.');\n      }\n    } else {\n      suffix = '.' + (memberRules.name ? memberRules.name : 'member') + suffix;\n    }\n    serializeMember(name + suffix, v, memberRules, fn);\n  });\n}\n\nfunction serializeMember(name, value, rules, fn) {\n  if (value === null || value === undefined) return;\n  if (rules.type === 'structure') {\n    serializeStructure(name, value, rules, fn);\n  } else if (rules.type === 'list') {\n    serializeList(name, value, rules, fn);\n  } else if (rules.type === 'map') {\n    serializeMap(name, value, rules, fn);\n  } else {\n    fn(name, rules.toWireFormat(value).toString());\n  }\n}\n\nmodule.exports = QueryParamSerializer;\n\n},{\"../util\":261}],232:[function(require,module,exports){\nmodule.exports={\n  \"rules\": {\n    \"*/*\": {\n      \"endpoint\": \"{service}.{region}.amazonaws.com\"\n    },\n    \"cn-*/*\": {\n      \"endpoint\": \"{service}.{region}.amazonaws.com.cn\"\n    },\n    \"*/budgets\": \"globalSSL\",\n    \"*/cloudfront\": \"globalSSL\",\n    \"*/iam\": \"globalSSL\",\n    \"*/sts\": \"globalSSL\",\n    \"*/importexport\": {\n      \"endpoint\": \"{service}.amazonaws.com\",\n      \"signatureVersion\": \"v2\",\n      \"globalEndpoint\": true\n    },\n    \"*/route53\": {\n      \"endpoint\": \"https://{service}.amazonaws.com\",\n      \"signatureVersion\": \"v3https\",\n      \"globalEndpoint\": true\n    },\n    \"*/waf\": \"globalSSL\",\n    \"us-gov-*/iam\": \"globalGovCloud\",\n    \"us-gov-*/sts\": {\n      \"endpoint\": \"{service}.{region}.amazonaws.com\"\n    },\n    \"us-gov-west-1/s3\": \"s3dash\",\n    \"us-west-1/s3\": \"s3dash\",\n    \"us-west-2/s3\": \"s3dash\",\n    \"eu-west-1/s3\": \"s3dash\",\n    \"ap-southeast-1/s3\": \"s3dash\",\n    \"ap-southeast-2/s3\": \"s3dash\",\n    \"ap-northeast-1/s3\": \"s3dash\",\n    \"sa-east-1/s3\": \"s3dash\",\n    \"us-east-1/s3\": {\n      \"endpoint\": \"{service}.amazonaws.com\",\n      \"signatureVersion\": \"s3\"\n    },\n    \"us-east-1/sdb\": {\n      \"endpoint\": \"{service}.amazonaws.com\",\n      \"signatureVersion\": \"v2\"\n    },\n    \"*/sdb\": {\n      \"endpoint\": \"{service}.{region}.amazonaws.com\",\n      \"signatureVersion\": \"v2\"\n    }\n  },\n\n  \"patterns\": {\n    \"globalSSL\": {\n      \"endpoint\": \"https://{service}.amazonaws.com\",\n      \"globalEndpoint\": true\n    },\n    \"globalGovCloud\": {\n      \"endpoint\": \"{service}.us-gov.amazonaws.com\"\n    },\n    \"s3dash\": {\n      \"endpoint\": \"{service}-{region}.amazonaws.com\",\n      \"signatureVersion\": \"s3\"\n    }\n  }\n}\n\n},{}],233:[function(require,module,exports){\nvar util = require('./util');\nvar regionConfig = require('./region_config.json');\n\nfunction generateRegionPrefix(region) {\n  if (!region) return null;\n\n  var parts = region.split('-');\n  if (parts.length < 3) return null;\n  return parts.slice(0, parts.length - 2).join('-') + '-*';\n}\n\nfunction derivedKeys(service) {\n  var region = service.config.region;\n  var regionPrefix = generateRegionPrefix(region);\n  var endpointPrefix = service.api.endpointPrefix;\n\n  return [\n    [region, endpointPrefix],\n    [regionPrefix, endpointPrefix],\n    [region, '*'],\n    [regionPrefix, '*'],\n    ['*', endpointPrefix],\n    ['*', '*']\n  ].map(function(item) {\n    return item[0] && item[1] ? item.join('/') : null;\n  });\n}\n\nfunction applyConfig(service, config) {\n  util.each(config, function(key, value) {\n    if (key === 'globalEndpoint') return;\n    if (service.config[key] === undefined || service.config[key] === null) {\n      service.config[key] = value;\n    }\n  });\n}\n\nfunction configureEndpoint(service) {\n  var keys = derivedKeys(service);\n  for (var i = 0; i < keys.length; i++) {\n    var key = keys[i];\n    if (!key) continue;\n\n    if (Object.prototype.hasOwnProperty.call(regionConfig.rules, key)) {\n      var config = regionConfig.rules[key];\n      if (typeof config === 'string') {\n        config = regionConfig.patterns[config];\n      }\n\n      if (service.config.useDualstack && util.isDualstackAvailable(service)) {\n        config = util.copy(config);\n        config.endpoint = '{service}.dualstack.{region}.amazonaws.com';\n      }\n\n      service.isGlobalEndpoint = !!config.globalEndpoint;\n\n      if (!config.signatureVersion) config.signatureVersion = 'v4';\n\n      applyConfig(service, config);\n      return;\n    }\n  }\n}\n\nmodule.exports = configureEndpoint;\n\n},{\"./region_config.json\":232,\"./util\":261}],234:[function(require,module,exports){\n(function (process){\nvar AWS = require('./core');\nvar AcceptorStateMachine = require('./state_machine');\nvar inherit = AWS.util.inherit;\nvar domain = AWS.util.domain;\nvar jmespath = require('jmespath');\n\n\nvar hardErrorStates = {success: 1, error: 1, complete: 1};\n\nfunction isTerminalState(machine) {\n  return Object.prototype.hasOwnProperty.call(hardErrorStates, machine._asm.currentState);\n}\n\nvar fsm = new AcceptorStateMachine();\nfsm.setupStates = function() {\n  var transition = function(_, done) {\n    var self = this;\n    self._haltHandlersOnError = false;\n\n    self.emit(self._asm.currentState, function(err) {\n      if (err) {\n        if (isTerminalState(self)) {\n          if (domain && self.domain instanceof domain.Domain) {\n            err.domainEmitter = self;\n            err.domain = self.domain;\n            err.domainThrown = false;\n            self.domain.emit('error', err);\n          } else {\n            throw err;\n          }\n        } else {\n          self.response.error = err;\n          done(err);\n        }\n      } else {\n        done(self.response.error);\n      }\n    });\n\n  };\n\n  this.addState('validate', 'build', 'error', transition);\n  this.addState('build', 'afterBuild', 'restart', transition);\n  this.addState('afterBuild', 'sign', 'restart', transition);\n  this.addState('sign', 'send', 'retry', transition);\n  this.addState('retry', 'afterRetry', 'afterRetry', transition);\n  this.addState('afterRetry', 'sign', 'error', transition);\n  this.addState('send', 'validateResponse', 'retry', transition);\n  this.addState('validateResponse', 'extractData', 'extractError', transition);\n  this.addState('extractError', 'extractData', 'retry', transition);\n  this.addState('extractData', 'success', 'retry', transition);\n  this.addState('restart', 'build', 'error', transition);\n  this.addState('success', 'complete', 'complete', transition);\n  this.addState('error', 'complete', 'complete', transition);\n  this.addState('complete', null, null, transition);\n};\nfsm.setupStates();\n\n\nAWS.Request = inherit({\n\n\n  constructor: function Request(service, operation, params) {\n    var endpoint = service.endpoint;\n    var region = service.config.region;\n    var customUserAgent = service.config.customUserAgent;\n\n    if (service.isGlobalEndpoint) region = 'us-east-1';\n\n    this.domain = domain && domain.active;\n    this.service = service;\n    this.operation = operation;\n    this.params = params || {};\n    this.httpRequest = new AWS.HttpRequest(endpoint, region);\n    this.httpRequest.appendToUserAgent(customUserAgent);\n    this.startTime = AWS.util.date.getDate();\n\n    this.response = new AWS.Response(this);\n    this._asm = new AcceptorStateMachine(fsm.states, 'validate');\n    this._haltHandlersOnError = false;\n\n    AWS.SequentialExecutor.call(this);\n    this.emit = this.emitEvent;\n  },\n\n\n\n\n  send: function send(callback) {\n    if (callback) {\n      this.httpRequest.appendToUserAgent('callback');\n      this.on('complete', function (resp) {\n        callback.call(resp, resp.error, resp.data);\n      });\n    }\n    this.runTo();\n\n    return this.response;\n  },\n\n\n\n\n  build: function build(callback) {\n    return this.runTo('send', callback);\n  },\n\n\n  runTo: function runTo(state, done) {\n    this._asm.runTo(state, done, this);\n    return this;\n  },\n\n\n  abort: function abort() {\n    this.removeAllListeners('validateResponse');\n    this.removeAllListeners('extractError');\n    this.on('validateResponse', function addAbortedError(resp) {\n      resp.error = AWS.util.error(new Error('Request aborted by user'), {\n         code: 'RequestAbortedError', retryable: false\n      });\n    });\n\n    if (this.httpRequest.stream) { // abort HTTP stream\n      this.httpRequest.stream.abort();\n      if (this.httpRequest._abortCallback) {\n         this.httpRequest._abortCallback();\n      } else {\n        this.removeAllListeners('send'); // haven't sent yet, so let's not\n      }\n    }\n\n    return this;\n  },\n\n\n  eachPage: function eachPage(callback) {\n    callback = AWS.util.fn.makeAsync(callback, 3);\n\n    function wrappedCallback(response) {\n      callback.call(response, response.error, response.data, function (result) {\n        if (result === false) return;\n\n        if (response.hasNextPage()) {\n          response.nextPage().on('complete', wrappedCallback).send();\n        } else {\n          callback.call(response, null, null, AWS.util.fn.noop);\n        }\n      });\n    }\n\n    this.on('complete', wrappedCallback).send();\n  },\n\n\n  eachItem: function eachItem(callback) {\n    var self = this;\n    function wrappedCallback(err, data) {\n      if (err) return callback(err, null);\n      if (data === null) return callback(null, null);\n\n      var config = self.service.paginationConfig(self.operation);\n      var resultKey = config.resultKey;\n      if (Array.isArray(resultKey)) resultKey = resultKey[0];\n      var items = jmespath.search(data, resultKey);\n      var continueIteration = true;\n      AWS.util.arrayEach(items, function(item) {\n        continueIteration = callback(null, item);\n        if (continueIteration === false) {\n          return AWS.util.abort;\n        }\n      });\n      return continueIteration;\n    }\n\n    this.eachPage(wrappedCallback);\n  },\n\n\n  isPageable: function isPageable() {\n    return this.service.paginationConfig(this.operation) ? true : false;\n  },\n\n\n  createReadStream: function createReadStream() {\n    var streams = AWS.util.stream;\n    var req = this;\n    var stream = null;\n\n    if (AWS.HttpClient.streamsApiVersion === 2) {\n      stream = new streams.PassThrough();\n      req.send();\n    } else {\n      stream = new streams.Stream();\n      stream.readable = true;\n\n      stream.sent = false;\n      stream.on('newListener', function(event) {\n        if (!stream.sent && event === 'data') {\n          stream.sent = true;\n          process.nextTick(function() { req.send(); });\n        }\n      });\n    }\n\n    this.on('httpHeaders', function streamHeaders(statusCode, headers, resp) {\n      if (statusCode < 300) {\n        req.removeListener('httpData', AWS.EventListeners.Core.HTTP_DATA);\n        req.removeListener('httpError', AWS.EventListeners.Core.HTTP_ERROR);\n        req.on('httpError', function streamHttpError(error) {\n          resp.error = error;\n          resp.error.retryable = false;\n        });\n\n        var shouldCheckContentLength = false;\n        var expectedLen;\n        if (req.httpRequest.method !== 'HEAD') {\n          expectedLen = parseInt(headers['content-length'], 10);\n        }\n        if (expectedLen !== undefined && !isNaN(expectedLen) && expectedLen >= 0) {\n          shouldCheckContentLength = true;\n          var receivedLen = 0;\n        }\n\n        var checkContentLengthAndEmit = function checkContentLengthAndEmit() {\n          if (shouldCheckContentLength && receivedLen !== expectedLen) {\n            stream.emit('error', AWS.util.error(\n              new Error('Stream content length mismatch. Received ' +\n                receivedLen + ' of ' + expectedLen + ' bytes.'),\n              { code: 'StreamContentLengthMismatch' }\n            ));\n          } else if (AWS.HttpClient.streamsApiVersion === 2) {\n            stream.end();\n          } else {\n            stream.emit('end')\n          }\n        }\n\n        var httpStream = resp.httpResponse.createUnbufferedStream();\n\n        if (AWS.HttpClient.streamsApiVersion === 2) {\n          if (shouldCheckContentLength) {\n            var lengthAccumulator = new streams.PassThrough();\n            lengthAccumulator._write = function(chunk) {\n              if (chunk && chunk.length) {\n                receivedLen += chunk.length;\n              }\n              return streams.PassThrough.prototype._write.apply(this, arguments);\n            };\n\n            lengthAccumulator.on('end', checkContentLengthAndEmit);\n            httpStream.pipe(lengthAccumulator).pipe(stream, { end: false });\n          } else {\n            httpStream.pipe(stream);\n          }\n        } else {\n\n          if (shouldCheckContentLength) {\n            httpStream.on('data', function(arg) {\n              if (arg && arg.length) {\n                receivedLen += arg.length;\n              }\n            });\n          }\n\n          httpStream.on('data', function(arg) {\n            stream.emit('data', arg);\n          });\n          httpStream.on('end', checkContentLengthAndEmit);\n        }\n\n        httpStream.on('error', function(err) {\n          shouldCheckContentLength = false;\n          stream.emit('error', err);\n        });\n      }\n    });\n\n    this.on('error', function(err) {\n      stream.emit('error', err);\n    });\n\n    return stream;\n  },\n\n\n  emitEvent: function emit(eventName, args, done) {\n    if (typeof args === 'function') { done = args; args = null; }\n    if (!done) done = function() { };\n    if (!args) args = this.eventParameters(eventName, this.response);\n\n    var origEmit = AWS.SequentialExecutor.prototype.emit;\n    origEmit.call(this, eventName, args, function (err) {\n      if (err) this.response.error = err;\n      done.call(this, err);\n    });\n  },\n\n\n  eventParameters: function eventParameters(eventName) {\n    switch (eventName) {\n      case 'restart':\n      case 'validate':\n      case 'sign':\n      case 'build':\n      case 'afterValidate':\n      case 'afterBuild':\n        return [this];\n      case 'error':\n        return [this.response.error, this.response];\n      default:\n        return [this.response];\n    }\n  },\n\n\n  presign: function presign(expires, callback) {\n    if (!callback && typeof expires === 'function') {\n      callback = expires;\n      expires = null;\n    }\n    return new AWS.Signers.Presign().sign(this.toGet(), expires, callback);\n  },\n\n\n  isPresigned: function isPresigned() {\n    return Object.prototype.hasOwnProperty.call(this.httpRequest.headers, 'presigned-expires');\n  },\n\n\n  toUnauthenticated: function toUnauthenticated() {\n    this.removeListener('validate', AWS.EventListeners.Core.VALIDATE_CREDENTIALS);\n    this.removeListener('sign', AWS.EventListeners.Core.SIGN);\n    return this;\n  },\n\n\n  toGet: function toGet() {\n    if (this.service.api.protocol === 'query' ||\n        this.service.api.protocol === 'ec2') {\n      this.removeListener('build', this.buildAsGet);\n      this.addListener('build', this.buildAsGet);\n    }\n    return this;\n  },\n\n\n  buildAsGet: function buildAsGet(request) {\n    request.httpRequest.method = 'GET';\n    request.httpRequest.path = request.service.endpoint.path +\n                               '?' + request.httpRequest.body;\n    request.httpRequest.body = '';\n\n    delete request.httpRequest.headers['Content-Length'];\n    delete request.httpRequest.headers['Content-Type'];\n  },\n\n\n  haltHandlersOnError: function haltHandlersOnError() {\n    this._haltHandlersOnError = true;\n  }\n});\n\n\nAWS.Request.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n  this.prototype.promise = function promise() {\n    var self = this;\n    this.httpRequest.appendToUserAgent('promise');\n    return new PromiseDependency(function(resolve, reject) {\n      self.on('complete', function(resp) {\n        if (resp.error) {\n          reject(resp.error);\n        } else {\n          resolve(resp.data);\n        }\n      });\n      self.runTo();\n    });\n  };\n};\n\n\nAWS.Request.deletePromisesFromClass = function deletePromisesFromClass() {\n  delete this.prototype.promise;\n};\n\nAWS.util.addPromises(AWS.Request);\n\nAWS.util.mixin(AWS.Request, AWS.SequentialExecutor);\n\n}).call(this,require('_process'))\n},{\"./core\":201,\"./state_machine\":260,\"_process\":266,\"jmespath\":284}],235:[function(require,module,exports){\n\n\nvar AWS = require('./core');\nvar inherit = AWS.util.inherit;\nvar jmespath = require('jmespath');\n\n\nfunction CHECK_ACCEPTORS(resp) {\n  var waiter = resp.request._waiter;\n  var acceptors = waiter.config.acceptors;\n  var acceptorMatched = false;\n  var state = 'retry';\n\n  acceptors.forEach(function(acceptor) {\n    if (!acceptorMatched) {\n      var matcher = waiter.matchers[acceptor.matcher];\n      if (matcher && matcher(resp, acceptor.expected, acceptor.argument)) {\n        acceptorMatched = true;\n        state = acceptor.state;\n      }\n    }\n  });\n\n  if (!acceptorMatched && resp.error) state = 'failure';\n\n  if (state === 'success') {\n    waiter.setSuccess(resp);\n  } else {\n    waiter.setError(resp, state === 'retry');\n  }\n}\n\n\nAWS.ResourceWaiter = inherit({\n\n  constructor: function constructor(service, state) {\n    this.service = service;\n    this.state = state;\n    this.loadWaiterConfig(this.state);\n  },\n\n  service: null,\n\n  state: null,\n\n  config: null,\n\n  matchers: {\n    path: function(resp, expected, argument) {\n      var result = jmespath.search(resp.data, argument);\n      return jmespath.strictDeepEqual(result,expected);\n    },\n\n    pathAll: function(resp, expected, argument) {\n      var results = jmespath.search(resp.data, argument);\n      if (!Array.isArray(results)) results = [results];\n      var numResults = results.length;\n      if (!numResults) return false;\n      for (var ind = 0 ; ind < numResults; ind++) {\n        if (!jmespath.strictDeepEqual(results[ind], expected)) {\n          return false;\n        }\n      }\n      return true;\n    },\n\n    pathAny: function(resp, expected, argument) {\n      var results = jmespath.search(resp.data, argument);\n      if (!Array.isArray(results)) results = [results];\n      var numResults = results.length;\n      for (var ind = 0 ; ind < numResults; ind++) {\n        if (jmespath.strictDeepEqual(results[ind], expected)) {\n          return true;\n        }\n      }\n      return false;\n    },\n\n    status: function(resp, expected) {\n      var statusCode = resp.httpResponse.statusCode;\n      return (typeof statusCode === 'number') && (statusCode === expected);\n    },\n\n    error: function(resp, expected) {\n      if (typeof expected === 'string' && resp.error) {\n        return expected === resp.error.code;\n      }\n      return expected === !!resp.error;\n    }\n  },\n\n  listeners: new AWS.SequentialExecutor().addNamedListeners(function(add) {\n    add('RETRY_CHECK', 'retry', function(resp) {\n      var waiter = resp.request._waiter;\n      if (resp.error && resp.error.code === 'ResourceNotReady') {\n        resp.error.retryDelay = (waiter.config.delay || 0) * 1000;\n      }\n    });\n\n    add('CHECK_OUTPUT', 'extractData', CHECK_ACCEPTORS);\n\n    add('CHECK_ERROR', 'extractError', CHECK_ACCEPTORS);\n  }),\n\n\n  wait: function wait(params, callback) {\n    if (typeof params === 'function') {\n      callback = params; params = undefined;\n    }\n\n    var request = this.service.makeRequest(this.config.operation, params);\n    request._waiter = this;\n    request.response.maxRetries = this.config.maxAttempts;\n    request.addListeners(this.listeners);\n\n    if (callback) request.send(callback);\n    return request;\n  },\n\n  setSuccess: function setSuccess(resp) {\n    resp.error = null;\n    resp.data = resp.data || {};\n    resp.request.removeAllListeners('extractData');\n  },\n\n  setError: function setError(resp, retryable) {\n    resp.data = null;\n    resp.error = AWS.util.error(resp.error || new Error(), {\n      code: 'ResourceNotReady',\n      message: 'Resource is not in the state ' + this.state,\n      retryable: retryable\n    });\n  },\n\n\n  loadWaiterConfig: function loadWaiterConfig(state) {\n    if (!this.service.api.waiters[state]) {\n      throw new AWS.util.error(new Error(), {\n        code: 'StateNotFoundError',\n        message: 'State ' + state + ' not found.'\n      });\n    }\n\n    this.config = this.service.api.waiters[state];\n  }\n});\n\n},{\"./core\":201,\"jmespath\":284}],236:[function(require,module,exports){\nvar AWS = require('./core');\nvar inherit = AWS.util.inherit;\nvar jmespath = require('jmespath');\n\n\nAWS.Response = inherit({\n\n\n  constructor: function Response(request) {\n    this.request = request;\n    this.data = null;\n    this.error = null;\n    this.retryCount = 0;\n    this.redirectCount = 0;\n    this.httpResponse = new AWS.HttpResponse();\n    if (request) {\n      this.maxRetries = request.service.numRetries();\n      this.maxRedirects = request.service.config.maxRedirects;\n    }\n  },\n\n\n  nextPage: function nextPage(callback) {\n    var config;\n    var service = this.request.service;\n    var operation = this.request.operation;\n    try {\n      config = service.paginationConfig(operation, true);\n    } catch (e) { this.error = e; }\n\n    if (!this.hasNextPage()) {\n      if (callback) callback(this.error, null);\n      else if (this.error) throw this.error;\n      return null;\n    }\n\n    var params = AWS.util.copy(this.request.params);\n    if (!this.nextPageTokens) {\n      return callback ? callback(null, null) : null;\n    } else {\n      var inputTokens = config.inputToken;\n      if (typeof inputTokens === 'string') inputTokens = [inputTokens];\n      for (var i = 0; i < inputTokens.length; i++) {\n        params[inputTokens[i]] = this.nextPageTokens[i];\n      }\n      return service.makeRequest(this.request.operation, params, callback);\n    }\n  },\n\n\n  hasNextPage: function hasNextPage() {\n    this.cacheNextPageTokens();\n    if (this.nextPageTokens) return true;\n    if (this.nextPageTokens === undefined) return undefined;\n    else return false;\n  },\n\n\n  cacheNextPageTokens: function cacheNextPageTokens() {\n    if (Object.prototype.hasOwnProperty.call(this, 'nextPageTokens')) return this.nextPageTokens;\n    this.nextPageTokens = undefined;\n\n    var config = this.request.service.paginationConfig(this.request.operation);\n    if (!config) return this.nextPageTokens;\n\n    this.nextPageTokens = null;\n    if (config.moreResults) {\n      if (!jmespath.search(this.data, config.moreResults)) {\n        return this.nextPageTokens;\n      }\n    }\n\n    var exprs = config.outputToken;\n    if (typeof exprs === 'string') exprs = [exprs];\n    AWS.util.arrayEach.call(this, exprs, function (expr) {\n      var output = jmespath.search(this.data, expr);\n      if (output) {\n        this.nextPageTokens = this.nextPageTokens || [];\n        this.nextPageTokens.push(output);\n      }\n    });\n\n    return this.nextPageTokens;\n  }\n\n});\n\n},{\"./core\":201,\"jmespath\":284}],237:[function(require,module,exports){\nvar AWS = require('../core');\nvar byteLength = AWS.util.string.byteLength;\nvar Buffer = AWS.util.Buffer;\n\n\nAWS.S3.ManagedUpload = AWS.util.inherit({\n\n  constructor: function ManagedUpload(options) {\n    var self = this;\n    AWS.SequentialExecutor.call(self);\n    self.body = null;\n    self.sliceFn = null;\n    self.callback = null;\n    self.parts = {};\n    self.completeInfo = [];\n    self.fillQueue = function() {\n      self.callback(new Error('Unsupported body payload ' + typeof self.body));\n    };\n\n    self.configure(options);\n  },\n\n\n  configure: function configure(options) {\n    options = options || {};\n    this.partSize = this.minPartSize;\n\n    if (options.queueSize) this.queueSize = options.queueSize;\n    if (options.partSize) this.partSize = options.partSize;\n    if (options.leavePartsOnError) this.leavePartsOnError = true;\n\n    if (this.partSize < this.minPartSize) {\n      throw new Error('partSize must be greater than ' +\n                      this.minPartSize);\n    }\n\n    this.service = options.service;\n    this.bindServiceObject(options.params);\n    this.validateBody();\n    this.adjustTotalBytes();\n  },\n\n\n  leavePartsOnError: false,\n\n\n  queueSize: 4,\n\n\n  partSize: null,\n\n\n  minPartSize: 1024 * 1024 * 5,\n\n\n  maxTotalParts: 10000,\n\n\n  send: function(callback) {\n    var self = this;\n    self.failed = false;\n    self.callback = callback || function(err) { if (err) throw err; };\n\n    var runFill = true;\n    if (self.sliceFn) {\n      self.fillQueue = self.fillBuffer;\n    } else if (AWS.util.isNode()) {\n      var Stream = AWS.util.stream.Stream;\n      if (self.body instanceof Stream) {\n        runFill = false;\n        self.fillQueue = self.fillStream;\n        self.partBuffers = [];\n        self.body.\n          on('error', function(err) { self.cleanup(err); }).\n          on('readable', function() { self.fillQueue(); }).\n          on('end', function() {\n            self.isDoneChunking = true;\n            self.numParts = self.totalPartNumbers;\n            self.fillQueue.call(self);\n          });\n      }\n    }\n\n    if (runFill) self.fillQueue.call(self);\n  },\n\n\n\n\n  abort: function() {\n    this.cleanup(AWS.util.error(new Error('Request aborted by user'), {\n      code: 'RequestAbortedError', retryable: false\n    }));\n  },\n\n\n  validateBody: function validateBody() {\n    var self = this;\n    self.body = self.service.config.params.Body;\n    if (!self.body) throw new Error('params.Body is required');\n    if (typeof self.body === 'string') {\n      self.body = new AWS.util.Buffer(self.body);\n    }\n    self.sliceFn = AWS.util.arraySliceFn(self.body);\n  },\n\n\n  bindServiceObject: function bindServiceObject(params) {\n    params = params || {};\n    var self = this;\n\n    if (!self.service) {\n      self.service = new AWS.S3({params: params});\n    } else {\n      var config = AWS.util.copy(self.service.config);\n      self.service = new self.service.constructor.__super__(config);\n      self.service.config.params =\n        AWS.util.merge(self.service.config.params || {}, params);\n    }\n  },\n\n\n  adjustTotalBytes: function adjustTotalBytes() {\n    var self = this;\n    try { // try to get totalBytes\n      self.totalBytes = byteLength(self.body);\n    } catch (e) { }\n\n    if (self.totalBytes) {\n      var newPartSize = Math.ceil(self.totalBytes / self.maxTotalParts);\n      if (newPartSize > self.partSize) self.partSize = newPartSize;\n    } else {\n      self.totalBytes = undefined;\n    }\n  },\n\n\n  isDoneChunking: false,\n\n\n  partPos: 0,\n\n\n  totalChunkedBytes: 0,\n\n\n  totalUploadedBytes: 0,\n\n\n  totalBytes: undefined,\n\n\n  numParts: 0,\n\n\n  totalPartNumbers: 0,\n\n\n  activeParts: 0,\n\n\n  doneParts: 0,\n\n\n  parts: null,\n\n\n  completeInfo: null,\n\n\n  failed: false,\n\n\n  multipartReq: null,\n\n\n  partBuffers: null,\n\n\n  partBufferLength: 0,\n\n\n  fillBuffer: function fillBuffer() {\n    var self = this;\n    var bodyLen = byteLength(self.body);\n\n    if (bodyLen === 0) {\n      self.isDoneChunking = true;\n      self.numParts = 1;\n      self.nextChunk(self.body);\n      return;\n    }\n\n    while (self.activeParts < self.queueSize && self.partPos < bodyLen) {\n      var endPos = Math.min(self.partPos + self.partSize, bodyLen);\n      var buf = self.sliceFn.call(self.body, self.partPos, endPos);\n      self.partPos += self.partSize;\n\n      if (byteLength(buf) < self.partSize || self.partPos === bodyLen) {\n        self.isDoneChunking = true;\n        self.numParts = self.totalPartNumbers + 1;\n      }\n      self.nextChunk(buf);\n    }\n  },\n\n\n  fillStream: function fillStream() {\n    var self = this;\n    if (self.activeParts >= self.queueSize) return;\n\n    var buf = self.body.read(self.partSize - self.partBufferLength) ||\n              self.body.read();\n    if (buf) {\n      self.partBuffers.push(buf);\n      self.partBufferLength += buf.length;\n      self.totalChunkedBytes += buf.length;\n    }\n\n    if (self.partBufferLength >= self.partSize) {\n      var pbuf = self.partBuffers.length === 1 ?\n        self.partBuffers[0] : Buffer.concat(self.partBuffers);\n      self.partBuffers = [];\n      self.partBufferLength = 0;\n\n      if (pbuf.length > self.partSize) {\n        var rest = pbuf.slice(self.partSize);\n        self.partBuffers.push(rest);\n        self.partBufferLength += rest.length;\n        pbuf = pbuf.slice(0, self.partSize);\n      }\n\n      self.nextChunk(pbuf);\n    }\n\n    if (self.isDoneChunking && !self.isDoneSending) {\n      pbuf = self.partBuffers.length === 1 ?\n          self.partBuffers[0] : Buffer.concat(self.partBuffers);\n      self.partBuffers = [];\n      self.partBufferLength = 0;\n      self.totalBytes = self.totalChunkedBytes;\n      self.isDoneSending = true;\n\n      if (self.numParts === 0 || pbuf.length > 0) {\n        self.numParts++;\n        self.nextChunk(pbuf);\n      }\n    }\n\n    self.body.read(0);\n  },\n\n\n  nextChunk: function nextChunk(chunk) {\n    var self = this;\n    if (self.failed) return null;\n\n    var partNumber = ++self.totalPartNumbers;\n    if (self.isDoneChunking && partNumber === 1) {\n      var req = self.service.putObject({Body: chunk});\n      req._managedUpload = self;\n      req.on('httpUploadProgress', self.progress).send(self.finishSinglePart);\n      return null;\n    } else if (self.service.config.params.ContentMD5) {\n      var err = AWS.util.error(new Error('The Content-MD5 you specified is invalid for multi-part uploads.'), {\n        code: 'InvalidDigest', retryable: false\n      });\n\n      self.cleanup(err);\n      return null;\n    }\n\n    if (self.completeInfo[partNumber] && self.completeInfo[partNumber].ETag !== null) {\n      return null; // Already uploaded this part.\n    }\n\n    self.activeParts++;\n    if (!self.service.config.params.UploadId) {\n\n      if (!self.multipartReq) { // create multipart\n        self.multipartReq = self.service.createMultipartUpload();\n        self.multipartReq.on('success', function(resp) {\n          self.service.config.params.UploadId = resp.data.UploadId;\n          self.multipartReq = null;\n        });\n        self.queueChunks(chunk, partNumber);\n        self.multipartReq.on('error', function(err) {\n          self.cleanup(err);\n        });\n        self.multipartReq.send();\n      } else {\n        self.queueChunks(chunk, partNumber);\n      }\n    } else { // multipart is created, just send\n      self.uploadPart(chunk, partNumber);\n    }\n  },\n\n\n  uploadPart: function uploadPart(chunk, partNumber) {\n    var self = this;\n\n    var partParams = {\n      Body: chunk,\n      ContentLength: AWS.util.string.byteLength(chunk),\n      PartNumber: partNumber\n    };\n\n    var partInfo = {ETag: null, PartNumber: partNumber};\n    self.completeInfo[partNumber] = partInfo;\n\n    var req = self.service.uploadPart(partParams);\n    self.parts[partNumber] = req;\n    req._lastUploadedBytes = 0;\n    req._managedUpload = self;\n    req.on('httpUploadProgress', self.progress);\n    req.send(function(err, data) {\n      delete self.parts[partParams.PartNumber];\n      self.activeParts--;\n\n      if (!err && (!data || !data.ETag)) {\n        var message = 'No access to ETag property on response.';\n        if (AWS.util.isBrowser()) {\n          message += ' Check CORS configuration to expose ETag header.';\n        }\n\n        err = AWS.util.error(new Error(message), {\n          code: 'ETagMissing', retryable: false\n        });\n      }\n      if (err) return self.cleanup(err);\n\n      partInfo.ETag = data.ETag;\n      self.doneParts++;\n      if (self.isDoneChunking && self.doneParts === self.numParts) {\n        self.finishMultiPart();\n      } else {\n        self.fillQueue.call(self);\n      }\n    });\n  },\n\n\n  queueChunks: function queueChunks(chunk, partNumber) {\n    var self = this;\n    self.multipartReq.on('success', function() {\n      self.uploadPart(chunk, partNumber);\n    });\n  },\n\n\n  cleanup: function cleanup(err) {\n    var self = this;\n    if (self.failed) return;\n\n    if (typeof self.body.removeAllListeners === 'function' &&\n        typeof self.body.resume === 'function') {\n      self.body.removeAllListeners('readable');\n      self.body.removeAllListeners('end');\n      self.body.resume();\n    }\n\n    if (self.service.config.params.UploadId && !self.leavePartsOnError) {\n      self.service.abortMultipartUpload().send();\n    }\n\n    AWS.util.each(self.parts, function(partNumber, part) {\n      part.removeAllListeners('complete');\n      part.abort();\n    });\n\n    self.activeParts = 0;\n    self.partPos = 0;\n    self.numParts = 0;\n    self.totalPartNumbers = 0;\n    self.parts = {};\n    self.failed = true;\n    self.callback(err);\n  },\n\n\n  finishMultiPart: function finishMultiPart() {\n    var self = this;\n    var completeParams = { MultipartUpload: { Parts: self.completeInfo.slice(1) } };\n    self.service.completeMultipartUpload(completeParams, function(err, data) {\n      if (err) return self.cleanup(err);\n      else self.callback(err, data);\n    });\n  },\n\n\n  finishSinglePart: function finishSinglePart(err, data) {\n    var upload = this.request._managedUpload;\n    var httpReq = this.request.httpRequest;\n    var endpoint = httpReq.endpoint;\n    if (err) return upload.callback(err);\n    data.Location =\n      [endpoint.protocol, '//', endpoint.host, httpReq.path].join('');\n    data.key = this.request.params.Key; // will stay undocumented\n    data.Key = this.request.params.Key;\n    data.Bucket = this.request.params.Bucket;\n    upload.callback(err, data);\n  },\n\n\n  progress: function progress(info) {\n    var upload = this._managedUpload;\n    if (this.operation === 'putObject') {\n      info.part = 1;\n      info.key = this.params.Key;\n    } else {\n      upload.totalUploadedBytes += info.loaded - this._lastUploadedBytes;\n      this._lastUploadedBytes = info.loaded;\n      info = {\n        loaded: upload.totalUploadedBytes,\n        total: upload.totalBytes,\n        part: this.params.PartNumber,\n        key: this.params.Key\n      };\n    }\n    upload.emit('httpUploadProgress', [info]);\n  }\n});\n\nAWS.util.mixin(AWS.S3.ManagedUpload, AWS.SequentialExecutor);\n\n\nAWS.S3.ManagedUpload.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n  this.prototype.promise = AWS.util.promisifyMethod('send', PromiseDependency);\n};\n\n\nAWS.S3.ManagedUpload.deletePromisesFromClass = function deletePromisesFromClass() {\n  delete this.prototype.promise;\n};\n\nAWS.util.addPromises(AWS.S3.ManagedUpload);\n\nmodule.exports = AWS.S3.ManagedUpload;\n\n},{\"../core\":201}],238:[function(require,module,exports){\nvar AWS = require('./core');\n\n\nAWS.SequentialExecutor = AWS.util.inherit({\n\n  constructor: function SequentialExecutor() {\n    this._events = {};\n  },\n\n\n  listeners: function listeners(eventName) {\n    return this._events[eventName] ? this._events[eventName].slice(0) : [];\n  },\n\n  on: function on(eventName, listener) {\n    if (this._events[eventName]) {\n      this._events[eventName].push(listener);\n    } else {\n      this._events[eventName] = [listener];\n    }\n    return this;\n  },\n\n\n  onAsync: function onAsync(eventName, listener) {\n    listener._isAsync = true;\n    return this.on(eventName, listener);\n  },\n\n  removeListener: function removeListener(eventName, listener) {\n    var listeners = this._events[eventName];\n    if (listeners) {\n      var length = listeners.length;\n      var position = -1;\n      for (var i = 0; i < length; ++i) {\n        if (listeners[i] === listener) {\n          position = i;\n        }\n      }\n      if (position > -1) {\n        listeners.splice(position, 1);\n      }\n    }\n    return this;\n  },\n\n  removeAllListeners: function removeAllListeners(eventName) {\n    if (eventName) {\n      delete this._events[eventName];\n    } else {\n      this._events = {};\n    }\n    return this;\n  },\n\n\n  emit: function emit(eventName, eventArgs, doneCallback) {\n    if (!doneCallback) doneCallback = function() { };\n    var listeners = this.listeners(eventName);\n    var count = listeners.length;\n    this.callListeners(listeners, eventArgs, doneCallback);\n    return count > 0;\n  },\n\n\n  callListeners: function callListeners(listeners, args, doneCallback, prevError) {\n    var self = this;\n    var error = prevError || null;\n\n    function callNextListener(err) {\n      if (err) {\n        error = AWS.util.error(error || new Error(), err);\n        if (self._haltHandlersOnError) {\n          return doneCallback.call(self, error);\n        }\n      }\n      self.callListeners(listeners, args, doneCallback, error);\n    }\n\n    while (listeners.length > 0) {\n      var listener = listeners.shift();\n      if (listener._isAsync) { // asynchronous listener\n        listener.apply(self, args.concat([callNextListener]));\n        return; // stop here, callNextListener will continue\n      } else { // synchronous listener\n        try {\n          listener.apply(self, args);\n        } catch (err) {\n          error = AWS.util.error(error || new Error(), err);\n        }\n        if (error && self._haltHandlersOnError) {\n          doneCallback.call(self, error);\n          return;\n        }\n      }\n    }\n    doneCallback.call(self, error);\n  },\n\n\n  addListeners: function addListeners(listeners) {\n    var self = this;\n\n    if (listeners._events) listeners = listeners._events;\n\n    AWS.util.each(listeners, function(event, callbacks) {\n      if (typeof callbacks === 'function') callbacks = [callbacks];\n      AWS.util.arrayEach(callbacks, function(callback) {\n        self.on(event, callback);\n      });\n    });\n\n    return self;\n  },\n\n\n  addNamedListener: function addNamedListener(name, eventName, callback) {\n    this[name] = callback;\n    this.addListener(eventName, callback);\n    return this;\n  },\n\n\n  addNamedAsyncListener: function addNamedAsyncListener(name, eventName, callback) {\n    callback._isAsync = true;\n    return this.addNamedListener(name, eventName, callback);\n  },\n\n\n  addNamedListeners: function addNamedListeners(callback) {\n    var self = this;\n    callback(\n      function() {\n        self.addNamedListener.apply(self, arguments);\n      },\n      function() {\n        self.addNamedAsyncListener.apply(self, arguments);\n      }\n    );\n    return this;\n  }\n});\n\n\nAWS.SequentialExecutor.prototype.addListener = AWS.SequentialExecutor.prototype.on;\n\nmodule.exports = AWS.SequentialExecutor;\n\n},{\"./core\":201}],239:[function(require,module,exports){\nvar AWS = require('./core');\nvar Api = require('./model/api');\nvar regionConfig = require('./region_config');\nvar inherit = AWS.util.inherit;\nvar clientCount = 0;\n\n\nAWS.Service = inherit({\n\n  constructor: function Service(config) {\n    if (!this.loadServiceClass) {\n      throw AWS.util.error(new Error(),\n        'Service must be constructed with `new\\' operator');\n    }\n    var ServiceClass = this.loadServiceClass(config || {});\n    if (ServiceClass) {\n      var originalConfig = AWS.util.copy(config);\n      var svc = new ServiceClass(config);\n      Object.defineProperty(svc, '_originalConfig', {\n        get: function() { return originalConfig; },\n        enumerable: false,\n        configurable: true\n      });\n      svc._clientId = ++clientCount;\n      return svc;\n    }\n    this.initialize(config);\n  },\n\n\n  initialize: function initialize(config) {\n    var svcConfig = AWS.config[this.serviceIdentifier];\n\n    this.config = new AWS.Config(AWS.config);\n    if (svcConfig) this.config.update(svcConfig, true);\n    if (config) this.config.update(config, true);\n\n    this.validateService();\n    if (!this.config.endpoint) regionConfig(this);\n\n    this.config.endpoint = this.endpointFromTemplate(this.config.endpoint);\n    this.setEndpoint(this.config.endpoint);\n  },\n\n\n  validateService: function validateService() {\n  },\n\n\n  loadServiceClass: function loadServiceClass(serviceConfig) {\n    var config = serviceConfig;\n    if (!AWS.util.isEmpty(this.api)) {\n      return null;\n    } else if (config.apiConfig) {\n      return AWS.Service.defineServiceApi(this.constructor, config.apiConfig);\n    } else if (!this.constructor.services) {\n      return null;\n    } else {\n      config = new AWS.Config(AWS.config);\n      config.update(serviceConfig, true);\n      var version = config.apiVersions[this.constructor.serviceIdentifier];\n      version = version || config.apiVersion;\n      return this.getLatestServiceClass(version);\n    }\n  },\n\n\n  getLatestServiceClass: function getLatestServiceClass(version) {\n    version = this.getLatestServiceVersion(version);\n    if (this.constructor.services[version] === null) {\n      AWS.Service.defineServiceApi(this.constructor, version);\n    }\n\n    return this.constructor.services[version];\n  },\n\n\n  getLatestServiceVersion: function getLatestServiceVersion(version) {\n    if (!this.constructor.services || this.constructor.services.length === 0) {\n      throw new Error('No services defined on ' +\n                      this.constructor.serviceIdentifier);\n    }\n\n    if (!version) {\n      version = 'latest';\n    } else if (AWS.util.isType(version, Date)) {\n      version = AWS.util.date.iso8601(version).split('T')[0];\n    }\n\n    if (Object.hasOwnProperty(this.constructor.services, version)) {\n      return version;\n    }\n\n    var keys = Object.keys(this.constructor.services).sort();\n    var selectedVersion = null;\n    for (var i = keys.length - 1; i >= 0; i--) {\n      if (keys[i][keys[i].length - 1] !== '*') {\n        selectedVersion = keys[i];\n      }\n      if (keys[i].substr(0, 10) <= version) {\n        return selectedVersion;\n      }\n    }\n\n    throw new Error('Could not find ' + this.constructor.serviceIdentifier +\n                    ' API to satisfy version constraint `' + version + '\\'');\n  },\n\n\n  api: {},\n\n\n  defaultRetryCount: 3,\n\n\n  customizeRequests: function customizeRequests(callback) {\n    if (!callback) {\n      this.customRequestHandler = null;\n    } else if (typeof callback === 'function') {\n      this.customRequestHandler = callback;\n    } else {\n      throw new Error('Invalid callback type \\'' + typeof callback + '\\' provided in customizeRequests');\n    }\n  },\n\n\n  makeRequest: function makeRequest(operation, params, callback) {\n    if (typeof params === 'function') {\n      callback = params;\n      params = null;\n    }\n\n    params = params || {};\n    if (this.config.params) { // copy only toplevel bound params\n      var rules = this.api.operations[operation];\n      if (rules) {\n        params = AWS.util.copy(params);\n        AWS.util.each(this.config.params, function(key, value) {\n          if (rules.input.members[key]) {\n            if (params[key] === undefined || params[key] === null) {\n              params[key] = value;\n            }\n          }\n        });\n      }\n    }\n\n    var request = new AWS.Request(this, operation, params);\n    this.addAllRequestListeners(request);\n\n    if (callback) request.send(callback);\n    return request;\n  },\n\n\n  makeUnauthenticatedRequest: function makeUnauthenticatedRequest(operation, params, callback) {\n    if (typeof params === 'function') {\n      callback = params;\n      params = {};\n    }\n\n    var request = this.makeRequest(operation, params).toUnauthenticated();\n    return callback ? request.send(callback) : request;\n  },\n\n\n  waitFor: function waitFor(state, params, callback) {\n    var waiter = new AWS.ResourceWaiter(this, state);\n    return waiter.wait(params, callback);\n  },\n\n\n  addAllRequestListeners: function addAllRequestListeners(request) {\n    var list = [AWS.events, AWS.EventListeners.Core, this.serviceInterface(),\n                AWS.EventListeners.CorePost];\n    for (var i = 0; i < list.length; i++) {\n      if (list[i]) request.addListeners(list[i]);\n    }\n\n    if (!this.config.paramValidation) {\n      request.removeListener('validate',\n        AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n    }\n\n    if (this.config.logger) { // add logging events\n      request.addListeners(AWS.EventListeners.Logger);\n    }\n\n    this.setupRequestListeners(request);\n    if (typeof this.constructor.prototype.customRequestHandler === 'function') {\n      this.constructor.prototype.customRequestHandler(request);\n    }\n    if (Object.prototype.hasOwnProperty.call(this, 'customRequestHandler') && typeof this.customRequestHandler === 'function') {\n      this.customRequestHandler(request);\n    }\n  },\n\n\n  setupRequestListeners: function setupRequestListeners() {\n  },\n\n\n  getSignerClass: function getSignerClass() {\n    var version;\n    if (this.config.signatureVersion) {\n      version = this.config.signatureVersion;\n    } else {\n      version = this.api.signatureVersion;\n    }\n    return AWS.Signers.RequestSigner.getVersion(version);\n  },\n\n\n  serviceInterface: function serviceInterface() {\n    switch (this.api.protocol) {\n      case 'ec2': return AWS.EventListeners.Query;\n      case 'query': return AWS.EventListeners.Query;\n      case 'json': return AWS.EventListeners.Json;\n      case 'rest-json': return AWS.EventListeners.RestJson;\n      case 'rest-xml': return AWS.EventListeners.RestXml;\n    }\n    if (this.api.protocol) {\n      throw new Error('Invalid service `protocol\\' ' +\n        this.api.protocol + ' in API config');\n    }\n  },\n\n\n  successfulResponse: function successfulResponse(resp) {\n    return resp.httpResponse.statusCode < 300;\n  },\n\n\n  numRetries: function numRetries() {\n    if (this.config.maxRetries !== undefined) {\n      return this.config.maxRetries;\n    } else {\n      return this.defaultRetryCount;\n    }\n  },\n\n\n  retryDelays: function retryDelays(retryCount) {\n    return AWS.util.calculateRetryDelay(retryCount, this.config.retryDelayOptions);\n  },\n\n\n  retryableError: function retryableError(error) {\n    if (this.networkingError(error)) return true;\n    if (this.expiredCredentialsError(error)) return true;\n    if (this.throttledError(error)) return true;\n    if (error.statusCode >= 500) return true;\n    return false;\n  },\n\n\n  networkingError: function networkingError(error) {\n    return error.code === 'NetworkingError';\n  },\n\n\n  expiredCredentialsError: function expiredCredentialsError(error) {\n    return (error.code === 'ExpiredTokenException');\n  },\n\n\n  clockSkewError: function clockSkewError(error) {\n    switch (error.code) {\n      case 'RequestTimeTooSkewed':\n      case 'RequestExpired':\n      case 'InvalidSignatureException':\n      case 'SignatureDoesNotMatch':\n      case 'AuthFailure':\n      case 'RequestInTheFuture':\n        return true;\n      default: return false;\n    }\n  },\n\n\n  throttledError: function throttledError(error) {\n    switch (error.code) {\n      case 'ProvisionedThroughputExceededException':\n      case 'Throttling':\n      case 'ThrottlingException':\n      case 'RequestLimitExceeded':\n      case 'RequestThrottled':\n        return true;\n      default:\n        return false;\n    }\n  },\n\n\n  endpointFromTemplate: function endpointFromTemplate(endpoint) {\n    if (typeof endpoint !== 'string') return endpoint;\n\n    var e = endpoint;\n    e = e.replace(/\\{service\\}/g, this.api.endpointPrefix);\n    e = e.replace(/\\{region\\}/g, this.config.region);\n    e = e.replace(/\\{scheme\\}/g, this.config.sslEnabled ? 'https' : 'http');\n    return e;\n  },\n\n\n  setEndpoint: function setEndpoint(endpoint) {\n    this.endpoint = new AWS.Endpoint(endpoint, this.config);\n  },\n\n\n  paginationConfig: function paginationConfig(operation, throwException) {\n    var paginator = this.api.operations[operation].paginator;\n    if (!paginator) {\n      if (throwException) {\n        var e = new Error();\n        throw AWS.util.error(e, 'No pagination configuration for ' + operation);\n      }\n      return null;\n    }\n\n    return paginator;\n  }\n});\n\nAWS.util.update(AWS.Service, {\n\n\n  defineMethods: function defineMethods(svc) {\n    AWS.util.each(svc.prototype.api.operations, function iterator(method) {\n      if (svc.prototype[method]) return;\n      var operation = svc.prototype.api.operations[method];\n      if (operation.authtype === 'none') {\n        svc.prototype[method] = function (params, callback) {\n          return this.makeUnauthenticatedRequest(method, params, callback);\n        };\n      } else {\n        svc.prototype[method] = function (params, callback) {\n          return this.makeRequest(method, params, callback);\n        };\n      }\n    });\n  },\n\n\n  defineService: function defineService(serviceIdentifier, versions, features) {\n    AWS.Service._serviceMap[serviceIdentifier] = true;\n    if (!Array.isArray(versions)) {\n      features = versions;\n      versions = [];\n    }\n\n    var svc = inherit(AWS.Service, features || {});\n\n    if (typeof serviceIdentifier === 'string') {\n      AWS.Service.addVersions(svc, versions);\n\n      var identifier = svc.serviceIdentifier || serviceIdentifier;\n      svc.serviceIdentifier = identifier;\n    } else { // defineService called with an API\n      svc.prototype.api = serviceIdentifier;\n      AWS.Service.defineMethods(svc);\n    }\n\n    return svc;\n  },\n\n\n  addVersions: function addVersions(svc, versions) {\n    if (!Array.isArray(versions)) versions = [versions];\n\n    svc.services = svc.services || {};\n    for (var i = 0; i < versions.length; i++) {\n      if (svc.services[versions[i]] === undefined) {\n        svc.services[versions[i]] = null;\n      }\n    }\n\n    svc.apiVersions = Object.keys(svc.services).sort();\n  },\n\n\n  defineServiceApi: function defineServiceApi(superclass, version, apiConfig) {\n    var svc = inherit(superclass, {\n      serviceIdentifier: superclass.serviceIdentifier\n    });\n\n    function setApi(api) {\n      if (api.isApi) {\n        svc.prototype.api = api;\n      } else {\n        svc.prototype.api = new Api(api);\n      }\n    }\n\n    if (typeof version === 'string') {\n      if (apiConfig) {\n        setApi(apiConfig);\n      } else {\n        try {\n          setApi(AWS.apiLoader(superclass.serviceIdentifier, version));\n        } catch (err) {\n          throw AWS.util.error(err, {\n            message: 'Could not find API configuration ' +\n              superclass.serviceIdentifier + '-' + version\n          });\n        }\n      }\n      if (!Object.prototype.hasOwnProperty.call(superclass.services, version)) {\n        superclass.apiVersions = superclass.apiVersions.concat(version).sort();\n      }\n      superclass.services[version] = svc;\n    } else {\n      setApi(version);\n    }\n\n    AWS.Service.defineMethods(svc);\n    return svc;\n  },\n\n\n  hasService: function(identifier) {\n    return Object.prototype.hasOwnProperty.call(AWS.Service._serviceMap, identifier);\n  },\n\n\n  _serviceMap: {}\n});\n\nmodule.exports = AWS.Service;\n},{\"./core\":201,\"./model/api\":218,\"./region_config\":233}],240:[function(require,module,exports){\nvar AWS = require('../core');\n\nAWS.util.update(AWS.APIGateway.prototype, {\n\n  setAcceptHeader: function setAcceptHeader(req) {\n    var httpRequest = req.httpRequest;\n    httpRequest.headers['Accept'] = 'application/json';\n  },\n\n\n  setupRequestListeners: function setupRequestListeners(request) {\n    request.addListener('build', this.setAcceptHeader);\n    if (request.operation === 'getSdk') {\n      request.addListener('extractData', this.useRawPayload);\n    }\n  },\n\n  useRawPayload: function useRawPayload(resp) {\n    var req = resp.request;\n    var operation = req.operation;\n    var rules = req.service.api.operations[operation].output || {};\n    if (rules.payload) {\n      var body = resp.httpResponse.body;\n      resp.data[rules.payload] = body;\n    }\n  }\n});\n\n\n},{\"../core\":201}],241:[function(require,module,exports){\nvar AWS = require('../core');\n\nrequire('../cloudfront/signer');\n\nAWS.util.update(AWS.CloudFront.prototype, {\n\n  setupRequestListeners: function setupRequestListeners(request) {\n    request.addListener('extractData', AWS.util.hoistPayloadMember);\n  }\n\n});\n\n},{\"../cloudfront/signer\":199,\"../core\":201}],242:[function(require,module,exports){\nvar AWS = require('../core');\n\nAWS.util.update(AWS.CognitoIdentity.prototype, {\n  getOpenIdToken: function getOpenIdToken(params, callback) {\n    return this.makeUnauthenticatedRequest('getOpenIdToken', params, callback);\n  },\n\n  getId: function getId(params, callback) {\n    return this.makeUnauthenticatedRequest('getId', params, callback);\n  },\n\n  getCredentialsForIdentity: function getCredentialsForIdentity(params, callback) {\n    return this.makeUnauthenticatedRequest('getCredentialsForIdentity', params, callback);\n  }\n});\n\n},{\"../core\":201}],243:[function(require,module,exports){\nvar AWS = require('../core');\nrequire('../dynamodb/document_client');\n\nAWS.util.update(AWS.DynamoDB.prototype, {\n\n  setupRequestListeners: function setupRequestListeners(request) {\n    if (request.service.config.dynamoDbCrc32) {\n      request.removeListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA);\n      request.addListener('extractData', this.checkCrc32);\n      request.addListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA);\n    }\n  },\n\n\n  checkCrc32: function checkCrc32(resp) {\n    if (!resp.httpResponse.streaming && !resp.request.service.crc32IsValid(resp)) {\n      resp.data = null;\n      resp.error = AWS.util.error(new Error(), {\n        code: 'CRC32CheckFailed',\n        message: 'CRC32 integrity check failed',\n        retryable: true\n      });\n      resp.request.haltHandlersOnError();\n      throw (resp.error);\n    }\n  },\n\n\n  crc32IsValid: function crc32IsValid(resp) {\n    var crc = resp.httpResponse.headers['x-amz-crc32'];\n    if (!crc) return true; // no (valid) CRC32 header\n    return parseInt(crc, 10) === AWS.util.crypto.crc32(resp.httpResponse.body);\n  },\n\n\n  defaultRetryCount: 10,\n\n\n  retryDelays: function retryDelays(retryCount) {\n    var delay = retryCount > 0 ? (50 * Math.pow(2, retryCount - 1)) : 0;\n    return delay;\n  }\n});\n\n},{\"../core\":201,\"../dynamodb/document_client\":209}],244:[function(require,module,exports){\nvar AWS = require('../core');\n\nAWS.util.update(AWS.EC2.prototype, {\n\n  setupRequestListeners: function setupRequestListeners(request) {\n    request.removeListener('extractError', AWS.EventListeners.Query.EXTRACT_ERROR);\n    request.addListener('extractError', this.extractError);\n\n    if (request.operation === 'copySnapshot') {\n      request.onAsync('validate', this.buildCopySnapshotPresignedUrl);\n    }\n  },\n\n\n  buildCopySnapshotPresignedUrl: function buildCopySnapshotPresignedUrl(req, done) {\n    if (req.params.PresignedUrl || req._subRequest) {\n      return done();\n    }\n\n    req.params = AWS.util.copy(req.params);\n    req.params.DestinationRegion = req.service.config.region;\n\n    var config = AWS.util.copy(req.service.config);\n    delete config.endpoint;\n    config.region = req.params.SourceRegion;\n    var svc = new req.service.constructor(config);\n    var newReq = svc[req.operation](req.params);\n    newReq._subRequest = true;\n    newReq.presign(function(err, url) {\n      if (err) done(err);\n      else {\n        req.params.PresignedUrl = url;\n        done();\n      }\n    });\n  },\n\n\n  extractError: function extractError(resp) {\n    var httpResponse = resp.httpResponse;\n    var data = new AWS.XML.Parser().parse(httpResponse.body.toString() || '');\n    if (data.Errors) {\n      resp.error = AWS.util.error(new Error(), {\n        code: data.Errors.Error.Code,\n        message: data.Errors.Error.Message\n      });\n    } else {\n      resp.error = AWS.util.error(new Error(), {\n        code: httpResponse.statusCode,\n        message: null\n      });\n    }\n    resp.error.requestId = data.RequestID || null;\n  }\n});\n\n},{\"../core\":201}],245:[function(require,module,exports){\nvar AWS = require('../core');\n\n\nAWS.util.update(AWS.IotData.prototype, {\n\n    validateService: function validateService() {\n        if (!this.config.endpoint || this.config.endpoint.indexOf('{') >= 0) {\n            var msg = 'AWS.IotData requires an explicit ' +\n                '`endpoint\\' configuration option.';\n            throw AWS.util.error(new Error(),\n                {name: 'InvalidEndpoint', message: msg});\n        }\n    },\n\n\n    setupRequestListeners: function setupRequestListeners(request) {\n        request.addListener('validateResponse', this.validateResponseBody)\n    },\n\n\n    validateResponseBody: function validateResponseBody(resp) {\n        var body = resp.httpResponse.body.toString() || '{}';\n        var bodyCheck = body.trim();\n        if (!bodyCheck || bodyCheck.charAt(0) !== '{') {\n            resp.httpResponse.body = '';\n        }\n    }\n\n});\n\n},{\"../core\":201}],246:[function(require,module,exports){\nvar AWS = require('../core');\n\nAWS.util.update(AWS.MachineLearning.prototype, {\n\n  setupRequestListeners: function setupRequestListeners(request) {\n    if (request.operation === 'predict') {\n      request.addListener('build', this.buildEndpoint);\n    }\n  },\n\n\n  buildEndpoint: function buildEndpoint(request) {\n    var url = request.params.PredictEndpoint;\n    if (url) {\n      request.httpRequest.endpoint = new AWS.Endpoint(url);\n    }\n  }\n\n});\n\n},{\"../core\":201}],247:[function(require,module,exports){\nrequire('../polly/presigner');\n},{\"../polly/presigner\":225}],248:[function(require,module,exports){\nvar AWS = require('../core');\n\n\n var crossRegionOperations = ['copyDBSnapshot', 'createDBInstanceReadReplica'];\n\n AWS.util.update(AWS.RDS.prototype, {\n\n   setupRequestListeners: function setupRequestListeners(request) {\n     if (crossRegionOperations.indexOf(request.operation) !== -1 &&\n         request.params.SourceRegion) {\n       request.params = AWS.util.copy(request.params);\n       if (request.params.PreSignedUrl ||\n           request.params.SourceRegion === this.config.region) {\n         delete request.params.SourceRegion;\n       } else {\n         var doesParamValidation = !!this.config.paramValidation;\n         if (doesParamValidation) {\n           request.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n         }\n         request.onAsync('validate', this.buildCrossRegionPresignedUrl);\n         if (doesParamValidation) {\n           request.addListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n         }\n       }\n     }\n   },\n\n\n   buildCrossRegionPresignedUrl: function buildCrossRegionPresignedUrl(req, done) {\n     var config = AWS.util.copy(req.service.config);\n     config.region = req.params.SourceRegion;\n     delete req.params.SourceRegion;\n     delete config.endpoint;\n     delete config.params;\n     config.signatureVersion = 'v4';\n     var destinationRegion = req.service.config.region;\n\n     var svc = new req.service.constructor(config);\n     var newReq = svc[req.operation](AWS.util.copy(req.params));\n     newReq.on('build', function addDestinationRegionParam(request) {\n       var httpRequest = request.httpRequest;\n       httpRequest.params.DestinationRegion = destinationRegion;\n       httpRequest.body = AWS.util.queryParamsToString(httpRequest.params);\n     });\n     newReq.presign(function(err, url) {\n       if (err) done(err);\n       else {\n         req.params.PreSignedUrl = url;\n         done();\n       }\n     });\n   }\n });\n},{\"../core\":201}],249:[function(require,module,exports){\nvar AWS = require('../core');\n\nAWS.util.update(AWS.Route53.prototype, {\n\n  setupRequestListeners: function setupRequestListeners(request) {\n    request.on('build', this.sanitizeUrl);\n  },\n\n\n  sanitizeUrl: function sanitizeUrl(request) {\n    var path = request.httpRequest.path;\n    request.httpRequest.path = path.replace(/\\/%2F\\w+%2F/, '/');\n  },\n\n\n  retryableError: function retryableError(error) {\n    if (error.code === 'PriorRequestNotComplete' &&\n        error.statusCode === 400) {\n      return true;\n    } else {\n      var _super = AWS.Service.prototype.retryableError;\n      return _super.call(this, error);\n    }\n  }\n});\n\n},{\"../core\":201}],250:[function(require,module,exports){\nvar AWS = require('../core');\n\nrequire('../s3/managed_upload');\n\n\nvar operationsWith200StatusCodeError = {\n  'completeMultipartUpload': true,\n  'copyObject': true,\n  'uploadPartCopy': true\n};\n\n\n var regionRedirectErrorCodes = [\n  'AuthorizationHeaderMalformed', // non-head operations on virtual-hosted global bucket endpoints\n  'BadRequest', // head operations on virtual-hosted global bucket endpoints\n  'PermanentRedirect', // non-head operations on path-style or regional endpoints\n  301 // head operations on path-style or regional endpoints\n ];\n\nAWS.util.update(AWS.S3.prototype, {\n\n  getSignerClass: function getSignerClass(request) {\n    var defaultApiVersion = this.api.signatureVersion;\n    var userDefinedVersion = this._originalConfig ? this._originalConfig.signatureVersion : null;\n    var regionDefinedVersion = this.config.signatureVersion;\n    var isPresigned = request ? request.isPresigned() : false;\n\n    if (userDefinedVersion) {\n      userDefinedVersion = userDefinedVersion === 'v2' ? 's3' : userDefinedVersion;\n      return AWS.Signers.RequestSigner.getVersion(userDefinedVersion);\n    }\n    if (regionDefinedVersion) {\n      defaultApiVersion = regionDefinedVersion;\n    }\n\n    return AWS.Signers.RequestSigner.getVersion(defaultApiVersion);\n  },\n\n\n  validateService: function validateService() {\n    var msg;\n    var messages = [];\n\n    if (!this.config.region) this.config.region = 'us-east-1';\n\n    if (!this.config.endpoint && this.config.s3BucketEndpoint) {\n      messages.push('An endpoint must be provided when configuring ' +\n                    '`s3BucketEndpoint` to true.');\n    }\n    if (messages.length === 1) {\n      msg = messages[0];\n    } else if (messages.length > 1) {\n      msg = 'Multiple configuration errors:\\n' + messages.join('\\n');\n    }\n    if (msg) {\n      throw AWS.util.error(new Error(),\n        {name: 'InvalidEndpoint', message: msg});\n    }\n  },\n\n\n  shouldDisableBodySigning: function shouldDisableBodySigning(request) {\n    var signerClass = this.getSignerClass();\n    if (this.config.s3DisableBodySigning === true && signerClass === AWS.Signers.V4\n        && request.httpRequest.endpoint.protocol === 'https:') {\n      return true;\n    }\n    return false;\n  },\n\n\n  setupRequestListeners: function setupRequestListeners(request) {\n    request.addListener('validate', this.validateScheme);\n    request.addListener('validate', this.validateBucketEndpoint);\n    request.addListener('validate', this.correctBucketRegionFromCache);\n    request.addListener('build', this.addContentType);\n    request.addListener('build', this.populateURI);\n    request.addListener('build', this.computeContentMd5);\n    request.addListener('build', this.computeSseCustomerKeyMd5);\n    request.addListener('afterBuild', this.addExpect100Continue);\n    request.removeListener('validate',\n      AWS.EventListeners.Core.VALIDATE_REGION);\n    request.addListener('extractError', this.extractError);\n    request.onAsync('extractError', this.requestBucketRegion);\n    request.addListener('extractData', this.extractData);\n    request.addListener('extractData', AWS.util.hoistPayloadMember);\n    request.addListener('beforePresign', this.prepareSignedUrl);\n    if (AWS.util.isBrowser()) {\n      request.onAsync('retry', this.reqRegionForNetworkingError);\n    }\n    if (this.shouldDisableBodySigning(request))  {\n      request.removeListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256);\n      request.addListener('afterBuild', this.disableBodySigning);\n    }\n  },\n\n\n  validateScheme: function(req) {\n    var params = req.params,\n        scheme = req.httpRequest.endpoint.protocol,\n        sensitive = params.SSECustomerKey || params.CopySourceSSECustomerKey;\n    if (sensitive && scheme !== 'https:') {\n      var msg = 'Cannot send SSE keys over HTTP. Set \\'sslEnabled\\'' +\n        'to \\'true\\' in your configuration';\n      throw AWS.util.error(new Error(),\n        { code: 'ConfigError', message: msg });\n    }\n  },\n\n\n  validateBucketEndpoint: function(req) {\n    if (!req.params.Bucket && req.service.config.s3BucketEndpoint) {\n      var msg = 'Cannot send requests to root API with `s3BucketEndpoint` set.';\n      throw AWS.util.error(new Error(),\n        { code: 'ConfigError', message: msg });\n    }\n  },\n\n\n  isValidAccelerateOperation: function isValidAccelerateOperation(operation) {\n    var invalidOperations = [\n      'createBucket',\n      'deleteBucket',\n      'listBuckets'\n    ];\n    return invalidOperations.indexOf(operation) === -1;\n  },\n\n\n\n  populateURI: function populateURI(req) {\n    var httpRequest = req.httpRequest;\n    var b = req.params.Bucket;\n    var service = req.service;\n    var endpoint = httpRequest.endpoint;\n\n    if (b) {\n      if (!service.pathStyleBucketName(b)) {\n        if (service.config.useAccelerateEndpoint && service.isValidAccelerateOperation(req.operation)) {\n          if (service.config.useDualstack) {\n            endpoint.hostname = b + '.s3-accelerate.dualstack.amazonaws.com';\n          } else {\n            endpoint.hostname = b + '.s3-accelerate.amazonaws.com';\n          }\n        } else if (!service.config.s3BucketEndpoint) {\n          endpoint.hostname =\n            b + '.' + endpoint.hostname;\n        }\n\n        var port = endpoint.port;\n        if (port !== 80 && port !== 443) {\n          endpoint.host = endpoint.hostname + ':' +\n            endpoint.port;\n        } else {\n          endpoint.host = endpoint.hostname;\n        }\n\n        httpRequest.virtualHostedBucket = b; // needed for signing the request\n        service.removeVirtualHostedBucketFromPath(req);\n      }\n    }\n  },\n\n\n  removeVirtualHostedBucketFromPath: function removeVirtualHostedBucketFromPath(req) {\n    var httpRequest = req.httpRequest;\n    var bucket = httpRequest.virtualHostedBucket;\n    if (bucket && httpRequest.path) {\n      httpRequest.path = httpRequest.path.replace(new RegExp('/' + bucket), '');\n      if (httpRequest.path[0] !== '/') {\n        httpRequest.path = '/' + httpRequest.path;\n      }\n    }\n  },\n\n\n  addExpect100Continue: function addExpect100Continue(req) {\n    var len = req.httpRequest.headers['Content-Length'];\n    if (AWS.util.isNode() && len >= 1024 * 1024) {\n      req.httpRequest.headers['Expect'] = '100-continue';\n    }\n  },\n\n\n  addContentType: function addContentType(req) {\n    var httpRequest = req.httpRequest;\n    if (httpRequest.method === 'GET' || httpRequest.method === 'HEAD') {\n      delete httpRequest.headers['Content-Type'];\n      return;\n    }\n\n    if (!httpRequest.headers['Content-Type']) { // always have a Content-Type\n      httpRequest.headers['Content-Type'] = 'application/octet-stream';\n    }\n\n    var contentType = httpRequest.headers['Content-Type'];\n    if (AWS.util.isBrowser()) {\n      if (typeof httpRequest.body === 'string' && !contentType.match(/;\\s*charset=/)) {\n        var charset = '; charset=UTF-8';\n        httpRequest.headers['Content-Type'] += charset;\n      } else {\n        var replaceFn = function(_, prefix, charsetName) {\n          return prefix + charsetName.toUpperCase();\n        };\n\n        httpRequest.headers['Content-Type'] =\n          contentType.replace(/(;\\s*charset=)(.+)$/, replaceFn);\n      }\n    }\n  },\n\n\n  computableChecksumOperations: {\n    putBucketCors: true,\n    putBucketLifecycle: true,\n    putBucketLifecycleConfiguration: true,\n    putBucketTagging: true,\n    deleteObjects: true,\n    putBucketReplication: true\n  },\n\n\n  willComputeChecksums: function willComputeChecksums(req) {\n    if (this.computableChecksumOperations[req.operation]) return true;\n    if (!this.config.computeChecksums) return false;\n\n    if (!AWS.util.Buffer.isBuffer(req.httpRequest.body) &&\n        typeof req.httpRequest.body !== 'string') {\n      return false;\n    }\n\n    var rules = req.service.api.operations[req.operation].input.members;\n\n    if (req.service.shouldDisableBodySigning(req) && !Object.prototype.hasOwnProperty.call(req.httpRequest.headers, 'presigned-expires')) {\n      if (rules.ContentMD5 && !req.params.ContentMD5) {\n        return true;\n      }\n    }\n\n    if (req.service.getSignerClass(req) === AWS.Signers.V4) {\n      if (rules.ContentMD5 && !rules.ContentMD5.required) return false;\n    }\n\n    if (rules.ContentMD5 && !req.params.ContentMD5) return true;\n  },\n\n\n  computeContentMd5: function computeContentMd5(req) {\n    if (req.service.willComputeChecksums(req)) {\n      var md5 = AWS.util.crypto.md5(req.httpRequest.body, 'base64');\n      req.httpRequest.headers['Content-MD5'] = md5;\n    }\n  },\n\n\n  computeSseCustomerKeyMd5: function computeSseCustomerKeyMd5(req) {\n    var keys = {\n      SSECustomerKey: 'x-amz-server-side-encryption-customer-key-MD5',\n      CopySourceSSECustomerKey: 'x-amz-copy-source-server-side-encryption-customer-key-MD5'\n    };\n    AWS.util.each(keys, function(key, header) {\n      if (req.params[key]) {\n        var value = AWS.util.crypto.md5(req.params[key], 'base64');\n        req.httpRequest.headers[header] = value;\n      }\n    });\n  },\n\n\n  pathStyleBucketName: function pathStyleBucketName(bucketName) {\n    if (this.config.s3ForcePathStyle) return true;\n    if (this.config.s3BucketEndpoint) return false;\n\n    if (this.dnsCompatibleBucketName(bucketName)) {\n      return (this.config.sslEnabled && bucketName.match(/\\./)) ? true : false;\n    } else {\n      return true; // not dns compatible names must always use path style\n    }\n  },\n\n\n  dnsCompatibleBucketName: function dnsCompatibleBucketName(bucketName) {\n    var b = bucketName;\n    var domain = new RegExp(/^[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]$/);\n    var ipAddress = new RegExp(/(\\d+\\.){3}\\d+/);\n    var dots = new RegExp(/\\.\\./);\n    return (b.match(domain) && !b.match(ipAddress) && !b.match(dots)) ? true : false;\n  },\n\n\n  successfulResponse: function successfulResponse(resp) {\n    var req = resp.request;\n    var httpResponse = resp.httpResponse;\n    if (operationsWith200StatusCodeError[req.operation] &&\n        httpResponse.body.toString().match('<Error>')) {\n      return false;\n    } else {\n      return httpResponse.statusCode < 300;\n    }\n  },\n\n\n  retryableError: function retryableError(error, request) {\n    if (operationsWith200StatusCodeError[request.operation] &&\n        error.statusCode === 200) {\n      return true;\n    } else if (request._requestRegionForBucket &&\n        request.service.bucketRegionCache[request._requestRegionForBucket]) {\n      return false;\n    } else if (error && error.code === 'RequestTimeout') {\n      return true;\n    } else if (error &&\n        regionRedirectErrorCodes.indexOf(error.code) != -1 &&\n        error.region && error.region != request.httpRequest.region) {\n      request.httpRequest.region = error.region;\n      if (error.statusCode === 301) {\n        request.service.updateReqBucketRegion(request);\n      }\n      return true;\n    } else {\n      var _super = AWS.Service.prototype.retryableError;\n      return _super.call(this, error, request);\n    }\n  },\n\n\n  updateReqBucketRegion: function updateReqBucketRegion(request, region) {\n    var httpRequest = request.httpRequest;\n    if (typeof region === 'string' && region.length) {\n      httpRequest.region = region;\n    }\n    if (!httpRequest.endpoint.host.match(/s3(?!-accelerate).*\\.amazonaws\\.com$/)) {\n      return;\n    }\n    var service = request.service;\n    var s3Config = service.config;\n    var s3BucketEndpoint = s3Config.s3BucketEndpoint;\n    if (s3BucketEndpoint) {\n      delete s3Config.s3BucketEndpoint;\n    }\n    var newConfig = AWS.util.copy(s3Config);\n    delete newConfig.endpoint;\n    newConfig.region = httpRequest.region;\n\n    httpRequest.endpoint = (new AWS.S3(newConfig)).endpoint;\n    service.populateURI(request);\n    s3Config.s3BucketEndpoint = s3BucketEndpoint;\n    httpRequest.headers.Host = httpRequest.endpoint.host;\n\n    if (request._asm.currentState === 'validate') {\n      request.removeListener('build', service.populateURI);\n      request.addListener('build', service.removeVirtualHostedBucketFromPath);\n    }\n  },\n\n\n  extractData: function extractData(resp) {\n    var req = resp.request;\n    if (req.operation === 'getBucketLocation') {\n      var match = resp.httpResponse.body.toString().match(/>(.+)<\\/Location/);\n      delete resp.data['_'];\n      if (match) {\n        resp.data.LocationConstraint = match[1];\n      } else {\n        resp.data.LocationConstraint = '';\n      }\n    }\n    var bucket = req.params.Bucket || null;\n    if (req.operation === 'deleteBucket' && typeof bucket === 'string' && !resp.error) {\n      req.service.clearBucketRegionCache(bucket);\n    } else {\n      var headers = resp.httpResponse.headers || {};\n      var region = headers['x-amz-bucket-region'] || null;\n      if (!region && req.operation === 'createBucket' && !resp.error) {\n        var createBucketConfiguration = req.params.CreateBucketConfiguration;\n        if (!createBucketConfiguration) {\n          region = 'us-east-1';\n        } else if (createBucketConfiguration.LocationConstraint === 'EU') {\n          region = 'eu-west-1';\n        } else {\n          region = createBucketConfiguration.LocationConstraint;\n        }\n      }\n      if (region) {\n          if (bucket && region !== req.service.bucketRegionCache[bucket]) {\n            req.service.bucketRegionCache[bucket] = region;\n          }\n      }\n    }\n    req.service.extractRequestIds(resp);\n  },\n\n\n  extractError: function extractError(resp) {\n    var codes = {\n      304: 'NotModified',\n      403: 'Forbidden',\n      400: 'BadRequest',\n      404: 'NotFound'\n    };\n\n    var req = resp.request;\n    var code = resp.httpResponse.statusCode;\n    var body = resp.httpResponse.body || '';\n\n    var headers = resp.httpResponse.headers || {};\n    var region = headers['x-amz-bucket-region'] || null;\n    var bucket = req.params.Bucket || null;\n    var bucketRegionCache = req.service.bucketRegionCache;\n    if (region && bucket && region !== bucketRegionCache[bucket]) {\n      bucketRegionCache[bucket] = region;\n    }\n\n    var cachedRegion;\n    if (codes[code] && body.length === 0) {\n      if (bucket && !region) {\n        cachedRegion = bucketRegionCache[bucket] || null;\n        if (cachedRegion !== req.httpRequest.region) {\n          region = cachedRegion;\n        }\n      }\n      resp.error = AWS.util.error(new Error(), {\n        code: codes[code],\n        message: null,\n        region: region\n      });\n    } else {\n      var data = new AWS.XML.Parser().parse(body.toString());\n\n      if (data.Region && !region) {\n        region = data.Region;\n        if (bucket && region !== bucketRegionCache[bucket]) {\n          bucketRegionCache[bucket] = region;\n        }\n      } else if (bucket && !region && !data.Region) {\n        cachedRegion = bucketRegionCache[bucket] || null;\n        if (cachedRegion !== req.httpRequest.region) {\n          region = cachedRegion;\n        }\n      }\n\n      resp.error = AWS.util.error(new Error(), {\n        code: data.Code || code,\n        message: data.Message || null,\n        region: region\n      });\n    }\n    req.service.extractRequestIds(resp);\n  },\n\n\n  requestBucketRegion: function requestBucketRegion(resp, done) {\n    var error = resp.error;\n    var req = resp.request;\n    var bucket = req.params.Bucket || null;\n\n    if (!error || !bucket || error.region || req.operation === 'listObjects' ||\n        (AWS.util.isNode() && req.operation === 'headBucket') ||\n        (error.statusCode === 400 && req.operation !== 'headObject') ||\n        regionRedirectErrorCodes.indexOf(error.code) === -1) {\n      return done();\n    }\n    var reqOperation = AWS.util.isNode() ? 'headBucket' : 'listObjects';\n    var reqParams = {Bucket: bucket};\n    if (reqOperation === 'listObjects') reqParams.MaxKeys = 0;\n    var regionReq = req.service[reqOperation](reqParams);\n    regionReq._requestRegionForBucket = bucket;\n    regionReq.send(function() {\n      var region = req.service.bucketRegionCache[bucket] || null;\n      error.region = region;\n      done();\n    });\n  },\n\n\n   reqRegionForNetworkingError: function reqRegionForNetworkingError(resp, done) {\n    if (!AWS.util.isBrowser()) {\n      return done();\n    }\n    var error = resp.error;\n    var request = resp.request;\n    var bucket = request.params.Bucket;\n    if (!error || error.code !== 'NetworkingError' || !bucket ||\n        request.httpRequest.region === 'us-east-1') {\n      return done();\n    }\n    var service = request.service;\n    var bucketRegionCache = service.bucketRegionCache;\n    var cachedRegion = bucketRegionCache[bucket] || null;\n\n    if (cachedRegion && cachedRegion !== request.httpRequest.region) {\n      service.updateReqBucketRegion(request, cachedRegion);\n      done();\n    } else if (!service.dnsCompatibleBucketName(bucket)) {\n      service.updateReqBucketRegion(request, 'us-east-1');\n      if (bucketRegionCache[bucket] !== 'us-east-1') {\n        bucketRegionCache[bucket] = 'us-east-1';\n      }\n      done();\n    } else if (request.httpRequest.virtualHostedBucket) {\n      var getRegionReq = service.listObjects({Bucket: bucket, MaxKeys: 0});\n      service.updateReqBucketRegion(getRegionReq, 'us-east-1');\n      getRegionReq._requestRegionForBucket = bucket;\n\n      getRegionReq.send(function() {\n        var region = service.bucketRegionCache[bucket] || null;\n        if (region && region !== request.httpRequest.region) {\n          service.updateReqBucketRegion(request, region);\n        }\n        done();\n      });\n    } else {\n      done();\n    }\n   },\n\n\n   bucketRegionCache: {},\n\n\n   clearBucketRegionCache: function(buckets) {\n    var bucketRegionCache = this.bucketRegionCache;\n    if (!buckets) {\n      buckets = Object.keys(bucketRegionCache);\n    } else if (typeof buckets === 'string') {\n      buckets = [buckets];\n    }\n    for (var i = 0; i < buckets.length; i++) {\n      delete bucketRegionCache[buckets[i]];\n    }\n    return bucketRegionCache;\n   },\n\n\n  correctBucketRegionFromCache: function correctBucketRegionFromCache(req) {\n    var bucket = req.params.Bucket || null;\n    if (bucket) {\n      var service = req.service;\n      var requestRegion = req.httpRequest.region;\n      var cachedRegion = service.bucketRegionCache[bucket];\n      if (cachedRegion && cachedRegion !== requestRegion) {\n        service.updateReqBucketRegion(req, cachedRegion);\n      }\n    }\n  },\n\n\n  extractRequestIds: function extractRequestIds(resp) {\n    var extendedRequestId = resp.httpResponse.headers ? resp.httpResponse.headers['x-amz-id-2'] : null;\n    var cfId = resp.httpResponse.headers ? resp.httpResponse.headers['x-amz-cf-id'] : null;\n    resp.extendedRequestId = extendedRequestId;\n    resp.cfId = cfId;\n\n    if (resp.error) {\n      resp.error.requestId = resp.requestId || null;\n      resp.error.extendedRequestId = extendedRequestId;\n      resp.error.cfId = cfId;\n    }\n  },\n\n\n  getSignedUrl: function getSignedUrl(operation, params, callback) {\n    params = AWS.util.copy(params || {});\n    var expires = params.Expires || 900;\n    delete params.Expires; // we can't validate this\n    var request = this.makeRequest(operation, params);\n    return request.presign(expires, callback);\n  },\n\n\n  prepareSignedUrl: function prepareSignedUrl(request) {\n    request.addListener('validate', request.service.noPresignedContentLength);\n    request.removeListener('build', request.service.addContentType);\n    if (!request.params.Body) {\n      request.removeListener('build', request.service.computeContentMd5);\n    } else {\n      request.addListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256);\n    }\n  },\n\n\n  disableBodySigning: function disableBodySigning(request) {\n    var headers = request.httpRequest.headers;\n    if (!Object.prototype.hasOwnProperty.call(headers, 'presigned-expires')) {\n      headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD';\n    }\n  },\n\n\n  noPresignedContentLength: function noPresignedContentLength(request) {\n    if (request.params.ContentLength !== undefined) {\n      throw AWS.util.error(new Error(), {code: 'UnexpectedParameter',\n        message: 'ContentLength is not supported in pre-signed URLs.'});\n    }\n  },\n\n  createBucket: function createBucket(params, callback) {\n    if (typeof params === 'function' || !params) {\n      callback = callback || params;\n      params = {};\n    }\n    var hostname = this.endpoint.hostname;\n    if (hostname !== this.api.globalEndpoint && !params.CreateBucketConfiguration) {\n      params.CreateBucketConfiguration = { LocationConstraint: this.config.region };\n    }\n    return this.makeRequest('createBucket', params, callback);\n  },\n\n\n  upload: function upload(params, options, callback) {\n    if (typeof options === 'function' && callback === undefined) {\n      callback = options;\n      options = null;\n    }\n\n    options = options || {};\n    options = AWS.util.merge(options || {}, {service: this, params: params});\n\n    var uploader = new AWS.S3.ManagedUpload(options);\n    if (typeof callback === 'function') uploader.send(callback);\n    return uploader;\n  }\n});\n\n},{\"../core\":201,\"../s3/managed_upload\":237}],251:[function(require,module,exports){\nvar AWS = require('../core');\n\nAWS.util.update(AWS.SQS.prototype, {\n\n  setupRequestListeners: function setupRequestListeners(request) {\n    request.addListener('build', this.buildEndpoint);\n\n    if (request.service.config.computeChecksums) {\n      if (request.operation === 'sendMessage') {\n        request.addListener('extractData', this.verifySendMessageChecksum);\n      } else if (request.operation === 'sendMessageBatch') {\n        request.addListener('extractData', this.verifySendMessageBatchChecksum);\n      } else if (request.operation === 'receiveMessage') {\n        request.addListener('extractData', this.verifyReceiveMessageChecksum);\n      }\n    }\n  },\n\n\n  verifySendMessageChecksum: function verifySendMessageChecksum(response) {\n    if (!response.data) return;\n\n    var md5 = response.data.MD5OfMessageBody;\n    var body = this.params.MessageBody;\n    var calculatedMd5 = this.service.calculateChecksum(body);\n    if (calculatedMd5 !== md5) {\n      var msg = 'Got \"' + response.data.MD5OfMessageBody +\n        '\", expecting \"' + calculatedMd5 + '\".';\n      this.service.throwInvalidChecksumError(response,\n        [response.data.MessageId], msg);\n    }\n  },\n\n\n  verifySendMessageBatchChecksum: function verifySendMessageBatchChecksum(response) {\n    if (!response.data) return;\n\n    var service = this.service;\n    var entries = {};\n    var errors = [];\n    var messageIds = [];\n    AWS.util.arrayEach(response.data.Successful, function (entry) {\n      entries[entry.Id] = entry;\n    });\n    AWS.util.arrayEach(this.params.Entries, function (entry) {\n      if (entries[entry.Id]) {\n        var md5 = entries[entry.Id].MD5OfMessageBody;\n        var body = entry.MessageBody;\n        if (!service.isChecksumValid(md5, body)) {\n          errors.push(entry.Id);\n          messageIds.push(entries[entry.Id].MessageId);\n        }\n      }\n    });\n\n    if (errors.length > 0) {\n      service.throwInvalidChecksumError(response, messageIds,\n        'Invalid messages: ' + errors.join(', '));\n    }\n  },\n\n\n  verifyReceiveMessageChecksum: function verifyReceiveMessageChecksum(response) {\n    if (!response.data) return;\n\n    var service = this.service;\n    var messageIds = [];\n    AWS.util.arrayEach(response.data.Messages, function(message) {\n      var md5 = message.MD5OfBody;\n      var body = message.Body;\n      if (!service.isChecksumValid(md5, body)) {\n        messageIds.push(message.MessageId);\n      }\n    });\n\n    if (messageIds.length > 0) {\n      service.throwInvalidChecksumError(response, messageIds,\n        'Invalid messages: ' + messageIds.join(', '));\n    }\n  },\n\n\n  throwInvalidChecksumError: function throwInvalidChecksumError(response, ids, message) {\n    response.error = AWS.util.error(new Error(), {\n      retryable: true,\n      code: 'InvalidChecksum',\n      messageIds: ids,\n      message: response.request.operation +\n               ' returned an invalid MD5 response. ' + message\n    });\n  },\n\n\n  isChecksumValid: function isChecksumValid(checksum, data) {\n    return this.calculateChecksum(data) === checksum;\n  },\n\n\n  calculateChecksum: function calculateChecksum(data) {\n    return AWS.util.crypto.md5(data, 'hex');\n  },\n\n\n  buildEndpoint: function buildEndpoint(request) {\n    var url = request.httpRequest.params.QueueUrl;\n    if (url) {\n      request.httpRequest.endpoint = new AWS.Endpoint(url);\n\n      var matches = request.httpRequest.endpoint.host.match(/^sqs\\.(.+?)\\./);\n      if (matches) request.httpRequest.region = matches[1];\n    }\n  }\n});\n\n},{\"../core\":201}],252:[function(require,module,exports){\nvar AWS = require('../core');\n\nAWS.util.update(AWS.STS.prototype, {\n\n  credentialsFrom: function credentialsFrom(data, credentials) {\n    if (!data) return null;\n    if (!credentials) credentials = new AWS.TemporaryCredentials();\n    credentials.expired = false;\n    credentials.accessKeyId = data.Credentials.AccessKeyId;\n    credentials.secretAccessKey = data.Credentials.SecretAccessKey;\n    credentials.sessionToken = data.Credentials.SessionToken;\n    credentials.expireTime = data.Credentials.Expiration;\n    return credentials;\n  },\n\n  assumeRoleWithWebIdentity: function assumeRoleWithWebIdentity(params, callback) {\n    return this.makeUnauthenticatedRequest('assumeRoleWithWebIdentity', params, callback);\n  },\n\n  assumeRoleWithSAML: function assumeRoleWithSAML(params, callback) {\n    return this.makeUnauthenticatedRequest('assumeRoleWithSAML', params, callback);\n  }\n});\n\n},{\"../core\":201}],253:[function(require,module,exports){\nvar AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n\nvar expiresHeader = 'presigned-expires';\n\n\nfunction signedUrlBuilder(request) {\n  var expires = request.httpRequest.headers[expiresHeader];\n  var signerClass = request.service.getSignerClass(request);\n\n  delete request.httpRequest.headers['User-Agent'];\n  delete request.httpRequest.headers['X-Amz-User-Agent'];\n\n  if (signerClass === AWS.Signers.V4) {\n    if (expires > 604800) { // one week expiry is invalid\n      var message = 'Presigning does not support expiry time greater ' +\n                    'than a week with SigV4 signing.';\n      throw AWS.util.error(new Error(), {\n        code: 'InvalidExpiryTime', message: message, retryable: false\n      });\n    }\n    request.httpRequest.headers[expiresHeader] = expires;\n  } else if (signerClass === AWS.Signers.S3) {\n    request.httpRequest.headers[expiresHeader] = parseInt(\n      AWS.util.date.unixTimestamp() + expires, 10).toString();\n  } else {\n    throw AWS.util.error(new Error(), {\n      message: 'Presigning only supports S3 or SigV4 signing.',\n      code: 'UnsupportedSigner', retryable: false\n    });\n  }\n}\n\n\nfunction signedUrlSigner(request) {\n  var endpoint = request.httpRequest.endpoint;\n  var parsedUrl = AWS.util.urlParse(request.httpRequest.path);\n  var queryParams = {};\n\n  if (parsedUrl.search) {\n    queryParams = AWS.util.queryStringParse(parsedUrl.search.substr(1));\n  }\n\n  AWS.util.each(request.httpRequest.headers, function (key, value) {\n    if (key === expiresHeader) key = 'Expires';\n    if (key.indexOf('x-amz-meta-') === 0) {\n      delete queryParams[key];\n      key = key.toLowerCase();\n    }\n    queryParams[key] = value;\n  });\n  delete request.httpRequest.headers[expiresHeader];\n\n  var auth = queryParams['Authorization'].split(' ');\n  if (auth[0] === 'AWS') {\n    auth = auth[1].split(':');\n    queryParams['AWSAccessKeyId'] = auth[0];\n    queryParams['Signature'] = auth[1];\n  } else if (auth[0] === 'AWS4-HMAC-SHA256') { // SigV4 signing\n    auth.shift();\n    var rest = auth.join(' ');\n    var signature = rest.match(/Signature=(.*?)(?:,|\\s|\\r?\\n|$)/)[1];\n    queryParams['X-Amz-Signature'] = signature;\n    delete queryParams['Expires'];\n  }\n  delete queryParams['Authorization'];\n  delete queryParams['Host'];\n\n  endpoint.pathname = parsedUrl.pathname;\n  endpoint.search = AWS.util.queryParamsToString(queryParams);\n}\n\n\nAWS.Signers.Presign = inherit({\n\n  sign: function sign(request, expireTime, callback) {\n    request.httpRequest.headers[expiresHeader] = expireTime || 3600;\n    request.on('build', signedUrlBuilder);\n    request.on('sign', signedUrlSigner);\n    request.removeListener('afterBuild',\n      AWS.EventListeners.Core.SET_CONTENT_LENGTH);\n    request.removeListener('afterBuild',\n      AWS.EventListeners.Core.COMPUTE_SHA256);\n\n    request.emit('beforePresign', [request]);\n\n    if (callback) {\n      request.build(function() {\n        if (this.response.error) callback(this.response.error);\n        else {\n          callback(null, AWS.util.urlFormat(request.httpRequest.endpoint));\n        }\n      });\n    } else {\n      request.build();\n      if (request.response.error) throw request.response.error;\n      return AWS.util.urlFormat(request.httpRequest.endpoint);\n    }\n  }\n});\n\nmodule.exports = AWS.Signers.Presign;\n\n},{\"../core\":201}],254:[function(require,module,exports){\nvar AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n\nAWS.Signers.RequestSigner = inherit({\n  constructor: function RequestSigner(request) {\n    this.request = request;\n  },\n\n  setServiceClientId: function setServiceClientId(id) {\n    this.serviceClientId = id;\n  },\n\n  getServiceClientId: function getServiceClientId() {\n    return this.serviceClientId;\n  }\n});\n\nAWS.Signers.RequestSigner.getVersion = function getVersion(version) {\n  switch (version) {\n    case 'v2': return AWS.Signers.V2;\n    case 'v3': return AWS.Signers.V3;\n    case 'v4': return AWS.Signers.V4;\n    case 's3': return AWS.Signers.S3;\n    case 'v3https': return AWS.Signers.V3Https;\n  }\n  throw new Error('Unknown signing version ' + version);\n};\n\nrequire('./v2');\nrequire('./v3');\nrequire('./v3https');\nrequire('./v4');\nrequire('./s3');\nrequire('./presign');\n\n},{\"../core\":201,\"./presign\":253,\"./s3\":255,\"./v2\":256,\"./v3\":257,\"./v3https\":258,\"./v4\":259}],255:[function(require,module,exports){\nvar AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n\nAWS.Signers.S3 = inherit(AWS.Signers.RequestSigner, {\n\n  subResources: {\n    'acl': 1,\n    'accelerate': 1,\n    'analytics': 1,\n    'cors': 1,\n    'lifecycle': 1,\n    'delete': 1,\n    'inventory': 1,\n    'location': 1,\n    'logging': 1,\n    'metrics': 1,\n    'notification': 1,\n    'partNumber': 1,\n    'policy': 1,\n    'requestPayment': 1,\n    'replication': 1,\n    'restore': 1,\n    'tagging': 1,\n    'torrent': 1,\n    'uploadId': 1,\n    'uploads': 1,\n    'versionId': 1,\n    'versioning': 1,\n    'versions': 1,\n    'website': 1\n  },\n\n  responseHeaders: {\n    'response-content-type': 1,\n    'response-content-language': 1,\n    'response-expires': 1,\n    'response-cache-control': 1,\n    'response-content-disposition': 1,\n    'response-content-encoding': 1\n  },\n\n  addAuthorization: function addAuthorization(credentials, date) {\n    if (!this.request.headers['presigned-expires']) {\n      this.request.headers['X-Amz-Date'] = AWS.util.date.rfc822(date);\n    }\n\n    if (credentials.sessionToken) {\n      this.request.headers['x-amz-security-token'] = credentials.sessionToken;\n    }\n\n    var signature = this.sign(credentials.secretAccessKey, this.stringToSign());\n    var auth = 'AWS ' + credentials.accessKeyId + ':' + signature;\n\n    this.request.headers['Authorization'] = auth;\n  },\n\n  stringToSign: function stringToSign() {\n    var r = this.request;\n\n    var parts = [];\n    parts.push(r.method);\n    parts.push(r.headers['Content-MD5'] || '');\n    parts.push(r.headers['Content-Type'] || '');\n\n    parts.push(r.headers['presigned-expires'] || '');\n\n    var headers = this.canonicalizedAmzHeaders();\n    if (headers) parts.push(headers);\n    parts.push(this.canonicalizedResource());\n\n    return parts.join('\\n');\n\n  },\n\n  canonicalizedAmzHeaders: function canonicalizedAmzHeaders() {\n\n    var amzHeaders = [];\n\n    AWS.util.each(this.request.headers, function (name) {\n      if (name.match(/^x-amz-/i))\n        amzHeaders.push(name);\n    });\n\n    amzHeaders.sort(function (a, b) {\n      return a.toLowerCase() < b.toLowerCase() ? -1 : 1;\n    });\n\n    var parts = [];\n    AWS.util.arrayEach.call(this, amzHeaders, function (name) {\n      parts.push(name.toLowerCase() + ':' + String(this.request.headers[name]));\n    });\n\n    return parts.join('\\n');\n\n  },\n\n  canonicalizedResource: function canonicalizedResource() {\n\n    var r = this.request;\n\n    var parts = r.path.split('?');\n    var path = parts[0];\n    var querystring = parts[1];\n\n    var resource = '';\n\n    if (r.virtualHostedBucket)\n      resource += '/' + r.virtualHostedBucket;\n\n    resource += path;\n\n    if (querystring) {\n\n      var resources = [];\n\n      AWS.util.arrayEach.call(this, querystring.split('&'), function (param) {\n        var name = param.split('=')[0];\n        var value = param.split('=')[1];\n        if (this.subResources[name] || this.responseHeaders[name]) {\n          var subresource = { name: name };\n          if (value !== undefined) {\n            if (this.subResources[name]) {\n              subresource.value = value;\n            } else {\n              subresource.value = decodeURIComponent(value);\n            }\n          }\n          resources.push(subresource);\n        }\n      });\n\n      resources.sort(function (a, b) { return a.name < b.name ? -1 : 1; });\n\n      if (resources.length) {\n\n        querystring = [];\n        AWS.util.arrayEach(resources, function (res) {\n          if (res.value === undefined) {\n            querystring.push(res.name);\n          } else {\n            querystring.push(res.name + '=' + res.value);\n          }\n        });\n\n        resource += '?' + querystring.join('&');\n      }\n\n    }\n\n    return resource;\n\n  },\n\n  sign: function sign(secret, string) {\n    return AWS.util.crypto.hmac(secret, string, 'base64', 'sha1');\n  }\n});\n\nmodule.exports = AWS.Signers.S3;\n\n},{\"../core\":201}],256:[function(require,module,exports){\nvar AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n\nAWS.Signers.V2 = inherit(AWS.Signers.RequestSigner, {\n  addAuthorization: function addAuthorization(credentials, date) {\n\n    if (!date) date = AWS.util.date.getDate();\n\n    var r = this.request;\n\n    r.params.Timestamp = AWS.util.date.iso8601(date);\n    r.params.SignatureVersion = '2';\n    r.params.SignatureMethod = 'HmacSHA256';\n    r.params.AWSAccessKeyId = credentials.accessKeyId;\n\n    if (credentials.sessionToken) {\n      r.params.SecurityToken = credentials.sessionToken;\n    }\n\n    delete r.params.Signature; // delete old Signature for re-signing\n    r.params.Signature = this.signature(credentials);\n\n    r.body = AWS.util.queryParamsToString(r.params);\n    r.headers['Content-Length'] = r.body.length;\n  },\n\n  signature: function signature(credentials) {\n    return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64');\n  },\n\n  stringToSign: function stringToSign() {\n    var parts = [];\n    parts.push(this.request.method);\n    parts.push(this.request.endpoint.host.toLowerCase());\n    parts.push(this.request.pathname());\n    parts.push(AWS.util.queryParamsToString(this.request.params));\n    return parts.join('\\n');\n  }\n\n});\n\nmodule.exports = AWS.Signers.V2;\n\n},{\"../core\":201}],257:[function(require,module,exports){\nvar AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n\nAWS.Signers.V3 = inherit(AWS.Signers.RequestSigner, {\n  addAuthorization: function addAuthorization(credentials, date) {\n\n    var datetime = AWS.util.date.rfc822(date);\n\n    this.request.headers['X-Amz-Date'] = datetime;\n\n    if (credentials.sessionToken) {\n      this.request.headers['x-amz-security-token'] = credentials.sessionToken;\n    }\n\n    this.request.headers['X-Amzn-Authorization'] =\n      this.authorization(credentials, datetime);\n\n  },\n\n  authorization: function authorization(credentials) {\n    return 'AWS3 ' +\n      'AWSAccessKeyId=' + credentials.accessKeyId + ',' +\n      'Algorithm=HmacSHA256,' +\n      'SignedHeaders=' + this.signedHeaders() + ',' +\n      'Signature=' + this.signature(credentials);\n  },\n\n  signedHeaders: function signedHeaders() {\n    var headers = [];\n    AWS.util.arrayEach(this.headersToSign(), function iterator(h) {\n      headers.push(h.toLowerCase());\n    });\n    return headers.sort().join(';');\n  },\n\n  canonicalHeaders: function canonicalHeaders() {\n    var headers = this.request.headers;\n    var parts = [];\n    AWS.util.arrayEach(this.headersToSign(), function iterator(h) {\n      parts.push(h.toLowerCase().trim() + ':' + String(headers[h]).trim());\n    });\n    return parts.sort().join('\\n') + '\\n';\n  },\n\n  headersToSign: function headersToSign() {\n    var headers = [];\n    AWS.util.each(this.request.headers, function iterator(k) {\n      if (k === 'Host' || k === 'Content-Encoding' || k.match(/^X-Amz/i)) {\n        headers.push(k);\n      }\n    });\n    return headers;\n  },\n\n  signature: function signature(credentials) {\n    return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64');\n  },\n\n  stringToSign: function stringToSign() {\n    var parts = [];\n    parts.push(this.request.method);\n    parts.push('/');\n    parts.push('');\n    parts.push(this.canonicalHeaders());\n    parts.push(this.request.body);\n    return AWS.util.crypto.sha256(parts.join('\\n'));\n  }\n\n});\n\nmodule.exports = AWS.Signers.V3;\n\n},{\"../core\":201}],258:[function(require,module,exports){\nvar AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\nrequire('./v3');\n\n\nAWS.Signers.V3Https = inherit(AWS.Signers.V3, {\n  authorization: function authorization(credentials) {\n    return 'AWS3-HTTPS ' +\n      'AWSAccessKeyId=' + credentials.accessKeyId + ',' +\n      'Algorithm=HmacSHA256,' +\n      'Signature=' + this.signature(credentials);\n  },\n\n  stringToSign: function stringToSign() {\n    return this.request.headers['X-Amz-Date'];\n  }\n});\n\nmodule.exports = AWS.Signers.V3Https;\n\n},{\"../core\":201,\"./v3\":257}],259:[function(require,module,exports){\nvar AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n\nvar cachedSecret = {};\n\n\nvar cacheQueue = [];\n\n\nvar maxCacheEntries = 50;\n\n\nvar expiresHeader = 'presigned-expires';\n\n\nAWS.Signers.V4 = inherit(AWS.Signers.RequestSigner, {\n  constructor: function V4(request, serviceName, signatureCache) {\n    AWS.Signers.RequestSigner.call(this, request);\n    this.serviceName = serviceName;\n    this.signatureCache = signatureCache;\n  },\n\n  algorithm: 'AWS4-HMAC-SHA256',\n\n  addAuthorization: function addAuthorization(credentials, date) {\n    var datetime = AWS.util.date.iso8601(date).replace(/[:\\-]|\\.\\d{3}/g, '');\n\n    if (this.isPresigned()) {\n      this.updateForPresigned(credentials, datetime);\n    } else {\n      this.addHeaders(credentials, datetime);\n    }\n\n    this.request.headers['Authorization'] =\n      this.authorization(credentials, datetime);\n  },\n\n  addHeaders: function addHeaders(credentials, datetime) {\n    this.request.headers['X-Amz-Date'] = datetime;\n    if (credentials.sessionToken) {\n      this.request.headers['x-amz-security-token'] = credentials.sessionToken;\n    }\n  },\n\n  updateForPresigned: function updateForPresigned(credentials, datetime) {\n    var credString = this.credentialString(datetime);\n    var qs = {\n      'X-Amz-Date': datetime,\n      'X-Amz-Algorithm': this.algorithm,\n      'X-Amz-Credential': credentials.accessKeyId + '/' + credString,\n      'X-Amz-Expires': this.request.headers[expiresHeader],\n      'X-Amz-SignedHeaders': this.signedHeaders()\n    };\n\n    if (credentials.sessionToken) {\n      qs['X-Amz-Security-Token'] = credentials.sessionToken;\n    }\n\n    if (this.request.headers['Content-Type']) {\n      qs['Content-Type'] = this.request.headers['Content-Type'];\n    }\n    if (this.request.headers['Content-MD5']) {\n      qs['Content-MD5'] = this.request.headers['Content-MD5'];\n    }\n    if (this.request.headers['Cache-Control']) {\n      qs['Cache-Control'] = this.request.headers['Cache-Control'];\n    }\n\n    AWS.util.each.call(this, this.request.headers, function(key, value) {\n      if (key === expiresHeader) return;\n      if (this.isSignableHeader(key)) {\n        var lowerKey = key.toLowerCase();\n        if (lowerKey.indexOf('x-amz-meta-') === 0) {\n          qs[lowerKey] = value;\n        } else if (lowerKey.indexOf('x-amz-') === 0) {\n          qs[key] = value;\n        }\n      }\n    });\n\n    var sep = this.request.path.indexOf('?') >= 0 ? '&' : '?';\n    this.request.path += sep + AWS.util.queryParamsToString(qs);\n  },\n\n  authorization: function authorization(credentials, datetime) {\n    var parts = [];\n    var credString = this.credentialString(datetime);\n    parts.push(this.algorithm + ' Credential=' +\n      credentials.accessKeyId + '/' + credString);\n    parts.push('SignedHeaders=' + this.signedHeaders());\n    parts.push('Signature=' + this.signature(credentials, datetime));\n    return parts.join(', ');\n  },\n\n  signature: function signature(credentials, datetime) {\n    var cache = null;\n    var cacheIdentifier = this.serviceName + (this.getServiceClientId() ? '_' + this.getServiceClientId() : '');\n    if (this.signatureCache) {\n      var cache = cachedSecret[cacheIdentifier];\n      if (!cache) {\n        cacheQueue.push(cacheIdentifier);\n        if (cacheQueue.length > maxCacheEntries) {\n          delete cachedSecret[cacheQueue.shift()];\n        }\n      }\n\n    }\n    var date = datetime.substr(0, 8);\n\n    if (!cache ||\n        cache.akid !== credentials.accessKeyId ||\n        cache.region !== this.request.region ||\n        cache.date !== date) {\n\n      var kSecret = credentials.secretAccessKey;\n      var kDate = AWS.util.crypto.hmac('AWS4' + kSecret, date, 'buffer');\n      var kRegion = AWS.util.crypto.hmac(kDate, this.request.region, 'buffer');\n      var kService = AWS.util.crypto.hmac(kRegion, this.serviceName, 'buffer');\n      var kCredentials = AWS.util.crypto.hmac(kService, 'aws4_request', 'buffer');\n\n      if (!this.signatureCache) {\n        return AWS.util.crypto.hmac(kCredentials, this.stringToSign(datetime), 'hex');\n      }\n\n      cachedSecret[cacheIdentifier] = {\n        region: this.request.region, date: date,\n        key: kCredentials, akid: credentials.accessKeyId\n      };\n    }\n\n    var key = cachedSecret[cacheIdentifier].key;\n    return AWS.util.crypto.hmac(key, this.stringToSign(datetime), 'hex');\n  },\n\n  stringToSign: function stringToSign(datetime) {\n    var parts = [];\n    parts.push('AWS4-HMAC-SHA256');\n    parts.push(datetime);\n    parts.push(this.credentialString(datetime));\n    parts.push(this.hexEncodedHash(this.canonicalString()));\n    return parts.join('\\n');\n  },\n\n  canonicalString: function canonicalString() {\n    var parts = [], pathname = this.request.pathname();\n    if (this.serviceName !== 's3') pathname = AWS.util.uriEscapePath(pathname);\n\n    parts.push(this.request.method);\n    parts.push(pathname);\n    parts.push(this.request.search());\n    parts.push(this.canonicalHeaders() + '\\n');\n    parts.push(this.signedHeaders());\n    parts.push(this.hexEncodedBodyHash());\n    return parts.join('\\n');\n  },\n\n  canonicalHeaders: function canonicalHeaders() {\n    var headers = [];\n    AWS.util.each.call(this, this.request.headers, function (key, item) {\n      headers.push([key, item]);\n    });\n    headers.sort(function (a, b) {\n      return a[0].toLowerCase() < b[0].toLowerCase() ? -1 : 1;\n    });\n    var parts = [];\n    AWS.util.arrayEach.call(this, headers, function (item) {\n      var key = item[0].toLowerCase();\n      if (this.isSignableHeader(key)) {\n        parts.push(key + ':' +\n          this.canonicalHeaderValues(item[1].toString()));\n      }\n    });\n    return parts.join('\\n');\n  },\n\n  canonicalHeaderValues: function canonicalHeaderValues(values) {\n    return values.replace(/\\s+/g, ' ').replace(/^\\s+|\\s+$/g, '');\n  },\n\n  signedHeaders: function signedHeaders() {\n    var keys = [];\n    AWS.util.each.call(this, this.request.headers, function (key) {\n      key = key.toLowerCase();\n      if (this.isSignableHeader(key)) keys.push(key);\n    });\n    return keys.sort().join(';');\n  },\n\n  credentialString: function credentialString(datetime) {\n    var parts = [];\n    parts.push(datetime.substr(0, 8));\n    parts.push(this.request.region);\n    parts.push(this.serviceName);\n    parts.push('aws4_request');\n    return parts.join('/');\n  },\n\n  hexEncodedHash: function hash(string) {\n    return AWS.util.crypto.sha256(string, 'hex');\n  },\n\n  hexEncodedBodyHash: function hexEncodedBodyHash() {\n    if (this.isPresigned() && this.serviceName === 's3' && !this.request.body) {\n      return 'UNSIGNED-PAYLOAD';\n    } else if (this.request.headers['X-Amz-Content-Sha256']) {\n      return this.request.headers['X-Amz-Content-Sha256'];\n    } else {\n      return this.hexEncodedHash(this.request.body || '');\n    }\n  },\n\n  unsignableHeaders: [\n    'authorization',\n    'content-type',\n    'content-length',\n    'user-agent',\n    expiresHeader,\n    'expect',\n    'x-amzn-trace-id'\n  ],\n\n  isSignableHeader: function isSignableHeader(key) {\n    if (key.toLowerCase().indexOf('x-amz-') === 0) return true;\n    return this.unsignableHeaders.indexOf(key) < 0;\n  },\n\n  isPresigned: function isPresigned() {\n    return this.request.headers[expiresHeader] ? true : false;\n  }\n\n});\n\nmodule.exports = AWS.Signers.V4;\n\n},{\"../core\":201}],260:[function(require,module,exports){\nfunction AcceptorStateMachine(states, state) {\n  this.currentState = state || null;\n  this.states = states || {};\n}\n\nAcceptorStateMachine.prototype.runTo = function runTo(finalState, done, bindObject, inputError) {\n  if (typeof finalState === 'function') {\n    inputError = bindObject; bindObject = done;\n    done = finalState; finalState = null;\n  }\n\n  var self = this;\n  var state = self.states[self.currentState];\n  state.fn.call(bindObject || self, inputError, function(err) {\n    if (err) {\n      if (state.fail) self.currentState = state.fail;\n      else return done ? done.call(bindObject, err) : null;\n    } else {\n      if (state.accept) self.currentState = state.accept;\n      else return done ? done.call(bindObject) : null;\n    }\n    if (self.currentState === finalState) {\n      return done ? done.call(bindObject, err) : null;\n    }\n\n    self.runTo(finalState, done, bindObject, err);\n  });\n};\n\nAcceptorStateMachine.prototype.addState = function addState(name, acceptState, failState, fn) {\n  if (typeof acceptState === 'function') {\n    fn = acceptState; acceptState = null; failState = null;\n  } else if (typeof failState === 'function') {\n    fn = failState; failState = null;\n  }\n\n  if (!this.currentState) this.currentState = name;\n  this.states[name] = { accept: acceptState, fail: failState, fn: fn };\n  return this;\n};\n\nmodule.exports = AcceptorStateMachine;\n\n},{}],261:[function(require,module,exports){\n(function (process){\n\nvar AWS;\n\n\nvar util = {\n  engine: function engine() {\n    if (util.isBrowser() && typeof navigator !== 'undefined') {\n      return navigator.userAgent;\n    } else {\n      var engine = process.platform + '/' + process.version;\n      if (process.env.AWS_EXECUTION_ENV) {\n        engine += ' exec-env/' + process.env.AWS_EXECUTION_ENV;\n      }\n      return engine;\n    }\n  },\n\n  userAgent: function userAgent() {\n    var name = util.isBrowser() ? 'js' : 'nodejs';\n    var agent = 'aws-sdk-' + name + '/' + require('./core').VERSION;\n    if (name === 'nodejs') agent += ' ' + util.engine();\n    return agent;\n  },\n\n  isBrowser: function isBrowser() { return process && process.browser; },\n  isNode: function isNode() { return !util.isBrowser(); },\n  uriEscape: function uriEscape(string) {\n    var output = encodeURIComponent(string);\n    output = output.replace(/[^A-Za-z0-9_.~\\-%]+/g, escape);\n\n    output = output.replace(/[*]/g, function(ch) {\n      return '%' + ch.charCodeAt(0).toString(16).toUpperCase();\n    });\n\n    return output;\n  },\n\n  uriEscapePath: function uriEscapePath(string) {\n    var parts = [];\n    util.arrayEach(string.split('/'), function (part) {\n      parts.push(util.uriEscape(part));\n    });\n    return parts.join('/');\n  },\n\n  urlParse: function urlParse(url) {\n    return util.url.parse(url);\n  },\n\n  urlFormat: function urlFormat(url) {\n    return util.url.format(url);\n  },\n\n  queryStringParse: function queryStringParse(qs) {\n    return util.querystring.parse(qs);\n  },\n\n  queryParamsToString: function queryParamsToString(params) {\n    var items = [];\n    var escape = util.uriEscape;\n    var sortedKeys = Object.keys(params).sort();\n\n    util.arrayEach(sortedKeys, function(name) {\n      var value = params[name];\n      var ename = escape(name);\n      var result = ename + '=';\n      if (Array.isArray(value)) {\n        var vals = [];\n        util.arrayEach(value, function(item) { vals.push(escape(item)); });\n        result = ename + '=' + vals.sort().join('&' + ename + '=');\n      } else if (value !== undefined && value !== null) {\n        result = ename + '=' + escape(value);\n      }\n      items.push(result);\n    });\n\n    return items.join('&');\n  },\n\n  readFileSync: function readFileSync(path) {\n    if (util.isBrowser()) return null;\n    return require('fs').readFileSync(path, 'utf-8');\n  },\n\n  base64: {\n    encode: function encode64(string) {\n      if (typeof string === 'number') {\n        throw util.error(new Error('Cannot base64 encode number ' + string));\n      }\n      if (string === null || typeof string === 'undefined') {\n        return string;\n      }\n      var buf = (typeof util.Buffer.from === 'function' && util.Buffer.from !== Uint8Array.from) ? util.Buffer.from(string) : new util.Buffer(string);\n      return buf.toString('base64');\n    },\n\n    decode: function decode64(string) {\n      if (typeof string === 'number') {\n        throw util.error(new Error('Cannot base64 decode number ' + string));\n      }\n      if (string === null || typeof string === 'undefined') {\n        return string;\n      }\n      return (typeof util.Buffer.from === 'function' && util.Buffer.from !== Uint8Array.from) ? util.Buffer.from(string, 'base64') : new util.Buffer(string, 'base64');\n    }\n\n  },\n\n  buffer: {\n    toStream: function toStream(buffer) {\n      if (!util.Buffer.isBuffer(buffer)) buffer = new util.Buffer(buffer);\n\n      var readable = new (util.stream.Readable)();\n      var pos = 0;\n      readable._read = function(size) {\n        if (pos >= buffer.length) return readable.push(null);\n\n        var end = pos + size;\n        if (end > buffer.length) end = buffer.length;\n        readable.push(buffer.slice(pos, end));\n        pos = end;\n      };\n\n      return readable;\n    },\n\n\n    concat: function(buffers) {\n      var length = 0,\n          offset = 0,\n          buffer = null, i;\n\n      for (i = 0; i < buffers.length; i++) {\n        length += buffers[i].length;\n      }\n\n      buffer = new util.Buffer(length);\n\n      for (i = 0; i < buffers.length; i++) {\n        buffers[i].copy(buffer, offset);\n        offset += buffers[i].length;\n      }\n\n      return buffer;\n    }\n  },\n\n  string: {\n    byteLength: function byteLength(string) {\n      if (string === null || string === undefined) return 0;\n      if (typeof string === 'string') string = new util.Buffer(string);\n\n      if (typeof string.byteLength === 'number') {\n        return string.byteLength;\n      } else if (typeof string.length === 'number') {\n        return string.length;\n      } else if (typeof string.size === 'number') {\n        return string.size;\n      } else if (typeof string.path === 'string') {\n        return require('fs').lstatSync(string.path).size;\n      } else {\n        throw util.error(new Error('Cannot determine length of ' + string),\n          { object: string });\n      }\n    },\n\n    upperFirst: function upperFirst(string) {\n      return string[0].toUpperCase() + string.substr(1);\n    },\n\n    lowerFirst: function lowerFirst(string) {\n      return string[0].toLowerCase() + string.substr(1);\n    }\n  },\n\n  ini: {\n    parse: function string(ini) {\n      var currentSection, map = {};\n      util.arrayEach(ini.split(/\\r?\\n/), function(line) {\n        line = line.split(/(^|\\s)[;#]/)[0]; // remove comments\n        var section = line.match(/^\\s*\\[([^\\[\\]]+)\\]\\s*$/);\n        if (section) {\n          currentSection = section[1];\n        } else if (currentSection) {\n          var item = line.match(/^\\s*(.+?)\\s*=\\s*(.+?)\\s*$/);\n          if (item) {\n            map[currentSection] = map[currentSection] || {};\n            map[currentSection][item[1]] = item[2];\n          }\n        }\n      });\n\n      return map;\n    }\n  },\n\n  fn: {\n    noop: function() {},\n\n\n    makeAsync: function makeAsync(fn, expectedArgs) {\n      if (expectedArgs && expectedArgs <= fn.length) {\n        return fn;\n      }\n\n      return function() {\n        var args = Array.prototype.slice.call(arguments, 0);\n        var callback = args.pop();\n        var result = fn.apply(null, args);\n        callback(result);\n      };\n    }\n  },\n\n\n  date: {\n\n\n    getDate: function getDate() {\n      if (!AWS) AWS = require('./core');\n      if (AWS.config.systemClockOffset) { // use offset when non-zero\n        return new Date(new Date().getTime() + AWS.config.systemClockOffset);\n      } else {\n        return new Date();\n      }\n    },\n\n\n    iso8601: function iso8601(date) {\n      if (date === undefined) { date = util.date.getDate(); }\n      return date.toISOString().replace(/\\.\\d{3}Z$/, 'Z');\n    },\n\n\n    rfc822: function rfc822(date) {\n      if (date === undefined) { date = util.date.getDate(); }\n      return date.toUTCString();\n    },\n\n\n    unixTimestamp: function unixTimestamp(date) {\n      if (date === undefined) { date = util.date.getDate(); }\n      return date.getTime() / 1000;\n    },\n\n\n    from: function format(date) {\n      if (typeof date === 'number') {\n        return new Date(date * 1000); // unix timestamp\n      } else {\n        return new Date(date);\n      }\n    },\n\n\n    format: function format(date, formatter) {\n      if (!formatter) formatter = 'iso8601';\n      return util.date[formatter](util.date.from(date));\n    },\n\n    parseTimestamp: function parseTimestamp(value) {\n      if (typeof value === 'number') { // unix timestamp (number)\n        return new Date(value * 1000);\n      } else if (value.match(/^\\d+$/)) { // unix timestamp\n        return new Date(value * 1000);\n      } else if (value.match(/^\\d{4}/)) { // iso8601\n        return new Date(value);\n      } else if (value.match(/^\\w{3},/)) { // rfc822\n        return new Date(value);\n      } else {\n        throw util.error(\n          new Error('unhandled timestamp format: ' + value),\n          {code: 'TimestampParserError'});\n      }\n    }\n\n  },\n\n  crypto: {\n    crc32Table: [\n     0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419,\n     0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4,\n     0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07,\n     0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n     0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856,\n     0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9,\n     0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4,\n     0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n     0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3,\n     0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A,\n     0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599,\n     0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n     0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190,\n     0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F,\n     0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E,\n     0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n     0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED,\n     0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950,\n     0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3,\n     0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n     0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A,\n     0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5,\n     0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010,\n     0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n     0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17,\n     0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6,\n     0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615,\n     0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n     0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344,\n     0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB,\n     0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A,\n     0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n     0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1,\n     0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C,\n     0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF,\n     0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n     0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE,\n     0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31,\n     0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C,\n     0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n     0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B,\n     0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242,\n     0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1,\n     0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n     0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278,\n     0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7,\n     0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66,\n     0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n     0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605,\n     0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8,\n     0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B,\n     0x2D02EF8D],\n\n    crc32: function crc32(data) {\n      var tbl = util.crypto.crc32Table;\n      var crc = 0 ^ -1;\n\n      if (typeof data === 'string') {\n        data = new util.Buffer(data);\n      }\n\n      for (var i = 0; i < data.length; i++) {\n        var code = data.readUInt8(i);\n        crc = (crc >>> 8) ^ tbl[(crc ^ code) & 0xFF];\n      }\n      return (crc ^ -1) >>> 0;\n    },\n\n    hmac: function hmac(key, string, digest, fn) {\n      if (!digest) digest = 'binary';\n      if (digest === 'buffer') { digest = undefined; }\n      if (!fn) fn = 'sha256';\n      if (typeof string === 'string') string = new util.Buffer(string);\n      return util.crypto.lib.createHmac(fn, key).update(string).digest(digest);\n    },\n\n    md5: function md5(data, digest, callback) {\n      return util.crypto.hash('md5', data, digest, callback);\n    },\n\n    sha256: function sha256(data, digest, callback) {\n      return util.crypto.hash('sha256', data, digest, callback);\n    },\n\n    hash: function(algorithm, data, digest, callback) {\n      var hash = util.crypto.createHash(algorithm);\n      if (!digest) { digest = 'binary'; }\n      if (digest === 'buffer') { digest = undefined; }\n      if (typeof data === 'string') data = new util.Buffer(data);\n      var sliceFn = util.arraySliceFn(data);\n      var isBuffer = util.Buffer.isBuffer(data);\n      if (util.isBrowser() && typeof ArrayBuffer !== 'undefined' && data && data.buffer instanceof ArrayBuffer) isBuffer = true;\n\n      if (callback && typeof data === 'object' &&\n          typeof data.on === 'function' && !isBuffer) {\n        data.on('data', function(chunk) { hash.update(chunk); });\n        data.on('error', function(err) { callback(err); });\n        data.on('end', function() { callback(null, hash.digest(digest)); });\n      } else if (callback && sliceFn && !isBuffer &&\n                 typeof FileReader !== 'undefined') {\n        var index = 0, size = 1024 * 512;\n        var reader = new FileReader();\n        reader.onerror = function() {\n          callback(new Error('Failed to read data.'));\n        };\n        reader.onload = function() {\n          var buf = new util.Buffer(new Uint8Array(reader.result));\n          hash.update(buf);\n          index += buf.length;\n          reader._continueReading();\n        };\n        reader._continueReading = function() {\n          if (index >= data.size) {\n            callback(null, hash.digest(digest));\n            return;\n          }\n\n          var back = index + size;\n          if (back > data.size) back = data.size;\n          reader.readAsArrayBuffer(sliceFn.call(data, index, back));\n        };\n\n        reader._continueReading();\n      } else {\n        if (util.isBrowser() && typeof data === 'object' && !isBuffer) {\n          data = new util.Buffer(new Uint8Array(data));\n        }\n        var out = hash.update(data).digest(digest);\n        if (callback) callback(null, out);\n        return out;\n      }\n    },\n\n    toHex: function toHex(data) {\n      var out = [];\n      for (var i = 0; i < data.length; i++) {\n        out.push(('0' + data.charCodeAt(i).toString(16)).substr(-2, 2));\n      }\n      return out.join('');\n    },\n\n    createHash: function createHash(algorithm) {\n      return util.crypto.lib.createHash(algorithm);\n    }\n\n  },\n\n\n\n\n  abort: {},\n\n  each: function each(object, iterFunction) {\n    for (var key in object) {\n      if (Object.prototype.hasOwnProperty.call(object, key)) {\n        var ret = iterFunction.call(this, key, object[key]);\n        if (ret === util.abort) break;\n      }\n    }\n  },\n\n  arrayEach: function arrayEach(array, iterFunction) {\n    for (var idx in array) {\n      if (Object.prototype.hasOwnProperty.call(array, idx)) {\n        var ret = iterFunction.call(this, array[idx], parseInt(idx, 10));\n        if (ret === util.abort) break;\n      }\n    }\n  },\n\n  update: function update(obj1, obj2) {\n    util.each(obj2, function iterator(key, item) {\n      obj1[key] = item;\n    });\n    return obj1;\n  },\n\n  merge: function merge(obj1, obj2) {\n    return util.update(util.copy(obj1), obj2);\n  },\n\n  copy: function copy(object) {\n    if (object === null || object === undefined) return object;\n    var dupe = {};\n    for (var key in object) {\n      dupe[key] = object[key];\n    }\n    return dupe;\n  },\n\n  isEmpty: function isEmpty(obj) {\n    for (var prop in obj) {\n      if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n        return false;\n      }\n    }\n    return true;\n  },\n\n  arraySliceFn: function arraySliceFn(obj) {\n    var fn = obj.slice || obj.webkitSlice || obj.mozSlice;\n    return typeof fn === 'function' ? fn : null;\n  },\n\n  isType: function isType(obj, type) {\n    if (typeof type === 'function') type = util.typeName(type);\n    return Object.prototype.toString.call(obj) === '[object ' + type + ']';\n  },\n\n  typeName: function typeName(type) {\n    if (Object.prototype.hasOwnProperty.call(type, 'name')) return type.name;\n    var str = type.toString();\n    var match = str.match(/^\\s*function (.+)\\(/);\n    return match ? match[1] : str;\n  },\n\n  error: function error(err, options) {\n    var originalError = null;\n    if (typeof err.message === 'string' && err.message !== '') {\n      if (typeof options === 'string' || (options && options.message)) {\n        originalError = util.copy(err);\n        originalError.message = err.message;\n      }\n    }\n    err.message = err.message || null;\n\n    if (typeof options === 'string') {\n      err.message = options;\n    } else if (typeof options === 'object' && options !== null) {\n      util.update(err, options);\n      if (options.message)\n        err.message = options.message;\n      if (options.code || options.name)\n        err.code = options.code || options.name;\n      if (options.stack)\n        err.stack = options.stack;\n    }\n\n    if (typeof Object.defineProperty === 'function') {\n      Object.defineProperty(err, 'name', {writable: true, enumerable: false});\n      Object.defineProperty(err, 'message', {enumerable: true});\n    }\n\n    err.name = options && options.name || err.name || err.code || 'Error';\n    err.time = new Date();\n\n    if (originalError) err.originalError = originalError;\n\n    return err;\n  },\n\n\n  inherit: function inherit(klass, features) {\n    var newObject = null;\n    if (features === undefined) {\n      features = klass;\n      klass = Object;\n      newObject = {};\n    } else {\n      var ctor = function ConstructorWrapper() {};\n      ctor.prototype = klass.prototype;\n      newObject = new ctor();\n    }\n\n    if (features.constructor === Object) {\n      features.constructor = function() {\n        if (klass !== Object) {\n          return klass.apply(this, arguments);\n        }\n      };\n    }\n\n    features.constructor.prototype = newObject;\n    util.update(features.constructor.prototype, features);\n    features.constructor.__super__ = klass;\n    return features.constructor;\n  },\n\n\n  mixin: function mixin() {\n    var klass = arguments[0];\n    for (var i = 1; i < arguments.length; i++) {\n      for (var prop in arguments[i].prototype) {\n        var fn = arguments[i].prototype[prop];\n        if (prop !== 'constructor') {\n          klass.prototype[prop] = fn;\n        }\n      }\n    }\n    return klass;\n  },\n\n\n  hideProperties: function hideProperties(obj, props) {\n    if (typeof Object.defineProperty !== 'function') return;\n\n    util.arrayEach(props, function (key) {\n      Object.defineProperty(obj, key, {\n        enumerable: false, writable: true, configurable: true });\n    });\n  },\n\n\n  property: function property(obj, name, value, enumerable, isValue) {\n    var opts = {\n      configurable: true,\n      enumerable: enumerable !== undefined ? enumerable : true\n    };\n    if (typeof value === 'function' && !isValue) {\n      opts.get = value;\n    }\n    else {\n      opts.value = value; opts.writable = true;\n    }\n\n    Object.defineProperty(obj, name, opts);\n  },\n\n\n  memoizedProperty: function memoizedProperty(obj, name, get, enumerable) {\n    var cachedValue = null;\n\n    util.property(obj, name, function() {\n      if (cachedValue === null) {\n        cachedValue = get();\n      }\n      return cachedValue;\n    }, enumerable);\n  },\n\n\n  hoistPayloadMember: function hoistPayloadMember(resp) {\n    var req = resp.request;\n    var operation = req.operation;\n    var output = req.service.api.operations[operation].output;\n    if (output.payload) {\n      var payloadMember = output.members[output.payload];\n      var responsePayload = resp.data[output.payload];\n      if (payloadMember.type === 'structure') {\n        util.each(responsePayload, function(key, value) {\n          util.property(resp.data, key, value, false);\n        });\n      }\n    }\n  },\n\n\n  computeSha256: function computeSha256(body, done) {\n    if (util.isNode()) {\n      var Stream = util.stream.Stream;\n      var fs = require('fs');\n      if (body instanceof Stream) {\n        if (typeof body.path === 'string') { // assume file object\n          var settings = {};\n          if (typeof body.start === 'number') {\n            settings.start = body.start;\n          }\n          if (typeof body.end === 'number') {\n            settings.end = body.end;\n          }\n          body = fs.createReadStream(body.path, settings);\n        } else { // TODO support other stream types\n          return done(new Error('Non-file stream objects are ' +\n                                'not supported with SigV4'));\n        }\n      }\n    }\n\n    util.crypto.sha256(body, 'hex', function(err, sha) {\n      if (err) done(err);\n      else done(null, sha);\n    });\n  },\n\n\n  isClockSkewed: function isClockSkewed(serverTime) {\n    if (serverTime) {\n      util.property(AWS.config, 'isClockSkewed',\n        Math.abs(new Date().getTime() - serverTime) >= 300000, false);\n      return AWS.config.isClockSkewed;\n    }\n  },\n\n  applyClockOffset: function applyClockOffset(serverTime) {\n    if (serverTime)\n      AWS.config.systemClockOffset = serverTime - new Date().getTime();\n  },\n\n\n  extractRequestId: function extractRequestId(resp) {\n    var requestId = resp.httpResponse.headers['x-amz-request-id'] ||\n                     resp.httpResponse.headers['x-amzn-requestid'];\n\n    if (!requestId && resp.data && resp.data.ResponseMetadata) {\n      requestId = resp.data.ResponseMetadata.RequestId;\n    }\n\n    if (requestId) {\n      resp.requestId = requestId;\n    }\n\n    if (resp.error) {\n      resp.error.requestId = requestId;\n    }\n  },\n\n\n  addPromises: function addPromises(constructors, PromiseDependency) {\n    if (PromiseDependency === undefined && AWS && AWS.config) {\n      PromiseDependency = AWS.config.getPromisesDependency();\n    }\n    if (PromiseDependency === undefined && typeof Promise !== 'undefined') {\n      PromiseDependency = Promise;\n    }\n    if (typeof PromiseDependency !== 'function') var deletePromises = true;\n    if (!Array.isArray(constructors)) constructors = [constructors];\n\n    for (var ind = 0; ind < constructors.length; ind++) {\n      var constructor = constructors[ind];\n      if (deletePromises) {\n        if (constructor.deletePromisesFromClass) {\n          constructor.deletePromisesFromClass();\n        }\n      } else if (constructor.addPromisesToClass) {\n        constructor.addPromisesToClass(PromiseDependency);\n      }\n    }\n  },\n\n\n  promisifyMethod: function promisifyMethod(methodName, PromiseDependency) {\n    return function promise() {\n      var self = this;\n      return new PromiseDependency(function(resolve, reject) {\n        self[methodName](function(err, data) {\n          if (err) {\n            reject(err);\n          } else {\n            resolve(data);\n          }\n        });\n      });\n    };\n  },\n\n\n  isDualstackAvailable: function isDualstackAvailable(service) {\n    if (!service) return false;\n    var metadata = require('../apis/metadata.json');\n    if (typeof service !== 'string') service = service.serviceIdentifier;\n    if (typeof service !== 'string' || !metadata.hasOwnProperty(service)) return false;\n    return !!metadata[service].dualstackAvailable;\n  },\n\n\n  calculateRetryDelay: function calculateRetryDelay(retryCount, retryDelayOptions) {\n    if (!retryDelayOptions) retryDelayOptions = {};\n    var customBackoff = retryDelayOptions.customBackoff || null;\n    if (typeof customBackoff === 'function') {\n      return customBackoff(retryCount);\n    }\n    var base = retryDelayOptions.base || 100;\n    var delay = Math.random() * (Math.pow(2, retryCount) * base);\n    return delay;\n  },\n\n\n  handleRequestWithRetries: function handleRequestWithRetries(httpRequest, options, cb) {\n    if (!options) options = {};\n    var http = AWS.HttpClient.getInstance();\n    var httpOptions = options.httpOptions || {};\n    var retryCount = 0;\n\n    var errCallback = function(err) {\n      var maxRetries = options.maxRetries || 0;\n      if (err && err.code === 'TimeoutError') err.retryable = true;\n      if (err && err.retryable && retryCount < maxRetries) {\n        retryCount++;\n        var delay = util.calculateRetryDelay(retryCount, options.retryDelayOptions);\n        setTimeout(sendRequest, delay + (err.retryAfter || 0));\n      } else {\n        cb(err);\n      }\n    };\n\n    var sendRequest = function() {\n      var data = '';\n      http.handleRequest(httpRequest, httpOptions, function(httpResponse) {\n        httpResponse.on('data', function(chunk) { data += chunk.toString(); });\n        httpResponse.on('end', function() {\n          var statusCode = httpResponse.statusCode;\n          if (statusCode < 300) {\n            cb(null, data);\n          } else {\n            var retryAfter = parseInt(httpResponse.headers['retry-after'], 10) * 1000 || 0;\n            var err = util.error(new Error(),\n              { retryable: statusCode >= 500 || statusCode === 429 }\n            );\n            if (retryAfter && err.retryable) err.retryAfter = retryAfter;\n            errCallback(err);\n          }\n        });\n      }, errCallback);\n    };\n\n    process.nextTick(sendRequest);\n  },\n\n\n  uuid: {\n    v4: function uuidV4() {\n      return require('uuid').v4();\n    }\n  }\n\n};\n\nmodule.exports = util;\n\n}).call(this,require('_process'))\n},{\"../apis/metadata.json\":90,\"./core\":201,\"_process\":266,\"fs\":264,\"uuid\":290}],262:[function(require,module,exports){\nvar util = require('../util');\nvar Shape = require('../model/shape');\n\nfunction DomXmlParser() { }\n\nDomXmlParser.prototype.parse = function(xml, shape) {\n  if (xml.replace(/^\\s+/, '') === '') return {};\n\n  var result, error;\n  try {\n    if (window.DOMParser) {\n      try {\n        var parser = new DOMParser();\n        result = parser.parseFromString(xml, 'text/xml');\n      } catch (syntaxError) {\n        throw util.error(new Error('Parse error in document'),\n          {\n            originalError: syntaxError,\n            code: 'XMLParserError',\n            retryable: true\n          });\n      }\n\n      if (result.documentElement === null) {\n        throw util.error(new Error('Cannot parse empty document.'),\n          {\n            code: 'XMLParserError',\n            retryable: true\n          });\n      }\n\n      var isError = result.getElementsByTagName('parsererror')[0];\n      if (isError && (isError.parentNode === result ||\n          isError.parentNode.nodeName === 'body' ||\n          isError.parentNode.parentNode === result ||\n          isError.parentNode.parentNode.nodeName === 'body')) {\n        var errorElement = isError.getElementsByTagName('div')[0] || isError;\n        throw util.error(new Error(errorElement.textContent || 'Parser error in document'),\n          {\n            code: 'XMLParserError',\n            retryable: true\n          });\n      }\n    } else if (window.ActiveXObject) {\n      result = new window.ActiveXObject('Microsoft.XMLDOM');\n      result.async = false;\n\n      if (!result.loadXML(xml)) {\n        throw util.error(new Error('Parse error in document'),\n          {\n            code: 'XMLParserError',\n            retryable: true\n          });\n      }\n    } else {\n      throw new Error('Cannot load XML parser');\n    }\n  } catch (e) {\n    error = e;\n  }\n\n  if (result && result.documentElement && !error) {\n    var data = parseXml(result.documentElement, shape);\n    var metadata = result.getElementsByTagName('ResponseMetadata')[0];\n    if (metadata) {\n      data.ResponseMetadata = parseXml(metadata, {});\n    }\n    return data;\n  } else if (error) {\n    throw util.error(error || new Error(), {code: 'XMLParserError', retryable: true});\n  } else { // empty xml document\n    return {};\n  }\n};\n\nfunction parseXml(xml, shape) {\n  if (!shape) shape = {};\n  switch (shape.type) {\n    case 'structure': return parseStructure(xml, shape);\n    case 'map': return parseMap(xml, shape);\n    case 'list': return parseList(xml, shape);\n    case undefined: case null: return parseUnknown(xml);\n    default: return parseScalar(xml, shape);\n  }\n}\n\nfunction parseStructure(xml, shape) {\n  var data = {};\n  if (xml === null) return data;\n\n  util.each(shape.members, function(memberName, memberShape) {\n    if (memberShape.isXmlAttribute) {\n      if (Object.prototype.hasOwnProperty.call(xml.attributes, memberShape.name)) {\n        var value = xml.attributes[memberShape.name].value;\n        data[memberName] = parseXml({textContent: value}, memberShape);\n      }\n    } else {\n      var xmlChild = memberShape.flattened ? xml :\n        xml.getElementsByTagName(memberShape.name)[0];\n      if (xmlChild) {\n        data[memberName] = parseXml(xmlChild, memberShape);\n      } else if (!memberShape.flattened && memberShape.type === 'list') {\n        data[memberName] = memberShape.defaultValue;\n      }\n    }\n  });\n\n  return data;\n}\n\nfunction parseMap(xml, shape) {\n  var data = {};\n  var xmlKey = shape.key.name || 'key';\n  var xmlValue = shape.value.name || 'value';\n  var tagName = shape.flattened ? shape.name : 'entry';\n\n  var child = xml.firstElementChild;\n  while (child) {\n    if (child.nodeName === tagName) {\n      var key = child.getElementsByTagName(xmlKey)[0].textContent;\n      var value = child.getElementsByTagName(xmlValue)[0];\n      data[key] = parseXml(value, shape.value);\n    }\n    child = child.nextElementSibling;\n  }\n  return data;\n}\n\nfunction parseList(xml, shape) {\n  var data = [];\n  var tagName = shape.flattened ? shape.name : (shape.member.name || 'member');\n\n  var child = xml.firstElementChild;\n  while (child) {\n    if (child.nodeName === tagName) {\n      data.push(parseXml(child, shape.member));\n    }\n    child = child.nextElementSibling;\n  }\n  return data;\n}\n\nfunction parseScalar(xml, shape) {\n  if (xml.getAttribute) {\n    var encoding = xml.getAttribute('encoding');\n    if (encoding === 'base64') {\n      shape = new Shape.create({type: encoding});\n    }\n  }\n\n  var text = xml.textContent;\n  if (text === '') text = null;\n  if (typeof shape.toType === 'function') {\n    return shape.toType(text);\n  } else {\n    return text;\n  }\n}\n\nfunction parseUnknown(xml) {\n  if (xml === undefined || xml === null) return '';\n\n  if (!xml.firstElementChild) {\n    if (xml.parentNode.parentNode === null) return {};\n    if (xml.childNodes.length === 0) return '';\n    else return xml.textContent;\n  }\n\n  var shape = {type: 'structure', members: {}};\n  var child = xml.firstElementChild;\n  while (child) {\n    var tag = child.nodeName;\n    if (Object.prototype.hasOwnProperty.call(shape.members, tag)) {\n      shape.members[tag].type = 'list';\n    } else {\n      shape.members[tag] = {name: tag};\n    }\n    child = child.nextElementSibling;\n  }\n  return parseStructure(xml, shape);\n}\n\nmodule.exports = DomXmlParser;\n\n},{\"../model/shape\":223,\"../util\":261}],263:[function(require,module,exports){\nvar util = require('../util');\nvar builder = require('xmlbuilder');\n\nfunction XmlBuilder() { }\n\nXmlBuilder.prototype.toXML = function(params, shape, rootElement, noEmpty) {\n  var xml = builder.create(rootElement);\n  applyNamespaces(xml, shape);\n  serialize(xml, params, shape);\n  return xml.children.length > 0 || noEmpty ? xml.root().toString() : '';\n};\n\nfunction serialize(xml, value, shape) {\n  switch (shape.type) {\n    case 'structure': return serializeStructure(xml, value, shape);\n    case 'map': return serializeMap(xml, value, shape);\n    case 'list': return serializeList(xml, value, shape);\n    default: return serializeScalar(xml, value, shape);\n  }\n}\n\nfunction serializeStructure(xml, params, shape) {\n  util.arrayEach(shape.memberNames, function(memberName) {\n    var memberShape = shape.members[memberName];\n    if (memberShape.location !== 'body') return;\n\n    var value = params[memberName];\n    var name = memberShape.name;\n    if (value !== undefined && value !== null) {\n      if (memberShape.isXmlAttribute) {\n        xml.att(name, value);\n      } else if (memberShape.flattened) {\n        serialize(xml, value, memberShape);\n      } else {\n        var element = xml.ele(name);\n        applyNamespaces(element, memberShape);\n        serialize(element, value, memberShape);\n      }\n    }\n  });\n}\n\nfunction serializeMap(xml, map, shape) {\n  var xmlKey = shape.key.name || 'key';\n  var xmlValue = shape.value.name || 'value';\n\n  util.each(map, function(key, value) {\n    var entry = xml.ele(shape.flattened ? shape.name : 'entry');\n    serialize(entry.ele(xmlKey), key, shape.key);\n    serialize(entry.ele(xmlValue), value, shape.value);\n  });\n}\n\nfunction serializeList(xml, list, shape) {\n  if (shape.flattened) {\n    util.arrayEach(list, function(value) {\n      var name = shape.member.name || shape.name;\n      var element = xml.ele(name);\n      serialize(element, value, shape.member);\n    });\n  } else {\n    util.arrayEach(list, function(value) {\n      var name = shape.member.name || 'member';\n      var element = xml.ele(name);\n      serialize(element, value, shape.member);\n    });\n  }\n}\n\nfunction serializeScalar(xml, value, shape) {\n  xml.txt(shape.toWireFormat(value));\n}\n\nfunction applyNamespaces(xml, shape) {\n  var uri, prefix = 'xmlns';\n  if (shape.xmlNamespaceUri) {\n    uri = shape.xmlNamespaceUri;\n    if (shape.xmlNamespacePrefix) prefix += ':' + shape.xmlNamespacePrefix;\n  } else if (xml.isRoot && shape.api.xmlNamespaceUri) {\n    uri = shape.api.xmlNamespaceUri;\n  }\n\n  if (uri) xml.att(prefix, uri);\n}\n\nmodule.exports = XmlBuilder;\n\n},{\"../util\":261,\"xmlbuilder\":307}],264:[function(require,module,exports){\n\n},{}],265:[function(require,module,exports){\n\nfunction EventEmitter() {\n  this._events = this._events || {};\n  this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\nEventEmitter.defaultMaxListeners = 10;\n\nEventEmitter.prototype.setMaxListeners = function(n) {\n  if (!isNumber(n) || n < 0 || isNaN(n))\n    throw TypeError('n must be a positive number');\n  this._maxListeners = n;\n  return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n  var er, handler, len, args, i, listeners;\n\n  if (!this._events)\n    this._events = {};\n\n  if (type === 'error') {\n    if (!this._events.error ||\n        (isObject(this._events.error) && !this._events.error.length)) {\n      er = arguments[1];\n      if (er instanceof Error) {\n        throw er; // Unhandled 'error' event\n      } else {\n        var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n        err.context = er;\n        throw err;\n      }\n    }\n  }\n\n  handler = this._events[type];\n\n  if (isUndefined(handler))\n    return false;\n\n  if (isFunction(handler)) {\n    switch (arguments.length) {\n      case 1:\n        handler.call(this);\n        break;\n      case 2:\n        handler.call(this, arguments[1]);\n        break;\n      case 3:\n        handler.call(this, arguments[1], arguments[2]);\n        break;\n      default:\n        args = Array.prototype.slice.call(arguments, 1);\n        handler.apply(this, args);\n    }\n  } else if (isObject(handler)) {\n    args = Array.prototype.slice.call(arguments, 1);\n    listeners = handler.slice();\n    len = listeners.length;\n    for (i = 0; i < len; i++)\n      listeners[i].apply(this, args);\n  }\n\n  return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n  var m;\n\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  if (!this._events)\n    this._events = {};\n\n  if (this._events.newListener)\n    this.emit('newListener', type,\n              isFunction(listener.listener) ?\n              listener.listener : listener);\n\n  if (!this._events[type])\n    this._events[type] = listener;\n  else if (isObject(this._events[type]))\n    this._events[type].push(listener);\n  else\n    this._events[type] = [this._events[type], listener];\n\n  if (isObject(this._events[type]) && !this._events[type].warned) {\n    if (!isUndefined(this._maxListeners)) {\n      m = this._maxListeners;\n    } else {\n      m = EventEmitter.defaultMaxListeners;\n    }\n\n    if (m && m > 0 && this._events[type].length > m) {\n      this._events[type].warned = true;\n      console.error('(node) warning: possible EventEmitter memory ' +\n                    'leak detected. %d listeners added. ' +\n                    'Use emitter.setMaxListeners() to increase limit.',\n                    this._events[type].length);\n      if (typeof console.trace === 'function') {\n        console.trace();\n      }\n    }\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  var fired = false;\n\n  function g() {\n    this.removeListener(type, g);\n\n    if (!fired) {\n      fired = true;\n      listener.apply(this, arguments);\n    }\n  }\n\n  g.listener = listener;\n  this.on(type, g);\n\n  return this;\n};\n\nEventEmitter.prototype.removeListener = function(type, listener) {\n  var list, position, length, i;\n\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  if (!this._events || !this._events[type])\n    return this;\n\n  list = this._events[type];\n  length = list.length;\n  position = -1;\n\n  if (list === listener ||\n      (isFunction(list.listener) && list.listener === listener)) {\n    delete this._events[type];\n    if (this._events.removeListener)\n      this.emit('removeListener', type, listener);\n\n  } else if (isObject(list)) {\n    for (i = length; i-- > 0;) {\n      if (list[i] === listener ||\n          (list[i].listener && list[i].listener === listener)) {\n        position = i;\n        break;\n      }\n    }\n\n    if (position < 0)\n      return this;\n\n    if (list.length === 1) {\n      list.length = 0;\n      delete this._events[type];\n    } else {\n      list.splice(position, 1);\n    }\n\n    if (this._events.removeListener)\n      this.emit('removeListener', type, listener);\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n  var key, listeners;\n\n  if (!this._events)\n    return this;\n\n  if (!this._events.removeListener) {\n    if (arguments.length === 0)\n      this._events = {};\n    else if (this._events[type])\n      delete this._events[type];\n    return this;\n  }\n\n  if (arguments.length === 0) {\n    for (key in this._events) {\n      if (key === 'removeListener') continue;\n      this.removeAllListeners(key);\n    }\n    this.removeAllListeners('removeListener');\n    this._events = {};\n    return this;\n  }\n\n  listeners = this._events[type];\n\n  if (isFunction(listeners)) {\n    this.removeListener(type, listeners);\n  } else if (listeners) {\n    while (listeners.length)\n      this.removeListener(type, listeners[listeners.length - 1]);\n  }\n  delete this._events[type];\n\n  return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n  var ret;\n  if (!this._events || !this._events[type])\n    ret = [];\n  else if (isFunction(this._events[type]))\n    ret = [this._events[type]];\n  else\n    ret = this._events[type].slice();\n  return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n  if (this._events) {\n    var evlistener = this._events[type];\n\n    if (isFunction(evlistener))\n      return 1;\n    else if (evlistener)\n      return evlistener.length;\n  }\n  return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n  return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\n\n},{}],266:[function(require,module,exports){\nvar process = module.exports = {};\n\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\n(function () {\n    try {\n        if (typeof setTimeout === 'function') {\n            cachedSetTimeout = setTimeout;\n        } else {\n            cachedSetTimeout = defaultSetTimout;\n        }\n    } catch (e) {\n        cachedSetTimeout = defaultSetTimout;\n    }\n    try {\n        if (typeof clearTimeout === 'function') {\n            cachedClearTimeout = clearTimeout;\n        } else {\n            cachedClearTimeout = defaultClearTimeout;\n        }\n    } catch (e) {\n        cachedClearTimeout = defaultClearTimeout;\n    }\n} ())\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        return setTimeout(fun, 0);\n    }\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        return clearTimeout(marker);\n    }\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n};\n\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n},{}],267:[function(require,module,exports){\n(function (global){\n\n;(function(root) {\n\n\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\n\tvar punycode,\n\n\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\n\tkey;\n\n\n\n\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t    counter = 0,\n\t\t    length = string.length,\n\t\t    value,\n\t\t    extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\n\tfunction digitToBasic(digit, flag) {\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\n\tfunction decode(input) {\n\t\tvar output = [],\n\t\t    inputLength = input.length,\n\t\t    out,\n\t\t    i = 0,\n\t\t    n = initialN,\n\t\t    bias = initialBias,\n\t\t    basic,\n\t\t    j,\n\t\t    index,\n\t\t    oldi,\n\t\t    w,\n\t\t    k,\n\t\t    digit,\n\t\t    t,\n\n\t\t    baseMinusT;\n\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\n\tfunction encode(input) {\n\t\tvar n,\n\t\t    delta,\n\t\t    handledCPCount,\n\t\t    basicLength,\n\t\t    bias,\n\t\t    j,\n\t\t    m,\n\t\t    q,\n\t\t    k,\n\t\t    t,\n\t\t    currentValue,\n\t\t    output = [],\n\n\t\t    inputLength,\n\n\t\t    handledCPCountPlusOne,\n\t\t    baseMinusT,\n\t\t    qMinusT;\n\n\t\tinput = ucs2decode(input);\n\n\t\tinputLength = input.length;\n\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\n\n\n\tpunycode = {\n\n\t\t'version': '1.4.1',\n\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) {\n\t\t\tfreeModule.exports = punycode;\n\t\t} else {\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],268:[function(require,module,exports){\n\n'use strict';\n\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n  sep = sep || '&';\n  eq = eq || '=';\n  var obj = {};\n\n  if (typeof qs !== 'string' || qs.length === 0) {\n    return obj;\n  }\n\n  var regexp = /\\+/g;\n  qs = qs.split(sep);\n\n  var maxKeys = 1000;\n  if (options && typeof options.maxKeys === 'number') {\n    maxKeys = options.maxKeys;\n  }\n\n  var len = qs.length;\n  if (maxKeys > 0 && len > maxKeys) {\n    len = maxKeys;\n  }\n\n  for (var i = 0; i < len; ++i) {\n    var x = qs[i].replace(regexp, '%20'),\n        idx = x.indexOf(eq),\n        kstr, vstr, k, v;\n\n    if (idx >= 0) {\n      kstr = x.substr(0, idx);\n      vstr = x.substr(idx + 1);\n    } else {\n      kstr = x;\n      vstr = '';\n    }\n\n    k = decodeURIComponent(kstr);\n    v = decodeURIComponent(vstr);\n\n    if (!hasOwnProperty(obj, k)) {\n      obj[k] = v;\n    } else if (isArray(obj[k])) {\n      obj[k].push(v);\n    } else {\n      obj[k] = [obj[k], v];\n    }\n  }\n\n  return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n  return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\n},{}],269:[function(require,module,exports){\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n  switch (typeof v) {\n    case 'string':\n      return v;\n\n    case 'boolean':\n      return v ? 'true' : 'false';\n\n    case 'number':\n      return isFinite(v) ? v : '';\n\n    default:\n      return '';\n  }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n  sep = sep || '&';\n  eq = eq || '=';\n  if (obj === null) {\n    obj = undefined;\n  }\n\n  if (typeof obj === 'object') {\n    return map(objectKeys(obj), function(k) {\n      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n      if (isArray(obj[k])) {\n        return map(obj[k], function(v) {\n          return ks + encodeURIComponent(stringifyPrimitive(v));\n        }).join(sep);\n      } else {\n        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n      }\n    }).join(sep);\n\n  }\n\n  if (!name) return '';\n  return encodeURIComponent(stringifyPrimitive(name)) + eq +\n         encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n  return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n  if (xs.map) return xs.map(f);\n  var res = [];\n  for (var i = 0; i < xs.length; i++) {\n    res.push(f(xs[i], i));\n  }\n  return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n  var res = [];\n  for (var key in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n  }\n  return res;\n};\n\n},{}],270:[function(require,module,exports){\n'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n\n},{\"./decode\":268,\"./encode\":269}],271:[function(require,module,exports){\nif (typeof Object.create === 'function') {\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    ctor.prototype = Object.create(superCtor.prototype, {\n      constructor: {\n        value: ctor,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n  };\n} else {\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    var TempCtor = function () {}\n    TempCtor.prototype = superCtor.prototype\n    ctor.prototype = new TempCtor()\n    ctor.prototype.constructor = ctor\n  }\n}\n\n},{}],272:[function(require,module,exports){\nmodule.exports = function isBuffer(arg) {\n  return arg && typeof arg === 'object'\n    && typeof arg.copy === 'function'\n    && typeof arg.fill === 'function'\n    && typeof arg.readUInt8 === 'function';\n}\n},{}],273:[function(require,module,exports){\n(function (process,global){\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n  if (!isString(f)) {\n    var objects = [];\n    for (var i = 0; i < arguments.length; i++) {\n      objects.push(inspect(arguments[i]));\n    }\n    return objects.join(' ');\n  }\n\n  var i = 1;\n  var args = arguments;\n  var len = args.length;\n  var str = String(f).replace(formatRegExp, function(x) {\n    if (x === '%') return '%';\n    if (i >= len) return x;\n    switch (x) {\n      case '%s': return String(args[i++]);\n      case '%d': return Number(args[i++]);\n      case '%j':\n        try {\n          return JSON.stringify(args[i++]);\n        } catch (_) {\n          return '[Circular]';\n        }\n      default:\n        return x;\n    }\n  });\n  for (var x = args[i]; i < len; x = args[++i]) {\n    if (isNull(x) || !isObject(x)) {\n      str += ' ' + x;\n    } else {\n      str += ' ' + inspect(x);\n    }\n  }\n  return str;\n};\n\n\nexports.deprecate = function(fn, msg) {\n  if (isUndefined(global.process)) {\n    return function() {\n      return exports.deprecate(fn, msg).apply(this, arguments);\n    };\n  }\n\n  if (process.noDeprecation === true) {\n    return fn;\n  }\n\n  var warned = false;\n  function deprecated() {\n    if (!warned) {\n      if (process.throwDeprecation) {\n        throw new Error(msg);\n      } else if (process.traceDeprecation) {\n        console.trace(msg);\n      } else {\n        console.error(msg);\n      }\n      warned = true;\n    }\n    return fn.apply(this, arguments);\n  }\n\n  return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n  if (isUndefined(debugEnviron))\n    debugEnviron = process.env.NODE_DEBUG || '';\n  set = set.toUpperCase();\n  if (!debugs[set]) {\n    if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n      var pid = process.pid;\n      debugs[set] = function() {\n        var msg = exports.format.apply(exports, arguments);\n        console.error('%s %d: %s', set, pid, msg);\n      };\n    } else {\n      debugs[set] = function() {};\n    }\n  }\n  return debugs[set];\n};\n\n\n\n\nfunction inspect(obj, opts) {\n  var ctx = {\n    seen: [],\n    stylize: stylizeNoColor\n  };\n  if (arguments.length >= 3) ctx.depth = arguments[2];\n  if (arguments.length >= 4) ctx.colors = arguments[3];\n  if (isBoolean(opts)) {\n    ctx.showHidden = opts;\n  } else if (opts) {\n    exports._extend(ctx, opts);\n  }\n  if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n  if (isUndefined(ctx.depth)) ctx.depth = 2;\n  if (isUndefined(ctx.colors)) ctx.colors = false;\n  if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n  if (ctx.colors) ctx.stylize = stylizeWithColor;\n  return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\ninspect.colors = {\n  'bold' : [1, 22],\n  'italic' : [3, 23],\n  'underline' : [4, 24],\n  'inverse' : [7, 27],\n  'white' : [37, 39],\n  'grey' : [90, 39],\n  'black' : [30, 39],\n  'blue' : [34, 39],\n  'cyan' : [36, 39],\n  'green' : [32, 39],\n  'magenta' : [35, 39],\n  'red' : [31, 39],\n  'yellow' : [33, 39]\n};\n\ninspect.styles = {\n  'special': 'cyan',\n  'number': 'yellow',\n  'boolean': 'yellow',\n  'undefined': 'grey',\n  'null': 'bold',\n  'string': 'green',\n  'date': 'magenta',\n  'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n  var style = inspect.styles[styleType];\n\n  if (style) {\n    return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n           '\\u001b[' + inspect.colors[style][1] + 'm';\n  } else {\n    return str;\n  }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n  return str;\n}\n\n\nfunction arrayToHash(array) {\n  var hash = {};\n\n  array.forEach(function(val, idx) {\n    hash[val] = true;\n  });\n\n  return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n  if (ctx.customInspect &&\n      value &&\n      isFunction(value.inspect) &&\n      value.inspect !== exports.inspect &&\n      !(value.constructor && value.constructor.prototype === value)) {\n    var ret = value.inspect(recurseTimes, ctx);\n    if (!isString(ret)) {\n      ret = formatValue(ctx, ret, recurseTimes);\n    }\n    return ret;\n  }\n\n  var primitive = formatPrimitive(ctx, value);\n  if (primitive) {\n    return primitive;\n  }\n\n  var keys = Object.keys(value);\n  var visibleKeys = arrayToHash(keys);\n\n  if (ctx.showHidden) {\n    keys = Object.getOwnPropertyNames(value);\n  }\n\n  if (isError(value)\n      && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n    return formatError(value);\n  }\n\n  if (keys.length === 0) {\n    if (isFunction(value)) {\n      var name = value.name ? ': ' + value.name : '';\n      return ctx.stylize('[Function' + name + ']', 'special');\n    }\n    if (isRegExp(value)) {\n      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n    }\n    if (isDate(value)) {\n      return ctx.stylize(Date.prototype.toString.call(value), 'date');\n    }\n    if (isError(value)) {\n      return formatError(value);\n    }\n  }\n\n  var base = '', array = false, braces = ['{', '}'];\n\n  if (isArray(value)) {\n    array = true;\n    braces = ['[', ']'];\n  }\n\n  if (isFunction(value)) {\n    var n = value.name ? ': ' + value.name : '';\n    base = ' [Function' + n + ']';\n  }\n\n  if (isRegExp(value)) {\n    base = ' ' + RegExp.prototype.toString.call(value);\n  }\n\n  if (isDate(value)) {\n    base = ' ' + Date.prototype.toUTCString.call(value);\n  }\n\n  if (isError(value)) {\n    base = ' ' + formatError(value);\n  }\n\n  if (keys.length === 0 && (!array || value.length == 0)) {\n    return braces[0] + base + braces[1];\n  }\n\n  if (recurseTimes < 0) {\n    if (isRegExp(value)) {\n      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n    } else {\n      return ctx.stylize('[Object]', 'special');\n    }\n  }\n\n  ctx.seen.push(value);\n\n  var output;\n  if (array) {\n    output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n  } else {\n    output = keys.map(function(key) {\n      return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n    });\n  }\n\n  ctx.seen.pop();\n\n  return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n  if (isUndefined(value))\n    return ctx.stylize('undefined', 'undefined');\n  if (isString(value)) {\n    var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n                                             .replace(/'/g, \"\\\\'\")\n                                             .replace(/\\\\\"/g, '\"') + '\\'';\n    return ctx.stylize(simple, 'string');\n  }\n  if (isNumber(value))\n    return ctx.stylize('' + value, 'number');\n  if (isBoolean(value))\n    return ctx.stylize('' + value, 'boolean');\n  if (isNull(value))\n    return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n  return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n  var output = [];\n  for (var i = 0, l = value.length; i < l; ++i) {\n    if (hasOwnProperty(value, String(i))) {\n      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n          String(i), true));\n    } else {\n      output.push('');\n    }\n  }\n  keys.forEach(function(key) {\n    if (!key.match(/^\\d+$/)) {\n      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n          key, true));\n    }\n  });\n  return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n  var name, str, desc;\n  desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n  if (desc.get) {\n    if (desc.set) {\n      str = ctx.stylize('[Getter/Setter]', 'special');\n    } else {\n      str = ctx.stylize('[Getter]', 'special');\n    }\n  } else {\n    if (desc.set) {\n      str = ctx.stylize('[Setter]', 'special');\n    }\n  }\n  if (!hasOwnProperty(visibleKeys, key)) {\n    name = '[' + key + ']';\n  }\n  if (!str) {\n    if (ctx.seen.indexOf(desc.value) < 0) {\n      if (isNull(recurseTimes)) {\n        str = formatValue(ctx, desc.value, null);\n      } else {\n        str = formatValue(ctx, desc.value, recurseTimes - 1);\n      }\n      if (str.indexOf('\\n') > -1) {\n        if (array) {\n          str = str.split('\\n').map(function(line) {\n            return '  ' + line;\n          }).join('\\n').substr(2);\n        } else {\n          str = '\\n' + str.split('\\n').map(function(line) {\n            return '   ' + line;\n          }).join('\\n');\n        }\n      }\n    } else {\n      str = ctx.stylize('[Circular]', 'special');\n    }\n  }\n  if (isUndefined(name)) {\n    if (array && key.match(/^\\d+$/)) {\n      return str;\n    }\n    name = JSON.stringify('' + key);\n    if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n      name = name.substr(1, name.length - 2);\n      name = ctx.stylize(name, 'name');\n    } else {\n      name = name.replace(/'/g, \"\\\\'\")\n                 .replace(/\\\\\"/g, '\"')\n                 .replace(/(^\"|\"$)/g, \"'\");\n      name = ctx.stylize(name, 'string');\n    }\n  }\n\n  return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n  var numLinesEst = 0;\n  var length = output.reduce(function(prev, cur) {\n    numLinesEst++;\n    if (cur.indexOf('\\n') >= 0) numLinesEst++;\n    return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n  }, 0);\n\n  if (length > 60) {\n    return braces[0] +\n           (base === '' ? '' : base + '\\n ') +\n           ' ' +\n           output.join(',\\n  ') +\n           ' ' +\n           braces[1];\n  }\n\n  return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\nfunction isArray(ar) {\n  return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n  return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n  return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n  return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n  return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n  return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n  return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n  return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n  return isObject(e) &&\n      (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n  return arg === null ||\n         typeof arg === 'boolean' ||\n         typeof arg === 'number' ||\n         typeof arg === 'string' ||\n         typeof arg === 'symbol' ||  // ES6 symbol\n         typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n  return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n  return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n              'Oct', 'Nov', 'Dec'];\n\nfunction timestamp() {\n  var d = new Date();\n  var time = [pad(d.getHours()),\n              pad(d.getMinutes()),\n              pad(d.getSeconds())].join(':');\n  return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\nexports.log = function() {\n  console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n  if (!add || !isObject(add)) return origin;\n\n  var keys = Object.keys(add);\n  var i = keys.length;\n  while (i--) {\n    origin[keys[i]] = add[keys[i]];\n  }\n  return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\n}).call(this,require('_process'),typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"./support/isBuffer\":272,\"_process\":266,\"inherits\":271}],274:[function(require,module,exports){\n(function (global){\n\n\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n  ? global.TYPED_ARRAY_SUPPORT\n  : typedArraySupport()\n\n\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n  try {\n    var arr = new Uint8Array(1)\n    arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n    return arr.foo() === 42 && // typed array instances can be augmented\n        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n  } catch (e) {\n    return false\n  }\n}\n\nfunction kMaxLength () {\n  return Buffer.TYPED_ARRAY_SUPPORT\n    ? 0x7fffffff\n    : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n  if (kMaxLength() < length) {\n    throw new RangeError('Invalid typed array length')\n  }\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    that = new Uint8Array(length)\n    that.__proto__ = Buffer.prototype\n  } else {\n    if (that === null) {\n      that = new Buffer(length)\n    }\n    that.length = length\n  }\n\n  return that\n}\n\n\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n    return new Buffer(arg, encodingOrOffset, length)\n  }\n\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new Error(\n        'If encoding is specified then the first argument must be a string'\n      )\n    }\n    return allocUnsafe(this, arg)\n  }\n  return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nBuffer._augment = function (arr) {\n  arr.__proto__ = Buffer.prototype\n  return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n  if (typeof value === 'number') {\n    throw new TypeError('\"value\" argument must not be a number')\n  }\n\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n    return fromArrayBuffer(that, value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'string') {\n    return fromString(that, value, encodingOrOffset)\n  }\n\n  return fromObject(that, value)\n}\n\n\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n  Buffer.prototype.__proto__ = Uint8Array.prototype\n  Buffer.__proto__ = Uint8Array\n  if (typeof Symbol !== 'undefined' && Symbol.species &&\n      Buffer[Symbol.species] === Buffer) {\n    Object.defineProperty(Buffer, Symbol.species, {\n      value: null,\n      configurable: true\n    })\n  }\n}\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be a number')\n  } else if (size < 0) {\n    throw new RangeError('\"size\" argument must not be negative')\n  }\n}\n\nfunction alloc (that, size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(that, size)\n  }\n  if (fill !== undefined) {\n    return typeof encoding === 'string'\n      ? createBuffer(that, size).fill(fill, encoding)\n      : createBuffer(that, size).fill(fill)\n  }\n  return createBuffer(that, size)\n}\n\n\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n  assertSize(size)\n  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) {\n    for (var i = 0; i < size; ++i) {\n      that[i] = 0\n    }\n  }\n  return that\n}\n\n\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(null, size)\n}\n\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('\"encoding\" must be a valid string encoding')\n  }\n\n  var length = byteLength(string, encoding) | 0\n  that = createBuffer(that, length)\n\n  var actual = that.write(string, encoding)\n\n  if (actual !== length) {\n    that = that.slice(0, actual)\n  }\n\n  return that\n}\n\nfunction fromArrayLike (that, array) {\n  var length = array.length < 0 ? 0 : checked(array.length) | 0\n  that = createBuffer(that, length)\n  for (var i = 0; i < length; i += 1) {\n    that[i] = array[i] & 255\n  }\n  return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n  array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\\'offset\\' is out of bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\\'length\\' is out of bounds')\n  }\n\n  if (byteOffset === undefined && length === undefined) {\n    array = new Uint8Array(array)\n  } else if (length === undefined) {\n    array = new Uint8Array(array, byteOffset)\n  } else {\n    array = new Uint8Array(array, byteOffset, length)\n  }\n\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    that = array\n    that.__proto__ = Buffer.prototype\n  } else {\n    that = fromArrayLike(that, array)\n  }\n  return that\n}\n\nfunction fromObject (that, obj) {\n  if (Buffer.isBuffer(obj)) {\n    var len = checked(obj.length) | 0\n    that = createBuffer(that, len)\n\n    if (that.length === 0) {\n      return that\n    }\n\n    obj.copy(that, 0, 0, len)\n    return that\n  }\n\n  if (obj) {\n    if ((typeof ArrayBuffer !== 'undefined' &&\n        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n      if (typeof obj.length !== 'number' || isnan(obj.length)) {\n        return createBuffer(that, 0)\n      }\n      return fromArrayLike(that, obj)\n    }\n\n    if (obj.type === 'Buffer' && isArray(obj.data)) {\n      return fromArrayLike(that, obj.data)\n    }\n  }\n\n  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n  if (length >= kMaxLength()) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + kMaxLength().toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError('Arguments must be Buffers')\n  }\n\n  if (a === b) return 0\n\n  var x = a.length\n  var y = b.length\n\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  var i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  var buffer = Buffer.allocUnsafe(length)\n  var pos = 0\n  for (i = 0; i < list.length; ++i) {\n    var buf = list[i]\n    if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    }\n    buf.copy(buffer, pos)\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    string = '' + string\n  }\n\n  var len = string.length\n  if (len === 0) return 0\n\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n      case undefined:\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) return utf8ToBytes(string).length // assume utf8\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  var loweredCase = false\n\n\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  var i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  var len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (var i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  var len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (var i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  var len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (var i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(this, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  var length = this.length | 0\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  var str = ''\n  var max = exports.INSPECT_MAX_BYTES\n  if (this.length > 0) {\n    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n    if (this.length > max) str += ' ... '\n  }\n  return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError('Argument must be a Buffer')\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  var x = thisEnd - thisStart\n  var y = end - start\n  var len = Math.min(x, y)\n\n  var thisCopy = this.slice(thisStart, thisEnd)\n  var targetCopy = target.slice(start, end)\n\n  for (var i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  if (buffer.length === 0) return -1\n\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset  // Coerce to Number.\n  if (isNaN(byteOffset)) {\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  if (Buffer.isBuffer(val)) {\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (Buffer.TYPED_ARRAY_SUPPORT &&\n        typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  var indexSize = 1\n  var arrLength = arr.length\n  var valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  var i\n  if (dir) {\n    var foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; i--) {\n      var found = true\n      for (var j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  var remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  var strLen = string.length\n  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  for (var i = 0; i < length; ++i) {\n    var parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (isNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n  return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  } else if (isFinite(offset)) {\n    offset = offset | 0\n    if (isFinite(length)) {\n      length = length | 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  var remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n        return asciiWrite(this, string, offset, length)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Write(this, string, offset, length)\n\n      case 'base64':\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  var res = []\n\n  var i = start\n  while (i < end) {\n    var firstByte = buf[i]\n    var codePoint = null\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\n      : (firstByte > 0xDF) ? 3\n      : (firstByte > 0xBF) ? 2\n      : 1\n\n    if (i + bytesPerSequence <= end) {\n      var secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  var len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  var res = ''\n  var i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  var len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  var out = ''\n  for (var i = start; i < end; ++i) {\n    out += toHex(buf[i])\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  var bytes = buf.slice(start, end)\n  var res = ''\n  for (var i = 0; i < bytes.length; i += 2) {\n    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  var len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  var newBuf\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    newBuf = this.subarray(start, end)\n    newBuf.__proto__ = Buffer.prototype\n  } else {\n    var sliceLen = end - start\n    newBuf = new Buffer(sliceLen, undefined)\n    for (var i = 0; i < sliceLen; ++i) {\n      newBuf[i] = this[i + start]\n    }\n  }\n\n  return newBuf\n}\n\n\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  var val = this[offset + --byteLength]\n  var mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var i = byteLength\n  var mul = 1\n  var val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var mul = 1\n  var i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n      (littleEndian ? i : 1 - i) * 8\n  }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffffffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n  }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset + 3] = (value >>> 24)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 1] = (value >>> 8)\n    this[offset] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = 0\n  var mul = 1\n  var sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  var sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 3] = (value >>> 24)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  var len = end - start\n  var i\n\n  if (this === target && start < targetStart && targetStart < end) {\n    for (i = len - 1; i >= 0; --i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n    for (i = 0; i < len; ++i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, start + len),\n      targetStart\n    )\n  }\n\n  return len\n}\n\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (val.length === 1) {\n      var code = val.charCodeAt(0)\n      if (code < 256) {\n        val = code\n      }\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  }\n\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  var i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    var bytes = Buffer.isBuffer(val)\n      ? val\n      : utf8ToBytes(new Buffer(val, encoding).toString())\n    var len = bytes.length\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n  if (str.length < 2) return ''\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction stringtrim (str) {\n  if (str.trim) return str.trim()\n  return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n  if (n < 16) return '0' + n.toString(16)\n  return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  var codePoint\n  var length = string.length\n  var leadSurrogate = null\n  var bytes = []\n\n  for (var i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      if (!leadSurrogate) {\n        if (codePoint > 0xDBFF) {\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  var c, hi, lo\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  for (var i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\nfunction isnan (val) {\n  return val !== val // eslint-disable-line no-self-compare\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"base64-js\":275,\"ieee754\":276,\"isarray\":277}],275:[function(require,module,exports){\n'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n  lookup[i] = code[i]\n  revLookup[code.charCodeAt(i)] = i\n}\n\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction placeHoldersCount (b64) {\n  var len = b64.length\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n}\n\nfunction byteLength (b64) {\n  return b64.length * 3 / 4 - placeHoldersCount(b64)\n}\n\nfunction toByteArray (b64) {\n  var i, j, l, tmp, placeHolders, arr\n  var len = b64.length\n  placeHolders = placeHoldersCount(b64)\n\n  arr = new Arr(len * 3 / 4 - placeHolders)\n\n  l = placeHolders > 0 ? len - 4 : len\n\n  var L = 0\n\n  for (i = 0, j = 0; i < l; i += 4, j += 3) {\n    tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n    arr[L++] = (tmp >> 16) & 0xFF\n    arr[L++] = (tmp >> 8) & 0xFF\n    arr[L++] = tmp & 0xFF\n  }\n\n  if (placeHolders === 2) {\n    tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[L++] = tmp & 0xFF\n  } else if (placeHolders === 1) {\n    tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[L++] = (tmp >> 8) & 0xFF\n    arr[L++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var output = ''\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n  }\n\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    output += lookup[tmp >> 2]\n    output += lookup[(tmp << 4) & 0x3F]\n    output += '=='\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n    output += lookup[tmp >> 10]\n    output += lookup[(tmp >> 4) & 0x3F]\n    output += lookup[(tmp << 2) & 0x3F]\n    output += '='\n  }\n\n  parts.push(output)\n\n  return parts.join('')\n}\n\n},{}],276:[function(require,module,exports){\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = nBytes * 8 - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = nBytes * 8 - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = (value * c - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n\n},{}],277:[function(require,module,exports){\nvar toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n  return toString.call(arr) == '[object Array]';\n};\n\n},{}],278:[function(require,module,exports){\nvar Buffer = require('buffer').Buffer;\nvar intSize = 4;\nvar zeroBuffer = new Buffer(intSize); zeroBuffer.fill(0);\nvar chrsz = 8;\n\nfunction toArray(buf, bigEndian) {\n  if ((buf.length % intSize) !== 0) {\n    var len = buf.length + (intSize - (buf.length % intSize));\n    buf = Buffer.concat([buf, zeroBuffer], len);\n  }\n\n  var arr = [];\n  var fn = bigEndian ? buf.readInt32BE : buf.readInt32LE;\n  for (var i = 0; i < buf.length; i += intSize) {\n    arr.push(fn.call(buf, i));\n  }\n  return arr;\n}\n\nfunction toBuffer(arr, size, bigEndian) {\n  var buf = new Buffer(size);\n  var fn = bigEndian ? buf.writeInt32BE : buf.writeInt32LE;\n  for (var i = 0; i < arr.length; i++) {\n    fn.call(buf, arr[i], i * 4, true);\n  }\n  return buf;\n}\n\nfunction hash(buf, fn, hashSize, bigEndian) {\n  if (!Buffer.isBuffer(buf)) buf = new Buffer(buf);\n  var arr = fn(toArray(buf, bigEndian), buf.length * chrsz);\n  return toBuffer(arr, hashSize, bigEndian);\n}\n\nmodule.exports = { hash: hash };\n\n},{\"buffer\":274}],279:[function(require,module,exports){\nvar Buffer = require('buffer').Buffer\nvar sha = require('./sha')\nvar sha256 = require('./sha256')\nvar rng = require('./rng')\nvar md5 = require('./md5')\n\nvar algorithms = {\n  sha1: sha,\n  sha256: sha256,\n  md5: md5\n}\n\nvar blocksize = 64\nvar zeroBuffer = new Buffer(blocksize); zeroBuffer.fill(0)\nfunction hmac(fn, key, data) {\n  if(!Buffer.isBuffer(key)) key = new Buffer(key)\n  if(!Buffer.isBuffer(data)) data = new Buffer(data)\n\n  if(key.length > blocksize) {\n    key = fn(key)\n  } else if(key.length < blocksize) {\n    key = Buffer.concat([key, zeroBuffer], blocksize)\n  }\n\n  var ipad = new Buffer(blocksize), opad = new Buffer(blocksize)\n  for(var i = 0; i < blocksize; i++) {\n    ipad[i] = key[i] ^ 0x36\n    opad[i] = key[i] ^ 0x5C\n  }\n\n  var hash = fn(Buffer.concat([ipad, data]))\n  return fn(Buffer.concat([opad, hash]))\n}\n\nfunction hash(alg, key) {\n  alg = alg || 'sha1'\n  var fn = algorithms[alg]\n  var bufs = []\n  var length = 0\n  if(!fn) error('algorithm:', alg, 'is not yet supported')\n  return {\n    update: function (data) {\n      if(!Buffer.isBuffer(data)) data = new Buffer(data)\n        \n      bufs.push(data)\n      length += data.length\n      return this\n    },\n    digest: function (enc) {\n      var buf = Buffer.concat(bufs)\n      var r = key ? hmac(fn, key, buf) : fn(buf)\n      bufs = null\n      return enc ? r.toString(enc) : r\n    }\n  }\n}\n\nfunction error () {\n  var m = [].slice.call(arguments).join(' ')\n  throw new Error([\n    m,\n    'we accept pull requests',\n    'http://github.com/dominictarr/crypto-browserify'\n    ].join('\\n'))\n}\n\nexports.createHash = function (alg) { return hash(alg) }\nexports.createHmac = function (alg, key) { return hash(alg, key) }\nexports.randomBytes = function(size, callback) {\n  if (callback && callback.call) {\n    try {\n      callback.call(this, undefined, new Buffer(rng(size)))\n    } catch (err) { callback(err) }\n  } else {\n    return new Buffer(rng(size))\n  }\n}\n\nfunction each(a, f) {\n  for(var i in a)\n    f(a[i], i)\n}\n\neach(['createCredentials'\n, 'createCipher'\n, 'createCipheriv'\n, 'createDecipher'\n, 'createDecipheriv'\n, 'createSign'\n, 'createVerify'\n, 'createDiffieHellman'\n, 'pbkdf2'], function (name) {\n  exports[name] = function () {\n    error('sorry,', name, 'is not implemented yet')\n  }\n})\n\n},{\"./md5\":280,\"./rng\":281,\"./sha\":282,\"./sha256\":283,\"buffer\":274}],280:[function(require,module,exports){\n\n\nvar helpers = require('./helpers');\n\n\nfunction md5_vm_test()\n{\n  return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\n}\n\n\nfunction core_md5(x, len)\n{\n\n  x[len >> 5] |= 0x80 << ((len) % 32);\n  x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n  var a =  1732584193;\n  var b = -271733879;\n  var c = -1732584194;\n  var d =  271733878;\n\n  for(var i = 0; i < x.length; i += 16)\n  {\n    var olda = a;\n    var oldb = b;\n    var oldc = c;\n    var oldd = d;\n\n    a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n    d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n    c = md5_ff(c, d, a, b, x[i+ 2], 17,  606105819);\n    b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n    a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n    d = md5_ff(d, a, b, c, x[i+ 5], 12,  1200080426);\n    c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n    b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n    a = md5_ff(a, b, c, d, x[i+ 8], 7 ,  1770035416);\n    d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n    c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n    b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n    a = md5_ff(a, b, c, d, x[i+12], 7 ,  1804603682);\n    d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n    c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n    b = md5_ff(b, c, d, a, x[i+15], 22,  1236535329);\n\n    a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n    d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n    c = md5_gg(c, d, a, b, x[i+11], 14,  643717713);\n    b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n    a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n    d = md5_gg(d, a, b, c, x[i+10], 9 ,  38016083);\n    c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n    b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n    a = md5_gg(a, b, c, d, x[i+ 9], 5 ,  568446438);\n    d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n    c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n    b = md5_gg(b, c, d, a, x[i+ 8], 20,  1163531501);\n    a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n    d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n    c = md5_gg(c, d, a, b, x[i+ 7], 14,  1735328473);\n    b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n    a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n    d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n    c = md5_hh(c, d, a, b, x[i+11], 16,  1839030562);\n    b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n    a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n    d = md5_hh(d, a, b, c, x[i+ 4], 11,  1272893353);\n    c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n    b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n    a = md5_hh(a, b, c, d, x[i+13], 4 ,  681279174);\n    d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n    c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n    b = md5_hh(b, c, d, a, x[i+ 6], 23,  76029189);\n    a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n    d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n    c = md5_hh(c, d, a, b, x[i+15], 16,  530742520);\n    b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n    a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n    d = md5_ii(d, a, b, c, x[i+ 7], 10,  1126891415);\n    c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n    b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n    a = md5_ii(a, b, c, d, x[i+12], 6 ,  1700485571);\n    d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n    c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n    b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n    a = md5_ii(a, b, c, d, x[i+ 8], 6 ,  1873313359);\n    d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n    c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n    b = md5_ii(b, c, d, a, x[i+13], 21,  1309151649);\n    a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n    d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n    c = md5_ii(c, d, a, b, x[i+ 2], 15,  718787259);\n    b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n    a = safe_add(a, olda);\n    b = safe_add(b, oldb);\n    c = safe_add(c, oldc);\n    d = safe_add(d, oldd);\n  }\n  return Array(a, b, c, d);\n\n}\n\n\nfunction md5_cmn(q, a, b, x, s, t)\n{\n  return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);\n}\nfunction md5_ff(a, b, c, d, x, s, t)\n{\n  return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);\n}\nfunction md5_gg(a, b, c, d, x, s, t)\n{\n  return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);\n}\nfunction md5_hh(a, b, c, d, x, s, t)\n{\n  return md5_cmn(b ^ c ^ d, a, b, x, s, t);\n}\nfunction md5_ii(a, b, c, d, x, s, t)\n{\n  return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);\n}\n\n\nfunction safe_add(x, y)\n{\n  var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n  return (msw << 16) | (lsw & 0xFFFF);\n}\n\n\nfunction bit_rol(num, cnt)\n{\n  return (num << cnt) | (num >>> (32 - cnt));\n}\n\nmodule.exports = function md5(buf) {\n  return helpers.hash(buf, core_md5, 16);\n};\n\n},{\"./helpers\":278}],281:[function(require,module,exports){\n(function() {\n  var _global = this;\n\n  var mathRNG, whatwgRNG;\n\n  mathRNG = function(size) {\n    var bytes = new Array(size);\n    var r;\n\n    for (var i = 0, r; i < size; i++) {\n      if ((i & 0x03) == 0) r = Math.random() * 0x100000000;\n      bytes[i] = r >>> ((i & 0x03) << 3) & 0xff;\n    }\n\n    return bytes;\n  }\n\n  if (_global.crypto && crypto.getRandomValues) {\n    whatwgRNG = function(size) {\n      var bytes = new Uint8Array(size);\n      crypto.getRandomValues(bytes);\n      return bytes;\n    }\n  }\n\n  module.exports = whatwgRNG || mathRNG;\n\n}())\n\n},{}],282:[function(require,module,exports){\n\n\nvar helpers = require('./helpers');\n\n\nfunction core_sha1(x, len)\n{\n\n  x[len >> 5] |= 0x80 << (24 - len % 32);\n  x[((len + 64 >> 9) << 4) + 15] = len;\n\n  var w = Array(80);\n  var a =  1732584193;\n  var b = -271733879;\n  var c = -1732584194;\n  var d =  271733878;\n  var e = -1009589776;\n\n  for(var i = 0; i < x.length; i += 16)\n  {\n    var olda = a;\n    var oldb = b;\n    var oldc = c;\n    var oldd = d;\n    var olde = e;\n\n    for(var j = 0; j < 80; j++)\n    {\n      if(j < 16) w[j] = x[i + j];\n      else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);\n      var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)),\n                       safe_add(safe_add(e, w[j]), sha1_kt(j)));\n      e = d;\n      d = c;\n      c = rol(b, 30);\n      b = a;\n      a = t;\n    }\n\n    a = safe_add(a, olda);\n    b = safe_add(b, oldb);\n    c = safe_add(c, oldc);\n    d = safe_add(d, oldd);\n    e = safe_add(e, olde);\n  }\n  return Array(a, b, c, d, e);\n\n}\n\n\nfunction sha1_ft(t, b, c, d)\n{\n  if(t < 20) return (b & c) | ((~b) & d);\n  if(t < 40) return b ^ c ^ d;\n  if(t < 60) return (b & c) | (b & d) | (c & d);\n  return b ^ c ^ d;\n}\n\n\nfunction sha1_kt(t)\n{\n  return (t < 20) ?  1518500249 : (t < 40) ?  1859775393 :\n         (t < 60) ? -1894007588 : -899497514;\n}\n\n\nfunction safe_add(x, y)\n{\n  var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n  return (msw << 16) | (lsw & 0xFFFF);\n}\n\n\nfunction rol(num, cnt)\n{\n  return (num << cnt) | (num >>> (32 - cnt));\n}\n\nmodule.exports = function sha1(buf) {\n  return helpers.hash(buf, core_sha1, 20, true);\n};\n\n},{\"./helpers\":278}],283:[function(require,module,exports){\n\n\n\nvar helpers = require('./helpers');\n\nvar safe_add = function(x, y) {\n  var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n  return (msw << 16) | (lsw & 0xFFFF);\n};\n\nvar S = function(X, n) {\n  return (X >>> n) | (X << (32 - n));\n};\n\nvar R = function(X, n) {\n  return (X >>> n);\n};\n\nvar Ch = function(x, y, z) {\n  return ((x & y) ^ ((~x) & z));\n};\n\nvar Maj = function(x, y, z) {\n  return ((x & y) ^ (x & z) ^ (y & z));\n};\n\nvar Sigma0256 = function(x) {\n  return (S(x, 2) ^ S(x, 13) ^ S(x, 22));\n};\n\nvar Sigma1256 = function(x) {\n  return (S(x, 6) ^ S(x, 11) ^ S(x, 25));\n};\n\nvar Gamma0256 = function(x) {\n  return (S(x, 7) ^ S(x, 18) ^ R(x, 3));\n};\n\nvar Gamma1256 = function(x) {\n  return (S(x, 17) ^ S(x, 19) ^ R(x, 10));\n};\n\nvar core_sha256 = function(m, l) {\n  var K = new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2);\n  var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19);\n    var W = new Array(64);\n    var a, b, c, d, e, f, g, h, i, j;\n    var T1, T2;\n\n  m[l >> 5] |= 0x80 << (24 - l % 32);\n  m[((l + 64 >> 9) << 4) + 15] = l;\n  for (var i = 0; i < m.length; i += 16) {\n    a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7];\n    for (var j = 0; j < 64; j++) {\n      if (j < 16) {\n        W[j] = m[j + i];\n      } else {\n        W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]);\n      }\n      T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]);\n      T2 = safe_add(Sigma0256(a), Maj(a, b, c));\n      h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2);\n    }\n    HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]); HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]);\n    HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]); HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]);\n  }\n  return HASH;\n};\n\nmodule.exports = function sha256(buf) {\n  return helpers.hash(buf, core_sha256, 32, true);\n};\n\n},{\"./helpers\":278}],284:[function(require,module,exports){\n(function(exports) {\n  \"use strict\";\n\n  function isArray(obj) {\n    if (obj !== null) {\n      return Object.prototype.toString.call(obj) === \"[object Array]\";\n    } else {\n      return false;\n    }\n  }\n\n  function isObject(obj) {\n    if (obj !== null) {\n      return Object.prototype.toString.call(obj) === \"[object Object]\";\n    } else {\n      return false;\n    }\n  }\n\n  function strictDeepEqual(first, second) {\n    if (first === second) {\n      return true;\n    }\n\n    var firstType = Object.prototype.toString.call(first);\n    if (firstType !== Object.prototype.toString.call(second)) {\n      return false;\n    }\n    if (isArray(first) === true) {\n      if (first.length !== second.length) {\n        return false;\n      }\n      for (var i = 0; i < first.length; i++) {\n        if (strictDeepEqual(first[i], second[i]) === false) {\n          return false;\n        }\n      }\n      return true;\n    }\n    if (isObject(first) === true) {\n      var keysSeen = {};\n      for (var key in first) {\n        if (hasOwnProperty.call(first, key)) {\n          if (strictDeepEqual(first[key], second[key]) === false) {\n            return false;\n          }\n          keysSeen[key] = true;\n        }\n      }\n      for (var key2 in second) {\n        if (hasOwnProperty.call(second, key2)) {\n          if (keysSeen[key2] !== true) {\n            return false;\n          }\n        }\n      }\n      return true;\n    }\n    return false;\n  }\n\n  function isFalse(obj) {\n\n    if (obj === \"\" || obj === false || obj === null) {\n        return true;\n    } else if (isArray(obj) && obj.length === 0) {\n        return true;\n    } else if (isObject(obj)) {\n        for (var key in obj) {\n            if (obj.hasOwnProperty(key)) {\n              return false;\n            }\n        }\n        return true;\n    } else {\n        return false;\n    }\n  }\n\n  function objValues(obj) {\n    var keys = Object.keys(obj);\n    var values = [];\n    for (var i = 0; i < keys.length; i++) {\n      values.push(obj[keys[i]]);\n    }\n    return values;\n  }\n\n  function merge(a, b) {\n      var merged = {};\n      for (var key in a) {\n          merged[key] = a[key];\n      }\n      for (var key2 in b) {\n          merged[key2] = b[key2];\n      }\n      return merged;\n  }\n\n  var trimLeft;\n  if (typeof String.prototype.trimLeft === \"function\") {\n    trimLeft = function(str) {\n      return str.trimLeft();\n    };\n  } else {\n    trimLeft = function(str) {\n      return str.match(/^\\s*(.*)/)[1];\n    };\n  }\n\n  var TYPE_NUMBER = 0;\n  var TYPE_ANY = 1;\n  var TYPE_STRING = 2;\n  var TYPE_ARRAY = 3;\n  var TYPE_OBJECT = 4;\n  var TYPE_BOOLEAN = 5;\n  var TYPE_EXPREF = 6;\n  var TYPE_NULL = 7;\n  var TYPE_ARRAY_NUMBER = 8;\n  var TYPE_ARRAY_STRING = 9;\n\n  var TOK_EOF = \"EOF\";\n  var TOK_UNQUOTEDIDENTIFIER = \"UnquotedIdentifier\";\n  var TOK_QUOTEDIDENTIFIER = \"QuotedIdentifier\";\n  var TOK_RBRACKET = \"Rbracket\";\n  var TOK_RPAREN = \"Rparen\";\n  var TOK_COMMA = \"Comma\";\n  var TOK_COLON = \"Colon\";\n  var TOK_RBRACE = \"Rbrace\";\n  var TOK_NUMBER = \"Number\";\n  var TOK_CURRENT = \"Current\";\n  var TOK_EXPREF = \"Expref\";\n  var TOK_PIPE = \"Pipe\";\n  var TOK_OR = \"Or\";\n  var TOK_AND = \"And\";\n  var TOK_EQ = \"EQ\";\n  var TOK_GT = \"GT\";\n  var TOK_LT = \"LT\";\n  var TOK_GTE = \"GTE\";\n  var TOK_LTE = \"LTE\";\n  var TOK_NE = \"NE\";\n  var TOK_FLATTEN = \"Flatten\";\n  var TOK_STAR = \"Star\";\n  var TOK_FILTER = \"Filter\";\n  var TOK_DOT = \"Dot\";\n  var TOK_NOT = \"Not\";\n  var TOK_LBRACE = \"Lbrace\";\n  var TOK_LBRACKET = \"Lbracket\";\n  var TOK_LPAREN= \"Lparen\";\n  var TOK_LITERAL= \"Literal\";\n\n\n  var basicTokens = {\n    \".\": TOK_DOT,\n    \"*\": TOK_STAR,\n    \",\": TOK_COMMA,\n    \":\": TOK_COLON,\n    \"{\": TOK_LBRACE,\n    \"}\": TOK_RBRACE,\n    \"]\": TOK_RBRACKET,\n    \"(\": TOK_LPAREN,\n    \")\": TOK_RPAREN,\n    \"@\": TOK_CURRENT\n  };\n\n  var operatorStartToken = {\n      \"<\": true,\n      \">\": true,\n      \"=\": true,\n      \"!\": true\n  };\n\n  var skipChars = {\n      \" \": true,\n      \"\\t\": true,\n      \"\\n\": true\n  };\n\n\n  function isAlpha(ch) {\n      return (ch >= \"a\" && ch <= \"z\") ||\n             (ch >= \"A\" && ch <= \"Z\") ||\n             ch === \"_\";\n  }\n\n  function isNum(ch) {\n      return (ch >= \"0\" && ch <= \"9\") ||\n             ch === \"-\";\n  }\n  function isAlphaNum(ch) {\n      return (ch >= \"a\" && ch <= \"z\") ||\n             (ch >= \"A\" && ch <= \"Z\") ||\n             (ch >= \"0\" && ch <= \"9\") ||\n             ch === \"_\";\n  }\n\n  function Lexer() {\n  }\n  Lexer.prototype = {\n      tokenize: function(stream) {\n          var tokens = [];\n          this._current = 0;\n          var start;\n          var identifier;\n          var token;\n          while (this._current < stream.length) {\n              if (isAlpha(stream[this._current])) {\n                  start = this._current;\n                  identifier = this._consumeUnquotedIdentifier(stream);\n                  tokens.push({type: TOK_UNQUOTEDIDENTIFIER,\n                               value: identifier,\n                               start: start});\n              } else if (basicTokens[stream[this._current]] !== undefined) {\n                  tokens.push({type: basicTokens[stream[this._current]],\n                              value: stream[this._current],\n                              start: this._current});\n                  this._current++;\n              } else if (isNum(stream[this._current])) {\n                  token = this._consumeNumber(stream);\n                  tokens.push(token);\n              } else if (stream[this._current] === \"[\") {\n                  token = this._consumeLBracket(stream);\n                  tokens.push(token);\n              } else if (stream[this._current] === \"\\\"\") {\n                  start = this._current;\n                  identifier = this._consumeQuotedIdentifier(stream);\n                  tokens.push({type: TOK_QUOTEDIDENTIFIER,\n                               value: identifier,\n                               start: start});\n              } else if (stream[this._current] === \"'\") {\n                  start = this._current;\n                  identifier = this._consumeRawStringLiteral(stream);\n                  tokens.push({type: TOK_LITERAL,\n                               value: identifier,\n                               start: start});\n              } else if (stream[this._current] === \"`\") {\n                  start = this._current;\n                  var literal = this._consumeLiteral(stream);\n                  tokens.push({type: TOK_LITERAL,\n                               value: literal,\n                               start: start});\n              } else if (operatorStartToken[stream[this._current]] !== undefined) {\n                  tokens.push(this._consumeOperator(stream));\n              } else if (skipChars[stream[this._current]] !== undefined) {\n                  this._current++;\n              } else if (stream[this._current] === \"&\") {\n                  start = this._current;\n                  this._current++;\n                  if (stream[this._current] === \"&\") {\n                      this._current++;\n                      tokens.push({type: TOK_AND, value: \"&&\", start: start});\n                  } else {\n                      tokens.push({type: TOK_EXPREF, value: \"&\", start: start});\n                  }\n              } else if (stream[this._current] === \"|\") {\n                  start = this._current;\n                  this._current++;\n                  if (stream[this._current] === \"|\") {\n                      this._current++;\n                      tokens.push({type: TOK_OR, value: \"||\", start: start});\n                  } else {\n                      tokens.push({type: TOK_PIPE, value: \"|\", start: start});\n                  }\n              } else {\n                  var error = new Error(\"Unknown character:\" + stream[this._current]);\n                  error.name = \"LexerError\";\n                  throw error;\n              }\n          }\n          return tokens;\n      },\n\n      _consumeUnquotedIdentifier: function(stream) {\n          var start = this._current;\n          this._current++;\n          while (this._current < stream.length && isAlphaNum(stream[this._current])) {\n              this._current++;\n          }\n          return stream.slice(start, this._current);\n      },\n\n      _consumeQuotedIdentifier: function(stream) {\n          var start = this._current;\n          this._current++;\n          var maxLength = stream.length;\n          while (stream[this._current] !== \"\\\"\" && this._current < maxLength) {\n              var current = this._current;\n              if (stream[current] === \"\\\\\" && (stream[current + 1] === \"\\\\\" ||\n                                               stream[current + 1] === \"\\\"\")) {\n                  current += 2;\n              } else {\n                  current++;\n              }\n              this._current = current;\n          }\n          this._current++;\n          return JSON.parse(stream.slice(start, this._current));\n      },\n\n      _consumeRawStringLiteral: function(stream) {\n          var start = this._current;\n          this._current++;\n          var maxLength = stream.length;\n          while (stream[this._current] !== \"'\" && this._current < maxLength) {\n              var current = this._current;\n              if (stream[current] === \"\\\\\" && (stream[current + 1] === \"\\\\\" ||\n                                               stream[current + 1] === \"'\")) {\n                  current += 2;\n              } else {\n                  current++;\n              }\n              this._current = current;\n          }\n          this._current++;\n          var literal = stream.slice(start + 1, this._current - 1);\n          return literal.replace(\"\\\\'\", \"'\");\n      },\n\n      _consumeNumber: function(stream) {\n          var start = this._current;\n          this._current++;\n          var maxLength = stream.length;\n          while (isNum(stream[this._current]) && this._current < maxLength) {\n              this._current++;\n          }\n          var value = parseInt(stream.slice(start, this._current));\n          return {type: TOK_NUMBER, value: value, start: start};\n      },\n\n      _consumeLBracket: function(stream) {\n          var start = this._current;\n          this._current++;\n          if (stream[this._current] === \"?\") {\n              this._current++;\n              return {type: TOK_FILTER, value: \"[?\", start: start};\n          } else if (stream[this._current] === \"]\") {\n              this._current++;\n              return {type: TOK_FLATTEN, value: \"[]\", start: start};\n          } else {\n              return {type: TOK_LBRACKET, value: \"[\", start: start};\n          }\n      },\n\n      _consumeOperator: function(stream) {\n          var start = this._current;\n          var startingChar = stream[start];\n          this._current++;\n          if (startingChar === \"!\") {\n              if (stream[this._current] === \"=\") {\n                  this._current++;\n                  return {type: TOK_NE, value: \"!=\", start: start};\n              } else {\n                return {type: TOK_NOT, value: \"!\", start: start};\n              }\n          } else if (startingChar === \"<\") {\n              if (stream[this._current] === \"=\") {\n                  this._current++;\n                  return {type: TOK_LTE, value: \"<=\", start: start};\n              } else {\n                  return {type: TOK_LT, value: \"<\", start: start};\n              }\n          } else if (startingChar === \">\") {\n              if (stream[this._current] === \"=\") {\n                  this._current++;\n                  return {type: TOK_GTE, value: \">=\", start: start};\n              } else {\n                  return {type: TOK_GT, value: \">\", start: start};\n              }\n          } else if (startingChar === \"=\") {\n              if (stream[this._current] === \"=\") {\n                  this._current++;\n                  return {type: TOK_EQ, value: \"==\", start: start};\n              }\n          }\n      },\n\n      _consumeLiteral: function(stream) {\n          this._current++;\n          var start = this._current;\n          var maxLength = stream.length;\n          var literal;\n          while(stream[this._current] !== \"`\" && this._current < maxLength) {\n              var current = this._current;\n              if (stream[current] === \"\\\\\" && (stream[current + 1] === \"\\\\\" ||\n                                               stream[current + 1] === \"`\")) {\n                  current += 2;\n              } else {\n                  current++;\n              }\n              this._current = current;\n          }\n          var literalString = trimLeft(stream.slice(start, this._current));\n          literalString = literalString.replace(\"\\\\`\", \"`\");\n          if (this._looksLikeJSON(literalString)) {\n              literal = JSON.parse(literalString);\n          } else {\n              literal = JSON.parse(\"\\\"\" + literalString + \"\\\"\");\n          }\n          this._current++;\n          return literal;\n      },\n\n      _looksLikeJSON: function(literalString) {\n          var startingChars = \"[{\\\"\";\n          var jsonLiterals = [\"true\", \"false\", \"null\"];\n          var numberLooking = \"-0123456789\";\n\n          if (literalString === \"\") {\n              return false;\n          } else if (startingChars.indexOf(literalString[0]) >= 0) {\n              return true;\n          } else if (jsonLiterals.indexOf(literalString) >= 0) {\n              return true;\n          } else if (numberLooking.indexOf(literalString[0]) >= 0) {\n              try {\n                  JSON.parse(literalString);\n                  return true;\n              } catch (ex) {\n                  return false;\n              }\n          } else {\n              return false;\n          }\n      }\n  };\n\n      var bindingPower = {};\n      bindingPower[TOK_EOF] = 0;\n      bindingPower[TOK_UNQUOTEDIDENTIFIER] = 0;\n      bindingPower[TOK_QUOTEDIDENTIFIER] = 0;\n      bindingPower[TOK_RBRACKET] = 0;\n      bindingPower[TOK_RPAREN] = 0;\n      bindingPower[TOK_COMMA] = 0;\n      bindingPower[TOK_RBRACE] = 0;\n      bindingPower[TOK_NUMBER] = 0;\n      bindingPower[TOK_CURRENT] = 0;\n      bindingPower[TOK_EXPREF] = 0;\n      bindingPower[TOK_PIPE] = 1;\n      bindingPower[TOK_OR] = 2;\n      bindingPower[TOK_AND] = 3;\n      bindingPower[TOK_EQ] = 5;\n      bindingPower[TOK_GT] = 5;\n      bindingPower[TOK_LT] = 5;\n      bindingPower[TOK_GTE] = 5;\n      bindingPower[TOK_LTE] = 5;\n      bindingPower[TOK_NE] = 5;\n      bindingPower[TOK_FLATTEN] = 9;\n      bindingPower[TOK_STAR] = 20;\n      bindingPower[TOK_FILTER] = 21;\n      bindingPower[TOK_DOT] = 40;\n      bindingPower[TOK_NOT] = 45;\n      bindingPower[TOK_LBRACE] = 50;\n      bindingPower[TOK_LBRACKET] = 55;\n      bindingPower[TOK_LPAREN] = 60;\n\n  function Parser() {\n  }\n\n  Parser.prototype = {\n      parse: function(expression) {\n          this._loadTokens(expression);\n          this.index = 0;\n          var ast = this.expression(0);\n          if (this._lookahead(0) !== TOK_EOF) {\n              var t = this._lookaheadToken(0);\n              var error = new Error(\n                  \"Unexpected token type: \" + t.type + \", value: \" + t.value);\n              error.name = \"ParserError\";\n              throw error;\n          }\n          return ast;\n      },\n\n      _loadTokens: function(expression) {\n          var lexer = new Lexer();\n          var tokens = lexer.tokenize(expression);\n          tokens.push({type: TOK_EOF, value: \"\", start: expression.length});\n          this.tokens = tokens;\n      },\n\n      expression: function(rbp) {\n          var leftToken = this._lookaheadToken(0);\n          this._advance();\n          var left = this.nud(leftToken);\n          var currentToken = this._lookahead(0);\n          while (rbp < bindingPower[currentToken]) {\n              this._advance();\n              left = this.led(currentToken, left);\n              currentToken = this._lookahead(0);\n          }\n          return left;\n      },\n\n      _lookahead: function(number) {\n          return this.tokens[this.index + number].type;\n      },\n\n      _lookaheadToken: function(number) {\n          return this.tokens[this.index + number];\n      },\n\n      _advance: function() {\n          this.index++;\n      },\n\n      nud: function(token) {\n        var left;\n        var right;\n        var expression;\n        switch (token.type) {\n          case TOK_LITERAL:\n            return {type: \"Literal\", value: token.value};\n          case TOK_UNQUOTEDIDENTIFIER:\n            return {type: \"Field\", name: token.value};\n          case TOK_QUOTEDIDENTIFIER:\n            var node = {type: \"Field\", name: token.value};\n            if (this._lookahead(0) === TOK_LPAREN) {\n                throw new Error(\"Quoted identifier not allowed for function names.\");\n            } else {\n                return node;\n            }\n            break;\n          case TOK_NOT:\n            right = this.expression(bindingPower.Not);\n            return {type: \"NotExpression\", children: [right]};\n          case TOK_STAR:\n            left = {type: \"Identity\"};\n            right = null;\n            if (this._lookahead(0) === TOK_RBRACKET) {\n                right = {type: \"Identity\"};\n            } else {\n                right = this._parseProjectionRHS(bindingPower.Star);\n            }\n            return {type: \"ValueProjection\", children: [left, right]};\n          case TOK_FILTER:\n            return this.led(token.type, {type: \"Identity\"});\n          case TOK_LBRACE:\n            return this._parseMultiselectHash();\n          case TOK_FLATTEN:\n            left = {type: TOK_FLATTEN, children: [{type: \"Identity\"}]};\n            right = this._parseProjectionRHS(bindingPower.Flatten);\n            return {type: \"Projection\", children: [left, right]};\n          case TOK_LBRACKET:\n            if (this._lookahead(0) === TOK_NUMBER || this._lookahead(0) === TOK_COLON) {\n                right = this._parseIndexExpression();\n                return this._projectIfSlice({type: \"Identity\"}, right);\n            } else if (this._lookahead(0) === TOK_STAR &&\n                       this._lookahead(1) === TOK_RBRACKET) {\n                this._advance();\n                this._advance();\n                right = this._parseProjectionRHS(bindingPower.Star);\n                return {type: \"Projection\",\n                        children: [{type: \"Identity\"}, right]};\n            } else {\n                return this._parseMultiselectList();\n            }\n            break;\n          case TOK_CURRENT:\n            return {type: TOK_CURRENT};\n          case TOK_EXPREF:\n            expression = this.expression(bindingPower.Expref);\n            return {type: \"ExpressionReference\", children: [expression]};\n          case TOK_LPAREN:\n            var args = [];\n            while (this._lookahead(0) !== TOK_RPAREN) {\n              if (this._lookahead(0) === TOK_CURRENT) {\n                expression = {type: TOK_CURRENT};\n                this._advance();\n              } else {\n                expression = this.expression(0);\n              }\n              args.push(expression);\n            }\n            this._match(TOK_RPAREN);\n            return args[0];\n          default:\n            this._errorToken(token);\n        }\n      },\n\n      led: function(tokenName, left) {\n        var right;\n        switch(tokenName) {\n          case TOK_DOT:\n            var rbp = bindingPower.Dot;\n            if (this._lookahead(0) !== TOK_STAR) {\n                right = this._parseDotRHS(rbp);\n                return {type: \"Subexpression\", children: [left, right]};\n            } else {\n                this._advance();\n                right = this._parseProjectionRHS(rbp);\n                return {type: \"ValueProjection\", children: [left, right]};\n            }\n            break;\n          case TOK_PIPE:\n            right = this.expression(bindingPower.Pipe);\n            return {type: TOK_PIPE, children: [left, right]};\n          case TOK_OR:\n            right = this.expression(bindingPower.Or);\n            return {type: \"OrExpression\", children: [left, right]};\n          case TOK_AND:\n            right = this.expression(bindingPower.And);\n            return {type: \"AndExpression\", children: [left, right]};\n          case TOK_LPAREN:\n            var name = left.name;\n            var args = [];\n            var expression, node;\n            while (this._lookahead(0) !== TOK_RPAREN) {\n              if (this._lookahead(0) === TOK_CURRENT) {\n                expression = {type: TOK_CURRENT};\n                this._advance();\n              } else {\n                expression = this.expression(0);\n              }\n              if (this._lookahead(0) === TOK_COMMA) {\n                this._match(TOK_COMMA);\n              }\n              args.push(expression);\n            }\n            this._match(TOK_RPAREN);\n            node = {type: \"Function\", name: name, children: args};\n            return node;\n          case TOK_FILTER:\n            var condition = this.expression(0);\n            this._match(TOK_RBRACKET);\n            if (this._lookahead(0) === TOK_FLATTEN) {\n              right = {type: \"Identity\"};\n            } else {\n              right = this._parseProjectionRHS(bindingPower.Filter);\n            }\n            return {type: \"FilterProjection\", children: [left, right, condition]};\n          case TOK_FLATTEN:\n            var leftNode = {type: TOK_FLATTEN, children: [left]};\n            var rightNode = this._parseProjectionRHS(bindingPower.Flatten);\n            return {type: \"Projection\", children: [leftNode, rightNode]};\n          case TOK_EQ:\n          case TOK_NE:\n          case TOK_GT:\n          case TOK_GTE:\n          case TOK_LT:\n          case TOK_LTE:\n            return this._parseComparator(left, tokenName);\n          case TOK_LBRACKET:\n            var token = this._lookaheadToken(0);\n            if (token.type === TOK_NUMBER || token.type === TOK_COLON) {\n                right = this._parseIndexExpression();\n                return this._projectIfSlice(left, right);\n            } else {\n                this._match(TOK_STAR);\n                this._match(TOK_RBRACKET);\n                right = this._parseProjectionRHS(bindingPower.Star);\n                return {type: \"Projection\", children: [left, right]};\n            }\n            break;\n          default:\n            this._errorToken(this._lookaheadToken(0));\n        }\n      },\n\n      _match: function(tokenType) {\n          if (this._lookahead(0) === tokenType) {\n              this._advance();\n          } else {\n              var t = this._lookaheadToken(0);\n              var error = new Error(\"Expected \" + tokenType + \", got: \" + t.type);\n              error.name = \"ParserError\";\n              throw error;\n          }\n      },\n\n      _errorToken: function(token) {\n          var error = new Error(\"Invalid token (\" +\n                                token.type + \"): \\\"\" +\n                                token.value + \"\\\"\");\n          error.name = \"ParserError\";\n          throw error;\n      },\n\n\n      _parseIndexExpression: function() {\n          if (this._lookahead(0) === TOK_COLON || this._lookahead(1) === TOK_COLON) {\n              return this._parseSliceExpression();\n          } else {\n              var node = {\n                  type: \"Index\",\n                  value: this._lookaheadToken(0).value};\n              this._advance();\n              this._match(TOK_RBRACKET);\n              return node;\n          }\n      },\n\n      _projectIfSlice: function(left, right) {\n          var indexExpr = {type: \"IndexExpression\", children: [left, right]};\n          if (right.type === \"Slice\") {\n              return {\n                  type: \"Projection\",\n                  children: [indexExpr, this._parseProjectionRHS(bindingPower.Star)]\n              };\n          } else {\n              return indexExpr;\n          }\n      },\n\n      _parseSliceExpression: function() {\n          var parts = [null, null, null];\n          var index = 0;\n          var currentToken = this._lookahead(0);\n          while (currentToken !== TOK_RBRACKET && index < 3) {\n              if (currentToken === TOK_COLON) {\n                  index++;\n                  this._advance();\n              } else if (currentToken === TOK_NUMBER) {\n                  parts[index] = this._lookaheadToken(0).value;\n                  this._advance();\n              } else {\n                  var t = this._lookahead(0);\n                  var error = new Error(\"Syntax error, unexpected token: \" +\n                                        t.value + \"(\" + t.type + \")\");\n                  error.name = \"Parsererror\";\n                  throw error;\n              }\n              currentToken = this._lookahead(0);\n          }\n          this._match(TOK_RBRACKET);\n          return {\n              type: \"Slice\",\n              children: parts\n          };\n      },\n\n      _parseComparator: function(left, comparator) {\n        var right = this.expression(bindingPower[comparator]);\n        return {type: \"Comparator\", name: comparator, children: [left, right]};\n      },\n\n      _parseDotRHS: function(rbp) {\n          var lookahead = this._lookahead(0);\n          var exprTokens = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER, TOK_STAR];\n          if (exprTokens.indexOf(lookahead) >= 0) {\n              return this.expression(rbp);\n          } else if (lookahead === TOK_LBRACKET) {\n              this._match(TOK_LBRACKET);\n              return this._parseMultiselectList();\n          } else if (lookahead === TOK_LBRACE) {\n              this._match(TOK_LBRACE);\n              return this._parseMultiselectHash();\n          }\n      },\n\n      _parseProjectionRHS: function(rbp) {\n          var right;\n          if (bindingPower[this._lookahead(0)] < 10) {\n              right = {type: \"Identity\"};\n          } else if (this._lookahead(0) === TOK_LBRACKET) {\n              right = this.expression(rbp);\n          } else if (this._lookahead(0) === TOK_FILTER) {\n              right = this.expression(rbp);\n          } else if (this._lookahead(0) === TOK_DOT) {\n              this._match(TOK_DOT);\n              right = this._parseDotRHS(rbp);\n          } else {\n              var t = this._lookaheadToken(0);\n              var error = new Error(\"Sytanx error, unexpected token: \" +\n                                    t.value + \"(\" + t.type + \")\");\n              error.name = \"ParserError\";\n              throw error;\n          }\n          return right;\n      },\n\n      _parseMultiselectList: function() {\n          var expressions = [];\n          while (this._lookahead(0) !== TOK_RBRACKET) {\n              var expression = this.expression(0);\n              expressions.push(expression);\n              if (this._lookahead(0) === TOK_COMMA) {\n                  this._match(TOK_COMMA);\n                  if (this._lookahead(0) === TOK_RBRACKET) {\n                    throw new Error(\"Unexpected token Rbracket\");\n                  }\n              }\n          }\n          this._match(TOK_RBRACKET);\n          return {type: \"MultiSelectList\", children: expressions};\n      },\n\n      _parseMultiselectHash: function() {\n        var pairs = [];\n        var identifierTypes = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER];\n        var keyToken, keyName, value, node;\n        for (;;) {\n          keyToken = this._lookaheadToken(0);\n          if (identifierTypes.indexOf(keyToken.type) < 0) {\n            throw new Error(\"Expecting an identifier token, got: \" +\n                            keyToken.type);\n          }\n          keyName = keyToken.value;\n          this._advance();\n          this._match(TOK_COLON);\n          value = this.expression(0);\n          node = {type: \"KeyValuePair\", name: keyName, value: value};\n          pairs.push(node);\n          if (this._lookahead(0) === TOK_COMMA) {\n            this._match(TOK_COMMA);\n          } else if (this._lookahead(0) === TOK_RBRACE) {\n            this._match(TOK_RBRACE);\n            break;\n          }\n        }\n        return {type: \"MultiSelectHash\", children: pairs};\n      }\n  };\n\n\n  function TreeInterpreter(runtime) {\n    this.runtime = runtime;\n  }\n\n  TreeInterpreter.prototype = {\n      search: function(node, value) {\n          return this.visit(node, value);\n      },\n\n      visit: function(node, value) {\n          var matched, current, result, first, second, field, left, right, collected, i;\n          switch (node.type) {\n            case \"Field\":\n              if (value === null ) {\n                  return null;\n              } else if (isObject(value)) {\n                  field = value[node.name];\n                  if (field === undefined) {\n                      return null;\n                  } else {\n                      return field;\n                  }\n              } else {\n                return null;\n              }\n              break;\n            case \"Subexpression\":\n              result = this.visit(node.children[0], value);\n              for (i = 1; i < node.children.length; i++) {\n                  result = this.visit(node.children[1], result);\n                  if (result === null) {\n                      return null;\n                  }\n              }\n              return result;\n            case \"IndexExpression\":\n              left = this.visit(node.children[0], value);\n              right = this.visit(node.children[1], left);\n              return right;\n            case \"Index\":\n              if (!isArray(value)) {\n                return null;\n              }\n              var index = node.value;\n              if (index < 0) {\n                index = value.length + index;\n              }\n              result = value[index];\n              if (result === undefined) {\n                result = null;\n              }\n              return result;\n            case \"Slice\":\n              if (!isArray(value)) {\n                return null;\n              }\n              var sliceParams = node.children.slice(0);\n              var computed = this.computeSliceParams(value.length, sliceParams);\n              var start = computed[0];\n              var stop = computed[1];\n              var step = computed[2];\n              result = [];\n              if (step > 0) {\n                  for (i = start; i < stop; i += step) {\n                      result.push(value[i]);\n                  }\n              } else {\n                  for (i = start; i > stop; i += step) {\n                      result.push(value[i]);\n                  }\n              }\n              return result;\n            case \"Projection\":\n              var base = this.visit(node.children[0], value);\n              if (!isArray(base)) {\n                return null;\n              }\n              collected = [];\n              for (i = 0; i < base.length; i++) {\n                current = this.visit(node.children[1], base[i]);\n                if (current !== null) {\n                  collected.push(current);\n                }\n              }\n              return collected;\n            case \"ValueProjection\":\n              base = this.visit(node.children[0], value);\n              if (!isObject(base)) {\n                return null;\n              }\n              collected = [];\n              var values = objValues(base);\n              for (i = 0; i < values.length; i++) {\n                current = this.visit(node.children[1], values[i]);\n                if (current !== null) {\n                  collected.push(current);\n                }\n              }\n              return collected;\n            case \"FilterProjection\":\n              base = this.visit(node.children[0], value);\n              if (!isArray(base)) {\n                return null;\n              }\n              var filtered = [];\n              var finalResults = [];\n              for (i = 0; i < base.length; i++) {\n                matched = this.visit(node.children[2], base[i]);\n                if (!isFalse(matched)) {\n                  filtered.push(base[i]);\n                }\n              }\n              for (var j = 0; j < filtered.length; j++) {\n                current = this.visit(node.children[1], filtered[j]);\n                if (current !== null) {\n                  finalResults.push(current);\n                }\n              }\n              return finalResults;\n            case \"Comparator\":\n              first = this.visit(node.children[0], value);\n              second = this.visit(node.children[1], value);\n              switch(node.name) {\n                case TOK_EQ:\n                  result = strictDeepEqual(first, second);\n                  break;\n                case TOK_NE:\n                  result = !strictDeepEqual(first, second);\n                  break;\n                case TOK_GT:\n                  result = first > second;\n                  break;\n                case TOK_GTE:\n                  result = first >= second;\n                  break;\n                case TOK_LT:\n                  result = first < second;\n                  break;\n                case TOK_LTE:\n                  result = first <= second;\n                  break;\n                default:\n                  throw new Error(\"Unknown comparator: \" + node.name);\n              }\n              return result;\n            case TOK_FLATTEN:\n              var original = this.visit(node.children[0], value);\n              if (!isArray(original)) {\n                return null;\n              }\n              var merged = [];\n              for (i = 0; i < original.length; i++) {\n                current = original[i];\n                if (isArray(current)) {\n                  merged.push.apply(merged, current);\n                } else {\n                  merged.push(current);\n                }\n              }\n              return merged;\n            case \"Identity\":\n              return value;\n            case \"MultiSelectList\":\n              if (value === null) {\n                return null;\n              }\n              collected = [];\n              for (i = 0; i < node.children.length; i++) {\n                  collected.push(this.visit(node.children[i], value));\n              }\n              return collected;\n            case \"MultiSelectHash\":\n              if (value === null) {\n                return null;\n              }\n              collected = {};\n              var child;\n              for (i = 0; i < node.children.length; i++) {\n                child = node.children[i];\n                collected[child.name] = this.visit(child.value, value);\n              }\n              return collected;\n            case \"OrExpression\":\n              matched = this.visit(node.children[0], value);\n              if (isFalse(matched)) {\n                  matched = this.visit(node.children[1], value);\n              }\n              return matched;\n            case \"AndExpression\":\n              first = this.visit(node.children[0], value);\n\n              if (isFalse(first) === true) {\n                return first;\n              }\n              return this.visit(node.children[1], value);\n            case \"NotExpression\":\n              first = this.visit(node.children[0], value);\n              return isFalse(first);\n            case \"Literal\":\n              return node.value;\n            case TOK_PIPE:\n              left = this.visit(node.children[0], value);\n              return this.visit(node.children[1], left);\n            case TOK_CURRENT:\n              return value;\n            case \"Function\":\n              var resolvedArgs = [];\n              for (i = 0; i < node.children.length; i++) {\n                  resolvedArgs.push(this.visit(node.children[i], value));\n              }\n              return this.runtime.callFunction(node.name, resolvedArgs);\n            case \"ExpressionReference\":\n              var refNode = node.children[0];\n              refNode.jmespathType = TOK_EXPREF;\n              return refNode;\n            default:\n              throw new Error(\"Unknown node type: \" + node.type);\n          }\n      },\n\n      computeSliceParams: function(arrayLength, sliceParams) {\n        var start = sliceParams[0];\n        var stop = sliceParams[1];\n        var step = sliceParams[2];\n        var computed = [null, null, null];\n        if (step === null) {\n          step = 1;\n        } else if (step === 0) {\n          var error = new Error(\"Invalid slice, step cannot be 0\");\n          error.name = \"RuntimeError\";\n          throw error;\n        }\n        var stepValueNegative = step < 0 ? true : false;\n\n        if (start === null) {\n            start = stepValueNegative ? arrayLength - 1 : 0;\n        } else {\n            start = this.capSliceRange(arrayLength, start, step);\n        }\n\n        if (stop === null) {\n            stop = stepValueNegative ? -1 : arrayLength;\n        } else {\n            stop = this.capSliceRange(arrayLength, stop, step);\n        }\n        computed[0] = start;\n        computed[1] = stop;\n        computed[2] = step;\n        return computed;\n      },\n\n      capSliceRange: function(arrayLength, actualValue, step) {\n          if (actualValue < 0) {\n              actualValue += arrayLength;\n              if (actualValue < 0) {\n                  actualValue = step < 0 ? -1 : 0;\n              }\n          } else if (actualValue >= arrayLength) {\n              actualValue = step < 0 ? arrayLength - 1 : arrayLength;\n          }\n          return actualValue;\n      }\n\n  };\n\n  function Runtime(interpreter) {\n    this._interpreter = interpreter;\n    this.functionTable = {\n        abs: {_func: this._functionAbs, _signature: [{types: [TYPE_NUMBER]}]},\n        avg: {_func: this._functionAvg, _signature: [{types: [TYPE_ARRAY_NUMBER]}]},\n        ceil: {_func: this._functionCeil, _signature: [{types: [TYPE_NUMBER]}]},\n        contains: {\n            _func: this._functionContains,\n            _signature: [{types: [TYPE_STRING, TYPE_ARRAY]},\n                        {types: [TYPE_ANY]}]},\n        \"ends_with\": {\n            _func: this._functionEndsWith,\n            _signature: [{types: [TYPE_STRING]}, {types: [TYPE_STRING]}]},\n        floor: {_func: this._functionFloor, _signature: [{types: [TYPE_NUMBER]}]},\n        length: {\n            _func: this._functionLength,\n            _signature: [{types: [TYPE_STRING, TYPE_ARRAY, TYPE_OBJECT]}]},\n        map: {\n            _func: this._functionMap,\n            _signature: [{types: [TYPE_EXPREF]}, {types: [TYPE_ARRAY]}]},\n        max: {\n            _func: this._functionMax,\n            _signature: [{types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING]}]},\n        \"merge\": {\n            _func: this._functionMerge,\n            _signature: [{types: [TYPE_OBJECT], variadic: true}]\n        },\n        \"max_by\": {\n          _func: this._functionMaxBy,\n          _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}]\n        },\n        sum: {_func: this._functionSum, _signature: [{types: [TYPE_ARRAY_NUMBER]}]},\n        \"starts_with\": {\n            _func: this._functionStartsWith,\n            _signature: [{types: [TYPE_STRING]}, {types: [TYPE_STRING]}]},\n        min: {\n            _func: this._functionMin,\n            _signature: [{types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING]}]},\n        \"min_by\": {\n          _func: this._functionMinBy,\n          _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}]\n        },\n        type: {_func: this._functionType, _signature: [{types: [TYPE_ANY]}]},\n        keys: {_func: this._functionKeys, _signature: [{types: [TYPE_OBJECT]}]},\n        values: {_func: this._functionValues, _signature: [{types: [TYPE_OBJECT]}]},\n        sort: {_func: this._functionSort, _signature: [{types: [TYPE_ARRAY_STRING, TYPE_ARRAY_NUMBER]}]},\n        \"sort_by\": {\n          _func: this._functionSortBy,\n          _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}]\n        },\n        join: {\n            _func: this._functionJoin,\n            _signature: [\n                {types: [TYPE_STRING]},\n                {types: [TYPE_ARRAY_STRING]}\n            ]\n        },\n        reverse: {\n            _func: this._functionReverse,\n            _signature: [{types: [TYPE_STRING, TYPE_ARRAY]}]},\n        \"to_array\": {_func: this._functionToArray, _signature: [{types: [TYPE_ANY]}]},\n        \"to_string\": {_func: this._functionToString, _signature: [{types: [TYPE_ANY]}]},\n        \"to_number\": {_func: this._functionToNumber, _signature: [{types: [TYPE_ANY]}]},\n        \"not_null\": {\n            _func: this._functionNotNull,\n            _signature: [{types: [TYPE_ANY], variadic: true}]\n        }\n    };\n  }\n\n  Runtime.prototype = {\n    callFunction: function(name, resolvedArgs) {\n      var functionEntry = this.functionTable[name];\n      if (functionEntry === undefined) {\n          throw new Error(\"Unknown function: \" + name + \"()\");\n      }\n      this._validateArgs(name, resolvedArgs, functionEntry._signature);\n      return functionEntry._func.call(this, resolvedArgs);\n    },\n\n    _validateArgs: function(name, args, signature) {\n        var pluralized;\n        if (signature[signature.length - 1].variadic) {\n            if (args.length < signature.length) {\n                pluralized = signature.length === 1 ? \" argument\" : \" arguments\";\n                throw new Error(\"ArgumentError: \" + name + \"() \" +\n                                \"takes at least\" + signature.length + pluralized +\n                                \" but received \" + args.length);\n            }\n        } else if (args.length !== signature.length) {\n            pluralized = signature.length === 1 ? \" argument\" : \" arguments\";\n            throw new Error(\"ArgumentError: \" + name + \"() \" +\n                            \"takes \" + signature.length + pluralized +\n                            \" but received \" + args.length);\n        }\n        var currentSpec;\n        var actualType;\n        var typeMatched;\n        for (var i = 0; i < signature.length; i++) {\n            typeMatched = false;\n            currentSpec = signature[i].types;\n            actualType = this._getTypeName(args[i]);\n            for (var j = 0; j < currentSpec.length; j++) {\n                if (this._typeMatches(actualType, currentSpec[j], args[i])) {\n                    typeMatched = true;\n                    break;\n                }\n            }\n            if (!typeMatched) {\n                throw new Error(\"TypeError: \" + name + \"() \" +\n                                \"expected argument \" + (i + 1) +\n                                \" to be type \" + currentSpec +\n                                \" but received type \" + actualType +\n                                \" instead.\");\n            }\n        }\n    },\n\n    _typeMatches: function(actual, expected, argValue) {\n        if (expected === TYPE_ANY) {\n            return true;\n        }\n        if (expected === TYPE_ARRAY_STRING ||\n            expected === TYPE_ARRAY_NUMBER ||\n            expected === TYPE_ARRAY) {\n            if (expected === TYPE_ARRAY) {\n                return actual === TYPE_ARRAY;\n            } else if (actual === TYPE_ARRAY) {\n                var subtype;\n                if (expected === TYPE_ARRAY_NUMBER) {\n                  subtype = TYPE_NUMBER;\n                } else if (expected === TYPE_ARRAY_STRING) {\n                  subtype = TYPE_STRING;\n                }\n                for (var i = 0; i < argValue.length; i++) {\n                    if (!this._typeMatches(\n                            this._getTypeName(argValue[i]), subtype,\n                                             argValue[i])) {\n                        return false;\n                    }\n                }\n                return true;\n            }\n        } else {\n            return actual === expected;\n        }\n    },\n    _getTypeName: function(obj) {\n        switch (Object.prototype.toString.call(obj)) {\n            case \"[object String]\":\n              return TYPE_STRING;\n            case \"[object Number]\":\n              return TYPE_NUMBER;\n            case \"[object Array]\":\n              return TYPE_ARRAY;\n            case \"[object Boolean]\":\n              return TYPE_BOOLEAN;\n            case \"[object Null]\":\n              return TYPE_NULL;\n            case \"[object Object]\":\n              if (obj.jmespathType === TOK_EXPREF) {\n                return TYPE_EXPREF;\n              } else {\n                return TYPE_OBJECT;\n              }\n        }\n    },\n\n    _functionStartsWith: function(resolvedArgs) {\n        return resolvedArgs[0].lastIndexOf(resolvedArgs[1]) === 0;\n    },\n\n    _functionEndsWith: function(resolvedArgs) {\n        var searchStr = resolvedArgs[0];\n        var suffix = resolvedArgs[1];\n        return searchStr.indexOf(suffix, searchStr.length - suffix.length) !== -1;\n    },\n\n    _functionReverse: function(resolvedArgs) {\n        var typeName = this._getTypeName(resolvedArgs[0]);\n        if (typeName === TYPE_STRING) {\n          var originalStr = resolvedArgs[0];\n          var reversedStr = \"\";\n          for (var i = originalStr.length - 1; i >= 0; i--) {\n              reversedStr += originalStr[i];\n          }\n          return reversedStr;\n        } else {\n          var reversedArray = resolvedArgs[0].slice(0);\n          reversedArray.reverse();\n          return reversedArray;\n        }\n    },\n\n    _functionAbs: function(resolvedArgs) {\n      return Math.abs(resolvedArgs[0]);\n    },\n\n    _functionCeil: function(resolvedArgs) {\n        return Math.ceil(resolvedArgs[0]);\n    },\n\n    _functionAvg: function(resolvedArgs) {\n        var sum = 0;\n        var inputArray = resolvedArgs[0];\n        for (var i = 0; i < inputArray.length; i++) {\n            sum += inputArray[i];\n        }\n        return sum / inputArray.length;\n    },\n\n    _functionContains: function(resolvedArgs) {\n        return resolvedArgs[0].indexOf(resolvedArgs[1]) >= 0;\n    },\n\n    _functionFloor: function(resolvedArgs) {\n        return Math.floor(resolvedArgs[0]);\n    },\n\n    _functionLength: function(resolvedArgs) {\n       if (!isObject(resolvedArgs[0])) {\n         return resolvedArgs[0].length;\n       } else {\n         return Object.keys(resolvedArgs[0]).length;\n       }\n    },\n\n    _functionMap: function(resolvedArgs) {\n      var mapped = [];\n      var interpreter = this._interpreter;\n      var exprefNode = resolvedArgs[0];\n      var elements = resolvedArgs[1];\n      for (var i = 0; i < elements.length; i++) {\n          mapped.push(interpreter.visit(exprefNode, elements[i]));\n      }\n      return mapped;\n    },\n\n    _functionMerge: function(resolvedArgs) {\n      var merged = {};\n      for (var i = 0; i < resolvedArgs.length; i++) {\n        var current = resolvedArgs[i];\n        for (var key in current) {\n          merged[key] = current[key];\n        }\n      }\n      return merged;\n    },\n\n    _functionMax: function(resolvedArgs) {\n      if (resolvedArgs[0].length > 0) {\n        var typeName = this._getTypeName(resolvedArgs[0][0]);\n        if (typeName === TYPE_NUMBER) {\n          return Math.max.apply(Math, resolvedArgs[0]);\n        } else {\n          var elements = resolvedArgs[0];\n          var maxElement = elements[0];\n          for (var i = 1; i < elements.length; i++) {\n              if (maxElement.localeCompare(elements[i]) < 0) {\n                  maxElement = elements[i];\n              }\n          }\n          return maxElement;\n        }\n      } else {\n          return null;\n      }\n    },\n\n    _functionMin: function(resolvedArgs) {\n      if (resolvedArgs[0].length > 0) {\n        var typeName = this._getTypeName(resolvedArgs[0][0]);\n        if (typeName === TYPE_NUMBER) {\n          return Math.min.apply(Math, resolvedArgs[0]);\n        } else {\n          var elements = resolvedArgs[0];\n          var minElement = elements[0];\n          for (var i = 1; i < elements.length; i++) {\n              if (elements[i].localeCompare(minElement) < 0) {\n                  minElement = elements[i];\n              }\n          }\n          return minElement;\n        }\n      } else {\n        return null;\n      }\n    },\n\n    _functionSum: function(resolvedArgs) {\n      var sum = 0;\n      var listToSum = resolvedArgs[0];\n      for (var i = 0; i < listToSum.length; i++) {\n        sum += listToSum[i];\n      }\n      return sum;\n    },\n\n    _functionType: function(resolvedArgs) {\n        switch (this._getTypeName(resolvedArgs[0])) {\n          case TYPE_NUMBER:\n            return \"number\";\n          case TYPE_STRING:\n            return \"string\";\n          case TYPE_ARRAY:\n            return \"array\";\n          case TYPE_OBJECT:\n            return \"object\";\n          case TYPE_BOOLEAN:\n            return \"boolean\";\n          case TYPE_EXPREF:\n            return \"expref\";\n          case TYPE_NULL:\n            return \"null\";\n        }\n    },\n\n    _functionKeys: function(resolvedArgs) {\n        return Object.keys(resolvedArgs[0]);\n    },\n\n    _functionValues: function(resolvedArgs) {\n        var obj = resolvedArgs[0];\n        var keys = Object.keys(obj);\n        var values = [];\n        for (var i = 0; i < keys.length; i++) {\n            values.push(obj[keys[i]]);\n        }\n        return values;\n    },\n\n    _functionJoin: function(resolvedArgs) {\n        var joinChar = resolvedArgs[0];\n        var listJoin = resolvedArgs[1];\n        return listJoin.join(joinChar);\n    },\n\n    _functionToArray: function(resolvedArgs) {\n        if (this._getTypeName(resolvedArgs[0]) === TYPE_ARRAY) {\n            return resolvedArgs[0];\n        } else {\n            return [resolvedArgs[0]];\n        }\n    },\n\n    _functionToString: function(resolvedArgs) {\n        if (this._getTypeName(resolvedArgs[0]) === TYPE_STRING) {\n            return resolvedArgs[0];\n        } else {\n            return JSON.stringify(resolvedArgs[0]);\n        }\n    },\n\n    _functionToNumber: function(resolvedArgs) {\n        var typeName = this._getTypeName(resolvedArgs[0]);\n        var convertedValue;\n        if (typeName === TYPE_NUMBER) {\n            return resolvedArgs[0];\n        } else if (typeName === TYPE_STRING) {\n            convertedValue = +resolvedArgs[0];\n            if (!isNaN(convertedValue)) {\n                return convertedValue;\n            }\n        }\n        return null;\n    },\n\n    _functionNotNull: function(resolvedArgs) {\n        for (var i = 0; i < resolvedArgs.length; i++) {\n            if (this._getTypeName(resolvedArgs[i]) !== TYPE_NULL) {\n                return resolvedArgs[i];\n            }\n        }\n        return null;\n    },\n\n    _functionSort: function(resolvedArgs) {\n        var sortedArray = resolvedArgs[0].slice(0);\n        sortedArray.sort();\n        return sortedArray;\n    },\n\n    _functionSortBy: function(resolvedArgs) {\n        var sortedArray = resolvedArgs[0].slice(0);\n        if (sortedArray.length === 0) {\n            return sortedArray;\n        }\n        var interpreter = this._interpreter;\n        var exprefNode = resolvedArgs[1];\n        var requiredType = this._getTypeName(\n            interpreter.visit(exprefNode, sortedArray[0]));\n        if ([TYPE_NUMBER, TYPE_STRING].indexOf(requiredType) < 0) {\n            throw new Error(\"TypeError\");\n        }\n        var that = this;\n        var decorated = [];\n        for (var i = 0; i < sortedArray.length; i++) {\n          decorated.push([i, sortedArray[i]]);\n        }\n        decorated.sort(function(a, b) {\n          var exprA = interpreter.visit(exprefNode, a[1]);\n          var exprB = interpreter.visit(exprefNode, b[1]);\n          if (that._getTypeName(exprA) !== requiredType) {\n              throw new Error(\n                  \"TypeError: expected \" + requiredType + \", received \" +\n                  that._getTypeName(exprA));\n          } else if (that._getTypeName(exprB) !== requiredType) {\n              throw new Error(\n                  \"TypeError: expected \" + requiredType + \", received \" +\n                  that._getTypeName(exprB));\n          }\n          if (exprA > exprB) {\n            return 1;\n          } else if (exprA < exprB) {\n            return -1;\n          } else {\n            return a[0] - b[0];\n          }\n        });\n        for (var j = 0; j < decorated.length; j++) {\n          sortedArray[j] = decorated[j][1];\n        }\n        return sortedArray;\n    },\n\n    _functionMaxBy: function(resolvedArgs) {\n      var exprefNode = resolvedArgs[1];\n      var resolvedArray = resolvedArgs[0];\n      var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]);\n      var maxNumber = -Infinity;\n      var maxRecord;\n      var current;\n      for (var i = 0; i < resolvedArray.length; i++) {\n        current = keyFunction(resolvedArray[i]);\n        if (current > maxNumber) {\n          maxNumber = current;\n          maxRecord = resolvedArray[i];\n        }\n      }\n      return maxRecord;\n    },\n\n    _functionMinBy: function(resolvedArgs) {\n      var exprefNode = resolvedArgs[1];\n      var resolvedArray = resolvedArgs[0];\n      var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]);\n      var minNumber = Infinity;\n      var minRecord;\n      var current;\n      for (var i = 0; i < resolvedArray.length; i++) {\n        current = keyFunction(resolvedArray[i]);\n        if (current < minNumber) {\n          minNumber = current;\n          minRecord = resolvedArray[i];\n        }\n      }\n      return minRecord;\n    },\n\n    createKeyFunction: function(exprefNode, allowedTypes) {\n      var that = this;\n      var interpreter = this._interpreter;\n      var keyFunc = function(x) {\n        var current = interpreter.visit(exprefNode, x);\n        if (allowedTypes.indexOf(that._getTypeName(current)) < 0) {\n          var msg = \"TypeError: expected one of \" + allowedTypes +\n                    \", received \" + that._getTypeName(current);\n          throw new Error(msg);\n        }\n        return current;\n      };\n      return keyFunc;\n    }\n\n  };\n\n  function compile(stream) {\n    var parser = new Parser();\n    var ast = parser.parse(stream);\n    return ast;\n  }\n\n  function tokenize(stream) {\n      var lexer = new Lexer();\n      return lexer.tokenize(stream);\n  }\n\n  function search(data, expression) {\n      var parser = new Parser();\n      var runtime = new Runtime();\n      var interpreter = new TreeInterpreter(runtime);\n      runtime._interpreter = interpreter;\n      var node = parser.parse(expression);\n      return interpreter.search(node, data);\n  }\n\n  exports.tokenize = tokenize;\n  exports.compile = compile;\n  exports.search = search;\n  exports.strictDeepEqual = strictDeepEqual;\n})(typeof exports === \"undefined\" ? this.jmespath = {} : exports);\n\n},{}],285:[function(require,module,exports){\n\n'use strict';\n\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n  sep = sep || '&';\n  eq = eq || '=';\n  var obj = {};\n\n  if (typeof qs !== 'string' || qs.length === 0) {\n    return obj;\n  }\n\n  var regexp = /\\+/g;\n  qs = qs.split(sep);\n\n  var maxKeys = 1000;\n  if (options && typeof options.maxKeys === 'number') {\n    maxKeys = options.maxKeys;\n  }\n\n  var len = qs.length;\n  if (maxKeys > 0 && len > maxKeys) {\n    len = maxKeys;\n  }\n\n  for (var i = 0; i < len; ++i) {\n    var x = qs[i].replace(regexp, '%20'),\n        idx = x.indexOf(eq),\n        kstr, vstr, k, v;\n\n    if (idx >= 0) {\n      kstr = x.substr(0, idx);\n      vstr = x.substr(idx + 1);\n    } else {\n      kstr = x;\n      vstr = '';\n    }\n\n    k = decodeURIComponent(kstr);\n    v = decodeURIComponent(vstr);\n\n    if (!hasOwnProperty(obj, k)) {\n      obj[k] = v;\n    } else if (Array.isArray(obj[k])) {\n      obj[k].push(v);\n    } else {\n      obj[k] = [obj[k], v];\n    }\n  }\n\n  return obj;\n};\n\n},{}],286:[function(require,module,exports){\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n  switch (typeof v) {\n    case 'string':\n      return v;\n\n    case 'boolean':\n      return v ? 'true' : 'false';\n\n    case 'number':\n      return isFinite(v) ? v : '';\n\n    default:\n      return '';\n  }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n  sep = sep || '&';\n  eq = eq || '=';\n  if (obj === null) {\n    obj = undefined;\n  }\n\n  if (typeof obj === 'object') {\n    return Object.keys(obj).map(function(k) {\n      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n      if (Array.isArray(obj[k])) {\n        return obj[k].map(function(v) {\n          return ks + encodeURIComponent(stringifyPrimitive(v));\n        }).join(sep);\n      } else {\n        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n      }\n    }).join(sep);\n\n  }\n\n  if (!name) return '';\n  return encodeURIComponent(stringifyPrimitive(name)) + eq +\n         encodeURIComponent(stringifyPrimitive(obj));\n};\n\n},{}],287:[function(require,module,exports){\narguments[4][270][0].apply(exports,arguments)\n},{\"./decode\":285,\"./encode\":286,\"dup\":270}],288:[function(require,module,exports){\n\nvar punycode = require('punycode');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n  this.protocol = null;\n  this.slashes = null;\n  this.auth = null;\n  this.host = null;\n  this.port = null;\n  this.hostname = null;\n  this.hash = null;\n  this.search = null;\n  this.query = null;\n  this.pathname = null;\n  this.path = null;\n  this.href = null;\n}\n\n\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n    portPattern = /:[0-9]*$/,\n\n    delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n    unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n    autoEscape = ['\\''].concat(unwise),\n    nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n    hostEndingChars = ['/', '?', '#'],\n    hostnameMaxLen = 255,\n    hostnamePartPattern = /^[a-z0-9A-Z_-]{0,63}$/,\n    hostnamePartStart = /^([a-z0-9A-Z_-]{0,63})(.*)$/,\n    unsafeProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    hostlessProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    slashedProtocol = {\n      'http': true,\n      'https': true,\n      'ftp': true,\n      'gopher': true,\n      'file': true,\n      'http:': true,\n      'https:': true,\n      'ftp:': true,\n      'gopher:': true,\n      'file:': true\n    },\n    querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n  if (url && isObject(url) && url instanceof Url) return url;\n\n  var u = new Url;\n  u.parse(url, parseQueryString, slashesDenoteHost);\n  return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n  if (!isString(url)) {\n    throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n  }\n\n  var rest = url;\n\n  rest = rest.trim();\n\n  var proto = protocolPattern.exec(rest);\n  if (proto) {\n    proto = proto[0];\n    var lowerProto = proto.toLowerCase();\n    this.protocol = lowerProto;\n    rest = rest.substr(proto.length);\n  }\n\n  if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n    var slashes = rest.substr(0, 2) === '//';\n    if (slashes && !(proto && hostlessProtocol[proto])) {\n      rest = rest.substr(2);\n      this.slashes = true;\n    }\n  }\n\n  if (!hostlessProtocol[proto] &&\n      (slashes || (proto && !slashedProtocol[proto]))) {\n\n\n\n    var hostEnd = -1;\n    for (var i = 0; i < hostEndingChars.length; i++) {\n      var hec = rest.indexOf(hostEndingChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        hostEnd = hec;\n    }\n\n    var auth, atSign;\n    if (hostEnd === -1) {\n      atSign = rest.lastIndexOf('@');\n    } else {\n      atSign = rest.lastIndexOf('@', hostEnd);\n    }\n\n    if (atSign !== -1) {\n      auth = rest.slice(0, atSign);\n      rest = rest.slice(atSign + 1);\n      this.auth = decodeURIComponent(auth);\n    }\n\n    hostEnd = -1;\n    for (var i = 0; i < nonHostChars.length; i++) {\n      var hec = rest.indexOf(nonHostChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        hostEnd = hec;\n    }\n    if (hostEnd === -1)\n      hostEnd = rest.length;\n\n    this.host = rest.slice(0, hostEnd);\n    rest = rest.slice(hostEnd);\n\n    this.parseHost();\n\n    this.hostname = this.hostname || '';\n\n    var ipv6Hostname = this.hostname[0] === '[' &&\n        this.hostname[this.hostname.length - 1] === ']';\n\n    if (!ipv6Hostname) {\n      var hostparts = this.hostname.split(/\\./);\n      for (var i = 0, l = hostparts.length; i < l; i++) {\n        var part = hostparts[i];\n        if (!part) continue;\n        if (!part.match(hostnamePartPattern)) {\n          var newpart = '';\n          for (var j = 0, k = part.length; j < k; j++) {\n            if (part.charCodeAt(j) > 127) {\n              newpart += 'x';\n            } else {\n              newpart += part[j];\n            }\n          }\n          if (!newpart.match(hostnamePartPattern)) {\n            var validParts = hostparts.slice(0, i);\n            var notHost = hostparts.slice(i + 1);\n            var bit = part.match(hostnamePartStart);\n            if (bit) {\n              validParts.push(bit[1]);\n              notHost.unshift(bit[2]);\n            }\n            if (notHost.length) {\n              rest = '/' + notHost.join('.') + rest;\n            }\n            this.hostname = validParts.join('.');\n            break;\n          }\n        }\n      }\n    }\n\n    if (this.hostname.length > hostnameMaxLen) {\n      this.hostname = '';\n    } else {\n      this.hostname = this.hostname.toLowerCase();\n    }\n\n    if (!ipv6Hostname) {\n      var domainArray = this.hostname.split('.');\n      var newOut = [];\n      for (var i = 0; i < domainArray.length; ++i) {\n        var s = domainArray[i];\n        newOut.push(s.match(/[^A-Za-z0-9_-]/) ?\n            'xn--' + punycode.encode(s) : s);\n      }\n      this.hostname = newOut.join('.');\n    }\n\n    var p = this.port ? ':' + this.port : '';\n    var h = this.hostname || '';\n    this.host = h + p;\n    this.href += this.host;\n\n    if (ipv6Hostname) {\n      this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n      if (rest[0] !== '/') {\n        rest = '/' + rest;\n      }\n    }\n  }\n\n  if (!unsafeProtocol[lowerProto]) {\n\n    for (var i = 0, l = autoEscape.length; i < l; i++) {\n      var ae = autoEscape[i];\n      var esc = encodeURIComponent(ae);\n      if (esc === ae) {\n        esc = escape(ae);\n      }\n      rest = rest.split(ae).join(esc);\n    }\n  }\n\n\n  var hash = rest.indexOf('#');\n  if (hash !== -1) {\n    this.hash = rest.substr(hash);\n    rest = rest.slice(0, hash);\n  }\n  var qm = rest.indexOf('?');\n  if (qm !== -1) {\n    this.search = rest.substr(qm);\n    this.query = rest.substr(qm + 1);\n    if (parseQueryString) {\n      this.query = querystring.parse(this.query);\n    }\n    rest = rest.slice(0, qm);\n  } else if (parseQueryString) {\n    this.search = '';\n    this.query = {};\n  }\n  if (rest) this.pathname = rest;\n  if (slashedProtocol[lowerProto] &&\n      this.hostname && !this.pathname) {\n    this.pathname = '/';\n  }\n\n  if (this.pathname || this.search) {\n    var p = this.pathname || '';\n    var s = this.search || '';\n    this.path = p + s;\n  }\n\n  this.href = this.format();\n  return this;\n};\n\nfunction urlFormat(obj) {\n  if (isString(obj)) obj = urlParse(obj);\n  if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n  return obj.format();\n}\n\nUrl.prototype.format = function() {\n  var auth = this.auth || '';\n  if (auth) {\n    auth = encodeURIComponent(auth);\n    auth = auth.replace(/%3A/i, ':');\n    auth += '@';\n  }\n\n  var protocol = this.protocol || '',\n      pathname = this.pathname || '',\n      hash = this.hash || '',\n      host = false,\n      query = '';\n\n  if (this.host) {\n    host = auth + this.host;\n  } else if (this.hostname) {\n    host = auth + (this.hostname.indexOf(':') === -1 ?\n        this.hostname :\n        '[' + this.hostname + ']');\n    if (this.port) {\n      host += ':' + this.port;\n    }\n  }\n\n  if (this.query &&\n      isObject(this.query) &&\n      Object.keys(this.query).length) {\n    query = querystring.stringify(this.query);\n  }\n\n  var search = this.search || (query && ('?' + query)) || '';\n\n  if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n  if (this.slashes ||\n      (!protocol || slashedProtocol[protocol]) && host !== false) {\n    host = '//' + (host || '');\n    if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n  } else if (!host) {\n    host = '';\n  }\n\n  if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n  if (search && search.charAt(0) !== '?') search = '?' + search;\n\n  pathname = pathname.replace(/[?#]/g, function(match) {\n    return encodeURIComponent(match);\n  });\n  search = search.replace('#', '%23');\n\n  return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n  return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n  return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n  if (!source) return relative;\n  return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n  if (isString(relative)) {\n    var rel = new Url();\n    rel.parse(relative, false, true);\n    relative = rel;\n  }\n\n  var result = new Url();\n  Object.keys(this).forEach(function(k) {\n    result[k] = this[k];\n  }, this);\n\n  result.hash = relative.hash;\n\n  if (relative.href === '') {\n    result.href = result.format();\n    return result;\n  }\n\n  if (relative.slashes && !relative.protocol) {\n    Object.keys(relative).forEach(function(k) {\n      if (k !== 'protocol')\n        result[k] = relative[k];\n    });\n\n    if (slashedProtocol[result.protocol] &&\n        result.hostname && !result.pathname) {\n      result.path = result.pathname = '/';\n    }\n\n    result.href = result.format();\n    return result;\n  }\n\n  if (relative.protocol && relative.protocol !== result.protocol) {\n    if (!slashedProtocol[relative.protocol]) {\n      Object.keys(relative).forEach(function(k) {\n        result[k] = relative[k];\n      });\n      result.href = result.format();\n      return result;\n    }\n\n    result.protocol = relative.protocol;\n    if (!relative.host && !hostlessProtocol[relative.protocol]) {\n      var relPath = (relative.pathname || '').split('/');\n      while (relPath.length && !(relative.host = relPath.shift()));\n      if (!relative.host) relative.host = '';\n      if (!relative.hostname) relative.hostname = '';\n      if (relPath[0] !== '') relPath.unshift('');\n      if (relPath.length < 2) relPath.unshift('');\n      result.pathname = relPath.join('/');\n    } else {\n      result.pathname = relative.pathname;\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    result.host = relative.host || '';\n    result.auth = relative.auth;\n    result.hostname = relative.hostname || relative.host;\n    result.port = relative.port;\n    if (result.pathname || result.search) {\n      var p = result.pathname || '';\n      var s = result.search || '';\n      result.path = p + s;\n    }\n    result.slashes = result.slashes || relative.slashes;\n    result.href = result.format();\n    return result;\n  }\n\n  var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n      isRelAbs = (\n          relative.host ||\n          relative.pathname && relative.pathname.charAt(0) === '/'\n      ),\n      mustEndAbs = (isRelAbs || isSourceAbs ||\n                    (result.host && relative.pathname)),\n      removeAllDots = mustEndAbs,\n      srcPath = result.pathname && result.pathname.split('/') || [],\n      relPath = relative.pathname && relative.pathname.split('/') || [],\n      psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n  if (psychotic) {\n    result.hostname = '';\n    result.port = null;\n    if (result.host) {\n      if (srcPath[0] === '') srcPath[0] = result.host;\n      else srcPath.unshift(result.host);\n    }\n    result.host = '';\n    if (relative.protocol) {\n      relative.hostname = null;\n      relative.port = null;\n      if (relative.host) {\n        if (relPath[0] === '') relPath[0] = relative.host;\n        else relPath.unshift(relative.host);\n      }\n      relative.host = null;\n    }\n    mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n  }\n\n  if (isRelAbs) {\n    result.host = (relative.host || relative.host === '') ?\n                  relative.host : result.host;\n    result.hostname = (relative.hostname || relative.hostname === '') ?\n                      relative.hostname : result.hostname;\n    result.search = relative.search;\n    result.query = relative.query;\n    srcPath = relPath;\n  } else if (relPath.length) {\n    if (!srcPath) srcPath = [];\n    srcPath.pop();\n    srcPath = srcPath.concat(relPath);\n    result.search = relative.search;\n    result.query = relative.query;\n  } else if (!isNullOrUndefined(relative.search)) {\n    if (psychotic) {\n      result.hostname = result.host = srcPath.shift();\n      var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                       result.host.split('@') : false;\n      if (authInHost) {\n        result.auth = authInHost.shift();\n        result.host = result.hostname = authInHost.shift();\n      }\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    if (!isNull(result.pathname) || !isNull(result.search)) {\n      result.path = (result.pathname ? result.pathname : '') +\n                    (result.search ? result.search : '');\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  if (!srcPath.length) {\n    result.pathname = null;\n    if (result.search) {\n      result.path = '/' + result.search;\n    } else {\n      result.path = null;\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  var last = srcPath.slice(-1)[0];\n  var hasTrailingSlash = (\n      (result.host || relative.host) && (last === '.' || last === '..') ||\n      last === '');\n\n  var up = 0;\n  for (var i = srcPath.length; i >= 0; i--) {\n    last = srcPath[i];\n    if (last == '.') {\n      srcPath.splice(i, 1);\n    } else if (last === '..') {\n      srcPath.splice(i, 1);\n      up++;\n    } else if (up) {\n      srcPath.splice(i, 1);\n      up--;\n    }\n  }\n\n  if (!mustEndAbs && !removeAllDots) {\n    for (; up--; up) {\n      srcPath.unshift('..');\n    }\n  }\n\n  if (mustEndAbs && srcPath[0] !== '' &&\n      (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n    srcPath.unshift('');\n  }\n\n  if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n    srcPath.push('');\n  }\n\n  var isAbsolute = srcPath[0] === '' ||\n      (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n  if (psychotic) {\n    result.hostname = result.host = isAbsolute ? '' :\n                                    srcPath.length ? srcPath.shift() : '';\n    var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                     result.host.split('@') : false;\n    if (authInHost) {\n      result.auth = authInHost.shift();\n      result.host = result.hostname = authInHost.shift();\n    }\n  }\n\n  mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n  if (mustEndAbs && !isAbsolute) {\n    srcPath.unshift('');\n  }\n\n  if (!srcPath.length) {\n    result.pathname = null;\n    result.path = null;\n  } else {\n    result.pathname = srcPath.join('/');\n  }\n\n  if (!isNull(result.pathname) || !isNull(result.search)) {\n    result.path = (result.pathname ? result.pathname : '') +\n                  (result.search ? result.search : '');\n  }\n  result.auth = relative.auth || result.auth;\n  result.slashes = result.slashes || relative.slashes;\n  result.href = result.format();\n  return result;\n};\n\nUrl.prototype.parseHost = function() {\n  var host = this.host;\n  var port = portPattern.exec(host);\n  if (port) {\n    port = port[0];\n    if (port !== ':') {\n      this.port = port.substr(1);\n    }\n    host = host.substr(0, host.length - port.length);\n  }\n  if (host) this.hostname = host;\n};\n\nfunction isString(arg) {\n  return typeof arg === \"string\";\n}\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\n\nfunction isNull(arg) {\n  return arg === null;\n}\nfunction isNullOrUndefined(arg) {\n  return  arg == null;\n}\n\n},{\"punycode\":267,\"querystring\":270}],289:[function(require,module,exports){\n(function (global){\n\nvar rng;\n\nvar crypto = global.crypto || global.msCrypto; // for IE 11\nif (crypto && crypto.getRandomValues) {\n  var _rnds8 = new Uint8Array(16);\n  rng = function whatwgRNG() {\n    crypto.getRandomValues(_rnds8);\n    return _rnds8;\n  };\n}\n\nif (!rng) {\n  var  _rnds = new Array(16);\n  rng = function() {\n    for (var i = 0, r; i < 16; i++) {\n      if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n      _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n    }\n\n    return _rnds;\n  };\n}\n\nmodule.exports = rng;\n\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],290:[function(require,module,exports){\nvar _rng = require('./lib/rng');\n\nvar _byteToHex = [];\nvar _hexToByte = {};\nfor (var i = 0; i < 256; ++i) {\n  _byteToHex[i] = (i + 0x100).toString(16).substr(1);\n  _hexToByte[_byteToHex[i]] = i;\n}\n\nfunction buff_to_string(buf, offset) {\n  var i = offset || 0;\n  var bth = _byteToHex;\n  return  bth[buf[i++]] + bth[buf[i++]] +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] +\n          bth[buf[i++]] + bth[buf[i++]] +\n          bth[buf[i++]] + bth[buf[i++]];\n}\n\n\nvar _seedBytes = _rng();\n\nvar _nodeId = [\n  _seedBytes[0] | 0x01,\n  _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]\n];\n\nvar _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;\n\nvar _lastMSecs = 0, _lastNSecs = 0;\n\nfunction v1(options, buf, offset) {\n  var i = buf && offset || 0;\n  var b = buf || [];\n\n  options = options || {};\n\n  var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n  var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n  var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n  var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n  if (dt < 0 && options.clockseq === undefined) {\n    clockseq = clockseq + 1 & 0x3fff;\n  }\n\n  if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n    nsecs = 0;\n  }\n\n  if (nsecs >= 10000) {\n    throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n  }\n\n  _lastMSecs = msecs;\n  _lastNSecs = nsecs;\n  _clockseq = clockseq;\n\n  msecs += 12219292800000;\n\n  var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n  b[i++] = tl >>> 24 & 0xff;\n  b[i++] = tl >>> 16 & 0xff;\n  b[i++] = tl >>> 8 & 0xff;\n  b[i++] = tl & 0xff;\n\n  var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n  b[i++] = tmh >>> 8 & 0xff;\n  b[i++] = tmh & 0xff;\n\n  b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n  b[i++] = tmh >>> 16 & 0xff;\n\n  b[i++] = clockseq >>> 8 | 0x80;\n\n  b[i++] = clockseq & 0xff;\n\n  var node = options.node || _nodeId;\n  for (var n = 0; n < 6; ++n) {\n    b[i + n] = node[n];\n  }\n\n  return buf ? buf : buff_to_string(b);\n}\n\n\nfunction v4(options, buf, offset) {\n  var i = buf && offset || 0;\n\n  if (typeof(options) == 'string') {\n    buf = options == 'binary' ? new Array(16) : null;\n    options = null;\n  }\n  options = options || {};\n\n  var rnds = options.random || (options.rng || _rng)();\n\n  rnds[6] = (rnds[6] & 0x0f) | 0x40;\n  rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n  if (buf) {\n    for (var ii = 0; ii < 16; ++ii) {\n      buf[i + ii] = rnds[ii];\n    }\n  }\n\n  return buf || buff_to_string(rnds);\n}\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n\n},{\"./lib/rng\":289}],291:[function(require,module,exports){\n(function() {\n  var XMLAttribute, create;\n\n  create = require('lodash/object/create');\n\n  module.exports = XMLAttribute = (function() {\n    function XMLAttribute(parent, name, value) {\n      this.stringify = parent.stringify;\n      if (name == null) {\n        throw new Error(\"Missing attribute name of element \" + parent.name);\n      }\n      if (value == null) {\n        throw new Error(\"Missing attribute value for attribute \" + name + \" of element \" + parent.name);\n      }\n      this.name = this.stringify.attName(name);\n      this.value = this.stringify.attValue(value);\n    }\n\n    XMLAttribute.prototype.clone = function() {\n      return create(XMLAttribute.prototype, this);\n    };\n\n    XMLAttribute.prototype.toString = function(options, level) {\n      return ' ' + this.name + '=\"' + this.value + '\"';\n    };\n\n    return XMLAttribute;\n\n  })();\n\n}).call(this);\n\n},{\"lodash/object/create\":350}],292:[function(require,module,exports){\n(function() {\n  var XMLBuilder, XMLDeclaration, XMLDocType, XMLElement, XMLStringifier;\n\n  XMLStringifier = require('./XMLStringifier');\n\n  XMLDeclaration = require('./XMLDeclaration');\n\n  XMLDocType = require('./XMLDocType');\n\n  XMLElement = require('./XMLElement');\n\n  module.exports = XMLBuilder = (function() {\n    function XMLBuilder(name, options) {\n      var root, temp;\n      if (name == null) {\n        throw new Error(\"Root element needs a name\");\n      }\n      if (options == null) {\n        options = {};\n      }\n      this.options = options;\n      this.stringify = new XMLStringifier(options);\n      temp = new XMLElement(this, 'doc');\n      root = temp.element(name);\n      root.isRoot = true;\n      root.documentObject = this;\n      this.rootObject = root;\n      if (!options.headless) {\n        root.declaration(options);\n        if ((options.pubID != null) || (options.sysID != null)) {\n          root.doctype(options);\n        }\n      }\n    }\n\n    XMLBuilder.prototype.root = function() {\n      return this.rootObject;\n    };\n\n    XMLBuilder.prototype.end = function(options) {\n      return this.toString(options);\n    };\n\n    XMLBuilder.prototype.toString = function(options) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      r = '';\n      if (this.xmldec != null) {\n        r += this.xmldec.toString(options);\n      }\n      if (this.doctype != null) {\n        r += this.doctype.toString(options);\n      }\n      r += this.rootObject.toString(options);\n      if (pretty && r.slice(-newline.length) === newline) {\n        r = r.slice(0, -newline.length);\n      }\n      return r;\n    };\n\n    return XMLBuilder;\n\n  })();\n\n}).call(this);\n\n},{\"./XMLDeclaration\":299,\"./XMLDocType\":300,\"./XMLElement\":301,\"./XMLStringifier\":305}],293:[function(require,module,exports){\n(function() {\n  var XMLCData, XMLNode, create,\n    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    hasProp = {}.hasOwnProperty;\n\n  create = require('lodash/object/create');\n\n  XMLNode = require('./XMLNode');\n\n  module.exports = XMLCData = (function(superClass) {\n    extend(XMLCData, superClass);\n\n    function XMLCData(parent, text) {\n      XMLCData.__super__.constructor.call(this, parent);\n      if (text == null) {\n        throw new Error(\"Missing CDATA text\");\n      }\n      this.text = this.stringify.cdata(text);\n    }\n\n    XMLCData.prototype.clone = function() {\n      return create(XMLCData.prototype, this);\n    };\n\n    XMLCData.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<![CDATA[' + this.text + ']]>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLCData;\n\n  })(XMLNode);\n\n}).call(this);\n\n},{\"./XMLNode\":302,\"lodash/object/create\":350}],294:[function(require,module,exports){\n(function() {\n  var XMLComment, XMLNode, create,\n    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    hasProp = {}.hasOwnProperty;\n\n  create = require('lodash/object/create');\n\n  XMLNode = require('./XMLNode');\n\n  module.exports = XMLComment = (function(superClass) {\n    extend(XMLComment, superClass);\n\n    function XMLComment(parent, text) {\n      XMLComment.__super__.constructor.call(this, parent);\n      if (text == null) {\n        throw new Error(\"Missing comment text\");\n      }\n      this.text = this.stringify.comment(text);\n    }\n\n    XMLComment.prototype.clone = function() {\n      return create(XMLComment.prototype, this);\n    };\n\n    XMLComment.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<!-- ' + this.text + ' -->';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLComment;\n\n  })(XMLNode);\n\n}).call(this);\n\n},{\"./XMLNode\":302,\"lodash/object/create\":350}],295:[function(require,module,exports){\n(function() {\n  var XMLDTDAttList, create;\n\n  create = require('lodash/object/create');\n\n  module.exports = XMLDTDAttList = (function() {\n    function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n      this.stringify = parent.stringify;\n      if (elementName == null) {\n        throw new Error(\"Missing DTD element name\");\n      }\n      if (attributeName == null) {\n        throw new Error(\"Missing DTD attribute name\");\n      }\n      if (!attributeType) {\n        throw new Error(\"Missing DTD attribute type\");\n      }\n      if (!defaultValueType) {\n        throw new Error(\"Missing DTD attribute default\");\n      }\n      if (defaultValueType.indexOf('#') !== 0) {\n        defaultValueType = '#' + defaultValueType;\n      }\n      if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {\n        throw new Error(\"Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT\");\n      }\n      if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {\n        throw new Error(\"Default value only applies to #FIXED or #DEFAULT\");\n      }\n      this.elementName = this.stringify.eleName(elementName);\n      this.attributeName = this.stringify.attName(attributeName);\n      this.attributeType = this.stringify.dtdAttType(attributeType);\n      this.defaultValue = this.stringify.dtdAttDefault(defaultValue);\n      this.defaultValueType = defaultValueType;\n    }\n\n    XMLDTDAttList.prototype.clone = function() {\n      return create(XMLDTDAttList.prototype, this);\n    };\n\n    XMLDTDAttList.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<!ATTLIST ' + this.elementName + ' ' + this.attributeName + ' ' + this.attributeType;\n      if (this.defaultValueType !== '#DEFAULT') {\n        r += ' ' + this.defaultValueType;\n      }\n      if (this.defaultValue) {\n        r += ' \"' + this.defaultValue + '\"';\n      }\n      r += '>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLDTDAttList;\n\n  })();\n\n}).call(this);\n\n},{\"lodash/object/create\":350}],296:[function(require,module,exports){\n(function() {\n  var XMLDTDElement, create, isArray;\n\n  create = require('lodash/object/create');\n\n  isArray = require('lodash/lang/isArray');\n\n  module.exports = XMLDTDElement = (function() {\n    function XMLDTDElement(parent, name, value) {\n      this.stringify = parent.stringify;\n      if (name == null) {\n        throw new Error(\"Missing DTD element name\");\n      }\n      if (!value) {\n        value = '(#PCDATA)';\n      }\n      if (isArray(value)) {\n        value = '(' + value.join(',') + ')';\n      }\n      this.name = this.stringify.eleName(name);\n      this.value = this.stringify.dtdElementValue(value);\n    }\n\n    XMLDTDElement.prototype.clone = function() {\n      return create(XMLDTDElement.prototype, this);\n    };\n\n    XMLDTDElement.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<!ELEMENT ' + this.name + ' ' + this.value + '>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLDTDElement;\n\n  })();\n\n}).call(this);\n\n},{\"lodash/lang/isArray\":342,\"lodash/object/create\":350}],297:[function(require,module,exports){\n(function() {\n  var XMLDTDEntity, create, isObject;\n\n  create = require('lodash/object/create');\n\n  isObject = require('lodash/lang/isObject');\n\n  module.exports = XMLDTDEntity = (function() {\n    function XMLDTDEntity(parent, pe, name, value) {\n      this.stringify = parent.stringify;\n      if (name == null) {\n        throw new Error(\"Missing entity name\");\n      }\n      if (value == null) {\n        throw new Error(\"Missing entity value\");\n      }\n      this.pe = !!pe;\n      this.name = this.stringify.eleName(name);\n      if (!isObject(value)) {\n        this.value = this.stringify.dtdEntityValue(value);\n      } else {\n        if (!value.pubID && !value.sysID) {\n          throw new Error(\"Public and/or system identifiers are required for an external entity\");\n        }\n        if (value.pubID && !value.sysID) {\n          throw new Error(\"System identifier is required for a public external entity\");\n        }\n        if (value.pubID != null) {\n          this.pubID = this.stringify.dtdPubID(value.pubID);\n        }\n        if (value.sysID != null) {\n          this.sysID = this.stringify.dtdSysID(value.sysID);\n        }\n        if (value.nData != null) {\n          this.nData = this.stringify.dtdNData(value.nData);\n        }\n        if (this.pe && this.nData) {\n          throw new Error(\"Notation declaration is not allowed in a parameter entity\");\n        }\n      }\n    }\n\n    XMLDTDEntity.prototype.clone = function() {\n      return create(XMLDTDEntity.prototype, this);\n    };\n\n    XMLDTDEntity.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<!ENTITY';\n      if (this.pe) {\n        r += ' %';\n      }\n      r += ' ' + this.name;\n      if (this.value) {\n        r += ' \"' + this.value + '\"';\n      } else {\n        if (this.pubID && this.sysID) {\n          r += ' PUBLIC \"' + this.pubID + '\" \"' + this.sysID + '\"';\n        } else if (this.sysID) {\n          r += ' SYSTEM \"' + this.sysID + '\"';\n        }\n        if (this.nData) {\n          r += ' NDATA ' + this.nData;\n        }\n      }\n      r += '>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLDTDEntity;\n\n  })();\n\n}).call(this);\n\n},{\"lodash/lang/isObject\":346,\"lodash/object/create\":350}],298:[function(require,module,exports){\n(function() {\n  var XMLDTDNotation, create;\n\n  create = require('lodash/object/create');\n\n  module.exports = XMLDTDNotation = (function() {\n    function XMLDTDNotation(parent, name, value) {\n      this.stringify = parent.stringify;\n      if (name == null) {\n        throw new Error(\"Missing notation name\");\n      }\n      if (!value.pubID && !value.sysID) {\n        throw new Error(\"Public or system identifiers are required for an external entity\");\n      }\n      this.name = this.stringify.eleName(name);\n      if (value.pubID != null) {\n        this.pubID = this.stringify.dtdPubID(value.pubID);\n      }\n      if (value.sysID != null) {\n        this.sysID = this.stringify.dtdSysID(value.sysID);\n      }\n    }\n\n    XMLDTDNotation.prototype.clone = function() {\n      return create(XMLDTDNotation.prototype, this);\n    };\n\n    XMLDTDNotation.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<!NOTATION ' + this.name;\n      if (this.pubID && this.sysID) {\n        r += ' PUBLIC \"' + this.pubID + '\" \"' + this.sysID + '\"';\n      } else if (this.pubID) {\n        r += ' PUBLIC \"' + this.pubID + '\"';\n      } else if (this.sysID) {\n        r += ' SYSTEM \"' + this.sysID + '\"';\n      }\n      r += '>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLDTDNotation;\n\n  })();\n\n}).call(this);\n\n},{\"lodash/object/create\":350}],299:[function(require,module,exports){\n(function() {\n  var XMLDeclaration, XMLNode, create, isObject,\n    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    hasProp = {}.hasOwnProperty;\n\n  create = require('lodash/object/create');\n\n  isObject = require('lodash/lang/isObject');\n\n  XMLNode = require('./XMLNode');\n\n  module.exports = XMLDeclaration = (function(superClass) {\n    extend(XMLDeclaration, superClass);\n\n    function XMLDeclaration(parent, version, encoding, standalone) {\n      var ref;\n      XMLDeclaration.__super__.constructor.call(this, parent);\n      if (isObject(version)) {\n        ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone;\n      }\n      if (!version) {\n        version = '1.0';\n      }\n      if (version != null) {\n        this.version = this.stringify.xmlVersion(version);\n      }\n      if (encoding != null) {\n        this.encoding = this.stringify.xmlEncoding(encoding);\n      }\n      if (standalone != null) {\n        this.standalone = this.stringify.xmlStandalone(standalone);\n      }\n    }\n\n    XMLDeclaration.prototype.clone = function() {\n      return create(XMLDeclaration.prototype, this);\n    };\n\n    XMLDeclaration.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<?xml';\n      if (this.version != null) {\n        r += ' version=\"' + this.version + '\"';\n      }\n      if (this.encoding != null) {\n        r += ' encoding=\"' + this.encoding + '\"';\n      }\n      if (this.standalone != null) {\n        r += ' standalone=\"' + this.standalone + '\"';\n      }\n      r += '?>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLDeclaration;\n\n  })(XMLNode);\n\n}).call(this);\n\n},{\"./XMLNode\":302,\"lodash/lang/isObject\":346,\"lodash/object/create\":350}],300:[function(require,module,exports){\n(function() {\n  var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLProcessingInstruction, create, isObject;\n\n  create = require('lodash/object/create');\n\n  isObject = require('lodash/lang/isObject');\n\n  XMLCData = require('./XMLCData');\n\n  XMLComment = require('./XMLComment');\n\n  XMLDTDAttList = require('./XMLDTDAttList');\n\n  XMLDTDEntity = require('./XMLDTDEntity');\n\n  XMLDTDElement = require('./XMLDTDElement');\n\n  XMLDTDNotation = require('./XMLDTDNotation');\n\n  XMLProcessingInstruction = require('./XMLProcessingInstruction');\n\n  module.exports = XMLDocType = (function() {\n    function XMLDocType(parent, pubID, sysID) {\n      var ref, ref1;\n      this.documentObject = parent;\n      this.stringify = this.documentObject.stringify;\n      this.children = [];\n      if (isObject(pubID)) {\n        ref = pubID, pubID = ref.pubID, sysID = ref.sysID;\n      }\n      if (sysID == null) {\n        ref1 = [pubID, sysID], sysID = ref1[0], pubID = ref1[1];\n      }\n      if (pubID != null) {\n        this.pubID = this.stringify.dtdPubID(pubID);\n      }\n      if (sysID != null) {\n        this.sysID = this.stringify.dtdSysID(sysID);\n      }\n    }\n\n    XMLDocType.prototype.clone = function() {\n      return create(XMLDocType.prototype, this);\n    };\n\n    XMLDocType.prototype.element = function(name, value) {\n      var child;\n      child = new XMLDTDElement(this, name, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n      var child;\n      child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.entity = function(name, value) {\n      var child;\n      child = new XMLDTDEntity(this, false, name, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.pEntity = function(name, value) {\n      var child;\n      child = new XMLDTDEntity(this, true, name, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.notation = function(name, value) {\n      var child;\n      child = new XMLDTDNotation(this, name, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.cdata = function(value) {\n      var child;\n      child = new XMLCData(this, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.comment = function(value) {\n      var child;\n      child = new XMLComment(this, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.instruction = function(target, value) {\n      var child;\n      child = new XMLProcessingInstruction(this, target, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLDocType.prototype.root = function() {\n      return this.documentObject.root();\n    };\n\n    XMLDocType.prototype.document = function() {\n      return this.documentObject;\n    };\n\n    XMLDocType.prototype.toString = function(options, level) {\n      var child, i, indent, len, newline, offset, pretty, r, ref, ref1, ref2, ref3, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<!DOCTYPE ' + this.root().name;\n      if (this.pubID && this.sysID) {\n        r += ' PUBLIC \"' + this.pubID + '\" \"' + this.sysID + '\"';\n      } else if (this.sysID) {\n        r += ' SYSTEM \"' + this.sysID + '\"';\n      }\n      if (this.children.length > 0) {\n        r += ' [';\n        if (pretty) {\n          r += newline;\n        }\n        ref3 = this.children;\n        for (i = 0, len = ref3.length; i < len; i++) {\n          child = ref3[i];\n          r += child.toString(options, level + 1);\n        }\n        r += ']';\n      }\n      r += '>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    XMLDocType.prototype.ele = function(name, value) {\n      return this.element(name, value);\n    };\n\n    XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n      return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);\n    };\n\n    XMLDocType.prototype.ent = function(name, value) {\n      return this.entity(name, value);\n    };\n\n    XMLDocType.prototype.pent = function(name, value) {\n      return this.pEntity(name, value);\n    };\n\n    XMLDocType.prototype.not = function(name, value) {\n      return this.notation(name, value);\n    };\n\n    XMLDocType.prototype.dat = function(value) {\n      return this.cdata(value);\n    };\n\n    XMLDocType.prototype.com = function(value) {\n      return this.comment(value);\n    };\n\n    XMLDocType.prototype.ins = function(target, value) {\n      return this.instruction(target, value);\n    };\n\n    XMLDocType.prototype.up = function() {\n      return this.root();\n    };\n\n    XMLDocType.prototype.doc = function() {\n      return this.document();\n    };\n\n    return XMLDocType;\n\n  })();\n\n}).call(this);\n\n},{\"./XMLCData\":293,\"./XMLComment\":294,\"./XMLDTDAttList\":295,\"./XMLDTDElement\":296,\"./XMLDTDEntity\":297,\"./XMLDTDNotation\":298,\"./XMLProcessingInstruction\":303,\"lodash/lang/isObject\":346,\"lodash/object/create\":350}],301:[function(require,module,exports){\n(function() {\n  var XMLAttribute, XMLElement, XMLNode, XMLProcessingInstruction, create, every, isArray, isFunction, isObject,\n    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    hasProp = {}.hasOwnProperty;\n\n  create = require('lodash/object/create');\n\n  isObject = require('lodash/lang/isObject');\n\n  isArray = require('lodash/lang/isArray');\n\n  isFunction = require('lodash/lang/isFunction');\n\n  every = require('lodash/collection/every');\n\n  XMLNode = require('./XMLNode');\n\n  XMLAttribute = require('./XMLAttribute');\n\n  XMLProcessingInstruction = require('./XMLProcessingInstruction');\n\n  module.exports = XMLElement = (function(superClass) {\n    extend(XMLElement, superClass);\n\n    function XMLElement(parent, name, attributes) {\n      XMLElement.__super__.constructor.call(this, parent);\n      if (name == null) {\n        throw new Error(\"Missing element name\");\n      }\n      this.name = this.stringify.eleName(name);\n      this.children = [];\n      this.instructions = [];\n      this.attributes = {};\n      if (attributes != null) {\n        this.attribute(attributes);\n      }\n    }\n\n    XMLElement.prototype.clone = function() {\n      var att, attName, clonedSelf, i, len, pi, ref, ref1;\n      clonedSelf = create(XMLElement.prototype, this);\n      if (clonedSelf.isRoot) {\n        clonedSelf.documentObject = null;\n      }\n      clonedSelf.attributes = {};\n      ref = this.attributes;\n      for (attName in ref) {\n        if (!hasProp.call(ref, attName)) continue;\n        att = ref[attName];\n        clonedSelf.attributes[attName] = att.clone();\n      }\n      clonedSelf.instructions = [];\n      ref1 = this.instructions;\n      for (i = 0, len = ref1.length; i < len; i++) {\n        pi = ref1[i];\n        clonedSelf.instructions.push(pi.clone());\n      }\n      clonedSelf.children = [];\n      this.children.forEach(function(child) {\n        var clonedChild;\n        clonedChild = child.clone();\n        clonedChild.parent = clonedSelf;\n        return clonedSelf.children.push(clonedChild);\n      });\n      return clonedSelf;\n    };\n\n    XMLElement.prototype.attribute = function(name, value) {\n      var attName, attValue;\n      if (name != null) {\n        name = name.valueOf();\n      }\n      if (isObject(name)) {\n        for (attName in name) {\n          if (!hasProp.call(name, attName)) continue;\n          attValue = name[attName];\n          this.attribute(attName, attValue);\n        }\n      } else {\n        if (isFunction(value)) {\n          value = value.apply();\n        }\n        if (!this.options.skipNullAttributes || (value != null)) {\n          this.attributes[name] = new XMLAttribute(this, name, value);\n        }\n      }\n      return this;\n    };\n\n    XMLElement.prototype.removeAttribute = function(name) {\n      var attName, i, len;\n      if (name == null) {\n        throw new Error(\"Missing attribute name\");\n      }\n      name = name.valueOf();\n      if (isArray(name)) {\n        for (i = 0, len = name.length; i < len; i++) {\n          attName = name[i];\n          delete this.attributes[attName];\n        }\n      } else {\n        delete this.attributes[name];\n      }\n      return this;\n    };\n\n    XMLElement.prototype.instruction = function(target, value) {\n      var i, insTarget, insValue, instruction, len;\n      if (target != null) {\n        target = target.valueOf();\n      }\n      if (value != null) {\n        value = value.valueOf();\n      }\n      if (isArray(target)) {\n        for (i = 0, len = target.length; i < len; i++) {\n          insTarget = target[i];\n          this.instruction(insTarget);\n        }\n      } else if (isObject(target)) {\n        for (insTarget in target) {\n          if (!hasProp.call(target, insTarget)) continue;\n          insValue = target[insTarget];\n          this.instruction(insTarget, insValue);\n        }\n      } else {\n        if (isFunction(value)) {\n          value = value.apply();\n        }\n        instruction = new XMLProcessingInstruction(this, target, value);\n        this.instructions.push(instruction);\n      }\n      return this;\n    };\n\n    XMLElement.prototype.toString = function(options, level) {\n      var att, child, i, indent, instruction, j, len, len1, name, newline, offset, pretty, r, ref, ref1, ref2, ref3, ref4, ref5, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      ref3 = this.instructions;\n      for (i = 0, len = ref3.length; i < len; i++) {\n        instruction = ref3[i];\n        r += instruction.toString(options, level + 1);\n      }\n      if (pretty) {\n        r += space;\n      }\n      r += '<' + this.name;\n      ref4 = this.attributes;\n      for (name in ref4) {\n        if (!hasProp.call(ref4, name)) continue;\n        att = ref4[name];\n        r += att.toString(options);\n      }\n      if (this.children.length === 0 || every(this.children, function(e) {\n        return e.value === '';\n      })) {\n        r += '/>';\n        if (pretty) {\n          r += newline;\n        }\n      } else if (pretty && this.children.length === 1 && (this.children[0].value != null)) {\n        r += '>';\n        r += this.children[0].value;\n        r += '</' + this.name + '>';\n        r += newline;\n      } else {\n        r += '>';\n        if (pretty) {\n          r += newline;\n        }\n        ref5 = this.children;\n        for (j = 0, len1 = ref5.length; j < len1; j++) {\n          child = ref5[j];\n          r += child.toString(options, level + 1);\n        }\n        if (pretty) {\n          r += space;\n        }\n        r += '</' + this.name + '>';\n        if (pretty) {\n          r += newline;\n        }\n      }\n      return r;\n    };\n\n    XMLElement.prototype.att = function(name, value) {\n      return this.attribute(name, value);\n    };\n\n    XMLElement.prototype.ins = function(target, value) {\n      return this.instruction(target, value);\n    };\n\n    XMLElement.prototype.a = function(name, value) {\n      return this.attribute(name, value);\n    };\n\n    XMLElement.prototype.i = function(target, value) {\n      return this.instruction(target, value);\n    };\n\n    return XMLElement;\n\n  })(XMLNode);\n\n}).call(this);\n\n},{\"./XMLAttribute\":291,\"./XMLNode\":302,\"./XMLProcessingInstruction\":303,\"lodash/collection/every\":308,\"lodash/lang/isArray\":342,\"lodash/lang/isFunction\":344,\"lodash/lang/isObject\":346,\"lodash/object/create\":350}],302:[function(require,module,exports){\n(function() {\n  var XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLElement, XMLNode, XMLRaw, XMLText, isArray, isEmpty, isFunction, isObject,\n    hasProp = {}.hasOwnProperty;\n\n  isObject = require('lodash/lang/isObject');\n\n  isArray = require('lodash/lang/isArray');\n\n  isFunction = require('lodash/lang/isFunction');\n\n  isEmpty = require('lodash/lang/isEmpty');\n\n  XMLElement = null;\n\n  XMLCData = null;\n\n  XMLComment = null;\n\n  XMLDeclaration = null;\n\n  XMLDocType = null;\n\n  XMLRaw = null;\n\n  XMLText = null;\n\n  module.exports = XMLNode = (function() {\n    function XMLNode(parent) {\n      this.parent = parent;\n      this.options = this.parent.options;\n      this.stringify = this.parent.stringify;\n      if (XMLElement === null) {\n        XMLElement = require('./XMLElement');\n        XMLCData = require('./XMLCData');\n        XMLComment = require('./XMLComment');\n        XMLDeclaration = require('./XMLDeclaration');\n        XMLDocType = require('./XMLDocType');\n        XMLRaw = require('./XMLRaw');\n        XMLText = require('./XMLText');\n      }\n    }\n\n    XMLNode.prototype.clone = function() {\n      throw new Error(\"Cannot clone generic XMLNode\");\n    };\n\n    XMLNode.prototype.element = function(name, attributes, text) {\n      var item, j, key, lastChild, len, ref, val;\n      lastChild = null;\n      if (attributes == null) {\n        attributes = {};\n      }\n      attributes = attributes.valueOf();\n      if (!isObject(attributes)) {\n        ref = [attributes, text], text = ref[0], attributes = ref[1];\n      }\n      if (name != null) {\n        name = name.valueOf();\n      }\n      if (isArray(name)) {\n        for (j = 0, len = name.length; j < len; j++) {\n          item = name[j];\n          lastChild = this.element(item);\n        }\n      } else if (isFunction(name)) {\n        lastChild = this.element(name.apply());\n      } else if (isObject(name)) {\n        for (key in name) {\n          if (!hasProp.call(name, key)) continue;\n          val = name[key];\n          if (isFunction(val)) {\n            val = val.apply();\n          }\n          if ((isObject(val)) && (isEmpty(val))) {\n            val = null;\n          }\n          if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {\n            lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);\n          } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && key.indexOf(this.stringify.convertPIKey) === 0) {\n            lastChild = this.instruction(key.substr(this.stringify.convertPIKey.length), val);\n          } else if (isObject(val)) {\n            if (!this.options.ignoreDecorators && this.stringify.convertListKey && key.indexOf(this.stringify.convertListKey) === 0 && isArray(val)) {\n              lastChild = this.element(val);\n            } else {\n              lastChild = this.element(key);\n              lastChild.element(val);\n            }\n          } else {\n            lastChild = this.element(key, val);\n          }\n        }\n      } else {\n        if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {\n          lastChild = this.text(text);\n        } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {\n          lastChild = this.cdata(text);\n        } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {\n          lastChild = this.comment(text);\n        } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {\n          lastChild = this.raw(text);\n        } else {\n          lastChild = this.node(name, attributes, text);\n        }\n      }\n      if (lastChild == null) {\n        throw new Error(\"Could not create any elements with: \" + name);\n      }\n      return lastChild;\n    };\n\n    XMLNode.prototype.insertBefore = function(name, attributes, text) {\n      var child, i, removed;\n      if (this.isRoot) {\n        throw new Error(\"Cannot insert elements at root level\");\n      }\n      i = this.parent.children.indexOf(this);\n      removed = this.parent.children.splice(i);\n      child = this.parent.element(name, attributes, text);\n      Array.prototype.push.apply(this.parent.children, removed);\n      return child;\n    };\n\n    XMLNode.prototype.insertAfter = function(name, attributes, text) {\n      var child, i, removed;\n      if (this.isRoot) {\n        throw new Error(\"Cannot insert elements at root level\");\n      }\n      i = this.parent.children.indexOf(this);\n      removed = this.parent.children.splice(i + 1);\n      child = this.parent.element(name, attributes, text);\n      Array.prototype.push.apply(this.parent.children, removed);\n      return child;\n    };\n\n    XMLNode.prototype.remove = function() {\n      var i, ref;\n      if (this.isRoot) {\n        throw new Error(\"Cannot remove the root element\");\n      }\n      i = this.parent.children.indexOf(this);\n      [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref = [])), ref;\n      return this.parent;\n    };\n\n    XMLNode.prototype.node = function(name, attributes, text) {\n      var child, ref;\n      if (name != null) {\n        name = name.valueOf();\n      }\n      if (attributes == null) {\n        attributes = {};\n      }\n      attributes = attributes.valueOf();\n      if (!isObject(attributes)) {\n        ref = [attributes, text], text = ref[0], attributes = ref[1];\n      }\n      child = new XMLElement(this, name, attributes);\n      if (text != null) {\n        child.text(text);\n      }\n      this.children.push(child);\n      return child;\n    };\n\n    XMLNode.prototype.text = function(value) {\n      var child;\n      child = new XMLText(this, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLNode.prototype.cdata = function(value) {\n      var child;\n      child = new XMLCData(this, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLNode.prototype.comment = function(value) {\n      var child;\n      child = new XMLComment(this, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLNode.prototype.raw = function(value) {\n      var child;\n      child = new XMLRaw(this, value);\n      this.children.push(child);\n      return this;\n    };\n\n    XMLNode.prototype.declaration = function(version, encoding, standalone) {\n      var doc, xmldec;\n      doc = this.document();\n      xmldec = new XMLDeclaration(doc, version, encoding, standalone);\n      doc.xmldec = xmldec;\n      return doc.root();\n    };\n\n    XMLNode.prototype.doctype = function(pubID, sysID) {\n      var doc, doctype;\n      doc = this.document();\n      doctype = new XMLDocType(doc, pubID, sysID);\n      doc.doctype = doctype;\n      return doctype;\n    };\n\n    XMLNode.prototype.up = function() {\n      if (this.isRoot) {\n        throw new Error(\"The root node has no parent. Use doc() if you need to get the document object.\");\n      }\n      return this.parent;\n    };\n\n    XMLNode.prototype.root = function() {\n      var child;\n      if (this.isRoot) {\n        return this;\n      }\n      child = this.parent;\n      while (!child.isRoot) {\n        child = child.parent;\n      }\n      return child;\n    };\n\n    XMLNode.prototype.document = function() {\n      return this.root().documentObject;\n    };\n\n    XMLNode.prototype.end = function(options) {\n      return this.document().toString(options);\n    };\n\n    XMLNode.prototype.prev = function() {\n      var i;\n      if (this.isRoot) {\n        throw new Error(\"Root node has no siblings\");\n      }\n      i = this.parent.children.indexOf(this);\n      if (i < 1) {\n        throw new Error(\"Already at the first node\");\n      }\n      return this.parent.children[i - 1];\n    };\n\n    XMLNode.prototype.next = function() {\n      var i;\n      if (this.isRoot) {\n        throw new Error(\"Root node has no siblings\");\n      }\n      i = this.parent.children.indexOf(this);\n      if (i === -1 || i === this.parent.children.length - 1) {\n        throw new Error(\"Already at the last node\");\n      }\n      return this.parent.children[i + 1];\n    };\n\n    XMLNode.prototype.importXMLBuilder = function(xmlbuilder) {\n      var clonedRoot;\n      clonedRoot = xmlbuilder.root().clone();\n      clonedRoot.parent = this;\n      clonedRoot.isRoot = false;\n      this.children.push(clonedRoot);\n      return this;\n    };\n\n    XMLNode.prototype.ele = function(name, attributes, text) {\n      return this.element(name, attributes, text);\n    };\n\n    XMLNode.prototype.nod = function(name, attributes, text) {\n      return this.node(name, attributes, text);\n    };\n\n    XMLNode.prototype.txt = function(value) {\n      return this.text(value);\n    };\n\n    XMLNode.prototype.dat = function(value) {\n      return this.cdata(value);\n    };\n\n    XMLNode.prototype.com = function(value) {\n      return this.comment(value);\n    };\n\n    XMLNode.prototype.doc = function() {\n      return this.document();\n    };\n\n    XMLNode.prototype.dec = function(version, encoding, standalone) {\n      return this.declaration(version, encoding, standalone);\n    };\n\n    XMLNode.prototype.dtd = function(pubID, sysID) {\n      return this.doctype(pubID, sysID);\n    };\n\n    XMLNode.prototype.e = function(name, attributes, text) {\n      return this.element(name, attributes, text);\n    };\n\n    XMLNode.prototype.n = function(name, attributes, text) {\n      return this.node(name, attributes, text);\n    };\n\n    XMLNode.prototype.t = function(value) {\n      return this.text(value);\n    };\n\n    XMLNode.prototype.d = function(value) {\n      return this.cdata(value);\n    };\n\n    XMLNode.prototype.c = function(value) {\n      return this.comment(value);\n    };\n\n    XMLNode.prototype.r = function(value) {\n      return this.raw(value);\n    };\n\n    XMLNode.prototype.u = function() {\n      return this.up();\n    };\n\n    return XMLNode;\n\n  })();\n\n}).call(this);\n\n},{\"./XMLCData\":293,\"./XMLComment\":294,\"./XMLDeclaration\":299,\"./XMLDocType\":300,\"./XMLElement\":301,\"./XMLRaw\":304,\"./XMLText\":306,\"lodash/lang/isArray\":342,\"lodash/lang/isEmpty\":343,\"lodash/lang/isFunction\":344,\"lodash/lang/isObject\":346}],303:[function(require,module,exports){\n(function() {\n  var XMLProcessingInstruction, create;\n\n  create = require('lodash/object/create');\n\n  module.exports = XMLProcessingInstruction = (function() {\n    function XMLProcessingInstruction(parent, target, value) {\n      this.stringify = parent.stringify;\n      if (target == null) {\n        throw new Error(\"Missing instruction target\");\n      }\n      this.target = this.stringify.insTarget(target);\n      if (value) {\n        this.value = this.stringify.insValue(value);\n      }\n    }\n\n    XMLProcessingInstruction.prototype.clone = function() {\n      return create(XMLProcessingInstruction.prototype, this);\n    };\n\n    XMLProcessingInstruction.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += '<?';\n      r += this.target;\n      if (this.value) {\n        r += ' ' + this.value;\n      }\n      r += '?>';\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLProcessingInstruction;\n\n  })();\n\n}).call(this);\n\n},{\"lodash/object/create\":350}],304:[function(require,module,exports){\n(function() {\n  var XMLNode, XMLRaw, create,\n    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    hasProp = {}.hasOwnProperty;\n\n  create = require('lodash/object/create');\n\n  XMLNode = require('./XMLNode');\n\n  module.exports = XMLRaw = (function(superClass) {\n    extend(XMLRaw, superClass);\n\n    function XMLRaw(parent, text) {\n      XMLRaw.__super__.constructor.call(this, parent);\n      if (text == null) {\n        throw new Error(\"Missing raw text\");\n      }\n      this.value = this.stringify.raw(text);\n    }\n\n    XMLRaw.prototype.clone = function() {\n      return create(XMLRaw.prototype, this);\n    };\n\n    XMLRaw.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += this.value;\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLRaw;\n\n  })(XMLNode);\n\n}).call(this);\n\n},{\"./XMLNode\":302,\"lodash/object/create\":350}],305:[function(require,module,exports){\n(function() {\n  var XMLStringifier,\n    bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n    hasProp = {}.hasOwnProperty;\n\n  module.exports = XMLStringifier = (function() {\n    function XMLStringifier(options) {\n      this.assertLegalChar = bind(this.assertLegalChar, this);\n      var key, ref, value;\n      this.allowSurrogateChars = options != null ? options.allowSurrogateChars : void 0;\n      ref = (options != null ? options.stringify : void 0) || {};\n      for (key in ref) {\n        if (!hasProp.call(ref, key)) continue;\n        value = ref[key];\n        this[key] = value;\n      }\n    }\n\n    XMLStringifier.prototype.eleName = function(val) {\n      val = '' + val || '';\n      return this.assertLegalChar(val);\n    };\n\n    XMLStringifier.prototype.eleText = function(val) {\n      val = '' + val || '';\n      return this.assertLegalChar(this.elEscape(val));\n    };\n\n    XMLStringifier.prototype.cdata = function(val) {\n      val = '' + val || '';\n      if (val.match(/]]>/)) {\n        throw new Error(\"Invalid CDATA text: \" + val);\n      }\n      return this.assertLegalChar(val);\n    };\n\n    XMLStringifier.prototype.comment = function(val) {\n      val = '' + val || '';\n      if (val.match(/--/)) {\n        throw new Error(\"Comment text cannot contain double-hypen: \" + val);\n      }\n      return this.assertLegalChar(val);\n    };\n\n    XMLStringifier.prototype.raw = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.attName = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.attValue = function(val) {\n      val = '' + val || '';\n      return this.attEscape(val);\n    };\n\n    XMLStringifier.prototype.insTarget = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.insValue = function(val) {\n      val = '' + val || '';\n      if (val.match(/\\?>/)) {\n        throw new Error(\"Invalid processing instruction value: \" + val);\n      }\n      return val;\n    };\n\n    XMLStringifier.prototype.xmlVersion = function(val) {\n      val = '' + val || '';\n      if (!val.match(/1\\.[0-9]+/)) {\n        throw new Error(\"Invalid version number: \" + val);\n      }\n      return val;\n    };\n\n    XMLStringifier.prototype.xmlEncoding = function(val) {\n      val = '' + val || '';\n      if (!val.match(/[A-Za-z](?:[A-Za-z0-9._-]|-)*/)) {\n        throw new Error(\"Invalid encoding: \" + val);\n      }\n      return val;\n    };\n\n    XMLStringifier.prototype.xmlStandalone = function(val) {\n      if (val) {\n        return \"yes\";\n      } else {\n        return \"no\";\n      }\n    };\n\n    XMLStringifier.prototype.dtdPubID = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.dtdSysID = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.dtdElementValue = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.dtdAttType = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.dtdAttDefault = function(val) {\n      if (val != null) {\n        return '' + val || '';\n      } else {\n        return val;\n      }\n    };\n\n    XMLStringifier.prototype.dtdEntityValue = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.dtdNData = function(val) {\n      return '' + val || '';\n    };\n\n    XMLStringifier.prototype.convertAttKey = '@';\n\n    XMLStringifier.prototype.convertPIKey = '?';\n\n    XMLStringifier.prototype.convertTextKey = '#text';\n\n    XMLStringifier.prototype.convertCDataKey = '#cdata';\n\n    XMLStringifier.prototype.convertCommentKey = '#comment';\n\n    XMLStringifier.prototype.convertRawKey = '#raw';\n\n    XMLStringifier.prototype.convertListKey = '#list';\n\n    XMLStringifier.prototype.assertLegalChar = function(str) {\n      var chars, chr;\n      if (this.allowSurrogateChars) {\n        chars = /[\\u0000-\\u0008\\u000B-\\u000C\\u000E-\\u001F\\uFFFE-\\uFFFF]/;\n      } else {\n        chars = /[\\u0000-\\u0008\\u000B-\\u000C\\u000E-\\u001F\\uD800-\\uDFFF\\uFFFE-\\uFFFF]/;\n      }\n      chr = str.match(chars);\n      if (chr) {\n        throw new Error(\"Invalid character (\" + chr + \") in string: \" + str + \" at index \" + chr.index);\n      }\n      return str;\n    };\n\n    XMLStringifier.prototype.elEscape = function(str) {\n      return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\\r/g, '&#xD;');\n    };\n\n    XMLStringifier.prototype.attEscape = function(str) {\n      return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\"/g, '&quot;').replace(/\\t/g, '&#x9;').replace(/\\n/g, '&#xA;').replace(/\\r/g, '&#xD;');\n    };\n\n    return XMLStringifier;\n\n  })();\n\n}).call(this);\n\n},{}],306:[function(require,module,exports){\n(function() {\n  var XMLNode, XMLText, create,\n    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    hasProp = {}.hasOwnProperty;\n\n  create = require('lodash/object/create');\n\n  XMLNode = require('./XMLNode');\n\n  module.exports = XMLText = (function(superClass) {\n    extend(XMLText, superClass);\n\n    function XMLText(parent, text) {\n      XMLText.__super__.constructor.call(this, parent);\n      if (text == null) {\n        throw new Error(\"Missing element text\");\n      }\n      this.value = this.stringify.eleText(text);\n    }\n\n    XMLText.prototype.clone = function() {\n      return create(XMLText.prototype, this);\n    };\n\n    XMLText.prototype.toString = function(options, level) {\n      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;\n      pretty = (options != null ? options.pretty : void 0) || false;\n      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';\n      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;\n      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\\n';\n      level || (level = 0);\n      space = new Array(level + offset + 1).join(indent);\n      r = '';\n      if (pretty) {\n        r += space;\n      }\n      r += this.value;\n      if (pretty) {\n        r += newline;\n      }\n      return r;\n    };\n\n    return XMLText;\n\n  })(XMLNode);\n\n}).call(this);\n\n},{\"./XMLNode\":302,\"lodash/object/create\":350}],307:[function(require,module,exports){\n(function() {\n  var XMLBuilder, assign;\n\n  assign = require('lodash/object/assign');\n\n  XMLBuilder = require('./XMLBuilder');\n\n  module.exports.create = function(name, xmldec, doctype, options) {\n    options = assign({}, xmldec, doctype, options);\n    return new XMLBuilder(name, options).root();\n  };\n\n}).call(this);\n\n},{\"./XMLBuilder\":292,\"lodash/object/assign\":349}],308:[function(require,module,exports){\nvar arrayEvery = require('../internal/arrayEvery'),\n    baseCallback = require('../internal/baseCallback'),\n    baseEvery = require('../internal/baseEvery'),\n    isArray = require('../lang/isArray');\n\n\nfunction every(collection, predicate, thisArg) {\n  var func = isArray(collection) ? arrayEvery : baseEvery;\n  if (typeof predicate != 'function' || typeof thisArg != 'undefined') {\n    predicate = baseCallback(predicate, thisArg, 3);\n  }\n  return func(collection, predicate);\n}\n\nmodule.exports = every;\n\n},{\"../internal/arrayEvery\":309,\"../internal/baseCallback\":311,\"../internal/baseEvery\":315,\"../lang/isArray\":342}],309:[function(require,module,exports){\n\nfunction arrayEvery(array, predicate) {\n  var index = -1,\n      length = array.length;\n\n  while (++index < length) {\n    if (!predicate(array[index], index, array)) {\n      return false;\n    }\n  }\n  return true;\n}\n\nmodule.exports = arrayEvery;\n\n},{}],310:[function(require,module,exports){\nvar baseCopy = require('./baseCopy'),\n    keys = require('../object/keys');\n\n\nfunction baseAssign(object, source, customizer) {\n  var props = keys(source);\n  if (!customizer) {\n    return baseCopy(source, object, props);\n  }\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index],\n        value = object[key],\n        result = customizer(value, source[key], key, object, source);\n\n    if ((result === result ? (result !== value) : (value === value)) ||\n        (typeof value == 'undefined' && !(key in object))) {\n      object[key] = result;\n    }\n  }\n  return object;\n}\n\nmodule.exports = baseAssign;\n\n},{\"../object/keys\":351,\"./baseCopy\":312}],311:[function(require,module,exports){\nvar baseMatches = require('./baseMatches'),\n    baseMatchesProperty = require('./baseMatchesProperty'),\n    baseProperty = require('./baseProperty'),\n    bindCallback = require('./bindCallback'),\n    identity = require('../utility/identity'),\n    isBindable = require('./isBindable');\n\n\nfunction baseCallback(func, thisArg, argCount) {\n  var type = typeof func;\n  if (type == 'function') {\n    return (typeof thisArg != 'undefined' && isBindable(func))\n      ? bindCallback(func, thisArg, argCount)\n      : func;\n  }\n  if (func == null) {\n    return identity;\n  }\n  if (type == 'object') {\n    return baseMatches(func);\n  }\n  return typeof thisArg == 'undefined'\n    ? baseProperty(func + '')\n    : baseMatchesProperty(func + '', thisArg);\n}\n\nmodule.exports = baseCallback;\n\n},{\"../utility/identity\":355,\"./baseMatches\":322,\"./baseMatchesProperty\":323,\"./baseProperty\":324,\"./bindCallback\":327,\"./isBindable\":332}],312:[function(require,module,exports){\n\nfunction baseCopy(source, object, props) {\n  if (!props) {\n    props = object;\n    object = {};\n  }\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n    object[key] = source[key];\n  }\n  return object;\n}\n\nmodule.exports = baseCopy;\n\n},{}],313:[function(require,module,exports){\n(function (global){\nvar isObject = require('../lang/isObject');\n\n\nvar baseCreate = (function() {\n  function Object() {}\n  return function(prototype) {\n    if (isObject(prototype)) {\n      Object.prototype = prototype;\n      var result = new Object;\n      Object.prototype = null;\n    }\n    return result || global.Object();\n  };\n}());\n\nmodule.exports = baseCreate;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"../lang/isObject\":346}],314:[function(require,module,exports){\nvar baseForOwn = require('./baseForOwn'),\n    isLength = require('./isLength'),\n    toObject = require('./toObject');\n\n\nfunction baseEach(collection, iteratee) {\n  var length = collection ? collection.length : 0;\n  if (!isLength(length)) {\n    return baseForOwn(collection, iteratee);\n  }\n  var index = -1,\n      iterable = toObject(collection);\n\n  while (++index < length) {\n    if (iteratee(iterable[index], index, iterable) === false) {\n      break;\n    }\n  }\n  return collection;\n}\n\nmodule.exports = baseEach;\n\n},{\"./baseForOwn\":317,\"./isLength\":335,\"./toObject\":340}],315:[function(require,module,exports){\nvar baseEach = require('./baseEach');\n\n\nfunction baseEvery(collection, predicate) {\n  var result = true;\n  baseEach(collection, function(value, index, collection) {\n    result = !!predicate(value, index, collection);\n    return result;\n  });\n  return result;\n}\n\nmodule.exports = baseEvery;\n\n},{\"./baseEach\":314}],316:[function(require,module,exports){\nvar toObject = require('./toObject');\n\n\nfunction baseFor(object, iteratee, keysFunc) {\n  var index = -1,\n      iterable = toObject(object),\n      props = keysFunc(object),\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n    if (iteratee(iterable[key], key, iterable) === false) {\n      break;\n    }\n  }\n  return object;\n}\n\nmodule.exports = baseFor;\n\n},{\"./toObject\":340}],317:[function(require,module,exports){\nvar baseFor = require('./baseFor'),\n    keys = require('../object/keys');\n\n\nfunction baseForOwn(object, iteratee) {\n  return baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n\n},{\"../object/keys\":351,\"./baseFor\":316}],318:[function(require,module,exports){\nvar baseIsEqualDeep = require('./baseIsEqualDeep');\n\n\nfunction baseIsEqual(value, other, customizer, isWhere, stackA, stackB) {\n  if (value === other) {\n    return value !== 0 || (1 / value == 1 / other);\n  }\n  var valType = typeof value,\n      othType = typeof other;\n\n  if ((valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object') ||\n      value == null || other == null) {\n    return value !== value && other !== other;\n  }\n  return baseIsEqualDeep(value, other, baseIsEqual, customizer, isWhere, stackA, stackB);\n}\n\nmodule.exports = baseIsEqual;\n\n},{\"./baseIsEqualDeep\":319}],319:[function(require,module,exports){\nvar equalArrays = require('./equalArrays'),\n    equalByTag = require('./equalByTag'),\n    equalObjects = require('./equalObjects'),\n    isArray = require('../lang/isArray'),\n    isTypedArray = require('../lang/isTypedArray');\n\n\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    objectTag = '[object Object]';\n\n\nvar objectProto = Object.prototype;\n\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n\nvar objToString = objectProto.toString;\n\n\nfunction baseIsEqualDeep(object, other, equalFunc, customizer, isWhere, stackA, stackB) {\n  var objIsArr = isArray(object),\n      othIsArr = isArray(other),\n      objTag = arrayTag,\n      othTag = arrayTag;\n\n  if (!objIsArr) {\n    objTag = objToString.call(object);\n    if (objTag == argsTag) {\n      objTag = objectTag;\n    } else if (objTag != objectTag) {\n      objIsArr = isTypedArray(object);\n    }\n  }\n  if (!othIsArr) {\n    othTag = objToString.call(other);\n    if (othTag == argsTag) {\n      othTag = objectTag;\n    } else if (othTag != objectTag) {\n      othIsArr = isTypedArray(other);\n    }\n  }\n  var objIsObj = objTag == objectTag,\n      othIsObj = othTag == objectTag,\n      isSameTag = objTag == othTag;\n\n  if (isSameTag && !(objIsArr || objIsObj)) {\n    return equalByTag(object, other, objTag);\n  }\n  var valWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n      othWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n  if (valWrapped || othWrapped) {\n    return equalFunc(valWrapped ? object.value() : object, othWrapped ? other.value() : other, customizer, isWhere, stackA, stackB);\n  }\n  if (!isSameTag) {\n    return false;\n  }\n  stackA || (stackA = []);\n  stackB || (stackB = []);\n\n  var length = stackA.length;\n  while (length--) {\n    if (stackA[length] == object) {\n      return stackB[length] == other;\n    }\n  }\n  stackA.push(object);\n  stackB.push(other);\n\n  var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isWhere, stackA, stackB);\n\n  stackA.pop();\n  stackB.pop();\n\n  return result;\n}\n\nmodule.exports = baseIsEqualDeep;\n\n},{\"../lang/isArray\":342,\"../lang/isTypedArray\":348,\"./equalArrays\":329,\"./equalByTag\":330,\"./equalObjects\":331}],320:[function(require,module,exports){\n\nfunction baseIsFunction(value) {\n  return typeof value == 'function' || false;\n}\n\nmodule.exports = baseIsFunction;\n\n},{}],321:[function(require,module,exports){\nvar baseIsEqual = require('./baseIsEqual');\n\n\nvar objectProto = Object.prototype;\n\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n\nfunction baseIsMatch(object, props, values, strictCompareFlags, customizer) {\n  var length = props.length;\n  if (object == null) {\n    return !length;\n  }\n  var index = -1,\n      noCustomizer = !customizer;\n\n  while (++index < length) {\n    if ((noCustomizer && strictCompareFlags[index])\n          ? values[index] !== object[props[index]]\n          : !hasOwnProperty.call(object, props[index])\n        ) {\n      return false;\n    }\n  }\n  index = -1;\n  while (++index < length) {\n    var key = props[index];\n    if (noCustomizer && strictCompareFlags[index]) {\n      var result = hasOwnProperty.call(object, key);\n    } else {\n      var objValue = object[key],\n          srcValue = values[index];\n\n      result = customizer ? customizer(objValue, srcValue, key) : undefined;\n      if (typeof result == 'undefined') {\n        result = baseIsEqual(srcValue, objValue, customizer, true);\n      }\n    }\n    if (!result) {\n      return false;\n    }\n  }\n  return true;\n}\n\nmodule.exports = baseIsMatch;\n\n},{\"./baseIsEqual\":318}],322:[function(require,module,exports){\nvar baseIsMatch = require('./baseIsMatch'),\n    isStrictComparable = require('./isStrictComparable'),\n    keys = require('../object/keys');\n\n\nvar objectProto = Object.prototype;\n\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n\nfunction baseMatches(source) {\n  var props = keys(source),\n      length = props.length;\n\n  if (length == 1) {\n    var key = props[0],\n        value = source[key];\n\n    if (isStrictComparable(value)) {\n      return function(object) {\n        return object != null && object[key] === value && hasOwnProperty.call(object, key);\n      };\n    }\n  }\n  var values = Array(length),\n      strictCompareFlags = Array(length);\n\n  while (length--) {\n    value = source[props[length]];\n    values[length] = value;\n    strictCompareFlags[length] = isStrictComparable(value);\n  }\n  return function(object) {\n    return baseIsMatch(object, props, values, strictCompareFlags);\n  };\n}\n\nmodule.exports = baseMatches;\n\n},{\"../object/keys\":351,\"./baseIsMatch\":321,\"./isStrictComparable\":337}],323:[function(require,module,exports){\nvar baseIsEqual = require('./baseIsEqual'),\n    isStrictComparable = require('./isStrictComparable');\n\n\nfunction baseMatchesProperty(key, value) {\n  if (isStrictComparable(value)) {\n    return function(object) {\n      return object != null && object[key] === value;\n    };\n  }\n  return function(object) {\n    return object != null && baseIsEqual(value, object[key], null, true);\n  };\n}\n\nmodule.exports = baseMatchesProperty;\n\n},{\"./baseIsEqual\":318,\"./isStrictComparable\":337}],324:[function(require,module,exports){\n\nfunction baseProperty(key) {\n  return function(object) {\n    return object == null ? undefined : object[key];\n  };\n}\n\nmodule.exports = baseProperty;\n\n},{}],325:[function(require,module,exports){\nvar identity = require('../utility/identity'),\n    metaMap = require('./metaMap');\n\n\nvar baseSetData = !metaMap ? identity : function(func, data) {\n  metaMap.set(func, data);\n  return func;\n};\n\nmodule.exports = baseSetData;\n\n},{\"../utility/identity\":355,\"./metaMap\":338}],326:[function(require,module,exports){\n\nfunction baseToString(value) {\n  if (typeof value == 'string') {\n    return value;\n  }\n  return value == null ? '' : (value + '');\n}\n\nmodule.exports = baseToString;\n\n},{}],327:[function(require,module,exports){\nvar identity = require('../utility/identity');\n\n\nfunction bindCallback(func, thisArg, argCount) {\n  if (typeof func != 'function') {\n    return identity;\n  }\n  if (typeof thisArg == 'undefined') {\n    return func;\n  }\n  switch (argCount) {\n    case 1: return function(value) {\n      return func.call(thisArg, value);\n    };\n    case 3: return function(value, index, collection) {\n      return func.call(thisArg, value, index, collection);\n    };\n    case 4: return function(accumulator, value, index, collection) {\n      return func.call(thisArg, accumulator, value, index, collection);\n    };\n    case 5: return function(value, other, key, object, source) {\n      return func.call(thisArg, value, other, key, object, source);\n    };\n  }\n  return function() {\n    return func.apply(thisArg, arguments);\n  };\n}\n\nmodule.exports = bindCallback;\n\n},{\"../utility/identity\":355}],328:[function(require,module,exports){\nvar bindCallback = require('./bindCallback'),\n    isIterateeCall = require('./isIterateeCall');\n\n\nfunction createAssigner(assigner) {\n  return function() {\n    var args = arguments,\n        length = args.length,\n        object = args[0];\n\n    if (length < 2 || object == null) {\n      return object;\n    }\n    var customizer = args[length - 2],\n        thisArg = args[length - 1],\n        guard = args[3];\n\n    if (length > 3 && typeof customizer == 'function') {\n      customizer = bindCallback(customizer, thisArg, 5);\n      length -= 2;\n    } else {\n      customizer = (length > 2 && typeof thisArg == 'function') ? thisArg : null;\n      length -= (customizer ? 1 : 0);\n    }\n    if (guard && isIterateeCall(args[1], args[2], guard)) {\n      customizer = length == 3 ? null : customizer;\n      length = 2;\n    }\n    var index = 0;\n    while (++index < length) {\n      var source = args[index];\n      if (source) {\n        assigner(object, source, customizer);\n      }\n    }\n    return object;\n  };\n}\n\nmodule.exports = createAssigner;\n\n},{\"./bindCallback\":327,\"./isIterateeCall\":334}],329:[function(require,module,exports){\n\nfunction equalArrays(array, other, equalFunc, customizer, isWhere, stackA, stackB) {\n  var index = -1,\n      arrLength = array.length,\n      othLength = other.length,\n      result = true;\n\n  if (arrLength != othLength && !(isWhere && othLength > arrLength)) {\n    return false;\n  }\n  while (result && ++index < arrLength) {\n    var arrValue = array[index],\n        othValue = other[index];\n\n    result = undefined;\n    if (customizer) {\n      result = isWhere\n        ? customizer(othValue, arrValue, index)\n        : customizer(arrValue, othValue, index);\n    }\n    if (typeof result == 'undefined') {\n      if (isWhere) {\n        var othIndex = othLength;\n        while (othIndex--) {\n          othValue = other[othIndex];\n          result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isWhere, stackA, stackB);\n          if (result) {\n            break;\n          }\n        }\n      } else {\n        result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isWhere, stackA, stackB);\n      }\n    }\n  }\n  return !!result;\n}\n\nmodule.exports = equalArrays;\n\n},{}],330:[function(require,module,exports){\n\nvar boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    numberTag = '[object Number]',\n    regexpTag = '[object RegExp]',\n    stringTag = '[object String]';\n\n\nfunction equalByTag(object, other, tag) {\n  switch (tag) {\n    case boolTag:\n    case dateTag:\n      return +object == +other;\n\n    case errorTag:\n      return object.name == other.name && object.message == other.message;\n\n    case numberTag:\n      return (object != +object)\n        ? other != +other\n        : (object == 0 ? ((1 / object) == (1 / other)) : object == +other);\n\n    case regexpTag:\n    case stringTag:\n      return object == (other + '');\n  }\n  return false;\n}\n\nmodule.exports = equalByTag;\n\n},{}],331:[function(require,module,exports){\nvar keys = require('../object/keys');\n\n\nvar objectProto = Object.prototype;\n\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n\nfunction equalObjects(object, other, equalFunc, customizer, isWhere, stackA, stackB) {\n  var objProps = keys(object),\n      objLength = objProps.length,\n      othProps = keys(other),\n      othLength = othProps.length;\n\n  if (objLength != othLength && !isWhere) {\n    return false;\n  }\n  var hasCtor,\n      index = -1;\n\n  while (++index < objLength) {\n    var key = objProps[index],\n        result = hasOwnProperty.call(other, key);\n\n    if (result) {\n      var objValue = object[key],\n          othValue = other[key];\n\n      result = undefined;\n      if (customizer) {\n        result = isWhere\n          ? customizer(othValue, objValue, key)\n          : customizer(objValue, othValue, key);\n      }\n      if (typeof result == 'undefined') {\n        result = (objValue && objValue === othValue) || equalFunc(objValue, othValue, customizer, isWhere, stackA, stackB);\n      }\n    }\n    if (!result) {\n      return false;\n    }\n    hasCtor || (hasCtor = key == 'constructor');\n  }\n  if (!hasCtor) {\n    var objCtor = object.constructor,\n        othCtor = other.constructor;\n\n    if (objCtor != othCtor &&\n        ('constructor' in object && 'constructor' in other) &&\n        !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n          typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n      return false;\n    }\n  }\n  return true;\n}\n\nmodule.exports = equalObjects;\n\n},{\"../object/keys\":351}],332:[function(require,module,exports){\nvar baseSetData = require('./baseSetData'),\n    isNative = require('../lang/isNative'),\n    support = require('../support');\n\n\nvar reFuncName = /^\\s*function[ \\n\\r\\t]+\\w/;\n\n\nvar reThis = /\\bthis\\b/;\n\n\nvar fnToString = Function.prototype.toString;\n\n\nfunction isBindable(func) {\n  var result = !(support.funcNames ? func.name : support.funcDecomp);\n\n  if (!result) {\n    var source = fnToString.call(func);\n    if (!support.funcNames) {\n      result = !reFuncName.test(source);\n    }\n    if (!result) {\n      result = reThis.test(source) || isNative(func);\n      baseSetData(func, result);\n    }\n  }\n  return result;\n}\n\nmodule.exports = isBindable;\n\n},{\"../lang/isNative\":345,\"../support\":354,\"./baseSetData\":325}],333:[function(require,module,exports){\n\nvar MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;\n\n\nfunction isIndex(value, length) {\n  value = +value;\n  length = length == null ? MAX_SAFE_INTEGER : length;\n  return value > -1 && value % 1 == 0 && value < length;\n}\n\nmodule.exports = isIndex;\n\n},{}],334:[function(require,module,exports){\nvar isIndex = require('./isIndex'),\n    isLength = require('./isLength'),\n    isObject = require('../lang/isObject');\n\n\nfunction isIterateeCall(value, index, object) {\n  if (!isObject(object)) {\n    return false;\n  }\n  var type = typeof index;\n  if (type == 'number') {\n    var length = object.length,\n        prereq = isLength(length) && isIndex(index, length);\n  } else {\n    prereq = type == 'string' && index in object;\n  }\n  if (prereq) {\n    var other = object[index];\n    return value === value ? (value === other) : (other !== other);\n  }\n  return false;\n}\n\nmodule.exports = isIterateeCall;\n\n},{\"../lang/isObject\":346,\"./isIndex\":333,\"./isLength\":335}],335:[function(require,module,exports){\n\nvar MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;\n\n\nfunction isLength(value) {\n  return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n\n},{}],336:[function(require,module,exports){\n\nfunction isObjectLike(value) {\n  return (value && typeof value == 'object') || false;\n}\n\nmodule.exports = isObjectLike;\n\n},{}],337:[function(require,module,exports){\nvar isObject = require('../lang/isObject');\n\n\nfunction isStrictComparable(value) {\n  return value === value && (value === 0 ? ((1 / value) > 0) : !isObject(value));\n}\n\nmodule.exports = isStrictComparable;\n\n},{\"../lang/isObject\":346}],338:[function(require,module,exports){\n(function (global){\nvar isNative = require('../lang/isNative');\n\n\nvar WeakMap = isNative(WeakMap = global.WeakMap) && WeakMap;\n\n\nvar metaMap = WeakMap && new WeakMap;\n\nmodule.exports = metaMap;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"../lang/isNative\":345}],339:[function(require,module,exports){\nvar isArguments = require('../lang/isArguments'),\n    isArray = require('../lang/isArray'),\n    isIndex = require('./isIndex'),\n    isLength = require('./isLength'),\n    keysIn = require('../object/keysIn'),\n    support = require('../support');\n\n\nvar objectProto = Object.prototype;\n\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n\nfunction shimKeys(object) {\n  var props = keysIn(object),\n      propsLength = props.length,\n      length = propsLength && object.length;\n\n  var allowIndexes = length && isLength(length) &&\n    (isArray(object) || (support.nonEnumArgs && isArguments(object)));\n\n  var index = -1,\n      result = [];\n\n  while (++index < propsLength) {\n    var key = props[index];\n    if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = shimKeys;\n\n},{\"../lang/isArguments\":341,\"../lang/isArray\":342,\"../object/keysIn\":352,\"../support\":354,\"./isIndex\":333,\"./isLength\":335}],340:[function(require,module,exports){\nvar isObject = require('../lang/isObject');\n\n\nfunction toObject(value) {\n  return isObject(value) ? value : Object(value);\n}\n\nmodule.exports = toObject;\n\n},{\"../lang/isObject\":346}],341:[function(require,module,exports){\nvar isLength = require('../internal/isLength'),\n    isObjectLike = require('../internal/isObjectLike');\n\n\nvar argsTag = '[object Arguments]';\n\n\nvar objectProto = Object.prototype;\n\n\nvar objToString = objectProto.toString;\n\n\nfunction isArguments(value) {\n  var length = isObjectLike(value) ? value.length : undefined;\n  return (isLength(length) && objToString.call(value) == argsTag) || false;\n}\n\nmodule.exports = isArguments;\n\n},{\"../internal/isLength\":335,\"../internal/isObjectLike\":336}],342:[function(require,module,exports){\nvar isLength = require('../internal/isLength'),\n    isNative = require('./isNative'),\n    isObjectLike = require('../internal/isObjectLike');\n\n\nvar arrayTag = '[object Array]';\n\n\nvar objectProto = Object.prototype;\n\n\nvar objToString = objectProto.toString;\n\n\nvar nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray;\n\n\nvar isArray = nativeIsArray || function(value) {\n  return (isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag) || false;\n};\n\nmodule.exports = isArray;\n\n},{\"../internal/isLength\":335,\"../internal/isObjectLike\":336,\"./isNative\":345}],343:[function(require,module,exports){\nvar isArguments = require('./isArguments'),\n    isArray = require('./isArray'),\n    isFunction = require('./isFunction'),\n    isLength = require('../internal/isLength'),\n    isObjectLike = require('../internal/isObjectLike'),\n    isString = require('./isString'),\n    keys = require('../object/keys');\n\n\nfunction isEmpty(value) {\n  if (value == null) {\n    return true;\n  }\n  var length = value.length;\n  if (isLength(length) && (isArray(value) || isString(value) || isArguments(value) ||\n      (isObjectLike(value) && isFunction(value.splice)))) {\n    return !length;\n  }\n  return !keys(value).length;\n}\n\nmodule.exports = isEmpty;\n\n},{\"../internal/isLength\":335,\"../internal/isObjectLike\":336,\"../object/keys\":351,\"./isArguments\":341,\"./isArray\":342,\"./isFunction\":344,\"./isString\":347}],344:[function(require,module,exports){\n(function (global){\nvar baseIsFunction = require('../internal/baseIsFunction'),\n    isNative = require('./isNative');\n\n\nvar funcTag = '[object Function]';\n\n\nvar objectProto = Object.prototype;\n\n\nvar objToString = objectProto.toString;\n\n\nvar Uint8Array = isNative(Uint8Array = global.Uint8Array) && Uint8Array;\n\n\nvar isFunction = !(baseIsFunction(/x/) || (Uint8Array && !baseIsFunction(Uint8Array))) ? baseIsFunction : function(value) {\n  return objToString.call(value) == funcTag;\n};\n\nmodule.exports = isFunction;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"../internal/baseIsFunction\":320,\"./isNative\":345}],345:[function(require,module,exports){\nvar escapeRegExp = require('../string/escapeRegExp'),\n    isObjectLike = require('../internal/isObjectLike');\n\n\nvar funcTag = '[object Function]';\n\n\nvar reHostCtor = /^\\[object .+?Constructor\\]$/;\n\n\nvar objectProto = Object.prototype;\n\n\nvar fnToString = Function.prototype.toString;\n\n\nvar objToString = objectProto.toString;\n\n\nvar reNative = RegExp('^' +\n  escapeRegExp(objToString)\n  .replace(/toString|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n\nfunction isNative(value) {\n  if (value == null) {\n    return false;\n  }\n  if (objToString.call(value) == funcTag) {\n    return reNative.test(fnToString.call(value));\n  }\n  return (isObjectLike(value) && reHostCtor.test(value)) || false;\n}\n\nmodule.exports = isNative;\n\n},{\"../internal/isObjectLike\":336,\"../string/escapeRegExp\":353}],346:[function(require,module,exports){\n\nfunction isObject(value) {\n  var type = typeof value;\n  return type == 'function' || (value && type == 'object') || false;\n}\n\nmodule.exports = isObject;\n\n},{}],347:[function(require,module,exports){\nvar isObjectLike = require('../internal/isObjectLike');\n\n\nvar stringTag = '[object String]';\n\n\nvar objectProto = Object.prototype;\n\n\nvar objToString = objectProto.toString;\n\n\nfunction isString(value) {\n  return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag) || false;\n}\n\nmodule.exports = isString;\n\n},{\"../internal/isObjectLike\":336}],348:[function(require,module,exports){\nvar isLength = require('../internal/isLength'),\n    isObjectLike = require('../internal/isObjectLike');\n\n\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dateTag] = typedArrayTags[errorTag] =\ntypedArrayTags[funcTag] = typedArrayTags[mapTag] =\ntypedArrayTags[numberTag] = typedArrayTags[objectTag] =\ntypedArrayTags[regexpTag] = typedArrayTags[setTag] =\ntypedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\n\n\nvar objectProto = Object.prototype;\n\n\nvar objToString = objectProto.toString;\n\n\nfunction isTypedArray(value) {\n  return (isObjectLike(value) && isLength(value.length) && typedArrayTags[objToString.call(value)]) || false;\n}\n\nmodule.exports = isTypedArray;\n\n},{\"../internal/isLength\":335,\"../internal/isObjectLike\":336}],349:[function(require,module,exports){\nvar baseAssign = require('../internal/baseAssign'),\n    createAssigner = require('../internal/createAssigner');\n\n\nvar assign = createAssigner(baseAssign);\n\nmodule.exports = assign;\n\n},{\"../internal/baseAssign\":310,\"../internal/createAssigner\":328}],350:[function(require,module,exports){\nvar baseCopy = require('../internal/baseCopy'),\n    baseCreate = require('../internal/baseCreate'),\n    isIterateeCall = require('../internal/isIterateeCall'),\n    keys = require('./keys');\n\n\nfunction create(prototype, properties, guard) {\n  var result = baseCreate(prototype);\n  if (guard && isIterateeCall(prototype, properties, guard)) {\n    properties = null;\n  }\n  return properties ? baseCopy(properties, result, keys(properties)) : result;\n}\n\nmodule.exports = create;\n\n},{\"../internal/baseCopy\":312,\"../internal/baseCreate\":313,\"../internal/isIterateeCall\":334,\"./keys\":351}],351:[function(require,module,exports){\nvar isLength = require('../internal/isLength'),\n    isNative = require('../lang/isNative'),\n    isObject = require('../lang/isObject'),\n    shimKeys = require('../internal/shimKeys');\n\n\nvar nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys;\n\n\nvar keys = !nativeKeys ? shimKeys : function(object) {\n  if (object) {\n    var Ctor = object.constructor,\n        length = object.length;\n  }\n  if ((typeof Ctor == 'function' && Ctor.prototype === object) ||\n      (typeof object != 'function' && (length && isLength(length)))) {\n    return shimKeys(object);\n  }\n  return isObject(object) ? nativeKeys(object) : [];\n};\n\nmodule.exports = keys;\n\n},{\"../internal/isLength\":335,\"../internal/shimKeys\":339,\"../lang/isNative\":345,\"../lang/isObject\":346}],352:[function(require,module,exports){\nvar isArguments = require('../lang/isArguments'),\n    isArray = require('../lang/isArray'),\n    isIndex = require('../internal/isIndex'),\n    isLength = require('../internal/isLength'),\n    isObject = require('../lang/isObject'),\n    support = require('../support');\n\n\nvar objectProto = Object.prototype;\n\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n\nfunction keysIn(object) {\n  if (object == null) {\n    return [];\n  }\n  if (!isObject(object)) {\n    object = Object(object);\n  }\n  var length = object.length;\n  length = (length && isLength(length) &&\n    (isArray(object) || (support.nonEnumArgs && isArguments(object))) && length) || 0;\n\n  var Ctor = object.constructor,\n      index = -1,\n      isProto = typeof Ctor == 'function' && Ctor.prototype === object,\n      result = Array(length),\n      skipIndexes = length > 0;\n\n  while (++index < length) {\n    result[index] = (index + '');\n  }\n  for (var key in object) {\n    if (!(skipIndexes && isIndex(key, length)) &&\n        !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = keysIn;\n\n},{\"../internal/isIndex\":333,\"../internal/isLength\":335,\"../lang/isArguments\":341,\"../lang/isArray\":342,\"../lang/isObject\":346,\"../support\":354}],353:[function(require,module,exports){\nvar baseToString = require('../internal/baseToString');\n\n\nvar reRegExpChars = /[.*+?^${}()|[\\]\\/\\\\]/g,\n    reHasRegExpChars = RegExp(reRegExpChars.source);\n\n\nfunction escapeRegExp(string) {\n  string = baseToString(string);\n  return (string && reHasRegExpChars.test(string))\n    ? string.replace(reRegExpChars, '\\\\$&')\n    : string;\n}\n\nmodule.exports = escapeRegExp;\n\n},{\"../internal/baseToString\":326}],354:[function(require,module,exports){\n(function (global){\nvar isNative = require('./lang/isNative');\n\n\nvar reThis = /\\bthis\\b/;\n\n\nvar objectProto = Object.prototype;\n\n\nvar document = (document = global.window) && document.document;\n\n\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n\nvar support = {};\n\n(function(x) {\n\n\n  support.funcDecomp = !isNative(global.WinRTError) && reThis.test(function() { return this; });\n\n\n  support.funcNames = typeof Function.name == 'string';\n\n\n  try {\n    support.dom = document.createDocumentFragment().nodeType === 11;\n  } catch(e) {\n    support.dom = false;\n  }\n\n\n  try {\n    support.nonEnumArgs = !propertyIsEnumerable.call(arguments, 1);\n  } catch(e) {\n    support.nonEnumArgs = true;\n  }\n}(0, 0));\n\nmodule.exports = support;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"./lang/isNative\":345}],355:[function(require,module,exports){\n\nfunction identity(value) {\n  return value;\n}\n\nmodule.exports = identity;\n\n},{}],356:[function(require,module,exports){\nrequire('./browser_loader');\n\nvar AWS = require('./core');\n\nif (typeof window !== 'undefined') window.AWS = AWS;\nif (typeof module !== 'undefined') module.exports = AWS;\nif (typeof self !== 'undefined') self.AWS = AWS;\n\n\nrequire('../clients/browser_default');\n},{\"../clients/browser_default\":140,\"./browser_loader\":198,\"./core\":201}]},{},[356]);\n\n"
  },
  {
    "path": "ionic-angular/official/aws/src/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\" dir=\"ltr\">\n<head>\n  <meta charset=\"UTF-8\">\n  <title>Ionic App</title>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\">\n  <meta name=\"format-detection\" content=\"telephone=no\">\n  <meta name=\"msapplication-tap-highlight\" content=\"no\">\n\n  <link rel=\"icon\" type=\"image/x-icon\" href=\"assets/icon/favicon.ico\">\n  <link rel=\"manifest\" href=\"manifest.json\">\n  <meta name=\"theme-color\" content=\"#4e8ef7\">\n\n  <!-- aws libs -->\n  <script src=\"assets/aws-sdk.min.js\"></script>\n\n  <!-- cordova.js required for cordova apps -->\n  <script src=\"cordova.js\"></script>\n\n  <!-- un-comment this code to enable service worker\n  <script>\n    if ('serviceWorker' in navigator) {\n      navigator.serviceWorker.register('service-worker.js')\n        .then(() => console.log('service worker installed'))\n        .catch(err => console.log('Error', err));\n    }\n  </script>-->\n\n  <link href=\"build/main.css\" rel=\"stylesheet\">\n\n</head>\n<body>\n\n  <!-- Ionic's root component and where the app will load -->\n  <ion-app></ion-app>\n\n  <!-- The polyfills js is generated during the build process -->\n  <script src=\"build/polyfills.js\"></script>\n\n  <!-- The vendor js is generated during the build process\n       It contains all of the dependencies in node_modules -->\n  <script src=\"build/vendor.js\"></script>\n\n  <!-- The bundle js is generated during the build process -->\n  <script src=\"build/main.js\"></script>\n\n</body>\n</html>\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/about/about.html",
    "content": "<ion-header>\n  <ion-navbar>\n    <ion-title>\n      About\n    </ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n\n  This is a starter project that leverages AWS Mobile Hub services to power the app. The\n  following services are utilized:\n\n  <ul>\n    <li>Cognito (Authentication)</li>\n    <li>DynamoDB (Data Storage)</li>\n    <li>S3 (File Storage)</li>\n  </ul>\n\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/about/about.scss",
    "content": "page-about {\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/about/about.ts",
    "content": "import { Component } from '@angular/core';\n\n@Component({\n  selector: 'page-about',\n  templateUrl: 'about.html'\n})\nexport class AboutPage {\n\n  constructor() {\n\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/account/account.html",
    "content": "<ion-header>\n  <ion-navbar>\n    <ion-title>\n      Account\n    </ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n\n  <div padding text-center>\n    <div *ngIf=\"avatarPhoto\" class=\"avatar\" [style.background-image]=\"'url('+ avatarPhoto +')'\">\n    </div>\n\n    <button ion-button clear (click)=\"selectAvatar()\">Change photo</button>\n\n    <input #avatar class=\"avatar-input\" type=\"file\" (change)=\"uploadFromFile($event)\" />\n  </div>\n\n  <div>\n    <ion-list>\n      <ion-item>\n        <strong>username</strong> {{ username }}\n      </ion-item>\n      <ion-item *ngFor=\"let attr of attributes\">\n        <strong>{{ attr.getName() }}</strong> {{ attr.getValue() }}\n      </ion-item>\n    </ion-list>\n  </div>\n\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/account/account.scss",
    "content": "page-account {\n  .avatar-input {\n    display: none;\n  }\n\n  .avatar {\n    display: block;\n    width: 150px;\n    height: 150px;\n    border-radius: 50%;\n    background-repeat: no-repeat;\n    background-position: center center;\n    background-size: cover;\n\n    margin: 0 auto;\n    border: 5px solid #f1f1f1;\n    box-shadow: 0 0 5px #999;\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/account/account.ts",
    "content": "import { Component, ViewChild } from '@angular/core';\n\nimport { LoadingController, NavController } from 'ionic-angular';\nimport { Auth, Storage, Logger } from 'aws-amplify';\n\nimport { Camera, CameraOptions } from '@ionic-native/camera';\n\nconst logger = new Logger('Account');\n\n@Component({\n  selector: 'page-account',\n  templateUrl: 'account.html'\n})\nexport class AccountPage {\n\n  @ViewChild('avatar') avatarInput;\n\n  public avatarPhoto: string;\n  public selectedPhoto: Blob;\n  public userId: string;\n  public username: string;\n  public attributes: any;\n\n  constructor(public navCtrl: NavController,\n              public camera: Camera,\n              public loadingCtrl: LoadingController) {\n    this.attributes = [];\n    this.avatarPhoto = null;\n    this.selectedPhoto = null;\n\n    Auth.currentUserInfo()\n      .then(info => {\n        this.userId = info.id;\n        this.username = info.username;\n        this.attributes = [];\n        if (info['email']) { this.attributes.push({ name: 'email', value: info['email']}); }\n        if (info['phone_number']) { this.attributes.push({ name: 'phone_number', value: info['phone_number']}); }\n        this.refreshAvatar();\n      });\n  }\n\n  refreshAvatar() {\n    Storage.get(this.userId + '/avatar')\n      .then(url => this.avatarPhoto = (url as string));\n  }\n\n  dataURItoBlob(dataURI) {\n    // code adapted from: http://stackoverflow.com/questions/33486352/cant-upload-image-to-aws-s3-from-ionic-camera\n    let binary = atob(dataURI.split(',')[1]);\n    let array = [];\n    for (let i = 0; i < binary.length; i++) {\n      array.push(binary.charCodeAt(i));\n    }\n    return new Blob([new Uint8Array(array)], {type: 'image/jpeg'});\n  };\n\n  selectAvatar() {\n    const options: CameraOptions = {\n      quality: 100,\n      targetHeight: 200,\n      targetWidth: 200,\n      destinationType: this.camera.DestinationType.DATA_URL,\n      encodingType: this.camera.EncodingType.JPEG,\n      mediaType: this.camera.MediaType.PICTURE\n    }\n\n    this.camera.getPicture(options).then((imageData) => {\n      // imageData is either a base64 encoded string or a file URI\n      // If it's base64:\n      this.selectedPhoto  = this.dataURItoBlob('data:image/jpeg;base64,' + imageData);\n      this.upload();\n    }, (err) => {\n      this.avatarInput.nativeElement.click();\n      // Handle error\n    });\n  }\n\n  uploadFromFile(event) {\n    const files = event.target.files;\n    logger.debug('Uploading', files)\n\n    const file = files[0];\n    const { type } = file;\n    Storage.put(this.userId + '/avatar', file, { contentType: type })\n      .then(() => this.refreshAvatar())\n      .catch(err => logger.error(err));\n  }\n\n  upload() {\n    if (this.selectedPhoto) {\n      let loading = this.loadingCtrl.create({\n        content: 'Uploading image...'\n      });\n      loading.present();\n\n      Storage.put(this.userId + '/avatar', this.selectedPhoto, { contentType: 'image/jpeg' })\n        .then(() => {\n          this.refreshAvatar()\n          loading.dismiss();\n        })\n        .catch(err => {\n          logger.error(err)\n          loading.dismiss();\n        });\n    }\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/confirm/confirm.html",
    "content": "<ion-content>\n  <div padding>\n    <p>Please enter the confirmation code sent to your email to verify your account:</p>\n  </div>\n  <form (submit)=\"confirm()\">\n    <ion-list>\n\n      <ion-item>\n        <ion-label floating>Confirmation Code</ion-label>\n        <ion-input type=\"text\" [(ngModel)]=\"code\" name=\"code\"></ion-input>\n      </ion-item>\n\n      <div padding>\n        <button ion-button color=\"primary\" block>Confirm Account</button>\n      </div>\n\n      <div padding>\n        <p>Haven't received the confirmation code email yet? <a (click)=\"resendCode()\">Resend</a></p>\n      </div>\n\n    </ion-list>\n  </form>\n</ion-content>  \n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/confirm/confirm.scss",
    "content": ""
  },
  {
    "path": "ionic-angular/official/aws/src/pages/confirm/confirm.ts",
    "content": "import { Component } from '@angular/core';\n\nimport { NavController, NavParams } from 'ionic-angular';\nimport { Auth, Logger } from 'aws-amplify';\n\nimport { LoginPage } from '../login/login';\n\nconst logger = new Logger('Confirm');\n\n@Component({\n  selector: 'page-confirm',\n  templateUrl: 'confirm.html'\n})\nexport class ConfirmPage {\n  \n  public code: string;\n  public username: string;\n\n  constructor(public navCtrl: NavController, public navParams: NavParams) {\n    this.username = navParams.get('username');\n  }\n\n  confirm() {\n    Auth.confirmSignUp(this.username, this.code)\n      .then(() => this.navCtrl.push(LoginPage))\n      .catch(err => logger.debug('confirm error', err));\n  }\n\n  resendCode() {\n    Auth.resendSignUp(this.username)\n      .then(() => logger.debug('sent'))\n      .catch(err => logger.debug('send code error', err));\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/confirmSignIn/confirmSignIn.html",
    "content": "<ion-content>\n  <div padding>\n    <p>Please enter the confirmation code sent to your email to verify your account:</p>\n  </div>\n  <form (submit)=\"confirm()\">\n    <ion-list>\n\n      <ion-item>\n        <ion-label floating>Confirmation Code</ion-label>\n        <ion-input type=\"text\" [(ngModel)]=\"code\" name=\"code\"></ion-input>\n      </ion-item>\n\n      <div padding>\n        <button ion-button color=\"primary\" block>Confirm Login</button>\n      </div>\n\n      <div padding text-center>\n        <p><a (click)=\"login()\">Return to login</a>\n      </div>\n\n    </ion-list>\n  </form>\n</ion-content>  \n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/confirmSignIn/confirmSignIn.scss",
    "content": ""
  },
  {
    "path": "ionic-angular/official/aws/src/pages/confirmSignIn/confirmSignIn.ts",
    "content": "import { Component } from '@angular/core';\n\nimport { NavController, NavParams } from 'ionic-angular';\nimport { Auth, Logger } from 'aws-amplify';\n\nimport { TabsPage } from '../tabs/tabs';\nimport { LoginPage } from '../login/login';\n\nconst logger = new Logger('ConfirmSignIn');\n\n@Component({\n  selector: 'page-confirm-signin',\n  templateUrl: 'confirmSignIn.html'\n})\nexport class ConfirmSignInPage {\n  \n  public code: string;\n  public user: any;\n\n  constructor(public navCtrl: NavController, public navParams: NavParams) {\n    this.user = navParams.get('user');\n  }\n\n  confirm() {\n    Auth.confirmSignIn(this.user, this.code, null)\n      .then(() => this.navCtrl.push(TabsPage))\n      .catch(err => logger.debug('confirm error', err));\n  }\n\n  login() {\n    this.navCtrl.push(LoginPage);\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/confirmSignUp/confirmSignUp.html",
    "content": "<ion-content>\n  <div padding>\n    <p>Please enter the confirmation code sent to your email to verify your account:</p>\n  </div>\n  <form (submit)=\"confirm()\">\n    <ion-list>\n\n      <ion-item>\n        <ion-label floating>Confirmation Code</ion-label>\n        <ion-input type=\"text\" [(ngModel)]=\"code\" name=\"code\"></ion-input>\n      </ion-item>\n\n      <div padding>\n        <button ion-button color=\"primary\" block>Confirm Account</button>\n      </div>\n\n      <div padding>\n        <p>Haven't received the confirmation code email yet? <a (click)=\"resendCode()\">Resend</a></p>\n      </div>\n\n    </ion-list>\n  </form>\n</ion-content>  \n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/confirmSignUp/confirmSignUp.scss",
    "content": ""
  },
  {
    "path": "ionic-angular/official/aws/src/pages/confirmSignUp/confirmSignUp.ts",
    "content": "import { Component } from '@angular/core';\n\nimport { NavController, NavParams } from 'ionic-angular';\nimport { Auth, Logger } from 'aws-amplify';\n\nimport { LoginPage } from '../login/login';\n\nconst logger = new Logger('ConfirmSignUp');\n\n@Component({\n  selector: 'page-confirm-signup',\n  templateUrl: 'confirmSignUp.html'\n})\nexport class ConfirmSignUpPage {\n  \n  public code: string;\n  public username: string;\n\n  constructor(public navCtrl: NavController, public navParams: NavParams) {\n    this.username = navParams.get('username');\n  }\n\n  confirm() {\n    Auth.confirmSignUp(this.username, this.code)\n      .then(() => this.navCtrl.push(LoginPage))\n      .catch(err => logger.debug('confirm error', err));\n  }\n\n  resendCode() {\n    Auth.resendSignUp(this.username)\n      .then(() => logger.debug('sent'))\n      .catch(err => logger.debug('send code error', err));\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/login/login.html",
    "content": "<ion-content>\n  <div text-center class=\"logo\">\n    <img src=\"assets/ionic-aws-logo.png\" />\n  </div>\n  <form (submit)=\"login()\">\n    <ion-list>\n\n      <ion-item>\n        <ion-label floating>Username</ion-label>\n        <ion-input [(ngModel)]=\"loginDetails.username\" type=\"text\" autocorrect=\"off\" autocapitalize=\"none\" name=\"username\"></ion-input>\n      </ion-item>\n\n      <ion-item>\n        <ion-label floating>Password</ion-label>\n        <ion-input [(ngModel)]=\"loginDetails.password\" type=\"password\" name=\"password\"></ion-input>\n      </ion-item>\n\n      <div padding>\n        <button ion-button color=\"primary\" block>LOGIN</button>\n      </div>\n\n      <div padding text-center>\n        <p>Don't have an account yet? <a (click)=\"signup()\">Create one.</a></p>\n      </div>\n\n    </ion-list>\n  </form>\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/login/login.scss",
    "content": "page-login {\n  .logo {\n    padding: 20px 0px 0px 0px;\n    text-align: center;\n\n    img {\n      max-width: 150px;\n    }\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/login/login.ts",
    "content": "import { Component } from '@angular/core';\n\nimport { NavController, LoadingController } from 'ionic-angular';\nimport { Auth, Logger } from 'aws-amplify';\n\nimport { TabsPage } from '../tabs/tabs';\nimport { SignupPage } from '../signup/signup';\nimport { ConfirmSignInPage } from '../confirmSignIn/confirmSignIn';\n\nconst logger = new Logger('Login');\n\nexport class LoginDetails {\n  username: string;\n  password: string;\n}\n\n@Component({\n  selector: 'page-login',\n  templateUrl: 'login.html'\n})\nexport class LoginPage {\n  \n  public loginDetails: LoginDetails;\n\n  constructor(public navCtrl: NavController,\n              public loadingCtrl: LoadingController) {\n    this.loginDetails = new LoginDetails(); \n  }\n\n  login() {\n    let loading = this.loadingCtrl.create({\n      content: 'Please wait...'\n    });\n    loading.present();\n\n    let details = this.loginDetails;\n    logger.info('login..');\n    Auth.signIn(details.username, details.password)\n      .then(user => {\n        logger.debug('signed in user', user);\n        if (user.challengeName === 'SMS_MFA') {\n          this.navCtrl.push(ConfirmSignInPage, { 'user': user });\n        } else {\n          this.navCtrl.setRoot(TabsPage);\n        }\n      })\n      .catch(err => logger.debug('errrror', err))\n      .then(() => loading.dismiss());\n  }\n\n  signup() {\n    this.navCtrl.push(SignupPage);\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/settings/settings.html",
    "content": "<ion-header>\n  <ion-navbar>\n    <ion-title>\n      Settings\n    </ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content>\n    <ion-list>\n      <button ion-item [navPush]=\"aboutPage\">\n        About this app\n      </button>\n      <button ion-item [navPush]=\"accountPage\">\n        Account\n      </button>\n      <button ion-item (click)=\"logout()\">\n        <ion-label color=\"danger\">Logout</ion-label>\n      </button>\n    </ion-list>\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/settings/settings.ts",
    "content": "import { Component } from '@angular/core';\nimport { App } from 'ionic-angular';\nimport { Auth } from 'aws-amplify';\n\nimport { LoginPage } from '../login/login';\nimport { AboutPage } from '../about/about';\nimport { AccountPage } from '../account/account';\n\n@Component({\n  templateUrl: 'settings.html'\n})\nexport class SettingsPage {\n\n  public aboutPage = AboutPage;\n  public accountPage = AccountPage;\n\n  constructor(public app: App) {\n  }\n\n  logout() {\n    Auth.signOut()\n      .then(() => this.app.getRootNav().setRoot(LoginPage));\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/signup/signup.html",
    "content": "<ion-content>\n  <div text-center class=\"logo\">\n    <img src=\"assets/ionic-aws-logo.png\" />\n  </div>\n  <form (submit)=\"signup()\">\n    <p *ngIf=\"error\" style=\"text-align: center\">{{error.message}}</p>\n    <ion-list>\n\n      <ion-item>\n        <ion-label floating>Username</ion-label>\n        <ion-input type=\"text\" [(ngModel)]=\"userDetails.username\" autocorrect=\"off\" autocapitalize=\"none\" name=\"username\"></ion-input>\n      </ion-item>\n\n      <ion-item>\n        <ion-label floating>Email</ion-label>\n        <ion-input type=\"email\" [(ngModel)]=\"userDetails.email\" name=\"email\"></ion-input>\n      </ion-item>\n\n      <ion-item>\n        <ion-label floating>Phone Number</ion-label>\n        <ion-input type=\"tel\" [(ngModel)]=\"userDetails.phone_number\" name=\"phone_number\"></ion-input>\n      </ion-item>\n\n      <ion-item>\n        <ion-label floating>Password</ion-label>\n        <ion-input type=\"password\" [(ngModel)]=\"userDetails.password\" name=\"password\"></ion-input>\n      </ion-item>\n\n      <div padding>\n        <button ion-button color=\"primary\" block>Register</button>\n      </div>\n\n      <div padding text-center>\n        <p><a (click)=\"login()\">Return to login</a>\n      </div>\n\n    </ion-list>\n  </form>\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/signup/signup.scss",
    "content": "page-signup {\n  .logo {\n    padding: 20px 0px 0px 0px;\n    text-align: center;\n\n    img {\n      max-width: 150px;\n    }\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/signup/signup.ts",
    "content": "import { Component } from '@angular/core';\n\nimport { NavController, LoadingController } from 'ionic-angular';\nimport { Auth, Logger } from 'aws-amplify';\n\nimport { LoginPage } from '../login/login';\nimport { ConfirmSignUpPage } from '../confirmSignUp/confirmSignUp';\n\nconst logger = new Logger('SignUp');\n\nexport class UserDetails {\n    username: string;\n    email: string;\n    phone_number: string;\n    password: string;\n}\n\n@Component({\n  selector: 'page-signup',\n  templateUrl: 'signup.html'\n})\nexport class SignupPage {\n\n  public userDetails: UserDetails;\n\n  error: any;\n\n  constructor(public navCtrl: NavController,\n              public loadingCtrl: LoadingController) {\n   this.userDetails = new UserDetails();\n  }\n\n  signup() {\n\n    let loading = this.loadingCtrl.create({\n      content: 'Please wait...'\n    });\n    loading.present();\n\n    let details = this.userDetails;\n    this.error = null;\n    logger.debug('register');\n    Auth.signUp(details.username, details.password, details.email, details.phone_number)\n      .then(user => {\n        this.navCtrl.push(ConfirmSignUpPage, { username: details.username });\n      })\n      .catch(err => { this.error = err; })\n      .then(() => loading.dismiss());\n  }\n\n  login() {\n    this.navCtrl.push(LoginPage);\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/tabs/tabs.html",
    "content": "<ion-tabs>\n  <ion-tab [root]=\"tab1Root\" tabTitle=\"Tasks\" tabIcon=\"list\"></ion-tab>\n  <ion-tab [root]=\"tab2Root\" tabTitle=\"Settings\" tabIcon=\"cog\"></ion-tab>\n</ion-tabs>\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/tabs/tabs.ts",
    "content": "import { Component } from '@angular/core';\n\nimport { SettingsPage } from '../settings/settings';\nimport { TasksPage } from '../tasks/tasks';\n\n@Component({\n  templateUrl: 'tabs.html'\n})\nexport class TabsPage {\n\n  tab1Root = TasksPage;\n  tab2Root = SettingsPage;\n\n  constructor() {\n\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/tasks/tasks.html",
    "content": "<ion-header>\n  <ion-navbar>\n    <ion-title>\n      Tasks \n    </ion-title>\n    <ion-buttons end>\n      <button ion-button icon-only (click)=\"addTask()\">\n        <ion-icon name=\"add\"></ion-icon>\n      </button>\n    </ion-buttons>\n  </ion-navbar>\n</ion-header>\n\n<ion-content>\n  <ion-refresher (ionRefresh)=\"refreshData($event)\">\n    <ion-refresher-content\n                  pullingIcon=\"arrow-dropdown\"\n                  pullingText=\"Pull to refresh\"\n                  refreshingSpinner=\"circles\"\n                  refreshingText=\"Refreshing...\">\n    </ion-refresher-content>\n  </ion-refresher>\n\n    <ion-list>\n      <ion-item-sliding *ngFor=\"let item of items; let idx = index;\">\n        <button ion-item>\n          <h2>{{item.category}}</h2>\n          <p>{{item.description}}</p>\n        </button>\n\n        <ion-item-options>\n          <button ion-button color=\"danger\" (click)=\"deleteTask(item, idx)\">DELETE</button>\n        </ion-item-options>\n      </ion-item-sliding>\n    </ion-list>\n</ion-content>\n\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/tasks/tasks.scss",
    "content": ""
  },
  {
    "path": "ionic-angular/official/aws/src/pages/tasks/tasks.ts",
    "content": "import { Component } from '@angular/core';\n\nimport { NavController, ModalController } from 'ionic-angular';\nimport { Auth, Logger } from 'aws-amplify';\n\nimport { TasksCreatePage } from '../tasks-create/tasks-create';\nconst aws_exports = require('../../aws-exports').default;\n\nimport { DynamoDB } from '../../providers/providers';\n\nconst logger = new Logger('Tasks');\n\n@Component({\n  selector: 'page-tasks',\n  templateUrl: 'tasks.html'\n})\nexport class TasksPage {\n\n  public items: any;\n  public refresher: any;\n  private taskTable: string = aws_exports.aws_resource_name_prefix + '-tasks';\n  private userId: string;\n\n  constructor(public navCtrl: NavController,\n              public modalCtrl: ModalController,\n              public db: DynamoDB) {\n\n    Auth.currentCredentials()\n      .then(credentials => {\n        this.userId = credentials.identityId;\n        this.refreshTasks();\n      })\n      .catch(err => logger.debug('get current credentials err', err));\n  }\n\n  refreshData(refresher) {\n    this.refresher = refresher;\n    this.refreshTasks()\n  }\n\n  refreshTasks() {\n    const params = {\n      'TableName': this.taskTable,\n      'IndexName': 'DateSorted',\n      'KeyConditionExpression': \"#userId = :userId\",\n      'ExpressionAttributeNames': { '#userId': 'userId' },\n      'ExpressionAttributeValues': { ':userId': this.userId },\n      'ScanIndexForward': false\n    };\n    this.db.getDocumentClient()\n      .then(client => client.query(params).promise())\n      .then(data => { this.items = data.Items; })\n      .catch(err => logger.debug('error in refresh tasks', err))\n      .then(() => { this.refresher && this.refresher.complete() });\n  }\n\n  generateId() {\n    var len = 16;\n    var chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n    var charLength = chars.length;\n    var result = \"\";\n    let randoms = window.crypto.getRandomValues(new Uint32Array(len));\n    for(var i = 0; i < len; i++) {\n      result += chars[randoms[i] % charLength];\n    }\n    return result.toLowerCase();\n  }\n\n  addTask() {\n    let id = this.generateId();\n    let addModal = this.modalCtrl.create(TasksCreatePage, { 'id': id });\n    addModal.onDidDismiss(item => {\n      if (!item) { return; }\n      item.userId = this.userId;\n      item.created = (new Date().getTime() / 1000);\n      const params = {\n        'TableName': this.taskTable,\n        'Item': item,\n        'ConditionExpression': 'attribute_not_exists(id)'\n      };\n      this.db.getDocumentClient()\n        .then(client => client.put(params).promise())\n        .then(data => this.refreshTasks())\n        .catch(err => logger.debug('add task error', err));\n    })\n    addModal.present();\n  }\n\n  deleteTask(task, index) {\n    const params = {\n      'TableName': this.taskTable,\n      'Key': {\n        'userId': this.userId,\n        'taskId': task.taskId\n      }\n    };\n    this.db.getDocumentClient()\n      .then(client => client.delete(params).promise())\n      .then(data => this.items.splice(index, 1))\n      .catch((err) => logger.debug('delete task error', err));\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/tasks-create/tasks-create.html",
    "content": "<ion-header>\n\n  <ion-navbar>\n    <ion-title>New Task</ion-title>\n    <ion-buttons end>\n      <button ion-button [attr.icon-only]=\"!isAndroid ? null : ''\" (click)=\"cancel()\">\n        <span color=\"primary\" showWhen=\"ios\">\n          Cancel\n        </span>\n        <ion-icon name=\"md-close\" showWhen=\"core,android,windows\"></ion-icon>\n      </button>\n    </ion-buttons>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content>\n  <ion-list>\n    <ion-item>\n      <ion-label>Category</ion-label>\n      <ion-select [(ngModel)]=\"item.category\" name=\"category\">\n        <ion-option value=\"todo\" selected=\"true\">Todo</ion-option>\n        <ion-option value=\"errand\">Errand</ion-option>\n      </ion-select>\n    </ion-item>\n\n    <ion-item class=\"custom-item\">\n      <ion-label>Task Description</ion-label>\n      <ion-textarea rows=\"5\" [(ngModel)]=\"item.description\" name=\"description\"></ion-textarea>\n    </ion-item>\n\n    <div padding>\n      <button block icon-start ion-button color=\"primary\" (click)=\"done()\"><ion-icon name=\"md-checkmark\" showWhen=\"core,android,windows\"></ion-icon>Create task</button>\n    </div>\n  </ion-list>\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/tasks-create/tasks-create.scss",
    "content": "page-tasks-create {\n  .custom-item {\n    flex-direction: column;\n\n    textarea {\n      margin: 0;\n    }\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/pages/tasks-create/tasks-create.ts",
    "content": "import { Component } from '@angular/core';\nimport { NavController, NavParams, ViewController, Platform } from 'ionic-angular';\n\n@Component({\n  selector: 'page-tasks-create',\n  templateUrl: 'tasks-create.html'\n})\nexport class TasksCreatePage {\n\n  isReadyToSave: boolean;\n\n  item: any;\n\n  isAndroid: boolean;\n\n  constructor(public navCtrl: NavController,\n              public navParams: NavParams,\n              public viewCtrl: ViewController,\n              public platform: Platform) {\n    this.isAndroid = platform.is('android');\n    this.item = {\n      'taskId': navParams.get('id'),\n      'category': 'Todo'\n    };\n    this.isReadyToSave = true;\n  }\n\n  ionViewDidLoad() {\n\n  }\n\n  cancel() {\n    this.viewCtrl.dismiss();\n  }\n\n  done() { \n    this.viewCtrl.dismiss(this.item);\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/providers/aws.dynamodb.ts",
    "content": "import { Injectable } from '@angular/core';\nimport { Auth, Logger } from 'aws-amplify';\nimport AWS from 'aws-sdk';\nconst aws_exports = require('../aws-exports').default;\n\nAWS.config.region = aws_exports.aws_project_region;\nAWS.config.update({customUserAgent: 'ionic-starter'});\n\nconst logger = new Logger('DynamoDB');\n\n@Injectable()\nexport class DynamoDB {\n\n  constructor() {\n  }\n\n  getDocumentClient() {\n    return Auth.currentCredentials()\n      .then(credentials => new AWS.DynamoDB.DocumentClient({ credentials: credentials }))\n      .catch(err => { logger.debug('error getting document client', err); throw err; });\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/aws/src/providers/providers.ts",
    "content": "import { DynamoDB } from './aws.dynamodb';\n\nexport {\n  DynamoDB\n};\n"
  },
  {
    "path": "ionic-angular/official/blank/ionic.starter.json",
    "content": "{\n  \"name\": \"Blank Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \".sourcemaps\",\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build\"\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/blank/src/app/app.component.ts",
    "content": "import { Component } from '@angular/core';\nimport { Platform } from 'ionic-angular';\nimport { StatusBar } from '@ionic-native/status-bar';\nimport { SplashScreen } from '@ionic-native/splash-screen';\n\nimport { HomePage } from '../pages/home/home';\n@Component({\n  templateUrl: 'app.html'\n})\nexport class MyApp {\n  rootPage:any = HomePage;\n\n  constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {\n    platform.ready().then(() => {\n      // Okay, so the platform is ready and our plugins are available.\n      // Here you can do any higher level native things you might need.\n      statusBar.styleDefault();\n      splashScreen.hide();\n    });\n  }\n}\n\n"
  },
  {
    "path": "ionic-angular/official/blank/src/app/app.html",
    "content": "<ion-nav [root]=\"rootPage\"></ion-nav>\n"
  },
  {
    "path": "ionic-angular/official/blank/src/app/app.module.ts",
    "content": "import { BrowserModule } from '@angular/platform-browser';\nimport { ErrorHandler, NgModule } from '@angular/core';\nimport { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';\nimport { SplashScreen } from '@ionic-native/splash-screen';\nimport { StatusBar } from '@ionic-native/status-bar';\n\nimport { MyApp } from './app.component';\nimport { HomePage } from '../pages/home/home';\n\n@NgModule({\n  declarations: [\n    MyApp,\n    HomePage\n  ],\n  imports: [\n    BrowserModule,\n    IonicModule.forRoot(MyApp)\n  ],\n  bootstrap: [IonicApp],\n  entryComponents: [\n    MyApp,\n    HomePage\n  ],\n  providers: [\n    StatusBar,\n    SplashScreen,\n    {provide: ErrorHandler, useClass: IonicErrorHandler}\n  ]\n})\nexport class AppModule {}\n"
  },
  {
    "path": "ionic-angular/official/blank/src/pages/home/home.html",
    "content": "<ion-header>\n  <ion-navbar>\n    <ion-title>\n      Ionic Blank\n    </ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n  The world is your oyster.\n  <p>\n    If you get lost, the <a href=\"https://ionicframework.com/docs/v3\">docs</a> will be your guide.\n  </p>\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/blank/src/pages/home/home.scss",
    "content": "page-home {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/blank/src/pages/home/home.ts",
    "content": "import { Component } from '@angular/core';\nimport { NavController } from 'ionic-angular';\n\n@Component({\n  selector: 'page-home',\n  templateUrl: 'home.html'\n})\nexport class HomePage {\n\n  constructor(public navCtrl: NavController) {\n\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/sidemenu/ionic.starter.json",
    "content": "{\n  \"name\": \"Sidemenu Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \".sourcemaps\",\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build\"\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/sidemenu/src/app/app.component.ts",
    "content": "import { Component, ViewChild } from '@angular/core';\nimport { Nav, Platform } from 'ionic-angular';\nimport { StatusBar } from '@ionic-native/status-bar';\nimport { SplashScreen } from '@ionic-native/splash-screen';\n\nimport { HomePage } from '../pages/home/home';\nimport { ListPage } from '../pages/list/list';\n\n@Component({\n  templateUrl: 'app.html'\n})\nexport class MyApp {\n  @ViewChild(Nav) nav: Nav;\n\n  rootPage: any = HomePage;\n\n  pages: Array<{title: string, component: any}>;\n\n  constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen) {\n    this.initializeApp();\n\n    // used for an example of ngFor and navigation\n    this.pages = [\n      { title: 'Home', component: HomePage },\n      { title: 'List', component: ListPage }\n    ];\n\n  }\n\n  initializeApp() {\n    this.platform.ready().then(() => {\n      // Okay, so the platform is ready and our plugins are available.\n      // Here you can do any higher level native things you might need.\n      this.statusBar.styleDefault();\n      this.splashScreen.hide();\n    });\n  }\n\n  openPage(page) {\n    // Reset the content nav to have just this page\n    // we wouldn't want the back button to show in this scenario\n    this.nav.setRoot(page.component);\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/sidemenu/src/app/app.html",
    "content": "<ion-menu [content]=\"content\" type=\"overlay\">\n  <ion-header>\n    <ion-toolbar>\n      <ion-title>Menu</ion-title>\n    </ion-toolbar>\n  </ion-header>\n\n  <ion-content>\n    <ion-list>\n      <button menuClose ion-item *ngFor=\"let p of pages\" (click)=\"openPage(p)\">\n        {{p.title}}\n      </button>\n    </ion-list>\n  </ion-content>\n\n</ion-menu>\n\n<!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->\n<ion-nav [root]=\"rootPage\" #content swipeBackEnabled=\"false\"></ion-nav>"
  },
  {
    "path": "ionic-angular/official/sidemenu/src/app/app.module.ts",
    "content": "import { BrowserModule } from '@angular/platform-browser';\nimport { ErrorHandler, NgModule } from '@angular/core';\nimport { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';\n\nimport { MyApp } from './app.component';\nimport { HomePage } from '../pages/home/home';\nimport { ListPage } from '../pages/list/list';\n\nimport { StatusBar } from '@ionic-native/status-bar';\nimport { SplashScreen } from '@ionic-native/splash-screen';\n\n@NgModule({\n  declarations: [\n    MyApp,\n    HomePage,\n    ListPage\n  ],\n  imports: [\n    BrowserModule,\n    IonicModule.forRoot(MyApp),\n  ],\n  bootstrap: [IonicApp],\n  entryComponents: [\n    MyApp,\n    HomePage,\n    ListPage\n  ],\n  providers: [\n    StatusBar,\n    SplashScreen,\n    {provide: ErrorHandler, useClass: IonicErrorHandler}\n  ]\n})\nexport class AppModule {}\n"
  },
  {
    "path": "ionic-angular/official/sidemenu/src/pages/home/home.html",
    "content": "<ion-header>\n  <ion-navbar>\n    <button ion-button menuToggle>\n      <ion-icon name=\"menu\"></ion-icon>\n    </button>\n    <ion-title>Home</ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n  <h3>Ionic Menu Starter</h3>\n\n  <p>\n    If you get lost, the <a href=\"https://ionicframework.com/docs/v3\">docs</a> will show you the way.\n  </p>\n\n  <button ion-button secondary menuToggle>Toggle Menu</button>\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/sidemenu/src/pages/home/home.scss",
    "content": "page-home {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/sidemenu/src/pages/home/home.ts",
    "content": "import { Component } from '@angular/core';\nimport { NavController } from 'ionic-angular';\n\n@Component({\n  selector: 'page-home',\n  templateUrl: 'home.html'\n})\nexport class HomePage {\n\n  constructor(public navCtrl: NavController) {\n\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/sidemenu/src/pages/list/list.html",
    "content": "<ion-header>\n  <ion-navbar>\n    <button ion-button menuToggle>\n      <ion-icon name=\"menu\"></ion-icon>\n    </button>\n    <ion-title>List</ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content>\n  <ion-list>\n    <button ion-item *ngFor=\"let item of items\" (click)=\"itemTapped($event, item)\">\n      <ion-icon [name]=\"item.icon\" item-start></ion-icon>\n      {{item.title}}\n      <div class=\"item-note\" item-end>\n        {{item.note}}\n      </div>\n    </button>\n  </ion-list>\n  <div *ngIf=\"selectedItem\" padding>\n    You navigated here from <b>{{selectedItem.title}}</b>\n  </div>\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/sidemenu/src/pages/list/list.scss",
    "content": "page-list {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/sidemenu/src/pages/list/list.ts",
    "content": "import { Component } from '@angular/core';\nimport { NavController, NavParams } from 'ionic-angular';\n\n@Component({\n  selector: 'page-list',\n  templateUrl: 'list.html'\n})\nexport class ListPage {\n  selectedItem: any;\n  icons: string[];\n  items: Array<{title: string, note: string, icon: string}>;\n\n  constructor(public navCtrl: NavController, public navParams: NavParams) {\n    // If we navigated to this page, we will have an item available as a nav param\n    this.selectedItem = navParams.get('item');\n\n    // Let's populate this page with some filler content for funzies\n    this.icons = ['flask', 'wifi', 'beer', 'football', 'basketball', 'paper-plane',\n    'american-football', 'boat', 'bluetooth', 'build'];\n\n    this.items = [];\n    for (let i = 1; i < 11; i++) {\n      this.items.push({\n        title: 'Item ' + i,\n        note: 'This is item #' + i,\n        icon: this.icons[Math.floor(Math.random() * this.icons.length)]\n      });\n    }\n  }\n\n  itemTapped(event, item) {\n    // That's right, we're pushing to ourselves!\n    this.navCtrl.push(ListPage, {\n      item: item\n    });\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/README.md",
    "content": "# The Ionic Super Starter 🎮\n\n<img src=\"https://user-images.githubusercontent.com/236501/32385619-bddac0ac-c08c-11e7-9ee4-9c892197191f.png\" width=\"400\" />\n\nThe Ionic Super Starter is a batteries-included starter project for Ionic apps\ncomplete with pre-built pages, providers, and best practices for Ionic\ndevelopment.\n\nThe goal of the Super Starter is to get you from zero to app store faster than\nbefore, with a set of opinions from the Ionic team around page layout,\ndata/user management, and project structure.\n\nThe way to use this starter is to pick and choose the various page types you\nwant use, and remove the ones you don't. If you want a blank slate, this\nstarter isn't for you (use the `blank` type instead).\n\nOne of the big advances in Ionic was moving from a rigid route-based navigation\nsystem to a flexible push/pop navigation system modeled off common native SDKs.\nWe've embraced this pattern to provide a set of reusable pages that can be\nnavigated to anywhere in the app. Take a look at the [Settings\npage](https://github.com/ionic-team/starters/blob/master/ionic-angular/official/super/src/pages/settings/settings.html)\nfor a cool example of a page navigating to itself to provide a different UI\nwithout duplicating code.\n\n## Table of Contents\n\n1. [Getting Started](#getting-started)\n2. [Pages](#pages)\n3. [Providers](#providers)\n4. [i18n](#i18n) (adding languages)\n\n## <a name=\"getting-started\"></a>Getting Started\n\nTo test this starter out, install the latest version of the Ionic CLI and run:\n\n```bash\nionic start mySuperApp super\n```\n\n## Pages\n\nThe Super Starter comes with a variety of ready-made pages. These pages help\nyou assemble common building blocks for your app so you can focus on your\nunique features and branding.\n\nThe app loads with the `FirstRunPage` set to `TutorialPage` as the default. If\nthe user has already gone through this page once, it will be skipped the next\ntime they load the app.\n\nIf the tutorial is skipped but the user hasn't logged in yet, the Welcome page\nwill be displayed which is a \"splash\" prompting the user to log in or create an\naccount.\n\nOnce the user is authenticated, the app will load with the `MainPage` which is\nset to be the `TabsPage` as the default.\n\nThe entry and main pages can be configured easily by updating the corresponding\nvariables in\n[src/pages/index.ts](https://github.com/ionic-team/starters/blob/master/ionic-angular/official/super/src/pages/index.ts).\n\nPlease read the\n[Pages](https://github.com/ionic-team/starters/tree/master/ionic-angular/official/super/src/pages)\nreadme, and the readme for each page in the source for more documentation on\neach.\n\n## Providers\n\nThe Super Starter comes with some basic implementations of common providers.\n\n### User\n\nThe `User` provider is used to authenticate users through its\n`login(accountInfo)` and `signup(accountInfo)` methods, which perform `POST`\nrequests to an API endpoint that you will need to configure.\n\n### Api\n\nThe `Api` provider is a simple CRUD frontend to an API. Simply put the root of\nyour API url in the Api class and call get/post/put/patch/delete \n\n## i18n\n\nIonic Super Starter comes with internationalization (i18n) out of the box with\n[ngx-translate](https://github.com/ngx-translate/core). This makes it easy to\nchange the text used in the app by modifying only one file. \n\n### Adding Languages\n\nTo add new languages, add new files to the `src/assets/i18n` directory,\nfollowing the pattern of LANGCODE.json where LANGCODE is the language/locale\ncode (ex: en/gb/de/es/etc.).\n\n### Changing the Language\n\nTo change the language of the app, edit `src/app/app.component.ts` and modify\n`translate.use('en')` to use the LANGCODE from `src/assets/i18n/`\n"
  },
  {
    "path": "ionic-angular/official/super/ionic.starter.json",
    "content": "{\n  \"name\": \"Ionic Super Starter\",\n  \"baseref\": \"main\",\n  \"welcome\": \"Welcome to the \\u001b[36m\\u001b[1mIONIC SUPER STARTER\\u001b[22m\\u001b[39m!\\n\\nThe Super Starter comes packed with ready-to-use page designs for common mobile designs like master detail, login/signup, settings, tutorials, and more. Pick and choose which page types you want to use and remove the ones you don't!\\n\\nFor more details, please see the project README: \\u001b[1mhttps://github.com/ionic-team/starters/blob/master/ionic-angular/official/super/README.md\\u001b[22m\",\n  \"tarignore\": [\n    \".sourcemaps\",\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build\"\n  },\n  \"packageJson\": {\n    \"dependencies\": {\n      \"@ionic-native/camera\": \"4.3.3\",\n      \"@ngx-translate/core\": \"8.0.0\",\n      \"@ngx-translate/http-loader\": \"^2.0.0\"\n    }\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/app/app.component.ts",
    "content": "import { Component, ViewChild } from '@angular/core';\nimport { SplashScreen } from '@ionic-native/splash-screen';\nimport { StatusBar } from '@ionic-native/status-bar';\nimport { TranslateService } from '@ngx-translate/core';\nimport { Config, Nav, Platform } from 'ionic-angular';\n\nimport { FirstRunPage } from '../pages';\nimport { Settings } from '../providers';\n\n@Component({\n  template: `<ion-menu [content]=\"content\" type=\"overlay\">\n    <ion-header>\n      <ion-toolbar>\n        <ion-title>Pages</ion-title>\n      </ion-toolbar>\n    </ion-header>\n\n    <ion-content>\n      <ion-list>\n        <button menuClose ion-item *ngFor=\"let p of pages\" (click)=\"openPage(p)\">\n          {{p.title}}\n        </button>\n      </ion-list>\n    </ion-content>\n\n  </ion-menu>\n  <ion-nav #content [root]=\"rootPage\"></ion-nav>`\n})\nexport class MyApp {\n  rootPage = FirstRunPage;\n\n  @ViewChild(Nav) nav: Nav;\n\n  pages: any[] = [\n    { title: 'Tutorial', component: 'TutorialPage' },\n    { title: 'Welcome', component: 'WelcomePage' },\n    { title: 'Tabs', component: 'TabsPage' },\n    { title: 'Cards', component: 'CardsPage' },\n    { title: 'Content', component: 'ContentPage' },\n    { title: 'Login', component: 'LoginPage' },\n    { title: 'Signup', component: 'SignupPage' },\n    { title: 'Master Detail', component: 'ListMasterPage' },\n    { title: 'Menu', component: 'MenuPage' },\n    { title: 'Settings', component: 'SettingsPage' },\n    { title: 'Search', component: 'SearchPage' }\n  ]\n\n  constructor(private translate: TranslateService, platform: Platform, settings: Settings, private config: Config, private statusBar: StatusBar, private splashScreen: SplashScreen) {\n    platform.ready().then(() => {\n      // Okay, so the platform is ready and our plugins are available.\n      // Here you can do any higher level native things you might need.\n      this.statusBar.styleDefault();\n      this.splashScreen.hide();\n    });\n    this.initTranslate();\n  }\n\n  initTranslate() {\n    // Set the default language for translation strings, and the current language.\n    this.translate.setDefaultLang('en');\n    const browserLang = this.translate.getBrowserLang();\n\n    if (browserLang) {\n      if (browserLang === 'zh') {\n        const browserCultureLang = this.translate.getBrowserCultureLang();\n\n        if (browserCultureLang.match(/-CN|CHS|Hans/i)) {\n          this.translate.use('zh-cmn-Hans');\n        } else if (browserCultureLang.match(/-TW|CHT|Hant/i)) {\n          this.translate.use('zh-cmn-Hant');\n        }\n      } else {\n        this.translate.use(this.translate.getBrowserLang());\n      }\n    } else {\n      this.translate.use('en'); // Set your language here\n    }\n\n    this.translate.get(['BACK_BUTTON_TEXT']).subscribe(values => {\n      this.config.set('ios', 'backButtonText', values.BACK_BUTTON_TEXT);\n    });\n  }\n\n  openPage(page) {\n    // Reset the content nav to have just this page\n    // we wouldn't want the back button to show in this scenario\n    this.nav.setRoot(page.component);\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/app/app.module.ts",
    "content": "import { HttpClient, HttpClientModule } from '@angular/common/http';\nimport { ErrorHandler, NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { Camera } from '@ionic-native/camera';\nimport { SplashScreen } from '@ionic-native/splash-screen';\nimport { StatusBar } from '@ionic-native/status-bar';\nimport { IonicStorageModule, Storage } from '@ionic/storage';\nimport { TranslateLoader, TranslateModule } from '@ngx-translate/core';\nimport { TranslateHttpLoader } from '@ngx-translate/http-loader';\nimport { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';\n\nimport { Items } from '../mocks/providers/items';\nimport { Settings, User, Api } from '../providers';\nimport { MyApp } from './app.component';\n\n// The translate loader needs to know where to load i18n files\n// in Ionic's static asset pipeline.\nexport function createTranslateLoader(http: HttpClient) {\n  return new TranslateHttpLoader(http, './assets/i18n/', '.json');\n}\n\nexport function provideSettings(storage: Storage) {\n  /**\n   * The Settings provider takes a set of default settings for your app.\n   *\n   * You can add new settings options at any time. Once the settings are saved,\n   * these values will not overwrite the saved values (this can be done manually if desired).\n   */\n  return new Settings(storage, {\n    option1: true,\n    option2: 'Ionitron J. Framework',\n    option3: '3',\n    option4: 'Hello'\n  });\n}\n\n@NgModule({\n  declarations: [\n    MyApp\n  ],\n  imports: [\n    BrowserModule,\n    HttpClientModule,\n    TranslateModule.forRoot({\n      loader: {\n        provide: TranslateLoader,\n        useFactory: (createTranslateLoader),\n        deps: [HttpClient]\n      }\n    }),\n    IonicModule.forRoot(MyApp),\n    IonicStorageModule.forRoot()\n  ],\n  bootstrap: [IonicApp],\n  entryComponents: [\n    MyApp\n  ],\n  providers: [\n    Api,\n    Items,\n    User,\n    Camera,\n    SplashScreen,\n    StatusBar,\n    { provide: Settings, useFactory: provideSettings, deps: [Storage] },\n    // Keep this to enable Ionic's runtime error handling during development\n    { provide: ErrorHandler, useClass: IonicErrorHandler }\n  ]\n})\nexport class AppModule { }\n"
  },
  {
    "path": "ionic-angular/official/super/src/app/app.scss",
    "content": "// https://ionicframework.com/docs/v2/theming/\n\n\n// App Global Sass\n// --------------------------------------------------\n// Put style rules here that you want to apply globally. These\n// styles are for the entire app and not just one component.\n// Additionally, this file can be also used as an entry point\n// to import other Sass files to be included in the output CSS.\n//\n// Shared Sass variables, which can be used to adjust Ionic's\n// default Sass variables, belong in \"theme/variables.scss\".\n//\n// To declare rules for a specific mode, create a child rule\n// for the .md, .ios, or .wp mode classes. The mode class is\n// automatically applied to the <body> element in the app.\n"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/ar.json",
    "content": "{\n  \"BACK_BUTTON_TEXT\": \"رجوع\",\n\n  \"NAME\": \"الاسم\",\n  \"EMAIL\": \"البريد الإلكتروني\",\n  \"USERNAME\": \"اسم المستخدم\",\n  \"PASSWORD\": \"كلمة السر\",\n  \"LOGIN\": \"تسجيل الدخول\",\n  \"SIGNUP\": \"انشاء الحساب\",\n\n  \"TAB1_TITLE\": \"عناصر\",\n  \"TAB2_TITLE\": \"بحث\",\n  \"TAB3_TITLE\": \"إعدادات\",\n\n  \"MAP_TITLE\": \"خريطة\",\n\n  \"TUTORIAL_SKIP_BUTTON\": \"تخطى\",\n  \"TUTORIAL_CONTINUE_BUTTON\": \"استمر\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"مرحبا بكم في عدة البدء Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> عبارة عن عدة لبدء التطوير بواسطة Ionic. وهي تتميز بالعديد من الصفحات وأفضل الممارسات.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"كيفية استخدام Ionic Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"يمكنك تجميع أنواع الصفحات المختلفة التي ترغب بها وإزالة الباقي. وتوفر عدة البدء ​​العديد من تخطيطات الصفحات الاكثر شيوعا في التطبيقات النقالة، مثل صفحات تسجيل الدخول وانشاء الحساب، علامات التبويب، وهذه الصفحة التعليمية.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"كيفية الشروع\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"هل تحتاج إلى مساعدة؟ يمكنك الاطلاع على README لبرنامج تعليمي كامل على Ionic Super Starter\",\n\n  \"TUTORIAL_SLIDE4_TITLE\": \"مستعد للعب؟\",\n\n  \"WELCOME_INTRO\": \"نقطة الانطلاق لتطبيق Ionic العظيم الخاص بك\",\n\n  \"SETTINGS_TITLE\": \"إعدادات\",\n  \"SETTINGS_OPTION1\": \"خيار 1\",\n  \"SETTINGS_OPTION2\": \"خيار 2\",\n  \"SETTINGS_OPTION3\": \"خيار 3\",\n  \"SETTINGS_OPTION4\": \"خيار 4\",\n\n  \"SETTINGS_PROFILE_BUTTON\": \"تعديل الملف الشخصي\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"تعديل الملف الشخصي\",\n\n  \"WELCOME_TITLE\": \"مرحبا\",\n\n  \"LOGIN_TITLE\": \"تسجيل الدخول\",\n  \"LOGIN_ERROR\": \"تعذر تسجيل الدخول. يرجى التحقق من معلومات حسابك وإعادة المحاولة.\",\n  \"LOGIN_BUTTON\": \"تسجيل الدخول\",\n  \"SIGNUP_TITLE\": \"انشاء الحساب\",\n  \"SIGNUP_ERROR\": \"تعذر إنشاء الحساب. يرجى التحقق من معلومات حسابك وإعادة المحاولة.\",\n  \"SIGNUP_BUTTON\": \"انشاء الحساب\",\n\n  \"LIST_MASTER_TITLE\": \"عناصر\",\n\n  \"ITEM_CREATE_TITLE\": \"عنصر جديد\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"إضافة صورة\",\n\n  \"ITEM_NAME_PLACEHOLDER\": \"الاسم\",\n  \"ITEM_ABOUT_PLACEHOLDER\": \"عن\",\n\n  \"DONE_BUTTON\": \"انهاء\",\n  \"CANCEL_BUTTON\": \"الغاء\",\n  \"DELETE_BUTTON\": \"حذف\",\n\n  \"CARDS_TITLE\": \"اجتماعي\",\n\n  \"SEARCH_TITLE\": \"بحث\",\n  \"SEARCH_PLACEHOLDER\": \"ابحث في قائمة العناصر، مثل \\\"Donald Duck\\\"\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/bs.json",
    "content": "{\n  \"NAME\": \"Ime\",\n  \"PASSWORD\": \"Šifra\",\n  \"EMAIL\": \"E-mail\",\n  \"LOGIN\": \"Prijava\",\n  \"SIGNUP\": \"Registracija\",\n\n  \"TAB1_TITLE\": \"Stavke\",\n  \"TAB2_TITLE\": \"Traži\",\n  \"TAB3_TITLE\": \"Postavke\",\n\n  \"MAP_TITLE\": \"Mapa\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Dobrodošli u Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> je potpuno funkcionalna početna aplikacija sa mnogim unaprijed pripremljenim stranicama uz korištenje najboljih praksi.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Kako koristiti Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Sastavite različite vrste stranica koje želite, a uklonite one koje ne želite. Obezbjedili smo vam mnoge uobičajne izglede stranica, kao što su stranice za registraciju i prijavu korisnika, tabulatore, a i ovu stranicu za učenje.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Počinjemo\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Trebate pomoć? Pročitajte Super Starter README za cijeli tutorial.\",\n\n  \"SETTINGS_TITLE\": \"Postavke\",\n  \"SETTINGS_OPTION1\": \"Opcija 1\",\n  \"SETTINGS_OPTION2\": \"Opcija 2\",\n  \"SETTINGS_OPTION3\": \"Opcija 3\",\n  \"SETTINGS_OPTION4\": \"Opcija 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Uredi profil\",\n\n  \"WELCOME_TITLE\": \"Dobrodošli\",\n\n  \"LOGIN_TITLE\": \"Prijavi se\",\n  \"LOGIN_ERROR\": \"Prijava nije uspjela. Molimo provjerite vaše podatke za prijavu, a zatim pokušajte ponovo.\",\n  \"LOGIN_BUTTON\": \"Prijava\",\n  \"SIGNUP_TITLE\": \"Registruj se\",\n  \"SIGNUP_ERROR\": \"Nije moguće kreirati novi korisnički račun. Molimo vas provjerite podatke, a zatim pokušajte ponovo.\",\n  \"SIGNUP_BUTTON\": \"Registracija\",\n\n  \"LIST_MASTER_TITLE\": \"Stavke\",\n\n  \"ITEM_CREATE_TITLE\": \"Nova stavka\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Dodaj sliku\",\n\n  \"CARDS_TITLE\": \"Socijalno\",\n\n  \"SEARCH_TITLE\": \"Traži\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/by.json",
    "content": "{\n  \"NAME\": \"Імя\",\n  \"EMAIL\": \"Email\",\n  \"PASSWORD\": \"Пароль\",\n  \"LOGIN\": \"Увайсці\",\n  \"SIGNUP\": \"Зарэгістравацца\",\n\n  \"TAB1_TITLE\": \"Спіс\",\n  \"TAB2_TITLE\": \"Пошук\",\n  \"TAB3_TITLE\": \"Налады\",\n\n  \"MAP_TITLE\": \"Мапа\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Вітаем ў Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> – гэта паўнавартасны пачатаковы пакет для Ionic са шматлікімі ўзорамі старонак і прыкладамі лепшых практык.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Як карыстацца\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Складайце старонкі розных кшталтаў з патрэбных вам элементаў і выдаляйце непатрэбныя. Сярод шматлікіх тыповых макетаў – \\\"Уваход\\\" і \\\"Рэгістрацыя\\\", старонка з закладкамі і гэтая пачатковая старонка з падказкамі.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"З чаго пачаць\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Патрэбна дапамога? Кіраўніцтвы ды тлумачэнні можна знайсці ў README-файлах унутры праекту.\",\n\n  \"SETTINGS_TITLE\": \"Налады\",\n  \"SETTINGS_OPTION1\": \"Налада 1\",\n  \"SETTINGS_OPTION2\": \"Налада 2\",\n  \"SETTINGS_OPTION3\": \"Налада 3\",\n  \"SETTINGS_OPTION4\": \"Налада 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Профіль\",\n\n  \"WELCOME_TITLE\": \"Прывітанне\",\n\n  \"LOGIN_TITLE\": \"Уваход\",\n  \"LOGIN_ERROR\": \"Не атрымалася ўвайсці ў сістэму. Калі ласка, праверце ўведзеныя ўліковыя дадзеныя і паспрабуйце зноў.\",\n  \"LOGIN_BUTTON\": \"Увайсці\",\n  \"SIGNUP_TITLE\": \"Рэгістрацыя\",\n  \"SIGNUP_ERROR\": \"Не атрымалася стварыць уліковы запіс. Калі ласка, праверце ўведзеныя ўліковыя дадзеныя і паспрабуйце зноў.\",\n  \"SIGNUP_BUTTON\": \"Зарэгістравацца\",\n\n  \"LIST_MASTER_TITLE\": \"Спіс\",\n\n  \"ITEM_CREATE_TITLE\": \"Дадаць у спіс\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Дадаць выяву\",\n\n  \"CARDS_TITLE\": \"Суполкі\",\n\n  \"SEARCH_TITLE\": \"Пошук\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/da.json",
    "content": "{\n  \"NAME\": \"Navn\",\n  \"PASSWORD\": \"Adgangskode\",\n  \"EMAIL\": \"Email\",\n  \"LOGIN\": \"Log Ind\",\n  \"SIGNUP\": \"Tilmeld\",\n\n  \"TAB1_TITLE\": \"Poster\",\n  \"TAB2_TITLE\": \"Søg\",\n  \"TAB3_TITLE\": \"Indstillinger\",\n\n  \"MAP_TITLE\": \"Kort\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Velkommen til Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> er en fuldt funktionsdygtig Ionic starter med mange køreklare sidetyper bygget efter best practices.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Sådan bruges Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Sammensæt de forskellige sidetyper du ønsker at bruge og fjern dem du ikke har behov for. Vi leverer mange gænse mobil app sider, som f.eks. login- og registreringssider, faneblade, og denne introduktionsside.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Kom i gang\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Har du brug for hjælp? Kig på Super Starter README for en omfattende forklaring.\",\n\n  \"SETTINGS_TITLE\": \"Indstillinger\",\n  \"SETTINGS_OPTION1\": \"Mulighed 1\",\n  \"SETTINGS_OPTION2\": \"Mulighed 2\",\n  \"SETTINGS_OPTION3\": \"Mulighed 3\",\n  \"SETTINGS_OPTION4\": \"Mulighed 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Rediger Profil\",\n\n  \"WELCOME_TITLE\": \"Velkommen\",\n\n  \"LOGIN_TITLE\": \"Log ind\",\n  \"LOGIN_ERROR\": \"Fejl ved log ind. Kontroller venligst kontooplysningerne og prøv igen.\",\n  \"LOGIN_BUTTON\": \"Log ind\",\n  \"SIGNUP_TITLE\": \"Registrer\",\n  \"SIGNUP_ERROR\": \"Fejl ved oprettelse. Kontroller venligst kontooplysningerne og prøv igen.\",\n  \"SIGNUP_BUTTON\": \"Registrer\",\n\n  \"LIST_MASTER_TITLE\": \"Poster\",\n\n  \"ITEM_CREATE_TITLE\": \"Ny post\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Tilføj billede\",\n\n  \"CARDS_TITLE\": \"Social\",\n\n  \"SEARCH_TITLE\": \"Søg\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/de.json",
    "content": "{\n  \"BACK_BUTTON_TEXT\": \"Zurück\",\n\n  \"NAME\": \"Name\",\n  \"PASSWORD\": \"Passwort\",\n  \"EMAIL\": \"Email\",\n  \"LOGIN\": \"Anmelden\",\n  \"SIGNUP\": \"Registrieren\",\n  \"CANCEL_BUTTON\": \"Schließen\",\n\n  \"TAB1_TITLE\": \"Items\",\n  \"TAB2_TITLE\": \"Suche\",\n  \"TAB3_TITLE\": \"Einstellung\",\n\n  \"MAP_TITLE\": \"Karte\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Hallo Ionic Super Starter App\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"Die <b>Ionic Super Starter App</b> ist eine umfangreiche Starter App mit vielen vorgefertigten Seiten und Best Practices.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Wie soll man die Super Starter App verwenden\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Nutze und bearbeite die Funktionen und Seiten die du benötigst und lösche den Rest. Wähle aus einer Vielzahl an Layouts, wie Anmelden, Registrieren, Tabs und einer Tutorial Seite.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Los gehts\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Du brauchst Hilfe? Sieh dir das README File an um mehr zu erfahren.\",\n\n  \"TUTORIAL_CONTINUE_BUTTON\": \"Fortfahren\",\n\n  \"WELCOME_INTRO\": \"Der Startpunkt für Deine nächste tolle Ionic App\",\n\n  \"SETTINGS_TITLE\": \"Einstellungen\",\n  \"SETTINGS_OPTION1\": \"Option 1\",\n  \"SETTINGS_OPTION2\": \"Option 2\",\n  \"SETTINGS_OPTION3\": \"Option 3\",\n  \"SETTINGS_OPTION4\": \"Option 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Profil ändern\",\n\n  \"WELCOME_TITLE\": \"Willkommen\",\n\n  \"LOGIN_TITLE\": \"Anmelden\",\n  \"LOGIN_ERROR\": \"Fehler beim Anmelden, bitte überprüfe deine Informationen und versuche es erneut.\",\n  \"LOGIN_BUTTON\": \"Anmelden\",\n  \"SIGNUP_TITLE\": \"Registrieren\",\n  \"SIGNUP_ERROR\": \"Fehler beim Registrieren, bitte überprüfe deine Informationen und versuche es erneut.\",\n  \"SIGNUP_BUTTON\": \"Registrieren\",\n\n  \"LIST_MASTER_TITLE\": \"Artikel\",\n\n  \"ITEM_CREATE_TITLE\": \"Neuer Artikel\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Artikel hinzufügen\",\n\n  \"CARDS_TITLE\": \"Social\",\n\n  \"SEARCH_TITLE\": \"Suche\",\n  \"SEARCH_PLACEHOLDER\": \"Suche in der Artikel-Liste, z.B. \\\"Donald Duck\\\"\"\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/el.json",
    "content": "{\n  \"NAME\": \"Όνομα\",\n  \"PASSWORD\": \"Κωδικός\",\n  \"EMAIL\": \"Email\",\n  \"LOGIN\": \"Σύνδεση\",\n  \"SIGNUP\": \"Εγγραφή\",\n\n  \"TAB1_TITLE\": \"Αντικείμενα\",\n  \"TAB2_TITLE\": \"Αναζήτηση\",\n  \"TAB3_TITLE\": \"Ρυθμίσεις\",\n\n  \"MAP_TITLE\": \"Χάρτης\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Καλώς ορίσατε στο Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"Το <b>Ionic Super Starter</b> είναι ένα πλήρες βοηθητικό πακέτο εκκίνησης προγραμματισμού με το Ionic και περιέχει πληθώρα έτοιμων, ανεπτυγμένων σελίδων αλλά και βέλτιστων-πρακτικών εφαρμογής του.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Πως να χρησημοποιήσετε το Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Συγκεντρώστε οποιες σελίδες επιθυμείτε και αφαιρέστε εκείνες που δε σας χρειάζονται. Σας παρέχουμε πολλές συνηθισμένες διατάξεις σελίδων, όπως σελίδες σύνδεσης και εγγραφής, με καρτέλες ή επεξήγησης όπως η παρούσα.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Ξεκινώντας\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Χρειάζεστε βοήθεια; Ρίχτε μια ματιά στο Super Starter README αρχείο για την πλήρη επεξήγηση.\",\n\n  \"SETTINGS_TITLE\": \"Ρυθμίσεις\",\n  \"SETTINGS_OPTION1\": \"Επιλογή 1\",\n  \"SETTINGS_OPTION2\": \"Επιλογή 2\",\n  \"SETTINGS_OPTION3\": \"Επιλογή 3\",\n  \"SETTINGS_OPTION4\": \"Επιλογή 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Επεξεργασία Προφίλ\",\n\n  \"WELCOME_TITLE\": \"Καλώς ορίσατε\",\n\n  \"LOGIN_TITLE\": \"Σύνδεση\",\n  \"LOGIN_ERROR\": \"Η σύνδεση ήταν ανέφικτη. Παρακαλούμε ελέγξτε τις πληροφορίες λογαριασμού σας και ξαναπροσπαθήστε.\",\n  \"LOGIN_BUTTON\": \"Σύνδεση\",\n  \"SIGNUP_TITLE\": \"Εγγραφή\",\n  \"SIGNUP_ERROR\": \"Η δημιουργία λογαριασμού ήταν ανέφικτη. Παρακαλούμε ελέγξτε τις πληροφορίες λογαριασμού σας και ξαναπροσπαθήστε.\",\n  \"SIGNUP_BUTTON\": \"Εγγραφή\",\n\n  \"LIST_MASTER_TITLE\": \"Αντικείμενα\",\n\n  \"ITEM_CREATE_TITLE\": \"Νέο Αντικείμενο\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Προσθήκη φωτογραφίας\",\n\n  \"CARDS_TITLE\": \"Κοινωνικά\",\n\n  \"SEARCH_TITLE\": \"Αναζήτηση\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/en.json",
    "content": "{\n  \"BACK_BUTTON_TEXT\": \"Back\",\n\n  \"NAME\": \"Name\",\n  \"EMAIL\": \"Email\",\n  \"USERNAME\": \"Username\",\n  \"PASSWORD\": \"Password\",\n  \"LOGIN\": \"Sign in\",\n  \"SIGNUP\": \"Sign up\",\n\n  \"TAB1_TITLE\": \"Items\",\n  \"TAB2_TITLE\": \"Search\",\n  \"TAB3_TITLE\": \"Settings\",\n\n  \"MAP_TITLE\": \"Map\",\n\n  \"TUTORIAL_SKIP_BUTTON\": \"Skip\",\n  \"TUTORIAL_CONTINUE_BUTTON\": \"Continue\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Welcome to the Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"The <b>Ionic Super Starter</b> is a fully-featured Ionic starter with many pre-built pages and best practices.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"How to use the Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Assemble the various page types you want and remove the ones you don't. We've provided many common mobile app page layouts, like login and signup pages, tabs, and this tutorial page.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Getting Started\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Need help? Check out the Super Starter README for a full tutorial\",\n\n  \"TUTORIAL_SLIDE4_TITLE\": \"Ready to Play?\",\n\n  \"WELCOME_INTRO\": \"The starting point for your next great Ionic app\",\n\n  \"SETTINGS_TITLE\": \"Settings\",\n  \"SETTINGS_OPTION1\": \"Option 1\",\n  \"SETTINGS_OPTION2\": \"Option 2\",\n  \"SETTINGS_OPTION3\": \"Option 3\",\n  \"SETTINGS_OPTION4\": \"Option 4\",\n\n  \"SETTINGS_PROFILE_BUTTON\": \"Edit Profile\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Edit Profile\",\n\n  \"WELCOME_TITLE\": \"Welcome\",\n\n  \"LOGIN_TITLE\": \"Sign in\",\n  \"LOGIN_ERROR\": \"Unable to sign in. Please check your account information and try again.\",\n  \"LOGIN_BUTTON\": \"Sign in\",\n  \"SIGNUP_TITLE\": \"Sign up\",\n  \"SIGNUP_ERROR\": \"Unable to create account. Please check your account information and try again.\",\n  \"SIGNUP_BUTTON\": \"Sign up\",\n\n  \"LIST_MASTER_TITLE\": \"Items\",\n\n  \"ITEM_CREATE_TITLE\": \"New Item\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Add Image\",\n\n  \"ITEM_NAME_PLACEHOLDER\": \"Name\",\n  \"ITEM_ABOUT_PLACEHOLDER\": \"About\",\n\n  \"DONE_BUTTON\": \"Done\",\n  \"CANCEL_BUTTON\": \"Cancel\",\n  \"DELETE_BUTTON\": \"Delete\",\n\n  \"CARDS_TITLE\": \"Social\",\n\n  \"SEARCH_TITLE\": \"Search\",\n  \"SEARCH_PLACEHOLDER\": \"Search the items list, e.g. \\\"Donald Duck\\\"\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/es-eu.json",
    "content": "{\n    \"NAME\": \"Izena\",\n    \"PASSWORD\": \"Pasahitza\",\n    \"EMAIL\": \"Email Helbidea\",\n    \"LOGIN\": \"Saioa Hasi\",\n    \"SIGNUP\": \"Izena Eman\",\n    \"TAB1_TITLE\": \"Artikuluak\",\n    \"TAB2_TITLE\": \"Bilatu\",\n    \"TAB3_TITLE\": \"Xehetasunak\",\n    \"MAP_TITLE\": \"Mapa\",\n    \"TUTORIAL_SLIDE1_TITLE\": \"Ongi etorri Ionic Super Starter-era\",\n    \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> hasierako txantiloi bat da, 'page' askorekin eta ereduak\",\n    \"TUTORIAL_SLIDE2_TITLE\": \"Nola erabili Super Starter\",\n    \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Sortu gustatzen zaizkizun orrialdeak eta ezabatu besteak. Adibidez: login  signup, tabs eta tutorialeak.\",\n    \"TUTORIAL_SLIDE3_TITLE\": \"Ikasten\",\n    \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Laguntzarik nahi? irakurri README,Super Starter-ren tutorial osoa daukazu\",\n    \"SETTINGS_TITLE\": \"Xehetasunak\",\n    \"SETTINGS_OPTION1\": \"1 Aukera\",\n    \"SETTINGS_OPTION2\": \"2 Aukera\",\n    \"SETTINGS_OPTION3\": \"3 Aukera\",\n    \"SETTINGS_OPTION4\": \"4 Aukera\",\n    \"SETTINGS_PAGE_PROFILE\": \"Zure datual editatu\",\n    \"WELCOME_TITLE\": \"Ongi Etorri\",\n    \"LOGIN_TITLE\": \"Sesioa Hasi\",\n    \"LOGIN_ERROR\": \"Arazoa sesioa hasteko. Mesedez,sahiatu berriz zure datuak idazten.\",\n    \"LOGIN_BUTTON\": \"Sesioa Hasi\",\n    \"SIGNUP_TITLE\": \"Izena eman\",\n    \"SIGNUP_ERROR\": \"Arazoa kontua sortzen.or, Mesedez,sahiatu berriz zure datuak idazten.\",\n    \"SIGNUP_BUTTON\": \"Izena Eman\",\n    \"LIST_MASTER_TITLE\": \"Artikuluak\",\n    \"ITEM_CREATE_TITLE\": \"Artikulu berria\",\n    \"ITEM_CREATE_CHOOSE_IMAGE\": \"Argazkia sortu\",\n    \"CARDS_TITLE\": \"Sozial\",\n    \"SEARCH_TITLE\": \"Bilatu\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/es.json",
    "content": "{\n  \"NAME\": \"Nombre\",\n  \"PASSWORD\": \"Contraseña\",\n  \"EMAIL\": \"Email\",\n  \"LOGIN\": \"Iniciar sesión\",\n  \"SIGNUP\": \"Registrarse\",\n\n  \"TAB1_TITLE\": \"Items\",\n  \"TAB2_TITLE\": \"Buscar\",\n  \"TAB3_TITLE\": \"Ajustes\",\n\n  \"MAP_TITLE\": \"Mapa\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Bienvenido/a al Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"El <b>Ionic Super Starter</b> es un starter de Ionic completo con muchas páginas preconstruidas y mejores prácticas.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Cómo usar el Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Monta los varios tipos de página que quieras y quita los que no. Hemos incluido muchas estructuras de página comunes en apps móviles, como páginas de inicio de sesión y registro, pestañas, y esta página de tutorial.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Empezando\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"¿Necesitas ayuda? Échale un vistazo al README del Super Starter para ver el tutorial completo.\",\n\n  \"SETTINGS_TITLE\": \"Ajustes\",\n  \"SETTINGS_OPTION1\": \"Opción 1\",\n  \"SETTINGS_OPTION2\": \"Opción 2\",\n  \"SETTINGS_OPTION3\": \"Opción 3\",\n  \"SETTINGS_OPTION4\": \"Opción 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Editar Perfil\",\n\n  \"WELCOME_TITLE\": \"Bienvenido/a\",\n\n  \"LOGIN_TITLE\": \"Iniciar sesión\",\n  \"LOGIN_ERROR\": \"No se ha podido iniciar sesión. Por favor revisa la información de la cuenta e inténtalo de nuevo.\",\n  \"LOGIN_BUTTON\": \"Iniciar sesión\",\n  \"SIGNUP_TITLE\": \"Registro\",\n  \"SIGNUP_ERROR\": \"No se ha podido crear la cuenta. Por favor revisa la información de la cuenta e inténtalo de nuevo.\",\n  \"SIGNUP_BUTTON\": \"Registrarse\",\n\n  \"LIST_MASTER_TITLE\": \"Items\",\n\n  \"ITEM_CREATE_TITLE\": \"Nuevo Item\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Añadir Imagen\",\n\n  \"CARDS_TITLE\": \"Social\",\n\n  \"SEARCH_TITLE\": \"Buscar\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/fil.json",
    "content": "{\n  \"NAME\": \"Pangalan\",\n  \"PASSWORD\": \"Password\",\n  \"EMAIL\": \"Email\",\n  \"LOGIN\": \"Sign in\",\n  \"SIGNUP\": \"Sign up\",\n\n  \"TAB1_TITLE\": \"Mga Gamit\",\n  \"TAB2_TITLE\": \"Hanapin\",\n  \"TAB3_TITLE\": \"Mga Setting\",\n\n  \"MAP_TITLE\": \"Mapa\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Maligayang Pagdating sa Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"Isang kumpletong Ionic starter na may buong mga pahina at pinakamainam na gawi ang Ionic Super Starter\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Paano gamitin ang Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Buoin ang mga page types na gusto mo at tanggalin ang mga ayaw mo. Marami kaming ibinigay na app layouts, tulad ng login at signup, tabs, at itong tutorial page\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Paano magsimula\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Kailangan ng tulong? Tignan ang README ng Super Starter para sa buong tutorial\",\n\n  \"SETTINGS_TITLE\": \"Mga Setting\",\n  \"SETTINGS_OPTION1\": \"Opsyon 1\",\n  \"SETTINGS_OPTION2\": \"Opsyon 2\",\n  \"SETTINGS_OPTION3\": \"Opsyon 3\",\n  \"SETTINGS_OPTION4\": \"Opsyon 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Baguhin ang Profile\",\n\n  \"WELCOME_TITLE\": \"Maligayang Pagdating\",\n\n  \"LOGIN_TITLE\": \"Sign in\",\n  \"LOGIN_ERROR\": \"Hindi makapag-sign-in. Paki-kumpirma ang iyong impormasyon at subukan ulit\",\n  \"LOGIN_BUTTON\": \"Sign in\",\n  \"SIGNUP_TITLE\": \"Sign up\",\n  \"SIGNUP_ERROR\": \"Hindi makagawa ng bagong account. Paki-kumpirma ang iyong impormasyon at subukan ulit\",\n  \"SIGNUP_BUTTON\": \"Sign up\",\n\n  \"LIST_MASTER_TITLE\": \"Mga Item\",\n\n  \"ITEM_CREATE_TITLE\": \"Bagong Item\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Maglagay ng Imahe\",\n\n  \"CARDS_TITLE\": \"Social\",\n\n  \"SEARCH_TITLE\": \"Hanapin\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/fr.json",
    "content": "{\n  \"NAME\": \"Nom\",\n  \"PASSWORD\": \"Mot de passe\",\n  \"EMAIL\": \"E-mail\",\n  \"LOGIN\": \"Connexion\",\n  \"SIGNUP\": \"Inscription\",\n\n  \"TAB1_TITLE\": \"Items\",\n  \"TAB2_TITLE\": \"Recherche\",\n  \"TAB3_TITLE\": \"Paramètres\",\n\n  \"MAP_TITLE\": \"Carte\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Bienvenue dans le kit de démarrage Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> est un kit complet pour démarrer sur Ionic. Il repose sur les meilleures pratiques et implémente de nombreux types de pages.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Comment utiliser le Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Assemblez les types de pages désirés et supprimez les autres. Le kit inclut plusieurs mises en page courantes d’applications mobiles, comme les pages de connexion et d’inscription, les onglets et cette page de tutoriel.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Pour commencer\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Si vous avez besoin d’aide, consultez le README du Super Starter pour un tutoriel complet.\",\n\n  \"SETTINGS_TITLE\": \"Paramètres\",\n  \"SETTINGS_OPTION1\": \"Option 1\",\n  \"SETTINGS_OPTION2\": \"Option 2\",\n  \"SETTINGS_OPTION3\": \"Option 3\",\n  \"SETTINGS_OPTION4\": \"Option 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Modifier le profil\",\n\n  \"WELCOME_TITLE\": \"Bienvenue\",\n\n  \"LOGIN_TITLE\": \"Connexion\",\n  \"LOGIN_ERROR\": \"Connexion impossible. Veuillez vérifier les informations de votre compte et réessayer.\",\n  \"LOGIN_BUTTON\": \"Connexion\",\n  \"SIGNUP_TITLE\": \"Inscription\",\n  \"SIGNUP_ERROR\": \"Inscription impossible. Veuillez vérifier les informations de votre compte et réessayer.\",\n  \"SIGNUP_BUTTON\": \"Inscription\",\n\n  \"LIST_MASTER_TITLE\": \"Items\",\n\n  \"ITEM_CREATE_TITLE\": \"Nouvel item\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Ajouter une image\",\n\n  \"CARDS_TITLE\": \"Social\",\n\n  \"SEARCH_TITLE\": \"Recherche\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/he.json",
    "content": "{\n  \"NAME\": \"שם\",\n  \"PASSWORD\": \"סיסמא\",\n  \"EMAIL\": \"דואר אלקטרוני\",\n  \"LOGIN\": \"התחברות\",\n  \"SIGNUP\": \"הרשמה\",\n\n  \"TAB1_TITLE\": \"פריטים\",\n  \"TAB2_TITLE\": \"חיפוש\",\n  \"TAB3_TITLE\": \"הגדרות\",\n\n  \"MAP_TITLE\": \"מפה\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"ברוכים הבאים ל-Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"ה-<b>Ionic Super Starter</b> הוא Starter מלא בתכונות עם הרבה דפים מוכנים ותרגולים הכי טובים.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"איך להשתמש ב-Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Assemble the various page types you want and remove the ones you don't. We've provided many common mobile app page layouts, like login and signup pages, tabs, and this tutorial page.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"התחלה\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"צריך עזרה? תבדקו את ה-README של ה-Super Starter להדרכה מלאה.\",\n\n  \"SETTINGS_TITLE\": \"הגדרות\",\n  \"SETTINGS_OPTION1\": \"אופציה 1\",\n  \"SETTINGS_OPTION2\": \"אופציה 2\",\n  \"SETTINGS_OPTION3\": \"אופציה 3\",\n  \"SETTINGS_OPTION4\": \"אופציה 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"עריכת פרופיל\",\n\n  \"WELCOME_TITLE\": \"ברוכים הבאים\",\n\n  \"LOGIN_TITLE\": \"התחברות\",\n  \"LOGIN_ERROR\": \"לא ניתן להתחבר. אנא בדוק את פרטי ההתחברות ונסה שנית.\",\n  \"LOGIN_BUTTON\": \"התחבר\",\n  \"SIGNUP_TITLE\": \"הרשמה\",\n  \"SIGNUP_ERROR\": \"לא ניתן ליצור חשבון. אנא בדוק את פרטי ההתחברות ונסה שנית.\",\n  \"SIGNUP_BUTTON\": \"הירשם\",\n\n  \"LIST_MASTER_TITLE\": \"פריטים\",\n\n  \"ITEM_CREATE_TITLE\": \"פריט חדש\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"הוסף תמונה\",\n\n  \"CARDS_TITLE\": \"חברתי\",\n\n  \"SEARCH_TITLE\": \"חיפוש\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/it.json",
    "content": "{\n  \"BACK_BUTTON_TEXT\": \"Indietro\",\n\n  \"NAME\": \"Nome\",\n  \"EMAIL\": \"Email\",\n  \"USERNAME\": \"Nome utente\",\n  \"PASSWORD\": \"Password\",\n  \"LOGIN\": \"Login\",\n  \"SIGNUP\": \"Registrati\",\n\n  \"TAB1_TITLE\": \"Elenco\",\n  \"TAB2_TITLE\": \"Ricerca\",\n  \"TAB3_TITLE\": \"Impostazioni\",\n\n  \"MAP_TITLE\": \"Mappa\",\n\n  \"TUTORIAL_SKIP_BUTTON\": \"Salta\",\n  \"TUTORIAL_CONTINUE_BUTTON\": \"Continua\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Benvenuti in Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> è un applicazione di partenza per Ionic che contiene molte pagine di esempio già pronte realizzate seguendo delle best practices.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Come usare Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Mantenete le pagine che volete e rimuovete quelle che non vi servono. Troverete diverse pagine di uso comune in questa applicazione come le pagine per il login e la registrazione, layout con tabs, e questa pagina di tutorial.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Come iniziare\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Serve aiuto? Leggete il README del progetto Super Starter per avere maggiori informazioni sul tutorial completo.\",\n\n  \"TUTORIAL_SLIDE4_TITLE\": \"Pronti ad iniziare?\",\n\n  \"WELCOME_INTRO\": \"Il punto di partenza per la tua prossima applicazione Ionic\",\n\n  \"SETTINGS_TITLE\": \"Impostazioni\",\n  \"SETTINGS_OPTION1\": \"Opzione 1\",\n  \"SETTINGS_OPTION2\": \"Opzione 2\",\n  \"SETTINGS_OPTION3\": \"Opzione 3\",\n  \"SETTINGS_OPTION4\": \"Opzione 4\",\n\n  \"SETTINGS_PROFILE_BUTTON\": \"Modifica Profilo\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Modifica Profilo\",\n\n  \"WELCOME_TITLE\": \"Benvenuto\",\n\n  \"LOGIN_TITLE\": \"Login\",\n  \"LOGIN_ERROR\": \"Non è possibile accedere. Ricontrollare le informazioni utente digitate prima di riprovare.\",\n  \"LOGIN_BUTTON\": \"Accedi\",\n  \"SIGNUP_TITLE\": \"Registrazione\",\n  \"SIGNUP_ERROR\": \"Non è possibile creare l'utente. Assicurarsi di aver inserito le informazioni utente correttamente e poi riprovare.\",\n  \"SIGNUP_BUTTON\": \"Registrati\",\n\n  \"LIST_MASTER_TITLE\": \"Elenco elementi\",\n\n  \"ITEM_CREATE_TITLE\": \"Nuovo elemento\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Aggiungi immagine\",\n\n  \"ITEM_NAME_PLACEHOLDER\": \"Nome\",\n  \"ITEM_ABOUT_PLACEHOLDER\": \"Informazioni\",\n\n  \"DONE_BUTTON\": \"Fatto\",\n  \"CANCEL_BUTTON\": \"Annulla\",\n  \"DELETE_BUTTON\": \"Elimina\",\n\n  \"CARDS_TITLE\": \"Social\",\n\n  \"SEARCH_TITLE\": \"Ricerca\",\n  \"SEARCH_PLACEHOLDER\": \"Trova elementi in lista, ex. \\\"Donald Duck\\\"\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/ja.json",
    "content": "{\n  \"BACK_BUTTON_TEXT\": \"戻る\",\n\n  \"NAME\": \"名前\",\n  \"EMAIL\": \"Eメール\",\n  \"USERNAME\": \"ユーザー名\",\n  \"PASSWORD\": \"パスワード\",\n  \"LOGIN\": \"サインイン\",\n  \"SIGNUP\": \"サインアップ\",\n\n  \"TAB1_TITLE\": \"項目\",\n  \"TAB2_TITLE\": \"検索\",\n  \"TAB3_TITLE\": \"設定\",\n\n  \"MAP_TITLE\": \"地図\",\n\n  \"TUTORIAL_SKIP_BUTTON\": \"スキップ\",\n  \"TUTORIAL_CONTINUE_BUTTON\": \"続ける\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Ionic Super Starterへようこそ\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b> Ionic Super Starter </b>は、多くのビルド済ページとベストプラクティスを備えた、完全な機能をもつIonicのスターターです。\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Super Starterの使い方\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"いろいろなページタイプの中から欲しいものを組み合わせて、いらないものを取り除いてください。 ログインページ、サインアップページ、タブ、このチュートリアルページなど、一般的なモバイルアプリのページレイアウトをいろいろと提供しています。\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"はじめに\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"ヘルプが必要ですか？完全なチュートリアルについては、Super Starter READMEを参照してください。\",\n\n  \"TUTORIAL_SLIDE4_TITLE\": \"準備ができましたか?\",\n\n  \"WELCOME_INTRO\": \"あなたのすばらしいIonicアプリの出発点\",\n\n  \"SETTINGS_TITLE\": \"設定\",\n  \"SETTINGS_OPTION1\": \"オプション 1\",\n  \"SETTINGS_OPTION2\": \"オプション 2\",\n  \"SETTINGS_OPTION3\": \"オプション 3\",\n  \"SETTINGS_OPTION4\": \"オプション 4\",\n\n  \"SETTINGS_PROFILE_BUTTON\": \"プロフィールの編集\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"プロフィールの編集\",\n\n  \"WELCOME_TITLE\": \"ようこそ\",\n\n  \"LOGIN_TITLE\": \"サインイン\",\n  \"LOGIN_ERROR\": \"サインインできません。アカウント情報を確認して、もう一度お試しください。\",\n  \"LOGIN_BUTTON\": \"サインイン\",\n  \"SIGNUP_TITLE\": \"サインアップ\",\n  \"SIGNUP_ERROR\": \"アカウントを作成できません。 アカウント情報を確認して、もう一度お試しください。\",\n  \"SIGNUP_BUTTON\": \"サインアップ\",\n\n  \"LIST_MASTER_TITLE\": \"項目\",\n\n  \"ITEM_CREATE_TITLE\": \"新しい項目\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"画像の追加\",\n\n  \"ITEM_NAME_PLACEHOLDER\": \"名前\",\n  \"ITEM_ABOUT_PLACEHOLDER\": \"説明\",\n\n  \"DONE_BUTTON\": \"完了\",\n  \"CANCEL_BUTTON\": \"キャンセル\",\n  \"DELETE_BUTTON\": \"削除\",\n\n  \"CARDS_TITLE\": \"ソーシャル\",\n\n  \"SEARCH_TITLE\": \"検索\",\n  \"SEARCH_PLACEHOLDER\": \"項目一覧を検索 例 \\\"Donald Duck\\\"\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/nb_NO.json",
    "content": "{\n  \"NAME\": \"Navn\",\n  \"PASSWORD\": \"Passord\",\n  \"EMAIL\": \"Email\",\n  \"LOGIN\": \"Logg inn\",\n  \"SIGNUP\": \"Registrer deg\",\n\n  \"TAB1_TITLE\": \"Innlegg\",\n  \"TAB2_TITLE\": \"Søk\",\n  \"TAB3_TITLE\": \"Innstillinger\",\n\n  \"MAP_TITLE\": \"Kart\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Velkommen til Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> er en fullverdig startpakke for Ionic med forhåndslagde undersider utviklet etter beste praksis.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Hvordan bruke Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Ta i bruk undersidene du trenger og fjern de unødvendige. Pakken tilbyr vanlige layouts for mobil-apper slik som innlogging- og registreringssider, faner og denne opplæringssiden.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Kom i gang\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Trenger du hjelp? Les Super Starter README-dokumentet for instruksjoner\",\n\n  \"SETTINGS_TITLE\": \"Innstillinger\",\n  \"SETTINGS_OPTION1\": \"Alternativ 1\",\n  \"SETTINGS_OPTION2\": \"Alternativ 2\",\n  \"SETTINGS_OPTION3\": \"Alternativ 3\",\n  \"SETTINGS_OPTION4\": \"Alternativ 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Endre Profil\",\n\n  \"WELCOME_TITLE\": \"Velkommen\",\n\n  \"LOGIN_TITLE\": \"Innlogging\",\n  \"LOGIN_ERROR\": \"Feil ved innlogging. Bekreft at kontodetaljene er riktig og prøv igjen.\",\n  \"LOGIN_BUTTON\": \"Logg inn\",\n  \"SIGNUP_TITLE\": \"Registrering\",\n  \"SIGNUP_ERROR\": \"Feil ved registrering. Bekreft kontodetaljene og prøv igjen.\",\n  \"SIGNUP_BUTTON\": \"Registrer deg\",\n\n  \"LIST_MASTER_TITLE\": \"Innlegg\",\n\n  \"ITEM_CREATE_TITLE\": \"Nytt Innlegg\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Legg Til Bilde\",\n\n  \"CARDS_TITLE\": \"Sosialt\",\n\n  \"SEARCH_TITLE\": \"Søk\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/nl.json",
    "content": "{\n  \"NAME\": \"Naam\",\n  \"PASSWORD\": \"Wachtwoord\",\n  \"EMAIL\": \"E-mail\",\n  \"LOGIN\": \"Inloggen\",\n  \"SIGNUP\": \"Aanmelden\",\n\n  \"TAB1_TITLE\": \"Items\",\n  \"TAB2_TITLE\": \"Zoeken\",\n  \"TAB3_TITLE\": \"Instellingen\",\n\n  \"MAP_TITLE\": \"Kaart\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Welkom bij de Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"De <b>Ionic Super Starter</b> biedt een volledig functionele basis voor een Ionic applicatie met veel voorgedefinieëerde pagina's en 'best practices'.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Hoe de Super Starter te gebruiken\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Stel je applicatie samen door pagina's te combineren en verwijder degenen die je niet wil gebruiken. We bieden je verschillende typen mobiele applicatie pagina's, zoals login- en aanmeld pagina's, tabbladen, en deze handleiding pagina.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Beginnen\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Hulp nodig? Check de Super Starter README voor een uitgebreide introductie\",\n\n  \"SETTINGS_TITLE\": \"Instellingen\",\n  \"SETTINGS_OPTION1\": \"Optie 1\",\n  \"SETTINGS_OPTION2\": \"Optie 2\",\n  \"SETTINGS_OPTION3\": \"Optie 3\",\n  \"SETTINGS_OPTION4\": \"Optie 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Wijzig Profiel\",\n\n  \"WELCOME_TITLE\": \"Welkom\",\n\n  \"LOGIN_TITLE\": \"Aanmelden\",\n  \"LOGIN_ERROR\": \"Inloggen mislukt. Controleer a.u.b. uw account informatie en probeer het nogmaals.\",\n  \"LOGIN_BUTTON\": \"Inloggen\",\n  \"SIGNUP_TITLE\": \"Aanmelden\",\n  \"SIGNUP_ERROR\": \"Aanmelden mislukt. Controleer a.u.b. uw account informatie en probeer het nogmaals.\",\n  \"SIGNUP_BUTTON\": \"Aanmelden\",\n\n  \"LIST_MASTER_TITLE\": \"Items\",\n\n  \"ITEM_CREATE_TITLE\": \"Nieuw Item\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Afbeeldingen Toevoegen\",\n\n  \"CARDS_TITLE\": \"Sociaal\",\n\n  \"SEARCH_TITLE\": \"Zoeken\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/pl.json",
    "content": "{\n  \"NAME\": \"Imię\",\n  \"PASSWORD\": \"Hasło\",\n  \"EMAIL\": \"Email\",\n  \"LOGIN\": \"Zaloguj\",\n  \"SIGNUP\": \"Zarejestruj\",\n\n  \"TAB1_TITLE\": \"Pozycje\",\n  \"TAB2_TITLE\": \"Szukaj\",\n  \"TAB3_TITLE\": \"Ustawienia\",\n\n  \"MAP_TITLE\": \"Mapa\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Witaj w Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> jest w pełni funkcjonalnym początkiem przygody z Ionic'iem, złożonym z wielu predefiniowanych szablonów i najlepszych praktyk programistycznych.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Jak korzystać z Super Startera\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Pozbieraj różne typy stron, które chcesz usunąć, a także te, których nie chcesz. Mamy do zaoferowania wiele wspólnych stron i szablonów mobilnej aplikacji. Są to między innymi: strona logowania, rejestracji, taby, a także ten oto poradnik.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Pierwsze kroki\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Potrzebujesz pomocy? Sprawdź plik README projektu Super Starter dla pełnego poradnika\",\n\n  \"SETTINGS_TITLE\": \"Ustawienia\",\n  \"SETTINGS_OPTION1\": \"Opcja 1\",\n  \"SETTINGS_OPTION2\": \"Opcja 2\",\n  \"SETTINGS_OPTION3\": \"Opcja 3\",\n  \"SETTINGS_OPTION4\": \"Opcja 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Edytuj Profil\",\n\n  \"WELCOME_TITLE\": \"Witaj\",\n\n  \"LOGIN_TITLE\": \"Zaloguj\",\n  \"LOGIN_ERROR\": \"Nie udało się zalogować. Sprawdź raz jeszcze dane swoje konta i spróbuj ponownie.\",\n  \"LOGIN_BUTTON\": \"Zaloguj\",\n  \"SIGNUP_TITLE\": \"Zarejestruj\",\n  \"SIGNUP_ERROR\": \"Nie udało się stworzyć konta. Sprawdź raz jeszcze dane swoje konta i spróbuj ponownie.\",\n  \"SIGNUP_BUTTON\": \"Zarejestruj\",\n\n  \"LIST_MASTER_TITLE\": \"Pozycje\",\n\n  \"ITEM_CREATE_TITLE\": \"Nowa pozycja\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Dodaj obrazek\",\n\n  \"CARDS_TITLE\": \"Społeczność\",\n\n  \"SEARCH_TITLE\": \"Szukaj\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/pt-PT.json",
    "content": "{\n  \"NAME\": \"Nome\",\n  \"PASSWORD\": \"Password\",\n  \"EMAIL\": \"Email\",\n  \"LOGIN\": \"Entrar\",\n  \"SIGNUP\": \"Criar conta\",\n\n  \"TAB1_TITLE\": \"Items\",\n  \"TAB2_TITLE\": \"Pesquisa\",\n  \"TAB3_TITLE\": \"Configurações\",\n\n  \"MAP_TITLE\": \"Mapa\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Bem-vindo ao Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"O <b>Ionic Super Starter</b> é um pacote Ionic com várias páginas prontas e exemplos de boas práticas.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Como usar o Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Combine os vários tipos de página que quer usar e remova as desnecessárias. Nós disponibilizamos vários layouts mobile comuns, como páginas de login e registo, tabs, e esta página de tutorial.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Como começar\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Precisa de ajuda? Para um tutorial completo leia o README do Super Starter\",\n\n  \"SETTINGS_TITLE\": \"Configurações\",\n  \"SETTINGS_OPTION1\": \"Opção 1\",\n  \"SETTINGS_OPTION2\": \"Opção 2\",\n  \"SETTINGS_OPTION3\": \"Opção 3\",\n  \"SETTINGS_OPTION4\": \"Opção 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Editar Perfil\",\n\n  \"WELCOME_TITLE\": \"Bem-vindo\",\n\n  \"LOGIN_TITLE\": \"Entrar\",\n  \"LOGIN_ERROR\": \"Não foi possível entrar na sua conta. Por favor confirme os seus dados e tente novamente.\",\n  \"LOGIN_BUTTON\": \"Entrar\",\n  \"SIGNUP_TITLE\": \"Criar conta\",\n  \"SIGNUP_ERROR\": \"Não foi possível criar a sua conta. Por favor confirme os seus dados e tente novamente.\",\n  \"SIGNUP_BUTTON\": \"Criar conta\",\n\n  \"LIST_MASTER_TITLE\": \"Items\",\n\n  \"ITEM_CREATE_TITLE\": \"Novo Item\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Adicionar Imagem\",\n\n  \"CARDS_TITLE\": \"Social\",\n\n  \"SEARCH_TITLE\": \"Pesquisa\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/pt-br.json",
    "content": "{\n  \"BACK_BUTTON_TEXT\": \"Voltar\",\n\n  \"NAME\": \"Nome\",\n  \"EMAIL\": \"Email\",\n  \"USERNAME\": \"Nome de Usuário\",\n  \"PASSWORD\": \"Senha\",\n  \"LOGIN\": \"Entrar\",\n  \"SIGNUP\": \"Cadastre-se\",\n\n  \"TAB1_TITLE\": \"Itens\",\n  \"TAB2_TITLE\": \"Busca\",\n  \"TAB3_TITLE\": \"Configurações\",\n\n  \"MAP_TITLE\": \"Mapa\",\n\n  \"TUTORIAL_SKIP_BUTTON\": \"Pular\",\n  \"TUTORIAL_CONTINUE_BUTTON\": \"Continuar\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Bem-vindo ao Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"O <b>Ionic Super Starter</b> é um starter para Ionic completo, com diversos componentes e páginas prontas para ser utilizado como guia de melhores práticas.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Como utilizar o Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Combine os tipos de páginas que você quer e remova aquelas que não precisa. No starter existem muitos casos de uso comuns de layouts e páginas como login, cadastro, abas e de tutorial.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Iniciando o projeto\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Precisa de ajuda? Dê uma olhada no README do Super Starter para um tutorial completo\",\n\n  \"TUTORIAL_SLIDE4_TITLE\": \"Pronto para Usar?\",\n\n  \"WELCOME_INTRO\": \"O ponto de partida para seu próximo app feito no Ionic\",\n\n  \"SETTINGS_TITLE\": \"Configurações\",\n  \"SETTINGS_OPTION1\": \"Opção 1\",\n  \"SETTINGS_OPTION2\": \"Opção 2\",\n  \"SETTINGS_OPTION3\": \"Opção 3\",\n  \"SETTINGS_OPTION4\": \"Opção 4\",\n\n  \"SETTINGS_PROFILE_BUTTON\": \"Editar Perfil\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Editar Perfil\",\n\n  \"WELCOME_TITLE\": \"Bem-vindo\",\n\n  \"LOGIN_TITLE\": \"Entrar\",\n  \"LOGIN_ERROR\": \"Não foi possível entrar na sua conta. Verifique seus dados e tente novamente.\",\n  \"LOGIN_BUTTON\": \"Entrar\",\n  \"SIGNUP_TITLE\": \"Cadastre-se\",\n  \"SIGNUP_ERROR\": \"Não foi possível criar sua conta. Verifique seus dados e tente novamente.\",\n  \"SIGNUP_BUTTON\": \"Cadastre-se\",\n\n  \"LIST_MASTER_TITLE\": \"Itens\",\n\n  \"ITEM_CREATE_TITLE\": \"Novo Item\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Adicionar Imagem\",\n\n  \"ITEM_NAME_PLACEHOLDER\": \"Nome\",\n  \"ITEM_ABOUT_PLACEHOLDER\": \"Sobre\",\n\n  \"DONE_BUTTON\": \"Pronto\",\n  \"CANCEL_BUTTON\": \"Cancelar\",\n  \"DELETE_BUTTON\": \"Apagar\",\n\n  \"CARDS_TITLE\": \"Social\",\n\n  \"SEARCH_TITLE\": \"Busca\",\n  \"SEARCH_PLACEHOLDER\": \"Procure um item da lista, ex: \\\"Donald Duck\\\"\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/ru.json",
    "content": "{\n  \"NAME\": \"Имя\",\n  \"PASSWORD\": \"Пароль\",\n  \"EMAIL\": \"Email\",\n  \"LOGIN\": \"Вход\",\n  \"SIGNUP\": \"Регистрация\",\n\n  \"TAB1_TITLE\": \"Список\",\n  \"TAB2_TITLE\": \"Поиск\",\n  \"TAB3_TITLE\": \"Настройки\",\n\n  \"MAP_TITLE\": \"Карта\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Добро пожаловать в Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> это полноценный набор примеров Ionic с большим количеством готовых страниц и лучших практик.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Как использовать Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Сделайте свой набор из многочисленных страниц разного типа. Все лишнее можете выкинуть. Мы предоставили много типовых макетов страниц мобильных приложений, таких как страницы регистрации, вкладки, и страницы с руководством, наподобие этой.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Начало работы\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Нужна помощь? Вы найдете полное руководство к Super Starter в файле README\",\n\n  \"SETTINGS_TITLE\": \"Настройки\",\n  \"SETTINGS_OPTION1\": \"Опция 1\",\n  \"SETTINGS_OPTION2\": \"Опция 2\",\n  \"SETTINGS_OPTION3\": \"Опция 3\",\n  \"SETTINGS_OPTION4\": \"Опция 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Редактирование профиля\",\n\n  \"WELCOME_TITLE\": \"Добро пожаловать\",\n\n  \"LOGIN_TITLE\": \"Вход\",\n  \"LOGIN_ERROR\": \"Невозможно войти. Пожалуйста проверьте информацию о Вашей учетной записи и попробуйте войти еще раз.\",\n  \"LOGIN_BUTTON\": \"Войти\",\n  \"SIGNUP_TITLE\": \"Регистрация\",\n  \"SIGNUP_ERROR\": \"Невозможно создать учетную запись. Пожалуйста проверьте информацию о Вашей учетной записи и попробуйте еще раз.\",\n  \"SIGNUP_BUTTON\": \"Регистрация\",\n\n  \"LIST_MASTER_TITLE\": \"Список\",\n\n  \"ITEM_CREATE_TITLE\": \"Новый элемент\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Добавить изображение\",\n\n  \"CARDS_TITLE\": \"Социальный\",\n\n  \"SEARCH_TITLE\": \"Поиск\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/sk.json",
    "content": "{\n  \"BACK_BUTTON_TEXT\": \"Späť\",\n\n  \"NAME\": \"Meno\",\n  \"EMAIL\": \"Email\",\n  \"USERNAME\": \"Prihlasovacie meno\",\n  \"PASSWORD\": \"Heslo\",\n  \"LOGIN\": \"Prihlásiť\",\n  \"SIGNUP\": \"Registrovať\",\n\n  \"TAB1_TITLE\": \"Položky\",\n  \"TAB2_TITLE\": \"Hľadať\",\n  \"TAB3_TITLE\": \"Nastavenia\",\n\n  \"MAP_TITLE\": \"Mapa\",\n\n  \"TUTORIAL_SKIP_BUTTON\": \"Preskočiť\",\n  \"TUTORIAL_CONTINUE_BUTTON\": \"Pokračovať\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Vitajte v Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> kompletný Ionic starter projekt s mnohými predkonfigurovanými stránkami a doporučenými postupmi.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Ako použiť Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Upravte si stránky, ktoré vám vyhovujú a ostatné odstránte. Poskytujeme mnoho šablón mobilných stránok, ako napríklad stránka na prihlásenie, registráciu, záložky a tento návod.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Začíname\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Potrebujete pomoc? Prečítajte si Super Starter README, v ktorom je popísaný komplený návod\",\n\n  \"TUTORIAL_SLIDE4_TITLE\": \"Ste pripravený?\",\n\n\n\n  \"WELCOME_INTRO\": \"Prvý krok vašej novej Ionic aplikácie.\",\n\n  \"SETTINGS_TITLE\": \"Nastavenia\",\n  \"SETTINGS_OPTION1\": \"Možnosť 1\",\n  \"SETTINGS_OPTION2\": \"Možnosť 2\",\n  \"SETTINGS_OPTION3\": \"Možnosť 3\",\n  \"SETTINGS_OPTION4\": \"Možnosť 4\",\n\n  \"SETTINGS_PROFILE_BUTTON\": \"Upraviť profil\",\n\n\n  \"SETTINGS_PAGE_PROFILE\": \"Profil\",\n\n\n  \"WELCOME_TITLE\": \"Vitajte\",\n\n\n\n\n\n  \"LOGIN_TITLE\": \"Prihlásenie\",\n  \"LOGIN_ERROR\": \"Nedá sa prihlásiť. Skotrolujte zadané informácie a skuste to znova.\",\n  \"LOGIN_BUTTON\": \"Prihlásiť\",\n  \"SIGNUP_TITLE\": \"Registrácia\",\n  \"SIGNUP_ERROR\": \"Nedá sa vytvoriť konto. Skotrolujte zadané informácie a skuste to znova.\",\n  \"SIGNUP_BUTTON\": \"Registrovať\",\n\n  \"LIST_MASTER_TITLE\": \"Položky\",\n\n  \"ITEM_CREATE_TITLE\": \"Nová položka\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Pridať obrázok\",\n\n\n\n\n\n  \"ITEM_NAME_PLACEHOLDER\": \"Názov\",\n  \"ITEM_ABOUT_PLACEHOLDER\": \"O položke\",\n\n  \"DONE_BUTTON\": \"Hotovo\",\n  \"CANCEL_BUTTON\": \"Zrušiť\",\n  \"DELETE_BUTTON\": \"Vymazať\",\n\n  \"CARDS_TITLE\": \"Soc. siete\",\n\n  \"SEARCH_TITLE\": \"Hľadať\",\n  \"SEARCH_PLACEHOLDER\": \"Napíšte hľadaný výraz, e.g. \\\"Donald Duck\\\"\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/sl.json",
    "content": "{\n  \"NAME\": \"Ime\",\n  \"PASSWORD\": \"Geslo\",\n  \"EMAIL\": \"E-mail\",\n  \"LOGIN\": \"Prijava\",\n  \"SIGNUP\": \"Ustvari račun\",\n\n  \"TAB1_TITLE\": \"Elementi\",\n  \"TAB2_TITLE\": \"Iskanje\",\n  \"TAB3_TITLE\": \"Nastavitve\",\n\n  \"MAP_TITLE\": \"Zemljevid\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Dobrodošli v Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> je celosten Ionic začetni paket z pestrim naborom funkcionalnosti in uporablja najboljše prakse razvoja Ionic aplikacij.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Kako uporabljati Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Sestavite poljubne tipe strani in odstranite tiste, ki jih ne potrebujete. Ponujamo vam mnogo različnih oblik strani, npr. stran za prijavo oz. vpis, stran z zavihki in stran tega vodiča.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Kako začeti?\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Potrebujete pomoč? Poglejte si Super Starter README datoteko za celoten vodič.\",\n\n  \"SETTINGS_TITLE\": \"Nastavitve\",\n  \"SETTINGS_OPTION1\": \"Opcija 1\",\n  \"SETTINGS_OPTION2\": \"Opcija 2\",\n  \"SETTINGS_OPTION3\": \"Opcija 3\",\n  \"SETTINGS_OPTION4\": \"Opcija 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Uredi profil\",\n\n  \"WELCOME_TITLE\": \"Dobrodošli\",\n\n  \"LOGIN_TITLE\": \"Prijava\",\n  \"LOGIN_ERROR\": \"Napaka pri prijavi. Prosimo preglejte prijavne podatke računa in poskusite ponovno.\",\n  \"LOGIN_BUTTON\": \"Prijava\",\n  \"SIGNUP_TITLE\": \"Ustvari račun\",\n  \"SIGNUP_ERROR\": \"Napaka pri kreiranju računa. Prosimo preglejte podatke kreiranega računa in poskusite ponovno. \",\n  \"SIGNUP_BUTTON\": \"Ustvari račun\",\n\n  \"LIST_MASTER_TITLE\": \"Elementi\",\n\n  \"ITEM_CREATE_TITLE\": \"Dodaj element\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Dodaj sliko\",\n\n  \"CARDS_TITLE\": \"Socialno\",\n\n  \"SEARCH_TITLE\": \"Iskanje\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/sn.json",
    "content": "{\n  \"BACK_BUTTON_TEXT\": \"Dzoka Shure\",\n\n  \"NAME\": \"Zita\",\n  \"EMAIL\": \"Tsambambozha\",\n  \"USERNAME\": \"Zitamushandisi\",\n  \"PASSWORD\": \"Chihori\",\n  \"LOGIN\": \"Sign mu\",\n  \"SIGNUP\": \"Gadzira homwe yejikichidzo\",\n\n  \"TAB1_TITLE\": \"Maaitemu\",\n  \"TAB2_TITLE\": \"Tsvaga\",\n  \"TAB3_TITLE\": \"Gadziro\",\n\n  \"MAP_TITLE\": \"Mepu\",\n\n  \"TUTORIAL_SKIP_BUTTON\": \"Darika\",\n  \"TUTORIAL_CONTINUE_BUTTON\": \"Enderera\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Tinokugachirai ku Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> i Ionic Starter yakarungwa zvakakwanira nemapeji akagadzirwa kare nenzira dzakanaka dzinotenderwa\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Mashandisiro  eSuper Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Kororodza mapeji akasiyana siyana aunoda ,uchibvisa ayo ausingadi, Tapa huwarirwa hwakawanda unozivikanwa sokunge mapeji e login ne sign up,tabs uye peji rino rechidzidzo\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Kuvamba matangiro\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Unotsvaga rubatsiro? Ongorora Super Starter README kuti uwane chidzidzo chizere\",\n\n  \"TUTORIAL_SLIDE4_TITLE\": \"Wagadzirira kutamba?\",\n\n  \"WELCOME_INTRO\": \"Pekutangira kwako kugadzira jikichidzo guru yeIonic\",\n\n  \"SETTINGS_TITLE\": \"Gadziro\",\n  \"SETTINGS_OPTION1\": \"Sarudzo yekutanga\",\n  \"SETTINGS_OPTION2\": \"Sarudzo yepiri\",\n  \"SETTINGS_OPTION3\": \"Sarudzo yechitatu\",\n  \"SETTINGS_OPTION4\": \"Sarudzo yechina\",\n\n  \"SETTINGS_PROFILE_BUTTON\": \"Pepeta Profile\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Pepeta Profile\",\n\n  \"WELCOME_TITLE\": \"Tinokuchingamidza\",\n\n  \"LOGIN_TITLE\": \"Sign mu\",\n  \"LOGIN_ERROR\": \"Takundikana kuita sign in. Tinokumbirawo mutarire homwe yenyu yejikichidzo mugoedza zvakare\",\n  \"LOGIN_BUTTON\": \"Sign mu\",\n  \"SIGNUP_TITLE\": \"Gadzira homwe yejikichidzo\",\n  \"SIGNUP_ERROR\": \"Takundikana kugadzira homwe yejikichidzo ,Tinokumbirawo mutarire zvakatarwa pahomwe yenyu yejikichidzo moedza zvakare.\",\n  \"SIGNUP_BUTTON\": \"Gadzira homwe yejikichidzo\",\n\n  \"LIST_MASTER_TITLE\": \"maaitemu\",\n\n  \"ITEM_CREATE_TITLE\": \"Aitemu itsva\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Wedzera mufananidzo\",\n\n  \"ITEM_NAME_PLACEHOLDER\": \"Zita\",\n  \"ITEM_ABOUT_PLACEHOLDER\": \"Nezve\",\n\n  \"DONE_BUTTON\": \"aita\",\n  \"CANCEL_BUTTON\": \"kanzura\",\n  \"DELETE_BUTTON\": \"Dzima\",\n\n  \"CARDS_TITLE\": \"Social\",\n\n  \"SEARCH_TITLE\": \"Tsvaga\",\n  \"SEARCH_PLACEHOLDER\": \"Tsvaga mumaaitemu sokuti \\\"Donald Duck\\\"\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/sv.json",
    "content": "{\n  \"NAME\": \"Namn\",\n  \"PASSWORD\": \"Lösenord\",\n  \"EMAIL\": \"E-post\",\n  \"LOGIN\": \"Logga in\",\n  \"SIGNUP\": \"Skapa konto\",\n\n  \"TAB1_TITLE\": \"Inlägg\",\n  \"TAB2_TITLE\": \"Sök\",\n  \"TAB3_TITLE\": \"Inställningar\",\n\n  \"MAP_TITLE\": \"Karta\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Välkommen till Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> är ett fullfjädrat startpaket för Ionic med många färdigbyggda sidor skapade med bästa praxis.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Hur man använder Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Använd de sidor du önskar och ta bort de övriga. Startpaketet innehåller många vanliga vyer för mobilappar, såsom inloggning och kontoregistrering, flikar och denna introduktionsvy.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Komma igång\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Behöver du hjälp? Läs README-dokumentet som innehåller en fullständig handledning för Super Starter.\",\n\n  \"SETTINGS_TITLE\": \"Inställningar\",\n  \"SETTINGS_OPTION1\": \"Alternativ 1\",\n  \"SETTINGS_OPTION2\": \"Alternativ 2\",\n  \"SETTINGS_OPTION3\": \"Alternativ 3\",\n  \"SETTINGS_OPTION4\": \"Alternativ 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Redigera profil\",\n\n  \"WELCOME_TITLE\": \"Välkommen\",\n\n  \"LOGIN_TITLE\": \"Logga in\",\n  \"LOGIN_ERROR\": \"Det gick inte att logga in. Kontrollera inloggningsuppgifterna och försök igen.\",\n  \"LOGIN_BUTTON\": \"Logga in\",\n  \"SIGNUP_TITLE\": \"Skapa konto\",\n  \"SIGNUP_ERROR\": \"Det gick inte att skapa ett konto. Kontrollera dina uppgifter och försök igen.\",\n  \"SIGNUP_BUTTON\": \"Skapa konto\",\n\n  \"LIST_MASTER_TITLE\": \"Inlägg\",\n\n  \"ITEM_CREATE_TITLE\": \"Nytt inlägg\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Lägg till bild\",\n\n  \"CARDS_TITLE\": \"Socialt\",\n\n  \"SEARCH_TITLE\": \"Sök\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/th.json",
    "content": "{\n  \"NAME\": \"ชื่อ\",\n  \"PASSWORD\": \"รหัสผ่าน\",\n  \"EMAIL\": \"อีเมล์\",\n  \"LOGIN\": \"เข้าระบบ\",\n  \"SIGNUP\": \"สมัครใช้งาน\",\n\n  \"TAB1_TITLE\": \"รายการ\",\n  \"TAB2_TITLE\": \"ค้นหา\",\n  \"TAB3_TITLE\": \"ตั้งค่า\",\n\n  \"MAP_TITLE\": \"แผนที่\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"ยินดีต้อนรับสู่ the Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"The <b>Ionic Super Starter</b> คือโปรเจคเริ่มต้น Ionic ที่มีหน้าจอพร้อมใช้งานและเขียนแบบ Best practices\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"วิธีใช้ Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"เก็บหน้าจอแบบที่ใช้ไว้ ลบที่ไม่ใช้ออก เราเตรียมหน้าจอที่ใช้กันประจำสำหรับแอพมือถือไว้ให้ เช่น หน้าล็อกอิน, หน้าสมัครใช้งาน, แทบ, และหน้าสอนใช้งานนี้\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"เริ่มต้นใช้งาน\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"ต้องการความช่วยเหลือ? ลองอ่าน tutorial ฉบับเต็มจากไฟล์ README\",\n\n  \"SETTINGS_TITLE\": \"ตั้งค่า\",\n  \"SETTINGS_OPTION1\": \"ตัวเลือก 1\",\n  \"SETTINGS_OPTION2\": \"ตัวเลือก 2\",\n  \"SETTINGS_OPTION3\": \"ตัวเลือก 3\",\n  \"SETTINGS_OPTION4\": \"ตัวเลือก 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"แก้ไขข้อมูลส่วนตัว\",\n\n  \"WELCOME_TITLE\": \"ยินดีต้อนรับ\",\n\n  \"LOGIN_TITLE\": \"การเข้าระบบ\",\n  \"LOGIN_ERROR\": \"เข้าระบบไม่ได้. ตรวจสอบข้อมูลที่กรอกแล้วกรุณาลองใหม่\",\n  \"LOGIN_BUTTON\": \"เข้าระบบ\",\n  \"SIGNUP_TITLE\": \"สมัครใช้งาน\",\n  \"SIGNUP_ERROR\": \"ไม่สามารถสร้างผู้ใช้ใหม่ กรุณาตรวจสอบข้อมูลที่กรอกแล้วลองใหม่\",\n  \"SIGNUP_BUTTON\": \"สมัคร\",\n  \"LIST_MASTER_TITLE\": \"รายการ\",\n\n  \"ITEM_CREATE_TITLE\": \"รายการใหม่\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"เพิ่มรูปภาพ\",\n\n  \"CARDS_TITLE\": \"โซเชียลเน็ตเวิร์ค\",\n\n  \"SEARCH_TITLE\": \"ค้นหา\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/tr.json",
    "content": "{\n  \"BACK_BUTTON_TEXT\": \"Geri\",\n\n  \"NAME\": \"İsim\",\n  \"PASSWORD\": \"Şifre\",\n  \"EMAIL\": \"Email\",\n  \"LOGIN\": \"Giriş yap\",\n  \"SIGNUP\": \"Kayıt ol\",\n  \"TAB1_TITLE\": \"Öğeler\",\n  \"TAB2_TITLE\": \"Arama\",\n  \"TAB3_TITLE\": \"Ayarlar\",\n  \"MAP_TITLE\": \"Harita\",\n  \"TUTORIAL_SLIDE1_TITLE\": \"Ionic Super Starter'a Hoşgeldin\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> hazırlanmış sayfalar ve çok iyi örneklerle tam donanımlı bir başlangıç paketidir.\",\n  \"TUTORIAL_SLIDE2_TITLE\": \"Super Starter Nasıl Kullanılır?\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"İstediğiniz çeşitte sayfa oluşturun ya da istemediklerinizi kaldırın. Biz sadece giriş ve kayıt sayfası, tab gibi yaygın sayfaları ve bu anlatım sayfasını hazırladık.\",\n  \"TUTORIAL_SLIDE3_TITLE\": \"Başlangıç\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Yardım mı lazım? Super Starter README dosyasını inceleyebilirsin.\",\n  \"SETTINGS_TITLE\": \"Ayarlar\",\n  \"SETTINGS_OPTION1\": \"Seçenek 1\",\n  \"SETTINGS_OPTION2\": \"Seçenek 2\",\n  \"SETTINGS_OPTION3\": \"Seçenek 3\",\n  \"SETTINGS_OPTION4\": \"Seçenek 4\",\n  \"SETTINGS_PAGE_PROFILE\": \"Profilini Düzenle\",\n  \"WELCOME_TITLE\": \"Hoşgeldiniz\",\n  \"LOGIN_TITLE\": \"Giriş yap\",\n  \"LOGIN_ERROR\": \"Giriş yapılamadı. Lütfen hesap bilgilerinizi kontrol edip tekrar deneyin.\",\n  \"LOGIN_BUTTON\": \"Giriş yap\",\n  \"SIGNUP_TITLE\": \"Kayıt ol\",\n  \"SIGNUP_ERROR\": \"Hesap oluşturulamadı. Lütfen hesap bilgilerinizi kontrol edip tekrar deneyin.\",\n  \"SIGNUP_BUTTON\": \"Kayıt ol\",\n  \"LIST_MASTER_TITLE\": \"Öğeler\",\n  \"ITEM_CREATE_TITLE\": \"Yeni Öğe\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Yeni Görsel\",\n  \"CARDS_TITLE\": \"Sosyal\",\n  \"SEARCH_TITLE\": \"Arama\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/ua.json",
    "content": "{\n  \"NAME\": \"Ім'я\",\n  \"PASSWORD\": \"Пароль\",\n  \"EMAIL\": \"Email\",\n  \"LOGIN\": \"Вхід\",\n  \"SIGNUP\": \"Реєстрація\",\n\n  \"TAB1_TITLE\": \"Список\",\n  \"TAB2_TITLE\": \"Пошук\",\n  \"TAB3_TITLE\": \"Налаштування\",\n\n  \"MAP_TITLE\": \"Мапа\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"Ласкаво просимо до Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> це повноцінний набір прикладів для Ionic з великою кількістю готових сторінок та кращих практик.\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"Як використовувати Super Starter\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"Створіть власний набір зі численних сторінок різного типу. Усе зайве можете викинути. Ми підготували багато типових макетів сторінок мобільних додатків, таких як сторінки входу та реєстрації, вкладки та сторінки-приклади, як ця.\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"Початок роботи\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"Потрібна допомога? Ви знайдете повноцінну інструкцию до Super Starter у файлі README\",\n\n  \"SETTINGS_TITLE\": \"Налаштування\",\n  \"SETTINGS_OPTION1\": \"Варіант 1\",\n  \"SETTINGS_OPTION2\": \"Варіант 2\",\n  \"SETTINGS_OPTION3\": \"Варіант 3\",\n  \"SETTINGS_OPTION4\": \"Варіант 4\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"Редагування профілю\",\n\n  \"WELCOME_TITLE\": \"Ласкаво просимо\",\n\n  \"LOGIN_TITLE\": \"Вхід\",\n  \"LOGIN_ERROR\": \"Неможливо увійти. Будь ласка перевірте інформацію Вашого облікового запису та спробуйте увійти ще раз.\",\n  \"LOGIN_BUTTON\": \"Увійти\",\n  \"SIGNUP_TITLE\": \"Реєстрація\",\n  \"SIGNUP_ERROR\": \"Неможливо створити обліковий запис. Будь ласка перевірте інформацію Вашого облікового запису та спробуйте ще раз.\",\n  \"SIGNUP_BUTTON\": \"Зареєструвати\",\n\n  \"LIST_MASTER_TITLE\": \"Список\",\n\n  \"ITEM_CREATE_TITLE\": \"Новий елемент\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"Додати зображення\",\n\n  \"CARDS_TITLE\": \"Соціальний\",\n\n  \"SEARCH_TITLE\": \"Пошук\"\n}"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/zh-cmn-Hans.json",
    "content": "{\n  \"BACK_BUTTON_TEXT\": \"回退\",\n\n  \"NAME\": \"姓名\",\n  \"EMAIL\": \"邮箱\",\n  \"USERNAME\": \"登录名\",\n  \"PASSWORD\": \"口令\",\n  \"LOGIN\": \"登 录\",\n  \"SIGNUP\": \"注 册\",\n\n  \"TAB1_TITLE\": \"项目\",\n  \"TAB2_TITLE\": \"搜索\",\n  \"TAB3_TITLE\": \"设置\",\n\n  \"MAP_TITLE\": \"地图\",\n\n  \"TUTORIAL_SKIP_BUTTON\": \"跳过\",\n  \"TUTORIAL_CONTINUE_BUTTON\": \"继续\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"欢迎来到 Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> 是一个功能全面，内置多个页面以及最佳实践的 Ionic 入门教程。\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"如何使用 Super 入门教程\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"使用你需要的多种多样的页面删除你不需要的页面。我们提供许多常见移动 app 页面，如登录、注册页面，tabs 标签页，以及本教程页面。\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"开始\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"需要帮助？查看 Super 入门教程的帮助文档，可获得完整教程。\",\n\n  \"TUTORIAL_SLIDE4_TITLE\": \"开始学习？\",\n\n  \"WELCOME_INTRO\": \"出发，你的下一个强大的 Ionic app\",\n\n  \"SETTINGS_TITLE\": \"设置\",\n  \"SETTINGS_OPTION1\": \"选项 1\",\n  \"SETTINGS_OPTION2\": \"选项 2\",\n  \"SETTINGS_OPTION3\": \"选项 3\",\n  \"SETTINGS_OPTION4\": \"选项 4\",\n\n  \"SETTINGS_PROFILE_BUTTON\": \"编辑资料\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"编辑资料\",\n\n  \"WELCOME_TITLE\": \"欢迎\",\n\n  \"LOGIN_TITLE\": \"登录\",\n  \"LOGIN_ERROR\": \"无法登录。请检查账号信息然后重试。\",\n  \"LOGIN_BUTTON\": \"登 录\",\n  \"SIGNUP_TITLE\": \"注 册\",\n  \"SIGNUP_ERROR\": \"无法创建账号。请检查账户信息然后重试。\",\n  \"SIGNUP_BUTTON\": \"注 册\",\n\n  \"LIST_MASTER_TITLE\": \"项目\",\n\n  \"ITEM_CREATE_TITLE\": \"新项目\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"添加图片\",\n\n  \"ITEM_NAME_PLACEHOLDER\": \"名称\",\n  \"ITEM_ABOUT_PLACEHOLDER\": \"关于\",\n\n  \"DONE_BUTTON\": \"完 成\",\n  \"CANCEL_BUTTON\": \"取 消\",\n  \"DELETE_BUTTON\": \"删 除\",\n\n  \"CARDS_TITLE\": \"社交\",\n\n  \"SEARCH_TITLE\": \"搜索\",\n  \"SEARCH_PLACEHOLDER\": \"搜索项目列表, 比如：\\\"Donald Duck\\\"\"\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/assets/i18n/zh-cmn-Hant.json",
    "content": "{\n  \"BACK_BUTTON_TEXT\": \"回退\",\n\n  \"NAME\": \"姓名\",\n  \"EMAIL\": \"郵箱\",\n  \"USERNAME\": \"登錄名\",\n  \"PASSWORD\": \"口令\",\n  \"LOGIN\": \"登 錄\",\n  \"SIGNUP\": \"註 冊\",\n\n  \"TAB1_TITLE\": \"項目\",\n  \"TAB2_TITLE\": \"搜索\",\n  \"TAB3_TITLE\": \"設置\",\n\n  \"MAP_TITLE\": \"地圖\",\n\n  \"TUTORIAL_SKIP_BUTTON\": \"跳過\",\n  \"TUTORIAL_CONTINUE_BUTTON\": \"繼續\",\n\n  \"TUTORIAL_SLIDE1_TITLE\": \"歡迎來到 Ionic Super Starter\",\n  \"TUTORIAL_SLIDE1_DESCRIPTION\": \"<b>Ionic Super Starter</b> 是一個功能全面，內置多個頁面以及最佳實踐的 Ionic 入門教程。\",\n\n  \"TUTORIAL_SLIDE2_TITLE\": \"如何使用 Super 入門教程\",\n  \"TUTORIAL_SLIDE2_DESCRIPTION\": \"使用你需要的多種多樣的頁面刪除你不需要的頁面。我們提供許多常見移動 app 頁面，如登錄、註冊頁面，tabs 標簽頁，以及本教程頁面。\",\n\n  \"TUTORIAL_SLIDE3_TITLE\": \"開始\",\n  \"TUTORIAL_SLIDE3_DESCRIPTION\": \"需要幫助？查看 Super 入門教程的幫助文檔，可獲得完整教程。\",\n\n  \"TUTORIAL_SLIDE4_TITLE\": \"開始學習？\",\n\n  \"WELCOME_INTRO\": \"出發，你的下一個強大的 Ionic app\",\n\n  \"SETTINGS_TITLE\": \"設置\",\n  \"SETTINGS_OPTION1\": \"選項 1\",\n  \"SETTINGS_OPTION2\": \"選項 2\",\n  \"SETTINGS_OPTION3\": \"選項 3\",\n  \"SETTINGS_OPTION4\": \"選項 4\",\n\n  \"SETTINGS_PROFILE_BUTTON\": \"編輯資料\",\n\n  \"SETTINGS_PAGE_PROFILE\": \"編輯資料\",\n\n  \"WELCOME_TITLE\": \"歡迎\",\n\n  \"LOGIN_TITLE\": \"登錄\",\n  \"LOGIN_ERROR\": \"無法登錄。請檢查賬號信息然後重試。\",\n  \"LOGIN_BUTTON\": \"登 錄\",\n  \"SIGNUP_TITLE\": \"註 冊\",\n  \"SIGNUP_ERROR\": \"無法創建賬號。請檢查賬戶信息然後重試。\",\n  \"SIGNUP_BUTTON\": \"註 冊\",\n\n  \"LIST_MASTER_TITLE\": \"項目\",\n\n  \"ITEM_CREATE_TITLE\": \"新項目\",\n  \"ITEM_CREATE_CHOOSE_IMAGE\": \"添加圖片\",\n\n  \"ITEM_NAME_PLACEHOLDER\": \"名稱\",\n  \"ITEM_ABOUT_PLACEHOLDER\": \"關於\",\n\n  \"DONE_BUTTON\": \"完 成\",\n  \"CANCEL_BUTTON\": \"取 消\",\n  \"DELETE_BUTTON\": \"刪 除\",\n\n  \"CARDS_TITLE\": \"社交\",\n\n  \"SEARCH_TITLE\": \"搜索\",\n  \"SEARCH_PLACEHOLDER\": \"搜索項目列表, 例如：\\\"Donald Duck\\\"\"\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/mocks/providers/items.ts",
    "content": "import { Injectable } from '@angular/core';\n\nimport { Item } from '../../models/item';\n\n@Injectable()\nexport class Items {\n  items: Item[] = [];\n\n  defaultItem: any = {\n    \"name\": \"Burt Bear\",\n    \"profilePic\": \"assets/img/speakers/bear.jpg\",\n    \"about\": \"Burt is a Bear.\",\n  };\n\n\n  constructor() {\n    let items = [\n      {\n        \"name\": \"Burt Bear\",\n        \"profilePic\": \"assets/img/speakers/bear.jpg\",\n        \"about\": \"Burt is a Bear.\"\n      },\n      {\n        \"name\": \"Charlie Cheetah\",\n        \"profilePic\": \"assets/img/speakers/cheetah.jpg\",\n        \"about\": \"Charlie is a Cheetah.\"\n      },\n      {\n        \"name\": \"Donald Duck\",\n        \"profilePic\": \"assets/img/speakers/duck.jpg\",\n        \"about\": \"Donald is a Duck.\"\n      },\n      {\n        \"name\": \"Eva Eagle\",\n        \"profilePic\": \"assets/img/speakers/eagle.jpg\",\n        \"about\": \"Eva is an Eagle.\"\n      },\n      {\n        \"name\": \"Ellie Elephant\",\n        \"profilePic\": \"assets/img/speakers/elephant.jpg\",\n        \"about\": \"Ellie is an Elephant.\"\n      },\n      {\n        \"name\": \"Molly Mouse\",\n        \"profilePic\": \"assets/img/speakers/mouse.jpg\",\n        \"about\": \"Molly is a Mouse.\"\n      },\n      {\n        \"name\": \"Paul Puppy\",\n        \"profilePic\": \"assets/img/speakers/puppy.jpg\",\n        \"about\": \"Paul is a Puppy.\"\n      }\n    ];\n\n    for (let item of items) {\n      this.items.push(new Item(item));\n    }\n  }\n\n  query(params?: any) {\n    if (!params) {\n      return this.items;\n    }\n\n    return this.items.filter((item) => {\n      for (let key in params) {\n        let field = item[key];\n        if (typeof field == 'string' && field.toLowerCase().indexOf(params[key].toLowerCase()) >= 0) {\n          return item;\n        } else if (field == params[key]) {\n          return item;\n        }\n      }\n      return null;\n    });\n  }\n\n  add(item: Item) {\n    this.items.push(item);\n  }\n\n  delete(item: Item) {\n    this.items.splice(this.items.indexOf(item), 1);\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/models/item.ts",
    "content": "/**\n * A generic model that our Master-Detail pages list, create, and delete.\n *\n * Change \"Item\" to the noun your app will use. For example, a \"Contact,\" or a\n * \"Customer,\" or an \"Animal,\" or something like that.\n *\n * The Items service manages creating instances of Item, so go ahead and rename\n * that something that fits your app as well.\n */\nexport class Item {\n\n  constructor(fields: any) {\n    // Quick and dirty extend/assign fields to this model\n    for (const f in fields) {\n      // @ts-ignore\n      this[f] = fields[f];\n    }\n  }\n\n}\n\nexport interface Item {\n  [prop: string]: any;\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/README.md",
    "content": "# Pages\n\nEach page type available has a corresponding README, take a look by navigating to a page directory above.\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/cards/README.md",
    "content": "# Cards\n\nThe Cards page is a common cards-based layout as seen in such apps as Facebook.\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/cards/cards.html",
    "content": "<ion-header>\n\n  <ion-navbar>\n    <ion-title>{{ 'CARDS_TITLE' | translate }}</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content>\n\n  <ion-card *ngFor=\"let item of cardItems\">\n\n    <ion-item>\n      <ion-avatar item-start>\n        <img [src]=\"item.user.avatar\">\n      </ion-avatar>\n      <h2>{{item.user.name}}</h2>\n      <p>{{item.date}}</p>\n    </ion-item>\n\n    <img [src]=\"item.image\">\n\n    <ion-card-content>\n      <p>{{item.content}}</p>\n    </ion-card-content>\n\n    <ion-row>\n      <ion-col>\n        <button ion-button color=\"primary\" clear small icon-start>\n            <ion-icon name='thumbs-up'></ion-icon>\n            12 Likes\n          </button>\n      </ion-col>\n      <ion-col>\n        <button ion-button color=\"primary\" clear small icon-start>\n            <ion-icon name='text'></ion-icon>\n            4 Comments\n          </button>\n      </ion-col>\n      <ion-col center text-center>\n        <ion-note>\n          11h ago\n        </ion-note>\n      </ion-col>\n    </ion-row>\n  </ion-card>\n</ion-content>"
  },
  {
    "path": "ionic-angular/official/super/src/pages/cards/cards.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { IonicPageModule } from 'ionic-angular';\n\nimport { CardsPage } from './cards';\n\n@NgModule({\n  declarations: [\n    CardsPage,\n  ],\n  imports: [\n    IonicPageModule.forChild(CardsPage),\n    TranslateModule.forChild()\n  ],\n  exports: [\n    CardsPage\n  ]\n})\nexport class CardsPageModule { }\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/cards/cards.scss",
    "content": "page-cards {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/cards/cards.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonicPage, NavController } from 'ionic-angular';\n\n@IonicPage()\n@Component({\n  selector: 'page-cards',\n  templateUrl: 'cards.html'\n})\nexport class CardsPage {\n  cardItems: any[];\n\n  constructor(public navCtrl: NavController) {\n    this.cardItems = [\n      {\n        user: {\n          avatar: 'assets/img/marty-avatar.png',\n          name: 'Marty McFly'\n        },\n        date: 'November 5, 1955',\n        image: 'assets/img/advance-card-bttf.png',\n        content: 'Wait a minute. Wait a minute, Doc. Uhhh... Are you telling me that you built a time machine... out of a DeLorean?! Whoa. This is heavy.',\n      },\n      {\n        user: {\n          avatar: 'assets/img/sarah-avatar.png.jpeg',\n          name: 'Sarah Connor'\n        },\n        date: 'May 12, 1984',\n        image: 'assets/img/advance-card-tmntr.jpg',\n        content: 'I face the unknown future, with a sense of hope. Because if a machine, a Terminator, can learn the value of human life, maybe we can too.'\n      },\n      {\n        user: {\n          avatar: 'assets/img/ian-avatar.png',\n          name: 'Dr. Ian Malcolm'\n        },\n        date: 'June 28, 1990',\n        image: 'assets/img/advance-card-jp.jpg',\n        content: 'Your scientists were so preoccupied with whether or not they could, that they didn\\'t stop to think if they should.'\n      }\n    ];\n\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/content/README.md",
    "content": "# Content\n\nThe content page is a simple page meant for text content.\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/content/content.html",
    "content": "<ion-header>\n  <ion-navbar>\n    <ion-title>\n      Content\n    </ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n  <p>\n    This is a perfect starting point for a page with primarily text content. The body is padded nicely and ready for prose.\n  </p>\n</ion-content>"
  },
  {
    "path": "ionic-angular/official/super/src/pages/content/content.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { IonicPageModule } from 'ionic-angular';\n\nimport { ContentPage } from './content';\n\n@NgModule({\n  declarations: [\n    ContentPage,\n  ],\n  imports: [\n    IonicPageModule.forChild(ContentPage),\n    TranslateModule.forChild()\n  ],\n  exports: [\n    ContentPage\n  ]\n})\nexport class ContentPageModule { }\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/content/content.scss",
    "content": "page-home {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/content/content.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonicPage, NavController } from 'ionic-angular';\n\n@IonicPage()\n@Component({\n  selector: 'page-content',\n  templateUrl: 'content.html'\n})\nexport class ContentPage {\n\n  constructor(public navCtrl: NavController) { }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/index.ts",
    "content": "// The page the user lands on after opening the app and without a session\nexport const FirstRunPage = 'TutorialPage';\n\n// The main page the user will see as they use the app over a long period of time.\n// Change this if not using tabs\nexport const MainPage = 'TabsPage';\n\n// The initial root pages for our tabs (remove if not using tabs)\nexport const Tab1Root = 'ListMasterPage';\nexport const Tab2Root = 'SearchPage';\nexport const Tab3Root = 'SettingsPage';\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/item-create/README.md",
    "content": "# Item Create\n\nThe Item Create Page creates new instances of `Item`, and will most commonly be used in a modal window to be presented by `ListMasterPage`.\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/item-create/item-create.html",
    "content": "<ion-header>\n\n  <ion-navbar>\n    <ion-title>{{ 'ITEM_CREATE_TITLE' | translate }}</ion-title>\n    <ion-buttons start>\n      <button ion-button (click)=\"cancel()\">\n        <span color=\"primary\" showWhen=\"ios\">\n          {{ 'CANCEL_BUTTON' | translate }}\n        </span>\n        <ion-icon name=\"md-close\" showWhen=\"android,windows\"></ion-icon>\n      </button>\n    </ion-buttons>\n    <ion-buttons end>\n      <button ion-button (click)=\"done()\" [disabled]=\"!isReadyToSave\" strong>\n        <span color=\"primary\" showWhen=\"ios\">\n          {{ 'DONE_BUTTON' | translate }}\n        </span>\n        <ion-icon name=\"md-checkmark\" showWhen=\"core,android,windows\"></ion-icon>\n      </button>\n    </ion-buttons>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content>\n  <form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"createItem()\">\n    <input type=\"file\" #fileInput style=\"visibility: hidden; height: 0px\" name=\"files[]\" (change)=\"processWebImage($event)\" />\n    <div class=\"profile-image-wrapper\" (click)=\"getPicture()\">\n      <div class=\"profile-image-placeholder\" *ngIf=\"!this.form.controls.profilePic.value\">\n        <ion-icon name=\"add\"></ion-icon>\n        <div>\n          {{ 'ITEM_CREATE_CHOOSE_IMAGE' | translate }}\n        </div>\n      </div>\n      <div class=\"profile-image\" [style.backgroundImage]=\"getProfileImageStyle()\" *ngIf=\"this.form.controls.profilePic.value\"></div>\n    </div>\n    <ion-list>\n      <ion-item>\n        <ion-input type=\"text\" placeholder=\"{{ 'ITEM_NAME_PLACEHOLDER' | translate }}\" formControlName=\"name\"></ion-input>\n      </ion-item>\n      <ion-item>\n        <ion-input type=\"text\" placeholder=\"{{ 'ITEM_ABOUT_PLACEHOLDER' | translate }}\" formControlName=\"about\"></ion-input>\n      </ion-item>\n    </ion-list>\n  </form>\n</ion-content>"
  },
  {
    "path": "ionic-angular/official/super/src/pages/item-create/item-create.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { IonicPageModule } from 'ionic-angular';\n\nimport { ItemCreatePage } from './item-create';\n\n@NgModule({\n  declarations: [\n    ItemCreatePage,\n  ],\n  imports: [\n    IonicPageModule.forChild(ItemCreatePage),\n    TranslateModule.forChild()\n  ],\n  exports: [\n    ItemCreatePage\n  ]\n})\nexport class ItemCreatePageModule { }\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/item-create/item-create.scss",
    "content": "page-item-create {\n  .profile-image-wrapper {\n    text-align: center;\n    margin: 20px 0;\n\n    .profile-image {\n      width: 96px;\n      height: 96px;\n      border-radius: 50%;\n\n      display: inline-block;\n\n      background-repeat: no-repeat;\n      background-size: cover;\n      background-position: center;\n    }\n\n    .profile-image-placeholder {\n      display: inline-block;\n\n      background-color: #eee;\n      width: 96px;\n      height: 96px;\n      border-radius: 50%;\n\n      font-size: 12px;\n\n      ion-icon {\n        font-size: 44px;\n        margin-bottom: -10px;\n        margin-top: 10px;\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/item-create/item-create.ts",
    "content": "import { Component, ViewChild } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { Camera } from '@ionic-native/camera';\nimport { IonicPage, NavController, ViewController } from 'ionic-angular';\n\n@IonicPage()\n@Component({\n  selector: 'page-item-create',\n  templateUrl: 'item-create.html'\n})\nexport class ItemCreatePage {\n  @ViewChild('fileInput') fileInput;\n\n  isReadyToSave: boolean;\n\n  item: any;\n\n  form: FormGroup;\n\n  constructor(public navCtrl: NavController, public viewCtrl: ViewController, formBuilder: FormBuilder, public camera: Camera) {\n    this.form = formBuilder.group({\n      profilePic: [''],\n      name: ['', Validators.required],\n      about: ['']\n    });\n\n    // Watch the form for changes, and\n    this.form.valueChanges.subscribe((v) => {\n      this.isReadyToSave = this.form.valid;\n    });\n  }\n\n  ionViewDidLoad() {\n\n  }\n\n  getPicture() {\n    if (Camera['installed']()) {\n      this.camera.getPicture({\n        destinationType: this.camera.DestinationType.DATA_URL,\n        targetWidth: 96,\n        targetHeight: 96\n      }).then((data) => {\n        this.form.patchValue({ 'profilePic': 'data:image/jpg;base64,' + data });\n      }, (err) => {\n        alert('Unable to take photo');\n      })\n    } else {\n      this.fileInput.nativeElement.click();\n    }\n  }\n\n  processWebImage(event) {\n    let reader = new FileReader();\n    reader.onload = (readerEvent) => {\n\n      let imageData = (readerEvent.target as any).result;\n      this.form.patchValue({ 'profilePic': imageData });\n    };\n\n    reader.readAsDataURL(event.target.files[0]);\n  }\n\n  getProfileImageStyle() {\n    return 'url(' + this.form.controls['profilePic'].value + ')'\n  }\n\n  /**\n   * The user cancelled, so we dismiss without sending data back.\n   */\n  cancel() {\n    this.viewCtrl.dismiss();\n  }\n\n  /**\n   * The user is done and wants to create the item, so return it\n   * back to the presenter.\n   */\n  done() {\n    if (!this.form.valid) { return; }\n    this.viewCtrl.dismiss(this.form.value);\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/item-detail/README.md",
    "content": "# Item Detail\n\nThe Item Detail Page shows the details of instances of `Item`, and will most commonly be navigated to from `ListMasterPage`.\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/item-detail/item-detail.html",
    "content": "<ion-header>\n\n  <ion-navbar>\n    <ion-title>{{ item.name }}</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content>\n  <div class=\"item-profile\" text-center #profilePic [style.background-image]=\"'url(' + item.profilePic + ')'\">\n  </div>\n\n  <div class=\"item-detail\" padding>\n    <h2>{{item.name}}</h2>\n    <p>{{item.about}}</p>\n  </div>\n</ion-content>"
  },
  {
    "path": "ionic-angular/official/super/src/pages/item-detail/item-detail.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { IonicPageModule } from 'ionic-angular';\n\nimport { ItemDetailPage } from './item-detail';\n\n@NgModule({\n  declarations: [\n    ItemDetailPage,\n  ],\n  imports: [\n    IonicPageModule.forChild(ItemDetailPage),\n    TranslateModule.forChild()\n  ],\n  exports: [\n    ItemDetailPage\n  ]\n})\nexport class ItemDetailPageModule { }\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/item-detail/item-detail.scss",
    "content": "page-item-detail {\n  .item-profile {\n    width: 100%;\n    background-position: center center;\n    background-size: cover;\n    height: 250px;\n  }\n\n  .item-detail {\n    width: 100%;\n    background: white;\n    position: absolute;\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/item-detail/item-detail.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonicPage, NavController, NavParams } from 'ionic-angular';\n\nimport { Items } from '../../providers';\n\n@IonicPage()\n@Component({\n  selector: 'page-item-detail',\n  templateUrl: 'item-detail.html'\n})\nexport class ItemDetailPage {\n  item: any;\n\n  constructor(public navCtrl: NavController, navParams: NavParams, items: Items) {\n    this.item = navParams.get('item') || items.defaultItem;\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/list-master/README.md",
    "content": "# List Master\n\nThe List Master Page shows the details of instances of `Item`, and will most commonly be navigated to from `ListMasterPage`.\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/list-master/list-master.html",
    "content": "<ion-header>\n\n  <ion-navbar>\n    <ion-title>{{ 'LIST_MASTER_TITLE' | translate }}</ion-title>\n\n    <ion-buttons end>\n      <button ion-button icon-only (click)=\"addItem()\">\n        <ion-icon name=\"add\"></ion-icon>\n      </button>\n    </ion-buttons>\n  </ion-navbar>\n\n</ion-header>\n\n<ion-content>\n\n  <ion-list>\n    <ion-item-sliding *ngFor=\"let item of currentItems\">\n      <button ion-item (click)=\"openItem(item)\">\n        <ion-avatar item-start>\n          <img [src]=\"item.profilePic\" />\n        </ion-avatar>\n        <h2>{{item.name}}</h2>\n        <p>{{item.about}}</p>\n        <ion-note item-end *ngIf=\"item.note\">{{item.note}}</ion-note>\n      </button>\n\n      <ion-item-options>\n        <button ion-button color=\"danger\" (click)=\"deleteItem(item)\">\n          {{ 'DELETE_BUTTON' | translate }}\n        </button>\n      </ion-item-options>\n    </ion-item-sliding>\n  </ion-list>\n</ion-content>"
  },
  {
    "path": "ionic-angular/official/super/src/pages/list-master/list-master.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { IonicPageModule } from 'ionic-angular';\n\nimport { ListMasterPage } from './list-master';\n\n@NgModule({\n  declarations: [\n    ListMasterPage,\n  ],\n  imports: [\n    IonicPageModule.forChild(ListMasterPage),\n    TranslateModule.forChild()\n  ],\n  exports: [\n    ListMasterPage\n  ]\n})\nexport class ListMasterPageModule { }\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/list-master/list-master.scss",
    "content": "page-list-master {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/list-master/list-master.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonicPage, ModalController, NavController } from 'ionic-angular';\n\nimport { Item } from '../../models/item';\nimport { Items } from '../../providers';\n\n@IonicPage()\n@Component({\n  selector: 'page-list-master',\n  templateUrl: 'list-master.html'\n})\nexport class ListMasterPage {\n  currentItems: Item[];\n\n  constructor(public navCtrl: NavController, public items: Items, public modalCtrl: ModalController) {\n    this.currentItems = this.items.query();\n  }\n\n  /**\n   * The view loaded, let's query our items for the list\n   */\n  ionViewDidLoad() {\n  }\n\n  /**\n   * Prompt the user to add a new item. This shows our ItemCreatePage in a\n   * modal and then adds the new item to our data source if the user created one.\n   */\n  addItem() {\n    let addModal = this.modalCtrl.create('ItemCreatePage');\n    addModal.onDidDismiss(item => {\n      if (item) {\n        this.items.add(item);\n      }\n    })\n    addModal.present();\n  }\n\n  /**\n   * Delete an item from the list of items.\n   */\n  deleteItem(item) {\n    this.items.delete(item);\n  }\n\n  /**\n   * Navigate to the detail page for this item.\n   */\n  openItem(item: Item) {\n    this.navCtrl.push('ItemDetailPage', {\n      item: item\n    });\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/login/README.md",
    "content": "# Login\n\nThe Login page renders a login form with email/password by default and an optional username field.\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/login/login.html",
    "content": "<ion-header>\n\n  <ion-navbar>\n    <ion-title>{{ 'LOGIN_TITLE' | translate }}</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content>\n  <form (submit)=\"doLogin()\">\n    <ion-list>\n\n      <ion-item>\n        <ion-label fixed>{{ 'EMAIL' | translate }}</ion-label>\n        <ion-input type=\"email\" [(ngModel)]=\"account.email\" name=\"email\"></ion-input>\n      </ion-item>\n\n      <!--\n      Want to use a Username instead of an Email? Here you go:\n\n      <ion-item>\n        <ion-label floating>{{ 'USERNAME' | translate }}</ion-label>\n        <ion-input type=\"text\" [(ngModel)]=\"account.username\" name=\"username\"></ion-input>\n      </ion-item>\n      -->\n\n      <ion-item>\n        <ion-label fixed>{{ 'PASSWORD' | translate }}</ion-label>\n        <ion-input type=\"password\" [(ngModel)]=\"account.password\" name=\"password\"></ion-input>\n      </ion-item>\n\n      <div padding>\n        <button ion-button color=\"primary\" block>{{ 'LOGIN_BUTTON' | translate }}</button>\n      </div>\n\n    </ion-list>\n  </form>\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/login/login.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { IonicPageModule } from 'ionic-angular';\n\nimport { LoginPage } from './login';\n\n@NgModule({\n  declarations: [\n    LoginPage,\n  ],\n  imports: [\n    IonicPageModule.forChild(LoginPage),\n    TranslateModule.forChild()\n  ],\n  exports: [\n    LoginPage\n  ]\n})\nexport class LoginPageModule { }\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/login/login.scss",
    "content": "page-login {\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/login/login.ts",
    "content": "import { Component } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { IonicPage, NavController, ToastController } from 'ionic-angular';\n\nimport { User } from '../../providers';\nimport { MainPage } from '../';\n\n@IonicPage()\n@Component({\n  selector: 'page-login',\n  templateUrl: 'login.html'\n})\nexport class LoginPage {\n  // The account fields for the login form.\n  // If you're using the username field with or without email, make\n  // sure to add it to the type\n  account: { email: string, password: string } = {\n    email: 'test@example.com',\n    password: 'test'\n  };\n\n  // Our translated text strings\n  private loginErrorString: string;\n\n  constructor(public navCtrl: NavController,\n    public user: User,\n    public toastCtrl: ToastController,\n    public translateService: TranslateService) {\n\n    this.translateService.get('LOGIN_ERROR').subscribe((value) => {\n      this.loginErrorString = value;\n    })\n  }\n\n  // Attempt to login in through our User service\n  doLogin() {\n    this.user.login(this.account).subscribe((resp) => {\n      this.navCtrl.push(MainPage);\n    }, (err) => {\n      this.navCtrl.push(MainPage);\n      // Unable to log in\n      let toast = this.toastCtrl.create({\n        message: this.loginErrorString,\n        duration: 3000,\n        position: 'top'\n      });\n      toast.present();\n    });\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/menu/README.md",
    "content": "# Menu\n\nThe Menu page renders a side menu UI.\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/menu/menu.html",
    "content": "<ion-menu [content]=\"content\" type=\"overlay\">\n  <ion-content>\n    <ion-list>\n      <button menuClose ion-item *ngFor=\"let p of pages\" (click)=\"openPage(p)\">\n        {{p.title}}\n      </button>\n    </ion-list>\n  </ion-content>\n</ion-menu>\n\n<ion-nav #content [root]=\"rootPage\"></ion-nav>"
  },
  {
    "path": "ionic-angular/official/super/src/pages/menu/menu.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { IonicPageModule } from 'ionic-angular';\n\nimport { MenuPage } from './menu';\n\n@NgModule({\n  declarations: [\n    MenuPage,\n  ],\n  imports: [\n    IonicPageModule.forChild(MenuPage),\n    TranslateModule.forChild()\n  ],\n  exports: [\n    MenuPage\n  ]\n})\nexport class MenuPageModule { }\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/menu/menu.scss",
    "content": "page-menu {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/menu/menu.ts",
    "content": "import { Component, ViewChild } from '@angular/core';\nimport { IonicPage, Nav, NavController } from 'ionic-angular';\n\ninterface PageItem {\n  title: string\n  component: any\n}\ntype PageList = PageItem[]\n\n@IonicPage()\n@Component({\n  selector: 'page-menu',\n  templateUrl: 'menu.html'\n})\nexport class MenuPage {\n  // A reference to the ion-nav in our component\n  @ViewChild(Nav) nav: Nav;\n\n  rootPage: any = 'ContentPage';\n\n  pages: PageList;\n\n  constructor(public navCtrl: NavController) {\n    // used for an example of ngFor and navigation\n    this.pages = [\n      { title: 'Sign in', component: 'LoginPage' },\n      { title: 'Signup', component: 'SignupPage' }\n    ];\n  }\n\n  ionViewDidLoad() {\n    console.log('Hello MenuPage Page');\n  }\n\n  openPage(page: PageItem) {\n    // Reset the content nav to have just this page\n    // we wouldn't want the back button to show in this scenario\n    this.nav.setRoot(page.component);\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/search/README.md",
    "content": "# Search\n\nThe Search page shows a search box and list view for searching instances of `Item`.\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/search/search.html",
    "content": "<ion-header>\n\n  <ion-navbar>\n    <ion-title>{{ 'SEARCH_TITLE' | translate }}</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content>\n  <ion-searchbar (ionInput)=\"getItems($event)\" placeholder=\"{{ 'SEARCH_PLACEHOLDER' | translate }}\"></ion-searchbar>\n  <ion-list>\n    <button ion-item (click)=\"openItem(item)\" *ngFor=\"let item of currentItems\">\n      <ion-avatar item-start>\n        <img [src]=\"item.profilePic\" />\n      </ion-avatar>\n      <h2>{{item.name}}</h2>\n      <p>{{item.about}}</p>\n      <ion-note item-end *ngIf=\"item.note\">{{item.note}}</ion-note>\n    </button>\n  </ion-list>\n</ion-content>"
  },
  {
    "path": "ionic-angular/official/super/src/pages/search/search.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { IonicPageModule } from 'ionic-angular';\n\nimport { SearchPage } from './search';\n\n@NgModule({\n  declarations: [\n    SearchPage,\n  ],\n  imports: [\n    IonicPageModule.forChild(SearchPage),\n    TranslateModule.forChild()\n  ],\n  exports: [\n    SearchPage\n  ]\n})\nexport class SearchPageModule { }\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/search/search.scss",
    "content": "page-search {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/search/search.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonicPage, NavController, NavParams } from 'ionic-angular';\n\nimport { Item } from '../../models/item';\nimport { Items } from '../../providers';\n\n@IonicPage()\n@Component({\n  selector: 'page-search',\n  templateUrl: 'search.html'\n})\nexport class SearchPage {\n\n  currentItems: any = [];\n\n  constructor(public navCtrl: NavController, public navParams: NavParams, public items: Items) { }\n\n  /**\n   * Perform a service for the proper items.\n   */\n  getItems(ev) {\n    let val = ev.target.value;\n    if (!val || !val.trim()) {\n      this.currentItems = [];\n      return;\n    }\n    this.currentItems = this.items.query({\n      name: val\n    });\n  }\n\n  /**\n   * Navigate to the detail page for this item.\n   */\n  openItem(item: Item) {\n    this.navCtrl.push('ItemDetailPage', {\n      item: item\n    });\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/settings/README.md",
    "content": "# Settings\n\nThe Settings page shows a settings form that is configurable, along with features for nested options where the user navigates to sub options while still using the same Settings page code.\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/settings/settings.html",
    "content": "<ion-header>\n\n  <ion-navbar>\n    <ion-title>{{ pageTitle }}</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n<ion-content>\n\n  <form [formGroup]=\"form\" *ngIf=\"settingsReady\">\n    <ion-list *ngIf=\"page == 'main'\">\n      <ion-item>\n        <ion-label>{{ 'SETTINGS_OPTION1' | translate }}</ion-label>\n        <ion-toggle formControlName=\"option1\"></ion-toggle>\n      </ion-item>\n\n      <ion-item>\n        <ion-label>{{ 'SETTINGS_OPTION2' | translate }}</ion-label>\n        <ion-input formControlName=\"option2\"></ion-input>\n      </ion-item>\n\n      <ion-item>\n        <ion-label>{{ 'SETTINGS_OPTION3' | translate }}</ion-label>\n        <ion-select formControlName=\"option3\">\n          <ion-option value=\"1\" checked=\"true\">1</ion-option>\n          <ion-option value=\"2\">2</ion-option>\n          <ion-option value=\"3\">3</ion-option>\n        </ion-select>\n      </ion-item>\n\n      <button ion-item [navPush]=\"subSettings\" [navParams]=\"profileSettings\">\n        {{ 'SETTINGS_PROFILE_BUTTON' | translate }}\n      </button>\n    </ion-list>\n\n    <ion-list *ngIf=\"page == 'profile'\">\n      <ion-item>\n        <ion-label>{{ 'SETTINGS_OPTION4' | translate }}</ion-label>\n        <ion-input formControlName=\"option4\"></ion-input>\n      </ion-item>\n    </ion-list>\n  </form>\n\n</ion-content>"
  },
  {
    "path": "ionic-angular/official/super/src/pages/settings/settings.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { IonicPageModule } from 'ionic-angular';\n\nimport { SettingsPage } from './settings';\n\n@NgModule({\n  declarations: [\n    SettingsPage,\n  ],\n  imports: [\n    IonicPageModule.forChild(SettingsPage),\n    TranslateModule.forChild()\n  ],\n  exports: [\n    SettingsPage\n  ]\n})\nexport class SettingsPageModule { }\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/settings/settings.scss",
    "content": "page-settings {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/settings/settings.ts",
    "content": "import { Component } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { TranslateService } from '@ngx-translate/core';\nimport { IonicPage, NavController, NavParams } from 'ionic-angular';\n\nimport { Settings } from '../../providers';\n\n/**\n * The Settings page is a simple form that syncs with a Settings provider\n * to enable the user to customize settings for the app.\n *\n */\n@IonicPage()\n@Component({\n  selector: 'page-settings',\n  templateUrl: 'settings.html'\n})\nexport class SettingsPage {\n  // Our local settings object\n  options: any;\n\n  settingsReady = false;\n\n  form: FormGroup;\n\n  profileSettings = {\n    page: 'profile',\n    pageTitleKey: 'SETTINGS_PAGE_PROFILE'\n  };\n\n  page: string = 'main';\n  pageTitleKey: string = 'SETTINGS_TITLE';\n  pageTitle: string;\n\n  subSettings: any = SettingsPage;\n\n  constructor(public navCtrl: NavController,\n    public settings: Settings,\n    public formBuilder: FormBuilder,\n    public navParams: NavParams,\n    public translate: TranslateService) {\n  }\n\n  _buildForm() {\n    let group: any = {\n      option1: [this.options.option1],\n      option2: [this.options.option2],\n      option3: [this.options.option3]\n    };\n\n    switch (this.page) {\n      case 'main':\n        break;\n      case 'profile':\n        group = {\n          option4: [this.options.option4]\n        };\n        break;\n    }\n    this.form = this.formBuilder.group(group);\n\n    // Watch the form for changes, and\n    this.form.valueChanges.subscribe((v) => {\n      this.settings.merge(this.form.value);\n    });\n  }\n\n  ionViewDidLoad() {\n    // Build an empty form for the template to render\n    this.form = this.formBuilder.group({});\n  }\n\n  ionViewWillEnter() {\n    // Build an empty form for the template to render\n    this.form = this.formBuilder.group({});\n\n    this.page = this.navParams.get('page') || this.page;\n    this.pageTitleKey = this.navParams.get('pageTitleKey') || this.pageTitleKey;\n\n    this.translate.get(this.pageTitleKey).subscribe((res) => {\n      this.pageTitle = res;\n    })\n\n    this.settings.load().then(() => {\n      this.settingsReady = true;\n      this.options = this.settings.allSettings;\n\n      this._buildForm();\n    });\n  }\n\n  ngOnChanges() {\n    console.log('Ng All Changes');\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/signup/README.md",
    "content": "# Signup\n\nThe Signup page renders a signup form with email/password by default and an optional username field.\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/signup/signup.html",
    "content": "<ion-header>\n\n  <ion-navbar>\n    <ion-title>{{ 'SIGNUP_TITLE' | translate }}</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content>\n  <form (submit)=\"doSignup()\">\n    <ion-list>\n\n      <ion-item>\n        <ion-label fixed>{{ 'NAME' | translate }}</ion-label>\n        <ion-input type=\"text\" [(ngModel)]=\"account.name\" name=\"name\"></ion-input>\n      </ion-item>\n\n      <ion-item>\n        <ion-label fixed>{{ 'EMAIL' | translate }}</ion-label>\n        <ion-input type=\"email\" [(ngModel)]=\"account.email\" name=\"email\"></ion-input>\n      </ion-item>\n\n      <!--\n      Want to add a Username? Here you go:\n\n      <ion-item>\n        <ion-label floating>Username</ion-label>\n        <ion-input type=\"text\" [(ngModel)]=\"account.username\" name=\"username\"></ion-input>\n      </ion-item>\n      -->\n\n      <ion-item>\n        <ion-label fixed>{{ 'PASSWORD' | translate }}</ion-label>\n        <ion-input type=\"password\" [(ngModel)]=\"account.password\" name=\"password\"></ion-input>\n      </ion-item>\n\n      <div padding>\n        <button ion-button color=\"primary\" block>{{ 'SIGNUP_BUTTON' | translate }}</button>\n      </div>\n\n    </ion-list>\n  </form>\n</ion-content>"
  },
  {
    "path": "ionic-angular/official/super/src/pages/signup/signup.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { IonicPageModule } from 'ionic-angular';\n\nimport { SignupPage } from './signup';\n\n@NgModule({\n  declarations: [\n    SignupPage,\n  ],\n  imports: [\n    IonicPageModule.forChild(SignupPage),\n    TranslateModule.forChild()\n  ],\n  exports: [\n    SignupPage\n  ]\n})\nexport class SignupPageModule { }\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/signup/signup.scss",
    "content": "page-signup {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/signup/signup.ts",
    "content": "import { Component } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { IonicPage, NavController, ToastController } from 'ionic-angular';\n\nimport { User } from '../../providers';\nimport { MainPage } from '../';\n\n@IonicPage()\n@Component({\n  selector: 'page-signup',\n  templateUrl: 'signup.html'\n})\nexport class SignupPage {\n  // The account fields for the login form.\n  // If you're using the username field with or without email, make\n  // sure to add it to the type\n  account: { name: string, email: string, password: string } = {\n    name: 'Test Human',\n    email: 'test@example.com',\n    password: 'test'\n  };\n\n  // Our translated text strings\n  private signupErrorString: string;\n\n  constructor(public navCtrl: NavController,\n    public user: User,\n    public toastCtrl: ToastController,\n    public translateService: TranslateService) {\n\n    this.translateService.get('SIGNUP_ERROR').subscribe((value) => {\n      this.signupErrorString = value;\n    })\n  }\n\n  doSignup() {\n    // Attempt to login in through our User service\n    this.user.signup(this.account).subscribe((resp) => {\n      this.navCtrl.push(MainPage);\n    }, (err) => {\n\n      this.navCtrl.push(MainPage);\n\n      // Unable to sign up\n      let toast = this.toastCtrl.create({\n        message: this.signupErrorString,\n        duration: 3000,\n        position: 'top'\n      });\n      toast.present();\n    });\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/tabs/README.md",
    "content": "# Tabs\n\nTabs is a common tabbed layout.\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/tabs/tabs.html",
    "content": "<ion-tabs>\n  <ion-tab [root]=\"tab1Root\" [tabTitle]=\"tab1Title\" tabIcon=\"home\"></ion-tab>\n  <ion-tab [root]=\"tab2Root\" [tabTitle]=\"tab2Title\" tabIcon=\"search\"></ion-tab>\n  <ion-tab [root]=\"tab3Root\" [tabTitle]=\"tab3Title\" tabIcon=\"cog\"></ion-tab>\n</ion-tabs>"
  },
  {
    "path": "ionic-angular/official/super/src/pages/tabs/tabs.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { IonicPageModule } from 'ionic-angular';\n\nimport { TabsPage } from './tabs';\n\n@NgModule({\n  declarations: [\n    TabsPage,\n  ],\n  imports: [\n    IonicPageModule.forChild(TabsPage),\n    TranslateModule.forChild()\n  ],\n  exports: [\n    TabsPage\n  ]\n})\nexport class TabsPageModule { }\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/tabs/tabs.scss",
    "content": "page-tabs {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/tabs/tabs.ts",
    "content": "import { Component } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { IonicPage, NavController } from 'ionic-angular';\n\nimport { Tab1Root, Tab2Root, Tab3Root } from '../';\n\n@IonicPage()\n@Component({\n  selector: 'page-tabs',\n  templateUrl: 'tabs.html'\n})\nexport class TabsPage {\n  tab1Root: any = Tab1Root;\n  tab2Root: any = Tab2Root;\n  tab3Root: any = Tab3Root;\n\n  tab1Title = \" \";\n  tab2Title = \" \";\n  tab3Title = \" \";\n\n  constructor(public navCtrl: NavController, public translateService: TranslateService) {\n    translateService.get(['TAB1_TITLE', 'TAB2_TITLE', 'TAB3_TITLE']).subscribe(values => {\n      this.tab1Title = values['TAB1_TITLE'];\n      this.tab2Title = values['TAB2_TITLE'];\n      this.tab3Title = values['TAB3_TITLE'];\n    });\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/tutorial/README.md",
    "content": "# Tutorial\n\nThe Tutorial page renders a Slides component that lets you swipe through different sections or skip it alltogether.\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/tutorial/tutorial.html",
    "content": "<ion-header no-shadow>\n  <ion-navbar>\n    <ion-buttons end *ngIf=\"showSkip\">\n      <button ion-button (click)=\"startApp()\" color=\"primary\">{{ 'TUTORIAL_SKIP_BUTTON' | translate}}</button>\n    </ion-buttons>\n  </ion-navbar>\n</ion-header>\n\n<ion-content no-bounce>\n  <ion-slides pager=\"true\" dir=\"{{dir}}\" (ionSlideWillChange)=\"onSlideChangeStart($event)\">\n    <ion-slide *ngFor=\"let slide of slides\">\n      <img [src]=\"slide.image\" class=\"slide-image\" />\n      <h2 class=\"slide-title\" [innerHTML]=\"slide.title\"></h2>\n      <p [innerHTML]=\"slide.description\"></p>\n    </ion-slide>\n    <ion-slide>\n      <img src=\"assets/img/ica-slidebox-img-4.png\" class=\"slide-image\" />\n      <h2 class=\"slide-title\">{{ 'TUTORIAL_SLIDE4_TITLE' | translate }}</h2>\n      <button ion-button icon-end large clear (click)=\"startApp()\">\n        {{ 'TUTORIAL_CONTINUE_BUTTON' | translate }}\n        <ion-icon name=\"arrow-forward\"></ion-icon>\n      </button>\n    </ion-slide>\n  </ion-slides>\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/tutorial/tutorial.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { IonicPageModule } from 'ionic-angular';\nimport { TutorialPage } from './tutorial';\nimport { TranslateModule } from '@ngx-translate/core';\n\n@NgModule({\n  declarations: [\n    TutorialPage,\n  ],\n  imports: [\n    IonicPageModule.forChild(TutorialPage),\n    TranslateModule.forChild()\n  ],\n  exports: [\n    TutorialPage\n  ]\n})\nexport class TutorialPageModule { }\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/tutorial/tutorial.scss",
    "content": "page-tutorial {\n  .toolbar-background {\n    background: transparent;\n    border-color: transparent;\n  }\n\n  .slide-zoom {\n    height: 100%;\n  }\n\n  .slide-title {\n    margin-top: 2.8rem;\n  }\n\n  .slide-image {\n    max-height: 40%;\n    max-width: 60%;\n    margin: 36px 0;\n  }\n\n  b {\n    font-weight: 500;\n  }\n\n  p {\n    padding: 0 40px;\n    font-size: 14px;\n    line-height: 1.5;\n    color: #60646B;\n\n    b {\n      color: #000000;\n    }\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/tutorial/tutorial.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonicPage, MenuController, NavController, Platform } from 'ionic-angular';\n\nimport { TranslateService } from '@ngx-translate/core';\n\nexport interface Slide {\n  title: string;\n  description: string;\n  image: string;\n}\n\n@IonicPage()\n@Component({\n  selector: 'page-tutorial',\n  templateUrl: 'tutorial.html'\n})\nexport class TutorialPage {\n  slides: Slide[];\n  showSkip = true;\n  dir: string = 'ltr';\n\n  constructor(public navCtrl: NavController, public menu: MenuController, translate: TranslateService, public platform: Platform) {\n    this.dir = platform.dir();\n    translate.get([\"TUTORIAL_SLIDE1_TITLE\",\n      \"TUTORIAL_SLIDE1_DESCRIPTION\",\n      \"TUTORIAL_SLIDE2_TITLE\",\n      \"TUTORIAL_SLIDE2_DESCRIPTION\",\n      \"TUTORIAL_SLIDE3_TITLE\",\n      \"TUTORIAL_SLIDE3_DESCRIPTION\",\n    ]).subscribe(\n      (values) => {\n        console.log('Loaded values', values);\n        this.slides = [\n          {\n            title: values.TUTORIAL_SLIDE1_TITLE,\n            description: values.TUTORIAL_SLIDE1_DESCRIPTION,\n            image: 'assets/img/ica-slidebox-img-1.png',\n          },\n          {\n            title: values.TUTORIAL_SLIDE2_TITLE,\n            description: values.TUTORIAL_SLIDE2_DESCRIPTION,\n            image: 'assets/img/ica-slidebox-img-2.png',\n          },\n          {\n            title: values.TUTORIAL_SLIDE3_TITLE,\n            description: values.TUTORIAL_SLIDE3_DESCRIPTION,\n            image: 'assets/img/ica-slidebox-img-3.png',\n          }\n        ];\n      });\n  }\n\n  startApp() {\n    this.navCtrl.setRoot('WelcomePage', {}, {\n      animate: true,\n      direction: 'forward'\n    });\n  }\n\n  onSlideChangeStart(slider) {\n    this.showSkip = !slider.isEnd();\n  }\n\n  ionViewDidEnter() {\n    // the root left menu should be disabled on the tutorial page\n    this.menu.enable(false);\n  }\n\n  ionViewWillLeave() {\n    // enable the root left menu when leaving the tutorial page\n    this.menu.enable(true);\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/welcome/README.md",
    "content": "# Welcome\n\nWelcome is a splash screen that displays some info about the app and directs the user to log in our create an account.\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/welcome/welcome.html",
    "content": "<ion-content scroll=\"false\">\n  <div class=\"splash-bg\"></div>\n  <div class=\"splash-info\">\n    <div class=\"splash-logo\"></div>\n    <div class=\"splash-intro\">\n      {{ 'WELCOME_INTRO' | translate }}\n    </div>\n  </div>\n  <div padding>\n    <button ion-button block (click)=\"signup()\">{{ 'SIGNUP' | translate }}</button>\n    <button ion-button block (click)=\"login()\" class=\"login\">{{ 'LOGIN' | translate }}</button>\n  </div>\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/welcome/welcome.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { IonicPageModule } from 'ionic-angular';\n\nimport { WelcomePage } from './welcome';\n\n@NgModule({\n  declarations: [\n    WelcomePage,\n  ],\n  imports: [\n    IonicPageModule.forChild(WelcomePage),\n    TranslateModule.forChild()\n  ],\n  exports: [\n    WelcomePage\n  ]\n})\nexport class WelcomePageModule { }\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/welcome/welcome.scss",
    "content": "page-welcome {\n  .splash-bg {\n    position: relative;\n    background: url('../assets/img/splashbg.png') no-repeat transparent;\n    background-size: cover;\n    height: 45%;\n    z-index: 1;\n    background-repeat: repeat-x;\n    animation: animatedBackground 40s linear infinite;\n  }\n\n  @keyframes animatedBackground {\n    from { background-position: 0 0; }\n    to { background-position: 100% 0; }\n  }\n\n  .splash-info {\n    position: relative;\n    z-index: 2;\n    margin-top: -64px;\n    text-align: center;\n  }\n  .splash-logo {\n    margin: auto;\n    background: url('../assets/img/appicon.png') repeat transparent;\n    background-size: 100%;\n    width: 128px;\n    height: 128px;\n  }\n  .splash-intro {\n    font-size: 18px;\n    font-weight: bold;\n    max-width: 80%;\n    margin: auto;\n  }\n  button.login {\n    margin-top: 25px;\n    background-color: white;\n    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);\n    color: #333;\n\n    &.activated {\n      background-color: rgb(220, 220, 220);\n    }\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/pages/welcome/welcome.ts",
    "content": "import { Component } from '@angular/core';\nimport { IonicPage, NavController } from 'ionic-angular';\n\n/**\n * The Welcome Page is a splash page that quickly describes the app,\n * and then directs the user to create an account or log in.\n * If you'd like to immediately put the user onto a login/signup page,\n * we recommend not using the Welcome page.\n*/\n@IonicPage()\n@Component({\n  selector: 'page-welcome',\n  templateUrl: 'welcome.html'\n})\nexport class WelcomePage {\n\n  constructor(public navCtrl: NavController) { }\n\n  login() {\n    this.navCtrl.push('LoginPage');\n  }\n\n  signup() {\n    this.navCtrl.push('SignupPage');\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/providers/api/api.ts",
    "content": "import { HttpClient, HttpParams } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\n/**\n * Api is a generic REST Api handler. Set your API url first.\n */\n@Injectable()\nexport class Api {\n  url: string = 'https://example.com/api/v1';\n\n  constructor(public http: HttpClient) {\n  }\n\n  get(endpoint: string, params?: any, reqOpts?: any) {\n    if (!reqOpts) {\n      reqOpts = {\n        params: new HttpParams()\n      };\n    }\n\n    // Support easy query params for GET requests\n    if (params) {\n      reqOpts.params = new HttpParams();\n      for (let k in params) {\n        reqOpts.params = reqOpts.params.set(k, params[k]);\n      }\n    }\n\n    return this.http.get(this.url + '/' + endpoint, reqOpts);\n  }\n\n  post(endpoint: string, body: any, reqOpts?: any) {\n    return this.http.post(this.url + '/' + endpoint, body, reqOpts);\n  }\n\n  put(endpoint: string, body: any, reqOpts?: any) {\n    return this.http.put(this.url + '/' + endpoint, body, reqOpts);\n  }\n\n  delete(endpoint: string, reqOpts?: any) {\n    return this.http.delete(this.url + '/' + endpoint, reqOpts);\n  }\n\n  patch(endpoint: string, body: any, reqOpts?: any) {\n    return this.http.patch(this.url + '/' + endpoint, body, reqOpts);\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/providers/index.ts",
    "content": "export { Api } from './api/api';\nexport { Items } from '../mocks/providers/items';\nexport { Settings } from './settings/settings';\nexport { User } from './user/user';\n"
  },
  {
    "path": "ionic-angular/official/super/src/providers/items/items.ts",
    "content": "import { Injectable } from '@angular/core';\n\nimport { Item } from '../../models/item';\nimport { Api } from '../api/api';\n\n@Injectable()\nexport class Items {\n\n  constructor(public api: Api) { }\n\n  query(params?: any) {\n    return this.api.get('/items', params);\n  }\n\n  add(item: Item) {\n  }\n\n  delete(item: Item) {\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/providers/settings/settings.ts",
    "content": "import { Injectable } from '@angular/core';\nimport { Storage } from '@ionic/storage';\n\n/**\n * A simple settings/config class for storing key/value pairs with persistence.\n */\n@Injectable()\nexport class Settings {\n  private SETTINGS_KEY: string = '_settings';\n\n  settings: any;\n\n  _defaults: any;\n  _readyPromise: Promise<any>;\n\n  constructor(public storage: Storage, defaults: any) {\n    this._defaults = defaults;\n  }\n\n  load() {\n    return this.storage.get(this.SETTINGS_KEY).then((value) => {\n      if (value) {\n        this.settings = value;\n        return this._mergeDefaults(this._defaults);\n      } else {\n        return this.setAll(this._defaults).then((val) => {\n          this.settings = val;\n        })\n      }\n    });\n  }\n\n  _mergeDefaults(defaults: any) {\n    for (let k in defaults) {\n      if (!(k in this.settings)) {\n        this.settings[k] = defaults[k];\n      }\n    }\n    return this.setAll(this.settings);\n  }\n\n  merge(settings: any) {\n    for (let k in settings) {\n      this.settings[k] = settings[k];\n    }\n    return this.save();\n  }\n\n  setValue(key: string, value: any) {\n    this.settings[key] = value;\n    return this.storage.set(this.SETTINGS_KEY, this.settings);\n  }\n\n  setAll(value: any) {\n    return this.storage.set(this.SETTINGS_KEY, value);\n  }\n\n  getValue(key: string) {\n    return this.storage.get(this.SETTINGS_KEY)\n      .then(settings => {\n        return settings[key];\n      });\n  }\n\n  save() {\n    return this.setAll(this.settings);\n  }\n\n  get allSettings() {\n    return this.settings;\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/providers/user/user.ts",
    "content": "import 'rxjs/add/operator/toPromise';\n\nimport { Injectable } from '@angular/core';\n\nimport { Api } from '../api/api';\n\n/**\n * Most apps have the concept of a User. This is a simple provider\n * with stubs for login/signup/etc.\n *\n * This User provider makes calls to our API at the `login` and `signup` endpoints.\n *\n * By default, it expects `login` and `signup` to return a JSON object of the shape:\n *\n * ```json\n * {\n *   status: 'success',\n *   user: {\n *     // User fields your app needs, like \"id\", \"name\", \"email\", etc.\n *   }\n * }Ø\n * ```\n *\n * If the `status` field is not `success`, then an error is detected and returned.\n */\n@Injectable()\nexport class User {\n  _user: any;\n\n  constructor(public api: Api) { }\n\n  /**\n   * Send a POST request to our login endpoint with the data\n   * the user entered on the form.\n   */\n  login(accountInfo: any) {\n    let seq = this.api.post('login', accountInfo).share();\n\n    seq.subscribe((res: any) => {\n      // If the API returned a successful response, mark the user as logged in\n      if (res.status == 'success') {\n        this._loggedIn(res);\n      } else {\n      }\n    }, err => {\n      console.error('ERROR', err);\n    });\n\n    return seq;\n  }\n\n  /**\n   * Send a POST request to our signup endpoint with the data\n   * the user entered on the form.\n   */\n  signup(accountInfo: any) {\n    let seq = this.api.post('signup', accountInfo).share();\n\n    seq.subscribe((res: any) => {\n      // If the API returned a successful response, mark the user as logged in\n      if (res.status == 'success') {\n        this._loggedIn(res);\n      }\n    }, err => {\n      console.error('ERROR', err);\n    });\n\n    return seq;\n  }\n\n  /**\n   * Log the user out, which forgets the session\n   */\n  logout() {\n    this._user = null;\n  }\n\n  /**\n   * Process a login/signup response to store user data\n   */\n  _loggedIn(resp) {\n    this._user = resp.user;\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/super/src/theme/variables.scss",
    "content": "// Ionic Variables and Theming. For more info, please see:\n// https://ionicframework.com/docs/v2/theming/\n$font-path: \"../assets/fonts\";\n\n@import \"ionic.globals\";\n\n\n// Shared Variables\n// --------------------------------------------------\n// To customize the look and feel of this app, you can override\n// the Sass variables found in Ionic's source scss files.\n// To view all the possible Ionic variables, see:\n// https://ionicframework.com/docs/v2/theming/overriding-ionic-variables/\n\n$text-color:        #000;\n$background-color:  #fff;\n\n\n// Named Color Variables\n// --------------------------------------------------\n// Named colors makes it easy to reuse colors on various components.\n// It's highly recommended to change the default colors\n// to match your app's branding. Ionic uses a Sass map of\n// colors so you can add, rename and remove colors as needed.\n// The \"primary\" color is the only required color in the map.\n\n$colors: (\n  primary:    #488aff,\n  secondary:  #32db64,\n  danger:     #f53d3d,\n  light:      #f4f4f4,\n  dark:       #222\n);\n\n\n// App iOS Variables\n// --------------------------------------------------\n// iOS only Sass variables can go here\n\n\n\n\n// App Material Design Variables\n// --------------------------------------------------\n// Material Design only Sass variables can go here\n\n\n\n\n// App Windows Variables\n// --------------------------------------------------\n// Windows only Sass variables can go here\n\n\n\n\n// App Theme\n// --------------------------------------------------\n// Ionic apps can have different themes applied, which can\n// then be future customized. This import comes last\n// so that the above variables are used and Ionic's\n// default are overridden.\n\n@import \"ionic.theme.default\";\n\n\n// Ionicons\n// --------------------------------------------------\n// The premium icon font for Ionic. For more info, please see:\n// https://ionicframework.com/docs/v2/ionicons/\n\n@import \"ionic.ionicons\";\n\n\n// Fonts\n// --------------------------------------------------\n\n@import \"roboto\";\n@import \"noto-sans\";\n"
  },
  {
    "path": "ionic-angular/official/super.welcome.js",
    "content": "const chalk = require('chalk');\n\nconst msg = `\nWelcome to the ${chalk.cyan.bold('IONIC SUPER STARTER')}!\n\nThe Super Starter comes packed with ready-to-use page designs for common mobile designs like master detail, login/signup, settings, tutorials, and more. Pick and choose which page types you want to use and remove the ones you don't!\n\nFor more details, please see the project README: ${chalk.bold('https://github.com/ionic-team/starters/blob/master/ionic-angular/official/super/README.md')}\n`.trim()\n\nconsole.log(msg);\n// console.log(JSON.stringify(msg));\n"
  },
  {
    "path": "ionic-angular/official/tabs/ionic.starter.json",
    "content": "{\n  \"name\": \"Tabs Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \".sourcemaps\",\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build\"\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/tabs/src/app/app.component.ts",
    "content": "import { Component } from '@angular/core';\nimport { Platform } from 'ionic-angular';\nimport { StatusBar } from '@ionic-native/status-bar';\nimport { SplashScreen } from '@ionic-native/splash-screen';\n\nimport { TabsPage } from '../pages/tabs/tabs';\n\n@Component({\n  templateUrl: 'app.html'\n})\nexport class MyApp {\n  rootPage:any = TabsPage;\n\n  constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {\n    platform.ready().then(() => {\n      // Okay, so the platform is ready and our plugins are available.\n      // Here you can do any higher level native things you might need.\n      statusBar.styleDefault();\n      splashScreen.hide();\n    });\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/tabs/src/app/app.html",
    "content": "<ion-nav [root]=\"rootPage\"></ion-nav>\n"
  },
  {
    "path": "ionic-angular/official/tabs/src/app/app.module.ts",
    "content": "import { NgModule, ErrorHandler } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';\nimport { MyApp } from './app.component';\n\nimport { AboutPage } from '../pages/about/about';\nimport { ContactPage } from '../pages/contact/contact';\nimport { HomePage } from '../pages/home/home';\nimport { TabsPage } from '../pages/tabs/tabs';\n\nimport { StatusBar } from '@ionic-native/status-bar';\nimport { SplashScreen } from '@ionic-native/splash-screen';\n\n@NgModule({\n  declarations: [\n    MyApp,\n    AboutPage,\n    ContactPage,\n    HomePage,\n    TabsPage\n  ],\n  imports: [\n    BrowserModule,\n    IonicModule.forRoot(MyApp)\n  ],\n  bootstrap: [IonicApp],\n  entryComponents: [\n    MyApp,\n    AboutPage,\n    ContactPage,\n    HomePage,\n    TabsPage\n  ],\n  providers: [\n    StatusBar,\n    SplashScreen,\n    {provide: ErrorHandler, useClass: IonicErrorHandler}\n  ]\n})\nexport class AppModule {}\n"
  },
  {
    "path": "ionic-angular/official/tabs/src/pages/about/about.html",
    "content": "<ion-header>\n  <ion-navbar>\n    <ion-title>\n      About\n    </ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/tabs/src/pages/about/about.scss",
    "content": "page-about {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/tabs/src/pages/about/about.ts",
    "content": "import { Component } from '@angular/core';\nimport { NavController } from 'ionic-angular';\n\n@Component({\n  selector: 'page-about',\n  templateUrl: 'about.html'\n})\nexport class AboutPage {\n\n  constructor(public navCtrl: NavController) {\n\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/tabs/src/pages/contact/contact.html",
    "content": "<ion-header>\n  <ion-navbar>\n    <ion-title>\n      Contact\n    </ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content>\n  <ion-list>\n    <ion-list-header>Follow us on Twitter</ion-list-header>\n    <ion-item>\n      <ion-icon name=\"ionic\" item-start></ion-icon>\n      @ionicframework\n    </ion-item>\n  </ion-list>\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/tabs/src/pages/contact/contact.scss",
    "content": "page-contact {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/tabs/src/pages/contact/contact.ts",
    "content": "import { Component } from '@angular/core';\nimport { NavController } from 'ionic-angular';\n\n@Component({\n  selector: 'page-contact',\n  templateUrl: 'contact.html'\n})\nexport class ContactPage {\n\n  constructor(public navCtrl: NavController) {\n\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/tabs/src/pages/home/home.html",
    "content": "<ion-header>\n  <ion-navbar>\n    <ion-title>Home</ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n  <h2>Welcome to Ionic!</h2>\n  <p>\n    This starter project comes with simple tabs-based layout for apps\n    that are going to primarily use a Tabbed UI.\n  </p>\n  <p>\n    Take a look at the <code>src/pages/</code> directory to add or change tabs,\n    update any existing page or create new pages.\n  </p>\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/tabs/src/pages/home/home.scss",
    "content": "page-home {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/tabs/src/pages/home/home.ts",
    "content": "import { Component } from '@angular/core';\nimport { NavController } from 'ionic-angular';\n\n@Component({\n  selector: 'page-home',\n  templateUrl: 'home.html'\n})\nexport class HomePage {\n\n  constructor(public navCtrl: NavController) {\n\n  }\n\n}\n"
  },
  {
    "path": "ionic-angular/official/tabs/src/pages/tabs/tabs.html",
    "content": "<ion-tabs>\n  <ion-tab [root]=\"tab1Root\" tabTitle=\"Home\" tabIcon=\"home\"></ion-tab>\n  <ion-tab [root]=\"tab2Root\" tabTitle=\"About\" tabIcon=\"information-circle\"></ion-tab>\n  <ion-tab [root]=\"tab3Root\" tabTitle=\"Contact\" tabIcon=\"contacts\"></ion-tab>\n</ion-tabs>\n"
  },
  {
    "path": "ionic-angular/official/tabs/src/pages/tabs/tabs.ts",
    "content": "import { Component } from '@angular/core';\n\nimport { AboutPage } from '../about/about';\nimport { ContactPage } from '../contact/contact';\nimport { HomePage } from '../home/home';\n\n@Component({\n  templateUrl: 'tabs.html'\n})\nexport class TabsPage {\n\n  tab1Root = HomePage;\n  tab2Root = AboutPage;\n  tab3Root = ContactPage;\n\n  constructor() {\n\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/tutorial/ionic.starter.json",
    "content": "{\n  \"name\": \"Tutorial Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \".sourcemaps\",\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build\"\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/tutorial/src/app/app.component.ts",
    "content": "import { Component, ViewChild } from '@angular/core';\n\nimport { Platform, MenuController, Nav } from 'ionic-angular';\n\nimport { HelloIonicPage } from '../pages/hello-ionic/hello-ionic';\nimport { ListPage } from '../pages/list/list';\n\nimport { StatusBar } from '@ionic-native/status-bar';\nimport { SplashScreen } from '@ionic-native/splash-screen';\n\n\n@Component({\n  templateUrl: 'app.html'\n})\nexport class MyApp {\n  @ViewChild(Nav) nav: Nav;\n\n  // make HelloIonicPage the root (or first) page\n  rootPage = HelloIonicPage;\n  pages: Array<{title: string, component: any}>;\n\n  constructor(\n    public platform: Platform,\n    public menu: MenuController,\n    public statusBar: StatusBar,\n    public splashScreen: SplashScreen\n  ) {\n    this.initializeApp();\n\n    // set our app's pages\n    this.pages = [\n      { title: 'Hello Ionic', component: HelloIonicPage },\n      { title: 'My First List', component: ListPage }\n    ];\n  }\n\n  initializeApp() {\n    this.platform.ready().then(() => {\n      // Okay, so the platform is ready and our plugins are available.\n      // Here you can do any higher level native things you might need.\n      this.statusBar.styleDefault();\n      this.splashScreen.hide();\n    });\n  }\n\n  openPage(page) {\n    // close the menu when clicking a link from the menu\n    this.menu.close();\n    // navigate to the new page if it is not the current page\n    this.nav.setRoot(page.component);\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/tutorial/src/app/app.html",
    "content": "<ion-menu [content]=\"content\" type=\"overlay\">\n\n  <ion-header>\n    <ion-toolbar>\n      <ion-title>Pages</ion-title>\n    </ion-toolbar>\n  </ion-header>\n\n  <ion-content>\n    <ion-list>\n      <button ion-item *ngFor=\"let p of pages\" (click)=\"openPage(p)\">\n        {{p.title}}\n      </button>\n    </ion-list>\n  </ion-content>\n\n</ion-menu>\n\n<ion-nav [root]=\"rootPage\" #content swipeBackEnabled=\"false\"></ion-nav>\n"
  },
  {
    "path": "ionic-angular/official/tutorial/src/app/app.module.ts",
    "content": "import { BrowserModule } from '@angular/platform-browser';\nimport { NgModule, ErrorHandler } from '@angular/core';\nimport { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';\nimport { MyApp } from './app.component';\n\nimport { HelloIonicPage } from '../pages/hello-ionic/hello-ionic';\nimport { ItemDetailsPage } from '../pages/item-details/item-details';\nimport { ListPage } from '../pages/list/list';\n\nimport { StatusBar } from '@ionic-native/status-bar';\nimport { SplashScreen } from '@ionic-native/splash-screen';\n\n@NgModule({\n  declarations: [\n    MyApp,\n    HelloIonicPage,\n    ItemDetailsPage,\n    ListPage\n  ],\n  imports: [\n    BrowserModule,\n    IonicModule.forRoot(MyApp),\n  ],\n  bootstrap: [IonicApp],\n  entryComponents: [\n    MyApp,\n    HelloIonicPage,\n    ItemDetailsPage,\n    ListPage\n  ],\n  providers: [\n    StatusBar,\n    SplashScreen,\n    {provide: ErrorHandler, useClass: IonicErrorHandler}\n  ]\n})\nexport class AppModule {}\n"
  },
  {
    "path": "ionic-angular/official/tutorial/src/pages/hello-ionic/hello-ionic.html",
    "content": "<ion-header>\n  <ion-navbar>\n    <button ion-button menuToggle>\n      <ion-icon name=\"menu\"></ion-icon>\n    </button>\n    <ion-title>Hello Ionic</ion-title>\n  </ion-navbar>\n</ion-header>\n\n\n<ion-content padding>\n\n  <h3>Welcome to your first Ionic app!</h3>\n\n  <p>\n    This starter project is our way of helping you get a functional app running in record time.\n  </p>\n  <p>\n    Follow along on the tutorial section of the Ionic docs!\n  </p>\n  <p>\n    <button ion-button color=\"primary\" menuToggle>Toggle Menu</button>\n  </p>\n\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/tutorial/src/pages/hello-ionic/hello-ionic.scss",
    "content": "page-hello-ionic {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/tutorial/src/pages/hello-ionic/hello-ionic.ts",
    "content": "import { Component } from '@angular/core';\n\n@Component({\n  selector: 'page-hello-ionic',\n  templateUrl: 'hello-ionic.html'\n})\nexport class HelloIonicPage {\n  constructor() {\n\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/tutorial/src/pages/item-details/item-details.html",
    "content": "<ion-header>\n  <ion-navbar>\n    <button menuToggle *ngIf=\"!selectedItem\">\n      <ion-icon name=\"menu\"></ion-icon>\n    </button>\n    <ion-title>Item Details</ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content>\n  <h3 text-center *ngIf=\"selectedItem\">\n    {{selectedItem.title}}\n    <ion-icon [name]=\"selectedItem.icon\"></ion-icon>\n  </h3>\n  <h4 text-center *ngIf=\"selectedItem\">\n    You navigated here from <b>{{selectedItem.title}}</b>\n  </h4>\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/tutorial/src/pages/item-details/item-details.scss",
    "content": "page-item-details {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/tutorial/src/pages/item-details/item-details.ts",
    "content": "import { Component } from '@angular/core';\n\nimport { NavController, NavParams } from 'ionic-angular';\n\n\n@Component({\n  selector: 'page-item-details',\n  templateUrl: 'item-details.html'\n})\nexport class ItemDetailsPage {\n  selectedItem: any;\n\n  constructor(public navCtrl: NavController, public navParams: NavParams) {\n    // If we navigated to this page, we will have an item available as a nav param\n    this.selectedItem = navParams.get('item');\n  }\n}\n"
  },
  {
    "path": "ionic-angular/official/tutorial/src/pages/list/list.html",
    "content": "<ion-header>\n  <ion-navbar>\n    <button ion-button menuToggle>\n      <ion-icon name=\"menu\"></ion-icon>\n    </button>\n    <ion-title>My First List</ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content>\n  <ion-list>\n    <button ion-item *ngFor=\"let item of items\" (click)=\"itemTapped($event, item)\">\n      <ion-icon name=\"{{item.icon}}\" item-left></ion-icon>\n      {{item.title}}\n      <div class=\"item-note\" item-right>\n        {{item.note}}\n      </div>\n    </button>\n  </ion-list>\n</ion-content>\n"
  },
  {
    "path": "ionic-angular/official/tutorial/src/pages/list/list.scss",
    "content": "page-list {\n\n}\n"
  },
  {
    "path": "ionic-angular/official/tutorial/src/pages/list/list.ts",
    "content": "import { Component } from '@angular/core';\n\nimport { NavController, NavParams } from 'ionic-angular';\n\nimport { ItemDetailsPage } from '../item-details/item-details';\n\n@Component({\n  selector: 'page-list',\n  templateUrl: 'list.html'\n})\nexport class ListPage {\n  icons: string[];\n  items: Array<{title: string, note: string, icon: string}>;\n\n  constructor(public navCtrl: NavController, public navParams: NavParams) {\n    this.icons = ['flask', 'wifi', 'beer', 'football', 'basketball', 'paper-plane',\n    'american-football', 'boat', 'bluetooth', 'build'];\n\n    this.items = [];\n    for(let i = 1; i < 11; i++) {\n      this.items.push({\n        title: 'Item ' + i,\n        note: 'This is item #' + i,\n        icon: this.icons[Math.floor(Math.random() * this.icons.length)]\n      });\n    }\n  }\n\n  itemTapped(event, item) {\n    this.navCtrl.push(ItemDetailsPage, {\n      item: item\n    });\n  }\n}\n"
  },
  {
    "path": "ionic1/base/.bowerrc",
    "content": "{\n  \"directory\": \"www/lib\"\n}\n"
  },
  {
    "path": "ionic1/base/.editorconfig",
    "content": "# http://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 2\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.md]\ninsert_final_newline = false\ntrim_trailing_whitespace = false"
  },
  {
    "path": "ionic1/base/.gitignore",
    "content": "# Specifies intentionally untracked files to ignore when using Git\n# http://git-scm.com/docs/gitignore\n\n*~\n*.sw[mnpcod]\n.tmp\n*.tmp\n*.tmp.*\n*.sublime-project\n*.sublime-workspace\n.DS_Store\nThumbs.db\nUserInterfaceState.xcuserstate\n$RECYCLE.BIN/\n\n*.log\nlog.txt\nnpm-debug.log*\n\n/.idea\n/.ionic\n/.sass-cache\n/.sourcemaps\n/.versions\n/.vscode\n/coverage\n/dist\n/node_modules\n/platforms\n/plugins\n/www\n"
  },
  {
    "path": "ionic1/base/bower.json",
    "content": "{\n  \"name\": \"HelloIonic\",\n  \"private\": \"true\",\n  \"devDependencies\": {\n    \"ionic\": \"ionic-team/ionic-bower#1.3.4\"\n  }\n}\n"
  },
  {
    "path": "ionic1/base/gulpfile.js",
    "content": "var gulp = require('gulp');\nvar sass = require('gulp-sass');\nvar cleanCss = require('gulp-clean-css');\nvar rename = require('gulp-rename');\n\nvar paths = {\n  sass: ['./scss/**/*.scss']\n};\n\ngulp.task('default', ['sass']);\n\ngulp.task('sass', function(done) {\n  gulp.src('./scss/ionic.app.scss')\n    .pipe(sass())\n    .on('error', sass.logError)\n    .pipe(gulp.dest('./www/css/'))\n    .pipe(cleanCss({\n      keepSpecialComments: 0\n    }))\n    .pipe(rename({ extname: '.min.css' }))\n    .pipe(gulp.dest('./www/css/'))\n    .on('end', done);\n});\n\ngulp.task('watch', ['sass'], function() {\n  gulp.watch(paths.sass, ['sass']);\n});\n"
  },
  {
    "path": "ionic1/base/hooks/README.md",
    "content": "Please read the Cordova [Hooks Guide](https://cordova.apache.org/docs/en/latest/guide/appdev/hooks/) to learn how to hook into Cordova CLI commands.\n"
  },
  {
    "path": "ionic1/base/hooks/after_prepare/010_add_platform_class.js",
    "content": "#!/usr/bin/env node\n\n// Add Platform Class\n// v1.0\n// Automatically adds the platform class to the body tag\n// after the `prepare` command. By placing the platform CSS classes\n// directly in the HTML built for the platform, it speeds up\n// rendering the correct layout/style for the specific platform\n// instead of waiting for the JS to figure out the correct classes.\n\nvar fs = require('fs');\nvar path = require('path');\n\nvar rootdir = process.argv[2];\n\nfunction addPlatformBodyTag(indexPath, platform) {\n  // add the platform class to the body tag\n  try {\n    var platformClass = 'platform-' + platform;\n    var cordovaClass = 'platform-cordova platform-webview';\n\n    var html = fs.readFileSync(indexPath, 'utf8');\n\n    var bodyTag = findBodyTag(html);\n    if(!bodyTag) return; // no opening body tag, something's wrong\n\n    if(bodyTag.indexOf(platformClass) > -1) return; // already added\n\n    var newBodyTag = bodyTag;\n\n    var classAttr = findClassAttr(bodyTag);\n    if(classAttr) {\n      // body tag has existing class attribute, add the classname\n      var endingQuote = classAttr.substring(classAttr.length-1);\n      var newClassAttr = classAttr.substring(0, classAttr.length-1);\n      newClassAttr += ' ' + platformClass + ' ' + cordovaClass + endingQuote;\n      newBodyTag = bodyTag.replace(classAttr, newClassAttr);\n\n    } else {\n      // add class attribute to the body tag\n      newBodyTag = bodyTag.replace('>', ' class=\"' + platformClass + ' ' + cordovaClass + '\">');\n    }\n\n    html = html.replace(bodyTag, newBodyTag);\n\n    fs.writeFileSync(indexPath, html, 'utf8');\n\n    process.stdout.write('add to body class: ' + platformClass + '\\n');\n  } catch(e) {\n    process.stdout.write(e);\n  }\n}\n\nfunction findBodyTag(html) {\n  // get the body tag\n  try{\n    return html.match(/<body(?=[\\s>])(.*?)>/gi)[0];\n  }catch(e){}\n}\n\nfunction findClassAttr(bodyTag) {\n  // get the body tag's class attribute\n  try{\n    return bodyTag.match(/ class=[\"|'](.*?)[\"|']/gi)[0];\n  }catch(e){}\n}\n\nif (rootdir) {\n\n  // go through each of the platform directories that have been prepared\n  var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);\n\n  for(var x=0; x<platforms.length; x++) {\n    // open up the index.html file at the www root\n    try {\n      var platform = platforms[x].trim().toLowerCase();\n      var indexPath;\n\n      if(platform == 'android') {\n        indexPath = path.join('platforms', platform, 'assets', 'www', 'index.html');\n      } else {\n        indexPath = path.join('platforms', platform, 'www', 'index.html');\n      }\n\n      if(fs.existsSync(indexPath)) {\n        addPlatformBodyTag(indexPath, platform);\n      }\n\n    } catch(e) {\n      process.stdout.write(e);\n    }\n  }\n\n}\n"
  },
  {
    "path": "ionic1/base/ionic.config.json",
    "content": "{\n  \"name\": \"ionic-app-base\",\n  \"type\": \"ionic1\",\n  \"integrations\": {},\n  \"watchPatterns\": [\n    \"scss/**/*\",\n    \"www/**/*\",\n    \"!www/lib/**/*\",\n    \"!www/**/*.map\"\n  ]\n}\n"
  },
  {
    "path": "ionic1/base/package.json",
    "content": "{\n  \"name\": \"ionic-project\",\n  \"version\": \"1.1.1\",\n  \"description\": \"An Ionic project\",\n  \"devDependencies\": {\n    \"@ionic/v1-toolkit\": \"^1.0.0\",\n    \"gulp\": \"^3.5.6\",\n    \"gulp-clean-css\": \"^3.7.0\",\n    \"gulp-rename\": \"^1.2.0\",\n    \"gulp-sass\": \"^3.1.0\"\n  }\n}\n"
  },
  {
    "path": "ionic1/base/scss/ionic.app.scss",
    "content": "/*\nTo customize the look and feel of Ionic, you can override the variables\nin ionic's _variables.scss file.\n\nFor example, you might change some of the default colors:\n\n$light:                           #fff !default;\n$stable:                          #f8f8f8 !default;\n$positive:                        #387ef5 !default;\n$calm:                            #11c1f3 !default;\n$balanced:                        #33cd5f !default;\n$energized:                       #ffc900 !default;\n$assertive:                       #ef473a !default;\n$royal:                           #886aea !default;\n$dark:                            #444 !default;\n*/\n\n// The path for our ionicons font files, relative to the built CSS in www/css\n$ionicons-font-path: \"../lib/ionic/fonts\" !default;\n\n// Include all of Ionic\n@import \"www/lib/ionic/scss/ionic\";\n\n"
  },
  {
    "path": "ionic1/base/www/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\">\n    <meta name=\"viewport\" content=\"viewport-fit=cover, initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width\">\n    <title></title>\n\n    <link href=\"lib/ionic/css/ionic.css\" rel=\"stylesheet\">\n    <link href=\"css/style.css\" rel=\"stylesheet\">\n\n    <!-- IF using Sass (run gulp sass first), then remove the CSS include above\n    <link href=\"css/ionic.app.css\" rel=\"stylesheet\">\n    -->\n\n    <!-- ionic/angularjs js -->\n    <script src=\"lib/ionic/js/ionic.bundle.js\"></script>\n\n    <!-- cordova.js required for cordova apps (remove if not needed) -->\n    <script src=\"cordova.js\"></script>\n\n    <!-- your app's js -->\n    <script src=\"js/app.js\"></script>\n  </head>\n\n  <body ng-app=\"starter\">\n    <ion-pane>\n      <ion-header-bar class=\"bar-stable\">\n        <h1 class=\"title\">Ionic Blank Starter</h1>\n      </ion-header-bar>\n      <ion-content class=\"has-header\">\n      </ion-content>\n    </ion-pane>\n  </body>\n</html>\n"
  },
  {
    "path": "ionic1/base/www/js/app.js",
    "content": "// Ionic Starter App\n\n// angular.module is a global place for creating, registering and retrieving Angular modules\n// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)\n// the 2nd parameter is an array of 'requires'\nangular.module('starter', ['ionic'])\n\n.run(function($ionicPlatform) {\n  $ionicPlatform.ready(function() {\n    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard\n    // for form inputs).\n    // The reason we default this to hidden is that native apps don't usually show an accessory bar, at\n    // least on iOS. It's a dead giveaway that an app is using a Web View. However, it's sometimes\n    // useful especially with forms, though we would prefer giving the user a little more room\n    // to interact with the app.\n    if (window.cordova && window.Keyboard) {\n      window.Keyboard.hideKeyboardAccessoryBar(true);\n    }\n\n    if (window.StatusBar) {\n      // Set the statusbar to use the default style, tweak this to\n      // remove the status bar on iOS or change it to use white instead of dark colors.\n      StatusBar.styleDefault();\n    }\n  });\n});\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/.bower.json",
    "content": "{\n  \"name\": \"ionic\",\n  \"version\": \"1.3.4\",\n  \"codename\": \"hong kong\",\n  \"homepage\": \"https://github.com/ionic-team/ionic\",\n  \"authors\": [\n    \"Max Lynch <max@drifty.com>\",\n    \"Adam Bradley <adam@drifty.com>\",\n    \"Ben Sperry <ben@drifty.com>\"\n  ],\n  \"description\": \"Advanced HTML5 hybrid mobile app development framework.\",\n  \"main\": [\n    \"css/ionic.css\",\n    \"fonts/*\",\n    \"js/ionic.js\",\n    \"js/ionic-angular.js\"\n  ],\n  \"keywords\": [\n    \"mobile\",\n    \"html5\",\n    \"ionic\",\n    \"cordova\",\n    \"phonegap\",\n    \"trigger\",\n    \"triggerio\",\n    \"angularjs\",\n    \"angular\"\n  ],\n  \"license\": \"MIT\",\n  \"private\": false,\n  \"dependencies\": {\n    \"angular\": \"1.5.3\",\n    \"angular-animate\": \"1.5.3\",\n    \"angular-sanitize\": \"1.5.3\",\n    \"angular-ui-router\": \"0.2.13\"\n  },\n  \"_release\": \"1.3.4\",\n  \"_resolution\": {\n    \"type\": \"version\",\n    \"tag\": \"v1.3.4\",\n    \"commit\": \"f0b8ff4e49bf8adae91307a539e650ae77b13921\"\n  },\n  \"_source\": \"https://github.com/ionic-team/ionic-bower.git\",\n  \"_target\": \"1.3.4\",\n  \"_originalSource\": \"ionic-team/ionic-bower\"\n}"
  },
  {
    "path": "ionic1/base/www/lib/ionic/README.md",
    "content": "# ionic-bower\n\nBower repository for [Ionic Framework](http://github.com/driftyco/ionic) v1 (Ionic 2+ uses npm)\n\n### Usage\n\nInclude `js/ionic.bundle.js` to get ionic and all of its dependencies.\n\nAlternatively, include the individual ionic files with the dependencies separately.\n\n### Versions\n\nTo install the latest stable version, `bower install driftyco/ionic-bower#v1.1.1`\n\nTo install the latest nightly release, `bower install driftyco/ionic-bower#master`\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/bower.json",
    "content": "{\n  \"name\": \"ionic\",\n  \"version\": \"1.3.4\",\n  \"codename\": \"hong kong\",\n  \"homepage\": \"https://github.com/ionic-team/ionic\",\n  \"authors\": [\n    \"Max Lynch <max@drifty.com>\",\n    \"Adam Bradley <adam@drifty.com>\",\n    \"Ben Sperry <ben@drifty.com>\"\n  ],\n  \"description\": \"Advanced HTML5 hybrid mobile app development framework.\",\n  \"main\": [\n    \"css/ionic.css\",\n    \"fonts/*\",\n    \"js/ionic.js\",\n    \"js/ionic-angular.js\"\n  ],\n  \"keywords\": [\n    \"mobile\",\n    \"html5\",\n    \"ionic\",\n    \"cordova\",\n    \"phonegap\",\n    \"trigger\",\n    \"triggerio\",\n    \"angularjs\",\n    \"angular\"\n  ],\n  \"license\": \"MIT\",\n  \"private\": false,\n  \"dependencies\": {\n    \"angular\": \"1.5.3\",\n    \"angular-animate\": \"1.5.3\",\n    \"angular-sanitize\": \"1.5.3\",\n    \"angular-ui-router\": \"0.2.13\"\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/css/ionic.css",
    "content": "@charset \"UTF-8\";\n/*!\n  Ionicons, v2.0.1\n  Created by Ben Sperry for the Ionic Framework, http://ionicons.com/\n  https://twitter.com/benjsperry  https://twitter.com/ionicframework\n  MIT License: https://github.com/ionic-team/ionicons\n\n  Android-style icons originally built by Google’s\n  Material Design Icons: https://github.com/google/material-design-icons\n  used under CC BY http://creativecommons.org/licenses/by/4.0/\n  Modified icons to fit ionicon’s grid from original.\n*/\n@font-face {\n  font-family: \"Ionicons\";\n  src: url(\"../fonts/ionicons.eot?v=2.0.1\");\n  src: url(\"../fonts/ionicons.eot?v=2.0.1#iefix\") format(\"embedded-opentype\"), url(\"../fonts/ionicons.ttf?v=2.0.1\") format(\"truetype\"), url(\"../fonts/ionicons.woff?v=2.0.1\") format(\"woff\"), url(\"../fonts/ionicons.woff\") format(\"woff\"), url(\"../fonts/ionicons.svg?v=2.0.1#Ionicons\") format(\"svg\");\n  font-weight: normal;\n  font-style: normal; }\n\n.ion, .ionicons,\n.ion-alert:before,\n.ion-alert-circled:before,\n.ion-android-add:before,\n.ion-android-add-circle:before,\n.ion-android-alarm-clock:before,\n.ion-android-alert:before,\n.ion-android-apps:before,\n.ion-android-archive:before,\n.ion-android-arrow-back:before,\n.ion-android-arrow-down:before,\n.ion-android-arrow-dropdown:before,\n.ion-android-arrow-dropdown-circle:before,\n.ion-android-arrow-dropleft:before,\n.ion-android-arrow-dropleft-circle:before,\n.ion-android-arrow-dropright:before,\n.ion-android-arrow-dropright-circle:before,\n.ion-android-arrow-dropup:before,\n.ion-android-arrow-dropup-circle:before,\n.ion-android-arrow-forward:before,\n.ion-android-arrow-up:before,\n.ion-android-attach:before,\n.ion-android-bar:before,\n.ion-android-bicycle:before,\n.ion-android-boat:before,\n.ion-android-bookmark:before,\n.ion-android-bulb:before,\n.ion-android-bus:before,\n.ion-android-calendar:before,\n.ion-android-call:before,\n.ion-android-camera:before,\n.ion-android-cancel:before,\n.ion-android-car:before,\n.ion-android-cart:before,\n.ion-android-chat:before,\n.ion-android-checkbox:before,\n.ion-android-checkbox-blank:before,\n.ion-android-checkbox-outline:before,\n.ion-android-checkbox-outline-blank:before,\n.ion-android-checkmark-circle:before,\n.ion-android-clipboard:before,\n.ion-android-close:before,\n.ion-android-cloud:before,\n.ion-android-cloud-circle:before,\n.ion-android-cloud-done:before,\n.ion-android-cloud-outline:before,\n.ion-android-color-palette:before,\n.ion-android-compass:before,\n.ion-android-contact:before,\n.ion-android-contacts:before,\n.ion-android-contract:before,\n.ion-android-create:before,\n.ion-android-delete:before,\n.ion-android-desktop:before,\n.ion-android-document:before,\n.ion-android-done:before,\n.ion-android-done-all:before,\n.ion-android-download:before,\n.ion-android-drafts:before,\n.ion-android-exit:before,\n.ion-android-expand:before,\n.ion-android-favorite:before,\n.ion-android-favorite-outline:before,\n.ion-android-film:before,\n.ion-android-folder:before,\n.ion-android-folder-open:before,\n.ion-android-funnel:before,\n.ion-android-globe:before,\n.ion-android-hand:before,\n.ion-android-hangout:before,\n.ion-android-happy:before,\n.ion-android-home:before,\n.ion-android-image:before,\n.ion-android-laptop:before,\n.ion-android-list:before,\n.ion-android-locate:before,\n.ion-android-lock:before,\n.ion-android-mail:before,\n.ion-android-map:before,\n.ion-android-menu:before,\n.ion-android-microphone:before,\n.ion-android-microphone-off:before,\n.ion-android-more-horizontal:before,\n.ion-android-more-vertical:before,\n.ion-android-navigate:before,\n.ion-android-notifications:before,\n.ion-android-notifications-none:before,\n.ion-android-notifications-off:before,\n.ion-android-open:before,\n.ion-android-options:before,\n.ion-android-people:before,\n.ion-android-person:before,\n.ion-android-person-add:before,\n.ion-android-phone-landscape:before,\n.ion-android-phone-portrait:before,\n.ion-android-pin:before,\n.ion-android-plane:before,\n.ion-android-playstore:before,\n.ion-android-print:before,\n.ion-android-radio-button-off:before,\n.ion-android-radio-button-on:before,\n.ion-android-refresh:before,\n.ion-android-remove:before,\n.ion-android-remove-circle:before,\n.ion-android-restaurant:before,\n.ion-android-sad:before,\n.ion-android-search:before,\n.ion-android-send:before,\n.ion-android-settings:before,\n.ion-android-share:before,\n.ion-android-share-alt:before,\n.ion-android-star:before,\n.ion-android-star-half:before,\n.ion-android-star-outline:before,\n.ion-android-stopwatch:before,\n.ion-android-subway:before,\n.ion-android-sunny:before,\n.ion-android-sync:before,\n.ion-android-textsms:before,\n.ion-android-time:before,\n.ion-android-train:before,\n.ion-android-unlock:before,\n.ion-android-upload:before,\n.ion-android-volume-down:before,\n.ion-android-volume-mute:before,\n.ion-android-volume-off:before,\n.ion-android-volume-up:before,\n.ion-android-walk:before,\n.ion-android-warning:before,\n.ion-android-watch:before,\n.ion-android-wifi:before,\n.ion-aperture:before,\n.ion-archive:before,\n.ion-arrow-down-a:before,\n.ion-arrow-down-b:before,\n.ion-arrow-down-c:before,\n.ion-arrow-expand:before,\n.ion-arrow-graph-down-left:before,\n.ion-arrow-graph-down-right:before,\n.ion-arrow-graph-up-left:before,\n.ion-arrow-graph-up-right:before,\n.ion-arrow-left-a:before,\n.ion-arrow-left-b:before,\n.ion-arrow-left-c:before,\n.ion-arrow-move:before,\n.ion-arrow-resize:before,\n.ion-arrow-return-left:before,\n.ion-arrow-return-right:before,\n.ion-arrow-right-a:before,\n.ion-arrow-right-b:before,\n.ion-arrow-right-c:before,\n.ion-arrow-shrink:before,\n.ion-arrow-swap:before,\n.ion-arrow-up-a:before,\n.ion-arrow-up-b:before,\n.ion-arrow-up-c:before,\n.ion-asterisk:before,\n.ion-at:before,\n.ion-backspace:before,\n.ion-backspace-outline:before,\n.ion-bag:before,\n.ion-battery-charging:before,\n.ion-battery-empty:before,\n.ion-battery-full:before,\n.ion-battery-half:before,\n.ion-battery-low:before,\n.ion-beaker:before,\n.ion-beer:before,\n.ion-bluetooth:before,\n.ion-bonfire:before,\n.ion-bookmark:before,\n.ion-bowtie:before,\n.ion-briefcase:before,\n.ion-bug:before,\n.ion-calculator:before,\n.ion-calendar:before,\n.ion-camera:before,\n.ion-card:before,\n.ion-cash:before,\n.ion-chatbox:before,\n.ion-chatbox-working:before,\n.ion-chatboxes:before,\n.ion-chatbubble:before,\n.ion-chatbubble-working:before,\n.ion-chatbubbles:before,\n.ion-checkmark:before,\n.ion-checkmark-circled:before,\n.ion-checkmark-round:before,\n.ion-chevron-down:before,\n.ion-chevron-left:before,\n.ion-chevron-right:before,\n.ion-chevron-up:before,\n.ion-clipboard:before,\n.ion-clock:before,\n.ion-close:before,\n.ion-close-circled:before,\n.ion-close-round:before,\n.ion-closed-captioning:before,\n.ion-cloud:before,\n.ion-code:before,\n.ion-code-download:before,\n.ion-code-working:before,\n.ion-coffee:before,\n.ion-compass:before,\n.ion-compose:before,\n.ion-connection-bars:before,\n.ion-contrast:before,\n.ion-crop:before,\n.ion-cube:before,\n.ion-disc:before,\n.ion-document:before,\n.ion-document-text:before,\n.ion-drag:before,\n.ion-earth:before,\n.ion-easel:before,\n.ion-edit:before,\n.ion-egg:before,\n.ion-eject:before,\n.ion-email:before,\n.ion-email-unread:before,\n.ion-erlenmeyer-flask:before,\n.ion-erlenmeyer-flask-bubbles:before,\n.ion-eye:before,\n.ion-eye-disabled:before,\n.ion-female:before,\n.ion-filing:before,\n.ion-film-marker:before,\n.ion-fireball:before,\n.ion-flag:before,\n.ion-flame:before,\n.ion-flash:before,\n.ion-flash-off:before,\n.ion-folder:before,\n.ion-fork:before,\n.ion-fork-repo:before,\n.ion-forward:before,\n.ion-funnel:before,\n.ion-gear-a:before,\n.ion-gear-b:before,\n.ion-grid:before,\n.ion-hammer:before,\n.ion-happy:before,\n.ion-happy-outline:before,\n.ion-headphone:before,\n.ion-heart:before,\n.ion-heart-broken:before,\n.ion-help:before,\n.ion-help-buoy:before,\n.ion-help-circled:before,\n.ion-home:before,\n.ion-icecream:before,\n.ion-image:before,\n.ion-images:before,\n.ion-information:before,\n.ion-information-circled:before,\n.ion-ionic:before,\n.ion-ios-alarm:before,\n.ion-ios-alarm-outline:before,\n.ion-ios-albums:before,\n.ion-ios-albums-outline:before,\n.ion-ios-americanfootball:before,\n.ion-ios-americanfootball-outline:before,\n.ion-ios-analytics:before,\n.ion-ios-analytics-outline:before,\n.ion-ios-arrow-back:before,\n.ion-ios-arrow-down:before,\n.ion-ios-arrow-forward:before,\n.ion-ios-arrow-left:before,\n.ion-ios-arrow-right:before,\n.ion-ios-arrow-thin-down:before,\n.ion-ios-arrow-thin-left:before,\n.ion-ios-arrow-thin-right:before,\n.ion-ios-arrow-thin-up:before,\n.ion-ios-arrow-up:before,\n.ion-ios-at:before,\n.ion-ios-at-outline:before,\n.ion-ios-barcode:before,\n.ion-ios-barcode-outline:before,\n.ion-ios-baseball:before,\n.ion-ios-baseball-outline:before,\n.ion-ios-basketball:before,\n.ion-ios-basketball-outline:before,\n.ion-ios-bell:before,\n.ion-ios-bell-outline:before,\n.ion-ios-body:before,\n.ion-ios-body-outline:before,\n.ion-ios-bolt:before,\n.ion-ios-bolt-outline:before,\n.ion-ios-book:before,\n.ion-ios-book-outline:before,\n.ion-ios-bookmarks:before,\n.ion-ios-bookmarks-outline:before,\n.ion-ios-box:before,\n.ion-ios-box-outline:before,\n.ion-ios-briefcase:before,\n.ion-ios-briefcase-outline:before,\n.ion-ios-browsers:before,\n.ion-ios-browsers-outline:before,\n.ion-ios-calculator:before,\n.ion-ios-calculator-outline:before,\n.ion-ios-calendar:before,\n.ion-ios-calendar-outline:before,\n.ion-ios-camera:before,\n.ion-ios-camera-outline:before,\n.ion-ios-cart:before,\n.ion-ios-cart-outline:before,\n.ion-ios-chatboxes:before,\n.ion-ios-chatboxes-outline:before,\n.ion-ios-chatbubble:before,\n.ion-ios-chatbubble-outline:before,\n.ion-ios-checkmark:before,\n.ion-ios-checkmark-empty:before,\n.ion-ios-checkmark-outline:before,\n.ion-ios-circle-filled:before,\n.ion-ios-circle-outline:before,\n.ion-ios-clock:before,\n.ion-ios-clock-outline:before,\n.ion-ios-close:before,\n.ion-ios-close-empty:before,\n.ion-ios-close-outline:before,\n.ion-ios-cloud:before,\n.ion-ios-cloud-download:before,\n.ion-ios-cloud-download-outline:before,\n.ion-ios-cloud-outline:before,\n.ion-ios-cloud-upload:before,\n.ion-ios-cloud-upload-outline:before,\n.ion-ios-cloudy:before,\n.ion-ios-cloudy-night:before,\n.ion-ios-cloudy-night-outline:before,\n.ion-ios-cloudy-outline:before,\n.ion-ios-cog:before,\n.ion-ios-cog-outline:before,\n.ion-ios-color-filter:before,\n.ion-ios-color-filter-outline:before,\n.ion-ios-color-wand:before,\n.ion-ios-color-wand-outline:before,\n.ion-ios-compose:before,\n.ion-ios-compose-outline:before,\n.ion-ios-contact:before,\n.ion-ios-contact-outline:before,\n.ion-ios-copy:before,\n.ion-ios-copy-outline:before,\n.ion-ios-crop:before,\n.ion-ios-crop-strong:before,\n.ion-ios-download:before,\n.ion-ios-download-outline:before,\n.ion-ios-drag:before,\n.ion-ios-email:before,\n.ion-ios-email-outline:before,\n.ion-ios-eye:before,\n.ion-ios-eye-outline:before,\n.ion-ios-fastforward:before,\n.ion-ios-fastforward-outline:before,\n.ion-ios-filing:before,\n.ion-ios-filing-outline:before,\n.ion-ios-film:before,\n.ion-ios-film-outline:before,\n.ion-ios-flag:before,\n.ion-ios-flag-outline:before,\n.ion-ios-flame:before,\n.ion-ios-flame-outline:before,\n.ion-ios-flask:before,\n.ion-ios-flask-outline:before,\n.ion-ios-flower:before,\n.ion-ios-flower-outline:before,\n.ion-ios-folder:before,\n.ion-ios-folder-outline:before,\n.ion-ios-football:before,\n.ion-ios-football-outline:before,\n.ion-ios-game-controller-a:before,\n.ion-ios-game-controller-a-outline:before,\n.ion-ios-game-controller-b:before,\n.ion-ios-game-controller-b-outline:before,\n.ion-ios-gear:before,\n.ion-ios-gear-outline:before,\n.ion-ios-glasses:before,\n.ion-ios-glasses-outline:before,\n.ion-ios-grid-view:before,\n.ion-ios-grid-view-outline:before,\n.ion-ios-heart:before,\n.ion-ios-heart-outline:before,\n.ion-ios-help:before,\n.ion-ios-help-empty:before,\n.ion-ios-help-outline:before,\n.ion-ios-home:before,\n.ion-ios-home-outline:before,\n.ion-ios-infinite:before,\n.ion-ios-infinite-outline:before,\n.ion-ios-information:before,\n.ion-ios-information-empty:before,\n.ion-ios-information-outline:before,\n.ion-ios-ionic-outline:before,\n.ion-ios-keypad:before,\n.ion-ios-keypad-outline:before,\n.ion-ios-lightbulb:before,\n.ion-ios-lightbulb-outline:before,\n.ion-ios-list:before,\n.ion-ios-list-outline:before,\n.ion-ios-location:before,\n.ion-ios-location-outline:before,\n.ion-ios-locked:before,\n.ion-ios-locked-outline:before,\n.ion-ios-loop:before,\n.ion-ios-loop-strong:before,\n.ion-ios-medical:before,\n.ion-ios-medical-outline:before,\n.ion-ios-medkit:before,\n.ion-ios-medkit-outline:before,\n.ion-ios-mic:before,\n.ion-ios-mic-off:before,\n.ion-ios-mic-outline:before,\n.ion-ios-minus:before,\n.ion-ios-minus-empty:before,\n.ion-ios-minus-outline:before,\n.ion-ios-monitor:before,\n.ion-ios-monitor-outline:before,\n.ion-ios-moon:before,\n.ion-ios-moon-outline:before,\n.ion-ios-more:before,\n.ion-ios-more-outline:before,\n.ion-ios-musical-note:before,\n.ion-ios-musical-notes:before,\n.ion-ios-navigate:before,\n.ion-ios-navigate-outline:before,\n.ion-ios-nutrition:before,\n.ion-ios-nutrition-outline:before,\n.ion-ios-paper:before,\n.ion-ios-paper-outline:before,\n.ion-ios-paperplane:before,\n.ion-ios-paperplane-outline:before,\n.ion-ios-partlysunny:before,\n.ion-ios-partlysunny-outline:before,\n.ion-ios-pause:before,\n.ion-ios-pause-outline:before,\n.ion-ios-paw:before,\n.ion-ios-paw-outline:before,\n.ion-ios-people:before,\n.ion-ios-people-outline:before,\n.ion-ios-person:before,\n.ion-ios-person-outline:before,\n.ion-ios-personadd:before,\n.ion-ios-personadd-outline:before,\n.ion-ios-photos:before,\n.ion-ios-photos-outline:before,\n.ion-ios-pie:before,\n.ion-ios-pie-outline:before,\n.ion-ios-pint:before,\n.ion-ios-pint-outline:before,\n.ion-ios-play:before,\n.ion-ios-play-outline:before,\n.ion-ios-plus:before,\n.ion-ios-plus-empty:before,\n.ion-ios-plus-outline:before,\n.ion-ios-pricetag:before,\n.ion-ios-pricetag-outline:before,\n.ion-ios-pricetags:before,\n.ion-ios-pricetags-outline:before,\n.ion-ios-printer:before,\n.ion-ios-printer-outline:before,\n.ion-ios-pulse:before,\n.ion-ios-pulse-strong:before,\n.ion-ios-rainy:before,\n.ion-ios-rainy-outline:before,\n.ion-ios-recording:before,\n.ion-ios-recording-outline:before,\n.ion-ios-redo:before,\n.ion-ios-redo-outline:before,\n.ion-ios-refresh:before,\n.ion-ios-refresh-empty:before,\n.ion-ios-refresh-outline:before,\n.ion-ios-reload:before,\n.ion-ios-reverse-camera:before,\n.ion-ios-reverse-camera-outline:before,\n.ion-ios-rewind:before,\n.ion-ios-rewind-outline:before,\n.ion-ios-rose:before,\n.ion-ios-rose-outline:before,\n.ion-ios-search:before,\n.ion-ios-search-strong:before,\n.ion-ios-settings:before,\n.ion-ios-settings-strong:before,\n.ion-ios-shuffle:before,\n.ion-ios-shuffle-strong:before,\n.ion-ios-skipbackward:before,\n.ion-ios-skipbackward-outline:before,\n.ion-ios-skipforward:before,\n.ion-ios-skipforward-outline:before,\n.ion-ios-snowy:before,\n.ion-ios-speedometer:before,\n.ion-ios-speedometer-outline:before,\n.ion-ios-star:before,\n.ion-ios-star-half:before,\n.ion-ios-star-outline:before,\n.ion-ios-stopwatch:before,\n.ion-ios-stopwatch-outline:before,\n.ion-ios-sunny:before,\n.ion-ios-sunny-outline:before,\n.ion-ios-telephone:before,\n.ion-ios-telephone-outline:before,\n.ion-ios-tennisball:before,\n.ion-ios-tennisball-outline:before,\n.ion-ios-thunderstorm:before,\n.ion-ios-thunderstorm-outline:before,\n.ion-ios-time:before,\n.ion-ios-time-outline:before,\n.ion-ios-timer:before,\n.ion-ios-timer-outline:before,\n.ion-ios-toggle:before,\n.ion-ios-toggle-outline:before,\n.ion-ios-trash:before,\n.ion-ios-trash-outline:before,\n.ion-ios-undo:before,\n.ion-ios-undo-outline:before,\n.ion-ios-unlocked:before,\n.ion-ios-unlocked-outline:before,\n.ion-ios-upload:before,\n.ion-ios-upload-outline:before,\n.ion-ios-videocam:before,\n.ion-ios-videocam-outline:before,\n.ion-ios-volume-high:before,\n.ion-ios-volume-low:before,\n.ion-ios-wineglass:before,\n.ion-ios-wineglass-outline:before,\n.ion-ios-world:before,\n.ion-ios-world-outline:before,\n.ion-ipad:before,\n.ion-iphone:before,\n.ion-ipod:before,\n.ion-jet:before,\n.ion-key:before,\n.ion-knife:before,\n.ion-laptop:before,\n.ion-leaf:before,\n.ion-levels:before,\n.ion-lightbulb:before,\n.ion-link:before,\n.ion-load-a:before,\n.ion-load-b:before,\n.ion-load-c:before,\n.ion-load-d:before,\n.ion-location:before,\n.ion-lock-combination:before,\n.ion-locked:before,\n.ion-log-in:before,\n.ion-log-out:before,\n.ion-loop:before,\n.ion-magnet:before,\n.ion-male:before,\n.ion-man:before,\n.ion-map:before,\n.ion-medkit:before,\n.ion-merge:before,\n.ion-mic-a:before,\n.ion-mic-b:before,\n.ion-mic-c:before,\n.ion-minus:before,\n.ion-minus-circled:before,\n.ion-minus-round:before,\n.ion-model-s:before,\n.ion-monitor:before,\n.ion-more:before,\n.ion-mouse:before,\n.ion-music-note:before,\n.ion-navicon:before,\n.ion-navicon-round:before,\n.ion-navigate:before,\n.ion-network:before,\n.ion-no-smoking:before,\n.ion-nuclear:before,\n.ion-outlet:before,\n.ion-paintbrush:before,\n.ion-paintbucket:before,\n.ion-paper-airplane:before,\n.ion-paperclip:before,\n.ion-pause:before,\n.ion-person:before,\n.ion-person-add:before,\n.ion-person-stalker:before,\n.ion-pie-graph:before,\n.ion-pin:before,\n.ion-pinpoint:before,\n.ion-pizza:before,\n.ion-plane:before,\n.ion-planet:before,\n.ion-play:before,\n.ion-playstation:before,\n.ion-plus:before,\n.ion-plus-circled:before,\n.ion-plus-round:before,\n.ion-podium:before,\n.ion-pound:before,\n.ion-power:before,\n.ion-pricetag:before,\n.ion-pricetags:before,\n.ion-printer:before,\n.ion-pull-request:before,\n.ion-qr-scanner:before,\n.ion-quote:before,\n.ion-radio-waves:before,\n.ion-record:before,\n.ion-refresh:before,\n.ion-reply:before,\n.ion-reply-all:before,\n.ion-ribbon-a:before,\n.ion-ribbon-b:before,\n.ion-sad:before,\n.ion-sad-outline:before,\n.ion-scissors:before,\n.ion-search:before,\n.ion-settings:before,\n.ion-share:before,\n.ion-shuffle:before,\n.ion-skip-backward:before,\n.ion-skip-forward:before,\n.ion-social-android:before,\n.ion-social-android-outline:before,\n.ion-social-angular:before,\n.ion-social-angular-outline:before,\n.ion-social-apple:before,\n.ion-social-apple-outline:before,\n.ion-social-bitcoin:before,\n.ion-social-bitcoin-outline:before,\n.ion-social-buffer:before,\n.ion-social-buffer-outline:before,\n.ion-social-chrome:before,\n.ion-social-chrome-outline:before,\n.ion-social-codepen:before,\n.ion-social-codepen-outline:before,\n.ion-social-css3:before,\n.ion-social-css3-outline:before,\n.ion-social-designernews:before,\n.ion-social-designernews-outline:before,\n.ion-social-dribbble:before,\n.ion-social-dribbble-outline:before,\n.ion-social-dropbox:before,\n.ion-social-dropbox-outline:before,\n.ion-social-euro:before,\n.ion-social-euro-outline:before,\n.ion-social-facebook:before,\n.ion-social-facebook-outline:before,\n.ion-social-foursquare:before,\n.ion-social-foursquare-outline:before,\n.ion-social-freebsd-devil:before,\n.ion-social-github:before,\n.ion-social-github-outline:before,\n.ion-social-google:before,\n.ion-social-google-outline:before,\n.ion-social-googleplus:before,\n.ion-social-googleplus-outline:before,\n.ion-social-hackernews:before,\n.ion-social-hackernews-outline:before,\n.ion-social-html5:before,\n.ion-social-html5-outline:before,\n.ion-social-instagram:before,\n.ion-social-instagram-outline:before,\n.ion-social-javascript:before,\n.ion-social-javascript-outline:before,\n.ion-social-linkedin:before,\n.ion-social-linkedin-outline:before,\n.ion-social-markdown:before,\n.ion-social-nodejs:before,\n.ion-social-octocat:before,\n.ion-social-pinterest:before,\n.ion-social-pinterest-outline:before,\n.ion-social-python:before,\n.ion-social-reddit:before,\n.ion-social-reddit-outline:before,\n.ion-social-rss:before,\n.ion-social-rss-outline:before,\n.ion-social-sass:before,\n.ion-social-skype:before,\n.ion-social-skype-outline:before,\n.ion-social-snapchat:before,\n.ion-social-snapchat-outline:before,\n.ion-social-tumblr:before,\n.ion-social-tumblr-outline:before,\n.ion-social-tux:before,\n.ion-social-twitch:before,\n.ion-social-twitch-outline:before,\n.ion-social-twitter:before,\n.ion-social-twitter-outline:before,\n.ion-social-usd:before,\n.ion-social-usd-outline:before,\n.ion-social-vimeo:before,\n.ion-social-vimeo-outline:before,\n.ion-social-whatsapp:before,\n.ion-social-whatsapp-outline:before,\n.ion-social-windows:before,\n.ion-social-windows-outline:before,\n.ion-social-wordpress:before,\n.ion-social-wordpress-outline:before,\n.ion-social-yahoo:before,\n.ion-social-yahoo-outline:before,\n.ion-social-yen:before,\n.ion-social-yen-outline:before,\n.ion-social-youtube:before,\n.ion-social-youtube-outline:before,\n.ion-soup-can:before,\n.ion-soup-can-outline:before,\n.ion-speakerphone:before,\n.ion-speedometer:before,\n.ion-spoon:before,\n.ion-star:before,\n.ion-stats-bars:before,\n.ion-steam:before,\n.ion-stop:before,\n.ion-thermometer:before,\n.ion-thumbsdown:before,\n.ion-thumbsup:before,\n.ion-toggle:before,\n.ion-toggle-filled:before,\n.ion-transgender:before,\n.ion-trash-a:before,\n.ion-trash-b:before,\n.ion-trophy:before,\n.ion-tshirt:before,\n.ion-tshirt-outline:before,\n.ion-umbrella:before,\n.ion-university:before,\n.ion-unlocked:before,\n.ion-upload:before,\n.ion-usb:before,\n.ion-videocamera:before,\n.ion-volume-high:before,\n.ion-volume-low:before,\n.ion-volume-medium:before,\n.ion-volume-mute:before,\n.ion-wand:before,\n.ion-waterdrop:before,\n.ion-wifi:before,\n.ion-wineglass:before,\n.ion-woman:before,\n.ion-wrench:before,\n.ion-xbox:before {\n  display: inline-block;\n  font-family: \"Ionicons\";\n  speak: none;\n  font-style: normal;\n  font-weight: normal;\n  font-variant: normal;\n  text-transform: none;\n  text-rendering: auto;\n  line-height: 1;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale; }\n\n.ion-alert:before {\n  content: \"\"; }\n\n.ion-alert-circled:before {\n  content: \"\"; }\n\n.ion-android-add:before {\n  content: \"\"; }\n\n.ion-android-add-circle:before {\n  content: \"\"; }\n\n.ion-android-alarm-clock:before {\n  content: \"\"; }\n\n.ion-android-alert:before {\n  content: \"\"; }\n\n.ion-android-apps:before {\n  content: \"\"; }\n\n.ion-android-archive:before {\n  content: \"\"; }\n\n.ion-android-arrow-back:before {\n  content: \"\"; }\n\n.ion-android-arrow-down:before {\n  content: \"\"; }\n\n.ion-android-arrow-dropdown:before {\n  content: \"\"; }\n\n.ion-android-arrow-dropdown-circle:before {\n  content: \"\"; }\n\n.ion-android-arrow-dropleft:before {\n  content: \"\"; }\n\n.ion-android-arrow-dropleft-circle:before {\n  content: \"\"; }\n\n.ion-android-arrow-dropright:before {\n  content: \"\"; }\n\n.ion-android-arrow-dropright-circle:before {\n  content: \"\"; }\n\n.ion-android-arrow-dropup:before {\n  content: \"\"; }\n\n.ion-android-arrow-dropup-circle:before {\n  content: \"\"; }\n\n.ion-android-arrow-forward:before {\n  content: \"\"; }\n\n.ion-android-arrow-up:before {\n  content: \"\"; }\n\n.ion-android-attach:before {\n  content: \"\"; }\n\n.ion-android-bar:before {\n  content: \"\"; }\n\n.ion-android-bicycle:before {\n  content: \"\"; }\n\n.ion-android-boat:before {\n  content: \"\"; }\n\n.ion-android-bookmark:before {\n  content: \"\"; }\n\n.ion-android-bulb:before {\n  content: \"\"; }\n\n.ion-android-bus:before {\n  content: \"\"; }\n\n.ion-android-calendar:before {\n  content: \"\"; }\n\n.ion-android-call:before {\n  content: \"\"; }\n\n.ion-android-camera:before {\n  content: \"\"; }\n\n.ion-android-cancel:before {\n  content: \"\"; }\n\n.ion-android-car:before {\n  content: \"\"; }\n\n.ion-android-cart:before {\n  content: \"\"; }\n\n.ion-android-chat:before {\n  content: \"\"; }\n\n.ion-android-checkbox:before {\n  content: \"\"; }\n\n.ion-android-checkbox-blank:before {\n  content: \"\"; }\n\n.ion-android-checkbox-outline:before {\n  content: \"\"; }\n\n.ion-android-checkbox-outline-blank:before {\n  content: \"\"; }\n\n.ion-android-checkmark-circle:before {\n  content: \"\"; }\n\n.ion-android-clipboard:before {\n  content: \"\"; }\n\n.ion-android-close:before {\n  content: \"\"; }\n\n.ion-android-cloud:before {\n  content: \"\"; }\n\n.ion-android-cloud-circle:before {\n  content: \"\"; }\n\n.ion-android-cloud-done:before {\n  content: \"\"; }\n\n.ion-android-cloud-outline:before {\n  content: \"\"; }\n\n.ion-android-color-palette:before {\n  content: \"\"; }\n\n.ion-android-compass:before {\n  content: \"\"; }\n\n.ion-android-contact:before {\n  content: \"\"; }\n\n.ion-android-contacts:before {\n  content: \"\"; }\n\n.ion-android-contract:before {\n  content: \"\"; }\n\n.ion-android-create:before {\n  content: \"\"; }\n\n.ion-android-delete:before {\n  content: \"\"; }\n\n.ion-android-desktop:before {\n  content: \"\"; }\n\n.ion-android-document:before {\n  content: \"\"; }\n\n.ion-android-done:before {\n  content: \"\"; }\n\n.ion-android-done-all:before {\n  content: \"\"; }\n\n.ion-android-download:before {\n  content: \"\"; }\n\n.ion-android-drafts:before {\n  content: \"\"; }\n\n.ion-android-exit:before {\n  content: \"\"; }\n\n.ion-android-expand:before {\n  content: \"\"; }\n\n.ion-android-favorite:before {\n  content: \"\"; }\n\n.ion-android-favorite-outline:before {\n  content: \"\"; }\n\n.ion-android-film:before {\n  content: \"\"; }\n\n.ion-android-folder:before {\n  content: \"\"; }\n\n.ion-android-folder-open:before {\n  content: \"\"; }\n\n.ion-android-funnel:before {\n  content: \"\"; }\n\n.ion-android-globe:before {\n  content: \"\"; }\n\n.ion-android-hand:before {\n  content: \"\"; }\n\n.ion-android-hangout:before {\n  content: \"\"; }\n\n.ion-android-happy:before {\n  content: \"\"; }\n\n.ion-android-home:before {\n  content: \"\"; }\n\n.ion-android-image:before {\n  content: \"\"; }\n\n.ion-android-laptop:before {\n  content: \"\"; }\n\n.ion-android-list:before {\n  content: \"\"; }\n\n.ion-android-locate:before {\n  content: \"\"; }\n\n.ion-android-lock:before {\n  content: \"\"; }\n\n.ion-android-mail:before {\n  content: \"\"; }\n\n.ion-android-map:before {\n  content: \"\"; }\n\n.ion-android-menu:before {\n  content: \"\"; }\n\n.ion-android-microphone:before {\n  content: \"\"; }\n\n.ion-android-microphone-off:before {\n  content: \"\"; }\n\n.ion-android-more-horizontal:before {\n  content: \"\"; }\n\n.ion-android-more-vertical:before {\n  content: \"\"; }\n\n.ion-android-navigate:before {\n  content: \"\"; }\n\n.ion-android-notifications:before {\n  content: \"\"; }\n\n.ion-android-notifications-none:before {\n  content: \"\"; }\n\n.ion-android-notifications-off:before {\n  content: \"\"; }\n\n.ion-android-open:before {\n  content: \"\"; }\n\n.ion-android-options:before {\n  content: \"\"; }\n\n.ion-android-people:before {\n  content: \"\"; }\n\n.ion-android-person:before {\n  content: \"\"; }\n\n.ion-android-person-add:before {\n  content: \"\"; }\n\n.ion-android-phone-landscape:before {\n  content: \"\"; }\n\n.ion-android-phone-portrait:before {\n  content: \"\"; }\n\n.ion-android-pin:before {\n  content: \"\"; }\n\n.ion-android-plane:before {\n  content: \"\"; }\n\n.ion-android-playstore:before {\n  content: \"\"; }\n\n.ion-android-print:before {\n  content: \"\"; }\n\n.ion-android-radio-button-off:before {\n  content: \"\"; }\n\n.ion-android-radio-button-on:before {\n  content: \"\"; }\n\n.ion-android-refresh:before {\n  content: \"\"; }\n\n.ion-android-remove:before {\n  content: \"\"; }\n\n.ion-android-remove-circle:before {\n  content: \"\"; }\n\n.ion-android-restaurant:before {\n  content: \"\"; }\n\n.ion-android-sad:before {\n  content: \"\"; }\n\n.ion-android-search:before {\n  content: \"\"; }\n\n.ion-android-send:before {\n  content: \"\"; }\n\n.ion-android-settings:before {\n  content: \"\"; }\n\n.ion-android-share:before {\n  content: \"\"; }\n\n.ion-android-share-alt:before {\n  content: \"\"; }\n\n.ion-android-star:before {\n  content: \"\"; }\n\n.ion-android-star-half:before {\n  content: \"\"; }\n\n.ion-android-star-outline:before {\n  content: \"\"; }\n\n.ion-android-stopwatch:before {\n  content: \"\"; }\n\n.ion-android-subway:before {\n  content: \"\"; }\n\n.ion-android-sunny:before {\n  content: \"\"; }\n\n.ion-android-sync:before {\n  content: \"\"; }\n\n.ion-android-textsms:before {\n  content: \"\"; }\n\n.ion-android-time:before {\n  content: \"\"; }\n\n.ion-android-train:before {\n  content: \"\"; }\n\n.ion-android-unlock:before {\n  content: \"\"; }\n\n.ion-android-upload:before {\n  content: \"\"; }\n\n.ion-android-volume-down:before {\n  content: \"\"; }\n\n.ion-android-volume-mute:before {\n  content: \"\"; }\n\n.ion-android-volume-off:before {\n  content: \"\"; }\n\n.ion-android-volume-up:before {\n  content: \"\"; }\n\n.ion-android-walk:before {\n  content: \"\"; }\n\n.ion-android-warning:before {\n  content: \"\"; }\n\n.ion-android-watch:before {\n  content: \"\"; }\n\n.ion-android-wifi:before {\n  content: \"\"; }\n\n.ion-aperture:before {\n  content: \"\"; }\n\n.ion-archive:before {\n  content: \"\"; }\n\n.ion-arrow-down-a:before {\n  content: \"\"; }\n\n.ion-arrow-down-b:before {\n  content: \"\"; }\n\n.ion-arrow-down-c:before {\n  content: \"\"; }\n\n.ion-arrow-expand:before {\n  content: \"\"; }\n\n.ion-arrow-graph-down-left:before {\n  content: \"\"; }\n\n.ion-arrow-graph-down-right:before {\n  content: \"\"; }\n\n.ion-arrow-graph-up-left:before {\n  content: \"\"; }\n\n.ion-arrow-graph-up-right:before {\n  content: \"\"; }\n\n.ion-arrow-left-a:before {\n  content: \"\"; }\n\n.ion-arrow-left-b:before {\n  content: \"\"; }\n\n.ion-arrow-left-c:before {\n  content: \"\"; }\n\n.ion-arrow-move:before {\n  content: \"\"; }\n\n.ion-arrow-resize:before {\n  content: \"\"; }\n\n.ion-arrow-return-left:before {\n  content: \"\"; }\n\n.ion-arrow-return-right:before {\n  content: \"\"; }\n\n.ion-arrow-right-a:before {\n  content: \"\"; }\n\n.ion-arrow-right-b:before {\n  content: \"\"; }\n\n.ion-arrow-right-c:before {\n  content: \"\"; }\n\n.ion-arrow-shrink:before {\n  content: \"\"; }\n\n.ion-arrow-swap:before {\n  content: \"\"; }\n\n.ion-arrow-up-a:before {\n  content: \"\"; }\n\n.ion-arrow-up-b:before {\n  content: \"\"; }\n\n.ion-arrow-up-c:before {\n  content: \"\"; }\n\n.ion-asterisk:before {\n  content: \"\"; }\n\n.ion-at:before {\n  content: \"\"; }\n\n.ion-backspace:before {\n  content: \"\"; }\n\n.ion-backspace-outline:before {\n  content: \"\"; }\n\n.ion-bag:before {\n  content: \"\"; }\n\n.ion-battery-charging:before {\n  content: \"\"; }\n\n.ion-battery-empty:before {\n  content: \"\"; }\n\n.ion-battery-full:before {\n  content: \"\"; }\n\n.ion-battery-half:before {\n  content: \"\"; }\n\n.ion-battery-low:before {\n  content: \"\"; }\n\n.ion-beaker:before {\n  content: \"\"; }\n\n.ion-beer:before {\n  content: \"\"; }\n\n.ion-bluetooth:before {\n  content: \"\"; }\n\n.ion-bonfire:before {\n  content: \"\"; }\n\n.ion-bookmark:before {\n  content: \"\"; }\n\n.ion-bowtie:before {\n  content: \"\"; }\n\n.ion-briefcase:before {\n  content: \"\"; }\n\n.ion-bug:before {\n  content: \"\"; }\n\n.ion-calculator:before {\n  content: \"\"; }\n\n.ion-calendar:before {\n  content: \"\"; }\n\n.ion-camera:before {\n  content: \"\"; }\n\n.ion-card:before {\n  content: \"\"; }\n\n.ion-cash:before {\n  content: \"\"; }\n\n.ion-chatbox:before {\n  content: \"\"; }\n\n.ion-chatbox-working:before {\n  content: \"\"; }\n\n.ion-chatboxes:before {\n  content: \"\"; }\n\n.ion-chatbubble:before {\n  content: \"\"; }\n\n.ion-chatbubble-working:before {\n  content: \"\"; }\n\n.ion-chatbubbles:before {\n  content: \"\"; }\n\n.ion-checkmark:before {\n  content: \"\"; }\n\n.ion-checkmark-circled:before {\n  content: \"\"; }\n\n.ion-checkmark-round:before {\n  content: \"\"; }\n\n.ion-chevron-down:before {\n  content: \"\"; }\n\n.ion-chevron-left:before {\n  content: \"\"; }\n\n.ion-chevron-right:before {\n  content: \"\"; }\n\n.ion-chevron-up:before {\n  content: \"\"; }\n\n.ion-clipboard:before {\n  content: \"\"; }\n\n.ion-clock:before {\n  content: \"\"; }\n\n.ion-close:before {\n  content: \"\"; }\n\n.ion-close-circled:before {\n  content: \"\"; }\n\n.ion-close-round:before {\n  content: \"\"; }\n\n.ion-closed-captioning:before {\n  content: \"\"; }\n\n.ion-cloud:before {\n  content: \"\"; }\n\n.ion-code:before {\n  content: \"\"; }\n\n.ion-code-download:before {\n  content: \"\"; }\n\n.ion-code-working:before {\n  content: \"\"; }\n\n.ion-coffee:before {\n  content: \"\"; }\n\n.ion-compass:before {\n  content: \"\"; }\n\n.ion-compose:before {\n  content: \"\"; }\n\n.ion-connection-bars:before {\n  content: \"\"; }\n\n.ion-contrast:before {\n  content: \"\"; }\n\n.ion-crop:before {\n  content: \"\"; }\n\n.ion-cube:before {\n  content: \"\"; }\n\n.ion-disc:before {\n  content: \"\"; }\n\n.ion-document:before {\n  content: \"\"; }\n\n.ion-document-text:before {\n  content: \"\"; }\n\n.ion-drag:before {\n  content: \"\"; }\n\n.ion-earth:before {\n  content: \"\"; }\n\n.ion-easel:before {\n  content: \"\"; }\n\n.ion-edit:before {\n  content: \"\"; }\n\n.ion-egg:before {\n  content: \"\"; }\n\n.ion-eject:before {\n  content: \"\"; }\n\n.ion-email:before {\n  content: \"\"; }\n\n.ion-email-unread:before {\n  content: \"\"; }\n\n.ion-erlenmeyer-flask:before {\n  content: \"\"; }\n\n.ion-erlenmeyer-flask-bubbles:before {\n  content: \"\"; }\n\n.ion-eye:before {\n  content: \"\"; }\n\n.ion-eye-disabled:before {\n  content: \"\"; }\n\n.ion-female:before {\n  content: \"\"; }\n\n.ion-filing:before {\n  content: \"\"; }\n\n.ion-film-marker:before {\n  content: \"\"; }\n\n.ion-fireball:before {\n  content: \"\"; }\n\n.ion-flag:before {\n  content: \"\"; }\n\n.ion-flame:before {\n  content: \"\"; }\n\n.ion-flash:before {\n  content: \"\"; }\n\n.ion-flash-off:before {\n  content: \"\"; }\n\n.ion-folder:before {\n  content: \"\"; }\n\n.ion-fork:before {\n  content: \"\"; }\n\n.ion-fork-repo:before {\n  content: \"\"; }\n\n.ion-forward:before {\n  content: \"\"; }\n\n.ion-funnel:before {\n  content: \"\"; }\n\n.ion-gear-a:before {\n  content: \"\"; }\n\n.ion-gear-b:before {\n  content: \"\"; }\n\n.ion-grid:before {\n  content: \"\"; }\n\n.ion-hammer:before {\n  content: \"\"; }\n\n.ion-happy:before {\n  content: \"\"; }\n\n.ion-happy-outline:before {\n  content: \"\"; }\n\n.ion-headphone:before {\n  content: \"\"; }\n\n.ion-heart:before {\n  content: \"\"; }\n\n.ion-heart-broken:before {\n  content: \"\"; }\n\n.ion-help:before {\n  content: \"\"; }\n\n.ion-help-buoy:before {\n  content: \"\"; }\n\n.ion-help-circled:before {\n  content: \"\"; }\n\n.ion-home:before {\n  content: \"\"; }\n\n.ion-icecream:before {\n  content: \"\"; }\n\n.ion-image:before {\n  content: \"\"; }\n\n.ion-images:before {\n  content: \"\"; }\n\n.ion-information:before {\n  content: \"\"; }\n\n.ion-information-circled:before {\n  content: \"\"; }\n\n.ion-ionic:before {\n  content: \"\"; }\n\n.ion-ios-alarm:before {\n  content: \"\"; }\n\n.ion-ios-alarm-outline:before {\n  content: \"\"; }\n\n.ion-ios-albums:before {\n  content: \"\"; }\n\n.ion-ios-albums-outline:before {\n  content: \"\"; }\n\n.ion-ios-americanfootball:before {\n  content: \"\"; }\n\n.ion-ios-americanfootball-outline:before {\n  content: \"\"; }\n\n.ion-ios-analytics:before {\n  content: \"\"; }\n\n.ion-ios-analytics-outline:before {\n  content: \"\"; }\n\n.ion-ios-arrow-back:before {\n  content: \"\"; }\n\n.ion-ios-arrow-down:before {\n  content: \"\"; }\n\n.ion-ios-arrow-forward:before {\n  content: \"\"; }\n\n.ion-ios-arrow-left:before {\n  content: \"\"; }\n\n.ion-ios-arrow-right:before {\n  content: \"\"; }\n\n.ion-ios-arrow-thin-down:before {\n  content: \"\"; }\n\n.ion-ios-arrow-thin-left:before {\n  content: \"\"; }\n\n.ion-ios-arrow-thin-right:before {\n  content: \"\"; }\n\n.ion-ios-arrow-thin-up:before {\n  content: \"\"; }\n\n.ion-ios-arrow-up:before {\n  content: \"\"; }\n\n.ion-ios-at:before {\n  content: \"\"; }\n\n.ion-ios-at-outline:before {\n  content: \"\"; }\n\n.ion-ios-barcode:before {\n  content: \"\"; }\n\n.ion-ios-barcode-outline:before {\n  content: \"\"; }\n\n.ion-ios-baseball:before {\n  content: \"\"; }\n\n.ion-ios-baseball-outline:before {\n  content: \"\"; }\n\n.ion-ios-basketball:before {\n  content: \"\"; }\n\n.ion-ios-basketball-outline:before {\n  content: \"\"; }\n\n.ion-ios-bell:before {\n  content: \"\"; }\n\n.ion-ios-bell-outline:before {\n  content: \"\"; }\n\n.ion-ios-body:before {\n  content: \"\"; }\n\n.ion-ios-body-outline:before {\n  content: \"\"; }\n\n.ion-ios-bolt:before {\n  content: \"\"; }\n\n.ion-ios-bolt-outline:before {\n  content: \"\"; }\n\n.ion-ios-book:before {\n  content: \"\"; }\n\n.ion-ios-book-outline:before {\n  content: \"\"; }\n\n.ion-ios-bookmarks:before {\n  content: \"\"; }\n\n.ion-ios-bookmarks-outline:before {\n  content: \"\"; }\n\n.ion-ios-box:before {\n  content: \"\"; }\n\n.ion-ios-box-outline:before {\n  content: \"\"; }\n\n.ion-ios-briefcase:before {\n  content: \"\"; }\n\n.ion-ios-briefcase-outline:before {\n  content: \"\"; }\n\n.ion-ios-browsers:before {\n  content: \"\"; }\n\n.ion-ios-browsers-outline:before {\n  content: \"\"; }\n\n.ion-ios-calculator:before {\n  content: \"\"; }\n\n.ion-ios-calculator-outline:before {\n  content: \"\"; }\n\n.ion-ios-calendar:before {\n  content: \"\"; }\n\n.ion-ios-calendar-outline:before {\n  content: \"\"; }\n\n.ion-ios-camera:before {\n  content: \"\"; }\n\n.ion-ios-camera-outline:before {\n  content: \"\"; }\n\n.ion-ios-cart:before {\n  content: \"\"; }\n\n.ion-ios-cart-outline:before {\n  content: \"\"; }\n\n.ion-ios-chatboxes:before {\n  content: \"\"; }\n\n.ion-ios-chatboxes-outline:before {\n  content: \"\"; }\n\n.ion-ios-chatbubble:before {\n  content: \"\"; }\n\n.ion-ios-chatbubble-outline:before {\n  content: \"\"; }\n\n.ion-ios-checkmark:before {\n  content: \"\"; }\n\n.ion-ios-checkmark-empty:before {\n  content: \"\"; }\n\n.ion-ios-checkmark-outline:before {\n  content: \"\"; }\n\n.ion-ios-circle-filled:before {\n  content: \"\"; }\n\n.ion-ios-circle-outline:before {\n  content: \"\"; }\n\n.ion-ios-clock:before {\n  content: \"\"; }\n\n.ion-ios-clock-outline:before {\n  content: \"\"; }\n\n.ion-ios-close:before {\n  content: \"\"; }\n\n.ion-ios-close-empty:before {\n  content: \"\"; }\n\n.ion-ios-close-outline:before {\n  content: \"\"; }\n\n.ion-ios-cloud:before {\n  content: \"\"; }\n\n.ion-ios-cloud-download:before {\n  content: \"\"; }\n\n.ion-ios-cloud-download-outline:before {\n  content: \"\"; }\n\n.ion-ios-cloud-outline:before {\n  content: \"\"; }\n\n.ion-ios-cloud-upload:before {\n  content: \"\"; }\n\n.ion-ios-cloud-upload-outline:before {\n  content: \"\"; }\n\n.ion-ios-cloudy:before {\n  content: \"\"; }\n\n.ion-ios-cloudy-night:before {\n  content: \"\"; }\n\n.ion-ios-cloudy-night-outline:before {\n  content: \"\"; }\n\n.ion-ios-cloudy-outline:before {\n  content: \"\"; }\n\n.ion-ios-cog:before {\n  content: \"\"; }\n\n.ion-ios-cog-outline:before {\n  content: \"\"; }\n\n.ion-ios-color-filter:before {\n  content: \"\"; }\n\n.ion-ios-color-filter-outline:before {\n  content: \"\"; }\n\n.ion-ios-color-wand:before {\n  content: \"\"; }\n\n.ion-ios-color-wand-outline:before {\n  content: \"\"; }\n\n.ion-ios-compose:before {\n  content: \"\"; }\n\n.ion-ios-compose-outline:before {\n  content: \"\"; }\n\n.ion-ios-contact:before {\n  content: \"\"; }\n\n.ion-ios-contact-outline:before {\n  content: \"\"; }\n\n.ion-ios-copy:before {\n  content: \"\"; }\n\n.ion-ios-copy-outline:before {\n  content: \"\"; }\n\n.ion-ios-crop:before {\n  content: \"\"; }\n\n.ion-ios-crop-strong:before {\n  content: \"\"; }\n\n.ion-ios-download:before {\n  content: \"\"; }\n\n.ion-ios-download-outline:before {\n  content: \"\"; }\n\n.ion-ios-drag:before {\n  content: \"\"; }\n\n.ion-ios-email:before {\n  content: \"\"; }\n\n.ion-ios-email-outline:before {\n  content: \"\"; }\n\n.ion-ios-eye:before {\n  content: \"\"; }\n\n.ion-ios-eye-outline:before {\n  content: \"\"; }\n\n.ion-ios-fastforward:before {\n  content: \"\"; }\n\n.ion-ios-fastforward-outline:before {\n  content: \"\"; }\n\n.ion-ios-filing:before {\n  content: \"\"; }\n\n.ion-ios-filing-outline:before {\n  content: \"\"; }\n\n.ion-ios-film:before {\n  content: \"\"; }\n\n.ion-ios-film-outline:before {\n  content: \"\"; }\n\n.ion-ios-flag:before {\n  content: \"\"; }\n\n.ion-ios-flag-outline:before {\n  content: \"\"; }\n\n.ion-ios-flame:before {\n  content: \"\"; }\n\n.ion-ios-flame-outline:before {\n  content: \"\"; }\n\n.ion-ios-flask:before {\n  content: \"\"; }\n\n.ion-ios-flask-outline:before {\n  content: \"\"; }\n\n.ion-ios-flower:before {\n  content: \"\"; }\n\n.ion-ios-flower-outline:before {\n  content: \"\"; }\n\n.ion-ios-folder:before {\n  content: \"\"; }\n\n.ion-ios-folder-outline:before {\n  content: \"\"; }\n\n.ion-ios-football:before {\n  content: \"\"; }\n\n.ion-ios-football-outline:before {\n  content: \"\"; }\n\n.ion-ios-game-controller-a:before {\n  content: \"\"; }\n\n.ion-ios-game-controller-a-outline:before {\n  content: \"\"; }\n\n.ion-ios-game-controller-b:before {\n  content: \"\"; }\n\n.ion-ios-game-controller-b-outline:before {\n  content: \"\"; }\n\n.ion-ios-gear:before {\n  content: \"\"; }\n\n.ion-ios-gear-outline:before {\n  content: \"\"; }\n\n.ion-ios-glasses:before {\n  content: \"\"; }\n\n.ion-ios-glasses-outline:before {\n  content: \"\"; }\n\n.ion-ios-grid-view:before {\n  content: \"\"; }\n\n.ion-ios-grid-view-outline:before {\n  content: \"\"; }\n\n.ion-ios-heart:before {\n  content: \"\"; }\n\n.ion-ios-heart-outline:before {\n  content: \"\"; }\n\n.ion-ios-help:before {\n  content: \"\"; }\n\n.ion-ios-help-empty:before {\n  content: \"\"; }\n\n.ion-ios-help-outline:before {\n  content: \"\"; }\n\n.ion-ios-home:before {\n  content: \"\"; }\n\n.ion-ios-home-outline:before {\n  content: \"\"; }\n\n.ion-ios-infinite:before {\n  content: \"\"; }\n\n.ion-ios-infinite-outline:before {\n  content: \"\"; }\n\n.ion-ios-information:before {\n  content: \"\"; }\n\n.ion-ios-information-empty:before {\n  content: \"\"; }\n\n.ion-ios-information-outline:before {\n  content: \"\"; }\n\n.ion-ios-ionic-outline:before {\n  content: \"\"; }\n\n.ion-ios-keypad:before {\n  content: \"\"; }\n\n.ion-ios-keypad-outline:before {\n  content: \"\"; }\n\n.ion-ios-lightbulb:before {\n  content: \"\"; }\n\n.ion-ios-lightbulb-outline:before {\n  content: \"\"; }\n\n.ion-ios-list:before {\n  content: \"\"; }\n\n.ion-ios-list-outline:before {\n  content: \"\"; }\n\n.ion-ios-location:before {\n  content: \"\"; }\n\n.ion-ios-location-outline:before {\n  content: \"\"; }\n\n.ion-ios-locked:before {\n  content: \"\"; }\n\n.ion-ios-locked-outline:before {\n  content: \"\"; }\n\n.ion-ios-loop:before {\n  content: \"\"; }\n\n.ion-ios-loop-strong:before {\n  content: \"\"; }\n\n.ion-ios-medical:before {\n  content: \"\"; }\n\n.ion-ios-medical-outline:before {\n  content: \"\"; }\n\n.ion-ios-medkit:before {\n  content: \"\"; }\n\n.ion-ios-medkit-outline:before {\n  content: \"\"; }\n\n.ion-ios-mic:before {\n  content: \"\"; }\n\n.ion-ios-mic-off:before {\n  content: \"\"; }\n\n.ion-ios-mic-outline:before {\n  content: \"\"; }\n\n.ion-ios-minus:before {\n  content: \"\"; }\n\n.ion-ios-minus-empty:before {\n  content: \"\"; }\n\n.ion-ios-minus-outline:before {\n  content: \"\"; }\n\n.ion-ios-monitor:before {\n  content: \"\"; }\n\n.ion-ios-monitor-outline:before {\n  content: \"\"; }\n\n.ion-ios-moon:before {\n  content: \"\"; }\n\n.ion-ios-moon-outline:before {\n  content: \"\"; }\n\n.ion-ios-more:before {\n  content: \"\"; }\n\n.ion-ios-more-outline:before {\n  content: \"\"; }\n\n.ion-ios-musical-note:before {\n  content: \"\"; }\n\n.ion-ios-musical-notes:before {\n  content: \"\"; }\n\n.ion-ios-navigate:before {\n  content: \"\"; }\n\n.ion-ios-navigate-outline:before {\n  content: \"\"; }\n\n.ion-ios-nutrition:before {\n  content: \"\"; }\n\n.ion-ios-nutrition-outline:before {\n  content: \"\"; }\n\n.ion-ios-paper:before {\n  content: \"\"; }\n\n.ion-ios-paper-outline:before {\n  content: \"\"; }\n\n.ion-ios-paperplane:before {\n  content: \"\"; }\n\n.ion-ios-paperplane-outline:before {\n  content: \"\"; }\n\n.ion-ios-partlysunny:before {\n  content: \"\"; }\n\n.ion-ios-partlysunny-outline:before {\n  content: \"\"; }\n\n.ion-ios-pause:before {\n  content: \"\"; }\n\n.ion-ios-pause-outline:before {\n  content: \"\"; }\n\n.ion-ios-paw:before {\n  content: \"\"; }\n\n.ion-ios-paw-outline:before {\n  content: \"\"; }\n\n.ion-ios-people:before {\n  content: \"\"; }\n\n.ion-ios-people-outline:before {\n  content: \"\"; }\n\n.ion-ios-person:before {\n  content: \"\"; }\n\n.ion-ios-person-outline:before {\n  content: \"\"; }\n\n.ion-ios-personadd:before {\n  content: \"\"; }\n\n.ion-ios-personadd-outline:before {\n  content: \"\"; }\n\n.ion-ios-photos:before {\n  content: \"\"; }\n\n.ion-ios-photos-outline:before {\n  content: \"\"; }\n\n.ion-ios-pie:before {\n  content: \"\"; }\n\n.ion-ios-pie-outline:before {\n  content: \"\"; }\n\n.ion-ios-pint:before {\n  content: \"\"; }\n\n.ion-ios-pint-outline:before {\n  content: \"\"; }\n\n.ion-ios-play:before {\n  content: \"\"; }\n\n.ion-ios-play-outline:before {\n  content: \"\"; }\n\n.ion-ios-plus:before {\n  content: \"\"; }\n\n.ion-ios-plus-empty:before {\n  content: \"\"; }\n\n.ion-ios-plus-outline:before {\n  content: \"\"; }\n\n.ion-ios-pricetag:before {\n  content: \"\"; }\n\n.ion-ios-pricetag-outline:before {\n  content: \"\"; }\n\n.ion-ios-pricetags:before {\n  content: \"\"; }\n\n.ion-ios-pricetags-outline:before {\n  content: \"\"; }\n\n.ion-ios-printer:before {\n  content: \"\"; }\n\n.ion-ios-printer-outline:before {\n  content: \"\"; }\n\n.ion-ios-pulse:before {\n  content: \"\"; }\n\n.ion-ios-pulse-strong:before {\n  content: \"\"; }\n\n.ion-ios-rainy:before {\n  content: \"\"; }\n\n.ion-ios-rainy-outline:before {\n  content: \"\"; }\n\n.ion-ios-recording:before {\n  content: \"\"; }\n\n.ion-ios-recording-outline:before {\n  content: \"\"; }\n\n.ion-ios-redo:before {\n  content: \"\"; }\n\n.ion-ios-redo-outline:before {\n  content: \"\"; }\n\n.ion-ios-refresh:before {\n  content: \"\"; }\n\n.ion-ios-refresh-empty:before {\n  content: \"\"; }\n\n.ion-ios-refresh-outline:before {\n  content: \"\"; }\n\n.ion-ios-reload:before {\n  content: \"\"; }\n\n.ion-ios-reverse-camera:before {\n  content: \"\"; }\n\n.ion-ios-reverse-camera-outline:before {\n  content: \"\"; }\n\n.ion-ios-rewind:before {\n  content: \"\"; }\n\n.ion-ios-rewind-outline:before {\n  content: \"\"; }\n\n.ion-ios-rose:before {\n  content: \"\"; }\n\n.ion-ios-rose-outline:before {\n  content: \"\"; }\n\n.ion-ios-search:before {\n  content: \"\"; }\n\n.ion-ios-search-strong:before {\n  content: \"\"; }\n\n.ion-ios-settings:before {\n  content: \"\"; }\n\n.ion-ios-settings-strong:before {\n  content: \"\"; }\n\n.ion-ios-shuffle:before {\n  content: \"\"; }\n\n.ion-ios-shuffle-strong:before {\n  content: \"\"; }\n\n.ion-ios-skipbackward:before {\n  content: \"\"; }\n\n.ion-ios-skipbackward-outline:before {\n  content: \"\"; }\n\n.ion-ios-skipforward:before {\n  content: \"\"; }\n\n.ion-ios-skipforward-outline:before {\n  content: \"\"; }\n\n.ion-ios-snowy:before {\n  content: \"\"; }\n\n.ion-ios-speedometer:before {\n  content: \"\"; }\n\n.ion-ios-speedometer-outline:before {\n  content: \"\"; }\n\n.ion-ios-star:before {\n  content: \"\"; }\n\n.ion-ios-star-half:before {\n  content: \"\"; }\n\n.ion-ios-star-outline:before {\n  content: \"\"; }\n\n.ion-ios-stopwatch:before {\n  content: \"\"; }\n\n.ion-ios-stopwatch-outline:before {\n  content: \"\"; }\n\n.ion-ios-sunny:before {\n  content: \"\"; }\n\n.ion-ios-sunny-outline:before {\n  content: \"\"; }\n\n.ion-ios-telephone:before {\n  content: \"\"; }\n\n.ion-ios-telephone-outline:before {\n  content: \"\"; }\n\n.ion-ios-tennisball:before {\n  content: \"\"; }\n\n.ion-ios-tennisball-outline:before {\n  content: \"\"; }\n\n.ion-ios-thunderstorm:before {\n  content: \"\"; }\n\n.ion-ios-thunderstorm-outline:before {\n  content: \"\"; }\n\n.ion-ios-time:before {\n  content: \"\"; }\n\n.ion-ios-time-outline:before {\n  content: \"\"; }\n\n.ion-ios-timer:before {\n  content: \"\"; }\n\n.ion-ios-timer-outline:before {\n  content: \"\"; }\n\n.ion-ios-toggle:before {\n  content: \"\"; }\n\n.ion-ios-toggle-outline:before {\n  content: \"\"; }\n\n.ion-ios-trash:before {\n  content: \"\"; }\n\n.ion-ios-trash-outline:before {\n  content: \"\"; }\n\n.ion-ios-undo:before {\n  content: \"\"; }\n\n.ion-ios-undo-outline:before {\n  content: \"\"; }\n\n.ion-ios-unlocked:before {\n  content: \"\"; }\n\n.ion-ios-unlocked-outline:before {\n  content: \"\"; }\n\n.ion-ios-upload:before {\n  content: \"\"; }\n\n.ion-ios-upload-outline:before {\n  content: \"\"; }\n\n.ion-ios-videocam:before {\n  content: \"\"; }\n\n.ion-ios-videocam-outline:before {\n  content: \"\"; }\n\n.ion-ios-volume-high:before {\n  content: \"\"; }\n\n.ion-ios-volume-low:before {\n  content: \"\"; }\n\n.ion-ios-wineglass:before {\n  content: \"\"; }\n\n.ion-ios-wineglass-outline:before {\n  content: \"\"; }\n\n.ion-ios-world:before {\n  content: \"\"; }\n\n.ion-ios-world-outline:before {\n  content: \"\"; }\n\n.ion-ipad:before {\n  content: \"\"; }\n\n.ion-iphone:before {\n  content: \"\"; }\n\n.ion-ipod:before {\n  content: \"\"; }\n\n.ion-jet:before {\n  content: \"\"; }\n\n.ion-key:before {\n  content: \"\"; }\n\n.ion-knife:before {\n  content: \"\"; }\n\n.ion-laptop:before {\n  content: \"\"; }\n\n.ion-leaf:before {\n  content: \"\"; }\n\n.ion-levels:before {\n  content: \"\"; }\n\n.ion-lightbulb:before {\n  content: \"\"; }\n\n.ion-link:before {\n  content: \"\"; }\n\n.ion-load-a:before {\n  content: \"\"; }\n\n.ion-load-b:before {\n  content: \"\"; }\n\n.ion-load-c:before {\n  content: \"\"; }\n\n.ion-load-d:before {\n  content: \"\"; }\n\n.ion-location:before {\n  content: \"\"; }\n\n.ion-lock-combination:before {\n  content: \"\"; }\n\n.ion-locked:before {\n  content: \"\"; }\n\n.ion-log-in:before {\n  content: \"\"; }\n\n.ion-log-out:before {\n  content: \"\"; }\n\n.ion-loop:before {\n  content: \"\"; }\n\n.ion-magnet:before {\n  content: \"\"; }\n\n.ion-male:before {\n  content: \"\"; }\n\n.ion-man:before {\n  content: \"\"; }\n\n.ion-map:before {\n  content: \"\"; }\n\n.ion-medkit:before {\n  content: \"\"; }\n\n.ion-merge:before {\n  content: \"\"; }\n\n.ion-mic-a:before {\n  content: \"\"; }\n\n.ion-mic-b:before {\n  content: \"\"; }\n\n.ion-mic-c:before {\n  content: \"\"; }\n\n.ion-minus:before {\n  content: \"\"; }\n\n.ion-minus-circled:before {\n  content: \"\"; }\n\n.ion-minus-round:before {\n  content: \"\"; }\n\n.ion-model-s:before {\n  content: \"\"; }\n\n.ion-monitor:before {\n  content: \"\"; }\n\n.ion-more:before {\n  content: \"\"; }\n\n.ion-mouse:before {\n  content: \"\"; }\n\n.ion-music-note:before {\n  content: \"\"; }\n\n.ion-navicon:before {\n  content: \"\"; }\n\n.ion-navicon-round:before {\n  content: \"\"; }\n\n.ion-navigate:before {\n  content: \"\"; }\n\n.ion-network:before {\n  content: \"\"; }\n\n.ion-no-smoking:before {\n  content: \"\"; }\n\n.ion-nuclear:before {\n  content: \"\"; }\n\n.ion-outlet:before {\n  content: \"\"; }\n\n.ion-paintbrush:before {\n  content: \"\"; }\n\n.ion-paintbucket:before {\n  content: \"\"; }\n\n.ion-paper-airplane:before {\n  content: \"\"; }\n\n.ion-paperclip:before {\n  content: \"\"; }\n\n.ion-pause:before {\n  content: \"\"; }\n\n.ion-person:before {\n  content: \"\"; }\n\n.ion-person-add:before {\n  content: \"\"; }\n\n.ion-person-stalker:before {\n  content: \"\"; }\n\n.ion-pie-graph:before {\n  content: \"\"; }\n\n.ion-pin:before {\n  content: \"\"; }\n\n.ion-pinpoint:before {\n  content: \"\"; }\n\n.ion-pizza:before {\n  content: \"\"; }\n\n.ion-plane:before {\n  content: \"\"; }\n\n.ion-planet:before {\n  content: \"\"; }\n\n.ion-play:before {\n  content: \"\"; }\n\n.ion-playstation:before {\n  content: \"\"; }\n\n.ion-plus:before {\n  content: \"\"; }\n\n.ion-plus-circled:before {\n  content: \"\"; }\n\n.ion-plus-round:before {\n  content: \"\"; }\n\n.ion-podium:before {\n  content: \"\"; }\n\n.ion-pound:before {\n  content: \"\"; }\n\n.ion-power:before {\n  content: \"\"; }\n\n.ion-pricetag:before {\n  content: \"\"; }\n\n.ion-pricetags:before {\n  content: \"\"; }\n\n.ion-printer:before {\n  content: \"\"; }\n\n.ion-pull-request:before {\n  content: \"\"; }\n\n.ion-qr-scanner:before {\n  content: \"\"; }\n\n.ion-quote:before {\n  content: \"\"; }\n\n.ion-radio-waves:before {\n  content: \"\"; }\n\n.ion-record:before {\n  content: \"\"; }\n\n.ion-refresh:before {\n  content: \"\"; }\n\n.ion-reply:before {\n  content: \"\"; }\n\n.ion-reply-all:before {\n  content: \"\"; }\n\n.ion-ribbon-a:before {\n  content: \"\"; }\n\n.ion-ribbon-b:before {\n  content: \"\"; }\n\n.ion-sad:before {\n  content: \"\"; }\n\n.ion-sad-outline:before {\n  content: \"\"; }\n\n.ion-scissors:before {\n  content: \"\"; }\n\n.ion-search:before {\n  content: \"\"; }\n\n.ion-settings:before {\n  content: \"\"; }\n\n.ion-share:before {\n  content: \"\"; }\n\n.ion-shuffle:before {\n  content: \"\"; }\n\n.ion-skip-backward:before {\n  content: \"\"; }\n\n.ion-skip-forward:before {\n  content: \"\"; }\n\n.ion-social-android:before {\n  content: \"\"; }\n\n.ion-social-android-outline:before {\n  content: \"\"; }\n\n.ion-social-angular:before {\n  content: \"\"; }\n\n.ion-social-angular-outline:before {\n  content: \"\"; }\n\n.ion-social-apple:before {\n  content: \"\"; }\n\n.ion-social-apple-outline:before {\n  content: \"\"; }\n\n.ion-social-bitcoin:before {\n  content: \"\"; }\n\n.ion-social-bitcoin-outline:before {\n  content: \"\"; }\n\n.ion-social-buffer:before {\n  content: \"\"; }\n\n.ion-social-buffer-outline:before {\n  content: \"\"; }\n\n.ion-social-chrome:before {\n  content: \"\"; }\n\n.ion-social-chrome-outline:before {\n  content: \"\"; }\n\n.ion-social-codepen:before {\n  content: \"\"; }\n\n.ion-social-codepen-outline:before {\n  content: \"\"; }\n\n.ion-social-css3:before {\n  content: \"\"; }\n\n.ion-social-css3-outline:before {\n  content: \"\"; }\n\n.ion-social-designernews:before {\n  content: \"\"; }\n\n.ion-social-designernews-outline:before {\n  content: \"\"; }\n\n.ion-social-dribbble:before {\n  content: \"\"; }\n\n.ion-social-dribbble-outline:before {\n  content: \"\"; }\n\n.ion-social-dropbox:before {\n  content: \"\"; }\n\n.ion-social-dropbox-outline:before {\n  content: \"\"; }\n\n.ion-social-euro:before {\n  content: \"\"; }\n\n.ion-social-euro-outline:before {\n  content: \"\"; }\n\n.ion-social-facebook:before {\n  content: \"\"; }\n\n.ion-social-facebook-outline:before {\n  content: \"\"; }\n\n.ion-social-foursquare:before {\n  content: \"\"; }\n\n.ion-social-foursquare-outline:before {\n  content: \"\"; }\n\n.ion-social-freebsd-devil:before {\n  content: \"\"; }\n\n.ion-social-github:before {\n  content: \"\"; }\n\n.ion-social-github-outline:before {\n  content: \"\"; }\n\n.ion-social-google:before {\n  content: \"\"; }\n\n.ion-social-google-outline:before {\n  content: \"\"; }\n\n.ion-social-googleplus:before {\n  content: \"\"; }\n\n.ion-social-googleplus-outline:before {\n  content: \"\"; }\n\n.ion-social-hackernews:before {\n  content: \"\"; }\n\n.ion-social-hackernews-outline:before {\n  content: \"\"; }\n\n.ion-social-html5:before {\n  content: \"\"; }\n\n.ion-social-html5-outline:before {\n  content: \"\"; }\n\n.ion-social-instagram:before {\n  content: \"\"; }\n\n.ion-social-instagram-outline:before {\n  content: \"\"; }\n\n.ion-social-javascript:before {\n  content: \"\"; }\n\n.ion-social-javascript-outline:before {\n  content: \"\"; }\n\n.ion-social-linkedin:before {\n  content: \"\"; }\n\n.ion-social-linkedin-outline:before {\n  content: \"\"; }\n\n.ion-social-markdown:before {\n  content: \"\"; }\n\n.ion-social-nodejs:before {\n  content: \"\"; }\n\n.ion-social-octocat:before {\n  content: \"\"; }\n\n.ion-social-pinterest:before {\n  content: \"\"; }\n\n.ion-social-pinterest-outline:before {\n  content: \"\"; }\n\n.ion-social-python:before {\n  content: \"\"; }\n\n.ion-social-reddit:before {\n  content: \"\"; }\n\n.ion-social-reddit-outline:before {\n  content: \"\"; }\n\n.ion-social-rss:before {\n  content: \"\"; }\n\n.ion-social-rss-outline:before {\n  content: \"\"; }\n\n.ion-social-sass:before {\n  content: \"\"; }\n\n.ion-social-skype:before {\n  content: \"\"; }\n\n.ion-social-skype-outline:before {\n  content: \"\"; }\n\n.ion-social-snapchat:before {\n  content: \"\"; }\n\n.ion-social-snapchat-outline:before {\n  content: \"\"; }\n\n.ion-social-tumblr:before {\n  content: \"\"; }\n\n.ion-social-tumblr-outline:before {\n  content: \"\"; }\n\n.ion-social-tux:before {\n  content: \"\"; }\n\n.ion-social-twitch:before {\n  content: \"\"; }\n\n.ion-social-twitch-outline:before {\n  content: \"\"; }\n\n.ion-social-twitter:before {\n  content: \"\"; }\n\n.ion-social-twitter-outline:before {\n  content: \"\"; }\n\n.ion-social-usd:before {\n  content: \"\"; }\n\n.ion-social-usd-outline:before {\n  content: \"\"; }\n\n.ion-social-vimeo:before {\n  content: \"\"; }\n\n.ion-social-vimeo-outline:before {\n  content: \"\"; }\n\n.ion-social-whatsapp:before {\n  content: \"\"; }\n\n.ion-social-whatsapp-outline:before {\n  content: \"\"; }\n\n.ion-social-windows:before {\n  content: \"\"; }\n\n.ion-social-windows-outline:before {\n  content: \"\"; }\n\n.ion-social-wordpress:before {\n  content: \"\"; }\n\n.ion-social-wordpress-outline:before {\n  content: \"\"; }\n\n.ion-social-yahoo:before {\n  content: \"\"; }\n\n.ion-social-yahoo-outline:before {\n  content: \"\"; }\n\n.ion-social-yen:before {\n  content: \"\"; }\n\n.ion-social-yen-outline:before {\n  content: \"\"; }\n\n.ion-social-youtube:before {\n  content: \"\"; }\n\n.ion-social-youtube-outline:before {\n  content: \"\"; }\n\n.ion-soup-can:before {\n  content: \"\"; }\n\n.ion-soup-can-outline:before {\n  content: \"\"; }\n\n.ion-speakerphone:before {\n  content: \"\"; }\n\n.ion-speedometer:before {\n  content: \"\"; }\n\n.ion-spoon:before {\n  content: \"\"; }\n\n.ion-star:before {\n  content: \"\"; }\n\n.ion-stats-bars:before {\n  content: \"\"; }\n\n.ion-steam:before {\n  content: \"\"; }\n\n.ion-stop:before {\n  content: \"\"; }\n\n.ion-thermometer:before {\n  content: \"\"; }\n\n.ion-thumbsdown:before {\n  content: \"\"; }\n\n.ion-thumbsup:before {\n  content: \"\"; }\n\n.ion-toggle:before {\n  content: \"\"; }\n\n.ion-toggle-filled:before {\n  content: \"\"; }\n\n.ion-transgender:before {\n  content: \"\"; }\n\n.ion-trash-a:before {\n  content: \"\"; }\n\n.ion-trash-b:before {\n  content: \"\"; }\n\n.ion-trophy:before {\n  content: \"\"; }\n\n.ion-tshirt:before {\n  content: \"\"; }\n\n.ion-tshirt-outline:before {\n  content: \"\"; }\n\n.ion-umbrella:before {\n  content: \"\"; }\n\n.ion-university:before {\n  content: \"\"; }\n\n.ion-unlocked:before {\n  content: \"\"; }\n\n.ion-upload:before {\n  content: \"\"; }\n\n.ion-usb:before {\n  content: \"\"; }\n\n.ion-videocamera:before {\n  content: \"\"; }\n\n.ion-volume-high:before {\n  content: \"\"; }\n\n.ion-volume-low:before {\n  content: \"\"; }\n\n.ion-volume-medium:before {\n  content: \"\"; }\n\n.ion-volume-mute:before {\n  content: \"\"; }\n\n.ion-wand:before {\n  content: \"\"; }\n\n.ion-waterdrop:before {\n  content: \"\"; }\n\n.ion-wifi:before {\n  content: \"\"; }\n\n.ion-wineglass:before {\n  content: \"\"; }\n\n.ion-woman:before {\n  content: \"\"; }\n\n.ion-wrench:before {\n  content: \"\"; }\n\n.ion-xbox:before {\n  content: \"\"; }\n\n/**\n * Resets\n * --------------------------------------------------\n * Adapted from normalize.css and some reset.css. We don't care even one\n * bit about old IE, so we don't need any hacks for that in here.\n *\n * There are probably other things we could remove here, as well.\n *\n * normalize.css v2.1.2 | MIT License | git.io/normalize\n\n * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)\n * http://cssreset.com\n */\nhtml, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, img, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\nb, i, u, center,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td,\narticle, aside, canvas, details, embed, fieldset,\nfigure, figcaption, footer, header, hgroup,\nmenu, nav, output, ruby, section, summary,\ntime, mark, audio, video {\n  margin: 0;\n  padding: 0;\n  border: 0;\n  vertical-align: baseline;\n  font: inherit;\n  font-size: 100%; }\n\nol, ul {\n  list-style: none; }\n\nblockquote, q {\n  quotes: none; }\n\nblockquote:before, blockquote:after,\nq:before, q:after {\n  content: '';\n  content: none; }\n\n/**\n * Prevent modern browsers from displaying `audio` without controls.\n * Remove excess height in iOS 5 devices.\n */\naudio:not([controls]) {\n  display: none;\n  height: 0; }\n\n/**\n * Hide the `template` element in IE, Safari, and Firefox < 22.\n */\n[hidden],\ntemplate {\n  display: none; }\n\nscript {\n  display: none !important; }\n\n/* ==========================================================================\n   Base\n   ========================================================================== */\n/**\n * 1. Set default font family to sans-serif.\n * 2. Prevent iOS text size adjust after orientation change, without disabling\n *  user zoom.\n */\nhtml {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  font-family: sans-serif;\n  /* 1 */\n  -webkit-text-size-adjust: 100%;\n  -ms-text-size-adjust: 100%;\n  /* 2 */\n  -webkit-text-size-adjust: 100%;\n  /* 2 */ }\n\n/**\n * Remove default margin.\n */\nbody {\n  margin: 0;\n  line-height: 1; }\n\n/**\n * Remove default outlines.\n */\na,\nbutton,\n:focus,\na:focus,\nbutton:focus,\na:active,\na:hover {\n  outline: 0; }\n\n/* *\n * Remove tap highlight color\n */\na {\n  -webkit-user-drag: none;\n  -webkit-tap-highlight-color: transparent;\n  -webkit-tap-highlight-color: transparent; }\n  a[href]:hover {\n    cursor: pointer; }\n\n/* ==========================================================================\n   Typography\n   ========================================================================== */\n/**\n * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.\n */\nb,\nstrong {\n  font-weight: bold; }\n\n/**\n * Address styling not present in Safari 5 and Chrome.\n */\ndfn {\n  font-style: italic; }\n\n/**\n * Address differences between Firefox and other browsers.\n */\nhr {\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  height: 0; }\n\n/**\n * Correct font family set oddly in Safari 5 and Chrome.\n */\ncode,\nkbd,\npre,\nsamp {\n  font-size: 1em;\n  font-family: monospace, serif; }\n\n/**\n * Improve readability of pre-formatted text in all browsers.\n */\npre {\n  white-space: pre-wrap; }\n\n/**\n * Set consistent quote types.\n */\nq {\n  quotes: \"\\201C\" \"\\201D\" \"\\2018\" \"\\2019\"; }\n\n/**\n * Address inconsistent and variable font size in all browsers.\n */\nsmall {\n  font-size: 80%; }\n\n/**\n * Prevent `sub` and `sup` affecting `line-height` in all browsers.\n */\nsub,\nsup {\n  position: relative;\n  vertical-align: baseline;\n  font-size: 75%;\n  line-height: 0; }\n\nsup {\n  top: -0.5em; }\n\nsub {\n  bottom: -0.25em; }\n\n/**\n * Define consistent border, margin, and padding.\n */\nfieldset {\n  margin: 0 2px;\n  padding: 0.35em 0.625em 0.75em;\n  border: 1px solid #c0c0c0; }\n\n/**\n * 1. Correct `color` not being inherited in IE 8/9.\n * 2. Remove padding so people aren't caught out if they zero out fieldsets.\n */\nlegend {\n  padding: 0;\n  /* 2 */\n  border: 0;\n  /* 1 */ }\n\n/**\n * 1. Correct font family not being inherited in all browsers.\n * 2. Correct font size not being inherited in all browsers.\n * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.\n * 4. Remove any default :focus styles\n * 5. Make sure webkit font smoothing is being inherited\n * 6. Remove default gradient in Android Firefox / FirefoxOS\n */\nbutton,\ninput,\nselect,\ntextarea {\n  margin: 0;\n  /* 3 */\n  font-size: 100%;\n  /* 2 */\n  font-family: inherit;\n  /* 1 */\n  outline-offset: 0;\n  /* 4 */\n  outline-style: none;\n  /* 4 */\n  outline-width: 0;\n  /* 4 */\n  -webkit-font-smoothing: inherit;\n  /* 5 */\n  background-image: none;\n  /* 6 */ }\n\n/**\n * Address Firefox 4+ setting `line-height` on `input` using `importnt` in\n * the UA stylesheet.\n */\nbutton,\ninput {\n  line-height: normal; }\n\n/**\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\n * All other form control elements do not inherit `text-transform` values.\n * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.\n * Correct `select` style inheritance in Firefox 4+ and Opera.\n */\nbutton,\nselect {\n  text-transform: none; }\n\n/**\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n *  and `video` controls.\n * 2. Correct inability to style clickable `input` types in iOS.\n * 3. Improve usability and consistency of cursor style between image-type\n *  `input` and others.\n */\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  cursor: pointer;\n  /* 3 */\n  -webkit-appearance: button;\n  /* 2 */ }\n\n/**\n * Re-set default cursor for disabled elements.\n */\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default; }\n\n/**\n * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.\n * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome\n *  (include `-moz` to future-proof).\n */\ninput[type=\"search\"] {\n  -webkit-box-sizing: content-box;\n  /* 2 */\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  -webkit-appearance: textfield;\n  /* 1 */ }\n\n/**\n * Remove inner padding and search cancel button in Safari 5 and Chrome\n * on OS X.\n */\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none; }\n\n/**\n * Remove inner padding and border in Firefox 4+.\n */\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  padding: 0;\n  border: 0; }\n\n/**\n * 1. Remove default vertical scrollbar in IE 8/9.\n * 2. Improve readability and alignment in all browsers.\n */\ntextarea {\n  overflow: auto;\n  /* 1 */\n  vertical-align: top;\n  /* 2 */ }\n\nimg {\n  -webkit-user-drag: none; }\n\n/* ==========================================================================\n   Tables\n   ========================================================================== */\n/**\n * Remove most spacing between table cells.\n */\ntable {\n  border-spacing: 0;\n  border-collapse: collapse; }\n\n/**\n * Scaffolding\n * --------------------------------------------------\n */\n*,\n*:before,\n*:after {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box; }\n\nhtml {\n  overflow: hidden;\n  -ms-touch-action: pan-y;\n  touch-action: pan-y; }\n\nbody,\n.ionic-body {\n  -webkit-touch-callout: none;\n  -webkit-font-smoothing: antialiased;\n  font-smoothing: antialiased;\n  -webkit-text-size-adjust: none;\n  -moz-text-size-adjust: none;\n  text-size-adjust: none;\n  -webkit-tap-highlight-color: transparent;\n  -webkit-tap-highlight-color: transparent;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  overflow: hidden;\n  margin: 0;\n  padding: 0;\n  color: #000;\n  word-wrap: break-word;\n  font-size: 14px;\n  font-family: -apple-system;\n  font-family: \"-apple-system\", \"Helvetica Neue\", \"Roboto\", \"Segoe UI\", sans-serif;\n  line-height: 20px;\n  text-rendering: optimizeLegibility;\n  -webkit-backface-visibility: hidden;\n  -webkit-user-drag: none;\n  -ms-content-zooming: none; }\n\nbody.grade-b,\nbody.grade-c {\n  text-rendering: auto; }\n\n.content {\n  position: relative; }\n\n.scroll-content {\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  overflow: hidden;\n  margin-top: -1px;\n  padding-top: 1px;\n  margin-bottom: -1px;\n  width: auto;\n  height: auto; }\n\n.menu .scroll-content.scroll-content-false {\n  z-index: 11; }\n\n.scroll-view {\n  position: relative;\n  display: block;\n  overflow: hidden;\n  margin-top: -1px; }\n  .scroll-view.overflow-scroll {\n    position: relative; }\n  .scroll-view.scroll-x {\n    overflow-x: scroll;\n    overflow-y: hidden; }\n  .scroll-view.scroll-y {\n    overflow-x: hidden;\n    overflow-y: scroll; }\n  .scroll-view.scroll-xy {\n    overflow-x: scroll;\n    overflow-y: scroll; }\n\n/**\n * Scroll is the scroll view component available for complex and custom\n * scroll view functionality.\n */\n.scroll {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  -webkit-touch-callout: none;\n  -webkit-text-size-adjust: none;\n  -moz-text-size-adjust: none;\n  text-size-adjust: none;\n  -webkit-transform-origin: left top;\n  transform-origin: left top; }\n\n/**\n * Set ms-viewport to prevent MS \"page squish\" and allow fluid scrolling\n * https://msdn.microsoft.com/en-us/library/ie/hh869615(v=vs.85).aspx\n */\n@-ms-viewport {\n  width: device-width; }\n\n.scroll-bar {\n  position: absolute;\n  z-index: 9999; }\n\n.ng-animate .scroll-bar {\n  visibility: hidden; }\n\n.scroll-bar-h {\n  right: 2px;\n  bottom: 3px;\n  left: 2px;\n  height: 3px; }\n  .scroll-bar-h .scroll-bar-indicator {\n    height: 100%; }\n\n.scroll-bar-v {\n  top: 2px;\n  right: 3px;\n  bottom: 2px;\n  width: 3px; }\n  .scroll-bar-v .scroll-bar-indicator {\n    width: 100%; }\n\n.scroll-bar-indicator {\n  position: absolute;\n  border-radius: 4px;\n  background: rgba(0, 0, 0, 0.3);\n  opacity: 1;\n  -webkit-transition: opacity 0.3s linear;\n  transition: opacity 0.3s linear; }\n  .scroll-bar-indicator.scroll-bar-fade-out {\n    opacity: 0; }\n\n.platform-android .scroll-bar-indicator {\n  border-radius: 0; }\n\n.grade-b .scroll-bar-indicator,\n.grade-c .scroll-bar-indicator {\n  background: #aaa; }\n  .grade-b .scroll-bar-indicator.scroll-bar-fade-out,\n  .grade-c .scroll-bar-indicator.scroll-bar-fade-out {\n    -webkit-transition: none;\n    transition: none; }\n\nion-infinite-scroll {\n  height: 60px;\n  width: 100%;\n  display: block;\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-direction: normal;\n  -webkit-box-orient: horizontal;\n  -webkit-flex-direction: row;\n  -moz-flex-direction: row;\n  -ms-flex-direction: row;\n  flex-direction: row;\n  -webkit-box-pack: center;\n  -ms-flex-pack: center;\n  -webkit-justify-content: center;\n  -moz-justify-content: center;\n  justify-content: center;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center; }\n  ion-infinite-scroll .icon {\n    color: #666666;\n    font-size: 30px;\n    color: #666666; }\n  ion-infinite-scroll:not(.active) .spinner,\n  ion-infinite-scroll:not(.active) .icon:before {\n    display: none; }\n\n.overflow-scroll {\n  overflow-x: hidden;\n  overflow-y: scroll;\n  -webkit-overflow-scrolling: touch;\n  -ms-overflow-style: -ms-autohiding-scrollbar;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  position: absolute; }\n  .overflow-scroll.pane {\n    overflow-x: hidden;\n    overflow-y: scroll; }\n  .overflow-scroll .scroll {\n    position: static;\n    height: 100%;\n    -webkit-transform: translate3d(0, 0, 0); }\n\n/* If you change these, change platform.scss as well */\n.has-header {\n  top: 44px; }\n\n.no-header {\n  top: 0; }\n\n.has-subheader {\n  top: 88px; }\n\n.has-tabs-top {\n  top: 93px; }\n\n.has-header.has-subheader.has-tabs-top {\n  top: 137px; }\n\n.has-footer {\n  bottom: 44px; }\n\n.has-subfooter {\n  bottom: 88px; }\n\n.has-tabs,\n.bar-footer.has-tabs {\n  bottom: 49px; }\n  .has-tabs.pane,\n  .bar-footer.has-tabs.pane {\n    bottom: 49px;\n    height: auto; }\n\n.bar-subfooter.has-tabs {\n  bottom: 93px; }\n\n.has-footer.has-tabs {\n  bottom: 93px; }\n\n.pane {\n  -webkit-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n  -webkit-transition-duration: 0;\n  transition-duration: 0;\n  z-index: 1; }\n\n.view {\n  z-index: 1; }\n\n.pane,\n.view {\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: #fff;\n  overflow: hidden; }\n\n.view-container {\n  position: absolute;\n  display: block;\n  width: 100%;\n  height: 100%; }\n\n/**\n * Typography\n * --------------------------------------------------\n */\np {\n  margin: 0 0 10px; }\n\nsmall {\n  font-size: 85%; }\n\ncite {\n  font-style: normal; }\n\n.text-left {\n  text-align: left; }\n\n.text-right {\n  text-align: right; }\n\n.text-center {\n  text-align: center; }\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n  color: #000;\n  font-weight: 500;\n  font-family: \"-apple-system\", \"Helvetica Neue\", \"Roboto\", \"Segoe UI\", sans-serif;\n  line-height: 1.2; }\n  h1 small, h2 small, h3 small, h4 small, h5 small, h6 small,\n  .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small {\n    font-weight: normal;\n    line-height: 1; }\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n  margin-top: 20px;\n  margin-bottom: 10px; }\n  h1:first-child, .h1:first-child,\n  h2:first-child, .h2:first-child,\n  h3:first-child, .h3:first-child {\n    margin-top: 0; }\n  h1 + h1, h1 + .h1,\n  h1 + h2, h1 + .h2,\n  h1 + h3, h1 + .h3, .h1 + h1, .h1 + .h1,\n  .h1 + h2, .h1 + .h2,\n  .h1 + h3, .h1 + .h3,\n  h2 + h1,\n  h2 + .h1,\n  h2 + h2,\n  h2 + .h2,\n  h2 + h3,\n  h2 + .h3, .h2 + h1, .h2 + .h1,\n  .h2 + h2, .h2 + .h2,\n  .h2 + h3, .h2 + .h3,\n  h3 + h1,\n  h3 + .h1,\n  h3 + h2,\n  h3 + .h2,\n  h3 + h3,\n  h3 + .h3, .h3 + h1, .h3 + .h1,\n  .h3 + h2, .h3 + .h2,\n  .h3 + h3, .h3 + .h3 {\n    margin-top: 10px; }\n\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n  margin-top: 10px;\n  margin-bottom: 10px; }\n\nh1, .h1 {\n  font-size: 36px; }\n\nh2, .h2 {\n  font-size: 30px; }\n\nh3, .h3 {\n  font-size: 24px; }\n\nh4, .h4 {\n  font-size: 18px; }\n\nh5, .h5 {\n  font-size: 14px; }\n\nh6, .h6 {\n  font-size: 12px; }\n\nh1 small, .h1 small {\n  font-size: 24px; }\n\nh2 small, .h2 small {\n  font-size: 18px; }\n\nh3 small, .h3 small,\nh4 small, .h4 small {\n  font-size: 14px; }\n\ndl {\n  margin-bottom: 20px; }\n\ndt,\ndd {\n  line-height: 1.42857; }\n\ndt {\n  font-weight: bold; }\n\nblockquote {\n  margin: 0 0 20px;\n  padding: 10px 20px;\n  border-left: 5px solid gray; }\n  blockquote p {\n    font-weight: 300;\n    font-size: 17.5px;\n    line-height: 1.25; }\n  blockquote p:last-child {\n    margin-bottom: 0; }\n  blockquote small {\n    display: block;\n    line-height: 1.42857; }\n    blockquote small:before {\n      content: '\\2014 \\00A0'; }\n\nq:before,\nq:after,\nblockquote:before,\nblockquote:after {\n  content: \"\"; }\n\naddress {\n  display: block;\n  margin-bottom: 20px;\n  font-style: normal;\n  line-height: 1.42857; }\n\na {\n  color: #387ef5; }\n\na.subdued {\n  padding-right: 10px;\n  color: #888;\n  text-decoration: none; }\n  a.subdued:hover {\n    text-decoration: none; }\n  a.subdued:last-child {\n    padding-right: 0; }\n\n/**\n * Action Sheets\n * --------------------------------------------------\n */\n.action-sheet-backdrop {\n  -webkit-transition: background-color 150ms ease-in-out;\n  transition: background-color 150ms ease-in-out;\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: 11;\n  width: 100%;\n  height: 100%;\n  background-color: transparent; }\n  .action-sheet-backdrop.active {\n    background-color: rgba(0, 0, 0, 0.4); }\n\n.action-sheet-wrapper {\n  -webkit-transform: translate3d(0, 100%, 0);\n  transform: translate3d(0, 100%, 0);\n  -webkit-transition: all cubic-bezier(0.36, 0.66, 0.04, 1) 500ms;\n  transition: all cubic-bezier(0.36, 0.66, 0.04, 1) 500ms;\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  width: 100%;\n  max-width: 500px;\n  margin: auto; }\n\n.action-sheet-up {\n  -webkit-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0); }\n\n.action-sheet {\n  margin-left: 8px;\n  margin-right: 8px;\n  width: auto;\n  z-index: 11;\n  overflow: hidden; }\n  .action-sheet .button {\n    display: block;\n    padding: 1px;\n    width: 100%;\n    border-radius: 0;\n    border-color: #d1d3d6;\n    background-color: transparent;\n    color: #007aff;\n    font-size: 21px; }\n    .action-sheet .button:hover {\n      color: #007aff; }\n    .action-sheet .button.destructive {\n      color: #ff3b30; }\n      .action-sheet .button.destructive:hover {\n        color: #ff3b30; }\n  .action-sheet .button.active, .action-sheet .button.activated {\n    box-shadow: none;\n    border-color: #d1d3d6;\n    color: #007aff;\n    background: #e4e5e7; }\n\n.action-sheet-has-icons .icon {\n  position: absolute;\n  left: 16px; }\n\n.action-sheet-title {\n  padding: 16px;\n  color: #8f8f8f;\n  text-align: center;\n  font-size: 13px; }\n\n.action-sheet-group {\n  margin-bottom: 8px;\n  border-radius: 4px;\n  background-color: #fff;\n  overflow: hidden; }\n  .action-sheet-group .button {\n    border-width: 1px 0px 0px 0px; }\n  .action-sheet-group .button:first-child:last-child {\n    border-width: 0; }\n\n.action-sheet-options {\n  background: #f1f2f3; }\n\n.action-sheet-cancel .button {\n  font-weight: 500; }\n\n.action-sheet-open {\n  pointer-events: none; }\n  .action-sheet-open.modal-open .modal {\n    pointer-events: none; }\n  .action-sheet-open .action-sheet-backdrop {\n    pointer-events: auto; }\n\n.platform-android .action-sheet-backdrop.active {\n  background-color: rgba(0, 0, 0, 0.2); }\n\n.platform-android .action-sheet {\n  margin: 0; }\n  .platform-android .action-sheet .action-sheet-title,\n  .platform-android .action-sheet .button {\n    text-align: left;\n    border-color: transparent;\n    font-size: 16px;\n    color: inherit; }\n  .platform-android .action-sheet .action-sheet-title {\n    font-size: 14px;\n    padding: 16px;\n    color: #666; }\n  .platform-android .action-sheet .button.active,\n  .platform-android .action-sheet .button.activated {\n    background: #e8e8e8; }\n\n.platform-android .action-sheet-group {\n  margin: 0;\n  border-radius: 0;\n  background-color: #fafafa; }\n\n.platform-android .action-sheet-cancel {\n  display: none; }\n\n.platform-android .action-sheet-has-icons .button {\n  padding-left: 56px; }\n\n.backdrop {\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: 11;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.4);\n  visibility: hidden;\n  opacity: 0;\n  -webkit-transition: 0.1s opacity linear;\n  transition: 0.1s opacity linear; }\n  .backdrop.visible {\n    visibility: visible; }\n  .backdrop.active {\n    opacity: 1; }\n\n/**\n * Bar (Headers and Footers)\n * --------------------------------------------------\n */\n.bar {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  position: absolute;\n  right: 0;\n  left: 0;\n  z-index: 9;\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  padding: 5px;\n  width: 100%;\n  height: 44px;\n  border-width: 0;\n  border-style: solid;\n  border-top: 1px solid transparent;\n  border-bottom: 1px solid #ddd;\n  background-color: white;\n  /* border-width: 1px will actually create 2 device pixels on retina */\n  /* this nifty trick sets an actual 1px border on hi-res displays */\n  background-size: 0; }\n  @media (min--moz-device-pixel-ratio: 1.5), (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi), (min-resolution: 1.5dppx) {\n    .bar {\n      border: none;\n      background-image: linear-gradient(0deg, #ddd, #ddd 50%, transparent 50%);\n      background-position: bottom;\n      background-size: 100% 1px;\n      background-repeat: no-repeat; } }\n  .bar.bar-clear {\n    border: none;\n    background: none;\n    color: #fff; }\n    .bar.bar-clear .button {\n      color: #fff; }\n    .bar.bar-clear .title {\n      color: #fff; }\n  .bar.item-input-inset .item-input-wrapper {\n    margin-top: -1px; }\n    .bar.item-input-inset .item-input-wrapper input {\n      padding-left: 8px;\n      width: 94%;\n      height: 28px;\n      background: transparent; }\n  .bar.bar-light {\n    border-color: #ddd;\n    background-color: white;\n    background-image: linear-gradient(0deg, #ddd, #ddd 50%, transparent 50%);\n    color: #444; }\n    .bar.bar-light .title {\n      color: #444; }\n    .bar.bar-light.bar-footer {\n      background-image: linear-gradient(180deg, #ddd, #ddd 50%, transparent 50%); }\n  .bar.bar-stable {\n    border-color: #b2b2b2;\n    background-color: #f8f8f8;\n    background-image: linear-gradient(0deg, #b2b2b2, #b2b2b2 50%, transparent 50%);\n    color: #444; }\n    .bar.bar-stable .title {\n      color: #444; }\n    .bar.bar-stable.bar-footer {\n      background-image: linear-gradient(180deg, #b2b2b2, #b2b2b2 50%, transparent 50%); }\n  .bar.bar-positive {\n    border-color: #0c60ee;\n    background-color: #387ef5;\n    background-image: linear-gradient(0deg, #0c60ee, #0c60ee 50%, transparent 50%);\n    color: #fff; }\n    .bar.bar-positive .title {\n      color: #fff; }\n    .bar.bar-positive.bar-footer {\n      background-image: linear-gradient(180deg, #0c60ee, #0c60ee 50%, transparent 50%); }\n  .bar.bar-calm {\n    border-color: #0a9dc7;\n    background-color: #11c1f3;\n    background-image: linear-gradient(0deg, #0a9dc7, #0a9dc7 50%, transparent 50%);\n    color: #fff; }\n    .bar.bar-calm .title {\n      color: #fff; }\n    .bar.bar-calm.bar-footer {\n      background-image: linear-gradient(180deg, #0a9dc7, #0a9dc7 50%, transparent 50%); }\n  .bar.bar-assertive {\n    border-color: #e42112;\n    background-color: #ef473a;\n    background-image: linear-gradient(0deg, #e42112, #e42112 50%, transparent 50%);\n    color: #fff; }\n    .bar.bar-assertive .title {\n      color: #fff; }\n    .bar.bar-assertive.bar-footer {\n      background-image: linear-gradient(180deg, #e42112, #e42112 50%, transparent 50%); }\n  .bar.bar-balanced {\n    border-color: #28a54c;\n    background-color: #33cd5f;\n    background-image: linear-gradient(0deg, #28a54c, #28a54c 50%, transparent 50%);\n    color: #fff; }\n    .bar.bar-balanced .title {\n      color: #fff; }\n    .bar.bar-balanced.bar-footer {\n      background-image: linear-gradient(180deg, #28a54c, #28a54c 50%, transparent 50%); }\n  .bar.bar-energized {\n    border-color: #e6b500;\n    background-color: #ffc900;\n    background-image: linear-gradient(0deg, #e6b500, #e6b500 50%, transparent 50%);\n    color: #fff; }\n    .bar.bar-energized .title {\n      color: #fff; }\n    .bar.bar-energized.bar-footer {\n      background-image: linear-gradient(180deg, #e6b500, #e6b500 50%, transparent 50%); }\n  .bar.bar-royal {\n    border-color: #6b46e5;\n    background-color: #886aea;\n    background-image: linear-gradient(0deg, #6b46e5, #6b46e5 50%, transparent 50%);\n    color: #fff; }\n    .bar.bar-royal .title {\n      color: #fff; }\n    .bar.bar-royal.bar-footer {\n      background-image: linear-gradient(180deg, #6b46e5, #6b46e5 50%, transparent 50%); }\n  .bar.bar-dark {\n    border-color: #111;\n    background-color: #444444;\n    background-image: linear-gradient(0deg, #111, #111 50%, transparent 50%);\n    color: #fff; }\n    .bar.bar-dark .title {\n      color: #fff; }\n    .bar.bar-dark.bar-footer {\n      background-image: linear-gradient(180deg, #111, #111 50%, transparent 50%); }\n  .bar .title {\n    display: block;\n    position: absolute;\n    top: 0;\n    right: 0;\n    left: 0;\n    z-index: 0;\n    overflow: hidden;\n    margin: 0 10px;\n    min-width: 30px;\n    height: 43px;\n    text-align: center;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    font-size: 17px;\n    font-weight: 500;\n    line-height: 44px; }\n    .bar .title.title-left {\n      text-align: left; }\n    .bar .title.title-right {\n      text-align: right; }\n  .bar .title a {\n    color: inherit; }\n  .bar .button, .bar button {\n    z-index: 1;\n    padding: 0 8px;\n    min-width: initial;\n    min-height: 31px;\n    font-weight: 400;\n    font-size: 13px;\n    line-height: 32px; }\n    .bar .button.button-icon:before,\n    .bar .button .icon:before, .bar .button.icon:before, .bar .button.icon-left:before, .bar .button.icon-right:before, .bar button.button-icon:before,\n    .bar button .icon:before, .bar button.icon:before, .bar button.icon-left:before, .bar button.icon-right:before {\n      padding-right: 2px;\n      padding-left: 2px;\n      font-size: 20px;\n      line-height: 32px; }\n    .bar .button.button-icon, .bar button.button-icon {\n      font-size: 17px; }\n      .bar .button.button-icon .icon:before, .bar .button.button-icon:before, .bar .button.button-icon.icon-left:before, .bar .button.button-icon.icon-right:before, .bar button.button-icon .icon:before, .bar button.button-icon:before, .bar button.button-icon.icon-left:before, .bar button.button-icon.icon-right:before {\n        vertical-align: top;\n        font-size: 32px;\n        line-height: 32px; }\n    .bar .button.button-clear, .bar button.button-clear {\n      padding-right: 2px;\n      padding-left: 2px;\n      font-weight: 300;\n      font-size: 17px; }\n      .bar .button.button-clear .icon:before, .bar .button.button-clear.icon:before, .bar .button.button-clear.icon-left:before, .bar .button.button-clear.icon-right:before, .bar button.button-clear .icon:before, .bar button.button-clear.icon:before, .bar button.button-clear.icon-left:before, .bar button.button-clear.icon-right:before {\n        font-size: 32px;\n        line-height: 32px; }\n    .bar .button.back-button, .bar button.back-button {\n      display: block;\n      margin-right: 5px;\n      padding: 0;\n      white-space: nowrap;\n      font-weight: 400; }\n    .bar .button.back-button.active, .bar .button.back-button.activated, .bar button.back-button.active, .bar button.back-button.activated {\n      opacity: 0.2; }\n  .bar .button-bar > .button,\n  .bar .buttons > .button {\n    min-height: 31px;\n    line-height: 32px; }\n  .bar .button-bar + .button,\n  .bar .button + .button-bar {\n    margin-left: 5px; }\n  .bar .buttons,\n  .bar .buttons.primary-buttons,\n  .bar .buttons.secondary-buttons {\n    display: inherit; }\n  .bar .buttons span {\n    display: inline-block; }\n  .bar .buttons-left span {\n    margin-right: 5px;\n    display: inherit; }\n  .bar .buttons-right span {\n    margin-left: 5px;\n    display: inherit; }\n  .bar .title + .button:last-child,\n  .bar > .button + .button:last-child,\n  .bar > .button.pull-right,\n  .bar .buttons.pull-right,\n  .bar .title + .buttons {\n    position: absolute;\n    top: 5px;\n    right: 5px;\n    bottom: 5px; }\n\n.platform-android .nav-bar-has-subheader .bar {\n  background-image: none; }\n\n.platform-android .bar .back-button .icon:before {\n  font-size: 24px; }\n\n.platform-android .bar .title {\n  font-size: 19px;\n  line-height: 44px; }\n\n.bar-light .button {\n  border-color: #ddd;\n  background-color: white;\n  color: #444; }\n  .bar-light .button:hover {\n    color: #444;\n    text-decoration: none; }\n  .bar-light .button.active, .bar-light .button.activated {\n    border-color: #ccc;\n    background-color: #fafafa; }\n  .bar-light .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #444;\n    font-size: 17px; }\n  .bar-light .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-stable .button {\n  border-color: #b2b2b2;\n  background-color: #f8f8f8;\n  color: #444; }\n  .bar-stable .button:hover {\n    color: #444;\n    text-decoration: none; }\n  .bar-stable .button.active, .bar-stable .button.activated {\n    border-color: #a2a2a2;\n    background-color: #e5e5e5; }\n  .bar-stable .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #444;\n    font-size: 17px; }\n  .bar-stable .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-positive .button {\n  border-color: #0c60ee;\n  background-color: #387ef5;\n  color: #fff; }\n  .bar-positive .button:hover {\n    color: #fff;\n    text-decoration: none; }\n  .bar-positive .button.active, .bar-positive .button.activated {\n    border-color: #0c60ee;\n    background-color: #0c60ee; }\n  .bar-positive .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #fff;\n    font-size: 17px; }\n  .bar-positive .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-calm .button {\n  border-color: #0a9dc7;\n  background-color: #11c1f3;\n  color: #fff; }\n  .bar-calm .button:hover {\n    color: #fff;\n    text-decoration: none; }\n  .bar-calm .button.active, .bar-calm .button.activated {\n    border-color: #0a9dc7;\n    background-color: #0a9dc7; }\n  .bar-calm .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #fff;\n    font-size: 17px; }\n  .bar-calm .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-assertive .button {\n  border-color: #e42112;\n  background-color: #ef473a;\n  color: #fff; }\n  .bar-assertive .button:hover {\n    color: #fff;\n    text-decoration: none; }\n  .bar-assertive .button.active, .bar-assertive .button.activated {\n    border-color: #e42112;\n    background-color: #e42112; }\n  .bar-assertive .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #fff;\n    font-size: 17px; }\n  .bar-assertive .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-balanced .button {\n  border-color: #28a54c;\n  background-color: #33cd5f;\n  color: #fff; }\n  .bar-balanced .button:hover {\n    color: #fff;\n    text-decoration: none; }\n  .bar-balanced .button.active, .bar-balanced .button.activated {\n    border-color: #28a54c;\n    background-color: #28a54c; }\n  .bar-balanced .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #fff;\n    font-size: 17px; }\n  .bar-balanced .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-energized .button {\n  border-color: #e6b500;\n  background-color: #ffc900;\n  color: #fff; }\n  .bar-energized .button:hover {\n    color: #fff;\n    text-decoration: none; }\n  .bar-energized .button.active, .bar-energized .button.activated {\n    border-color: #e6b500;\n    background-color: #e6b500; }\n  .bar-energized .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #fff;\n    font-size: 17px; }\n  .bar-energized .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-royal .button {\n  border-color: #6b46e5;\n  background-color: #886aea;\n  color: #fff; }\n  .bar-royal .button:hover {\n    color: #fff;\n    text-decoration: none; }\n  .bar-royal .button.active, .bar-royal .button.activated {\n    border-color: #6b46e5;\n    background-color: #6b46e5; }\n  .bar-royal .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #fff;\n    font-size: 17px; }\n  .bar-royal .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-dark .button {\n  border-color: #111;\n  background-color: #444444;\n  color: #fff; }\n  .bar-dark .button:hover {\n    color: #fff;\n    text-decoration: none; }\n  .bar-dark .button.active, .bar-dark .button.activated {\n    border-color: #000;\n    background-color: #262626; }\n  .bar-dark .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #fff;\n    font-size: 17px; }\n  .bar-dark .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-header {\n  top: 0;\n  border-top-width: 0;\n  border-bottom-width: 1px; }\n  .bar-header.has-tabs-top {\n    border-bottom-width: 0px;\n    background-image: none; }\n\n.tabs-top .bar-header {\n  border-bottom-width: 0px;\n  background-image: none; }\n\n.bar-footer {\n  bottom: 0;\n  border-top-width: 1px;\n  border-bottom-width: 0;\n  background-position: top;\n  height: 44px; }\n  .bar-footer.item-input-inset {\n    position: absolute; }\n  .bar-footer .title {\n    height: 43px;\n    line-height: 44px; }\n\n.bar-tabs {\n  padding: 0; }\n\n.bar-subheader {\n  top: 44px;\n  height: 44px; }\n  .bar-subheader .title {\n    height: 43px;\n    line-height: 44px; }\n\n.bar-subfooter {\n  bottom: 44px;\n  height: 44px; }\n  .bar-subfooter .title {\n    height: 43px;\n    line-height: 44px; }\n\n.nav-bar-block {\n  position: absolute;\n  top: 0;\n  right: 0;\n  left: 0;\n  z-index: 9; }\n\n.bar .back-button.hide,\n.bar .buttons .hide {\n  display: none; }\n\n.nav-bar-tabs-top .bar {\n  background-image: none; }\n\n/**\n * Tabs\n * --------------------------------------------------\n * A navigation bar with any number of tab items supported.\n */\n.tabs {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-direction: normal;\n  -webkit-box-orient: horizontal;\n  -webkit-flex-direction: horizontal;\n  -moz-flex-direction: horizontal;\n  -ms-flex-direction: horizontal;\n  flex-direction: horizontal;\n  -webkit-box-pack: center;\n  -ms-flex-pack: center;\n  -webkit-justify-content: center;\n  -moz-justify-content: center;\n  justify-content: center;\n  -webkit-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n  border-color: #b2b2b2;\n  background-color: #f8f8f8;\n  background-image: linear-gradient(0deg, #b2b2b2, #b2b2b2 50%, transparent 50%);\n  color: #444;\n  position: absolute;\n  bottom: 0;\n  z-index: 5;\n  width: 100%;\n  height: 49px;\n  border-style: solid;\n  border-top-width: 1px;\n  background-size: 0;\n  line-height: 49px; }\n  .tabs .tab-item .badge {\n    background-color: #444;\n    color: #f8f8f8; }\n  @media (min--moz-device-pixel-ratio: 1.5), (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi), (min-resolution: 1.5dppx) {\n    .tabs {\n      padding-top: 2px;\n      border-top: none !important;\n      border-bottom: none;\n      background-position: top;\n      background-size: 100% 1px;\n      background-repeat: no-repeat; } }\n\n/* Allow parent element of tabs to define color, or just the tab itself */\n.tabs-light > .tabs,\n.tabs.tabs-light {\n  border-color: #ddd;\n  background-color: #fff;\n  background-image: linear-gradient(0deg, #ddd, #ddd 50%, transparent 50%);\n  color: #444; }\n  .tabs-light > .tabs .tab-item .badge,\n  .tabs.tabs-light .tab-item .badge {\n    background-color: #444;\n    color: #fff; }\n\n.tabs-stable > .tabs,\n.tabs.tabs-stable {\n  border-color: #b2b2b2;\n  background-color: #f8f8f8;\n  background-image: linear-gradient(0deg, #b2b2b2, #b2b2b2 50%, transparent 50%);\n  color: #444; }\n  .tabs-stable > .tabs .tab-item .badge,\n  .tabs.tabs-stable .tab-item .badge {\n    background-color: #444;\n    color: #f8f8f8; }\n\n.tabs-positive > .tabs,\n.tabs.tabs-positive {\n  border-color: #0c60ee;\n  background-color: #387ef5;\n  background-image: linear-gradient(0deg, #0c60ee, #0c60ee 50%, transparent 50%);\n  color: #fff; }\n  .tabs-positive > .tabs .tab-item .badge,\n  .tabs.tabs-positive .tab-item .badge {\n    background-color: #fff;\n    color: #387ef5; }\n\n.tabs-calm > .tabs,\n.tabs.tabs-calm {\n  border-color: #0a9dc7;\n  background-color: #11c1f3;\n  background-image: linear-gradient(0deg, #0a9dc7, #0a9dc7 50%, transparent 50%);\n  color: #fff; }\n  .tabs-calm > .tabs .tab-item .badge,\n  .tabs.tabs-calm .tab-item .badge {\n    background-color: #fff;\n    color: #11c1f3; }\n\n.tabs-assertive > .tabs,\n.tabs.tabs-assertive {\n  border-color: #e42112;\n  background-color: #ef473a;\n  background-image: linear-gradient(0deg, #e42112, #e42112 50%, transparent 50%);\n  color: #fff; }\n  .tabs-assertive > .tabs .tab-item .badge,\n  .tabs.tabs-assertive .tab-item .badge {\n    background-color: #fff;\n    color: #ef473a; }\n\n.tabs-balanced > .tabs,\n.tabs.tabs-balanced {\n  border-color: #28a54c;\n  background-color: #33cd5f;\n  background-image: linear-gradient(0deg, #28a54c, #28a54c 50%, transparent 50%);\n  color: #fff; }\n  .tabs-balanced > .tabs .tab-item .badge,\n  .tabs.tabs-balanced .tab-item .badge {\n    background-color: #fff;\n    color: #33cd5f; }\n\n.tabs-energized > .tabs,\n.tabs.tabs-energized {\n  border-color: #e6b500;\n  background-color: #ffc900;\n  background-image: linear-gradient(0deg, #e6b500, #e6b500 50%, transparent 50%);\n  color: #fff; }\n  .tabs-energized > .tabs .tab-item .badge,\n  .tabs.tabs-energized .tab-item .badge {\n    background-color: #fff;\n    color: #ffc900; }\n\n.tabs-royal > .tabs,\n.tabs.tabs-royal {\n  border-color: #6b46e5;\n  background-color: #886aea;\n  background-image: linear-gradient(0deg, #6b46e5, #6b46e5 50%, transparent 50%);\n  color: #fff; }\n  .tabs-royal > .tabs .tab-item .badge,\n  .tabs.tabs-royal .tab-item .badge {\n    background-color: #fff;\n    color: #886aea; }\n\n.tabs-dark > .tabs,\n.tabs.tabs-dark {\n  border-color: #111;\n  background-color: #444;\n  background-image: linear-gradient(0deg, #111, #111 50%, transparent 50%);\n  color: #fff; }\n  .tabs-dark > .tabs .tab-item .badge,\n  .tabs.tabs-dark .tab-item .badge {\n    background-color: #fff;\n    color: #444; }\n\n.tabs-striped .tabs {\n  background-color: white;\n  background-image: none;\n  border: none;\n  border-bottom: 1px solid #ddd;\n  padding-top: 2px; }\n\n.tabs-striped .tab-item.tab-item-active, .tabs-striped .tab-item.active, .tabs-striped .tab-item.activated {\n  margin-top: -2px;\n  border-style: solid;\n  border-width: 2px 0 0 0;\n  border-color: #444; }\n  .tabs-striped .tab-item.tab-item-active .badge, .tabs-striped .tab-item.active .badge, .tabs-striped .tab-item.activated .badge {\n    top: 2px;\n    opacity: 1; }\n\n.tabs-striped.tabs-light .tabs {\n  background-color: #fff; }\n\n.tabs-striped.tabs-light .tab-item {\n  color: rgba(68, 68, 68, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-light .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-light .tab-item.tab-item-active, .tabs-striped.tabs-light .tab-item.active, .tabs-striped.tabs-light .tab-item.activated {\n    margin-top: -2px;\n    color: #444;\n    border-style: solid;\n    border-width: 2px 0 0 0;\n    border-color: #444; }\n\n.tabs-striped.tabs-top .tab-item.tab-item-active .badge, .tabs-striped.tabs-top .tab-item.active .badge, .tabs-striped.tabs-top .tab-item.activated .badge {\n  top: 4%; }\n\n.tabs-striped.tabs-stable .tabs {\n  background-color: #f8f8f8; }\n\n.tabs-striped.tabs-stable .tab-item {\n  color: rgba(68, 68, 68, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-stable .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-stable .tab-item.tab-item-active, .tabs-striped.tabs-stable .tab-item.active, .tabs-striped.tabs-stable .tab-item.activated {\n    margin-top: -2px;\n    color: #444;\n    border-style: solid;\n    border-width: 2px 0 0 0;\n    border-color: #444; }\n\n.tabs-striped.tabs-top .tab-item.tab-item-active .badge, .tabs-striped.tabs-top .tab-item.active .badge, .tabs-striped.tabs-top .tab-item.activated .badge {\n  top: 4%; }\n\n.tabs-striped.tabs-positive .tabs {\n  background-color: #387ef5; }\n\n.tabs-striped.tabs-positive .tab-item {\n  color: rgba(255, 255, 255, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-positive .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-positive .tab-item.tab-item-active, .tabs-striped.tabs-positive .tab-item.active, .tabs-striped.tabs-positive .tab-item.activated {\n    margin-top: -2px;\n    color: #fff;\n    border-style: solid;\n    border-width: 2px 0 0 0;\n    border-color: #fff; }\n\n.tabs-striped.tabs-top .tab-item.tab-item-active .badge, .tabs-striped.tabs-top .tab-item.active .badge, .tabs-striped.tabs-top .tab-item.activated .badge {\n  top: 4%; }\n\n.tabs-striped.tabs-calm .tabs {\n  background-color: #11c1f3; }\n\n.tabs-striped.tabs-calm .tab-item {\n  color: rgba(255, 255, 255, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-calm .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-calm .tab-item.tab-item-active, .tabs-striped.tabs-calm .tab-item.active, .tabs-striped.tabs-calm .tab-item.activated {\n    margin-top: -2px;\n    color: #fff;\n    border-style: solid;\n    border-width: 2px 0 0 0;\n    border-color: #fff; }\n\n.tabs-striped.tabs-top .tab-item.tab-item-active .badge, .tabs-striped.tabs-top .tab-item.active .badge, .tabs-striped.tabs-top .tab-item.activated .badge {\n  top: 4%; }\n\n.tabs-striped.tabs-assertive .tabs {\n  background-color: #ef473a; }\n\n.tabs-striped.tabs-assertive .tab-item {\n  color: rgba(255, 255, 255, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-assertive .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-assertive .tab-item.tab-item-active, .tabs-striped.tabs-assertive .tab-item.active, .tabs-striped.tabs-assertive .tab-item.activated {\n    margin-top: -2px;\n    color: #fff;\n    border-style: solid;\n    border-width: 2px 0 0 0;\n    border-color: #fff; }\n\n.tabs-striped.tabs-top .tab-item.tab-item-active .badge, .tabs-striped.tabs-top .tab-item.active .badge, .tabs-striped.tabs-top .tab-item.activated .badge {\n  top: 4%; }\n\n.tabs-striped.tabs-balanced .tabs {\n  background-color: #33cd5f; }\n\n.tabs-striped.tabs-balanced .tab-item {\n  color: rgba(255, 255, 255, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-balanced .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-balanced .tab-item.tab-item-active, .tabs-striped.tabs-balanced .tab-item.active, .tabs-striped.tabs-balanced .tab-item.activated {\n    margin-top: -2px;\n    color: #fff;\n    border-style: solid;\n    border-width: 2px 0 0 0;\n    border-color: #fff; }\n\n.tabs-striped.tabs-top .tab-item.tab-item-active .badge, .tabs-striped.tabs-top .tab-item.active .badge, .tabs-striped.tabs-top .tab-item.activated .badge {\n  top: 4%; }\n\n.tabs-striped.tabs-energized .tabs {\n  background-color: #ffc900; }\n\n.tabs-striped.tabs-energized .tab-item {\n  color: rgba(255, 255, 255, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-energized .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-energized .tab-item.tab-item-active, .tabs-striped.tabs-energized .tab-item.active, .tabs-striped.tabs-energized .tab-item.activated {\n    margin-top: -2px;\n    color: #fff;\n    border-style: solid;\n    border-width: 2px 0 0 0;\n    border-color: #fff; }\n\n.tabs-striped.tabs-top .tab-item.tab-item-active .badge, .tabs-striped.tabs-top .tab-item.active .badge, .tabs-striped.tabs-top .tab-item.activated .badge {\n  top: 4%; }\n\n.tabs-striped.tabs-royal .tabs {\n  background-color: #886aea; }\n\n.tabs-striped.tabs-royal .tab-item {\n  color: rgba(255, 255, 255, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-royal .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-royal .tab-item.tab-item-active, .tabs-striped.tabs-royal .tab-item.active, .tabs-striped.tabs-royal .tab-item.activated {\n    margin-top: -2px;\n    color: #fff;\n    border-style: solid;\n    border-width: 2px 0 0 0;\n    border-color: #fff; }\n\n.tabs-striped.tabs-top .tab-item.tab-item-active .badge, .tabs-striped.tabs-top .tab-item.active .badge, .tabs-striped.tabs-top .tab-item.activated .badge {\n  top: 4%; }\n\n.tabs-striped.tabs-dark .tabs {\n  background-color: #444; }\n\n.tabs-striped.tabs-dark .tab-item {\n  color: rgba(255, 255, 255, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-dark .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-dark .tab-item.tab-item-active, .tabs-striped.tabs-dark .tab-item.active, .tabs-striped.tabs-dark .tab-item.activated {\n    margin-top: -2px;\n    color: #fff;\n    border-style: solid;\n    border-width: 2px 0 0 0;\n    border-color: #fff; }\n\n.tabs-striped.tabs-top .tab-item.tab-item-active .badge, .tabs-striped.tabs-top .tab-item.active .badge, .tabs-striped.tabs-top .tab-item.activated .badge {\n  top: 4%; }\n\n.tabs-striped.tabs-background-light .tabs {\n  background-color: #fff;\n  background-image: none; }\n\n.tabs-striped.tabs-background-stable .tabs {\n  background-color: #f8f8f8;\n  background-image: none; }\n\n.tabs-striped.tabs-background-positive .tabs {\n  background-color: #387ef5;\n  background-image: none; }\n\n.tabs-striped.tabs-background-calm .tabs {\n  background-color: #11c1f3;\n  background-image: none; }\n\n.tabs-striped.tabs-background-assertive .tabs {\n  background-color: #ef473a;\n  background-image: none; }\n\n.tabs-striped.tabs-background-balanced .tabs {\n  background-color: #33cd5f;\n  background-image: none; }\n\n.tabs-striped.tabs-background-energized .tabs {\n  background-color: #ffc900;\n  background-image: none; }\n\n.tabs-striped.tabs-background-royal .tabs {\n  background-color: #886aea;\n  background-image: none; }\n\n.tabs-striped.tabs-background-dark .tabs {\n  background-color: #444;\n  background-image: none; }\n\n.tabs-striped.tabs-color-light .tab-item {\n  color: rgba(255, 255, 255, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-color-light .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-color-light .tab-item.tab-item-active, .tabs-striped.tabs-color-light .tab-item.active, .tabs-striped.tabs-color-light .tab-item.activated {\n    margin-top: -2px;\n    color: #fff;\n    border: 0 solid #fff;\n    border-top-width: 2px; }\n    .tabs-striped.tabs-color-light .tab-item.tab-item-active .badge, .tabs-striped.tabs-color-light .tab-item.active .badge, .tabs-striped.tabs-color-light .tab-item.activated .badge {\n      top: 2px;\n      opacity: 1; }\n\n.tabs-striped.tabs-color-stable .tab-item {\n  color: rgba(248, 248, 248, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-color-stable .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-color-stable .tab-item.tab-item-active, .tabs-striped.tabs-color-stable .tab-item.active, .tabs-striped.tabs-color-stable .tab-item.activated {\n    margin-top: -2px;\n    color: #f8f8f8;\n    border: 0 solid #f8f8f8;\n    border-top-width: 2px; }\n    .tabs-striped.tabs-color-stable .tab-item.tab-item-active .badge, .tabs-striped.tabs-color-stable .tab-item.active .badge, .tabs-striped.tabs-color-stable .tab-item.activated .badge {\n      top: 2px;\n      opacity: 1; }\n\n.tabs-striped.tabs-color-positive .tab-item {\n  color: rgba(56, 126, 245, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-color-positive .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-color-positive .tab-item.tab-item-active, .tabs-striped.tabs-color-positive .tab-item.active, .tabs-striped.tabs-color-positive .tab-item.activated {\n    margin-top: -2px;\n    color: #387ef5;\n    border: 0 solid #387ef5;\n    border-top-width: 2px; }\n    .tabs-striped.tabs-color-positive .tab-item.tab-item-active .badge, .tabs-striped.tabs-color-positive .tab-item.active .badge, .tabs-striped.tabs-color-positive .tab-item.activated .badge {\n      top: 2px;\n      opacity: 1; }\n\n.tabs-striped.tabs-color-calm .tab-item {\n  color: rgba(17, 193, 243, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-color-calm .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-color-calm .tab-item.tab-item-active, .tabs-striped.tabs-color-calm .tab-item.active, .tabs-striped.tabs-color-calm .tab-item.activated {\n    margin-top: -2px;\n    color: #11c1f3;\n    border: 0 solid #11c1f3;\n    border-top-width: 2px; }\n    .tabs-striped.tabs-color-calm .tab-item.tab-item-active .badge, .tabs-striped.tabs-color-calm .tab-item.active .badge, .tabs-striped.tabs-color-calm .tab-item.activated .badge {\n      top: 2px;\n      opacity: 1; }\n\n.tabs-striped.tabs-color-assertive .tab-item {\n  color: rgba(239, 71, 58, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-color-assertive .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-color-assertive .tab-item.tab-item-active, .tabs-striped.tabs-color-assertive .tab-item.active, .tabs-striped.tabs-color-assertive .tab-item.activated {\n    margin-top: -2px;\n    color: #ef473a;\n    border: 0 solid #ef473a;\n    border-top-width: 2px; }\n    .tabs-striped.tabs-color-assertive .tab-item.tab-item-active .badge, .tabs-striped.tabs-color-assertive .tab-item.active .badge, .tabs-striped.tabs-color-assertive .tab-item.activated .badge {\n      top: 2px;\n      opacity: 1; }\n\n.tabs-striped.tabs-color-balanced .tab-item {\n  color: rgba(51, 205, 95, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-color-balanced .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-color-balanced .tab-item.tab-item-active, .tabs-striped.tabs-color-balanced .tab-item.active, .tabs-striped.tabs-color-balanced .tab-item.activated {\n    margin-top: -2px;\n    color: #33cd5f;\n    border: 0 solid #33cd5f;\n    border-top-width: 2px; }\n    .tabs-striped.tabs-color-balanced .tab-item.tab-item-active .badge, .tabs-striped.tabs-color-balanced .tab-item.active .badge, .tabs-striped.tabs-color-balanced .tab-item.activated .badge {\n      top: 2px;\n      opacity: 1; }\n\n.tabs-striped.tabs-color-energized .tab-item {\n  color: rgba(255, 201, 0, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-color-energized .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-color-energized .tab-item.tab-item-active, .tabs-striped.tabs-color-energized .tab-item.active, .tabs-striped.tabs-color-energized .tab-item.activated {\n    margin-top: -2px;\n    color: #ffc900;\n    border: 0 solid #ffc900;\n    border-top-width: 2px; }\n    .tabs-striped.tabs-color-energized .tab-item.tab-item-active .badge, .tabs-striped.tabs-color-energized .tab-item.active .badge, .tabs-striped.tabs-color-energized .tab-item.activated .badge {\n      top: 2px;\n      opacity: 1; }\n\n.tabs-striped.tabs-color-royal .tab-item {\n  color: rgba(136, 106, 234, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-color-royal .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-color-royal .tab-item.tab-item-active, .tabs-striped.tabs-color-royal .tab-item.active, .tabs-striped.tabs-color-royal .tab-item.activated {\n    margin-top: -2px;\n    color: #886aea;\n    border: 0 solid #886aea;\n    border-top-width: 2px; }\n    .tabs-striped.tabs-color-royal .tab-item.tab-item-active .badge, .tabs-striped.tabs-color-royal .tab-item.active .badge, .tabs-striped.tabs-color-royal .tab-item.activated .badge {\n      top: 2px;\n      opacity: 1; }\n\n.tabs-striped.tabs-color-dark .tab-item {\n  color: rgba(68, 68, 68, 0.4);\n  opacity: 1; }\n  .tabs-striped.tabs-color-dark .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-striped.tabs-color-dark .tab-item.tab-item-active, .tabs-striped.tabs-color-dark .tab-item.active, .tabs-striped.tabs-color-dark .tab-item.activated {\n    margin-top: -2px;\n    color: #444;\n    border: 0 solid #444;\n    border-top-width: 2px; }\n    .tabs-striped.tabs-color-dark .tab-item.tab-item-active .badge, .tabs-striped.tabs-color-dark .tab-item.active .badge, .tabs-striped.tabs-color-dark .tab-item.activated .badge {\n      top: 2px;\n      opacity: 1; }\n\n.tabs-background-light .tabs,\n.tabs-background-light > .tabs {\n  background-color: #fff;\n  background-image: linear-gradient(0deg, #ddd, #ddd 50%, transparent 50%);\n  border-color: #ddd; }\n\n.tabs-background-stable .tabs,\n.tabs-background-stable > .tabs {\n  background-color: #f8f8f8;\n  background-image: linear-gradient(0deg, #b2b2b2, #b2b2b2 50%, transparent 50%);\n  border-color: #b2b2b2; }\n\n.tabs-background-positive .tabs,\n.tabs-background-positive > .tabs {\n  background-color: #387ef5;\n  background-image: linear-gradient(0deg, #0c60ee, #0c60ee 50%, transparent 50%);\n  border-color: #0c60ee; }\n\n.tabs-background-calm .tabs,\n.tabs-background-calm > .tabs {\n  background-color: #11c1f3;\n  background-image: linear-gradient(0deg, #0a9dc7, #0a9dc7 50%, transparent 50%);\n  border-color: #0a9dc7; }\n\n.tabs-background-assertive .tabs,\n.tabs-background-assertive > .tabs {\n  background-color: #ef473a;\n  background-image: linear-gradient(0deg, #e42112, #e42112 50%, transparent 50%);\n  border-color: #e42112; }\n\n.tabs-background-balanced .tabs,\n.tabs-background-balanced > .tabs {\n  background-color: #33cd5f;\n  background-image: linear-gradient(0deg, #28a54c, #28a54c 50%, transparent 50%);\n  border-color: #28a54c; }\n\n.tabs-background-energized .tabs,\n.tabs-background-energized > .tabs {\n  background-color: #ffc900;\n  background-image: linear-gradient(0deg, #e6b500, #e6b500 50%, transparent 50%);\n  border-color: #e6b500; }\n\n.tabs-background-royal .tabs,\n.tabs-background-royal > .tabs {\n  background-color: #886aea;\n  background-image: linear-gradient(0deg, #6b46e5, #6b46e5 50%, transparent 50%);\n  border-color: #6b46e5; }\n\n.tabs-background-dark .tabs,\n.tabs-background-dark > .tabs {\n  background-color: #444;\n  background-image: linear-gradient(0deg, #111, #111 50%, transparent 50%);\n  border-color: #111; }\n\n.tabs-color-light .tab-item {\n  color: rgba(255, 255, 255, 0.4);\n  opacity: 1; }\n  .tabs-color-light .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-color-light .tab-item.tab-item-active, .tabs-color-light .tab-item.active, .tabs-color-light .tab-item.activated {\n    color: #fff;\n    border: 0 solid #fff; }\n    .tabs-color-light .tab-item.tab-item-active .badge, .tabs-color-light .tab-item.active .badge, .tabs-color-light .tab-item.activated .badge {\n      opacity: 1; }\n\n.tabs-color-stable .tab-item {\n  color: rgba(248, 248, 248, 0.4);\n  opacity: 1; }\n  .tabs-color-stable .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-color-stable .tab-item.tab-item-active, .tabs-color-stable .tab-item.active, .tabs-color-stable .tab-item.activated {\n    color: #f8f8f8;\n    border: 0 solid #f8f8f8; }\n    .tabs-color-stable .tab-item.tab-item-active .badge, .tabs-color-stable .tab-item.active .badge, .tabs-color-stable .tab-item.activated .badge {\n      opacity: 1; }\n\n.tabs-color-positive .tab-item {\n  color: rgba(56, 126, 245, 0.4);\n  opacity: 1; }\n  .tabs-color-positive .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-color-positive .tab-item.tab-item-active, .tabs-color-positive .tab-item.active, .tabs-color-positive .tab-item.activated {\n    color: #387ef5;\n    border: 0 solid #387ef5; }\n    .tabs-color-positive .tab-item.tab-item-active .badge, .tabs-color-positive .tab-item.active .badge, .tabs-color-positive .tab-item.activated .badge {\n      opacity: 1; }\n\n.tabs-color-calm .tab-item {\n  color: rgba(17, 193, 243, 0.4);\n  opacity: 1; }\n  .tabs-color-calm .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-color-calm .tab-item.tab-item-active, .tabs-color-calm .tab-item.active, .tabs-color-calm .tab-item.activated {\n    color: #11c1f3;\n    border: 0 solid #11c1f3; }\n    .tabs-color-calm .tab-item.tab-item-active .badge, .tabs-color-calm .tab-item.active .badge, .tabs-color-calm .tab-item.activated .badge {\n      opacity: 1; }\n\n.tabs-color-assertive .tab-item {\n  color: rgba(239, 71, 58, 0.4);\n  opacity: 1; }\n  .tabs-color-assertive .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-color-assertive .tab-item.tab-item-active, .tabs-color-assertive .tab-item.active, .tabs-color-assertive .tab-item.activated {\n    color: #ef473a;\n    border: 0 solid #ef473a; }\n    .tabs-color-assertive .tab-item.tab-item-active .badge, .tabs-color-assertive .tab-item.active .badge, .tabs-color-assertive .tab-item.activated .badge {\n      opacity: 1; }\n\n.tabs-color-balanced .tab-item {\n  color: rgba(51, 205, 95, 0.4);\n  opacity: 1; }\n  .tabs-color-balanced .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-color-balanced .tab-item.tab-item-active, .tabs-color-balanced .tab-item.active, .tabs-color-balanced .tab-item.activated {\n    color: #33cd5f;\n    border: 0 solid #33cd5f; }\n    .tabs-color-balanced .tab-item.tab-item-active .badge, .tabs-color-balanced .tab-item.active .badge, .tabs-color-balanced .tab-item.activated .badge {\n      opacity: 1; }\n\n.tabs-color-energized .tab-item {\n  color: rgba(255, 201, 0, 0.4);\n  opacity: 1; }\n  .tabs-color-energized .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-color-energized .tab-item.tab-item-active, .tabs-color-energized .tab-item.active, .tabs-color-energized .tab-item.activated {\n    color: #ffc900;\n    border: 0 solid #ffc900; }\n    .tabs-color-energized .tab-item.tab-item-active .badge, .tabs-color-energized .tab-item.active .badge, .tabs-color-energized .tab-item.activated .badge {\n      opacity: 1; }\n\n.tabs-color-royal .tab-item {\n  color: rgba(136, 106, 234, 0.4);\n  opacity: 1; }\n  .tabs-color-royal .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-color-royal .tab-item.tab-item-active, .tabs-color-royal .tab-item.active, .tabs-color-royal .tab-item.activated {\n    color: #886aea;\n    border: 0 solid #886aea; }\n    .tabs-color-royal .tab-item.tab-item-active .badge, .tabs-color-royal .tab-item.active .badge, .tabs-color-royal .tab-item.activated .badge {\n      opacity: 1; }\n\n.tabs-color-dark .tab-item {\n  color: rgba(68, 68, 68, 0.4);\n  opacity: 1; }\n  .tabs-color-dark .tab-item .badge {\n    opacity: 0.4; }\n  .tabs-color-dark .tab-item.tab-item-active, .tabs-color-dark .tab-item.active, .tabs-color-dark .tab-item.activated {\n    color: #444;\n    border: 0 solid #444; }\n    .tabs-color-dark .tab-item.tab-item-active .badge, .tabs-color-dark .tab-item.active .badge, .tabs-color-dark .tab-item.activated .badge {\n      opacity: 1; }\n\nion-tabs.tabs-color-active-light .tab-item {\n  color: #444; }\n  ion-tabs.tabs-color-active-light .tab-item.tab-item-active, ion-tabs.tabs-color-active-light .tab-item.active, ion-tabs.tabs-color-active-light .tab-item.activated {\n    color: #fff; }\n\nion-tabs.tabs-striped.tabs-color-active-light .tab-item.tab-item-active, ion-tabs.tabs-striped.tabs-color-active-light .tab-item.active, ion-tabs.tabs-striped.tabs-color-active-light .tab-item.activated {\n  border-color: #fff;\n  color: #fff; }\n\nion-tabs.tabs-color-active-stable .tab-item {\n  color: #444; }\n  ion-tabs.tabs-color-active-stable .tab-item.tab-item-active, ion-tabs.tabs-color-active-stable .tab-item.active, ion-tabs.tabs-color-active-stable .tab-item.activated {\n    color: #f8f8f8; }\n\nion-tabs.tabs-striped.tabs-color-active-stable .tab-item.tab-item-active, ion-tabs.tabs-striped.tabs-color-active-stable .tab-item.active, ion-tabs.tabs-striped.tabs-color-active-stable .tab-item.activated {\n  border-color: #f8f8f8;\n  color: #f8f8f8; }\n\nion-tabs.tabs-color-active-positive .tab-item {\n  color: #444; }\n  ion-tabs.tabs-color-active-positive .tab-item.tab-item-active, ion-tabs.tabs-color-active-positive .tab-item.active, ion-tabs.tabs-color-active-positive .tab-item.activated {\n    color: #387ef5; }\n\nion-tabs.tabs-striped.tabs-color-active-positive .tab-item.tab-item-active, ion-tabs.tabs-striped.tabs-color-active-positive .tab-item.active, ion-tabs.tabs-striped.tabs-color-active-positive .tab-item.activated {\n  border-color: #387ef5;\n  color: #387ef5; }\n\nion-tabs.tabs-color-active-calm .tab-item {\n  color: #444; }\n  ion-tabs.tabs-color-active-calm .tab-item.tab-item-active, ion-tabs.tabs-color-active-calm .tab-item.active, ion-tabs.tabs-color-active-calm .tab-item.activated {\n    color: #11c1f3; }\n\nion-tabs.tabs-striped.tabs-color-active-calm .tab-item.tab-item-active, ion-tabs.tabs-striped.tabs-color-active-calm .tab-item.active, ion-tabs.tabs-striped.tabs-color-active-calm .tab-item.activated {\n  border-color: #11c1f3;\n  color: #11c1f3; }\n\nion-tabs.tabs-color-active-assertive .tab-item {\n  color: #444; }\n  ion-tabs.tabs-color-active-assertive .tab-item.tab-item-active, ion-tabs.tabs-color-active-assertive .tab-item.active, ion-tabs.tabs-color-active-assertive .tab-item.activated {\n    color: #ef473a; }\n\nion-tabs.tabs-striped.tabs-color-active-assertive .tab-item.tab-item-active, ion-tabs.tabs-striped.tabs-color-active-assertive .tab-item.active, ion-tabs.tabs-striped.tabs-color-active-assertive .tab-item.activated {\n  border-color: #ef473a;\n  color: #ef473a; }\n\nion-tabs.tabs-color-active-balanced .tab-item {\n  color: #444; }\n  ion-tabs.tabs-color-active-balanced .tab-item.tab-item-active, ion-tabs.tabs-color-active-balanced .tab-item.active, ion-tabs.tabs-color-active-balanced .tab-item.activated {\n    color: #33cd5f; }\n\nion-tabs.tabs-striped.tabs-color-active-balanced .tab-item.tab-item-active, ion-tabs.tabs-striped.tabs-color-active-balanced .tab-item.active, ion-tabs.tabs-striped.tabs-color-active-balanced .tab-item.activated {\n  border-color: #33cd5f;\n  color: #33cd5f; }\n\nion-tabs.tabs-color-active-energized .tab-item {\n  color: #444; }\n  ion-tabs.tabs-color-active-energized .tab-item.tab-item-active, ion-tabs.tabs-color-active-energized .tab-item.active, ion-tabs.tabs-color-active-energized .tab-item.activated {\n    color: #ffc900; }\n\nion-tabs.tabs-striped.tabs-color-active-energized .tab-item.tab-item-active, ion-tabs.tabs-striped.tabs-color-active-energized .tab-item.active, ion-tabs.tabs-striped.tabs-color-active-energized .tab-item.activated {\n  border-color: #ffc900;\n  color: #ffc900; }\n\nion-tabs.tabs-color-active-royal .tab-item {\n  color: #444; }\n  ion-tabs.tabs-color-active-royal .tab-item.tab-item-active, ion-tabs.tabs-color-active-royal .tab-item.active, ion-tabs.tabs-color-active-royal .tab-item.activated {\n    color: #886aea; }\n\nion-tabs.tabs-striped.tabs-color-active-royal .tab-item.tab-item-active, ion-tabs.tabs-striped.tabs-color-active-royal .tab-item.active, ion-tabs.tabs-striped.tabs-color-active-royal .tab-item.activated {\n  border-color: #886aea;\n  color: #886aea; }\n\nion-tabs.tabs-color-active-dark .tab-item {\n  color: #fff; }\n  ion-tabs.tabs-color-active-dark .tab-item.tab-item-active, ion-tabs.tabs-color-active-dark .tab-item.active, ion-tabs.tabs-color-active-dark .tab-item.activated {\n    color: #444; }\n\nion-tabs.tabs-striped.tabs-color-active-dark .tab-item.tab-item-active, ion-tabs.tabs-striped.tabs-color-active-dark .tab-item.active, ion-tabs.tabs-striped.tabs-color-active-dark .tab-item.activated {\n  border-color: #444;\n  color: #444; }\n\n.tabs-top.tabs-striped {\n  padding-bottom: 0; }\n  .tabs-top.tabs-striped .tab-item {\n    background: transparent;\n    -webkit-transition: color .1s ease;\n    -moz-transition: color .1s ease;\n    -ms-transition: color .1s ease;\n    -o-transition: color .1s ease;\n    transition: color .1s ease; }\n    .tabs-top.tabs-striped .tab-item.tab-item-active, .tabs-top.tabs-striped .tab-item.active, .tabs-top.tabs-striped .tab-item.activated {\n      margin-top: 1px;\n      border-width: 0px 0px 2px 0px !important;\n      border-style: solid; }\n      .tabs-top.tabs-striped .tab-item.tab-item-active > .badge, .tabs-top.tabs-striped .tab-item.tab-item-active > i, .tabs-top.tabs-striped .tab-item.active > .badge, .tabs-top.tabs-striped .tab-item.active > i, .tabs-top.tabs-striped .tab-item.activated > .badge, .tabs-top.tabs-striped .tab-item.activated > i {\n        margin-top: -1px; }\n    .tabs-top.tabs-striped .tab-item .badge {\n      -webkit-transition: color .2s ease;\n      -moz-transition: color .2s ease;\n      -ms-transition: color .2s ease;\n      -o-transition: color .2s ease;\n      transition: color .2s ease; }\n  .tabs-top.tabs-striped:not(.tabs-icon-left):not(.tabs-icon-top) .tab-item.tab-item-active .tab-title, .tabs-top.tabs-striped:not(.tabs-icon-left):not(.tabs-icon-top) .tab-item.tab-item-active i, .tabs-top.tabs-striped:not(.tabs-icon-left):not(.tabs-icon-top) .tab-item.active .tab-title, .tabs-top.tabs-striped:not(.tabs-icon-left):not(.tabs-icon-top) .tab-item.active i, .tabs-top.tabs-striped:not(.tabs-icon-left):not(.tabs-icon-top) .tab-item.activated .tab-title, .tabs-top.tabs-striped:not(.tabs-icon-left):not(.tabs-icon-top) .tab-item.activated i {\n    display: block;\n    margin-top: -1px; }\n  .tabs-top.tabs-striped.tabs-icon-left .tab-item {\n    margin-top: 1px; }\n    .tabs-top.tabs-striped.tabs-icon-left .tab-item.tab-item-active .tab-title, .tabs-top.tabs-striped.tabs-icon-left .tab-item.tab-item-active i, .tabs-top.tabs-striped.tabs-icon-left .tab-item.active .tab-title, .tabs-top.tabs-striped.tabs-icon-left .tab-item.active i, .tabs-top.tabs-striped.tabs-icon-left .tab-item.activated .tab-title, .tabs-top.tabs-striped.tabs-icon-left .tab-item.activated i {\n      margin-top: -0.1em; }\n\n/* Allow parent element to have tabs-top */\n/* If you change this, change platform.scss as well */\n.tabs-top > .tabs,\n.tabs.tabs-top {\n  top: 44px;\n  padding-top: 0;\n  background-position: bottom;\n  border-top-width: 0;\n  border-bottom-width: 1px; }\n  .tabs-top > .tabs .tab-item.tab-item-active .badge, .tabs-top > .tabs .tab-item.active .badge, .tabs-top > .tabs .tab-item.activated .badge,\n  .tabs.tabs-top .tab-item.tab-item-active .badge,\n  .tabs.tabs-top .tab-item.active .badge,\n  .tabs.tabs-top .tab-item.activated .badge {\n    top: 4%; }\n\n.tabs-top ~ .bar-header {\n  border-bottom-width: 0; }\n\n.tab-item {\n  -webkit-box-flex: 1;\n  -webkit-flex: 1;\n  -moz-box-flex: 1;\n  -moz-flex: 1;\n  -ms-flex: 1;\n  flex: 1;\n  display: block;\n  overflow: hidden;\n  max-width: 150px;\n  height: 100%;\n  color: inherit;\n  text-align: center;\n  text-decoration: none;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  font-weight: 400;\n  font-size: 14px;\n  font-family: \"-apple-system\", \"Helvetica Neue\", \"Roboto\", \"Segoe UI\", sans-serif;\n  opacity: 0.7; }\n  .tab-item:hover {\n    cursor: pointer; }\n  .tab-item.tab-hidden {\n    display: none; }\n\n.tabs-item-hide > .tabs,\n.tabs.tabs-item-hide {\n  display: none; }\n\n.tabs-icon-top > .tabs .tab-item,\n.tabs-icon-top.tabs .tab-item,\n.tabs-icon-bottom > .tabs .tab-item,\n.tabs-icon-bottom.tabs .tab-item {\n  font-size: 10px;\n  line-height: 14px; }\n\n.tab-item .icon {\n  display: block;\n  margin: 0 auto;\n  height: 32px;\n  font-size: 32px; }\n\n.tabs-icon-left.tabs .tab-item,\n.tabs-icon-left > .tabs .tab-item,\n.tabs-icon-right.tabs .tab-item,\n.tabs-icon-right > .tabs .tab-item {\n  font-size: 10px; }\n  .tabs-icon-left.tabs .tab-item .icon, .tabs-icon-left.tabs .tab-item .tab-title,\n  .tabs-icon-left > .tabs .tab-item .icon,\n  .tabs-icon-left > .tabs .tab-item .tab-title,\n  .tabs-icon-right.tabs .tab-item .icon,\n  .tabs-icon-right.tabs .tab-item .tab-title,\n  .tabs-icon-right > .tabs .tab-item .icon,\n  .tabs-icon-right > .tabs .tab-item .tab-title {\n    display: inline-block;\n    vertical-align: top;\n    margin-top: -.1em; }\n    .tabs-icon-left.tabs .tab-item .icon:before, .tabs-icon-left.tabs .tab-item .tab-title:before,\n    .tabs-icon-left > .tabs .tab-item .icon:before,\n    .tabs-icon-left > .tabs .tab-item .tab-title:before,\n    .tabs-icon-right.tabs .tab-item .icon:before,\n    .tabs-icon-right.tabs .tab-item .tab-title:before,\n    .tabs-icon-right > .tabs .tab-item .icon:before,\n    .tabs-icon-right > .tabs .tab-item .tab-title:before {\n      font-size: 24px;\n      line-height: 49px; }\n\n.tabs-icon-left > .tabs .tab-item .icon,\n.tabs-icon-left.tabs .tab-item .icon {\n  padding-right: 3px; }\n\n.tabs-icon-right > .tabs .tab-item .icon,\n.tabs-icon-right.tabs .tab-item .icon {\n  padding-left: 3px; }\n\n.tabs-icon-only > .tabs .icon,\n.tabs-icon-only.tabs .icon {\n  line-height: inherit; }\n\n.tab-item.has-badge {\n  position: relative; }\n\n.tab-item .badge {\n  position: absolute;\n  top: 4%;\n  right: 33%;\n  right: calc(50% - 26px);\n  padding: 1px 6px;\n  height: auto;\n  font-size: 12px;\n  line-height: 16px; }\n\n/* Navigational tab */\n/* Active state for tab */\n.tab-item.tab-item-active,\n.tab-item.active,\n.tab-item.activated {\n  opacity: 1; }\n  .tab-item.tab-item-active.tab-item-light,\n  .tab-item.active.tab-item-light,\n  .tab-item.activated.tab-item-light {\n    color: #fff; }\n  .tab-item.tab-item-active.tab-item-stable,\n  .tab-item.active.tab-item-stable,\n  .tab-item.activated.tab-item-stable {\n    color: #f8f8f8; }\n  .tab-item.tab-item-active.tab-item-positive,\n  .tab-item.active.tab-item-positive,\n  .tab-item.activated.tab-item-positive {\n    color: #387ef5; }\n  .tab-item.tab-item-active.tab-item-calm,\n  .tab-item.active.tab-item-calm,\n  .tab-item.activated.tab-item-calm {\n    color: #11c1f3; }\n  .tab-item.tab-item-active.tab-item-assertive,\n  .tab-item.active.tab-item-assertive,\n  .tab-item.activated.tab-item-assertive {\n    color: #ef473a; }\n  .tab-item.tab-item-active.tab-item-balanced,\n  .tab-item.active.tab-item-balanced,\n  .tab-item.activated.tab-item-balanced {\n    color: #33cd5f; }\n  .tab-item.tab-item-active.tab-item-energized,\n  .tab-item.active.tab-item-energized,\n  .tab-item.activated.tab-item-energized {\n    color: #ffc900; }\n  .tab-item.tab-item-active.tab-item-royal,\n  .tab-item.active.tab-item-royal,\n  .tab-item.activated.tab-item-royal {\n    color: #886aea; }\n  .tab-item.tab-item-active.tab-item-dark,\n  .tab-item.active.tab-item-dark,\n  .tab-item.activated.tab-item-dark {\n    color: #444; }\n\n.item.tabs {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  padding: 0; }\n  .item.tabs .icon:before {\n    position: relative; }\n\n.tab-item.disabled,\n.tab-item[disabled] {\n  opacity: .4;\n  cursor: default;\n  pointer-events: none; }\n\n.nav-bar-tabs-top.hide ~ .view-container .tabs-top .tabs {\n  top: 0; }\n\n.pane[hide-nav-bar=\"true\"] .has-tabs-top {\n  top: 49px; }\n\n/**\n * Menus\n * --------------------------------------------------\n * Side panel structure\n */\n.menu {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  z-index: 0;\n  overflow: hidden;\n  min-height: 100%;\n  max-height: 100%;\n  width: 275px;\n  background-color: #fff; }\n  .menu .scroll-content {\n    z-index: 10; }\n  .menu .bar-header {\n    z-index: 11; }\n\n.menu-content {\n  -webkit-transform: none;\n  transform: none;\n  box-shadow: -1px 0px 2px rgba(0, 0, 0, 0.2), 1px 0px 2px rgba(0, 0, 0, 0.2); }\n\n.menu-open .menu-content .pane,\n.menu-open .menu-content .scroll-content {\n  pointer-events: none; }\n\n.menu-open .menu-content .scroll-content .scroll {\n  pointer-events: none; }\n\n.menu-open .menu-content .scroll-content:not(.overflow-scroll) {\n  overflow: hidden; }\n\n.grade-b .menu-content,\n.grade-c .menu-content {\n  -webkit-box-sizing: content-box;\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  right: -1px;\n  left: -1px;\n  border-right: 1px solid #ccc;\n  border-left: 1px solid #ccc;\n  box-shadow: none; }\n\n.menu-left {\n  left: 0; }\n\n.menu-right {\n  right: 0; }\n\n.aside-open.aside-resizing .menu-right {\n  display: none; }\n\n.menu-animated {\n  -webkit-transition: -webkit-transform 200ms ease;\n  transition: transform 200ms ease; }\n\n/**\n * Modals\n * --------------------------------------------------\n * Modals are independent windows that slide in from off-screen.\n */\n.modal-backdrop,\n.modal-backdrop-bg {\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: 10;\n  width: 100%;\n  height: 100%; }\n\n.modal-backdrop-bg {\n  pointer-events: none; }\n\n.modal {\n  display: block;\n  position: absolute;\n  top: 0;\n  z-index: 10;\n  overflow: hidden;\n  min-height: 100%;\n  width: 100%;\n  background-color: #fff; }\n\n@media (min-width: 680px) {\n  .modal {\n    top: 20%;\n    right: 20%;\n    bottom: 20%;\n    left: 20%;\n    min-height: 240px;\n    width: 60%; }\n  .modal.ng-leave-active {\n    bottom: 0; }\n  .platform-ios.platform-cordova .modal-wrapper .modal .bar-header:not(.bar-subheader) {\n    height: 44px; }\n    .platform-ios.platform-cordova .modal-wrapper .modal .bar-header:not(.bar-subheader) > * {\n      margin-top: 0; }\n  .platform-ios.platform-cordova .modal-wrapper .modal .tabs-top > .tabs,\n  .platform-ios.platform-cordova .modal-wrapper .modal .tabs.tabs-top {\n    top: 44px; }\n  .platform-ios.platform-cordova .modal-wrapper .modal .has-header,\n  .platform-ios.platform-cordova .modal-wrapper .modal .bar-subheader {\n    top: 44px; }\n  .platform-ios.platform-cordova .modal-wrapper .modal .has-subheader {\n    top: 88px; }\n  .platform-ios.platform-cordova .modal-wrapper .modal .has-header.has-tabs-top {\n    top: 93px; }\n  .platform-ios.platform-cordova .modal-wrapper .modal .has-header.has-subheader.has-tabs-top {\n    top: 137px; }\n  .modal-backdrop-bg {\n    -webkit-transition: opacity 300ms ease-in-out;\n    transition: opacity 300ms ease-in-out;\n    background-color: #000;\n    opacity: 0; }\n  .active .modal-backdrop-bg {\n    opacity: 0.5; } }\n\n.modal-open {\n  pointer-events: none; }\n  .modal-open .modal,\n  .modal-open .modal-backdrop {\n    pointer-events: auto; }\n  .modal-open.loading-active .modal,\n  .modal-open.loading-active .modal-backdrop {\n    pointer-events: none; }\n\n/**\n * Popovers\n * --------------------------------------------------\n * Popovers are independent views which float over content\n */\n.popover-backdrop {\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: 10;\n  width: 100%;\n  height: 100%;\n  background-color: transparent; }\n  .popover-backdrop.active {\n    background-color: rgba(0, 0, 0, 0.1); }\n\n.popover {\n  position: absolute;\n  top: 25%;\n  left: 50%;\n  z-index: 10;\n  display: block;\n  margin-top: 12px;\n  margin-left: -110px;\n  height: 280px;\n  width: 220px;\n  background-color: #fff;\n  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);\n  opacity: 0; }\n  .popover .item:first-child {\n    border-top: 0; }\n  .popover .item:last-child {\n    border-bottom: 0; }\n  .popover.popover-bottom {\n    margin-top: -12px; }\n\n.popover,\n.popover .bar-header {\n  border-radius: 2px; }\n\n.popover .scroll-content {\n  z-index: 1;\n  margin: 2px 0; }\n\n.popover .bar-header {\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0; }\n\n.popover .has-header {\n  border-top-right-radius: 0;\n  border-top-left-radius: 0; }\n\n.popover-arrow {\n  display: none; }\n\n.platform-ios .popover {\n  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);\n  border-radius: 10px; }\n\n.platform-ios .popover .bar-header {\n  -webkit-border-top-right-radius: 10px;\n  border-top-right-radius: 10px;\n  -webkit-border-top-left-radius: 10px;\n  border-top-left-radius: 10px; }\n\n.platform-ios .popover .scroll-content {\n  margin: 8px 0;\n  border-radius: 10px; }\n\n.platform-ios .popover .scroll-content.has-header {\n  margin-top: 0; }\n\n.platform-ios .popover-arrow {\n  position: absolute;\n  display: block;\n  top: -17px;\n  width: 30px;\n  height: 19px;\n  overflow: hidden; }\n  .platform-ios .popover-arrow:after {\n    position: absolute;\n    top: 12px;\n    left: 5px;\n    width: 20px;\n    height: 20px;\n    background-color: #fff;\n    border-radius: 3px;\n    content: '';\n    -webkit-transform: rotate(-45deg);\n    transform: rotate(-45deg); }\n\n.platform-ios .popover-bottom .popover-arrow {\n  top: auto;\n  bottom: -10px; }\n  .platform-ios .popover-bottom .popover-arrow:after {\n    top: -6px; }\n\n.platform-android .popover {\n  margin-top: -32px;\n  background-color: #fafafa;\n  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }\n  .platform-android .popover .item {\n    border-color: #fafafa;\n    background-color: #fafafa;\n    color: #4d4d4d; }\n  .platform-android .popover.popover-bottom {\n    margin-top: 32px; }\n\n.platform-android .popover-backdrop,\n.platform-android .popover-backdrop.active {\n  background-color: transparent; }\n\n.popover-open {\n  pointer-events: none; }\n  .popover-open .popover,\n  .popover-open .popover-backdrop {\n    pointer-events: auto; }\n  .popover-open.loading-active .popover,\n  .popover-open.loading-active .popover-backdrop {\n    pointer-events: none; }\n\n@media (min-width: 680px) {\n  .popover {\n    width: 360px;\n    margin-left: -180px; } }\n\n/**\n * Popups\n * --------------------------------------------------\n */\n.popup-container {\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n  background: transparent;\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-pack: center;\n  -ms-flex-pack: center;\n  -webkit-justify-content: center;\n  -moz-justify-content: center;\n  justify-content: center;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  z-index: 12;\n  visibility: hidden; }\n  .popup-container.popup-showing {\n    visibility: visible; }\n  .popup-container.popup-hidden .popup {\n    -webkit-animation-name: scaleOut;\n    animation-name: scaleOut;\n    -webkit-animation-duration: 0.1s;\n    animation-duration: 0.1s;\n    -webkit-animation-timing-function: ease-in-out;\n    animation-timing-function: ease-in-out;\n    -webkit-animation-fill-mode: both;\n    animation-fill-mode: both; }\n  .popup-container.active .popup {\n    -webkit-animation-name: superScaleIn;\n    animation-name: superScaleIn;\n    -webkit-animation-duration: 0.2s;\n    animation-duration: 0.2s;\n    -webkit-animation-timing-function: ease-in-out;\n    animation-timing-function: ease-in-out;\n    -webkit-animation-fill-mode: both;\n    animation-fill-mode: both; }\n  .popup-container .popup {\n    width: 250px;\n    max-width: 100%;\n    max-height: 90%;\n    border-radius: 0px;\n    background-color: rgba(255, 255, 255, 0.9);\n    display: -webkit-box;\n    display: -webkit-flex;\n    display: -moz-box;\n    display: -moz-flex;\n    display: -ms-flexbox;\n    display: flex;\n    -webkit-box-direction: normal;\n    -webkit-box-orient: vertical;\n    -webkit-flex-direction: column;\n    -moz-flex-direction: column;\n    -ms-flex-direction: column;\n    flex-direction: column; }\n  .popup-container input,\n  .popup-container textarea {\n    width: 100%; }\n\n.popup-head {\n  padding: 15px 10px;\n  border-bottom: 1px solid #eee;\n  text-align: center; }\n\n.popup-title {\n  margin: 0;\n  padding: 0;\n  font-size: 15px; }\n\n.popup-sub-title {\n  margin: 5px 0 0 0;\n  padding: 0;\n  font-weight: normal;\n  font-size: 11px; }\n\n.popup-body {\n  padding: 10px;\n  overflow: auto; }\n\n.popup-buttons {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-direction: normal;\n  -webkit-box-orient: horizontal;\n  -webkit-flex-direction: row;\n  -moz-flex-direction: row;\n  -ms-flex-direction: row;\n  flex-direction: row;\n  padding: 10px;\n  min-height: 65px; }\n  .popup-buttons .button {\n    -webkit-box-flex: 1;\n    -webkit-flex: 1;\n    -moz-box-flex: 1;\n    -moz-flex: 1;\n    -ms-flex: 1;\n    flex: 1;\n    display: block;\n    min-height: 45px;\n    border-radius: 2px;\n    line-height: 20px;\n    margin-right: 5px; }\n    .popup-buttons .button:last-child {\n      margin-right: 0px; }\n\n.popup-open {\n  pointer-events: none; }\n  .popup-open.modal-open .modal {\n    pointer-events: none; }\n  .popup-open .popup-backdrop, .popup-open .popup {\n    pointer-events: auto; }\n\n/**\n * Loading\n * --------------------------------------------------\n */\n.loading-container {\n  position: absolute;\n  left: 0;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  z-index: 13;\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-pack: center;\n  -ms-flex-pack: center;\n  -webkit-justify-content: center;\n  -moz-justify-content: center;\n  justify-content: center;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  -webkit-transition: 0.2s opacity linear;\n  transition: 0.2s opacity linear;\n  visibility: hidden;\n  opacity: 0; }\n  .loading-container:not(.visible) .icon,\n  .loading-container:not(.visible) .spinner {\n    display: none; }\n  .loading-container.visible {\n    visibility: visible; }\n  .loading-container.active {\n    opacity: 1; }\n  .loading-container .loading {\n    padding: 20px;\n    border-radius: 5px;\n    background-color: rgba(0, 0, 0, 0.7);\n    color: #fff;\n    text-align: center;\n    text-overflow: ellipsis;\n    font-size: 15px; }\n    .loading-container .loading h1, .loading-container .loading h2, .loading-container .loading h3, .loading-container .loading h4, .loading-container .loading h5, .loading-container .loading h6 {\n      color: #fff; }\n\n/**\n * Items\n * --------------------------------------------------\n */\n.item {\n  border-color: #ddd;\n  background-color: #fff;\n  color: #444;\n  position: relative;\n  z-index: 2;\n  display: block;\n  margin: -1px;\n  padding: 16px;\n  border-width: 1px;\n  border-style: solid;\n  font-size: 16px; }\n  .item h2 {\n    margin: 0 0 2px 0;\n    font-size: 16px;\n    font-weight: normal; }\n  .item h3 {\n    margin: 0 0 4px 0;\n    font-size: 14px; }\n  .item h4 {\n    margin: 0 0 4px 0;\n    font-size: 12px; }\n  .item h5, .item h6 {\n    margin: 0 0 3px 0;\n    font-size: 10px; }\n  .item p {\n    color: #666;\n    font-size: 14px;\n    margin-bottom: 2px; }\n  .item h1:last-child,\n  .item h2:last-child,\n  .item h3:last-child,\n  .item h4:last-child,\n  .item h5:last-child,\n  .item h6:last-child,\n  .item p:last-child {\n    margin-bottom: 0; }\n  .item .badge {\n    display: -webkit-box;\n    display: -webkit-flex;\n    display: -moz-box;\n    display: -moz-flex;\n    display: -ms-flexbox;\n    display: flex;\n    position: absolute;\n    top: 16px;\n    right: 32px; }\n  .item.item-button-right .badge {\n    right: 67px; }\n  .item.item-divider .badge {\n    top: 8px; }\n  .item .badge + .badge {\n    margin-right: 5px; }\n  .item.item-light {\n    border-color: #ddd;\n    background-color: #fff;\n    color: #444; }\n  .item.item-stable {\n    border-color: #b2b2b2;\n    background-color: #f8f8f8;\n    color: #444; }\n  .item.item-positive {\n    border-color: #0c60ee;\n    background-color: #387ef5;\n    color: #fff; }\n  .item.item-calm {\n    border-color: #0a9dc7;\n    background-color: #11c1f3;\n    color: #fff; }\n  .item.item-assertive {\n    border-color: #e42112;\n    background-color: #ef473a;\n    color: #fff; }\n  .item.item-balanced {\n    border-color: #28a54c;\n    background-color: #33cd5f;\n    color: #fff; }\n  .item.item-energized {\n    border-color: #e6b500;\n    background-color: #ffc900;\n    color: #fff; }\n  .item.item-royal {\n    border-color: #6b46e5;\n    background-color: #886aea;\n    color: #fff; }\n  .item.item-dark {\n    border-color: #111;\n    background-color: #444;\n    color: #fff; }\n  .item[ng-click]:hover {\n    cursor: pointer; }\n\n.list-borderless .item,\n.item-borderless {\n  border-width: 0; }\n\n.item.active,\n.item.activated,\n.item-complex.active .item-content,\n.item-complex.activated .item-content,\n.item .item-content.active,\n.item .item-content.activated {\n  border-color: #ccc;\n  background-color: #D9D9D9; }\n  .item.active.item-complex > .item-content,\n  .item.activated.item-complex > .item-content,\n  .item-complex.active .item-content.item-complex > .item-content,\n  .item-complex.activated .item-content.item-complex > .item-content,\n  .item .item-content.active.item-complex > .item-content,\n  .item .item-content.activated.item-complex > .item-content {\n    border-color: #ccc;\n    background-color: #D9D9D9; }\n  .item.active.item-light,\n  .item.activated.item-light,\n  .item-complex.active .item-content.item-light,\n  .item-complex.activated .item-content.item-light,\n  .item .item-content.active.item-light,\n  .item .item-content.activated.item-light {\n    border-color: #ccc;\n    background-color: #fafafa; }\n    .item.active.item-light.item-complex > .item-content,\n    .item.activated.item-light.item-complex > .item-content,\n    .item-complex.active .item-content.item-light.item-complex > .item-content,\n    .item-complex.activated .item-content.item-light.item-complex > .item-content,\n    .item .item-content.active.item-light.item-complex > .item-content,\n    .item .item-content.activated.item-light.item-complex > .item-content {\n      border-color: #ccc;\n      background-color: #fafafa; }\n  .item.active.item-stable,\n  .item.activated.item-stable,\n  .item-complex.active .item-content.item-stable,\n  .item-complex.activated .item-content.item-stable,\n  .item .item-content.active.item-stable,\n  .item .item-content.activated.item-stable {\n    border-color: #a2a2a2;\n    background-color: #e5e5e5; }\n    .item.active.item-stable.item-complex > .item-content,\n    .item.activated.item-stable.item-complex > .item-content,\n    .item-complex.active .item-content.item-stable.item-complex > .item-content,\n    .item-complex.activated .item-content.item-stable.item-complex > .item-content,\n    .item .item-content.active.item-stable.item-complex > .item-content,\n    .item .item-content.activated.item-stable.item-complex > .item-content {\n      border-color: #a2a2a2;\n      background-color: #e5e5e5; }\n  .item.active.item-positive,\n  .item.activated.item-positive,\n  .item-complex.active .item-content.item-positive,\n  .item-complex.activated .item-content.item-positive,\n  .item .item-content.active.item-positive,\n  .item .item-content.activated.item-positive {\n    border-color: #0c60ee;\n    background-color: #0c60ee; }\n    .item.active.item-positive.item-complex > .item-content,\n    .item.activated.item-positive.item-complex > .item-content,\n    .item-complex.active .item-content.item-positive.item-complex > .item-content,\n    .item-complex.activated .item-content.item-positive.item-complex > .item-content,\n    .item .item-content.active.item-positive.item-complex > .item-content,\n    .item .item-content.activated.item-positive.item-complex > .item-content {\n      border-color: #0c60ee;\n      background-color: #0c60ee; }\n  .item.active.item-calm,\n  .item.activated.item-calm,\n  .item-complex.active .item-content.item-calm,\n  .item-complex.activated .item-content.item-calm,\n  .item .item-content.active.item-calm,\n  .item .item-content.activated.item-calm {\n    border-color: #0a9dc7;\n    background-color: #0a9dc7; }\n    .item.active.item-calm.item-complex > .item-content,\n    .item.activated.item-calm.item-complex > .item-content,\n    .item-complex.active .item-content.item-calm.item-complex > .item-content,\n    .item-complex.activated .item-content.item-calm.item-complex > .item-content,\n    .item .item-content.active.item-calm.item-complex > .item-content,\n    .item .item-content.activated.item-calm.item-complex > .item-content {\n      border-color: #0a9dc7;\n      background-color: #0a9dc7; }\n  .item.active.item-assertive,\n  .item.activated.item-assertive,\n  .item-complex.active .item-content.item-assertive,\n  .item-complex.activated .item-content.item-assertive,\n  .item .item-content.active.item-assertive,\n  .item .item-content.activated.item-assertive {\n    border-color: #e42112;\n    background-color: #e42112; }\n    .item.active.item-assertive.item-complex > .item-content,\n    .item.activated.item-assertive.item-complex > .item-content,\n    .item-complex.active .item-content.item-assertive.item-complex > .item-content,\n    .item-complex.activated .item-content.item-assertive.item-complex > .item-content,\n    .item .item-content.active.item-assertive.item-complex > .item-content,\n    .item .item-content.activated.item-assertive.item-complex > .item-content {\n      border-color: #e42112;\n      background-color: #e42112; }\n  .item.active.item-balanced,\n  .item.activated.item-balanced,\n  .item-complex.active .item-content.item-balanced,\n  .item-complex.activated .item-content.item-balanced,\n  .item .item-content.active.item-balanced,\n  .item .item-content.activated.item-balanced {\n    border-color: #28a54c;\n    background-color: #28a54c; }\n    .item.active.item-balanced.item-complex > .item-content,\n    .item.activated.item-balanced.item-complex > .item-content,\n    .item-complex.active .item-content.item-balanced.item-complex > .item-content,\n    .item-complex.activated .item-content.item-balanced.item-complex > .item-content,\n    .item .item-content.active.item-balanced.item-complex > .item-content,\n    .item .item-content.activated.item-balanced.item-complex > .item-content {\n      border-color: #28a54c;\n      background-color: #28a54c; }\n  .item.active.item-energized,\n  .item.activated.item-energized,\n  .item-complex.active .item-content.item-energized,\n  .item-complex.activated .item-content.item-energized,\n  .item .item-content.active.item-energized,\n  .item .item-content.activated.item-energized {\n    border-color: #e6b500;\n    background-color: #e6b500; }\n    .item.active.item-energized.item-complex > .item-content,\n    .item.activated.item-energized.item-complex > .item-content,\n    .item-complex.active .item-content.item-energized.item-complex > .item-content,\n    .item-complex.activated .item-content.item-energized.item-complex > .item-content,\n    .item .item-content.active.item-energized.item-complex > .item-content,\n    .item .item-content.activated.item-energized.item-complex > .item-content {\n      border-color: #e6b500;\n      background-color: #e6b500; }\n  .item.active.item-royal,\n  .item.activated.item-royal,\n  .item-complex.active .item-content.item-royal,\n  .item-complex.activated .item-content.item-royal,\n  .item .item-content.active.item-royal,\n  .item .item-content.activated.item-royal {\n    border-color: #6b46e5;\n    background-color: #6b46e5; }\n    .item.active.item-royal.item-complex > .item-content,\n    .item.activated.item-royal.item-complex > .item-content,\n    .item-complex.active .item-content.item-royal.item-complex > .item-content,\n    .item-complex.activated .item-content.item-royal.item-complex > .item-content,\n    .item .item-content.active.item-royal.item-complex > .item-content,\n    .item .item-content.activated.item-royal.item-complex > .item-content {\n      border-color: #6b46e5;\n      background-color: #6b46e5; }\n  .item.active.item-dark,\n  .item.activated.item-dark,\n  .item-complex.active .item-content.item-dark,\n  .item-complex.activated .item-content.item-dark,\n  .item .item-content.active.item-dark,\n  .item .item-content.activated.item-dark {\n    border-color: #000;\n    background-color: #262626; }\n    .item.active.item-dark.item-complex > .item-content,\n    .item.activated.item-dark.item-complex > .item-content,\n    .item-complex.active .item-content.item-dark.item-complex > .item-content,\n    .item-complex.activated .item-content.item-dark.item-complex > .item-content,\n    .item .item-content.active.item-dark.item-complex > .item-content,\n    .item .item-content.activated.item-dark.item-complex > .item-content {\n      border-color: #000;\n      background-color: #262626; }\n\n.item,\n.item h1,\n.item h2,\n.item h3,\n.item h4,\n.item h5,\n.item h6,\n.item p,\n.item-content,\n.item-content h1,\n.item-content h2,\n.item-content h3,\n.item-content h4,\n.item-content h5,\n.item-content h6,\n.item-content p {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap; }\n\na.item {\n  color: inherit;\n  text-decoration: none; }\n  a.item:hover, a.item:focus {\n    text-decoration: none; }\n\n/**\n * Complex Items\n * --------------------------------------------------\n * Adding .item-complex allows the .item to be slidable and\n * have options underneath the button, but also requires an\n * additional .item-content element inside .item.\n * Basically .item-complex removes any default settings which\n * .item added, so that .item-content looks them as just .item.\n */\n.item-complex,\na.item.item-complex,\nbutton.item.item-complex {\n  padding: 0; }\n\n.item-complex .item-content,\n.item-radio .item-content {\n  position: relative;\n  z-index: 2;\n  padding: 16px 49px 16px 16px;\n  border: none;\n  background-color: #fff; }\n\na.item-content {\n  display: block;\n  color: inherit;\n  text-decoration: none; }\n\n.item-text-wrap .item,\n.item-text-wrap .item-content,\n.item-text-wrap,\n.item-text-wrap h1,\n.item-text-wrap h2,\n.item-text-wrap h3,\n.item-text-wrap h4,\n.item-text-wrap h5,\n.item-text-wrap h6,\n.item-text-wrap p,\n.item-complex.item-text-wrap .item-content,\n.item-body h1,\n.item-body h2,\n.item-body h3,\n.item-body h4,\n.item-body h5,\n.item-body h6,\n.item-body p {\n  overflow: visible;\n  white-space: normal; }\n\n.item-complex.item-text-wrap,\n.item-complex.item-text-wrap h1,\n.item-complex.item-text-wrap h2,\n.item-complex.item-text-wrap h3,\n.item-complex.item-text-wrap h4,\n.item-complex.item-text-wrap h5,\n.item-complex.item-text-wrap h6,\n.item-complex.item-text-wrap p {\n  overflow: visible;\n  white-space: normal; }\n\n.item-complex.item-light > .item-content {\n  border-color: #ddd;\n  background-color: #fff;\n  color: #444; }\n  .item-complex.item-light > .item-content.active, .item-complex.item-light > .item-content:active {\n    border-color: #ccc;\n    background-color: #fafafa; }\n    .item-complex.item-light > .item-content.active.item-complex > .item-content, .item-complex.item-light > .item-content:active.item-complex > .item-content {\n      border-color: #ccc;\n      background-color: #fafafa; }\n\n.item-complex.item-stable > .item-content {\n  border-color: #b2b2b2;\n  background-color: #f8f8f8;\n  color: #444; }\n  .item-complex.item-stable > .item-content.active, .item-complex.item-stable > .item-content:active {\n    border-color: #a2a2a2;\n    background-color: #e5e5e5; }\n    .item-complex.item-stable > .item-content.active.item-complex > .item-content, .item-complex.item-stable > .item-content:active.item-complex > .item-content {\n      border-color: #a2a2a2;\n      background-color: #e5e5e5; }\n\n.item-complex.item-positive > .item-content {\n  border-color: #0c60ee;\n  background-color: #387ef5;\n  color: #fff; }\n  .item-complex.item-positive > .item-content.active, .item-complex.item-positive > .item-content:active {\n    border-color: #0c60ee;\n    background-color: #0c60ee; }\n    .item-complex.item-positive > .item-content.active.item-complex > .item-content, .item-complex.item-positive > .item-content:active.item-complex > .item-content {\n      border-color: #0c60ee;\n      background-color: #0c60ee; }\n\n.item-complex.item-calm > .item-content {\n  border-color: #0a9dc7;\n  background-color: #11c1f3;\n  color: #fff; }\n  .item-complex.item-calm > .item-content.active, .item-complex.item-calm > .item-content:active {\n    border-color: #0a9dc7;\n    background-color: #0a9dc7; }\n    .item-complex.item-calm > .item-content.active.item-complex > .item-content, .item-complex.item-calm > .item-content:active.item-complex > .item-content {\n      border-color: #0a9dc7;\n      background-color: #0a9dc7; }\n\n.item-complex.item-assertive > .item-content {\n  border-color: #e42112;\n  background-color: #ef473a;\n  color: #fff; }\n  .item-complex.item-assertive > .item-content.active, .item-complex.item-assertive > .item-content:active {\n    border-color: #e42112;\n    background-color: #e42112; }\n    .item-complex.item-assertive > .item-content.active.item-complex > .item-content, .item-complex.item-assertive > .item-content:active.item-complex > .item-content {\n      border-color: #e42112;\n      background-color: #e42112; }\n\n.item-complex.item-balanced > .item-content {\n  border-color: #28a54c;\n  background-color: #33cd5f;\n  color: #fff; }\n  .item-complex.item-balanced > .item-content.active, .item-complex.item-balanced > .item-content:active {\n    border-color: #28a54c;\n    background-color: #28a54c; }\n    .item-complex.item-balanced > .item-content.active.item-complex > .item-content, .item-complex.item-balanced > .item-content:active.item-complex > .item-content {\n      border-color: #28a54c;\n      background-color: #28a54c; }\n\n.item-complex.item-energized > .item-content {\n  border-color: #e6b500;\n  background-color: #ffc900;\n  color: #fff; }\n  .item-complex.item-energized > .item-content.active, .item-complex.item-energized > .item-content:active {\n    border-color: #e6b500;\n    background-color: #e6b500; }\n    .item-complex.item-energized > .item-content.active.item-complex > .item-content, .item-complex.item-energized > .item-content:active.item-complex > .item-content {\n      border-color: #e6b500;\n      background-color: #e6b500; }\n\n.item-complex.item-royal > .item-content {\n  border-color: #6b46e5;\n  background-color: #886aea;\n  color: #fff; }\n  .item-complex.item-royal > .item-content.active, .item-complex.item-royal > .item-content:active {\n    border-color: #6b46e5;\n    background-color: #6b46e5; }\n    .item-complex.item-royal > .item-content.active.item-complex > .item-content, .item-complex.item-royal > .item-content:active.item-complex > .item-content {\n      border-color: #6b46e5;\n      background-color: #6b46e5; }\n\n.item-complex.item-dark > .item-content {\n  border-color: #111;\n  background-color: #444;\n  color: #fff; }\n  .item-complex.item-dark > .item-content.active, .item-complex.item-dark > .item-content:active {\n    border-color: #000;\n    background-color: #262626; }\n    .item-complex.item-dark > .item-content.active.item-complex > .item-content, .item-complex.item-dark > .item-content:active.item-complex > .item-content {\n      border-color: #000;\n      background-color: #262626; }\n\n/**\n * Item Icons\n * --------------------------------------------------\n */\n.item-icon-left .icon,\n.item-icon-right .icon {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  position: absolute;\n  top: 0;\n  height: 100%;\n  font-size: 32px; }\n  .item-icon-left .icon:before,\n  .item-icon-right .icon:before {\n    display: block;\n    width: 32px;\n    text-align: center; }\n\n.item .fill-icon {\n  min-width: 30px;\n  min-height: 30px;\n  font-size: 28px; }\n\n.item-icon-left {\n  padding-left: 54px; }\n  .item-icon-left .icon {\n    left: 11px; }\n\n.item-complex.item-icon-left {\n  padding-left: 0; }\n  .item-complex.item-icon-left .item-content {\n    padding-left: 54px; }\n\n.item-icon-right {\n  padding-right: 54px; }\n  .item-icon-right .icon {\n    right: 11px; }\n\n.item-complex.item-icon-right {\n  padding-right: 0; }\n  .item-complex.item-icon-right .item-content {\n    padding-right: 54px; }\n\n.item-icon-left.item-icon-right .icon:first-child {\n  right: auto; }\n\n.item-icon-left.item-icon-right .icon:last-child,\n.item-icon-left .item-delete .icon {\n  left: auto; }\n\n.item-icon-left .icon-accessory,\n.item-icon-right .icon-accessory {\n  color: #ccc;\n  font-size: 16px; }\n\n.item-icon-left .icon-accessory {\n  left: 3px; }\n\n.item-icon-right .icon-accessory {\n  right: 3px; }\n\n/**\n * Item Button\n * --------------------------------------------------\n * An item button is a child button inside an .item (not the entire .item)\n */\n.item-button-left {\n  padding-left: 72px; }\n\n.item-button-left > .button,\n.item-button-left .item-content > .button {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  position: absolute;\n  top: 8px;\n  left: 11px;\n  min-width: 34px;\n  min-height: 34px;\n  font-size: 18px;\n  line-height: 32px; }\n  .item-button-left > .button .icon:before,\n  .item-button-left .item-content > .button .icon:before {\n    position: relative;\n    left: auto;\n    width: auto;\n    line-height: 31px; }\n  .item-button-left > .button > .button,\n  .item-button-left .item-content > .button > .button {\n    margin: 0px 2px;\n    min-height: 34px;\n    font-size: 18px;\n    line-height: 32px; }\n\n.item-button-right,\na.item.item-button-right,\nbutton.item.item-button-right {\n  padding-right: 80px; }\n\n.item-button-right > .button,\n.item-button-right .item-content > .button,\n.item-button-right > .buttons,\n.item-button-right .item-content > .buttons {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  position: absolute;\n  top: 8px;\n  right: 16px;\n  min-width: 34px;\n  min-height: 34px;\n  font-size: 18px;\n  line-height: 32px; }\n  .item-button-right > .button .icon:before,\n  .item-button-right .item-content > .button .icon:before,\n  .item-button-right > .buttons .icon:before,\n  .item-button-right .item-content > .buttons .icon:before {\n    position: relative;\n    left: auto;\n    width: auto;\n    line-height: 31px; }\n  .item-button-right > .button > .button,\n  .item-button-right .item-content > .button > .button,\n  .item-button-right > .buttons > .button,\n  .item-button-right .item-content > .buttons > .button {\n    margin: 0px 2px;\n    min-width: 34px;\n    min-height: 34px;\n    font-size: 18px;\n    line-height: 32px; }\n\n.item-button-left.item-button-right .button:first-child {\n  right: auto; }\n\n.item-button-left.item-button-right .button:last-child {\n  left: auto; }\n\n.item-avatar,\n.item-avatar .item-content,\n.item-avatar-left,\n.item-avatar-left .item-content {\n  padding-left: 72px;\n  min-height: 72px; }\n  .item-avatar > img:first-child,\n  .item-avatar .item-image,\n  .item-avatar .item-content > img:first-child,\n  .item-avatar .item-content .item-image,\n  .item-avatar-left > img:first-child,\n  .item-avatar-left .item-image,\n  .item-avatar-left .item-content > img:first-child,\n  .item-avatar-left .item-content .item-image {\n    position: absolute;\n    top: 16px;\n    left: 16px;\n    max-width: 40px;\n    max-height: 40px;\n    width: 100%;\n    height: 100%;\n    border-radius: 50%; }\n\n.item-avatar-right,\n.item-avatar-right .item-content {\n  padding-right: 72px;\n  min-height: 72px; }\n  .item-avatar-right > img:first-child,\n  .item-avatar-right .item-image,\n  .item-avatar-right .item-content > img:first-child,\n  .item-avatar-right .item-content .item-image {\n    position: absolute;\n    top: 16px;\n    right: 16px;\n    max-width: 40px;\n    max-height: 40px;\n    width: 100%;\n    height: 100%;\n    border-radius: 50%; }\n\n.item-thumbnail-left,\n.item-thumbnail-left .item-content {\n  padding-top: 8px;\n  padding-left: 106px;\n  min-height: 100px; }\n  .item-thumbnail-left > img:first-child,\n  .item-thumbnail-left .item-image,\n  .item-thumbnail-left .item-content > img:first-child,\n  .item-thumbnail-left .item-content .item-image {\n    position: absolute;\n    top: 10px;\n    left: 10px;\n    max-width: 80px;\n    max-height: 80px;\n    width: 100%;\n    height: 100%; }\n\n.item-avatar.item-complex,\n.item-avatar-left.item-complex,\n.item-thumbnail-left.item-complex {\n  padding-top: 0;\n  padding-left: 0; }\n\n.item-thumbnail-right,\n.item-thumbnail-right .item-content {\n  padding-top: 8px;\n  padding-right: 106px;\n  min-height: 100px; }\n  .item-thumbnail-right > img:first-child,\n  .item-thumbnail-right .item-image,\n  .item-thumbnail-right .item-content > img:first-child,\n  .item-thumbnail-right .item-content .item-image {\n    position: absolute;\n    top: 10px;\n    right: 10px;\n    max-width: 80px;\n    max-height: 80px;\n    width: 100%;\n    height: 100%; }\n\n.item-avatar-right.item-complex,\n.item-thumbnail-right.item-complex {\n  padding-top: 0;\n  padding-right: 0; }\n\n.item-image {\n  padding: 0;\n  text-align: center; }\n  .item-image img:first-child, .item-image .list-img {\n    width: 100%;\n    vertical-align: middle; }\n\n.item-body {\n  overflow: auto;\n  padding: 16px;\n  text-overflow: inherit;\n  white-space: normal; }\n  .item-body h1, .item-body h2, .item-body h3, .item-body h4, .item-body h5, .item-body h6, .item-body p {\n    margin-top: 16px;\n    margin-bottom: 16px; }\n\n.item-divider {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  min-height: 30px;\n  background-color: #f5f5f5;\n  color: #222;\n  font-weight: 500; }\n\n.platform-ios .item-divider-platform,\n.item-divider-ios {\n  padding-top: 26px;\n  text-transform: uppercase;\n  font-weight: 300;\n  font-size: 13px;\n  background-color: #efeff4;\n  color: #555; }\n\n.platform-android .item-divider-platform,\n.item-divider-android {\n  font-weight: 300;\n  font-size: 13px; }\n\n.item-note {\n  float: right;\n  color: #aaa;\n  font-size: 14px; }\n\n.item-left-editable .item-content,\n.item-right-editable .item-content {\n  -webkit-transition-duration: 250ms;\n  transition-duration: 250ms;\n  -webkit-transition-timing-function: ease-in-out;\n  transition-timing-function: ease-in-out;\n  -webkit-transition-property: -webkit-transform;\n  -moz-transition-property: -moz-transform;\n  transition-property: transform; }\n\n.list-left-editing .item-left-editable .item-content,\n.item-left-editing.item-left-editable .item-content {\n  -webkit-transform: translate3d(50px, 0, 0);\n  transform: translate3d(50px, 0, 0); }\n\n.item-remove-animate.ng-leave {\n  -webkit-transition-duration: 300ms;\n  transition-duration: 300ms; }\n\n.item-remove-animate.ng-leave .item-content, .item-remove-animate.ng-leave:last-of-type {\n  -webkit-transition-duration: 300ms;\n  transition-duration: 300ms;\n  -webkit-transition-timing-function: ease-in;\n  transition-timing-function: ease-in;\n  -webkit-transition-property: all;\n  transition-property: all; }\n\n.item-remove-animate.ng-leave.ng-leave-active .item-content {\n  opacity: 0;\n  -webkit-transform: translate3d(-100%, 0, 0) !important;\n  transform: translate3d(-100%, 0, 0) !important; }\n\n.item-remove-animate.ng-leave.ng-leave-active:last-of-type {\n  opacity: 0; }\n\n.item-remove-animate.ng-leave.ng-leave-active ~ ion-item:not(.ng-leave) {\n  -webkit-transform: translate3d(0, -webkit-calc(-100% + 1px), 0);\n  transform: translate3d(0, calc(-100% + 1px), 0);\n  -webkit-transition-duration: 300ms;\n  transition-duration: 300ms;\n  -webkit-transition-timing-function: cubic-bezier(0.25, 0.81, 0.24, 1);\n  transition-timing-function: cubic-bezier(0.25, 0.81, 0.24, 1);\n  -webkit-transition-property: all;\n  transition-property: all; }\n\n.item-left-edit {\n  -webkit-transition: all ease-in-out 125ms;\n  transition: all ease-in-out 125ms;\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 0;\n  width: 50px;\n  height: 100%;\n  line-height: 100%;\n  display: none;\n  opacity: 0;\n  -webkit-transform: translate3d(-21px, 0, 0);\n  transform: translate3d(-21px, 0, 0); }\n  .item-left-edit .button {\n    height: 100%; }\n    .item-left-edit .button.icon {\n      display: -webkit-box;\n      display: -webkit-flex;\n      display: -moz-box;\n      display: -moz-flex;\n      display: -ms-flexbox;\n      display: flex;\n      -webkit-box-align: center;\n      -ms-flex-align: center;\n      -webkit-align-items: center;\n      -moz-align-items: center;\n      align-items: center;\n      position: absolute;\n      top: 0;\n      height: 100%; }\n  .item-left-edit.visible {\n    display: block; }\n    .item-left-edit.visible.active {\n      opacity: 1;\n      -webkit-transform: translate3d(8px, 0, 0);\n      transform: translate3d(8px, 0, 0); }\n\n.list-left-editing .item-left-edit {\n  -webkit-transition-delay: 125ms;\n  transition-delay: 125ms; }\n\n.item-delete .button.icon {\n  color: #ef473a;\n  font-size: 24px; }\n  .item-delete .button.icon:hover {\n    opacity: .7; }\n\n.item-right-edit {\n  -webkit-transition: all ease-in-out 250ms;\n  transition: all ease-in-out 250ms;\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 3;\n  width: 75px;\n  height: 100%;\n  background: inherit;\n  padding-left: 20px;\n  display: block;\n  opacity: 0;\n  -webkit-transform: translate3d(75px, 0, 0);\n  transform: translate3d(75px, 0, 0); }\n  .item-right-edit .button {\n    min-width: 50px;\n    height: 100%; }\n    .item-right-edit .button.icon {\n      display: -webkit-box;\n      display: -webkit-flex;\n      display: -moz-box;\n      display: -moz-flex;\n      display: -ms-flexbox;\n      display: flex;\n      -webkit-box-align: center;\n      -ms-flex-align: center;\n      -webkit-align-items: center;\n      -moz-align-items: center;\n      align-items: center;\n      position: absolute;\n      top: 0;\n      height: 100%;\n      font-size: 32px; }\n  .item-right-edit.visible {\n    display: block; }\n    .item-right-edit.visible.active {\n      opacity: 1;\n      -webkit-transform: translate3d(0, 0, 0);\n      transform: translate3d(0, 0, 0); }\n\n.item-reorder .button.icon {\n  color: #444;\n  font-size: 32px; }\n\n.item-reordering {\n  position: absolute;\n  left: 0;\n  top: 0;\n  z-index: 9;\n  width: 100%;\n  box-shadow: 0px 0px 10px 0px #aaa; }\n  .item-reordering .item-reorder {\n    z-index: 9; }\n\n.item-placeholder {\n  opacity: 0.7; }\n\n/**\n * The hidden right-side buttons that can be exposed under a list item\n * with dragging.\n */\n.item-options {\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 1;\n  height: 100%; }\n  .item-options .button {\n    height: 100%;\n    border: none;\n    border-radius: 0;\n    display: -webkit-inline-box;\n    display: -webkit-inline-flex;\n    display: -moz-inline-flex;\n    display: -ms-inline-flexbox;\n    display: inline-flex;\n    -webkit-box-align: center;\n    -ms-flex-align: center;\n    -webkit-align-items: center;\n    -moz-align-items: center;\n    align-items: center; }\n    .item-options .button:before {\n      margin: 0 auto; }\n  .item-options ion-option-button:last-child {\n    padding-right: calc(constant(safe-area-inset-right) + 12px);\n    padding-right: calc(env(safe-area-inset-right) + 12px); }\n\n/**\n * Lists\n * --------------------------------------------------\n */\n.list {\n  position: relative;\n  padding-top: 1px;\n  padding-bottom: 1px;\n  padding-left: 0;\n  margin-bottom: 20px; }\n\n.list:last-child {\n  margin-bottom: 0px; }\n  .list:last-child.card {\n    margin-bottom: 40px; }\n\n/**\n * List Header\n * --------------------------------------------------\n */\n.list-header {\n  margin-top: 20px;\n  padding: 5px 15px;\n  background-color: transparent;\n  color: #222;\n  font-weight: bold; }\n\n.card.list .list-item {\n  padding-right: 1px;\n  padding-left: 1px; }\n\n/**\n * Cards and Inset Lists\n * --------------------------------------------------\n * A card and list-inset are close to the same thing, except a card as a box shadow.\n */\n.card,\n.list-inset {\n  overflow: hidden;\n  margin: 20px 10px;\n  border-radius: 2px;\n  background-color: #fff; }\n\n.card {\n  padding-top: 1px;\n  padding-bottom: 1px;\n  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }\n  .card .item {\n    border-left: 0;\n    border-right: 0; }\n  .card .item:first-child {\n    border-top: 0; }\n  .card .item:last-child {\n    border-bottom: 0; }\n\n.padding .card, .padding .list-inset {\n  margin-left: 0;\n  margin-right: 0; }\n\n.card .item:first-child,\n.list-inset .item:first-child,\n.padding > .list .item:first-child {\n  border-top-left-radius: 2px;\n  border-top-right-radius: 2px; }\n  .card .item:first-child .item-content,\n  .list-inset .item:first-child .item-content,\n  .padding > .list .item:first-child .item-content {\n    border-top-left-radius: 2px;\n    border-top-right-radius: 2px; }\n\n.card .item:last-child,\n.list-inset .item:last-child,\n.padding > .list .item:last-child {\n  border-bottom-right-radius: 2px;\n  border-bottom-left-radius: 2px; }\n  .card .item:last-child .item-content,\n  .list-inset .item:last-child .item-content,\n  .padding > .list .item:last-child .item-content {\n    border-bottom-right-radius: 2px;\n    border-bottom-left-radius: 2px; }\n\n.card .item:last-child,\n.list-inset .item:last-child {\n  margin-bottom: -1px; }\n\n.card .item,\n.list-inset .item,\n.padding > .list .item,\n.padding-horizontal > .list .item {\n  margin-right: 0;\n  margin-left: 0; }\n  .card .item.item-input input,\n  .list-inset .item.item-input input,\n  .padding > .list .item.item-input input,\n  .padding-horizontal > .list .item.item-input input {\n    padding-right: 44px; }\n\n.padding-left > .list .item {\n  margin-left: 0; }\n\n.padding-right > .list .item {\n  margin-right: 0; }\n\n/**\n * Badges\n * --------------------------------------------------\n */\n.badge {\n  background-color: transparent;\n  color: #AAAAAA;\n  z-index: 1;\n  display: inline-block;\n  padding: 3px 8px;\n  min-width: 10px;\n  border-radius: 10px;\n  vertical-align: baseline;\n  text-align: center;\n  white-space: nowrap;\n  font-weight: bold;\n  font-size: 14px;\n  line-height: 16px; }\n  .badge:empty {\n    display: none; }\n\n.tabs .tab-item .badge.badge-light,\n.badge.badge-light {\n  background-color: #fff;\n  color: #444; }\n\n.tabs .tab-item .badge.badge-stable,\n.badge.badge-stable {\n  background-color: #f8f8f8;\n  color: #444; }\n\n.tabs .tab-item .badge.badge-positive,\n.badge.badge-positive {\n  background-color: #387ef5;\n  color: #fff; }\n\n.tabs .tab-item .badge.badge-calm,\n.badge.badge-calm {\n  background-color: #11c1f3;\n  color: #fff; }\n\n.tabs .tab-item .badge.badge-assertive,\n.badge.badge-assertive {\n  background-color: #ef473a;\n  color: #fff; }\n\n.tabs .tab-item .badge.badge-balanced,\n.badge.badge-balanced {\n  background-color: #33cd5f;\n  color: #fff; }\n\n.tabs .tab-item .badge.badge-energized,\n.badge.badge-energized {\n  background-color: #ffc900;\n  color: #fff; }\n\n.tabs .tab-item .badge.badge-royal,\n.badge.badge-royal {\n  background-color: #886aea;\n  color: #fff; }\n\n.tabs .tab-item .badge.badge-dark,\n.badge.badge-dark {\n  background-color: #444;\n  color: #fff; }\n\n.button .badge {\n  position: relative;\n  top: -1px; }\n\n/**\n * Slide Box\n * --------------------------------------------------\n */\n.slider {\n  position: relative;\n  visibility: hidden;\n  overflow: hidden; }\n\n.slider-slides {\n  position: relative;\n  height: 100%; }\n\n.slider-slide {\n  position: relative;\n  display: block;\n  float: left;\n  width: 100%;\n  height: 100%;\n  vertical-align: top; }\n\n.slider-slide-image > img {\n  width: 100%; }\n\n.slider-pager {\n  position: absolute;\n  bottom: 20px;\n  z-index: 1;\n  width: 100%;\n  height: 15px;\n  text-align: center; }\n  .slider-pager .slider-pager-page {\n    display: inline-block;\n    margin: 0px 3px;\n    width: 15px;\n    color: #000;\n    text-decoration: none;\n    opacity: 0.3; }\n    .slider-pager .slider-pager-page.active {\n      -webkit-transition: opacity 0.4s ease-in;\n      transition: opacity 0.4s ease-in;\n      opacity: 1; }\n\n.slider-slide.ng-enter, .slider-slide.ng-leave, .slider-slide.ng-animate,\n.slider-pager-page.ng-enter,\n.slider-pager-page.ng-leave,\n.slider-pager-page.ng-animate {\n  -webkit-transition: none !important;\n  transition: none !important; }\n\n.slider-slide.ng-animate,\n.slider-pager-page.ng-animate {\n  -webkit-animation: none 0s;\n  animation: none 0s; }\n\n/**\n * Swiper 3.2.7\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n *\n * http://www.idangero.us/swiper/\n *\n * Copyright 2015, Vladimir Kharlampidi\n * The iDangero.us\n * http://www.idangero.us/\n *\n * Licensed under MIT\n *\n * Released on: December 7, 2015\n */\n.swiper-container {\n  margin: 0 auto;\n  position: relative;\n  overflow: hidden;\n  /* Fix of Webkit flickering */\n  z-index: 1; }\n\n.swiper-container-no-flexbox .swiper-slide {\n  float: left; }\n\n.swiper-container-vertical > .swiper-wrapper {\n  -webkit-box-orient: vertical;\n  -moz-box-orient: vertical;\n  -ms-flex-direction: column;\n  -webkit-flex-direction: column;\n  flex-direction: column; }\n\n.swiper-wrapper {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  z-index: 1;\n  display: -webkit-box;\n  display: -moz-box;\n  display: -ms-flexbox;\n  display: -webkit-flex;\n  display: flex;\n  -webkit-transition-property: -webkit-transform;\n  -moz-transition-property: -moz-transform;\n  -o-transition-property: -o-transform;\n  -ms-transition-property: -ms-transform;\n  transition-property: transform;\n  -webkit-box-sizing: content-box;\n  -moz-box-sizing: content-box;\n  box-sizing: content-box; }\n\n.swiper-container-android .swiper-slide,\n.swiper-wrapper {\n  -webkit-transform: translate3d(0px, 0, 0);\n  -moz-transform: translate3d(0px, 0, 0);\n  -o-transform: translate(0px, 0px);\n  -ms-transform: translate3d(0px, 0, 0);\n  transform: translate3d(0px, 0, 0); }\n\n.swiper-container-multirow > .swiper-wrapper {\n  -webkit-box-lines: multiple;\n  -moz-box-lines: multiple;\n  -ms-flex-wrap: wrap;\n  -webkit-flex-wrap: wrap;\n  flex-wrap: wrap; }\n\n.swiper-container-free-mode > .swiper-wrapper {\n  -webkit-transition-timing-function: ease-out;\n  -moz-transition-timing-function: ease-out;\n  -ms-transition-timing-function: ease-out;\n  -o-transition-timing-function: ease-out;\n  transition-timing-function: ease-out;\n  margin: 0 auto; }\n\n.swiper-slide {\n  display: block;\n  -webkit-flex-shrink: 0;\n  -ms-flex: 0 0 auto;\n  flex-shrink: 0;\n  width: 100%;\n  height: 100%;\n  position: relative; }\n\n/* Auto Height */\n.swiper-container-autoheight,\n.swiper-container-autoheight .swiper-slide {\n  height: auto; }\n\n.swiper-container-autoheight .swiper-wrapper {\n  -webkit-box-align: start;\n  -ms-flex-align: start;\n  -webkit-align-items: flex-start;\n  align-items: flex-start;\n  -webkit-transition-property: -webkit-transform, height;\n  -moz-transition-property: -moz-transform;\n  -o-transition-property: -o-transform;\n  -ms-transition-property: -ms-transform;\n  transition-property: transform, height; }\n\n/* a11y */\n.swiper-container .swiper-notification {\n  position: absolute;\n  left: 0;\n  top: 0;\n  pointer-events: none;\n  opacity: 0;\n  z-index: -1000; }\n\n/* IE10 Windows Phone 8 Fixes */\n.swiper-wp8-horizontal {\n  -ms-touch-action: pan-y;\n  touch-action: pan-y; }\n\n.swiper-wp8-vertical {\n  -ms-touch-action: pan-x;\n  touch-action: pan-x; }\n\n/* Arrows */\n.swiper-button-prev,\n.swiper-button-next {\n  position: absolute;\n  top: 50%;\n  width: 27px;\n  height: 44px;\n  margin-top: -22px;\n  z-index: 10;\n  cursor: pointer;\n  -moz-background-size: 27px 44px;\n  -webkit-background-size: 27px 44px;\n  background-size: 27px 44px;\n  background-position: center;\n  background-repeat: no-repeat; }\n\n.swiper-button-prev.swiper-button-disabled,\n.swiper-button-next.swiper-button-disabled {\n  opacity: 0.35;\n  cursor: auto;\n  pointer-events: none; }\n\n.swiper-button-prev,\n.swiper-container-rtl .swiper-button-next {\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E\");\n  left: 10px;\n  right: auto; }\n\n.swiper-button-prev.swiper-button-black,\n.swiper-container-rtl .swiper-button-next.swiper-button-black {\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E\"); }\n\n.swiper-button-prev.swiper-button-white,\n.swiper-container-rtl .swiper-button-next.swiper-button-white {\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E\"); }\n\n.swiper-button-next,\n.swiper-container-rtl .swiper-button-prev {\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E\");\n  right: 10px;\n  left: auto; }\n\n.swiper-button-next.swiper-button-black,\n.swiper-container-rtl .swiper-button-prev.swiper-button-black {\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E\"); }\n\n.swiper-button-next.swiper-button-white,\n.swiper-container-rtl .swiper-button-prev.swiper-button-white {\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E\"); }\n\n/* Pagination Styles */\n.swiper-pagination {\n  position: absolute;\n  text-align: center;\n  -webkit-transition: 300ms;\n  -moz-transition: 300ms;\n  -o-transition: 300ms;\n  transition: 300ms;\n  -webkit-transform: translate3d(0, 0, 0);\n  -ms-transform: translate3d(0, 0, 0);\n  -o-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n  z-index: 10; }\n\n.swiper-pagination.swiper-pagination-hidden {\n  opacity: 0; }\n\n.swiper-pagination-bullet {\n  width: 8px;\n  height: 8px;\n  display: inline-block;\n  border-radius: 100%;\n  background: #000;\n  opacity: 0.2; }\n\nbutton.swiper-pagination-bullet {\n  border: none;\n  margin: 0;\n  padding: 0;\n  box-shadow: none;\n  -moz-appearance: none;\n  -ms-appearance: none;\n  -webkit-appearance: none;\n  appearance: none; }\n\n.swiper-pagination-clickable .swiper-pagination-bullet {\n  cursor: pointer; }\n\n.swiper-pagination-white .swiper-pagination-bullet {\n  background: #fff; }\n\n.swiper-pagination-bullet-active {\n  opacity: 1; }\n\n.swiper-pagination-white .swiper-pagination-bullet-active {\n  background: #fff; }\n\n.swiper-pagination-black .swiper-pagination-bullet-active {\n  background: #000; }\n\n.swiper-container-vertical > .swiper-pagination {\n  right: 10px;\n  top: 50%;\n  -webkit-transform: translate3d(0px, -50%, 0);\n  -moz-transform: translate3d(0px, -50%, 0);\n  -o-transform: translate(0px, -50%);\n  -ms-transform: translate3d(0px, -50%, 0);\n  transform: translate3d(0px, -50%, 0); }\n\n.swiper-container-vertical > .swiper-pagination .swiper-pagination-bullet {\n  margin: 5px 0;\n  display: block; }\n\n.swiper-container-horizontal > .swiper-pagination {\n  bottom: 10px;\n  left: 0;\n  width: 100%; }\n\n.swiper-container-horizontal > .swiper-pagination .swiper-pagination-bullet {\n  margin: 0 5px; }\n\n/* 3D Container */\n.swiper-container-3d {\n  -webkit-perspective: 1200px;\n  -moz-perspective: 1200px;\n  -o-perspective: 1200px;\n  perspective: 1200px; }\n\n.swiper-container-3d .swiper-wrapper,\n.swiper-container-3d .swiper-slide,\n.swiper-container-3d .swiper-slide-shadow-left,\n.swiper-container-3d .swiper-slide-shadow-right,\n.swiper-container-3d .swiper-slide-shadow-top,\n.swiper-container-3d .swiper-slide-shadow-bottom,\n.swiper-container-3d .swiper-cube-shadow {\n  -webkit-transform-style: preserve-3d;\n  -moz-transform-style: preserve-3d;\n  -ms-transform-style: preserve-3d;\n  transform-style: preserve-3d; }\n\n.swiper-container-3d .swiper-slide-shadow-left,\n.swiper-container-3d .swiper-slide-shadow-right,\n.swiper-container-3d .swiper-slide-shadow-top,\n.swiper-container-3d .swiper-slide-shadow-bottom {\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 100%;\n  height: 100%;\n  pointer-events: none;\n  z-index: 10; }\n\n.swiper-container-3d .swiper-slide-shadow-left {\n  background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(transparent));\n  /* Safari 4+, Chrome */\n  background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0.5), transparent);\n  /* Chrome 10+, Safari 5.1+, iOS 5+ */\n  background-image: -moz-linear-gradient(right, rgba(0, 0, 0, 0.5), transparent);\n  /* Firefox 3.6-15 */\n  background-image: -o-linear-gradient(right, rgba(0, 0, 0, 0.5), transparent);\n  /* Opera 11.10-12.00 */\n  background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), transparent);\n  /* Firefox 16+, IE10, Opera 12.50+ */ }\n\n.swiper-container-3d .swiper-slide-shadow-right {\n  background-image: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(transparent));\n  /* Safari 4+, Chrome */\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5), transparent);\n  /* Chrome 10+, Safari 5.1+, iOS 5+ */\n  background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.5), transparent);\n  /* Firefox 3.6-15 */\n  background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5), transparent);\n  /* Opera 11.10-12.00 */\n  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), transparent);\n  /* Firefox 16+, IE10, Opera 12.50+ */ }\n\n.swiper-container-3d .swiper-slide-shadow-top {\n  background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(transparent));\n  /* Safari 4+, Chrome */\n  background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5), transparent);\n  /* Chrome 10+, Safari 5.1+, iOS 5+ */\n  background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0.5), transparent);\n  /* Firefox 3.6-15 */\n  background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5), transparent);\n  /* Opera 11.10-12.00 */\n  background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);\n  /* Firefox 16+, IE10, Opera 12.50+ */ }\n\n.swiper-container-3d .swiper-slide-shadow-bottom {\n  background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(transparent));\n  /* Safari 4+, Chrome */\n  background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.5), transparent);\n  /* Chrome 10+, Safari 5.1+, iOS 5+ */\n  background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.5), transparent);\n  /* Firefox 3.6-15 */\n  background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.5), transparent);\n  /* Opera 11.10-12.00 */\n  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);\n  /* Firefox 16+, IE10, Opera 12.50+ */ }\n\n/* Coverflow */\n.swiper-container-coverflow .swiper-wrapper {\n  /* Windows 8 IE 10 fix */\n  -ms-perspective: 1200px; }\n\n/* Fade */\n.swiper-container-fade.swiper-container-free-mode .swiper-slide {\n  -webkit-transition-timing-function: ease-out;\n  -moz-transition-timing-function: ease-out;\n  -ms-transition-timing-function: ease-out;\n  -o-transition-timing-function: ease-out;\n  transition-timing-function: ease-out; }\n\n.swiper-container-fade .swiper-slide {\n  pointer-events: none; }\n\n.swiper-container-fade .swiper-slide .swiper-slide {\n  pointer-events: none; }\n\n.swiper-container-fade .swiper-slide-active,\n.swiper-container-fade .swiper-slide-active .swiper-slide-active {\n  pointer-events: auto; }\n\n/* Cube */\n.swiper-container-cube {\n  overflow: visible; }\n\n.swiper-container-cube .swiper-slide {\n  pointer-events: none;\n  visibility: hidden;\n  -webkit-transform-origin: 0 0;\n  -moz-transform-origin: 0 0;\n  -ms-transform-origin: 0 0;\n  transform-origin: 0 0;\n  -webkit-backface-visibility: hidden;\n  -moz-backface-visibility: hidden;\n  -ms-backface-visibility: hidden;\n  backface-visibility: hidden;\n  width: 100%;\n  height: 100%;\n  z-index: 1; }\n\n.swiper-container-cube.swiper-container-rtl .swiper-slide {\n  -webkit-transform-origin: 100% 0;\n  -moz-transform-origin: 100% 0;\n  -ms-transform-origin: 100% 0;\n  transform-origin: 100% 0; }\n\n.swiper-container-cube .swiper-slide-active,\n.swiper-container-cube .swiper-slide-next,\n.swiper-container-cube .swiper-slide-prev,\n.swiper-container-cube .swiper-slide-next + .swiper-slide {\n  pointer-events: auto;\n  visibility: visible; }\n\n.swiper-container-cube .swiper-slide-shadow-top,\n.swiper-container-cube .swiper-slide-shadow-bottom,\n.swiper-container-cube .swiper-slide-shadow-left,\n.swiper-container-cube .swiper-slide-shadow-right {\n  z-index: 0;\n  -webkit-backface-visibility: hidden;\n  -moz-backface-visibility: hidden;\n  -ms-backface-visibility: hidden;\n  backface-visibility: hidden; }\n\n.swiper-container-cube .swiper-cube-shadow {\n  position: absolute;\n  left: 0;\n  bottom: 0px;\n  width: 100%;\n  height: 100%;\n  background: #000;\n  opacity: 0.6;\n  -webkit-filter: blur(50px);\n  filter: blur(50px);\n  z-index: 0; }\n\n/* Scrollbar */\n.swiper-scrollbar {\n  border-radius: 10px;\n  position: relative;\n  -ms-touch-action: none;\n  background: rgba(0, 0, 0, 0.1); }\n\n.swiper-container-horizontal > .swiper-scrollbar {\n  position: absolute;\n  left: 1%;\n  bottom: 3px;\n  z-index: 50;\n  height: 5px;\n  width: 98%; }\n\n.swiper-container-vertical > .swiper-scrollbar {\n  position: absolute;\n  right: 3px;\n  top: 1%;\n  z-index: 50;\n  width: 5px;\n  height: 98%; }\n\n.swiper-scrollbar-drag {\n  height: 100%;\n  width: 100%;\n  position: relative;\n  background: rgba(0, 0, 0, 0.5);\n  border-radius: 10px;\n  left: 0;\n  top: 0; }\n\n.swiper-scrollbar-cursor-drag {\n  cursor: move; }\n\n/* Preloader */\n.swiper-lazy-preloader {\n  width: 42px;\n  height: 42px;\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  margin-left: -21px;\n  margin-top: -21px;\n  z-index: 10;\n  -webkit-transform-origin: 50%;\n  -moz-transform-origin: 50%;\n  transform-origin: 50%;\n  -webkit-animation: swiper-preloader-spin 1s steps(12, end) infinite;\n  -moz-animation: swiper-preloader-spin 1s steps(12, end) infinite;\n  animation: swiper-preloader-spin 1s steps(12, end) infinite; }\n\n.swiper-lazy-preloader:after {\n  display: block;\n  content: \"\";\n  width: 100%;\n  height: 100%;\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n  background-position: 50%;\n  -webkit-background-size: 100%;\n  background-size: 100%;\n  background-repeat: no-repeat; }\n\n.swiper-lazy-preloader-white:after {\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\"); }\n\n@-webkit-keyframes swiper-preloader-spin {\n  100% {\n    -webkit-transform: rotate(360deg); } }\n\n@keyframes swiper-preloader-spin {\n  100% {\n    transform: rotate(360deg); } }\n\nion-slides {\n  width: 100%;\n  height: 100%;\n  display: block; }\n\n.slide-zoom {\n  display: block;\n  width: 100%;\n  text-align: center; }\n\n.swiper-container {\n  width: 100%;\n  height: 100%;\n  padding: 0;\n  overflow: hidden; }\n\n.swiper-wrapper {\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 100%;\n  height: 100%;\n  padding: 0; }\n\n.swiper-slide {\n  width: 100%;\n  height: 100%;\n  box-sizing: border-box;\n  /* Center slide text vertically */ }\n  .swiper-slide img {\n    width: auto;\n    height: auto;\n    max-width: 100%;\n    max-height: 100%; }\n\n.scroll-refresher {\n  position: absolute;\n  top: -60px;\n  right: 0;\n  left: 0;\n  overflow: hidden;\n  margin: auto;\n  height: 60px; }\n  .scroll-refresher .ionic-refresher-content {\n    position: absolute;\n    bottom: 15px;\n    left: 0;\n    width: 100%;\n    color: #666666;\n    text-align: center;\n    font-size: 30px; }\n    .scroll-refresher .ionic-refresher-content .text-refreshing,\n    .scroll-refresher .ionic-refresher-content .text-pulling {\n      font-size: 16px;\n      line-height: 16px; }\n    .scroll-refresher .ionic-refresher-content.ionic-refresher-with-text {\n      bottom: 10px; }\n  .scroll-refresher .icon-refreshing,\n  .scroll-refresher .icon-pulling {\n    width: 100%;\n    -webkit-backface-visibility: hidden;\n    backface-visibility: hidden;\n    -webkit-transform-style: preserve-3d;\n    transform-style: preserve-3d; }\n  .scroll-refresher .icon-pulling {\n    -webkit-animation-name: refresh-spin-back;\n    animation-name: refresh-spin-back;\n    -webkit-animation-duration: 200ms;\n    animation-duration: 200ms;\n    -webkit-animation-timing-function: linear;\n    animation-timing-function: linear;\n    -webkit-animation-fill-mode: none;\n    animation-fill-mode: none;\n    -webkit-transform: translate3d(0, 0, 0) rotate(0deg);\n    transform: translate3d(0, 0, 0) rotate(0deg); }\n  .scroll-refresher .icon-refreshing,\n  .scroll-refresher .text-refreshing {\n    display: none; }\n  .scroll-refresher .icon-refreshing {\n    -webkit-animation-duration: 1.5s;\n    animation-duration: 1.5s; }\n  .scroll-refresher.active .icon-pulling:not(.pulling-rotation-disabled) {\n    -webkit-animation-name: refresh-spin;\n    animation-name: refresh-spin;\n    -webkit-transform: translate3d(0, 0, 0) rotate(-180deg);\n    transform: translate3d(0, 0, 0) rotate(-180deg); }\n  .scroll-refresher.active.refreshing {\n    -webkit-transition: -webkit-transform 0.2s;\n    transition: -webkit-transform 0.2s;\n    -webkit-transition: transform 0.2s;\n    transition: transform 0.2s;\n    -webkit-transform: scale(1, 1);\n    transform: scale(1, 1); }\n    .scroll-refresher.active.refreshing .icon-pulling,\n    .scroll-refresher.active.refreshing .text-pulling {\n      display: none; }\n    .scroll-refresher.active.refreshing .icon-refreshing,\n    .scroll-refresher.active.refreshing .text-refreshing {\n      display: block; }\n    .scroll-refresher.active.refreshing.refreshing-tail {\n      -webkit-transform: scale(0, 0);\n      transform: scale(0, 0); }\n\n.overflow-scroll > .scroll {\n  -webkit-overflow-scrolling: touch;\n  width: 100%; }\n  .overflow-scroll > .scroll.overscroll {\n    position: fixed;\n    right: 0;\n    left: 0; }\n\n.overflow-scroll.padding > .scroll.overscroll {\n  padding: 10px; }\n\n@-webkit-keyframes refresh-spin {\n  0% {\n    -webkit-transform: translate3d(0, 0, 0) rotate(0); }\n  100% {\n    -webkit-transform: translate3d(0, 0, 0) rotate(180deg); } }\n\n@keyframes refresh-spin {\n  0% {\n    transform: translate3d(0, 0, 0) rotate(0); }\n  100% {\n    transform: translate3d(0, 0, 0) rotate(180deg); } }\n\n@-webkit-keyframes refresh-spin-back {\n  0% {\n    -webkit-transform: translate3d(0, 0, 0) rotate(180deg); }\n  100% {\n    -webkit-transform: translate3d(0, 0, 0) rotate(0); } }\n\n@keyframes refresh-spin-back {\n  0% {\n    transform: translate3d(0, 0, 0) rotate(180deg); }\n  100% {\n    transform: translate3d(0, 0, 0) rotate(0); } }\n\n/**\n * Spinners\n * --------------------------------------------------\n */\n.spinner {\n  stroke: #444;\n  fill: #444; }\n  .spinner svg {\n    width: 28px;\n    height: 28px; }\n  .spinner.spinner-light {\n    stroke: #fff;\n    fill: #fff; }\n  .spinner.spinner-stable {\n    stroke: #f8f8f8;\n    fill: #f8f8f8; }\n  .spinner.spinner-positive {\n    stroke: #387ef5;\n    fill: #387ef5; }\n  .spinner.spinner-calm {\n    stroke: #11c1f3;\n    fill: #11c1f3; }\n  .spinner.spinner-balanced {\n    stroke: #33cd5f;\n    fill: #33cd5f; }\n  .spinner.spinner-assertive {\n    stroke: #ef473a;\n    fill: #ef473a; }\n  .spinner.spinner-energized {\n    stroke: #ffc900;\n    fill: #ffc900; }\n  .spinner.spinner-royal {\n    stroke: #886aea;\n    fill: #886aea; }\n  .spinner.spinner-dark {\n    stroke: #444;\n    fill: #444; }\n\n.spinner-android {\n  stroke: #4b8bf4; }\n\n.spinner-ios,\n.spinner-ios-small {\n  stroke: #69717d; }\n\n.spinner-spiral .stop1 {\n  stop-color: #fff;\n  stop-opacity: 0; }\n\n.spinner-spiral.spinner-light .stop1 {\n  stop-color: #444; }\n\n.spinner-spiral.spinner-light .stop2 {\n  stop-color: #fff; }\n\n.spinner-spiral.spinner-stable .stop2 {\n  stop-color: #f8f8f8; }\n\n.spinner-spiral.spinner-positive .stop2 {\n  stop-color: #387ef5; }\n\n.spinner-spiral.spinner-calm .stop2 {\n  stop-color: #11c1f3; }\n\n.spinner-spiral.spinner-balanced .stop2 {\n  stop-color: #33cd5f; }\n\n.spinner-spiral.spinner-assertive .stop2 {\n  stop-color: #ef473a; }\n\n.spinner-spiral.spinner-energized .stop2 {\n  stop-color: #ffc900; }\n\n.spinner-spiral.spinner-royal .stop2 {\n  stop-color: #886aea; }\n\n.spinner-spiral.spinner-dark .stop2 {\n  stop-color: #444; }\n\n/**\n * Forms\n * --------------------------------------------------\n */\nform {\n  margin: 0 0 1.42857; }\n\nlegend {\n  display: block;\n  margin-bottom: 1.42857;\n  padding: 0;\n  width: 100%;\n  border: 1px solid #ddd;\n  color: #444;\n  font-size: 21px;\n  line-height: 2.85714; }\n  legend small {\n    color: #f8f8f8;\n    font-size: 1.07143; }\n\nlabel,\ninput,\nbutton,\nselect,\ntextarea {\n  font-weight: normal;\n  font-size: 14px;\n  line-height: 1.42857; }\n\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: \"-apple-system\", \"Helvetica Neue\", \"Roboto\", \"Segoe UI\", sans-serif; }\n\n.item-input {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  position: relative;\n  overflow: hidden;\n  padding: 6px 0 5px 16px; }\n  .item-input input {\n    -webkit-border-radius: 0;\n    border-radius: 0;\n    -webkit-box-flex: 1;\n    -webkit-flex: 1 220px;\n    -moz-box-flex: 1;\n    -moz-flex: 1 220px;\n    -ms-flex: 1 220px;\n    flex: 1 220px;\n    -webkit-appearance: none;\n    -moz-appearance: none;\n    appearance: none;\n    margin: 0;\n    padding-right: 24px;\n    background-color: transparent; }\n  .item-input .button .icon {\n    -webkit-box-flex: 0;\n    -webkit-flex: 0 0 24px;\n    -moz-box-flex: 0;\n    -moz-flex: 0 0 24px;\n    -ms-flex: 0 0 24px;\n    flex: 0 0 24px;\n    position: static;\n    display: inline-block;\n    height: auto;\n    text-align: center;\n    font-size: 16px; }\n  .item-input .button-bar {\n    -webkit-border-radius: 0;\n    border-radius: 0;\n    -webkit-box-flex: 1;\n    -webkit-flex: 1 0 220px;\n    -moz-box-flex: 1;\n    -moz-flex: 1 0 220px;\n    -ms-flex: 1 0 220px;\n    flex: 1 0 220px;\n    -webkit-appearance: none;\n    -moz-appearance: none;\n    appearance: none; }\n  .item-input .icon {\n    min-width: 14px; }\n\n.platform-windowsphone .item-input input {\n  flex-shrink: 1; }\n\n.item-input-inset {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  position: relative;\n  overflow: hidden;\n  padding: 10.66667px; }\n\n.item-input-wrapper {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-flex: 1;\n  -webkit-flex: 1 0;\n  -moz-box-flex: 1;\n  -moz-flex: 1 0;\n  -ms-flex: 1 0;\n  flex: 1 0;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  -webkit-border-radius: 4px;\n  border-radius: 4px;\n  padding-right: 8px;\n  padding-left: 8px;\n  background: #eee; }\n\n.item-input-inset .item-input-wrapper input {\n  padding-left: 4px;\n  height: 29px;\n  background: transparent;\n  line-height: 18px; }\n\n.item-input-wrapper ~ .button {\n  margin-left: 10.66667px; }\n\n.input-label {\n  display: table;\n  padding: 7px 10px 7px 0px;\n  max-width: 200px;\n  width: 35%;\n  color: #444;\n  font-size: 16px; }\n\n.placeholder-icon {\n  color: #aaa; }\n  .placeholder-icon:first-child {\n    padding-right: 6px; }\n  .placeholder-icon:last-child {\n    padding-left: 6px; }\n\n.item-stacked-label {\n  display: block;\n  background-color: transparent;\n  box-shadow: none; }\n  .item-stacked-label .input-label, .item-stacked-label .icon {\n    display: inline-block;\n    padding: 4px 0 0 0px;\n    vertical-align: middle; }\n\n.item-stacked-label input,\n.item-stacked-label textarea {\n  -webkit-border-radius: 2px;\n  border-radius: 2px;\n  padding: 4px 8px 3px 0;\n  border: none;\n  background-color: #fff; }\n\n.item-stacked-label input {\n  overflow: hidden;\n  height: 46px; }\n\n.item-select.item-stacked-label select {\n  position: relative;\n  padding: 0px;\n  max-width: 90%;\n  direction: ltr;\n  white-space: pre-wrap;\n  margin: -3px; }\n\n.item-floating-label {\n  display: block;\n  background-color: transparent;\n  box-shadow: none; }\n  .item-floating-label .input-label {\n    position: relative;\n    padding: 5px 0 0 0;\n    opacity: 0;\n    top: 10px;\n    -webkit-transition: opacity 0.15s ease-in, top 0.2s linear;\n    transition: opacity 0.15s ease-in, top 0.2s linear; }\n    .item-floating-label .input-label.has-input {\n      opacity: 1;\n      top: 0;\n      -webkit-transition: opacity 0.15s ease-in, top 0.2s linear;\n      transition: opacity 0.15s ease-in, top 0.2s linear; }\n\ntextarea,\ninput[type=\"text\"],\ninput[type=\"password\"],\ninput[type=\"datetime\"],\ninput[type=\"datetime-local\"],\ninput[type=\"date\"],\ninput[type=\"month\"],\ninput[type=\"time\"],\ninput[type=\"week\"],\ninput[type=\"number\"],\ninput[type=\"email\"],\ninput[type=\"url\"],\ninput[type=\"search\"],\ninput[type=\"tel\"],\ninput[type=\"color\"] {\n  display: block;\n  padding-top: 2px;\n  padding-left: 0;\n  height: 34px;\n  color: #111;\n  vertical-align: middle;\n  font-size: 14px;\n  line-height: 16px; }\n\n.platform-ios input[type=\"datetime-local\"],\n.platform-ios input[type=\"date\"],\n.platform-ios input[type=\"month\"],\n.platform-ios input[type=\"time\"],\n.platform-ios input[type=\"week\"],\n.platform-android input[type=\"datetime-local\"],\n.platform-android input[type=\"date\"],\n.platform-android input[type=\"month\"],\n.platform-android input[type=\"time\"],\n.platform-android input[type=\"week\"] {\n  padding-top: 8px; }\n\n.item-input input,\n.item-input textarea {\n  width: 100%; }\n\ntextarea {\n  padding-left: 0; }\n  textarea::-moz-placeholder {\n    color: #aaaaaa; }\n  textarea:-ms-input-placeholder {\n    color: #aaaaaa; }\n  textarea::-webkit-input-placeholder {\n    color: #aaaaaa;\n    text-indent: -3px; }\n\ntextarea {\n  height: auto; }\n\ntextarea,\ninput[type=\"text\"],\ninput[type=\"password\"],\ninput[type=\"datetime\"],\ninput[type=\"datetime-local\"],\ninput[type=\"date\"],\ninput[type=\"month\"],\ninput[type=\"time\"],\ninput[type=\"week\"],\ninput[type=\"number\"],\ninput[type=\"email\"],\ninput[type=\"url\"],\ninput[type=\"search\"],\ninput[type=\"tel\"],\ninput[type=\"color\"] {\n  border: 0; }\n\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  margin: 0;\n  line-height: normal; }\n\n.item-input input[type=\"file\"],\n.item-input input[type=\"image\"],\n.item-input input[type=\"submit\"],\n.item-input input[type=\"reset\"],\n.item-input input[type=\"button\"],\n.item-input input[type=\"radio\"],\n.item-input input[type=\"checkbox\"] {\n  width: auto; }\n\ninput[type=\"file\"] {\n  line-height: 34px; }\n\n.previous-input-focus,\n.cloned-text-input + input,\n.cloned-text-input + textarea {\n  position: absolute !important;\n  left: -9999px;\n  width: 200px; }\n\ninput::-moz-placeholder,\ntextarea::-moz-placeholder {\n  color: #aaaaaa; }\n\ninput:-ms-input-placeholder,\ntextarea:-ms-input-placeholder {\n  color: #aaaaaa; }\n\ninput::-webkit-input-placeholder,\ntextarea::-webkit-input-placeholder {\n  color: #aaaaaa;\n  text-indent: 0; }\n\ninput[disabled],\nselect[disabled],\ntextarea[disabled],\ninput[readonly]:not(.cloned-text-input),\ntextarea[readonly]:not(.cloned-text-input),\nselect[readonly] {\n  background-color: #f8f8f8;\n  cursor: not-allowed; }\n\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"][readonly],\ninput[type=\"checkbox\"][readonly] {\n  background-color: transparent; }\n\n/**\n * Checkbox\n * --------------------------------------------------\n */\n.checkbox {\n  position: relative;\n  display: inline-block;\n  padding: 7px 7px;\n  cursor: pointer; }\n  .checkbox input:before,\n  .checkbox .checkbox-icon:before {\n    border-color: #ddd; }\n  .checkbox input:checked:before,\n  .checkbox input:checked + .checkbox-icon:before {\n    background: #387ef5;\n    border-color: #387ef5; }\n\n.checkbox-light input:before,\n.checkbox-light .checkbox-icon:before {\n  border-color: #ddd; }\n\n.checkbox-light input:checked:before,\n.checkbox-light input:checked + .checkbox-icon:before {\n  background: #ddd;\n  border-color: #ddd; }\n\n.checkbox-stable input:before,\n.checkbox-stable .checkbox-icon:before {\n  border-color: #b2b2b2; }\n\n.checkbox-stable input:checked:before,\n.checkbox-stable input:checked + .checkbox-icon:before {\n  background: #b2b2b2;\n  border-color: #b2b2b2; }\n\n.checkbox-positive input:before,\n.checkbox-positive .checkbox-icon:before {\n  border-color: #387ef5; }\n\n.checkbox-positive input:checked:before,\n.checkbox-positive input:checked + .checkbox-icon:before {\n  background: #387ef5;\n  border-color: #387ef5; }\n\n.checkbox-calm input:before,\n.checkbox-calm .checkbox-icon:before {\n  border-color: #11c1f3; }\n\n.checkbox-calm input:checked:before,\n.checkbox-calm input:checked + .checkbox-icon:before {\n  background: #11c1f3;\n  border-color: #11c1f3; }\n\n.checkbox-assertive input:before,\n.checkbox-assertive .checkbox-icon:before {\n  border-color: #ef473a; }\n\n.checkbox-assertive input:checked:before,\n.checkbox-assertive input:checked + .checkbox-icon:before {\n  background: #ef473a;\n  border-color: #ef473a; }\n\n.checkbox-balanced input:before,\n.checkbox-balanced .checkbox-icon:before {\n  border-color: #33cd5f; }\n\n.checkbox-balanced input:checked:before,\n.checkbox-balanced input:checked + .checkbox-icon:before {\n  background: #33cd5f;\n  border-color: #33cd5f; }\n\n.checkbox-energized input:before,\n.checkbox-energized .checkbox-icon:before {\n  border-color: #ffc900; }\n\n.checkbox-energized input:checked:before,\n.checkbox-energized input:checked + .checkbox-icon:before {\n  background: #ffc900;\n  border-color: #ffc900; }\n\n.checkbox-royal input:before,\n.checkbox-royal .checkbox-icon:before {\n  border-color: #886aea; }\n\n.checkbox-royal input:checked:before,\n.checkbox-royal input:checked + .checkbox-icon:before {\n  background: #886aea;\n  border-color: #886aea; }\n\n.checkbox-dark input:before,\n.checkbox-dark .checkbox-icon:before {\n  border-color: #444; }\n\n.checkbox-dark input:checked:before,\n.checkbox-dark input:checked + .checkbox-icon:before {\n  background: #444;\n  border-color: #444; }\n\n.checkbox input:disabled:before,\n.checkbox input:disabled + .checkbox-icon:before {\n  border-color: #ddd; }\n\n.checkbox input:disabled:checked:before,\n.checkbox input:disabled:checked + .checkbox-icon:before {\n  background: #ddd; }\n\n.checkbox.checkbox-input-hidden input {\n  display: none !important; }\n\n.checkbox input,\n.checkbox-icon {\n  position: relative;\n  width: 28px;\n  height: 28px;\n  display: block;\n  border: 0;\n  background: transparent;\n  cursor: pointer;\n  -webkit-appearance: none; }\n  .checkbox input:before,\n  .checkbox-icon:before {\n    display: table;\n    width: 100%;\n    height: 100%;\n    border-width: 1px;\n    border-style: solid;\n    border-radius: 28px;\n    background: #fff;\n    content: ' ';\n    -webkit-transition: background-color 20ms ease-in-out;\n    transition: background-color 20ms ease-in-out; }\n\n.checkbox input:checked:before,\ninput:checked + .checkbox-icon:before {\n  border-width: 2px; }\n\n.checkbox input:after,\n.checkbox-icon:after {\n  -webkit-transition: opacity 0.05s ease-in-out;\n  transition: opacity 0.05s ease-in-out;\n  -webkit-transform: rotate(-45deg);\n  transform: rotate(-45deg);\n  position: absolute;\n  top: 33%;\n  left: 25%;\n  display: table;\n  width: 14px;\n  height: 6px;\n  border: 1px solid #fff;\n  border-top: 0;\n  border-right: 0;\n  content: ' ';\n  opacity: 0; }\n\n.platform-android .checkbox-platform input:before,\n.platform-android .checkbox-platform .checkbox-icon:before,\n.checkbox-square input:before,\n.checkbox-square .checkbox-icon:before {\n  border-radius: 2px;\n  width: 72%;\n  height: 72%;\n  margin-top: 14%;\n  margin-left: 14%;\n  border-width: 2px; }\n\n.platform-android .checkbox-platform input:after,\n.platform-android .checkbox-platform .checkbox-icon:after,\n.checkbox-square input:after,\n.checkbox-square .checkbox-icon:after {\n  border-width: 2px;\n  top: 19%;\n  left: 25%;\n  width: 13px;\n  height: 7px; }\n\n.platform-android .item-checkbox-right .checkbox-square .checkbox-icon::after {\n  top: 31%; }\n\n.grade-c .checkbox input:after,\n.grade-c .checkbox-icon:after {\n  -webkit-transform: rotate(0);\n  transform: rotate(0);\n  top: 3px;\n  left: 4px;\n  border: none;\n  color: #fff;\n  content: '\\2713';\n  font-weight: bold;\n  font-size: 20px; }\n\n.checkbox input:checked:after,\ninput:checked + .checkbox-icon:after {\n  opacity: 1; }\n\n.item-checkbox {\n  padding-left: 60px; }\n  .item-checkbox.active {\n    box-shadow: none; }\n\n.item-checkbox .checkbox {\n  position: absolute;\n  top: 50%;\n  right: 8px;\n  left: 8px;\n  z-index: 3;\n  margin-top: -21px; }\n\n.item-checkbox.item-checkbox-right {\n  padding-right: 60px;\n  padding-left: 16px; }\n\n.item-checkbox-right .checkbox input,\n.item-checkbox-right .checkbox-icon {\n  float: right; }\n\n/**\n * Toggle\n * --------------------------------------------------\n */\n.item-toggle {\n  pointer-events: none; }\n\n.toggle {\n  position: relative;\n  display: inline-block;\n  pointer-events: auto;\n  margin: -5px;\n  padding: 5px; }\n  .toggle input:checked + .track {\n    border-color: #4cd964;\n    background-color: #4cd964; }\n  .toggle.dragging .handle {\n    background-color: #f2f2f2 !important; }\n\n.toggle.toggle-light input:checked + .track {\n  border-color: #ddd;\n  background-color: #ddd; }\n\n.toggle.toggle-stable input:checked + .track {\n  border-color: #b2b2b2;\n  background-color: #b2b2b2; }\n\n.toggle.toggle-positive input:checked + .track {\n  border-color: #387ef5;\n  background-color: #387ef5; }\n\n.toggle.toggle-calm input:checked + .track {\n  border-color: #11c1f3;\n  background-color: #11c1f3; }\n\n.toggle.toggle-assertive input:checked + .track {\n  border-color: #ef473a;\n  background-color: #ef473a; }\n\n.toggle.toggle-balanced input:checked + .track {\n  border-color: #33cd5f;\n  background-color: #33cd5f; }\n\n.toggle.toggle-energized input:checked + .track {\n  border-color: #ffc900;\n  background-color: #ffc900; }\n\n.toggle.toggle-royal input:checked + .track {\n  border-color: #886aea;\n  background-color: #886aea; }\n\n.toggle.toggle-dark input:checked + .track {\n  border-color: #444;\n  background-color: #444; }\n\n.toggle input {\n  display: none; }\n\n/* the track appearance when the toggle is \"off\" */\n.toggle .track {\n  -webkit-transition-timing-function: ease-in-out;\n  transition-timing-function: ease-in-out;\n  -webkit-transition-duration: 0.3s;\n  transition-duration: 0.3s;\n  -webkit-transition-property: background-color, border;\n  transition-property: background-color, border;\n  display: inline-block;\n  box-sizing: border-box;\n  width: 51px;\n  height: 31px;\n  border: solid 2px #e6e6e6;\n  border-radius: 20px;\n  background-color: #fff;\n  content: ' ';\n  cursor: pointer;\n  pointer-events: none; }\n\n/* Fix to avoid background color bleeding */\n/* (occurred on (at least) Android 4.2, Asus MeMO Pad HD7 ME173X) */\n.platform-android4_2 .toggle .track {\n  -webkit-background-clip: padding-box; }\n\n/* the handle (circle) thats inside the toggle's track area */\n/* also the handle's appearance when it is \"off\" */\n.toggle .handle {\n  -webkit-transition: 0.3s cubic-bezier(0, 1.1, 1, 1.1);\n  transition: 0.3s cubic-bezier(0, 1.1, 1, 1.1);\n  -webkit-transition-property: background-color, transform;\n  transition-property: background-color, transform;\n  position: absolute;\n  display: block;\n  width: 27px;\n  height: 27px;\n  border-radius: 27px;\n  background-color: #fff;\n  top: 7px;\n  left: 7px;\n  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35), 0 1px 1px rgba(0, 0, 0, 0.15); }\n  .toggle .handle:before {\n    position: absolute;\n    top: -4px;\n    left: -21.5px;\n    padding: 18.5px 34px;\n    content: \" \"; }\n\n.toggle input:checked + .track .handle {\n  -webkit-transform: translate3d(20px, 0, 0);\n  transform: translate3d(20px, 0, 0);\n  background-color: #fff; }\n\n.item-toggle.active {\n  box-shadow: none; }\n\n.item-toggle,\n.item-toggle.item-complex .item-content {\n  padding-right: 99px; }\n\n.item-toggle.item-complex {\n  padding-right: 0; }\n\n.item-toggle .toggle {\n  position: absolute;\n  top: 10px;\n  right: 16px;\n  z-index: 3; }\n\n.toggle input:disabled + .track {\n  opacity: .6; }\n\n.toggle-small .track {\n  border: 0;\n  width: 34px;\n  height: 15px;\n  background: #9e9e9e; }\n\n.toggle-small input:checked + .track {\n  background: rgba(0, 150, 137, 0.5); }\n\n.toggle-small .handle {\n  top: 2px;\n  left: 4px;\n  width: 21px;\n  height: 21px;\n  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25); }\n\n.toggle-small input:checked + .track .handle {\n  -webkit-transform: translate3d(16px, 0, 0);\n  transform: translate3d(16px, 0, 0);\n  background: #009689; }\n\n.toggle-small.item-toggle .toggle {\n  top: 19px; }\n\n.toggle-small .toggle-light input:checked + .track {\n  background-color: rgba(221, 221, 221, 0.5); }\n\n.toggle-small .toggle-light input:checked + .track .handle {\n  background-color: #ddd; }\n\n.toggle-small .toggle-stable input:checked + .track {\n  background-color: rgba(178, 178, 178, 0.5); }\n\n.toggle-small .toggle-stable input:checked + .track .handle {\n  background-color: #b2b2b2; }\n\n.toggle-small .toggle-positive input:checked + .track {\n  background-color: rgba(56, 126, 245, 0.5); }\n\n.toggle-small .toggle-positive input:checked + .track .handle {\n  background-color: #387ef5; }\n\n.toggle-small .toggle-calm input:checked + .track {\n  background-color: rgba(17, 193, 243, 0.5); }\n\n.toggle-small .toggle-calm input:checked + .track .handle {\n  background-color: #11c1f3; }\n\n.toggle-small .toggle-assertive input:checked + .track {\n  background-color: rgba(239, 71, 58, 0.5); }\n\n.toggle-small .toggle-assertive input:checked + .track .handle {\n  background-color: #ef473a; }\n\n.toggle-small .toggle-balanced input:checked + .track {\n  background-color: rgba(51, 205, 95, 0.5); }\n\n.toggle-small .toggle-balanced input:checked + .track .handle {\n  background-color: #33cd5f; }\n\n.toggle-small .toggle-energized input:checked + .track {\n  background-color: rgba(255, 201, 0, 0.5); }\n\n.toggle-small .toggle-energized input:checked + .track .handle {\n  background-color: #ffc900; }\n\n.toggle-small .toggle-royal input:checked + .track {\n  background-color: rgba(136, 106, 234, 0.5); }\n\n.toggle-small .toggle-royal input:checked + .track .handle {\n  background-color: #886aea; }\n\n.toggle-small .toggle-dark input:checked + .track {\n  background-color: rgba(68, 68, 68, 0.5); }\n\n.toggle-small .toggle-dark input:checked + .track .handle {\n  background-color: #444; }\n\n/**\n * Radio Button Inputs\n * --------------------------------------------------\n */\n.item-radio {\n  padding: 0; }\n  .item-radio:hover {\n    cursor: pointer; }\n\n.item-radio .item-content {\n  /* give some room to the right for the checkmark icon */\n  padding-right: 64px; }\n\n.item-radio .radio-icon {\n  /* checkmark icon will be hidden by default */\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 3;\n  visibility: hidden;\n  padding: 14px;\n  height: 100%;\n  font-size: 24px; }\n\n.item-radio input {\n  /* hide any radio button inputs elements (the ugly circles) */\n  position: absolute;\n  left: -9999px; }\n  .item-radio input:checked + .radio-content .item-content {\n    /* style the item content when its checked */\n    background: #f7f7f7; }\n  .item-radio input:checked + .radio-content .radio-icon {\n    /* show the checkmark icon when its checked */\n    visibility: visible; }\n\n/**\n * Range\n * --------------------------------------------------\n */\n.range input {\n  display: inline-block;\n  overflow: hidden;\n  margin-top: 5px;\n  margin-bottom: 5px;\n  padding-right: 2px;\n  padding-left: 1px;\n  width: auto;\n  height: 43px;\n  outline: none;\n  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ccc), color-stop(100%, #ccc));\n  background: linear-gradient(to right, #ccc 0%, #ccc 100%);\n  background-position: center;\n  background-size: 99% 2px;\n  background-repeat: no-repeat;\n  -webkit-appearance: none;\n  /*\n   &::-ms-track{\n     background: transparent;\n     border-color: transparent;\n     border-width: 11px 0 16px;\n     color:transparent;\n     margin-top:20px;\n   }\n   &::-ms-thumb {\n     width: $range-slider-width;\n     height: $range-slider-height;\n     border-radius: $range-slider-border-radius;\n     background-color: $toggle-handle-off-bg-color;\n     border-color:$toggle-handle-off-bg-color;\n     box-shadow: $range-slider-box-shadow;\n     margin-left:1px;\n     margin-right:1px;\n     outline:none;\n   }\n   &::-ms-fill-upper {\n     height: $range-track-height;\n     background:$range-default-track-bg;\n   }\n   */ }\n  .range input::-moz-focus-outer {\n    /* hide the focus outline in Firefox */\n    border: 0; }\n  .range input::-webkit-slider-thumb {\n    position: relative;\n    width: 28px;\n    height: 28px;\n    border-radius: 50%;\n    background-color: #fff;\n    box-shadow: 0 0 2px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2);\n    cursor: pointer;\n    -webkit-appearance: none;\n    border: 0; }\n  .range input::-webkit-slider-thumb:before {\n    /* what creates the colorful line on the left side of the slider */\n    position: absolute;\n    top: 13px;\n    left: -2001px;\n    width: 2000px;\n    height: 2px;\n    background: #444;\n    content: ' '; }\n  .range input::-webkit-slider-thumb:after {\n    /* create a larger (but hidden) hit area */\n    position: absolute;\n    top: -15px;\n    left: -15px;\n    padding: 30px;\n    content: ' '; }\n  .range input::-ms-fill-lower {\n    height: 2px;\n    background: #444; }\n\n.range {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  padding: 2px 11px; }\n  .range.range-light input::-webkit-slider-thumb:before {\n    background: #ddd; }\n  .range.range-light input::-ms-fill-lower {\n    background: #ddd; }\n  .range.range-stable input::-webkit-slider-thumb:before {\n    background: #b2b2b2; }\n  .range.range-stable input::-ms-fill-lower {\n    background: #b2b2b2; }\n  .range.range-positive input::-webkit-slider-thumb:before {\n    background: #387ef5; }\n  .range.range-positive input::-ms-fill-lower {\n    background: #387ef5; }\n  .range.range-calm input::-webkit-slider-thumb:before {\n    background: #11c1f3; }\n  .range.range-calm input::-ms-fill-lower {\n    background: #11c1f3; }\n  .range.range-balanced input::-webkit-slider-thumb:before {\n    background: #33cd5f; }\n  .range.range-balanced input::-ms-fill-lower {\n    background: #33cd5f; }\n  .range.range-assertive input::-webkit-slider-thumb:before {\n    background: #ef473a; }\n  .range.range-assertive input::-ms-fill-lower {\n    background: #ef473a; }\n  .range.range-energized input::-webkit-slider-thumb:before {\n    background: #ffc900; }\n  .range.range-energized input::-ms-fill-lower {\n    background: #ffc900; }\n  .range.range-royal input::-webkit-slider-thumb:before {\n    background: #886aea; }\n  .range.range-royal input::-ms-fill-lower {\n    background: #886aea; }\n  .range.range-dark input::-webkit-slider-thumb:before {\n    background: #444; }\n  .range.range-dark input::-ms-fill-lower {\n    background: #444; }\n\n.range .icon {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0;\n  -moz-box-flex: 0;\n  -moz-flex: 0;\n  -ms-flex: 0;\n  flex: 0;\n  display: block;\n  min-width: 24px;\n  text-align: center;\n  font-size: 24px; }\n\n.range input {\n  -webkit-box-flex: 1;\n  -webkit-flex: 1;\n  -moz-box-flex: 1;\n  -moz-flex: 1;\n  -ms-flex: 1;\n  flex: 1;\n  display: block;\n  margin-right: 10px;\n  margin-left: 10px; }\n\n.range-label {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 auto;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 auto;\n  -ms-flex: 0 0 auto;\n  flex: 0 0 auto;\n  display: block;\n  white-space: nowrap; }\n\n.range-label:first-child {\n  padding-left: 5px; }\n\n.range input + .range-label {\n  padding-right: 5px;\n  padding-left: 0; }\n\n.platform-windowsphone .range input {\n  height: auto; }\n\n/**\n * Select\n * --------------------------------------------------\n */\n.item-select {\n  position: relative; }\n  .item-select select {\n    -webkit-appearance: none;\n    -moz-appearance: none;\n    appearance: none;\n    position: absolute;\n    top: 0;\n    bottom: 0;\n    right: 0;\n    padding: 0 48px 0 16px;\n    max-width: 65%;\n    border: none;\n    background: #fff;\n    color: #333;\n    text-indent: .01px;\n    text-overflow: '';\n    white-space: nowrap;\n    font-size: 14px;\n    cursor: pointer;\n    direction: rtl; }\n  .item-select select::-ms-expand {\n    display: none; }\n  .item-select option {\n    direction: ltr; }\n  .item-select:after {\n    position: absolute;\n    top: 50%;\n    right: 16px;\n    margin-top: -3px;\n    width: 0;\n    height: 0;\n    border-top: 5px solid;\n    border-right: 5px solid transparent;\n    border-left: 5px solid transparent;\n    color: #999;\n    content: \"\";\n    pointer-events: none; }\n  .item-select.item-light select {\n    background: #fff;\n    color: #444; }\n  .item-select.item-stable select {\n    background: #f8f8f8;\n    color: #444; }\n  .item-select.item-stable:after, .item-select.item-stable .input-label {\n    color: #666666; }\n  .item-select.item-positive select {\n    background: #387ef5;\n    color: #fff; }\n  .item-select.item-positive:after, .item-select.item-positive .input-label {\n    color: #fff; }\n  .item-select.item-calm select {\n    background: #11c1f3;\n    color: #fff; }\n  .item-select.item-calm:after, .item-select.item-calm .input-label {\n    color: #fff; }\n  .item-select.item-assertive select {\n    background: #ef473a;\n    color: #fff; }\n  .item-select.item-assertive:after, .item-select.item-assertive .input-label {\n    color: #fff; }\n  .item-select.item-balanced select {\n    background: #33cd5f;\n    color: #fff; }\n  .item-select.item-balanced:after, .item-select.item-balanced .input-label {\n    color: #fff; }\n  .item-select.item-energized select {\n    background: #ffc900;\n    color: #fff; }\n  .item-select.item-energized:after, .item-select.item-energized .input-label {\n    color: #fff; }\n  .item-select.item-royal select {\n    background: #886aea;\n    color: #fff; }\n  .item-select.item-royal:after, .item-select.item-royal .input-label {\n    color: #fff; }\n  .item-select.item-dark select {\n    background: #444;\n    color: #fff; }\n  .item-select.item-dark:after, .item-select.item-dark .input-label {\n    color: #fff; }\n\nselect[multiple], select[size] {\n  height: auto; }\n\n/**\n * Progress\n * --------------------------------------------------\n */\nprogress {\n  display: block;\n  margin: 15px auto;\n  width: 100%; }\n\n/**\n * Buttons\n * --------------------------------------------------\n */\n.button {\n  border-color: transparent;\n  background-color: #f8f8f8;\n  color: #444;\n  position: relative;\n  display: inline-block;\n  margin: 0;\n  padding: 0 12px;\n  min-width: 52px;\n  min-height: 47px;\n  border-width: 1px;\n  border-style: solid;\n  border-radius: 4px;\n  vertical-align: top;\n  text-align: center;\n  text-overflow: ellipsis;\n  font-size: 16px;\n  line-height: 42px;\n  cursor: pointer; }\n  .button:hover {\n    color: #444;\n    text-decoration: none; }\n  .button.active, .button.activated {\n    border-color: #a2a2a2;\n    background-color: #e5e5e5; }\n  .button:after {\n    position: absolute;\n    top: -6px;\n    right: -6px;\n    bottom: -6px;\n    left: -6px;\n    content: ' '; }\n  .button .icon {\n    vertical-align: top;\n    pointer-events: none; }\n  .button .icon:before, .button.icon:before, .button.icon-left:before, .button.icon-right:before {\n    display: inline-block;\n    padding: 0 0 1px 0;\n    vertical-align: inherit;\n    font-size: 24px;\n    line-height: 41px;\n    pointer-events: none; }\n  .button.icon-left:before {\n    float: left;\n    padding-right: .2em;\n    padding-left: 0; }\n  .button.icon-right:before {\n    float: right;\n    padding-right: 0;\n    padding-left: .2em; }\n  .button.button-block, .button.button-full {\n    margin-top: 10px;\n    margin-bottom: 10px; }\n  .button.button-light {\n    border-color: transparent;\n    background-color: #fff;\n    color: #444; }\n    .button.button-light:hover {\n      color: #444;\n      text-decoration: none; }\n    .button.button-light.active, .button.button-light.activated {\n      border-color: #a2a2a2;\n      background-color: #fafafa; }\n    .button.button-light.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #ddd; }\n    .button.button-light.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-light.button-outline {\n      border-color: #ddd;\n      background: transparent;\n      color: #ddd; }\n      .button.button-light.button-outline.active, .button.button-light.button-outline.activated {\n        background-color: #ddd;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-stable {\n    border-color: transparent;\n    background-color: #f8f8f8;\n    color: #444; }\n    .button.button-stable:hover {\n      color: #444;\n      text-decoration: none; }\n    .button.button-stable.active, .button.button-stable.activated {\n      border-color: #a2a2a2;\n      background-color: #e5e5e5; }\n    .button.button-stable.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #b2b2b2; }\n    .button.button-stable.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-stable.button-outline {\n      border-color: #b2b2b2;\n      background: transparent;\n      color: #b2b2b2; }\n      .button.button-stable.button-outline.active, .button.button-stable.button-outline.activated {\n        background-color: #b2b2b2;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-positive {\n    border-color: transparent;\n    background-color: #387ef5;\n    color: #fff; }\n    .button.button-positive:hover {\n      color: #fff;\n      text-decoration: none; }\n    .button.button-positive.active, .button.button-positive.activated {\n      border-color: #a2a2a2;\n      background-color: #0c60ee; }\n    .button.button-positive.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #387ef5; }\n    .button.button-positive.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-positive.button-outline {\n      border-color: #387ef5;\n      background: transparent;\n      color: #387ef5; }\n      .button.button-positive.button-outline.active, .button.button-positive.button-outline.activated {\n        background-color: #387ef5;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-calm {\n    border-color: transparent;\n    background-color: #11c1f3;\n    color: #fff; }\n    .button.button-calm:hover {\n      color: #fff;\n      text-decoration: none; }\n    .button.button-calm.active, .button.button-calm.activated {\n      border-color: #a2a2a2;\n      background-color: #0a9dc7; }\n    .button.button-calm.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #11c1f3; }\n    .button.button-calm.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-calm.button-outline {\n      border-color: #11c1f3;\n      background: transparent;\n      color: #11c1f3; }\n      .button.button-calm.button-outline.active, .button.button-calm.button-outline.activated {\n        background-color: #11c1f3;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-assertive {\n    border-color: transparent;\n    background-color: #ef473a;\n    color: #fff; }\n    .button.button-assertive:hover {\n      color: #fff;\n      text-decoration: none; }\n    .button.button-assertive.active, .button.button-assertive.activated {\n      border-color: #a2a2a2;\n      background-color: #e42112; }\n    .button.button-assertive.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #ef473a; }\n    .button.button-assertive.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-assertive.button-outline {\n      border-color: #ef473a;\n      background: transparent;\n      color: #ef473a; }\n      .button.button-assertive.button-outline.active, .button.button-assertive.button-outline.activated {\n        background-color: #ef473a;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-balanced {\n    border-color: transparent;\n    background-color: #33cd5f;\n    color: #fff; }\n    .button.button-balanced:hover {\n      color: #fff;\n      text-decoration: none; }\n    .button.button-balanced.active, .button.button-balanced.activated {\n      border-color: #a2a2a2;\n      background-color: #28a54c; }\n    .button.button-balanced.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #33cd5f; }\n    .button.button-balanced.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-balanced.button-outline {\n      border-color: #33cd5f;\n      background: transparent;\n      color: #33cd5f; }\n      .button.button-balanced.button-outline.active, .button.button-balanced.button-outline.activated {\n        background-color: #33cd5f;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-energized {\n    border-color: transparent;\n    background-color: #ffc900;\n    color: #fff; }\n    .button.button-energized:hover {\n      color: #fff;\n      text-decoration: none; }\n    .button.button-energized.active, .button.button-energized.activated {\n      border-color: #a2a2a2;\n      background-color: #e6b500; }\n    .button.button-energized.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #ffc900; }\n    .button.button-energized.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-energized.button-outline {\n      border-color: #ffc900;\n      background: transparent;\n      color: #ffc900; }\n      .button.button-energized.button-outline.active, .button.button-energized.button-outline.activated {\n        background-color: #ffc900;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-royal {\n    border-color: transparent;\n    background-color: #886aea;\n    color: #fff; }\n    .button.button-royal:hover {\n      color: #fff;\n      text-decoration: none; }\n    .button.button-royal.active, .button.button-royal.activated {\n      border-color: #a2a2a2;\n      background-color: #6b46e5; }\n    .button.button-royal.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #886aea; }\n    .button.button-royal.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-royal.button-outline {\n      border-color: #886aea;\n      background: transparent;\n      color: #886aea; }\n      .button.button-royal.button-outline.active, .button.button-royal.button-outline.activated {\n        background-color: #886aea;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-dark {\n    border-color: transparent;\n    background-color: #444;\n    color: #fff; }\n    .button.button-dark:hover {\n      color: #fff;\n      text-decoration: none; }\n    .button.button-dark.active, .button.button-dark.activated {\n      border-color: #a2a2a2;\n      background-color: #262626; }\n    .button.button-dark.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #444; }\n    .button.button-dark.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-dark.button-outline {\n      border-color: #444;\n      background: transparent;\n      color: #444; }\n      .button.button-dark.button-outline.active, .button.button-dark.button-outline.activated {\n        background-color: #444;\n        box-shadow: none;\n        color: #fff; }\n\n.button-small {\n  padding: 2px 4px 1px;\n  min-width: 28px;\n  min-height: 30px;\n  font-size: 12px;\n  line-height: 26px; }\n  .button-small .icon:before, .button-small.icon:before, .button-small.icon-left:before, .button-small.icon-right:before {\n    font-size: 16px;\n    line-height: 19px;\n    margin-top: 3px; }\n\n.button-large {\n  padding: 0 16px;\n  min-width: 68px;\n  min-height: 59px;\n  font-size: 20px;\n  line-height: 53px; }\n  .button-large .icon:before, .button-large.icon:before, .button-large.icon-left:before, .button-large.icon-right:before {\n    padding-bottom: 2px;\n    font-size: 32px;\n    line-height: 51px; }\n\n.button-icon {\n  -webkit-transition: opacity 0.1s;\n  transition: opacity 0.1s;\n  padding: 0 6px;\n  min-width: initial;\n  border-color: transparent;\n  background: none; }\n  .button-icon.button.active, .button-icon.button.activated {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    opacity: 0.3; }\n  .button-icon .icon:before, .button-icon.icon:before {\n    font-size: 32px; }\n\n.button-clear {\n  -webkit-transition: opacity 0.1s;\n  transition: opacity 0.1s;\n  padding: 0 6px;\n  max-height: 42px;\n  border-color: transparent;\n  background: none;\n  box-shadow: none; }\n  .button-clear.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: transparent; }\n  .button-clear.button-icon {\n    border-color: transparent;\n    background: none; }\n  .button-clear.active, .button-clear.activated {\n    opacity: 0.3; }\n\n.button-outline {\n  -webkit-transition: opacity 0.1s;\n  transition: opacity 0.1s;\n  background: none;\n  box-shadow: none; }\n  .button-outline.button-outline {\n    border-color: transparent;\n    background: transparent;\n    color: transparent; }\n    .button-outline.button-outline.active, .button-outline.button-outline.activated {\n      background-color: transparent;\n      box-shadow: none;\n      color: #fff; }\n\n.padding > .button.button-block:first-child {\n  margin-top: 0; }\n\n.button-block {\n  display: block;\n  clear: both; }\n  .button-block:after {\n    clear: both; }\n\n.button-full,\n.button-full > .button {\n  display: block;\n  margin-right: 0;\n  margin-left: 0;\n  border-right-width: 0;\n  border-left-width: 0;\n  border-radius: 0; }\n\nbutton.button-block,\nbutton.button-full,\n.button-full > button.button,\ninput.button.button-block {\n  width: 100%; }\n\na.button {\n  text-decoration: none; }\n  a.button .icon:before, a.button.icon:before, a.button.icon-left:before, a.button.icon-right:before {\n    margin-top: 2px; }\n\n.button.disabled,\n.button[disabled] {\n  opacity: .4;\n  cursor: default !important;\n  pointer-events: none; }\n\n/**\n * Button Bar\n * --------------------------------------------------\n */\n.button-bar {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-flex: 1;\n  -webkit-flex: 1;\n  -moz-box-flex: 1;\n  -moz-flex: 1;\n  -ms-flex: 1;\n  flex: 1;\n  width: 100%; }\n  .button-bar.button-bar-inline {\n    display: block;\n    width: auto;\n    *zoom: 1; }\n    .button-bar.button-bar-inline:before, .button-bar.button-bar-inline:after {\n      display: table;\n      content: \"\";\n      line-height: 0; }\n    .button-bar.button-bar-inline:after {\n      clear: both; }\n    .button-bar.button-bar-inline > .button {\n      width: auto;\n      display: inline-block;\n      float: left; }\n  .button-bar.bar-light > .button {\n    border-color: #ddd; }\n  .button-bar.bar-stable > .button {\n    border-color: #b2b2b2; }\n  .button-bar.bar-positive > .button {\n    border-color: #0c60ee; }\n  .button-bar.bar-calm > .button {\n    border-color: #0a9dc7; }\n  .button-bar.bar-assertive > .button {\n    border-color: #e42112; }\n  .button-bar.bar-balanced > .button {\n    border-color: #28a54c; }\n  .button-bar.bar-energized > .button {\n    border-color: #e6b500; }\n  .button-bar.bar-royal > .button {\n    border-color: #6b46e5; }\n  .button-bar.bar-dark > .button {\n    border-color: #111; }\n\n.button-bar > .button {\n  -webkit-box-flex: 1;\n  -webkit-flex: 1;\n  -moz-box-flex: 1;\n  -moz-flex: 1;\n  -ms-flex: 1;\n  flex: 1;\n  display: block;\n  overflow: hidden;\n  padding: 0 16px;\n  width: 0;\n  border-width: 1px 0px 1px 1px;\n  border-radius: 0;\n  text-align: center;\n  text-overflow: ellipsis;\n  white-space: nowrap; }\n  .button-bar > .button:before,\n  .button-bar > .button .icon:before {\n    line-height: 44px; }\n  .button-bar > .button:first-child {\n    border-radius: 4px 0px 0px 4px; }\n  .button-bar > .button:last-child {\n    border-right-width: 1px;\n    border-radius: 0px 4px 4px 0px; }\n  .button-bar > .button:only-child {\n    border-radius: 4px; }\n\n.button-bar > .button-small:before,\n.button-bar > .button-small .icon:before {\n  line-height: 28px; }\n\n/**\n * Grid\n * --------------------------------------------------\n * Using flexbox for the grid, inspired by Philip Walton:\n * http://philipwalton.github.io/solved-by-flexbox/demos/grids/\n * By default each .col within a .row will evenly take up\n * available width, and the height of each .col with take\n * up the height of the tallest .col in the same .row.\n */\n.row {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  padding: 5px;\n  width: 100%; }\n\n.row-wrap {\n  -webkit-flex-wrap: wrap;\n  -moz-flex-wrap: wrap;\n  -ms-flex-wrap: wrap;\n  flex-wrap: wrap; }\n\n.row-no-padding {\n  padding: 0; }\n  .row-no-padding > .col {\n    padding: 0; }\n\n.row + .row {\n  margin-top: -5px;\n  padding-top: 0; }\n\n.col {\n  -webkit-box-flex: 1;\n  -webkit-flex: 1;\n  -moz-box-flex: 1;\n  -moz-flex: 1;\n  -ms-flex: 1;\n  flex: 1;\n  display: block;\n  padding: 5px;\n  width: 100%; }\n\n/* Vertically Align Columns */\n/* .row-* vertically aligns every .col in the .row */\n.row-top {\n  -webkit-box-align: start;\n  -ms-flex-align: start;\n  -webkit-align-items: flex-start;\n  -moz-align-items: flex-start;\n  align-items: flex-start; }\n\n.row-bottom {\n  -webkit-box-align: end;\n  -ms-flex-align: end;\n  -webkit-align-items: flex-end;\n  -moz-align-items: flex-end;\n  align-items: flex-end; }\n\n.row-center {\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center; }\n\n.row-stretch {\n  -webkit-box-align: stretch;\n  -ms-flex-align: stretch;\n  -webkit-align-items: stretch;\n  -moz-align-items: stretch;\n  align-items: stretch; }\n\n.row-baseline {\n  -webkit-box-align: baseline;\n  -ms-flex-align: baseline;\n  -webkit-align-items: baseline;\n  -moz-align-items: baseline;\n  align-items: baseline; }\n\n/* .col-* vertically aligns an individual .col */\n.col-top {\n  -webkit-align-self: flex-start;\n  -moz-align-self: flex-start;\n  -ms-flex-item-align: start;\n  align-self: flex-start; }\n\n.col-bottom {\n  -webkit-align-self: flex-end;\n  -moz-align-self: flex-end;\n  -ms-flex-item-align: end;\n  align-self: flex-end; }\n\n.col-center {\n  -webkit-align-self: center;\n  -moz-align-self: center;\n  -ms-flex-item-align: center;\n  align-self: center; }\n\n/* Column Offsets */\n.col-offset-10 {\n  margin-left: 10%; }\n\n.col-offset-20 {\n  margin-left: 20%; }\n\n.col-offset-25 {\n  margin-left: 25%; }\n\n.col-offset-33, .col-offset-34 {\n  margin-left: 33.3333%; }\n\n.col-offset-50 {\n  margin-left: 50%; }\n\n.col-offset-66, .col-offset-67 {\n  margin-left: 66.6666%; }\n\n.col-offset-75 {\n  margin-left: 75%; }\n\n.col-offset-80 {\n  margin-left: 80%; }\n\n.col-offset-90 {\n  margin-left: 90%; }\n\n/* Explicit Column Percent Sizes */\n/* By default each grid column will evenly distribute */\n/* across the grid. However, you can specify individual */\n/* columns to take up a certain size of the available area */\n.col-10 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 10%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 10%;\n  -ms-flex: 0 0 10%;\n  flex: 0 0 10%;\n  max-width: 10%; }\n\n.col-20 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 20%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 20%;\n  -ms-flex: 0 0 20%;\n  flex: 0 0 20%;\n  max-width: 20%; }\n\n.col-25 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 25%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 25%;\n  -ms-flex: 0 0 25%;\n  flex: 0 0 25%;\n  max-width: 25%; }\n\n.col-33, .col-34 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 33.3333%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 33.3333%;\n  -ms-flex: 0 0 33.3333%;\n  flex: 0 0 33.3333%;\n  max-width: 33.3333%; }\n\n.col-40 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 40%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 40%;\n  -ms-flex: 0 0 40%;\n  flex: 0 0 40%;\n  max-width: 40%; }\n\n.col-50 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 50%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 50%;\n  -ms-flex: 0 0 50%;\n  flex: 0 0 50%;\n  max-width: 50%; }\n\n.col-60 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 60%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 60%;\n  -ms-flex: 0 0 60%;\n  flex: 0 0 60%;\n  max-width: 60%; }\n\n.col-66, .col-67 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 66.6666%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 66.6666%;\n  -ms-flex: 0 0 66.6666%;\n  flex: 0 0 66.6666%;\n  max-width: 66.6666%; }\n\n.col-75 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 75%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 75%;\n  -ms-flex: 0 0 75%;\n  flex: 0 0 75%;\n  max-width: 75%; }\n\n.col-80 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 80%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 80%;\n  -ms-flex: 0 0 80%;\n  flex: 0 0 80%;\n  max-width: 80%; }\n\n.col-90 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 90%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 90%;\n  -ms-flex: 0 0 90%;\n  flex: 0 0 90%;\n  max-width: 90%; }\n\n/* Responsive Grid Classes */\n/* Adding a class of responsive-X to a row */\n/* will trigger the flex-direction to */\n/* change to column and add some margin */\n/* to any columns in the row for clearity */\n@media (max-width: 567px) {\n  .responsive-sm {\n    -webkit-box-direction: normal;\n    -moz-box-direction: normal;\n    -webkit-box-orient: vertical;\n    -moz-box-orient: vertical;\n    -webkit-flex-direction: column;\n    -ms-flex-direction: column;\n    flex-direction: column; }\n    .responsive-sm .col, .responsive-sm .col-10, .responsive-sm .col-20, .responsive-sm .col-25, .responsive-sm .col-33, .responsive-sm .col-34, .responsive-sm .col-50, .responsive-sm .col-66, .responsive-sm .col-67, .responsive-sm .col-75, .responsive-sm .col-80, .responsive-sm .col-90 {\n      -webkit-box-flex: 1;\n      -webkit-flex: 1;\n      -moz-box-flex: 1;\n      -moz-flex: 1;\n      -ms-flex: 1;\n      flex: 1;\n      margin-bottom: 15px;\n      margin-left: 0;\n      max-width: 100%;\n      width: 100%; } }\n\n@media (max-width: 767px) {\n  .responsive-md {\n    -webkit-box-direction: normal;\n    -moz-box-direction: normal;\n    -webkit-box-orient: vertical;\n    -moz-box-orient: vertical;\n    -webkit-flex-direction: column;\n    -ms-flex-direction: column;\n    flex-direction: column; }\n    .responsive-md .col, .responsive-md .col-10, .responsive-md .col-20, .responsive-md .col-25, .responsive-md .col-33, .responsive-md .col-34, .responsive-md .col-50, .responsive-md .col-66, .responsive-md .col-67, .responsive-md .col-75, .responsive-md .col-80, .responsive-md .col-90 {\n      -webkit-box-flex: 1;\n      -webkit-flex: 1;\n      -moz-box-flex: 1;\n      -moz-flex: 1;\n      -ms-flex: 1;\n      flex: 1;\n      margin-bottom: 15px;\n      margin-left: 0;\n      max-width: 100%;\n      width: 100%; } }\n\n@media (max-width: 1023px) {\n  .responsive-lg {\n    -webkit-box-direction: normal;\n    -moz-box-direction: normal;\n    -webkit-box-orient: vertical;\n    -moz-box-orient: vertical;\n    -webkit-flex-direction: column;\n    -ms-flex-direction: column;\n    flex-direction: column; }\n    .responsive-lg .col, .responsive-lg .col-10, .responsive-lg .col-20, .responsive-lg .col-25, .responsive-lg .col-33, .responsive-lg .col-34, .responsive-lg .col-50, .responsive-lg .col-66, .responsive-lg .col-67, .responsive-lg .col-75, .responsive-lg .col-80, .responsive-lg .col-90 {\n      -webkit-box-flex: 1;\n      -webkit-flex: 1;\n      -moz-box-flex: 1;\n      -moz-flex: 1;\n      -ms-flex: 1;\n      flex: 1;\n      margin-bottom: 15px;\n      margin-left: 0;\n      max-width: 100%;\n      width: 100%; } }\n\n/**\n * Utility Classes\n * --------------------------------------------------\n */\n.hide {\n  display: none; }\n\n.opacity-hide {\n  opacity: 0; }\n\n.grade-b .opacity-hide,\n.grade-c .opacity-hide {\n  opacity: 1;\n  display: none; }\n\n.show {\n  display: block; }\n\n.opacity-show {\n  opacity: 1; }\n\n.invisible {\n  visibility: hidden; }\n\n.keyboard-open .hide-on-keyboard-open {\n  display: none; }\n\n.keyboard-open .tabs.hide-on-keyboard-open + .pane .has-tabs,\n.keyboard-open .bar-footer.hide-on-keyboard-open + .pane .has-footer {\n  bottom: 0; }\n\n.inline {\n  display: inline-block; }\n\n.disable-pointer-events {\n  pointer-events: none; }\n\n.enable-pointer-events {\n  pointer-events: auto; }\n\n.disable-user-behavior {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  -webkit-touch-callout: none;\n  -webkit-tap-highlight-color: transparent;\n  -webkit-tap-highlight-color: transparent;\n  -webkit-user-drag: none;\n  -ms-touch-action: none;\n  -ms-content-zooming: none; }\n\n.click-block {\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  opacity: 0;\n  z-index: 99999;\n  -webkit-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n  overflow: hidden; }\n\n.click-block-hide {\n  -webkit-transform: translate3d(-9999px, 0, 0);\n  transform: translate3d(-9999px, 0, 0); }\n\n.no-resize {\n  resize: none; }\n\n.block {\n  display: block;\n  clear: both; }\n  .block:after {\n    display: block;\n    visibility: hidden;\n    clear: both;\n    height: 0;\n    content: \".\"; }\n\n.full-image {\n  width: 100%; }\n\n.clearfix {\n  *zoom: 1; }\n  .clearfix:before, .clearfix:after {\n    display: table;\n    content: \"\";\n    line-height: 0; }\n  .clearfix:after {\n    clear: both; }\n\n/**\n * Content Padding\n * --------------------------------------------------\n */\n.padding {\n  padding: 10px; }\n\n.padding-top,\n.padding-vertical {\n  padding-top: 10px; }\n\n.padding-right,\n.padding-horizontal {\n  padding-right: 10px; }\n\n.padding-bottom,\n.padding-vertical {\n  padding-bottom: 10px; }\n\n.padding-left,\n.padding-horizontal {\n  padding-left: 10px; }\n\n/**\n * Scrollable iFrames\n * --------------------------------------------------\n */\n.iframe-wrapper {\n  position: fixed;\n  -webkit-overflow-scrolling: touch;\n  overflow: scroll; }\n  .iframe-wrapper iframe {\n    height: 100%;\n    width: 100%; }\n\n/**\n * Rounded\n * --------------------------------------------------\n */\n.rounded {\n  border-radius: 4px; }\n\n/**\n * Utility Colors\n * --------------------------------------------------\n * Utility colors are added to help set a naming convention. You'll\n * notice we purposely do not use words like \"red\" or \"blue\", but\n * instead have colors which represent an emotion or generic theme.\n */\n.light, a.light {\n  color: #fff; }\n\n.light-bg {\n  background-color: #fff; }\n\n.light-border {\n  border-color: #ddd; }\n\n.stable, a.stable {\n  color: #f8f8f8; }\n\n.stable-bg {\n  background-color: #f8f8f8; }\n\n.stable-border {\n  border-color: #b2b2b2; }\n\n.positive, a.positive {\n  color: #387ef5; }\n\n.positive-bg {\n  background-color: #387ef5; }\n\n.positive-border {\n  border-color: #0c60ee; }\n\n.calm, a.calm {\n  color: #11c1f3; }\n\n.calm-bg {\n  background-color: #11c1f3; }\n\n.calm-border {\n  border-color: #0a9dc7; }\n\n.assertive, a.assertive {\n  color: #ef473a; }\n\n.assertive-bg {\n  background-color: #ef473a; }\n\n.assertive-border {\n  border-color: #e42112; }\n\n.balanced, a.balanced {\n  color: #33cd5f; }\n\n.balanced-bg {\n  background-color: #33cd5f; }\n\n.balanced-border {\n  border-color: #28a54c; }\n\n.energized, a.energized {\n  color: #ffc900; }\n\n.energized-bg {\n  background-color: #ffc900; }\n\n.energized-border {\n  border-color: #e6b500; }\n\n.royal, a.royal {\n  color: #886aea; }\n\n.royal-bg {\n  background-color: #886aea; }\n\n.royal-border {\n  border-color: #6b46e5; }\n\n.dark, a.dark {\n  color: #444; }\n\n.dark-bg {\n  background-color: #444; }\n\n.dark-border {\n  border-color: #111; }\n\n[collection-repeat] {\n  /* Position is set by transforms */\n  left: 0 !important;\n  top: 0 !important;\n  position: absolute !important;\n  z-index: 1; }\n\n.collection-repeat-container {\n  position: relative;\n  z-index: 1; }\n\n.collection-repeat-after-container {\n  z-index: 0;\n  display: block;\n  /* when scrolling horizontally, make sure the after container doesn't take up 100% width */ }\n  .collection-repeat-after-container.horizontal {\n    display: inline-block; }\n\n[ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak,\n.x-ng-cloak, .ng-hide:not(.ng-hide-animate) {\n  display: none !important; }\n\n/**\n * Platform\n * --------------------------------------------------\n * Platform specific tweaks\n */\n.platform-ios.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader) {\n  height: 64px;\n  height: calc(constant(safe-area-inset-top) + 44px);\n  height: calc(env(safe-area-inset-top) + 44px); }\n  .platform-ios.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader).item-input-inset .item-input-wrapper {\n    margin-top: 19px !important; }\n  .platform-ios.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader) > * {\n    margin-top: 20px;\n    margin-top: constant(safe-area-inset-top);\n    margin-top: env(safe-area-inset-top); }\n\n.platform-ios.platform-cordova:not(.fullscreen) .bar-header {\n  padding-left: calc( constant(safe-area-inset-left) + 5px);\n  padding-left: calc(env(safe-area-inset-left) + 5px);\n  padding-right: calc( constant(safe-area-inset-right) + 5px);\n  padding-right: calc( env(safe-area-inset-right) + 5px); }\n  .platform-ios.platform-cordova:not(.fullscreen) .bar-header .buttons:last-child {\n    right: calc(constant(safe-area-inset-right) + 5px);\n    right: calc(env(safe-area-inset-right) + 5px); }\n\n.platform-ios.platform-cordova:not(.fullscreen) .has-tabs, .platform-ios.platform-cordova:not(.fullscreen) .bar-footer.has-tabs {\n  bottom: calc(constant(safe-area-inset-bottom) + 49px);\n  bottom: calc(env(safe-area-inset-bottom) + 49px); }\n\n.platform-ios.platform-cordova:not(.fullscreen) .tabs-top > .tabs, .platform-ios.platform-cordova:not(.fullscreen) .tabs.tabs-top {\n  top: 64px; }\n\n.platform-ios.platform-cordova:not(.fullscreen) .tabs {\n  padding-bottom: constant(safe-area-inset-bottom);\n  padding-bottom: env(safe-area-inset-bottom);\n  height: calc(constant(safe-area-inset-bottom) + 49px);\n  height: calc(env(safe-area-inset-bottom) + 49px); }\n\n.platform-ios.platform-cordova:not(.fullscreen) .has-header, .platform-ios.platform-cordova:not(.fullscreen) .bar-subheader {\n  top: 64px;\n  top: calc(constant(safe-area-inset-top) + 44px);\n  top: calc(env(safe-area-inset-top) + 44px); }\n\n.platform-ios.platform-cordova:not(.fullscreen) .has-subheader {\n  top: 108px;\n  top: calc(constant(safe-area-inset-top) + 88px);\n  top: calc(env(safe-area-inset-top) + 88px); }\n\n.platform-ios.platform-cordova:not(.fullscreen) .has-header.has-tabs-top {\n  top: 113px;\n  top: calc(93px + constant(safe-area-inset-top));\n  top: calc(93px + env(safe-area-inset-top)); }\n\n.platform-ios.platform-cordova:not(.fullscreen) .has-header.has-subheader.has-tabs-top {\n  top: 157px;\n  top: calc(137px + constant(safe-area-inset-right));\n  top: calc(137px + env(safe-area-inset-right)); }\n\n.platform-ios.platform-cordova .popover .bar-header:not(.bar-subheader) {\n  height: 44px; }\n  .platform-ios.platform-cordova .popover .bar-header:not(.bar-subheader).item-input-inset .item-input-wrapper {\n    margin-top: -1px; }\n  .platform-ios.platform-cordova .popover .bar-header:not(.bar-subheader) > * {\n    margin-top: 0; }\n\n.platform-ios.platform-cordova .popover .has-header, .platform-ios.platform-cordova .popover .bar-subheader {\n  top: 44px; }\n\n.platform-ios.platform-cordova .popover .has-subheader {\n  top: 88px; }\n\n.platform-ios.platform-cordova.status-bar-hide {\n  margin-bottom: 20px; }\n\n@media (orientation: landscape) {\n  .item {\n    padding: 16px calc(constant(safe-area-inset-right) + 16px); }\n    .item .badge {\n      right: calc(constant(safe-area-inset-right) + 32px); }\n  .item-icon-left {\n    padding-left: calc(constant(safe-area-inset-left) + 54px); }\n    .item-icon-left .icon {\n      left: calc(constant(safe-area-inset-left) + 11px); }\n  .item-icon-right {\n    padding-right: calc(constant(safe-area-inset-right) + 54px); }\n    .item-icon-right .icon {\n      right: calc(constant(safe-area-inset-right) + 11px); }\n  .item-complex, a.item.item-complex, button.item.item-complex {\n    padding: 0; }\n    .item-complex .item-content, a.item.item-complex .item-content, button.item.item-complex .item-content {\n      padding: 16px calc(constant(safe-area-inset-right) + 49px) 16px calc(constant(safe-area-inset-left) + 16px); }\n  .item-left-edit.visible.active {\n    -webkit-transform: translate3d(calc(constant(safe-area-inset-left) + 8px), 0, 0);\n    transform: translate3d(calc(constant(safe-area-inset-left) + 8px), 0, 0); }\n  .list-left-editing .item-left-editable .item-content,\n  .item-left-editing.item-left-editable .item-content {\n    -webkit-transform: translate3d(calc(constant(safe-area-inset-left) + 50px), 0, 0);\n    transform: translate3d(calc(constant(safe-area-inset-left) + 50px), 0, 0); }\n  .item-right-edit {\n    right: constant(safe-area-inset-right);\n    right: env(safe-area-inset-right); }\n  .platform-ios.platform-browser.platform-ipad {\n    position: fixed; } }\n\n.platform-c:not(.enable-transitions) * {\n  -webkit-transition: none !important;\n  transition: none !important; }\n\n.slide-in-up {\n  -webkit-transform: translate3d(0, 100%, 0);\n  transform: translate3d(0, 100%, 0); }\n\n.slide-in-up.ng-enter,\n.slide-in-up > .ng-enter {\n  -webkit-transition: all cubic-bezier(0.1, 0.7, 0.1, 1) 400ms;\n  transition: all cubic-bezier(0.1, 0.7, 0.1, 1) 400ms; }\n\n.slide-in-up.ng-enter-active,\n.slide-in-up > .ng-enter-active {\n  -webkit-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0); }\n\n.slide-in-up.ng-leave,\n.slide-in-up > .ng-leave {\n  -webkit-transition: all ease-in-out 250ms;\n  transition: all ease-in-out 250ms; }\n\n@-webkit-keyframes scaleOut {\n  from {\n    -webkit-transform: scale(1);\n    opacity: 1; }\n  to {\n    -webkit-transform: scale(0.8);\n    opacity: 0; } }\n\n@keyframes scaleOut {\n  from {\n    transform: scale(1);\n    opacity: 1; }\n  to {\n    transform: scale(0.8);\n    opacity: 0; } }\n\n@-webkit-keyframes superScaleIn {\n  from {\n    -webkit-transform: scale(1.2);\n    opacity: 0; }\n  to {\n    -webkit-transform: scale(1);\n    opacity: 1; } }\n\n@keyframes superScaleIn {\n  from {\n    transform: scale(1.2);\n    opacity: 0; }\n  to {\n    transform: scale(1);\n    opacity: 1; } }\n\n[nav-view-transition=\"ios\"] [nav-view=\"entering\"],\n[nav-view-transition=\"ios\"] [nav-view=\"leaving\"] {\n  -webkit-transition-duration: 500ms;\n  transition-duration: 500ms;\n  -webkit-transition-timing-function: cubic-bezier(0.36, 0.66, 0.04, 1);\n  transition-timing-function: cubic-bezier(0.36, 0.66, 0.04, 1);\n  -webkit-transition-property: opacity, -webkit-transform, box-shadow;\n  transition-property: opacity, transform, box-shadow; }\n\n[nav-view-transition=\"ios\"][nav-view-direction=\"forward\"], [nav-view-transition=\"ios\"][nav-view-direction=\"back\"] {\n  background-color: #000; }\n\n[nav-view-transition=\"ios\"] [nav-view=\"active\"],\n[nav-view-transition=\"ios\"][nav-view-direction=\"forward\"] [nav-view=\"entering\"],\n[nav-view-transition=\"ios\"][nav-view-direction=\"back\"] [nav-view=\"leaving\"] {\n  z-index: 3; }\n\n[nav-view-transition=\"ios\"][nav-view-direction=\"back\"] [nav-view=\"entering\"],\n[nav-view-transition=\"ios\"][nav-view-direction=\"forward\"] [nav-view=\"leaving\"] {\n  z-index: 2; }\n\n[nav-bar-transition=\"ios\"] .title,\n[nav-bar-transition=\"ios\"] .buttons,\n[nav-bar-transition=\"ios\"] .back-text {\n  -webkit-transition-duration: 500ms;\n  transition-duration: 500ms;\n  -webkit-transition-timing-function: cubic-bezier(0.36, 0.66, 0.04, 1);\n  transition-timing-function: cubic-bezier(0.36, 0.66, 0.04, 1);\n  -webkit-transition-property: opacity, -webkit-transform;\n  transition-property: opacity, transform; }\n\n[nav-bar-transition=\"ios\"] [nav-bar=\"active\"],\n[nav-bar-transition=\"ios\"] [nav-bar=\"entering\"] {\n  z-index: 10; }\n  [nav-bar-transition=\"ios\"] [nav-bar=\"active\"] .bar,\n  [nav-bar-transition=\"ios\"] [nav-bar=\"entering\"] .bar {\n    background: transparent; }\n\n[nav-bar-transition=\"ios\"] [nav-bar=\"cached\"] {\n  display: block; }\n  [nav-bar-transition=\"ios\"] [nav-bar=\"cached\"] .header-item {\n    display: none; }\n\n[nav-view-transition=\"android\"] [nav-view=\"entering\"],\n[nav-view-transition=\"android\"] [nav-view=\"leaving\"] {\n  -webkit-transition-duration: 200ms;\n  transition-duration: 200ms;\n  -webkit-transition-timing-function: cubic-bezier(0.4, 0.6, 0.2, 1);\n  transition-timing-function: cubic-bezier(0.4, 0.6, 0.2, 1);\n  -webkit-transition-property: -webkit-transform;\n  transition-property: transform; }\n\n[nav-view-transition=\"android\"] [nav-view=\"active\"],\n[nav-view-transition=\"android\"][nav-view-direction=\"forward\"] [nav-view=\"entering\"],\n[nav-view-transition=\"android\"][nav-view-direction=\"back\"] [nav-view=\"leaving\"] {\n  z-index: 3; }\n\n[nav-view-transition=\"android\"][nav-view-direction=\"back\"] [nav-view=\"entering\"],\n[nav-view-transition=\"android\"][nav-view-direction=\"forward\"] [nav-view=\"leaving\"] {\n  z-index: 2; }\n\n[nav-bar-transition=\"android\"] .title,\n[nav-bar-transition=\"android\"] .buttons {\n  -webkit-transition-duration: 200ms;\n  transition-duration: 200ms;\n  -webkit-transition-timing-function: cubic-bezier(0.4, 0.6, 0.2, 1);\n  transition-timing-function: cubic-bezier(0.4, 0.6, 0.2, 1);\n  -webkit-transition-property: opacity;\n  transition-property: opacity; }\n\n[nav-bar-transition=\"android\"] [nav-bar=\"active\"],\n[nav-bar-transition=\"android\"] [nav-bar=\"entering\"] {\n  z-index: 10; }\n  [nav-bar-transition=\"android\"] [nav-bar=\"active\"] .bar,\n  [nav-bar-transition=\"android\"] [nav-bar=\"entering\"] .bar {\n    background: transparent; }\n\n[nav-bar-transition=\"android\"] [nav-bar=\"cached\"] {\n  display: block; }\n  [nav-bar-transition=\"android\"] [nav-bar=\"cached\"] .header-item {\n    display: none; }\n\n[nav-swipe=\"fast\"] [nav-view],\n[nav-swipe=\"fast\"] .title,\n[nav-swipe=\"fast\"] .buttons,\n[nav-swipe=\"fast\"] .back-text {\n  -webkit-transition-duration: 50ms;\n  transition-duration: 50ms;\n  -webkit-transition-timing-function: linear;\n  transition-timing-function: linear; }\n\n[nav-swipe=\"slow\"] [nav-view],\n[nav-swipe=\"slow\"] .title,\n[nav-swipe=\"slow\"] .buttons,\n[nav-swipe=\"slow\"] .back-text {\n  -webkit-transition-duration: 160ms;\n  transition-duration: 160ms;\n  -webkit-transition-timing-function: linear;\n  transition-timing-function: linear; }\n\n[nav-view=\"cached\"],\n[nav-bar=\"cached\"] {\n  display: none; }\n\n[nav-view=\"stage\"] {\n  opacity: 0;\n  -webkit-transition-duration: 0;\n  transition-duration: 0; }\n\n[nav-bar=\"stage\"] .title,\n[nav-bar=\"stage\"] .buttons,\n[nav-bar=\"stage\"] .back-text {\n  position: absolute;\n  opacity: 0;\n  -webkit-transition-duration: 0s;\n  transition-duration: 0s; }\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/js/ionic-angular.js",
    "content": "/*!\n * Copyright 2015 Drifty Co.\n * http://drifty.com/\n *\n * Ionic, v1.3.4\n * A powerful HTML5 mobile app framework.\n * http://ionicframework.com/\n *\n * By @maxlynch, @benjsperry, @adamdbradley <3\n *\n * Licensed under the MIT license. Please see LICENSE for more information.\n *\n */\n\n(function() {\n/* eslint no-unused-vars:0 */\nvar IonicModule = angular.module('ionic', ['ngAnimate', 'ngSanitize', 'ui.router', 'ngIOS9UIWebViewPatch']),\n  extend = angular.extend,\n  forEach = angular.forEach,\n  isDefined = angular.isDefined,\n  isNumber = angular.isNumber,\n  isString = angular.isString,\n  jqLite = angular.element,\n  noop = angular.noop;\n\n/**\n * @ngdoc service\n * @name $ionicActionSheet\n * @module ionic\n * @description\n * The Action Sheet is a slide-up pane that lets the user choose from a set of options.\n * Dangerous options are highlighted in red and made obvious.\n *\n * There are easy ways to cancel out of the action sheet, such as tapping the backdrop or even\n * hitting escape on the keyboard for desktop testing.\n *\n * ![Action Sheet](http://ionicframework.com.s3.amazonaws.com/docs/controllers/actionSheet.gif)\n *\n * @usage\n * To trigger an Action Sheet in your code, use the $ionicActionSheet service in your angular controllers:\n *\n * ```js\n * angular.module('mySuperApp', ['ionic'])\n * .controller(function($scope, $ionicActionSheet, $timeout) {\n *\n *  // Triggered on a button click, or some other target\n *  $scope.show = function() {\n *\n *    // Show the action sheet\n *    var hideSheet = $ionicActionSheet.show({\n *      buttons: [\n *        { text: '<b>Share</b> This' },\n *        { text: 'Move' }\n *      ],\n *      destructiveText: 'Delete',\n *      titleText: 'Modify your album',\n *      cancelText: 'Cancel',\n *      cancel: function() {\n          // add cancel code..\n        },\n *      buttonClicked: function(index) {\n *        return true;\n *      }\n *    });\n *\n *    // For example's sake, hide the sheet after two seconds\n *    $timeout(function() {\n *      hideSheet();\n *    }, 2000);\n *\n *  };\n * });\n * ```\n *\n */\nIonicModule\n.factory('$ionicActionSheet', [\n  '$rootScope',\n  '$compile',\n  '$animate',\n  '$timeout',\n  '$ionicTemplateLoader',\n  '$ionicPlatform',\n  '$ionicBody',\n  'IONIC_BACK_PRIORITY',\nfunction($rootScope, $compile, $animate, $timeout, $ionicTemplateLoader, $ionicPlatform, $ionicBody, IONIC_BACK_PRIORITY) {\n\n  return {\n    show: actionSheet\n  };\n\n  /**\n   * @ngdoc method\n   * @name $ionicActionSheet#show\n   * @description\n   * Load and return a new action sheet.\n   *\n   * A new isolated scope will be created for the\n   * action sheet and the new element will be appended into the body.\n   *\n   * @param {object} options The options for this ActionSheet. Properties:\n   *\n   *  - `[Object]` `buttons` Which buttons to show.  Each button is an object with a `text` field.\n   *  - `{string}` `titleText` The title to show on the action sheet.\n   *  - `{string=}` `cancelText` the text for a 'cancel' button on the action sheet.\n   *  - `{string=}` `destructiveText` The text for a 'danger' on the action sheet.\n   *  - `{function=}` `cancel` Called if the cancel button is pressed, the backdrop is tapped or\n   *     the hardware back button is pressed.\n   *  - `{function=}` `buttonClicked` Called when one of the non-destructive buttons is clicked,\n   *     with the index of the button that was clicked and the button object. Return true to close\n   *     the action sheet, or false to keep it opened.\n   *  - `{function=}` `destructiveButtonClicked` Called when the destructive button is clicked.\n   *     Return true to close the action sheet, or false to keep it opened.\n   *  -  `{boolean=}` `cancelOnStateChange` Whether to cancel the actionSheet when navigating\n   *     to a new state.  Default true.\n   *  - `{string}` `cssClass` The custom CSS class name.\n   *\n   * @returns {function} `hideSheet` A function which, when called, hides & cancels the action sheet.\n   */\n  function actionSheet(opts) {\n    var scope = $rootScope.$new(true);\n\n    extend(scope, {\n      cancel: noop,\n      destructiveButtonClicked: noop,\n      buttonClicked: noop,\n      $deregisterBackButton: noop,\n      buttons: [],\n      cancelOnStateChange: true\n    }, opts || {});\n\n    function textForIcon(text) {\n      if (text && /icon/.test(text)) {\n        scope.$actionSheetHasIcon = true;\n      }\n    }\n\n    for (var x = 0; x < scope.buttons.length; x++) {\n      textForIcon(scope.buttons[x].text);\n    }\n    textForIcon(scope.cancelText);\n    textForIcon(scope.destructiveText);\n\n    // Compile the template\n    var element = scope.element = $compile('<ion-action-sheet ng-class=\"cssClass\" buttons=\"buttons\"></ion-action-sheet>')(scope);\n\n    // Grab the sheet element for animation\n    var sheetEl = jqLite(element[0].querySelector('.action-sheet-wrapper'));\n\n    var stateChangeListenDone = scope.cancelOnStateChange ?\n      $rootScope.$on('$stateChangeSuccess', function() { scope.cancel(); }) :\n      noop;\n\n    // removes the actionSheet from the screen\n    scope.removeSheet = function(done) {\n      if (scope.removed) return;\n\n      scope.removed = true;\n      sheetEl.removeClass('action-sheet-up');\n      $timeout(function() {\n        // wait to remove this due to a 300ms delay native\n        // click which would trigging whatever was underneath this\n        $ionicBody.removeClass('action-sheet-open');\n      }, 400);\n      scope.$deregisterBackButton();\n      stateChangeListenDone();\n\n      $animate.removeClass(element, 'active').then(function() {\n        scope.$destroy();\n        element.remove();\n        // scope.cancel.$scope is defined near the bottom\n        scope.cancel.$scope = sheetEl = null;\n        (done || noop)(opts.buttons);\n      });\n    };\n\n    scope.showSheet = function(done) {\n      if (scope.removed) return;\n\n      $ionicBody.append(element)\n                .addClass('action-sheet-open');\n\n      $animate.addClass(element, 'active').then(function() {\n        if (scope.removed) return;\n        (done || noop)();\n      });\n      $timeout(function() {\n        if (scope.removed) return;\n        sheetEl.addClass('action-sheet-up');\n      }, 20, false);\n    };\n\n    // registerBackButtonAction returns a callback to deregister the action\n    scope.$deregisterBackButton = $ionicPlatform.registerBackButtonAction(\n      function() {\n        $timeout(scope.cancel);\n      },\n      IONIC_BACK_PRIORITY.actionSheet\n    );\n\n    // called when the user presses the cancel button\n    scope.cancel = function() {\n      // after the animation is out, call the cancel callback\n      scope.removeSheet(opts.cancel);\n    };\n\n    scope.buttonClicked = function(index) {\n      // Check if the button click event returned true, which means\n      // we can close the action sheet\n      if (opts.buttonClicked(index, opts.buttons[index]) === true) {\n        scope.removeSheet();\n      }\n    };\n\n    scope.destructiveButtonClicked = function() {\n      // Check if the destructive button click event returned true, which means\n      // we can close the action sheet\n      if (opts.destructiveButtonClicked() === true) {\n        scope.removeSheet();\n      }\n    };\n\n    scope.showSheet();\n\n    // Expose the scope on $ionicActionSheet's return value for the sake\n    // of testing it.\n    scope.cancel.$scope = scope;\n\n    return scope.cancel;\n  }\n}]);\n\n\njqLite.prototype.addClass = function(cssClasses) {\n  var x, y, cssClass, el, splitClasses, existingClasses;\n  if (cssClasses && cssClasses != 'ng-scope' && cssClasses != 'ng-isolate-scope') {\n    for (x = 0; x < this.length; x++) {\n      el = this[x];\n      if (el.setAttribute) {\n\n        if (cssClasses.indexOf(' ') < 0 && el.classList.add) {\n          el.classList.add(cssClasses);\n        } else {\n          existingClasses = (' ' + (el.getAttribute('class') || '') + ' ')\n            .replace(/[\\n\\t]/g, \" \");\n          splitClasses = cssClasses.split(' ');\n\n          for (y = 0; y < splitClasses.length; y++) {\n            cssClass = splitClasses[y].trim();\n            if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {\n              existingClasses += cssClass + ' ';\n            }\n          }\n          el.setAttribute('class', existingClasses.trim());\n        }\n      }\n    }\n  }\n  return this;\n};\n\njqLite.prototype.removeClass = function(cssClasses) {\n  var x, y, splitClasses, cssClass, el;\n  if (cssClasses) {\n    for (x = 0; x < this.length; x++) {\n      el = this[x];\n      if (el.getAttribute) {\n        if (cssClasses.indexOf(' ') < 0 && el.classList.remove) {\n          el.classList.remove(cssClasses);\n        } else {\n          splitClasses = cssClasses.split(' ');\n\n          for (y = 0; y < splitClasses.length; y++) {\n            cssClass = splitClasses[y];\n            el.setAttribute('class', (\n                (\" \" + (el.getAttribute('class') || '') + \" \")\n                .replace(/[\\n\\t]/g, \" \")\n                .replace(\" \" + cssClass.trim() + \" \", \" \")).trim()\n            );\n          }\n        }\n      }\n    }\n  }\n  return this;\n};\n\n/**\n * @ngdoc service\n * @name $ionicBackdrop\n * @module ionic\n * @description\n * Shows and hides a backdrop over the UI.  Appears behind popups, loading,\n * and other overlays.\n *\n * Often, multiple UI components require a backdrop, but only one backdrop is\n * ever needed in the DOM at a time.\n *\n * Therefore, each component that requires the backdrop to be shown calls\n * `$ionicBackdrop.retain()` when it wants the backdrop, then `$ionicBackdrop.release()`\n * when it is done with the backdrop.\n *\n * For each time `retain` is called, the backdrop will be shown until `release` is called.\n *\n * For example, if `retain` is called three times, the backdrop will be shown until `release`\n * is called three times.\n *\n * **Notes:**\n * - The backdrop service will broadcast 'backdrop.shown' and 'backdrop.hidden' events from the root scope,\n * this is useful for alerting native components not in html.\n *\n * @usage\n *\n * ```js\n * function MyController($scope, $ionicBackdrop, $timeout, $rootScope) {\n *   //Show a backdrop for one second\n *   $scope.action = function() {\n *     $ionicBackdrop.retain();\n *     $timeout(function() {\n *       $ionicBackdrop.release();\n *     }, 1000);\n *   };\n *\n *   // Execute action on backdrop disappearing\n *   $scope.$on('backdrop.hidden', function() {\n *     // Execute action\n *   });\n *\n *   // Execute action on backdrop appearing\n *   $scope.$on('backdrop.shown', function() {\n *     // Execute action\n *   });\n *\n * }\n * ```\n */\nIonicModule\n.factory('$ionicBackdrop', [\n  '$document', '$timeout', '$$rAF', '$rootScope',\nfunction($document, $timeout, $$rAF, $rootScope) {\n\n  var el = jqLite('<div class=\"backdrop\">');\n  var backdropHolds = 0;\n\n  $document[0].body.appendChild(el[0]);\n\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicBackdrop#retain\n     * @description Retains the backdrop.\n     */\n    retain: retain,\n    /**\n     * @ngdoc method\n     * @name $ionicBackdrop#release\n     * @description\n     * Releases the backdrop.\n     */\n    release: release,\n\n    getElement: getElement,\n\n    // exposed for testing\n    _element: el\n  };\n\n  function retain() {\n    backdropHolds++;\n    if (backdropHolds === 1) {\n      el.addClass('visible');\n      $rootScope.$broadcast('backdrop.shown');\n      $$rAF(function() {\n        // If we're still at >0 backdropHolds after async...\n        if (backdropHolds >= 1) el.addClass('active');\n      });\n    }\n  }\n  function release() {\n    if (backdropHolds === 1) {\n      el.removeClass('active');\n      $rootScope.$broadcast('backdrop.hidden');\n      $timeout(function() {\n        // If we're still at 0 backdropHolds after async...\n        if (backdropHolds === 0) el.removeClass('visible');\n      }, 400, false);\n    }\n    backdropHolds = Math.max(0, backdropHolds - 1);\n  }\n\n  function getElement() {\n    return el;\n  }\n\n}]);\n\n/**\n * @private\n */\nIonicModule\n.factory('$ionicBind', ['$parse', '$interpolate', function($parse, $interpolate) {\n  var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n  return function(scope, attrs, bindDefinition) {\n    forEach(bindDefinition || {}, function(definition, scopeName) {\n      //Adapted from angular.js $compile\n      var match = definition.match(LOCAL_REGEXP) || [],\n        attrName = match[3] || scopeName,\n        mode = match[1], // @, =, or &\n        parentGet,\n        unwatch;\n\n      switch (mode) {\n        case '@':\n          if (!attrs[attrName]) {\n            return;\n          }\n          attrs.$observe(attrName, function(value) {\n            scope[scopeName] = value;\n          });\n          // we trigger an interpolation to ensure\n          // the value is there for use immediately\n          if (attrs[attrName]) {\n            scope[scopeName] = $interpolate(attrs[attrName])(scope);\n          }\n          break;\n\n        case '=':\n          if (!attrs[attrName]) {\n            return;\n          }\n          unwatch = scope.$watch(attrs[attrName], function(value) {\n            scope[scopeName] = value;\n          });\n          //Destroy parent scope watcher when this scope is destroyed\n          scope.$on('$destroy', unwatch);\n          break;\n\n        case '&':\n          /* jshint -W044 */\n          if (attrs[attrName] && attrs[attrName].match(RegExp(scopeName + '\\(.*?\\)'))) {\n            throw new Error('& expression binding \"' + scopeName + '\" looks like it will recursively call \"' +\n                          attrs[attrName] + '\" and cause a stack overflow! Please choose a different scopeName.');\n          }\n          parentGet = $parse(attrs[attrName]);\n          scope[scopeName] = function(locals) {\n            return parentGet(scope, locals);\n          };\n          break;\n      }\n    });\n  };\n}]);\n\n/**\n * @ngdoc service\n * @name $ionicBody\n * @module ionic\n * @description An angular utility service to easily and efficiently\n * add and remove CSS classes from the document's body element.\n */\nIonicModule\n.factory('$ionicBody', ['$document', function($document) {\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicBody#addClass\n     * @description Add a class to the document's body element.\n     * @param {string} class Each argument will be added to the body element.\n     * @returns {$ionicBody} The $ionicBody service so methods can be chained.\n     */\n    addClass: function() {\n      for (var x = 0; x < arguments.length; x++) {\n        $document[0].body.classList.add(arguments[x]);\n      }\n      return this;\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicBody#removeClass\n     * @description Remove a class from the document's body element.\n     * @param {string} class Each argument will be removed from the body element.\n     * @returns {$ionicBody} The $ionicBody service so methods can be chained.\n     */\n    removeClass: function() {\n      for (var x = 0; x < arguments.length; x++) {\n        $document[0].body.classList.remove(arguments[x]);\n      }\n      return this;\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicBody#enableClass\n     * @description Similar to the `add` method, except the first parameter accepts a boolean\n     * value determining if the class should be added or removed. Rather than writing user code,\n     * such as \"if true then add the class, else then remove the class\", this method can be\n     * given a true or false value which reduces redundant code.\n     * @param {boolean} shouldEnableClass A true/false value if the class should be added or removed.\n     * @param {string} class Each remaining argument would be added or removed depending on\n     * the first argument.\n     * @returns {$ionicBody} The $ionicBody service so methods can be chained.\n     */\n    enableClass: function(shouldEnableClass) {\n      var args = Array.prototype.slice.call(arguments).slice(1);\n      if (shouldEnableClass) {\n        this.addClass.apply(this, args);\n      } else {\n        this.removeClass.apply(this, args);\n      }\n      return this;\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicBody#append\n     * @description Append a child to the document's body.\n     * @param {element} element The element to be appended to the body. The passed in element\n     * can be either a jqLite element, or a DOM element.\n     * @returns {$ionicBody} The $ionicBody service so methods can be chained.\n     */\n    append: function(ele) {\n      $document[0].body.appendChild(ele.length ? ele[0] : ele);\n      return this;\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicBody#get\n     * @description Get the document's body element.\n     * @returns {element} Returns the document's body element.\n     */\n    get: function() {\n      return $document[0].body;\n    }\n  };\n}]);\n\nIonicModule\n.factory('$ionicClickBlock', [\n  '$document',\n  '$ionicBody',\n  '$timeout',\nfunction($document, $ionicBody, $timeout) {\n  var CSS_HIDE = 'click-block-hide';\n  var cbEle, fallbackTimer, pendingShow;\n\n  function preventClick(ev) {\n    ev.preventDefault();\n    ev.stopPropagation();\n  }\n\n  function addClickBlock() {\n    if (pendingShow) {\n      if (cbEle) {\n        cbEle.classList.remove(CSS_HIDE);\n      } else {\n        cbEle = $document[0].createElement('div');\n        cbEle.className = 'click-block';\n        $ionicBody.append(cbEle);\n        cbEle.addEventListener('touchstart', preventClick);\n        cbEle.addEventListener('mousedown', preventClick);\n      }\n      pendingShow = false;\n    }\n  }\n\n  function removeClickBlock() {\n    cbEle && cbEle.classList.add(CSS_HIDE);\n  }\n\n  return {\n    show: function(autoExpire) {\n      pendingShow = true;\n      $timeout.cancel(fallbackTimer);\n      fallbackTimer = $timeout(this.hide, autoExpire || 310, false);\n      addClickBlock();\n    },\n    hide: function() {\n      pendingShow = false;\n      $timeout.cancel(fallbackTimer);\n      removeClickBlock();\n    }\n  };\n}]);\n\n/**\n * @ngdoc service\n * @name $ionicGesture\n * @module ionic\n * @description An angular service exposing ionic\n * {@link ionic.utility:ionic.EventController}'s gestures.\n */\nIonicModule\n.factory('$ionicGesture', [function() {\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicGesture#on\n     * @description Add an event listener for a gesture on an element. See {@link ionic.utility:ionic.EventController#onGesture}.\n     * @param {string} eventType The gesture event to listen for.\n     * @param {function(e)} callback The function to call when the gesture\n     * happens.\n     * @param {element} $element The angular element to listen for the event on.\n     * @param {object} options object.\n     * @returns {ionic.Gesture} The gesture object (use this to remove the gesture later on).\n     */\n    on: function(eventType, cb, $element, options) {\n      return window.ionic.onGesture(eventType, cb, $element[0], options);\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicGesture#off\n     * @description Remove an event listener for a gesture on an element. See {@link ionic.utility:ionic.EventController#offGesture}.\n     * @param {ionic.Gesture} gesture The gesture that should be removed.\n     * @param {string} eventType The gesture event to remove the listener for.\n     * @param {function(e)} callback The listener to remove.\n     */\n    off: function(gesture, eventType, cb) {\n      return window.ionic.offGesture(gesture, eventType, cb);\n    }\n  };\n}]);\n\n/**\n * @ngdoc service\n * @name $ionicHistory\n * @module ionic\n * @description\n * $ionicHistory keeps track of views as the user navigates through an app. Similar to the way a\n * browser behaves, an Ionic app is able to keep track of the previous view, the current view, and\n * the forward view (if there is one).  However, a typical web browser only keeps track of one\n * history stack in a linear fashion.\n *\n * Unlike a traditional browser environment, apps and webapps have parallel independent histories,\n * such as with tabs. Should a user navigate few pages deep on one tab, and then switch to a new\n * tab and back, the back button relates not to the previous tab, but to the previous pages\n * visited within _that_ tab.\n *\n * `$ionicHistory` facilitates this parallel history architecture.\n */\n\nIonicModule\n.factory('$ionicHistory', [\n  '$rootScope',\n  '$state',\n  '$location',\n  '$window',\n  '$timeout',\n  '$ionicViewSwitcher',\n  '$ionicNavViewDelegate',\nfunction($rootScope, $state, $location, $window, $timeout, $ionicViewSwitcher, $ionicNavViewDelegate) {\n\n  // history actions while navigating views\n  var ACTION_INITIAL_VIEW = 'initialView';\n  var ACTION_NEW_VIEW = 'newView';\n  var ACTION_MOVE_BACK = 'moveBack';\n  var ACTION_MOVE_FORWARD = 'moveForward';\n\n  // direction of navigation\n  var DIRECTION_BACK = 'back';\n  var DIRECTION_FORWARD = 'forward';\n  var DIRECTION_ENTER = 'enter';\n  var DIRECTION_EXIT = 'exit';\n  var DIRECTION_SWAP = 'swap';\n  var DIRECTION_NONE = 'none';\n\n  var stateChangeCounter = 0;\n  var lastStateId, nextViewOptions, deregisterStateChangeListener, nextViewExpireTimer, forcedNav;\n\n  var viewHistory = {\n    histories: { root: { historyId: 'root', parentHistoryId: null, stack: [], cursor: -1 } },\n    views: {},\n    backView: null,\n    forwardView: null,\n    currentView: null\n  };\n\n  var View = function() {};\n  View.prototype.initialize = function(data) {\n    if (data) {\n      for (var name in data) this[name] = data[name];\n      return this;\n    }\n    return null;\n  };\n  View.prototype.go = function() {\n\n    if (this.stateName) {\n      return $state.go(this.stateName, this.stateParams);\n    }\n\n    if (this.url && this.url !== $location.url()) {\n\n      if (viewHistory.backView === this) {\n        return $window.history.go(-1);\n      } else if (viewHistory.forwardView === this) {\n        return $window.history.go(1);\n      }\n\n      $location.url(this.url);\n    }\n\n    return null;\n  };\n  View.prototype.destroy = function() {\n    if (this.scope) {\n      this.scope.$destroy && this.scope.$destroy();\n      this.scope = null;\n    }\n  };\n\n\n  function getViewById(viewId) {\n    return (viewId ? viewHistory.views[ viewId ] : null);\n  }\n\n  function getBackView(view) {\n    return (view ? getViewById(view.backViewId) : null);\n  }\n\n  function getForwardView(view) {\n    return (view ? getViewById(view.forwardViewId) : null);\n  }\n\n  function getHistoryById(historyId) {\n    return (historyId ? viewHistory.histories[ historyId ] : null);\n  }\n\n  function getHistory(scope) {\n    var histObj = getParentHistoryObj(scope);\n\n    if (!viewHistory.histories[ histObj.historyId ]) {\n      // this history object exists in parent scope, but doesn't\n      // exist in the history data yet\n      viewHistory.histories[ histObj.historyId ] = {\n        historyId: histObj.historyId,\n        parentHistoryId: getParentHistoryObj(histObj.scope.$parent).historyId,\n        stack: [],\n        cursor: -1\n      };\n    }\n    return getHistoryById(histObj.historyId);\n  }\n\n  function getParentHistoryObj(scope) {\n    var parentScope = scope;\n    while (parentScope) {\n      if (parentScope.hasOwnProperty('$historyId')) {\n        // this parent scope has a historyId\n        return { historyId: parentScope.$historyId, scope: parentScope };\n      }\n      // nothing found keep climbing up\n      parentScope = parentScope.$parent;\n    }\n    // no history for the parent, use the root\n    return { historyId: 'root', scope: $rootScope };\n  }\n\n  function setNavViews(viewId) {\n    viewHistory.currentView = getViewById(viewId);\n    viewHistory.backView = getBackView(viewHistory.currentView);\n    viewHistory.forwardView = getForwardView(viewHistory.currentView);\n  }\n\n  function getCurrentStateId() {\n    var id;\n    if ($state && $state.current && $state.current.name) {\n      id = $state.current.name;\n      if ($state.params) {\n        for (var key in $state.params) {\n          if ($state.params.hasOwnProperty(key) && $state.params[key]) {\n            id += \"_\" + key + \"=\" + $state.params[key];\n          }\n        }\n      }\n      return id;\n    }\n    // if something goes wrong make sure its got a unique stateId\n    return ionic.Utils.nextUid();\n  }\n\n  function getCurrentStateParams() {\n    var rtn;\n    if ($state && $state.params) {\n      for (var key in $state.params) {\n        if ($state.params.hasOwnProperty(key)) {\n          rtn = rtn || {};\n          rtn[key] = $state.params[key];\n        }\n      }\n    }\n    return rtn;\n  }\n\n\n  return {\n\n    register: function(parentScope, viewLocals) {\n\n      var currentStateId = getCurrentStateId(),\n          hist = getHistory(parentScope),\n          currentView = viewHistory.currentView,\n          backView = viewHistory.backView,\n          forwardView = viewHistory.forwardView,\n          viewId = null,\n          action = null,\n          direction = DIRECTION_NONE,\n          historyId = hist.historyId,\n          url = $location.url(),\n          tmp, x, ele;\n\n      if (lastStateId !== currentStateId) {\n        lastStateId = currentStateId;\n        stateChangeCounter++;\n      }\n\n      if (forcedNav) {\n        // we've previously set exactly what to do\n        viewId = forcedNav.viewId;\n        action = forcedNav.action;\n        direction = forcedNav.direction;\n        forcedNav = null;\n\n      } else if (backView && backView.stateId === currentStateId) {\n        // they went back one, set the old current view as a forward view\n        viewId = backView.viewId;\n        historyId = backView.historyId;\n        action = ACTION_MOVE_BACK;\n        if (backView.historyId === currentView.historyId) {\n          // went back in the same history\n          direction = DIRECTION_BACK;\n\n        } else if (currentView) {\n          direction = DIRECTION_EXIT;\n\n          tmp = getHistoryById(backView.historyId);\n          if (tmp && tmp.parentHistoryId === currentView.historyId) {\n            direction = DIRECTION_ENTER;\n\n          } else {\n            tmp = getHistoryById(currentView.historyId);\n            if (tmp && tmp.parentHistoryId === hist.parentHistoryId) {\n              direction = DIRECTION_SWAP;\n            }\n          }\n        }\n\n      } else if (forwardView && forwardView.stateId === currentStateId) {\n        // they went to the forward one, set the forward view to no longer a forward view\n        viewId = forwardView.viewId;\n        historyId = forwardView.historyId;\n        action = ACTION_MOVE_FORWARD;\n        if (forwardView.historyId === currentView.historyId) {\n          direction = DIRECTION_FORWARD;\n\n        } else if (currentView) {\n          direction = DIRECTION_EXIT;\n\n          if (currentView.historyId === hist.parentHistoryId) {\n            direction = DIRECTION_ENTER;\n\n          } else {\n            tmp = getHistoryById(currentView.historyId);\n            if (tmp && tmp.parentHistoryId === hist.parentHistoryId) {\n              direction = DIRECTION_SWAP;\n            }\n          }\n        }\n\n        tmp = getParentHistoryObj(parentScope);\n        if (forwardView.historyId && tmp.scope) {\n          // if a history has already been created by the forward view then make sure it stays the same\n          tmp.scope.$historyId = forwardView.historyId;\n          historyId = forwardView.historyId;\n        }\n\n      } else if (currentView && currentView.historyId !== historyId &&\n                hist.cursor > -1 && hist.stack.length > 0 && hist.cursor < hist.stack.length &&\n                hist.stack[hist.cursor].stateId === currentStateId) {\n        // they just changed to a different history and the history already has views in it\n        var switchToView = hist.stack[hist.cursor];\n        viewId = switchToView.viewId;\n        historyId = switchToView.historyId;\n        action = ACTION_MOVE_BACK;\n        direction = DIRECTION_SWAP;\n\n        tmp = getHistoryById(currentView.historyId);\n        if (tmp && tmp.parentHistoryId === historyId) {\n          direction = DIRECTION_EXIT;\n\n        } else {\n          tmp = getHistoryById(historyId);\n          if (tmp && tmp.parentHistoryId === currentView.historyId) {\n            direction = DIRECTION_ENTER;\n          }\n        }\n\n        // if switching to a different history, and the history of the view we're switching\n        // to has an existing back view from a different history than itself, then\n        // it's back view would be better represented using the current view as its back view\n        tmp = getViewById(switchToView.backViewId);\n        if (tmp && switchToView.historyId !== tmp.historyId) {\n          // the new view is being removed from it's old position in the history and being placed at the top,\n          // so we need to update any views that reference it as a backview, otherwise there will be infinitely loops\n          var viewIds = Object.keys(viewHistory.views);\n          viewIds.forEach(function(viewId) {\n            var view = viewHistory.views[viewId];\n            if ((view.backViewId === switchToView.viewId) && (view.historyId !== switchToView.historyId)) {\n              view.backViewId = null;\n            }\n          });\n\n          hist.stack[hist.cursor].backViewId = currentView.viewId;\n        }\n\n      } else {\n\n        // create an element from the viewLocals template\n        ele = $ionicViewSwitcher.createViewEle(viewLocals);\n        if (this.isAbstractEle(ele, viewLocals)) {\n          return {\n            action: 'abstractView',\n            direction: DIRECTION_NONE,\n            ele: ele\n          };\n        }\n\n        // set a new unique viewId\n        viewId = ionic.Utils.nextUid();\n\n        if (currentView) {\n          // set the forward view if there is a current view (ie: if its not the first view)\n          currentView.forwardViewId = viewId;\n\n          action = ACTION_NEW_VIEW;\n\n          // check if there is a new forward view within the same history\n          if (forwardView && currentView.stateId !== forwardView.stateId &&\n             currentView.historyId === forwardView.historyId) {\n            // they navigated to a new view but the stack already has a forward view\n            // since its a new view remove any forwards that existed\n            tmp = getHistoryById(forwardView.historyId);\n            if (tmp) {\n              // the forward has a history\n              for (x = tmp.stack.length - 1; x >= forwardView.index; x--) {\n                // starting from the end destroy all forwards in this history from this point\n                var stackItem = tmp.stack[x];\n                stackItem && stackItem.destroy && stackItem.destroy();\n                tmp.stack.splice(x);\n              }\n              historyId = forwardView.historyId;\n            }\n          }\n\n          // its only moving forward if its in the same history\n          if (hist.historyId === currentView.historyId) {\n            direction = DIRECTION_FORWARD;\n\n          } else if (currentView.historyId !== hist.historyId) {\n            // DB: this is a new view in a different tab\n            direction = DIRECTION_ENTER;\n\n            tmp = getHistoryById(currentView.historyId);\n            if (tmp && tmp.parentHistoryId === hist.parentHistoryId) {\n              direction = DIRECTION_SWAP;\n\n            } else {\n              tmp = getHistoryById(tmp.parentHistoryId);\n              if (tmp && tmp.historyId === hist.historyId) {\n                direction = DIRECTION_EXIT;\n              }\n            }\n          }\n\n        } else {\n          // there's no current view, so this must be the initial view\n          action = ACTION_INITIAL_VIEW;\n        }\n\n        if (stateChangeCounter < 2) {\n          // views that were spun up on the first load should not animate\n          direction = DIRECTION_NONE;\n        }\n\n        // add the new view\n        viewHistory.views[viewId] = this.createView({\n          viewId: viewId,\n          index: hist.stack.length,\n          historyId: hist.historyId,\n          backViewId: (currentView && currentView.viewId ? currentView.viewId : null),\n          forwardViewId: null,\n          stateId: currentStateId,\n          stateName: this.currentStateName(),\n          stateParams: getCurrentStateParams(),\n          url: url,\n          canSwipeBack: canSwipeBack(ele, viewLocals)\n        });\n\n        // add the new view to this history's stack\n        hist.stack.push(viewHistory.views[viewId]);\n      }\n\n      deregisterStateChangeListener && deregisterStateChangeListener();\n      $timeout.cancel(nextViewExpireTimer);\n      if (nextViewOptions) {\n        if (nextViewOptions.disableAnimate) direction = DIRECTION_NONE;\n        if (nextViewOptions.disableBack) viewHistory.views[viewId].backViewId = null;\n        if (nextViewOptions.historyRoot) {\n          for (x = 0; x < hist.stack.length; x++) {\n            if (hist.stack[x].viewId === viewId) {\n              hist.stack[x].index = 0;\n              hist.stack[x].backViewId = hist.stack[x].forwardViewId = null;\n            } else {\n              delete viewHistory.views[hist.stack[x].viewId];\n            }\n          }\n          hist.stack = [viewHistory.views[viewId]];\n        }\n        nextViewOptions = null;\n      }\n\n      setNavViews(viewId);\n\n      if (viewHistory.backView && historyId == viewHistory.backView.historyId && currentStateId == viewHistory.backView.stateId && url == viewHistory.backView.url) {\n        for (x = 0; x < hist.stack.length; x++) {\n          if (hist.stack[x].viewId == viewId) {\n            action = 'dupNav';\n            direction = DIRECTION_NONE;\n            if (x > 0) {\n              hist.stack[x - 1].forwardViewId = null;\n            }\n            viewHistory.forwardView = null;\n            viewHistory.currentView.index = viewHistory.backView.index;\n            viewHistory.currentView.backViewId = viewHistory.backView.backViewId;\n            viewHistory.backView = getBackView(viewHistory.backView);\n            hist.stack.splice(x, 1);\n            break;\n          }\n        }\n      }\n\n      hist.cursor = viewHistory.currentView.index;\n\n      return {\n        viewId: viewId,\n        action: action,\n        direction: direction,\n        historyId: historyId,\n        enableBack: this.enabledBack(viewHistory.currentView),\n        isHistoryRoot: (viewHistory.currentView.index === 0),\n        ele: ele\n      };\n    },\n\n    registerHistory: function(scope) {\n      scope.$historyId = ionic.Utils.nextUid();\n    },\n\n    createView: function(data) {\n      var newView = new View();\n      return newView.initialize(data);\n    },\n\n    getViewById: getViewById,\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#viewHistory\n     * @description The app's view history data, such as all the views and histories, along\n     * with how they are ordered and linked together within the navigation stack.\n     * @returns {object} Returns an object containing the apps view history data.\n     */\n    viewHistory: function() {\n      return viewHistory;\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#currentView\n     * @description The app's current view.\n     * @returns {object} Returns the current view.\n     */\n    currentView: function(view) {\n      if (arguments.length) {\n        viewHistory.currentView = view;\n      }\n      return viewHistory.currentView;\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#currentHistoryId\n     * @description The ID of the history stack which is the parent container of the current view.\n     * @returns {string} Returns the current history ID.\n     */\n    currentHistoryId: function() {\n      return viewHistory.currentView ? viewHistory.currentView.historyId : null;\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#currentTitle\n     * @description Gets and sets the current view's title.\n     * @param {string=} val The title to update the current view with.\n     * @returns {string} Returns the current view's title.\n     */\n    currentTitle: function(val) {\n      if (viewHistory.currentView) {\n        if (arguments.length) {\n          viewHistory.currentView.title = val;\n        }\n        return viewHistory.currentView.title;\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#backView\n     * @description Returns the view that was before the current view in the history stack.\n     * If the user navigated from View A to View B, then View A would be the back view, and\n     * View B would be the current view.\n     * @returns {object} Returns the back view.\n     */\n    backView: function(view) {\n      if (arguments.length) {\n        viewHistory.backView = view;\n      }\n      return viewHistory.backView;\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#backTitle\n     * @description Gets the back view's title.\n     * @returns {string} Returns the back view's title.\n     */\n    backTitle: function(view) {\n      var backView = (view && getViewById(view.backViewId)) || viewHistory.backView;\n      return backView && backView.title;\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#forwardView\n     * @description Returns the view that was in front of the current view in the history stack.\n     * A forward view would exist if the user navigated from View A to View B, then\n     * navigated back to View A. At this point then View B would be the forward view, and View\n     * A would be the current view.\n     * @returns {object} Returns the forward view.\n     */\n    forwardView: function(view) {\n      if (arguments.length) {\n        viewHistory.forwardView = view;\n      }\n      return viewHistory.forwardView;\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#currentStateName\n     * @description Returns the current state name.\n     * @returns {string}\n     */\n    currentStateName: function() {\n      return ($state && $state.current ? $state.current.name : null);\n    },\n\n    isCurrentStateNavView: function(navView) {\n      return !!($state && $state.current && $state.current.views && $state.current.views[navView]);\n    },\n\n    goToHistoryRoot: function(historyId) {\n      if (historyId) {\n        var hist = getHistoryById(historyId);\n        if (hist && hist.stack.length) {\n          if (viewHistory.currentView && viewHistory.currentView.viewId === hist.stack[0].viewId) {\n            return;\n          }\n          forcedNav = {\n            viewId: hist.stack[0].viewId,\n            action: ACTION_MOVE_BACK,\n            direction: DIRECTION_BACK\n          };\n          hist.stack[0].go();\n        }\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#goBack\n     * @param {number=} backCount Optional negative integer setting how many views to go\n     * back. By default it'll go back one view by using the value `-1`. To go back two\n     * views you would use `-2`. If the number goes farther back than the number of views\n     * in the current history's stack then it'll go to the first view in the current history's\n     * stack. If the number is zero or greater then it'll do nothing. It also does not\n     * cross history stacks, meaning it can only go as far back as the current history.\n     * @description Navigates the app to the back view, if a back view exists.\n     */\n    goBack: function(backCount) {\n      if (isDefined(backCount) && backCount !== -1) {\n        if (backCount > -1) return;\n\n        var currentHistory = viewHistory.histories[this.currentHistoryId()];\n        var newCursor = currentHistory.cursor + backCount + 1;\n        if (newCursor < 1) {\n          newCursor = 1;\n        }\n\n        currentHistory.cursor = newCursor;\n        setNavViews(currentHistory.stack[newCursor].viewId);\n\n        var cursor = newCursor - 1;\n        var clearStateIds = [];\n        var fwdView = getViewById(currentHistory.stack[cursor].forwardViewId);\n        while (fwdView) {\n          clearStateIds.push(fwdView.stateId || fwdView.viewId);\n          cursor++;\n          if (cursor >= currentHistory.stack.length) break;\n          fwdView = getViewById(currentHistory.stack[cursor].forwardViewId);\n        }\n\n        var self = this;\n        if (clearStateIds.length) {\n          $timeout(function() {\n            self.clearCache(clearStateIds);\n          }, 300);\n        }\n      }\n\n      viewHistory.backView && viewHistory.backView.go();\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#removeBackView\n     * @description Remove the previous view from the history completely, including the\n     * cached element and scope (if they exist).\n     */\n    removeBackView: function() {\n      var self = this;\n      var currentHistory = viewHistory.histories[this.currentHistoryId()];\n      var currentCursor = currentHistory.cursor;\n\n      var currentView = currentHistory.stack[currentCursor];\n      var backView = currentHistory.stack[currentCursor - 1];\n      var replacementView = currentHistory.stack[currentCursor - 2];\n\n      // fail if we dont have enough views in the history\n      if (!backView || !replacementView) {\n        return;\n      }\n\n      // remove the old backView and the cached element/scope\n      currentHistory.stack.splice(currentCursor - 1, 1);\n      self.clearCache([backView.viewId]);\n      // make the replacementView and currentView point to each other (bypass the old backView)\n      currentView.backViewId = replacementView.viewId;\n      currentView.index = currentView.index - 1;\n      replacementView.forwardViewId = currentView.viewId;\n      // update the cursor and set new backView\n      viewHistory.backView = replacementView;\n      currentHistory.currentCursor += -1;\n    },\n\n    enabledBack: function(view) {\n      var backView = getBackView(view);\n      return !!(backView && backView.historyId === view.historyId);\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#clearHistory\n     * @description Clears out the app's entire history, except for the current view.\n     */\n    clearHistory: function() {\n      var\n      histories = viewHistory.histories,\n      currentView = viewHistory.currentView;\n\n      if (histories) {\n        for (var historyId in histories) {\n\n          if (histories[historyId].stack) {\n            histories[historyId].stack = [];\n            histories[historyId].cursor = -1;\n          }\n\n          if (currentView && currentView.historyId === historyId) {\n            currentView.backViewId = currentView.forwardViewId = null;\n            histories[historyId].stack.push(currentView);\n          } else if (histories[historyId].destroy) {\n            histories[historyId].destroy();\n          }\n\n        }\n      }\n\n      for (var viewId in viewHistory.views) {\n        if (viewId !== currentView.viewId) {\n          delete viewHistory.views[viewId];\n        }\n      }\n\n      if (currentView) {\n        setNavViews(currentView.viewId);\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#clearCache\n\t * @return promise\n     * @description Removes all cached views within every {@link ionic.directive:ionNavView}.\n     * This both removes the view element from the DOM, and destroy it's scope.\n     */\n    clearCache: function(stateIds) {\n      return $timeout(function() {\n        $ionicNavViewDelegate._instances.forEach(function(instance) {\n          instance.clearCache(stateIds);\n        });\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#nextViewOptions\n     * @description Sets options for the next view. This method can be useful to override\n     * certain view/transition defaults right before a view transition happens. For example,\n     * the {@link ionic.directive:menuClose} directive uses this method internally to ensure\n     * an animated view transition does not happen when a side menu is open, and also sets\n     * the next view as the root of its history stack. After the transition these options\n     * are set back to null.\n     *\n     * Available options:\n     *\n     * * `disableAnimate`: Do not animate the next transition.\n     * * `disableBack`: The next view should forget its back view, and set it to null.\n     * * `historyRoot`: The next view should become the root view in its history stack.\n     *\n     * ```js\n     * $ionicHistory.nextViewOptions({\n     *   disableAnimate: true,\n     *   disableBack: true\n     * });\n     * ```\n     */\n    nextViewOptions: function(opts) {\n      deregisterStateChangeListener && deregisterStateChangeListener();\n      if (arguments.length) {\n        $timeout.cancel(nextViewExpireTimer);\n        if (opts === null) {\n          nextViewOptions = opts;\n        } else {\n          nextViewOptions = nextViewOptions || {};\n          extend(nextViewOptions, opts);\n          if (nextViewOptions.expire) {\n              deregisterStateChangeListener = $rootScope.$on('$stateChangeSuccess', function() {\n                nextViewExpireTimer = $timeout(function() {\n                  nextViewOptions = null;\n                  }, nextViewOptions.expire);\n              });\n          }\n        }\n      }\n      return nextViewOptions;\n    },\n\n    isAbstractEle: function(ele, viewLocals) {\n      if (viewLocals && viewLocals.$$state && viewLocals.$$state.self['abstract']) {\n        return true;\n      }\n      return !!(ele && (isAbstractTag(ele) || isAbstractTag(ele.children())));\n    },\n\n    isActiveScope: function(scope) {\n      if (!scope) return false;\n\n      var climbScope = scope;\n      var currentHistoryId = this.currentHistoryId();\n      var foundHistoryId;\n\n      while (climbScope) {\n        if (climbScope.$$disconnected) {\n          return false;\n        }\n\n        if (!foundHistoryId && climbScope.hasOwnProperty('$historyId')) {\n          foundHistoryId = true;\n        }\n\n        if (currentHistoryId) {\n          if (climbScope.hasOwnProperty('$historyId') && currentHistoryId == climbScope.$historyId) {\n            return true;\n          }\n          if (climbScope.hasOwnProperty('$activeHistoryId')) {\n            if (currentHistoryId == climbScope.$activeHistoryId) {\n              if (climbScope.hasOwnProperty('$historyId')) {\n                return true;\n              }\n              if (!foundHistoryId) {\n                return true;\n              }\n            }\n          }\n        }\n\n        if (foundHistoryId && climbScope.hasOwnProperty('$activeHistoryId')) {\n          foundHistoryId = false;\n        }\n\n        climbScope = climbScope.$parent;\n      }\n\n      return currentHistoryId ? currentHistoryId == 'root' : true;\n    }\n\n  };\n\n  function isAbstractTag(ele) {\n    return ele && ele.length && /ion-side-menus|ion-tabs/i.test(ele[0].tagName);\n  }\n\n  function canSwipeBack(ele, viewLocals) {\n    if (viewLocals && viewLocals.$$state && viewLocals.$$state.self.canSwipeBack === false) {\n      return false;\n    }\n    if (ele && ele.attr('can-swipe-back') === 'false') {\n      return false;\n    }\n    var eleChild = ele.find('ion-view');\n    if (eleChild && eleChild.attr('can-swipe-back') === 'false') {\n      return false;\n    }\n    return true;\n  }\n\n}])\n\n.run([\n  '$rootScope',\n  '$state',\n  '$location',\n  '$document',\n  '$ionicPlatform',\n  '$ionicHistory',\n  'IONIC_BACK_PRIORITY',\nfunction($rootScope, $state, $location, $document, $ionicPlatform, $ionicHistory, IONIC_BACK_PRIORITY) {\n\n  // always reset the keyboard state when change stage\n  $rootScope.$on('$ionicView.beforeEnter', function() {\n    ionic.keyboard && ionic.keyboard.hide && ionic.keyboard.hide();\n  });\n\n  $rootScope.$on('$ionicHistory.change', function(e, data) {\n    if (!data) return null;\n\n    var viewHistory = $ionicHistory.viewHistory();\n\n    var hist = (data.historyId ? viewHistory.histories[ data.historyId ] : null);\n    if (hist && hist.cursor > -1 && hist.cursor < hist.stack.length) {\n      // the history they're going to already exists\n      // go to it's last view in its stack\n      var view = hist.stack[ hist.cursor ];\n      return view.go(data);\n    }\n\n    // this history does not have a URL, but it does have a uiSref\n    // figure out its URL from the uiSref\n    if (!data.url && data.uiSref) {\n      data.url = $state.href(data.uiSref);\n    }\n\n    if (data.url) {\n      // don't let it start with a #, messes with $location.url()\n      if (data.url.indexOf('#') === 0) {\n        data.url = data.url.replace('#', '');\n      }\n      if (data.url !== $location.url()) {\n        // we've got a good URL, ready GO!\n        $location.url(data.url);\n      }\n    }\n  });\n\n  $rootScope.$ionicGoBack = function(backCount) {\n    $ionicHistory.goBack(backCount);\n  };\n\n  // Set the document title when a new view is shown\n  $rootScope.$on('$ionicView.afterEnter', function(ev, data) {\n    if (data && data.title) {\n      $document[0].title = data.title;\n    }\n  });\n\n  // Triggered when devices with a hardware back button (Android) is clicked by the user\n  // This is a Cordova/Phonegap platform specifc method\n  function onHardwareBackButton(e) {\n    var backView = $ionicHistory.backView();\n    if (backView) {\n      // there is a back view, go to it\n      backView.go();\n    } else {\n      // there is no back view, so close the app instead\n      ionic.Platform.exitApp();\n    }\n    e.preventDefault();\n    return false;\n  }\n  $ionicPlatform.registerBackButtonAction(\n    onHardwareBackButton,\n    IONIC_BACK_PRIORITY.view\n  );\n\n}]);\n\n/**\n * @ngdoc provider\n * @name $ionicConfigProvider\n * @module ionic\n * @description\n * Ionic automatically takes platform configurations into account to adjust things like what\n * transition style to use and whether tab icons should show on the top or bottom. For example,\n * iOS will move forward by transitioning the entering view from right to center and the leaving\n * view from center to left. However, Android will transition with the entering view going from\n * bottom to center, covering the previous view, which remains stationary. It should be noted\n * that when a platform is not iOS or Android, then it'll default to iOS. So if you are\n * developing on a desktop browser, it's going to take on iOS default configs.\n *\n * These configs can be changed using the `$ionicConfigProvider` during the configuration phase\n * of your app. Additionally, `$ionicConfig` can also set and get config values during the run\n * phase and within the app itself.\n *\n * By default, all base config variables are set to `'platform'`, which means it'll take on the\n * default config of the platform on which it's running. Config variables can be set at this\n * level so all platforms follow the same setting, rather than its platform config.\n * The following code would set the same config variable for all platforms:\n *\n * ```js\n * $ionicConfigProvider.views.maxCache(10);\n * ```\n *\n * Additionally, each platform can have its own config within the `$ionicConfigProvider.platform`\n * property. The config below would only apply to Android devices.\n *\n * ```js\n * $ionicConfigProvider.platform.android.views.maxCache(5);\n * ```\n *\n * @usage\n * ```js\n * var myApp = angular.module('reallyCoolApp', ['ionic']);\n *\n * myApp.config(function($ionicConfigProvider) {\n *   $ionicConfigProvider.views.maxCache(5);\n *\n *   // note that you can also chain configs\n *   $ionicConfigProvider.backButton.text('Go Back').icon('ion-chevron-left');\n * });\n * ```\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#views.transition\n * @description Animation style when transitioning between views. Default `platform`.\n *\n * @param {string} transition Which style of view transitioning to use.\n *\n * * `platform`: Dynamically choose the correct transition style depending on the platform\n * the app is running from. If the platform is not `ios` or `android` then it will default\n * to `ios`.\n * * `ios`: iOS style transition.\n * * `android`: Android style transition.\n * * `none`: Do not perform animated transitions.\n *\n * @returns {string} value\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#views.maxCache\n * @description  Maximum number of view elements to cache in the DOM. When the max number is\n * exceeded, the view with the longest time period since it was accessed is removed. Views that\n * stay in the DOM cache the view's scope, current state, and scroll position. The scope is\n * disconnected from the `$watch` cycle when it is cached and reconnected when it enters again.\n * When the maximum cache is `0`, the leaving view's element will be removed from the DOM after\n * each view transition, and the next time the same view is shown, it will have to re-compile,\n * attach to the DOM, and link the element again. This disables caching, in effect.\n * @param {number} maxNumber Maximum number of views to retain. Default `10`.\n * @returns {number} How many views Ionic will hold onto until the a view is removed.\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#views.forwardCache\n * @description  By default, when navigating, views that were recently visited are cached, and\n * the same instance data and DOM elements are referenced when navigating back. However, when\n * navigating back in the history, the \"forward\" views are removed from the cache. If you\n * navigate forward to the same view again, it'll create a new DOM element and controller\n * instance. Basically, any forward views are reset each time. Set this config to `true` to have\n * forward views cached and not reset on each load.\n * @param {boolean} value\n * @returns {boolean}\n */\n\n /**\n  * @ngdoc method\n  * @name $ionicConfigProvider#views.swipeBackEnabled\n  * @description  By default on iOS devices, swipe to go back functionality is enabled by default.\n  * This method can be used to disable it globally, or on a per-view basis.\n  * Note: This functionality is only supported on iOS.\n  * @param {boolean} value\n  * @returns {boolean}\n  */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#scrolling.jsScrolling\n * @description  Whether to use JS or Native scrolling. Defaults to native scrolling. Setting this to\n * `true` has the same effect as setting each `ion-content` to have `overflow-scroll='false'`.\n * @param {boolean} value Defaults to `false` as of Ionic 1.2\n * @returns {boolean}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#backButton.icon\n * @description Back button icon.\n * @param {string} value\n * @returns {string}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#backButton.text\n * @description Back button text.\n * @param {string} value Defaults to `Back`.\n * @returns {string}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#backButton.previousTitleText\n * @description If the previous title text should become the back button text. This\n * is the default for iOS.\n * @param {boolean} value\n * @returns {boolean}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#form.checkbox\n * @description Checkbox style. Android defaults to `square` and iOS defaults to `circle`.\n * @param {string} value\n * @returns {string}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#form.toggle\n * @description Toggle item style. Android defaults to `small` and iOS defaults to `large`.\n * @param {string} value\n * @returns {string}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#spinner.icon\n * @description Default spinner icon to use.\n * @param {string} value Can be: `android`, `ios`, `ios-small`, `bubbles`, `circles`, `crescent`,\n * `dots`, `lines`, `ripple`, or `spiral`.\n * @returns {string}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#tabs.style\n * @description Tab style. Android defaults to `striped` and iOS defaults to `standard`.\n * @param {string} value Available values include `striped` and `standard`.\n * @returns {string}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#tabs.position\n * @description Tab position. Android defaults to `top` and iOS defaults to `bottom`.\n * @param {string} value Available values include `top` and `bottom`.\n * @returns {string}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#templates.maxPrefetch\n * @description Sets the maximum number of templates to prefetch from the templateUrls defined in\n * $stateProvider.state. If set to `0`, the user will have to wait\n * for a template to be fetched the first time when navigating to a new page. Default `30`.\n * @param {integer} value Max number of template to prefetch from the templateUrls defined in\n * `$stateProvider.state()`.\n * @returns {integer}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#navBar.alignTitle\n * @description Which side of the navBar to align the title. Default `center`.\n *\n * @param {string} value side of the navBar to align the title.\n *\n * * `platform`: Dynamically choose the correct title style depending on the platform\n * the app is running from. If the platform is `ios`, it will default to `center`.\n * If the platform is `android`, it will default to `left`. If the platform is not\n * `ios` or `android`, it will default to `center`.\n *\n * * `left`: Left align the title in the navBar\n * * `center`: Center align the title in the navBar\n * * `right`: Right align the title in the navBar.\n *\n * @returns {string} value\n */\n\n/**\n  * @ngdoc method\n  * @name $ionicConfigProvider#navBar.positionPrimaryButtons\n  * @description Which side of the navBar to align the primary navBar buttons. Default `left`.\n  *\n  * @param {string} value side of the navBar to align the primary navBar buttons.\n  *\n  * * `platform`: Dynamically choose the correct title style depending on the platform\n  * the app is running from. If the platform is `ios`, it will default to `left`.\n  * If the platform is `android`, it will default to `right`. If the platform is not\n  * `ios` or `android`, it will default to `left`.\n  *\n  * * `left`: Left align the primary navBar buttons in the navBar\n  * * `right`: Right align the primary navBar buttons in the navBar.\n  *\n  * @returns {string} value\n  */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#navBar.positionSecondaryButtons\n * @description Which side of the navBar to align the secondary navBar buttons. Default `right`.\n *\n * @param {string} value side of the navBar to align the secondary navBar buttons.\n *\n * * `platform`: Dynamically choose the correct title style depending on the platform\n * the app is running from. If the platform is `ios`, it will default to `right`.\n * If the platform is `android`, it will default to `right`. If the platform is not\n * `ios` or `android`, it will default to `right`.\n *\n * * `left`: Left align the secondary navBar buttons in the navBar\n * * `right`: Right align the secondary navBar buttons in the navBar.\n *\n * @returns {string} value\n */\n\nIonicModule\n.provider('$ionicConfig', function() {\n\n  var provider = this;\n  provider.platform = {};\n  var PLATFORM = 'platform';\n\n  var configProperties = {\n    views: {\n      maxCache: PLATFORM,\n      forwardCache: PLATFORM,\n      transition: PLATFORM,\n      swipeBackEnabled: PLATFORM,\n      swipeBackHitWidth: PLATFORM\n    },\n    navBar: {\n      alignTitle: PLATFORM,\n      positionPrimaryButtons: PLATFORM,\n      positionSecondaryButtons: PLATFORM,\n      transition: PLATFORM\n    },\n    backButton: {\n      icon: PLATFORM,\n      text: PLATFORM,\n      previousTitleText: PLATFORM\n    },\n    form: {\n      checkbox: PLATFORM,\n      toggle: PLATFORM\n    },\n    scrolling: {\n      jsScrolling: PLATFORM\n    },\n    spinner: {\n      icon: PLATFORM\n    },\n    tabs: {\n      style: PLATFORM,\n      position: PLATFORM\n    },\n    templates: {\n      maxPrefetch: PLATFORM\n    },\n    platform: {}\n  };\n  createConfig(configProperties, provider, '');\n\n\n\n  // Default\n  // -------------------------\n  setPlatformConfig('default', {\n\n    views: {\n      maxCache: 10,\n      forwardCache: false,\n      transition: 'ios',\n      swipeBackEnabled: true,\n      swipeBackHitWidth: 45\n    },\n\n    navBar: {\n      alignTitle: 'center',\n      positionPrimaryButtons: 'left',\n      positionSecondaryButtons: 'right',\n      transition: 'view'\n    },\n\n    backButton: {\n      icon: 'ion-ios-arrow-back',\n      text: 'Back',\n      previousTitleText: true\n    },\n\n    form: {\n      checkbox: 'circle',\n      toggle: 'large'\n    },\n\n    scrolling: {\n      jsScrolling: true\n    },\n\n    spinner: {\n      icon: 'ios'\n    },\n\n    tabs: {\n      style: 'standard',\n      position: 'bottom'\n    },\n\n    templates: {\n      maxPrefetch: 30\n    }\n\n  });\n\n\n\n  // iOS (it is the default already)\n  // -------------------------\n  setPlatformConfig('ios', {});\n\n\n\n  // Android\n  // -------------------------\n  setPlatformConfig('android', {\n\n    views: {\n      transition: 'android',\n      swipeBackEnabled: false\n    },\n\n    navBar: {\n      alignTitle: 'left',\n      positionPrimaryButtons: 'right',\n      positionSecondaryButtons: 'right'\n    },\n\n    backButton: {\n      icon: 'ion-android-arrow-back',\n      text: false,\n      previousTitleText: false\n    },\n\n    form: {\n      checkbox: 'square',\n      toggle: 'small'\n    },\n\n    spinner: {\n      icon: 'android'\n    },\n\n    tabs: {\n      style: 'striped',\n      position: 'top'\n    },\n\n    scrolling: {\n      jsScrolling: false\n    }\n  });\n\n  // Windows Phone\n  // -------------------------\n  setPlatformConfig('windowsphone', {\n    //scrolling: {\n    //  jsScrolling: false\n    //}\n    spinner: {\n      icon: 'android'\n    }\n  });\n\n\n  provider.transitions = {\n    views: {},\n    navBar: {}\n  };\n\n\n  // iOS Transitions\n  // -----------------------\n  provider.transitions.views.ios = function(enteringEle, leavingEle, direction, shouldAnimate) {\n\n    function setStyles(ele, opacity, x, boxShadowOpacity) {\n      var css = {};\n      css[ionic.CSS.TRANSITION_DURATION] = d.shouldAnimate ? '' : 0;\n      css.opacity = opacity;\n      if (boxShadowOpacity > -1) {\n        css.boxShadow = '0 0 10px rgba(0,0,0,' + (d.shouldAnimate ? boxShadowOpacity * 0.45 : 0.3) + ')';\n      }\n      css[ionic.CSS.TRANSFORM] = 'translate3d(' + x + '%,0,0)';\n      ionic.DomUtil.cachedStyles(ele, css);\n    }\n\n    var d = {\n      run: function(step) {\n        if (direction == 'forward') {\n          setStyles(enteringEle, 1, (1 - step) * 99, 1 - step); // starting at 98% prevents a flicker\n          setStyles(leavingEle, (1 - 0.1 * step), step * -33, -1);\n\n        } else if (direction == 'back') {\n          setStyles(enteringEle, (1 - 0.1 * (1 - step)), (1 - step) * -33, -1);\n          setStyles(leavingEle, 1, step * 100, 1 - step);\n\n        } else {\n          // swap, enter, exit\n          setStyles(enteringEle, 1, 0, -1);\n          setStyles(leavingEle, 0, 0, -1);\n        }\n      },\n      shouldAnimate: shouldAnimate && (direction == 'forward' || direction == 'back')\n    };\n\n    return d;\n  };\n\n  provider.transitions.navBar.ios = function(enteringHeaderBar, leavingHeaderBar, direction, shouldAnimate) {\n\n    function setStyles(ctrl, opacity, titleX, backTextX) {\n      var css = {};\n      css[ionic.CSS.TRANSITION_DURATION] = d.shouldAnimate ? '' : '0ms';\n      css.opacity = opacity === 1 ? '' : opacity;\n\n      ctrl.setCss('buttons-left', css);\n      ctrl.setCss('buttons-right', css);\n      ctrl.setCss('back-button', css);\n\n      css[ionic.CSS.TRANSFORM] = 'translate3d(' + backTextX + 'px,0,0)';\n      ctrl.setCss('back-text', css);\n\n      css[ionic.CSS.TRANSFORM] = 'translate3d(' + titleX + 'px,0,0)';\n      ctrl.setCss('title', css);\n    }\n\n    function enter(ctrlA, ctrlB, step) {\n      if (!ctrlA || !ctrlB) return;\n      var titleX = (ctrlA.titleTextX() + ctrlA.titleWidth()) * (1 - step);\n      var backTextX = (ctrlB && (ctrlB.titleTextX() - ctrlA.backButtonTextLeft()) * (1 - step)) || 0;\n      setStyles(ctrlA, step, titleX, backTextX);\n    }\n\n    function leave(ctrlA, ctrlB, step) {\n      if (!ctrlA || !ctrlB) return;\n      var titleX = (-(ctrlA.titleTextX() - ctrlB.backButtonTextLeft()) - (ctrlA.titleLeftRight())) * step;\n      setStyles(ctrlA, 1 - step, titleX, 0);\n    }\n\n    var d = {\n      run: function(step) {\n        var enteringHeaderCtrl = enteringHeaderBar.controller();\n        var leavingHeaderCtrl = leavingHeaderBar && leavingHeaderBar.controller();\n        if (d.direction == 'back') {\n          leave(enteringHeaderCtrl, leavingHeaderCtrl, 1 - step);\n          enter(leavingHeaderCtrl, enteringHeaderCtrl, 1 - step);\n        } else {\n          enter(enteringHeaderCtrl, leavingHeaderCtrl, step);\n          leave(leavingHeaderCtrl, enteringHeaderCtrl, step);\n        }\n      },\n      direction: direction,\n      shouldAnimate: shouldAnimate && (direction == 'forward' || direction == 'back')\n    };\n\n    return d;\n  };\n\n\n  // Android Transitions\n  // -----------------------\n\n  provider.transitions.views.android = function(enteringEle, leavingEle, direction, shouldAnimate) {\n    shouldAnimate = shouldAnimate && (direction == 'forward' || direction == 'back');\n\n    function setStyles(ele, x, opacity) {\n      var css = {};\n      css[ionic.CSS.TRANSITION_DURATION] = d.shouldAnimate ? '' : 0;\n      css[ionic.CSS.TRANSFORM] = 'translate3d(' + x + '%,0,0)';\n      css.opacity = opacity;\n      ionic.DomUtil.cachedStyles(ele, css);\n    }\n\n    var d = {\n      run: function(step) {\n        if (direction == 'forward') {\n          setStyles(enteringEle, (1 - step) * 99, 1); // starting at 98% prevents a flicker\n          setStyles(leavingEle, step * -100, 1);\n\n        } else if (direction == 'back') {\n          setStyles(enteringEle, (1 - step) * -100, 1);\n          setStyles(leavingEle, step * 100, 1);\n\n        } else {\n          // swap, enter, exit\n          setStyles(enteringEle, 0, 1);\n          setStyles(leavingEle, 0, 0);\n        }\n      },\n      shouldAnimate: shouldAnimate\n    };\n\n    return d;\n  };\n\n  provider.transitions.navBar.android = function(enteringHeaderBar, leavingHeaderBar, direction, shouldAnimate) {\n\n    function setStyles(ctrl, opacity) {\n      if (!ctrl) return;\n      var css = {};\n      css.opacity = opacity === 1 ? '' : opacity;\n\n      ctrl.setCss('buttons-left', css);\n      ctrl.setCss('buttons-right', css);\n      ctrl.setCss('back-button', css);\n      ctrl.setCss('back-text', css);\n      ctrl.setCss('title', css);\n    }\n\n    return {\n      run: function(step) {\n        setStyles(enteringHeaderBar.controller(), step);\n        setStyles(leavingHeaderBar && leavingHeaderBar.controller(), 1 - step);\n      },\n      shouldAnimate: shouldAnimate && (direction == 'forward' || direction == 'back')\n    };\n  };\n\n\n  // No Transition\n  // -----------------------\n\n  provider.transitions.views.none = function(enteringEle, leavingEle) {\n    return {\n      run: function(step) {\n        provider.transitions.views.android(enteringEle, leavingEle, false, false).run(step);\n      },\n      shouldAnimate: false\n    };\n  };\n\n  provider.transitions.navBar.none = function(enteringHeaderBar, leavingHeaderBar) {\n    return {\n      run: function(step) {\n        provider.transitions.navBar.ios(enteringHeaderBar, leavingHeaderBar, false, false).run(step);\n        provider.transitions.navBar.android(enteringHeaderBar, leavingHeaderBar, false, false).run(step);\n      },\n      shouldAnimate: false\n    };\n  };\n\n\n  // private: used to set platform configs\n  function setPlatformConfig(platformName, platformConfigs) {\n    configProperties.platform[platformName] = platformConfigs;\n    provider.platform[platformName] = {};\n\n    addConfig(configProperties, configProperties.platform[platformName]);\n\n    createConfig(configProperties.platform[platformName], provider.platform[platformName], '');\n  }\n\n\n  // private: used to recursively add new platform configs\n  function addConfig(configObj, platformObj) {\n    for (var n in configObj) {\n      if (n != PLATFORM && configObj.hasOwnProperty(n)) {\n        if (angular.isObject(configObj[n])) {\n          if (!isDefined(platformObj[n])) {\n            platformObj[n] = {};\n          }\n          addConfig(configObj[n], platformObj[n]);\n\n        } else if (!isDefined(platformObj[n])) {\n          platformObj[n] = null;\n        }\n      }\n    }\n  }\n\n\n  // private: create methods for each config to get/set\n  function createConfig(configObj, providerObj, platformPath) {\n    forEach(configObj, function(value, namespace) {\n\n      if (angular.isObject(configObj[namespace])) {\n        // recursively drill down the config object so we can create a method for each one\n        providerObj[namespace] = {};\n        createConfig(configObj[namespace], providerObj[namespace], platformPath + '.' + namespace);\n\n      } else {\n        // create a method for the provider/config methods that will be exposed\n        providerObj[namespace] = function(newValue) {\n          if (arguments.length) {\n            configObj[namespace] = newValue;\n            return providerObj;\n          }\n          if (configObj[namespace] == PLATFORM) {\n            // if the config is set to 'platform', then get this config's platform value\n            var platformConfig = stringObj(configProperties.platform, ionic.Platform.platform() + platformPath + '.' + namespace);\n            if (platformConfig || platformConfig === false) {\n              return platformConfig;\n            }\n            // didnt find a specific platform config, now try the default\n            return stringObj(configProperties.platform, 'default' + platformPath + '.' + namespace);\n          }\n          return configObj[namespace];\n        };\n      }\n\n    });\n  }\n\n  function stringObj(obj, str) {\n    str = str.split(\".\");\n    for (var i = 0; i < str.length; i++) {\n      if (obj && isDefined(obj[str[i]])) {\n        obj = obj[str[i]];\n      } else {\n        return null;\n      }\n    }\n    return obj;\n  }\n\n  provider.setPlatformConfig = setPlatformConfig;\n\n\n  // private: Service definition for internal Ionic use\n  /**\n   * @ngdoc service\n   * @name $ionicConfig\n   * @module ionic\n   * @private\n   */\n  provider.$get = function() {\n    return provider;\n  };\n})\n// Fix for URLs in Cordova apps on Windows Phone\n// http://blogs.msdn.com/b/msdn_answers/archive/2015/02/10/\n// running-cordova-apps-on-windows-and-windows-phone-8-1-using-ionic-angularjs-and-other-frameworks.aspx\n.config(['$compileProvider', function($compileProvider) {\n  $compileProvider.aHrefSanitizationWhitelist(/^\\s*(https?|sms|tel|geo|ftp|mailto|file|ghttps?|ms-appx-web|ms-appx|x-wmapp0):/);\n  $compileProvider.imgSrcSanitizationWhitelist(/^\\s*(https?|ftp|file|content|blob|ms-appx|ms-appx-web|x-wmapp0):|data:image\\//);\n}]);\n\n\nvar LOADING_TPL =\n  '<div class=\"loading-container\">' +\n    '<div class=\"loading\">' +\n    '</div>' +\n  '</div>';\n\n/**\n * @ngdoc service\n * @name $ionicLoading\n * @module ionic\n * @description\n * An overlay that can be used to indicate activity while blocking user\n * interaction.\n *\n * @usage\n * ```js\n * angular.module('LoadingApp', ['ionic'])\n * .controller('LoadingCtrl', function($scope, $ionicLoading) {\n *   $scope.show = function() {\n *     $ionicLoading.show({\n *       template: 'Loading...',\n *       duration: 3000\n *     }).then(function(){\n *        console.log(\"The loading indicator is now displayed\");\n *     });\n *   };\n *   $scope.hide = function(){\n *     $ionicLoading.hide().then(function(){\n *        console.log(\"The loading indicator is now hidden\");\n *     });\n *   };\n * });\n * ```\n */\n/**\n * @ngdoc object\n * @name $ionicLoadingConfig\n * @module ionic\n * @description\n * Set the default options to be passed to the {@link ionic.service:$ionicLoading} service.\n *\n * @usage\n * ```js\n * var app = angular.module('myApp', ['ionic'])\n * app.constant('$ionicLoadingConfig', {\n *   template: 'Default Loading Template...'\n * });\n * app.controller('AppCtrl', function($scope, $ionicLoading) {\n *   $scope.showLoading = function() {\n *     //options default to values in $ionicLoadingConfig\n *     $ionicLoading.show().then(function(){\n *        console.log(\"The loading indicator is now displayed\");\n *     });\n *   };\n * });\n * ```\n */\nIonicModule\n.constant('$ionicLoadingConfig', {\n  template: '<ion-spinner></ion-spinner>'\n})\n.factory('$ionicLoading', [\n  '$ionicLoadingConfig',\n  '$ionicBody',\n  '$ionicTemplateLoader',\n  '$ionicBackdrop',\n  '$timeout',\n  '$q',\n  '$log',\n  '$compile',\n  '$ionicPlatform',\n  '$rootScope',\n  'IONIC_BACK_PRIORITY',\nfunction($ionicLoadingConfig, $ionicBody, $ionicTemplateLoader, $ionicBackdrop, $timeout, $q, $log, $compile, $ionicPlatform, $rootScope, IONIC_BACK_PRIORITY) {\n\n  var loaderInstance;\n  //default values\n  var deregisterBackAction = noop;\n  var deregisterStateListener1 = noop;\n  var deregisterStateListener2 = noop;\n  var loadingShowDelay = $q.when();\n\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicLoading#show\n     * @description Shows a loading indicator. If the indicator is already shown,\n     * it will set the options given and keep the indicator shown.\n     * @returns {promise} A promise which is resolved when the loading indicator is presented.\n     * @param {object} opts The options for the loading indicator. Available properties:\n     *  - `{string=}` `template` The html content of the indicator.\n     *  - `{string=}` `templateUrl` The url of an html template to load as the content of the indicator.\n     *  - `{object=}` `scope` The scope to be a child of. Default: creates a child of $rootScope.\n     *  - `{boolean=}` `noBackdrop` Whether to hide the backdrop. By default it will be shown.\n     *  - `{boolean=}` `hideOnStateChange` Whether to hide the loading spinner when navigating\n     *    to a new state. Default false.\n     *  - `{number=}` `delay` How many milliseconds to delay showing the indicator. By default there is no delay.\n     *  - `{number=}` `duration` How many milliseconds to wait until automatically\n     *  hiding the indicator. By default, the indicator will be shown until `.hide()` is called.\n     */\n    show: showLoader,\n    /**\n     * @ngdoc method\n     * @name $ionicLoading#hide\n     * @description Hides the loading indicator, if shown.\n     * @returns {promise} A promise which is resolved when the loading indicator is hidden.\n     */\n    hide: hideLoader,\n    /**\n     * @private for testing\n     */\n    _getLoader: getLoader\n  };\n\n  function getLoader() {\n    if (!loaderInstance) {\n      loaderInstance = $ionicTemplateLoader.compile({\n        template: LOADING_TPL,\n        appendTo: $ionicBody.get()\n      })\n      .then(function(self) {\n        self.show = function(options) {\n          var templatePromise = options.templateUrl ?\n            $ionicTemplateLoader.load(options.templateUrl) :\n            //options.content: deprecated\n            $q.when(options.template || options.content || '');\n\n          self.scope = options.scope || self.scope;\n\n          if (!self.isShown) {\n            //options.showBackdrop: deprecated\n            self.hasBackdrop = !options.noBackdrop && options.showBackdrop !== false;\n            if (self.hasBackdrop) {\n              $ionicBackdrop.retain();\n              $ionicBackdrop.getElement().addClass('backdrop-loading');\n            }\n          }\n\n          if (options.duration) {\n            $timeout.cancel(self.durationTimeout);\n            self.durationTimeout = $timeout(\n              angular.bind(self, self.hide),\n              +options.duration\n            );\n          }\n\n          deregisterBackAction();\n          //Disable hardware back button while loading\n          deregisterBackAction = $ionicPlatform.registerBackButtonAction(\n            noop,\n            IONIC_BACK_PRIORITY.loading\n          );\n\n          templatePromise.then(function(html) {\n            if (html) {\n              var loading = self.element.children();\n              loading.html(html);\n              $compile(loading.contents())(self.scope);\n            }\n\n            //Don't show until template changes\n            if (self.isShown) {\n              self.element.addClass('visible');\n              ionic.requestAnimationFrame(function() {\n                if (self.isShown) {\n                  self.element.addClass('active');\n                  $ionicBody.addClass('loading-active');\n                }\n              });\n            }\n          });\n\n          self.isShown = true;\n        };\n        self.hide = function() {\n\n          deregisterBackAction();\n          if (self.isShown) {\n            if (self.hasBackdrop) {\n              $ionicBackdrop.release();\n              $ionicBackdrop.getElement().removeClass('backdrop-loading');\n            }\n            self.element.removeClass('active');\n            $ionicBody.removeClass('loading-active');\n            self.element.removeClass('visible');\n            ionic.requestAnimationFrame(function() {\n              !self.isShown && self.element.removeClass('visible');\n            });\n          }\n          $timeout.cancel(self.durationTimeout);\n          self.isShown = false;\n          var loading = self.element.children();\n          loading.html(\"\");\n        };\n\n        return self;\n      });\n    }\n    return loaderInstance;\n  }\n\n  function showLoader(options) {\n    options = extend({}, $ionicLoadingConfig || {}, options || {});\n    // use a default delay of 100 to avoid some issues reported on github\n    // https://github.com/ionic-team/ionic/issues/3717\n    var delay = options.delay || options.showDelay || 0;\n\n    deregisterStateListener1();\n    deregisterStateListener2();\n    if (options.hideOnStateChange) {\n      deregisterStateListener1 = $rootScope.$on('$stateChangeSuccess', hideLoader);\n      deregisterStateListener2 = $rootScope.$on('$stateChangeError', hideLoader);\n    }\n\n    //If loading.show() was called previously, cancel it and show with our new options\n    $timeout.cancel(loadingShowDelay);\n    loadingShowDelay = $timeout(noop, delay);\n    return loadingShowDelay.then(getLoader).then(function(loader) {\n      return loader.show(options);\n    });\n  }\n\n  function hideLoader() {\n    deregisterStateListener1();\n    deregisterStateListener2();\n    $timeout.cancel(loadingShowDelay);\n    return getLoader().then(function(loader) {\n      return loader.hide();\n    });\n  }\n}]);\n\n/**\n * @ngdoc service\n * @name $ionicModal\n * @module ionic\n * @codepen gblny\n * @description\n *\n * Related: {@link ionic.controller:ionicModal ionicModal controller}.\n *\n * The Modal is a content pane that can go over the user's main view\n * temporarily.  Usually used for making a choice or editing an item.\n *\n * Put the content of the modal inside of an `<ion-modal-view>` element.\n *\n * **Notes:**\n * - A modal will broadcast 'modal.shown', 'modal.hidden', and 'modal.removed' events from its originating\n * scope, passing in itself as an event argument. Both the modal.removed and modal.hidden events are\n * called when the modal is removed.\n *\n * - This example assumes your modal is in your main index file or another template file. If it is in its own\n * template file, remove the script tags and call it by file name.\n *\n * @usage\n * ```html\n * <script id=\"my-modal.html\" type=\"text/ng-template\">\n *   <ion-modal-view>\n *     <ion-header-bar>\n *       <h1 class=\"title\">My Modal title</h1>\n *     </ion-header-bar>\n *     <ion-content>\n *       Hello!\n *     </ion-content>\n *   </ion-modal-view>\n * </script>\n * ```\n * ```js\n * angular.module('testApp', ['ionic'])\n * .controller('MyController', function($scope, $ionicModal) {\n *   $ionicModal.fromTemplateUrl('my-modal.html', {\n *     scope: $scope,\n *     animation: 'slide-in-up'\n *   }).then(function(modal) {\n *     $scope.modal = modal;\n *   });\n *   $scope.openModal = function() {\n *     $scope.modal.show();\n *   };\n *   $scope.closeModal = function() {\n *     $scope.modal.hide();\n *   };\n *   // Cleanup the modal when we're done with it!\n *   $scope.$on('$destroy', function() {\n *     $scope.modal.remove();\n *   });\n *   // Execute action on hide modal\n *   $scope.$on('modal.hidden', function() {\n *     // Execute action\n *   });\n *   // Execute action on remove modal\n *   $scope.$on('modal.removed', function() {\n *     // Execute action\n *   });\n * });\n * ```\n */\nIonicModule\n.factory('$ionicModal', [\n  '$rootScope',\n  '$ionicBody',\n  '$compile',\n  '$timeout',\n  '$ionicPlatform',\n  '$ionicTemplateLoader',\n  '$$q',\n  '$log',\n  '$ionicClickBlock',\n  '$window',\n  'IONIC_BACK_PRIORITY',\nfunction($rootScope, $ionicBody, $compile, $timeout, $ionicPlatform, $ionicTemplateLoader, $$q, $log, $ionicClickBlock, $window, IONIC_BACK_PRIORITY) {\n\n  /**\n   * @ngdoc controller\n   * @name ionicModal\n   * @module ionic\n   * @description\n   * Instantiated by the {@link ionic.service:$ionicModal} service.\n   *\n   * Be sure to call [remove()](#remove) when you are done with each modal\n   * to clean it up and avoid memory leaks.\n   *\n   * Note: a modal will broadcast 'modal.shown', 'modal.hidden', and 'modal.removed' events from its originating\n   * scope, passing in itself as an event argument. Note: both modal.removed and modal.hidden are\n   * called when the modal is removed.\n   */\n  var ModalView = ionic.views.Modal.inherit({\n    /**\n     * @ngdoc method\n     * @name ionicModal#initialize\n     * @description Creates a new modal controller instance.\n     * @param {object} options An options object with the following properties:\n     *  - `{object=}` `scope` The scope to be a child of.\n     *    Default: creates a child of $rootScope.\n     *  - `{string=}` `animation` The animation to show & hide with.\n     *    Default: 'slide-in-up'\n     *  - `{boolean=}` `focusFirstInput` Whether to autofocus the first input of\n     *    the modal when shown. Will only show the keyboard on iOS, to force the keyboard to show\n     *    on Android, please use the [Ionic keyboard plugin](https://github.com/ionic-team/ionic-plugin-keyboard#keyboardshow).\n     *    Default: false.\n     *  - `{boolean=}` `backdropClickToClose` Whether to close the modal on clicking the backdrop.\n     *    Default: true.\n     *  - `{boolean=}` `hardwareBackButtonClose` Whether the modal can be closed using the hardware\n     *    back button on Android and similar devices.  Default: true.\n     */\n    initialize: function(opts) {\n      ionic.views.Modal.prototype.initialize.call(this, opts);\n      this.animation = opts.animation || 'slide-in-up';\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#show\n     * @description Show this modal instance.\n     * @returns {promise} A promise which is resolved when the modal is finished animating in.\n     */\n    show: function(target) {\n      var self = this;\n\n      if (self.scope.$$destroyed) {\n        $log.error('Cannot call ' + self.viewType + '.show() after remove(). Please create a new ' + self.viewType + ' instance.');\n        return $$q.when();\n      }\n\n      // on iOS, clicks will sometimes bleed through/ghost click on underlying\n      // elements\n      $ionicClickBlock.show(600);\n      stack.add(self);\n\n      var modalEl = jqLite(self.modalEl);\n\n      self.el.classList.remove('hide');\n      $timeout(function() {\n        if (!self._isShown) return;\n        $ionicBody.addClass(self.viewType + '-open');\n      }, 400, false);\n\n      if (!self.el.parentElement) {\n        modalEl.addClass(self.animation);\n        $ionicBody.append(self.el);\n      }\n\n      // if modal was closed while the keyboard was up, reset scroll view on\n      // next show since we can only resize it once it's visible\n      var scrollCtrl = modalEl.data('$$ionicScrollController');\n      scrollCtrl && scrollCtrl.resize();\n\n      if (target && self.positionView) {\n        self.positionView(target, modalEl);\n        // set up a listener for in case the window size changes\n\n        self._onWindowResize = function() {\n          if (self._isShown) self.positionView(target, modalEl);\n        };\n        ionic.on('resize', self._onWindowResize, window);\n      }\n\n      modalEl.addClass('ng-enter active')\n             .removeClass('ng-leave ng-leave-active');\n\n      self._isShown = true;\n      self._deregisterBackButton = $ionicPlatform.registerBackButtonAction(\n        self.hardwareBackButtonClose ? angular.bind(self, self.hide) : noop,\n        IONIC_BACK_PRIORITY.modal\n      );\n\n      ionic.views.Modal.prototype.show.call(self);\n\n      $timeout(function() {\n        if (!self._isShown) return;\n        modalEl.addClass('ng-enter-active');\n        ionic.trigger('resize');\n        self.scope.$parent && self.scope.$parent.$broadcast(self.viewType + '.shown', self);\n        self.el.classList.add('active');\n        self.scope.$broadcast('$ionicHeader.align');\n        self.scope.$broadcast('$ionicFooter.align');\n        self.scope.$broadcast('$ionic.modalPresented');\n      }, 20);\n\n      return $timeout(function() {\n        if (!self._isShown) return;\n        self.$el.on('touchmove', function(e) {\n          //Don't allow scrolling while open by dragging on backdrop\n          var isInScroll = ionic.DomUtil.getParentOrSelfWithClass(e.target, 'scroll');\n          if (!isInScroll) {\n            e.preventDefault();\n          }\n        });\n        //After animating in, allow hide on backdrop click\n        self.$el.on('click', function(e) {\n          if (self.backdropClickToClose && e.target === self.el && stack.isHighest(self)) {\n            self.hide();\n          }\n        });\n      }, 400);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#hide\n     * @description Hide this modal instance.\n     * @returns {promise} A promise which is resolved when the modal is finished animating out.\n     */\n    hide: function() {\n      var self = this;\n      var modalEl = jqLite(self.modalEl);\n\n      // on iOS, clicks will sometimes bleed through/ghost click on underlying\n      // elements\n      $ionicClickBlock.show(600);\n      stack.remove(self);\n\n      self.el.classList.remove('active');\n      modalEl.addClass('ng-leave');\n\n      $timeout(function() {\n        if (self._isShown) return;\n        modalEl.addClass('ng-leave-active')\n               .removeClass('ng-enter ng-enter-active active');\n\n        self.scope.$broadcast('$ionic.modalRemoved');\n      }, 20, false);\n\n      self.$el.off('click');\n      self._isShown = false;\n      self.scope.$parent && self.scope.$parent.$broadcast(self.viewType + '.hidden', self);\n      self._deregisterBackButton && self._deregisterBackButton();\n\n      ionic.views.Modal.prototype.hide.call(self);\n\n      // clean up event listeners\n      if (self.positionView) {\n        ionic.off('resize', self._onWindowResize, window);\n      }\n\n      return $timeout(function() {\n        if (!modalStack.length) {\n          $ionicBody.removeClass(self.viewType + '-open');\n        }\n        self.el.classList.add('hide');\n      }, self.hideDelay || 320);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#remove\n     * @description Remove this modal instance from the DOM and clean up.\n     * @returns {promise} A promise which is resolved when the modal is finished animating out.\n     */\n    remove: function() {\n      var self = this,\n          deferred, promise;\n      self.scope.$parent && self.scope.$parent.$broadcast(self.viewType + '.removed', self);\n\n      // Only hide modal, when it is actually shown!\n      // The hide function shows a click-block-div for a split second, because on iOS,\n      // clicks will sometimes bleed through/ghost click on underlying elements.\n      // However, this will make the app unresponsive for short amount of time.\n      // We don't want that, if the modal window is already hidden.\n      if (self._isShown) {\n        promise = self.hide();\n      } else {\n        deferred = $$q.defer();\n        deferred.resolve();\n        promise = deferred.promise;\n      }\n\n      return promise.then(function() {\n        self.scope.$destroy();\n        self.$el.remove();\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#isShown\n     * @returns boolean Whether this modal is currently shown.\n     */\n    isShown: function() {\n      return !!this._isShown;\n    }\n  });\n\n  var createModal = function(templateString, options) {\n    // Create a new scope for the modal\n    var scope = options.scope && options.scope.$new() || $rootScope.$new(true);\n\n    options.viewType = options.viewType || 'modal';\n\n    extend(scope, {\n      $hasHeader: false,\n      $hasSubheader: false,\n      $hasFooter: false,\n      $hasSubfooter: false,\n      $hasTabs: false,\n      $hasTabsTop: false\n    });\n\n    // Compile the template\n    var element = $compile('<ion-' + options.viewType + '>' + templateString + '</ion-' + options.viewType + '>')(scope);\n\n    options.$el = element;\n    options.el = element[0];\n    options.modalEl = options.el.querySelector('.' + options.viewType);\n    var modal = new ModalView(options);\n\n    modal.scope = scope;\n\n    // If this wasn't a defined scope, we can assign the viewType to the isolated scope\n    // we created\n    if (!options.scope) {\n      scope[ options.viewType ] = modal;\n    }\n\n    return modal;\n  };\n\n  var modalStack = [];\n  var stack = {\n    add: function(modal) {\n      modalStack.push(modal);\n    },\n    remove: function(modal) {\n      var index = modalStack.indexOf(modal);\n      if (index > -1 && index < modalStack.length) {\n        modalStack.splice(index, 1);\n      }\n    },\n    isHighest: function(modal) {\n      var index = modalStack.indexOf(modal);\n      return (index > -1 && index === modalStack.length - 1);\n    }\n  };\n\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicModal#fromTemplate\n     * @param {string} templateString The template string to use as the modal's\n     * content.\n     * @param {object} options Options to be passed {@link ionic.controller:ionicModal#initialize ionicModal#initialize} method.\n     * @returns {object} An instance of an {@link ionic.controller:ionicModal}\n     * controller.\n     */\n    fromTemplate: function(templateString, options) {\n      var modal = createModal(templateString, options || {});\n      return modal;\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicModal#fromTemplateUrl\n     * @param {string} templateUrl The url to load the template from.\n     * @param {object} options Options to be passed {@link ionic.controller:ionicModal#initialize ionicModal#initialize} method.\n     * options object.\n     * @returns {promise} A promise that will be resolved with an instance of\n     * an {@link ionic.controller:ionicModal} controller.\n     */\n    fromTemplateUrl: function(url, options, _) {\n      var cb;\n      //Deprecated: allow a callback as second parameter. Now we return a promise.\n      if (angular.isFunction(options)) {\n        cb = options;\n        options = _;\n      }\n      return $ionicTemplateLoader.load(url).then(function(templateString) {\n        var modal = createModal(templateString, options || {});\n        cb && cb(modal);\n        return modal;\n      });\n    },\n\n    stack: stack\n  };\n}]);\n\n\n/**\n * @ngdoc service\n * @name $ionicNavBarDelegate\n * @module ionic\n * @description\n * Delegate for controlling the {@link ionic.directive:ionNavBar} directive.\n *\n * @usage\n *\n * ```html\n * <body ng-controller=\"MyCtrl\">\n *   <ion-nav-bar>\n *     <button ng-click=\"setNavTitle('banana')\">\n *       Set title to banana!\n *     </button>\n *   </ion-nav-bar>\n * </body>\n * ```\n * ```js\n * function MyCtrl($scope, $ionicNavBarDelegate) {\n *   $scope.setNavTitle = function(title) {\n *     $ionicNavBarDelegate.title(title);\n *   }\n * }\n * ```\n */\nIonicModule\n.service('$ionicNavBarDelegate', ionic.DelegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicNavBarDelegate#align\n   * @description Aligns the title with the buttons in a given direction.\n   * @param {string=} direction The direction to the align the title text towards.\n   * Available: 'left', 'right', 'center'. Default: 'center'.\n   */\n  'align',\n  /**\n   * @ngdoc method\n   * @name $ionicNavBarDelegate#showBackButton\n   * @description\n   * Set/get whether the {@link ionic.directive:ionNavBackButton} is shown\n   * (if it exists and there is a previous view that can be navigated to).\n   * @param {boolean=} show Whether to show the back button.\n   * @returns {boolean} Whether the back button is shown.\n   */\n  'showBackButton',\n  /**\n   * @ngdoc method\n   * @name $ionicNavBarDelegate#showBar\n   * @description\n   * Set/get whether the {@link ionic.directive:ionNavBar} is shown.\n   * @param {boolean} show Whether to show the bar.\n   * @returns {boolean} Whether the bar is shown.\n   */\n  'showBar',\n  /**\n   * @ngdoc method\n   * @name $ionicNavBarDelegate#title\n   * @description\n   * Set the title for the {@link ionic.directive:ionNavBar}.\n   * @param {string} title The new title to show.\n   */\n  'title',\n\n  // DEPRECATED, as of v1.0.0-beta14 -------\n  'changeTitle',\n  'setTitle',\n  'getTitle',\n  'back',\n  'getPreviousTitle'\n  // END DEPRECATED -------\n]));\n\n\nIonicModule\n.service('$ionicNavViewDelegate', ionic.DelegateService([\n  'clearCache'\n]));\n\n\n\n/**\n * @ngdoc service\n * @name $ionicPlatform\n * @module ionic\n * @description\n * An angular abstraction of {@link ionic.utility:ionic.Platform}.\n *\n * Used to detect the current platform, as well as do things like override the\n * Android back button in PhoneGap/Cordova.\n */\nIonicModule\n.constant('IONIC_BACK_PRIORITY', {\n  view: 100,\n  sideMenu: 150,\n  modal: 200,\n  actionSheet: 300,\n  popup: 400,\n  loading: 500\n})\n.provider('$ionicPlatform', function() {\n  return {\n    $get: ['$q', '$ionicScrollDelegate', function($q, $ionicScrollDelegate) {\n      var self = {\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#onHardwareBackButton\n         * @description\n         * Some platforms have a hardware back button, so this is one way to\n         * bind to it.\n         * @param {function} callback the callback to trigger when this event occurs\n         */\n        onHardwareBackButton: function(cb) {\n          ionic.Platform.ready(function() {\n            document.addEventListener('backbutton', cb, false);\n          });\n        },\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#offHardwareBackButton\n         * @description\n         * Remove an event listener for the backbutton.\n         * @param {function} callback The listener function that was\n         * originally bound.\n         */\n        offHardwareBackButton: function(fn) {\n          ionic.Platform.ready(function() {\n            document.removeEventListener('backbutton', fn);\n          });\n        },\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#registerBackButtonAction\n         * @description\n         * Register a hardware back button action. Only one action will execute\n         * when the back button is clicked, so this method decides which of\n         * the registered back button actions has the highest priority.\n         *\n         * For example, if an actionsheet is showing, the back button should\n         * close the actionsheet, but it should not also go back a page view\n         * or close a modal which may be open.\n         *\n         * The priorities for the existing back button hooks are as follows:\n         *   Return to previous view = 100\n         *   Close side menu = 150\n         *   Dismiss modal = 200\n         *   Close action sheet = 300\n         *   Dismiss popup = 400\n         *   Dismiss loading overlay = 500\n         *\n         * Your back button action will override each of the above actions\n         * whose priority is less than the priority you provide. For example,\n         * an action assigned a priority of 101 will override the 'return to\n         * previous view' action, but not any of the other actions.\n         *\n         * @param {function} callback Called when the back button is pressed,\n         * if this listener is the highest priority.\n         * @param {number} priority Only the highest priority will execute.\n         * @param {*=} actionId The id to assign this action. Default: a\n         * random unique id.\n         * @returns {function} A function that, when called, will deregister\n         * this backButtonAction.\n         */\n        $backButtonActions: {},\n        registerBackButtonAction: function(fn, priority, actionId) {\n\n          if (!self._hasBackButtonHandler) {\n            // add a back button listener if one hasn't been setup yet\n            self.$backButtonActions = {};\n            self.onHardwareBackButton(self.hardwareBackButtonClick);\n            self._hasBackButtonHandler = true;\n          }\n\n          var action = {\n            id: (actionId ? actionId : ionic.Utils.nextUid()),\n            priority: (priority ? priority : 0),\n            fn: fn\n          };\n          self.$backButtonActions[action.id] = action;\n\n          // return a function to de-register this back button action\n          return function() {\n            delete self.$backButtonActions[action.id];\n          };\n        },\n\n        /**\n         * @private\n         */\n        hardwareBackButtonClick: function(e) {\n          // loop through all the registered back button actions\n          // and only run the last one of the highest priority\n          var priorityAction, actionId;\n          for (actionId in self.$backButtonActions) {\n            if (!priorityAction || self.$backButtonActions[actionId].priority >= priorityAction.priority) {\n              priorityAction = self.$backButtonActions[actionId];\n            }\n          }\n          if (priorityAction) {\n            priorityAction.fn(e);\n            return priorityAction;\n          }\n        },\n\n        is: function(type) {\n          return ionic.Platform.is(type);\n        },\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#on\n         * @description\n         * Add Cordova event listeners, such as `pause`, `resume`, `volumedownbutton`, `batterylow`,\n         * `offline`, etc. More information about available event types can be found in\n         * [Cordova's event documentation](https://cordova.apache.org/docs/en/latest/cordova/events/events.html).\n         * @param {string} type Cordova [event type](https://cordova.apache.org/docs/en/latest/cordova/events/events.html).\n         * @param {function} callback Called when the Cordova event is fired.\n         * @returns {function} Returns a deregistration function to remove the event listener.\n         */\n        on: function(type, cb) {\n          ionic.Platform.ready(function() {\n            document.addEventListener(type, cb, false);\n          });\n          return function() {\n            ionic.Platform.ready(function() {\n              document.removeEventListener(type, cb);\n            });\n          };\n        },\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#ready\n         * @description\n         * Trigger a callback once the device is ready,\n         * or immediately if the device is already ready.\n         * @param {function=} callback The function to call.\n         * @returns {promise} A promise which is resolved when the device is ready.\n         */\n        ready: function(cb) {\n          var q = $q.defer();\n\n          ionic.Platform.ready(function() {\n\n            window.addEventListener('statusTap', function() {\n              $ionicScrollDelegate.scrollTop(true);\n            });\n\n            q.resolve();\n            cb && cb();\n          });\n\n          return q.promise;\n        }\n      };\n\n      return self;\n    }]\n  };\n\n});\n\n/**\n * @ngdoc service\n * @name $ionicPopover\n * @module ionic\n * @description\n *\n * Related: {@link ionic.controller:ionicPopover ionicPopover controller}.\n *\n * The Popover is a view that floats above an app’s content. Popovers provide an\n * easy way to present or gather information from the user and are\n * commonly used in the following situations:\n *\n * - Show more info about the current view\n * - Select a commonly used tool or configuration\n * - Present a list of actions to perform inside one of your views\n *\n * Put the content of the popover inside of an `<ion-popover-view>` element.\n *\n * @usage\n * ```html\n * <p>\n *   <button ng-click=\"openPopover($event)\">Open Popover</button>\n * </p>\n *\n * <script id=\"my-popover.html\" type=\"text/ng-template\">\n *   <ion-popover-view>\n *     <ion-header-bar>\n *       <h1 class=\"title\">My Popover Title</h1>\n *     </ion-header-bar>\n *     <ion-content>\n *       Hello!\n *     </ion-content>\n *   </ion-popover-view>\n * </script>\n * ```\n * ```js\n * angular.module('testApp', ['ionic'])\n * .controller('MyController', function($scope, $ionicPopover) {\n *\n *   // .fromTemplate() method\n *   var template = '<ion-popover-view><ion-header-bar> <h1 class=\"title\">My Popover Title</h1> </ion-header-bar> <ion-content> Hello! </ion-content></ion-popover-view>';\n *\n *   $scope.popover = $ionicPopover.fromTemplate(template, {\n *     scope: $scope\n *   });\n *\n *   // .fromTemplateUrl() method\n *   $ionicPopover.fromTemplateUrl('my-popover.html', {\n *     scope: $scope\n *   }).then(function(popover) {\n *     $scope.popover = popover;\n *   });\n *\n *\n *   $scope.openPopover = function($event) {\n *     $scope.popover.show($event);\n *   };\n *   $scope.closePopover = function() {\n *     $scope.popover.hide();\n *   };\n *   //Cleanup the popover when we're done with it!\n *   $scope.$on('$destroy', function() {\n *     $scope.popover.remove();\n *   });\n *   // Execute action on hidden popover\n *   $scope.$on('popover.hidden', function() {\n *     // Execute action\n *   });\n *   // Execute action on remove popover\n *   $scope.$on('popover.removed', function() {\n *     // Execute action\n *   });\n * });\n * ```\n */\n\n\nIonicModule\n.factory('$ionicPopover', ['$ionicModal', '$ionicPosition', '$document', '$window',\nfunction($ionicModal, $ionicPosition, $document, $window) {\n\n  var POPOVER_BODY_PADDING = 6;\n\n  var POPOVER_OPTIONS = {\n    viewType: 'popover',\n    hideDelay: 1,\n    animation: 'none',\n    positionView: positionView\n  };\n\n  function positionView(target, popoverEle) {\n    var targetEle = jqLite(target.target || target);\n    var buttonOffset = $ionicPosition.offset(targetEle);\n    var popoverWidth = popoverEle.prop('offsetWidth');\n    var popoverHeight = popoverEle.prop('offsetHeight');\n    // Use innerWidth and innerHeight, because clientWidth and clientHeight\n    // doesn't work consistently for body on all platforms\n    var bodyWidth = $window.innerWidth;\n    var bodyHeight = $window.innerHeight;\n\n    var popoverCSS = {\n      left: buttonOffset.left + buttonOffset.width / 2 - popoverWidth / 2\n    };\n    var arrowEle = jqLite(popoverEle[0].querySelector('.popover-arrow'));\n\n    if (popoverCSS.left < POPOVER_BODY_PADDING) {\n      popoverCSS.left = POPOVER_BODY_PADDING;\n    } else if (popoverCSS.left + popoverWidth + POPOVER_BODY_PADDING > bodyWidth) {\n      popoverCSS.left = bodyWidth - popoverWidth - POPOVER_BODY_PADDING;\n    }\n\n    // If the popover when popped down stretches past bottom of screen,\n    // make it pop up if there's room above\n    if (buttonOffset.top + buttonOffset.height + popoverHeight > bodyHeight &&\n        buttonOffset.top - popoverHeight > 0) {\n      popoverCSS.top = buttonOffset.top - popoverHeight;\n      popoverEle.addClass('popover-bottom');\n    } else {\n      popoverCSS.top = buttonOffset.top + buttonOffset.height;\n      popoverEle.removeClass('popover-bottom');\n    }\n\n    arrowEle.css({\n      left: buttonOffset.left + buttonOffset.width / 2 -\n        arrowEle.prop('offsetWidth') / 2 - popoverCSS.left + 'px'\n    });\n\n    popoverEle.css({\n      top: popoverCSS.top + 'px',\n      left: popoverCSS.left + 'px',\n      marginLeft: '0',\n      opacity: '1'\n    });\n\n  }\n\n  /**\n   * @ngdoc controller\n   * @name ionicPopover\n   * @module ionic\n   * @description\n   * Instantiated by the {@link ionic.service:$ionicPopover} service.\n   *\n   * Be sure to call [remove()](#remove) when you are done with each popover\n   * to clean it up and avoid memory leaks.\n   *\n   * Note: a popover will broadcast 'popover.shown', 'popover.hidden', and 'popover.removed' events from its originating\n   * scope, passing in itself as an event argument. Both the popover.removed and popover.hidden events are\n   * called when the popover is removed.\n   */\n\n  /**\n   * @ngdoc method\n   * @name ionicPopover#initialize\n   * @description Creates a new popover controller instance.\n   * @param {object} options An options object with the following properties:\n   *  - `{object=}` `scope` The scope to be a child of.\n   *    Default: creates a child of $rootScope.\n   *  - `{boolean=}` `focusFirstInput` Whether to autofocus the first input of\n   *    the popover when shown.  Default: false.\n   *  - `{boolean=}` `backdropClickToClose` Whether to close the popover on clicking the backdrop.\n   *    Default: true.\n   *  - `{boolean=}` `hardwareBackButtonClose` Whether the popover can be closed using the hardware\n   *    back button on Android and similar devices.  Default: true.\n   */\n\n  /**\n   * @ngdoc method\n   * @name ionicPopover#show\n   * @description Show this popover instance.\n   * @param {$event} $event The $event or target element which the popover should align\n   * itself next to.\n   * @returns {promise} A promise which is resolved when the popover is finished animating in.\n   */\n\n  /**\n   * @ngdoc method\n   * @name ionicPopover#hide\n   * @description Hide this popover instance.\n   * @returns {promise} A promise which is resolved when the popover is finished animating out.\n   */\n\n  /**\n   * @ngdoc method\n   * @name ionicPopover#remove\n   * @description Remove this popover instance from the DOM and clean up.\n   * @returns {promise} A promise which is resolved when the popover is finished animating out.\n   */\n\n  /**\n   * @ngdoc method\n   * @name ionicPopover#isShown\n   * @returns boolean Whether this popover is currently shown.\n   */\n\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicPopover#fromTemplate\n     * @param {string} templateString The template string to use as the popovers's\n     * content.\n     * @param {object} options Options to be passed to the initialize method.\n     * @returns {object} An instance of an {@link ionic.controller:ionicPopover}\n     * controller (ionicPopover is built on top of $ionicPopover).\n     */\n    fromTemplate: function(templateString, options) {\n      return $ionicModal.fromTemplate(templateString, ionic.Utils.extend({}, POPOVER_OPTIONS, options));\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicPopover#fromTemplateUrl\n     * @param {string} templateUrl The url to load the template from.\n     * @param {object} options Options to be passed to the initialize method.\n     * @returns {promise} A promise that will be resolved with an instance of\n     * an {@link ionic.controller:ionicPopover} controller (ionicPopover is built on top of $ionicPopover).\n     */\n    fromTemplateUrl: function(url, options) {\n      return $ionicModal.fromTemplateUrl(url, ionic.Utils.extend({}, POPOVER_OPTIONS, options));\n    }\n  };\n\n}]);\n\n\nvar POPUP_TPL =\n  '<div class=\"popup-container\" ng-class=\"cssClass\">' +\n    '<div class=\"popup\">' +\n      '<div class=\"popup-head\">' +\n        '<h3 class=\"popup-title\" ng-bind-html=\"title\"></h3>' +\n        '<h5 class=\"popup-sub-title\" ng-bind-html=\"subTitle\" ng-if=\"subTitle\"></h5>' +\n      '</div>' +\n      '<div class=\"popup-body\">' +\n      '</div>' +\n      '<div class=\"popup-buttons\" ng-show=\"buttons.length\">' +\n        '<button ng-repeat=\"button in buttons\" ng-click=\"$buttonTapped(button, $event)\" class=\"button\" ng-class=\"button.type || \\'button-default\\'\" ng-bind-html=\"button.text\"></button>' +\n      '</div>' +\n    '</div>' +\n  '</div>';\n\n/**\n * @ngdoc service\n * @name $ionicPopup\n * @module ionic\n * @restrict E\n * @codepen zkmhJ\n * @description\n *\n * The Ionic Popup service allows programmatically creating and showing popup\n * windows that require the user to respond in order to continue.\n *\n * The popup system has support for more flexible versions of the built in `alert()`, `prompt()`,\n * and `confirm()` functions that users are used to, in addition to allowing popups with completely\n * custom content and look.\n *\n * An input can be given an `autofocus` attribute so it automatically receives focus when\n * the popup first shows. However, depending on certain use-cases this can cause issues with\n * the tap/click system, which is why Ionic prefers using the `autofocus` attribute as\n * an opt-in feature and not the default.\n *\n * @usage\n * A few basic examples, see below for details about all of the options available.\n *\n * ```js\n *angular.module('mySuperApp', ['ionic'])\n *.controller('PopupCtrl',function($scope, $ionicPopup, $timeout) {\n *\n * // Triggered on a button click, or some other target\n * $scope.showPopup = function() {\n *   $scope.data = {};\n *\n *   // An elaborate, custom popup\n *   var myPopup = $ionicPopup.show({\n *     template: '<input type=\"password\" ng-model=\"data.wifi\">',\n *     title: 'Enter Wi-Fi Password',\n *     subTitle: 'Please use normal things',\n *     scope: $scope,\n *     buttons: [\n *       { text: 'Cancel' },\n *       {\n *         text: '<b>Save</b>',\n *         type: 'button-positive',\n *         onTap: function(e) {\n *           if (!$scope.data.wifi) {\n *             //don't allow the user to close unless he enters wifi password\n *             e.preventDefault();\n *           } else {\n *             return $scope.data.wifi;\n *           }\n *         }\n *       }\n *     ]\n *   });\n *\n *   myPopup.then(function(res) {\n *     console.log('Tapped!', res);\n *   });\n *\n *   $timeout(function() {\n *      myPopup.close(); //close the popup after 3 seconds for some reason\n *   }, 3000);\n *  };\n *\n *  // A confirm dialog\n *  $scope.showConfirm = function() {\n *    var confirmPopup = $ionicPopup.confirm({\n *      title: 'Consume Ice Cream',\n *      template: 'Are you sure you want to eat this ice cream?'\n *    });\n *\n *    confirmPopup.then(function(res) {\n *      if(res) {\n *        console.log('You are sure');\n *      } else {\n *        console.log('You are not sure');\n *      }\n *    });\n *  };\n *\n *  // An alert dialog\n *  $scope.showAlert = function() {\n *    var alertPopup = $ionicPopup.alert({\n *      title: 'Don\\'t eat that!',\n *      template: 'It might taste good'\n *    });\n *\n *    alertPopup.then(function(res) {\n *      console.log('Thank you for not eating my delicious ice cream cone');\n *    });\n *  };\n *});\n *```\n */\n\nIonicModule\n.factory('$ionicPopup', [\n  '$ionicTemplateLoader',\n  '$ionicBackdrop',\n  '$q',\n  '$timeout',\n  '$rootScope',\n  '$ionicBody',\n  '$compile',\n  '$ionicPlatform',\n  '$ionicModal',\n  'IONIC_BACK_PRIORITY',\nfunction($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicBody, $compile, $ionicPlatform, $ionicModal, IONIC_BACK_PRIORITY) {\n  //TODO allow this to be configured\n  var config = {\n    stackPushDelay: 75\n  };\n  var popupStack = [];\n\n  var $ionicPopup = {\n    /**\n     * @ngdoc method\n     * @description\n     * Show a complex popup. This is the master show function for all popups.\n     *\n     * A complex popup has a `buttons` array, with each button having a `text` and `type`\n     * field, in addition to an `onTap` function.  The `onTap` function, called when\n     * the corresponding button on the popup is tapped, will by default close the popup\n     * and resolve the popup promise with its return value.  If you wish to prevent the\n     * default and keep the popup open on button tap, call `event.preventDefault()` on the\n     * passed in tap event.  Details below.\n     *\n     * @name $ionicPopup#show\n     * @param {object} options The options for the new popup, of the form:\n     *\n     * ```\n     * {\n     *   title: '', // String. The title of the popup.\n     *   cssClass: '', // String, The custom CSS class name\n     *   subTitle: '', // String (optional). The sub-title of the popup.\n     *   template: '', // String (optional). The html template to place in the popup body.\n     *   templateUrl: '', // String (optional). The URL of an html template to place in the popup   body.\n     *   scope: null, // Scope (optional). A scope to link to the popup content.\n     *   buttons: [{ // Array[Object] (optional). Buttons to place in the popup footer.\n     *     text: 'Cancel',\n     *     type: 'button-default',\n     *     onTap: function(e) {\n     *       // e.preventDefault() will stop the popup from closing when tapped.\n     *       e.preventDefault();\n     *     }\n     *   }, {\n     *     text: 'OK',\n     *     type: 'button-positive',\n     *     onTap: function(e) {\n     *       // Returning a value will cause the promise to resolve with the given value.\n     *       return scope.data.response;\n     *     }\n     *   }]\n     * }\n     * ```\n     *\n     * @returns {object} A promise which is resolved when the popup is closed. Has an additional\n     * `close` function, which can be used to programmatically close the popup.\n     */\n    show: showPopup,\n\n    /**\n     * @ngdoc method\n     * @name $ionicPopup#alert\n     * @description Show a simple alert popup with a message and one button that the user can\n     * tap to close the popup.\n     *\n     * @param {object} options The options for showing the alert, of the form:\n     *\n     * ```\n     * {\n     *   title: '', // String. The title of the popup.\n     *   cssClass: '', // String, The custom CSS class name\n     *   subTitle: '', // String (optional). The sub-title of the popup.\n     *   template: '', // String (optional). The html template to place in the popup body.\n     *   templateUrl: '', // String (optional). The URL of an html template to place in the popup   body.\n     *   okText: '', // String (default: 'OK'). The text of the OK button.\n     *   okType: '', // String (default: 'button-positive'). The type of the OK button.\n     * }\n     * ```\n     *\n     * @returns {object} A promise which is resolved when the popup is closed. Has one additional\n     * function `close`, which can be called with any value to programmatically close the popup\n     * with the given value.\n     */\n    alert: showAlert,\n\n    /**\n     * @ngdoc method\n     * @name $ionicPopup#confirm\n     * @description\n     * Show a simple confirm popup with a Cancel and OK button.\n     *\n     * Resolves the promise with true if the user presses the OK button, and false if the\n     * user presses the Cancel button.\n     *\n     * @param {object} options The options for showing the confirm popup, of the form:\n     *\n     * ```\n     * {\n     *   title: '', // String. The title of the popup.\n     *   cssClass: '', // String, The custom CSS class name\n     *   subTitle: '', // String (optional). The sub-title of the popup.\n     *   template: '', // String (optional). The html template to place in the popup body.\n     *   templateUrl: '', // String (optional). The URL of an html template to place in the popup   body.\n     *   cancelText: '', // String (default: 'Cancel'). The text of the Cancel button.\n     *   cancelType: '', // String (default: 'button-default'). The type of the Cancel button.\n     *   okText: '', // String (default: 'OK'). The text of the OK button.\n     *   okType: '', // String (default: 'button-positive'). The type of the OK button.\n     * }\n     * ```\n     *\n     * @returns {object} A promise which is resolved when the popup is closed. Has one additional\n     * function `close`, which can be called with any value to programmatically close the popup\n     * with the given value.\n     */\n    confirm: showConfirm,\n\n    /**\n     * @ngdoc method\n     * @name $ionicPopup#prompt\n     * @description Show a simple prompt popup, which has an input, OK button, and Cancel button.\n     * Resolves the promise with the value of the input if the user presses OK, and with undefined\n     * if the user presses Cancel.\n     *\n     * ```javascript\n     *  $ionicPopup.prompt({\n     *    title: 'Password Check',\n     *    template: 'Enter your secret password',\n     *    inputType: 'password',\n     *    inputPlaceholder: 'Your password'\n     *  }).then(function(res) {\n     *    console.log('Your password is', res);\n     *  });\n     * ```\n     * @param {object} options The options for showing the prompt popup, of the form:\n     *\n     * ```\n     * {\n     *   title: '', // String. The title of the popup.\n     *   cssClass: '', // String, The custom CSS class name\n     *   subTitle: '', // String (optional). The sub-title of the popup.\n     *   template: '', // String (optional). The html template to place in the popup body.\n     *   templateUrl: '', // String (optional). The URL of an html template to place in the popup body.\n     *   inputType: // String (default: 'text'). The type of input to use\n     *   defaultText: // String (default: ''). The initial value placed into the input.\n     *   maxLength: // Integer (default: null). Specify a maxlength attribute for the input.\n     *   inputPlaceholder: // String (default: ''). A placeholder to use for the input.\n     *   cancelText: // String (default: 'Cancel'. The text of the Cancel button.\n     *   cancelType: // String (default: 'button-default'). The type of the Cancel button.\n     *   okText: // String (default: 'OK'). The text of the OK button.\n     *   okType: // String (default: 'button-positive'). The type of the OK button.\n     * }\n     * ```\n     *\n     * @returns {object} A promise which is resolved when the popup is closed. Has one additional\n     * function `close`, which can be called with any value to programmatically close the popup\n     * with the given value.\n     */\n    prompt: showPrompt,\n    /**\n     * @private for testing\n     */\n    _createPopup: createPopup,\n    _popupStack: popupStack\n  };\n\n  return $ionicPopup;\n\n  function createPopup(options) {\n    options = extend({\n      scope: null,\n      title: '',\n      buttons: []\n    }, options || {});\n\n    var self = {};\n    self.scope = (options.scope || $rootScope).$new();\n    self.element = jqLite(POPUP_TPL);\n    self.responseDeferred = $q.defer();\n\n    $ionicBody.get().appendChild(self.element[0]);\n    $compile(self.element)(self.scope);\n\n    extend(self.scope, {\n      title: options.title,\n      buttons: options.buttons,\n      subTitle: options.subTitle,\n      cssClass: options.cssClass,\n      $buttonTapped: function(button, event) {\n        var result = (button.onTap || noop).apply(self, [event]);\n        event = event.originalEvent || event; //jquery events\n\n        if (!event.defaultPrevented) {\n          self.responseDeferred.resolve(result);\n        }\n      }\n    });\n\n    $q.when(\n      options.templateUrl ?\n      $ionicTemplateLoader.load(options.templateUrl) :\n        (options.template || options.content || '')\n    ).then(function(template) {\n      var popupBody = jqLite(self.element[0].querySelector('.popup-body'));\n      if (template) {\n        popupBody.html(template);\n        $compile(popupBody.contents())(self.scope);\n      } else {\n        popupBody.remove();\n      }\n    });\n\n    self.show = function() {\n      if (self.isShown || self.removed) return;\n\n      $ionicModal.stack.add(self);\n      self.isShown = true;\n      ionic.requestAnimationFrame(function() {\n        //if hidden while waiting for raf, don't show\n        if (!self.isShown) return;\n\n        self.element.removeClass('popup-hidden');\n        self.element.addClass('popup-showing active');\n        focusInput(self.element);\n      });\n    };\n\n    self.hide = function(callback) {\n      callback = callback || noop;\n      if (!self.isShown) return callback();\n\n      $ionicModal.stack.remove(self);\n      self.isShown = false;\n      self.element.removeClass('active');\n      self.element.addClass('popup-hidden');\n      $timeout(callback, 250, false);\n    };\n\n    self.remove = function() {\n      if (self.removed) return;\n\n      self.hide(function() {\n        self.element.remove();\n        self.scope.$destroy();\n      });\n\n      self.removed = true;\n    };\n\n    return self;\n  }\n\n  function onHardwareBackButton() {\n    var last = popupStack[popupStack.length - 1];\n    last && last.responseDeferred.resolve();\n  }\n\n  function showPopup(options) {\n    var popup = $ionicPopup._createPopup(options);\n    var showDelay = 0;\n\n    if (popupStack.length > 0) {\n      showDelay = config.stackPushDelay;\n      $timeout(popupStack[popupStack.length - 1].hide, showDelay, false);\n    } else {\n      //Add popup-open & backdrop if this is first popup\n      $ionicBody.addClass('popup-open');\n      $ionicBackdrop.retain();\n      //only show the backdrop on the first popup\n      $ionicPopup._backButtonActionDone = $ionicPlatform.registerBackButtonAction(\n        onHardwareBackButton,\n        IONIC_BACK_PRIORITY.popup\n      );\n    }\n\n    // Expose a 'close' method on the returned promise\n    popup.responseDeferred.promise.close = function popupClose(result) {\n      if (!popup.removed) popup.responseDeferred.resolve(result);\n    };\n    //DEPRECATED: notify the promise with an object with a close method\n    popup.responseDeferred.notify({ close: popup.responseDeferred.close });\n\n    doShow();\n\n    return popup.responseDeferred.promise;\n\n    function doShow() {\n      popupStack.push(popup);\n      $timeout(popup.show, showDelay, false);\n\n      popup.responseDeferred.promise.then(function(result) {\n        var index = popupStack.indexOf(popup);\n        if (index !== -1) {\n          popupStack.splice(index, 1);\n        }\n\n        popup.remove();\n\n        if (popupStack.length > 0) {\n          popupStack[popupStack.length - 1].show();\n        } else {\n          $ionicBackdrop.release();\n          //Remove popup-open & backdrop if this is last popup\n          $timeout(function() {\n            // wait to remove this due to a 300ms delay native\n            // click which would trigging whatever was underneath this\n            if (!popupStack.length) {\n              $ionicBody.removeClass('popup-open');\n            }\n          }, 400, false);\n          ($ionicPopup._backButtonActionDone || noop)();\n        }\n\n\n        return result;\n      });\n\n    }\n\n  }\n\n  function focusInput(element) {\n    var focusOn = element[0].querySelector('[autofocus]');\n    if (focusOn) {\n      focusOn.focus();\n    }\n  }\n\n  function showAlert(opts) {\n    return showPopup(extend({\n      buttons: [{\n        text: opts.okText || 'OK',\n        type: opts.okType || 'button-positive',\n        onTap: function() {\n          return true;\n        }\n      }]\n    }, opts || {}));\n  }\n\n  function showConfirm(opts) {\n    return showPopup(extend({\n      buttons: [{\n        text: opts.cancelText || 'Cancel',\n        type: opts.cancelType || 'button-default',\n        onTap: function() { return false; }\n      }, {\n        text: opts.okText || 'OK',\n        type: opts.okType || 'button-positive',\n        onTap: function() { return true; }\n      }]\n    }, opts || {}));\n  }\n\n  function showPrompt(opts) {\n    var scope = $rootScope.$new(true);\n    scope.data = {};\n    scope.data.fieldtype = opts.inputType ? opts.inputType : 'text';\n    scope.data.response = opts.defaultText ? opts.defaultText : '';\n    scope.data.placeholder = opts.inputPlaceholder ? opts.inputPlaceholder : '';\n    scope.data.maxlength = opts.maxLength ? parseInt(opts.maxLength) : '';\n    var text = '';\n    if (opts.template && /<[a-z][\\s\\S]*>/i.test(opts.template) === false) {\n      text = '<span>' + opts.template + '</span>';\n      delete opts.template;\n    }\n    return showPopup(extend({\n      template: text + '<input ng-model=\"data.response\" '\n        + 'type=\"{{ data.fieldtype }}\"'\n        + 'maxlength=\"{{ data.maxlength }}\"'\n        + 'placeholder=\"{{ data.placeholder }}\"'\n        + '>',\n      scope: scope,\n      buttons: [{\n        text: opts.cancelText || 'Cancel',\n        type: opts.cancelType || 'button-default',\n        onTap: function() {}\n      }, {\n        text: opts.okText || 'OK',\n        type: opts.okType || 'button-positive',\n        onTap: function() {\n          return scope.data.response || '';\n        }\n      }]\n    }, opts || {}));\n  }\n}]);\n\n/**\n * @ngdoc service\n * @name $ionicPosition\n * @module ionic\n * @description\n * A set of utility methods that can be use to retrieve position of DOM elements.\n * It is meant to be used where we need to absolute-position DOM elements in\n * relation to other, existing elements (this is the case for tooltips, popovers, etc.).\n *\n * Adapted from [AngularUI Bootstrap](https://github.com/angular-ui/bootstrap/blob/master/src/position/position.js),\n * ([license](https://github.com/angular-ui/bootstrap/blob/master/LICENSE))\n */\nIonicModule\n.factory('$ionicPosition', ['$document', '$window', function($document, $window) {\n\n  function getStyle(el, cssprop) {\n    if (el.currentStyle) { //IE\n      return el.currentStyle[cssprop];\n    } else if ($window.getComputedStyle) {\n      return $window.getComputedStyle(el)[cssprop];\n    }\n    // finally try and get inline style\n    return el.style[cssprop];\n  }\n\n  /**\n   * Checks if a given element is statically positioned\n   * @param element - raw DOM element\n   */\n  function isStaticPositioned(element) {\n    return (getStyle(element, 'position') || 'static') === 'static';\n  }\n\n  /**\n   * returns the closest, non-statically positioned parentOffset of a given element\n   * @param element\n   */\n  var parentOffsetEl = function(element) {\n    var docDomEl = $document[0];\n    var offsetParent = element.offsetParent || docDomEl;\n    while (offsetParent && offsetParent !== docDomEl && isStaticPositioned(offsetParent)) {\n      offsetParent = offsetParent.offsetParent;\n    }\n    return offsetParent || docDomEl;\n  };\n\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicPosition#position\n     * @description Get the current coordinates of the element, relative to the offset parent.\n     * Read-only equivalent of [jQuery's position function](http://api.jquery.com/position/).\n     * @param {element} element The element to get the position of.\n     * @returns {object} Returns an object containing the properties top, left, width and height.\n     */\n    position: function(element) {\n      var elBCR = this.offset(element);\n      var offsetParentBCR = { top: 0, left: 0 };\n      var offsetParentEl = parentOffsetEl(element[0]);\n      if (offsetParentEl != $document[0]) {\n        offsetParentBCR = this.offset(jqLite(offsetParentEl));\n        offsetParentBCR.top += offsetParentEl.clientTop - offsetParentEl.scrollTop;\n        offsetParentBCR.left += offsetParentEl.clientLeft - offsetParentEl.scrollLeft;\n      }\n\n      var boundingClientRect = element[0].getBoundingClientRect();\n      return {\n        width: boundingClientRect.width || element.prop('offsetWidth'),\n        height: boundingClientRect.height || element.prop('offsetHeight'),\n        top: elBCR.top - offsetParentBCR.top,\n        left: elBCR.left - offsetParentBCR.left\n      };\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicPosition#offset\n     * @description Get the current coordinates of the element, relative to the document.\n     * Read-only equivalent of [jQuery's offset function](http://api.jquery.com/offset/).\n     * @param {element} element The element to get the offset of.\n     * @returns {object} Returns an object containing the properties top, left, width and height.\n     */\n    offset: function(element) {\n      var boundingClientRect = element[0].getBoundingClientRect();\n      return {\n        width: boundingClientRect.width || element.prop('offsetWidth'),\n        height: boundingClientRect.height || element.prop('offsetHeight'),\n        top: boundingClientRect.top + ($window.pageYOffset || $document[0].documentElement.scrollTop),\n        left: boundingClientRect.left + ($window.pageXOffset || $document[0].documentElement.scrollLeft)\n      };\n    }\n\n  };\n}]);\n\n\n/**\n * @ngdoc service\n * @name $ionicScrollDelegate\n * @module ionic\n * @description\n * Delegate for controlling scrollViews (created by\n * {@link ionic.directive:ionContent} and\n * {@link ionic.directive:ionScroll} directives).\n *\n * Methods called directly on the $ionicScrollDelegate service will control all scroll\n * views.  Use the {@link ionic.service:$ionicScrollDelegate#$getByHandle $getByHandle}\n * method to control specific scrollViews.\n *\n * @usage\n *\n * ```html\n * <body ng-controller=\"MainCtrl\">\n *   <ion-content>\n *     <button ng-click=\"scrollTop()\">Scroll to Top!</button>\n *   </ion-content>\n * </body>\n * ```\n * ```js\n * function MainCtrl($scope, $ionicScrollDelegate) {\n *   $scope.scrollTop = function() {\n *     $ionicScrollDelegate.scrollTop();\n *   };\n * }\n * ```\n *\n * Example of advanced usage, with two scroll areas using `delegate-handle`\n * for fine control.\n *\n * ```html\n * <body ng-controller=\"MainCtrl\">\n *   <ion-content delegate-handle=\"mainScroll\">\n *     <button ng-click=\"scrollMainToTop()\">\n *       Scroll content to top!\n *     </button>\n *     <ion-scroll delegate-handle=\"small\" style=\"height: 100px;\">\n *       <button ng-click=\"scrollSmallToTop()\">\n *         Scroll small area to top!\n *       </button>\n *     </ion-scroll>\n *   </ion-content>\n * </body>\n * ```\n * ```js\n * function MainCtrl($scope, $ionicScrollDelegate) {\n *   $scope.scrollMainToTop = function() {\n *     $ionicScrollDelegate.$getByHandle('mainScroll').scrollTop();\n *   };\n *   $scope.scrollSmallToTop = function() {\n *     $ionicScrollDelegate.$getByHandle('small').scrollTop();\n *   };\n * }\n * ```\n */\nIonicModule\n.service('$ionicScrollDelegate', ionic.DelegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#resize\n   * @description Tell the scrollView to recalculate the size of its container.\n   */\n  'resize',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scrollTop\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'scrollTop',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scrollBottom\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'scrollBottom',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scrollTo\n   * @param {number} left The x-value to scroll to.\n   * @param {number} top The y-value to scroll to.\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'scrollTo',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scrollBy\n   * @param {number} left The x-offset to scroll by.\n   * @param {number} top The y-offset to scroll by.\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'scrollBy',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#zoomTo\n   * @param {number} level Level to zoom to.\n   * @param {boolean=} animate Whether to animate the zoom.\n   * @param {number=} originLeft Zoom in at given left coordinate.\n   * @param {number=} originTop Zoom in at given top coordinate.\n   */\n  'zoomTo',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#zoomBy\n   * @param {number} factor The factor to zoom by.\n   * @param {boolean=} animate Whether to animate the zoom.\n   * @param {number=} originLeft Zoom in at given left coordinate.\n   * @param {number=} originTop Zoom in at given top coordinate.\n   */\n  'zoomBy',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#getScrollPosition\n   * @returns {object} The scroll position of this view, with the following properties:\n   *  - `{number}` `left` The distance the user has scrolled from the left (starts at 0).\n   *  - `{number}` `top` The distance the user has scrolled from the top (starts at 0).\n   *  - `{number}` `zoom` The current zoom level.\n   */\n  'getScrollPosition',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#anchorScroll\n   * @description Tell the scrollView to scroll to the element with an id\n   * matching window.location.hash.\n   *\n   * If no matching element is found, it will scroll to top.\n   *\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'anchorScroll',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#freezeScroll\n   * @description Does not allow this scroll view to scroll either x or y.\n   * @param {boolean=} shouldFreeze Should this scroll view be prevented from scrolling or not.\n   * @returns {boolean} If the scroll view is being prevented from scrolling or not.\n   */\n  'freezeScroll',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#freezeAllScrolls\n   * @description Does not allow any of the app's scroll views to scroll either x or y.\n   * @param {boolean=} shouldFreeze Should all app scrolls be prevented from scrolling or not.\n   */\n  'freezeAllScrolls',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#getScrollView\n   * @returns {object} The scrollView associated with this delegate.\n   */\n  'getScrollView'\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#$getByHandle\n   * @param {string} handle\n   * @returns `delegateInstance` A delegate instance that controls only the\n   * scrollViews with `delegate-handle` matching the given handle.\n   *\n   * Example: `$ionicScrollDelegate.$getByHandle('my-handle').scrollTop();`\n   */\n]));\n\n\n/**\n * @ngdoc service\n * @name $ionicSideMenuDelegate\n * @module ionic\n *\n * @description\n * Delegate for controlling the {@link ionic.directive:ionSideMenus} directive.\n *\n * Methods called directly on the $ionicSideMenuDelegate service will control all side\n * menus.  Use the {@link ionic.service:$ionicSideMenuDelegate#$getByHandle $getByHandle}\n * method to control specific ionSideMenus instances.\n *\n * @usage\n *\n * ```html\n * <body ng-controller=\"MainCtrl\">\n *   <ion-side-menus>\n *     <ion-side-menu-content>\n *       Content!\n *       <button ng-click=\"toggleLeftSideMenu()\">\n *         Toggle Left Side Menu\n *       </button>\n *     </ion-side-menu-content>\n *     <ion-side-menu side=\"left\">\n *       Left Menu!\n *     <ion-side-menu>\n *   </ion-side-menus>\n * </body>\n * ```\n * ```js\n * function MainCtrl($scope, $ionicSideMenuDelegate) {\n *   $scope.toggleLeftSideMenu = function() {\n *     $ionicSideMenuDelegate.toggleLeft();\n *   };\n * }\n * ```\n */\nIonicModule\n.service('$ionicSideMenuDelegate', ionic.DelegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#toggleLeft\n   * @description Toggle the left side menu (if it exists).\n   * @param {boolean=} isOpen Whether to open or close the menu.\n   * Default: Toggles the menu.\n   */\n  'toggleLeft',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#toggleRight\n   * @description Toggle the right side menu (if it exists).\n   * @param {boolean=} isOpen Whether to open or close the menu.\n   * Default: Toggles the menu.\n   */\n  'toggleRight',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#getOpenRatio\n   * @description Gets the ratio of open amount over menu width. For example, a\n   * menu of width 100 that is opened by 50 pixels is 50% opened, and would return\n   * a ratio of 0.5.\n   *\n   * @returns {float} 0 if nothing is open, between 0 and 1 if left menu is\n   * opened/opening, and between 0 and -1 if right menu is opened/opening.\n   */\n  'getOpenRatio',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#isOpen\n   * @returns {boolean} Whether either the left or right menu is currently opened.\n   */\n  'isOpen',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#isOpenLeft\n   * @returns {boolean} Whether the left menu is currently opened.\n   */\n  'isOpenLeft',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#isOpenRight\n   * @returns {boolean} Whether the right menu is currently opened.\n   */\n  'isOpenRight',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#canDragContent\n   * @param {boolean=} canDrag Set whether the content can or cannot be dragged to open\n   * side menus.\n   * @returns {boolean} Whether the content can be dragged to open side menus.\n   */\n  'canDragContent',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#edgeDragThreshold\n   * @param {boolean|number=} value Set whether the content drag can only start if it is below a certain threshold distance from the edge of the screen. Accepts three different values:\n   *  - If a non-zero number is given, that many pixels is used as the maximum allowed distance from the edge that starts dragging the side menu.\n   *  - If true is given, the default number of pixels (25) is used as the maximum allowed distance.\n   *  - If false or 0 is given, the edge drag threshold is disabled, and dragging from anywhere on the content is allowed.\n   * @returns {boolean} Whether the drag can start only from within the edge of screen threshold.\n   */\n  'edgeDragThreshold'\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#$getByHandle\n   * @param {string} handle\n   * @returns `delegateInstance` A delegate instance that controls only the\n   * {@link ionic.directive:ionSideMenus} directives with `delegate-handle` matching\n   * the given handle.\n   *\n   * Example: `$ionicSideMenuDelegate.$getByHandle('my-handle').toggleLeft();`\n   */\n]));\n\n\n/**\n * @ngdoc service\n * @name $ionicSlideBoxDelegate\n * @module ionic\n * @description\n * Delegate that controls the {@link ionic.directive:ionSlideBox} directive.\n *\n * Methods called directly on the $ionicSlideBoxDelegate service will control all slide boxes.  Use the {@link ionic.service:$ionicSlideBoxDelegate#$getByHandle $getByHandle}\n * method to control specific slide box instances.\n *\n * @usage\n *\n * ```html\n * <ion-view>\n *   <ion-slide-box>\n *     <ion-slide>\n *       <div class=\"box blue\">\n *         <button ng-click=\"nextSlide()\">Next slide!</button>\n *       </div>\n *     </ion-slide>\n *     <ion-slide>\n *       <div class=\"box red\">\n *         Slide 2!\n *       </div>\n *     </ion-slide>\n *   </ion-slide-box>\n * </ion-view>\n * ```\n * ```js\n * function MyCtrl($scope, $ionicSlideBoxDelegate) {\n *   $scope.nextSlide = function() {\n *     $ionicSlideBoxDelegate.next();\n *   }\n * }\n * ```\n */\nIonicModule\n.service('$ionicSlideBoxDelegate', ionic.DelegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#update\n   * @description\n   * Update the slidebox (for example if using Angular with ng-repeat,\n   * resize it for the elements inside).\n   */\n  'update',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#slide\n   * @param {number} to The index to slide to.\n   * @param {number=} speed The number of milliseconds the change should take.\n   */\n  'slide',\n  'select',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#enableSlide\n   * @param {boolean=} shouldEnable Whether to enable sliding the slidebox.\n   * @returns {boolean} Whether sliding is enabled.\n   */\n  'enableSlide',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#previous\n   * @param {number=} speed The number of milliseconds the change should take.\n   * @description Go to the previous slide. Wraps around if at the beginning.\n   */\n  'previous',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#next\n   * @param {number=} speed The number of milliseconds the change should take.\n   * @description Go to the next slide. Wraps around if at the end.\n   */\n  'next',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#stop\n   * @description Stop sliding. The slideBox will not move again until\n   * explicitly told to do so.\n   */\n  'stop',\n  'autoPlay',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#start\n   * @description Start sliding again if the slideBox was stopped.\n   */\n  'start',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#currentIndex\n   * @returns number The index of the current slide.\n   */\n  'currentIndex',\n  'selected',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#slidesCount\n   * @returns number The number of slides there are currently.\n   */\n  'slidesCount',\n  'count',\n  'loop'\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#$getByHandle\n   * @param {string} handle\n   * @returns `delegateInstance` A delegate instance that controls only the\n   * {@link ionic.directive:ionSlideBox} directives with `delegate-handle` matching\n   * the given handle.\n   *\n   * Example: `$ionicSlideBoxDelegate.$getByHandle('my-handle').stop();`\n   */\n]));\n\n\n/**\n * @ngdoc service\n * @name $ionicTabsDelegate\n * @module ionic\n *\n * @description\n * Delegate for controlling the {@link ionic.directive:ionTabs} directive.\n *\n * Methods called directly on the $ionicTabsDelegate service will control all ionTabs\n * directives. Use the {@link ionic.service:$ionicTabsDelegate#$getByHandle $getByHandle}\n * method to control specific ionTabs instances.\n *\n * @usage\n *\n * ```html\n * <body ng-controller=\"MyCtrl\">\n *   <ion-tabs>\n *\n *     <ion-tab title=\"Tab 1\">\n *       Hello tab 1!\n *       <button ng-click=\"selectTabWithIndex(1)\">Select tab 2!</button>\n *     </ion-tab>\n *     <ion-tab title=\"Tab 2\">Hello tab 2!</ion-tab>\n *\n *   </ion-tabs>\n * </body>\n * ```\n * ```js\n * function MyCtrl($scope, $ionicTabsDelegate) {\n *   $scope.selectTabWithIndex = function(index) {\n *     $ionicTabsDelegate.select(index);\n *   }\n * }\n * ```\n */\nIonicModule\n.service('$ionicTabsDelegate', ionic.DelegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicTabsDelegate#select\n   * @description Select the tab matching the given index.\n   *\n   * @param {number} index Index of the tab to select.\n   */\n  'select',\n  /**\n   * @ngdoc method\n   * @name $ionicTabsDelegate#selectedIndex\n   * @returns `number` The index of the selected tab, or -1.\n   */\n  'selectedIndex',\n  /**\n   * @ngdoc method\n   * @name $ionicTabsDelegate#showBar\n   * @description\n   * Set/get whether the {@link ionic.directive:ionTabs} is shown\n   * @param {boolean} show Whether to show the bar.\n   * @returns {boolean} Whether the bar is shown.\n   */\n  'showBar'\n  /**\n   * @ngdoc method\n   * @name $ionicTabsDelegate#$getByHandle\n   * @param {string} handle\n   * @returns `delegateInstance` A delegate instance that controls only the\n   * {@link ionic.directive:ionTabs} directives with `delegate-handle` matching\n   * the given handle.\n   *\n   * Example: `$ionicTabsDelegate.$getByHandle('my-handle').select(0);`\n   */\n]));\n\n// closure to keep things neat\n(function() {\n  var templatesToCache = [];\n\n/**\n * @ngdoc service\n * @name $ionicTemplateCache\n * @module ionic\n * @description A service that preemptively caches template files to eliminate transition flicker and boost performance.\n * @usage\n * State templates are cached automatically, but you can optionally cache other templates.\n *\n * ```js\n * $ionicTemplateCache('myNgIncludeTemplate.html');\n * ```\n *\n * Optionally disable all preemptive caching with the `$ionicConfigProvider` or individual states by setting `prefetchTemplate`\n * in the `$state` definition\n *\n * ```js\n *   angular.module('myApp', ['ionic'])\n *   .config(function($stateProvider, $ionicConfigProvider) {\n *\n *     // disable preemptive template caching globally\n *     $ionicConfigProvider.templates.prefetch(false);\n *\n *     // disable individual states\n *     $stateProvider\n *       .state('tabs', {\n *         url: \"/tab\",\n *         abstract: true,\n *         prefetchTemplate: false,\n *         templateUrl: \"tabs-templates/tabs.html\"\n *       })\n *       .state('tabs.home', {\n *         url: \"/home\",\n *         views: {\n *           'home-tab': {\n *             prefetchTemplate: false,\n *             templateUrl: \"tabs-templates/home.html\",\n *             controller: 'HomeTabCtrl'\n *           }\n *         }\n *       });\n *   });\n * ```\n */\nIonicModule\n.factory('$ionicTemplateCache', [\n'$http',\n'$templateCache',\n'$timeout',\nfunction($http, $templateCache, $timeout) {\n  var toCache = templatesToCache,\n      hasRun;\n\n  function $ionicTemplateCache(templates) {\n    if (typeof templates === 'undefined') {\n      return run();\n    }\n    if (isString(templates)) {\n      templates = [templates];\n    }\n    forEach(templates, function(template) {\n      toCache.push(template);\n    });\n    if (hasRun) {\n      run();\n    }\n  }\n\n  // run through methods - internal method\n  function run() {\n    var template;\n    $ionicTemplateCache._runCount++;\n\n    hasRun = true;\n    // ignore if race condition already zeroed out array\n    if (toCache.length === 0) return;\n\n    var i = 0;\n    while (i < 4 && (template = toCache.pop())) {\n      // note that inline templates are ignored by this request\n      if (isString(template)) $http.get(template, { cache: $templateCache });\n      i++;\n    }\n    // only preload 3 templates a second\n    if (toCache.length) {\n      $timeout(run, 1000);\n    }\n  }\n\n  // exposing for testing\n  $ionicTemplateCache._runCount = 0;\n  // default method\n  return $ionicTemplateCache;\n}])\n\n// Intercepts the $stateprovider.state() command to look for templateUrls that can be cached\n.config([\n'$stateProvider',\n'$ionicConfigProvider',\nfunction($stateProvider, $ionicConfigProvider) {\n  var stateProviderState = $stateProvider.state;\n  $stateProvider.state = function(stateName, definition) {\n    // don't even bother if it's disabled. note, another config may run after this, so it's not a catch-all\n    if (typeof definition === 'object') {\n      var enabled = definition.prefetchTemplate !== false && templatesToCache.length < $ionicConfigProvider.templates.maxPrefetch();\n      if (enabled && isString(definition.templateUrl)) templatesToCache.push(definition.templateUrl);\n      if (angular.isObject(definition.views)) {\n        for (var key in definition.views) {\n          enabled = definition.views[key].prefetchTemplate !== false && templatesToCache.length < $ionicConfigProvider.templates.maxPrefetch();\n          if (enabled && isString(definition.views[key].templateUrl)) templatesToCache.push(definition.views[key].templateUrl);\n        }\n      }\n    }\n    return stateProviderState.call($stateProvider, stateName, definition);\n  };\n}])\n\n// process the templateUrls collected by the $stateProvider, adding them to the cache\n.run(['$ionicTemplateCache', function($ionicTemplateCache) {\n  $ionicTemplateCache();\n}]);\n\n})();\n\nIonicModule\n.factory('$ionicTemplateLoader', [\n  '$compile',\n  '$controller',\n  '$http',\n  '$q',\n  '$rootScope',\n  '$templateCache',\nfunction($compile, $controller, $http, $q, $rootScope, $templateCache) {\n\n  return {\n    load: fetchTemplate,\n    compile: loadAndCompile\n  };\n\n  function fetchTemplate(url) {\n    return $http.get(url, {cache: $templateCache})\n    .then(function(response) {\n      return response.data && response.data.trim();\n    });\n  }\n\n  function loadAndCompile(options) {\n    options = extend({\n      template: '',\n      templateUrl: '',\n      scope: null,\n      controller: null,\n      locals: {},\n      appendTo: null\n    }, options || {});\n\n    var templatePromise = options.templateUrl ?\n      this.load(options.templateUrl) :\n      $q.when(options.template);\n\n    return templatePromise.then(function(template) {\n      var controller;\n      var scope = options.scope || $rootScope.$new();\n\n      //Incase template doesn't have just one root element, do this\n      var element = jqLite('<div>').html(template).contents();\n\n      if (options.controller) {\n        controller = $controller(\n          options.controller,\n          extend(options.locals, {\n            $scope: scope\n          })\n        );\n        element.children().data('$ngControllerController', controller);\n      }\n      if (options.appendTo) {\n        jqLite(options.appendTo).append(element);\n      }\n\n      $compile(element)(scope);\n\n      return {\n        element: element,\n        scope: scope\n      };\n    });\n  }\n\n}]);\n\n/**\n * @private\n * DEPRECATED, as of v1.0.0-beta14 -------\n */\nIonicModule\n.factory('$ionicViewService', ['$ionicHistory', '$log', function($ionicHistory, $log) {\n\n  function warn(oldMethod, newMethod) {\n    $log.warn('$ionicViewService' + oldMethod + ' is deprecated, please use $ionicHistory' + newMethod + ' instead: http://ionicframework.com/docs/nightly/api/service/$ionicHistory/');\n  }\n\n  warn('', '');\n\n  var methodsMap = {\n    getCurrentView: 'currentView',\n    getBackView: 'backView',\n    getForwardView: 'forwardView',\n    getCurrentStateName: 'currentStateName',\n    nextViewOptions: 'nextViewOptions',\n    clearHistory: 'clearHistory'\n  };\n\n  forEach(methodsMap, function(newMethod, oldMethod) {\n    methodsMap[oldMethod] = function() {\n      warn('.' + oldMethod, '.' + newMethod);\n      return $ionicHistory[newMethod].apply(this, arguments);\n    };\n  });\n\n  return methodsMap;\n\n}]);\n\n/**\n * @private\n * TODO document\n */\n\nIonicModule.factory('$ionicViewSwitcher', [\n  '$timeout',\n  '$document',\n  '$q',\n  '$ionicClickBlock',\n  '$ionicConfig',\n  '$ionicNavBarDelegate',\nfunction($timeout, $document, $q, $ionicClickBlock, $ionicConfig, $ionicNavBarDelegate) {\n\n  var TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';\n  var DATA_NO_CACHE = '$noCache';\n  var DATA_DESTROY_ELE = '$destroyEle';\n  var DATA_ELE_IDENTIFIER = '$eleId';\n  var DATA_VIEW_ACCESSED = '$accessed';\n  var DATA_FALLBACK_TIMER = '$fallbackTimer';\n  var DATA_VIEW = '$viewData';\n  var NAV_VIEW_ATTR = 'nav-view';\n  var VIEW_STATUS_ACTIVE = 'active';\n  var VIEW_STATUS_CACHED = 'cached';\n  var VIEW_STATUS_STAGED = 'stage';\n\n  var transitionCounter = 0;\n  var nextTransition, nextDirection;\n  ionic.transition = ionic.transition || {};\n  ionic.transition.isActive = false;\n  var isActiveTimer;\n  var cachedAttr = ionic.DomUtil.cachedAttr;\n  var transitionPromises = [];\n  var defaultTimeout = 1100;\n\n  var ionicViewSwitcher = {\n\n    create: function(navViewCtrl, viewLocals, enteringView, leavingView, renderStart, renderEnd) {\n      // get a reference to an entering/leaving element if they exist\n      // loop through to see if the view is already in the navViewElement\n      var enteringEle, leavingEle;\n      var transitionId = ++transitionCounter;\n      var alreadyInDom;\n\n      var switcher = {\n\n        init: function(registerData, callback) {\n          ionicViewSwitcher.isTransitioning(true);\n\n          switcher.loadViewElements(registerData);\n\n          switcher.render(registerData, function() {\n            callback && callback();\n          });\n        },\n\n        loadViewElements: function(registerData) {\n          var x, l, viewEle;\n          var viewElements = navViewCtrl.getViewElements();\n          var enteringEleIdentifier = getViewElementIdentifier(viewLocals, enteringView);\n          var navViewActiveEleId = navViewCtrl.activeEleId();\n\n          for (x = 0, l = viewElements.length; x < l; x++) {\n            viewEle = viewElements.eq(x);\n\n            if (viewEle.data(DATA_ELE_IDENTIFIER) === enteringEleIdentifier) {\n              // we found an existing element in the DOM that should be entering the view\n              if (viewEle.data(DATA_NO_CACHE)) {\n                // the existing element should not be cached, don't use it\n                viewEle.data(DATA_ELE_IDENTIFIER, enteringEleIdentifier + ionic.Utils.nextUid());\n                viewEle.data(DATA_DESTROY_ELE, true);\n\n              } else {\n                enteringEle = viewEle;\n              }\n\n            } else if (isDefined(navViewActiveEleId) && viewEle.data(DATA_ELE_IDENTIFIER) === navViewActiveEleId) {\n              leavingEle = viewEle;\n            }\n\n            if (enteringEle && leavingEle) break;\n          }\n\n          alreadyInDom = !!enteringEle;\n\n          if (!alreadyInDom) {\n            // still no existing element to use\n            // create it using existing template/scope/locals\n            enteringEle = registerData.ele || ionicViewSwitcher.createViewEle(viewLocals);\n\n            // existing elements in the DOM are looked up by their state name and state id\n            enteringEle.data(DATA_ELE_IDENTIFIER, enteringEleIdentifier);\n          }\n\n          if (renderEnd) {\n            navViewCtrl.activeEleId(enteringEleIdentifier);\n          }\n\n          registerData.ele = null;\n        },\n\n        render: function(registerData, callback) {\n          if (alreadyInDom) {\n            // it was already found in the DOM, just reconnect the scope\n            ionic.Utils.reconnectScope(enteringEle.scope());\n\n          } else {\n            // the entering element is not already in the DOM\n            // set that the entering element should be \"staged\" and its\n            // styles of where this element will go before it hits the DOM\n            navViewAttr(enteringEle, VIEW_STATUS_STAGED);\n\n            var enteringData = getTransitionData(viewLocals, enteringEle, registerData.direction, enteringView);\n            var transitionFn = $ionicConfig.transitions.views[enteringData.transition] || $ionicConfig.transitions.views.none;\n            transitionFn(enteringEle, null, enteringData.direction, true).run(0);\n\n            enteringEle.data(DATA_VIEW, {\n              viewId: enteringData.viewId,\n              historyId: enteringData.historyId,\n              stateName: enteringData.stateName,\n              stateParams: enteringData.stateParams\n            });\n\n            // if the current state has cache:false\n            // or the element has cache-view=\"false\" attribute\n            if (viewState(viewLocals).cache === false || viewState(viewLocals).cache === 'false' ||\n                enteringEle.attr('cache-view') == 'false' || $ionicConfig.views.maxCache() === 0) {\n              enteringEle.data(DATA_NO_CACHE, true);\n            }\n\n            // append the entering element to the DOM, create a new scope and run link\n            var viewScope = navViewCtrl.appendViewElement(enteringEle, viewLocals);\n\n            delete enteringData.direction;\n            delete enteringData.transition;\n            viewScope.$emit('$ionicView.loaded', enteringData);\n          }\n\n          // update that this view was just accessed\n          enteringEle.data(DATA_VIEW_ACCESSED, Date.now());\n\n          callback && callback();\n        },\n\n        transition: function(direction, enableBack, allowAnimate) {\n          var deferred;\n          var enteringData = getTransitionData(viewLocals, enteringEle, direction, enteringView);\n          var leavingData = extend(extend({}, enteringData), getViewData(leavingView));\n          enteringData.transitionId = leavingData.transitionId = transitionId;\n          enteringData.fromCache = !!alreadyInDom;\n          enteringData.enableBack = !!enableBack;\n          enteringData.renderStart = renderStart;\n          enteringData.renderEnd = renderEnd;\n\n          cachedAttr(enteringEle.parent(), 'nav-view-transition', enteringData.transition);\n          cachedAttr(enteringEle.parent(), 'nav-view-direction', enteringData.direction);\n\n          // cancel any previous transition complete fallbacks\n          $timeout.cancel(enteringEle.data(DATA_FALLBACK_TIMER));\n\n          // get the transition ready and see if it'll animate\n          var transitionFn = $ionicConfig.transitions.views[enteringData.transition] || $ionicConfig.transitions.views.none;\n          var viewTransition = transitionFn(enteringEle, leavingEle, enteringData.direction,\n                                            enteringData.shouldAnimate && allowAnimate && renderEnd);\n\n          if (viewTransition.shouldAnimate) {\n            // attach transitionend events (and fallback timer)\n            enteringEle.on(TRANSITIONEND_EVENT, completeOnTransitionEnd);\n            enteringEle.data(DATA_FALLBACK_TIMER, $timeout(transitionComplete, defaultTimeout));\n            $ionicClickBlock.show(defaultTimeout);\n          }\n\n          if (renderStart) {\n            // notify the views \"before\" the transition starts\n            switcher.emit('before', enteringData, leavingData);\n\n            // stage entering element, opacity 0, no transition duration\n            navViewAttr(enteringEle, VIEW_STATUS_STAGED);\n\n            // render the elements in the correct location for their starting point\n            viewTransition.run(0);\n          }\n\n          if (renderEnd) {\n            // create a promise so we can keep track of when all transitions finish\n            // only required if this transition should complete\n            deferred = $q.defer();\n            transitionPromises.push(deferred.promise);\n          }\n\n          if (renderStart && renderEnd) {\n            // CSS \"auto\" transitioned, not manually transitioned\n            // wait a frame so the styles apply before auto transitioning\n            $timeout(function() {\n              ionic.requestAnimationFrame(onReflow);\n            });\n          } else if (!renderEnd) {\n            // just the start of a manual transition\n            // but it will not render the end of the transition\n            navViewAttr(enteringEle, 'entering');\n            navViewAttr(leavingEle, 'leaving');\n\n            // return the transition run method so each step can be ran manually\n            return {\n              run: viewTransition.run,\n              cancel: function(shouldAnimate) {\n                if (shouldAnimate) {\n                  enteringEle.on(TRANSITIONEND_EVENT, cancelOnTransitionEnd);\n                  enteringEle.data(DATA_FALLBACK_TIMER, $timeout(cancelTransition, defaultTimeout));\n                  $ionicClickBlock.show(defaultTimeout);\n                } else {\n                  cancelTransition();\n                }\n                viewTransition.shouldAnimate = shouldAnimate;\n                viewTransition.run(0);\n                viewTransition = null;\n              }\n            };\n\n          } else if (renderEnd) {\n            // just the end of a manual transition\n            // happens after the manual transition has completed\n            // and a full history change has happened\n            onReflow();\n          }\n\n\n          function onReflow() {\n            // remove that we're staging the entering element so it can auto transition\n            navViewAttr(enteringEle, viewTransition.shouldAnimate ? 'entering' : VIEW_STATUS_ACTIVE);\n            navViewAttr(leavingEle, viewTransition.shouldAnimate ? 'leaving' : VIEW_STATUS_CACHED);\n\n            // start the auto transition and let the CSS take over\n            viewTransition.run(1);\n\n            // trigger auto transitions on the associated nav bars\n            $ionicNavBarDelegate._instances.forEach(function(instance) {\n              instance.triggerTransitionStart(transitionId);\n            });\n\n            if (!viewTransition.shouldAnimate) {\n              // no animated auto transition\n              transitionComplete();\n            }\n          }\n\n          // Make sure that transitionend events bubbling up from children won't fire\n          // transitionComplete. Will only go forward if ev.target == the element listening.\n          function completeOnTransitionEnd(ev) {\n            if (ev.target !== this) return;\n            transitionComplete();\n          }\n          function transitionComplete() {\n            if (transitionComplete.x) return;\n            transitionComplete.x = true;\n\n            enteringEle.off(TRANSITIONEND_EVENT, completeOnTransitionEnd);\n            $timeout.cancel(enteringEle.data(DATA_FALLBACK_TIMER));\n            leavingEle && $timeout.cancel(leavingEle.data(DATA_FALLBACK_TIMER));\n\n            // resolve that this one transition (there could be many w/ nested views)\n            deferred && deferred.resolve(navViewCtrl);\n\n            // the most recent transition added has completed and all the active\n            // transition promises should be added to the services array of promises\n            if (transitionId === transitionCounter) {\n              $q.all(transitionPromises).then(ionicViewSwitcher.transitionEnd);\n\n              // emit that the views have finished transitioning\n              // each parent nav-view will update which views are active and cached\n              switcher.emit('after', enteringData, leavingData);\n              switcher.cleanup(enteringData);\n            }\n\n            // tell the nav bars that the transition has ended\n            $ionicNavBarDelegate._instances.forEach(function(instance) {\n              instance.triggerTransitionEnd();\n            });\n\n\n            // remove any references that could cause memory issues\n            nextTransition = nextDirection = enteringView = leavingView = enteringEle = leavingEle = null;\n          }\n\n          // Make sure that transitionend events bubbling up from children won't fire\n          // transitionComplete. Will only go forward if ev.target == the element listening.\n          function cancelOnTransitionEnd(ev) {\n            if (ev.target !== this) return;\n            cancelTransition();\n          }\n          function cancelTransition() {\n            navViewAttr(enteringEle, VIEW_STATUS_CACHED);\n            navViewAttr(leavingEle, VIEW_STATUS_ACTIVE);\n            enteringEle.off(TRANSITIONEND_EVENT, cancelOnTransitionEnd);\n            $timeout.cancel(enteringEle.data(DATA_FALLBACK_TIMER));\n            ionicViewSwitcher.transitionEnd([navViewCtrl]);\n          }\n\n        },\n\n      emit: function(step, enteringData, leavingData) {\n          var enteringScope = getScopeForElement(enteringEle, enteringData);\n          var leavingScope = getScopeForElement(leavingEle, leavingData);\n\n          var prefixesAreEqual;\n\n          if ( !enteringData.viewId || enteringData.abstractView ) {\n            // it's an abstract view, so treat it accordingly\n\n            // we only get access to the leaving scope once in the transition,\n            // so dispatch all events right away if it exists\n            if ( leavingScope ) {\n              leavingScope.$emit('$ionicView.beforeLeave', leavingData);\n              leavingScope.$emit('$ionicView.leave', leavingData);\n              leavingScope.$emit('$ionicView.afterLeave', leavingData);\n              leavingScope.$broadcast('$ionicParentView.beforeLeave', leavingData);\n              leavingScope.$broadcast('$ionicParentView.leave', leavingData);\n              leavingScope.$broadcast('$ionicParentView.afterLeave', leavingData);\n            }\n          }\n          else {\n            // it's a regular view, so do the normal process\n            if (step == 'after') {\n              if (enteringScope) {\n                enteringScope.$emit('$ionicView.enter', enteringData);\n                enteringScope.$broadcast('$ionicParentView.enter', enteringData);\n              }\n\n              if (leavingScope) {\n                leavingScope.$emit('$ionicView.leave', leavingData);\n                leavingScope.$broadcast('$ionicParentView.leave', leavingData);\n              }\n              else if (enteringScope && leavingData && leavingData.viewId && enteringData.stateName !== leavingData.stateName) {\n                // we only want to dispatch this when we are doing a single-tier\n                // state change such as changing a tab, so compare the state\n                // for the same state-prefix but different suffix\n                prefixesAreEqual = compareStatePrefixes(enteringData.stateName, leavingData.stateName);\n                if ( prefixesAreEqual ) {\n                  enteringScope.$emit('$ionicNavView.leave', leavingData);\n                }\n              }\n            }\n\n            if (enteringScope) {\n              enteringScope.$emit('$ionicView.' + step + 'Enter', enteringData);\n              enteringScope.$broadcast('$ionicParentView.' + step + 'Enter', enteringData);\n            }\n\n            if (leavingScope) {\n              leavingScope.$emit('$ionicView.' + step + 'Leave', leavingData);\n              leavingScope.$broadcast('$ionicParentView.' + step + 'Leave', leavingData);\n\n            } else if (enteringScope && leavingData && leavingData.viewId && enteringData.stateName !== leavingData.stateName) {\n              // we only want to dispatch this when we are doing a single-tier\n              // state change such as changing a tab, so compare the state\n              // for the same state-prefix but different suffix\n              prefixesAreEqual = compareStatePrefixes(enteringData.stateName, leavingData.stateName);\n              if ( prefixesAreEqual ) {\n                enteringScope.$emit('$ionicNavView.' + step + 'Leave', leavingData);\n              }\n            }\n          }\n        },\n\n        cleanup: function(transData) {\n          // check if any views should be removed\n          if (leavingEle && transData.direction == 'back' && !$ionicConfig.views.forwardCache()) {\n            // if they just navigated back we can destroy the forward view\n            // do not remove forward views if cacheForwardViews config is true\n            destroyViewEle(leavingEle);\n          }\n\n          var viewElements = navViewCtrl.getViewElements();\n          var viewElementsLength = viewElements.length;\n          var x, viewElement;\n          var removeOldestAccess = (viewElementsLength - 1) > $ionicConfig.views.maxCache();\n          var removableEle;\n          var oldestAccess = Date.now();\n\n          for (x = 0; x < viewElementsLength; x++) {\n            viewElement = viewElements.eq(x);\n\n            if (removeOldestAccess && viewElement.data(DATA_VIEW_ACCESSED) < oldestAccess) {\n              // remember what was the oldest element to be accessed so it can be destroyed\n              oldestAccess = viewElement.data(DATA_VIEW_ACCESSED);\n              removableEle = viewElements.eq(x);\n\n            } else if (viewElement.data(DATA_DESTROY_ELE) && navViewAttr(viewElement) != VIEW_STATUS_ACTIVE) {\n              destroyViewEle(viewElement);\n            }\n          }\n\n          destroyViewEle(removableEle);\n\n          if (enteringEle.data(DATA_NO_CACHE)) {\n            enteringEle.data(DATA_DESTROY_ELE, true);\n          }\n        },\n\n        enteringEle: function() { return enteringEle; },\n        leavingEle: function() { return leavingEle; }\n\n      };\n\n      return switcher;\n    },\n\n    transitionEnd: function(navViewCtrls) {\n      forEach(navViewCtrls, function(navViewCtrl) {\n        navViewCtrl.transitionEnd();\n      });\n\n      ionicViewSwitcher.isTransitioning(false);\n      $ionicClickBlock.hide();\n      transitionPromises = [];\n    },\n\n    nextTransition: function(val) {\n      nextTransition = val;\n    },\n\n    nextDirection: function(val) {\n      nextDirection = val;\n    },\n\n    isTransitioning: function(val) {\n      if (arguments.length) {\n        ionic.transition.isActive = !!val;\n        $timeout.cancel(isActiveTimer);\n        if (val) {\n          isActiveTimer = $timeout(function() {\n            ionicViewSwitcher.isTransitioning(false);\n          }, 999);\n        }\n      }\n      return ionic.transition.isActive;\n    },\n\n    createViewEle: function(viewLocals) {\n      var containerEle = $document[0].createElement('div');\n      if (viewLocals && viewLocals.$template) {\n        containerEle.innerHTML = viewLocals.$template;\n        if (containerEle.children.length === 1) {\n          containerEle.children[0].classList.add('pane');\n          if ( viewLocals.$$state && viewLocals.$$state.self && viewLocals.$$state.self['abstract'] ) {\n            angular.element(containerEle.children[0]).attr(\"abstract\", \"true\");\n          }\n          else {\n            if ( viewLocals.$$state && viewLocals.$$state.self ) {\n              angular.element(containerEle.children[0]).attr(\"state\", viewLocals.$$state.self.name);\n            }\n\n          }\n          return jqLite(containerEle.children[0]);\n        }\n      }\n      containerEle.className = \"pane\";\n      return jqLite(containerEle);\n    },\n\n    viewEleIsActive: function(viewEle, isActiveAttr) {\n      navViewAttr(viewEle, isActiveAttr ? VIEW_STATUS_ACTIVE : VIEW_STATUS_CACHED);\n    },\n\n    getTransitionData: getTransitionData,\n    navViewAttr: navViewAttr,\n    destroyViewEle: destroyViewEle\n\n  };\n\n  return ionicViewSwitcher;\n\n\n  function getViewElementIdentifier(locals, view) {\n    if (viewState(locals)['abstract']) return viewState(locals).name;\n    if (view) return view.stateId || view.viewId;\n    return ionic.Utils.nextUid();\n  }\n\n  function viewState(locals) {\n    return locals && locals.$$state && locals.$$state.self || {};\n  }\n\n  function getTransitionData(viewLocals, enteringEle, direction, view) {\n    // Priority\n    // 1) attribute directive on the button/link to this view\n    // 2) entering element's attribute\n    // 3) entering view's $state config property\n    // 4) view registration data\n    // 5) global config\n    // 6) fallback value\n\n    var state = viewState(viewLocals);\n    var viewTransition = nextTransition || cachedAttr(enteringEle, 'view-transition') || state.viewTransition || $ionicConfig.views.transition() || 'ios';\n    var navBarTransition = $ionicConfig.navBar.transition();\n    direction = nextDirection || cachedAttr(enteringEle, 'view-direction') || state.viewDirection || direction || 'none';\n\n    return extend(getViewData(view), {\n      transition: viewTransition,\n      navBarTransition: navBarTransition === 'view' ? viewTransition : navBarTransition,\n      direction: direction,\n      shouldAnimate: (viewTransition !== 'none' && direction !== 'none')\n    });\n  }\n\n  function getViewData(view) {\n    view = view || {};\n    return {\n      viewId: view.viewId,\n      historyId: view.historyId,\n      stateId: view.stateId,\n      stateName: view.stateName,\n      stateParams: view.stateParams\n    };\n  }\n\n  function navViewAttr(ele, value) {\n    if (arguments.length > 1) {\n      cachedAttr(ele, NAV_VIEW_ATTR, value);\n    } else {\n      return cachedAttr(ele, NAV_VIEW_ATTR);\n    }\n  }\n\n  function destroyViewEle(ele) {\n    // we found an element that should be removed\n    // destroy its scope, then remove the element\n    if (ele && ele.length) {\n      var viewScope = ele.scope();\n      if (viewScope) {\n        viewScope.$emit('$ionicView.unloaded', ele.data(DATA_VIEW));\n        viewScope.$destroy();\n      }\n      ele.remove();\n    }\n  }\n\n  function compareStatePrefixes(enteringStateName, exitingStateName) {\n    var enteringStateSuffixIndex = enteringStateName.lastIndexOf('.');\n    var exitingStateSuffixIndex = exitingStateName.lastIndexOf('.');\n\n    // if either of the prefixes are empty, just return false\n    if ( enteringStateSuffixIndex < 0 || exitingStateSuffixIndex < 0 ) {\n      return false;\n    }\n\n    var enteringPrefix = enteringStateName.substring(0, enteringStateSuffixIndex);\n    var exitingPrefix = exitingStateName.substring(0, exitingStateSuffixIndex);\n\n    return enteringPrefix === exitingPrefix;\n  }\n\n  function getScopeForElement(element, stateData) {\n    if ( !element ) {\n      return null;\n    }\n    // check if it's abstract\n    var attributeValue = angular.element(element).attr(\"abstract\");\n    var stateValue = angular.element(element).attr(\"state\");\n\n    if ( attributeValue !== \"true\" ) {\n      // it's not an abstract view, so make sure the element\n      // matches the state.  Due to abstract view weirdness,\n      // sometimes it doesn't. If it doesn't, don't dispatch events\n      // so leave the scope undefined\n      if ( stateValue === stateData.stateName ) {\n        return angular.element(element).scope();\n      }\n      return null;\n    }\n    else {\n      // it is an abstract element, so look for element with the \"state\" attributeValue\n      // set to the name of the stateData state\n      var elements = aggregateNavViewChildren(element);\n      for ( var i = 0; i < elements.length; i++ ) {\n          var state = angular.element(elements[i]).attr(\"state\");\n          if ( state === stateData.stateName ) {\n            stateData.abstractView = true;\n            return angular.element(elements[i]).scope();\n          }\n      }\n      // we didn't find a match, so return null\n      return null;\n    }\n  }\n\n  function aggregateNavViewChildren(element) {\n    var aggregate = [];\n    var navViews = angular.element(element).find(\"ion-nav-view\");\n    for ( var i = 0; i < navViews.length; i++ ) {\n      var children = angular.element(navViews[i]).children();\n      var childrenAggregated = [];\n      for ( var j = 0; j < children.length; j++ ) {\n        childrenAggregated = childrenAggregated.concat(children[j]);\n      }\n      aggregate = aggregate.concat(childrenAggregated);\n    }\n    return aggregate;\n  }\n\n}]);\n\n/**\n * ==================  angular-ios9-uiwebview.patch.js v1.1.1 ==================\n *\n * This patch works around iOS9 UIWebView regression that causes infinite digest\n * errors in Angular.\n *\n * The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular\n * have the workaround baked in.\n *\n * To apply this patch load/bundle this file with your application and add a\n * dependency on the \"ngIOS9UIWebViewPatch\" module to your main app module.\n *\n * For example:\n *\n * ```\n * angular.module('myApp', ['ngRoute'])`\n * ```\n *\n * becomes\n *\n * ```\n * angular.module('myApp', ['ngRoute', 'ngIOS9UIWebViewPatch'])\n * ```\n *\n *\n * More info:\n * - https://openradar.appspot.com/22186109\n * - https://github.com/angular/angular.js/issues/12241\n * - https://github.com/ionic-team/ionic/issues/4082\n *\n *\n * @license AngularJS\n * (c) 2010-2015 Google, Inc. http://angularjs.org\n * License: MIT\n */\n\nangular.module('ngIOS9UIWebViewPatch', ['ng']).config(['$provide', function($provide) {\n  'use strict';\n\n  $provide.decorator('$browser', ['$delegate', '$window', function($delegate, $window) {\n\n    if (isIOS9UIWebView($window.navigator.userAgent)) {\n      return applyIOS9Shim($delegate);\n    }\n\n    return $delegate;\n\n    function isIOS9UIWebView(userAgent) {\n      return /(iPhone|iPad|iPod).* OS 9_\\d/.test(userAgent) && !/Version\\/9\\./.test(userAgent);\n    }\n\n    function applyIOS9Shim(browser) {\n      var pendingLocationUrl = null;\n      var originalUrlFn = browser.url;\n\n      browser.url = function() {\n        if (arguments.length) {\n          pendingLocationUrl = arguments[0];\n          return originalUrlFn.apply(browser, arguments);\n        }\n\n        return pendingLocationUrl || originalUrlFn.apply(browser, arguments);\n      };\n\n      window.addEventListener('popstate', clearPendingLocationUrl, false);\n      window.addEventListener('hashchange', clearPendingLocationUrl, false);\n\n      function clearPendingLocationUrl() {\n        pendingLocationUrl = null;\n      }\n\n      return browser;\n    }\n  }]);\n}]);\n\n/**\n * @private\n * Parts of Ionic requires that $scope data is attached to the element.\n * We do not want to disable adding $scope data to the $element when\n * $compileProvider.debugInfoEnabled(false) is used.\n */\nIonicModule.config(['$provide', function($provide) {\n  $provide.decorator('$compile', ['$delegate', function($compile) {\n     $compile.$$addScopeInfo = function $$addScopeInfo($element, scope, isolated, noTemplate) {\n       var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';\n       $element.data(dataName, scope);\n     };\n     return $compile;\n  }]);\n}]);\n\n/**\n * @private\n */\nIonicModule.config([\n  '$provide',\nfunction($provide) {\n  function $LocationDecorator($location, $timeout) {\n\n    $location.__hash = $location.hash;\n    //Fix: when window.location.hash is set, the scrollable area\n    //found nearest to body's scrollTop is set to scroll to an element\n    //with that ID.\n    $location.hash = function(value) {\n      if (isDefined(value) && value.length > 0) {\n        $timeout(function() {\n          var scroll = document.querySelector('.scroll-content');\n          if (scroll) {\n            scroll.scrollTop = 0;\n          }\n        }, 0, false);\n      }\n      return $location.__hash(value);\n    };\n\n    return $location;\n  }\n\n  $provide.decorator('$location', ['$delegate', '$timeout', $LocationDecorator]);\n}]);\n\nIonicModule\n\n.controller('$ionicHeaderBar', [\n  '$scope',\n  '$element',\n  '$attrs',\n  '$q',\n  '$ionicConfig',\n  '$ionicHistory',\nfunction($scope, $element, $attrs, $q, $ionicConfig, $ionicHistory) {\n  var TITLE = 'title';\n  var BACK_TEXT = 'back-text';\n  var BACK_BUTTON = 'back-button';\n  var DEFAULT_TITLE = 'default-title';\n  var PREVIOUS_TITLE = 'previous-title';\n  var HIDE = 'hide';\n\n  var self = this;\n  var titleText = '';\n  var previousTitleText = '';\n  var titleLeft = 0;\n  var titleRight = 0;\n  var titleCss = '';\n  var isBackEnabled = false;\n  var isBackShown = true;\n  var isNavBackShown = true;\n  var isBackElementShown = false;\n  var titleTextWidth = 0;\n\n\n  self.beforeEnter = function(viewData) {\n    $scope.$broadcast('$ionicView.beforeEnter', viewData);\n  };\n\n\n  self.title = function(newTitleText) {\n    if (arguments.length && newTitleText !== titleText) {\n      getEle(TITLE).innerHTML = newTitleText;\n      titleText = newTitleText;\n      titleTextWidth = 0;\n    }\n    return titleText;\n  };\n\n\n  self.enableBack = function(shouldEnable, disableReset) {\n    // whether or not the back button show be visible, according\n    // to the navigation and history\n    if (arguments.length) {\n      isBackEnabled = shouldEnable;\n      if (!disableReset) self.updateBackButton();\n    }\n    return isBackEnabled;\n  };\n\n\n  self.showBack = function(shouldShow, disableReset) {\n    // different from enableBack() because this will always have the back\n    // visually hidden if false, even if the history says it should show\n    if (arguments.length) {\n      isBackShown = shouldShow;\n      if (!disableReset) self.updateBackButton();\n    }\n    return isBackShown;\n  };\n\n\n  self.showNavBack = function(shouldShow) {\n    // different from showBack() because this is for the entire nav bar's\n    // setting for all of it's child headers. For internal use.\n    isNavBackShown = shouldShow;\n    self.updateBackButton();\n  };\n\n\n  self.updateBackButton = function() {\n    var ele;\n    if ((isBackShown && isNavBackShown && isBackEnabled) !== isBackElementShown) {\n      isBackElementShown = isBackShown && isNavBackShown && isBackEnabled;\n      ele = getEle(BACK_BUTTON);\n      ele && ele.classList[ isBackElementShown ? 'remove' : 'add' ](HIDE);\n    }\n\n    if (isBackEnabled) {\n      ele = ele || getEle(BACK_BUTTON);\n      if (ele) {\n        if (self.backButtonIcon !== $ionicConfig.backButton.icon()) {\n          ele = getEle(BACK_BUTTON + ' .icon');\n          if (ele) {\n            self.backButtonIcon = $ionicConfig.backButton.icon();\n            ele.className = 'icon ' + self.backButtonIcon;\n          }\n        }\n\n        if (self.backButtonText !== $ionicConfig.backButton.text()) {\n          ele = getEle(BACK_BUTTON + ' .back-text');\n          if (ele) {\n            ele.textContent = self.backButtonText = $ionicConfig.backButton.text();\n          }\n        }\n      }\n    }\n  };\n\n\n  self.titleTextWidth = function() {\n    var element = getEle(TITLE);\n    if ( element ) {\n      // If the element has a nav-bar-title, use that instead\n      // to calculate the width of the title\n      var children = angular.element(element).children();\n      for ( var i = 0; i < children.length; i++ ) {\n        if ( angular.element(children[i]).hasClass('nav-bar-title') ) {\n          element = children[i];\n          break;\n        }\n      }\n    }\n    var bounds = ionic.DomUtil.getTextBounds(element);\n    titleTextWidth = Math.min(bounds && bounds.width || 30);\n    return titleTextWidth;\n  };\n\n\n  self.titleWidth = function() {\n    var titleWidth = self.titleTextWidth();\n    var offsetWidth = getEle(TITLE).offsetWidth;\n    if (offsetWidth < titleWidth) {\n      titleWidth = offsetWidth + (titleLeft - titleRight - 5);\n    }\n    return titleWidth;\n  };\n\n\n  self.titleTextX = function() {\n    return ($element[0].offsetWidth / 2) - (self.titleWidth() / 2);\n  };\n\n\n  self.titleLeftRight = function() {\n    return titleLeft - titleRight;\n  };\n\n\n  self.backButtonTextLeft = function() {\n    var offsetLeft = 0;\n    var ele = getEle(BACK_TEXT);\n    while (ele) {\n      offsetLeft += ele.offsetLeft;\n      ele = ele.parentElement;\n    }\n    return offsetLeft;\n  };\n\n\n  self.resetBackButton = function(viewData) {\n    if ($ionicConfig.backButton.previousTitleText()) {\n      var previousTitleEle = getEle(PREVIOUS_TITLE);\n      if (previousTitleEle) {\n        previousTitleEle.classList.remove(HIDE);\n\n        var view = (viewData && $ionicHistory.getViewById(viewData.viewId));\n        var newPreviousTitleText = $ionicHistory.backTitle(view);\n\n        if (newPreviousTitleText !== previousTitleText) {\n          previousTitleText = previousTitleEle.innerHTML = newPreviousTitleText;\n        }\n      }\n      var defaultTitleEle = getEle(DEFAULT_TITLE);\n      if (defaultTitleEle) {\n        defaultTitleEle.classList.remove(HIDE);\n      }\n    }\n  };\n\n\n  self.align = function(textAlign) {\n    var titleEle = getEle(TITLE);\n\n    textAlign = textAlign || $attrs.alignTitle || $ionicConfig.navBar.alignTitle();\n\n    var widths = self.calcWidths(textAlign, false);\n\n    if (isBackShown && previousTitleText && $ionicConfig.backButton.previousTitleText()) {\n      var previousTitleWidths = self.calcWidths(textAlign, true);\n\n      var availableTitleWidth = $element[0].offsetWidth - previousTitleWidths.titleLeft - previousTitleWidths.titleRight;\n\n      if (self.titleTextWidth() <= availableTitleWidth) {\n        widths = previousTitleWidths;\n      }\n    }\n\n    return self.updatePositions(titleEle, widths.titleLeft, widths.titleRight, widths.buttonsLeft, widths.buttonsRight, widths.css, widths.showPrevTitle);\n  };\n\n\n  self.calcWidths = function(textAlign, isPreviousTitle) {\n    var titleEle = getEle(TITLE);\n    var backBtnEle = getEle(BACK_BUTTON);\n    var x, y, z, b, c, d, childSize, bounds;\n    var childNodes = $element[0].childNodes;\n    var buttonsLeft = 0;\n    var buttonsRight = 0;\n    var isCountRightOfTitle;\n    var updateTitleLeft = 0;\n    var updateTitleRight = 0;\n    var updateCss = '';\n    var backButtonWidth = 0;\n\n    // Compute how wide the left children are\n    // Skip all titles (there may still be two titles, one leaving the dom)\n    // Once we encounter a titleEle, realize we are now counting the right-buttons, not left\n    for (x = 0; x < childNodes.length; x++) {\n      c = childNodes[x];\n\n      childSize = 0;\n      if (c.nodeType == 1) {\n        // element node\n        if (c === titleEle) {\n          isCountRightOfTitle = true;\n          continue;\n        }\n\n        if (c.classList.contains(HIDE)) {\n          continue;\n        }\n\n        if (isBackShown && c === backBtnEle) {\n\n          for (y = 0; y < c.childNodes.length; y++) {\n            b = c.childNodes[y];\n\n            if (b.nodeType == 1) {\n\n              if (b.classList.contains(BACK_TEXT)) {\n                for (z = 0; z < b.children.length; z++) {\n                  d = b.children[z];\n\n                  if (isPreviousTitle) {\n                    if (d.classList.contains(DEFAULT_TITLE)) continue;\n                    backButtonWidth += d.offsetWidth;\n                  } else {\n                    if (d.classList.contains(PREVIOUS_TITLE)) continue;\n                    backButtonWidth += d.offsetWidth;\n                  }\n                }\n\n              } else {\n                backButtonWidth += b.offsetWidth;\n              }\n\n            } else if (b.nodeType == 3 && b.nodeValue.trim()) {\n              bounds = ionic.DomUtil.getTextBounds(b);\n              backButtonWidth += bounds && bounds.width || 0;\n            }\n\n          }\n          childSize = backButtonWidth || c.offsetWidth;\n\n        } else {\n          // not the title, not the back button, not a hidden element\n          childSize = c.offsetWidth;\n        }\n\n      } else if (c.nodeType == 3 && c.nodeValue.trim()) {\n        // text node\n        bounds = ionic.DomUtil.getTextBounds(c);\n        childSize = bounds && bounds.width || 0;\n      }\n\n      if (isCountRightOfTitle) {\n        buttonsRight += childSize;\n      } else {\n        buttonsLeft += childSize;\n      }\n    }\n\n    // Size and align the header titleEle based on the sizes of the left and\n    // right children, and the desired alignment mode\n    if (textAlign == 'left') {\n      updateCss = 'title-left';\n      if (buttonsLeft) {\n        updateTitleLeft = buttonsLeft + 15;\n      }\n      if (buttonsRight) {\n        updateTitleRight = buttonsRight + 15;\n      }\n\n    } else if (textAlign == 'right') {\n      updateCss = 'title-right';\n      if (buttonsLeft) {\n        updateTitleLeft = buttonsLeft + 15;\n      }\n      if (buttonsRight) {\n        updateTitleRight = buttonsRight + 15;\n      }\n\n    } else {\n      // center the default\n      var margin = Math.max(buttonsLeft, buttonsRight) + 10;\n      if (margin > 10) {\n        updateTitleLeft = updateTitleRight = margin;\n      }\n    }\n\n    return {\n      backButtonWidth: backButtonWidth,\n      buttonsLeft: buttonsLeft,\n      buttonsRight: buttonsRight,\n      titleLeft: updateTitleLeft,\n      titleRight: updateTitleRight,\n      showPrevTitle: isPreviousTitle,\n      css: updateCss\n    };\n  };\n\n\n  self.updatePositions = function(titleEle, updateTitleLeft, updateTitleRight, buttonsLeft, buttonsRight, updateCss, showPreviousTitle) {\n    var deferred = $q.defer();\n\n    // only make DOM updates when there are actual changes\n    if (titleEle) {\n      if (updateTitleLeft !== titleLeft) {\n        titleEle.style.left = updateTitleLeft ? updateTitleLeft + 'px' : '';\n        titleLeft = updateTitleLeft;\n      }\n      if (updateTitleRight !== titleRight) {\n        titleEle.style.right = updateTitleRight ? updateTitleRight + 'px' : '';\n        titleRight = updateTitleRight;\n      }\n\n      if (updateCss !== titleCss) {\n        updateCss && titleEle.classList.add(updateCss);\n        titleCss && titleEle.classList.remove(titleCss);\n        titleCss = updateCss;\n      }\n    }\n\n    if ($ionicConfig.backButton.previousTitleText()) {\n      var prevTitle = getEle(PREVIOUS_TITLE);\n      var defaultTitle = getEle(DEFAULT_TITLE);\n\n      prevTitle && prevTitle.classList[ showPreviousTitle ? 'remove' : 'add'](HIDE);\n      defaultTitle && defaultTitle.classList[ showPreviousTitle ? 'add' : 'remove'](HIDE);\n    }\n\n    ionic.requestAnimationFrame(function() {\n      if (titleEle && titleEle.offsetWidth + 10 < titleEle.scrollWidth) {\n        var minRight = buttonsRight + 5;\n        var testRight = $element[0].offsetWidth - titleLeft - self.titleTextWidth() - 20;\n        updateTitleRight = testRight < minRight ? minRight : testRight;\n        if (updateTitleRight !== titleRight) {\n          titleEle.style.right = updateTitleRight + 'px';\n          titleRight = updateTitleRight;\n        }\n      }\n      deferred.resolve();\n    });\n\n    return deferred.promise;\n  };\n\n\n  self.setCss = function(elementClassname, css) {\n    ionic.DomUtil.cachedStyles(getEle(elementClassname), css);\n  };\n\n\n  var eleCache = {};\n  function getEle(className) {\n    if (!eleCache[className]) {\n      eleCache[className] = $element[0].querySelector('.' + className);\n    }\n    return eleCache[className];\n  }\n\n\n  $scope.$on('$destroy', function() {\n    for (var n in eleCache) eleCache[n] = null;\n  });\n\n}]);\n\nIonicModule\n.controller('$ionInfiniteScroll', [\n  '$scope',\n  '$attrs',\n  '$element',\n  '$timeout',\nfunction($scope, $attrs, $element, $timeout) {\n  var self = this;\n  self.isLoading = false;\n\n  $scope.icon = function() {\n    return isDefined($attrs.icon) ? $attrs.icon : 'ion-load-d';\n  };\n\n  $scope.spinner = function() {\n    return isDefined($attrs.spinner) ? $attrs.spinner : '';\n  };\n\n  $scope.$on('scroll.infiniteScrollComplete', function() {\n    finishInfiniteScroll();\n  });\n\n  $scope.$on('$destroy', function() {\n    if (self.scrollCtrl && self.scrollCtrl.$element) self.scrollCtrl.$element.off('scroll', self.checkBounds);\n    if (self.scrollEl && self.scrollEl.removeEventListener) {\n      self.scrollEl.removeEventListener('scroll', self.checkBounds);\n    }\n  });\n\n  // debounce checking infinite scroll events\n  self.checkBounds = ionic.Utils.throttle(checkInfiniteBounds, 300);\n\n  function onInfinite() {\n    ionic.requestAnimationFrame(function() {\n      $element[0].classList.add('active');\n    });\n    self.isLoading = true;\n    $scope.$parent && $scope.$parent.$apply($attrs.onInfinite || '');\n  }\n\n  function finishInfiniteScroll() {\n    ionic.requestAnimationFrame(function() {\n      $element[0].classList.remove('active');\n    });\n    $timeout(function() {\n      if (self.jsScrolling) self.scrollView.resize();\n      // only check bounds again immediately if the page isn't cached (scroll el has height)\n      if ((self.jsScrolling && self.scrollView.__container && self.scrollView.__container.offsetHeight > 0) ||\n      !self.jsScrolling) {\n        self.checkBounds();\n      }\n    }, 30, false);\n    self.isLoading = false;\n  }\n\n  // check if we've scrolled far enough to trigger an infinite scroll\n  function checkInfiniteBounds() {\n    if (self.isLoading) return;\n    var maxScroll = {};\n\n    if (self.jsScrolling) {\n      maxScroll = self.getJSMaxScroll();\n      var scrollValues = self.scrollView.getValues();\n      if ((maxScroll.left !== -1 && scrollValues.left >= maxScroll.left) ||\n        (maxScroll.top !== -1 && scrollValues.top >= maxScroll.top)) {\n        onInfinite();\n      }\n    } else {\n      maxScroll = self.getNativeMaxScroll();\n      if ((\n        maxScroll.left !== -1 &&\n        self.scrollEl.scrollLeft >= maxScroll.left - self.scrollEl.clientWidth\n        ) || (\n        maxScroll.top !== -1 &&\n        self.scrollEl.scrollTop >= maxScroll.top - self.scrollEl.clientHeight\n        )) {\n        onInfinite();\n      }\n    }\n  }\n\n  // determine the threshold at which we should fire an infinite scroll\n  // note: this gets processed every scroll event, can it be cached?\n  self.getJSMaxScroll = function() {\n    var maxValues = self.scrollView.getScrollMax();\n    return {\n      left: self.scrollView.options.scrollingX ?\n        calculateMaxValue(maxValues.left) :\n        -1,\n      top: self.scrollView.options.scrollingY ?\n        calculateMaxValue(maxValues.top) :\n        -1\n    };\n  };\n\n  self.getNativeMaxScroll = function() {\n    var maxValues = {\n      left: self.scrollEl.scrollWidth,\n      top: self.scrollEl.scrollHeight\n    };\n    var computedStyle = window.getComputedStyle(self.scrollEl) || {};\n    return {\n      left: maxValues.left &&\n        (computedStyle.overflowX === 'scroll' ||\n        computedStyle.overflowX === 'auto' ||\n        self.scrollEl.style['overflow-x'] === 'scroll') ?\n        calculateMaxValue(maxValues.left) : -1,\n      top: maxValues.top &&\n        (computedStyle.overflowY === 'scroll' ||\n        computedStyle.overflowY === 'auto' ||\n        self.scrollEl.style['overflow-y'] === 'scroll' ) ?\n        calculateMaxValue(maxValues.top) : -1\n    };\n  };\n\n  // determine pixel refresh distance based on % or value\n  function calculateMaxValue(maximum) {\n    var distance = ($attrs.distance || '2.5%').trim();\n    var isPercent = distance.indexOf('%') !== -1;\n    return isPercent ?\n    maximum * (1 - parseFloat(distance) / 100) :\n    maximum - parseFloat(distance);\n  }\n\n  //for testing\n  self.__finishInfiniteScroll = finishInfiniteScroll;\n\n}]);\n\n/**\n * @ngdoc service\n * @name $ionicListDelegate\n * @module ionic\n *\n * @description\n * Delegate for controlling the {@link ionic.directive:ionList} directive.\n *\n * Methods called directly on the $ionicListDelegate service will control all lists.\n * Use the {@link ionic.service:$ionicListDelegate#$getByHandle $getByHandle}\n * method to control specific ionList instances.\n *\n * @usage\n * ```html\n * {% raw %}\n * <ion-content ng-controller=\"MyCtrl\">\n *   <button class=\"button\" ng-click=\"showDeleteButtons()\"></button>\n *   <ion-list>\n *     <ion-item ng-repeat=\"i in items\">\n *       Hello, {{i}}!\n *       <ion-delete-button class=\"ion-minus-circled\"></ion-delete-button>\n *     </ion-item>\n *   </ion-list>\n * </ion-content>\n * {% endraw %}\n * ```\n\n * ```js\n * function MyCtrl($scope, $ionicListDelegate) {\n *   $scope.showDeleteButtons = function() {\n *     $ionicListDelegate.showDelete(true);\n *   };\n * }\n * ```\n */\nIonicModule.service('$ionicListDelegate', ionic.DelegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicListDelegate#showReorder\n   * @param {boolean=} showReorder Set whether or not this list is showing its reorder buttons.\n   * @returns {boolean} Whether the reorder buttons are shown.\n   */\n  'showReorder',\n  /**\n   * @ngdoc method\n   * @name $ionicListDelegate#showDelete\n   * @param {boolean=} showDelete Set whether or not this list is showing its delete buttons.\n   * @returns {boolean} Whether the delete buttons are shown.\n   */\n  'showDelete',\n  /**\n   * @ngdoc method\n   * @name $ionicListDelegate#canSwipeItems\n   * @param {boolean=} canSwipeItems Set whether or not this list is able to swipe to show\n   * option buttons.\n   * @returns {boolean} Whether the list is able to swipe to show option buttons.\n   */\n  'canSwipeItems',\n  /**\n   * @ngdoc method\n   * @name $ionicListDelegate#closeOptionButtons\n   * @description Closes any option buttons on the list that are swiped open.\n   */\n  'closeOptionButtons'\n  /**\n   * @ngdoc method\n   * @name $ionicListDelegate#$getByHandle\n   * @param {string} handle\n   * @returns `delegateInstance` A delegate instance that controls only the\n   * {@link ionic.directive:ionList} directives with `delegate-handle` matching\n   * the given handle.\n   *\n   * Example: `$ionicListDelegate.$getByHandle('my-handle').showReorder(true);`\n   */\n]))\n\n.controller('$ionicList', [\n  '$scope',\n  '$attrs',\n  '$ionicListDelegate',\n  '$ionicHistory',\nfunction($scope, $attrs, $ionicListDelegate, $ionicHistory) {\n  var self = this;\n  var isSwipeable = true;\n  var isReorderShown = false;\n  var isDeleteShown = false;\n\n  var deregisterInstance = $ionicListDelegate._registerInstance(\n    self, $attrs.delegateHandle, function() {\n      return $ionicHistory.isActiveScope($scope);\n    }\n  );\n  $scope.$on('$destroy', deregisterInstance);\n\n  self.showReorder = function(show) {\n    if (arguments.length) {\n      isReorderShown = !!show;\n    }\n    return isReorderShown;\n  };\n\n  self.showDelete = function(show) {\n    if (arguments.length) {\n      isDeleteShown = !!show;\n    }\n    return isDeleteShown;\n  };\n\n  self.canSwipeItems = function(can) {\n    if (arguments.length) {\n      isSwipeable = !!can;\n    }\n    return isSwipeable;\n  };\n\n  self.closeOptionButtons = function() {\n    self.listView && self.listView.clearDragEffects();\n  };\n}]);\n\nIonicModule\n\n.controller('$ionicNavBar', [\n  '$scope',\n  '$element',\n  '$attrs',\n  '$compile',\n  '$timeout',\n  '$ionicNavBarDelegate',\n  '$ionicConfig',\n  '$ionicHistory',\nfunction($scope, $element, $attrs, $compile, $timeout, $ionicNavBarDelegate, $ionicConfig, $ionicHistory) {\n\n  var CSS_HIDE = 'hide';\n  var DATA_NAV_BAR_CTRL = '$ionNavBarController';\n  var PRIMARY_BUTTONS = 'primaryButtons';\n  var SECONDARY_BUTTONS = 'secondaryButtons';\n  var BACK_BUTTON = 'backButton';\n  var ITEM_TYPES = 'primaryButtons secondaryButtons leftButtons rightButtons title'.split(' ');\n\n  var self = this;\n  var headerBars = [];\n  var navElementHtml = {};\n  var isVisible = true;\n  var queuedTransitionStart, queuedTransitionEnd, latestTransitionId;\n\n  $element.parent().data(DATA_NAV_BAR_CTRL, self);\n\n  var delegateHandle = $attrs.delegateHandle || 'navBar' + ionic.Utils.nextUid();\n\n  var deregisterInstance = $ionicNavBarDelegate._registerInstance(self, delegateHandle);\n\n\n  self.init = function() {\n    $element.addClass('nav-bar-container');\n    ionic.DomUtil.cachedAttr($element, 'nav-bar-transition', $ionicConfig.views.transition());\n\n    // create two nav bar blocks which will trade out which one is shown\n    self.createHeaderBar(false);\n    self.createHeaderBar(true);\n\n    $scope.$emit('ionNavBar.init', delegateHandle);\n  };\n\n\n  self.createHeaderBar = function(isActive) {\n    var containerEle = jqLite('<div class=\"nav-bar-block\">');\n    ionic.DomUtil.cachedAttr(containerEle, 'nav-bar', isActive ? 'active' : 'cached');\n\n    var alignTitle = $attrs.alignTitle || $ionicConfig.navBar.alignTitle();\n    var headerBarEle = jqLite('<ion-header-bar>').addClass($attrs['class']).attr('align-title', alignTitle);\n    if (isDefined($attrs.noTapScroll)) headerBarEle.attr('no-tap-scroll', $attrs.noTapScroll);\n    var titleEle = jqLite('<div class=\"title title-' + alignTitle + '\">');\n    var navEle = {};\n    var lastViewItemEle = {};\n    var leftButtonsEle, rightButtonsEle;\n\n    navEle[BACK_BUTTON] = createNavElement(BACK_BUTTON);\n    navEle[BACK_BUTTON] && headerBarEle.append(navEle[BACK_BUTTON]);\n\n    // append title in the header, this is the rock to where buttons append\n    headerBarEle.append(titleEle);\n\n    forEach(ITEM_TYPES, function(itemType) {\n      // create default button elements\n      navEle[itemType] = createNavElement(itemType);\n      // append and position buttons\n      positionItem(navEle[itemType], itemType);\n    });\n\n    // add header-item to the root children\n    for (var x = 0; x < headerBarEle[0].children.length; x++) {\n      headerBarEle[0].children[x].classList.add('header-item');\n    }\n\n    // compile header and append to the DOM\n    containerEle.append(headerBarEle);\n    $element.append($compile(containerEle)($scope.$new()));\n\n    var headerBarCtrl = headerBarEle.data('$ionHeaderBarController');\n    headerBarCtrl.backButtonIcon = $ionicConfig.backButton.icon();\n    headerBarCtrl.backButtonText = $ionicConfig.backButton.text();\n\n    var headerBarInstance = {\n      isActive: isActive,\n      title: function(newTitleText) {\n        headerBarCtrl.title(newTitleText);\n      },\n      setItem: function(navBarItemEle, itemType) {\n        // first make sure any exiting nav bar item has been removed\n        headerBarInstance.removeItem(itemType);\n\n        if (navBarItemEle) {\n          if (itemType === 'title') {\n            // clear out the text based title\n            headerBarInstance.title(\"\");\n          }\n\n          // there's a custom nav bar item\n          positionItem(navBarItemEle, itemType);\n\n          if (navEle[itemType]) {\n            // make sure the default on this itemType is hidden\n            navEle[itemType].addClass(CSS_HIDE);\n          }\n          lastViewItemEle[itemType] = navBarItemEle;\n\n        } else if (navEle[itemType]) {\n          // there's a default button for this side and no view button\n          navEle[itemType].removeClass(CSS_HIDE);\n        }\n      },\n      removeItem: function(itemType) {\n        if (lastViewItemEle[itemType]) {\n          lastViewItemEle[itemType].scope().$destroy();\n          lastViewItemEle[itemType].remove();\n          lastViewItemEle[itemType] = null;\n        }\n      },\n      containerEle: function() {\n        return containerEle;\n      },\n      headerBarEle: function() {\n        return headerBarEle;\n      },\n      afterLeave: function() {\n        forEach(ITEM_TYPES, function(itemType) {\n          headerBarInstance.removeItem(itemType);\n        });\n        headerBarCtrl.resetBackButton();\n      },\n      controller: function() {\n        return headerBarCtrl;\n      },\n      destroy: function() {\n        forEach(ITEM_TYPES, function(itemType) {\n          headerBarInstance.removeItem(itemType);\n        });\n        containerEle.scope().$destroy();\n        for (var n in navEle) {\n          if (navEle[n]) {\n            navEle[n].removeData();\n            navEle[n] = null;\n          }\n        }\n        leftButtonsEle && leftButtonsEle.removeData();\n        rightButtonsEle && rightButtonsEle.removeData();\n        titleEle.removeData();\n        headerBarEle.removeData();\n        containerEle.remove();\n        containerEle = headerBarEle = titleEle = leftButtonsEle = rightButtonsEle = null;\n      }\n    };\n\n    function positionItem(ele, itemType) {\n      if (!ele) return;\n\n      if (itemType === 'title') {\n        // title element\n        titleEle.append(ele);\n\n      } else if (itemType == 'rightButtons' ||\n                (itemType == SECONDARY_BUTTONS && $ionicConfig.navBar.positionSecondaryButtons() != 'left') ||\n                (itemType == PRIMARY_BUTTONS && $ionicConfig.navBar.positionPrimaryButtons() == 'right')) {\n        // right side\n        if (!rightButtonsEle) {\n          rightButtonsEle = jqLite('<div class=\"buttons buttons-right\">');\n          headerBarEle.append(rightButtonsEle);\n        }\n        if (itemType == SECONDARY_BUTTONS) {\n          rightButtonsEle.append(ele);\n        } else {\n          rightButtonsEle.prepend(ele);\n        }\n\n      } else {\n        // left side\n        if (!leftButtonsEle) {\n          leftButtonsEle = jqLite('<div class=\"buttons buttons-left\">');\n          if (navEle[BACK_BUTTON]) {\n            navEle[BACK_BUTTON].after(leftButtonsEle);\n          } else {\n            headerBarEle.prepend(leftButtonsEle);\n          }\n        }\n        if (itemType == SECONDARY_BUTTONS) {\n          leftButtonsEle.append(ele);\n        } else {\n          leftButtonsEle.prepend(ele);\n        }\n      }\n\n    }\n\n    headerBars.push(headerBarInstance);\n\n    return headerBarInstance;\n  };\n\n\n  self.navElement = function(type, html) {\n    if (isDefined(html)) {\n      navElementHtml[type] = html;\n    }\n    return navElementHtml[type];\n  };\n\n\n  self.update = function(viewData) {\n    var showNavBar = !viewData.hasHeaderBar && viewData.showNavBar;\n    viewData.transition = $ionicConfig.views.transition();\n\n    if (!showNavBar) {\n      viewData.direction = 'none';\n    }\n\n    self.enable(showNavBar);\n    var enteringHeaderBar = self.isInitialized ? getOffScreenHeaderBar() : getOnScreenHeaderBar();\n    var leavingHeaderBar = self.isInitialized ? getOnScreenHeaderBar() : null;\n    var enteringHeaderCtrl = enteringHeaderBar.controller();\n\n    // update if the entering header should show the back button or not\n    enteringHeaderCtrl.enableBack(viewData.enableBack, true);\n    enteringHeaderCtrl.showBack(viewData.showBack, true);\n    enteringHeaderCtrl.updateBackButton();\n\n    // update the entering header bar's title\n    self.title(viewData.title, enteringHeaderBar);\n\n    self.showBar(showNavBar);\n\n    // update the nav bar items, depending if the view has their own or not\n    if (viewData.navBarItems) {\n      forEach(ITEM_TYPES, function(itemType) {\n        enteringHeaderBar.setItem(viewData.navBarItems[itemType], itemType);\n      });\n    }\n\n    // begin transition of entering and leaving header bars\n    self.transition(enteringHeaderBar, leavingHeaderBar, viewData);\n\n    self.isInitialized = true;\n    navSwipeAttr('');\n  };\n\n\n  self.transition = function(enteringHeaderBar, leavingHeaderBar, viewData) {\n    var enteringHeaderBarCtrl = enteringHeaderBar.controller();\n    var transitionFn = $ionicConfig.transitions.navBar[viewData.navBarTransition] || $ionicConfig.transitions.navBar.none;\n    var transitionId = viewData.transitionId;\n\n    enteringHeaderBarCtrl.beforeEnter(viewData);\n\n    var navBarTransition = transitionFn(enteringHeaderBar, leavingHeaderBar, viewData.direction, viewData.shouldAnimate && self.isInitialized);\n\n    ionic.DomUtil.cachedAttr($element, 'nav-bar-transition', viewData.navBarTransition);\n    ionic.DomUtil.cachedAttr($element, 'nav-bar-direction', viewData.direction);\n\n    if (navBarTransition.shouldAnimate && viewData.renderEnd) {\n      navBarAttr(enteringHeaderBar, 'stage');\n    } else {\n      navBarAttr(enteringHeaderBar, 'entering');\n      navBarAttr(leavingHeaderBar, 'leaving');\n    }\n\n    enteringHeaderBarCtrl.resetBackButton(viewData);\n\n    navBarTransition.run(0);\n\n    self.activeTransition = {\n      run: function(step) {\n        navBarTransition.shouldAnimate = false;\n        navBarTransition.direction = 'back';\n        navBarTransition.run(step);\n      },\n      cancel: function(shouldAnimate, speed, cancelData) {\n        navSwipeAttr(speed);\n        navBarAttr(leavingHeaderBar, 'active');\n        navBarAttr(enteringHeaderBar, 'cached');\n        navBarTransition.shouldAnimate = shouldAnimate;\n        navBarTransition.run(0);\n        self.activeTransition = navBarTransition = null;\n\n        var runApply;\n        if (cancelData.showBar !== self.showBar()) {\n          self.showBar(cancelData.showBar);\n        }\n        if (cancelData.showBackButton !== self.showBackButton()) {\n          self.showBackButton(cancelData.showBackButton);\n        }\n        if (runApply) {\n          $scope.$apply();\n        }\n      },\n      complete: function(shouldAnimate, speed) {\n        navSwipeAttr(speed);\n        navBarTransition.shouldAnimate = shouldAnimate;\n        navBarTransition.run(1);\n        queuedTransitionEnd = transitionEnd;\n      }\n    };\n\n    $timeout(enteringHeaderBarCtrl.align, 16);\n\n    queuedTransitionStart = function() {\n      if (latestTransitionId !== transitionId) return;\n\n      navBarAttr(enteringHeaderBar, 'entering');\n      navBarAttr(leavingHeaderBar, 'leaving');\n\n      navBarTransition.run(1);\n\n      queuedTransitionEnd = function() {\n        if (latestTransitionId == transitionId || !navBarTransition.shouldAnimate) {\n          transitionEnd();\n        }\n      };\n\n      queuedTransitionStart = null;\n    };\n\n    function transitionEnd() {\n      for (var x = 0; x < headerBars.length; x++) {\n        headerBars[x].isActive = false;\n      }\n      enteringHeaderBar.isActive = true;\n\n      navBarAttr(enteringHeaderBar, 'active');\n      navBarAttr(leavingHeaderBar, 'cached');\n\n      self.activeTransition = navBarTransition = queuedTransitionEnd = null;\n    }\n\n    queuedTransitionStart();\n  };\n\n\n  self.triggerTransitionStart = function(triggerTransitionId) {\n    latestTransitionId = triggerTransitionId;\n    queuedTransitionStart && queuedTransitionStart();\n  };\n\n\n  self.triggerTransitionEnd = function() {\n    queuedTransitionEnd && queuedTransitionEnd();\n  };\n\n\n  self.showBar = function(shouldShow) {\n    if (arguments.length) {\n      self.visibleBar(shouldShow);\n      $scope.$parent.$hasHeader = !!shouldShow;\n    }\n    return !!$scope.$parent.$hasHeader;\n  };\n\n\n  self.visibleBar = function(shouldShow) {\n    if (shouldShow && !isVisible) {\n      $element.removeClass(CSS_HIDE);\n      self.align();\n    } else if (!shouldShow && isVisible) {\n      $element.addClass(CSS_HIDE);\n    }\n    isVisible = shouldShow;\n  };\n\n\n  self.enable = function(val) {\n    // set primary to show first\n    self.visibleBar(val);\n\n    // set non primary to hide second\n    for (var x = 0; x < $ionicNavBarDelegate._instances.length; x++) {\n      if ($ionicNavBarDelegate._instances[x] !== self) $ionicNavBarDelegate._instances[x].visibleBar(false);\n    }\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name $ionicNavBar#showBackButton\n   * @description Show/hide the nav bar back button when there is a\n   * back view. If the back button is not possible, for example, the\n   * first view in the stack, then this will not force the back button\n   * to show.\n   */\n  self.showBackButton = function(shouldShow) {\n    if (arguments.length) {\n      for (var x = 0; x < headerBars.length; x++) {\n        headerBars[x].controller().showNavBack(!!shouldShow);\n      }\n      $scope.$isBackButtonShown = !!shouldShow;\n    }\n    return $scope.$isBackButtonShown;\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name $ionicNavBar#showActiveBackButton\n   * @description Show/hide only the active header bar's back button.\n   */\n  self.showActiveBackButton = function(shouldShow) {\n    var headerBar = getOnScreenHeaderBar();\n    if (headerBar) {\n      if (arguments.length) {\n        return headerBar.controller().showBack(shouldShow);\n      }\n      return headerBar.controller().showBack();\n    }\n  };\n\n\n  self.title = function(newTitleText, headerBar) {\n    if (isDefined(newTitleText)) {\n      newTitleText = newTitleText || '';\n      headerBar = headerBar || getOnScreenHeaderBar();\n      headerBar && headerBar.title(newTitleText);\n      $scope.$title = newTitleText;\n      $ionicHistory.currentTitle(newTitleText);\n    }\n    return $scope.$title;\n  };\n\n\n  self.align = function(val, headerBar) {\n    headerBar = headerBar || getOnScreenHeaderBar();\n    headerBar && headerBar.controller().align(val);\n  };\n\n\n  self.hasTabsTop = function(isTabsTop) {\n    $element[isTabsTop ? 'addClass' : 'removeClass']('nav-bar-tabs-top');\n  };\n\n  self.hasBarSubheader = function(isBarSubheader) {\n    $element[isBarSubheader ? 'addClass' : 'removeClass']('nav-bar-has-subheader');\n  };\n\n  // DEPRECATED, as of v1.0.0-beta14 -------\n  self.changeTitle = function(val) {\n    deprecatedWarning('changeTitle(val)', 'title(val)');\n    self.title(val);\n  };\n  self.setTitle = function(val) {\n    deprecatedWarning('setTitle(val)', 'title(val)');\n    self.title(val);\n  };\n  self.getTitle = function() {\n    deprecatedWarning('getTitle()', 'title()');\n    return self.title();\n  };\n  self.back = function() {\n    deprecatedWarning('back()', '$ionicHistory.goBack()');\n    $ionicHistory.goBack();\n  };\n  self.getPreviousTitle = function() {\n    deprecatedWarning('getPreviousTitle()', '$ionicHistory.backTitle()');\n    $ionicHistory.goBack();\n  };\n  function deprecatedWarning(oldMethod, newMethod) {\n    var warn = console.warn || console.log;\n    warn && warn.call(console, 'navBarController.' + oldMethod + ' is deprecated, please use ' + newMethod + ' instead');\n  }\n  // END DEPRECATED -------\n\n\n  function createNavElement(type) {\n    if (navElementHtml[type]) {\n      return jqLite(navElementHtml[type]);\n    }\n  }\n\n\n  function getOnScreenHeaderBar() {\n    for (var x = 0; x < headerBars.length; x++) {\n      if (headerBars[x].isActive) return headerBars[x];\n    }\n  }\n\n\n  function getOffScreenHeaderBar() {\n    for (var x = 0; x < headerBars.length; x++) {\n      if (!headerBars[x].isActive) return headerBars[x];\n    }\n  }\n\n\n  function navBarAttr(ctrl, val) {\n    ctrl && ionic.DomUtil.cachedAttr(ctrl.containerEle(), 'nav-bar', val);\n  }\n\n  function navSwipeAttr(val) {\n    ionic.DomUtil.cachedAttr($element, 'nav-swipe', val);\n  }\n\n\n  $scope.$on('$destroy', function() {\n    $scope.$parent.$hasHeader = false;\n    $element.parent().removeData(DATA_NAV_BAR_CTRL);\n    for (var x = 0; x < headerBars.length; x++) {\n      headerBars[x].destroy();\n    }\n    $element.remove();\n    $element = headerBars = null;\n    deregisterInstance();\n  });\n\n}]);\n\nIonicModule\n.controller('$ionicNavView', [\n  '$scope',\n  '$element',\n  '$attrs',\n  '$compile',\n  '$controller',\n  '$ionicNavBarDelegate',\n  '$ionicNavViewDelegate',\n  '$ionicHistory',\n  '$ionicViewSwitcher',\n  '$ionicConfig',\n  '$ionicScrollDelegate',\n  '$ionicSideMenuDelegate',\nfunction($scope, $element, $attrs, $compile, $controller, $ionicNavBarDelegate, $ionicNavViewDelegate, $ionicHistory, $ionicViewSwitcher, $ionicConfig, $ionicScrollDelegate, $ionicSideMenuDelegate) {\n\n  var DATA_ELE_IDENTIFIER = '$eleId';\n  var DATA_DESTROY_ELE = '$destroyEle';\n  var DATA_NO_CACHE = '$noCache';\n  var VIEW_STATUS_ACTIVE = 'active';\n  var VIEW_STATUS_CACHED = 'cached';\n\n  var self = this;\n  var direction;\n  var isPrimary = false;\n  var navBarDelegate;\n  var activeEleId;\n  var navViewAttr = $ionicViewSwitcher.navViewAttr;\n  var disableRenderStartViewId, disableAnimation;\n\n  self.scope = $scope;\n  self.element = $element;\n\n  self.init = function() {\n    var navViewName = $attrs.name || '';\n\n    // Find the details of the parent view directive (if any) and use it\n    // to derive our own qualified view name, then hang our own details\n    // off the DOM so child directives can find it.\n    var parent = $element.parent().inheritedData('$uiView');\n    var parentViewName = ((parent && parent.state) ? parent.state.name : '');\n    if (navViewName.indexOf('@') < 0) navViewName = navViewName + '@' + parentViewName;\n\n    var viewData = { name: navViewName, state: null };\n    $element.data('$uiView', viewData);\n\n    var deregisterInstance = $ionicNavViewDelegate._registerInstance(self, $attrs.delegateHandle);\n    $scope.$on('$destroy', function() {\n      deregisterInstance();\n\n      // ensure no scrolls have been left frozen\n      if (self.isSwipeFreeze) {\n        $ionicScrollDelegate.freezeAllScrolls(false);\n      }\n    });\n\n    $scope.$on('$ionicHistory.deselect', self.cacheCleanup);\n    $scope.$on('$ionicTabs.top', onTabsTop);\n    $scope.$on('$ionicSubheader', onBarSubheader);\n\n    $scope.$on('$ionicTabs.beforeLeave', onTabsLeave);\n    $scope.$on('$ionicTabs.afterLeave', onTabsLeave);\n    $scope.$on('$ionicTabs.leave', onTabsLeave);\n\n    ionic.Platform.ready(function() {\n      if ( ionic.Platform.isWebView() && ionic.Platform.isIOS() ) {\n          self.initSwipeBack();\n      }\n    });\n\n    return viewData;\n  };\n\n\n  self.register = function(viewLocals) {\n    var leavingView = extend({}, $ionicHistory.currentView());\n\n    // register that a view is coming in and get info on how it should transition\n    var registerData = $ionicHistory.register($scope, viewLocals);\n\n    // update which direction\n    self.update(registerData);\n\n    // begin rendering and transitioning\n    var enteringView = $ionicHistory.getViewById(registerData.viewId) || {};\n\n    var renderStart = (disableRenderStartViewId !== registerData.viewId);\n    self.render(registerData, viewLocals, enteringView, leavingView, renderStart, true);\n  };\n\n\n  self.update = function(registerData) {\n    // always reset that this is the primary navView\n    isPrimary = true;\n\n    // remember what direction this navView should use\n    // this may get updated later by a child navView\n    direction = registerData.direction;\n\n    var parentNavViewCtrl = $element.parent().inheritedData('$ionNavViewController');\n    if (parentNavViewCtrl) {\n      // this navView is nested inside another one\n      // update the parent to use this direction and not\n      // the other it originally was set to\n\n      // inform the parent navView that it is not the primary navView\n      parentNavViewCtrl.isPrimary(false);\n\n      if (direction === 'enter' || direction === 'exit') {\n        // they're entering/exiting a history\n        // find parent navViewController\n        parentNavViewCtrl.direction(direction);\n\n        if (direction === 'enter') {\n          // reset the direction so this navView doesn't animate\n          // because it's parent will\n          direction = 'none';\n        }\n      }\n    }\n  };\n\n\n  self.render = function(registerData, viewLocals, enteringView, leavingView, renderStart, renderEnd) {\n    // register the view and figure out where it lives in the various\n    // histories and nav stacks, along with how views should enter/leave\n    var switcher = $ionicViewSwitcher.create(self, viewLocals, enteringView, leavingView, renderStart, renderEnd);\n\n    // init the rendering of views for this navView directive\n    switcher.init(registerData, function() {\n      // the view is now compiled, in the dom and linked, now lets transition the views.\n      // this uses a callback incase THIS nav-view has a nested nav-view, and after the NESTED\n      // nav-view links, the NESTED nav-view would update which direction THIS nav-view should use\n\n      // kick off the transition of views\n      switcher.transition(self.direction(), registerData.enableBack, !disableAnimation);\n\n      // reset private vars for next time\n      disableRenderStartViewId = disableAnimation = null;\n    });\n\n  };\n\n\n  self.beforeEnter = function(transitionData) {\n    if (isPrimary) {\n      // only update this nav-view's nav-bar if this is the primary nav-view\n      navBarDelegate = transitionData.navBarDelegate;\n      var associatedNavBarCtrl = getAssociatedNavBarCtrl();\n      associatedNavBarCtrl && associatedNavBarCtrl.update(transitionData);\n      navSwipeAttr('');\n    }\n  };\n\n\n  self.activeEleId = function(eleId) {\n    if (arguments.length) {\n      activeEleId = eleId;\n    }\n    return activeEleId;\n  };\n\n\n  self.transitionEnd = function() {\n    var viewElements = $element.children();\n    var x, l, viewElement;\n\n    for (x = 0, l = viewElements.length; x < l; x++) {\n      viewElement = viewElements.eq(x);\n\n      if (viewElement.data(DATA_ELE_IDENTIFIER) === activeEleId) {\n        // this is the active element\n        navViewAttr(viewElement, VIEW_STATUS_ACTIVE);\n\n      } else if (navViewAttr(viewElement) === 'leaving' || navViewAttr(viewElement) === VIEW_STATUS_ACTIVE || navViewAttr(viewElement) === VIEW_STATUS_CACHED) {\n        // this is a leaving element or was the former active element, or is an cached element\n        if (viewElement.data(DATA_DESTROY_ELE) || viewElement.data(DATA_NO_CACHE)) {\n          // this element shouldn't stay cached\n          $ionicViewSwitcher.destroyViewEle(viewElement);\n\n        } else {\n          // keep in the DOM, mark as cached\n          navViewAttr(viewElement, VIEW_STATUS_CACHED);\n\n          // disconnect the leaving scope\n          ionic.Utils.disconnectScope(viewElement.scope());\n        }\n      }\n    }\n\n    navSwipeAttr('');\n\n    // ensure no scrolls have been left frozen\n    if (self.isSwipeFreeze) {\n      $ionicScrollDelegate.freezeAllScrolls(false);\n    }\n  };\n\n\n  function onTabsLeave(ev, data) {\n    var viewElements = $element.children();\n    var viewElement, viewScope;\n\n    for (var x = 0, l = viewElements.length; x < l; x++) {\n      viewElement = viewElements.eq(x);\n      if (navViewAttr(viewElement) == VIEW_STATUS_ACTIVE) {\n        viewScope = viewElement.scope();\n        viewScope && viewScope.$emit(ev.name.replace('Tabs', 'View'), data);\n        viewScope && viewScope.$broadcast(ev.name.replace('Tabs', 'ParentView'), data);\n        break;\n      }\n    }\n  }\n\n\n  self.cacheCleanup = function() {\n    var viewElements = $element.children();\n    for (var x = 0, l = viewElements.length; x < l; x++) {\n      if (viewElements.eq(x).data(DATA_DESTROY_ELE)) {\n        $ionicViewSwitcher.destroyViewEle(viewElements.eq(x));\n      }\n    }\n  };\n\n\n  self.clearCache = function(stateIds) {\n    var viewElements = $element.children();\n    var viewElement, viewScope, x, l, y, eleIdentifier;\n\n    for (x = 0, l = viewElements.length; x < l; x++) {\n      viewElement = viewElements.eq(x);\n\n      if (stateIds) {\n        eleIdentifier = viewElement.data(DATA_ELE_IDENTIFIER);\n\n        for (y = 0; y < stateIds.length; y++) {\n          if (eleIdentifier === stateIds[y]) {\n            $ionicViewSwitcher.destroyViewEle(viewElement);\n          }\n        }\n        continue;\n      }\n\n      if (navViewAttr(viewElement) == VIEW_STATUS_CACHED) {\n        $ionicViewSwitcher.destroyViewEle(viewElement);\n\n      } else if (navViewAttr(viewElement) == VIEW_STATUS_ACTIVE) {\n        viewScope = viewElement.scope();\n        viewScope && viewScope.$broadcast('$ionicView.clearCache');\n      }\n\n    }\n  };\n\n\n  self.getViewElements = function() {\n    return $element.children();\n  };\n\n\n  self.appendViewElement = function(viewEle, viewLocals) {\n    // compile the entering element and get the link function\n    var linkFn = $compile(viewEle);\n\n    $element.append(viewEle);\n\n    var viewScope = $scope.$new();\n\n    if (viewLocals && viewLocals.$$controller) {\n      viewLocals.$scope = viewScope;\n      var controller = $controller(viewLocals.$$controller, viewLocals);\n      if (viewLocals.$$controllerAs) {\n        viewScope[viewLocals.$$controllerAs] = controller;\n      }\n      $element.children().data('$ngControllerController', controller);\n    }\n\n    linkFn(viewScope);\n\n    return viewScope;\n  };\n\n\n  self.title = function(val) {\n    var associatedNavBarCtrl = getAssociatedNavBarCtrl();\n    associatedNavBarCtrl && associatedNavBarCtrl.title(val);\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name $ionicNavView#enableBackButton\n   * @description Enable/disable if the back button can be shown or not. For\n   * example, the very first view in the navigation stack would not have a\n   * back view, so the back button would be disabled.\n   */\n  self.enableBackButton = function(shouldEnable) {\n    var associatedNavBarCtrl = getAssociatedNavBarCtrl();\n    associatedNavBarCtrl && associatedNavBarCtrl.enableBackButton(shouldEnable);\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name $ionicNavView#showBackButton\n   * @description Show/hide the nav bar active back button. If the back button\n   * is not possible this will not force the back button to show. The\n   * `enableBackButton()` method handles if a back button is even possible or not.\n   */\n  self.showBackButton = function(shouldShow) {\n    var associatedNavBarCtrl = getAssociatedNavBarCtrl();\n    if (associatedNavBarCtrl) {\n      if (arguments.length) {\n        return associatedNavBarCtrl.showActiveBackButton(shouldShow);\n      }\n      return associatedNavBarCtrl.showActiveBackButton();\n    }\n    return true;\n  };\n\n\n  self.showBar = function(val) {\n    var associatedNavBarCtrl = getAssociatedNavBarCtrl();\n    if (associatedNavBarCtrl) {\n      if (arguments.length) {\n        return associatedNavBarCtrl.showBar(val);\n      }\n      return associatedNavBarCtrl.showBar();\n    }\n    return true;\n  };\n\n\n  self.isPrimary = function(val) {\n    if (arguments.length) {\n      isPrimary = val;\n    }\n    return isPrimary;\n  };\n\n\n  self.direction = function(val) {\n    if (arguments.length) {\n      direction = val;\n    }\n    return direction;\n  };\n\n\n  self.initSwipeBack = function() {\n    var swipeBackHitWidth = $ionicConfig.views.swipeBackHitWidth();\n    var viewTransition, associatedNavBarCtrl, backView;\n    var deregDragStart, deregDrag, deregRelease;\n    var windowWidth, startDragX, dragPoints;\n    var cancelData = {};\n\n    function onDragStart(ev) {\n      if (!isPrimary || !$ionicConfig.views.swipeBackEnabled() || $ionicSideMenuDelegate.isOpenRight() ) return;\n\n\n      startDragX = getDragX(ev);\n      if (startDragX > swipeBackHitWidth) return;\n\n      backView = $ionicHistory.backView();\n\n      var currentView = $ionicHistory.currentView();\n\n      if (!backView || backView.historyId !== currentView.historyId || currentView.canSwipeBack === false) return;\n\n      if (!windowWidth) windowWidth = window.innerWidth;\n\n      self.isSwipeFreeze = $ionicScrollDelegate.freezeAllScrolls(true);\n\n      var registerData = {\n        direction: 'back'\n      };\n\n      dragPoints = [];\n\n      cancelData = {\n        showBar: self.showBar(),\n        showBackButton: self.showBackButton()\n      };\n\n      var switcher = $ionicViewSwitcher.create(self, registerData, backView, currentView, true, false);\n      switcher.loadViewElements(registerData);\n      switcher.render(registerData);\n\n      viewTransition = switcher.transition('back', $ionicHistory.enabledBack(backView), true);\n\n      associatedNavBarCtrl = getAssociatedNavBarCtrl();\n\n      deregDrag = ionic.onGesture('drag', onDrag, $element[0]);\n      deregRelease = ionic.onGesture('release', onRelease, $element[0]);\n    }\n\n    function onDrag(ev) {\n      if (isPrimary && viewTransition) {\n        var dragX = getDragX(ev);\n\n        dragPoints.push({\n          t: Date.now(),\n          x: dragX\n        });\n\n        if (dragX >= windowWidth - 15) {\n          onRelease(ev);\n\n        } else {\n          var step = Math.min(Math.max(getSwipeCompletion(dragX), 0), 1);\n          viewTransition.run(step);\n          associatedNavBarCtrl && associatedNavBarCtrl.activeTransition && associatedNavBarCtrl.activeTransition.run(step);\n        }\n\n      }\n    }\n\n    function onRelease(ev) {\n      if (isPrimary && viewTransition && dragPoints && dragPoints.length > 1) {\n\n        var now = Date.now();\n        var releaseX = getDragX(ev);\n        var startDrag = dragPoints[dragPoints.length - 1];\n\n        for (var x = dragPoints.length - 2; x >= 0; x--) {\n          if (now - startDrag.t > 200) {\n            break;\n          }\n          startDrag = dragPoints[x];\n        }\n\n        var isSwipingRight = (releaseX >= dragPoints[dragPoints.length - 2].x);\n        var releaseSwipeCompletion = getSwipeCompletion(releaseX);\n        var velocity = Math.abs(startDrag.x - releaseX) / (now - startDrag.t);\n\n        // private variables because ui-router has no way to pass custom data using $state.go\n        disableRenderStartViewId = backView.viewId;\n        disableAnimation = (releaseSwipeCompletion < 0.03 || releaseSwipeCompletion > 0.97);\n\n        if (isSwipingRight && (releaseSwipeCompletion > 0.5 || velocity > 0.1)) {\n          // complete view transition on release\n          var speed = (velocity > 0.5 || velocity < 0.05 || releaseX > windowWidth - 45) ? 'fast' : 'slow';\n          navSwipeAttr(disableAnimation ? '' : speed);\n          backView.go();\n          associatedNavBarCtrl && associatedNavBarCtrl.activeTransition && associatedNavBarCtrl.activeTransition.complete(!disableAnimation, speed);\n\n        } else {\n          // cancel view transition on release\n          navSwipeAttr(disableAnimation ? '' : 'fast');\n          disableRenderStartViewId = null;\n          viewTransition.cancel(!disableAnimation);\n          associatedNavBarCtrl && associatedNavBarCtrl.activeTransition && associatedNavBarCtrl.activeTransition.cancel(!disableAnimation, 'fast', cancelData);\n          disableAnimation = null;\n        }\n\n      }\n\n      ionic.offGesture(deregDrag, 'drag', onDrag);\n      ionic.offGesture(deregRelease, 'release', onRelease);\n\n      windowWidth = viewTransition = dragPoints = null;\n\n      self.isSwipeFreeze = $ionicScrollDelegate.freezeAllScrolls(false);\n    }\n\n    function getDragX(ev) {\n      return ionic.tap.pointerCoord(ev.gesture.srcEvent).x;\n    }\n\n    function getSwipeCompletion(dragX) {\n      return (dragX - startDragX) / windowWidth;\n    }\n\n    deregDragStart = ionic.onGesture('dragstart', onDragStart, $element[0]);\n\n    $scope.$on('$destroy', function() {\n      ionic.offGesture(deregDragStart, 'dragstart', onDragStart);\n      ionic.offGesture(deregDrag, 'drag', onDrag);\n      ionic.offGesture(deregRelease, 'release', onRelease);\n      self.element = viewTransition = associatedNavBarCtrl = null;\n    });\n  };\n\n\n  function navSwipeAttr(val) {\n    ionic.DomUtil.cachedAttr($element, 'nav-swipe', val);\n  }\n\n\n  function onTabsTop(ev, isTabsTop) {\n    var associatedNavBarCtrl = getAssociatedNavBarCtrl();\n    associatedNavBarCtrl && associatedNavBarCtrl.hasTabsTop(isTabsTop);\n  }\n\n  function onBarSubheader(ev, isBarSubheader) {\n    var associatedNavBarCtrl = getAssociatedNavBarCtrl();\n    associatedNavBarCtrl && associatedNavBarCtrl.hasBarSubheader(isBarSubheader);\n  }\n\n  function getAssociatedNavBarCtrl() {\n    if (navBarDelegate) {\n      for (var x = 0; x < $ionicNavBarDelegate._instances.length; x++) {\n        if ($ionicNavBarDelegate._instances[x].$$delegateHandle == navBarDelegate) {\n          return $ionicNavBarDelegate._instances[x];\n        }\n      }\n    }\n    return $element.inheritedData('$ionNavBarController');\n  }\n\n}]);\n\nIonicModule\n.controller('$ionicRefresher', [\n  '$scope',\n  '$attrs',\n  '$element',\n  '$ionicBind',\n  '$timeout',\n  function($scope, $attrs, $element, $ionicBind, $timeout) {\n    var self = this,\n        isDragging = false,\n        isOverscrolling = false,\n        dragOffset = 0,\n        lastOverscroll = 0,\n        ptrThreshold = 60,\n        activated = false,\n        scrollTime = 500,\n        startY = null,\n        deltaY = null,\n        canOverscroll = true,\n        scrollParent,\n        scrollChild;\n\n    if (!isDefined($attrs.pullingIcon)) {\n      $attrs.$set('pullingIcon', 'ion-android-arrow-down');\n    }\n\n    $scope.showSpinner = !isDefined($attrs.refreshingIcon) && $attrs.spinner != 'none';\n\n    $scope.showIcon = isDefined($attrs.refreshingIcon);\n\n    $ionicBind($scope, $attrs, {\n      pullingIcon: '@',\n      pullingText: '@',\n      refreshingIcon: '@',\n      refreshingText: '@',\n      spinner: '@',\n      disablePullingRotation: '@',\n      $onRefresh: '&onRefresh',\n      $onPulling: '&onPulling'\n    });\n\n    function handleMousedown(e) {\n      e.touches = e.touches || [{\n        screenX: e.screenX,\n        screenY: e.screenY\n      }];\n      // Mouse needs this\n      startY = Math.floor(e.touches[0].screenY);\n    }\n\n    function handleTouchstart(e) {\n      e.touches = e.touches || [{\n        screenX: e.screenX,\n        screenY: e.screenY\n      }];\n\n      startY = e.touches[0].screenY;\n    }\n\n    function handleTouchend() {\n      // reset Y\n      startY = null;\n      // if this wasn't an overscroll, get out immediately\n      if (!canOverscroll && !isDragging) {\n        return;\n      }\n      // the user has overscrolled but went back to native scrolling\n      if (!isDragging) {\n        dragOffset = 0;\n        isOverscrolling = false;\n        setScrollLock(false);\n      } else {\n        isDragging = false;\n        dragOffset = 0;\n\n        // the user has scroll far enough to trigger a refresh\n        if (lastOverscroll > ptrThreshold) {\n          start();\n          scrollTo(ptrThreshold, scrollTime);\n\n        // the user has overscrolled but not far enough to trigger a refresh\n        } else {\n          scrollTo(0, scrollTime, deactivate);\n          isOverscrolling = false;\n        }\n      }\n    }\n\n    function handleTouchmove(e) {\n      e.touches = e.touches || [{\n        screenX: e.screenX,\n        screenY: e.screenY\n      }];\n\n      // Force mouse events to have had a down event first\n      if (!startY && e.type == 'mousemove') {\n        return;\n      }\n\n      // if multitouch or regular scroll event, get out immediately\n      if (!canOverscroll || e.touches.length > 1) {\n        return;\n      }\n      //if this is a new drag, keep track of where we start\n      if (startY === null) {\n        startY = e.touches[0].screenY;\n      }\n\n      deltaY = e.touches[0].screenY - startY;\n\n      // how far have we dragged so far?\n      // kitkat fix for touchcancel events http://updates.html5rocks.com/2014/05/A-More-Compatible-Smoother-Touch\n      // Only do this if we're not on crosswalk\n      if (ionic.Platform.isAndroid() && ionic.Platform.version() === 4.4 && !ionic.Platform.isCrosswalk() && scrollParent.scrollTop === 0 && deltaY > 0) {\n        isDragging = true;\n        e.preventDefault();\n      }\n\n\n      // if we've dragged up and back down in to native scroll territory\n      if (deltaY - dragOffset <= 0 || scrollParent.scrollTop !== 0) {\n\n        if (isOverscrolling) {\n          isOverscrolling = false;\n          setScrollLock(false);\n        }\n\n        if (isDragging) {\n          nativescroll(scrollParent, deltaY - dragOffset * -1);\n        }\n\n        // if we're not at overscroll 0 yet, 0 out\n        if (lastOverscroll !== 0) {\n          overscroll(0);\n        }\n        return;\n\n      } else if (deltaY > 0 && scrollParent.scrollTop === 0 && !isOverscrolling) {\n        // starting overscroll, but drag started below scrollTop 0, so we need to offset the position\n        dragOffset = deltaY;\n      }\n\n      // prevent native scroll events while overscrolling\n      e.preventDefault();\n\n      // if not overscrolling yet, initiate overscrolling\n      if (!isOverscrolling) {\n        isOverscrolling = true;\n        setScrollLock(true);\n      }\n\n      isDragging = true;\n      // overscroll according to the user's drag so far\n      overscroll((deltaY - dragOffset) / 3);\n\n      // update the icon accordingly\n      if (!activated && lastOverscroll > ptrThreshold) {\n        activated = true;\n        ionic.requestAnimationFrame(activate);\n\n      } else if (activated && lastOverscroll < ptrThreshold) {\n        activated = false;\n        ionic.requestAnimationFrame(deactivate);\n      }\n    }\n\n    function handleScroll(e) {\n      // canOverscrol is used to greatly simplify the drag handler during normal scrolling\n      canOverscroll = (e.target.scrollTop === 0) || isDragging;\n    }\n\n    function overscroll(val) {\n      scrollChild.style[ionic.CSS.TRANSFORM] = 'translate3d(0px, ' + val + 'px, 0px)';\n      lastOverscroll = val;\n    }\n\n    function nativescroll(target, newScrollTop) {\n      // creates a scroll event that bubbles, can be cancelled, and with its view\n      // and detail property initialized to window and 1, respectively\n      target.scrollTop = newScrollTop;\n      var e = document.createEvent(\"UIEvents\");\n      e.initUIEvent(\"scroll\", true, true, window, 1);\n      target.dispatchEvent(e);\n    }\n\n    function setScrollLock(enabled) {\n      // set the scrollbar to be position:fixed in preparation to overscroll\n      // or remove it so the app can be natively scrolled\n      if (enabled) {\n        ionic.requestAnimationFrame(function() {\n          scrollChild.classList.add('overscroll');\n          show();\n        });\n\n      } else {\n        ionic.requestAnimationFrame(function() {\n          scrollChild.classList.remove('overscroll');\n          hide();\n          deactivate();\n        });\n      }\n    }\n\n    $scope.$on('scroll.refreshComplete', function() {\n      // prevent the complete from firing before the scroll has started\n      $timeout(function() {\n\n        ionic.requestAnimationFrame(tail);\n\n        // scroll back to home during tail animation\n        scrollTo(0, scrollTime, deactivate);\n\n        // return to native scrolling after tail animation has time to finish\n        $timeout(function() {\n\n          if (isOverscrolling) {\n            isOverscrolling = false;\n            setScrollLock(false);\n          }\n\n        }, scrollTime);\n\n      }, scrollTime);\n    });\n\n    function scrollTo(Y, duration, callback) {\n      // scroll animation loop w/ easing\n      // credit https://gist.github.com/dezinezync/5487119\n      var start = Date.now(),\n          from = lastOverscroll;\n\n      if (from === Y) {\n        callback();\n        return; /* Prevent scrolling to the Y point if already there */\n      }\n\n      // decelerating to zero velocity\n      function easeOutCubic(t) {\n        return (--t) * t * t + 1;\n      }\n\n      // scroll loop\n      function scroll() {\n        var currentTime = Date.now(),\n          time = Math.min(1, ((currentTime - start) / duration)),\n          // where .5 would be 50% of time on a linear scale easedT gives a\n          // fraction based on the easing method\n          easedT = easeOutCubic(time);\n\n        overscroll(Math.floor((easedT * (Y - from)) + from));\n\n        if (time < 1) {\n          ionic.requestAnimationFrame(scroll);\n\n        } else {\n\n          if (Y < 5 && Y > -5) {\n            isOverscrolling = false;\n            setScrollLock(false);\n          }\n\n          callback && callback();\n        }\n      }\n\n      // start scroll loop\n      ionic.requestAnimationFrame(scroll);\n    }\n\n\n    var touchStartEvent, touchMoveEvent, touchEndEvent;\n    if (window.navigator.pointerEnabled) {\n      touchStartEvent = 'pointerdown';\n      touchMoveEvent = 'pointermove';\n      touchEndEvent = 'pointerup';\n    } else if (window.navigator.msPointerEnabled) {\n      touchStartEvent = 'MSPointerDown';\n      touchMoveEvent = 'MSPointerMove';\n      touchEndEvent = 'MSPointerUp';\n    } else {\n      touchStartEvent = 'touchstart';\n      touchMoveEvent = 'touchmove';\n      touchEndEvent = 'touchend';\n    }\n\n    self.init = function() {\n      scrollParent = $element.parent().parent()[0];\n      scrollChild = $element.parent()[0];\n\n      if (!scrollParent || !scrollParent.classList.contains('ionic-scroll') ||\n        !scrollChild || !scrollChild.classList.contains('scroll')) {\n        throw new Error('Refresher must be immediate child of ion-content or ion-scroll');\n      }\n\n\n      ionic.on(touchStartEvent, handleTouchstart, scrollChild);\n      ionic.on(touchMoveEvent, handleTouchmove, scrollChild);\n      ionic.on(touchEndEvent, handleTouchend, scrollChild);\n      ionic.on('mousedown', handleMousedown, scrollChild);\n      ionic.on('mousemove', handleTouchmove, scrollChild);\n      ionic.on('mouseup', handleTouchend, scrollChild);\n      ionic.on('scroll', handleScroll, scrollParent);\n\n      // cleanup when done\n      $scope.$on('$destroy', destroy);\n    };\n\n    function destroy() {\n      if ( scrollChild ) {\n        ionic.off(touchStartEvent, handleTouchstart, scrollChild);\n        ionic.off(touchMoveEvent, handleTouchmove, scrollChild);\n        ionic.off(touchEndEvent, handleTouchend, scrollChild);\n        ionic.off('mousedown', handleMousedown, scrollChild);\n        ionic.off('mousemove', handleTouchmove, scrollChild);\n        ionic.off('mouseup', handleTouchend, scrollChild);\n      }\n      if ( scrollParent ) {\n        ionic.off('scroll', handleScroll, scrollParent);\n      }\n      scrollParent = null;\n      scrollChild = null;\n    }\n\n    // DOM manipulation and broadcast methods shared by JS and Native Scrolling\n    // getter used by JS Scrolling\n    self.getRefresherDomMethods = function() {\n      return {\n        activate: activate,\n        deactivate: deactivate,\n        start: start,\n        show: show,\n        hide: hide,\n        tail: tail\n      };\n    };\n\n    function activate() {\n      $element[0].classList.add('active');\n      $scope.$onPulling();\n    }\n\n    function deactivate() {\n      // give tail 150ms to finish\n      $timeout(function() {\n        // deactivateCallback\n        $element.removeClass('active refreshing refreshing-tail');\n        if (activated) activated = false;\n      }, 150);\n    }\n\n    function start() {\n      // startCallback\n      $element[0].classList.add('refreshing');\n      var q = $scope.$onRefresh();\n\n      if (q && q.then) {\n        q['finally'](function() {\n          $scope.$broadcast('scroll.refreshComplete');\n        });\n      }\n    }\n\n    function show() {\n      // showCallback\n      $element[0].classList.remove('invisible');\n    }\n\n    function hide() {\n      // showCallback\n      $element[0].classList.add('invisible');\n    }\n\n    function tail() {\n      // tailCallback\n      $element[0].classList.add('refreshing-tail');\n    }\n\n    // for testing\n    self.__handleTouchmove = handleTouchmove;\n    self.__getScrollChild = function() { return scrollChild; };\n    self.__getScrollParent = function() { return scrollParent; };\n  }\n]);\n\n/**\n * @private\n */\nIonicModule\n\n.controller('$ionicScroll', [\n  '$scope',\n  'scrollViewOptions',\n  '$timeout',\n  '$window',\n  '$location',\n  '$document',\n  '$ionicScrollDelegate',\n  '$ionicHistory',\nfunction($scope,\n         scrollViewOptions,\n         $timeout,\n         $window,\n         $location,\n         $document,\n         $ionicScrollDelegate,\n         $ionicHistory) {\n\n  var self = this;\n  // for testing\n  self.__timeout = $timeout;\n\n  self._scrollViewOptions = scrollViewOptions; //for testing\n  self.isNative = function() {\n    return !!scrollViewOptions.nativeScrolling;\n  };\n\n  var element = self.element = scrollViewOptions.el;\n  var $element = self.$element = jqLite(element);\n  var scrollView;\n  if (self.isNative()) {\n    scrollView = self.scrollView = new ionic.views.ScrollNative(scrollViewOptions);\n  } else {\n    scrollView = self.scrollView = new ionic.views.Scroll(scrollViewOptions);\n  }\n\n\n  //Attach self to element as a controller so other directives can require this controller\n  //through `require: '$ionicScroll'\n  //Also attach to parent so that sibling elements can require this\n  ($element.parent().length ? $element.parent() : $element)\n    .data('$$ionicScrollController', self);\n\n  var deregisterInstance = $ionicScrollDelegate._registerInstance(\n    self, scrollViewOptions.delegateHandle, function() {\n      return $ionicHistory.isActiveScope($scope);\n    }\n  );\n\n  if (!isDefined(scrollViewOptions.bouncing)) {\n    ionic.Platform.ready(function() {\n      if (scrollView && scrollView.options) {\n        scrollView.options.bouncing = true;\n        if (ionic.Platform.isAndroid()) {\n          // No bouncing by default on Android\n          scrollView.options.bouncing = false;\n          // Faster scroll decel\n          scrollView.options.deceleration = 0.95;\n        }\n      }\n    });\n  }\n\n  var resize = angular.bind(scrollView, scrollView.resize);\n  angular.element($window).on('resize', resize);\n\n  var scrollFunc = function(e) {\n    var detail = (e.originalEvent || e).detail || {};\n    $scope.$onScroll && $scope.$onScroll({\n      event: e,\n      scrollTop: detail.scrollTop || 0,\n      scrollLeft: detail.scrollLeft || 0\n    });\n  };\n\n  $element.on('scroll', scrollFunc);\n\n  $scope.$on('$destroy', function() {\n    deregisterInstance();\n    scrollView && scrollView.__cleanup && scrollView.__cleanup();\n    angular.element($window).off('resize', resize);\n    if ( $element ) {\n      $element.off('scroll', scrollFunc);\n    }\n    if ( self._scrollViewOptions ) {\n      self._scrollViewOptions.el = null;\n    }\n    if ( scrollViewOptions ) {\n        scrollViewOptions.el = null;\n    }\n\n    scrollView = self.scrollView = scrollViewOptions = self._scrollViewOptions = element = self.$element = $element = null;\n  });\n\n  $timeout(function() {\n    scrollView && scrollView.run && scrollView.run();\n  });\n\n  self.getScrollView = function() {\n    return scrollView;\n  };\n\n  self.getScrollPosition = function() {\n    return scrollView.getValues();\n  };\n\n  self.resize = function() {\n    return $timeout(resize, 0, false).then(function() {\n      $element && $element.triggerHandler('scroll-resize');\n    });\n  };\n\n  self.scrollTop = function(shouldAnimate) {\n    self.resize().then(function() {\n      if (!scrollView) {\n        return;\n      }\n      scrollView.scrollTo(0, 0, !!shouldAnimate);\n    });\n  };\n\n  self.scrollBottom = function(shouldAnimate) {\n    self.resize().then(function() {\n      if (!scrollView) {\n        return;\n      }\n      var max = scrollView.getScrollMax();\n      scrollView.scrollTo(max.left, max.top, !!shouldAnimate);\n    });\n  };\n\n  self.scrollTo = function(left, top, shouldAnimate) {\n    self.resize().then(function() {\n      if (!scrollView) {\n        return;\n      }\n      scrollView.scrollTo(left, top, !!shouldAnimate);\n    });\n  };\n\n  self.zoomTo = function(zoom, shouldAnimate, originLeft, originTop) {\n    self.resize().then(function() {\n      if (!scrollView) {\n        return;\n      }\n      scrollView.zoomTo(zoom, !!shouldAnimate, originLeft, originTop);\n    });\n  };\n\n  self.zoomBy = function(zoom, shouldAnimate, originLeft, originTop) {\n    self.resize().then(function() {\n      if (!scrollView) {\n        return;\n      }\n      scrollView.zoomBy(zoom, !!shouldAnimate, originLeft, originTop);\n    });\n  };\n\n  self.scrollBy = function(left, top, shouldAnimate) {\n    self.resize().then(function() {\n      if (!scrollView) {\n        return;\n      }\n      scrollView.scrollBy(left, top, !!shouldAnimate);\n    });\n  };\n\n  self.anchorScroll = function(shouldAnimate) {\n    self.resize().then(function() {\n      if (!scrollView) {\n        return;\n      }\n      var hash = $location.hash();\n      var elm = hash && $document[0].getElementById(hash);\n      if (!(hash && elm)) {\n        scrollView.scrollTo(0, 0, !!shouldAnimate);\n        return;\n      }\n      var curElm = elm;\n      var scrollLeft = 0, scrollTop = 0;\n      do {\n        if (curElm !== null) scrollLeft += curElm.offsetLeft;\n        if (curElm !== null) scrollTop += curElm.offsetTop;\n        curElm = curElm.offsetParent;\n      } while (curElm.attributes != self.element.attributes && curElm.offsetParent);\n      scrollView.scrollTo(scrollLeft, scrollTop, !!shouldAnimate);\n    });\n  };\n\n  self.freezeScroll = scrollView.freeze;\n  self.freezeScrollShut = scrollView.freezeShut;\n\n  self.freezeAllScrolls = function(shouldFreeze) {\n    for (var i = 0; i < $ionicScrollDelegate._instances.length; i++) {\n      $ionicScrollDelegate._instances[i].freezeScroll(shouldFreeze);\n    }\n  };\n\n\n  /**\n   * @private\n   */\n  self._setRefresher = function(refresherScope, refresherElement, refresherMethods) {\n    self.refresher = refresherElement;\n    var refresherHeight = self.refresher.clientHeight || 60;\n    scrollView.activatePullToRefresh(\n      refresherHeight,\n      refresherMethods\n    );\n  };\n\n}]);\n\nIonicModule\n.controller('$ionicSideMenus', [\n  '$scope',\n  '$attrs',\n  '$ionicSideMenuDelegate',\n  '$ionicPlatform',\n  '$ionicBody',\n  '$ionicHistory',\n  '$ionicScrollDelegate',\n  'IONIC_BACK_PRIORITY',\n  '$rootScope',\nfunction($scope, $attrs, $ionicSideMenuDelegate, $ionicPlatform, $ionicBody, $ionicHistory, $ionicScrollDelegate, IONIC_BACK_PRIORITY, $rootScope) {\n  var self = this;\n  var rightShowing, leftShowing, isDragging;\n  var startX, lastX, offsetX, isAsideExposed;\n  var enableMenuWithBackViews = true;\n\n  self.$scope = $scope;\n\n  self.initialize = function(options) {\n    self.left = options.left;\n    self.right = options.right;\n    self.setContent(options.content);\n    self.dragThresholdX = options.dragThresholdX || 10;\n    $ionicHistory.registerHistory(self.$scope);\n  };\n\n  /**\n   * Set the content view controller if not passed in the constructor options.\n   *\n   * @param {object} content\n   */\n  self.setContent = function(content) {\n    if (content) {\n      self.content = content;\n\n      self.content.onDrag = function(e) {\n        self._handleDrag(e);\n      };\n\n      self.content.endDrag = function(e) {\n        self._endDrag(e);\n      };\n    }\n  };\n\n  self.isOpenLeft = function() {\n    return self.getOpenAmount() > 0;\n  };\n\n  self.isOpenRight = function() {\n    return self.getOpenAmount() < 0;\n  };\n\n  /**\n   * Toggle the left menu to open 100%\n   */\n  self.toggleLeft = function(shouldOpen) {\n    if (isAsideExposed || !self.left.isEnabled) return;\n    var openAmount = self.getOpenAmount();\n    if (arguments.length === 0) {\n      shouldOpen = openAmount <= 0;\n    }\n    self.content.enableAnimation();\n    if (!shouldOpen) {\n      self.openPercentage(0);\n      $rootScope.$emit('$ionicSideMenuClose', 'left');\n    } else {\n      self.openPercentage(100);\n      $rootScope.$emit('$ionicSideMenuOpen', 'left');\n    }\n  };\n\n  /**\n   * Toggle the right menu to open 100%\n   */\n  self.toggleRight = function(shouldOpen) {\n    if (isAsideExposed || !self.right.isEnabled) return;\n    var openAmount = self.getOpenAmount();\n    if (arguments.length === 0) {\n      shouldOpen = openAmount >= 0;\n    }\n    self.content.enableAnimation();\n    if (!shouldOpen) {\n      self.openPercentage(0);\n      $rootScope.$emit('$ionicSideMenuClose', 'right');\n    } else {\n      self.openPercentage(-100);\n      $rootScope.$emit('$ionicSideMenuOpen', 'right');\n    }\n  };\n\n  self.toggle = function(side) {\n    if (side == 'right') {\n      self.toggleRight();\n    } else {\n      self.toggleLeft();\n    }\n  };\n\n  /**\n   * Close all menus.\n   */\n  self.close = function() {\n    self.openPercentage(0);\n    $rootScope.$emit('$ionicSideMenuClose', 'left');\n    $rootScope.$emit('$ionicSideMenuClose', 'right');\n  };\n\n  /**\n   * @return {float} The amount the side menu is open, either positive or negative for left (positive), or right (negative)\n   */\n  self.getOpenAmount = function() {\n    return self.content && self.content.getTranslateX() || 0;\n  };\n\n  /**\n   * @return {float} The ratio of open amount over menu width. For example, a\n   * menu of width 100 open 50 pixels would be open 50% or a ratio of 0.5. Value is negative\n   * for right menu.\n   */\n  self.getOpenRatio = function() {\n    var amount = self.getOpenAmount();\n    if (amount >= 0) {\n      return amount / self.left.width;\n    }\n    return amount / self.right.width;\n  };\n\n  self.isOpen = function() {\n    return self.getOpenAmount() !== 0;\n  };\n\n  /**\n   * @return {float} The percentage of open amount over menu width. For example, a\n   * menu of width 100 open 50 pixels would be open 50%. Value is negative\n   * for right menu.\n   */\n  self.getOpenPercentage = function() {\n    return self.getOpenRatio() * 100;\n  };\n\n  /**\n   * Open the menu with a given percentage amount.\n   * @param {float} percentage The percentage (positive or negative for left/right) to open the menu.\n   */\n  self.openPercentage = function(percentage) {\n    var p = percentage / 100;\n\n    if (self.left && percentage >= 0) {\n      self.openAmount(self.left.width * p);\n    } else if (self.right && percentage < 0) {\n      self.openAmount(self.right.width * p);\n    }\n\n    // add the CSS class \"menu-open\" if the percentage does not\n    // equal 0, otherwise remove the class from the body element\n    $ionicBody.enableClass((percentage !== 0), 'menu-open');\n\n    self.content.setCanScroll(percentage == 0);\n  };\n\n  /*\n  function freezeAllScrolls(shouldFreeze) {\n    if (shouldFreeze && !self.isScrollFreeze) {\n      $ionicScrollDelegate.freezeAllScrolls(shouldFreeze);\n\n    } else if (!shouldFreeze && self.isScrollFreeze) {\n      $ionicScrollDelegate.freezeAllScrolls(false);\n    }\n    self.isScrollFreeze = shouldFreeze;\n  }\n  */\n\n  /**\n   * Open the menu the given pixel amount.\n   * @param {float} amount the pixel amount to open the menu. Positive value for left menu,\n   * negative value for right menu (only one menu will be visible at a time).\n   */\n  self.openAmount = function(amount) {\n    var maxLeft = self.left && self.left.width || 0;\n    var maxRight = self.right && self.right.width || 0;\n\n    // Check if we can move to that side, depending if the left/right panel is enabled\n    if (!(self.left && self.left.isEnabled) && amount > 0) {\n      self.content.setTranslateX(0);\n      return;\n    }\n\n    if (!(self.right && self.right.isEnabled) && amount < 0) {\n      self.content.setTranslateX(0);\n      return;\n    }\n\n    if (leftShowing && amount > maxLeft) {\n      self.content.setTranslateX(maxLeft);\n      return;\n    }\n\n    if (rightShowing && amount < -maxRight) {\n      self.content.setTranslateX(-maxRight);\n      return;\n    }\n\n    self.content.setTranslateX(amount);\n\n    leftShowing = amount > 0;\n    rightShowing = amount < 0;\n\n    if (amount > 0) {\n      // Push the z-index of the right menu down\n      self.right && self.right.pushDown && self.right.pushDown();\n      // Bring the z-index of the left menu up\n      self.left && self.left.bringUp && self.left.bringUp();\n    } else {\n      // Bring the z-index of the right menu up\n      self.right && self.right.bringUp && self.right.bringUp();\n      // Push the z-index of the left menu down\n      self.left && self.left.pushDown && self.left.pushDown();\n    }\n  };\n\n  /**\n   * Given an event object, find the final resting position of this side\n   * menu. For example, if the user \"throws\" the content to the right and\n   * releases the touch, the left menu should snap open (animated, of course).\n   *\n   * @param {Event} e the gesture event to use for snapping\n   */\n  self.snapToRest = function(e) {\n    // We want to animate at the end of this\n    self.content.enableAnimation();\n    isDragging = false;\n\n    // Check how much the panel is open after the drag, and\n    // what the drag velocity is\n    var ratio = self.getOpenRatio();\n\n    if (ratio === 0) {\n      // Just to be safe\n      self.openPercentage(0);\n      return;\n    }\n\n    var velocityThreshold = 0.3;\n    var velocityX = e.gesture.velocityX;\n    var direction = e.gesture.direction;\n\n    // Going right, less than half, too slow (snap back)\n    if (ratio > 0 && ratio < 0.5 && direction == 'right' && velocityX < velocityThreshold) {\n      self.openPercentage(0);\n    }\n\n    // Going left, more than half, too slow (snap back)\n    else if (ratio > 0.5 && direction == 'left' && velocityX < velocityThreshold) {\n      self.openPercentage(100);\n    }\n\n    // Going left, less than half, too slow (snap back)\n    else if (ratio < 0 && ratio > -0.5 && direction == 'left' && velocityX < velocityThreshold) {\n      self.openPercentage(0);\n    }\n\n    // Going right, more than half, too slow (snap back)\n    else if (ratio < 0.5 && direction == 'right' && velocityX < velocityThreshold) {\n      self.openPercentage(-100);\n    }\n\n    // Going right, more than half, or quickly (snap open)\n    else if (direction == 'right' && ratio >= 0 && (ratio >= 0.5 || velocityX > velocityThreshold)) {\n      self.openPercentage(100);\n    }\n\n    // Going left, more than half, or quickly (span open)\n    else if (direction == 'left' && ratio <= 0 && (ratio <= -0.5 || velocityX > velocityThreshold)) {\n      self.openPercentage(-100);\n    }\n\n    // Snap back for safety\n    else {\n      self.openPercentage(0);\n    }\n  };\n\n  self.enableMenuWithBackViews = function(val) {\n    if (arguments.length) {\n      enableMenuWithBackViews = !!val;\n    }\n    return enableMenuWithBackViews;\n  };\n\n  self.isAsideExposed = function() {\n    return !!isAsideExposed;\n  };\n\n  self.exposeAside = function(shouldExposeAside) {\n    if (!(self.left && self.left.isEnabled) && !(self.right && self.right.isEnabled)) return;\n    self.close();\n\n    isAsideExposed = shouldExposeAside;\n    if ((self.left && self.left.isEnabled) && (self.right && self.right.isEnabled)) {\n      self.content.setMarginLeftAndRight(isAsideExposed ? self.left.width : 0, isAsideExposed ? self.right.width : 0);\n    } else if (self.left && self.left.isEnabled) {\n      // set the left marget width if it should be exposed\n      // otherwise set false so there's no left margin\n      self.content.setMarginLeft(isAsideExposed ? self.left.width : 0);\n    } else if (self.right && self.right.isEnabled) {\n      self.content.setMarginRight(isAsideExposed ? self.right.width : 0);\n    }\n    self.$scope.$emit('$ionicExposeAside', isAsideExposed);\n  };\n\n  self.activeAsideResizing = function(isResizing) {\n    $ionicBody.enableClass(isResizing, 'aside-resizing');\n  };\n\n  // End a drag with the given event\n  self._endDrag = function(e) {\n    if (isAsideExposed) return;\n\n    if (isDragging) {\n      self.snapToRest(e);\n    }\n    startX = null;\n    lastX = null;\n    offsetX = null;\n  };\n\n  // Handle a drag event\n  self._handleDrag = function(e) {\n    if (isAsideExposed || !$scope.dragContent) return;\n\n    // If we don't have start coords, grab and store them\n    if (!startX) {\n      startX = e.gesture.touches[0].pageX;\n      lastX = startX;\n    } else {\n      // Grab the current tap coords\n      lastX = e.gesture.touches[0].pageX;\n    }\n\n    // Calculate difference from the tap points\n    if (!isDragging && Math.abs(lastX - startX) > self.dragThresholdX) {\n      // if the difference is greater than threshold, start dragging using the current\n      // point as the starting point\n      startX = lastX;\n\n      isDragging = true;\n      // Initialize dragging\n      self.content.disableAnimation();\n      offsetX = self.getOpenAmount();\n    }\n\n    if (isDragging) {\n      self.openAmount(offsetX + (lastX - startX));\n      //self.content.setCanScroll(false);\n    }\n  };\n\n  self.canDragContent = function(canDrag) {\n    if (arguments.length) {\n      $scope.dragContent = !!canDrag;\n    }\n    return $scope.dragContent;\n  };\n\n  self.edgeThreshold = 25;\n  self.edgeThresholdEnabled = false;\n  self.edgeDragThreshold = function(value) {\n    if (arguments.length) {\n      if (isNumber(value) && value > 0) {\n        self.edgeThreshold = value;\n        self.edgeThresholdEnabled = true;\n      } else {\n        self.edgeThresholdEnabled = !!value;\n      }\n    }\n    return self.edgeThresholdEnabled;\n  };\n\n  self.isDraggableTarget = function(e) {\n    //Only restrict edge when sidemenu is closed and restriction is enabled\n    var shouldOnlyAllowEdgeDrag = self.edgeThresholdEnabled && !self.isOpen();\n    var startX = e.gesture.startEvent && e.gesture.startEvent.center &&\n      e.gesture.startEvent.center.pageX;\n\n    var dragIsWithinBounds = !shouldOnlyAllowEdgeDrag ||\n      startX <= self.edgeThreshold ||\n      startX >= self.content.element.offsetWidth - self.edgeThreshold;\n\n    var backView = $ionicHistory.backView();\n    var menuEnabled = enableMenuWithBackViews ? true : !backView;\n    if (!menuEnabled) {\n      var currentView = $ionicHistory.currentView() || {};\n      return (dragIsWithinBounds && (backView.historyId !== currentView.historyId));\n    }\n\n    return ($scope.dragContent || self.isOpen()) &&\n      dragIsWithinBounds &&\n      !e.gesture.srcEvent.defaultPrevented &&\n      menuEnabled &&\n      !e.target.tagName.match(/input|textarea|select|object|embed/i) &&\n      !e.target.isContentEditable &&\n      !(e.target.dataset ? e.target.dataset.preventScroll : e.target.getAttribute('data-prevent-scroll') == 'true');\n  };\n\n  $scope.sideMenuContentTranslateX = 0;\n\n  var deregisterBackButtonAction = noop;\n  var closeSideMenu = angular.bind(self, self.close);\n\n  $scope.$watch(function() {\n    return self.getOpenAmount() !== 0;\n  }, function(isOpen) {\n    deregisterBackButtonAction();\n    if (isOpen) {\n      deregisterBackButtonAction = $ionicPlatform.registerBackButtonAction(\n        closeSideMenu,\n        IONIC_BACK_PRIORITY.sideMenu\n      );\n    }\n  });\n\n  var deregisterInstance = $ionicSideMenuDelegate._registerInstance(\n    self, $attrs.delegateHandle, function() {\n      return $ionicHistory.isActiveScope($scope);\n    }\n  );\n\n  $scope.$on('$destroy', function() {\n    deregisterInstance();\n    deregisterBackButtonAction();\n    self.$scope = null;\n    if (self.content) {\n      self.content.setCanScroll(true);\n      self.content.element = null;\n      self.content = null;\n    }\n  });\n\n  self.initialize({\n    left: {\n      width: 275\n    },\n    right: {\n      width: 275\n    }\n  });\n\n}]);\n\n(function(ionic) {\n\n  var TRANSLATE32 = 'translate(32,32)';\n  var STROKE_OPACITY = 'stroke-opacity';\n  var ROUND = 'round';\n  var INDEFINITE = 'indefinite';\n  var DURATION = '750ms';\n  var NONE = 'none';\n  var SHORTCUTS = {\n    a: 'animate',\n    an: 'attributeName',\n    at: 'animateTransform',\n    c: 'circle',\n    da: 'stroke-dasharray',\n    os: 'stroke-dashoffset',\n    f: 'fill',\n    lc: 'stroke-linecap',\n    rc: 'repeatCount',\n    sw: 'stroke-width',\n    t: 'transform',\n    v: 'values'\n  };\n\n  var SPIN_ANIMATION = {\n    v: '0,32,32;360,32,32',\n    an: 'transform',\n    type: 'rotate',\n    rc: INDEFINITE,\n    dur: DURATION\n  };\n\n  function createSvgElement(tagName, data, parent, spinnerName) {\n    var ele = document.createElement(SHORTCUTS[tagName] || tagName);\n    var k, x, y;\n\n    for (k in data) {\n\n      if (angular.isArray(data[k])) {\n        for (x = 0; x < data[k].length; x++) {\n          if (data[k][x].fn) {\n            for (y = 0; y < data[k][x].t; y++) {\n              createSvgElement(k, data[k][x].fn(y, spinnerName), ele, spinnerName);\n            }\n          } else {\n            createSvgElement(k, data[k][x], ele, spinnerName);\n          }\n        }\n\n      } else {\n        setSvgAttribute(ele, k, data[k]);\n      }\n    }\n\n    parent.appendChild(ele);\n  }\n\n  function setSvgAttribute(ele, k, v) {\n    ele.setAttribute(SHORTCUTS[k] || k, v);\n  }\n\n  function animationValues(strValues, i) {\n    var values = strValues.split(';');\n    var back = values.slice(i);\n    var front = values.slice(0, values.length - back.length);\n    values = back.concat(front).reverse();\n    return values.join(';') + ';' + values[0];\n  }\n\n  var IOS_SPINNER = {\n    sw: 4,\n    lc: ROUND,\n    line: [{\n      fn: function(i, spinnerName) {\n        return {\n          y1: spinnerName == 'ios' ? 17 : 12,\n          y2: spinnerName == 'ios' ? 29 : 20,\n          t: TRANSLATE32 + ' rotate(' + (30 * i + (i < 6 ? 180 : -180)) + ')',\n          a: [{\n            fn: function() {\n              return {\n                an: STROKE_OPACITY,\n                dur: DURATION,\n                v: animationValues('0;.1;.15;.25;.35;.45;.55;.65;.7;.85;1', i),\n                rc: INDEFINITE\n              };\n            },\n            t: 1\n          }]\n        };\n      },\n      t: 12\n    }]\n  };\n\n  var spinners = {\n\n    android: {\n      c: [{\n        sw: 6,\n        da: 128,\n        os: 82,\n        r: 26,\n        cx: 32,\n        cy: 32,\n        f: NONE\n      }]\n    },\n\n    ios: IOS_SPINNER,\n\n    'ios-small': IOS_SPINNER,\n\n    bubbles: {\n      sw: 0,\n      c: [{\n        fn: function(i) {\n          return {\n            cx: 24 * Math.cos(2 * Math.PI * i / 8),\n            cy: 24 * Math.sin(2 * Math.PI * i / 8),\n            t: TRANSLATE32,\n            a: [{\n              fn: function() {\n                return {\n                  an: 'r',\n                  dur: DURATION,\n                  v: animationValues('1;2;3;4;5;6;7;8', i),\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }]\n          };\n        },\n        t: 8\n      }]\n    },\n\n    circles: {\n\n      c: [{\n        fn: function(i) {\n          return {\n            r: 5,\n            cx: 24 * Math.cos(2 * Math.PI * i / 8),\n            cy: 24 * Math.sin(2 * Math.PI * i / 8),\n            t: TRANSLATE32,\n            sw: 0,\n            a: [{\n              fn: function() {\n                return {\n                  an: 'fill-opacity',\n                  dur: DURATION,\n                  v: animationValues('.3;.3;.3;.4;.7;.85;.9;1', i),\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }]\n          };\n        },\n        t: 8\n      }]\n    },\n\n    crescent: {\n      c: [{\n        sw: 4,\n        da: 128,\n        os: 82,\n        r: 26,\n        cx: 32,\n        cy: 32,\n        f: NONE,\n        at: [SPIN_ANIMATION]\n      }]\n    },\n\n    dots: {\n\n      c: [{\n        fn: function(i) {\n          return {\n            cx: 16 + (16 * i),\n            cy: 32,\n            sw: 0,\n            a: [{\n              fn: function() {\n                return {\n                  an: 'fill-opacity',\n                  dur: DURATION,\n                  v: animationValues('.5;.6;.8;1;.8;.6;.5', i),\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }, {\n              fn: function() {\n                return {\n                  an: 'r',\n                  dur: DURATION,\n                  v: animationValues('4;5;6;5;4;3;3', i),\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }]\n          };\n        },\n        t: 3\n      }]\n    },\n\n    lines: {\n      sw: 7,\n      lc: ROUND,\n      line: [{\n        fn: function(i) {\n          return {\n            x1: 10 + (i * 14),\n            x2: 10 + (i * 14),\n            a: [{\n              fn: function() {\n                return {\n                  an: 'y1',\n                  dur: DURATION,\n                  v: animationValues('16;18;28;18;16', i),\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }, {\n              fn: function() {\n                return {\n                  an: 'y2',\n                  dur: DURATION,\n                  v: animationValues('48;44;36;46;48', i),\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }, {\n              fn: function() {\n                return {\n                  an: STROKE_OPACITY,\n                  dur: DURATION,\n                  v: animationValues('1;.8;.5;.4;1', i),\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }]\n          };\n        },\n        t: 4\n      }]\n    },\n\n    ripple: {\n      f: NONE,\n      'fill-rule': 'evenodd',\n      sw: 3,\n      circle: [{\n        fn: function(i) {\n          return {\n            cx: 32,\n            cy: 32,\n            a: [{\n              fn: function() {\n                return {\n                  an: 'r',\n                  begin: (i * -1) + 's',\n                  dur: '2s',\n                  v: '0;24',\n                  keyTimes: '0;1',\n                  keySplines: '0.1,0.2,0.3,1',\n                  calcMode: 'spline',\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }, {\n              fn: function() {\n                return {\n                  an: STROKE_OPACITY,\n                  begin: (i * -1) + 's',\n                  dur: '2s',\n                  v: '.2;1;.2;0',\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }]\n          };\n        },\n        t: 2\n      }]\n    },\n\n    spiral: {\n      defs: [{\n        linearGradient: [{\n          id: 'sGD',\n          gradientUnits: 'userSpaceOnUse',\n          x1: 55, y1: 46, x2: 2, y2: 46,\n          stop: [{\n            offset: 0.1,\n            class: 'stop1'\n          }, {\n            offset: 1,\n            class: 'stop2'\n          }]\n        }]\n      }],\n      g: [{\n        sw: 4,\n        lc: ROUND,\n        f: NONE,\n        path: [{\n          stroke: 'url(#sGD)',\n          d: 'M4,32 c0,15,12,28,28,28c8,0,16-4,21-9'\n        }, {\n          d: 'M60,32 C60,16,47.464,4,32,4S4,16,4,32'\n        }],\n        at: [SPIN_ANIMATION]\n      }]\n    }\n\n  };\n\n  var animations = {\n\n    android: function(ele) {\n      // Note that this is called as a function, not a constructor.\n      var self = {};\n\n      this.stop = false;\n\n      var rIndex = 0;\n      var rotateCircle = 0;\n      var startTime;\n      var svgEle = ele.querySelector('g');\n      var circleEle = ele.querySelector('circle');\n\n      function run() {\n        if (self.stop) return;\n\n        var v = easeInOutCubic(Date.now() - startTime, 650);\n        var scaleX = 1;\n        var translateX = 0;\n        var dasharray = (188 - (58 * v));\n        var dashoffset = (182 - (182 * v));\n\n        if (rIndex % 2) {\n          scaleX = -1;\n          translateX = -64;\n          dasharray = (128 - (-58 * v));\n          dashoffset = (182 * v);\n        }\n\n        var rotateLine = [0, -101, -90, -11, -180, 79, -270, -191][rIndex];\n\n        setSvgAttribute(circleEle, 'da', Math.max(Math.min(dasharray, 188), 128));\n        setSvgAttribute(circleEle, 'os', Math.max(Math.min(dashoffset, 182), 0));\n        setSvgAttribute(circleEle, 't', 'scale(' + scaleX + ',1) translate(' + translateX + ',0) rotate(' + rotateLine + ',32,32)');\n\n        rotateCircle += 4.1;\n        if (rotateCircle > 359) rotateCircle = 0;\n        setSvgAttribute(svgEle, 't', 'rotate(' + rotateCircle + ',32,32)');\n\n        if (v >= 1) {\n          rIndex++;\n          if (rIndex > 7) rIndex = 0;\n          startTime = Date.now();\n        }\n\n        ionic.requestAnimationFrame(run);\n      }\n\n      return function() {\n        startTime = Date.now();\n        run();\n        return self;\n      };\n\n    }\n\n  };\n\n  function easeInOutCubic(t, c) {\n    t /= c / 2;\n    if (t < 1) return 1 / 2 * t * t * t;\n    t -= 2;\n    return 1 / 2 * (t * t * t + 2);\n  }\n\n\n  IonicModule\n  .controller('$ionicSpinner', [\n    '$element',\n    '$attrs',\n    '$ionicConfig',\n  function($element, $attrs, $ionicConfig) {\n    var spinnerName, anim;\n\n    this.init = function() {\n      spinnerName = $attrs.icon || $ionicConfig.spinner.icon();\n\n      var container = document.createElement('div');\n      createSvgElement('svg', {\n        viewBox: '0 0 64 64',\n        g: [spinners[spinnerName]]\n      }, container, spinnerName);\n\n      // Specifically for animations to work,\n      // Android 4.3 and below requires the element to be\n      // added as an html string, rather than dynmically\n      // building up the svg element and appending it.\n      $element.html(container.innerHTML);\n\n      this.start();\n\n      return spinnerName;\n    };\n\n    this.start = function() {\n      animations[spinnerName] && (anim = animations[spinnerName]($element[0])());\n    };\n\n    this.stop = function() {\n      animations[spinnerName] && (anim.stop = true);\n    };\n\n  }]);\n\n})(ionic);\n\nIonicModule\n.controller('$ionicTab', [\n  '$scope',\n  '$ionicHistory',\n  '$attrs',\n  '$location',\n  '$state',\nfunction($scope, $ionicHistory, $attrs, $location, $state) {\n  this.$scope = $scope;\n\n  //All of these exposed for testing\n  this.hrefMatchesState = function() {\n    return $attrs.href && $location.path().indexOf(\n      $attrs.href.replace(/^#/, '').replace(/\\/$/, '')\n    ) === 0;\n  };\n  this.srefMatchesState = function() {\n    return $attrs.uiSref && $state.includes($attrs.uiSref.split('(')[0]);\n  };\n  this.navNameMatchesState = function() {\n    return this.navViewName && $ionicHistory.isCurrentStateNavView(this.navViewName);\n  };\n\n  this.tabMatchesState = function() {\n    return this.hrefMatchesState() || this.srefMatchesState() || this.navNameMatchesState();\n  };\n}]);\n\nIonicModule\n.controller('$ionicTabs', [\n  '$scope',\n  '$element',\n  '$ionicHistory',\nfunction($scope, $element, $ionicHistory) {\n  var self = this;\n  var selectedTab = null;\n  var previousSelectedTab = null;\n  var selectedTabIndex;\n  var isVisible = true;\n  self.tabs = [];\n\n  self.selectedIndex = function() {\n    return self.tabs.indexOf(selectedTab);\n  };\n  self.selectedTab = function() {\n    return selectedTab;\n  };\n  self.previousSelectedTab = function() {\n    return previousSelectedTab;\n  };\n\n  self.add = function(tab) {\n    $ionicHistory.registerHistory(tab);\n    self.tabs.push(tab);\n  };\n\n  self.remove = function(tab) {\n    var tabIndex = self.tabs.indexOf(tab);\n    if (tabIndex === -1) {\n      return;\n    }\n    //Use a field like '$tabSelected' so developers won't accidentally set it in controllers etc\n    if (tab.$tabSelected) {\n      self.deselect(tab);\n      //Try to select a new tab if we're removing a tab\n      if (self.tabs.length === 1) {\n        //Do nothing if there are no other tabs to select\n      } else {\n        //Select previous tab if it's the last tab, else select next tab\n        var newTabIndex = tabIndex === self.tabs.length - 1 ? tabIndex - 1 : tabIndex + 1;\n        self.select(self.tabs[newTabIndex]);\n      }\n    }\n    self.tabs.splice(tabIndex, 1);\n  };\n\n  self.deselect = function(tab) {\n    if (tab.$tabSelected) {\n      previousSelectedTab = selectedTab;\n      selectedTab = selectedTabIndex = null;\n      tab.$tabSelected = false;\n      (tab.onDeselect || noop)();\n      tab.$broadcast && tab.$broadcast('$ionicHistory.deselect');\n    }\n  };\n\n  self.select = function(tab, shouldEmitEvent) {\n    var tabIndex;\n    if (isNumber(tab)) {\n      tabIndex = tab;\n      if (tabIndex >= self.tabs.length) return;\n      tab = self.tabs[tabIndex];\n    } else {\n      tabIndex = self.tabs.indexOf(tab);\n    }\n\n    if (arguments.length === 1) {\n      shouldEmitEvent = !!(tab.navViewName || tab.uiSref);\n    }\n\n    if (selectedTab && selectedTab.$historyId == tab.$historyId) {\n      if (shouldEmitEvent) {\n        $ionicHistory.goToHistoryRoot(tab.$historyId);\n      }\n\n    } else if (selectedTabIndex !== tabIndex) {\n      forEach(self.tabs, function(tab) {\n        self.deselect(tab);\n      });\n\n      selectedTab = tab;\n      selectedTabIndex = tabIndex;\n\n      if (self.$scope && self.$scope.$parent) {\n        self.$scope.$parent.$activeHistoryId = tab.$historyId;\n      }\n\n      //Use a funny name like $tabSelected so the developer doesn't overwrite the var in a child scope\n      tab.$tabSelected = true;\n      (tab.onSelect || noop)();\n\n      if (shouldEmitEvent) {\n        $scope.$emit('$ionicHistory.change', {\n          type: 'tab',\n          tabIndex: tabIndex,\n          historyId: tab.$historyId,\n          navViewName: tab.navViewName,\n          hasNavView: !!tab.navViewName,\n          title: tab.title,\n          url: tab.href,\n          uiSref: tab.uiSref\n        });\n      }\n\n      $scope.$broadcast(\"tabSelected\", { selectedTab: tab, selectedTabIndex: tabIndex});\n    }\n  };\n\n  self.hasActiveScope = function() {\n    for (var x = 0; x < self.tabs.length; x++) {\n      if ($ionicHistory.isActiveScope(self.tabs[x])) {\n        return true;\n      }\n    }\n    return false;\n  };\n\n  self.showBar = function(show) {\n    if (arguments.length) {\n      if (show) {\n        $element.removeClass('tabs-item-hide');\n      } else {\n        $element.addClass('tabs-item-hide');\n      }\n      isVisible = !!show;\n    }\n    return isVisible;\n  };\n}]);\n\nIonicModule\n.controller('$ionicView', [\n  '$scope',\n  '$element',\n  '$attrs',\n  '$compile',\n  '$rootScope',\nfunction($scope, $element, $attrs, $compile, $rootScope) {\n  var self = this;\n  var navElementHtml = {};\n  var navViewCtrl;\n  var navBarDelegateHandle;\n  var hasViewHeaderBar;\n  var deregisters = [];\n  var viewTitle;\n\n  var deregIonNavBarInit = $scope.$on('ionNavBar.init', function(ev, delegateHandle) {\n    // this view has its own ion-nav-bar, remember the navBarDelegateHandle for this view\n    ev.stopPropagation();\n    navBarDelegateHandle = delegateHandle;\n  });\n\n\n  self.init = function() {\n    deregIonNavBarInit();\n\n    var modalCtrl = $element.inheritedData('$ionModalController');\n    navViewCtrl = $element.inheritedData('$ionNavViewController');\n\n    // don't bother if inside a modal or there's no parent navView\n    if (!navViewCtrl || modalCtrl) return;\n\n    // add listeners for when this view changes\n    $scope.$on('$ionicView.beforeEnter', self.beforeEnter);\n    $scope.$on('$ionicView.afterEnter', afterEnter);\n    $scope.$on('$ionicView.beforeLeave', deregisterFns);\n  };\n\n  self.beforeEnter = function(ev, transData) {\n    // this event was emitted, starting at intial ion-view, then bubbles up\n    // only the first ion-view should do something with it, parent ion-views should ignore\n    if (transData && !transData.viewNotified) {\n      transData.viewNotified = true;\n\n      if (!$rootScope.$$phase) $scope.$digest();\n      viewTitle = isDefined($attrs.viewTitle) ? $attrs.viewTitle : $attrs.title;\n\n      var navBarItems = {};\n      for (var n in navElementHtml) {\n        navBarItems[n] = generateNavBarItem(navElementHtml[n]);\n      }\n\n      navViewCtrl.beforeEnter(extend(transData, {\n        title: viewTitle,\n        showBack: !attrTrue('hideBackButton'),\n        navBarItems: navBarItems,\n        navBarDelegate: navBarDelegateHandle || null,\n        showNavBar: !attrTrue('hideNavBar'),\n        hasHeaderBar: !!hasViewHeaderBar\n      }));\n\n      // make sure any existing observers are cleaned up\n      deregisterFns();\n    }\n  };\n\n\n  function afterEnter() {\n    // only listen for title updates after it has entered\n    // but also deregister the observe before it leaves\n    var viewTitleAttr = isDefined($attrs.viewTitle) && 'viewTitle' || isDefined($attrs.title) && 'title';\n    if (viewTitleAttr) {\n      titleUpdate($attrs[viewTitleAttr]);\n      deregisters.push($attrs.$observe(viewTitleAttr, titleUpdate));\n    }\n\n    if (isDefined($attrs.hideBackButton)) {\n      deregisters.push($scope.$watch($attrs.hideBackButton, function(val) {\n        navViewCtrl.showBackButton(!val);\n      }));\n    }\n\n    if (isDefined($attrs.hideNavBar)) {\n      deregisters.push($scope.$watch($attrs.hideNavBar, function(val) {\n        navViewCtrl.showBar(!val);\n      }));\n    }\n  }\n\n\n  function titleUpdate(newTitle) {\n    if (isDefined(newTitle) && newTitle !== viewTitle) {\n      viewTitle = newTitle;\n      navViewCtrl.title(viewTitle);\n    }\n  }\n\n\n  function deregisterFns() {\n    // remove all existing $attrs.$observe's\n    for (var x = 0; x < deregisters.length; x++) {\n      deregisters[x]();\n    }\n    deregisters = [];\n  }\n\n\n  function generateNavBarItem(html) {\n    if (html) {\n      // every time a view enters we need to recreate its view buttons if they exist\n      return $compile(html)($scope.$new());\n    }\n  }\n\n\n  function attrTrue(key) {\n    return !!$scope.$eval($attrs[key]);\n  }\n\n\n  self.navElement = function(type, html) {\n    navElementHtml[type] = html;\n  };\n\n}]);\n\n/*\n * We don't document the ionActionSheet directive, we instead document\n * the $ionicActionSheet service\n */\nIonicModule\n.directive('ionActionSheet', ['$document', function($document) {\n  return {\n    restrict: 'E',\n    scope: true,\n    replace: true,\n    link: function($scope, $element) {\n\n      var keyUp = function(e) {\n        if (e.which == 27) {\n          $scope.cancel();\n          $scope.$apply();\n        }\n      };\n\n      var backdropClick = function(e) {\n        if (e.target == $element[0]) {\n          $scope.cancel();\n          $scope.$apply();\n        }\n      };\n      $scope.$on('$destroy', function() {\n        $element.remove();\n        $document.unbind('keyup', keyUp);\n      });\n\n      $document.bind('keyup', keyUp);\n      $element.bind('click', backdropClick);\n    },\n    template: '<div class=\"action-sheet-backdrop\">' +\n                '<div class=\"action-sheet-wrapper\">' +\n                  '<div class=\"action-sheet\" ng-class=\"{\\'action-sheet-has-icons\\': $actionSheetHasIcon}\">' +\n                    '<div class=\"action-sheet-group action-sheet-options\">' +\n                      '<div class=\"action-sheet-title\" ng-if=\"titleText\" ng-bind-html=\"titleText\"></div>' +\n                      '<button class=\"button action-sheet-option\" ng-click=\"buttonClicked($index)\" ng-class=\"b.className\" ng-repeat=\"b in buttons\" ng-bind-html=\"b.text\"></button>' +\n                      '<button class=\"button destructive action-sheet-destructive\" ng-if=\"destructiveText\" ng-click=\"destructiveButtonClicked()\" ng-bind-html=\"destructiveText\"></button>' +\n                    '</div>' +\n                    '<div class=\"action-sheet-group action-sheet-cancel\" ng-if=\"cancelText\">' +\n                      '<button class=\"button\" ng-click=\"cancel()\" ng-bind-html=\"cancelText\"></button>' +\n                    '</div>' +\n                  '</div>' +\n                '</div>' +\n              '</div>'\n  };\n}]);\n\n\n/**\n * @ngdoc directive\n * @name ionCheckbox\n * @module ionic\n * @restrict E\n * @codepen hqcju\n * @description\n * The checkbox is no different than the HTML checkbox input, except it's styled differently.\n *\n * The checkbox behaves like any [AngularJS checkbox](http://docs.angularjs.org/api/ng/input/input[checkbox]).\n *\n * @usage\n * ```html\n * <ion-checkbox ng-model=\"isChecked\">Checkbox Label</ion-checkbox>\n * ```\n */\n\nIonicModule\n.directive('ionCheckbox', ['$ionicConfig', function($ionicConfig) {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '?ngModel',\n    transclude: true,\n    template:\n      '<label class=\"item item-checkbox\">' +\n        '<div class=\"checkbox checkbox-input-hidden disable-pointer-events\">' +\n          '<input type=\"checkbox\">' +\n          '<i class=\"checkbox-icon\"></i>' +\n        '</div>' +\n        '<div class=\"item-content disable-pointer-events\" ng-transclude></div>' +\n      '</label>',\n    compile: function(element, attr) {\n      var input = element.find('input');\n      forEach({\n        'name': attr.name,\n        'ng-value': attr.ngValue,\n        'ng-model': attr.ngModel,\n        'ng-checked': attr.ngChecked,\n        'ng-disabled': attr.ngDisabled,\n        'ng-true-value': attr.ngTrueValue,\n        'ng-false-value': attr.ngFalseValue,\n        'ng-change': attr.ngChange,\n        'ng-required': attr.ngRequired,\n        'required': attr.required\n      }, function(value, name) {\n        if (isDefined(value)) {\n          input.attr(name, value);\n        }\n      });\n      var checkboxWrapper = element[0].querySelector('.checkbox');\n      checkboxWrapper.classList.add('checkbox-' + $ionicConfig.form.checkbox());\n    }\n  };\n}]);\n\n\n/**\n * @ngdoc directive\n * @restrict A\n * @name collectionRepeat\n * @module ionic\n * @codepen 7ec1ec58f2489ab8f359fa1a0fe89c15\n * @description\n * `collection-repeat` allows an app to show huge lists of items much more performantly than\n * `ng-repeat`.\n *\n * It renders into the DOM only as many items as are currently visible.\n *\n * This means that on a phone screen that can fit eight items, only the eight items matching\n * the current scroll position will be rendered.\n *\n * **The Basics**:\n *\n * - The data given to collection-repeat must be an array.\n * - If the `item-height` and `item-width` attributes are not supplied, it will be assumed that\n *   every item in the list has the same dimensions as the first item.\n * - Don't use angular one-time binding (`::`) with collection-repeat. The scope of each item is\n *   assigned new data and re-digested as you scroll. Bindings need to update, and one-time bindings\n *   won't.\n *\n * **Performance Tips**:\n *\n * - The iOS webview has a performance bottleneck when switching out `<img src>` attributes.\n *   To increase performance of images on iOS, cache your images in advance and,\n *   if possible, lower the number of unique images. We're working on [a solution](https://github.com/ionic-team/ionic/issues/3194).\n *\n * @usage\n * #### Basic Item List ([codepen](http://codepen.io/ionic/pen/0c2c35a34a8b18ad4d793fef0b081693))\n * ```html\n * <ion-content>\n *   <ion-item collection-repeat=\"item in items\">\n *     {% raw %}{{item}}{% endraw %}\n *   </ion-item>\n * </ion-content>\n * ```\n *\n * #### Grid of Images ([codepen](http://codepen.io/ionic/pen/5515d4efd9d66f780e96787387f41664))\n * ```html\n * <ion-content>\n *   <img collection-repeat=\"photo in photos\"\n *     item-width=\"33%\"\n *     item-height=\"200px\"\n *     ng-src=\"{% raw %}{{photo.url}}{% endraw %}\">\n * </ion-content>\n * ```\n *\n * #### Horizontal Scroller, Dynamic Item Width ([codepen](http://codepen.io/ionic/pen/67cc56b349124a349acb57a0740e030e))\n * ```html\n * <ion-content>\n *   <h2>Available Kittens:</h2>\n *   <ion-scroll direction=\"x\" class=\"available-scroller\">\n *     <div class=\"photo\" collection-repeat=\"photo in main.photos\"\n *        item-height=\"250\" item-width=\"photo.width + 30\">\n *        <img ng-src=\"{% raw %}{{photo.src}}{% endraw %}\">\n *     </div>\n *   </ion-scroll>\n * </ion-content>\n * ```\n *\n * @param {expression} collection-repeat The expression indicating how to enumerate a collection,\n *   of the format  `variable in expression` – where variable is the user defined loop variable\n *   and `expression` is a scope expression giving the collection to enumerate.\n *   For example: `album in artist.albums` or `album in artist.albums | orderBy:'name'`.\n * @param {expression=} item-width The width of the repeated element. The expression must return\n *   a number (pixels) or a percentage. Defaults to the width of the first item in the list.\n *   (previously named collection-item-width)\n * @param {expression=} item-height The height of the repeated element. The expression must return\n *   a number (pixels) or a percentage. Defaults to the height of the first item in the list.\n *   (previously named collection-item-height)\n * @param {number=} item-render-buffer The number of items to load before and after the visible\n *   items in the list. Default 3. Tip: set this higher if you have lots of images to preload, but\n *   don't set it too high or you'll see performance loss.\n * @param {boolean=} force-refresh-images Force images to refresh as you scroll. This fixes a problem\n *   where, when an element is interchanged as scrolling, its image will still have the old src\n *   while the new src loads. Setting this to true comes with a small performance loss.\n */\n\nIonicModule\n.directive('collectionRepeat', CollectionRepeatDirective)\n.factory('$ionicCollectionManager', RepeatManagerFactory);\n\nvar ONE_PX_TRANSPARENT_IMG_SRC = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';\nvar WIDTH_HEIGHT_REGEX = /height:.*?px;\\s*width:.*?px/;\nvar DEFAULT_RENDER_BUFFER = 3;\n\nCollectionRepeatDirective.$inject = ['$ionicCollectionManager', '$parse', '$window', '$$rAF', '$rootScope', '$timeout'];\nfunction CollectionRepeatDirective($ionicCollectionManager, $parse, $window, $$rAF, $rootScope, $timeout) {\n  return {\n    restrict: 'A',\n    priority: 1000,\n    transclude: 'element',\n    $$tlb: true,\n    require: '^^$ionicScroll',\n    link: postLink\n  };\n\n  function postLink(scope, element, attr, scrollCtrl, transclude) {\n    var scrollView = scrollCtrl.scrollView;\n    var node = element[0];\n    var containerNode = angular.element('<div class=\"collection-repeat-container\">')[0];\n    node.parentNode.replaceChild(containerNode, node);\n\n    if (scrollView.options.scrollingX && scrollView.options.scrollingY) {\n      throw new Error(\"collection-repeat expected a parent x or y scrollView, not \" +\n                      \"an xy scrollView.\");\n    }\n\n    var repeatExpr = attr.collectionRepeat;\n    var match = repeatExpr.match(/^\\s*([\\s\\S]+?)\\s+in\\s+([\\s\\S]+?)(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/);\n    if (!match) {\n      throw new Error(\"collection-repeat expected expression in form of '_item_ in \" +\n                      \"_collection_[ track by _id_]' but got '\" + attr.collectionRepeat + \"'.\");\n    }\n    var keyExpr = match[1];\n    var listExpr = match[2];\n    var listGetter = $parse(listExpr);\n    var heightData = {};\n    var widthData = {};\n    var computedStyleDimensions = {};\n    var data = [];\n    var repeatManager;\n\n    // attr.collectionBufferSize is deprecated\n    var renderBufferExpr = attr.itemRenderBuffer || attr.collectionBufferSize;\n    var renderBuffer = angular.isDefined(renderBufferExpr) ?\n      parseInt(renderBufferExpr) :\n      DEFAULT_RENDER_BUFFER;\n\n    // attr.collectionItemHeight is deprecated\n    var heightExpr = attr.itemHeight || attr.collectionItemHeight;\n    // attr.collectionItemWidth is deprecated\n    var widthExpr = attr.itemWidth || attr.collectionItemWidth;\n\n    var afterItemsContainer = initAfterItemsContainer();\n\n    var changeValidator = makeChangeValidator();\n    initDimensions();\n\n    // Dimensions are refreshed on resize or data change.\n    scrollCtrl.$element.on('scroll-resize', refreshDimensions);\n\n    angular.element($window).on('resize', onResize);\n    var unlistenToExposeAside = $rootScope.$on('$ionicExposeAside', ionic.animationFrameThrottle(function() {\n      scrollCtrl.scrollView.resize();\n      onResize();\n    }));\n    $timeout(refreshDimensions, 0, false);\n\n    function onResize() {\n      if (changeValidator.resizeRequiresRefresh(scrollView.__clientWidth, scrollView.__clientHeight)) {\n        refreshDimensions();\n      }\n    }\n\n    scope.$watchCollection(listGetter, function(newValue) {\n      data = newValue || (newValue = []);\n      if (!angular.isArray(newValue)) {\n        throw new Error(\"collection-repeat expected an array for '\" + listExpr + \"', \" +\n          \"but got a \" + typeof value);\n      }\n      // Wait for this digest to end before refreshing everything.\n      scope.$$postDigest(function() {\n        getRepeatManager().setData(data);\n        if (changeValidator.dataChangeRequiresRefresh(data)) refreshDimensions();\n      });\n    });\n\n    scope.$on('$destroy', function() {\n      angular.element($window).off('resize', onResize);\n      unlistenToExposeAside();\n      scrollCtrl.$element && scrollCtrl.$element.off('scroll-resize', refreshDimensions);\n\n      computedStyleNode && computedStyleNode.parentNode &&\n        computedStyleNode.parentNode.removeChild(computedStyleNode);\n      computedStyleScope && computedStyleScope.$destroy();\n      computedStyleScope = computedStyleNode = null;\n\n      repeatManager && repeatManager.destroy();\n      repeatManager = null;\n    });\n\n    function makeChangeValidator() {\n      var self;\n      return (self = {\n        dataLength: 0,\n        width: 0,\n        height: 0,\n        // A resize triggers a refresh only if we have data, the scrollView has size,\n        // and the size has changed.\n        resizeRequiresRefresh: function(newWidth, newHeight) {\n          var requiresRefresh = self.dataLength && newWidth && newHeight &&\n            (newWidth !== self.width || newHeight !== self.height);\n\n          self.width = newWidth;\n          self.height = newHeight;\n\n          return !!requiresRefresh;\n        },\n        // A change in data only triggers a refresh if the data has length, or if the data's\n        // length is less than before.\n        dataChangeRequiresRefresh: function(newData) {\n          var requiresRefresh = newData.length > 0 || newData.length < self.dataLength;\n\n          self.dataLength = newData.length;\n\n          return !!requiresRefresh;\n        }\n      });\n    }\n\n    function getRepeatManager() {\n      return repeatManager || (repeatManager = new $ionicCollectionManager({\n        afterItemsNode: afterItemsContainer[0],\n        containerNode: containerNode,\n        heightData: heightData,\n        widthData: widthData,\n        forceRefreshImages: !!(isDefined(attr.forceRefreshImages) && attr.forceRefreshImages !== 'false'),\n        keyExpression: keyExpr,\n        renderBuffer: renderBuffer,\n        scope: scope,\n        scrollView: scrollCtrl.scrollView,\n        transclude: transclude\n      }));\n    }\n\n    function initAfterItemsContainer() {\n      var container = angular.element(\n        scrollView.__content.querySelector('.collection-repeat-after-container')\n      );\n      // Put everything in the view after the repeater into a container.\n      if (!container.length) {\n        var elementIsAfterRepeater = false;\n        var afterNodes = [].filter.call(scrollView.__content.childNodes, function(node) {\n          if (ionic.DomUtil.contains(node, containerNode)) {\n            elementIsAfterRepeater = true;\n            return false;\n          }\n          return elementIsAfterRepeater;\n        });\n        container = angular.element('<span class=\"collection-repeat-after-container\">');\n        if (scrollView.options.scrollingX) {\n          container.addClass('horizontal');\n        }\n        container.append(afterNodes);\n        scrollView.__content.appendChild(container[0]);\n      }\n      return container;\n    }\n\n    function initDimensions() {\n      //Height and width have four 'modes':\n      //1) Computed Mode\n      //  - Nothing is supplied, so we getComputedStyle() on one element in the list and use\n      //    that width and height value for the width and height of every item. This is re-computed\n      //    every resize.\n      //2) Constant Mode, Static Integer\n      //  - The user provides a constant number for width or height, in pixels. We parse it,\n      //    store it on the `value` field, and it never changes\n      //3) Constant Mode, Percent\n      //  - The user provides a percent string for width or height. The getter for percent is\n      //    stored on the `getValue()` field, and is re-evaluated once every resize. The result\n      //    is stored on the `value` field.\n      //4) Dynamic Mode\n      //  - The user provides a dynamic expression for the width or height.  This is re-evaluated\n      //    for every item, stored on the `.getValue()` field.\n      if (heightExpr) {\n        parseDimensionAttr(heightExpr, heightData);\n      } else {\n        heightData.computed = true;\n      }\n      if (widthExpr) {\n        parseDimensionAttr(widthExpr, widthData);\n      } else {\n        widthData.computed = true;\n      }\n    }\n\n    function refreshDimensions() {\n      var hasData = data.length > 0;\n\n      if (hasData && (heightData.computed || widthData.computed)) {\n        computeStyleDimensions();\n      }\n\n      if (hasData && heightData.computed) {\n        heightData.value = computedStyleDimensions.height;\n        if (!heightData.value) {\n          throw new Error('collection-repeat tried to compute the height of repeated elements \"' +\n            repeatExpr + '\", but was unable to. Please provide the \"item-height\" attribute. ' +\n            'http://ionicframework.com/docs/api/directive/collectionRepeat/');\n        }\n      } else if (!heightData.dynamic && heightData.getValue) {\n        // If it's a constant with a getter (eg percent), we just refresh .value after resize\n        heightData.value = heightData.getValue();\n      }\n\n      if (hasData && widthData.computed) {\n        widthData.value = computedStyleDimensions.width;\n        if (!widthData.value) {\n          throw new Error('collection-repeat tried to compute the width of repeated elements \"' +\n            repeatExpr + '\", but was unable to. Please provide the \"item-width\" attribute. ' +\n            'http://ionicframework.com/docs/api/directive/collectionRepeat/');\n        }\n      } else if (!widthData.dynamic && widthData.getValue) {\n        // If it's a constant with a getter (eg percent), we just refresh .value after resize\n        widthData.value = widthData.getValue();\n      }\n      // Dynamic dimensions aren't updated on resize. Since they're already dynamic anyway,\n      // .getValue() will be used.\n\n      getRepeatManager().refreshLayout();\n    }\n\n    function parseDimensionAttr(attrValue, dimensionData) {\n      if (!attrValue) return;\n\n      var parsedValue;\n      // Try to just parse the plain attr value\n      try {\n        parsedValue = $parse(attrValue);\n      } catch (e) {\n        // If the parse fails and the value has `px` or `%` in it, surround the attr in\n        // quotes, to attempt to let the user provide a simple `attr=\"100%\"` or `attr=\"100px\"`\n        if (attrValue.trim().match(/\\d+(px|%)$/)) {\n          attrValue = '\"' + attrValue + '\"';\n        }\n        parsedValue = $parse(attrValue);\n      }\n\n      var constantAttrValue = attrValue.replace(/(\\'|\\\"|px|%)/g, '').trim();\n      var isConstant = constantAttrValue.length && !/([a-zA-Z]|\\$|:|\\?)/.test(constantAttrValue);\n      dimensionData.attrValue = attrValue;\n\n      // If it's a constant, it's either a percent or just a constant pixel number.\n      if (isConstant) {\n        // For percents, store the percent getter on .getValue()\n        if (attrValue.indexOf('%') > -1) {\n          var decimalValue = parseFloat(parsedValue()) / 100;\n          dimensionData.getValue = dimensionData === heightData ?\n            function() { return Math.floor(decimalValue * scrollView.__clientHeight); } :\n            function() { return Math.floor(decimalValue * scrollView.__clientWidth); };\n        } else {\n          // For static constants, just store the static constant.\n          dimensionData.value = parseInt(parsedValue());\n        }\n\n      } else {\n        dimensionData.dynamic = true;\n        dimensionData.getValue = dimensionData === heightData ?\n          function heightGetter(scope, locals) {\n            var result = parsedValue(scope, locals);\n            if (result.charAt && result.charAt(result.length - 1) === '%') {\n              return Math.floor(parseFloat(result) / 100 * scrollView.__clientHeight);\n            }\n            return parseInt(result);\n          } :\n          function widthGetter(scope, locals) {\n            var result = parsedValue(scope, locals);\n            if (result.charAt && result.charAt(result.length - 1) === '%') {\n              return Math.floor(parseFloat(result) / 100 * scrollView.__clientWidth);\n            }\n            return parseInt(result);\n          };\n      }\n    }\n\n    var computedStyleNode;\n    var computedStyleScope;\n    function computeStyleDimensions() {\n      if (!computedStyleNode) {\n        transclude(computedStyleScope = scope.$new(), function(clone) {\n          clone[0].removeAttribute('collection-repeat'); // remove absolute position styling\n          computedStyleNode = clone[0];\n        });\n      }\n\n      computedStyleScope[keyExpr] = (listGetter(scope) || [])[0];\n      if (!$rootScope.$$phase) computedStyleScope.$digest();\n      containerNode.appendChild(computedStyleNode);\n\n      var style = $window.getComputedStyle(computedStyleNode);\n      computedStyleDimensions.width = parseInt(style.width);\n      computedStyleDimensions.height = parseInt(style.height);\n\n      containerNode.removeChild(computedStyleNode);\n    }\n\n  }\n\n}\n\nRepeatManagerFactory.$inject = ['$rootScope', '$window', '$$rAF'];\nfunction RepeatManagerFactory($rootScope, $window, $$rAF) {\n  var EMPTY_DIMENSION = { primaryPos: 0, secondaryPos: 0, primarySize: 0, secondarySize: 0, rowPrimarySize: 0 };\n\n  return function RepeatController(options) {\n    var afterItemsNode = options.afterItemsNode;\n    var containerNode = options.containerNode;\n    var forceRefreshImages = options.forceRefreshImages;\n    var heightData = options.heightData;\n    var widthData = options.widthData;\n    var keyExpression = options.keyExpression;\n    var renderBuffer = options.renderBuffer;\n    var scope = options.scope;\n    var scrollView = options.scrollView;\n    var transclude = options.transclude;\n\n    var data = [];\n\n    var getterLocals = {};\n    var heightFn = heightData.getValue || function() { return heightData.value; };\n    var heightGetter = function(index, value) {\n      getterLocals[keyExpression] = value;\n      getterLocals.$index = index;\n      return heightFn(scope, getterLocals);\n    };\n\n    var widthFn = widthData.getValue || function() { return widthData.value; };\n    var widthGetter = function(index, value) {\n      getterLocals[keyExpression] = value;\n      getterLocals.$index = index;\n      return widthFn(scope, getterLocals);\n    };\n\n    var isVertical = !!scrollView.options.scrollingY;\n\n    // We say it's a grid view if we're either dynamic or not 100% width\n    var isGridView = isVertical ?\n      (widthData.dynamic || widthData.value !== scrollView.__clientWidth) :\n      (heightData.dynamic || heightData.value !== scrollView.__clientHeight);\n\n    var isStaticView = !heightData.dynamic && !widthData.dynamic;\n\n    var PRIMARY = 'PRIMARY';\n    var SECONDARY = 'SECONDARY';\n    var TRANSLATE_TEMPLATE_STR = isVertical ?\n      'translate3d(SECONDARYpx,PRIMARYpx,0)' :\n      'translate3d(PRIMARYpx,SECONDARYpx,0)';\n    var WIDTH_HEIGHT_TEMPLATE_STR = isVertical ?\n      'height: PRIMARYpx; width: SECONDARYpx;' :\n      'height: SECONDARYpx; width: PRIMARYpx;';\n\n    var estimatedHeight;\n    var estimatedWidth;\n\n    var repeaterBeforeSize = 0;\n    var repeaterAfterSize = 0;\n\n    var renderStartIndex = -1;\n    var renderEndIndex = -1;\n    var renderAfterBoundary = -1;\n    var renderBeforeBoundary = -1;\n\n    var itemsPool = [];\n    var itemsLeaving = [];\n    var itemsEntering = [];\n    var itemsShownMap = {};\n    var nextItemId = 0;\n\n    var scrollViewSetDimensions = isVertical ?\n      function() { scrollView.setDimensions(null, null, null, view.getContentSize(), true); } :\n      function() { scrollView.setDimensions(null, null, view.getContentSize(), null, true); };\n\n    // view is a mix of list/grid methods + static/dynamic methods.\n    // See bottom for implementations. Available methods:\n    //\n    // getEstimatedPrimaryPos(i), getEstimatedSecondaryPos(i), getEstimatedIndex(scrollTop),\n    // calculateDimensions(toIndex), getDimensions(index),\n    // updateRenderRange(scrollTop, scrollValueEnd), onRefreshLayout(), onRefreshData()\n    var view = isVertical ? new VerticalViewType() : new HorizontalViewType();\n    (isGridView ? GridViewType : ListViewType).call(view);\n    (isStaticView ? StaticViewType : DynamicViewType).call(view);\n\n    var contentSizeStr = isVertical ? 'getContentHeight' : 'getContentWidth';\n    var originalGetContentSize = scrollView.options[contentSizeStr];\n    scrollView.options[contentSizeStr] = angular.bind(view, view.getContentSize);\n\n    scrollView.__$callback = scrollView.__callback;\n    scrollView.__callback = function(transformLeft, transformTop, zoom, wasResize) {\n      var scrollValue = view.getScrollValue();\n      if (renderStartIndex === -1 ||\n          scrollValue + view.scrollPrimarySize > renderAfterBoundary ||\n          scrollValue < renderBeforeBoundary) {\n        render();\n      }\n      scrollView.__$callback(transformLeft, transformTop, zoom, wasResize);\n    };\n\n    var isLayoutReady = false;\n    var isDataReady = false;\n    this.refreshLayout = function() {\n      if (data.length) {\n        estimatedHeight = heightGetter(0, data[0]);\n        estimatedWidth = widthGetter(0, data[0]);\n      } else {\n        // If we don't have any data in our array, just guess.\n        estimatedHeight = 100;\n        estimatedWidth = 100;\n      }\n\n      // Get the size of every element AFTER the repeater. We have to get the margin before and\n      // after the first/last element to fix a browser bug with getComputedStyle() not counting\n      // the first/last child's margins into height.\n      var style = getComputedStyle(afterItemsNode) || {};\n      var firstStyle = afterItemsNode.firstElementChild && getComputedStyle(afterItemsNode.firstElementChild) || {};\n      var lastStyle = afterItemsNode.lastElementChild && getComputedStyle(afterItemsNode.lastElementChild) || {};\n      repeaterAfterSize = (parseInt(style[isVertical ? 'height' : 'width']) || 0) +\n        (firstStyle && parseInt(firstStyle[isVertical ? 'marginTop' : 'marginLeft']) || 0) +\n        (lastStyle && parseInt(lastStyle[isVertical ? 'marginBottom' : 'marginRight']) || 0);\n\n      // Get the offsetTop of the repeater.\n      repeaterBeforeSize = 0;\n      var current = containerNode;\n      do {\n        repeaterBeforeSize += current[isVertical ? 'offsetTop' : 'offsetLeft'];\n      } while ( ionic.DomUtil.contains(scrollView.__content, current = current.offsetParent) );\n\n      var containerPrevNode = containerNode.previousElementSibling;\n      var beforeStyle = containerPrevNode ? $window.getComputedStyle(containerPrevNode) : {};\n      var beforeMargin = parseInt(beforeStyle[isVertical ? 'marginBottom' : 'marginRight'] || 0);\n\n      // Because we position the collection container with position: relative, it doesn't take\n      // into account where to position itself relative to the previous element's marginBottom.\n      // To compensate, we translate the container up by the previous element's margin.\n      containerNode.style[ionic.CSS.TRANSFORM] = TRANSLATE_TEMPLATE_STR\n        .replace(PRIMARY, -beforeMargin)\n        .replace(SECONDARY, 0);\n      repeaterBeforeSize -= beforeMargin;\n\n      if (!scrollView.__clientHeight || !scrollView.__clientWidth) {\n        scrollView.__clientWidth = scrollView.__container.clientWidth;\n        scrollView.__clientHeight = scrollView.__container.clientHeight;\n      }\n\n      (view.onRefreshLayout || angular.noop)();\n      view.refreshDirection();\n      scrollViewSetDimensions();\n\n      // Create the pool of items for reuse, setting the size to (estimatedItemsOnScreen) * 2,\n      // plus the size of the renderBuffer.\n      if (!isLayoutReady) {\n        var poolSize = Math.max(20, renderBuffer * 3);\n        for (var i = 0; i < poolSize; i++) {\n          itemsPool.push(new RepeatItem());\n        }\n      }\n\n      isLayoutReady = true;\n      if (isLayoutReady && isDataReady) {\n        // If the resize or latest data change caused the scrollValue to\n        // now be out of bounds, resize the scrollView.\n        if (scrollView.__scrollLeft > scrollView.__maxScrollLeft ||\n            scrollView.__scrollTop > scrollView.__maxScrollTop) {\n          scrollView.resize();\n        }\n        forceRerender(true);\n      }\n    };\n\n    this.setData = function(newData) {\n      data = newData;\n      (view.onRefreshData || angular.noop)();\n      isDataReady = true;\n    };\n\n    this.destroy = function() {\n      render.destroyed = true;\n\n      itemsPool.forEach(function(item) {\n        item.scope.$destroy();\n        item.scope = item.element = item.node = item.images = null;\n      });\n      itemsPool.length = itemsEntering.length = itemsLeaving.length = 0;\n      itemsShownMap = {};\n\n      //Restore the scrollView's normal behavior and resize it to normal size.\n      scrollView.options[contentSizeStr] = originalGetContentSize;\n      scrollView.__callback = scrollView.__$callback;\n      scrollView.resize();\n\n      (view.onDestroy || angular.noop)();\n    };\n\n    function forceRerender() {\n      return render(true);\n    }\n    function render(forceRerender) {\n      if (render.destroyed) return;\n      var i;\n      var ii;\n      var item;\n      var dim;\n      var scope;\n      var scrollValue = view.getScrollValue();\n      var scrollValueEnd = scrollValue + view.scrollPrimarySize;\n\n      view.updateRenderRange(scrollValue, scrollValueEnd);\n\n      renderStartIndex = Math.max(0, renderStartIndex - renderBuffer);\n      renderEndIndex = Math.min(data.length - 1, renderEndIndex + renderBuffer);\n\n      for (i in itemsShownMap) {\n        if (i < renderStartIndex || i > renderEndIndex) {\n          item = itemsShownMap[i];\n          delete itemsShownMap[i];\n          itemsLeaving.push(item);\n          item.isShown = false;\n        }\n      }\n\n      // Render indicies that aren't shown yet\n      //\n      // NOTE(ajoslin): this may sound crazy, but calling any other functions during this render\n      // loop will often push the render time over the edge from less than one frame to over\n      // one frame, causing visible jank.\n      // DON'T call any other functions inside this loop unless it's vital.\n      for (i = renderStartIndex; i <= renderEndIndex; i++) {\n        // We only go forward with render if the index is in data, the item isn't already shown,\n        // or forceRerender is on.\n        if (i >= data.length || (itemsShownMap[i] && !forceRerender)) continue;\n\n        item = itemsShownMap[i] || (itemsShownMap[i] = itemsLeaving.length ? itemsLeaving.pop() :\n                                    itemsPool.length ? itemsPool.shift() :\n                                    new RepeatItem());\n        itemsEntering.push(item);\n        item.isShown = true;\n\n        scope = item.scope;\n        scope.$index = i;\n        scope[keyExpression] = data[i];\n        scope.$first = (i === 0);\n        scope.$last = (i === (data.length - 1));\n        scope.$middle = !(scope.$first || scope.$last);\n        scope.$odd = !(scope.$even = (i & 1) === 0);\n\n        if (scope.$$disconnected) ionic.Utils.reconnectScope(item.scope);\n\n        dim = view.getDimensions(i);\n        if (item.secondaryPos !== dim.secondaryPos || item.primaryPos !== dim.primaryPos) {\n          item.node.style[ionic.CSS.TRANSFORM] = TRANSLATE_TEMPLATE_STR\n            .replace(PRIMARY, (item.primaryPos = dim.primaryPos))\n            .replace(SECONDARY, (item.secondaryPos = dim.secondaryPos));\n        }\n        if (item.secondarySize !== dim.secondarySize || item.primarySize !== dim.primarySize) {\n          item.node.style.cssText = item.node.style.cssText\n            .replace(WIDTH_HEIGHT_REGEX, WIDTH_HEIGHT_TEMPLATE_STR\n              //TODO fix item.primarySize + 1 hack\n              .replace(PRIMARY, (item.primarySize = dim.primarySize) + 1)\n              .replace(SECONDARY, (item.secondarySize = dim.secondarySize))\n            );\n        }\n\n      }\n\n      // If we reach the end of the list, render the afterItemsNode - this contains all the\n      // elements the developer placed after the collection-repeat\n      if (renderEndIndex === data.length - 1) {\n        dim = view.getDimensions(data.length - 1) || EMPTY_DIMENSION;\n        afterItemsNode.style[ionic.CSS.TRANSFORM] = TRANSLATE_TEMPLATE_STR\n          .replace(PRIMARY, dim.primaryPos + dim.primarySize)\n          .replace(SECONDARY, 0);\n      }\n\n      while (itemsLeaving.length) {\n        item = itemsLeaving.pop();\n        item.scope.$broadcast('$collectionRepeatLeave');\n        ionic.Utils.disconnectScope(item.scope);\n        itemsPool.push(item);\n        item.node.style[ionic.CSS.TRANSFORM] = 'translate3d(-9999px,-9999px,0)';\n        item.primaryPos = item.secondaryPos = null;\n      }\n\n      if (forceRefreshImages) {\n        for (i = 0, ii = itemsEntering.length; i < ii && (item = itemsEntering[i]); i++) {\n          if (!item.images) continue;\n          for (var j = 0, jj = item.images.length, img; j < jj && (img = item.images[j]); j++) {\n            var src = img.src;\n            img.src = ONE_PX_TRANSPARENT_IMG_SRC;\n            img.src = src;\n          }\n        }\n      }\n      if (forceRerender) {\n        var rootScopePhase = $rootScope.$$phase;\n        while (itemsEntering.length) {\n          item = itemsEntering.pop();\n          if (!rootScopePhase) item.scope.$digest();\n        }\n      } else {\n        digestEnteringItems();\n      }\n    }\n\n    function digestEnteringItems() {\n      var item;\n      if (digestEnteringItems.running) return;\n      digestEnteringItems.running = true;\n\n      $$rAF(function process() {\n        var rootScopePhase = $rootScope.$$phase;\n        while (itemsEntering.length) {\n          item = itemsEntering.pop();\n          if (item.isShown) {\n            if (!rootScopePhase) item.scope.$digest();\n          }\n        }\n        digestEnteringItems.running = false;\n      });\n    }\n\n    function RepeatItem() {\n      var self = this;\n      this.scope = scope.$new();\n      this.id = 'item' + (nextItemId++);\n      transclude(this.scope, function(clone) {\n        self.element = clone;\n        self.element.data('$$collectionRepeatItem', self);\n        // TODO destroy\n        self.node = clone[0];\n        // Batch style setting to lower repaints\n        self.node.style[ionic.CSS.TRANSFORM] = 'translate3d(-9999px,-9999px,0)';\n        self.node.style.cssText += ' height: 0px; width: 0px;';\n        ionic.Utils.disconnectScope(self.scope);\n        containerNode.appendChild(self.node);\n        self.images = clone[0].getElementsByTagName('img');\n      });\n    }\n\n    function VerticalViewType() {\n      this.getItemPrimarySize = heightGetter;\n      this.getItemSecondarySize = widthGetter;\n\n      this.getScrollValue = function() {\n        return Math.max(0, Math.min(scrollView.__scrollTop - repeaterBeforeSize,\n          scrollView.__maxScrollTop - repeaterBeforeSize - repeaterAfterSize));\n      };\n\n      this.refreshDirection = function() {\n        this.scrollPrimarySize = scrollView.__clientHeight;\n        this.scrollSecondarySize = scrollView.__clientWidth;\n\n        this.estimatedPrimarySize = estimatedHeight;\n        this.estimatedSecondarySize = estimatedWidth;\n        this.estimatedItemsAcross = isGridView &&\n          Math.floor(scrollView.__clientWidth / estimatedWidth) ||\n          1;\n      };\n    }\n    function HorizontalViewType() {\n      this.getItemPrimarySize = widthGetter;\n      this.getItemSecondarySize = heightGetter;\n\n      this.getScrollValue = function() {\n        return Math.max(0, Math.min(scrollView.__scrollLeft - repeaterBeforeSize,\n          scrollView.__maxScrollLeft - repeaterBeforeSize - repeaterAfterSize));\n      };\n\n      this.refreshDirection = function() {\n        this.scrollPrimarySize = scrollView.__clientWidth;\n        this.scrollSecondarySize = scrollView.__clientHeight;\n\n        this.estimatedPrimarySize = estimatedWidth;\n        this.estimatedSecondarySize = estimatedHeight;\n        this.estimatedItemsAcross = isGridView &&\n          Math.floor(scrollView.__clientHeight / estimatedHeight) ||\n          1;\n      };\n    }\n\n    function GridViewType() {\n      this.getEstimatedSecondaryPos = function(index) {\n        return (index % this.estimatedItemsAcross) * this.estimatedSecondarySize;\n      };\n      this.getEstimatedPrimaryPos = function(index) {\n        return Math.floor(index / this.estimatedItemsAcross) * this.estimatedPrimarySize;\n      };\n      this.getEstimatedIndex = function(scrollValue) {\n        return Math.floor(scrollValue / this.estimatedPrimarySize) *\n          this.estimatedItemsAcross;\n      };\n    }\n\n    function ListViewType() {\n      this.getEstimatedSecondaryPos = function() {\n        return 0;\n      };\n      this.getEstimatedPrimaryPos = function(index) {\n        return index * this.estimatedPrimarySize;\n      };\n      this.getEstimatedIndex = function(scrollValue) {\n        return Math.floor((scrollValue) / this.estimatedPrimarySize);\n      };\n    }\n\n    function StaticViewType() {\n      this.getContentSize = function() {\n        return this.getEstimatedPrimaryPos(data.length - 1) + this.estimatedPrimarySize +\n          repeaterBeforeSize + repeaterAfterSize;\n      };\n      // static view always returns the same object for getDimensions, to avoid memory allocation\n      // while scrolling. This could be dangerous if this was a public function, but it's not.\n      // Only we use it.\n      var dim = {};\n      this.getDimensions = function(index) {\n        dim.primaryPos = this.getEstimatedPrimaryPos(index);\n        dim.secondaryPos = this.getEstimatedSecondaryPos(index);\n        dim.primarySize = this.estimatedPrimarySize;\n        dim.secondarySize = this.estimatedSecondarySize;\n        return dim;\n      };\n      this.updateRenderRange = function(scrollValue, scrollValueEnd) {\n        renderStartIndex = Math.max(0, this.getEstimatedIndex(scrollValue));\n\n        // Make sure the renderEndIndex takes into account all the items on the row\n        renderEndIndex = Math.min(data.length - 1,\n          this.getEstimatedIndex(scrollValueEnd) + this.estimatedItemsAcross - 1);\n\n        renderBeforeBoundary = Math.max(0,\n          this.getEstimatedPrimaryPos(renderStartIndex));\n        renderAfterBoundary = this.getEstimatedPrimaryPos(renderEndIndex) +\n          this.estimatedPrimarySize;\n      };\n    }\n\n    function DynamicViewType() {\n      var self = this;\n      var debouncedScrollViewSetDimensions = ionic.debounce(scrollViewSetDimensions, 25, true);\n      var calculateDimensions = isGridView ? calculateDimensionsGrid : calculateDimensionsList;\n      var dimensionsIndex;\n      var dimensions = [];\n\n\n      // Get the dimensions at index. {width, height, left, top}.\n      // We start with no dimensions calculated, then any time dimensions are asked for at an\n      // index we calculate dimensions up to there.\n      function calculateDimensionsList(toIndex) {\n        var i, prevDimension, dim;\n        for (i = Math.max(0, dimensionsIndex); i <= toIndex && (dim = dimensions[i]); i++) {\n          prevDimension = dimensions[i - 1] || EMPTY_DIMENSION;\n          dim.primarySize = self.getItemPrimarySize(i, data[i]);\n          dim.secondarySize = self.scrollSecondarySize;\n          dim.primaryPos = prevDimension.primaryPos + prevDimension.primarySize;\n          dim.secondaryPos = 0;\n        }\n      }\n      function calculateDimensionsGrid(toIndex) {\n        var i, prevDimension, dim;\n        for (i = Math.max(dimensionsIndex, 0); i <= toIndex && (dim = dimensions[i]); i++) {\n          prevDimension = dimensions[i - 1] || EMPTY_DIMENSION;\n          dim.secondarySize = Math.min(\n            self.getItemSecondarySize(i, data[i]),\n            self.scrollSecondarySize\n          );\n          dim.secondaryPos = prevDimension.secondaryPos + prevDimension.secondarySize;\n\n          if (i === 0 || dim.secondaryPos + dim.secondarySize > self.scrollSecondarySize) {\n            dim.secondaryPos = 0;\n            dim.primarySize = self.getItemPrimarySize(i, data[i]);\n            dim.primaryPos = prevDimension.primaryPos + prevDimension.rowPrimarySize;\n\n            dim.rowStartIndex = i;\n            dim.rowPrimarySize = dim.primarySize;\n          } else {\n            dim.primarySize = self.getItemPrimarySize(i, data[i]);\n            dim.primaryPos = prevDimension.primaryPos;\n            dim.rowStartIndex = prevDimension.rowStartIndex;\n\n            dimensions[dim.rowStartIndex].rowPrimarySize = dim.rowPrimarySize = Math.max(\n              dimensions[dim.rowStartIndex].rowPrimarySize,\n              dim.primarySize\n            );\n            dim.rowPrimarySize = Math.max(dim.primarySize, dim.rowPrimarySize);\n          }\n        }\n      }\n\n      this.getContentSize = function() {\n        var dim = dimensions[dimensionsIndex] || EMPTY_DIMENSION;\n        return ((dim.primaryPos + dim.primarySize) || 0) +\n          this.getEstimatedPrimaryPos(data.length - dimensionsIndex - 1) +\n          repeaterBeforeSize + repeaterAfterSize;\n      };\n      this.onDestroy = function() {\n        dimensions.length = 0;\n      };\n\n      this.onRefreshData = function() {\n        var i;\n        var ii;\n        // Make sure dimensions has as many items as data.length.\n        // This is to be sure we don't have to allocate objects while scrolling.\n        for (i = dimensions.length, ii = data.length; i < ii; i++) {\n          dimensions.push({});\n        }\n        dimensionsIndex = -1;\n      };\n      this.onRefreshLayout = function() {\n        dimensionsIndex = -1;\n      };\n      this.getDimensions = function(index) {\n        index = Math.min(index, data.length - 1);\n\n        if (dimensionsIndex < index) {\n          // Once we start asking for dimensions near the end of the list, go ahead and calculate\n          // everything. This is to make sure when the user gets to the end of the list, the\n          // scroll height of the list is 100% accurate (not estimated anymore).\n          if (index > data.length * 0.9) {\n            calculateDimensions(data.length - 1);\n            dimensionsIndex = data.length - 1;\n            scrollViewSetDimensions();\n          } else {\n            calculateDimensions(index);\n            dimensionsIndex = index;\n            debouncedScrollViewSetDimensions();\n          }\n\n        }\n        return dimensions[index];\n      };\n\n      var oldRenderStartIndex = -1;\n      var oldScrollValue = -1;\n      this.updateRenderRange = function(scrollValue, scrollValueEnd) {\n        var i;\n        var len;\n        var dim;\n\n        // Calculate more dimensions than we estimate we'll need, to be sure.\n        this.getDimensions( this.getEstimatedIndex(scrollValueEnd) * 2 );\n\n        // -- Calculate renderStartIndex\n        // base case: start at 0\n        if (oldRenderStartIndex === -1 || scrollValue === 0) {\n          i = 0;\n        // scrolling down\n        } else if (scrollValue >= oldScrollValue) {\n          for (i = oldRenderStartIndex, len = data.length; i < len; i++) {\n            if ((dim = this.getDimensions(i)) && dim.primaryPos + dim.rowPrimarySize >= scrollValue) {\n              break;\n            }\n          }\n        // scrolling up\n        } else {\n          for (i = oldRenderStartIndex; i >= 0; i--) {\n            if ((dim = this.getDimensions(i)) && dim.primaryPos <= scrollValue) {\n              // when grid view, make sure the render starts at the beginning of a row.\n              i = isGridView ? dim.rowStartIndex : i;\n              break;\n            }\n          }\n        }\n\n        renderStartIndex = Math.min(Math.max(0, i), data.length - 1);\n        renderBeforeBoundary = renderStartIndex !== -1 ? this.getDimensions(renderStartIndex).primaryPos : -1;\n\n        // -- Calculate renderEndIndex\n        var lastRowDim;\n        for (i = renderStartIndex + 1, len = data.length; i < len; i++) {\n          if ((dim = this.getDimensions(i)) && dim.primaryPos + dim.rowPrimarySize > scrollValueEnd) {\n\n            // Go all the way to the end of the row if we're in a grid\n            if (isGridView) {\n              lastRowDim = dim;\n              while (i < len - 1 &&\n                    (dim = this.getDimensions(i + 1)).primaryPos === lastRowDim.primaryPos) {\n                i++;\n              }\n            }\n            break;\n          }\n        }\n\n        renderEndIndex = Math.min(i, data.length - 1);\n        renderAfterBoundary = renderEndIndex !== -1 ?\n          ((dim = this.getDimensions(renderEndIndex)).primaryPos + (dim.rowPrimarySize || dim.primarySize)) :\n          -1;\n\n        oldScrollValue = scrollValue;\n        oldRenderStartIndex = renderStartIndex;\n      };\n    }\n\n\n  };\n\n}\n\n/**\n * @ngdoc directive\n * @name ionContent\n * @module ionic\n * @delegate ionic.service:$ionicScrollDelegate\n * @restrict E\n *\n * @description\n * The ionContent directive provides an easy to use content area that can be configured\n * to use Ionic's custom Scroll View, or the built in overflow scrolling of the browser.\n *\n * While we recommend using the custom Scroll features in Ionic in most cases, sometimes\n * (for performance reasons) only the browser's native overflow scrolling will suffice,\n * and so we've made it easy to toggle between the Ionic scroll implementation and\n * overflow scrolling.\n *\n * You can implement pull-to-refresh with the {@link ionic.directive:ionRefresher}\n * directive, and infinite scrolling with the {@link ionic.directive:ionInfiniteScroll}\n * directive.\n *\n * If there is any dynamic content inside the ion-content, be sure to call `.resize()` with {@link ionic.service:$ionicScrollDelegate}\n * after the content has been added.\n *\n * Be aware that this directive gets its own child scope. If you do not understand why this\n * is important, you can read [https://docs.angularjs.org/guide/scope](https://docs.angularjs.org/guide/scope).\n *\n * @param {string=} delegate-handle The handle used to identify this scrollView\n * with {@link ionic.service:$ionicScrollDelegate}.\n * @param {string=} direction Which way to scroll. 'x' or 'y' or 'xy'. Default 'y'.\n * @param {boolean=} locking Whether to lock scrolling in one direction at a time. Useful to set to false when zoomed in or scrolling in two directions. Default true.\n * @param {boolean=} padding Whether to add padding to the content.\n * Defaults to true on iOS, false on Android.\n * @param {boolean=} scroll Whether to allow scrolling of content.  Defaults to true.\n * @param {boolean=} overflow-scroll Whether to use overflow-scrolling instead of\n * Ionic scroll. See {@link ionic.provider:$ionicConfigProvider} to set this as the global default.\n * @param {boolean=} scrollbar-x Whether to show the horizontal scrollbar. Default true.\n * @param {boolean=} scrollbar-y Whether to show the vertical scrollbar. Default true.\n * @param {string=} start-x Initial horizontal scroll position. Default 0.\n * @param {string=} start-y Initial vertical scroll position. Default 0.\n * @param {expression=} on-scroll Expression to evaluate when the content is scrolled.\n * @param {expression=} on-scroll-complete Expression to evaluate when a scroll action completes. Has access to 'scrollLeft' and 'scrollTop' locals.\n * @param {boolean=} has-bouncing Whether to allow scrolling to bounce past the edges\n * of the content.  Defaults to true on iOS, false on Android.\n * @param {number=} scroll-event-interval Number of milliseconds between each firing of the 'on-scroll' expression. Default 10.\n */\nIonicModule\n.directive('ionContent', [\n  '$timeout',\n  '$controller',\n  '$ionicBind',\n  '$ionicConfig',\nfunction($timeout, $controller, $ionicBind, $ionicConfig) {\n  return {\n    restrict: 'E',\n    require: '^?ionNavView',\n    scope: true,\n    priority: 800,\n    compile: function(element, attr) {\n      var innerElement;\n      var scrollCtrl;\n\n      element.addClass('scroll-content ionic-scroll');\n\n      if (attr.scroll != 'false') {\n        //We cannot use normal transclude here because it breaks element.data()\n        //inheritance on compile\n        innerElement = jqLite('<div class=\"scroll\"></div>');\n        innerElement.append(element.contents());\n        element.append(innerElement);\n      } else {\n        element.addClass('scroll-content-false');\n      }\n\n      var nativeScrolling = attr.overflowScroll !== \"false\" && (attr.overflowScroll === \"true\" || !$ionicConfig.scrolling.jsScrolling());\n\n      // collection-repeat requires JS scrolling\n      if (nativeScrolling) {\n        nativeScrolling = !element[0].querySelector('[collection-repeat]');\n      }\n      return { pre: prelink };\n      function prelink($scope, $element, $attr) {\n        var parentScope = $scope.$parent;\n        $scope.$watch(function() {\n          return (parentScope.$hasHeader ? ' has-header' : '') +\n            (parentScope.$hasSubheader ? ' has-subheader' : '') +\n            (parentScope.$hasFooter ? ' has-footer' : '') +\n            (parentScope.$hasSubfooter ? ' has-subfooter' : '') +\n            (parentScope.$hasTabs ? ' has-tabs' : '') +\n            (parentScope.$hasTabsTop ? ' has-tabs-top' : '');\n        }, function(className, oldClassName) {\n          $element.removeClass(oldClassName);\n          $element.addClass(className);\n        });\n\n        //Only this ionContent should use these variables from parent scopes\n        $scope.$hasHeader = $scope.$hasSubheader =\n          $scope.$hasFooter = $scope.$hasSubfooter =\n          $scope.$hasTabs = $scope.$hasTabsTop =\n          false;\n        $ionicBind($scope, $attr, {\n          $onScroll: '&onScroll',\n          $onScrollComplete: '&onScrollComplete',\n          hasBouncing: '@',\n          padding: '@',\n          direction: '@',\n          scrollbarX: '@',\n          scrollbarY: '@',\n          startX: '@',\n          startY: '@',\n          scrollEventInterval: '@'\n        });\n        $scope.direction = $scope.direction || 'y';\n\n        if (isDefined($attr.padding)) {\n          $scope.$watch($attr.padding, function(newVal) {\n              (innerElement || $element).toggleClass('padding', !!newVal);\n          });\n        }\n\n        if ($attr.scroll === \"false\") {\n          //do nothing\n        } else {\n          var scrollViewOptions = {};\n\n          // determined in compile phase above\n          if (nativeScrolling) {\n            // use native scrolling\n            $element.addClass('overflow-scroll');\n\n            scrollViewOptions = {\n              el: $element[0],\n              delegateHandle: attr.delegateHandle,\n              startX: $scope.$eval($scope.startX) || 0,\n              startY: $scope.$eval($scope.startY) || 0,\n              nativeScrolling: true\n            };\n\n          } else {\n            // Use JS scrolling\n            scrollViewOptions = {\n              el: $element[0],\n              delegateHandle: attr.delegateHandle,\n              locking: (attr.locking || 'true') === 'true',\n              bouncing: $scope.$eval($scope.hasBouncing),\n              startX: $scope.$eval($scope.startX) || 0,\n              startY: $scope.$eval($scope.startY) || 0,\n              scrollbarX: $scope.$eval($scope.scrollbarX) !== false,\n              scrollbarY: $scope.$eval($scope.scrollbarY) !== false,\n              scrollingX: $scope.direction.indexOf('x') >= 0,\n              scrollingY: $scope.direction.indexOf('y') >= 0,\n              scrollEventInterval: parseInt($scope.scrollEventInterval, 10) || 10,\n              scrollingComplete: onScrollComplete\n            };\n          }\n\n          // init scroll controller with appropriate options\n          scrollCtrl = $controller('$ionicScroll', {\n            $scope: $scope,\n            scrollViewOptions: scrollViewOptions\n          });\n\n          $scope.scrollCtrl = scrollCtrl;\n\n          $scope.$on('$destroy', function() {\n            if (scrollViewOptions) {\n              scrollViewOptions.scrollingComplete = noop;\n              delete scrollViewOptions.el;\n            }\n            innerElement = null;\n            $element = null;\n            attr.$$element = null;\n          });\n        }\n\n        function onScrollComplete() {\n          $scope.$onScrollComplete({\n            scrollTop: scrollCtrl.scrollView.__scrollTop,\n            scrollLeft: scrollCtrl.scrollView.__scrollLeft\n          });\n        }\n\n      }\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name exposeAsideWhen\n * @module ionic\n * @restrict A\n * @parent ionic.directive:ionSideMenus\n *\n * @description\n * It is common for a tablet application to hide a menu when in portrait mode, but to show the\n * same menu on the left side when the tablet is in landscape mode. The `exposeAsideWhen` attribute\n * directive can be used to accomplish a similar interface.\n *\n * By default, side menus are hidden underneath its side menu content, and can be opened by either\n * swiping the content left or right, or toggling a button to show the side menu. However, by adding the\n * `exposeAsideWhen` attribute directive to an {@link ionic.directive:ionSideMenu} element directive,\n * a side menu can be given instructions on \"when\" the menu should be exposed (always viewable). For\n * example, the `expose-aside-when=\"large\"` attribute will keep the side menu hidden when the viewport's\n * width is less than `768px`, but when the viewport's width is `768px` or greater, the menu will then\n * always be shown and can no longer be opened or closed like it could when it was hidden for smaller\n * viewports.\n *\n * Using `large` as the attribute's value is a shortcut value to `(min-width:768px)` since it is\n * the most common use-case. However, for added flexibility, any valid media query could be added\n * as the value, such as `(min-width:600px)` or even multiple queries such as\n * `(min-width:750px) and (max-width:1200px)`.\n * @usage\n * ```html\n * <ion-side-menus>\n *   <!-- Center content -->\n *   <ion-side-menu-content>\n *   </ion-side-menu-content>\n *\n *   <!-- Left menu -->\n *   <ion-side-menu expose-aside-when=\"large\">\n *   </ion-side-menu>\n * </ion-side-menus>\n * ```\n * For a complete side menu example, see the\n * {@link ionic.directive:ionSideMenus} documentation.\n */\n\nIonicModule.directive('exposeAsideWhen', ['$window', function($window) {\n  return {\n    restrict: 'A',\n    require: '^ionSideMenus',\n    link: function($scope, $element, $attr, sideMenuCtrl) {\n\n      var prevInnerWidth = $window.innerWidth;\n      var prevInnerHeight = $window.innerHeight;\n\n      ionic.on('resize', function() {\n        if (prevInnerWidth === $window.innerWidth && prevInnerHeight === $window.innerHeight) {\n          return;\n        }\n        prevInnerWidth = $window.innerWidth;\n        prevInnerHeight = $window.innerHeight;\n        onResize();\n      }, $window);\n\n      function checkAsideExpose() {\n        var mq = $attr.exposeAsideWhen == 'large' ? '(min-width:768px)' : $attr.exposeAsideWhen;\n        sideMenuCtrl.exposeAside($window.matchMedia(mq).matches);\n        sideMenuCtrl.activeAsideResizing(false);\n      }\n\n      function onResize() {\n        sideMenuCtrl.activeAsideResizing(true);\n        debouncedCheck();\n      }\n\n      var debouncedCheck = ionic.debounce(function() {\n        $scope.$apply(checkAsideExpose);\n      }, 300, false);\n\n      $scope.$evalAsync(checkAsideExpose);\n    }\n  };\n}]);\n\nvar GESTURE_DIRECTIVES = 'onHold onTap onDoubleTap onTouch onRelease onDragStart onDrag onDragEnd onDragUp onDragRight onDragDown onDragLeft onSwipe onSwipeUp onSwipeRight onSwipeDown onSwipeLeft'.split(' ');\n\nGESTURE_DIRECTIVES.forEach(function(name) {\n  IonicModule.directive(name, gestureDirective(name));\n});\n\n\n/**\n * @ngdoc directive\n * @name onHold\n * @module ionic\n * @restrict A\n *\n * @description\n * Touch stays at the same location for 500ms. Similar to long touch events available for AngularJS and jQuery.\n *\n * @usage\n * ```html\n * <button on-hold=\"onHold()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onTap\n * @module ionic\n * @restrict A\n *\n * @description\n * Quick touch at a location. If the duration of the touch goes\n * longer than 250ms it is no longer a tap gesture.\n *\n * @usage\n * ```html\n * <button on-tap=\"onTap()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onDoubleTap\n * @module ionic\n * @restrict A\n *\n * @description\n * Double tap touch at a location.\n *\n * @usage\n * ```html\n * <button on-double-tap=\"onDoubleTap()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onTouch\n * @module ionic\n * @restrict A\n *\n * @description\n * Called immediately when the user first begins a touch. This\n * gesture does not wait for a touchend/mouseup.\n *\n * @usage\n * ```html\n * <button on-touch=\"onTouch()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onRelease\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when the user ends a touch.\n *\n * @usage\n * ```html\n * <button on-release=\"onRelease()\" class=\"button\">Test</button>\n * ```\n */\n\n/**\n * @ngdoc directive\n * @name onDragStart\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when a drag gesture has started.\n *\n * @usage\n * ```html\n * <button on-drag-start=\"onDragStart()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onDrag\n * @module ionic\n * @restrict A\n *\n * @description\n * Move with one touch around on the page. Blocking the scrolling when\n * moving left and right is a good practice. When all the drag events are\n * blocking you disable scrolling on that area.\n *\n * @usage\n * ```html\n * <button on-drag=\"onDrag()\" class=\"button\">Test</button>\n * ```\n */\n\n/**\n * @ngdoc directive\n * @name onDragEnd\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when a drag gesture has ended.\n *\n * @usage\n * ```html\n * <button on-drag-end=\"onDragEnd()\" class=\"button\">Test</button>\n * ```\n */\n\n/**\n * @ngdoc directive\n * @name onDragUp\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when the element is dragged up.\n *\n * @usage\n * ```html\n * <button on-drag-up=\"onDragUp()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onDragRight\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when the element is dragged to the right.\n *\n * @usage\n * ```html\n * <button on-drag-right=\"onDragRight()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onDragDown\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when the element is dragged down.\n *\n * @usage\n * ```html\n * <button on-drag-down=\"onDragDown()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onDragLeft\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when the element is dragged to the left.\n *\n * @usage\n * ```html\n * <button on-drag-left=\"onDragLeft()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onSwipe\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when a moving touch has a high velocity in any direction.\n *\n * @usage\n * ```html\n * <button on-swipe=\"onSwipe()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onSwipeUp\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when a moving touch has a high velocity moving up.\n *\n * @usage\n * ```html\n * <button on-swipe-up=\"onSwipeUp()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onSwipeRight\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when a moving touch has a high velocity moving to the right.\n *\n * @usage\n * ```html\n * <button on-swipe-right=\"onSwipeRight()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onSwipeDown\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when a moving touch has a high velocity moving down.\n *\n * @usage\n * ```html\n * <button on-swipe-down=\"onSwipeDown()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onSwipeLeft\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when a moving touch has a high velocity moving to the left.\n *\n * @usage\n * ```html\n * <button on-swipe-left=\"onSwipeLeft()\" class=\"button\">Test</button>\n * ```\n */\n\n\nfunction gestureDirective(directiveName) {\n  return ['$ionicGesture', '$parse', function($ionicGesture, $parse) {\n    var eventType = directiveName.substr(2).toLowerCase();\n\n    return function(scope, element, attr) {\n      var fn = $parse( attr[directiveName] );\n\n      var listener = function(ev) {\n        scope.$apply(function() {\n          fn(scope, {\n            $event: ev\n          });\n        });\n      };\n\n      var gesture = $ionicGesture.on(eventType, listener, element);\n\n      scope.$on('$destroy', function() {\n        $ionicGesture.off(gesture, eventType, listener);\n      });\n    };\n  }];\n}\n\n\nIonicModule\n//.directive('ionHeaderBar', tapScrollToTopDirective())\n\n/**\n * @ngdoc directive\n * @name ionHeaderBar\n * @module ionic\n * @restrict E\n *\n * @description\n * Adds a fixed header bar above some content.\n *\n * Can also be a subheader (lower down) if the 'bar-subheader' class is applied.\n * See [the header CSS docs](/docs/components/#subheader).\n *\n * @param {string=} align-title How to align the title. By default the title\n * will be aligned the same as how the platform aligns its titles (iOS centers\n * titles, Android aligns them left).\n * Available: 'left', 'right', or 'center'.  Defaults to the same as the platform.\n * @param {boolean=} no-tap-scroll By default, the header bar will scroll the\n * content to the top when tapped.  Set no-tap-scroll to true to disable this\n * behavior.\n * Available: true or false.  Defaults to false.\n *\n * @usage\n * ```html\n * <ion-header-bar align-title=\"left\" class=\"bar-positive\">\n *   <div class=\"buttons\">\n *     <button class=\"button\" ng-click=\"doSomething()\">Left Button</button>\n *   </div>\n *   <h1 class=\"title\">Title!</h1>\n *   <div class=\"buttons\">\n *     <button class=\"button\">Right Button</button>\n *   </div>\n * </ion-header-bar>\n * <ion-content class=\"has-header\">\n *   Some content!\n * </ion-content>\n * ```\n */\n.directive('ionHeaderBar', headerFooterBarDirective(true))\n\n/**\n * @ngdoc directive\n * @name ionFooterBar\n * @module ionic\n * @restrict E\n *\n * @description\n * Adds a fixed footer bar below some content.\n *\n * Can also be a subfooter (higher up) if the 'bar-subfooter' class is applied.\n * See [the footer CSS docs](/docs/components/#footer).\n *\n * Note: If you use ionFooterBar in combination with ng-if, the surrounding content\n * will not align correctly.  This will be fixed soon.\n *\n * @param {string=} align-title Where to align the title.\n * Available: 'left', 'right', or 'center'.  Defaults to 'center'.\n *\n * @usage\n * ```html\n * <ion-content class=\"has-footer\">\n *   Some content!\n * </ion-content>\n * <ion-footer-bar align-title=\"left\" class=\"bar-assertive\">\n *   <div class=\"buttons\">\n *     <button class=\"button\">Left Button</button>\n *   </div>\n *   <h1 class=\"title\">Title!</h1>\n *   <div class=\"buttons\" ng-click=\"doSomething()\">\n *     <button class=\"button\">Right Button</button>\n *   </div>\n * </ion-footer-bar>\n * ```\n */\n.directive('ionFooterBar', headerFooterBarDirective(false));\n\nfunction tapScrollToTopDirective() { //eslint-disable-line no-unused-vars\n  return ['$ionicScrollDelegate', function($ionicScrollDelegate) {\n    return {\n      restrict: 'E',\n      link: function($scope, $element, $attr) {\n        if ($attr.noTapScroll == 'true') {\n          return;\n        }\n        ionic.on('tap', onTap, $element[0]);\n        $scope.$on('$destroy', function() {\n          ionic.off('tap', onTap, $element[0]);\n        });\n\n        function onTap(e) {\n          var depth = 3;\n          var current = e.target;\n          //Don't scroll to top in certain cases\n          while (depth-- && current) {\n            if (current.classList.contains('button') ||\n                current.tagName.match(/input|textarea|select/i) ||\n                current.isContentEditable) {\n              return;\n            }\n            current = current.parentNode;\n          }\n          var touch = e.gesture && e.gesture.touches[0] || e.detail.touches[0];\n          var bounds = $element[0].getBoundingClientRect();\n          if (ionic.DomUtil.rectContains(\n            touch.pageX, touch.pageY,\n            bounds.left, bounds.top - 20,\n            bounds.left + bounds.width, bounds.top + bounds.height\n          )) {\n            $ionicScrollDelegate.scrollTop(true);\n          }\n        }\n      }\n    };\n  }];\n}\n\nfunction headerFooterBarDirective(isHeader) {\n  return ['$document', '$timeout', function($document, $timeout) {\n    return {\n      restrict: 'E',\n      controller: '$ionicHeaderBar',\n      compile: function(tElement) {\n        tElement.addClass(isHeader ? 'bar bar-header' : 'bar bar-footer');\n        // top style tabs? if so, remove bottom border for seamless display\n        $timeout(function() {\n          if (isHeader && $document[0].getElementsByClassName('tabs-top').length) tElement.addClass('has-tabs-top');\n        });\n\n        return { pre: prelink };\n        function prelink($scope, $element, $attr, ctrl) {\n          if (isHeader) {\n            $scope.$watch(function() { return $element[0].className; }, function(value) {\n              var isShown = value.indexOf('ng-hide') === -1;\n              var isSubheader = value.indexOf('bar-subheader') !== -1;\n              $scope.$hasHeader = isShown && !isSubheader;\n              $scope.$hasSubheader = isShown && isSubheader;\n              $scope.$emit('$ionicSubheader', $scope.$hasSubheader);\n            });\n            $scope.$on('$destroy', function() {\n              delete $scope.$hasHeader;\n              delete $scope.$hasSubheader;\n            });\n            ctrl.align();\n            $scope.$on('$ionicHeader.align', function() {\n              ionic.requestAnimationFrame(function() {\n                ctrl.align();\n              });\n            });\n\n          } else {\n            $scope.$watch(function() { return $element[0].className; }, function(value) {\n              var isShown = value.indexOf('ng-hide') === -1;\n              var isSubfooter = value.indexOf('bar-subfooter') !== -1;\n              $scope.$hasFooter = isShown && !isSubfooter;\n              $scope.$hasSubfooter = isShown && isSubfooter;\n            });\n            $scope.$on('$destroy', function() {\n              delete $scope.$hasFooter;\n              delete $scope.$hasSubfooter;\n            });\n            $scope.$watch('$hasTabs', function(val) {\n              $element.toggleClass('has-tabs', !!val);\n            });\n            ctrl.align();\n            $scope.$on('$ionicFooter.align', function() {\n              ionic.requestAnimationFrame(function() {\n                ctrl.align();\n              });\n            });\n          }\n        }\n      }\n    };\n  }];\n}\n\n/**\n * @ngdoc directive\n * @name ionInfiniteScroll\n * @module ionic\n * @parent ionic.directive:ionContent, ionic.directive:ionScroll\n * @restrict E\n *\n * @description\n * The ionInfiniteScroll directive allows you to call a function whenever\n * the user gets to the bottom of the page or near the bottom of the page.\n *\n * The expression you pass in for `on-infinite` is called when the user scrolls\n * greater than `distance` away from the bottom of the content.  Once `on-infinite`\n * is done loading new data, it should broadcast the `scroll.infiniteScrollComplete`\n * event from your controller (see below example).\n *\n * @param {expression} on-infinite What to call when the scroller reaches the\n * bottom.\n * @param {string=} distance The distance from the bottom that the scroll must\n * reach to trigger the on-infinite expression. Default: 1%.\n * @param {string=} spinner The {@link ionic.directive:ionSpinner} to show while loading. The SVG\n * {@link ionic.directive:ionSpinner} is now the default, replacing rotating font icons.\n * @param {string=} icon The icon to show while loading. Default: 'ion-load-d'.  This is depreciated\n * in favor of the SVG {@link ionic.directive:ionSpinner}.\n * @param {boolean=} immediate-check Whether to check the infinite scroll bounds immediately on load.\n *\n * @usage\n * ```html\n * <ion-content ng-controller=\"MyController\">\n *   <ion-list>\n *   ....\n *   ....\n *   </ion-list>\n *\n *   <ion-infinite-scroll\n *     on-infinite=\"loadMore()\"\n *     distance=\"1%\">\n *   </ion-infinite-scroll>\n * </ion-content>\n * ```\n * ```js\n * function MyController($scope, $http) {\n *   $scope.items = [];\n *   $scope.loadMore = function() {\n *     $http.get('/more-items').success(function(items) {\n *       useItems(items);\n *       $scope.$broadcast('scroll.infiniteScrollComplete');\n *     });\n *   };\n *\n *   $scope.$on('$stateChangeSuccess', function() {\n *     $scope.loadMore();\n *   });\n * }\n * ```\n *\n * An easy to way to stop infinite scroll once there is no more data to load\n * is to use angular's `ng-if` directive:\n *\n * ```html\n * <ion-infinite-scroll\n *   ng-if=\"moreDataCanBeLoaded()\"\n *   icon=\"ion-loading-c\"\n *   on-infinite=\"loadMoreData()\">\n * </ion-infinite-scroll>\n * ```\n */\nIonicModule\n.directive('ionInfiniteScroll', ['$timeout', function($timeout) {\n  return {\n    restrict: 'E',\n    require: ['?^$ionicScroll', 'ionInfiniteScroll'],\n    template: function($element, $attrs) {\n      if ($attrs.icon) return '<i class=\"icon {{icon()}} icon-refreshing {{scrollingType}}\"></i>';\n      return '<ion-spinner icon=\"{{spinner()}}\"></ion-spinner>';\n    },\n    scope: true,\n    controller: '$ionInfiniteScroll',\n    link: function($scope, $element, $attrs, ctrls) {\n      var infiniteScrollCtrl = ctrls[1];\n      var scrollCtrl = infiniteScrollCtrl.scrollCtrl = ctrls[0];\n      var jsScrolling = infiniteScrollCtrl.jsScrolling = !scrollCtrl.isNative();\n\n      // if this view is not beneath a scrollCtrl, it can't be injected, proceed w/ native scrolling\n      if (jsScrolling) {\n        infiniteScrollCtrl.scrollView = scrollCtrl.scrollView;\n        $scope.scrollingType = 'js-scrolling';\n        //bind to JS scroll events\n        scrollCtrl.$element.on('scroll', infiniteScrollCtrl.checkBounds);\n      } else {\n        // grabbing the scrollable element, to determine dimensions, and current scroll pos\n        var scrollEl = ionic.DomUtil.getParentOrSelfWithClass($element[0].parentNode, 'overflow-scroll');\n        infiniteScrollCtrl.scrollEl = scrollEl;\n        // if there's no scroll controller, and no overflow scroll div, infinite scroll wont work\n        if (!scrollEl) {\n          throw 'Infinite scroll must be used inside a scrollable div';\n        }\n        //bind to native scroll events\n        infiniteScrollCtrl.scrollEl.addEventListener('scroll', infiniteScrollCtrl.checkBounds);\n      }\n\n      // Optionally check bounds on start after scrollView is fully rendered\n      var doImmediateCheck = isDefined($attrs.immediateCheck) ? $scope.$eval($attrs.immediateCheck) : true;\n      if (doImmediateCheck) {\n        $timeout(function() { infiniteScrollCtrl.checkBounds(); });\n      }\n    }\n  };\n}]);\n\n/**\n* @ngdoc directive\n* @name ionInput\n* @parent ionic.directive:ionList\n* @module ionic\n* @restrict E\n* Creates a text input group that can easily be focused\n*\n* @usage\n*\n* ```html\n* <ion-list>\n*   <ion-input>\n*     <input type=\"text\" placeholder=\"First Name\">\n*   </ion-input>\n*\n*   <ion-input>\n*     <ion-label>Username</ion-label>\n*     <input type=\"text\">\n*   </ion-input>\n* </ion-list>\n* ```\n*/\n\nvar labelIds = -1;\n\nIonicModule\n.directive('ionInput', [function() {\n  return {\n    restrict: 'E',\n    controller: ['$scope', '$element', function($scope, $element) {\n      this.$scope = $scope;\n      this.$element = $element;\n\n      this.setInputAriaLabeledBy = function(id) {\n        var inputs = $element[0].querySelectorAll('input,textarea');\n        inputs.length && inputs[0].setAttribute('aria-labelledby', id);\n      };\n\n      this.focus = function() {\n        var inputs = $element[0].querySelectorAll('input,textarea');\n        inputs.length && inputs[0].focus();\n      };\n    }]\n  };\n}]);\n\n/**\n* @ngdoc directive\n* @name ionLabel\n* @parent ionic.directive:ionList\n* @module ionic\n* @restrict E\n*\n* New in Ionic 1.2. It is strongly recommended that you use `<ion-label>` in place\n* of any `<label>` elements for maximum cross-browser support and performance.\n*\n* Creates a label for a form input.\n*\n* @usage\n*\n* ```html\n* <ion-list>\n*   <ion-input>\n*     <ion-label>Username</ion-label>\n*     <input type=\"text\">\n*   </ion-input>\n* </ion-list>\n* ```\n*/\nIonicModule\n.directive('ionLabel', [function() {\n  return {\n    restrict: 'E',\n    require: '?^ionInput',\n    compile: function() {\n\n      return function link($scope, $element, $attrs, ionInputCtrl) {\n        var element = $element[0];\n\n        $element.addClass('input-label');\n\n        $element.attr('aria-label', $element.text());\n        var id = element.id || '_label-' + ++labelIds;\n\n        if (!element.id) {\n          $element.attr('id', id);\n        }\n\n        if (ionInputCtrl) {\n\n          ionInputCtrl.setInputAriaLabeledBy(id);\n\n          $element.on('click', function() {\n            ionInputCtrl.focus();\n          });\n        }\n      };\n    }\n  };\n}]);\n\n/**\n * Input label adds accessibility to <span class=\"input-label\">.\n */\nIonicModule\n.directive('inputLabel', [function() {\n  return {\n    restrict: 'C',\n    require: '?^ionInput',\n    compile: function() {\n\n      return function link($scope, $element, $attrs, ionInputCtrl) {\n        var element = $element[0];\n\n        $element.attr('aria-label', $element.text());\n        var id = element.id || '_label-' + ++labelIds;\n\n        if (!element.id) {\n          $element.attr('id', id);\n        }\n\n        if (ionInputCtrl) {\n          ionInputCtrl.setInputAriaLabeledBy(id);\n        }\n\n      };\n    }\n  };\n}]);\n\n/**\n* @ngdoc directive\n* @name ionItem\n* @parent ionic.directive:ionList\n* @module ionic\n* @restrict E\n* Creates a list-item that can easily be swiped,\n* deleted, reordered, edited, and more.\n*\n* See {@link ionic.directive:ionList} for a complete example & explanation.\n*\n* Can be assigned any item class name. See the\n* [list CSS documentation](/docs/components/#list).\n*\n* @usage\n*\n* ```html\n* <ion-list>\n*   <ion-item>Hello!</ion-item>\n*   <ion-item href=\"#/detail\">\n*     Link to detail page\n*   </ion-item>\n* </ion-list>\n* ```\n*/\nIonicModule\n.directive('ionItem', ['$$rAF', function($$rAF) {\n  return {\n    restrict: 'E',\n    controller: ['$scope', '$element', function($scope, $element) {\n      this.$scope = $scope;\n      this.$element = $element;\n    }],\n    scope: true,\n    compile: function($element, $attrs) {\n      var isAnchor = isDefined($attrs.href) ||\n                     isDefined($attrs.ngHref) ||\n                     isDefined($attrs.uiSref);\n      var isComplexItem = isAnchor ||\n        //Lame way of testing, but we have to know at compile what to do with the element\n        /ion-(delete|option|reorder)-button/i.test($element.html());\n\n      if (isComplexItem) {\n        var innerElement = jqLite(isAnchor ? '<a></a>' : '<div></div>');\n        innerElement.addClass('item-content');\n\n        if (isDefined($attrs.href) || isDefined($attrs.ngHref)) {\n          innerElement.attr('ng-href', '{{$href()}}');\n          if (isDefined($attrs.target)) {\n            innerElement.attr('target', '{{$target()}}');\n          }\n        }\n\n        innerElement.append($element.contents());\n\n        $element.addClass('item item-complex')\n                .append(innerElement);\n      } else {\n        $element.addClass('item');\n      }\n\n      return function link($scope, $element, $attrs) {\n        $scope.$href = function() {\n          return $attrs.href || $attrs.ngHref;\n        };\n        $scope.$target = function() {\n          return $attrs.target;\n        };\n\n        var content = $element[0].querySelector('.item-content');\n        if (content) {\n          $scope.$on('$collectionRepeatLeave', function() {\n            if (content && content.$$ionicOptionsOpen) {\n              content.style[ionic.CSS.TRANSFORM] = '';\n              content.style[ionic.CSS.TRANSITION] = 'none';\n              $$rAF(function() {\n                content.style[ionic.CSS.TRANSITION] = '';\n              });\n              content.$$ionicOptionsOpen = false;\n            }\n          });\n        }\n      };\n\n    }\n  };\n}]);\n\nvar ITEM_TPL_DELETE_BUTTON =\n  '<div class=\"item-left-edit item-delete enable-pointer-events\">' +\n  '</div>';\n/**\n* @ngdoc directive\n* @name ionDeleteButton\n* @parent ionic.directive:ionItem\n* @module ionic\n* @restrict E\n* Creates a delete button inside a list item, that is visible when the\n* {@link ionic.directive:ionList ionList parent's} `show-delete` evaluates to true or\n* `$ionicListDelegate.showDelete(true)` is called.\n*\n* Takes any ionicon as a class.\n*\n* See {@link ionic.directive:ionList} for a complete example & explanation.\n*\n* @usage\n*\n* ```html\n* <ion-list show-delete=\"shouldShowDelete\">\n*   <ion-item>\n*     <ion-delete-button class=\"ion-minus-circled\"></ion-delete-button>\n*     Hello, list item!\n*   </ion-item>\n* </ion-list>\n* <ion-toggle ng-model=\"shouldShowDelete\">\n*   Show Delete?\n* </ion-toggle>\n* ```\n*/\nIonicModule\n.directive('ionDeleteButton', function() {\n\n  function stopPropagation(ev) {\n    ev.stopPropagation();\n  }\n\n  return {\n    restrict: 'E',\n    require: ['^^ionItem', '^?ionList'],\n    //Run before anything else, so we can move it before other directives process\n    //its location (eg ngIf relies on the location of the directive in the dom)\n    priority: Number.MAX_VALUE,\n    compile: function($element, $attr) {\n      //Add the classes we need during the compile phase, so that they stay\n      //even if something else like ngIf removes the element and re-addss it\n      $attr.$set('class', ($attr['class'] || '') + ' button icon button-icon', true);\n      return function($scope, $element, $attr, ctrls) {\n        var itemCtrl = ctrls[0];\n        var listCtrl = ctrls[1];\n        var container = jqLite(ITEM_TPL_DELETE_BUTTON);\n        container.append($element);\n        itemCtrl.$element.append(container).addClass('item-left-editable');\n\n        //Don't bubble click up to main .item\n        $element.on('click', stopPropagation);\n\n        init();\n        $scope.$on('$ionic.reconnectScope', init);\n        function init() {\n          listCtrl = listCtrl || $element.controller('ionList');\n          if (listCtrl && listCtrl.showDelete()) {\n            container.addClass('visible active');\n          }\n        }\n      };\n    }\n  };\n});\n\n\nIonicModule\n.directive('itemFloatingLabel', function() {\n  return {\n    restrict: 'C',\n    link: function(scope, element) {\n      var el = element[0];\n      var input = el.querySelector('input, textarea');\n      var inputLabel = el.querySelector('.input-label');\n\n      if (!input || !inputLabel) return;\n\n      var onInput = function() {\n        if (input.value) {\n          inputLabel.classList.add('has-input');\n        } else {\n          inputLabel.classList.remove('has-input');\n        }\n      };\n\n      input.addEventListener('input', onInput);\n\n      var ngModelCtrl = jqLite(input).controller('ngModel');\n      if (ngModelCtrl) {\n        ngModelCtrl.$render = function() {\n          input.value = ngModelCtrl.$viewValue || '';\n          onInput();\n        };\n      }\n\n      scope.$on('$destroy', function() {\n        input.removeEventListener('input', onInput);\n      });\n    }\n  };\n});\n\nvar ITEM_TPL_OPTION_BUTTONS =\n  '<div class=\"item-options invisible\">' +\n  '</div>';\n/**\n* @ngdoc directive\n* @name ionOptionButton\n* @parent ionic.directive:ionItem\n* @module ionic\n* @restrict E\n* @description\n* Creates an option button inside a list item, that is visible when the item is swiped\n* to the left by the user.  Swiped open option buttons can be hidden with\n* {@link ionic.service:$ionicListDelegate#closeOptionButtons $ionicListDelegate.closeOptionButtons}.\n*\n* Can be assigned any button class.\n*\n* See {@link ionic.directive:ionList} for a complete example & explanation.\n*\n* @usage\n*\n* ```html\n* <ion-list>\n*   <ion-item>\n*     I love kittens!\n*     <ion-option-button class=\"button-positive\">Share</ion-option-button>\n*     <ion-option-button class=\"button-assertive\">Edit</ion-option-button>\n*   </ion-item>\n* </ion-list>\n* ```\n*/\nIonicModule.directive('ionOptionButton', [function() {\n  function stopPropagation(e) {\n    e.stopPropagation();\n  }\n  return {\n    restrict: 'E',\n    require: '^ionItem',\n    priority: Number.MAX_VALUE,\n    compile: function($element, $attr) {\n      $attr.$set('class', ($attr['class'] || '') + ' button', true);\n      return function($scope, $element, $attr, itemCtrl) {\n        if (!itemCtrl.optionsContainer) {\n          itemCtrl.optionsContainer = jqLite(ITEM_TPL_OPTION_BUTTONS);\n          itemCtrl.$element.prepend(itemCtrl.optionsContainer);\n        }\n        itemCtrl.optionsContainer.prepend($element);\n\n        itemCtrl.$element.addClass('item-right-editable');\n\n        //Don't bubble click up to main .item\n        $element.on('click', stopPropagation);\n      };\n    }\n  };\n}]);\n\nvar ITEM_TPL_REORDER_BUTTON =\n  '<div data-prevent-scroll=\"true\" class=\"item-right-edit item-reorder enable-pointer-events\">' +\n  '</div>';\n\n/**\n* @ngdoc directive\n* @name ionReorderButton\n* @parent ionic.directive:ionItem\n* @module ionic\n* @restrict E\n* Creates a reorder button inside a list item, that is visible when the\n* {@link ionic.directive:ionList ionList parent's} `show-reorder` evaluates to true or\n* `$ionicListDelegate.showReorder(true)` is called.\n*\n* Can be dragged to reorder items in the list. Takes any ionicon class.\n*\n* Note: Reordering works best when used with `ng-repeat`.  Be sure that all `ion-item` children of an `ion-list` are part of the same `ng-repeat` expression.\n*\n* When an item reorder is complete, the expression given in the `on-reorder` attribute is called. The `on-reorder` expression is given two locals that can be used: `$fromIndex` and `$toIndex`.  See below for an example.\n*\n* Look at {@link ionic.directive:ionList} for more examples.\n*\n* @usage\n*\n* ```html\n* <ion-list ng-controller=\"MyCtrl\" show-reorder=\"true\">\n*   <ion-item ng-repeat=\"item in items\">\n*     Item {{item}}\n*     <ion-reorder-button class=\"ion-navicon\"\n*                         on-reorder=\"moveItem(item, $fromIndex, $toIndex)\">\n*     </ion-reorder-button>\n*   </ion-item>\n* </ion-list>\n* ```\n* ```js\n* function MyCtrl($scope) {\n*   $scope.items = [1, 2, 3, 4];\n*   $scope.moveItem = function(item, fromIndex, toIndex) {\n*     //Move the item in the array\n*     $scope.items.splice(fromIndex, 1);\n*     $scope.items.splice(toIndex, 0, item);\n*   };\n* }\n* ```\n*\n* @param {expression=} on-reorder Expression to call when an item is reordered.\n* Parameters given: $fromIndex, $toIndex.\n*/\nIonicModule\n.directive('ionReorderButton', ['$parse', function($parse) {\n  return {\n    restrict: 'E',\n    require: ['^ionItem', '^?ionList'],\n    priority: Number.MAX_VALUE,\n    compile: function($element, $attr) {\n      $attr.$set('class', ($attr['class'] || '') + ' button icon button-icon', true);\n      $element[0].setAttribute('data-prevent-scroll', true);\n      return function($scope, $element, $attr, ctrls) {\n        var itemCtrl = ctrls[0];\n        var listCtrl = ctrls[1];\n        var onReorderFn = $parse($attr.onReorder);\n\n        $scope.$onReorder = function(oldIndex, newIndex) {\n          onReorderFn($scope, {\n            $fromIndex: oldIndex,\n            $toIndex: newIndex\n          });\n        };\n\n        // prevent clicks from bubbling up to the item\n        if (!$attr.ngClick && !$attr.onClick && !$attr.onclick) {\n          $element[0].onclick = function(e) {\n            e.stopPropagation();\n            return false;\n          };\n        }\n\n        var container = jqLite(ITEM_TPL_REORDER_BUTTON);\n        container.append($element);\n        itemCtrl.$element.append(container).addClass('item-right-editable');\n\n        if (listCtrl && listCtrl.showReorder()) {\n          container.addClass('visible active');\n        }\n      };\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name keyboardAttach\n * @module ionic\n * @restrict A\n *\n * @description\n * keyboard-attach is an attribute directive which will cause an element to float above\n * the keyboard when the keyboard shows. Currently only supports the\n * [ion-footer-bar]({{ page.versionHref }}/api/directive/ionFooterBar/) directive.\n *\n * ### Notes\n * - This directive requires the\n * [Ionic Keyboard Plugin](https://github.com/ionic-team/ionic-plugins-keyboard).\n * - On Android not in fullscreen mode, i.e. you have\n *   `<preference name=\"Fullscreen\" value=\"false\" />` or no preference in your `config.xml` file,\n *   this directive is unnecessary since it is the default behavior.\n * - On iOS, if there is an input in your footer, you will need to set\n *   `cordova.plugins.Keyboard.disableScroll(true)`.\n *\n * @usage\n *\n * ```html\n *  <ion-footer-bar align-title=\"left\" keyboard-attach class=\"bar-assertive\">\n *    <h1 class=\"title\">Title!</h1>\n *  </ion-footer-bar>\n * ```\n */\n\nIonicModule\n.directive('keyboardAttach', function() {\n  return function(scope, element) {\n    ionic.on('native.keyboardshow', onShow, window);\n    ionic.on('native.keyboardhide', onHide, window);\n\n    //deprecated\n    ionic.on('native.showkeyboard', onShow, window);\n    ionic.on('native.hidekeyboard', onHide, window);\n\n\n    var scrollCtrl;\n\n    function onShow(e) {\n      if (ionic.Platform.isAndroid() && !ionic.Platform.isFullScreen) {\n        return;\n      }\n\n      //for testing\n      var keyboardHeight = e.keyboardHeight || (e.detail && e.detail.keyboardHeight);\n      element.css('bottom', keyboardHeight + \"px\");\n      scrollCtrl = element.controller('$ionicScroll');\n      if (scrollCtrl) {\n        scrollCtrl.scrollView.__container.style.bottom = keyboardHeight + keyboardAttachGetClientHeight(element[0]) + \"px\";\n      }\n    }\n\n    function onHide() {\n      if (ionic.Platform.isAndroid() && !ionic.Platform.isFullScreen) {\n        return;\n      }\n\n      element.css('bottom', '');\n      if (scrollCtrl) {\n        scrollCtrl.scrollView.__container.style.bottom = '';\n      }\n    }\n\n    scope.$on('$destroy', function() {\n      ionic.off('native.keyboardshow', onShow, window);\n      ionic.off('native.keyboardhide', onHide, window);\n\n      //deprecated\n      ionic.off('native.showkeyboard', onShow, window);\n      ionic.off('native.hidekeyboard', onHide, window);\n    });\n  };\n});\n\nfunction keyboardAttachGetClientHeight(element) {\n  return element.clientHeight;\n}\n\n/**\n* @ngdoc directive\n* @name ionList\n* @module ionic\n* @delegate ionic.service:$ionicListDelegate\n* @codepen JsHjf\n* @restrict E\n* @description\n* The List is a widely used interface element in almost any mobile app, and can include\n* content ranging from basic text all the way to buttons, toggles, icons, and thumbnails.\n*\n* Both the list, which contains items, and the list items themselves can be any HTML\n* element. The containing element requires the `list` class and each list item requires\n* the `item` class.\n*\n* However, using the ionList and ionItem directives make it easy to support various\n* interaction modes such as swipe to edit, drag to reorder, and removing items.\n*\n* Related: {@link ionic.directive:ionItem}, {@link ionic.directive:ionOptionButton}\n* {@link ionic.directive:ionReorderButton}, {@link ionic.directive:ionDeleteButton}, [`list CSS documentation`](/docs/components/#list).\n*\n* @usage\n*\n* Basic Usage:\n*\n* ```html\n* <ion-list>\n*   <ion-item ng-repeat=\"item in items\">\n*     {% raw %}Hello, {{item}}!{% endraw %}\n*   </ion-item>\n* </ion-list>\n* ```\n*\n* Advanced Usage: Thumbnails, Delete buttons, Reordering, Swiping\n*\n* ```html\n* <ion-list ng-controller=\"MyCtrl\"\n*           show-delete=\"shouldShowDelete\"\n*           show-reorder=\"shouldShowReorder\"\n*           can-swipe=\"listCanSwipe\">\n*   <ion-item ng-repeat=\"item in items\"\n*             class=\"item-thumbnail-left\">\n*\n*     {% raw %}<img ng-src=\"{{item.img}}\">\n*     <h2>{{item.title}}</h2>\n*     <p>{{item.description}}</p>{% endraw %}\n*     <ion-option-button class=\"button-positive\"\n*                        ng-click=\"share(item)\">\n*       Share\n*     </ion-option-button>\n*     <ion-option-button class=\"button-info\"\n*                        ng-click=\"edit(item)\">\n*       Edit\n*     </ion-option-button>\n*     <ion-delete-button class=\"ion-minus-circled\"\n*                        ng-click=\"items.splice($index, 1)\">\n*     </ion-delete-button>\n*     <ion-reorder-button class=\"ion-navicon\"\n*                         on-reorder=\"reorderItem(item, $fromIndex, $toIndex)\">\n*     </ion-reorder-button>\n*\n*   </ion-item>\n* </ion-list>\n* ```\n*\n*```javascript\n* app.controller('MyCtrl', function($scope) {\n*  $scope.shouldShowDelete = false;\n*  $scope.shouldShowReorder = false;\n*  $scope.listCanSwipe = true\n* });\n*```\n*\n* @param {string=} delegate-handle The handle used to identify this list with\n* {@link ionic.service:$ionicListDelegate}.\n* @param type {string=} The type of list to use (list-inset or card)\n* @param show-delete {boolean=} Whether the delete buttons for the items in the list are\n* currently shown or hidden.\n* @param show-reorder {boolean=} Whether the reorder buttons for the items in the list are\n* currently shown or hidden.\n* @param can-swipe {boolean=} Whether the items in the list are allowed to be swiped to reveal\n* option buttons. Default: true.\n*/\nIonicModule\n.directive('ionList', [\n  '$timeout',\nfunction($timeout) {\n  return {\n    restrict: 'E',\n    require: ['ionList', '^?$ionicScroll'],\n    controller: '$ionicList',\n    compile: function($element, $attr) {\n      var listEl = jqLite('<div class=\"list\">')\n        .append($element.contents())\n        .addClass($attr.type);\n\n      $element.append(listEl);\n\n      return function($scope, $element, $attrs, ctrls) {\n        var listCtrl = ctrls[0];\n        var scrollCtrl = ctrls[1];\n\n        // Wait for child elements to render...\n        $timeout(init);\n\n        function init() {\n          var listView = listCtrl.listView = new ionic.views.ListView({\n            el: $element[0],\n            listEl: $element.children()[0],\n            scrollEl: scrollCtrl && scrollCtrl.element,\n            scrollView: scrollCtrl && scrollCtrl.scrollView,\n            onReorder: function(el, oldIndex, newIndex) {\n              var itemScope = jqLite(el).scope();\n              if (itemScope && itemScope.$onReorder) {\n                // Make sure onReorder is called in apply cycle,\n                // but also make sure it has no conflicts by doing\n                // $evalAsync\n                $timeout(function() {\n                  itemScope.$onReorder(oldIndex, newIndex);\n                });\n              }\n            },\n            canSwipe: function() {\n              return listCtrl.canSwipeItems();\n            }\n          });\n\n          $scope.$on('$destroy', function() {\n            if (listView) {\n              listView.deregister && listView.deregister();\n              listView = null;\n            }\n          });\n\n          if (isDefined($attr.canSwipe)) {\n            $scope.$watch('!!(' + $attr.canSwipe + ')', function(value) {\n              listCtrl.canSwipeItems(value);\n            });\n          }\n          if (isDefined($attr.showDelete)) {\n            $scope.$watch('!!(' + $attr.showDelete + ')', function(value) {\n              listCtrl.showDelete(value);\n            });\n          }\n          if (isDefined($attr.showReorder)) {\n            $scope.$watch('!!(' + $attr.showReorder + ')', function(value) {\n              listCtrl.showReorder(value);\n            });\n          }\n\n          $scope.$watch(function() {\n            return listCtrl.showDelete();\n          }, function(isShown, wasShown) {\n            //Only use isShown=false if it was already shown\n            if (!isShown && !wasShown) { return; }\n\n            if (isShown) listCtrl.closeOptionButtons();\n            listCtrl.canSwipeItems(!isShown);\n\n            $element.children().toggleClass('list-left-editing', isShown);\n            $element.toggleClass('disable-pointer-events', isShown);\n\n            var deleteButton = jqLite($element[0].getElementsByClassName('item-delete'));\n            setButtonShown(deleteButton, listCtrl.showDelete);\n          });\n\n          $scope.$watch(function() {\n            return listCtrl.showReorder();\n          }, function(isShown, wasShown) {\n            //Only use isShown=false if it was already shown\n            if (!isShown && !wasShown) { return; }\n\n            if (isShown) listCtrl.closeOptionButtons();\n            listCtrl.canSwipeItems(!isShown);\n\n            $element.children().toggleClass('list-right-editing', isShown);\n            $element.toggleClass('disable-pointer-events', isShown);\n\n            var reorderButton = jqLite($element[0].getElementsByClassName('item-reorder'));\n            setButtonShown(reorderButton, listCtrl.showReorder);\n          });\n\n          function setButtonShown(el, shown) {\n            shown() && el.addClass('visible') || el.removeClass('active');\n            ionic.requestAnimationFrame(function() {\n              shown() && el.addClass('active') || el.removeClass('visible');\n            });\n          }\n        }\n\n      };\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name menuClose\n * @module ionic\n * @restrict AC\n *\n * @description\n * `menu-close` is an attribute directive that closes a currently opened side menu.\n * Note that by default, navigation transitions will not animate between views when\n * the menu is open. Additionally, this directive will reset the entering view's\n * history stack, making the new page the root of the history stack. This is done\n * to replicate the user experience seen in most side menu implementations, which is\n * to not show the back button at the root of the stack and show only the\n * menu button. We recommend that you also use the `enable-menu-with-back-views=\"false\"`\n * {@link ionic.directive:ionSideMenus} attribute when using the menuClose directive.\n *\n * @usage\n * Below is an example of a link within a side menu. Tapping this link would\n * automatically close the currently opened menu.\n *\n * ```html\n * <a menu-close href=\"#/home\" class=\"item\">Home</a>\n * ```\n *\n * Note that if your destination state uses a resolve and that resolve asynchronously\n * takes longer than a standard transition (300ms), you'll need to set the\n * `nextViewOptions` manually as your resolve completes.\n *\n * ```js\n * $ionicHistory.nextViewOptions({\n *  historyRoot: true,\n *  disableAnimate: true,\n *  expire: 300\n * });\n * ```\n */\nIonicModule\n.directive('menuClose', ['$ionicHistory', '$timeout', function($ionicHistory, $timeout) {\n  return {\n    restrict: 'AC',\n    link: function($scope, $element) {\n      $element.bind('click', function() {\n        var sideMenuCtrl = $element.inheritedData('$ionSideMenusController');\n        if (sideMenuCtrl) {\n          $ionicHistory.nextViewOptions({\n            historyRoot: true,\n            disableAnimate: true,\n            expire: 300\n          });\n          // if no transition in 300ms, reset nextViewOptions\n          // the expire should take care of it, but will be cancelled in some\n          // cases. This directive is an exception to the rules of history.js\n          $timeout( function() {\n            $ionicHistory.nextViewOptions({\n              historyRoot: false,\n              disableAnimate: false\n            });\n          }, 300);\n          sideMenuCtrl.close();\n        }\n      });\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name menuToggle\n * @module ionic\n * @restrict AC\n *\n * @description\n * Toggle a side menu on the given side.\n *\n * @usage\n * Below is an example of a link within a nav bar. Tapping this button\n * would open the given side menu, and tapping it again would close it.\n *\n * ```html\n * <ion-nav-bar>\n *   <ion-nav-buttons side=\"left\">\n *    <!-- Toggle left side menu -->\n *    <button menu-toggle=\"left\" class=\"button button-icon icon ion-navicon\"></button>\n *   </ion-nav-buttons>\n *   <ion-nav-buttons side=\"right\">\n *    <!-- Toggle right side menu -->\n *    <button menu-toggle=\"right\" class=\"button button-icon icon ion-navicon\"></button>\n *   </ion-nav-buttons>\n * </ion-nav-bar>\n * ```\n *\n * ### Button Hidden On Child Views\n * By default, the menu toggle button will only appear on a root\n * level side-menu page. Navigating in to child views will hide the menu-\n * toggle button. They can be made visible on child pages by setting the\n * enable-menu-with-back-views attribute of the {@link ionic.directive:ionSideMenus}\n * directive to true.\n *\n * ```html\n * <ion-side-menus enable-menu-with-back-views=\"true\">\n * ```\n */\nIonicModule\n.directive('menuToggle', function() {\n  return {\n    restrict: 'AC',\n    link: function($scope, $element, $attr) {\n      $scope.$on('$ionicView.beforeEnter', function(ev, viewData) {\n        if (viewData.enableBack) {\n          var sideMenuCtrl = $element.inheritedData('$ionSideMenusController');\n          if (!sideMenuCtrl.enableMenuWithBackViews()) {\n            $element.addClass('hide');\n          }\n        } else {\n          $element.removeClass('hide');\n        }\n      });\n\n      $element.bind('click', function() {\n        var sideMenuCtrl = $element.inheritedData('$ionSideMenusController');\n        sideMenuCtrl && sideMenuCtrl.toggle($attr.menuToggle);\n      });\n    }\n  };\n});\n\n/*\n * We don't document the ionModal directive, we instead document\n * the $ionicModal service\n */\nIonicModule\n.directive('ionModal', [function() {\n  return {\n    restrict: 'E',\n    transclude: true,\n    replace: true,\n    controller: [function() {}],\n    template: '<div class=\"modal-backdrop\">' +\n                '<div class=\"modal-backdrop-bg\"></div>' +\n                '<div class=\"modal-wrapper\" ng-transclude></div>' +\n              '</div>'\n  };\n}]);\n\nIonicModule\n.directive('ionModalView', function() {\n  return {\n    restrict: 'E',\n    compile: function(element) {\n      element.addClass('modal');\n    }\n  };\n});\n\n/**\n * @ngdoc directive\n * @name ionNavBackButton\n * @module ionic\n * @restrict E\n * @parent ionNavBar\n * @description\n * Creates a back button inside an {@link ionic.directive:ionNavBar}.\n *\n * The back button will appear when the user is able to go back in the current navigation stack. By\n * default, the markup of the back button is automatically built using platform-appropriate defaults\n * (iOS back button icon on iOS and Android icon on Android).\n *\n * Additionally, the button is automatically set to `$ionicGoBack()` on click/tap. By default, the\n * app will navigate back one view when the back button is clicked.  More advanced behavior is also\n * possible, as outlined below.\n *\n * @usage\n *\n * Recommended markup for default settings:\n *\n * ```html\n * <ion-nav-bar>\n *   <ion-nav-back-button>\n *   </ion-nav-back-button>\n * </ion-nav-bar>\n * ```\n *\n * With custom inner markup, and automatically adds a default click action:\n *\n * ```html\n * <ion-nav-bar>\n *   <ion-nav-back-button class=\"button-clear\">\n *     <i class=\"ion-arrow-left-c\"></i> Back\n *   </ion-nav-back-button>\n * </ion-nav-bar>\n * ```\n *\n * With custom inner markup and custom click action, using {@link ionic.service:$ionicHistory}:\n *\n * ```html\n * <ion-nav-bar ng-controller=\"MyCtrl\">\n *   <ion-nav-back-button class=\"button-clear\"\n *     ng-click=\"myGoBack()\">\n *     <i class=\"ion-arrow-left-c\"></i> Back\n *   </ion-nav-back-button>\n * </ion-nav-bar>\n * ```\n * ```js\n * function MyCtrl($scope, $ionicHistory) {\n *   $scope.myGoBack = function() {\n *     $ionicHistory.goBack();\n *   };\n * }\n * ```\n */\nIonicModule\n.directive('ionNavBackButton', ['$ionicConfig', '$document', function($ionicConfig, $document) {\n  return {\n    restrict: 'E',\n    require: '^ionNavBar',\n    compile: function(tElement, tAttrs) {\n\n      // clone the back button, but as a <div>\n      var buttonEle = $document[0].createElement('button');\n      for (var n in tAttrs.$attr) {\n        buttonEle.setAttribute(tAttrs.$attr[n], tAttrs[n]);\n      }\n\n      if (!tAttrs.ngClick) {\n        buttonEle.setAttribute('ng-click', '$ionicGoBack()');\n      }\n\n      buttonEle.className = 'button back-button hide buttons ' + (tElement.attr('class') || '');\n      buttonEle.innerHTML = tElement.html() || '';\n\n      var childNode;\n      var hasIcon = hasIconClass(tElement[0]);\n      var hasInnerText;\n      var hasButtonText;\n      var hasPreviousTitle;\n\n      for (var x = 0; x < tElement[0].childNodes.length; x++) {\n        childNode = tElement[0].childNodes[x];\n        if (childNode.nodeType === 1) {\n          if (hasIconClass(childNode)) {\n            hasIcon = true;\n          } else if (childNode.classList.contains('default-title')) {\n            hasButtonText = true;\n          } else if (childNode.classList.contains('previous-title')) {\n            hasPreviousTitle = true;\n          }\n        } else if (!hasInnerText && childNode.nodeType === 3) {\n          hasInnerText = !!childNode.nodeValue.trim();\n        }\n      }\n\n      function hasIconClass(ele) {\n        return /ion-|icon/.test(ele.className);\n      }\n\n      var defaultIcon = $ionicConfig.backButton.icon();\n      if (!hasIcon && defaultIcon && defaultIcon !== 'none') {\n        buttonEle.innerHTML = '<i class=\"icon ' + defaultIcon + '\"></i> ' + buttonEle.innerHTML;\n        buttonEle.className += ' button-clear';\n      }\n\n      if (!hasInnerText) {\n        var buttonTextEle = $document[0].createElement('span');\n        buttonTextEle.className = 'back-text';\n\n        if (!hasButtonText && $ionicConfig.backButton.text()) {\n          buttonTextEle.innerHTML += '<span class=\"default-title\">' + $ionicConfig.backButton.text() + '</span>';\n        }\n        if (!hasPreviousTitle && $ionicConfig.backButton.previousTitleText()) {\n          buttonTextEle.innerHTML += '<span class=\"previous-title\"></span>';\n        }\n        buttonEle.appendChild(buttonTextEle);\n\n      }\n\n      tElement.attr('class', 'hide');\n      tElement.empty();\n\n      return {\n        pre: function($scope, $element, $attr, navBarCtrl) {\n          // only register the plain HTML, the navBarCtrl takes care of scope/compile/link\n          navBarCtrl.navElement('backButton', buttonEle.outerHTML);\n          buttonEle = null;\n        }\n      };\n    }\n  };\n}]);\n\n\n/**\n * @ngdoc directive\n * @name ionNavBar\n * @module ionic\n * @delegate ionic.service:$ionicNavBarDelegate\n * @restrict E\n *\n * @description\n * If we have an {@link ionic.directive:ionNavView} directive, we can also create an\n * `<ion-nav-bar>`, which will create a topbar that updates as the application state changes.\n *\n * We can add a back button by putting an {@link ionic.directive:ionNavBackButton} inside.\n *\n * We can add buttons depending on the currently visible view using\n * {@link ionic.directive:ionNavButtons}.\n *\n * Note that the ion-nav-bar element will only work correctly if your content has an\n * ionView around it.\n *\n * @usage\n *\n * ```html\n * <body ng-app=\"starter\">\n *   <!-- The nav bar that will be updated as we navigate -->\n *   <ion-nav-bar class=\"bar-positive\">\n *   </ion-nav-bar>\n *\n *   <!-- where the initial view template will be rendered -->\n *   <ion-nav-view>\n *     <ion-view>\n *       <ion-content>Hello!</ion-content>\n *     </ion-view>\n *   </ion-nav-view>\n * </body>\n * ```\n *\n * @param {string=} delegate-handle The handle used to identify this navBar\n * with {@link ionic.service:$ionicNavBarDelegate}.\n * @param align-title {string=} Where to align the title of the navbar.\n * Available: 'left', 'right', 'center'. Defaults to 'center'.\n * @param {boolean=} no-tap-scroll By default, the navbar will scroll the content\n * to the top when tapped.  Set no-tap-scroll to true to disable this behavior.\n *\n */\nIonicModule\n.directive('ionNavBar', function() {\n  return {\n    restrict: 'E',\n    controller: '$ionicNavBar',\n    scope: true,\n    link: function($scope, $element, $attr, ctrl) {\n      ctrl.init();\n    }\n  };\n});\n\n\n/**\n * @ngdoc directive\n * @name ionNavButtons\n * @module ionic\n * @restrict E\n * @parent ionNavView\n *\n * @description\n * Use nav buttons to set the buttons on your {@link ionic.directive:ionNavBar}\n * from within an {@link ionic.directive:ionView}. This gives each\n * view template the ability to specify which buttons should show in the nav bar,\n * overriding any default buttons already placed in the nav bar.\n *\n * Any buttons you declare will be positioned on the navbar's corresponding side. Primary\n * buttons generally map to the left side of the header, and secondary buttons are\n * generally on the right side. However, their exact locations are platform-specific.\n * For example, in iOS, the primary buttons are on the far left of the header, and\n * secondary buttons are on the far right, with the header title centered between them.\n * For Android, however, both groups of buttons are on the far right of the header,\n * with the header title aligned left.\n *\n * We recommend always using `primary` and `secondary`, so the buttons correctly map\n * to the side familiar to users of each platform. However, in cases where buttons should\n * always be on an exact side, both `left` and `right` sides are still available. For\n * example, a toggle button for a left side menu should be on the left side; in this case,\n * we'd recommend using `side=\"left\"`, so it's always on the left, no matter the platform.\n *\n * ***Note*** that `ion-nav-buttons` must be immediate descendants of the `ion-view` or\n * `ion-nav-bar` element (basically, don't wrap it in another div).\n *\n * @usage\n * ```html\n * <ion-nav-bar>\n * </ion-nav-bar>\n * <ion-nav-view>\n *   <ion-view>\n *     <ion-nav-buttons side=\"primary\">\n *       <button class=\"button\" ng-click=\"doSomething()\">\n *         I'm a button on the primary of the navbar!\n *       </button>\n *     </ion-nav-buttons>\n *     <ion-content>\n *       Some super content here!\n *     </ion-content>\n *   </ion-view>\n * </ion-nav-view>\n * ```\n *\n * @param {string} side The side to place the buttons in the\n * {@link ionic.directive:ionNavBar}. Available sides: `primary`, `secondary`, `left`, and `right`.\n */\nIonicModule\n.directive('ionNavButtons', ['$document', function($document) {\n  return {\n    require: '^ionNavBar',\n    restrict: 'E',\n    compile: function(tElement, tAttrs) {\n      var side = 'left';\n\n      if (/^primary|secondary|right$/i.test(tAttrs.side || '')) {\n        side = tAttrs.side.toLowerCase();\n      }\n\n      var spanEle = $document[0].createElement('span');\n      spanEle.className = side + '-buttons';\n      spanEle.innerHTML = tElement.html();\n\n      var navElementType = side + 'Buttons';\n\n      tElement.attr('class', 'hide');\n      tElement.empty();\n\n      return {\n        pre: function($scope, $element, $attrs, navBarCtrl) {\n          // only register the plain HTML, the navBarCtrl takes care of scope/compile/link\n\n          var parentViewCtrl = $element.parent().data('$ionViewController');\n          if (parentViewCtrl) {\n            // if the parent is an ion-view, then these are ion-nav-buttons for JUST this ion-view\n            parentViewCtrl.navElement(navElementType, spanEle.outerHTML);\n\n          } else {\n            // these are buttons for all views that do not have their own ion-nav-buttons\n            navBarCtrl.navElement(navElementType, spanEle.outerHTML);\n          }\n\n          spanEle = null;\n        }\n      };\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name navDirection\n * @module ionic\n * @restrict A\n *\n * @description\n * The direction which the nav view transition should animate. Available options\n * are: `forward`, `back`, `enter`, `exit`, `swap`.\n *\n * @usage\n *\n * ```html\n * <a nav-direction=\"forward\" href=\"#/home\">Home</a>\n * ```\n */\nIonicModule\n.directive('navDirection', ['$ionicViewSwitcher', function($ionicViewSwitcher) {\n  return {\n    restrict: 'A',\n    priority: 1000,\n    link: function($scope, $element, $attr) {\n      $element.bind('click', function() {\n        $ionicViewSwitcher.nextDirection($attr.navDirection);\n      });\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name ionNavTitle\n * @module ionic\n * @restrict E\n * @parent ionNavView\n *\n * @description\n *\n * The nav title directive replaces an {@link ionic.directive:ionNavBar} title text with\n * custom HTML from within an {@link ionic.directive:ionView} template. This gives each\n * view the ability to specify its own custom title element, such as an image or any HTML,\n * rather than being text-only. Alternatively, text-only titles can be updated using the\n * `view-title` {@link ionic.directive:ionView} attribute.\n *\n * Note that `ion-nav-title` must be an immediate descendant of the `ion-view` or\n * `ion-nav-bar` element (basically don't wrap it in another div).\n *\n * @usage\n * ```html\n * <ion-nav-bar>\n * </ion-nav-bar>\n * <ion-nav-view>\n *   <ion-view>\n *     <ion-nav-title>\n *       <img src=\"logo.svg\">\n *     </ion-nav-title>\n *     <ion-content>\n *       Some super content here!\n *     </ion-content>\n *   </ion-view>\n * </ion-nav-view>\n * ```\n *\n */\nIonicModule\n.directive('ionNavTitle', ['$document', function($document) {\n  return {\n    require: '^ionNavBar',\n    restrict: 'E',\n    compile: function(tElement, tAttrs) {\n      var navElementType = 'title';\n      var spanEle = $document[0].createElement('span');\n      for (var n in tAttrs.$attr) {\n        spanEle.setAttribute(tAttrs.$attr[n], tAttrs[n]);\n      }\n      spanEle.classList.add('nav-bar-title');\n      spanEle.innerHTML = tElement.html();\n\n      tElement.attr('class', 'hide');\n      tElement.empty();\n\n      return {\n        pre: function($scope, $element, $attrs, navBarCtrl) {\n          // only register the plain HTML, the navBarCtrl takes care of scope/compile/link\n\n          var parentViewCtrl = $element.parent().data('$ionViewController');\n          if (parentViewCtrl) {\n            // if the parent is an ion-view, then these are ion-nav-buttons for JUST this ion-view\n            parentViewCtrl.navElement(navElementType, spanEle.outerHTML);\n\n          } else {\n            // these are buttons for all views that do not have their own ion-nav-buttons\n            navBarCtrl.navElement(navElementType, spanEle.outerHTML);\n          }\n\n          spanEle = null;\n        }\n      };\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name navTransition\n * @module ionic\n * @restrict A\n *\n * @description\n * The transition type which the nav view transition should use when it animates.\n * Current, options are `ios`, `android`, and `none`. More options coming soon.\n *\n * @usage\n *\n * ```html\n * <a nav-transition=\"none\" href=\"#/home\">Home</a>\n * ```\n */\nIonicModule\n.directive('navTransition', ['$ionicViewSwitcher', function($ionicViewSwitcher) {\n  return {\n    restrict: 'A',\n    priority: 1000,\n    link: function($scope, $element, $attr) {\n      $element.bind('click', function() {\n        $ionicViewSwitcher.nextTransition($attr.navTransition);\n      });\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name ionNavView\n * @module ionic\n * @restrict E\n * @codepen odqCz\n *\n * @description\n * As a user navigates throughout your app, Ionic is able to keep track of their\n * navigation history. By knowing their history, transitions between views\n * correctly enter and exit using the platform's transition style. An additional\n * benefit to Ionic's navigation system is its ability to manage multiple\n * histories. For example, each tab can have it's own navigation history stack.\n *\n * Ionic uses the AngularUI Router module so app interfaces can be organized\n * into various \"states\". Like Angular's core $route service, URLs can be used\n * to control the views. However, the AngularUI Router provides a more powerful\n * state manager in that states are bound to named, nested, and parallel views,\n * allowing more than one template to be rendered on the same page.\n * Additionally, each state is not required to be bound to a URL, and data can\n * be pushed to each state which allows much flexibility.\n *\n * The ionNavView directive is used to render templates in your application. Each template\n * is part of a state. States are usually mapped to a url, and are defined programatically\n * using angular-ui-router (see [their docs](https://github.com/angular-ui/ui-router/wiki),\n * and remember to replace ui-view with ion-nav-view in examples).\n *\n * @usage\n * In this example, we will create a navigation view that contains our different states for the app.\n *\n * To do this, in our markup we use ionNavView top level directive. To display a header bar we use\n * the {@link ionic.directive:ionNavBar} directive that updates as we navigate through the\n * navigation stack.\n *\n * Next, we need to setup our states that will be rendered.\n *\n * ```js\n * var app = angular.module('myApp', ['ionic']);\n * app.config(function($stateProvider) {\n *   $stateProvider\n *   .state('index', {\n *     url: '/',\n *     templateUrl: 'home.html'\n *   })\n *   .state('music', {\n *     url: '/music',\n *     templateUrl: 'music.html'\n *   });\n * });\n * ```\n * Then on app start, $stateProvider will look at the url, see if it matches the index state,\n * and then try to load home.html into the `<ion-nav-view>`.\n *\n * Pages are loaded by the URLs given. One simple way to create templates in Angular is to put\n * them directly into your HTML file and use the `<script type=\"text/ng-template\">` syntax.\n * So here is one way to put home.html into our app:\n *\n * ```html\n * <script id=\"home\" type=\"text/ng-template\">\n *   <!-- The title of the ion-view will be shown on the navbar -->\n *   <ion-view view-title=\"Home\">\n *     <ion-content ng-controller=\"HomeCtrl\">\n *       <!-- The content of the page -->\n *       <a href=\"#/music\">Go to music page!</a>\n *     </ion-content>\n *   </ion-view>\n * </script>\n * ```\n *\n * This is good to do because the template will be cached for very fast loading, instead of\n * having to fetch them from the network.\n *\n * ## Caching\n *\n * By default, views are cached to improve performance. When a view is navigated away from, its\n * element is left in the DOM, and its scope is disconnected from the `$watch` cycle. When\n * navigating to a view that is already cached, its scope is then reconnected, and the existing\n * element that was left in the DOM becomes the active view. This also allows for the scroll\n * position of previous views to be maintained.\n *\n * Caching can be disabled and enabled in multiple ways. By default, Ionic will cache a maximum of\n * 10 views, and not only can this be configured, but apps can also explicitly state which views\n * should and should not be cached.\n *\n * Note that because we are caching these views, *we aren’t destroying scopes*. Instead, scopes\n * are being disconnected from the watch cycle. Because scopes are not being destroyed and\n * recreated, controllers are not loading again on a subsequent viewing. If the app/controller\n * needs to know when a view has entered or has left, then view events emitted from the\n * {@link ionic.directive:ionView} scope, such as `$ionicView.enter`, may be useful.\n *\n * By default, when navigating back in the history, the \"forward\" views are removed from the cache.\n * If you navigate forward to the same view again, it'll create a new DOM element and controller\n * instance. Basically, any forward views are reset each time. This can be configured using the\n * {@link ionic.provider:$ionicConfigProvider}:\n *\n * ```js\n * $ionicConfigProvider.views.forwardCache(true);\n * ```\n *\n * #### Disable cache globally\n *\n * The {@link ionic.provider:$ionicConfigProvider} can be used to set the maximum allowable views\n * which can be cached, but this can also be use to disable all caching by setting it to 0.\n *\n * ```js\n * $ionicConfigProvider.views.maxCache(0);\n * ```\n *\n * #### Disable cache within state provider\n *\n * ```js\n * $stateProvider.state('myState', {\n *    cache: false,\n *    url : '/myUrl',\n *    templateUrl : 'my-template.html'\n * })\n * ```\n *\n * #### Disable cache with an attribute\n *\n * ```html\n * <ion-view cache-view=\"false\" view-title=\"My Title!\">\n *   ...\n * </ion-view>\n * ```\n *\n *\n * ## AngularUI Router\n *\n * Please visit [AngularUI Router's docs](https://github.com/angular-ui/ui-router/wiki) for\n * more info. Below is a great video by the AngularUI Router team that may help to explain\n * how it all works:\n *\n * <iframe width=\"560\" height=\"315\" src=\"//www.youtube.com/embed/dqJRoh8MnBo\"\n * frameborder=\"0\" allowfullscreen></iframe>\n *\n * Note: We do not recommend using [resolve](https://github.com/angular-ui/ui-router/wiki#resolve)\n * of AngularUI Router. The recommended approach is to execute any logic needed before beginning the state transition.\n *\n * @param {string=} name A view name. The name should be unique amongst the other views in the\n * same state. You can have views of the same name that live in different states. For more\n * information, see ui-router's\n * [ui-view documentation](http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.directive:ui-view).\n */\nIonicModule\n.directive('ionNavView', [\n  '$state',\n  '$ionicConfig',\nfunction($state, $ionicConfig) {\n  // IONIC's fork of Angular UI Router, v0.2.10\n  // the navView handles registering views in the history and how to transition between them\n  return {\n    restrict: 'E',\n    terminal: true,\n    priority: 2000,\n    transclude: true,\n    controller: '$ionicNavView',\n    compile: function(tElement, tAttrs, transclude) {\n\n      // a nav view element is a container for numerous views\n      tElement.addClass('view-container');\n      ionic.DomUtil.cachedAttr(tElement, 'nav-view-transition', $ionicConfig.views.transition());\n\n      return function($scope, $element, $attr, navViewCtrl) {\n        var latestLocals;\n\n        // Put in the compiled initial view\n        transclude($scope, function(clone) {\n          $element.append(clone);\n        });\n\n        var viewData = navViewCtrl.init();\n\n        // listen for $stateChangeSuccess\n        $scope.$on('$stateChangeSuccess', function() {\n          updateView(false);\n        });\n        $scope.$on('$viewContentLoading', function() {\n          updateView(false);\n        });\n\n        // initial load, ready go\n        updateView(true);\n\n\n        function updateView(firstTime) {\n          // get the current local according to the $state\n          var viewLocals = $state.$current && $state.$current.locals[viewData.name];\n\n          // do not update THIS nav-view if its is not the container for the given state\n          // if the viewLocals are the same as THIS latestLocals, then nothing to do\n          if (!viewLocals || (!firstTime && viewLocals === latestLocals)) return;\n\n          // update the latestLocals\n          latestLocals = viewLocals;\n          viewData.state = viewLocals.$$state;\n\n          // register, update and transition to the new view\n          navViewCtrl.register(viewLocals);\n        }\n\n      };\n    }\n  };\n}]);\n\nIonicModule\n\n.config(['$provide', function($provide) {\n  $provide.decorator('ngClickDirective', ['$delegate', function($delegate) {\n    // drop the default ngClick directive\n    $delegate.shift();\n    return $delegate;\n  }]);\n}])\n\n/**\n * @private\n */\n.factory('$ionicNgClick', ['$parse', function($parse) {\n  return function(scope, element, clickExpr) {\n    var clickHandler = angular.isFunction(clickExpr) ?\n      clickExpr :\n      $parse(clickExpr);\n\n    element.on('click', function(event) {\n      scope.$apply(function() {\n        clickHandler(scope, {$event: (event)});\n      });\n    });\n\n    // Hack for iOS Safari's benefit. It goes searching for onclick handlers and is liable to click\n    // something else nearby.\n    element.onclick = noop;\n  };\n}])\n\n.directive('ngClick', ['$ionicNgClick', function($ionicNgClick) {\n  return function(scope, element, attr) {\n    $ionicNgClick(scope, element, attr.ngClick);\n  };\n}])\n\n.directive('ionStopEvent', function() {\n  return {\n    restrict: 'A',\n    link: function(scope, element, attr) {\n      element.bind(attr.ionStopEvent, eventStopPropagation);\n    }\n  };\n});\nfunction eventStopPropagation(e) {\n  e.stopPropagation();\n}\n\n\n/**\n * @ngdoc directive\n * @name ionPane\n * @module ionic\n * @restrict E\n *\n * @description A simple container that fits content, with no side effects.  Adds the 'pane' class to the element.\n */\nIonicModule\n.directive('ionPane', function() {\n  return {\n    restrict: 'E',\n    link: function(scope, element) {\n      element.addClass('pane');\n    }\n  };\n});\n\n/*\n * We don't document the ionPopover directive, we instead document\n * the $ionicPopover service\n */\nIonicModule\n.directive('ionPopover', [function() {\n  return {\n    restrict: 'E',\n    transclude: true,\n    replace: true,\n    controller: [function() {}],\n    template: '<div class=\"popover-backdrop\">' +\n                '<div class=\"popover-wrapper\" ng-transclude></div>' +\n              '</div>'\n  };\n}]);\n\nIonicModule\n.directive('ionPopoverView', function() {\n  return {\n    restrict: 'E',\n    compile: function(element) {\n      element.append(jqLite('<div class=\"popover-arrow\">'));\n      element.addClass('popover');\n    }\n  };\n});\n\n/**\n * @ngdoc directive\n * @name ionRadio\n * @module ionic\n * @restrict E\n * @codepen saoBG\n * @description\n * The radio directive is no different than the HTML radio input, except it's styled differently.\n *\n * Radio behaves like [AngularJS radio](http://docs.angularjs.org/api/ng/input/input[radio]).\n *\n * @usage\n * ```html\n * <ion-radio ng-model=\"choice\" ng-value=\"'A'\">Choose A</ion-radio>\n * <ion-radio ng-model=\"choice\" ng-value=\"'B'\">Choose B</ion-radio>\n * <ion-radio ng-model=\"choice\" ng-value=\"'C'\">Choose C</ion-radio>\n * ```\n *\n * @param {string=} name The name of the radio input.\n * @param {expression=} value The value of the radio input.\n * @param {boolean=} disabled The state of the radio input.\n * @param {string=} icon The icon to use when the radio input is selected.\n * @param {expression=} ng-value Angular equivalent of the value attribute.\n * @param {expression=} ng-model The angular model for the radio input.\n * @param {boolean=} ng-disabled Angular equivalent of the disabled attribute.\n * @param {expression=} ng-change Triggers given expression when radio input's model changes\n */\nIonicModule\n.directive('ionRadio', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '?ngModel',\n    transclude: true,\n    template:\n      '<label class=\"item item-radio\">' +\n        '<input type=\"radio\" name=\"radio-group\">' +\n        '<div class=\"radio-content\">' +\n          '<div class=\"item-content disable-pointer-events\" ng-transclude></div>' +\n          '<i class=\"radio-icon disable-pointer-events icon ion-checkmark\"></i>' +\n        '</div>' +\n      '</label>',\n\n    compile: function(element, attr) {\n      if (attr.icon) {\n        var iconElm = element.find('i');\n        iconElm.removeClass('ion-checkmark').addClass(attr.icon);\n      }\n\n      var input = element.find('input');\n      forEach({\n          'name': attr.name,\n          'value': attr.value,\n          'disabled': attr.disabled,\n          'ng-value': attr.ngValue,\n          'ng-model': attr.ngModel,\n          'ng-disabled': attr.ngDisabled,\n          'ng-change': attr.ngChange,\n          'ng-required': attr.ngRequired,\n          'required': attr.required\n      }, function(value, name) {\n        if (isDefined(value)) {\n            input.attr(name, value);\n          }\n      });\n\n      return function(scope, element, attr) {\n        scope.getValue = function() {\n          return scope.ngValue || attr.value;\n        };\n      };\n    }\n  };\n});\n\n\n/**\n * @ngdoc directive\n * @name ionRefresher\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionContent, ionic.directive:ionScroll\n * @description\n * Allows you to add pull-to-refresh to a scrollView.\n *\n * Place it as the first child of your {@link ionic.directive:ionContent} or\n * {@link ionic.directive:ionScroll} element.\n *\n * When refreshing is complete, $broadcast the 'scroll.refreshComplete' event\n * from your controller.\n *\n * @usage\n *\n * ```html\n * <ion-content ng-controller=\"MyController\">\n *   <ion-refresher\n *     pulling-text=\"Pull to refresh...\"\n *     on-refresh=\"doRefresh()\">\n *   </ion-refresher>\n *   <ion-list>\n *     <ion-item ng-repeat=\"item in items\"></ion-item>\n *   </ion-list>\n * </ion-content>\n * ```\n * ```js\n * angular.module('testApp', ['ionic'])\n * .controller('MyController', function($scope, $http) {\n *   $scope.items = [1,2,3];\n *   $scope.doRefresh = function() {\n *     $http.get('/new-items')\n *      .success(function(newItems) {\n *        $scope.items = newItems;\n *      })\n *      .finally(function() {\n *        // Stop the ion-refresher from spinning\n *        $scope.$broadcast('scroll.refreshComplete');\n *      });\n *   };\n * });\n * ```\n *\n * @param {expression=} on-refresh Called when the user pulls down enough and lets go\n * of the refresher.\n * @param {expression=} on-pulling Called when the user starts to pull down\n * on the refresher.\n * @param {string=} pulling-text The text to display while the user is pulling down.\n * @param {string=} pulling-icon The icon to display while the user is pulling down.\n * Default: 'ion-android-arrow-down'.\n * @param {string=} spinner The {@link ionic.directive:ionSpinner} icon to display\n * after user lets go of the refresher. The SVG {@link ionic.directive:ionSpinner}\n * is now the default, replacing rotating font icons. Set to `none` to disable both the\n * spinner and the icon.\n * @param {string=} refreshing-icon The font icon to display after user lets go of the\n * refresher. This is deprecated in favor of the SVG {@link ionic.directive:ionSpinner}.\n * @param {boolean=} disable-pulling-rotation Disables the rotation animation of the pulling\n * icon when it reaches its activated threshold. To be used with a custom `pulling-icon`.\n *\n */\nIonicModule\n.directive('ionRefresher', [function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: ['?^$ionicScroll', 'ionRefresher'],\n    controller: '$ionicRefresher',\n    template:\n    '<div class=\"scroll-refresher invisible\" collection-repeat-ignore>' +\n      '<div class=\"ionic-refresher-content\" ' +\n      'ng-class=\"{\\'ionic-refresher-with-text\\': pullingText || refreshingText}\">' +\n        '<div class=\"icon-pulling\" ng-class=\"{\\'pulling-rotation-disabled\\':disablePullingRotation}\">' +\n          '<i class=\"icon {{pullingIcon}}\"></i>' +\n        '</div>' +\n        '<div class=\"text-pulling\" ng-bind-html=\"pullingText\"></div>' +\n        '<div class=\"icon-refreshing\">' +\n          '<ion-spinner ng-if=\"showSpinner\" icon=\"{{spinner}}\"></ion-spinner>' +\n          '<i ng-if=\"showIcon\" class=\"icon {{refreshingIcon}}\"></i>' +\n        '</div>' +\n        '<div class=\"text-refreshing\" ng-bind-html=\"refreshingText\"></div>' +\n      '</div>' +\n    '</div>',\n    link: function($scope, $element, $attrs, ctrls) {\n\n      // JS Scrolling uses the scroll controller\n      var scrollCtrl = ctrls[0],\n          refresherCtrl = ctrls[1];\n      if (!scrollCtrl || scrollCtrl.isNative()) {\n        // Kick off native scrolling\n        refresherCtrl.init();\n      } else {\n        $element[0].classList.add('js-scrolling');\n        scrollCtrl._setRefresher(\n          $scope,\n          $element[0],\n          refresherCtrl.getRefresherDomMethods()\n        );\n\n        $scope.$on('scroll.refreshComplete', function() {\n          $scope.$evalAsync(function() {\n            if(scrollCtrl.scrollView){\n              scrollCtrl.scrollView.finishPullToRefresh();\n            }\n          });\n        });\n      }\n\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name ionScroll\n * @module ionic\n * @delegate ionic.service:$ionicScrollDelegate\n * @codepen mwFuh\n * @restrict E\n *\n * @description\n * Creates a scrollable container for all content inside.\n *\n * @usage\n *\n * Basic usage:\n *\n * ```html\n * <ion-scroll zooming=\"true\" direction=\"xy\" style=\"width: 500px; height: 500px\">\n *   <div style=\"width: 5000px; height: 5000px; background: url('https://upload.wikimedia.org/wikipedia/commons/a/ad/Europe_geological_map-en.jpg') repeat\"></div>\n *  </ion-scroll>\n * ```\n *\n * Note that it's important to set the height of the scroll box as well as the height of the inner\n * content to enable scrolling. This makes it possible to have full control over scrollable areas.\n *\n * If you'd just like to have a center content scrolling area, use {@link ionic.directive:ionContent} instead.\n *\n * @param {string=} delegate-handle The handle used to identify this scrollView\n * with {@link ionic.service:$ionicScrollDelegate}.\n * @param {string=} direction Which way to scroll. 'x' or 'y' or 'xy'. Default 'y'.\n * @param {boolean=} locking Whether to lock scrolling in one direction at a time. Useful to set to false when zoomed in or scrolling in two directions. Default true.\n * @param {boolean=} paging Whether to scroll with paging.\n * @param {expression=} on-refresh Called on pull-to-refresh, triggered by an {@link ionic.directive:ionRefresher}.\n * @param {expression=} on-scroll Called whenever the user scrolls.\n * @param {expression=} on-scroll-complete Called whenever the scrolling paging is completed.\n * @param {boolean=} scrollbar-x Whether to show the horizontal scrollbar. Default true.\n * @param {boolean=} scrollbar-y Whether to show the vertical scrollbar. Default true.\n * @param {boolean=} zooming Whether to support pinch-to-zoom\n * @param {integer=} min-zoom The smallest zoom amount allowed (default is 0.5)\n * @param {integer=} max-zoom The largest zoom amount allowed (default is 3)\n * @param {boolean=} has-bouncing Whether to allow scrolling to bounce past the edges\n * of the content.  Defaults to true on iOS, false on Android.\n */\nIonicModule\n.directive('ionScroll', [\n  '$timeout',\n  '$controller',\n  '$ionicBind',\n  '$ionicConfig',\nfunction($timeout, $controller, $ionicBind, $ionicConfig) {\n  return {\n    restrict: 'E',\n    scope: true,\n    controller: function() {},\n    compile: function(element, attr) {\n      element.addClass('scroll-view ionic-scroll');\n\n      //We cannot transclude here because it breaks element.data() inheritance on compile\n      var innerElement = jqLite('<div class=\"scroll\"></div>');\n      innerElement.append(element.contents());\n      element.append(innerElement);\n\n      var nativeScrolling = attr.overflowScroll !== \"false\" && (attr.overflowScroll === \"true\" || !$ionicConfig.scrolling.jsScrolling());\n\n      return { pre: prelink };\n      function prelink($scope, $element, $attr) {\n        $ionicBind($scope, $attr, {\n          direction: '@',\n          paging: '@',\n          $onScroll: '&onScroll',\n          $onScrollComplete: '&onScrollComplete',\n          scroll: '@',\n          scrollbarX: '@',\n          scrollbarY: '@',\n          zooming: '@',\n          minZoom: '@',\n          maxZoom: '@'\n        });\n        $scope.direction = $scope.direction || 'y';\n\n        if (isDefined($attr.padding)) {\n          $scope.$watch($attr.padding, function(newVal) {\n            innerElement.toggleClass('padding', !!newVal);\n          });\n        }\n        if ($scope.$eval($scope.paging) === true) {\n          innerElement.addClass('scroll-paging');\n        }\n\n        if (!$scope.direction) { $scope.direction = 'y'; }\n        var isPaging = $scope.$eval($scope.paging) === true;\n\n        if (nativeScrolling) {\n          $element.addClass('overflow-scroll');\n        }\n\n        $element.addClass('scroll-' + $scope.direction);\n\n        var scrollViewOptions = {\n          el: $element[0],\n          delegateHandle: $attr.delegateHandle,\n          locking: ($attr.locking || 'true') === 'true',\n          bouncing: $scope.$eval($attr.hasBouncing),\n          paging: isPaging,\n          scrollbarX: $scope.$eval($scope.scrollbarX) !== false,\n          scrollbarY: $scope.$eval($scope.scrollbarY) !== false,\n          scrollingX: $scope.direction.indexOf('x') >= 0,\n          scrollingY: $scope.direction.indexOf('y') >= 0,\n          zooming: $scope.$eval($scope.zooming) === true,\n          maxZoom: $scope.$eval($scope.maxZoom) || 3,\n          minZoom: $scope.$eval($scope.minZoom) || 0.5,\n          preventDefault: true,\n          nativeScrolling: nativeScrolling,\n          scrollingComplete: onScrollComplete\n        };\n\n        if (isPaging) {\n          scrollViewOptions.speedMultiplier = 0.8;\n          scrollViewOptions.bouncing = false;\n        }\n\n        var scrollCtrl = $controller('$ionicScroll', {\n          $scope: $scope,\n          scrollViewOptions: scrollViewOptions\n        });\n\n        function onScrollComplete() {\n          $scope.$onScrollComplete && $scope.$onScrollComplete({\n            scrollTop: scrollCtrl.scrollView.__scrollTop,\n            scrollLeft: scrollCtrl.scrollView.__scrollLeft\n          });\n        }\n      }\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name ionSideMenu\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionSideMenus\n *\n * @description\n * A container for a side menu, sibling to an {@link ionic.directive:ionSideMenuContent} directive.\n *\n * @usage\n * ```html\n * <ion-side-menu\n *   side=\"left\"\n *   width=\"myWidthValue + 20\"\n *   is-enabled=\"shouldLeftSideMenuBeEnabled()\">\n * </ion-side-menu>\n * ```\n * For a complete side menu example, see the\n * {@link ionic.directive:ionSideMenus} documentation.\n *\n * @param {string} side Which side the side menu is currently on.  Allowed values: 'left' or 'right'.\n * @param {boolean=} is-enabled Whether this side menu is enabled.\n * @param {number=} width How many pixels wide the side menu should be.  Defaults to 275.\n */\nIonicModule\n.directive('ionSideMenu', function() {\n  return {\n    restrict: 'E',\n    require: '^ionSideMenus',\n    scope: true,\n    compile: function(element, attr) {\n      angular.isUndefined(attr.isEnabled) && attr.$set('isEnabled', 'true');\n      angular.isUndefined(attr.width) && attr.$set('width', '275');\n\n      element.addClass('menu menu-' + attr.side);\n\n      return function($scope, $element, $attr, sideMenuCtrl) {\n        $scope.side = $attr.side || 'left';\n\n        var sideMenu = sideMenuCtrl[$scope.side] = new ionic.views.SideMenu({\n          width: attr.width,\n          el: $element[0],\n          isEnabled: true\n        });\n\n        $scope.$watch($attr.width, function(val) {\n          var numberVal = +val;\n          if (numberVal && numberVal == val) {\n            sideMenu.setWidth(+val);\n          }\n        });\n        $scope.$watch($attr.isEnabled, function(val) {\n          sideMenu.setIsEnabled(!!val);\n        });\n      };\n    }\n  };\n});\n\n\n/**\n * @ngdoc directive\n * @name ionSideMenuContent\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionSideMenus\n *\n * @description\n * A container for the main visible content, sibling to one or more\n * {@link ionic.directive:ionSideMenu} directives.\n *\n * @usage\n * ```html\n * <ion-side-menu-content\n *   edge-drag-threshold=\"true\"\n *   drag-content=\"true\">\n * </ion-side-menu-content>\n * ```\n * For a complete side menu example, see the\n * {@link ionic.directive:ionSideMenus} documentation.\n *\n * @param {boolean=} drag-content Whether the content can be dragged. Default true.\n * @param {boolean|number=} edge-drag-threshold Whether the content drag can only start if it is below a certain threshold distance from the edge of the screen.  Default false. Accepts three types of values:\n   *  - If a non-zero number is given, that many pixels is used as the maximum allowed distance from the edge that starts dragging the side menu.\n   *  - If true is given, the default number of pixels (25) is used as the maximum allowed distance.\n   *  - If false or 0 is given, the edge drag threshold is disabled, and dragging from anywhere on the content is allowed.\n *\n */\nIonicModule\n.directive('ionSideMenuContent', [\n  '$timeout',\n  '$ionicGesture',\n  '$window',\nfunction($timeout, $ionicGesture, $window) {\n\n  return {\n    restrict: 'EA', //DEPRECATED 'A'\n    require: '^ionSideMenus',\n    scope: true,\n    compile: function(element, attr) {\n      element.addClass('menu-content pane');\n\n      return { pre: prelink };\n      function prelink($scope, $element, $attr, sideMenuCtrl) {\n        var startCoord = null;\n        var primaryScrollAxis = null;\n\n        if (isDefined(attr.dragContent)) {\n          $scope.$watch(attr.dragContent, function(value) {\n            sideMenuCtrl.canDragContent(value);\n          });\n        } else {\n          sideMenuCtrl.canDragContent(true);\n        }\n\n        if (isDefined(attr.edgeDragThreshold)) {\n          $scope.$watch(attr.edgeDragThreshold, function(value) {\n            sideMenuCtrl.edgeDragThreshold(value);\n          });\n        }\n\n        // Listen for taps on the content to close the menu\n        function onContentTap(gestureEvt) {\n          if (sideMenuCtrl.getOpenAmount() !== 0) {\n            sideMenuCtrl.close();\n            gestureEvt.gesture.srcEvent.preventDefault();\n            startCoord = null;\n            primaryScrollAxis = null;\n          } else if (!startCoord) {\n            startCoord = ionic.tap.pointerCoord(gestureEvt.gesture.srcEvent);\n          }\n        }\n\n        function onDragX(e) {\n          if (!sideMenuCtrl.isDraggableTarget(e)) return;\n\n          if (getPrimaryScrollAxis(e) == 'x') {\n            sideMenuCtrl._handleDrag(e);\n            e.gesture.srcEvent.preventDefault();\n          }\n        }\n\n        function onDragY(e) {\n          if (getPrimaryScrollAxis(e) == 'x') {\n            e.gesture.srcEvent.preventDefault();\n          }\n        }\n\n        function onDragRelease(e) {\n          sideMenuCtrl._endDrag(e);\n          startCoord = null;\n          primaryScrollAxis = null;\n        }\n\n        function getPrimaryScrollAxis(gestureEvt) {\n          // gets whether the user is primarily scrolling on the X or Y\n          // If a majority of the drag has been on the Y since the start of\n          // the drag, but the X has moved a little bit, it's still a Y drag\n\n          if (primaryScrollAxis) {\n            // we already figured out which way they're scrolling\n            return primaryScrollAxis;\n          }\n\n          if (gestureEvt && gestureEvt.gesture) {\n\n            if (!startCoord) {\n              // get the starting point\n              startCoord = ionic.tap.pointerCoord(gestureEvt.gesture.srcEvent);\n\n            } else {\n              // we already have a starting point, figure out which direction they're going\n              var endCoord = ionic.tap.pointerCoord(gestureEvt.gesture.srcEvent);\n\n              var xDistance = Math.abs(endCoord.x - startCoord.x);\n              var yDistance = Math.abs(endCoord.y - startCoord.y);\n\n              var scrollAxis = (xDistance < yDistance ? 'y' : 'x');\n\n              if (Math.max(xDistance, yDistance) > 30) {\n                // ok, we pretty much know which way they're going\n                // let's lock it in\n                primaryScrollAxis = scrollAxis;\n              }\n\n              return scrollAxis;\n            }\n          }\n          return 'y';\n        }\n\n        var content = {\n          element: element[0],\n          onDrag: function() {},\n          endDrag: function() {},\n          setCanScroll: function(canScroll) {\n            var c = $element[0].querySelector('.scroll');\n\n            if (!c) {\n              return;\n            }\n\n            var content = angular.element(c.parentElement);\n            if (!content) {\n              return;\n            }\n\n            // freeze our scroll container if we have one\n            var scrollScope = content.scope();\n            scrollScope.scrollCtrl && scrollScope.scrollCtrl.freezeScrollShut(!canScroll);\n          },\n          getTranslateX: function() {\n            return $scope.sideMenuContentTranslateX || 0;\n          },\n          setTranslateX: ionic.animationFrameThrottle(function(amount) {\n            var xTransform = content.offsetX + amount;\n            $element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(' + xTransform + 'px,0,0)';\n            $timeout(function() {\n              $scope.sideMenuContentTranslateX = amount;\n            });\n          }),\n          setMarginLeft: ionic.animationFrameThrottle(function(amount) {\n            if (amount) {\n              amount = parseInt(amount, 10);\n              $element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(' + amount + 'px,0,0)';\n              $element[0].style.width = ($window.innerWidth - amount) + 'px';\n              content.offsetX = amount;\n            } else {\n              $element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(0,0,0)';\n              $element[0].style.width = '';\n              content.offsetX = 0;\n            }\n          }),\n          setMarginRight: ionic.animationFrameThrottle(function(amount) {\n            if (amount) {\n              amount = parseInt(amount, 10);\n              $element[0].style.width = ($window.innerWidth - amount) + 'px';\n              content.offsetX = amount;\n            } else {\n              $element[0].style.width = '';\n              content.offsetX = 0;\n            }\n            // reset incase left gets grabby\n            $element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(0,0,0)';\n          }),\n          setMarginLeftAndRight: ionic.animationFrameThrottle(function(amountLeft, amountRight) {\n            amountLeft = amountLeft && parseInt(amountLeft, 10) || 0;\n            amountRight = amountRight && parseInt(amountRight, 10) || 0;\n\n            var amount = amountLeft + amountRight;\n\n            if (amount > 0) {\n              $element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(' + amountLeft + 'px,0,0)';\n              $element[0].style.width = ($window.innerWidth - amount) + 'px';\n              content.offsetX = amountLeft;\n            } else {\n              $element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(0,0,0)';\n              $element[0].style.width = '';\n              content.offsetX = 0;\n            }\n            // reset incase left gets grabby\n            //$element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(0,0,0)';\n          }),\n          enableAnimation: function() {\n            $scope.animationEnabled = true;\n            $element[0].classList.add('menu-animated');\n          },\n          disableAnimation: function() {\n            $scope.animationEnabled = false;\n            $element[0].classList.remove('menu-animated');\n          },\n          offsetX: 0\n        };\n\n        sideMenuCtrl.setContent(content);\n\n        // add gesture handlers\n        var gestureOpts = { stop_browser_behavior: false };\n        gestureOpts.prevent_default_directions = ['left', 'right'];\n        var contentTapGesture = $ionicGesture.on('tap', onContentTap, $element, gestureOpts);\n        var dragRightGesture = $ionicGesture.on('dragright', onDragX, $element, gestureOpts);\n        var dragLeftGesture = $ionicGesture.on('dragleft', onDragX, $element, gestureOpts);\n        var dragUpGesture = $ionicGesture.on('dragup', onDragY, $element, gestureOpts);\n        var dragDownGesture = $ionicGesture.on('dragdown', onDragY, $element, gestureOpts);\n        var releaseGesture = $ionicGesture.on('release', onDragRelease, $element, gestureOpts);\n\n        // Cleanup\n        $scope.$on('$destroy', function() {\n          if (content) {\n            content.element = null;\n            content = null;\n          }\n          $ionicGesture.off(dragLeftGesture, 'dragleft', onDragX);\n          $ionicGesture.off(dragRightGesture, 'dragright', onDragX);\n          $ionicGesture.off(dragUpGesture, 'dragup', onDragY);\n          $ionicGesture.off(dragDownGesture, 'dragdown', onDragY);\n          $ionicGesture.off(releaseGesture, 'release', onDragRelease);\n          $ionicGesture.off(contentTapGesture, 'tap', onContentTap);\n        });\n      }\n    }\n  };\n}]);\n\nIonicModule\n\n/**\n * @ngdoc directive\n * @name ionSideMenus\n * @module ionic\n * @delegate ionic.service:$ionicSideMenuDelegate\n * @restrict E\n *\n * @description\n * A container element for side menu(s) and the main content. Allows the left and/or right side menu\n * to be toggled by dragging the main content area side to side.\n *\n * To automatically close an opened menu, you can add the {@link ionic.directive:menuClose} attribute\n * directive. The `menu-close` attribute is usually added to links and buttons within\n * `ion-side-menu-content`, so that when the element is clicked, the opened side menu will\n * automatically close.\n *\n * \"Burger Icon\" toggles can be added to the header with the {@link ionic.directive:menuToggle}\n * attribute directive. Clicking the toggle will open and close the side menu like the `menu-close`\n * directive. The side menu will automatically hide on child pages, but can be overridden with the\n * enable-menu-with-back-views attribute mentioned below.\n *\n * By default, side menus are hidden underneath their side menu content and can be opened by swiping\n * the content left or right or by toggling a button to show the side menu. Additionally, by adding the\n * {@link ionic.directive:exposeAsideWhen} attribute directive to an\n * {@link ionic.directive:ionSideMenu} element directive, a side menu can be given instructions about\n * \"when\" the menu should be exposed (always viewable).\n *\n * ![Side Menu](http://ionicframework.com.s3.amazonaws.com/docs/controllers/sidemenu.gif)\n *\n * For more information on side menus, check out:\n *\n * - {@link ionic.directive:ionSideMenuContent}\n * - {@link ionic.directive:ionSideMenu}\n * - {@link ionic.directive:menuToggle}\n * - {@link ionic.directive:menuClose}\n * - {@link ionic.directive:exposeAsideWhen}\n *\n * @usage\n * To use side menus, add an `<ion-side-menus>` parent element. This will encompass all pages that have a\n * side menu, and have at least 2 child elements: 1 `<ion-side-menu-content>` for the center content,\n * and one or more `<ion-side-menu>` directives for each side menu(left/right) that you wish to place.\n *\n * ```html\n * <ion-side-menus>\n *   <!-- Left menu -->\n *   <ion-side-menu side=\"left\">\n *   </ion-side-menu>\n *\n *   <ion-side-menu-content>\n *   <!-- Main content, usually <ion-nav-view> -->\n *   </ion-side-menu-content>\n *\n *   <!-- Right menu -->\n *   <ion-side-menu side=\"right\">\n *   </ion-side-menu>\n *\n * </ion-side-menus>\n * ```\n * ```js\n * function ContentController($scope, $ionicSideMenuDelegate) {\n *   $scope.toggleLeft = function() {\n *     $ionicSideMenuDelegate.toggleLeft();\n *   };\n * }\n * ```\n *\n * @param {bool=} enable-menu-with-back-views Determines whether the side menu is enabled when the\n * back button is showing. When set to `false`, any {@link ionic.directive:menuToggle} will be hidden,\n * and the user cannot swipe to open the menu. When going back to the root page of the side menu (the\n * page without a back button visible), then any menuToggle buttons will show again, and menus will be\n * enabled again.\n * @param {string=} delegate-handle The handle used to identify this side menu\n * with {@link ionic.service:$ionicSideMenuDelegate}.\n *\n */\n.directive('ionSideMenus', ['$ionicBody', function($ionicBody) {\n  return {\n    restrict: 'ECA',\n    controller: '$ionicSideMenus',\n    compile: function(element, attr) {\n      attr.$set('class', (attr['class'] || '') + ' view');\n\n      return { pre: prelink };\n      function prelink($scope, $element, $attrs, ctrl) {\n\n        ctrl.enableMenuWithBackViews($scope.$eval($attrs.enableMenuWithBackViews));\n\n        $scope.$on('$ionicExposeAside', function(evt, isAsideExposed) {\n          if (!$scope.$exposeAside) $scope.$exposeAside = {};\n          $scope.$exposeAside.active = isAsideExposed;\n          $ionicBody.enableClass(isAsideExposed, 'aside-open');\n        });\n\n        $scope.$on('$ionicView.beforeEnter', function(ev, d) {\n          if (d.historyId) {\n            $scope.$activeHistoryId = d.historyId;\n          }\n        });\n\n        $scope.$on('$destroy', function() {\n          $ionicBody.removeClass('menu-open', 'aside-open');\n        });\n\n      }\n    }\n  };\n}]);\n\n\n/**\n * @ngdoc directive\n * @name ionSlideBox\n * @module ionic\n * @codepen AjgEB\n * @deprecated will be removed in the next Ionic release in favor of the new ion-slides component.\n * Don't depend on the internal behavior of this widget.\n * @delegate ionic.service:$ionicSlideBoxDelegate\n * @restrict E\n * @description\n * The Slide Box is a multi-page container where each page can be swiped or dragged between:\n *\n *\n * @usage\n * ```html\n * <ion-slide-box on-slide-changed=\"slideHasChanged($index)\">\n *   <ion-slide>\n *     <div class=\"box blue\"><h1>BLUE</h1></div>\n *   </ion-slide>\n *   <ion-slide>\n *     <div class=\"box yellow\"><h1>YELLOW</h1></div>\n *   </ion-slide>\n *   <ion-slide>\n *     <div class=\"box pink\"><h1>PINK</h1></div>\n *   </ion-slide>\n * </ion-slide-box>\n * ```\n *\n * @param {string=} delegate-handle The handle used to identify this slideBox\n * with {@link ionic.service:$ionicSlideBoxDelegate}.\n * @param {boolean=} does-continue Whether the slide box should loop.\n * @param {boolean=} auto-play Whether the slide box should automatically slide. Default true if does-continue is true.\n * @param {number=} slide-interval How many milliseconds to wait to change slides (if does-continue is true). Defaults to 4000.\n * @param {boolean=} show-pager Whether a pager should be shown for this slide box. Accepts expressions via `show-pager=\"{{shouldShow()}}\"`. Defaults to true.\n * @param {expression=} pager-click Expression to call when a pager is clicked (if show-pager is true). Is passed the 'index' variable.\n * @param {expression=} on-slide-changed Expression called whenever the slide is changed.  Is passed an '$index' variable.\n * @param {expression=} active-slide Model to bind the current slide index to.\n */\nIonicModule\n.directive('ionSlideBox', [\n  '$animate',\n  '$timeout',\n  '$compile',\n  '$ionicSlideBoxDelegate',\n  '$ionicHistory',\n  '$ionicScrollDelegate',\nfunction($animate, $timeout, $compile, $ionicSlideBoxDelegate, $ionicHistory, $ionicScrollDelegate) {\n  return {\n    restrict: 'E',\n    replace: true,\n    transclude: true,\n    scope: {\n      autoPlay: '=',\n      doesContinue: '@',\n      slideInterval: '@',\n      showPager: '@',\n      pagerClick: '&',\n      disableScroll: '@',\n      onSlideChanged: '&',\n      activeSlide: '=?',\n      bounce: '@'\n    },\n    controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {\n      var _this = this;\n\n      var continuous = $scope.$eval($scope.doesContinue) === true;\n      var bouncing = ($scope.$eval($scope.bounce) !== false); //Default to true\n      var shouldAutoPlay = isDefined($attrs.autoPlay) ? !!$scope.autoPlay : false;\n      var slideInterval = shouldAutoPlay ? $scope.$eval($scope.slideInterval) || 4000 : 0;\n\n      var slider = new ionic.views.Slider({\n        el: $element[0],\n        auto: slideInterval,\n        continuous: continuous,\n        startSlide: $scope.activeSlide,\n        bouncing: bouncing,\n        slidesChanged: function() {\n          $scope.currentSlide = slider.currentIndex();\n\n          // Try to trigger a digest\n          $timeout(function() {});\n        },\n        callback: function(slideIndex) {\n          $scope.currentSlide = slideIndex;\n          $scope.onSlideChanged({ index: $scope.currentSlide, $index: $scope.currentSlide});\n          $scope.$parent.$broadcast('slideBox.slideChanged', slideIndex);\n          $scope.activeSlide = slideIndex;\n          // Try to trigger a digest\n          $timeout(function() {});\n        },\n        onDrag: function() {\n          freezeAllScrolls(true);\n        },\n        onDragEnd: function() {\n          freezeAllScrolls(false);\n        }\n      });\n\n      function freezeAllScrolls(shouldFreeze) {\n        if (shouldFreeze && !_this.isScrollFreeze) {\n          $ionicScrollDelegate.freezeAllScrolls(shouldFreeze);\n\n        } else if (!shouldFreeze && _this.isScrollFreeze) {\n          $ionicScrollDelegate.freezeAllScrolls(false);\n        }\n        _this.isScrollFreeze = shouldFreeze;\n      }\n\n      slider.enableSlide($scope.$eval($attrs.disableScroll) !== true);\n\n      $scope.$watch('activeSlide', function(nv) {\n        if (isDefined(nv)) {\n          slider.slide(nv);\n        }\n      });\n\n      $scope.$on('slideBox.nextSlide', function() {\n        slider.next();\n      });\n\n      $scope.$on('slideBox.prevSlide', function() {\n        slider.prev();\n      });\n\n      $scope.$on('slideBox.setSlide', function(e, index) {\n        slider.slide(index);\n      });\n\n      //Exposed for testing\n      this.__slider = slider;\n\n      var deregisterInstance = $ionicSlideBoxDelegate._registerInstance(\n        slider, $attrs.delegateHandle, function() {\n          return $ionicHistory.isActiveScope($scope);\n        }\n      );\n      $scope.$on('$destroy', function() {\n        deregisterInstance();\n        slider.kill();\n      });\n\n      this.slidesCount = function() {\n        return slider.slidesCount();\n      };\n\n      this.onPagerClick = function(index) {\n        $scope.pagerClick({index: index});\n      };\n\n      $timeout(function() {\n        slider.load();\n      });\n    }],\n    template: '<div class=\"slider\">' +\n      '<div class=\"slider-slides\" ng-transclude>' +\n      '</div>' +\n    '</div>',\n\n    link: function($scope, $element, $attr) {\n      // Disable ngAnimate for slidebox and its children\n      $animate.enabled($element, false);\n\n      // if showPager is undefined, show the pager\n      if (!isDefined($attr.showPager)) {\n        $scope.showPager = true;\n        getPager().toggleClass('hide', !true);\n      }\n\n      $attr.$observe('showPager', function(show) {\n        if (show === undefined) return;\n        show = $scope.$eval(show);\n        getPager().toggleClass('hide', !show);\n      });\n\n      var pager;\n      function getPager() {\n        if (!pager) {\n          var childScope = $scope.$new();\n          pager = jqLite('<ion-pager></ion-pager>');\n          $element.append(pager);\n          pager = $compile(pager)(childScope);\n        }\n        return pager;\n      }\n    }\n  };\n}])\n.directive('ionSlide', function() {\n  return {\n    restrict: 'E',\n    require: '?^ionSlideBox',\n    compile: function(element) {\n      element.addClass('slider-slide');\n    }\n  };\n})\n\n.directive('ionPager', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '^ionSlideBox',\n    template: '<div class=\"slider-pager\"><span class=\"slider-pager-page\" ng-repeat=\"slide in numSlides() track by $index\" ng-class=\"{active: $index == currentSlide}\" ng-click=\"pagerClick($index)\"><i class=\"icon ion-record\"></i></span></div>',\n    link: function($scope, $element, $attr, slideBox) {\n      var selectPage = function(index) {\n        var children = $element[0].children;\n        var length = children.length;\n        for (var i = 0; i < length; i++) {\n          if (i == index) {\n            children[i].classList.add('active');\n          } else {\n            children[i].classList.remove('active');\n          }\n        }\n      };\n\n      $scope.pagerClick = function(index) {\n        slideBox.onPagerClick(index);\n      };\n\n      $scope.numSlides = function() {\n        return new Array(slideBox.slidesCount());\n      };\n\n      $scope.$watch('currentSlide', function(v) {\n        selectPage(v);\n      });\n    }\n  };\n\n});\n\n\n/**\n * @ngdoc directive\n * @name ionSlides\n * @module ionic\n * @restrict E\n * @description\n * The Slides component is a powerful multi-page container where each page can be swiped or dragged between.\n *\n * Note: this is a new version of the Ionic Slide Box based on the [Swiper](http://www.idangero.us/swiper/#.Vmc1J-ODFBc) widget from\n * [idangerous](http://www.idangero.us/).\n *\n * ![SlideBox](http://ionicframework.com.s3.amazonaws.com/docs/controllers/slideBox.gif)\n *\n * @usage\n * ```html\n * <ion-content scroll=\"false\">\n *   <ion-slides  options=\"options\" slider=\"data.slider\">\n *     <ion-slide-page>\n *       <div class=\"box blue\"><h1>BLUE</h1></div>\n *     </ion-slide-page>\n *     <ion-slide-page>\n *       <div class=\"box yellow\"><h1>YELLOW</h1></div>\n *     </ion-slide-page>\n *     <ion-slide-page>\n *       <div class=\"box pink\"><h1>PINK</h1></div>\n *     </ion-slide-page>\n *   </ion-slides>\n * </ion-content>\n * ```\n *\n * ```js\n * $scope.options = {\n *   loop: false,\n *   effect: 'fade',\n *   speed: 500,\n * }\n *\n * $scope.$on(\"$ionicSlides.sliderInitialized\", function(event, data){\n *   // data.slider is the instance of Swiper\n *   $scope.slider = data.slider;\n * });\n *\n * $scope.$on(\"$ionicSlides.slideChangeStart\", function(event, data){\n *   console.log('Slide change is beginning');\n * });\n *\n * $scope.$on(\"$ionicSlides.slideChangeEnd\", function(event, data){\n *   // note: the indexes are 0-based\n *   $scope.activeIndex = data.slider.activeIndex;\n *   $scope.previousIndex = data.slider.previousIndex;\n * });\n *\n * ```\n *\n * ## Slide Events\n *\n * The slides component dispatches events when the active slide changes\n *\n * <table class=\"table\">\n *   <tr>\n *     <td><code>$ionicSlides.slideChangeStart</code></td>\n *     <td>This event is emitted when a slide change begins</td>\n *   </tr>\n *   <tr>\n *     <td><code>$ionicSlides.slideChangeEnd</code></td>\n *     <td>This event is emitted when a slide change completes</td>\n *   </tr>\n *   <tr>\n *     <td><code>$ionicSlides.sliderInitialized</code></td>\n *     <td>This event is emitted when the slider is initialized. It provides access to an instance of the slider.</td>\n *   </tr>\n * </table>\n *\n *\n * ## Updating Slides Dynamically\n * When applying data to the slider at runtime, typically everything will work as expected.\n *\n * In the event that the slides are looped, use the `updateLoop` method on the slider to ensure the slides update correctly.\n *\n * ```\n * $scope.$on(\"$ionicSlides.sliderInitialized\", function(event, data){\n *   // grab an instance of the slider\n *   $scope.slider = data.slider;\n * });\n *\n * function dataChangeHandler(){\n *   // call this function when data changes, such as an HTTP request, etc\n *   if ( $scope.slider ){\n *     $scope.slider.updateLoop();\n *   }\n * }\n * ```\n *\n */\nIonicModule\n.directive('ionSlides', [\n  '$animate',\n  '$timeout',\n  '$compile',\nfunction($animate, $timeout, $compile) {\n  return {\n    restrict: 'E',\n    transclude: true,\n    scope: {\n      options: '=',\n      slider: '='\n    },\n    template: '<div class=\"swiper-container\">' +\n      '<div class=\"swiper-wrapper\" ng-transclude>' +\n      '</div>' +\n        '<div ng-hide=\"!showPager\" class=\"swiper-pagination\"></div>' +\n      '</div>',\n    controller: ['$scope', '$element', function($scope, $element) {\n      var _this = this;\n\n      this.update = function() {\n        $timeout(function() {\n          if (!_this.__slider) {\n            return;\n          }\n\n          _this.__slider.update();\n          if (_this._options.loop) {\n            _this.__slider.createLoop();\n          }\n\n          var slidesLength = _this.__slider.slides.length;\n\n          // Don't allow pager to show with > 10 slides\n          if (slidesLength > 10) {\n            $scope.showPager = false;\n          }\n\n          // When slide index is greater than total then slide to last index\n          if (_this.__slider.activeIndex > slidesLength - 1) {\n            _this.__slider.slideTo(slidesLength - 1);\n          }\n        });\n      };\n\n      this.rapidUpdate = ionic.debounce(function() {\n        _this.update();\n      }, 50);\n\n      this.getSlider = function() {\n        return _this.__slider;\n      };\n\n      var options = $scope.options || {};\n\n      var newOptions = angular.extend({\n        pagination: $element.children().children()[1],\n        paginationClickable: true,\n        lazyLoading: true,\n        preloadImages: false\n      }, options);\n\n      this._options = newOptions;\n\n      $timeout(function() {\n        var slider = new ionic.views.Swiper($element.children()[0], newOptions, $scope, $compile);\n\n        $scope.$emit(\"$ionicSlides.sliderInitialized\", { slider: slider });\n\n        _this.__slider = slider;\n        $scope.slider = _this.__slider;\n\n        $scope.$on('$destroy', function() {\n          slider.destroy();\n          _this.__slider = null;\n        });\n      });\n\n      $timeout(function() {\n        // if it's a loop, render the slides again just incase\n        _this.rapidUpdate();\n      }, 200);\n\n    }],\n\n    link: function($scope) {\n      $scope.showPager = true;\n      // Disable ngAnimate for slidebox and its children\n      //$animate.enabled(false, $element);\n    }\n  };\n}])\n.directive('ionSlidePage', [function() {\n  return {\n    restrict: 'E',\n    require: '?^ionSlides',\n    transclude: true,\n    replace: true,\n    template: '<div class=\"swiper-slide\" ng-transclude></div>',\n    link: function($scope, $element, $attr, ionSlidesCtrl) {\n      ionSlidesCtrl.rapidUpdate();\n\n      $scope.$on('$destroy', function() {\n        ionSlidesCtrl.rapidUpdate();\n      });\n    }\n  };\n}]);\n\n/**\n* @ngdoc directive\n* @name ionSpinner\n* @module ionic\n* @restrict E\n *\n * @description\n * The `ionSpinner` directive provides a variety of animated spinners.\n * Spinners enables you to give your users feedback that the app is\n * processing/thinking/waiting/chillin' out, or whatever you'd like it to indicate.\n * By default, the {@link ionic.directive:ionRefresher} feature uses this spinner, rather\n * than rotating font icons (previously included in [ionicons](http://ionicons.com/)).\n * While font icons are great for simple or stationary graphics, they're not suited to\n * provide great animations, which is why Ionic uses SVG instead.\n *\n * Ionic offers ten spinners out of the box, and by default, it will use the appropriate spinner\n * for the platform on which it's running. Under the hood, the `ionSpinner` directive dynamically\n * builds the required SVG element, which allows Ionic to provide all ten of the animated SVGs\n * within 3KB.\n *\n * <style>\n * .spinner-table {\n *   max-width: 280px;\n * }\n * .spinner-table tbody > tr > th, .spinner-table tbody > tr > td {\n *   vertical-align: middle;\n *   width: 42px;\n *   height: 42px;\n * }\n * .spinner {\n *   stroke: #444;\n *   fill: #444; }\n *   .spinner svg {\n *     width: 28px;\n *     height: 28px; }\n *   .spinner.spinner-inverse {\n *     stroke: #fff;\n *     fill: #fff; }\n *\n * .spinner-android {\n *   stroke: #4b8bf4; }\n *\n * .spinner-ios, .spinner-ios-small {\n *   stroke: #69717d; }\n *\n * .spinner-spiral .stop1 {\n *   stop-color: #fff;\n *   stop-opacity: 0; }\n * .spinner-spiral.spinner-inverse .stop1 {\n *   stop-color: #000; }\n * .spinner-spiral.spinner-inverse .stop2 {\n *   stop-color: #fff; }\n * </style>\n *\n * <script src=\"http://code.ionicframework.com/nightly/js/ionic.bundle.min.js\"></script>\n * <table class=\"table spinner-table\" ng-app=\"ionic\">\n *  <tr>\n *    <th>\n *      <code>android</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"android\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>ios</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"ios\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>ios-small</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"ios-small\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>bubbles</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"bubbles\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>circles</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"circles\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>crescent</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"crescent\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>dots</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"dots\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>lines</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"lines\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>ripple</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"ripple\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>spiral</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"spiral\"></ion-spinner>\n *    </td>\n *  </tr>\n * </table>\n *\n * Each spinner uses SVG with SMIL animations, however, the Android spinner also uses JavaScript\n * so it also works on Android 4.0-4.3. Additionally, each spinner can be styled with CSS,\n * and scaled to any size.\n *\n *\n * @usage\n * The following code would use the default spinner for the platform it's running from. If it's neither\n * iOS or Android, it'll default to use `ios`.\n *\n * ```html\n * <ion-spinner></ion-spinner>\n * ```\n *\n * By setting the `icon` attribute, you can specify which spinner to use, no matter what\n * the platform is.\n *\n * ```html\n * <ion-spinner icon=\"spiral\"></ion-spinner>\n * ```\n *\n * ## Spinner Colors\n * Like with most of Ionic's other components, spinners can also be styled using\n * Ionic's standard color naming convention. For example:\n *\n * ```html\n * <ion-spinner class=\"spinner-energized\"></ion-spinner>\n * ```\n *\n *\n * ## Styling SVG with CSS\n * One cool thing about SVG is its ability to be styled with CSS! Some of the properties\n * have different names, for example, SVG uses the term `stroke` instead of `border`, and\n * `fill` instead of `background-color`.\n *\n * ```css\n * .spinner svg {\n *   width: 28px;\n *   height: 28px;\n *   stroke: #444;\n *   fill: #444;\n * }\n * ```\n *\n*/\nIonicModule\n.directive('ionSpinner', function() {\n  return {\n    restrict: 'E',\n    controller: '$ionicSpinner',\n    link: function($scope, $element, $attrs, ctrl) {\n      var spinnerName = ctrl.init();\n      $element.addClass('spinner spinner-' + spinnerName);\n\n      $element.on('$destroy', function onDestroy() {\n        ctrl.stop();\n      });\n    }\n  };\n});\n\n/**\n * @ngdoc directive\n * @name ionTab\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionTabs\n *\n * @description\n * Contains a tab's content.  The content only exists while the given tab is selected.\n *\n * Each ionTab has its own view history.\n *\n * @usage\n * ```html\n * <ion-tab\n *   title=\"Tab!\"\n *   icon=\"my-icon\"\n *   href=\"#/tab/tab-link\"\n *   on-select=\"onTabSelected()\"\n *   on-deselect=\"onTabDeselected()\">\n * </ion-tab>\n * ```\n * For a complete, working tab bar example, see the {@link ionic.directive:ionTabs} documentation.\n *\n * @param {string} title The title of the tab.\n * @param {string=} href The link that this tab will navigate to when tapped.\n * @param {string=} icon The icon of the tab. If given, this will become the default for icon-on and icon-off.\n * @param {string=} icon-on The icon of the tab while it is selected.\n * @param {string=} icon-off The icon of the tab while it is not selected.\n * @param {expression=} badge The badge to put on this tab (usually a number).\n * @param {expression=} badge-style The style of badge to put on this tab (eg: badge-positive).\n * @param {expression=} on-select Called when this tab is selected.\n * @param {expression=} on-deselect Called when this tab is deselected.\n * @param {expression=} ng-click By default, the tab will be selected on click. If ngClick is set, it will not.  You can explicitly switch tabs using {@link ionic.service:$ionicTabsDelegate#select $ionicTabsDelegate.select()}.\n * @param {expression=} hidden Whether the tab is to be hidden or not.\n * @param {expression=} disabled Whether the tab is to be disabled or not.\n */\nIonicModule\n.directive('ionTab', [\n  '$compile',\n  '$ionicConfig',\n  '$ionicBind',\n  '$ionicViewSwitcher',\nfunction($compile, $ionicConfig, $ionicBind, $ionicViewSwitcher) {\n\n  //Returns ' key=\"value\"' if value exists\n  function attrStr(k, v) {\n    return isDefined(v) ? ' ' + k + '=\"' + v + '\"' : '';\n  }\n  return {\n    restrict: 'E',\n    require: ['^ionTabs', 'ionTab'],\n    controller: '$ionicTab',\n    scope: true,\n    compile: function(element, attr) {\n\n      //We create the tabNavTemplate in the compile phase so that the\n      //attributes we pass down won't be interpolated yet - we want\n      //to pass down the 'raw' versions of the attributes\n      var tabNavTemplate = '<ion-tab-nav' +\n        attrStr('ng-click', attr.ngClick) +\n        attrStr('title', attr.title) +\n        attrStr('icon', attr.icon) +\n        attrStr('icon-on', attr.iconOn) +\n        attrStr('icon-off', attr.iconOff) +\n        attrStr('badge', attr.badge) +\n        attrStr('badge-style', attr.badgeStyle) +\n        attrStr('hidden', attr.hidden) +\n        attrStr('disabled', attr.disabled) +\n        attrStr('class', attr['class']) +\n        '></ion-tab-nav>';\n\n      //Remove the contents of the element so we can compile them later, if tab is selected\n      var tabContentEle = document.createElement('div');\n      for (var x = 0; x < element[0].children.length; x++) {\n        tabContentEle.appendChild(element[0].children[x].cloneNode(true));\n      }\n      var childElementCount = tabContentEle.childElementCount;\n      element.empty();\n\n      var navViewName, isNavView;\n      if (childElementCount) {\n        if (tabContentEle.children[0].tagName === 'ION-NAV-VIEW') {\n          // get the name if it's a nav-view\n          navViewName = tabContentEle.children[0].getAttribute('name');\n          tabContentEle.children[0].classList.add('view-container');\n          isNavView = true;\n        }\n        if (childElementCount === 1) {\n          // make the 1 child element the primary tab content container\n          tabContentEle = tabContentEle.children[0];\n        }\n        if (!isNavView) tabContentEle.classList.add('pane');\n        tabContentEle.classList.add('tab-content');\n      }\n\n      return function link($scope, $element, $attr, ctrls) {\n        var childScope;\n        var childElement;\n        var tabsCtrl = ctrls[0];\n        var tabCtrl = ctrls[1];\n        var isTabContentAttached = false;\n        $scope.$tabSelected = false;\n\n        $ionicBind($scope, $attr, {\n          onSelect: '&',\n          onDeselect: '&',\n          title: '@',\n          uiSref: '@',\n          href: '@'\n        });\n\n        tabsCtrl.add($scope);\n        $scope.$on('$destroy', function() {\n          if (!$scope.$tabsDestroy) {\n            // if the containing ionTabs directive is being destroyed\n            // then don't bother going through the controllers remove\n            // method, since remove will reset the active tab as each tab\n            // is being destroyed, causing unnecessary view loads and transitions\n            tabsCtrl.remove($scope);\n          }\n          tabNavElement.isolateScope().$destroy();\n          tabNavElement.remove();\n          tabNavElement = tabContentEle = childElement = null;\n        });\n\n        //Remove title attribute so browser-tooltip does not apear\n        $element[0].removeAttribute('title');\n\n        if (navViewName) {\n          tabCtrl.navViewName = $scope.navViewName = navViewName;\n        }\n        $scope.$on('$stateChangeSuccess', selectIfMatchesState);\n        selectIfMatchesState();\n        function selectIfMatchesState() {\n          if (tabCtrl.tabMatchesState()) {\n            tabsCtrl.select($scope, false);\n          }\n        }\n\n        var tabNavElement = jqLite(tabNavTemplate);\n        tabNavElement.data('$ionTabsController', tabsCtrl);\n        tabNavElement.data('$ionTabController', tabCtrl);\n        tabsCtrl.$tabsElement.append($compile(tabNavElement)($scope));\n\n\n        function tabSelected(isSelected) {\n          if (isSelected && childElementCount) {\n            // this tab is being selected\n\n            // check if the tab is already in the DOM\n            // only do this if the tab has child elements\n            if (!isTabContentAttached) {\n              // tab should be selected and is NOT in the DOM\n              // create a new scope and append it\n              childScope = $scope.$new();\n              childElement = jqLite(tabContentEle);\n              $ionicViewSwitcher.viewEleIsActive(childElement, true);\n              tabsCtrl.$element.append(childElement);\n              $compile(childElement)(childScope);\n              isTabContentAttached = true;\n            }\n\n            // remove the hide class so the tabs content shows up\n            $ionicViewSwitcher.viewEleIsActive(childElement, true);\n\n          } else if (isTabContentAttached && childElement) {\n            // this tab should NOT be selected, and it is already in the DOM\n\n            if ($ionicConfig.views.maxCache() > 0) {\n              // keep the tabs in the DOM, only css hide it\n              $ionicViewSwitcher.viewEleIsActive(childElement, false);\n\n            } else {\n              // do not keep tabs in the DOM\n              destroyTab();\n            }\n\n          }\n        }\n\n        function destroyTab() {\n          childScope && childScope.$destroy();\n          isTabContentAttached && childElement && childElement.remove();\n          tabContentEle.innerHTML = '';\n          isTabContentAttached = childScope = childElement = null;\n        }\n\n        $scope.$watch('$tabSelected', tabSelected);\n\n        $scope.$on('$ionicView.afterEnter', function() {\n          $ionicViewSwitcher.viewEleIsActive(childElement, $scope.$tabSelected);\n        });\n\n        $scope.$on('$ionicView.clearCache', function() {\n          if (!$scope.$tabSelected) {\n            destroyTab();\n          }\n        });\n\n      };\n    }\n  };\n}]);\n\nIonicModule\n.directive('ionTabNav', [function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: ['^ionTabs', '^ionTab'],\n    template:\n    '<a ng-class=\"{\\'has-badge\\':badge, \\'tab-hidden\\':isHidden(), \\'tab-item-active\\': isTabActive()}\" ' +\n      ' ng-disabled=\"disabled()\" class=\"tab-item\">' +\n      '<span class=\"badge {{badgeStyle}}\" ng-if=\"badge\">{{badge}}</span>' +\n      '<i class=\"icon {{getIcon()}}\" ng-if=\"getIcon()\"></i>' +\n      '<span class=\"tab-title\" ng-bind-html=\"title\"></span>' +\n    '</a>',\n    scope: {\n      title: '@',\n      icon: '@',\n      iconOn: '@',\n      iconOff: '@',\n      badge: '=',\n      hidden: '@',\n      disabled: '&',\n      badgeStyle: '@',\n      'class': '@'\n    },\n    link: function($scope, $element, $attrs, ctrls) {\n      var tabsCtrl = ctrls[0],\n        tabCtrl = ctrls[1];\n\n      //Remove title attribute so browser-tooltip does not apear\n      $element[0].removeAttribute('title');\n\n      $scope.selectTab = function(e) {\n        e.preventDefault();\n        tabsCtrl.select(tabCtrl.$scope, true);\n      };\n      if (!$attrs.ngClick) {\n        $element.on('click', function(event) {\n          $scope.$apply(function() {\n            $scope.selectTab(event);\n          });\n        });\n      }\n\n      $scope.isHidden = function() {\n        if ($attrs.hidden === 'true' || $attrs.hidden === true) return true;\n        return false;\n      };\n\n      $scope.getIconOn = function() {\n        return $scope.iconOn || $scope.icon;\n      };\n      $scope.getIconOff = function() {\n        return $scope.iconOff || $scope.icon;\n      };\n\n      $scope.isTabActive = function() {\n        return tabsCtrl.selectedTab() === tabCtrl.$scope;\n      };\n\n      $scope.getIcon = function() {\n        if ( tabsCtrl.selectedTab() === tabCtrl.$scope ) {\n          // active\n          return $scope.iconOn || $scope.icon;\n        }\n        else {\n          // inactive\n          return $scope.iconOff || $scope.icon;\n        }\n      };\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name ionTabs\n * @module ionic\n * @delegate ionic.service:$ionicTabsDelegate\n * @restrict E\n * @codepen odqCz\n *\n * @description\n * Powers a multi-tabbed interface with a Tab Bar and a set of \"pages\" that can be tabbed\n * through.\n *\n * Assign any [tabs class](/docs/components#tabs) to the element to define\n * its look and feel.\n *\n * For iOS, tabs will appear at the bottom of the screen. For Android, tabs will be at the top\n * of the screen, below the nav-bar. This follows each OS's design specification, but can be\n * configured with the {@link ionic.provider:$ionicConfigProvider}.\n *\n * See the {@link ionic.directive:ionTab} directive's documentation for more details on\n * individual tabs.\n *\n * Note: do not place ion-tabs inside of an ion-content element; it has been known to cause a\n * certain CSS bug.\n *\n * @usage\n * ```html\n * <ion-tabs class=\"tabs-positive tabs-icon-top\">\n *\n *   <ion-tab title=\"Home\" icon-on=\"ion-ios-filing\" icon-off=\"ion-ios-filing-outline\">\n *     <!-- Tab 1 content -->\n *   </ion-tab>\n *\n *   <ion-tab title=\"About\" icon-on=\"ion-ios-clock\" icon-off=\"ion-ios-clock-outline\">\n *     <!-- Tab 2 content -->\n *   </ion-tab>\n *\n *   <ion-tab title=\"Settings\" icon-on=\"ion-ios-gear\" icon-off=\"ion-ios-gear-outline\">\n *     <!-- Tab 3 content -->\n *   </ion-tab>\n *\n * </ion-tabs>\n * ```\n *\n * @param {string=} delegate-handle The handle used to identify these tabs\n * with {@link ionic.service:$ionicTabsDelegate}.\n */\n\nIonicModule\n.directive('ionTabs', [\n  '$ionicTabsDelegate',\n  '$ionicConfig',\nfunction($ionicTabsDelegate, $ionicConfig) {\n  return {\n    restrict: 'E',\n    scope: true,\n    controller: '$ionicTabs',\n    compile: function(tElement) {\n      //We cannot use regular transclude here because it breaks element.data()\n      //inheritance on compile\n      var innerElement = jqLite('<div class=\"tab-nav tabs\">');\n      innerElement.append(tElement.contents());\n\n      tElement.append(innerElement)\n              .addClass('tabs-' + $ionicConfig.tabs.position() + ' tabs-' + $ionicConfig.tabs.style());\n\n      return { pre: prelink, post: postLink };\n      function prelink($scope, $element, $attr, tabsCtrl) {\n        var deregisterInstance = $ionicTabsDelegate._registerInstance(\n          tabsCtrl, $attr.delegateHandle, tabsCtrl.hasActiveScope\n        );\n\n        tabsCtrl.$scope = $scope;\n        tabsCtrl.$element = $element;\n        tabsCtrl.$tabsElement = jqLite($element[0].querySelector('.tabs'));\n\n        $scope.$watch(function() { return $element[0].className; }, function(value) {\n          var isTabsTop = value.indexOf('tabs-top') !== -1;\n          var isHidden = value.indexOf('tabs-item-hide') !== -1;\n          $scope.$hasTabs = !isTabsTop && !isHidden;\n          $scope.$hasTabsTop = isTabsTop && !isHidden;\n          $scope.$emit('$ionicTabs.top', $scope.$hasTabsTop);\n        });\n\n        function emitLifecycleEvent(ev, data) {\n          ev.stopPropagation();\n          var previousSelectedTab = tabsCtrl.previousSelectedTab();\n          if (previousSelectedTab) {\n            previousSelectedTab.$broadcast(ev.name.replace('NavView', 'Tabs'), data);\n          }\n        }\n\n        $scope.$on('$ionicNavView.beforeLeave', emitLifecycleEvent);\n        $scope.$on('$ionicNavView.afterLeave', emitLifecycleEvent);\n        $scope.$on('$ionicNavView.leave', emitLifecycleEvent);\n\n        $scope.$on('$destroy', function() {\n          // variable to inform child tabs that they're all being blown away\n          // used so that while destorying an individual tab, each one\n          // doesn't select the next tab as the active one, which causes unnecessary\n          // loading of tab views when each will eventually all go away anyway\n          $scope.$tabsDestroy = true;\n          deregisterInstance();\n          tabsCtrl.$tabsElement = tabsCtrl.$element = tabsCtrl.$scope = innerElement = null;\n          delete $scope.$hasTabs;\n          delete $scope.$hasTabsTop;\n        });\n      }\n\n      function postLink($scope, $element, $attr, tabsCtrl) {\n        if (!tabsCtrl.selectedTab()) {\n          // all the tabs have been added\n          // but one hasn't been selected yet\n          tabsCtrl.select(0);\n        }\n      }\n    }\n  };\n}]);\n\n/**\n* @ngdoc directive\n* @name ionTitle\n* @module ionic\n* @restrict E\n*\n* Used for titles in header and nav bars. New in 1.2\n*\n* Identical to <div class=\"title\"> but with future compatibility for Ionic 2\n*\n* @usage\n*\n* ```html\n* <ion-nav-bar>\n*   <ion-title>Hello</ion-title>\n* <ion-nav-bar>\n* ```\n*/\nIonicModule\n.directive('ionTitle', [function() {\n  return {\n    restrict: 'E',\n    compile: function(element) {\n      element.addClass('title');\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name ionToggle\n * @module ionic\n * @codepen tfAzj\n * @restrict E\n *\n * @description\n * A toggle is an animated switch which binds a given model to a boolean.\n *\n * Allows dragging of the switch's nub.\n *\n * The toggle behaves like any [AngularJS checkbox](http://docs.angularjs.org/api/ng/input/input[checkbox]) otherwise.\n *\n * @param toggle-class {string=} Sets the CSS class on the inner `label.toggle` element created by the directive.\n *\n * @usage\n * Below is an example of a toggle directive which is wired up to the `airplaneMode` model\n * and has the `toggle-calm` CSS class assigned to the inner element.\n *\n * ```html\n * <ion-toggle ng-model=\"airplaneMode\" toggle-class=\"toggle-calm\">Airplane Mode</ion-toggle>\n * ```\n */\nIonicModule\n.directive('ionToggle', [\n  '$timeout',\n  '$ionicConfig',\nfunction($timeout, $ionicConfig) {\n\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '?ngModel',\n    transclude: true,\n    template:\n      '<div class=\"item item-toggle\">' +\n        '<div ng-transclude></div>' +\n        '<label class=\"toggle\">' +\n          '<input type=\"checkbox\">' +\n          '<div class=\"track\">' +\n            '<div class=\"handle\"></div>' +\n          '</div>' +\n        '</label>' +\n      '</div>',\n\n    compile: function(element, attr) {\n      var input = element.find('input');\n      forEach({\n        'name': attr.name,\n        'ng-value': attr.ngValue,\n        'ng-model': attr.ngModel,\n        'ng-checked': attr.ngChecked,\n        'ng-disabled': attr.ngDisabled,\n        'ng-true-value': attr.ngTrueValue,\n        'ng-false-value': attr.ngFalseValue,\n        'ng-change': attr.ngChange,\n        'ng-required': attr.ngRequired,\n        'required': attr.required\n      }, function(value, name) {\n        if (isDefined(value)) {\n          input.attr(name, value);\n        }\n      });\n\n      if (attr.toggleClass) {\n        element[0].getElementsByTagName('label')[0].classList.add(attr.toggleClass);\n      }\n\n      element.addClass('toggle-' + $ionicConfig.form.toggle());\n\n      return function($scope, $element) {\n        var el = $element[0].getElementsByTagName('label')[0];\n        var checkbox = el.children[0];\n        var track = el.children[1];\n        var handle = track.children[0];\n\n        var ngModelController = jqLite(checkbox).controller('ngModel');\n\n        $scope.toggle = new ionic.views.Toggle({\n          el: el,\n          track: track,\n          checkbox: checkbox,\n          handle: handle,\n          onChange: function() {\n            if (ngModelController) {\n              ngModelController.$setViewValue(checkbox.checked);\n              $scope.$apply();\n            }\n          }\n        });\n\n        $scope.$on('$destroy', function() {\n          $scope.toggle.destroy();\n        });\n      };\n    }\n\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name ionView\n * @module ionic\n * @restrict E\n * @parent ionNavView\n *\n * @description\n * A container for view content and any navigational and header bar information. When a view\n * enters and exits its parent {@link ionic.directive:ionNavView}, the view also emits view\n * information, such as its title, whether the back button should be displayed or not, whether the\n * corresponding {@link ionic.directive:ionNavBar} should be displayed or not, which transition the view\n * should use to animate, and which direction to animate.\n *\n * *Views are cached to improve performance.* When a view is navigated away from, its element is\n * left in the DOM, and its scope is disconnected from the `$watch` cycle. When navigating to a\n * view that is already cached, its scope is reconnected, and the existing element, which was\n * left in the DOM, becomes active again. This can be disabled, or the maximum number of cached\n * views changed in {@link ionic.provider:$ionicConfigProvider}, in the view's `$state` configuration, or\n * as an attribute on the view itself (see below).\n *\n * @usage\n * Below is an example where our page will load with a {@link ionic.directive:ionNavBar} containing\n * \"My Page\" as the title.\n *\n * ```html\n * <ion-nav-bar></ion-nav-bar>\n * <ion-nav-view>\n *   <ion-view view-title=\"My Page\">\n *     <ion-content>\n *       Hello!\n *     </ion-content>\n *   </ion-view>\n * </ion-nav-view>\n * ```\n *\n * ## View LifeCycle and Events\n *\n * Views can be cached, which means ***controllers normally only load once***, which may\n * affect your controller logic. To know when a view has entered or left, events\n * have been added that are emitted from the view's scope. These events also\n * contain data about the view, such as the title and whether the back button should\n * show. Also contained is transition data, such as the transition type and\n * direction that will be or was used.\n *\n * Life cycle events are emitted upwards from the transitioning view's scope. In some cases, it is\n * desirable for a child/nested view to be notified of the event.\n * For this use case, `$ionicParentView` life cycle events are broadcast downwards.\n *\n * <table class=\"table\">\n *  <tr>\n *   <td><code>$ionicView.loaded</code></td>\n *   <td>The view has loaded. This event only happens once per\n * view being created and added to the DOM. If a view leaves but is cached,\n * then this event will not fire again on a subsequent viewing. The loaded event\n * is good place to put your setup code for the view; however, it is not the\n * recommended event to listen to when a view becomes active.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicView.enter</code></td>\n *   <td>The view has fully entered and is now the active view.\n * This event will fire, whether it was the first load or a cached view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicView.leave</code></td>\n *   <td>The view has finished leaving and is no longer the\n * active view. This event will fire, whether it is cached or destroyed.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicView.beforeEnter</code></td>\n *   <td>The view is about to enter and become the active view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicView.beforeLeave</code></td>\n *   <td>The view is about to leave and no longer be the active view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicView.afterEnter</code></td>\n *   <td>The view has fully entered and is now the active view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicView.afterLeave</code></td>\n *   <td>The view has finished leaving and is no longer the active view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicView.unloaded</code></td>\n *   <td>The view's controller has been destroyed and its element has been\n * removed from the DOM.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicParentView.enter</code></td>\n *   <td>The parent view has fully entered and is now the active view.\n * This event will fire, whether it was the first load or a cached view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicParentView.leave</code></td>\n *   <td>The parent view has finished leaving and is no longer the\n * active view. This event will fire, whether it is cached or destroyed.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicParentView.beforeEnter</code></td>\n *   <td>The parent view is about to enter and become the active view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicParentView.beforeLeave</code></td>\n *   <td>The parent view is about to leave and no longer be the active view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicParentView.afterEnter</code></td>\n *   <td>The parent view has fully entered and is now the active view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicParentView.afterLeave</code></td>\n *   <td>The parent view has finished leaving and is no longer the active view.</td>\n *  </tr>\n * </table>\n *\n * ## LifeCycle Event Usage\n *\n * Below is an example of how to listen to life cycle events and\n * access state parameter data\n *\n * ```js\n * $scope.$on(\"$ionicView.beforeEnter\", function(event, data){\n *    // handle event\n *    console.log(\"State Params: \", data.stateParams);\n * });\n *\n * $scope.$on(\"$ionicView.enter\", function(event, data){\n *    // handle event\n *    console.log(\"State Params: \", data.stateParams);\n * });\n *\n * $scope.$on(\"$ionicView.afterEnter\", function(event, data){\n *    // handle event\n *    console.log(\"State Params: \", data.stateParams);\n * });\n * ```\n *\n * ## Caching\n *\n * Caching can be disabled and enabled in multiple ways. By default, Ionic will\n * cache a maximum of 10 views. You can optionally choose to disable caching at\n * either an individual view basis, or by global configuration. Please see the\n * _Caching_ section in {@link ionic.directive:ionNavView} for more info.\n *\n * @param {string=} view-title A text-only title to display on the parent {@link ionic.directive:ionNavBar}.\n * For an HTML title, such as an image, see {@link ionic.directive:ionNavTitle} instead.\n * @param {boolean=} cache-view If this view should be allowed to be cached or not.\n * Please see the _Caching_ section in {@link ionic.directive:ionNavView} for\n * more info. Default `true`\n * @param {boolean=} can-swipe-back If this view should be allowed to use the swipe to go back gesture or not.\n * This does not enable the swipe to go back feature if it is not available for the platform it's running\n * from, or there isn't a previous view. Default `true`\n * @param {boolean=} hide-back-button Whether to hide the back button on the parent\n * {@link ionic.directive:ionNavBar} by default.\n * @param {boolean=} hide-nav-bar Whether to hide the parent\n * {@link ionic.directive:ionNavBar} by default.\n */\nIonicModule\n.directive('ionView', function() {\n  return {\n    restrict: 'EA',\n    priority: 1000,\n    controller: '$ionicView',\n    compile: function(tElement) {\n      tElement.addClass('pane');\n      tElement[0].removeAttribute('title');\n      return function link($scope, $element, $attrs, viewCtrl) {\n        viewCtrl.init();\n      };\n    }\n  };\n});\n\n})();"
  },
  {
    "path": "ionic1/base/www/lib/ionic/js/ionic.bundle.js",
    "content": "/*!\n * ionic.bundle.js is a concatenation of:\n * ionic.js, angular.js, angular-animate.js,\n * angular-sanitize.js, angular-ui-router.js,\n * and ionic-angular.js\n */\n\n/*!\n * Copyright 2015 Drifty Co.\n * http://drifty.com/\n *\n * Ionic, v1.3.4\n * A powerful HTML5 mobile app framework.\n * http://ionicframework.com/\n *\n * By @maxlynch, @benjsperry, @adamdbradley <3\n *\n * Licensed under the MIT license. Please see LICENSE for more information.\n *\n */\n\n(function() {\n\n// Create global ionic obj and its namespaces\n// build processes may have already created an ionic obj\nwindow.ionic = window.ionic || {};\nwindow.ionic.views = {};\nwindow.ionic.version = '1.3.4';\n\n(function (ionic) {\n\n  ionic.DelegateService = function(methodNames) {\n\n    if (methodNames.indexOf('$getByHandle') > -1) {\n      throw new Error(\"Method '$getByHandle' is implicitly added to each delegate service. Do not list it as a method.\");\n    }\n\n    function trueFn() { return true; }\n\n    return ['$log', function($log) {\n\n      /*\n       * Creates a new object that will have all the methodNames given,\n       * and call them on the given the controller instance matching given\n       * handle.\n       * The reason we don't just let $getByHandle return the controller instance\n       * itself is that the controller instance might not exist yet.\n       *\n       * We want people to be able to do\n       * `var instance = $ionicScrollDelegate.$getByHandle('foo')` on controller\n       * instantiation, but on controller instantiation a child directive\n       * may not have been compiled yet!\n       *\n       * So this is our way of solving this problem: we create an object\n       * that will only try to fetch the controller with given handle\n       * once the methods are actually called.\n       */\n      function DelegateInstance(instances, handle) {\n        this._instances = instances;\n        this.handle = handle;\n      }\n      methodNames.forEach(function(methodName) {\n        DelegateInstance.prototype[methodName] = instanceMethodCaller(methodName);\n      });\n\n\n      /**\n       * The delegate service (eg $ionicNavBarDelegate) is just an instance\n       * with a non-defined handle, a couple extra methods for registering\n       * and narrowing down to a specific handle.\n       */\n      function DelegateService() {\n        this._instances = [];\n      }\n      DelegateService.prototype = DelegateInstance.prototype;\n      DelegateService.prototype._registerInstance = function(instance, handle, filterFn) {\n        var instances = this._instances;\n        instance.$$delegateHandle = handle;\n        instance.$$filterFn = filterFn || trueFn;\n        instances.push(instance);\n\n        return function deregister() {\n          var index = instances.indexOf(instance);\n          if (index !== -1) {\n            instances.splice(index, 1);\n          }\n        };\n      };\n      DelegateService.prototype.$getByHandle = function(handle) {\n        return new DelegateInstance(this._instances, handle);\n      };\n\n      return new DelegateService();\n\n      function instanceMethodCaller(methodName) {\n        return function caller() {\n          var handle = this.handle;\n          var args = arguments;\n          var foundInstancesCount = 0;\n          var returnValue;\n\n          this._instances.forEach(function(instance) {\n            if ((!handle || handle == instance.$$delegateHandle) && instance.$$filterFn(instance)) {\n              foundInstancesCount++;\n              var ret = instance[methodName].apply(instance, args);\n              //Only return the value from the first call\n              if (foundInstancesCount === 1) {\n                returnValue = ret;\n              }\n            }\n          });\n\n          if (!foundInstancesCount && handle) {\n            return $log.warn(\n              'Delegate for handle \"' + handle + '\" could not find a ' +\n              'corresponding element with delegate-handle=\"' + handle + '\"! ' +\n              methodName + '() was not called!\\n' +\n              'Possible cause: If you are calling ' + methodName + '() immediately, and ' +\n              'your element with delegate-handle=\"' + handle + '\" is a child of your ' +\n              'controller, then your element may not be compiled yet. Put a $timeout ' +\n              'around your call to ' + methodName + '() and try again.'\n            );\n          }\n          return returnValue;\n        };\n      }\n\n    }];\n  };\n\n})(window.ionic);\n\n(function(window, document, ionic) {\n\n  var readyCallbacks = [];\n  var isDomReady = document.readyState === 'complete' || document.readyState === 'interactive';\n\n  function domReady() {\n    isDomReady = true;\n    for (var x = 0; x < readyCallbacks.length; x++) {\n      ionic.requestAnimationFrame(readyCallbacks[x]);\n    }\n    readyCallbacks = [];\n    document.removeEventListener('DOMContentLoaded', domReady);\n  }\n  if (!isDomReady) {\n    document.addEventListener('DOMContentLoaded', domReady);\n  }\n\n\n  // From the man himself, Mr. Paul Irish.\n  // The requestAnimationFrame polyfill\n  // Put it on window just to preserve its context\n  // without having to use .call\n  window._rAF = (function() {\n    return window.requestAnimationFrame ||\n           window.webkitRequestAnimationFrame ||\n           window.mozRequestAnimationFrame ||\n           function(callback) {\n             window.setTimeout(callback, 16);\n           };\n  })();\n\n  var cancelAnimationFrame = window.cancelAnimationFrame ||\n    window.webkitCancelAnimationFrame ||\n    window.mozCancelAnimationFrame ||\n    window.webkitCancelRequestAnimationFrame;\n\n  /**\n  * @ngdoc utility\n  * @name ionic.DomUtil\n  * @module ionic\n  */\n  ionic.DomUtil = {\n    //Call with proper context\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#requestAnimationFrame\n     * @alias ionic.requestAnimationFrame\n     * @description Calls [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window.requestAnimationFrame), or a polyfill if not available.\n     * @param {function} callback The function to call when the next frame\n     * happens.\n     */\n    requestAnimationFrame: function(cb) {\n      return window._rAF(cb);\n    },\n\n    cancelAnimationFrame: function(requestId) {\n      cancelAnimationFrame(requestId);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#animationFrameThrottle\n     * @alias ionic.animationFrameThrottle\n     * @description\n     * When given a callback, if that callback is called 100 times between\n     * animation frames, adding Throttle will make it only run the last of\n     * the 100 calls.\n     *\n     * @param {function} callback a function which will be throttled to\n     * requestAnimationFrame\n     * @returns {function} A function which will then call the passed in callback.\n     * The passed in callback will receive the context the returned function is\n     * called with.\n     */\n    animationFrameThrottle: function(cb) {\n      var args, isQueued, context;\n      return function() {\n        args = arguments;\n        context = this;\n        if (!isQueued) {\n          isQueued = true;\n          ionic.requestAnimationFrame(function() {\n            cb.apply(context, args);\n            isQueued = false;\n          });\n        }\n      };\n    },\n\n    contains: function(parentNode, otherNode) {\n      var current = otherNode;\n      while (current) {\n        if (current === parentNode) return true;\n        current = current.parentNode;\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getPositionInParent\n     * @description\n     * Find an element's scroll offset within its container.\n     * @param {DOMElement} element The element to find the offset of.\n     * @returns {object} A position object with the following properties:\n     *   - `{number}` `left` The left offset of the element.\n     *   - `{number}` `top` The top offset of the element.\n     */\n    getPositionInParent: function(el) {\n      return {\n        left: el.offsetLeft,\n        top: el.offsetTop\n      };\n    },\n\n    getOffsetTop: function(el) {\n      var curtop = 0;\n      if (el.offsetParent) {\n        do {\n          curtop += el.offsetTop;\n          el = el.offsetParent;\n        } while (el)\n        return curtop;\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#ready\n     * @description\n     * Call a function when the DOM is ready, or if it is already ready\n     * call the function immediately.\n     * @param {function} callback The function to be called.\n     */\n    ready: function(cb) {\n      if (isDomReady) {\n        ionic.requestAnimationFrame(cb);\n      } else {\n        readyCallbacks.push(cb);\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getTextBounds\n     * @description\n     * Get a rect representing the bounds of the given textNode.\n     * @param {DOMElement} textNode The textNode to find the bounds of.\n     * @returns {object} An object representing the bounds of the node. Properties:\n     *   - `{number}` `left` The left position of the textNode.\n     *   - `{number}` `right` The right position of the textNode.\n     *   - `{number}` `top` The top position of the textNode.\n     *   - `{number}` `bottom` The bottom position of the textNode.\n     *   - `{number}` `width` The width of the textNode.\n     *   - `{number}` `height` The height of the textNode.\n     */\n    getTextBounds: function(textNode) {\n      if (document.createRange) {\n        var range = document.createRange();\n        range.selectNodeContents(textNode);\n        if (range.getBoundingClientRect) {\n          var rect = range.getBoundingClientRect();\n          if (rect) {\n            var sx = window.scrollX;\n            var sy = window.scrollY;\n\n            return {\n              top: rect.top + sy,\n              left: rect.left + sx,\n              right: rect.left + sx + rect.width,\n              bottom: rect.top + sy + rect.height,\n              width: rect.width,\n              height: rect.height\n            };\n          }\n        }\n      }\n      return null;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getChildIndex\n     * @description\n     * Get the first index of a child node within the given element of the\n     * specified type.\n     * @param {DOMElement} element The element to find the index of.\n     * @param {string} type The nodeName to match children of element against.\n     * @returns {number} The index, or -1, of a child with nodeName matching type.\n     */\n    getChildIndex: function(element, type) {\n      if (type) {\n        var ch = element.parentNode.children;\n        var c;\n        for (var i = 0, k = 0, j = ch.length; i < j; i++) {\n          c = ch[i];\n          if (c.nodeName && c.nodeName.toLowerCase() == type) {\n            if (c == element) {\n              return k;\n            }\n            k++;\n          }\n        }\n      }\n      return Array.prototype.slice.call(element.parentNode.children).indexOf(element);\n    },\n\n    /**\n     * @private\n     */\n    swapNodes: function(src, dest) {\n      dest.parentNode.insertBefore(src, dest);\n    },\n\n    elementIsDescendant: function(el, parent, stopAt) {\n      var current = el;\n      do {\n        if (current === parent) return true;\n        current = current.parentNode;\n      } while (current && current !== stopAt);\n      return false;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getParentWithClass\n     * @param {DOMElement} element\n     * @param {string} className\n     * @returns {DOMElement} The closest parent of element matching the\n     * className, or null.\n     */\n    getParentWithClass: function(e, className, depth) {\n      depth = depth || 10;\n      while (e.parentNode && depth--) {\n        if (e.parentNode.classList && e.parentNode.classList.contains(className)) {\n          return e.parentNode;\n        }\n        e = e.parentNode;\n      }\n      return null;\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getParentOrSelfWithClass\n     * @param {DOMElement} element\n     * @param {string} className\n     * @returns {DOMElement} The closest parent or self matching the\n     * className, or null.\n     */\n    getParentOrSelfWithClass: function(e, className, depth) {\n      depth = depth || 10;\n      while (e && depth--) {\n        if (e.classList && e.classList.contains(className)) {\n          return e;\n        }\n        e = e.parentNode;\n      }\n      return null;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#rectContains\n     * @param {number} x\n     * @param {number} y\n     * @param {number} x1\n     * @param {number} y1\n     * @param {number} x2\n     * @param {number} y2\n     * @returns {boolean} Whether {x,y} fits within the rectangle defined by\n     * {x1,y1,x2,y2}.\n     */\n    rectContains: function(x, y, x1, y1, x2, y2) {\n      if (x < x1 || x > x2) return false;\n      if (y < y1 || y > y2) return false;\n      return true;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#blurAll\n     * @description\n     * Blurs any currently focused input element\n     * @returns {DOMElement} The element blurred or null\n     */\n    blurAll: function() {\n      if (document.activeElement && document.activeElement != document.body) {\n        document.activeElement.blur();\n        return document.activeElement;\n      }\n      return null;\n    },\n\n    cachedAttr: function(ele, key, value) {\n      ele = ele && ele.length && ele[0] || ele;\n      if (ele && ele.setAttribute) {\n        var dataKey = '$attr-' + key;\n        if (arguments.length > 2) {\n          if (ele[dataKey] !== value) {\n            ele.setAttribute(key, value);\n            ele[dataKey] = value;\n          }\n        } else if (typeof ele[dataKey] == 'undefined') {\n          ele[dataKey] = ele.getAttribute(key);\n        }\n        return ele[dataKey];\n      }\n    },\n\n    cachedStyles: function(ele, styles) {\n      ele = ele && ele.length && ele[0] || ele;\n      if (ele && ele.style) {\n        for (var prop in styles) {\n          if (ele['$style-' + prop] !== styles[prop]) {\n            ele.style[prop] = ele['$style-' + prop] = styles[prop];\n          }\n        }\n      }\n    }\n\n  };\n\n  //Shortcuts\n  ionic.requestAnimationFrame = ionic.DomUtil.requestAnimationFrame;\n  ionic.cancelAnimationFrame = ionic.DomUtil.cancelAnimationFrame;\n  ionic.animationFrameThrottle = ionic.DomUtil.animationFrameThrottle;\n\n})(window, document, ionic);\n\n/**\n * ion-events.js\n *\n * Author: Max Lynch <max@drifty.com>\n *\n * Framework events handles various mobile browser events, and\n * detects special events like tap/swipe/etc. and emits them\n * as custom events that can be used in an app.\n *\n * Portions lovingly adapted from github.com/maker/ratchet and github.com/alexgibson/tap.js - thanks guys!\n */\n\n(function(ionic) {\n\n  // Custom event polyfill\n  ionic.CustomEvent = (function() {\n    if( typeof window.CustomEvent === 'function' ) return CustomEvent;\n\n    var customEvent = function(event, params) {\n      var evt;\n      params = params || {\n        bubbles: false,\n        cancelable: false,\n        detail: undefined\n      };\n      try {\n        evt = document.createEvent(\"CustomEvent\");\n        evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n      } catch (error) {\n        // fallback for browsers that don't support createEvent('CustomEvent')\n        evt = document.createEvent(\"Event\");\n        for (var param in params) {\n          evt[param] = params[param];\n        }\n        evt.initEvent(event, params.bubbles, params.cancelable);\n      }\n      return evt;\n    };\n    customEvent.prototype = window.Event.prototype;\n    return customEvent;\n  })();\n\n\n  /**\n   * @ngdoc utility\n   * @name ionic.EventController\n   * @module ionic\n   */\n  ionic.EventController = {\n    VIRTUALIZED_EVENTS: ['tap', 'swipe', 'swiperight', 'swipeleft', 'drag', 'hold', 'release'],\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#trigger\n     * @alias ionic.trigger\n     * @param {string} eventType The event to trigger.\n     * @param {object} data The data for the event. Hint: pass in\n     * `{target: targetElement}`\n     * @param {boolean=} bubbles Whether the event should bubble up the DOM.\n     * @param {boolean=} cancelable Whether the event should be cancelable.\n     */\n    // Trigger a new event\n    trigger: function(eventType, data, bubbles, cancelable) {\n      var event = new ionic.CustomEvent(eventType, {\n        detail: data,\n        bubbles: !!bubbles,\n        cancelable: !!cancelable\n      });\n\n      // Make sure to trigger the event on the given target, or dispatch it from\n      // the window if we don't have an event target\n      data && data.target && data.target.dispatchEvent && data.target.dispatchEvent(event) || window.dispatchEvent(event);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#on\n     * @alias ionic.on\n     * @description Listen to an event on an element.\n     * @param {string} type The event to listen for.\n     * @param {function} callback The listener to be called.\n     * @param {DOMElement} element The element to listen for the event on.\n     */\n    on: function(type, callback, element) {\n      var e = element || window;\n\n      // Bind a gesture if it's a virtual event\n      for(var i = 0, j = this.VIRTUALIZED_EVENTS.length; i < j; i++) {\n        if(type == this.VIRTUALIZED_EVENTS[i]) {\n          var gesture = new ionic.Gesture(element);\n          gesture.on(type, callback);\n          return gesture;\n        }\n      }\n\n      // Otherwise bind a normal event\n      e.addEventListener(type, callback);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#off\n     * @alias ionic.off\n     * @description Remove an event listener.\n     * @param {string} type\n     * @param {function} callback\n     * @param {DOMElement} element\n     */\n    off: function(type, callback, element) {\n      element.removeEventListener(type, callback);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#onGesture\n     * @alias ionic.onGesture\n     * @description Add an event listener for a gesture on an element.\n     *\n     * Available eventTypes (from [hammer.js](http://eightmedia.github.io/hammer.js/)):\n     *\n     * `hold`, `tap`, `doubletap`, `drag`, `dragstart`, `dragend`, `dragup`, `dragdown`, <br/>\n     * `dragleft`, `dragright`, `swipe`, `swipeup`, `swipedown`, `swipeleft`, `swiperight`, <br/>\n     * `transform`, `transformstart`, `transformend`, `rotate`, `pinch`, `pinchin`, `pinchout`, <br/>\n     * `touch`, `release`\n     *\n     * @param {string} eventType The gesture event to listen for.\n     * @param {function(e)} callback The function to call when the gesture\n     * happens.\n     * @param {DOMElement} element The angular element to listen for the event on.\n     * @param {object} options object.\n     * @returns {ionic.Gesture} The gesture object (use this to remove the gesture later on).\n     */\n    onGesture: function(type, callback, element, options) {\n      var gesture = new ionic.Gesture(element, options);\n      gesture.on(type, callback);\n      return gesture;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#offGesture\n     * @alias ionic.offGesture\n     * @description Remove an event listener for a gesture created on an element.\n     * @param {ionic.Gesture} gesture The gesture that should be removed.\n     * @param {string} eventType The gesture event to remove the listener for.\n     * @param {function(e)} callback The listener to remove.\n\n     */\n    offGesture: function(gesture, type, callback) {\n      gesture && gesture.off(type, callback);\n    },\n\n    handlePopState: function() {}\n  };\n\n\n  // Map some convenient top-level functions for event handling\n  ionic.on = function() { ionic.EventController.on.apply(ionic.EventController, arguments); };\n  ionic.off = function() { ionic.EventController.off.apply(ionic.EventController, arguments); };\n  ionic.trigger = ionic.EventController.trigger;//function() { ionic.EventController.trigger.apply(ionic.EventController.trigger, arguments); };\n  ionic.onGesture = function() { return ionic.EventController.onGesture.apply(ionic.EventController.onGesture, arguments); };\n  ionic.offGesture = function() { return ionic.EventController.offGesture.apply(ionic.EventController.offGesture, arguments); };\n\n})(window.ionic);\n\n/* eslint camelcase:0 */\n/**\n  * Simple gesture controllers with some common gestures that emit\n  * gesture events.\n  *\n  * Ported from github.com/EightMedia/hammer.js Gestures - thanks!\n  */\n(function(ionic) {\n\n  /**\n   * ionic.Gestures\n   * use this to create instances\n   * @param   {HTMLElement}   element\n   * @param   {Object}        options\n   * @returns {ionic.Gestures.Instance}\n   * @constructor\n   */\n  ionic.Gesture = function(element, options) {\n    return new ionic.Gestures.Instance(element, options || {});\n  };\n\n  ionic.Gestures = {};\n\n  // default settings\n  ionic.Gestures.defaults = {\n    // add css to the element to prevent the browser from doing\n    // its native behavior. this doesnt prevent the scrolling,\n    // but cancels the contextmenu, tap highlighting etc\n    // set to false to disable this\n    stop_browser_behavior: 'disable-user-behavior'\n  };\n\n  // detect touchevents\n  ionic.Gestures.HAS_POINTEREVENTS = window.navigator.pointerEnabled || window.navigator.msPointerEnabled;\n  ionic.Gestures.HAS_TOUCHEVENTS = ('ontouchstart' in window);\n\n  // dont use mouseevents on mobile devices\n  ionic.Gestures.MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android|silk/i;\n  ionic.Gestures.NO_MOUSEEVENTS = ionic.Gestures.HAS_TOUCHEVENTS && window.navigator.userAgent.match(ionic.Gestures.MOBILE_REGEX);\n\n  // eventtypes per touchevent (start, move, end)\n  // are filled by ionic.Gestures.event.determineEventTypes on setup\n  ionic.Gestures.EVENT_TYPES = {};\n\n  // direction defines\n  ionic.Gestures.DIRECTION_DOWN = 'down';\n  ionic.Gestures.DIRECTION_LEFT = 'left';\n  ionic.Gestures.DIRECTION_UP = 'up';\n  ionic.Gestures.DIRECTION_RIGHT = 'right';\n\n  // pointer type\n  ionic.Gestures.POINTER_MOUSE = 'mouse';\n  ionic.Gestures.POINTER_TOUCH = 'touch';\n  ionic.Gestures.POINTER_PEN = 'pen';\n\n  // touch event defines\n  ionic.Gestures.EVENT_START = 'start';\n  ionic.Gestures.EVENT_MOVE = 'move';\n  ionic.Gestures.EVENT_END = 'end';\n\n  // hammer document where the base events are added at\n  ionic.Gestures.DOCUMENT = window.document;\n\n  // plugins namespace\n  ionic.Gestures.plugins = {};\n\n  // if the window events are set...\n  ionic.Gestures.READY = false;\n\n  /**\n   * setup events to detect gestures on the document\n   */\n  function setup() {\n    if(ionic.Gestures.READY) {\n      return;\n    }\n\n    // find what eventtypes we add listeners to\n    ionic.Gestures.event.determineEventTypes();\n\n    // Register all gestures inside ionic.Gestures.gestures\n    for(var name in ionic.Gestures.gestures) {\n      if(ionic.Gestures.gestures.hasOwnProperty(name)) {\n        ionic.Gestures.detection.register(ionic.Gestures.gestures[name]);\n      }\n    }\n\n    // Add touch events on the document\n    ionic.Gestures.event.onTouch(ionic.Gestures.DOCUMENT, ionic.Gestures.EVENT_MOVE, ionic.Gestures.detection.detect);\n    ionic.Gestures.event.onTouch(ionic.Gestures.DOCUMENT, ionic.Gestures.EVENT_END, ionic.Gestures.detection.detect);\n\n    // ionic.Gestures is ready...!\n    ionic.Gestures.READY = true;\n  }\n\n  /**\n   * create new hammer instance\n   * all methods should return the instance itself, so it is chainable.\n   * @param   {HTMLElement}       element\n   * @param   {Object}            [options={}]\n   * @returns {ionic.Gestures.Instance}\n   * @name Gesture.Instance\n   * @constructor\n   */\n  ionic.Gestures.Instance = function(element, options) {\n    var self = this;\n\n    // A null element was passed into the instance, which means\n    // whatever lookup was done to find this element failed to find it\n    // so we can't listen for events on it.\n    if(element === null) {\n      void 0;\n      return this;\n    }\n\n    // setup ionic.GesturesJS window events and register all gestures\n    // this also sets up the default options\n    setup();\n\n    this.element = element;\n\n    // start/stop detection option\n    this.enabled = true;\n\n    // merge options\n    this.options = ionic.Gestures.utils.extend(\n        ionic.Gestures.utils.extend({}, ionic.Gestures.defaults),\n        options || {});\n\n    // add some css to the element to prevent the browser from doing its native behavoir\n    if(this.options.stop_browser_behavior) {\n      ionic.Gestures.utils.stopDefaultBrowserBehavior(this.element, this.options.stop_browser_behavior);\n    }\n\n    // start detection on touchstart\n    ionic.Gestures.event.onTouch(element, ionic.Gestures.EVENT_START, function(ev) {\n      if(self.enabled) {\n        ionic.Gestures.detection.startDetect(self, ev);\n      }\n    });\n\n    // return instance\n    return this;\n  };\n\n\n  ionic.Gestures.Instance.prototype = {\n    /**\n     * bind events to the instance\n     * @param   {String}      gesture\n     * @param   {Function}    handler\n     * @returns {ionic.Gestures.Instance}\n     */\n    on: function onEvent(gesture, handler){\n      var gestures = gesture.split(' ');\n      for(var t = 0; t < gestures.length; t++) {\n        this.element.addEventListener(gestures[t], handler, false);\n      }\n      return this;\n    },\n\n\n    /**\n     * unbind events to the instance\n     * @param   {String}      gesture\n     * @param   {Function}    handler\n     * @returns {ionic.Gestures.Instance}\n     */\n    off: function offEvent(gesture, handler){\n      var gestures = gesture.split(' ');\n      for(var t = 0; t < gestures.length; t++) {\n        this.element.removeEventListener(gestures[t], handler, false);\n      }\n      return this;\n    },\n\n\n    /**\n     * trigger gesture event\n     * @param   {String}      gesture\n     * @param   {Object}      eventData\n     * @returns {ionic.Gestures.Instance}\n     */\n    trigger: function triggerEvent(gesture, eventData){\n      // create DOM event\n      var event = ionic.Gestures.DOCUMENT.createEvent('Event');\n      event.initEvent(gesture, true, true);\n      event.gesture = eventData;\n\n      // trigger on the target if it is in the instance element,\n      // this is for event delegation tricks\n      var element = this.element;\n      if(ionic.Gestures.utils.hasParent(eventData.target, element)) {\n        element = eventData.target;\n      }\n\n      element.dispatchEvent(event);\n      return this;\n    },\n\n\n    /**\n     * enable of disable hammer.js detection\n     * @param   {Boolean}   state\n     * @returns {ionic.Gestures.Instance}\n     */\n    enable: function enable(state) {\n      this.enabled = state;\n      return this;\n    }\n  };\n\n  /**\n   * this holds the last move event,\n   * used to fix empty touchend issue\n   * see the onTouch event for an explanation\n   * type {Object}\n   */\n  var last_move_event = null;\n\n\n  /**\n   * when the mouse is hold down, this is true\n   * type {Boolean}\n   */\n  var enable_detect = false;\n\n\n  /**\n   * when touch events have been fired, this is true\n   * type {Boolean}\n   */\n  var touch_triggered = false;\n\n\n  ionic.Gestures.event = {\n    /**\n     * simple addEventListener\n     * @param   {HTMLElement}   element\n     * @param   {String}        type\n     * @param   {Function}      handler\n     */\n    bindDom: function(element, type, handler) {\n      var types = type.split(' ');\n      for(var t = 0; t < types.length; t++) {\n        element.addEventListener(types[t], handler, false);\n      }\n    },\n\n\n    /**\n     * touch events with mouse fallback\n     * @param   {HTMLElement}   element\n     * @param   {String}        eventType        like ionic.Gestures.EVENT_MOVE\n     * @param   {Function}      handler\n     */\n    onTouch: function onTouch(element, eventType, handler) {\n      var self = this;\n\n      this.bindDom(element, ionic.Gestures.EVENT_TYPES[eventType], function bindDomOnTouch(ev) {\n        var sourceEventType = ev.type.toLowerCase();\n\n        // onmouseup, but when touchend has been fired we do nothing.\n        // this is for touchdevices which also fire a mouseup on touchend\n        if(sourceEventType.match(/mouse/) && touch_triggered) {\n          return;\n        }\n\n        // mousebutton must be down or a touch event\n        else if( sourceEventType.match(/touch/) ||   // touch events are always on screen\n          sourceEventType.match(/pointerdown/) || // pointerevents touch\n          (sourceEventType.match(/mouse/) && ev.which === 1)   // mouse is pressed\n          ){\n            enable_detect = true;\n          }\n\n        // mouse isn't pressed\n        else if(sourceEventType.match(/mouse/) && ev.which !== 1) {\n          enable_detect = false;\n        }\n\n\n        // we are in a touch event, set the touch triggered bool to true,\n        // this for the conflicts that may occur on ios and android\n        if(sourceEventType.match(/touch|pointer/)) {\n          touch_triggered = true;\n        }\n\n        // count the total touches on the screen\n        var count_touches = 0;\n\n        // when touch has been triggered in this detection session\n        // and we are now handling a mouse event, we stop that to prevent conflicts\n        if(enable_detect) {\n          // update pointerevent\n          if(ionic.Gestures.HAS_POINTEREVENTS && eventType != ionic.Gestures.EVENT_END) {\n            count_touches = ionic.Gestures.PointerEvent.updatePointer(eventType, ev);\n          }\n          // touch\n          else if(sourceEventType.match(/touch/)) {\n            count_touches = ev.touches.length;\n          }\n          // mouse\n          else if(!touch_triggered) {\n            count_touches = sourceEventType.match(/up/) ? 0 : 1;\n          }\n\n          // if we are in a end event, but when we remove one touch and\n          // we still have enough, set eventType to move\n          if(count_touches > 0 && eventType == ionic.Gestures.EVENT_END) {\n            eventType = ionic.Gestures.EVENT_MOVE;\n          }\n          // no touches, force the end event\n          else if(!count_touches) {\n            eventType = ionic.Gestures.EVENT_END;\n          }\n\n          // store the last move event\n          if(count_touches || last_move_event === null) {\n            last_move_event = ev;\n          }\n\n          // trigger the handler\n          handler.call(ionic.Gestures.detection, self.collectEventData(element, eventType, self.getTouchList(last_move_event, eventType), ev));\n\n          // remove pointerevent from list\n          if(ionic.Gestures.HAS_POINTEREVENTS && eventType == ionic.Gestures.EVENT_END) {\n            count_touches = ionic.Gestures.PointerEvent.updatePointer(eventType, ev);\n          }\n        }\n\n        //debug(sourceEventType +\" \"+ eventType);\n\n        // on the end we reset everything\n        if(!count_touches) {\n          last_move_event = null;\n          enable_detect = false;\n          touch_triggered = false;\n          ionic.Gestures.PointerEvent.reset();\n        }\n      });\n    },\n\n\n    /**\n     * we have different events for each device/browser\n     * determine what we need and set them in the ionic.Gestures.EVENT_TYPES constant\n     */\n    determineEventTypes: function determineEventTypes() {\n      // determine the eventtype we want to set\n      var types;\n\n      // pointerEvents magic\n      if(ionic.Gestures.HAS_POINTEREVENTS) {\n        types = ionic.Gestures.PointerEvent.getEvents();\n      }\n      // on Android, iOS, blackberry, windows mobile we dont want any mouseevents\n      else if(ionic.Gestures.NO_MOUSEEVENTS) {\n        types = [\n          'touchstart',\n          'touchmove',\n          'touchend touchcancel'];\n      }\n      // for non pointer events browsers and mixed browsers,\n      // like chrome on windows8 touch laptop\n      else {\n        types = [\n          'touchstart mousedown',\n          'touchmove mousemove',\n          'touchend touchcancel mouseup'];\n      }\n\n      ionic.Gestures.EVENT_TYPES[ionic.Gestures.EVENT_START] = types[0];\n      ionic.Gestures.EVENT_TYPES[ionic.Gestures.EVENT_MOVE] = types[1];\n      ionic.Gestures.EVENT_TYPES[ionic.Gestures.EVENT_END] = types[2];\n    },\n\n\n    /**\n     * create touchlist depending on the event\n     * @param   {Object}    ev\n     * @param   {String}    eventType   used by the fakemultitouch plugin\n     */\n    getTouchList: function getTouchList(ev/*, eventType*/) {\n      // get the fake pointerEvent touchlist\n      if(ionic.Gestures.HAS_POINTEREVENTS) {\n        return ionic.Gestures.PointerEvent.getTouchList();\n      }\n      // get the touchlist\n      else if(ev.touches) {\n        return ev.touches;\n      }\n      // make fake touchlist from mouse position\n      else {\n        ev.identifier = 1;\n        return [ev];\n      }\n    },\n\n\n    /**\n     * collect event data for ionic.Gestures js\n     * @param   {HTMLElement}   element\n     * @param   {String}        eventType        like ionic.Gestures.EVENT_MOVE\n     * @param   {Object}        eventData\n     */\n    collectEventData: function collectEventData(element, eventType, touches, ev) {\n\n      // find out pointerType\n      var pointerType = ionic.Gestures.POINTER_TOUCH;\n      if(ev.type.match(/mouse/) || ionic.Gestures.PointerEvent.matchType(ionic.Gestures.POINTER_MOUSE, ev)) {\n        pointerType = ionic.Gestures.POINTER_MOUSE;\n      }\n\n      return {\n        center: ionic.Gestures.utils.getCenter(touches),\n        timeStamp: new Date().getTime(),\n        target: ev.target,\n        touches: touches,\n        eventType: eventType,\n        pointerType: pointerType,\n        srcEvent: ev,\n\n        /**\n         * prevent the browser default actions\n         * mostly used to disable scrolling of the browser\n         */\n        preventDefault: function() {\n          if(this.srcEvent.preventManipulation) {\n            this.srcEvent.preventManipulation();\n          }\n\n          if(this.srcEvent.preventDefault) {\n            // this.srcEvent.preventDefault();\n          }\n        },\n\n        /**\n         * stop bubbling the event up to its parents\n         */\n        stopPropagation: function() {\n          this.srcEvent.stopPropagation();\n        },\n\n        /**\n         * immediately stop gesture detection\n         * might be useful after a swipe was detected\n         * @return {*}\n         */\n        stopDetect: function() {\n          return ionic.Gestures.detection.stopDetect();\n        }\n      };\n    }\n  };\n\n  ionic.Gestures.PointerEvent = {\n    /**\n     * holds all pointers\n     * type {Object}\n     */\n    pointers: {},\n\n    /**\n     * get a list of pointers\n     * @returns {Array}     touchlist\n     */\n    getTouchList: function() {\n      var self = this;\n      var touchlist = [];\n\n      // we can use forEach since pointerEvents only is in IE10\n      Object.keys(self.pointers).sort().forEach(function(id) {\n        touchlist.push(self.pointers[id]);\n      });\n      return touchlist;\n    },\n\n    /**\n     * update the position of a pointer\n     * @param   {String}   type             ionic.Gestures.EVENT_END\n     * @param   {Object}   pointerEvent\n     */\n    updatePointer: function(type, pointerEvent) {\n      if(type == ionic.Gestures.EVENT_END) {\n        this.pointers = {};\n      }\n      else {\n        pointerEvent.identifier = pointerEvent.pointerId;\n        this.pointers[pointerEvent.pointerId] = pointerEvent;\n      }\n\n      return Object.keys(this.pointers).length;\n    },\n\n    /**\n     * check if ev matches pointertype\n     * @param   {String}        pointerType     ionic.Gestures.POINTER_MOUSE\n     * @param   {PointerEvent}  ev\n     */\n    matchType: function(pointerType, ev) {\n      if(!ev.pointerType) {\n        return false;\n      }\n\n      var types = {};\n      types[ionic.Gestures.POINTER_MOUSE] = (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE || ev.pointerType == ionic.Gestures.POINTER_MOUSE);\n      types[ionic.Gestures.POINTER_TOUCH] = (ev.pointerType == ev.MSPOINTER_TYPE_TOUCH || ev.pointerType == ionic.Gestures.POINTER_TOUCH);\n      types[ionic.Gestures.POINTER_PEN] = (ev.pointerType == ev.MSPOINTER_TYPE_PEN || ev.pointerType == ionic.Gestures.POINTER_PEN);\n      return types[pointerType];\n    },\n\n\n    /**\n     * get events\n     */\n    getEvents: function() {\n      return [\n        'pointerdown MSPointerDown',\n      'pointermove MSPointerMove',\n      'pointerup pointercancel MSPointerUp MSPointerCancel'\n        ];\n    },\n\n    /**\n     * reset the list\n     */\n    reset: function() {\n      this.pointers = {};\n    }\n  };\n\n\n  ionic.Gestures.utils = {\n    /**\n     * extend method,\n     * also used for cloning when dest is an empty object\n     * @param   {Object}    dest\n     * @param   {Object}    src\n     * @param\t{Boolean}\tmerge\t\tdo a merge\n     * @returns {Object}    dest\n     */\n    extend: function extend(dest, src, merge) {\n      for (var key in src) {\n        if(dest[key] !== undefined && merge) {\n          continue;\n        }\n        dest[key] = src[key];\n      }\n      return dest;\n    },\n\n\n    /**\n     * find if a node is in the given parent\n     * used for event delegation tricks\n     * @param   {HTMLElement}   node\n     * @param   {HTMLElement}   parent\n     * @returns {boolean}       has_parent\n     */\n    hasParent: function(node, parent) {\n      while(node){\n        if(node == parent) {\n          return true;\n        }\n        node = node.parentNode;\n      }\n      return false;\n    },\n\n\n    /**\n     * get the center of all the touches\n     * @param   {Array}     touches\n     * @returns {Object}    center\n     */\n    getCenter: function getCenter(touches) {\n      var valuesX = [], valuesY = [];\n\n      for(var t = 0, len = touches.length; t < len; t++) {\n        valuesX.push(touches[t].pageX);\n        valuesY.push(touches[t].pageY);\n      }\n\n      return {\n        pageX: ((Math.min.apply(Math, valuesX) + Math.max.apply(Math, valuesX)) / 2),\n          pageY: ((Math.min.apply(Math, valuesY) + Math.max.apply(Math, valuesY)) / 2)\n      };\n    },\n\n\n    /**\n     * calculate the velocity between two points\n     * @param   {Number}    delta_time\n     * @param   {Number}    delta_x\n     * @param   {Number}    delta_y\n     * @returns {Object}    velocity\n     */\n    getVelocity: function getVelocity(delta_time, delta_x, delta_y) {\n      return {\n        x: Math.abs(delta_x / delta_time) || 0,\n        y: Math.abs(delta_y / delta_time) || 0\n      };\n    },\n\n\n    /**\n     * calculate the angle between two coordinates\n     * @param   {Touch}     touch1\n     * @param   {Touch}     touch2\n     * @returns {Number}    angle\n     */\n    getAngle: function getAngle(touch1, touch2) {\n      var y = touch2.pageY - touch1.pageY,\n      x = touch2.pageX - touch1.pageX;\n      return Math.atan2(y, x) * 180 / Math.PI;\n    },\n\n\n    /**\n     * angle to direction define\n     * @param   {Touch}     touch1\n     * @param   {Touch}     touch2\n     * @returns {String}    direction constant, like ionic.Gestures.DIRECTION_LEFT\n     */\n    getDirection: function getDirection(touch1, touch2) {\n      var x = Math.abs(touch1.pageX - touch2.pageX),\n      y = Math.abs(touch1.pageY - touch2.pageY);\n\n      if(x >= y) {\n        return touch1.pageX - touch2.pageX > 0 ? ionic.Gestures.DIRECTION_LEFT : ionic.Gestures.DIRECTION_RIGHT;\n      }\n      else {\n        return touch1.pageY - touch2.pageY > 0 ? ionic.Gestures.DIRECTION_UP : ionic.Gestures.DIRECTION_DOWN;\n      }\n    },\n\n\n    /**\n     * calculate the distance between two touches\n     * @param   {Touch}     touch1\n     * @param   {Touch}     touch2\n     * @returns {Number}    distance\n     */\n    getDistance: function getDistance(touch1, touch2) {\n      var x = touch2.pageX - touch1.pageX,\n      y = touch2.pageY - touch1.pageY;\n      return Math.sqrt((x * x) + (y * y));\n    },\n\n\n    /**\n     * calculate the scale factor between two touchLists (fingers)\n     * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n     * @param   {Array}     start\n     * @param   {Array}     end\n     * @returns {Number}    scale\n     */\n    getScale: function getScale(start, end) {\n      // need two fingers...\n      if(start.length >= 2 && end.length >= 2) {\n        return this.getDistance(end[0], end[1]) /\n          this.getDistance(start[0], start[1]);\n      }\n      return 1;\n    },\n\n\n    /**\n     * calculate the rotation degrees between two touchLists (fingers)\n     * @param   {Array}     start\n     * @param   {Array}     end\n     * @returns {Number}    rotation\n     */\n    getRotation: function getRotation(start, end) {\n      // need two fingers\n      if(start.length >= 2 && end.length >= 2) {\n        return this.getAngle(end[1], end[0]) -\n          this.getAngle(start[1], start[0]);\n      }\n      return 0;\n    },\n\n\n    /**\n     * boolean if the direction is vertical\n     * @param    {String}    direction\n     * @returns  {Boolean}   is_vertical\n     */\n    isVertical: function isVertical(direction) {\n      return (direction == ionic.Gestures.DIRECTION_UP || direction == ionic.Gestures.DIRECTION_DOWN);\n    },\n\n\n    /**\n     * stop browser default behavior with css class\n     * @param   {HtmlElement}   element\n     * @param   {Object}        css_class\n     */\n    stopDefaultBrowserBehavior: function stopDefaultBrowserBehavior(element, css_class) {\n      // changed from making many style changes to just adding a preset classname\n      // less DOM manipulations, less code, and easier to control in the CSS side of things\n      // hammer.js doesn't come with CSS, but ionic does, which is why we prefer this method\n      if(element && element.classList) {\n        element.classList.add(css_class);\n        element.onselectstart = function() {\n          return false;\n        };\n      }\n    }\n  };\n\n\n  ionic.Gestures.detection = {\n    // contains all registred ionic.Gestures.gestures in the correct order\n    gestures: [],\n\n    // data of the current ionic.Gestures.gesture detection session\n    current: null,\n\n    // the previous ionic.Gestures.gesture session data\n    // is a full clone of the previous gesture.current object\n    previous: null,\n\n    // when this becomes true, no gestures are fired\n    stopped: false,\n\n\n    /**\n     * start ionic.Gestures.gesture detection\n     * @param   {ionic.Gestures.Instance}   inst\n     * @param   {Object}            eventData\n     */\n    startDetect: function startDetect(inst, eventData) {\n      // already busy with a ionic.Gestures.gesture detection on an element\n      if(this.current) {\n        return;\n      }\n\n      this.stopped = false;\n\n      this.current = {\n        inst: inst, // reference to ionic.GesturesInstance we're working for\n        startEvent: ionic.Gestures.utils.extend({}, eventData), // start eventData for distances, timing etc\n        lastEvent: false, // last eventData\n        name: '' // current gesture we're in/detected, can be 'tap', 'hold' etc\n      };\n\n      this.detect(eventData);\n    },\n\n\n    /**\n     * ionic.Gestures.gesture detection\n     * @param   {Object}    eventData\n     */\n    detect: function detect(eventData) {\n      if(!this.current || this.stopped) {\n        return null;\n      }\n\n      // extend event data with calculations about scale, distance etc\n      eventData = this.extendEventData(eventData);\n\n      // instance options\n      var inst_options = this.current.inst.options;\n\n      // call ionic.Gestures.gesture handlers\n      for(var g = 0, len = this.gestures.length; g < len; g++) {\n        var gesture = this.gestures[g];\n\n        // only when the instance options have enabled this gesture\n        if(!this.stopped && inst_options[gesture.name] !== false) {\n          // if a handler returns false, we stop with the detection\n          if(gesture.handler.call(gesture, eventData, this.current.inst) === false) {\n            this.stopDetect();\n            break;\n          }\n        }\n      }\n\n      // store as previous event event\n      if(this.current) {\n        this.current.lastEvent = eventData;\n      }\n\n      // endevent, but not the last touch, so dont stop\n      if(eventData.eventType == ionic.Gestures.EVENT_END && !eventData.touches.length - 1) {\n        this.stopDetect();\n      }\n\n      return eventData;\n    },\n\n\n    /**\n     * clear the ionic.Gestures.gesture vars\n     * this is called on endDetect, but can also be used when a final ionic.Gestures.gesture has been detected\n     * to stop other ionic.Gestures.gestures from being fired\n     */\n    stopDetect: function stopDetect() {\n      // clone current data to the store as the previous gesture\n      // used for the double tap gesture, since this is an other gesture detect session\n      this.previous = ionic.Gestures.utils.extend({}, this.current);\n\n      // reset the current\n      this.current = null;\n\n      // stopped!\n      this.stopped = true;\n    },\n\n\n    /**\n     * extend eventData for ionic.Gestures.gestures\n     * @param   {Object}   ev\n     * @returns {Object}   ev\n     */\n    extendEventData: function extendEventData(ev) {\n      var startEv = this.current.startEvent;\n\n      // if the touches change, set the new touches over the startEvent touches\n      // this because touchevents don't have all the touches on touchstart, or the\n      // user must place his fingers at the EXACT same time on the screen, which is not realistic\n      // but, sometimes it happens that both fingers are touching at the EXACT same time\n      if(startEv && (ev.touches.length != startEv.touches.length || ev.touches === startEv.touches)) {\n        // extend 1 level deep to get the touchlist with the touch objects\n        startEv.touches = [];\n        for(var i = 0, len = ev.touches.length; i < len; i++) {\n          startEv.touches.push(ionic.Gestures.utils.extend({}, ev.touches[i]));\n        }\n      }\n\n      var delta_time = ev.timeStamp - startEv.timeStamp,\n          delta_x = ev.center.pageX - startEv.center.pageX,\n          delta_y = ev.center.pageY - startEv.center.pageY,\n          velocity = ionic.Gestures.utils.getVelocity(delta_time, delta_x, delta_y);\n\n      ionic.Gestures.utils.extend(ev, {\n        deltaTime: delta_time,\n        deltaX: delta_x,\n        deltaY: delta_y,\n\n        velocityX: velocity.x,\n        velocityY: velocity.y,\n\n        distance: ionic.Gestures.utils.getDistance(startEv.center, ev.center),\n        angle: ionic.Gestures.utils.getAngle(startEv.center, ev.center),\n        direction: ionic.Gestures.utils.getDirection(startEv.center, ev.center),\n\n        scale: ionic.Gestures.utils.getScale(startEv.touches, ev.touches),\n        rotation: ionic.Gestures.utils.getRotation(startEv.touches, ev.touches),\n\n        startEvent: startEv\n      });\n\n      return ev;\n    },\n\n\n    /**\n     * register new gesture\n     * @param   {Object}    gesture object, see gestures.js for documentation\n     * @returns {Array}     gestures\n     */\n    register: function register(gesture) {\n      // add an enable gesture options if there is no given\n      var options = gesture.defaults || {};\n      if(options[gesture.name] === undefined) {\n        options[gesture.name] = true;\n      }\n\n      // extend ionic.Gestures default options with the ionic.Gestures.gesture options\n      ionic.Gestures.utils.extend(ionic.Gestures.defaults, options, true);\n\n      // set its index\n      gesture.index = gesture.index || 1000;\n\n      // add ionic.Gestures.gesture to the list\n      this.gestures.push(gesture);\n\n      // sort the list by index\n      this.gestures.sort(function(a, b) {\n        if (a.index < b.index) {\n          return -1;\n        }\n        if (a.index > b.index) {\n          return 1;\n        }\n        return 0;\n      });\n\n      return this.gestures;\n    }\n  };\n\n\n  ionic.Gestures.gestures = ionic.Gestures.gestures || {};\n\n  /**\n   * Custom gestures\n   * ==============================\n   *\n   * Gesture object\n   * --------------------\n   * The object structure of a gesture:\n   *\n   * { name: 'mygesture',\n   *   index: 1337,\n   *   defaults: {\n   *     mygesture_option: true\n   *   }\n   *   handler: function(type, ev, inst) {\n   *     // trigger gesture event\n   *     inst.trigger(this.name, ev);\n   *   }\n   * }\n\n   * @param   {String}    name\n   * this should be the name of the gesture, lowercase\n   * it is also being used to disable/enable the gesture per instance config.\n   *\n   * @param   {Number}    [index=1000]\n   * the index of the gesture, where it is going to be in the stack of gestures detection\n   * like when you build an gesture that depends on the drag gesture, it is a good\n   * idea to place it after the index of the drag gesture.\n   *\n   * @param   {Object}    [defaults={}]\n   * the default settings of the gesture. these are added to the instance settings,\n   * and can be overruled per instance. you can also add the name of the gesture,\n   * but this is also added by default (and set to true).\n   *\n   * @param   {Function}  handler\n   * this handles the gesture detection of your custom gesture and receives the\n   * following arguments:\n   *\n   *      @param  {Object}    eventData\n   *      event data containing the following properties:\n   *          timeStamp   {Number}        time the event occurred\n   *          target      {HTMLElement}   target element\n   *          touches     {Array}         touches (fingers, pointers, mouse) on the screen\n   *          pointerType {String}        kind of pointer that was used. matches ionic.Gestures.POINTER_MOUSE|TOUCH\n   *          center      {Object}        center position of the touches. contains pageX and pageY\n   *          deltaTime   {Number}        the total time of the touches in the screen\n   *          deltaX      {Number}        the delta on x axis we haved moved\n   *          deltaY      {Number}        the delta on y axis we haved moved\n   *          velocityX   {Number}        the velocity on the x\n   *          velocityY   {Number}        the velocity on y\n   *          angle       {Number}        the angle we are moving\n   *          direction   {String}        the direction we are moving. matches ionic.Gestures.DIRECTION_UP|DOWN|LEFT|RIGHT\n   *          distance    {Number}        the distance we haved moved\n   *          scale       {Number}        scaling of the touches, needs 2 touches\n   *          rotation    {Number}        rotation of the touches, needs 2 touches *\n   *          eventType   {String}        matches ionic.Gestures.EVENT_START|MOVE|END\n   *          srcEvent    {Object}        the source event, like TouchStart or MouseDown *\n   *          startEvent  {Object}        contains the same properties as above,\n   *                                      but from the first touch. this is used to calculate\n   *                                      distances, deltaTime, scaling etc\n   *\n   *      @param  {ionic.Gestures.Instance}    inst\n   *      the instance we are doing the detection for. you can get the options from\n   *      the inst.options object and trigger the gesture event by calling inst.trigger\n   *\n   *\n   * Handle gestures\n   * --------------------\n   * inside the handler you can get/set ionic.Gestures.detectionic.current. This is the current\n   * detection sessionic. It has the following properties\n   *      @param  {String}    name\n   *      contains the name of the gesture we have detected. it has not a real function,\n   *      only to check in other gestures if something is detected.\n   *      like in the drag gesture we set it to 'drag' and in the swipe gesture we can\n   *      check if the current gesture is 'drag' by accessing ionic.Gestures.detectionic.current.name\n   *\n   *      readonly\n   *      @param  {ionic.Gestures.Instance}    inst\n   *      the instance we do the detection for\n   *\n   *      readonly\n   *      @param  {Object}    startEvent\n   *      contains the properties of the first gesture detection in this sessionic.\n   *      Used for calculations about timing, distance, etc.\n   *\n   *      readonly\n   *      @param  {Object}    lastEvent\n   *      contains all the properties of the last gesture detect in this sessionic.\n   *\n   * after the gesture detection session has been completed (user has released the screen)\n   * the ionic.Gestures.detectionic.current object is copied into ionic.Gestures.detectionic.previous,\n   * this is usefull for gestures like doubletap, where you need to know if the\n   * previous gesture was a tap\n   *\n   * options that have been set by the instance can be received by calling inst.options\n   *\n   * You can trigger a gesture event by calling inst.trigger(\"mygesture\", event).\n   * The first param is the name of your gesture, the second the event argument\n   *\n   *\n   * Register gestures\n   * --------------------\n   * When an gesture is added to the ionic.Gestures.gestures object, it is auto registered\n   * at the setup of the first ionic.Gestures instance. You can also call ionic.Gestures.detectionic.register\n   * manually and pass your gesture object as a param\n   *\n   */\n\n  /**\n   * Hold\n   * Touch stays at the same place for x time\n   * events  hold\n   */\n  ionic.Gestures.gestures.Hold = {\n    name: 'hold',\n    index: 10,\n    defaults: {\n      hold_timeout: 500,\n      hold_threshold: 9\n    },\n    timer: null,\n    handler: function holdGesture(ev, inst) {\n      switch(ev.eventType) {\n        case ionic.Gestures.EVENT_START:\n          // clear any running timers\n          clearTimeout(this.timer);\n\n          // set the gesture so we can check in the timeout if it still is\n          ionic.Gestures.detection.current.name = this.name;\n\n          // set timer and if after the timeout it still is hold,\n          // we trigger the hold event\n          this.timer = setTimeout(function() {\n            if(ionic.Gestures.detection.current.name == 'hold') {\n              ionic.tap.cancelClick();\n              inst.trigger('hold', ev);\n            }\n          }, inst.options.hold_timeout);\n          break;\n\n          // when you move or end we clear the timer\n        case ionic.Gestures.EVENT_MOVE:\n          if(ev.distance > inst.options.hold_threshold) {\n            clearTimeout(this.timer);\n          }\n          break;\n\n        case ionic.Gestures.EVENT_END:\n          clearTimeout(this.timer);\n          break;\n      }\n    }\n  };\n\n\n  /**\n   * Tap/DoubleTap\n   * Quick touch at a place or double at the same place\n   * events  tap, doubletap\n   */\n  ionic.Gestures.gestures.Tap = {\n    name: 'tap',\n    index: 100,\n    defaults: {\n      tap_max_touchtime: 250,\n      tap_max_distance: 10,\n      tap_always: true,\n      doubletap_distance: 20,\n      doubletap_interval: 300\n    },\n    handler: function tapGesture(ev, inst) {\n      if(ev.eventType == ionic.Gestures.EVENT_END && ev.srcEvent.type != 'touchcancel') {\n        // previous gesture, for the double tap since these are two different gesture detections\n        var prev = ionic.Gestures.detection.previous,\n        did_doubletap = false;\n\n        // when the touchtime is higher then the max touch time\n        // or when the moving distance is too much\n        if(ev.deltaTime > inst.options.tap_max_touchtime ||\n            ev.distance > inst.options.tap_max_distance) {\n              return;\n            }\n\n        // check if double tap\n        if(prev && prev.name == 'tap' &&\n            (ev.timeStamp - prev.lastEvent.timeStamp) < inst.options.doubletap_interval &&\n            ev.distance < inst.options.doubletap_distance) {\n              inst.trigger('doubletap', ev);\n              did_doubletap = true;\n            }\n\n        // do a single tap\n        if(!did_doubletap || inst.options.tap_always) {\n          ionic.Gestures.detection.current.name = 'tap';\n          inst.trigger('tap', ev);\n        }\n      }\n    }\n  };\n\n\n  /**\n   * Swipe\n   * triggers swipe events when the end velocity is above the threshold\n   * events  swipe, swipeleft, swiperight, swipeup, swipedown\n   */\n  ionic.Gestures.gestures.Swipe = {\n    name: 'swipe',\n    index: 40,\n    defaults: {\n      // set 0 for unlimited, but this can conflict with transform\n      swipe_max_touches: 1,\n      swipe_velocity: 0.4\n    },\n    handler: function swipeGesture(ev, inst) {\n      if(ev.eventType == ionic.Gestures.EVENT_END) {\n        // max touches\n        if(inst.options.swipe_max_touches > 0 &&\n            ev.touches.length > inst.options.swipe_max_touches) {\n              return;\n            }\n\n        // when the distance we moved is too small we skip this gesture\n        // or we can be already in dragging\n        if(ev.velocityX > inst.options.swipe_velocity ||\n            ev.velocityY > inst.options.swipe_velocity) {\n              // trigger swipe events\n              inst.trigger(this.name, ev);\n              inst.trigger(this.name + ev.direction, ev);\n            }\n      }\n    }\n  };\n\n\n  /**\n   * Drag\n   * Move with x fingers (default 1) around on the page. Blocking the scrolling when\n   * moving left and right is a good practice. When all the drag events are blocking\n   * you disable scrolling on that area.\n   * events  drag, drapleft, dragright, dragup, dragdown\n   */\n  ionic.Gestures.gestures.Drag = {\n    name: 'drag',\n    index: 50,\n    defaults: {\n      drag_min_distance: 10,\n      // Set correct_for_drag_min_distance to true to make the starting point of the drag\n      // be calculated from where the drag was triggered, not from where the touch started.\n      // Useful to avoid a jerk-starting drag, which can make fine-adjustments\n      // through dragging difficult, and be visually unappealing.\n      correct_for_drag_min_distance: true,\n      // set 0 for unlimited, but this can conflict with transform\n      drag_max_touches: 1,\n      // prevent default browser behavior when dragging occurs\n      // be careful with it, it makes the element a blocking element\n      // when you are using the drag gesture, it is a good practice to set this true\n      drag_block_horizontal: true,\n      drag_block_vertical: true,\n      // drag_lock_to_axis keeps the drag gesture on the axis that it started on,\n      // It disallows vertical directions if the initial direction was horizontal, and vice versa.\n      drag_lock_to_axis: false,\n      // drag lock only kicks in when distance > drag_lock_min_distance\n      // This way, locking occurs only when the distance has become large enough to reliably determine the direction\n      drag_lock_min_distance: 25,\n      // prevent default if the gesture is going the given direction\n      prevent_default_directions: []\n    },\n    triggered: false,\n    handler: function dragGesture(ev, inst) {\n      if (ev.srcEvent.type == 'touchstart' || ev.srcEvent.type == 'touchend') {\n        this.preventedFirstMove = false;\n\n      } else if (!this.preventedFirstMove && ev.srcEvent.type == 'touchmove') {\n        // Prevent gestures that are not intended for this event handler from firing subsequent times\n        if (inst.options.prevent_default_directions.length > 0\n            && inst.options.prevent_default_directions.indexOf(ev.direction) != -1) {\n          ev.srcEvent.preventDefault();\n        }\n        this.preventedFirstMove = true;\n      }\n\n      // current gesture isnt drag, but dragged is true\n      // this means an other gesture is busy. now call dragend\n      if(ionic.Gestures.detection.current.name != this.name && this.triggered) {\n        inst.trigger(this.name + 'end', ev);\n        this.triggered = false;\n        return;\n      }\n\n      // max touches\n      if(inst.options.drag_max_touches > 0 &&\n          ev.touches.length > inst.options.drag_max_touches) {\n            return;\n          }\n\n      switch(ev.eventType) {\n        case ionic.Gestures.EVENT_START:\n          this.triggered = false;\n          break;\n\n        case ionic.Gestures.EVENT_MOVE:\n          // when the distance we moved is too small we skip this gesture\n          // or we can be already in dragging\n          if(ev.distance < inst.options.drag_min_distance &&\n              ionic.Gestures.detection.current.name != this.name) {\n                return;\n              }\n\n          // we are dragging!\n          if(ionic.Gestures.detection.current.name != this.name) {\n            ionic.Gestures.detection.current.name = this.name;\n            if (inst.options.correct_for_drag_min_distance) {\n              // When a drag is triggered, set the event center to drag_min_distance pixels from the original event center.\n              // Without this correction, the dragged distance would jumpstart at drag_min_distance pixels instead of at 0.\n              // It might be useful to save the original start point somewhere\n              var factor = Math.abs(inst.options.drag_min_distance / ev.distance);\n              ionic.Gestures.detection.current.startEvent.center.pageX += ev.deltaX * factor;\n              ionic.Gestures.detection.current.startEvent.center.pageY += ev.deltaY * factor;\n\n              // recalculate event data using new start point\n              ev = ionic.Gestures.detection.extendEventData(ev);\n            }\n          }\n\n          // lock drag to axis?\n          if(ionic.Gestures.detection.current.lastEvent.drag_locked_to_axis || (inst.options.drag_lock_to_axis && inst.options.drag_lock_min_distance <= ev.distance)) {\n            ev.drag_locked_to_axis = true;\n          }\n          var last_direction = ionic.Gestures.detection.current.lastEvent.direction;\n          if(ev.drag_locked_to_axis && last_direction !== ev.direction) {\n            // keep direction on the axis that the drag gesture started on\n            if(ionic.Gestures.utils.isVertical(last_direction)) {\n              ev.direction = (ev.deltaY < 0) ? ionic.Gestures.DIRECTION_UP : ionic.Gestures.DIRECTION_DOWN;\n            }\n            else {\n              ev.direction = (ev.deltaX < 0) ? ionic.Gestures.DIRECTION_LEFT : ionic.Gestures.DIRECTION_RIGHT;\n            }\n          }\n\n          // first time, trigger dragstart event\n          if(!this.triggered) {\n            inst.trigger(this.name + 'start', ev);\n            this.triggered = true;\n          }\n\n          // trigger normal event\n          inst.trigger(this.name, ev);\n\n          // direction event, like dragdown\n          inst.trigger(this.name + ev.direction, ev);\n\n          // block the browser events\n          if( (inst.options.drag_block_vertical && ionic.Gestures.utils.isVertical(ev.direction)) ||\n              (inst.options.drag_block_horizontal && !ionic.Gestures.utils.isVertical(ev.direction))) {\n                ev.preventDefault();\n              }\n          break;\n\n        case ionic.Gestures.EVENT_END:\n          // trigger dragend\n          if(this.triggered) {\n            inst.trigger(this.name + 'end', ev);\n          }\n\n          this.triggered = false;\n          break;\n      }\n    }\n  };\n\n\n  /**\n   * Transform\n   * User want to scale or rotate with 2 fingers\n   * events  transform, pinch, pinchin, pinchout, rotate\n   */\n  ionic.Gestures.gestures.Transform = {\n    name: 'transform',\n    index: 45,\n    defaults: {\n      // factor, no scale is 1, zoomin is to 0 and zoomout until higher then 1\n      transform_min_scale: 0.01,\n      // rotation in degrees\n      transform_min_rotation: 1,\n      // prevent default browser behavior when two touches are on the screen\n      // but it makes the element a blocking element\n      // when you are using the transform gesture, it is a good practice to set this true\n      transform_always_block: false\n    },\n    triggered: false,\n    handler: function transformGesture(ev, inst) {\n      // current gesture isnt drag, but dragged is true\n      // this means an other gesture is busy. now call dragend\n      if(ionic.Gestures.detection.current.name != this.name && this.triggered) {\n        inst.trigger(this.name + 'end', ev);\n        this.triggered = false;\n        return;\n      }\n\n      // atleast multitouch\n      if(ev.touches.length < 2) {\n        return;\n      }\n\n      // prevent default when two fingers are on the screen\n      if(inst.options.transform_always_block) {\n        ev.preventDefault();\n      }\n\n      switch(ev.eventType) {\n        case ionic.Gestures.EVENT_START:\n          this.triggered = false;\n          break;\n\n        case ionic.Gestures.EVENT_MOVE:\n          var scale_threshold = Math.abs(1 - ev.scale);\n          var rotation_threshold = Math.abs(ev.rotation);\n\n          // when the distance we moved is too small we skip this gesture\n          // or we can be already in dragging\n          if(scale_threshold < inst.options.transform_min_scale &&\n              rotation_threshold < inst.options.transform_min_rotation) {\n                return;\n              }\n\n          // we are transforming!\n          ionic.Gestures.detection.current.name = this.name;\n\n          // first time, trigger dragstart event\n          if(!this.triggered) {\n            inst.trigger(this.name + 'start', ev);\n            this.triggered = true;\n          }\n\n          inst.trigger(this.name, ev); // basic transform event\n\n          // trigger rotate event\n          if(rotation_threshold > inst.options.transform_min_rotation) {\n            inst.trigger('rotate', ev);\n          }\n\n          // trigger pinch event\n          if(scale_threshold > inst.options.transform_min_scale) {\n            inst.trigger('pinch', ev);\n            inst.trigger('pinch' + ((ev.scale < 1) ? 'in' : 'out'), ev);\n          }\n          break;\n\n        case ionic.Gestures.EVENT_END:\n          // trigger dragend\n          if(this.triggered) {\n            inst.trigger(this.name + 'end', ev);\n          }\n\n          this.triggered = false;\n          break;\n      }\n    }\n  };\n\n\n  /**\n   * Touch\n   * Called as first, tells the user has touched the screen\n   * events  touch\n   */\n  ionic.Gestures.gestures.Touch = {\n    name: 'touch',\n    index: -Infinity,\n    defaults: {\n      // call preventDefault at touchstart, and makes the element blocking by\n      // disabling the scrolling of the page, but it improves gestures like\n      // transforming and dragging.\n      // be careful with using this, it can be very annoying for users to be stuck\n      // on the page\n      prevent_default: false,\n\n      // disable mouse events, so only touch (or pen!) input triggers events\n      prevent_mouseevents: false\n    },\n    handler: function touchGesture(ev, inst) {\n      if(inst.options.prevent_mouseevents && ev.pointerType == ionic.Gestures.POINTER_MOUSE) {\n        ev.stopDetect();\n        return;\n      }\n\n      if(inst.options.prevent_default) {\n        ev.preventDefault();\n      }\n\n      if(ev.eventType == ionic.Gestures.EVENT_START) {\n        inst.trigger(this.name, ev);\n      }\n    }\n  };\n\n\n  /**\n   * Release\n   * Called as last, tells the user has released the screen\n   * events  release\n   */\n  ionic.Gestures.gestures.Release = {\n    name: 'release',\n    index: Infinity,\n    handler: function releaseGesture(ev, inst) {\n      if(ev.eventType == ionic.Gestures.EVENT_END) {\n        inst.trigger(this.name, ev);\n      }\n    }\n  };\n})(window.ionic);\n\n(function(window, document, ionic) {\n\n  function getParameterByName(name) {\n    name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n    var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\"),\n    results = regex.exec(location.search);\n    return results === null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n  }\n\n  var IOS = 'ios';\n  var ANDROID = 'android';\n  var WINDOWS_PHONE = 'windowsphone';\n  var EDGE = 'edge';\n  var CROSSWALK = 'crosswalk';\n  var requestAnimationFrame = ionic.requestAnimationFrame;\n\n  /**\n   * @ngdoc utility\n   * @name ionic.Platform\n   * @module ionic\n   * @description\n   * A set of utility methods that can be used to retrieve the device ready state and\n   * various other information such as what kind of platform the app is currently installed on.\n   *\n   * @usage\n   * ```js\n   * angular.module('PlatformApp', ['ionic'])\n   * .controller('PlatformCtrl', function($scope) {\n   *\n   *   ionic.Platform.ready(function(){\n   *     // will execute when device is ready, or immediately if the device is already ready.\n   *   });\n   *\n   *   var deviceInformation = ionic.Platform.device();\n   *\n   *   var isWebView = ionic.Platform.isWebView();\n   *   var isIPad = ionic.Platform.isIPad();\n   *   var isIOS = ionic.Platform.isIOS();\n   *   var isAndroid = ionic.Platform.isAndroid();\n   *   var isWindowsPhone = ionic.Platform.isWindowsPhone();\n   *\n   *   var currentPlatform = ionic.Platform.platform();\n   *   var currentPlatformVersion = ionic.Platform.version();\n   *\n   *   ionic.Platform.exitApp(); // stops the app\n   * });\n   * ```\n   */\n  var self = ionic.Platform = {\n\n    // Put navigator on platform so it can be mocked and set\n    // the browser does not allow window.navigator to be set\n    navigator: window.navigator,\n\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#isReady\n     * @returns {boolean} Whether the device is ready.\n     */\n    isReady: false,\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#isFullScreen\n     * @returns {boolean} Whether the device is fullscreen.\n     */\n    isFullScreen: false,\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#platforms\n     * @returns {Array(string)} An array of all platforms found.\n     */\n    platforms: null,\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#grade\n     * @returns {string} What grade the current platform is.\n     */\n    grade: null,\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#ua\n     * @returns {string} What User Agent is.\n     */\n    ua: navigator.userAgent,\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#ready\n     * @description\n     * Trigger a callback once the device is ready, or immediately\n     * if the device is already ready. This method can be run from\n     * anywhere and does not need to be wrapped by any additonal methods.\n     * When the app is within a WebView (Cordova), it'll fire\n     * the callback once the device is ready. If the app is within\n     * a web browser, it'll fire the callback after `window.load`.\n     * Please remember that Cordova features (Camera, FileSystem, etc) still\n     * will not work in a web browser.\n     * @param {function} callback The function to call.\n     */\n    ready: function(cb) {\n      // run through tasks to complete now that the device is ready\n      if (self.isReady) {\n        cb();\n      } else {\n        // the platform isn't ready yet, add it to this array\n        // which will be called once the platform is ready\n        readyCallbacks.push(cb);\n      }\n    },\n\n    /**\n     * @private\n     */\n    detect: function() {\n      self._checkPlatforms();\n\n      requestAnimationFrame(function() {\n        // only add to the body class if we got platform info\n        for (var i = 0; i < self.platforms.length; i++) {\n          document.body.classList.add('platform-' + self.platforms[i]);\n        }\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#setGrade\n     * @description Set the grade of the device: 'a', 'b', or 'c'. 'a' is the best\n     * (most css features enabled), 'c' is the worst.  By default, sets the grade\n     * depending on the current device.\n     * @param {string} grade The new grade to set.\n     */\n    setGrade: function(grade) {\n      var oldGrade = self.grade;\n      self.grade = grade;\n      requestAnimationFrame(function() {\n        if (oldGrade) {\n          document.body.classList.remove('grade-' + oldGrade);\n        }\n        document.body.classList.add('grade-' + grade);\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#device\n     * @description Return the current device (given by cordova).\n     * @returns {object} The device object.\n     */\n    device: function() {\n      return window.device || {};\n    },\n\n    _checkPlatforms: function() {\n      self.platforms = [];\n      var grade = 'a';\n\n      if (self.isWebView()) {\n        self.platforms.push('webview');\n        if (!(!window.cordova && !window.PhoneGap && !window.phonegap)) {\n          self.platforms.push('cordova');\n        } else if (typeof window.forge === 'object') {\n          self.platforms.push('trigger');\n        }\n      } else {\n        self.platforms.push('browser');\n      }\n      if (self.isIPad()) self.platforms.push('ipad');\n\n      var platform = self.platform();\n      if (platform) {\n        self.platforms.push(platform);\n\n        var version = self.version();\n        if (version) {\n          var v = version.toString();\n          if (v.indexOf('.') > 0) {\n            v = v.replace('.', '_');\n          } else {\n            v += '_0';\n          }\n          self.platforms.push(platform + v.split('_')[0]);\n          self.platforms.push(platform + v);\n\n          if (self.isAndroid() && version < 4.4) {\n            grade = (version < 4 ? 'c' : 'b');\n          } else if (self.isWindowsPhone()) {\n            grade = 'b';\n          }\n        }\n      }\n\n      self.setGrade(grade);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isWebView\n     * @returns {boolean} Check if we are running within a WebView (such as Cordova).\n     */\n    isWebView: function() {\n      return !(!window.cordova && !window.PhoneGap && !window.phonegap && window.forge !== 'object');\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isIPad\n     * @returns {boolean} Whether we are running on iPad.\n     */\n    isIPad: function() {\n      if (/iPad/i.test(self.navigator.platform)) {\n        return true;\n      }\n      return /iPad/i.test(self.ua);\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isIOS\n     * @returns {boolean} Whether we are running on iOS.\n     */\n    isIOS: function() {\n      return self.is(IOS);\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isAndroid\n     * @returns {boolean} Whether we are running on Android.\n     */\n    isAndroid: function() {\n      return self.is(ANDROID);\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isWindowsPhone\n     * @returns {boolean} Whether we are running on Windows Phone.\n     */\n    isWindowsPhone: function() {\n      return self.is(WINDOWS_PHONE);\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isEdge\n     * @returns {boolean} Whether we are running on MS Edge/Windows 10 (inc. Phone)\n     */\n    isEdge: function() {\n      return self.is(EDGE);\n    },\n\n    isCrosswalk: function() {\n      return self.is(CROSSWALK);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#platform\n     * @returns {string} The name of the current platform.\n     */\n    platform: function() {\n      // singleton to get the platform name\n      if (platformName === null) self.setPlatform(self.device().platform);\n      return platformName;\n    },\n\n    /**\n     * @private\n     */\n    setPlatform: function(n) {\n      if (typeof n != 'undefined' && n !== null && n.length) {\n        platformName = n.toLowerCase();\n      } else if (getParameterByName('ionicplatform')) {\n        platformName = getParameterByName('ionicplatform');\n      } else if (self.ua.indexOf('Edge') > -1) {\n        platformName = EDGE;\n      } else if (self.ua.indexOf('Windows Phone') > -1) {\n        platformName = WINDOWS_PHONE;\n      } else if (self.ua.indexOf('Android') > 0) {\n        platformName = ANDROID;\n      } else if (/iPhone|iPad|iPod/.test(self.ua)) {\n        platformName = IOS;\n      } else {\n        platformName = self.navigator.platform && navigator.platform.toLowerCase().split(' ')[0] || '';\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#version\n     * @returns {number} The version of the current device platform.\n     */\n    version: function() {\n      // singleton to get the platform version\n      if (platformVersion === null) self.setVersion(self.device().version);\n      return platformVersion;\n    },\n\n    /**\n     * @private\n     */\n    setVersion: function(v) {\n      if (typeof v != 'undefined' && v !== null) {\n        v = v.split('.');\n        v = parseFloat(v[0] + '.' + (v.length > 1 ? v[1] : 0));\n        if (!isNaN(v)) {\n          platformVersion = v;\n          return;\n        }\n      }\n\n      platformVersion = 0;\n\n      // fallback to user-agent checking\n      var pName = self.platform();\n      var versionMatch = {\n        'android': /Android (\\d+).(\\d+)?/,\n        'ios': /OS (\\d+)_(\\d+)?/,\n        'windowsphone': /Windows Phone (\\d+).(\\d+)?/\n      };\n      if (versionMatch[pName]) {\n        v = self.ua.match(versionMatch[pName]);\n        if (v && v.length > 2) {\n          platformVersion = parseFloat(v[1] + '.' + v[2]);\n        }\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#is\n     * @param {string} Platform name.\n     * @returns {boolean} Whether the platform name provided is detected.\n     */\n    is: function(type) {\n      type = type.toLowerCase();\n      // check if it has an array of platforms\n      if (self.platforms) {\n        for (var x = 0; x < self.platforms.length; x++) {\n          if (self.platforms[x] === type) return true;\n        }\n      }\n      // exact match\n      var pName = self.platform();\n      if (pName) {\n        return pName === type.toLowerCase();\n      }\n\n      // A quick hack for to check userAgent\n      return self.ua.toLowerCase().indexOf(type) >= 0;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#exitApp\n     * @description Exit the app.\n     */\n    exitApp: function() {\n      self.ready(function() {\n        navigator.app && navigator.app.exitApp && navigator.app.exitApp();\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#showStatusBar\n     * @description Shows or hides the device status bar (in Cordova). Requires `ionic plugin add cordova-plugin-statusbar`\n     * @param {boolean} shouldShow Whether or not to show the status bar.\n     */\n    showStatusBar: function(val) {\n      // Only useful when run within cordova\n      self._showStatusBar = val;\n      self.ready(function() {\n        // run this only when or if the platform (cordova) is ready\n        requestAnimationFrame(function() {\n          if (self._showStatusBar) {\n            // they do not want it to be full screen\n            window.StatusBar && window.StatusBar.show();\n            document.body.classList.remove('status-bar-hide');\n          } else {\n            // it should be full screen\n            window.StatusBar && window.StatusBar.hide();\n            document.body.classList.add('status-bar-hide');\n          }\n        });\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#fullScreen\n     * @description\n     * Sets whether the app is fullscreen or not (in Cordova).\n     * @param {boolean=} showFullScreen Whether or not to set the app to fullscreen. Defaults to true. Requires `ionic plugin add cordova-plugin-statusbar`\n     * @param {boolean=} showStatusBar Whether or not to show the device's status bar. Defaults to false.\n     */\n    fullScreen: function(showFullScreen, showStatusBar) {\n      // showFullScreen: default is true if no param provided\n      self.isFullScreen = (showFullScreen !== false);\n\n      // add/remove the fullscreen classname to the body\n      ionic.DomUtil.ready(function() {\n        // run this only when or if the DOM is ready\n        requestAnimationFrame(function() {\n          if (self.isFullScreen) {\n            document.body.classList.add('fullscreen');\n          } else {\n            document.body.classList.remove('fullscreen');\n          }\n        });\n        // showStatusBar: default is false if no param provided\n        self.showStatusBar((showStatusBar === true));\n      });\n    }\n\n  };\n\n  var platformName = null, // just the name, like iOS or Android\n  platformVersion = null, // a float of the major and minor, like 7.1\n  readyCallbacks = [],\n  windowLoadListenderAttached,\n  platformReadyTimer = 2000; // How long to wait for platform ready before emitting a warning\n\n  verifyPlatformReady();\n\n  // Warn the user if deviceready did not fire in a reasonable amount of time, and how to fix it.\n  function verifyPlatformReady() {\n    setTimeout(function() {\n      if(!self.isReady && self.isWebView()) {\n        void 0;\n      }\n    }, platformReadyTimer);\n  }\n\n  // setup listeners to know when the device is ready to go\n  function onWindowLoad() {\n    if (self.isWebView()) {\n      // the window and scripts are fully loaded, and a cordova/phonegap\n      // object exists then let's listen for the deviceready\n      document.addEventListener(\"deviceready\", onPlatformReady, false);\n    } else {\n      // the window and scripts are fully loaded, but the window object doesn't have the\n      // cordova/phonegap object, so its just a browser, not a webview wrapped w/ cordova\n      onPlatformReady();\n    }\n    if (windowLoadListenderAttached) {\n      window.removeEventListener(\"load\", onWindowLoad, false);\n    }\n  }\n  if (document.readyState === 'complete') {\n    onWindowLoad();\n  } else {\n    windowLoadListenderAttached = true;\n    window.addEventListener(\"load\", onWindowLoad, false);\n  }\n\n  function onPlatformReady() {\n    // the device is all set to go, init our own stuff then fire off our event\n    self.isReady = true;\n    self.detect();\n    for (var x = 0; x < readyCallbacks.length; x++) {\n      // fire off all the callbacks that were added before the platform was ready\n      readyCallbacks[x]();\n    }\n    readyCallbacks = [];\n    ionic.trigger('platformready', { target: document });\n\n    requestAnimationFrame(function() {\n      document.body.classList.add('platform-ready');\n    });\n  }\n\n})(window, document, ionic);\n\n(function(document, ionic) {\n  'use strict';\n\n  // Ionic CSS polyfills\n  ionic.CSS = {};\n  ionic.CSS.TRANSITION = [];\n  ionic.CSS.TRANSFORM = [];\n\n  ionic.EVENTS = {};\n\n  (function() {\n\n    // transform\n    var i, keys = ['webkitTransform', 'transform', '-webkit-transform', 'webkit-transform',\n                   '-moz-transform', 'moz-transform', 'MozTransform', 'mozTransform', 'msTransform'];\n\n    for (i = 0; i < keys.length; i++) {\n      if (document.documentElement.style[keys[i]] !== undefined) {\n        ionic.CSS.TRANSFORM = keys[i];\n        break;\n      }\n    }\n\n    // transition\n    keys = ['webkitTransition', 'mozTransition', 'msTransition', 'transition'];\n    for (i = 0; i < keys.length; i++) {\n      if (document.documentElement.style[keys[i]] !== undefined) {\n        ionic.CSS.TRANSITION = keys[i];\n        break;\n      }\n    }\n\n    // Fallback in case the keys don't exist at all\n    ionic.CSS.TRANSITION = ionic.CSS.TRANSITION || 'transition';\n\n    // The only prefix we care about is webkit for transitions.\n    var isWebkit = ionic.CSS.TRANSITION.indexOf('webkit') > -1;\n\n    // transition duration\n    ionic.CSS.TRANSITION_DURATION = (isWebkit ? '-webkit-' : '') + 'transition-duration';\n\n    // To be sure transitionend works everywhere, include *both* the webkit and non-webkit events\n    ionic.CSS.TRANSITIONEND = (isWebkit ? 'webkitTransitionEnd ' : '') + 'transitionend';\n  })();\n\n  (function() {\n      var touchStartEvent = 'touchstart';\n      var touchMoveEvent = 'touchmove';\n      var touchEndEvent = 'touchend';\n      var touchCancelEvent = 'touchcancel';\n\n      if (window.navigator.pointerEnabled) {\n        touchStartEvent = 'pointerdown';\n        touchMoveEvent = 'pointermove';\n        touchEndEvent = 'pointerup';\n        touchCancelEvent = 'pointercancel';\n      } else if (window.navigator.msPointerEnabled) {\n        touchStartEvent = 'MSPointerDown';\n        touchMoveEvent = 'MSPointerMove';\n        touchEndEvent = 'MSPointerUp';\n        touchCancelEvent = 'MSPointerCancel';\n      }\n\n      ionic.EVENTS.touchstart = touchStartEvent;\n      ionic.EVENTS.touchmove = touchMoveEvent;\n      ionic.EVENTS.touchend = touchEndEvent;\n      ionic.EVENTS.touchcancel = touchCancelEvent;\n  })();\n\n  // classList polyfill for them older Androids\n  // https://gist.github.com/devongovett/1381839\n  if (!(\"classList\" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== 'undefined') {\n    Object.defineProperty(HTMLElement.prototype, 'classList', {\n      get: function() {\n        var self = this;\n        function update(fn) {\n          return function() {\n            var x, classes = self.className.split(/\\s+/);\n\n            for (x = 0; x < arguments.length; x++) {\n              fn(classes, classes.indexOf(arguments[x]), arguments[x]);\n            }\n\n            self.className = classes.join(\" \");\n          };\n        }\n\n        return {\n          add: update(function(classes, index, value) {\n            ~index || classes.push(value);\n          }),\n\n          remove: update(function(classes, index) {\n            ~index && classes.splice(index, 1);\n          }),\n\n          toggle: update(function(classes, index, value) {\n            ~index ? classes.splice(index, 1) : classes.push(value);\n          }),\n\n          contains: function(value) {\n            return !!~self.className.split(/\\s+/).indexOf(value);\n          },\n\n          item: function(i) {\n            return self.className.split(/\\s+/)[i] || null;\n          }\n        };\n\n      }\n    });\n  }\n\n})(document, ionic);\n\n\n/**\n * @ngdoc page\n * @name tap\n * @module ionic\n * @description\n * On touch devices such as a phone or tablet, some browsers implement a 300ms delay between\n * the time the user stops touching the display and the moment the browser executes the\n * click. This delay was initially introduced so the browser can know whether the user wants to\n * double-tap to zoom in on the webpage.  Basically, the browser waits roughly 300ms to see if\n * the user is double-tapping, or just tapping on the display once.\n *\n * Out of the box, Ionic automatically removes the 300ms delay in order to make Ionic apps\n * feel more \"native\" like. Resultingly, other solutions such as\n * [fastclick](https://github.com/ftlabs/fastclick) and Angular's\n * [ngTouch](https://docs.angularjs.org/api/ngTouch) should not be included, to avoid conflicts.\n *\n * Some browsers already remove the delay with certain settings, such as the CSS property\n * `touch-events: none` or with specific meta tag viewport values. However, each of these\n * browsers still handle clicks differently, such as when to fire off or cancel the event\n * (like scrolling when the target is a button, or holding a button down).\n * For browsers that already remove the 300ms delay, consider Ionic's tap system as a way to\n * normalize how clicks are handled across the various devices so there's an expected response\n * no matter what the device, platform or version. Additionally, Ionic will prevent\n * ghostclicks which even browsers that remove the delay still experience.\n *\n * In some cases, third-party libraries may also be working with touch events which can interfere\n * with the tap system. For example, mapping libraries like Google or Leaflet Maps often implement\n * a touch detection system which conflicts with Ionic's tap system.\n *\n * ### Disabling the tap system\n *\n * To disable the tap for an element and all of its children elements,\n * add the attribute `data-tap-disabled=\"true\"`.\n *\n * ```html\n * <div data-tap-disabled=\"true\">\n *     <div id=\"google-map\"></div>\n * </div>\n * ```\n *\n * ### Additional Notes:\n *\n * - Ionic tap  works with Ionic's JavaScript scrolling\n * - Elements can come and go from the DOM and Ionic tap doesn't keep adding and removing\n *   listeners\n * - No \"tap delay\" after the first \"tap\" (you can tap as fast as you want, they all click)\n * - Minimal events listeners, only being added to document\n * - Correct focus in/out on each input type (select, textearea, range) on each platform/device\n * - Shows and hides virtual keyboard correctly for each platform/device\n * - Works with labels surrounding inputs\n * - Does not fire off a click if the user moves the pointer too far\n * - Adds and removes an 'activated' css class\n * - Multiple [unit tests](https://github.com/ionic-team/ionic/blob/1.x/test/unit/utils/tap.unit.js) for each scenario\n *\n */\n/*\n\n IONIC TAP\n ---------------\n - Both touch and mouse events are added to the document.body on DOM ready\n - If a touch event happens, it does not use mouse event listeners\n - On touchend, if the distance between start and end was small, trigger a click\n - In the triggered click event, add a 'isIonicTap' property\n - The triggered click receives the same x,y coordinates as as the end event\n - On document.body click listener (with useCapture=true), only allow clicks with 'isIonicTap'\n - Triggering clicks with mouse events work the same as touch, except with mousedown/mouseup\n - Tapping inputs is disabled during scrolling\n*/\n\nvar tapDoc; // the element which the listeners are on (document.body)\nvar tapActiveEle; // the element which is active (probably has focus)\nvar tapEnabledTouchEvents;\nvar tapMouseResetTimer;\nvar tapPointerMoved;\nvar tapPointerStart;\nvar tapTouchFocusedInput;\nvar tapLastTouchTarget;\nvar tapTouchMoveListener = 'touchmove';\n\n// how much the coordinates can be off between start/end, but still a click\nvar TAP_RELEASE_TOLERANCE = 12; // default tolerance\nvar TAP_RELEASE_BUTTON_TOLERANCE = 50; // button elements should have a larger tolerance\n\nvar tapEventListeners = {\n  'click': tapClickGateKeeper,\n\n  'mousedown': tapMouseDown,\n  'mouseup': tapMouseUp,\n  'mousemove': tapMouseMove,\n\n  'touchstart': tapTouchStart,\n  'touchend': tapTouchEnd,\n  'touchcancel': tapTouchCancel,\n  'touchmove': tapTouchMove,\n\n  'pointerdown': tapTouchStart,\n  'pointerup': tapTouchEnd,\n  'pointercancel': tapTouchCancel,\n  'pointermove': tapTouchMove,\n\n  'MSPointerDown': tapTouchStart,\n  'MSPointerUp': tapTouchEnd,\n  'MSPointerCancel': tapTouchCancel,\n  'MSPointerMove': tapTouchMove,\n\n  'focusin': tapFocusIn,\n  'focusout': tapFocusOut\n};\n\nionic.tap = {\n\n  register: function(ele) {\n    tapDoc = ele;\n\n    tapEventListener('click', true, true);\n    tapEventListener('mouseup');\n    tapEventListener('mousedown');\n\n    if (window.navigator.pointerEnabled) {\n      tapEventListener('pointerdown');\n      tapEventListener('pointerup');\n      tapEventListener('pointercancel');\n      tapTouchMoveListener = 'pointermove';\n\n    } else if (window.navigator.msPointerEnabled) {\n      tapEventListener('MSPointerDown');\n      tapEventListener('MSPointerUp');\n      tapEventListener('MSPointerCancel');\n      tapTouchMoveListener = 'MSPointerMove';\n\n    } else {\n      tapEventListener('touchstart');\n      tapEventListener('touchend');\n      tapEventListener('touchcancel');\n    }\n\n    tapEventListener('focusin');\n    tapEventListener('focusout');\n\n    return function() {\n      for (var type in tapEventListeners) {\n        tapEventListener(type, false);\n      }\n      tapDoc = null;\n      tapActiveEle = null;\n      tapEnabledTouchEvents = false;\n      tapPointerMoved = false;\n      tapPointerStart = null;\n    };\n  },\n\n  ignoreScrollStart: function(e) {\n    return (e.defaultPrevented) ||  // defaultPrevented has been assigned by another component handling the event\n           (/^(file|range)$/i).test(e.target.type) ||\n           (e.target.dataset ? e.target.dataset.preventScroll : e.target.getAttribute('data-prevent-scroll')) == 'true' || // manually set within an elements attributes\n           (!!(/^(object|embed)$/i).test(e.target.tagName)) ||  // flash/movie/object touches should not try to scroll\n           ionic.tap.isElementTapDisabled(e.target); // check if this element, or an ancestor, has `data-tap-disabled` attribute\n  },\n\n  isTextInput: function(ele) {\n    return !!ele &&\n           (ele.tagName == 'TEXTAREA' ||\n            ele.contentEditable === 'true' ||\n            (ele.tagName == 'INPUT' && !(/^(radio|checkbox|range|file|submit|reset|color|image|button)$/i).test(ele.type)));\n  },\n\n  isDateInput: function(ele) {\n    return !!ele &&\n            (ele.tagName == 'INPUT' && (/^(date|time|datetime-local|month|week)$/i).test(ele.type));\n  },\n\n  isVideo: function(ele) {\n    return !!ele &&\n            (ele.tagName == 'VIDEO');\n  },\n\n  isKeyboardElement: function(ele) {\n    if ( !ionic.Platform.isIOS() || ionic.Platform.isIPad() ) {\n      return ionic.tap.isTextInput(ele) && !ionic.tap.isDateInput(ele);\n    } else {\n      return ionic.tap.isTextInput(ele) || ( !!ele && ele.tagName == \"SELECT\");\n    }\n  },\n\n  isLabelWithTextInput: function(ele) {\n    var container = tapContainingElement(ele, false);\n\n    return !!container &&\n           ionic.tap.isTextInput(tapTargetElement(container));\n  },\n\n  containsOrIsTextInput: function(ele) {\n    return ionic.tap.isTextInput(ele) || ionic.tap.isLabelWithTextInput(ele);\n  },\n\n  cloneFocusedInput: function(container) {\n    if (ionic.tap.hasCheckedClone) return;\n    ionic.tap.hasCheckedClone = true;\n\n    ionic.requestAnimationFrame(function() {\n      var focusInput = container.querySelector(':focus');\n      if (ionic.tap.isTextInput(focusInput) && !ionic.tap.isDateInput(focusInput)) {\n        var clonedInput = focusInput.cloneNode(true);\n\n        clonedInput.value = focusInput.value;\n        clonedInput.classList.add('cloned-text-input');\n        clonedInput.readOnly = true;\n        if (focusInput.isContentEditable) {\n          clonedInput.contentEditable = focusInput.contentEditable;\n          clonedInput.innerHTML = focusInput.innerHTML;\n        }\n        focusInput.parentElement.insertBefore(clonedInput, focusInput);\n        focusInput.classList.add('previous-input-focus');\n\n        clonedInput.scrollTop = focusInput.scrollTop;\n      }\n    });\n  },\n\n  hasCheckedClone: false,\n\n  removeClonedInputs: function(container) {\n    ionic.tap.hasCheckedClone = false;\n\n    ionic.requestAnimationFrame(function() {\n      var clonedInputs = container.querySelectorAll('.cloned-text-input');\n      var previousInputFocus = container.querySelectorAll('.previous-input-focus');\n      var x;\n\n      for (x = 0; x < clonedInputs.length; x++) {\n        clonedInputs[x].parentElement.removeChild(clonedInputs[x]);\n      }\n\n      for (x = 0; x < previousInputFocus.length; x++) {\n        previousInputFocus[x].classList.remove('previous-input-focus');\n        previousInputFocus[x].style.top = '';\n        if ( ionic.keyboard.isOpen && !ionic.keyboard.isClosing ) previousInputFocus[x].focus();\n      }\n    });\n  },\n\n  requiresNativeClick: function(ele) {\n    if (ionic.Platform.isWindowsPhone() && (ele.tagName == 'A' || ele.tagName == 'BUTTON' || ele.hasAttribute('ng-click') || (ele.tagName == 'INPUT' && (ele.type == 'button' || ele.type == 'submit')))) {\n      return true; //Windows Phone edge case, prevent ng-click (and similar) events from firing twice on this platform\n    }\n    if (!ele || ele.disabled || (/^(file|range)$/i).test(ele.type) || (/^(object|video)$/i).test(ele.tagName) || ionic.tap.isLabelContainingFileInput(ele)) {\n      return true;\n    }\n    return ionic.tap.isElementTapDisabled(ele);\n  },\n\n  isLabelContainingFileInput: function(ele) {\n    var lbl = tapContainingElement(ele);\n    if (lbl.tagName !== 'LABEL') return false;\n    var fileInput = lbl.querySelector('input[type=file]');\n    if (fileInput && fileInput.disabled === false) return true;\n    return false;\n  },\n\n  isElementTapDisabled: function(ele) {\n    if (ele && ele.nodeType === 1) {\n      var element = ele;\n      while (element) {\n        if (element.getAttribute && element.getAttribute('data-tap-disabled') == 'true') {\n          return true;\n        }\n        element = element.parentElement;\n      }\n    }\n    return false;\n  },\n\n  setTolerance: function(releaseTolerance, releaseButtonTolerance) {\n    TAP_RELEASE_TOLERANCE = releaseTolerance;\n    TAP_RELEASE_BUTTON_TOLERANCE = releaseButtonTolerance;\n  },\n\n  cancelClick: function() {\n    // used to cancel any simulated clicks which may happen on a touchend/mouseup\n    // gestures uses this method within its tap and hold events\n    tapPointerMoved = true;\n  },\n\n  pointerCoord: function(event) {\n    // This method can get coordinates for both a mouse click\n    // or a touch depending on the given event\n    var c = { x: 0, y: 0 };\n    if (event) {\n      var touches = event.touches && event.touches.length ? event.touches : [event];\n      var e = (event.changedTouches && event.changedTouches[0]) || touches[0];\n      if (e) {\n        c.x = e.clientX || e.pageX || 0;\n        c.y = e.clientY || e.pageY || 0;\n      }\n    }\n    return c;\n  }\n\n};\n\nfunction tapEventListener(type, enable, useCapture) {\n  if (enable !== false) {\n    tapDoc.addEventListener(type, tapEventListeners[type], useCapture);\n  } else {\n    tapDoc.removeEventListener(type, tapEventListeners[type]);\n  }\n}\n\nfunction tapClick(e) {\n  // simulate a normal click by running the element's click method then focus on it\n  var container = tapContainingElement(e.target);\n  var ele = tapTargetElement(container);\n\n  if (ionic.tap.requiresNativeClick(ele) || tapPointerMoved) return false;\n\n  var c = ionic.tap.pointerCoord(e);\n\n  //console.log('tapClick', e.type, ele.tagName, '('+c.x+','+c.y+')');\n  triggerMouseEvent('click', ele, c.x, c.y);\n\n  // if it's an input, focus in on the target, otherwise blur\n  tapHandleFocus(ele);\n}\n\nfunction triggerMouseEvent(type, ele, x, y) {\n  // using initMouseEvent instead of MouseEvent for our Android friends\n  var clickEvent = document.createEvent(\"MouseEvents\");\n  clickEvent.initMouseEvent(type, true, true, window, 1, 0, 0, x, y, false, false, false, false, 0, null);\n  clickEvent.isIonicTap = true;\n  ele.dispatchEvent(clickEvent);\n}\n\nfunction tapClickGateKeeper(e) {\n  //console.log('click ' + Date.now() + ' isIonicTap: ' + (e.isIonicTap ? true : false));\n  if (e.target.type == 'submit' && e.detail === 0) {\n    // do not prevent click if it came from an \"Enter\" or \"Go\" keypress submit\n    return null;\n  }\n\n  // do not allow through any click events that were not created by ionic.tap\n  if ((ionic.scroll.isScrolling && ionic.tap.containsOrIsTextInput(e.target)) ||\n      (!e.isIonicTap && !ionic.tap.requiresNativeClick(e.target))) {\n    //console.log('clickPrevent', e.target.tagName);\n    e.stopPropagation();\n\n    if (!ionic.tap.isLabelWithTextInput(e.target)) {\n      // labels clicks from native should not preventDefault othersize keyboard will not show on input focus\n      e.preventDefault();\n    }\n    return false;\n  }\n}\n\n// MOUSE\nfunction tapMouseDown(e) {\n  //console.log('mousedown ' + Date.now());\n  if (e.isIonicTap || tapIgnoreEvent(e)) return null;\n\n  if (tapEnabledTouchEvents) {\n    //console.log('mousedown', 'stop event');\n    e.stopPropagation();\n\n    if (!ionic.Platform.isEdge() && (!ionic.tap.isTextInput(e.target) || tapLastTouchTarget !== e.target) &&\n      !isSelectOrOption(e.target.tagName) && !e.target.isContentEditable && !ionic.tap.isVideo(e.target)) {\n      // If you preventDefault on a text input then you cannot move its text caret/cursor.\n      // Allow through only the text input default. However, without preventDefault on an\n      // input the 300ms delay can change focus on inputs after the keyboard shows up.\n      // The focusin event handles the chance of focus changing after the keyboard shows.\n      // Windows Phone - if you preventDefault on a video element then you cannot operate\n      // its native controls.\n      e.preventDefault();\n    }\n\n    return false;\n  }\n\n  tapPointerMoved = false;\n  tapPointerStart = ionic.tap.pointerCoord(e);\n\n  tapEventListener('mousemove');\n  ionic.activator.start(e);\n}\n\nfunction tapMouseUp(e) {\n  //console.log(\"mouseup \" + Date.now());\n  if (tapEnabledTouchEvents) {\n    e.stopPropagation();\n    e.preventDefault();\n    return false;\n  }\n\n  if (tapIgnoreEvent(e) || isSelectOrOption(e.target.tagName)) return false;\n\n  if (!tapHasPointerMoved(e)) {\n    tapClick(e);\n  }\n  tapEventListener('mousemove', false);\n  ionic.activator.end();\n  tapPointerMoved = false;\n}\n\nfunction tapMouseMove(e) {\n  if (tapHasPointerMoved(e)) {\n    tapEventListener('mousemove', false);\n    ionic.activator.end();\n    tapPointerMoved = true;\n    return false;\n  }\n}\n\n\n// TOUCH\nfunction tapTouchStart(e) {\n  //console.log(\"touchstart \" + Date.now());\n  if (tapIgnoreEvent(e)) return;\n\n  tapPointerMoved = false;\n\n  tapEnableTouchEvents();\n  tapPointerStart = ionic.tap.pointerCoord(e);\n\n  tapEventListener(tapTouchMoveListener);\n  ionic.activator.start(e);\n\n  if (ionic.Platform.isIOS() && ionic.tap.isLabelWithTextInput(e.target)) {\n    // if the tapped element is a label, which has a child input\n    // then preventDefault so iOS doesn't ugly auto scroll to the input\n    // but do not prevent default on Android or else you cannot move the text caret\n    // and do not prevent default on Android or else no virtual keyboard shows up\n\n    var textInput = tapTargetElement(tapContainingElement(e.target));\n    if (textInput !== tapActiveEle) {\n      // don't preventDefault on an already focused input or else iOS's text caret isn't usable\n      //console.log('Would prevent default here');\n      e.preventDefault();\n    }\n  }\n}\n\nfunction tapTouchEnd(e) {\n  //console.log('touchend ' + Date.now());\n  if (tapIgnoreEvent(e)) return;\n\n  tapEnableTouchEvents();\n  if (!tapHasPointerMoved(e)) {\n    tapClick(e);\n\n    if (isSelectOrOption(e.target.tagName)) {\n      e.preventDefault();\n    }\n  }\n\n  tapLastTouchTarget = e.target;\n  tapTouchCancel();\n}\n\nfunction tapTouchMove(e) {\n  if (tapHasPointerMoved(e)) {\n    tapPointerMoved = true;\n    tapEventListener(tapTouchMoveListener, false);\n    ionic.activator.end();\n    return false;\n  }\n}\n\nfunction tapTouchCancel() {\n  tapEventListener(tapTouchMoveListener, false);\n  ionic.activator.end();\n  tapPointerMoved = false;\n}\n\nfunction tapEnableTouchEvents() {\n  tapEnabledTouchEvents = true;\n  clearTimeout(tapMouseResetTimer);\n  tapMouseResetTimer = setTimeout(function() {\n    tapEnabledTouchEvents = false;\n  }, 600);\n}\n\nfunction tapIgnoreEvent(e) {\n  if (e.isTapHandled) return true;\n  e.isTapHandled = true;\n\n  if(ionic.tap.isElementTapDisabled(e.target)) {\n    return true;\n  }\n\n  if(e.target.tagName == 'SELECT') {\n    return true;\n  }\n\n  if (ionic.scroll.isScrolling && ionic.tap.containsOrIsTextInput(e.target)) {\n    e.preventDefault();\n    return true;\n  }\n}\n\nfunction tapHandleFocus(ele) {\n  tapTouchFocusedInput = null;\n\n  var triggerFocusIn = false;\n\n  if (ele.tagName == 'SELECT') {\n    // trick to force Android options to show up\n    triggerMouseEvent('mousedown', ele, 0, 0);\n    ele.focus && ele.focus();\n    triggerFocusIn = true;\n\n  } else if (tapActiveElement() === ele) {\n    // already is the active element and has focus\n    triggerFocusIn = true;\n\n  } else if ((/^(input|textarea|ion-label)$/i).test(ele.tagName) || ele.isContentEditable) {\n    triggerFocusIn = true;\n    ele.focus && ele.focus();\n    ele.value = ele.value;\n    if (tapEnabledTouchEvents) {\n      tapTouchFocusedInput = ele;\n    }\n\n  } else {\n    tapFocusOutActive();\n  }\n\n  if (triggerFocusIn) {\n    tapActiveElement(ele);\n    ionic.trigger('ionic.focusin', {\n      target: ele\n    }, true);\n  }\n}\n\nfunction tapFocusOutActive() {\n  var ele = tapActiveElement();\n  if (ele && ((/^(input|textarea|select)$/i).test(ele.tagName) || ele.isContentEditable)) {\n    //console.log('tapFocusOutActive', ele.tagName);\n    ele.blur();\n  }\n  tapActiveElement(null);\n}\n\nfunction tapFocusIn(e) {\n  //console.log('focusin ' + Date.now());\n  // Because a text input doesn't preventDefault (so the caret still works) there's a chance\n  // that its mousedown event 300ms later will change the focus to another element after\n  // the keyboard shows up.\n\n  if (tapEnabledTouchEvents &&\n      ionic.tap.isTextInput(tapActiveElement()) &&\n      ionic.tap.isTextInput(tapTouchFocusedInput) &&\n      tapTouchFocusedInput !== e.target) {\n\n    // 1) The pointer is from touch events\n    // 2) There is an active element which is a text input\n    // 3) A text input was just set to be focused on by a touch event\n    // 4) A new focus has been set, however the target isn't the one the touch event wanted\n    //console.log('focusin', 'tapTouchFocusedInput');\n    tapTouchFocusedInput.focus();\n    tapTouchFocusedInput = null;\n  }\n  ionic.scroll.isScrolling = false;\n}\n\nfunction tapFocusOut() {\n  //console.log(\"focusout\");\n  tapActiveElement(null);\n}\n\nfunction tapActiveElement(ele) {\n  if (arguments.length) {\n    tapActiveEle = ele;\n  }\n  return tapActiveEle || document.activeElement;\n}\n\nfunction tapHasPointerMoved(endEvent) {\n  if (!endEvent || endEvent.target.nodeType !== 1 || !tapPointerStart || (tapPointerStart.x === 0 && tapPointerStart.y === 0)) {\n    return false;\n  }\n  var endCoordinates = ionic.tap.pointerCoord(endEvent);\n\n  var hasClassList = !!(endEvent.target.classList && endEvent.target.classList.contains &&\n    typeof endEvent.target.classList.contains === 'function');\n  var releaseTolerance = hasClassList && endEvent.target.classList.contains('button') ?\n    TAP_RELEASE_BUTTON_TOLERANCE :\n    TAP_RELEASE_TOLERANCE;\n\n  return Math.abs(tapPointerStart.x - endCoordinates.x) > releaseTolerance ||\n         Math.abs(tapPointerStart.y - endCoordinates.y) > releaseTolerance;\n}\n\nfunction tapContainingElement(ele, allowSelf) {\n  var climbEle = ele;\n  for (var x = 0; x < 6; x++) {\n    if (!climbEle) break;\n    if (climbEle.tagName === 'LABEL') return climbEle;\n    climbEle = climbEle.parentElement;\n  }\n  if (allowSelf !== false) return ele;\n}\n\nfunction tapTargetElement(ele) {\n  if (ele && ele.tagName === 'LABEL') {\n    if (ele.control) return ele.control;\n\n    // older devices do not support the \"control\" property\n    if (ele.querySelector) {\n      var control = ele.querySelector('input,textarea,select');\n      if (control) return control;\n    }\n  }\n  return ele;\n}\n\nfunction isSelectOrOption(tagName){\n  return (/^(select|option)$/i).test(tagName);\n}\n\nionic.DomUtil.ready(function() {\n  var ng = typeof angular !== 'undefined' ? angular : null;\n  //do nothing for e2e tests\n  if (!ng || (ng && !ng.scenario)) {\n    ionic.tap.register(document);\n  }\n});\n\n(function(document, ionic) {\n  'use strict';\n\n  var queueElements = {};   // elements that should get an active state in XX milliseconds\n  var activeElements = {};  // elements that are currently active\n  var keyId = 0;            // a counter for unique keys for the above ojects\n  var ACTIVATED_CLASS = 'activated';\n\n  ionic.activator = {\n\n    start: function(e) {\n      var hitX = ionic.tap.pointerCoord(e).x;\n      if (hitX > 0 && hitX < 30) {\n        return;\n      }\n\n      // when an element is touched/clicked, it climbs up a few\n      // parents to see if it is an .item or .button element\n      ionic.requestAnimationFrame(function() {\n        if ((ionic.scroll && ionic.scroll.isScrolling) || ionic.tap.requiresNativeClick(e.target)) return;\n        var ele = e.target;\n        var eleToActivate;\n\n        for (var x = 0; x < 6; x++) {\n          if (!ele || ele.nodeType !== 1) break;\n          if (eleToActivate && ele.classList && ele.classList.contains('item')) {\n            eleToActivate = ele;\n            break;\n          }\n          if (ele.tagName == 'A' || ele.tagName == 'BUTTON' || ele.hasAttribute('ng-click')) {\n            eleToActivate = ele;\n            break;\n          }\n          if (ele.classList && ele.classList.contains('button')) {\n            eleToActivate = ele;\n            break;\n          }\n          // no sense climbing past these\n          if (ele.tagName == 'ION-CONTENT' || (ele.classList && ele.classList.contains('pane')) || ele.tagName == 'BODY') {\n            break;\n          }\n          ele = ele.parentElement;\n        }\n\n        if (eleToActivate) {\n          // queue that this element should be set to active\n          queueElements[keyId] = eleToActivate;\n\n          // on the next frame, set the queued elements to active\n          ionic.requestAnimationFrame(activateElements);\n\n          keyId = (keyId > 29 ? 0 : keyId + 1);\n        }\n\n      });\n    },\n\n    end: function() {\n      // clear out any active/queued elements after XX milliseconds\n      setTimeout(clear, 200);\n    }\n\n  };\n\n  function clear() {\n    // clear out any elements that are queued to be set to active\n    queueElements = {};\n\n    // in the next frame, remove the active class from all active elements\n    ionic.requestAnimationFrame(deactivateElements);\n  }\n\n  function activateElements() {\n    // activate all elements in the queue\n    for (var key in queueElements) {\n      if (queueElements[key]) {\n        queueElements[key].classList.add(ACTIVATED_CLASS);\n        activeElements[key] = queueElements[key];\n      }\n    }\n    queueElements = {};\n  }\n\n  function deactivateElements() {\n    if (ionic.transition && ionic.transition.isActive) {\n      setTimeout(deactivateElements, 400);\n      return;\n    }\n\n    for (var key in activeElements) {\n      if (activeElements[key]) {\n        activeElements[key].classList.remove(ACTIVATED_CLASS);\n        delete activeElements[key];\n      }\n    }\n  }\n\n})(document, ionic);\n\n(function(ionic) {\n  /* for nextUid function below */\n  var nextId = 0;\n\n  /**\n   * Various utilities used throughout Ionic\n   *\n   * Some of these are adopted from underscore.js and backbone.js, both also MIT licensed.\n   */\n  ionic.Utils = {\n\n    arrayMove: function(arr, oldIndex, newIndex) {\n      if (newIndex >= arr.length) {\n        var k = newIndex - arr.length;\n        while ((k--) + 1) {\n          arr.push(undefined);\n        }\n      }\n      arr.splice(newIndex, 0, arr.splice(oldIndex, 1)[0]);\n      return arr;\n    },\n\n    /**\n     * Return a function that will be called with the given context\n     */\n    proxy: function(func, context) {\n      var args = Array.prototype.slice.call(arguments, 2);\n      return function() {\n        return func.apply(context, args.concat(Array.prototype.slice.call(arguments)));\n      };\n    },\n\n    /**\n     * Only call a function once in the given interval.\n     *\n     * @param func {Function} the function to call\n     * @param wait {int} how long to wait before/after to allow function calls\n     * @param immediate {boolean} whether to call immediately or after the wait interval\n     */\n     debounce: function(func, wait, immediate) {\n      var timeout, args, context, timestamp, result;\n      return function() {\n        context = this;\n        args = arguments;\n        timestamp = new Date();\n        var later = function() {\n          var last = (new Date()) - timestamp;\n          if (last < wait) {\n            timeout = setTimeout(later, wait - last);\n          } else {\n            timeout = null;\n            if (!immediate) result = func.apply(context, args);\n          }\n        };\n        var callNow = immediate && !timeout;\n        if (!timeout) {\n          timeout = setTimeout(later, wait);\n        }\n        if (callNow) result = func.apply(context, args);\n        return result;\n      };\n    },\n\n    /**\n     * Throttle the given fun, only allowing it to be\n     * called at most every `wait` ms.\n     */\n    throttle: function(func, wait, options) {\n      var context, args, result;\n      var timeout = null;\n      var previous = 0;\n      options || (options = {});\n      var later = function() {\n        previous = options.leading === false ? 0 : Date.now();\n        timeout = null;\n        result = func.apply(context, args);\n      };\n      return function() {\n        var now = Date.now();\n        if (!previous && options.leading === false) previous = now;\n        var remaining = wait - (now - previous);\n        context = this;\n        args = arguments;\n        if (remaining <= 0) {\n          clearTimeout(timeout);\n          timeout = null;\n          previous = now;\n          result = func.apply(context, args);\n        } else if (!timeout && options.trailing !== false) {\n          timeout = setTimeout(later, remaining);\n        }\n        return result;\n      };\n    },\n     // Borrowed from Backbone.js's extend\n     // Helper function to correctly set up the prototype chain, for subclasses.\n     // Similar to `goog.inherits`, but uses a hash of prototype properties and\n     // class properties to be extended.\n    inherit: function(protoProps, staticProps) {\n      var parent = this;\n      var child;\n\n      // The constructor function for the new subclass is either defined by you\n      // (the \"constructor\" property in your `extend` definition), or defaulted\n      // by us to simply call the parent's constructor.\n      if (protoProps && protoProps.hasOwnProperty('constructor')) {\n        child = protoProps.constructor;\n      } else {\n        child = function() { return parent.apply(this, arguments); };\n      }\n\n      // Add static properties to the constructor function, if supplied.\n      ionic.extend(child, parent, staticProps);\n\n      // Set the prototype chain to inherit from `parent`, without calling\n      // `parent`'s constructor function.\n      var Surrogate = function() { this.constructor = child; };\n      Surrogate.prototype = parent.prototype;\n      child.prototype = new Surrogate();\n\n      // Add prototype properties (instance properties) to the subclass,\n      // if supplied.\n      if (protoProps) ionic.extend(child.prototype, protoProps);\n\n      // Set a convenience property in case the parent's prototype is needed\n      // later.\n      child.__super__ = parent.prototype;\n\n      return child;\n    },\n\n    // Extend adapted from Underscore.js\n    extend: function(obj) {\n       var args = Array.prototype.slice.call(arguments, 1);\n       for (var i = 0; i < args.length; i++) {\n         var source = args[i];\n         if (source) {\n           for (var prop in source) {\n             obj[prop] = source[prop];\n           }\n         }\n       }\n       return obj;\n    },\n\n    nextUid: function() {\n      return 'ion' + (nextId++);\n    },\n\n    disconnectScope: function disconnectScope(scope) {\n      if (!scope) return;\n\n      if (scope.$root === scope) {\n        return; // we can't disconnect the root node;\n      }\n      var parent = scope.$parent;\n      scope.$$disconnected = true;\n      scope.$broadcast('$ionic.disconnectScope', scope);\n\n      // See Scope.$destroy\n      if (parent.$$childHead === scope) {\n        parent.$$childHead = scope.$$nextSibling;\n      }\n      if (parent.$$childTail === scope) {\n        parent.$$childTail = scope.$$prevSibling;\n      }\n      if (scope.$$prevSibling) {\n        scope.$$prevSibling.$$nextSibling = scope.$$nextSibling;\n      }\n      if (scope.$$nextSibling) {\n        scope.$$nextSibling.$$prevSibling = scope.$$prevSibling;\n      }\n      scope.$$nextSibling = scope.$$prevSibling = null;\n    },\n\n    reconnectScope: function reconnectScope(scope) {\n      if (!scope) return;\n\n      if (scope.$root === scope) {\n        return; // we can't disconnect the root node;\n      }\n      if (!scope.$$disconnected) {\n        return;\n      }\n      var parent = scope.$parent;\n      scope.$$disconnected = false;\n      scope.$broadcast('$ionic.reconnectScope', scope);\n      // See Scope.$new for this logic...\n      scope.$$prevSibling = parent.$$childTail;\n      if (parent.$$childHead) {\n        parent.$$childTail.$$nextSibling = scope;\n        parent.$$childTail = scope;\n      } else {\n        parent.$$childHead = parent.$$childTail = scope;\n      }\n    },\n\n    isScopeDisconnected: function(scope) {\n      var climbScope = scope;\n      while (climbScope) {\n        if (climbScope.$$disconnected) return true;\n        climbScope = climbScope.$parent;\n      }\n      return false;\n    }\n  };\n\n  // Bind a few of the most useful functions to the ionic scope\n  ionic.inherit = ionic.Utils.inherit;\n  ionic.extend = ionic.Utils.extend;\n  ionic.throttle = ionic.Utils.throttle;\n  ionic.proxy = ionic.Utils.proxy;\n  ionic.debounce = ionic.Utils.debounce;\n\n})(window.ionic);\n\n/**\n * @ngdoc page\n * @name keyboard\n * @module ionic\n * @description\n * On both Android and iOS, Ionic will attempt to prevent the keyboard from\n * obscuring inputs and focusable elements when it appears by scrolling them\n * into view.  In order for this to work, any focusable elements must be within\n * a [Scroll View](http://ionicframework.com/docs/api/directive/ionScroll/)\n * or a directive such as [Content](http://ionicframework.com/docs/api/directive/ionContent/)\n * that has a Scroll View.\n *\n * It will also attempt to prevent the native overflow scrolling on focus,\n * which can cause layout issues such as pushing headers up and out of view.\n *\n * The keyboard fixes work best in conjunction with the\n * [Ionic Keyboard Plugin](https://github.com/ionic-team/ionic-plugins-keyboard),\n * although it will perform reasonably well without.  However, if you are using\n * Cordova there is no reason not to use the plugin.\n *\n * ### Hide when keyboard shows\n *\n * To hide an element when the keyboard is open, add the class `hide-on-keyboard-open`.\n *\n * ```html\n * <div class=\"hide-on-keyboard-open\">\n *   <div id=\"google-map\"></div>\n * </div>\n * ```\n *\n * Note: For performance reasons, elements will not be hidden for 400ms after the start of the `native.keyboardshow` event\n * from the Ionic Keyboard plugin. If you would like them to disappear immediately, you could do something\n * like:\n *\n * ```js\n *   window.addEventListener('native.keyboardshow', function(){\n *     document.body.classList.add('keyboard-open');\n *   });\n * ```\n * This adds the same `keyboard-open` class that is normally added by Ionic 400ms after the keyboard\n * opens. However, bear in mind that adding this class to the body immediately may cause jank in any\n * animations on Android that occur when the keyboard opens (for example, scrolling any obscured inputs into view).\n *\n * ----------\n *\n * ### Plugin Usage\n * Information on using the plugin can be found at\n * [https://github.com/ionic-team/ionic-plugins-keyboard](https://github.com/ionic-team/ionic-plugins-keyboard).\n *\n * ----------\n *\n * ### Android Notes\n * - If your app is running in fullscreen, i.e. you have\n *   `<preference name=\"Fullscreen\" value=\"true\" />` in your `config.xml` file\n *   you will need to set `ionic.Platform.isFullScreen = true` manually.\n *\n * - You can configure the behavior of the web view when the keyboard shows by setting\n *   [android:windowSoftInputMode](http://developer.android.com/reference/android/R.attr.html#windowSoftInputMode)\n *   to either `adjustPan`, `adjustResize` or `adjustNothing` in your app's\n *   activity in `AndroidManifest.xml`. `adjustResize` is the recommended setting\n *   for Ionic, but if for some reason you do use `adjustPan` you will need to\n *   set `ionic.Platform.isFullScreen = true`.\n *\n *   ```xml\n *   <activity android:windowSoftInputMode=\"adjustResize\">\n *\n *   ```\n *\n * ### iOS Notes\n * - If the content of your app (including the header) is being pushed up and\n *   out of view on input focus, try setting `cordova.plugins.Keyboard.disableScroll(true)`.\n *   This does **not** disable scrolling in the Ionic scroll view, rather it\n *   disables the native overflow scrolling that happens automatically as a\n *   result of focusing on inputs below the keyboard.\n *\n */\n\n/**\n * The current viewport height.\n */\nvar keyboardCurrentViewportHeight = 0;\n\n/**\n * The viewport height when in portrait orientation.\n */\nvar keyboardPortraitViewportHeight = 0;\n\n/**\n * The viewport height when in landscape orientation.\n */\nvar keyboardLandscapeViewportHeight = 0;\n\n/**\n * The currently focused input.\n */\nvar keyboardActiveElement;\n\n/**\n * The previously focused input used to reset keyboard after focusing on a\n * new non-keyboard element\n */\nvar lastKeyboardActiveElement;\n\n/**\n * The scroll view containing the currently focused input.\n */\nvar scrollView;\n\n/**\n * Timer for the setInterval that polls window.innerHeight to determine whether\n * the layout has updated for the keyboard showing/hiding.\n */\nvar waitForResizeTimer;\n\n/**\n * Sometimes when switching inputs or orientations, focusout will fire before\n * focusin, so this timer is for the small setTimeout to determine if we should\n * really focusout/hide the keyboard.\n */\nvar keyboardFocusOutTimer;\n\n/**\n * on Android, orientationchange will fire before the keyboard plugin notifies\n * the browser that the keyboard will show/is showing, so this flag indicates\n * to nativeShow that there was an orientationChange and we should update\n * the viewport height with an accurate keyboard height value\n */\nvar wasOrientationChange = false;\n\n/**\n * CSS class added to the body indicating the keyboard is open.\n */\nvar KEYBOARD_OPEN_CSS = 'keyboard-open';\n\n/**\n * CSS class that indicates a scroll container.\n */\nvar SCROLL_CONTAINER_CSS = 'scroll-content';\n\n/**\n * Debounced keyboardFocusIn function\n */\nvar debouncedKeyboardFocusIn = ionic.debounce(keyboardFocusIn, 200, true);\n\n/**\n * Debounced keyboardNativeShow function\n */\nvar debouncedKeyboardNativeShow = ionic.debounce(keyboardNativeShow, 100, true);\n\n/**\n * Ionic keyboard namespace.\n * @namespace keyboard\n */\nionic.keyboard = {\n\n  /**\n   * Whether the keyboard is open or not.\n   */\n  isOpen: false,\n\n  /**\n   * Whether the keyboard is closing or not.\n   */\n  isClosing: false,\n\n  /**\n   * Whether the keyboard is opening or not.\n   */\n  isOpening: false,\n\n  /**\n   * The height of the keyboard in pixels, as reported by the keyboard plugin.\n   * If the plugin is not available, calculated as the difference in\n   * window.innerHeight after the keyboard has shown.\n   */\n  height: 0,\n\n  /**\n   * Whether the device is in landscape orientation or not.\n   */\n  isLandscape: false,\n\n  /**\n   * Whether the keyboard event listeners have been added or not\n   */\n  isInitialized: false,\n\n  /**\n   * Hide the keyboard, if it is open.\n   */\n  hide: function() {\n    if (keyboardHasPlugin()) {\n      cordova.plugins.Keyboard.close();\n    }\n    keyboardActiveElement && keyboardActiveElement.blur();\n  },\n\n  /**\n   * An alias for cordova.plugins.Keyboard.show(). If the keyboard plugin\n   * is installed, show the keyboard.\n   */\n  show: function() {\n    if (keyboardHasPlugin()) {\n      cordova.plugins.Keyboard.show();\n    }\n  },\n\n  /**\n   * Remove all keyboard related event listeners, effectively disabling Ionic's\n   * keyboard adjustments.\n   */\n  disable: function() {\n    if (keyboardHasPlugin()) {\n      window.removeEventListener('native.keyboardshow', debouncedKeyboardNativeShow );\n      window.removeEventListener('native.keyboardhide', keyboardFocusOut);\n    } else {\n      document.body.removeEventListener('focusout', keyboardFocusOut);\n    }\n\n    document.body.removeEventListener('ionic.focusin', debouncedKeyboardFocusIn);\n    document.body.removeEventListener('focusin', debouncedKeyboardFocusIn);\n\n    window.removeEventListener('orientationchange', keyboardOrientationChange);\n\n    if ( window.navigator.msPointerEnabled ) {\n      document.removeEventListener(\"MSPointerDown\", keyboardInit);\n    } else {\n      document.removeEventListener('touchstart', keyboardInit);\n    }\n    ionic.keyboard.isInitialized = false;\n  },\n\n  /**\n   * Alias for keyboardInit, initialize all keyboard related event listeners.\n   */\n  enable: function() {\n    keyboardInit();\n  }\n};\n\n// Initialize the viewport height (after ionic.keyboard.height has been\n// defined).\nkeyboardCurrentViewportHeight = getViewportHeight();\n\n\n                             /* Event handlers */\n/* ------------------------------------------------------------------------- */\n\n/**\n * Event handler for first touch event, initializes all event listeners\n * for keyboard related events. Also aliased by ionic.keyboard.enable.\n */\nfunction keyboardInit() {\n\n  if (ionic.keyboard.isInitialized) return;\n\n  if (keyboardHasPlugin()) {\n    window.addEventListener('native.keyboardshow', debouncedKeyboardNativeShow);\n    window.addEventListener('native.keyboardhide', keyboardFocusOut);\n  } else {\n    document.body.addEventListener('focusout', keyboardFocusOut);\n  }\n\n  document.body.addEventListener('ionic.focusin', debouncedKeyboardFocusIn);\n  document.body.addEventListener('focusin', debouncedKeyboardFocusIn);\n\n  if (window.navigator.msPointerEnabled) {\n    document.removeEventListener(\"MSPointerDown\", keyboardInit);\n  } else {\n    document.removeEventListener('touchstart', keyboardInit);\n  }\n\n  ionic.keyboard.isInitialized = true;\n}\n\n/**\n * Event handler for 'native.keyboardshow' event, sets keyboard.height to the\n * reported height and keyboard.isOpening to true. Then calls\n * keyboardWaitForResize with keyboardShow or keyboardUpdateViewportHeight as\n * the callback depending on whether the event was triggered by a focusin or\n * an orientationchange.\n */\nfunction keyboardNativeShow(e) {\n  clearTimeout(keyboardFocusOutTimer);\n  //console.log(\"keyboardNativeShow fired at: \" + Date.now());\n  //console.log(\"keyboardNativeshow window.innerHeight: \" + window.innerHeight);\n\n  if (!ionic.keyboard.isOpen || ionic.keyboard.isClosing) {\n    ionic.keyboard.isOpening = true;\n    ionic.keyboard.isClosing = false;\n  }\n\n  ionic.keyboard.height = e.keyboardHeight;\n  //console.log('nativeshow keyboard height:' + e.keyboardHeight);\n\n  if (wasOrientationChange) {\n    keyboardWaitForResize(keyboardUpdateViewportHeight, true);\n  } else {\n    keyboardWaitForResize(keyboardShow, true);\n  }\n}\n\n/**\n * Event handler for 'focusin' and 'ionic.focusin' events. Initializes\n * keyboard state (keyboardActiveElement and keyboard.isOpening) for the\n * appropriate adjustments once the window has resized.  If not using the\n * keyboard plugin, calls keyboardWaitForResize with keyboardShow as the\n * callback or keyboardShow right away if the keyboard is already open.  If\n * using the keyboard plugin does nothing and lets keyboardNativeShow handle\n * adjustments with a more accurate keyboard height.\n */\nfunction keyboardFocusIn(e) {\n  clearTimeout(keyboardFocusOutTimer);\n  //console.log(\"keyboardFocusIn from: \" + e.type + \" at: \" + Date.now());\n\n  if (!e.target ||\n      e.target.readOnly ||\n      !ionic.tap.isKeyboardElement(e.target) ||\n      !(scrollView = ionic.DomUtil.getParentWithClass(e.target, SCROLL_CONTAINER_CSS))) {\n    if (keyboardActiveElement) {\n        lastKeyboardActiveElement = keyboardActiveElement;\n    }\n    keyboardActiveElement = null;\n    return;\n  }\n\n  keyboardActiveElement = e.target;\n\n  // if using JS scrolling, undo the effects of native overflow scroll so the\n  // scroll view is positioned correctly\n  if (!scrollView.classList.contains(\"overflow-scroll\")) {\n    document.body.scrollTop = 0;\n    scrollView.scrollTop = 0;\n    ionic.requestAnimationFrame(function(){\n      document.body.scrollTop = 0;\n      scrollView.scrollTop = 0;\n    });\n\n    // any showing part of the document that isn't within the scroll the user\n    // could touchmove and cause some ugly changes to the app, so disable\n    // any touchmove events while the keyboard is open using e.preventDefault()\n    if (window.navigator.msPointerEnabled) {\n      document.addEventListener(\"MSPointerMove\", keyboardPreventDefault, false);\n    } else {\n      document.addEventListener('touchmove', keyboardPreventDefault, false);\n    }\n  }\n\n  if (!ionic.keyboard.isOpen || ionic.keyboard.isClosing) {\n    ionic.keyboard.isOpening = true;\n    ionic.keyboard.isClosing = false;\n  }\n\n  // attempt to prevent browser from natively scrolling input into view while\n  // we are trying to do the same (while we are scrolling) if the user taps the\n  // keyboard\n  document.addEventListener('keydown', keyboardOnKeyDown, false);\n\n\n\n  // if we aren't using the plugin and the keyboard isn't open yet, wait for the\n  // window to resize so we can get an accurate estimate of the keyboard size,\n  // otherwise we do nothing and let nativeShow call keyboardShow once we have\n  // an exact keyboard height\n  // if the keyboard is already open, go ahead and scroll the input into view\n  // if necessary\n  if (!ionic.keyboard.isOpen && !keyboardHasPlugin()) {\n    keyboardWaitForResize(keyboardShow, true);\n\n  } else if (ionic.keyboard.isOpen) {\n    keyboardShow();\n  }\n}\n\n/**\n * Event handler for 'focusout' events. Sets keyboard.isClosing to true and\n * calls keyboardWaitForResize with keyboardHide as the callback after a small\n * timeout.\n */\nfunction keyboardFocusOut() {\n  clearTimeout(keyboardFocusOutTimer);\n  //console.log(\"keyboardFocusOut fired at: \" + Date.now());\n  //console.log(\"keyboardFocusOut event type: \" + e.type);\n\n  if (ionic.keyboard.isOpen || ionic.keyboard.isOpening) {\n    ionic.keyboard.isClosing = true;\n    ionic.keyboard.isOpening = false;\n  }\n\n  // Call keyboardHide with a slight delay because sometimes on focus or\n  // orientation change focusin is called immediately after, so we give it time\n  // to cancel keyboardHide\n  keyboardFocusOutTimer = setTimeout(function() {\n    ionic.requestAnimationFrame(function() {\n      // focusOut during or right after an orientationchange, so we didn't get\n      // a chance to update the viewport height yet, do it and keyboardHide\n      //console.log(\"focusOut, wasOrientationChange: \" + wasOrientationChange);\n      if (wasOrientationChange) {\n        keyboardWaitForResize(function(){\n          keyboardUpdateViewportHeight();\n          keyboardHide();\n        }, false);\n      } else {\n        keyboardWaitForResize(keyboardHide, false);\n      }\n    });\n  }, 50);\n}\n\n/**\n * Event handler for 'orientationchange' events. If using the keyboard plugin\n * and the keyboard is open on Android, sets wasOrientationChange to true so\n * nativeShow can update the viewport height with an accurate keyboard height.\n * If the keyboard isn't open or keyboard plugin isn't being used,\n * waits for the window to resize before updating the viewport height.\n *\n * On iOS, where orientationchange fires after the keyboard has already shown,\n * updates the viewport immediately, regardless of if the keyboard is already\n * open.\n */\nfunction keyboardOrientationChange() {\n  //console.log(\"orientationchange fired at: \" + Date.now());\n  //console.log(\"orientation was: \" + (ionic.keyboard.isLandscape ? \"landscape\" : \"portrait\"));\n\n  // toggle orientation\n  ionic.keyboard.isLandscape = !ionic.keyboard.isLandscape;\n  // //console.log(\"now orientation is: \" + (ionic.keyboard.isLandscape ? \"landscape\" : \"portrait\"));\n\n  // no need to wait for resizing on iOS, and orientationchange always fires\n  // after the keyboard has opened, so it doesn't matter if it's open or not\n  if (ionic.Platform.isIOS()) {\n    keyboardUpdateViewportHeight();\n  }\n\n  // On Android, if the keyboard isn't open or we aren't using the keyboard\n  // plugin, update the viewport height once everything has resized. If the\n  // keyboard is open and we are using the keyboard plugin do nothing and let\n  // nativeShow handle it using an accurate keyboard height.\n  if ( ionic.Platform.isAndroid()) {\n    if (!ionic.keyboard.isOpen || !keyboardHasPlugin()) {\n      keyboardWaitForResize(keyboardUpdateViewportHeight, false);\n    } else {\n      wasOrientationChange = true;\n    }\n  }\n}\n\n/**\n * Event handler for 'keydown' event. Tries to prevent browser from natively\n * scrolling an input into view when a user taps the keyboard while we are\n * scrolling the input into view ourselves with JS.\n */\nfunction keyboardOnKeyDown(e) {\n  if (ionic.scroll.isScrolling) {\n    keyboardPreventDefault(e);\n  }\n}\n\n/**\n * Event for 'touchmove' or 'MSPointerMove'. Prevents native scrolling on\n * elements outside the scroll view while the keyboard is open.\n */\nfunction keyboardPreventDefault(e) {\n  if (e.target.tagName !== 'TEXTAREA') {\n    e.preventDefault();\n  }\n}\n\n                              /* Private API */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Polls window.innerHeight until it has updated to an expected value (or\n * sufficient time has passed) before calling the specified callback function.\n * Only necessary for non-fullscreen Android which sometimes reports multiple\n * window.innerHeight values during interim layouts while it is resizing.\n *\n * On iOS, the window.innerHeight will already be updated, but we use the 50ms\n * delay as essentially a timeout so that scroll view adjustments happen after\n * the keyboard has shown so there isn't a white flash from us resizing too\n * quickly.\n *\n * @param {Function} callback the function to call once the window has resized\n * @param {boolean} isOpening whether the resize is from the keyboard opening\n * or not\n */\nfunction keyboardWaitForResize(callback, isOpening) {\n  clearInterval(waitForResizeTimer);\n  var count = 0;\n  var maxCount;\n  var initialHeight = getViewportHeight();\n  var viewportHeight = initialHeight;\n\n  //console.log(\"waitForResize initial viewport height: \" + viewportHeight);\n  //var start = Date.now();\n  //console.log(\"start: \" + start);\n\n  // want to fail relatively quickly on modern android devices, since it's much\n  // more likely we just have a bad keyboard height\n  if (ionic.Platform.isAndroid() && ionic.Platform.version() < 4.4) {\n    maxCount = 30;\n  } else if (ionic.Platform.isAndroid()) {\n    maxCount = 10;\n  } else {\n    maxCount = 1;\n  }\n\n  // poll timer\n  waitForResizeTimer = setInterval(function(){\n    viewportHeight = getViewportHeight();\n\n    // height hasn't updated yet, try again in 50ms\n    // if not using plugin, wait for maxCount to ensure we have waited long enough\n    // to get an accurate keyboard height\n    if (++count < maxCount &&\n        ((!isPortraitViewportHeight(viewportHeight) &&\n         !isLandscapeViewportHeight(viewportHeight)) ||\n         !ionic.keyboard.height)) {\n      return;\n    }\n\n    // infer the keyboard height from the resize if not using the keyboard plugin\n    if (!keyboardHasPlugin()) {\n      ionic.keyboard.height = Math.abs(initialHeight - window.innerHeight);\n    }\n\n    // set to true if we were waiting for the keyboard to open\n    ionic.keyboard.isOpen = isOpening;\n\n    clearInterval(waitForResizeTimer);\n    //var end = Date.now();\n    //console.log(\"waitForResize count: \" + count);\n    //console.log(\"end: \" + end);\n    //console.log(\"difference: \" + ( end - start ) + \"ms\");\n\n    //console.log(\"callback: \" + callback.name);\n    callback();\n\n  }, 50);\n\n  return maxCount; //for tests\n}\n\n/**\n * On keyboard close sets keyboard state to closed, resets the scroll view,\n * removes CSS from body indicating keyboard was open, removes any event\n * listeners for when the keyboard is open and on Android blurs the active\n * element (which in some cases will still have focus even if the keyboard\n * is closed and can cause it to reappear on subsequent taps).\n */\nfunction keyboardHide() {\n  clearTimeout(keyboardFocusOutTimer);\n  //console.log(\"keyboardHide\");\n\n  ionic.keyboard.isOpen = false;\n  ionic.keyboard.isClosing = false;\n\n  if (keyboardActiveElement || lastKeyboardActiveElement) {\n    ionic.trigger('resetScrollView', {\n      target: keyboardActiveElement || lastKeyboardActiveElement\n    }, true);\n  }\n\n  ionic.requestAnimationFrame(function(){\n    document.body.classList.remove(KEYBOARD_OPEN_CSS);\n  });\n\n  // the keyboard is gone now, remove the touchmove that disables native scroll\n  if (window.navigator.msPointerEnabled) {\n    document.removeEventListener(\"MSPointerMove\", keyboardPreventDefault);\n  } else {\n    document.removeEventListener('touchmove', keyboardPreventDefault);\n  }\n  document.removeEventListener('keydown', keyboardOnKeyDown);\n\n  if (ionic.Platform.isAndroid()) {\n    // on android closing the keyboard with the back/dismiss button won't remove\n    // focus and keyboard can re-appear on subsequent taps (like scrolling)\n    if (keyboardHasPlugin()) cordova.plugins.Keyboard.close();\n    keyboardActiveElement && keyboardActiveElement.blur();\n  }\n\n  keyboardActiveElement = null;\n  lastKeyboardActiveElement = null;\n}\n\n/**\n * On keyboard open sets keyboard state to open, adds CSS to the body\n * indicating the keyboard is open and tells the scroll view to resize and\n * the currently focused input into view if necessary.\n */\nfunction keyboardShow() {\n\n  ionic.keyboard.isOpen = true;\n  ionic.keyboard.isOpening = false;\n\n  var details = {\n    keyboardHeight: keyboardGetHeight(),\n    viewportHeight: keyboardCurrentViewportHeight\n  };\n\n  if (keyboardActiveElement) {\n    details.target = keyboardActiveElement;\n\n    var elementBounds = keyboardActiveElement.getBoundingClientRect();\n\n    details.elementTop = Math.round(elementBounds.top);\n    details.elementBottom = Math.round(elementBounds.bottom);\n\n    details.windowHeight = details.viewportHeight - details.keyboardHeight;\n    //console.log(\"keyboardShow viewportHeight: \" + details.viewportHeight +\n    //\", windowHeight: \" + details.windowHeight +\n    //\", keyboardHeight: \" + details.keyboardHeight);\n\n    // figure out if the element is under the keyboard\n    details.isElementUnderKeyboard = (details.elementBottom > details.windowHeight);\n    //console.log(\"isUnderKeyboard: \" + details.isElementUnderKeyboard);\n    //console.log(\"elementBottom: \" + details.elementBottom);\n\n    // send event so the scroll view adjusts\n    ionic.trigger('scrollChildIntoView', details, true);\n  }\n\n  setTimeout(function(){\n    document.body.classList.add(KEYBOARD_OPEN_CSS);\n  }, 400);\n\n  return details; //for testing\n}\n\n/* eslint no-unused-vars:0 */\nfunction keyboardGetHeight() {\n  // check if we already have a keyboard height from the plugin or resize calculations\n  if (ionic.keyboard.height) {\n    return ionic.keyboard.height;\n  }\n\n  if (ionic.Platform.isAndroid()) {\n    // should be using the plugin, no way to know how big the keyboard is, so guess\n    if ( ionic.Platform.isFullScreen ) {\n      return 275;\n    }\n    // otherwise just calculate it\n    var contentHeight = window.innerHeight;\n    if (contentHeight < keyboardCurrentViewportHeight) {\n      return keyboardCurrentViewportHeight - contentHeight;\n    } else {\n      return 0;\n    }\n  }\n\n  // fallback for when it's the webview without the plugin\n  // or for just the standard web browser\n  // TODO: have these be based on device\n  if (ionic.Platform.isIOS()) {\n    if (ionic.keyboard.isLandscape) {\n      return 206;\n    }\n\n    if (!ionic.Platform.isWebView()) {\n      return 216;\n    }\n\n    return 260;\n  }\n\n  // safe guess\n  return 275;\n}\n\nfunction isPortraitViewportHeight(viewportHeight) {\n  return !!(!ionic.keyboard.isLandscape &&\n         keyboardPortraitViewportHeight &&\n         (Math.abs(keyboardPortraitViewportHeight - viewportHeight) < 2));\n}\n\nfunction isLandscapeViewportHeight(viewportHeight) {\n  return !!(ionic.keyboard.isLandscape &&\n         keyboardLandscapeViewportHeight &&\n         (Math.abs(keyboardLandscapeViewportHeight - viewportHeight) < 2));\n}\n\nfunction keyboardUpdateViewportHeight() {\n  wasOrientationChange = false;\n  keyboardCurrentViewportHeight = getViewportHeight();\n\n  if (ionic.keyboard.isLandscape && !keyboardLandscapeViewportHeight) {\n    //console.log(\"saved landscape: \" + keyboardCurrentViewportHeight);\n    keyboardLandscapeViewportHeight = keyboardCurrentViewportHeight;\n\n  } else if (!ionic.keyboard.isLandscape && !keyboardPortraitViewportHeight) {\n    //console.log(\"saved portrait: \" + keyboardCurrentViewportHeight);\n    keyboardPortraitViewportHeight = keyboardCurrentViewportHeight;\n  }\n\n  if (keyboardActiveElement) {\n    ionic.trigger('resetScrollView', {\n      target: keyboardActiveElement\n    }, true);\n  }\n\n  if (ionic.keyboard.isOpen && ionic.tap.isTextInput(keyboardActiveElement)) {\n    keyboardShow();\n  }\n}\n\nfunction keyboardInitViewportHeight() {\n  var viewportHeight = getViewportHeight();\n  //console.log(\"Keyboard init VP: \" + viewportHeight + \" \" + window.innerWidth);\n  // can't just use window.innerHeight in case the keyboard is opened immediately\n  if ((viewportHeight / window.innerWidth) < 1) {\n    ionic.keyboard.isLandscape = true;\n  }\n  //console.log(\"ionic.keyboard.isLandscape is: \" + ionic.keyboard.isLandscape);\n\n  // initialize or update the current viewport height values\n  keyboardCurrentViewportHeight = viewportHeight;\n  if (ionic.keyboard.isLandscape && !keyboardLandscapeViewportHeight) {\n    keyboardLandscapeViewportHeight = keyboardCurrentViewportHeight;\n  } else if (!ionic.keyboard.isLandscape && !keyboardPortraitViewportHeight) {\n    keyboardPortraitViewportHeight = keyboardCurrentViewportHeight;\n  }\n}\n\nfunction getViewportHeight() {\n  var windowHeight = window.innerHeight;\n  //console.log('window.innerHeight is: ' + windowHeight);\n  //console.log('kb height is: ' + ionic.keyboard.height);\n  //console.log('kb isOpen: ' + ionic.keyboard.isOpen);\n\n  //TODO: add iPad undocked/split kb once kb plugin supports it\n  // the keyboard overlays the window on Android fullscreen\n  if (!(ionic.Platform.isAndroid() && ionic.Platform.isFullScreen) &&\n      (ionic.keyboard.isOpen || ionic.keyboard.isOpening) &&\n      !ionic.keyboard.isClosing) {\n\n     return windowHeight + keyboardGetHeight();\n  }\n  return windowHeight;\n}\n\nfunction keyboardHasPlugin() {\n  return !!(window.cordova && cordova.plugins && cordova.plugins.Keyboard);\n}\n\nionic.Platform.ready(function() {\n  keyboardInitViewportHeight();\n\n  window.addEventListener('orientationchange', keyboardOrientationChange);\n\n  // if orientation changes while app is in background, update on resuming\n  /*\n  if ( ionic.Platform.isWebView() ) {\n    document.addEventListener('resume', keyboardInitViewportHeight);\n\n    if (ionic.Platform.isAndroid()) {\n      //TODO: onbackpressed to detect keyboard close without focusout or plugin\n    }\n  }\n  */\n\n  // if orientation changes while app is in background, update on resuming\n/*  if ( ionic.Platform.isWebView() ) {\n    document.addEventListener('pause', function() {\n      window.removeEventListener('orientationchange', keyboardOrientationChange);\n    })\n    document.addEventListener('resume', function() {\n      keyboardInitViewportHeight();\n      window.addEventListener('orientationchange', keyboardOrientationChange)\n    });\n  }*/\n\n  // Android sometimes reports bad innerHeight on window.load\n  // try it again in a lil bit to play it safe\n  setTimeout(keyboardInitViewportHeight, 999);\n\n  // only initialize the adjustments for the virtual keyboard\n  // if a touchstart event happens\n  if (window.navigator.msPointerEnabled) {\n    document.addEventListener(\"MSPointerDown\", keyboardInit, false);\n  } else {\n    document.addEventListener('touchstart', keyboardInit, false);\n  }\n});\n\n\n\nvar viewportTag;\nvar viewportProperties = {};\n\nionic.viewport = {\n  orientation: function() {\n    // 0 = Portrait\n    // 90 = Landscape\n    // not using window.orientation because each device has a different implementation\n    return (window.innerWidth > window.innerHeight ? 90 : 0);\n  }\n};\n\nfunction viewportLoadTag() {\n  var x;\n\n  for (x = 0; x < document.head.children.length; x++) {\n    if (document.head.children[x].name == 'viewport') {\n      viewportTag = document.head.children[x];\n      break;\n    }\n  }\n\n  if (viewportTag) {\n    var props = viewportTag.content.toLowerCase().replace(/\\s+/g, '').split(',');\n    var keyValue;\n    for (x = 0; x < props.length; x++) {\n      if (props[x]) {\n        keyValue = props[x].split('=');\n        viewportProperties[ keyValue[0] ] = (keyValue.length > 1 ? keyValue[1] : '_');\n      }\n    }\n    viewportUpdate();\n  }\n}\n\nfunction viewportUpdate() {\n  // unit tests in viewport.unit.js\n\n  var initWidth = viewportProperties.width;\n  var initHeight = viewportProperties.height;\n  var p = ionic.Platform;\n  var version = p.version();\n  var DEVICE_WIDTH = 'device-width';\n  var DEVICE_HEIGHT = 'device-height';\n  var orientation = ionic.viewport.orientation();\n\n  // Most times we're removing the height and adding the width\n  // So this is the default to start with, then modify per platform/version/oreintation\n  delete viewportProperties.height;\n  viewportProperties.width = DEVICE_WIDTH;\n\n  if (p.isIPad()) {\n    // iPad\n\n    if (version > 7) {\n      // iPad >= 7.1\n      // https://issues.apache.org/jira/browse/CB-4323\n      delete viewportProperties.width;\n\n    } else {\n      // iPad <= 7.0\n\n      if (p.isWebView()) {\n        // iPad <= 7.0 WebView\n\n        if (orientation == 90) {\n          // iPad <= 7.0 WebView Landscape\n          viewportProperties.height = '0';\n\n        } else if (version == 7) {\n          // iPad <= 7.0 WebView Portait\n          viewportProperties.height = DEVICE_HEIGHT;\n        }\n      } else {\n        // iPad <= 6.1 Browser\n        if (version < 7) {\n          viewportProperties.height = '0';\n        }\n      }\n    }\n\n  } else if (p.isIOS()) {\n    // iPhone\n\n    if (p.isWebView()) {\n      // iPhone WebView\n\n      if (version > 7) {\n        // iPhone >= 7.1 WebView\n        delete viewportProperties.width;\n\n      } else if (version < 7) {\n        // iPhone <= 6.1 WebView\n        // if height was set it needs to get removed with this hack for <= 6.1\n        if (initHeight) viewportProperties.height = '0';\n\n      } else if (version == 7) {\n        //iPhone == 7.0 WebView\n        viewportProperties.height = DEVICE_HEIGHT;\n      }\n\n    } else {\n      // iPhone Browser\n\n      if (version < 7) {\n        // iPhone <= 6.1 Browser\n        // if height was set it needs to get removed with this hack for <= 6.1\n        if (initHeight) viewportProperties.height = '0';\n      }\n    }\n\n  }\n\n  // only update the viewport tag if there was a change\n  if (initWidth !== viewportProperties.width || initHeight !== viewportProperties.height) {\n    viewportTagUpdate();\n  }\n}\n\nfunction viewportTagUpdate() {\n  var key, props = [];\n  for (key in viewportProperties) {\n    if (viewportProperties[key]) {\n      props.push(key + (viewportProperties[key] == '_' ? '' : '=' + viewportProperties[key]));\n    }\n  }\n\n  viewportTag.content = props.join(', ');\n}\n\nionic.Platform.ready(function() {\n  viewportLoadTag();\n\n  window.addEventListener(\"orientationchange\", function() {\n    setTimeout(viewportUpdate, 1000);\n  }, false);\n});\n\n(function(ionic) {\n'use strict';\n  ionic.views.View = function() {\n    this.initialize.apply(this, arguments);\n  };\n\n  ionic.views.View.inherit = ionic.inherit;\n\n  ionic.extend(ionic.views.View.prototype, {\n    initialize: function() {}\n  });\n\n})(window.ionic);\n\n/*\n * Scroller\n * http://github.com/zynga/scroller\n *\n * Copyright 2011, Zynga Inc.\n * Licensed under the MIT License.\n * https://raw.github.com/zynga/scroller/master/MIT-LICENSE.txt\n *\n * Based on the work of: Unify Project (unify-project.org)\n * http://unify-project.org\n * Copyright 2011, Deutsche Telekom AG\n * License: MIT + Apache (V2)\n */\n\n/* jshint eqnull: true */\n\n/**\n * Generic animation class with support for dropped frames both optional easing and duration.\n *\n * Optional duration is useful when the lifetime is defined by another condition than time\n * e.g. speed of an animating object, etc.\n *\n * Dropped frame logic allows to keep using the same updater logic independent from the actual\n * rendering. This eases a lot of cases where it might be pretty complex to break down a state\n * based on the pure time difference.\n */\nvar zyngaCore = { effect: {} };\n(function(global) {\n  var time = Date.now || function() {\n    return +new Date();\n  };\n  var desiredFrames = 60;\n  var millisecondsPerSecond = 1000;\n  var running = {};\n  var counter = 1;\n\n  zyngaCore.effect.Animate = {\n\n    /**\n     * A requestAnimationFrame wrapper / polyfill.\n     *\n     * @param callback {Function} The callback to be invoked before the next repaint.\n     * @param root {HTMLElement} The root element for the repaint\n     */\n    requestAnimationFrame: (function() {\n\n      // Check for request animation Frame support\n      var requestFrame = global.requestAnimationFrame || global.webkitRequestAnimationFrame || global.mozRequestAnimationFrame || global.oRequestAnimationFrame;\n      var isNative = !!requestFrame;\n\n      if (requestFrame && !/requestAnimationFrame\\(\\)\\s*\\{\\s*\\[native code\\]\\s*\\}/i.test(requestFrame.toString())) {\n        isNative = false;\n      }\n\n      if (isNative) {\n        return function(callback, root) {\n          requestFrame(callback, root);\n        };\n      }\n\n      var TARGET_FPS = 60;\n      var requests = {};\n      var requestCount = 0;\n      var rafHandle = 1;\n      var intervalHandle = null;\n      var lastActive = +new Date();\n\n      return function(callback) {\n        var callbackHandle = rafHandle++;\n\n        // Store callback\n        requests[callbackHandle] = callback;\n        requestCount++;\n\n        // Create timeout at first request\n        if (intervalHandle === null) {\n\n          intervalHandle = setInterval(function() {\n\n            var time = +new Date();\n            var currentRequests = requests;\n\n            // Reset data structure before executing callbacks\n            requests = {};\n            requestCount = 0;\n\n            for(var key in currentRequests) {\n              if (currentRequests.hasOwnProperty(key)) {\n                currentRequests[key](time);\n                lastActive = time;\n              }\n            }\n\n            // Disable the timeout when nothing happens for a certain\n            // period of time\n            if (time - lastActive > 2500) {\n              clearInterval(intervalHandle);\n              intervalHandle = null;\n            }\n\n          }, 1000 / TARGET_FPS);\n        }\n\n        return callbackHandle;\n      };\n\n    })(),\n\n\n    /**\n     * Stops the given animation.\n     *\n     * @param id {Integer} Unique animation ID\n     * @return {Boolean} Whether the animation was stopped (aka, was running before)\n     */\n    stop: function(id) {\n      var cleared = running[id] != null;\n      if (cleared) {\n        running[id] = null;\n      }\n\n      return cleared;\n    },\n\n\n    /**\n     * Whether the given animation is still running.\n     *\n     * @param id {Integer} Unique animation ID\n     * @return {Boolean} Whether the animation is still running\n     */\n    isRunning: function(id) {\n      return running[id] != null;\n    },\n\n\n    /**\n     * Start the animation.\n     *\n     * @param stepCallback {Function} Pointer to function which is executed on every step.\n     *   Signature of the method should be `function(percent, now, virtual) { return continueWithAnimation; }`\n     * @param verifyCallback {Function} Executed before every animation step.\n     *   Signature of the method should be `function() { return continueWithAnimation; }`\n     * @param completedCallback {Function}\n     *   Signature of the method should be `function(droppedFrames, finishedAnimation) {}`\n     * @param duration {Integer} Milliseconds to run the animation\n     * @param easingMethod {Function} Pointer to easing function\n     *   Signature of the method should be `function(percent) { return modifiedValue; }`\n     * @param root {Element} Render root, when available. Used for internal\n     *   usage of requestAnimationFrame.\n     * @return {Integer} Identifier of animation. Can be used to stop it any time.\n     */\n    start: function(stepCallback, verifyCallback, completedCallback, duration, easingMethod, root) {\n\n      var start = time();\n      var lastFrame = start;\n      var percent = 0;\n      var dropCounter = 0;\n      var id = counter++;\n\n      if (!root) {\n        root = document.body;\n      }\n\n      // Compacting running db automatically every few new animations\n      if (id % 20 === 0) {\n        var newRunning = {};\n        for (var usedId in running) {\n          newRunning[usedId] = true;\n        }\n        running = newRunning;\n      }\n\n      // This is the internal step method which is called every few milliseconds\n      var step = function(virtual) {\n\n        // Normalize virtual value\n        var render = virtual !== true;\n\n        // Get current time\n        var now = time();\n\n        // Verification is executed before next animation step\n        if (!running[id] || (verifyCallback && !verifyCallback(id))) {\n\n          running[id] = null;\n          completedCallback && completedCallback(desiredFrames - (dropCounter / ((now - start) / millisecondsPerSecond)), id, false);\n          return;\n\n        }\n\n        // For the current rendering to apply let's update omitted steps in memory.\n        // This is important to bring internal state variables up-to-date with progress in time.\n        if (render) {\n\n          var droppedFrames = Math.round((now - lastFrame) / (millisecondsPerSecond / desiredFrames)) - 1;\n          for (var j = 0; j < Math.min(droppedFrames, 4); j++) {\n            step(true);\n            dropCounter++;\n          }\n\n        }\n\n        // Compute percent value\n        if (duration) {\n          percent = (now - start) / duration;\n          if (percent > 1) {\n            percent = 1;\n          }\n        }\n\n        // Execute step callback, then...\n        var value = easingMethod ? easingMethod(percent) : percent;\n        if ((stepCallback(value, now, render) === false || percent === 1) && render) {\n          running[id] = null;\n          completedCallback && completedCallback(desiredFrames - (dropCounter / ((now - start) / millisecondsPerSecond)), id, percent === 1 || duration == null);\n        } else if (render) {\n          lastFrame = now;\n          zyngaCore.effect.Animate.requestAnimationFrame(step, root);\n        }\n      };\n\n      // Mark as running\n      running[id] = true;\n\n      // Init first step\n      zyngaCore.effect.Animate.requestAnimationFrame(step, root);\n\n      // Return unique animation ID\n      return id;\n    }\n  };\n})(window);\n\n/*\n * Scroller\n * http://github.com/zynga/scroller\n *\n * Copyright 2011, Zynga Inc.\n * Licensed under the MIT License.\n * https://raw.github.com/zynga/scroller/master/MIT-LICENSE.txt\n *\n * Based on the work of: Unify Project (unify-project.org)\n * http://unify-project.org\n * Copyright 2011, Deutsche Telekom AG\n * License: MIT + Apache (V2)\n */\n\n(function(ionic) {\n  var NOOP = function(){};\n\n  // Easing Equations (c) 2003 Robert Penner, all rights reserved.\n  // Open source under the BSD License.\n\n  /**\n   * @param pos {Number} position between 0 (start of effect) and 1 (end of effect)\n  **/\n  var easeOutCubic = function(pos) {\n    return (Math.pow((pos - 1), 3) + 1);\n  };\n\n  /**\n   * @param pos {Number} position between 0 (start of effect) and 1 (end of effect)\n  **/\n  var easeInOutCubic = function(pos) {\n    if ((pos /= 0.5) < 1) {\n      return 0.5 * Math.pow(pos, 3);\n    }\n\n    return 0.5 * (Math.pow((pos - 2), 3) + 2);\n  };\n\n\n/**\n * ionic.views.Scroll\n * A powerful scroll view with support for bouncing, pull to refresh, and paging.\n * @param   {Object}        options options for the scroll view\n * @class A scroll view system\n * @memberof ionic.views\n */\nionic.views.Scroll = ionic.views.View.inherit({\n  initialize: function(options) {\n    var self = this;\n\n    self.__container = options.el;\n    self.__content = options.el.firstElementChild;\n\n    //Remove any scrollTop attached to these elements; they are virtual scroll now\n    //This also stops on-load-scroll-to-window.location.hash that the browser does\n    setTimeout(function() {\n      if (self.__container && self.__content) {\n        self.__container.scrollTop = 0;\n        self.__content.scrollTop = 0;\n      }\n    });\n\n    self.options = {\n\n      /** Disable scrolling on x-axis by default */\n      scrollingX: false,\n      scrollbarX: true,\n\n      /** Enable scrolling on y-axis */\n      scrollingY: true,\n      scrollbarY: true,\n\n      startX: 0,\n      startY: 0,\n\n      /** The amount to dampen mousewheel events */\n      wheelDampen: 6,\n\n      /** The minimum size the scrollbars scale to while scrolling */\n      minScrollbarSizeX: 5,\n      minScrollbarSizeY: 5,\n\n      /** Scrollbar fading after scrolling */\n      scrollbarsFade: true,\n      scrollbarFadeDelay: 300,\n      /** The initial fade delay when the pane is resized or initialized */\n      scrollbarResizeFadeDelay: 1000,\n\n      /** Enable animations for deceleration, snap back, zooming and scrolling */\n      animating: true,\n\n      /** duration for animations triggered by scrollTo/zoomTo */\n      animationDuration: 250,\n\n      /** The velocity required to make the scroll view \"slide\" after touchend */\n      decelVelocityThreshold: 4,\n\n      /** The velocity required to make the scroll view \"slide\" after touchend when using paging */\n      decelVelocityThresholdPaging: 4,\n\n      /** Enable bouncing (content can be slowly moved outside and jumps back after releasing) */\n      bouncing: true,\n\n      /** Enable locking to the main axis if user moves only slightly on one of them at start */\n      locking: true,\n\n      /** Enable pagination mode (switching between full page content panes) */\n      paging: false,\n\n      /** Enable snapping of content to a configured pixel grid */\n      snapping: false,\n\n      /** Enable zooming of content via API, fingers and mouse wheel */\n      zooming: false,\n\n      /** Minimum zoom level */\n      minZoom: 0.5,\n\n      /** Maximum zoom level */\n      maxZoom: 3,\n\n      /** Multiply or decrease scrolling speed **/\n      speedMultiplier: 1,\n\n      deceleration: 0.97,\n\n      /** Whether to prevent default on a scroll operation to capture drag events **/\n      preventDefault: false,\n\n      /** Callback that is fired on the later of touch end or deceleration end,\n        provided that another scrolling action has not begun. Used to know\n        when to fade out a scrollbar. */\n      scrollingComplete: NOOP,\n\n      /** This configures the amount of change applied to deceleration when reaching boundaries  **/\n      penetrationDeceleration: 0.03,\n\n      /** This configures the amount of change applied to acceleration when reaching boundaries  **/\n      penetrationAcceleration: 0.08,\n\n      // The ms interval for triggering scroll events\n      scrollEventInterval: 10,\n\n      freeze: false,\n\n      getContentWidth: function() {\n        return Math.max(self.__content.scrollWidth, self.__content.offsetWidth);\n      },\n      getContentHeight: function() {\n        return Math.max(self.__content.scrollHeight, self.__content.offsetHeight + (self.__content.offsetTop * 2));\n      }\n    };\n\n    for (var key in options) {\n      self.options[key] = options[key];\n    }\n\n    self.hintResize = ionic.debounce(function() {\n      self.resize();\n    }, 1000, true);\n\n    self.onScroll = function() {\n\n      if (!ionic.scroll.isScrolling) {\n        setTimeout(self.setScrollStart, 50);\n      } else {\n        clearTimeout(self.scrollTimer);\n        self.scrollTimer = setTimeout(self.setScrollStop, 80);\n      }\n\n    };\n\n    self.freeze = function(shouldFreeze) {\n      if (arguments.length) {\n        self.options.freeze = shouldFreeze;\n      }\n      return self.options.freeze;\n    };\n\n    // We can just use the standard freeze pop in our mouth\n    self.freezeShut = self.freeze;\n\n    self.setScrollStart = function() {\n      ionic.scroll.isScrolling = Math.abs(ionic.scroll.lastTop - self.__scrollTop) > 1;\n      clearTimeout(self.scrollTimer);\n      self.scrollTimer = setTimeout(self.setScrollStop, 80);\n    };\n\n    self.setScrollStop = function() {\n      ionic.scroll.isScrolling = false;\n      ionic.scroll.lastTop = self.__scrollTop;\n    };\n\n    self.triggerScrollEvent = ionic.throttle(function() {\n      self.onScroll();\n      ionic.trigger('scroll', {\n        scrollTop: self.__scrollTop,\n        scrollLeft: self.__scrollLeft,\n        target: self.__container\n      });\n    }, self.options.scrollEventInterval);\n\n    self.triggerScrollEndEvent = function() {\n      ionic.trigger('scrollend', {\n        scrollTop: self.__scrollTop,\n        scrollLeft: self.__scrollLeft,\n        target: self.__container\n      });\n    };\n\n    self.__scrollLeft = self.options.startX;\n    self.__scrollTop = self.options.startY;\n\n    // Get the render update function, initialize event handlers,\n    // and calculate the size of the scroll container\n    self.__callback = self.getRenderFn();\n    self.__initEventHandlers();\n    self.__createScrollbars();\n\n  },\n\n  run: function() {\n    this.resize();\n\n    // Fade them out\n    this.__fadeScrollbars('out', this.options.scrollbarResizeFadeDelay);\n  },\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: STATUS\n  ---------------------------------------------------------------------------\n  */\n\n  /** Whether only a single finger is used in touch handling */\n  __isSingleTouch: false,\n\n  /** Whether a touch event sequence is in progress */\n  __isTracking: false,\n\n  /** Whether a deceleration animation went to completion. */\n  __didDecelerationComplete: false,\n\n  /**\n   * Whether a gesture zoom/rotate event is in progress. Activates when\n   * a gesturestart event happens. This has higher priority than dragging.\n   */\n  __isGesturing: false,\n\n  /**\n   * Whether the user has moved by such a distance that we have enabled\n   * dragging mode. Hint: It's only enabled after some pixels of movement to\n   * not interrupt with clicks etc.\n   */\n  __isDragging: false,\n\n  /**\n   * Not touching and dragging anymore, and smoothly animating the\n   * touch sequence using deceleration.\n   */\n  __isDecelerating: false,\n\n  /**\n   * Smoothly animating the currently configured change\n   */\n  __isAnimating: false,\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: DIMENSIONS\n  ---------------------------------------------------------------------------\n  */\n\n  /** Available outer left position (from document perspective) */\n  __clientLeft: 0,\n\n  /** Available outer top position (from document perspective) */\n  __clientTop: 0,\n\n  /** Available outer width */\n  __clientWidth: 0,\n\n  /** Available outer height */\n  __clientHeight: 0,\n\n  /** Outer width of content */\n  __contentWidth: 0,\n\n  /** Outer height of content */\n  __contentHeight: 0,\n\n  /** Snapping width for content */\n  __snapWidth: 100,\n\n  /** Snapping height for content */\n  __snapHeight: 100,\n\n  /** Height to assign to refresh area */\n  __refreshHeight: null,\n\n  /** Whether the refresh process is enabled when the event is released now */\n  __refreshActive: false,\n\n  /** Callback to execute on activation. This is for signalling the user about a refresh is about to happen when he release */\n  __refreshActivate: null,\n\n  /** Callback to execute on deactivation. This is for signalling the user about the refresh being cancelled */\n  __refreshDeactivate: null,\n\n  /** Callback to execute to start the actual refresh. Call {@link #refreshFinish} when done */\n  __refreshStart: null,\n\n  /** Zoom level */\n  __zoomLevel: 1,\n\n  /** Scroll position on x-axis */\n  __scrollLeft: 0,\n\n  /** Scroll position on y-axis */\n  __scrollTop: 0,\n\n  /** Maximum allowed scroll position on x-axis */\n  __maxScrollLeft: 0,\n\n  /** Maximum allowed scroll position on y-axis */\n  __maxScrollTop: 0,\n\n  /* Scheduled left position (final position when animating) */\n  __scheduledLeft: 0,\n\n  /* Scheduled top position (final position when animating) */\n  __scheduledTop: 0,\n\n  /* Scheduled zoom level (final scale when animating) */\n  __scheduledZoom: 0,\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: LAST POSITIONS\n  ---------------------------------------------------------------------------\n  */\n\n  /** Left position of finger at start */\n  __lastTouchLeft: null,\n\n  /** Top position of finger at start */\n  __lastTouchTop: null,\n\n  /** Timestamp of last move of finger. Used to limit tracking range for deceleration speed. */\n  __lastTouchMove: null,\n\n  /** List of positions, uses three indexes for each state: left, top, timestamp */\n  __positions: null,\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: DECELERATION SUPPORT\n  ---------------------------------------------------------------------------\n  */\n\n  /** Minimum left scroll position during deceleration */\n  __minDecelerationScrollLeft: null,\n\n  /** Minimum top scroll position during deceleration */\n  __minDecelerationScrollTop: null,\n\n  /** Maximum left scroll position during deceleration */\n  __maxDecelerationScrollLeft: null,\n\n  /** Maximum top scroll position during deceleration */\n  __maxDecelerationScrollTop: null,\n\n  /** Current factor to modify horizontal scroll position with on every step */\n  __decelerationVelocityX: null,\n\n  /** Current factor to modify vertical scroll position with on every step */\n  __decelerationVelocityY: null,\n\n\n  /** the browser-specific property to use for transforms */\n  __transformProperty: null,\n  __perspectiveProperty: null,\n\n  /** scrollbar indicators */\n  __indicatorX: null,\n  __indicatorY: null,\n\n  /** Timeout for scrollbar fading */\n  __scrollbarFadeTimeout: null,\n\n  /** whether we've tried to wait for size already */\n  __didWaitForSize: null,\n  __sizerTimeout: null,\n\n  __initEventHandlers: function() {\n    var self = this;\n\n    // Event Handler\n    var container = self.__container;\n\n    // save height when scroll view is shrunk so we don't need to reflow\n    var scrollViewOffsetHeight;\n\n    /**\n     * Shrink the scroll view when the keyboard is up if necessary and if the\n     * focused input is below the bottom of the shrunk scroll view, scroll it\n     * into view.\n     */\n    self.scrollChildIntoView = function(e) {\n      //console.log(\"scrollChildIntoView at: \" + Date.now());\n\n      // D\n      var scrollBottomOffsetToTop = container.getBoundingClientRect().bottom;\n      // D - A\n      scrollViewOffsetHeight = container.offsetHeight;\n      var alreadyShrunk = self.isShrunkForKeyboard;\n\n      var isModal = container.parentNode.classList.contains('modal');\n      // 680px is when the media query for 60% modal width kicks in\n      var isInsetModal = isModal && window.innerWidth >= 680;\n\n     /*\n      *  _______\n      * |---A---| <- top of scroll view\n      * |       |\n      * |---B---| <- keyboard\n      * |   C   | <- input\n      * |---D---| <- initial bottom of scroll view\n      * |___E___| <- bottom of viewport\n      *\n      *  All commented calculations relative to the top of the viewport (ie E\n      *  is the viewport height, not 0)\n      */\n      if (!alreadyShrunk) {\n        // shrink scrollview so we can actually scroll if the input is hidden\n        // if it isn't shrink so we can scroll to inputs under the keyboard\n        // inset modals won't shrink on Android on their own when the keyboard appears\n        if ( ionic.Platform.isIOS() || ionic.Platform.isFullScreen || isInsetModal ) {\n          // if there are things below the scroll view account for them and\n          // subtract them from the keyboard height when resizing\n          // E - D                         E                         D\n          var scrollBottomOffsetToBottom = e.detail.viewportHeight - scrollBottomOffsetToTop;\n\n          // 0 or D - B if D > B           E - B                     E - D\n          var keyboardOffset = Math.max(0, e.detail.keyboardHeight - scrollBottomOffsetToBottom);\n\n          ionic.requestAnimationFrame(function(){\n            // D - A or B - A if D > B       D - A             max(0, D - B)\n            scrollViewOffsetHeight = scrollViewOffsetHeight - keyboardOffset;\n            container.style.height = scrollViewOffsetHeight + \"px\";\n            container.style.overflow = \"visible\";\n\n            //update scroll view\n            self.resize();\n          });\n        }\n\n        self.isShrunkForKeyboard = true;\n      }\n\n      /*\n       *  _______\n       * |---A---| <- top of scroll view\n       * |   *   | <- where we want to scroll to\n       * |--B-D--| <- keyboard, bottom of scroll view\n       * |   C   | <- input\n       * |       |\n       * |___E___| <- bottom of viewport\n       *\n       *  All commented calculations relative to the top of the viewport (ie E\n       *  is the viewport height, not 0)\n       */\n      // if the element is positioned under the keyboard scroll it into view\n      if (e.detail.isElementUnderKeyboard) {\n\n        ionic.requestAnimationFrame(function(){\n          container.scrollTop = 0;\n          // update D if we shrunk\n          if (self.isShrunkForKeyboard && !alreadyShrunk) {\n            scrollBottomOffsetToTop = container.getBoundingClientRect().bottom;\n          }\n\n          // middle of the scrollview, this is where we want to scroll to\n          // (D - A) / 2\n          var scrollMidpointOffset = scrollViewOffsetHeight * 0.5;\n          //console.log(\"container.offsetHeight: \" + scrollViewOffsetHeight);\n\n          // middle of the input we want to scroll into view\n          // C\n          var inputMidpoint = ((e.detail.elementBottom + e.detail.elementTop) / 2);\n\n          // distance from middle of input to the bottom of the scroll view\n          // C - D                                C               D\n          var inputMidpointOffsetToScrollBottom = inputMidpoint - scrollBottomOffsetToTop;\n\n          //C - D + (D - A)/2          C - D                     (D - A)/ 2\n          var scrollTop = inputMidpointOffsetToScrollBottom + scrollMidpointOffset;\n\n          if ( scrollTop > 0) {\n            if (ionic.Platform.isIOS()) ionic.tap.cloneFocusedInput(container, self);\n            self.scrollBy(0, scrollTop, true);\n            self.onScroll();\n          }\n        });\n      }\n\n      // Only the first scrollView parent of the element that broadcasted this event\n      // (the active element that needs to be shown) should receive this event\n      e.stopPropagation();\n    };\n\n    self.resetScrollView = function() {\n      //return scrollview to original height once keyboard has hidden\n      if ( self.isShrunkForKeyboard ) {\n        self.isShrunkForKeyboard = false;\n        container.style.height = \"\";\n        container.style.overflow = \"\";\n      }\n      self.resize();\n    };\n\n    //Broadcasted when keyboard is shown on some platforms.\n    //See js/utils/keyboard.js\n    container.addEventListener('scrollChildIntoView', self.scrollChildIntoView);\n\n    // Listen on document because container may not have had the last\n    // keyboardActiveElement, for example after closing a modal with a focused\n    // input and returning to a previously resized scroll view in an ion-content.\n    // Since we can only resize scroll views that are currently visible, just resize\n    // the current scroll view when the keyboard is closed.\n    document.addEventListener('resetScrollView', self.resetScrollView);\n\n    function getEventTouches(e) {\n      return e.touches && e.touches.length ? e.touches : [{\n        pageX: e.pageX,\n        pageY: e.pageY\n      }];\n    }\n\n    self.touchStart = function(e) {\n      self.startCoordinates = ionic.tap.pointerCoord(e);\n\n      if ( ionic.tap.ignoreScrollStart(e) ) {\n        return;\n      }\n\n      self.__isDown = true;\n\n      if ( ionic.tap.containsOrIsTextInput(e.target) || e.target.tagName === 'SELECT' ) {\n        // do not start if the target is a text input\n        // if there is a touchmove on this input, then we can start the scroll\n        self.__hasStarted = false;\n        return;\n      }\n\n      self.__isSelectable = true;\n      self.__enableScrollY = true;\n      self.__hasStarted = true;\n      self.doTouchStart(getEventTouches(e), e.timeStamp);\n      e.preventDefault();\n    };\n\n    self.touchMove = function(e) {\n      if (self.options.freeze || !self.__isDown ||\n        (!self.__isDown && e.defaultPrevented) ||\n        (e.target.tagName === 'TEXTAREA' && e.target.parentElement.querySelector(':focus')) ) {\n        return;\n      }\n\n      if ( !self.__hasStarted && ( ionic.tap.containsOrIsTextInput(e.target) || e.target.tagName === 'SELECT' ) ) {\n        // the target is a text input and scroll has started\n        // since the text input doesn't start on touchStart, do it here\n        self.__hasStarted = true;\n        self.doTouchStart(getEventTouches(e), e.timeStamp);\n        e.preventDefault();\n        return;\n      }\n\n      if (self.startCoordinates) {\n        // we have start coordinates, so get this touch move's current coordinates\n        var currentCoordinates = ionic.tap.pointerCoord(e);\n\n        if ( self.__isSelectable &&\n            ionic.tap.isTextInput(e.target) &&\n            Math.abs(self.startCoordinates.x - currentCoordinates.x) > 20 ) {\n          // user slid the text input's caret on its x axis, disable any future y scrolling\n          self.__enableScrollY = false;\n          self.__isSelectable = true;\n        }\n\n        if ( self.__enableScrollY && Math.abs(self.startCoordinates.y - currentCoordinates.y) > 10 ) {\n          // user scrolled the entire view on the y axis\n          // disabled being able to select text on an input\n          // hide the input which has focus, and show a cloned one that doesn't have focus\n          self.__isSelectable = false;\n          ionic.tap.cloneFocusedInput(container, self);\n        }\n      }\n\n      self.doTouchMove(getEventTouches(e), e.timeStamp, e.scale);\n      self.__isDown = true;\n    };\n\n    self.touchMoveBubble = function(e) {\n      if(self.__isDown && self.options.preventDefault) {\n        e.preventDefault();\n      }\n    };\n\n    self.touchEnd = function(e) {\n      if (!self.__isDown) return;\n\n      self.doTouchEnd(e, e.timeStamp);\n      self.__isDown = false;\n      self.__hasStarted = false;\n      self.__isSelectable = true;\n      self.__enableScrollY = true;\n\n      if ( !self.__isDragging && !self.__isDecelerating && !self.__isAnimating ) {\n        ionic.tap.removeClonedInputs(container, self);\n      }\n    };\n\n    self.mouseWheel = ionic.animationFrameThrottle(function(e) {\n      var scrollParent = ionic.DomUtil.getParentOrSelfWithClass(e.target, 'ionic-scroll');\n      if (!self.options.freeze && scrollParent === self.__container) {\n\n        self.hintResize();\n        self.scrollBy(\n          (e.wheelDeltaX || e.deltaX || 0) / self.options.wheelDampen,\n          (-e.wheelDeltaY || e.deltaY || 0) / self.options.wheelDampen\n        );\n\n        self.__fadeScrollbars('in');\n        clearTimeout(self.__wheelHideBarTimeout);\n        self.__wheelHideBarTimeout = setTimeout(function() {\n          self.__fadeScrollbars('out');\n        }, 100);\n      }\n    });\n\n    if ('ontouchstart' in window) {\n      // Touch Events\n      container.addEventListener(\"touchstart\", self.touchStart, false);\n      if(self.options.preventDefault) container.addEventListener(\"touchmove\", self.touchMoveBubble, false);\n      document.addEventListener(\"touchmove\", self.touchMove, false);\n      document.addEventListener(\"touchend\", self.touchEnd, false);\n      document.addEventListener(\"touchcancel\", self.touchEnd, false);\n      document.addEventListener(\"wheel\", self.mouseWheel, false);\n\n    } else if (window.navigator.pointerEnabled) {\n      // Pointer Events\n      container.addEventListener(\"pointerdown\", self.touchStart, false);\n      if(self.options.preventDefault) container.addEventListener(\"pointermove\", self.touchMoveBubble, false);\n      document.addEventListener(\"pointermove\", self.touchMove, false);\n      document.addEventListener(\"pointerup\", self.touchEnd, false);\n      document.addEventListener(\"pointercancel\", self.touchEnd, false);\n      document.addEventListener(\"wheel\", self.mouseWheel, false);\n\n    } else if (window.navigator.msPointerEnabled) {\n      // IE10, WP8 (Pointer Events)\n      container.addEventListener(\"MSPointerDown\", self.touchStart, false);\n      if(self.options.preventDefault) container.addEventListener(\"MSPointerMove\", self.touchMoveBubble, false);\n      document.addEventListener(\"MSPointerMove\", self.touchMove, false);\n      document.addEventListener(\"MSPointerUp\", self.touchEnd, false);\n      document.addEventListener(\"MSPointerCancel\", self.touchEnd, false);\n      document.addEventListener(\"wheel\", self.mouseWheel, false);\n\n    } else {\n      // Mouse Events\n      var mousedown = false;\n\n      self.mouseDown = function(e) {\n        if ( ionic.tap.ignoreScrollStart(e) || e.target.tagName === 'SELECT' ) {\n          return;\n        }\n        self.doTouchStart(getEventTouches(e), e.timeStamp);\n\n        if ( !ionic.tap.isTextInput(e.target) ) {\n          e.preventDefault();\n        }\n        mousedown = true;\n      };\n\n      self.mouseMove = function(e) {\n        if (self.options.freeze || !mousedown || (!mousedown && e.defaultPrevented)) {\n          return;\n        }\n\n        self.doTouchMove(getEventTouches(e), e.timeStamp);\n\n        mousedown = true;\n      };\n\n      self.mouseMoveBubble = function(e) {\n        if (mousedown && self.options.preventDefault) {\n          e.preventDefault();\n        }\n      };\n\n      self.mouseUp = function(e) {\n        if (!mousedown) {\n          return;\n        }\n\n        self.doTouchEnd(e, e.timeStamp);\n\n        mousedown = false;\n      };\n\n      container.addEventListener(\"mousedown\", self.mouseDown, false);\n      if(self.options.preventDefault) container.addEventListener(\"mousemove\", self.mouseMoveBubble, false);\n      document.addEventListener(\"mousemove\", self.mouseMove, false);\n      document.addEventListener(\"mouseup\", self.mouseUp, false);\n      document.addEventListener('mousewheel', self.mouseWheel, false);\n      document.addEventListener('wheel', self.mouseWheel, false);\n    }\n  },\n\n  __cleanup: function() {\n    var self = this;\n    var container = self.__container;\n\n    container.removeEventListener('touchstart', self.touchStart);\n    container.removeEventListener('touchmove', self.touchMoveBubble);\n    document.removeEventListener('touchmove', self.touchMove);\n    document.removeEventListener('touchend', self.touchEnd);\n    document.removeEventListener('touchcancel', self.touchEnd);\n\n    container.removeEventListener(\"pointerdown\", self.touchStart);\n    container.removeEventListener(\"pointermove\", self.touchMoveBubble);\n    document.removeEventListener(\"pointermove\", self.touchMove);\n    document.removeEventListener(\"pointerup\", self.touchEnd);\n    document.removeEventListener(\"pointercancel\", self.touchEnd);\n\n    container.removeEventListener(\"MSPointerDown\", self.touchStart);\n    container.removeEventListener(\"MSPointerMove\", self.touchMoveBubble);\n    document.removeEventListener(\"MSPointerMove\", self.touchMove);\n    document.removeEventListener(\"MSPointerUp\", self.touchEnd);\n    document.removeEventListener(\"MSPointerCancel\", self.touchEnd);\n\n    container.removeEventListener(\"mousedown\", self.mouseDown);\n    container.removeEventListener(\"mousemove\", self.mouseMoveBubble);\n    document.removeEventListener(\"mousemove\", self.mouseMove);\n    document.removeEventListener(\"mouseup\", self.mouseUp);\n    document.removeEventListener('mousewheel', self.mouseWheel);\n    document.removeEventListener('wheel', self.mouseWheel);\n\n    container.removeEventListener('scrollChildIntoView', self.scrollChildIntoView);\n    document.removeEventListener('resetScrollView', self.resetScrollView);\n\n    ionic.tap.removeClonedInputs(container, self);\n\n    delete self.__container;\n    delete self.__content;\n    delete self.__indicatorX;\n    delete self.__indicatorY;\n    delete self.options.el;\n\n    self.__callback = self.scrollChildIntoView = self.resetScrollView = NOOP;\n\n    self.mouseMove = self.mouseDown = self.mouseUp = self.mouseWheel =\n      self.touchStart = self.touchMove = self.touchEnd = self.touchCancel = NOOP;\n\n    self.resize = self.scrollTo = self.zoomTo =\n      self.__scrollingComplete = NOOP;\n    container = null;\n  },\n\n  /** Create a scroll bar div with the given direction **/\n  __createScrollbar: function(direction) {\n    var bar = document.createElement('div'),\n      indicator = document.createElement('div');\n\n    indicator.className = 'scroll-bar-indicator scroll-bar-fade-out';\n\n    if (direction == 'h') {\n      bar.className = 'scroll-bar scroll-bar-h';\n    } else {\n      bar.className = 'scroll-bar scroll-bar-v';\n    }\n\n    bar.appendChild(indicator);\n    return bar;\n  },\n\n  __createScrollbars: function() {\n    var self = this;\n    var indicatorX, indicatorY;\n\n    if (self.options.scrollingX) {\n      indicatorX = {\n        el: self.__createScrollbar('h'),\n        sizeRatio: 1\n      };\n      indicatorX.indicator = indicatorX.el.children[0];\n\n      if (self.options.scrollbarX) {\n        self.__container.appendChild(indicatorX.el);\n      }\n      self.__indicatorX = indicatorX;\n    }\n\n    if (self.options.scrollingY) {\n      indicatorY = {\n        el: self.__createScrollbar('v'),\n        sizeRatio: 1\n      };\n      indicatorY.indicator = indicatorY.el.children[0];\n\n      if (self.options.scrollbarY) {\n        self.__container.appendChild(indicatorY.el);\n      }\n      self.__indicatorY = indicatorY;\n    }\n  },\n\n  __resizeScrollbars: function() {\n    var self = this;\n\n    // Update horiz bar\n    if (self.__indicatorX) {\n      var width = Math.max(Math.round(self.__clientWidth * self.__clientWidth / (self.__contentWidth)), 20);\n      if (width > self.__contentWidth) {\n        width = 0;\n      }\n      if (width !== self.__indicatorX.size) {\n        ionic.requestAnimationFrame(function(){\n          self.__indicatorX.indicator.style.width = width + 'px';\n        });\n      }\n      self.__indicatorX.size = width;\n      self.__indicatorX.minScale = self.options.minScrollbarSizeX / width;\n      self.__indicatorX.maxPos = self.__clientWidth - width;\n      self.__indicatorX.sizeRatio = self.__maxScrollLeft ? self.__indicatorX.maxPos / self.__maxScrollLeft : 1;\n    }\n\n    // Update vert bar\n    if (self.__indicatorY) {\n      var height = Math.max(Math.round(self.__clientHeight * self.__clientHeight / (self.__contentHeight)), 20);\n      if (height > self.__contentHeight) {\n        height = 0;\n      }\n      if (height !== self.__indicatorY.size) {\n        ionic.requestAnimationFrame(function(){\n          self.__indicatorY && (self.__indicatorY.indicator.style.height = height + 'px');\n        });\n      }\n      self.__indicatorY.size = height;\n      self.__indicatorY.minScale = self.options.minScrollbarSizeY / height;\n      self.__indicatorY.maxPos = self.__clientHeight - height;\n      self.__indicatorY.sizeRatio = self.__maxScrollTop ? self.__indicatorY.maxPos / self.__maxScrollTop : 1;\n    }\n  },\n\n  /**\n   * Move and scale the scrollbars as the page scrolls.\n   */\n  __repositionScrollbars: function() {\n    var self = this,\n        heightScale, widthScale,\n        widthDiff, heightDiff,\n        x, y,\n        xstop = 0, ystop = 0;\n\n    if (self.__indicatorX) {\n      // Handle the X scrollbar\n\n      // Don't go all the way to the right if we have a vertical scrollbar as well\n      if (self.__indicatorY) xstop = 10;\n\n      x = Math.round(self.__indicatorX.sizeRatio * self.__scrollLeft) || 0;\n\n      // The the difference between the last content X position, and our overscrolled one\n      widthDiff = self.__scrollLeft - (self.__maxScrollLeft - xstop);\n\n      if (self.__scrollLeft < 0) {\n\n        widthScale = Math.max(self.__indicatorX.minScale,\n            (self.__indicatorX.size - Math.abs(self.__scrollLeft)) / self.__indicatorX.size);\n\n        // Stay at left\n        x = 0;\n\n        // Make sure scale is transformed from the left/center origin point\n        self.__indicatorX.indicator.style[self.__transformOriginProperty] = 'left center';\n      } else if (widthDiff > 0) {\n\n        widthScale = Math.max(self.__indicatorX.minScale,\n            (self.__indicatorX.size - widthDiff) / self.__indicatorX.size);\n\n        // Stay at the furthest x for the scrollable viewport\n        x = self.__indicatorX.maxPos - xstop;\n\n        // Make sure scale is transformed from the right/center origin point\n        self.__indicatorX.indicator.style[self.__transformOriginProperty] = 'right center';\n\n      } else {\n\n        // Normal motion\n        x = Math.min(self.__maxScrollLeft, Math.max(0, x));\n        widthScale = 1;\n\n      }\n\n      var translate3dX = 'translate3d(' + x + 'px, 0, 0) scaleX(' + widthScale + ')';\n      if (self.__indicatorX.transformProp !== translate3dX) {\n        self.__indicatorX.indicator.style[self.__transformProperty] = translate3dX;\n        self.__indicatorX.transformProp = translate3dX;\n      }\n    }\n\n    if (self.__indicatorY) {\n\n      y = Math.round(self.__indicatorY.sizeRatio * self.__scrollTop) || 0;\n\n      // Don't go all the way to the right if we have a vertical scrollbar as well\n      if (self.__indicatorX) ystop = 10;\n\n      heightDiff = self.__scrollTop - (self.__maxScrollTop - ystop);\n\n      if (self.__scrollTop < 0) {\n\n        heightScale = Math.max(self.__indicatorY.minScale, (self.__indicatorY.size - Math.abs(self.__scrollTop)) / self.__indicatorY.size);\n\n        // Stay at top\n        y = 0;\n\n        // Make sure scale is transformed from the center/top origin point\n        if (self.__indicatorY.originProp !== 'center top') {\n          self.__indicatorY.indicator.style[self.__transformOriginProperty] = 'center top';\n          self.__indicatorY.originProp = 'center top';\n        }\n\n      } else if (heightDiff > 0) {\n\n        heightScale = Math.max(self.__indicatorY.minScale, (self.__indicatorY.size - heightDiff) / self.__indicatorY.size);\n\n        // Stay at bottom of scrollable viewport\n        y = self.__indicatorY.maxPos - ystop;\n\n        // Make sure scale is transformed from the center/bottom origin point\n        if (self.__indicatorY.originProp !== 'center bottom') {\n          self.__indicatorY.indicator.style[self.__transformOriginProperty] = 'center bottom';\n          self.__indicatorY.originProp = 'center bottom';\n        }\n\n      } else {\n\n        // Normal motion\n        y = Math.min(self.__maxScrollTop, Math.max(0, y));\n        heightScale = 1;\n\n      }\n\n      var translate3dY = 'translate3d(0,' + y + 'px, 0) scaleY(' + heightScale + ')';\n      if (self.__indicatorY.transformProp !== translate3dY) {\n        self.__indicatorY.indicator.style[self.__transformProperty] = translate3dY;\n        self.__indicatorY.transformProp = translate3dY;\n      }\n    }\n  },\n\n  __fadeScrollbars: function(direction, delay) {\n    var self = this;\n\n    if (!self.options.scrollbarsFade) {\n      return;\n    }\n\n    var className = 'scroll-bar-fade-out';\n\n    if (self.options.scrollbarsFade === true) {\n      clearTimeout(self.__scrollbarFadeTimeout);\n\n      if (direction == 'in') {\n        if (self.__indicatorX) { self.__indicatorX.indicator.classList.remove(className); }\n        if (self.__indicatorY) { self.__indicatorY.indicator.classList.remove(className); }\n      } else {\n        self.__scrollbarFadeTimeout = setTimeout(function() {\n          if (self.__indicatorX) { self.__indicatorX.indicator.classList.add(className); }\n          if (self.__indicatorY) { self.__indicatorY.indicator.classList.add(className); }\n        }, delay || self.options.scrollbarFadeDelay);\n      }\n    }\n  },\n\n  __scrollingComplete: function() {\n    this.options.scrollingComplete();\n    ionic.tap.removeClonedInputs(this.__container, this);\n    this.__fadeScrollbars('out');\n  },\n\n  resize: function(continueScrolling) {\n    var self = this;\n    if (!self.__container || !self.options) return;\n\n    // Update Scroller dimensions for changed content\n    // Add padding to bottom of content\n    self.setDimensions(\n      self.__container.clientWidth,\n      self.__container.clientHeight,\n      self.options.getContentWidth(),\n      self.options.getContentHeight(),\n      continueScrolling\n    );\n  },\n  /*\n  ---------------------------------------------------------------------------\n    PUBLIC API\n  ---------------------------------------------------------------------------\n  */\n\n  getRenderFn: function() {\n    var self = this;\n\n    var content = self.__content;\n\n    var docStyle = document.documentElement.style;\n\n    var engine;\n    if ('MozAppearance' in docStyle) {\n      engine = 'gecko';\n    } else if ('WebkitAppearance' in docStyle) {\n      engine = 'webkit';\n    } else if (typeof navigator.cpuClass === 'string') {\n      engine = 'trident';\n    }\n\n    var vendorPrefix = {\n      trident: 'ms',\n      gecko: 'Moz',\n      webkit: 'Webkit',\n      presto: 'O'\n    }[engine];\n\n    var helperElem = document.createElement(\"div\");\n    var undef;\n\n    var perspectiveProperty = vendorPrefix + \"Perspective\";\n    var transformProperty = vendorPrefix + \"Transform\";\n    var transformOriginProperty = vendorPrefix + 'TransformOrigin';\n\n    self.__perspectiveProperty = transformProperty;\n    self.__transformProperty = transformProperty;\n    self.__transformOriginProperty = transformOriginProperty;\n\n    if (helperElem.style[perspectiveProperty] !== undef) {\n\n      return function(left, top, zoom, wasResize) {\n        var translate3d = 'translate3d(' + (-left) + 'px,' + (-top) + 'px,0) scale(' + zoom + ')';\n        if (translate3d !== self.contentTransform) {\n          content.style[transformProperty] = translate3d;\n          self.contentTransform = translate3d;\n        }\n        self.__repositionScrollbars();\n        if (!wasResize) {\n          self.triggerScrollEvent();\n        }\n      };\n\n    } else if (helperElem.style[transformProperty] !== undef) {\n\n      return function(left, top, zoom, wasResize) {\n        content.style[transformProperty] = 'translate(' + (-left) + 'px,' + (-top) + 'px) scale(' + zoom + ')';\n        self.__repositionScrollbars();\n        if (!wasResize) {\n          self.triggerScrollEvent();\n        }\n      };\n\n    } else {\n\n      return function(left, top, zoom, wasResize) {\n        content.style.marginLeft = left ? (-left / zoom) + 'px' : '';\n        content.style.marginTop = top ? (-top / zoom) + 'px' : '';\n        content.style.zoom = zoom || '';\n        self.__repositionScrollbars();\n        if (!wasResize) {\n          self.triggerScrollEvent();\n        }\n      };\n\n    }\n  },\n\n\n  /**\n   * Configures the dimensions of the client (outer) and content (inner) elements.\n   * Requires the available space for the outer element and the outer size of the inner element.\n   * All values which are falsy (null or zero etc.) are ignored and the old value is kept.\n   *\n   * @param clientWidth {Integer} Inner width of outer element\n   * @param clientHeight {Integer} Inner height of outer element\n   * @param contentWidth {Integer} Outer width of inner element\n   * @param contentHeight {Integer} Outer height of inner element\n   */\n  setDimensions: function(clientWidth, clientHeight, contentWidth, contentHeight, continueScrolling) {\n    var self = this;\n\n    if (!clientWidth && !clientHeight && !contentWidth && !contentHeight) {\n      // this scrollview isn't rendered, don't bother\n      return;\n    }\n\n    // Only update values which are defined\n    if (clientWidth === +clientWidth) {\n      self.__clientWidth = clientWidth;\n    }\n\n    if (clientHeight === +clientHeight) {\n      self.__clientHeight = clientHeight;\n    }\n\n    if (contentWidth === +contentWidth) {\n      self.__contentWidth = contentWidth;\n    }\n\n    if (contentHeight === +contentHeight) {\n      self.__contentHeight = contentHeight;\n    }\n\n    // Refresh maximums\n    self.__computeScrollMax();\n    self.__resizeScrollbars();\n\n    // Refresh scroll position\n    if (!continueScrolling) {\n      self.scrollTo(self.__scrollLeft, self.__scrollTop, true, null, true);\n    }\n\n  },\n\n\n  /**\n   * Sets the client coordinates in relation to the document.\n   *\n   * @param left {Integer} Left position of outer element\n   * @param top {Integer} Top position of outer element\n   */\n  setPosition: function(left, top) {\n    this.__clientLeft = left || 0;\n    this.__clientTop = top || 0;\n  },\n\n\n  /**\n   * Configures the snapping (when snapping is active)\n   *\n   * @param width {Integer} Snapping width\n   * @param height {Integer} Snapping height\n   */\n  setSnapSize: function(width, height) {\n    this.__snapWidth = width;\n    this.__snapHeight = height;\n  },\n\n\n  /**\n   * Activates pull-to-refresh. A special zone on the top of the list to start a list refresh whenever\n   * the user event is released during visibility of this zone. This was introduced by some apps on iOS like\n   * the official Twitter client.\n   *\n   * @param height {Integer} Height of pull-to-refresh zone on top of rendered list\n   * @param activateCallback {Function} Callback to execute on activation. This is for signalling the user about a refresh is about to happen when he release.\n   * @param deactivateCallback {Function} Callback to execute on deactivation. This is for signalling the user about the refresh being cancelled.\n   * @param startCallback {Function} Callback to execute to start the real async refresh action. Call {@link #finishPullToRefresh} after finish of refresh.\n   * @param showCallback {Function} Callback to execute when the refresher should be shown. This is for showing the refresher during a negative scrollTop.\n   * @param hideCallback {Function} Callback to execute when the refresher should be hidden. This is for hiding the refresher when it's behind the nav bar.\n   * @param tailCallback {Function} Callback to execute just before the refresher returns to it's original state. This is for zooming out the refresher.\n   * @param pullProgressCallback Callback to state the progress while pulling to refresh\n   */\n  activatePullToRefresh: function(height, refresherMethods) {\n    var self = this;\n\n    self.__refreshHeight = height;\n    self.__refreshActivate = function() { ionic.requestAnimationFrame(refresherMethods.activate); };\n    self.__refreshDeactivate = function() { ionic.requestAnimationFrame(refresherMethods.deactivate); };\n    self.__refreshStart = function() { ionic.requestAnimationFrame(refresherMethods.start); };\n    self.__refreshShow = function() { ionic.requestAnimationFrame(refresherMethods.show); };\n    self.__refreshHide = function() { ionic.requestAnimationFrame(refresherMethods.hide); };\n    self.__refreshTail = function() { ionic.requestAnimationFrame(refresherMethods.tail); };\n    self.__refreshTailTime = 100;\n    self.__minSpinTime = 600;\n  },\n\n\n  /**\n   * Starts pull-to-refresh manually.\n   */\n  triggerPullToRefresh: function() {\n    // Use publish instead of scrollTo to allow scrolling to out of boundary position\n    // We don't need to normalize scrollLeft, zoomLevel, etc. here because we only y-scrolling when pull-to-refresh is enabled\n    this.__publish(this.__scrollLeft, -this.__refreshHeight, this.__zoomLevel, true);\n\n    var d = new Date();\n    this.refreshStartTime = d.getTime();\n\n    if (this.__refreshStart) {\n      this.__refreshStart();\n    }\n  },\n\n\n  /**\n   * Signalizes that pull-to-refresh is finished.\n   */\n  finishPullToRefresh: function() {\n    var self = this;\n    // delay to make sure the spinner has a chance to spin for a split second before it's dismissed\n    var d = new Date();\n    var delay = 0;\n    if (self.refreshStartTime + self.__minSpinTime > d.getTime()) {\n      delay = self.refreshStartTime + self.__minSpinTime - d.getTime();\n    }\n    setTimeout(function() {\n      if (self.__refreshTail) {\n        self.__refreshTail();\n      }\n      setTimeout(function() {\n        self.__refreshActive = false;\n        if (self.__refreshDeactivate) {\n          self.__refreshDeactivate();\n        }\n        if (self.__refreshHide) {\n          self.__refreshHide();\n        }\n\n        self.scrollTo(self.__scrollLeft, self.__scrollTop, true);\n      }, self.__refreshTailTime);\n    }, delay);\n  },\n\n\n  /**\n   * Returns the scroll position and zooming values\n   *\n   * @return {Map} `left` and `top` scroll position and `zoom` level\n   */\n  getValues: function() {\n    return {\n      left: this.__scrollLeft,\n      top: this.__scrollTop,\n      zoom: this.__zoomLevel\n    };\n  },\n\n\n  /**\n   * Returns the maximum scroll values\n   *\n   * @return {Map} `left` and `top` maximum scroll values\n   */\n  getScrollMax: function() {\n    return {\n      left: this.__maxScrollLeft,\n      top: this.__maxScrollTop\n    };\n  },\n\n\n  /**\n   * Zooms to the given level. Supports optional animation. Zooms\n   * the center when no coordinates are given.\n   *\n   * @param level {Number} Level to zoom to\n   * @param animate {Boolean} Whether to use animation\n   * @param originLeft {Number} Zoom in at given left coordinate\n   * @param originTop {Number} Zoom in at given top coordinate\n   */\n  zoomTo: function(level, animate, originLeft, originTop) {\n    var self = this;\n\n    if (!self.options.zooming) {\n      throw new Error(\"Zooming is not enabled!\");\n    }\n\n    // Stop deceleration\n    if (self.__isDecelerating) {\n      zyngaCore.effect.Animate.stop(self.__isDecelerating);\n      self.__isDecelerating = false;\n    }\n\n    var oldLevel = self.__zoomLevel;\n\n    // Normalize input origin to center of viewport if not defined\n    if (originLeft == null) {\n      originLeft = self.__clientWidth / 2;\n    }\n\n    if (originTop == null) {\n      originTop = self.__clientHeight / 2;\n    }\n\n    // Limit level according to configuration\n    level = Math.max(Math.min(level, self.options.maxZoom), self.options.minZoom);\n\n    // Recompute maximum values while temporary tweaking maximum scroll ranges\n    self.__computeScrollMax(level);\n\n    // Recompute left and top coordinates based on new zoom level\n    var left = ((originLeft + self.__scrollLeft) * level / oldLevel) - originLeft;\n    var top = ((originTop + self.__scrollTop) * level / oldLevel) - originTop;\n\n    // Limit x-axis\n    if (left > self.__maxScrollLeft) {\n      left = self.__maxScrollLeft;\n    } else if (left < 0) {\n      left = 0;\n    }\n\n    // Limit y-axis\n    if (top > self.__maxScrollTop) {\n      top = self.__maxScrollTop;\n    } else if (top < 0) {\n      top = 0;\n    }\n\n    // Push values out\n    self.__publish(left, top, level, animate);\n\n  },\n\n\n  /**\n   * Zooms the content by the given factor.\n   *\n   * @param factor {Number} Zoom by given factor\n   * @param animate {Boolean} Whether to use animation\n   * @param originLeft {Number} Zoom in at given left coordinate\n   * @param originTop {Number} Zoom in at given top coordinate\n   */\n  zoomBy: function(factor, animate, originLeft, originTop) {\n    this.zoomTo(this.__zoomLevel * factor, animate, originLeft, originTop);\n  },\n\n\n  /**\n   * Scrolls to the given position. Respect limitations and snapping automatically.\n   *\n   * @param left {Number} Horizontal scroll position, keeps current if value is <code>null</code>\n   * @param top {Number} Vertical scroll position, keeps current if value is <code>null</code>\n   * @param animate {Boolean} Whether the scrolling should happen using an animation\n   * @param zoom {Number} Zoom level to go to\n   */\n  scrollTo: function(left, top, animate, zoom, wasResize) {\n    var self = this;\n\n    // Stop deceleration\n    if (self.__isDecelerating) {\n      zyngaCore.effect.Animate.stop(self.__isDecelerating);\n      self.__isDecelerating = false;\n    }\n\n    // Correct coordinates based on new zoom level\n    if (zoom != null && zoom !== self.__zoomLevel) {\n\n      if (!self.options.zooming) {\n        throw new Error(\"Zooming is not enabled!\");\n      }\n\n      left *= zoom;\n      top *= zoom;\n\n      // Recompute maximum values while temporary tweaking maximum scroll ranges\n      self.__computeScrollMax(zoom);\n\n    } else {\n\n      // Keep zoom when not defined\n      zoom = self.__zoomLevel;\n\n    }\n\n    if (!self.options.scrollingX) {\n\n      left = self.__scrollLeft;\n\n    } else {\n\n      if (self.options.paging) {\n        left = Math.round(left / self.__clientWidth) * self.__clientWidth;\n      } else if (self.options.snapping) {\n        left = Math.round(left / self.__snapWidth) * self.__snapWidth;\n      }\n\n    }\n\n    if (!self.options.scrollingY) {\n\n      top = self.__scrollTop;\n\n    } else {\n\n      if (self.options.paging) {\n        top = Math.round(top / self.__clientHeight) * self.__clientHeight;\n      } else if (self.options.snapping) {\n        top = Math.round(top / self.__snapHeight) * self.__snapHeight;\n      }\n\n    }\n\n    // Limit for allowed ranges\n    left = Math.max(Math.min(self.__maxScrollLeft, left), 0);\n    top = Math.max(Math.min(self.__maxScrollTop, top), 0);\n\n    // Don't animate when no change detected, still call publish to make sure\n    // that rendered position is really in-sync with internal data\n    if (left === self.__scrollLeft && top === self.__scrollTop) {\n      animate = false;\n    }\n\n    // Publish new values\n    self.__publish(left, top, zoom, animate, wasResize);\n\n  },\n\n\n  /**\n   * Scroll by the given offset\n   *\n   * @param left {Number} Scroll x-axis by given offset\n   * @param top {Number} Scroll y-axis by given offset\n   * @param animate {Boolean} Whether to animate the given change\n   */\n  scrollBy: function(left, top, animate) {\n    var self = this;\n\n    var startLeft = self.__isAnimating ? self.__scheduledLeft : self.__scrollLeft;\n    var startTop = self.__isAnimating ? self.__scheduledTop : self.__scrollTop;\n\n    self.scrollTo(startLeft + (left || 0), startTop + (top || 0), animate);\n  },\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    EVENT CALLBACKS\n  ---------------------------------------------------------------------------\n  */\n\n  /**\n   * Mouse wheel handler for zooming support\n   */\n  doMouseZoom: function(wheelDelta, timeStamp, pageX, pageY) {\n    var change = wheelDelta > 0 ? 0.97 : 1.03;\n    return this.zoomTo(this.__zoomLevel * change, false, pageX - this.__clientLeft, pageY - this.__clientTop);\n  },\n\n  /**\n   * Touch start handler for scrolling support\n   */\n  doTouchStart: function(touches, timeStamp) {\n    var self = this;\n\n    // remember if the deceleration was just stopped\n    self.__decStopped = !!(self.__isDecelerating || self.__isAnimating);\n\n    self.hintResize();\n\n    if (timeStamp instanceof Date) {\n      timeStamp = timeStamp.valueOf();\n    }\n    if (typeof timeStamp !== \"number\") {\n      timeStamp = Date.now();\n    }\n\n    // Reset interruptedAnimation flag\n    self.__interruptedAnimation = true;\n\n    // Stop deceleration\n    if (self.__isDecelerating) {\n      zyngaCore.effect.Animate.stop(self.__isDecelerating);\n      self.__isDecelerating = false;\n      self.__interruptedAnimation = true;\n    }\n\n    // Stop animation\n    if (self.__isAnimating) {\n      zyngaCore.effect.Animate.stop(self.__isAnimating);\n      self.__isAnimating = false;\n      self.__interruptedAnimation = true;\n    }\n\n    // Use center point when dealing with two fingers\n    var currentTouchLeft, currentTouchTop;\n    var isSingleTouch = touches.length === 1;\n    if (isSingleTouch) {\n      currentTouchLeft = touches[0].pageX;\n      currentTouchTop = touches[0].pageY;\n    } else {\n      currentTouchLeft = Math.abs(touches[0].pageX + touches[1].pageX) / 2;\n      currentTouchTop = Math.abs(touches[0].pageY + touches[1].pageY) / 2;\n    }\n\n    // Store initial positions\n    self.__initialTouchLeft = currentTouchLeft;\n    self.__initialTouchTop = currentTouchTop;\n\n    // Store initial touchList for scale calculation\n    self.__initialTouches = touches;\n\n    // Store current zoom level\n    self.__zoomLevelStart = self.__zoomLevel;\n\n    // Store initial touch positions\n    self.__lastTouchLeft = currentTouchLeft;\n    self.__lastTouchTop = currentTouchTop;\n\n    // Store initial move time stamp\n    self.__lastTouchMove = timeStamp;\n\n    // Reset initial scale\n    self.__lastScale = 1;\n\n    // Reset locking flags\n    self.__enableScrollX = !isSingleTouch && self.options.scrollingX;\n    self.__enableScrollY = !isSingleTouch && self.options.scrollingY;\n\n    // Reset tracking flag\n    self.__isTracking = true;\n\n    // Reset deceleration complete flag\n    self.__didDecelerationComplete = false;\n\n    // Dragging starts directly with two fingers, otherwise lazy with an offset\n    self.__isDragging = !isSingleTouch;\n\n    // Some features are disabled in multi touch scenarios\n    self.__isSingleTouch = isSingleTouch;\n\n    // Clearing data structure\n    self.__positions = [];\n\n  },\n\n\n  /**\n   * Touch move handler for scrolling support\n   */\n  doTouchMove: function(touches, timeStamp, scale) {\n    if (timeStamp instanceof Date) {\n      timeStamp = timeStamp.valueOf();\n    }\n    if (typeof timeStamp !== \"number\") {\n      timeStamp = Date.now();\n    }\n\n    var self = this;\n\n    // Ignore event when tracking is not enabled (event might be outside of element)\n    if (!self.__isTracking) {\n      return;\n    }\n\n    var currentTouchLeft, currentTouchTop;\n\n    // Compute move based around of center of fingers\n    if (touches.length === 2) {\n      currentTouchLeft = Math.abs(touches[0].pageX + touches[1].pageX) / 2;\n      currentTouchTop = Math.abs(touches[0].pageY + touches[1].pageY) / 2;\n\n      // Calculate scale when not present and only when touches are used\n      if (!scale && self.options.zooming) {\n        scale = self.__getScale(self.__initialTouches, touches);\n      }\n    } else {\n      currentTouchLeft = touches[0].pageX;\n      currentTouchTop = touches[0].pageY;\n    }\n\n    var positions = self.__positions;\n\n    // Are we already is dragging mode?\n    if (self.__isDragging) {\n        self.__decStopped = false;\n\n      // Compute move distance\n      var moveX = currentTouchLeft - self.__lastTouchLeft;\n      var moveY = currentTouchTop - self.__lastTouchTop;\n\n      // Read previous scroll position and zooming\n      var scrollLeft = self.__scrollLeft;\n      var scrollTop = self.__scrollTop;\n      var level = self.__zoomLevel;\n\n      // Work with scaling\n      if (scale != null && self.options.zooming) {\n\n        var oldLevel = level;\n\n        // Recompute level based on previous scale and new scale\n        level = level / self.__lastScale * scale;\n\n        // Limit level according to configuration\n        level = Math.max(Math.min(level, self.options.maxZoom), self.options.minZoom);\n\n        // Only do further compution when change happened\n        if (oldLevel !== level) {\n\n          // Compute relative event position to container\n          var currentTouchLeftRel = currentTouchLeft - self.__clientLeft;\n          var currentTouchTopRel = currentTouchTop - self.__clientTop;\n\n          // Recompute left and top coordinates based on new zoom level\n          scrollLeft = ((currentTouchLeftRel + scrollLeft) * level / oldLevel) - currentTouchLeftRel;\n          scrollTop = ((currentTouchTopRel + scrollTop) * level / oldLevel) - currentTouchTopRel;\n\n          // Recompute max scroll values\n          self.__computeScrollMax(level);\n\n        }\n      }\n\n      if (self.__enableScrollX) {\n\n        scrollLeft -= moveX * self.options.speedMultiplier;\n        var maxScrollLeft = self.__maxScrollLeft;\n\n        if (scrollLeft > maxScrollLeft || scrollLeft < 0) {\n\n          // Slow down on the edges\n          if (self.options.bouncing) {\n\n            scrollLeft += (moveX / 2 * self.options.speedMultiplier);\n\n          } else if (scrollLeft > maxScrollLeft) {\n\n            scrollLeft = maxScrollLeft;\n\n          } else {\n\n            scrollLeft = 0;\n\n          }\n        }\n      }\n\n      // Compute new vertical scroll position\n      if (self.__enableScrollY) {\n\n        scrollTop -= moveY * self.options.speedMultiplier;\n        var maxScrollTop = self.__maxScrollTop;\n\n        if (scrollTop > maxScrollTop || scrollTop < 0) {\n\n          // Slow down on the edges\n          if (self.options.bouncing || (self.__refreshHeight && scrollTop < 0)) {\n\n            scrollTop += (moveY / 2 * self.options.speedMultiplier);\n\n            // Support pull-to-refresh (only when only y is scrollable)\n            if (!self.__enableScrollX && self.__refreshHeight != null) {\n\n              // hide the refresher when it's behind the header bar in case of header transparency\n              if (scrollTop < 0) {\n                self.__refreshHidden = false;\n                self.__refreshShow();\n              } else {\n                self.__refreshHide();\n                self.__refreshHidden = true;\n              }\n\n              if (!self.__refreshActive && scrollTop <= -self.__refreshHeight) {\n\n                self.__refreshActive = true;\n                if (self.__refreshActivate) {\n                  self.__refreshActivate();\n                }\n\n              } else if (self.__refreshActive && scrollTop > -self.__refreshHeight) {\n\n                self.__refreshActive = false;\n                if (self.__refreshDeactivate) {\n                  self.__refreshDeactivate();\n                }\n\n              }\n            }\n\n          } else if (scrollTop > maxScrollTop) {\n\n            scrollTop = maxScrollTop;\n\n          } else {\n\n            scrollTop = 0;\n\n          }\n        } else if (self.__refreshHeight && !self.__refreshHidden) {\n          // if a positive scroll value and the refresher is still not hidden, hide it\n          self.__refreshHide();\n          self.__refreshHidden = true;\n        }\n      }\n\n      // Keep list from growing infinitely (holding min 10, max 20 measure points)\n      if (positions.length > 60) {\n        positions.splice(0, 30);\n      }\n\n      // Track scroll movement for decleration\n      positions.push(scrollLeft, scrollTop, timeStamp);\n\n      // Sync scroll position\n      self.__publish(scrollLeft, scrollTop, level);\n\n    // Otherwise figure out whether we are switching into dragging mode now.\n    } else {\n\n      var minimumTrackingForScroll = self.options.locking ? 3 : 0;\n      var minimumTrackingForDrag = 5;\n\n      var distanceX = Math.abs(currentTouchLeft - self.__initialTouchLeft);\n      var distanceY = Math.abs(currentTouchTop - self.__initialTouchTop);\n\n      self.__enableScrollX = self.options.scrollingX && distanceX >= minimumTrackingForScroll;\n      self.__enableScrollY = self.options.scrollingY && distanceY >= minimumTrackingForScroll;\n\n      positions.push(self.__scrollLeft, self.__scrollTop, timeStamp);\n\n      self.__isDragging = (self.__enableScrollX || self.__enableScrollY) && (distanceX >= minimumTrackingForDrag || distanceY >= minimumTrackingForDrag);\n      if (self.__isDragging) {\n        self.__interruptedAnimation = false;\n        self.__fadeScrollbars('in');\n      }\n\n    }\n\n    // Update last touch positions and time stamp for next event\n    self.__lastTouchLeft = currentTouchLeft;\n    self.__lastTouchTop = currentTouchTop;\n    self.__lastTouchMove = timeStamp;\n    self.__lastScale = scale;\n\n  },\n\n\n  /**\n   * Touch end handler for scrolling support\n   */\n  doTouchEnd: function(e, timeStamp) {\n    if (timeStamp instanceof Date) {\n      timeStamp = timeStamp.valueOf();\n    }\n    if (typeof timeStamp !== \"number\") {\n      timeStamp = Date.now();\n    }\n\n    var self = this;\n\n    // Ignore event when tracking is not enabled (no touchstart event on element)\n    // This is required as this listener ('touchmove') sits on the document and not on the element itself.\n    if (!self.__isTracking) {\n      return;\n    }\n\n    // Not touching anymore (when two finger hit the screen there are two touch end events)\n    self.__isTracking = false;\n\n    // Be sure to reset the dragging flag now. Here we also detect whether\n    // the finger has moved fast enough to switch into a deceleration animation.\n    if (self.__isDragging) {\n\n      // Reset dragging flag\n      self.__isDragging = false;\n\n      // Start deceleration\n      // Verify that the last move detected was in some relevant time frame\n      if (self.__isSingleTouch && self.options.animating && (timeStamp - self.__lastTouchMove) <= 100) {\n\n        // Then figure out what the scroll position was about 100ms ago\n        var positions = self.__positions;\n        var endPos = positions.length - 1;\n        var startPos = endPos;\n\n        // Move pointer to position measured 100ms ago\n        for (var i = endPos; i > 0 && positions[i] > (self.__lastTouchMove - 100); i -= 3) {\n          startPos = i;\n        }\n\n        // If start and stop position is identical in a 100ms timeframe,\n        // we cannot compute any useful deceleration.\n        if (startPos !== endPos) {\n\n          // Compute relative movement between these two points\n          var timeOffset = positions[endPos] - positions[startPos];\n          var movedLeft = self.__scrollLeft - positions[startPos - 2];\n          var movedTop = self.__scrollTop - positions[startPos - 1];\n\n          // Based on 50ms compute the movement to apply for each render step\n          self.__decelerationVelocityX = movedLeft / timeOffset * (1000 / 60);\n          self.__decelerationVelocityY = movedTop / timeOffset * (1000 / 60);\n\n          // How much velocity is required to start the deceleration\n          var minVelocityToStartDeceleration = self.options.paging || self.options.snapping ? self.options.decelVelocityThresholdPaging : self.options.decelVelocityThreshold;\n\n          // Verify that we have enough velocity to start deceleration\n          if (Math.abs(self.__decelerationVelocityX) > minVelocityToStartDeceleration || Math.abs(self.__decelerationVelocityY) > minVelocityToStartDeceleration) {\n\n            // Deactivate pull-to-refresh when decelerating\n            if (!self.__refreshActive) {\n              self.__startDeceleration(timeStamp);\n            }\n          }\n        } else {\n          self.__scrollingComplete();\n        }\n      } else if ((timeStamp - self.__lastTouchMove) > 100) {\n        self.__scrollingComplete();\n      }\n\n    } else if (self.__decStopped) {\n      // the deceleration was stopped\n      // user flicked the scroll fast, and stop dragging, then did a touchstart to stop the srolling\n      // tell the touchend event code to do nothing, we don't want to actually send a click\n      e.isTapHandled = true;\n      self.__decStopped = false;\n    }\n\n    // If this was a slower move it is per default non decelerated, but this\n    // still means that we want snap back to the bounds which is done here.\n    // This is placed outside the condition above to improve edge case stability\n    // e.g. touchend fired without enabled dragging. This should normally do not\n    // have modified the scroll positions or even showed the scrollbars though.\n    if (!self.__isDecelerating) {\n\n      if (self.__refreshActive && self.__refreshStart) {\n\n        // Use publish instead of scrollTo to allow scrolling to out of boundary position\n        // We don't need to normalize scrollLeft, zoomLevel, etc. here because we only y-scrolling when pull-to-refresh is enabled\n        self.__publish(self.__scrollLeft, -self.__refreshHeight, self.__zoomLevel, true);\n\n        var d = new Date();\n        self.refreshStartTime = d.getTime();\n\n        if (self.__refreshStart) {\n          self.__refreshStart();\n        }\n        // for iOS-ey style scrolling\n        if (!ionic.Platform.isAndroid())self.__startDeceleration();\n      } else {\n\n        if (self.__interruptedAnimation || self.__isDragging) {\n          self.__scrollingComplete();\n        }\n        self.scrollTo(self.__scrollLeft, self.__scrollTop, true, self.__zoomLevel);\n\n        // Directly signalize deactivation (nothing todo on refresh?)\n        if (self.__refreshActive) {\n\n          self.__refreshActive = false;\n          if (self.__refreshDeactivate) {\n            self.__refreshDeactivate();\n          }\n\n        }\n      }\n    }\n\n    // Fully cleanup list\n    self.__positions.length = 0;\n\n  },\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    PRIVATE API\n  ---------------------------------------------------------------------------\n  */\n\n  /**\n   * Applies the scroll position to the content element\n   *\n   * @param left {Number} Left scroll position\n   * @param top {Number} Top scroll position\n   * @param animate {Boolean} Whether animation should be used to move to the new coordinates\n   */\n  __publish: function(left, top, zoom, animate, wasResize) {\n\n    var self = this;\n\n    // Remember whether we had an animation, then we try to continue based on the current \"drive\" of the animation\n    var wasAnimating = self.__isAnimating;\n    if (wasAnimating) {\n      zyngaCore.effect.Animate.stop(wasAnimating);\n      self.__isAnimating = false;\n    }\n\n    if (animate && self.options.animating) {\n\n      // Keep scheduled positions for scrollBy/zoomBy functionality\n      self.__scheduledLeft = left;\n      self.__scheduledTop = top;\n      self.__scheduledZoom = zoom;\n\n      var oldLeft = self.__scrollLeft;\n      var oldTop = self.__scrollTop;\n      var oldZoom = self.__zoomLevel;\n\n      var diffLeft = left - oldLeft;\n      var diffTop = top - oldTop;\n      var diffZoom = zoom - oldZoom;\n\n      var step = function(percent, now, render) {\n\n        if (render) {\n\n          self.__scrollLeft = oldLeft + (diffLeft * percent);\n          self.__scrollTop = oldTop + (diffTop * percent);\n          self.__zoomLevel = oldZoom + (diffZoom * percent);\n\n          // Push values out\n          if (self.__callback) {\n            self.__callback(self.__scrollLeft, self.__scrollTop, self.__zoomLevel, wasResize);\n          }\n\n        }\n      };\n\n      var verify = function(id) {\n        return self.__isAnimating === id;\n      };\n\n      var completed = function(renderedFramesPerSecond, animationId, wasFinished) {\n        if (animationId === self.__isAnimating) {\n          self.__isAnimating = false;\n        }\n        if (self.__didDecelerationComplete || wasFinished) {\n          self.__scrollingComplete();\n        }\n\n        if (self.options.zooming) {\n          self.__computeScrollMax();\n        }\n      };\n\n      // When continuing based on previous animation we choose an ease-out animation instead of ease-in-out\n      self.__isAnimating = zyngaCore.effect.Animate.start(step, verify, completed, self.options.animationDuration, wasAnimating ? easeOutCubic : easeInOutCubic);\n\n    } else {\n\n      self.__scheduledLeft = self.__scrollLeft = left;\n      self.__scheduledTop = self.__scrollTop = top;\n      self.__scheduledZoom = self.__zoomLevel = zoom;\n\n      // Push values out\n      if (self.__callback) {\n        self.__callback(left, top, zoom, wasResize);\n      }\n\n      // Fix max scroll ranges\n      if (self.options.zooming) {\n        self.__computeScrollMax();\n      }\n    }\n  },\n\n\n  /**\n   * Recomputes scroll minimum values based on client dimensions and content dimensions.\n   */\n  __computeScrollMax: function(zoomLevel) {\n    var self = this;\n\n    if (zoomLevel == null) {\n      zoomLevel = self.__zoomLevel;\n    }\n\n    self.__maxScrollLeft = Math.max((self.__contentWidth * zoomLevel) - self.__clientWidth, 0);\n    self.__maxScrollTop = Math.max((self.__contentHeight * zoomLevel) - self.__clientHeight, 0);\n\n    if (!self.__didWaitForSize && !self.__maxScrollLeft && !self.__maxScrollTop) {\n      self.__didWaitForSize = true;\n      self.__waitForSize();\n    }\n  },\n\n\n  /**\n   * If the scroll view isn't sized correctly on start, wait until we have at least some size\n   */\n  __waitForSize: function() {\n    var self = this;\n\n    clearTimeout(self.__sizerTimeout);\n\n    var sizer = function() {\n      self.resize(true);\n    };\n\n    sizer();\n    self.__sizerTimeout = setTimeout(sizer, 500);\n  },\n\n  /*\n  ---------------------------------------------------------------------------\n    ANIMATION (DECELERATION) SUPPORT\n  ---------------------------------------------------------------------------\n  */\n\n  /**\n   * Called when a touch sequence end and the speed of the finger was high enough\n   * to switch into deceleration mode.\n   */\n  __startDeceleration: function() {\n    var self = this;\n\n    if (self.options.paging) {\n\n      var scrollLeft = Math.max(Math.min(self.__scrollLeft, self.__maxScrollLeft), 0);\n      var scrollTop = Math.max(Math.min(self.__scrollTop, self.__maxScrollTop), 0);\n      var clientWidth = self.__clientWidth;\n      var clientHeight = self.__clientHeight;\n\n      // We limit deceleration not to the min/max values of the allowed range, but to the size of the visible client area.\n      // Each page should have exactly the size of the client area.\n      self.__minDecelerationScrollLeft = Math.floor(scrollLeft / clientWidth) * clientWidth;\n      self.__minDecelerationScrollTop = Math.floor(scrollTop / clientHeight) * clientHeight;\n      self.__maxDecelerationScrollLeft = Math.ceil(scrollLeft / clientWidth) * clientWidth;\n      self.__maxDecelerationScrollTop = Math.ceil(scrollTop / clientHeight) * clientHeight;\n\n    } else {\n\n      self.__minDecelerationScrollLeft = 0;\n      self.__minDecelerationScrollTop = 0;\n      self.__maxDecelerationScrollLeft = self.__maxScrollLeft;\n      self.__maxDecelerationScrollTop = self.__maxScrollTop;\n      if (self.__refreshActive) self.__minDecelerationScrollTop = self.__refreshHeight * -1;\n    }\n\n    // Wrap class method\n    var step = function(percent, now, render) {\n      self.__stepThroughDeceleration(render);\n    };\n\n    // How much velocity is required to keep the deceleration running\n    self.__minVelocityToKeepDecelerating = self.options.snapping ? 4 : 0.1;\n\n    // Detect whether it's still worth to continue animating steps\n    // If we are already slow enough to not being user perceivable anymore, we stop the whole process here.\n    var verify = function() {\n      var shouldContinue = Math.abs(self.__decelerationVelocityX) >= self.__minVelocityToKeepDecelerating ||\n        Math.abs(self.__decelerationVelocityY) >= self.__minVelocityToKeepDecelerating;\n      if (!shouldContinue) {\n        self.__didDecelerationComplete = true;\n\n        //Make sure the scroll values are within the boundaries after a bounce,\n        //not below 0 or above maximum\n        if (self.options.bouncing && !self.__refreshActive) {\n          self.scrollTo(\n            Math.min( Math.max(self.__scrollLeft, 0), self.__maxScrollLeft ),\n            Math.min( Math.max(self.__scrollTop, 0), self.__maxScrollTop ),\n            self.__refreshActive\n          );\n        }\n      }\n      return shouldContinue;\n    };\n\n    var completed = function() {\n      self.__isDecelerating = false;\n      if (self.__didDecelerationComplete) {\n        self.__scrollingComplete();\n      }\n\n      // Animate to grid when snapping is active, otherwise just fix out-of-boundary positions\n      if (self.options.paging) {\n        self.scrollTo(self.__scrollLeft, self.__scrollTop, self.options.snapping);\n      }\n    };\n\n    // Start animation and switch on flag\n    self.__isDecelerating = zyngaCore.effect.Animate.start(step, verify, completed);\n\n  },\n\n\n  /**\n   * Called on every step of the animation\n   *\n   * @param inMemory {Boolean} Whether to not render the current step, but keep it in memory only. Used internally only!\n   */\n  __stepThroughDeceleration: function(render) {\n    var self = this;\n\n\n    //\n    // COMPUTE NEXT SCROLL POSITION\n    //\n\n    // Add deceleration to scroll position\n    var scrollLeft = self.__scrollLeft + self.__decelerationVelocityX;// * self.options.deceleration);\n    var scrollTop = self.__scrollTop + self.__decelerationVelocityY;// * self.options.deceleration);\n\n\n    //\n    // HARD LIMIT SCROLL POSITION FOR NON BOUNCING MODE\n    //\n\n    if (!self.options.bouncing) {\n\n      var scrollLeftFixed = Math.max(Math.min(self.__maxDecelerationScrollLeft, scrollLeft), self.__minDecelerationScrollLeft);\n      if (scrollLeftFixed !== scrollLeft) {\n        scrollLeft = scrollLeftFixed;\n        self.__decelerationVelocityX = 0;\n      }\n\n      var scrollTopFixed = Math.max(Math.min(self.__maxDecelerationScrollTop, scrollTop), self.__minDecelerationScrollTop);\n      if (scrollTopFixed !== scrollTop) {\n        scrollTop = scrollTopFixed;\n        self.__decelerationVelocityY = 0;\n      }\n\n    }\n\n\n    //\n    // UPDATE SCROLL POSITION\n    //\n\n    if (render) {\n\n      self.__publish(scrollLeft, scrollTop, self.__zoomLevel);\n\n    } else {\n\n      self.__scrollLeft = scrollLeft;\n      self.__scrollTop = scrollTop;\n\n    }\n\n\n    //\n    // SLOW DOWN\n    //\n\n    // Slow down velocity on every iteration\n    if (!self.options.paging) {\n\n      // This is the factor applied to every iteration of the animation\n      // to slow down the process. This should emulate natural behavior where\n      // objects slow down when the initiator of the movement is removed\n      var frictionFactor = self.options.deceleration;\n\n      self.__decelerationVelocityX *= frictionFactor;\n      self.__decelerationVelocityY *= frictionFactor;\n\n    }\n\n\n    //\n    // BOUNCING SUPPORT\n    //\n\n    if (self.options.bouncing) {\n\n      var scrollOutsideX = 0;\n      var scrollOutsideY = 0;\n\n      // This configures the amount of change applied to deceleration/acceleration when reaching boundaries\n      var penetrationDeceleration = self.options.penetrationDeceleration;\n      var penetrationAcceleration = self.options.penetrationAcceleration;\n\n      // Check limits\n      if (scrollLeft < self.__minDecelerationScrollLeft) {\n        scrollOutsideX = self.__minDecelerationScrollLeft - scrollLeft;\n      } else if (scrollLeft > self.__maxDecelerationScrollLeft) {\n        scrollOutsideX = self.__maxDecelerationScrollLeft - scrollLeft;\n      }\n\n      if (scrollTop < self.__minDecelerationScrollTop) {\n        scrollOutsideY = self.__minDecelerationScrollTop - scrollTop;\n      } else if (scrollTop > self.__maxDecelerationScrollTop) {\n        scrollOutsideY = self.__maxDecelerationScrollTop - scrollTop;\n      }\n\n      // Slow down until slow enough, then flip back to snap position\n      if (scrollOutsideX !== 0) {\n        var isHeadingOutwardsX = scrollOutsideX * self.__decelerationVelocityX <= self.__minDecelerationScrollLeft;\n        if (isHeadingOutwardsX) {\n          self.__decelerationVelocityX += scrollOutsideX * penetrationDeceleration;\n        }\n        var isStoppedX = Math.abs(self.__decelerationVelocityX) <= self.__minVelocityToKeepDecelerating;\n        //If we're not heading outwards, or if the above statement got us below minDeceleration, go back towards bounds\n        if (!isHeadingOutwardsX || isStoppedX) {\n          self.__decelerationVelocityX = scrollOutsideX * penetrationAcceleration;\n        }\n      }\n\n      if (scrollOutsideY !== 0) {\n        var isHeadingOutwardsY = scrollOutsideY * self.__decelerationVelocityY <= self.__minDecelerationScrollTop;\n        if (isHeadingOutwardsY) {\n          self.__decelerationVelocityY += scrollOutsideY * penetrationDeceleration;\n        }\n        var isStoppedY = Math.abs(self.__decelerationVelocityY) <= self.__minVelocityToKeepDecelerating;\n        //If we're not heading outwards, or if the above statement got us below minDeceleration, go back towards bounds\n        if (!isHeadingOutwardsY || isStoppedY) {\n          self.__decelerationVelocityY = scrollOutsideY * penetrationAcceleration;\n        }\n      }\n    }\n  },\n\n\n  /**\n   * calculate the distance between two touches\n   * @param   {Touch}     touch1\n   * @param   {Touch}     touch2\n   * @returns {Number}    distance\n   */\n  __getDistance: function getDistance(touch1, touch2) {\n    var x = touch2.pageX - touch1.pageX,\n    y = touch2.pageY - touch1.pageY;\n    return Math.sqrt((x * x) + (y * y));\n  },\n\n\n  /**\n   * calculate the scale factor between two touchLists (fingers)\n   * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n   * @param   {Array}     start\n   * @param   {Array}     end\n   * @returns {Number}    scale\n   */\n  __getScale: function getScale(start, end) {\n    // need two fingers...\n    if (start.length >= 2 && end.length >= 2) {\n      return this.__getDistance(end[0], end[1]) /\n        this.__getDistance(start[0], start[1]);\n    }\n    return 1;\n  }\n});\n\nionic.scroll = {\n  isScrolling: false,\n  lastTop: 0\n};\n\n})(ionic);\n\n(function(ionic) {\n  var NOOP = function() {};\n  var deprecated = function(name) {\n    void 0;\n  };\n  ionic.views.ScrollNative = ionic.views.View.inherit({\n\n    initialize: function(options) {\n      var self = this;\n      self.__container = self.el = options.el;\n      self.__content = options.el.firstElementChild;\n      // Whether scrolling is frozen or not\n      self.__frozen = false;\n      self.isNative = true;\n\n      self.__scrollTop = self.el.scrollTop;\n      self.__scrollLeft = self.el.scrollLeft;\n      self.__clientHeight = self.__content.clientHeight;\n      self.__clientWidth = self.__content.clientWidth;\n      self.__maxScrollTop = Math.max((self.__contentHeight) - self.__clientHeight, 0);\n      self.__maxScrollLeft = Math.max((self.__contentWidth) - self.__clientWidth, 0);\n\n      if(options.startY >= 0 || options.startX >= 0) {\n        ionic.requestAnimationFrame(function() {\n          self.__originalContainerHeight = self.el.getBoundingClientRect().height;\n\n          self.el.scrollTop = options.startY || 0;\n          self.el.scrollLeft = options.startX || 0;\n\n          self.__scrollTop = self.el.scrollTop;\n          self.__scrollLeft = self.el.scrollLeft;\n        });\n      }\n\n      self.options = {\n\n        freeze: false,\n\n        getContentWidth: function() {\n          return Math.max(self.__content.scrollWidth, self.__content.offsetWidth);\n        },\n\n        getContentHeight: function() {\n          return Math.max(self.__content.scrollHeight, self.__content.offsetHeight + (self.__content.offsetTop * 2));\n        }\n\n      };\n\n      for (var key in options) {\n        self.options[key] = options[key];\n      }\n\n      /**\n       * Sets isScrolling to true, and automatically deactivates if not called again in 80ms.\n       */\n      self.onScroll = function() {\n        if (!ionic.scroll.isScrolling) {\n          ionic.scroll.isScrolling = true;\n        }\n\n        clearTimeout(self.scrollTimer);\n        self.scrollTimer = setTimeout(function() {\n          ionic.scroll.isScrolling = false;\n        }, 80);\n      };\n\n      self.freeze = function(shouldFreeze) {\n        self.__frozen = shouldFreeze;\n      };\n      // A more powerful freeze pop that dominates all other freeze pops\n      self.freezeShut = function(shouldFreezeShut) {\n        self.__frozenShut = shouldFreezeShut;\n      };\n\n      self.__initEventHandlers();\n    },\n\n    /**  Methods not used in native scrolling */\n    __callback: function() { deprecated('__callback'); },\n    zoomTo: function() { deprecated('zoomTo'); },\n    zoomBy: function() { deprecated('zoomBy'); },\n    activatePullToRefresh: function() { deprecated('activatePullToRefresh'); },\n\n    /**\n     * Returns the scroll position and zooming values\n     *\n     * @return {Map} `left` and `top` scroll position and `zoom` level\n     */\n    resize: function(continueScrolling) {\n      var self = this;\n      if (!self.__container || !self.options) return;\n\n      // Update Scroller dimensions for changed content\n      // Add padding to bottom of content\n      self.setDimensions(\n        self.__container.clientWidth,\n        self.__container.clientHeight,\n        self.options.getContentWidth(),\n        self.options.getContentHeight(),\n        continueScrolling\n      );\n    },\n\n    /**\n     * Initialize the scrollview\n     * In native scrolling, this only means we need to gather size information\n     */\n    run: function() {\n      this.resize();\n    },\n\n    /**\n     * Returns the scroll position and zooming values\n     *\n     * @return {Map} `left` and `top` scroll position and `zoom` level\n     */\n    getValues: function() {\n      var self = this;\n      self.update();\n      return {\n        left: self.__scrollLeft,\n        top: self.__scrollTop,\n        zoom: 1\n      };\n    },\n\n    /**\n     * Updates the __scrollLeft and __scrollTop values to el's current value\n     */\n    update: function() {\n      var self = this;\n      self.__scrollLeft = self.el.scrollLeft;\n      self.__scrollTop = self.el.scrollTop;\n    },\n\n    /**\n     * Configures the dimensions of the client (outer) and content (inner) elements.\n     * Requires the available space for the outer element and the outer size of the inner element.\n     * All values which are falsy (null or zero etc.) are ignored and the old value is kept.\n     *\n     * @param clientWidth {Integer} Inner width of outer element\n     * @param clientHeight {Integer} Inner height of outer element\n     * @param contentWidth {Integer} Outer width of inner element\n     * @param contentHeight {Integer} Outer height of inner element\n     */\n    setDimensions: function(clientWidth, clientHeight, contentWidth, contentHeight) {\n      var self = this;\n\n      if (!clientWidth && !clientHeight && !contentWidth && !contentHeight) {\n        // this scrollview isn't rendered, don't bother\n        return;\n      }\n\n      // Only update values which are defined\n      if (clientWidth === +clientWidth) {\n        self.__clientWidth = clientWidth;\n      }\n\n      if (clientHeight === +clientHeight) {\n        self.__clientHeight = clientHeight;\n      }\n\n      if (contentWidth === +contentWidth) {\n        self.__contentWidth = contentWidth;\n      }\n\n      if (contentHeight === +contentHeight) {\n        self.__contentHeight = contentHeight;\n      }\n\n      // Refresh maximums\n      self.__computeScrollMax();\n    },\n\n    /**\n     * Returns the maximum scroll values\n     *\n     * @return {Map} `left` and `top` maximum scroll values\n     */\n    getScrollMax: function() {\n      return {\n        left: this.__maxScrollLeft,\n        top: this.__maxScrollTop\n      };\n    },\n\n    /**\n     * Scrolls by the given amount in px.\n     *\n     * @param left {Number} Horizontal scroll position, keeps current if value is <code>null</code>\n     * @param top {Number} Vertical scroll position, keeps current if value is <code>null</code>\n     * @param animate {Boolean} Whether the scrolling should happen using an animation\n     */\n\n    scrollBy: function(left, top, animate) {\n      var self = this;\n\n      // update scroll vars before refferencing them\n      self.update();\n\n      var startLeft = self.__isAnimating ? self.__scheduledLeft : self.__scrollLeft;\n      var startTop = self.__isAnimating ? self.__scheduledTop : self.__scrollTop;\n\n      self.scrollTo(startLeft + (left || 0), startTop + (top || 0), animate);\n    },\n\n    /**\n     * Scrolls to the given position in px.\n     *\n     * @param left {Number} Horizontal scroll position, keeps current if value is <code>null</code>\n     * @param top {Number} Vertical scroll position, keeps current if value is <code>null</code>\n     * @param animate {Boolean} Whether the scrolling should happen using an animation\n     */\n    scrollTo: function(left, top, animate) {\n      var self = this;\n      if (!animate) {\n        self.el.scrollTop = top;\n        self.el.scrollLeft = left;\n        self.resize();\n        return;\n      }\n\n      var oldOverflowX = self.el.style.overflowX;\n      var oldOverflowY = self.el.style.overflowY;\n\n      clearTimeout(self.__scrollToCleanupTimeout);\n      self.__scrollToCleanupTimeout = setTimeout(function() {\n        self.el.style.overflowX = oldOverflowX;\n        self.el.style.overflowY = oldOverflowY;\n      }, 500);\n\n      self.el.style.overflowY = 'hidden';\n      self.el.style.overflowX = 'hidden';\n\n      animateScroll(top, left);\n\n      function animateScroll(Y, X) {\n        // scroll animation loop w/ easing\n        // credit https://gist.github.com/dezinezync/5487119\n        var start = Date.now(),\n          duration = 250, //milliseconds\n          fromY = self.el.scrollTop,\n          fromX = self.el.scrollLeft;\n\n        if (fromY === Y && fromX === X) {\n          self.el.style.overflowX = oldOverflowX;\n          self.el.style.overflowY = oldOverflowY;\n          self.resize();\n          return; /* Prevent scrolling to the Y point if already there */\n        }\n\n        // decelerating to zero velocity\n        function easeOutCubic(t) {\n          return (--t) * t * t + 1;\n        }\n\n        // scroll loop\n        function animateScrollStep() {\n          var currentTime = Date.now(),\n            time = Math.min(1, ((currentTime - start) / duration)),\n          // where .5 would be 50% of time on a linear scale easedT gives a\n          // fraction based on the easing method\n            easedT = easeOutCubic(time);\n\n          if (fromY != Y) {\n            self.el.scrollTop = parseInt((easedT * (Y - fromY)) + fromY, 10);\n          }\n          if (fromX != X) {\n            self.el.scrollLeft = parseInt((easedT * (X - fromX)) + fromX, 10);\n          }\n\n          if (time < 1) {\n            ionic.requestAnimationFrame(animateScrollStep);\n\n          } else {\n            // done\n            ionic.tap.removeClonedInputs(self.__container, self);\n            self.el.style.overflowX = oldOverflowX;\n            self.el.style.overflowY = oldOverflowY;\n            self.resize();\n          }\n        }\n\n        // start scroll loop\n        ionic.requestAnimationFrame(animateScrollStep);\n      }\n    },\n\n\n\n    /*\n     ---------------------------------------------------------------------------\n     PRIVATE API\n     ---------------------------------------------------------------------------\n     */\n\n    /**\n     * If the scroll view isn't sized correctly on start, wait until we have at least some size\n     */\n    __waitForSize: function() {\n      var self = this;\n\n      clearTimeout(self.__sizerTimeout);\n\n      var sizer = function() {\n        self.resize(true);\n      };\n\n      sizer();\n      self.__sizerTimeout = setTimeout(sizer, 500);\n    },\n\n\n    /**\n     * Recomputes scroll minimum values based on client dimensions and content dimensions.\n     */\n    __computeScrollMax: function() {\n      var self = this;\n\n      self.__maxScrollLeft = Math.max((self.__contentWidth) - self.__clientWidth, 0);\n      self.__maxScrollTop = Math.max((self.__contentHeight) - self.__clientHeight, 0);\n\n      if (!self.__didWaitForSize && !self.__maxScrollLeft && !self.__maxScrollTop) {\n        self.__didWaitForSize = true;\n        self.__waitForSize();\n      }\n    },\n\n    __initEventHandlers: function() {\n      var self = this;\n\n      // Event Handler\n      var container = self.__container;\n      // save height when scroll view is shrunk so we don't need to reflow\n      var scrollViewOffsetHeight;\n\n      var lastKeyboardHeight;\n\n      /**\n       * Shrink the scroll view when the keyboard is up if necessary and if the\n       * focused input is below the bottom of the shrunk scroll view, scroll it\n       * into view.\n       */\n      self.scrollChildIntoView = function(e) {\n        var rect = container.getBoundingClientRect();\n        if(!self.__originalContainerHeight) {\n          self.__originalContainerHeight = rect.height;\n        }\n\n        // D\n        //var scrollBottomOffsetToTop = rect.bottom;\n        // D - A\n        scrollViewOffsetHeight = self.__originalContainerHeight;\n        //console.log('Scroll view offset height', scrollViewOffsetHeight);\n        //console.dir(container);\n        var alreadyShrunk = self.isShrunkForKeyboard;\n\n        var isModal = container.parentNode.classList.contains('modal');\n        var isPopover = container.parentNode.classList.contains('popover');\n        // 680px is when the media query for 60% modal width kicks in\n        var isInsetModal = isModal && window.innerWidth >= 680;\n\n       /*\n        *  _______\n        * |---A---| <- top of scroll view\n        * |       |\n        * |---B---| <- keyboard\n        * |   C   | <- input\n        * |---D---| <- initial bottom of scroll view\n        * |___E___| <- bottom of viewport\n        *\n        *  All commented calculations relative to the top of the viewport (ie E\n        *  is the viewport height, not 0)\n        */\n\n\n        var changedKeyboardHeight = lastKeyboardHeight && (lastKeyboardHeight !== e.detail.keyboardHeight);\n\n        if (!alreadyShrunk || changedKeyboardHeight) {\n          // shrink scrollview so we can actually scroll if the input is hidden\n          // if it isn't shrink so we can scroll to inputs under the keyboard\n          // inset modals won't shrink on Android on their own when the keyboard appears\n          if ( !isPopover && (ionic.Platform.isIOS() || ionic.Platform.isFullScreen || isInsetModal) ) {\n            // if there are things below the scroll view account for them and\n            // subtract them from the keyboard height when resizing\n            // E - D                         E                         D\n            //var scrollBottomOffsetToBottom = e.detail.viewportHeight - scrollBottomOffsetToTop;\n\n            // 0 or D - B if D > B           E - B                     E - D\n            //var keyboardOffset = e.detail.keyboardHeight - scrollBottomOffsetToBottom;\n\n            ionic.requestAnimationFrame(function(){\n              // D - A or B - A if D > B       D - A             max(0, D - B)\n              scrollViewOffsetHeight = Math.max(0, Math.min(self.__originalContainerHeight, self.__originalContainerHeight - (e.detail.keyboardHeight - 43)));//keyboardOffset >= 0 ? scrollViewOffsetHeight - keyboardOffset : scrollViewOffsetHeight + keyboardOffset;\n\n              //console.log('Old container height', self.__originalContainerHeight, 'New container height', scrollViewOffsetHeight, 'Keyboard height', e.detail.keyboardHeight);\n\n              container.style.height = scrollViewOffsetHeight + \"px\";\n\n              /*\n              if (ionic.Platform.isIOS()) {\n                // Force redraw to avoid disappearing content\n                var disp = container.style.display;\n                container.style.display = 'none';\n                var trick = container.offsetHeight;\n                container.style.display = disp;\n              }\n              */\n              container.classList.add('keyboard-up');\n              //update scroll view\n              self.resize();\n            });\n          }\n\n          self.isShrunkForKeyboard = true;\n        }\n\n        lastKeyboardHeight = e.detail.keyboardHeight;\n\n        /*\n         *  _______\n         * |---A---| <- top of scroll view\n         * |   *   | <- where we want to scroll to\n         * |--B-D--| <- keyboard, bottom of scroll view\n         * |   C   | <- input\n         * |       |\n         * |___E___| <- bottom of viewport\n         *\n         *  All commented calculations relative to the top of the viewport (ie E\n         *  is the viewport height, not 0)\n         */\n        // if the element is positioned under the keyboard scroll it into view\n        if (e.detail.isElementUnderKeyboard) {\n\n          ionic.requestAnimationFrame(function(){\n            var pos = ionic.DomUtil.getOffsetTop(e.detail.target);\n            setTimeout(function() {\n              if (ionic.Platform.isIOS()) {\n                ionic.tap.cloneFocusedInput(container, self);\n              }\n              // Scroll the input into view, with a 100px buffer\n              self.scrollTo(0, pos - (rect.top + 100), true);\n              self.onScroll();\n            }, 32);\n\n            /*\n            // update D if we shrunk\n            if (self.isShrunkForKeyboard && !alreadyShrunk) {\n              scrollBottomOffsetToTop = container.getBoundingClientRect().bottom;\n              console.log('Scroll bottom', scrollBottomOffsetToTop);\n            }\n\n            // middle of the scrollview, this is where we want to scroll to\n            // (D - A) / 2\n            var scrollMidpointOffset = scrollViewOffsetHeight * 0.5;\n            console.log('Midpoint', scrollMidpointOffset);\n            //console.log(\"container.offsetHeight: \" + scrollViewOffsetHeight);\n\n            // middle of the input we want to scroll into view\n            // C\n            var inputMidpoint = ((e.detail.elementBottom + e.detail.elementTop) / 2);\n            console.log('Input midpoint');\n\n            // distance from middle of input to the bottom of the scroll view\n            // C - D                                C               D\n            var inputMidpointOffsetToScrollBottom = inputMidpoint - scrollBottomOffsetToTop;\n            console.log('Input midpoint offset', inputMidpointOffsetToScrollBottom);\n\n            //C - D + (D - A)/2          C - D                     (D - A)/ 2\n            var scrollTop = inputMidpointOffsetToScrollBottom + scrollMidpointOffset;\n            console.log('Scroll top', scrollTop);\n\n            if ( scrollTop > 0) {\n              if (ionic.Platform.isIOS()) {\n                //just shrank scroll view, give it some breathing room before scrolling\n                setTimeout(function(){\n                  ionic.tap.cloneFocusedInput(container, self);\n                  self.scrollBy(0, scrollTop, true);\n                  self.onScroll();\n                }, 32);\n              } else {\n                self.scrollBy(0, scrollTop, true);\n                self.onScroll();\n              }\n            }\n            */\n          });\n        }\n\n        // Only the first scrollView parent of the element that broadcasted this event\n        // (the active element that needs to be shown) should receive this event\n        e.stopPropagation();\n      };\n\n      self.resetScrollView = function() {\n        //return scrollview to original height once keyboard has hidden\n        if (self.isShrunkForKeyboard) {\n          self.isShrunkForKeyboard = false;\n          container.style.height = \"\";\n\n          /*\n          if (ionic.Platform.isIOS()) {\n            // Force redraw to avoid disappearing content\n            var disp = container.style.display;\n            container.style.display = 'none';\n            var trick = container.offsetHeight;\n            container.style.display = disp;\n          }\n          */\n\n          self.__originalContainerHeight = container.getBoundingClientRect().height;\n\n          if (ionic.Platform.isIOS()) {\n            ionic.requestAnimationFrame(function() {\n              container.classList.remove('keyboard-up');\n            });\n          }\n\n        }\n        self.resize();\n      };\n\n      self.handleTouchMove = function(e) {\n        if (self.__frozenShut) {\n          e.preventDefault();\n          e.stopPropagation();\n          return false;\n\n        } else if ( self.__frozen ){\n          e.preventDefault();\n          // let it propagate so other events such as drag events can happen,\n          // but don't let it actually scroll\n          return false;\n        }\n        return true;\n      };\n\n      container.addEventListener('scroll', self.onScroll);\n\n      //Broadcasted when keyboard is shown on some platforms.\n      //See js/utils/keyboard.js\n      container.addEventListener('scrollChildIntoView', self.scrollChildIntoView);\n\n      container.addEventListener(ionic.EVENTS.touchstart, self.handleTouchMove);\n      container.addEventListener(ionic.EVENTS.touchmove, self.handleTouchMove);\n\n      // Listen on document because container may not have had the last\n      // keyboardActiveElement, for example after closing a modal with a focused\n      // input and returning to a previously resized scroll view in an ion-content.\n      // Since we can only resize scroll views that are currently visible, just resize\n      // the current scroll view when the keyboard is closed.\n      document.addEventListener('resetScrollView', self.resetScrollView);\n    },\n\n    __cleanup: function() {\n      var self = this;\n      var container = self.__container;\n\n      container.removeEventListener('scroll', self.onScroll);\n      container.removeEventListener('scrollChildIntoView', self.scrollChildIntoView);\n\n      container.removeEventListener(ionic.EVENTS.touchstart, self.handleTouchMove);\n      container.removeEventListener(ionic.EVENTS.touchmove, self.handleTouchMove);\n\n      document.removeEventListener('resetScrollView', self.resetScrollView);\n\n      ionic.tap.removeClonedInputs(container, self);\n\n      delete self.__container;\n      delete self.__content;\n      delete self.__indicatorX;\n      delete self.__indicatorY;\n      delete self.options.el;\n\n      self.resize = self.scrollTo = self.onScroll = self.resetScrollView = NOOP;\n      self.scrollChildIntoView = NOOP;\n      container = null;\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  var ITEM_CLASS = 'item';\n  var ITEM_CONTENT_CLASS = 'item-content';\n  var ITEM_SLIDING_CLASS = 'item-sliding';\n  var ITEM_OPTIONS_CLASS = 'item-options';\n  var ITEM_PLACEHOLDER_CLASS = 'item-placeholder';\n  var ITEM_REORDERING_CLASS = 'item-reordering';\n  var ITEM_REORDER_BTN_CLASS = 'item-reorder';\n\n  var DragOp = function() {};\n  DragOp.prototype = {\n    start: function(){},\n    drag: function(){},\n    end: function(){},\n    isSameItem: function() {\n      return false;\n    }\n  };\n\n  var SlideDrag = function(opts) {\n    this.dragThresholdX = opts.dragThresholdX || 10;\n    this.el = opts.el;\n    this.item = opts.item;\n    this.canSwipe = opts.canSwipe;\n  };\n\n  SlideDrag.prototype = new DragOp();\n\n  SlideDrag.prototype.start = function(e) {\n    var content, buttons, offsetX, buttonsWidth;\n\n    if (!this.canSwipe()) {\n      return;\n    }\n\n    if (e.target.classList.contains(ITEM_CONTENT_CLASS)) {\n      content = e.target;\n    } else if (e.target.classList.contains(ITEM_CLASS)) {\n      content = e.target.querySelector('.' + ITEM_CONTENT_CLASS);\n    } else {\n      content = ionic.DomUtil.getParentWithClass(e.target, ITEM_CONTENT_CLASS);\n    }\n\n    // If we don't have a content area as one of our children (or ourselves), skip\n    if (!content) {\n      return;\n    }\n\n    // Make sure we aren't animating as we slide\n    content.classList.remove(ITEM_SLIDING_CLASS);\n\n    // Grab the starting X point for the item (for example, so we can tell whether it is open or closed to start)\n    offsetX = parseFloat(content.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]) || 0;\n\n    // Grab the buttons\n    buttons = content.parentNode.querySelector('.' + ITEM_OPTIONS_CLASS);\n    if (!buttons) {\n      return;\n    }\n    buttons.classList.remove('invisible');\n\n    buttonsWidth = buttons.offsetWidth;\n\n    this._currentDrag = {\n      buttons: buttons,\n      buttonsWidth: buttonsWidth,\n      content: content,\n      startOffsetX: offsetX\n    };\n  };\n\n  /**\n   * Check if this is the same item that was previously dragged.\n   */\n  SlideDrag.prototype.isSameItem = function(op) {\n    if (op._lastDrag && this._currentDrag) {\n      return this._currentDrag.content == op._lastDrag.content;\n    }\n    return false;\n  };\n\n  SlideDrag.prototype.clean = function(isInstant) {\n    var lastDrag = this._lastDrag;\n\n    if (!lastDrag || !lastDrag.content) return;\n\n    lastDrag.content.style[ionic.CSS.TRANSITION] = '';\n    lastDrag.content.style[ionic.CSS.TRANSFORM] = '';\n    if (isInstant) {\n      lastDrag.content.style[ionic.CSS.TRANSITION] = 'none';\n      makeInvisible();\n      ionic.requestAnimationFrame(function() {\n        lastDrag.content.style[ionic.CSS.TRANSITION] = '';\n      });\n    } else {\n      ionic.requestAnimationFrame(function() {\n        setTimeout(makeInvisible, 250);\n      });\n    }\n    function makeInvisible() {\n      lastDrag.buttons && lastDrag.buttons.classList.add('invisible');\n    }\n  };\n\n  SlideDrag.prototype.drag = ionic.animationFrameThrottle(function(e) {\n    var buttonsWidth;\n\n    // We really aren't dragging\n    if (!this._currentDrag) {\n      return;\n    }\n\n    // Check if we should start dragging. Check if we've dragged past the threshold,\n    // or we are starting from the open state.\n    if (!this._isDragging &&\n        ((Math.abs(e.gesture.deltaX) > this.dragThresholdX) ||\n        (Math.abs(this._currentDrag.startOffsetX) > 0))) {\n      this._isDragging = true;\n    }\n\n    if (this._isDragging) {\n      buttonsWidth = this._currentDrag.buttonsWidth;\n\n      // Grab the new X point, capping it at zero\n      var newX = Math.min(0, this._currentDrag.startOffsetX + e.gesture.deltaX);\n\n      // If the new X position is past the buttons, we need to slow down the drag (rubber band style)\n      if (newX < -buttonsWidth) {\n        // Calculate the new X position, capped at the top of the buttons\n        newX = Math.min(-buttonsWidth, -buttonsWidth + (((e.gesture.deltaX + buttonsWidth) * 0.4)));\n      }\n\n      this._currentDrag.content.$$ionicOptionsOpen = newX !== 0;\n\n      this._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + newX + 'px, 0, 0)';\n      this._currentDrag.content.style[ionic.CSS.TRANSITION] = 'none';\n    }\n  });\n\n  SlideDrag.prototype.end = function(e, doneCallback) {\n    var self = this;\n\n    // There is no drag, just end immediately\n    if (!self._currentDrag) {\n      doneCallback && doneCallback();\n      return;\n    }\n\n    // If we are currently dragging, we want to snap back into place\n    // The final resting point X will be the width of the exposed buttons\n    var restingPoint = -self._currentDrag.buttonsWidth;\n\n    // Check if the drag didn't clear the buttons mid-point\n    // and we aren't moving fast enough to swipe open\n    if (e.gesture.deltaX > -(self._currentDrag.buttonsWidth / 2)) {\n\n      // If we are going left but too slow, or going right, go back to resting\n      if (e.gesture.direction == \"left\" && Math.abs(e.gesture.velocityX) < 0.3) {\n        restingPoint = 0;\n\n      } else if (e.gesture.direction == \"right\") {\n        restingPoint = 0;\n      }\n\n    }\n\n    ionic.requestAnimationFrame(function() {\n      if (restingPoint === 0) {\n        self._currentDrag.content.style[ionic.CSS.TRANSFORM] = '';\n        var buttons = self._currentDrag.buttons;\n        setTimeout(function() {\n          buttons && buttons.classList.add('invisible');\n        }, 250);\n      } else {\n        self._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + restingPoint + 'px,0,0)';\n      }\n      self._currentDrag.content.style[ionic.CSS.TRANSITION] = '';\n\n\n      // Kill the current drag\n      if (!self._lastDrag) {\n        self._lastDrag = {};\n      }\n      ionic.extend(self._lastDrag, self._currentDrag);\n      if (self._currentDrag) {\n        self._currentDrag.buttons = null;\n        self._currentDrag.content = null;\n      }\n      self._currentDrag = null;\n\n      // We are done, notify caller\n      doneCallback && doneCallback();\n    });\n  };\n\n  var ReorderDrag = function(opts) {\n    var self = this;\n\n    self.dragThresholdY = opts.dragThresholdY || 0;\n    self.onReorder = opts.onReorder;\n    self.listEl = opts.listEl;\n    self.el = self.item = opts.el;\n    self.scrollEl = opts.scrollEl;\n    self.scrollView = opts.scrollView;\n    // Get the True Top of the list el http://www.quirksmode.org/js/findpos.html\n    self.listElTrueTop = 0;\n    if (self.listEl.offsetParent) {\n      var obj = self.listEl;\n      do {\n        self.listElTrueTop += obj.offsetTop;\n        obj = obj.offsetParent;\n      } while (obj);\n    }\n  };\n\n  ReorderDrag.prototype = new DragOp();\n\n  ReorderDrag.prototype._moveElement = function(e) {\n    var y = e.gesture.center.pageY +\n      this.scrollView.getValues().top -\n      (this._currentDrag.elementHeight / 2) -\n      this.listElTrueTop;\n    this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(0, ' + y + 'px, 0)';\n  };\n\n  ReorderDrag.prototype.deregister = function() {\n    this.listEl = this.el = this.scrollEl = this.scrollView = null;\n  };\n\n  ReorderDrag.prototype.start = function(e) {\n\n    var startIndex = ionic.DomUtil.getChildIndex(this.el, this.el.nodeName.toLowerCase());\n    var elementHeight = this.el.scrollHeight;\n    var placeholder = this.el.cloneNode(true);\n\n    placeholder.classList.add(ITEM_PLACEHOLDER_CLASS);\n\n    this.el.parentNode.insertBefore(placeholder, this.el);\n    this.el.classList.add(ITEM_REORDERING_CLASS);\n\n    this._currentDrag = {\n      elementHeight: elementHeight,\n      startIndex: startIndex,\n      placeholder: placeholder,\n      scrollHeight: scroll,\n      list: placeholder.parentNode\n    };\n\n    this._moveElement(e);\n  };\n\n  ReorderDrag.prototype.drag = ionic.animationFrameThrottle(function(e) {\n    // We really aren't dragging\n    var self = this;\n    if (!this._currentDrag) {\n      return;\n    }\n\n    var scrollY = 0;\n    var pageY = e.gesture.center.pageY;\n    var offset = this.listElTrueTop;\n\n    //If we have a scrollView, check scroll boundaries for dragged element and scroll if necessary\n    if (this.scrollView) {\n\n      var container = this.scrollView.__container;\n      scrollY = this.scrollView.getValues().top;\n\n      var containerTop = container.offsetTop;\n      var pixelsPastTop = containerTop - pageY + this._currentDrag.elementHeight / 2;\n      var pixelsPastBottom = pageY + this._currentDrag.elementHeight / 2 - containerTop - container.offsetHeight;\n\n      if (e.gesture.deltaY < 0 && pixelsPastTop > 0 && scrollY > 0) {\n        this.scrollView.scrollBy(null, -pixelsPastTop);\n        //Trigger another drag so the scrolling keeps going\n        ionic.requestAnimationFrame(function() {\n          self.drag(e);\n        });\n      }\n      if (e.gesture.deltaY > 0 && pixelsPastBottom > 0) {\n        if (scrollY < this.scrollView.getScrollMax().top) {\n          this.scrollView.scrollBy(null, pixelsPastBottom);\n          //Trigger another drag so the scrolling keeps going\n          ionic.requestAnimationFrame(function() {\n            self.drag(e);\n          });\n        }\n      }\n    }\n\n    // Check if we should start dragging. Check if we've dragged past the threshold,\n    // or we are starting from the open state.\n    if (!this._isDragging && Math.abs(e.gesture.deltaY) > this.dragThresholdY) {\n      this._isDragging = true;\n    }\n\n    if (this._isDragging) {\n      this._moveElement(e);\n\n      this._currentDrag.currentY = scrollY + pageY - offset;\n\n      // this._reorderItems();\n    }\n  });\n\n  // When an item is dragged, we need to reorder any items for sorting purposes\n  ReorderDrag.prototype._getReorderIndex = function() {\n    var self = this;\n\n    var siblings = Array.prototype.slice.call(self._currentDrag.placeholder.parentNode.children)\n      .filter(function(el) {\n        return el.nodeName === self.el.nodeName && el !== self.el;\n      });\n\n    var dragOffsetTop = self._currentDrag.currentY;\n    var el;\n    for (var i = 0, len = siblings.length; i < len; i++) {\n      el = siblings[i];\n      if (i === len - 1) {\n        if (dragOffsetTop > el.offsetTop) {\n          return i;\n        }\n      } else if (i === 0) {\n        if (dragOffsetTop < el.offsetTop + el.offsetHeight) {\n          return i;\n        }\n      } else if (dragOffsetTop > el.offsetTop - el.offsetHeight / 2 &&\n                 dragOffsetTop < el.offsetTop + el.offsetHeight) {\n        return i;\n      }\n    }\n    return self._currentDrag.startIndex;\n  };\n\n  ReorderDrag.prototype.end = function(e, doneCallback) {\n    if (!this._currentDrag) {\n      doneCallback && doneCallback();\n      return;\n    }\n\n    var placeholder = this._currentDrag.placeholder;\n    var finalIndex = this._getReorderIndex();\n\n    // Reposition the element\n    this.el.classList.remove(ITEM_REORDERING_CLASS);\n    this.el.style[ionic.CSS.TRANSFORM] = '';\n\n    placeholder.parentNode.insertBefore(this.el, placeholder);\n    placeholder.parentNode.removeChild(placeholder);\n\n    this.onReorder && this.onReorder(this.el, this._currentDrag.startIndex, finalIndex);\n\n    this._currentDrag = {\n      placeholder: null,\n      content: null\n    };\n    this._currentDrag = null;\n    doneCallback && doneCallback();\n  };\n\n\n\n  /**\n   * The ListView handles a list of items. It will process drag animations, edit mode,\n   * and other operations that are common on mobile lists or table views.\n   */\n  ionic.views.ListView = ionic.views.View.inherit({\n    initialize: function(opts) {\n      var self = this;\n\n      opts = ionic.extend({\n        onReorder: function() {},\n        virtualRemoveThreshold: -200,\n        virtualAddThreshold: 200,\n        canSwipe: function() {\n          return true;\n        }\n      }, opts);\n\n      ionic.extend(self, opts);\n\n      if (!self.itemHeight && self.listEl) {\n        self.itemHeight = self.listEl.children[0] && parseInt(self.listEl.children[0].style.height, 10);\n      }\n\n      self.onRefresh = opts.onRefresh || function() {};\n      self.onRefreshOpening = opts.onRefreshOpening || function() {};\n      self.onRefreshHolding = opts.onRefreshHolding || function() {};\n\n      var gestureOpts = {};\n      // don't prevent native scrolling\n      if (ionic.DomUtil.getParentOrSelfWithClass(self.el, 'overflow-scroll')) {\n        gestureOpts.prevent_default_directions = ['left', 'right'];\n      }\n\n      window.ionic.onGesture('release', function(e) {\n        self._handleEndDrag(e);\n      }, self.el, gestureOpts);\n\n      window.ionic.onGesture('drag', function(e) {\n        self._handleDrag(e);\n      }, self.el, gestureOpts);\n      // Start the drag states\n      self._initDrag();\n    },\n\n    /**\n     * Be sure to cleanup references.\n     */\n    deregister: function() {\n      this.el = this.listEl = this.scrollEl = this.scrollView = null;\n\n      // ensure no scrolls have been left frozen\n      if (this.isScrollFreeze) {\n        self.scrollView.freeze(false);\n      }\n    },\n\n    /**\n     * Called to tell the list to stop refreshing. This is useful\n     * if you are refreshing the list and are done with refreshing.\n     */\n    stopRefreshing: function() {\n      var refresher = this.el.querySelector('.list-refresher');\n      refresher.style.height = '0';\n    },\n\n    /**\n     * If we scrolled and have virtual mode enabled, compute the window\n     * of active elements in order to figure out the viewport to render.\n     */\n    didScroll: function(e) {\n      var self = this;\n\n      if (self.isVirtual) {\n        var itemHeight = self.itemHeight;\n\n        // Grab the total height of the list\n        var scrollHeight = e.target.scrollHeight;\n\n        // Get the viewport height\n        var viewportHeight = self.el.parentNode.offsetHeight;\n\n        // High water is the pixel position of the first element to include (everything before\n        // that will be removed)\n        var highWater = Math.max(0, e.scrollTop + self.virtualRemoveThreshold);\n\n        // Low water is the pixel position of the last element to include (everything after\n        // that will be removed)\n        var lowWater = Math.min(scrollHeight, Math.abs(e.scrollTop) + viewportHeight + self.virtualAddThreshold);\n\n        // Get the first and last elements in the list based on how many can fit\n        // between the pixel range of lowWater and highWater\n        var first = parseInt(Math.abs(highWater / itemHeight), 10);\n        var last = parseInt(Math.abs(lowWater / itemHeight), 10);\n\n        // Get the items we need to remove\n        self._virtualItemsToRemove = Array.prototype.slice.call(self.listEl.children, 0, first);\n\n        self.renderViewport && self.renderViewport(highWater, lowWater, first, last);\n      }\n    },\n\n    didStopScrolling: function() {\n      if (this.isVirtual) {\n        for (var i = 0; i < this._virtualItemsToRemove.length; i++) {\n          //el.parentNode.removeChild(el);\n          this.didHideItem && this.didHideItem(i);\n        }\n        // Once scrolling stops, check if we need to remove old items\n\n      }\n    },\n\n    /**\n     * Clear any active drag effects on the list.\n     */\n    clearDragEffects: function(isInstant) {\n      if (this._lastDragOp) {\n        this._lastDragOp.clean && this._lastDragOp.clean(isInstant);\n        this._lastDragOp.deregister && this._lastDragOp.deregister();\n        this._lastDragOp = null;\n      }\n    },\n\n    _initDrag: function() {\n      // Store the last one\n      if (this._lastDragOp) {\n        this._lastDragOp.deregister && this._lastDragOp.deregister();\n      }\n      this._lastDragOp = this._dragOp;\n\n      this._dragOp = null;\n    },\n\n    // Return the list item from the given target\n    _getItem: function(target) {\n      while (target) {\n        if (target.classList && target.classList.contains(ITEM_CLASS)) {\n          return target;\n        }\n        target = target.parentNode;\n      }\n      return null;\n    },\n\n\n    _startDrag: function(e) {\n      var self = this;\n\n      self._isDragging = false;\n\n      var lastDragOp = self._lastDragOp;\n      var item;\n\n      // If we have an open SlideDrag and we're scrolling the list. Clear it.\n      if (self._didDragUpOrDown && lastDragOp instanceof SlideDrag) {\n          lastDragOp.clean && lastDragOp.clean();\n      }\n\n      // Check if this is a reorder drag\n      if (ionic.DomUtil.getParentOrSelfWithClass(e.target, ITEM_REORDER_BTN_CLASS) && (e.gesture.direction == 'up' || e.gesture.direction == 'down')) {\n        item = self._getItem(e.target);\n\n        if (item) {\n          self._dragOp = new ReorderDrag({\n            listEl: self.el,\n            el: item,\n            scrollEl: self.scrollEl,\n            scrollView: self.scrollView,\n            onReorder: function(el, start, end) {\n              self.onReorder && self.onReorder(el, start, end);\n            }\n          });\n          self._dragOp.start(e);\n          e.preventDefault();\n        }\n      }\n\n      // Or check if this is a swipe to the side drag\n      else if (!self._didDragUpOrDown && (e.gesture.direction == 'left' || e.gesture.direction == 'right') && Math.abs(e.gesture.deltaX) > 5) {\n\n        // Make sure this is an item with buttons\n        item = self._getItem(e.target);\n        if (item && item.querySelector('.item-options')) {\n          self._dragOp = new SlideDrag({\n            el: self.el,\n            item: item,\n            canSwipe: self.canSwipe\n          });\n          self._dragOp.start(e);\n          e.preventDefault();\n          self.isScrollFreeze = self.scrollView.freeze(true);\n        }\n      }\n\n      // If we had a last drag operation and this is a new one on a different item, clean that last one\n      if (lastDragOp && self._dragOp && !self._dragOp.isSameItem(lastDragOp) && e.defaultPrevented) {\n        lastDragOp.clean && lastDragOp.clean();\n      }\n    },\n\n\n    _handleEndDrag: function(e) {\n      var self = this;\n\n      if (self.scrollView) {\n        self.isScrollFreeze = self.scrollView.freeze(false);\n      }\n\n      self._didDragUpOrDown = false;\n\n      if (!self._dragOp) {\n        return;\n      }\n\n      self._dragOp.end(e, function() {\n        self._initDrag();\n      });\n    },\n\n    /**\n     * Process the drag event to move the item to the left or right.\n     */\n    _handleDrag: function(e) {\n      var self = this;\n\n      if (Math.abs(e.gesture.deltaY) > 5) {\n        self._didDragUpOrDown = true;\n      }\n\n      // If we get a drag event, make sure we aren't in another drag, then check if we should\n      // start one\n      if (!self.isDragging && !self._dragOp) {\n        self._startDrag(e);\n      }\n\n      // No drag still, pass it up\n      if (!self._dragOp) {\n        return;\n      }\n\n      e.gesture.srcEvent.preventDefault();\n      self._dragOp.drag(e);\n    }\n\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  ionic.views.Modal = ionic.views.View.inherit({\n    initialize: function(opts) {\n      opts = ionic.extend({\n        focusFirstInput: false,\n        unfocusOnHide: true,\n        focusFirstDelay: 600,\n        backdropClickToClose: true,\n        hardwareBackButtonClose: true,\n      }, opts);\n\n      ionic.extend(this, opts);\n\n      this.el = opts.el;\n    },\n    show: function() {\n      var self = this;\n\n      if(self.focusFirstInput) {\n        // Let any animations run first\n        window.setTimeout(function() {\n          var input = self.el.querySelector('input, textarea');\n          input && input.focus && input.focus();\n        }, self.focusFirstDelay);\n      }\n    },\n    hide: function() {\n      // Unfocus all elements\n      if(this.unfocusOnHide) {\n        var inputs = this.el.querySelectorAll('input, textarea');\n        // Let any animations run first\n        window.setTimeout(function() {\n          for(var i = 0; i < inputs.length; i++) {\n            inputs[i].blur && inputs[i].blur();\n          }\n        });\n      }\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  /**\n   * The side menu view handles one of the side menu's in a Side Menu Controller\n   * configuration.\n   * It takes a DOM reference to that side menu element.\n   */\n  ionic.views.SideMenu = ionic.views.View.inherit({\n    initialize: function(opts) {\n      this.el = opts.el;\n      this.isEnabled = (typeof opts.isEnabled === 'undefined') ? true : opts.isEnabled;\n      this.setWidth(opts.width);\n    },\n    getFullWidth: function() {\n      return this.width;\n    },\n    setWidth: function(width) {\n      this.width = width;\n      this.el.style.width = width + 'px';\n    },\n    setIsEnabled: function(isEnabled) {\n      this.isEnabled = isEnabled;\n    },\n    bringUp: function() {\n      if(this.el.style.zIndex !== '0') {\n        this.el.style.zIndex = '0';\n      }\n    },\n    pushDown: function() {\n      if(this.el.style.zIndex !== '-1') {\n        this.el.style.zIndex = '-1';\n      }\n    }\n  });\n\n  ionic.views.SideMenuContent = ionic.views.View.inherit({\n    initialize: function(opts) {\n      ionic.extend(this, {\n        animationClass: 'menu-animated',\n        onDrag: function() {},\n        onEndDrag: function() {}\n      }, opts);\n\n      ionic.onGesture('drag', ionic.proxy(this._onDrag, this), this.el);\n      ionic.onGesture('release', ionic.proxy(this._onEndDrag, this), this.el);\n    },\n    _onDrag: function(e) {\n      this.onDrag && this.onDrag(e);\n    },\n    _onEndDrag: function(e) {\n      this.onEndDrag && this.onEndDrag(e);\n    },\n    disableAnimation: function() {\n      this.el.classList.remove(this.animationClass);\n    },\n    enableAnimation: function() {\n      this.el.classList.add(this.animationClass);\n    },\n    getTranslateX: function() {\n      return parseFloat(this.el.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]);\n    },\n    setTranslateX: ionic.animationFrameThrottle(function(x) {\n      this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(' + x + 'px, 0, 0)';\n    })\n  });\n\n})(ionic);\n\n/*\n * Adapted from Swipe.js 2.0\n *\n * Brad Birdsall\n * Copyright 2013, MIT License\n *\n*/\n\n(function(ionic) {\n'use strict';\n\nionic.views.Slider = ionic.views.View.inherit({\n  initialize: function (options) {\n    var slider = this;\n\n    var touchStartEvent, touchMoveEvent, touchEndEvent;\n    if (window.navigator.pointerEnabled) {\n      touchStartEvent = 'pointerdown';\n      touchMoveEvent = 'pointermove';\n      touchEndEvent = 'pointerup';\n    } else if (window.navigator.msPointerEnabled) {\n      touchStartEvent = 'MSPointerDown';\n      touchMoveEvent = 'MSPointerMove';\n      touchEndEvent = 'MSPointerUp';\n    } else {\n      touchStartEvent = 'touchstart';\n      touchMoveEvent = 'touchmove';\n      touchEndEvent = 'touchend';\n    }\n\n    var mouseStartEvent = 'mousedown';\n    var mouseMoveEvent = 'mousemove';\n    var mouseEndEvent = 'mouseup';\n\n    // utilities\n    var noop = function() {}; // simple no operation function\n    var offloadFn = function(fn) { setTimeout(fn || noop, 0); }; // offload a functions execution\n\n    // check browser capabilities\n    var browser = {\n      addEventListener: !!window.addEventListener,\n      transitions: (function(temp) {\n        var props = ['transitionProperty', 'WebkitTransition', 'MozTransition', 'OTransition', 'msTransition'];\n        for ( var i in props ) if (temp.style[ props[i] ] !== undefined) return true;\n        return false;\n      })(document.createElement('swipe'))\n    };\n\n\n    var container = options.el;\n\n    // quit if no root element\n    if (!container) return;\n    var element = container.children[0];\n    var slides, slidePos, width, length;\n    options = options || {};\n    var index = parseInt(options.startSlide, 10) || 0;\n    var speed = options.speed || 300;\n    options.continuous = options.continuous !== undefined ? options.continuous : true;\n\n    function setup() {\n\n      // do not setup if the container has no width\n      if (!container.offsetWidth) {\n        return;\n      }\n\n      // cache slides\n      slides = element.children;\n      length = slides.length;\n\n      // set continuous to false if only one slide\n      if (slides.length < 2) options.continuous = false;\n\n      //special case if two slides\n      if (browser.transitions && options.continuous && slides.length < 3) {\n        element.appendChild(slides[0].cloneNode(true));\n        element.appendChild(element.children[1].cloneNode(true));\n        slides = element.children;\n      }\n\n      // create an array to store current positions of each slide\n      slidePos = new Array(slides.length);\n\n      // determine width of each slide\n      width = container.offsetWidth || container.getBoundingClientRect().width;\n\n      element.style.width = (slides.length * width) + 'px';\n\n      // stack elements\n      var pos = slides.length;\n      while(pos--) {\n\n        var slide = slides[pos];\n\n        slide.style.width = width + 'px';\n        slide.setAttribute('data-index', pos);\n\n        if (browser.transitions) {\n          slide.style.left = (pos * -width) + 'px';\n          move(pos, index > pos ? -width : (index < pos ? width : 0), 0);\n        }\n\n      }\n\n      // reposition elements before and after index\n      if (options.continuous && browser.transitions) {\n        move(circle(index - 1), -width, 0);\n        move(circle(index + 1), width, 0);\n      }\n\n      if (!browser.transitions) element.style.left = (index * -width) + 'px';\n\n      container.style.visibility = 'visible';\n\n      options.slidesChanged && options.slidesChanged();\n    }\n\n    function prev(slideSpeed) {\n\n      if (options.continuous) slide(index - 1, slideSpeed);\n      else if (index) slide(index - 1, slideSpeed);\n\n    }\n\n    function next(slideSpeed) {\n\n      if (options.continuous) slide(index + 1, slideSpeed);\n      else if (index < slides.length - 1) slide(index + 1, slideSpeed);\n\n    }\n\n    function circle(index) {\n\n      // a simple positive modulo using slides.length\n      return (slides.length + (index % slides.length)) % slides.length;\n\n    }\n\n    function slide(to, slideSpeed) {\n\n      // do nothing if already on requested slide\n      if (index == to) return;\n\n      if (!slides) {\n        index = to;\n        return;\n      }\n\n      if (browser.transitions) {\n\n        var direction = Math.abs(index - to) / (index - to); // 1: backward, -1: forward\n\n        // get the actual position of the slide\n        if (options.continuous) {\n          var naturalDirection = direction;\n          direction = -slidePos[circle(to)] / width;\n\n          // if going forward but to < index, use to = slides.length + to\n          // if going backward but to > index, use to = -slides.length + to\n          if (direction !== naturalDirection) to = -direction * slides.length + to;\n\n        }\n\n        var diff = Math.abs(index - to) - 1;\n\n        // move all the slides between index and to in the right direction\n        while (diff--) move( circle((to > index ? to : index) - diff - 1), width * direction, 0);\n\n        to = circle(to);\n\n        move(index, width * direction, slideSpeed || speed);\n        move(to, 0, slideSpeed || speed);\n\n        if (options.continuous) move(circle(to - direction), -(width * direction), 0); // we need to get the next in place\n\n      } else {\n\n        to = circle(to);\n        animate(index * -width, to * -width, slideSpeed || speed);\n        //no fallback for a circular continuous if the browser does not accept transitions\n      }\n\n      index = to;\n      offloadFn(options.callback && options.callback(index, slides[index]));\n    }\n\n    function move(index, dist, speed) {\n\n      translate(index, dist, speed);\n      slidePos[index] = dist;\n\n    }\n\n    function translate(index, dist, speed) {\n\n      var slide = slides[index];\n      var style = slide && slide.style;\n\n      if (!style) return;\n\n      style.webkitTransitionDuration =\n      style.MozTransitionDuration =\n      style.msTransitionDuration =\n      style.OTransitionDuration =\n      style.transitionDuration = speed + 'ms';\n\n      style.webkitTransform = 'translate(' + dist + 'px,0)' + 'translateZ(0)';\n      style.msTransform =\n      style.MozTransform =\n      style.OTransform = 'translateX(' + dist + 'px)';\n\n    }\n\n    function animate(from, to, speed) {\n\n      // if not an animation, just reposition\n      if (!speed) {\n\n        element.style.left = to + 'px';\n        return;\n\n      }\n\n      var start = +new Date();\n\n      var timer = setInterval(function() {\n\n        var timeElap = +new Date() - start;\n\n        if (timeElap > speed) {\n\n          element.style.left = to + 'px';\n\n          if (delay) begin();\n\n          options.transitionEnd && options.transitionEnd.call(event, index, slides[index]);\n\n          clearInterval(timer);\n          return;\n\n        }\n\n        element.style.left = (( (to - from) * (Math.floor((timeElap / speed) * 100) / 100) ) + from) + 'px';\n\n      }, 4);\n\n    }\n\n    // setup auto slideshow\n    var delay = options.auto || 0;\n    var interval;\n\n    function begin() {\n\n      interval = setTimeout(next, delay);\n\n    }\n\n    function stop() {\n\n      delay = options.auto || 0;\n      clearTimeout(interval);\n\n    }\n\n\n    // setup initial vars\n    var start = {};\n    var delta = {};\n    var isScrolling;\n\n    // setup event capturing\n    var events = {\n\n      handleEvent: function(event) {\n        if(!event.touches && event.pageX && event.pageY) {\n          event.touches = [{\n            pageX: event.pageX,\n            pageY: event.pageY\n          }];\n        }\n\n        switch (event.type) {\n          case touchStartEvent: this.start(event); break;\n          case mouseStartEvent: this.start(event); break;\n          case touchMoveEvent: this.touchmove(event); break;\n          case mouseMoveEvent: this.touchmove(event); break;\n          case touchEndEvent: offloadFn(this.end(event)); break;\n          case mouseEndEvent: offloadFn(this.end(event)); break;\n          case 'webkitTransitionEnd':\n          case 'msTransitionEnd':\n          case 'oTransitionEnd':\n          case 'otransitionend':\n          case 'transitionend': offloadFn(this.transitionEnd(event)); break;\n          case 'resize': offloadFn(setup); break;\n        }\n\n        if (options.stopPropagation) event.stopPropagation();\n\n      },\n      start: function(event) {\n\n        // prevent to start if there is no valid event\n        if (!event.touches) {\n          return;\n        }\n\n        var touches = event.touches[0];\n\n        // measure start values\n        start = {\n\n          // get initial touch coords\n          x: touches.pageX,\n          y: touches.pageY,\n\n          // store time to determine touch duration\n          time: +new Date()\n\n        };\n\n        // used for testing first move event\n        isScrolling = undefined;\n\n        // reset delta and end measurements\n        delta = {};\n\n        // attach touchmove and touchend listeners\n        element.addEventListener(touchMoveEvent, this, false);\n        element.addEventListener(mouseMoveEvent, this, false);\n\n        element.addEventListener(touchEndEvent, this, false);\n        element.addEventListener(mouseEndEvent, this, false);\n\n        document.addEventListener(touchEndEvent, this, false);\n        document.addEventListener(mouseEndEvent, this, false);\n      },\n      touchmove: function(event) {\n\n        // ensure there is a valid event\n        // ensure swiping with one touch and not pinching\n        // ensure sliding is enabled\n        if (!event.touches ||\n            event.touches.length > 1 ||\n            event.scale && event.scale !== 1 ||\n            slider.slideIsDisabled) {\n          return;\n        }\n\n        if (options.disableScroll) event.preventDefault();\n\n        var touches = event.touches[0];\n\n        // measure change in x and y\n        delta = {\n          x: touches.pageX - start.x,\n          y: touches.pageY - start.y\n        };\n\n        // determine if scrolling test has run - one time test\n        if ( typeof isScrolling == 'undefined') {\n          isScrolling = !!( isScrolling || Math.abs(delta.x) < Math.abs(delta.y) );\n        }\n\n        // if user is not trying to scroll vertically\n        if (!isScrolling) {\n\n          // prevent native scrolling\n          event.preventDefault();\n\n          // stop slideshow\n          stop();\n\n          // increase resistance if first or last slide\n          if (options.continuous) { // we don't add resistance at the end\n\n            translate(circle(index - 1), delta.x + slidePos[circle(index - 1)], 0);\n            translate(index, delta.x + slidePos[index], 0);\n            translate(circle(index + 1), delta.x + slidePos[circle(index + 1)], 0);\n\n          } else {\n            // If the slider bounces, do the bounce!\n            if(options.bouncing) {\n              delta.x =\n               delta.x /\n                 ( (!index && delta.x > 0 ||         // if first slide and sliding left\n                   index == slides.length - 1 &&     // or if last slide and sliding right\n                   delta.x < 0                       // and if sliding at all\n                 ) ?\n                 ( Math.abs(delta.x) / width + 1 )      // determine resistance level\n                 : 1 );                                 // no resistance if false\n             } else {\n               if(width * index - delta.x < 0) {               //We are trying scroll past left boundary\n                 delta.x = Math.min(delta.x, width * index);  //Set delta.x so we don't go past left screen\n               }\n               if(Math.abs(delta.x) > width * (slides.length - index - 1)){         //We are trying to scroll past right bondary\n                 delta.x = Math.max( -width * (slides.length - index - 1), delta.x);  //Set delta.x so we don't go past right screen\n               }\n             }\n\n            // translate 1:1\n            translate(index - 1, delta.x + slidePos[index - 1], 0);\n            translate(index, delta.x + slidePos[index], 0);\n            translate(index + 1, delta.x + slidePos[index + 1], 0);\n          }\n\n          options.onDrag && options.onDrag();\n        }\n\n      },\n      end: function() {\n\n        // measure duration\n        var duration = +new Date() - start.time;\n\n        // determine if slide attempt triggers next/prev slide\n        var isValidSlide =\n              Number(duration) < 250 &&         // if slide duration is less than 250ms\n              Math.abs(delta.x) > 20 ||         // and if slide amt is greater than 20px\n              Math.abs(delta.x) > width / 2;      // or if slide amt is greater than half the width\n\n        // determine if slide attempt is past start and end\n        var isPastBounds = (!index && delta.x > 0) ||      // if first slide and slide amt is greater than 0\n              (index == slides.length - 1 && delta.x < 0); // or if last slide and slide amt is less than 0\n\n        if (options.continuous) isPastBounds = false;\n\n        // determine direction of swipe (true:right, false:left)\n        var direction = delta.x < 0;\n\n        // if not scrolling vertically\n        if (!isScrolling) {\n\n          if (isValidSlide && !isPastBounds) {\n\n            if (direction) {\n\n              if (options.continuous) { // we need to get the next in this direction in place\n\n                move(circle(index - 1), -width, 0);\n                move(circle(index + 2), width, 0);\n\n              } else {\n                move(index - 1, -width, 0);\n              }\n\n              move(index, slidePos[index] - width, speed);\n              move(circle(index + 1), slidePos[circle(index + 1)] - width, speed);\n              index = circle(index + 1);\n\n            } else {\n              if (options.continuous) { // we need to get the next in this direction in place\n\n                move(circle(index + 1), width, 0);\n                move(circle(index - 2), -width, 0);\n\n              } else {\n                move(index + 1, width, 0);\n              }\n\n              move(index, slidePos[index] + width, speed);\n              move(circle(index - 1), slidePos[circle(index - 1)] + width, speed);\n              index = circle(index - 1);\n\n            }\n\n            options.callback && options.callback(index, slides[index]);\n\n          } else {\n\n            if (options.continuous) {\n\n              move(circle(index - 1), -width, speed);\n              move(index, 0, speed);\n              move(circle(index + 1), width, speed);\n\n            } else {\n\n              move(index - 1, -width, speed);\n              move(index, 0, speed);\n              move(index + 1, width, speed);\n            }\n\n          }\n\n        }\n\n        // kill touchmove and touchend event listeners until touchstart called again\n        element.removeEventListener(touchMoveEvent, events, false);\n        element.removeEventListener(mouseMoveEvent, events, false);\n\n        element.removeEventListener(touchEndEvent, events, false);\n        element.removeEventListener(mouseEndEvent, events, false);\n\n        document.removeEventListener(touchEndEvent, events, false);\n        document.removeEventListener(mouseEndEvent, events, false);\n\n        options.onDragEnd && options.onDragEnd();\n      },\n      transitionEnd: function(event) {\n\n        if (parseInt(event.target.getAttribute('data-index'), 10) == index) {\n\n          if (delay) begin();\n\n          options.transitionEnd && options.transitionEnd.call(event, index, slides[index]);\n\n        }\n\n      }\n\n    };\n\n    // Public API\n    this.update = function() {\n      setTimeout(setup);\n    };\n    this.setup = function() {\n      setup();\n    };\n\n    this.loop = function(value) {\n      if (arguments.length) options.continuous = !!value;\n      return options.continuous;\n    };\n\n    this.enableSlide = function(shouldEnable) {\n      if (arguments.length) {\n        this.slideIsDisabled = !shouldEnable;\n      }\n      return !this.slideIsDisabled;\n    };\n\n    this.slide = this.select = function(to, speed) {\n      // cancel slideshow\n      stop();\n\n      slide(to, speed);\n    };\n\n    this.prev = this.previous = function() {\n      // cancel slideshow\n      stop();\n\n      prev();\n    };\n\n    this.next = function() {\n      // cancel slideshow\n      stop();\n\n      next();\n    };\n\n    this.stop = function() {\n      // cancel slideshow\n      stop();\n    };\n\n    this.start = function() {\n      begin();\n    };\n\n    this.autoPlay = function(newDelay) {\n      if (!delay || delay < 0) {\n        stop();\n      } else {\n        delay = newDelay;\n        begin();\n      }\n    };\n\n    this.currentIndex = this.selected = function() {\n      // return current index position\n      return index;\n    };\n\n    this.slidesCount = this.count = function() {\n      // return total number of slides\n      return length;\n    };\n\n    this.kill = function() {\n      // cancel slideshow\n      stop();\n\n      // reset element\n      element.style.width = '';\n      element.style.left = '';\n\n      // reset slides so no refs are held on to\n      slides && (slides = []);\n\n      // removed event listeners\n      if (browser.addEventListener) {\n\n        // remove current event listeners\n        element.removeEventListener(touchStartEvent, events, false);\n        element.removeEventListener(mouseStartEvent, events, false);\n        element.removeEventListener('webkitTransitionEnd', events, false);\n        element.removeEventListener('msTransitionEnd', events, false);\n        element.removeEventListener('oTransitionEnd', events, false);\n        element.removeEventListener('otransitionend', events, false);\n        element.removeEventListener('transitionend', events, false);\n        window.removeEventListener('resize', events, false);\n\n      }\n      else {\n\n        window.onresize = null;\n\n      }\n    };\n\n    this.load = function() {\n      // trigger setup\n      setup();\n\n      // start auto slideshow if applicable\n      if (delay) begin();\n\n\n      // add event listeners\n      if (browser.addEventListener) {\n\n        // set touchstart event on element\n        element.addEventListener(touchStartEvent, events, false);\n        element.addEventListener(mouseStartEvent, events, false);\n\n        if (browser.transitions) {\n          element.addEventListener('webkitTransitionEnd', events, false);\n          element.addEventListener('msTransitionEnd', events, false);\n          element.addEventListener('oTransitionEnd', events, false);\n          element.addEventListener('otransitionend', events, false);\n          element.addEventListener('transitionend', events, false);\n        }\n\n        // set resize event on window\n        window.addEventListener('resize', events, false);\n\n      } else {\n\n        window.onresize = function () { setup(); }; // to play nice with old IE\n\n      }\n    };\n\n  }\n});\n\n})(ionic);\n\n/*eslint space-after-keywords: 0*/\n\n/**\n * Swiper 3.2.7\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n *\n * http://www.idangero.us/swiper/\n *\n * Copyright 2015, Vladimir Kharlampidi\n * The iDangero.us\n * http://www.idangero.us/\n *\n * Licensed under MIT\n *\n * Released on: December 7, 2015\n */\n(function () {\n    'use strict';\n    var $;\n    /*===========================\n    Swiper\n    ===========================*/\n    var Swiper = function (container, params, _scope, $compile) {\n\n        if (!(this instanceof Swiper)) return new Swiper(container, params);\n\n        var defaults = {\n            direction: 'horizontal',\n            touchEventsTarget: 'container',\n            initialSlide: 0,\n            speed: 300,\n            // autoplay\n            autoplay: false,\n            autoplayDisableOnInteraction: true,\n            // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).\n            iOSEdgeSwipeDetection: false,\n            iOSEdgeSwipeThreshold: 20,\n            // Free mode\n            freeMode: false,\n            freeModeMomentum: true,\n            freeModeMomentumRatio: 1,\n            freeModeMomentumBounce: true,\n            freeModeMomentumBounceRatio: 1,\n            freeModeSticky: false,\n            freeModeMinimumVelocity: 0.02,\n            // Autoheight\n            autoHeight: false,\n            // Set wrapper width\n            setWrapperSize: false,\n            // Virtual Translate\n            virtualTranslate: false,\n            // Effects\n            effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow'\n            coverflow: {\n                rotate: 50,\n                stretch: 0,\n                depth: 100,\n                modifier: 1,\n                slideShadows : true\n            },\n            cube: {\n                slideShadows: true,\n                shadow: true,\n                shadowOffset: 20,\n                shadowScale: 0.94\n            },\n            fade: {\n                crossFade: false\n            },\n            // Parallax\n            parallax: false,\n            // Scrollbar\n            scrollbar: null,\n            scrollbarHide: true,\n            scrollbarDraggable: false,\n            scrollbarSnapOnRelease: false,\n            // Keyboard Mousewheel\n            keyboardControl: false,\n            mousewheelControl: false,\n            mousewheelReleaseOnEdges: false,\n            mousewheelInvert: false,\n            mousewheelForceToAxis: false,\n            mousewheelSensitivity: 1,\n            // Hash Navigation\n            hashnav: false,\n            // Breakpoints\n            breakpoints: undefined,\n            // Slides grid\n            spaceBetween: 0,\n            slidesPerView: 1,\n            slidesPerColumn: 1,\n            slidesPerColumnFill: 'column',\n            slidesPerGroup: 1,\n            centeredSlides: false,\n            slidesOffsetBefore: 0, // in px\n            slidesOffsetAfter: 0, // in px\n            // Round length\n            roundLengths: false,\n            // Touches\n            touchRatio: 1,\n            touchAngle: 45,\n            simulateTouch: true,\n            shortSwipes: true,\n            longSwipes: true,\n            longSwipesRatio: 0.5,\n            longSwipesMs: 300,\n            followFinger: true,\n            onlyExternal: false,\n            threshold: 0,\n            touchMoveStopPropagation: true,\n            // Pagination\n            pagination: null,\n            paginationElement: 'span',\n            paginationClickable: false,\n            paginationHide: false,\n            paginationBulletRender: null,\n            // Resistance\n            resistance: true,\n            resistanceRatio: 0.85,\n            // Next/prev buttons\n            nextButton: null,\n            prevButton: null,\n            // Progress\n            watchSlidesProgress: false,\n            watchSlidesVisibility: false,\n            // Cursor\n            grabCursor: false,\n            // Clicks\n            preventClicks: true,\n            preventClicksPropagation: true,\n            slideToClickedSlide: false,\n            // Lazy Loading\n            lazyLoading: false,\n            lazyLoadingInPrevNext: false,\n            lazyLoadingOnTransitionStart: false,\n            // Images\n            preloadImages: true,\n            updateOnImagesReady: true,\n            // loop\n            loop: false,\n            loopAdditionalSlides: 0,\n            loopedSlides: null,\n            // Control\n            control: undefined,\n            controlInverse: false,\n            controlBy: 'slide', //or 'container'\n            // Swiping/no swiping\n            allowSwipeToPrev: true,\n            allowSwipeToNext: true,\n            swipeHandler: null, //'.swipe-handler',\n            noSwiping: true,\n            noSwipingClass: 'swiper-no-swiping',\n            // NS\n            slideClass: 'swiper-slide',\n            slideActiveClass: 'swiper-slide-active',\n            slideVisibleClass: 'swiper-slide-visible',\n            slideDuplicateClass: 'swiper-slide-duplicate',\n            slideNextClass: 'swiper-slide-next',\n            slidePrevClass: 'swiper-slide-prev',\n            wrapperClass: 'swiper-wrapper',\n            bulletClass: 'swiper-pagination-bullet',\n            bulletActiveClass: 'swiper-pagination-bullet-active',\n            buttonDisabledClass: 'swiper-button-disabled',\n            paginationHiddenClass: 'swiper-pagination-hidden',\n            // Observer\n            observer: false,\n            observeParents: false,\n            // Accessibility\n            a11y: false,\n            prevSlideMessage: 'Previous slide',\n            nextSlideMessage: 'Next slide',\n            firstSlideMessage: 'This is the first slide',\n            lastSlideMessage: 'This is the last slide',\n            paginationBulletMessage: 'Go to slide {{index}}',\n            // Callbacks\n            runCallbacksOnInit: true\n            /*\n            Callbacks:\n            onInit: function (swiper)\n            onDestroy: function (swiper)\n            onClick: function (swiper, e)\n            onTap: function (swiper, e)\n            onDoubleTap: function (swiper, e)\n            onSliderMove: function (swiper, e)\n            onSlideChangeStart: function (swiper)\n            onSlideChangeEnd: function (swiper)\n            onTransitionStart: function (swiper)\n            onTransitionEnd: function (swiper)\n            onImagesReady: function (swiper)\n            onProgress: function (swiper, progress)\n            onTouchStart: function (swiper, e)\n            onTouchMove: function (swiper, e)\n            onTouchMoveOpposite: function (swiper, e)\n            onTouchEnd: function (swiper, e)\n            onReachBeginning: function (swiper)\n            onReachEnd: function (swiper)\n            onSetTransition: function (swiper, duration)\n            onSetTranslate: function (swiper, translate)\n            onAutoplayStart: function (swiper)\n            onAutoplayStop: function (swiper),\n            onLazyImageLoad: function (swiper, slide, image)\n            onLazyImageReady: function (swiper, slide, image)\n            */\n\n        };\n        var initialVirtualTranslate = params && params.virtualTranslate;\n\n        params = params || {};\n        var originalParams = {};\n        for (var param in params) {\n            if (typeof params[param] === 'object' && !(params[param].nodeType || params[param] === window || params[param] === document || (typeof Dom7 !== 'undefined' && params[param] instanceof Dom7) || (typeof jQuery !== 'undefined' && params[param] instanceof jQuery))) {\n                originalParams[param] = {};\n                for (var deepParam in params[param]) {\n                    originalParams[param][deepParam] = params[param][deepParam];\n                }\n            }\n            else {\n                originalParams[param] = params[param];\n            }\n        }\n        for (var def in defaults) {\n            if (typeof params[def] === 'undefined') {\n                params[def] = defaults[def];\n            }\n            else if (typeof params[def] === 'object') {\n                for (var deepDef in defaults[def]) {\n                    if (typeof params[def][deepDef] === 'undefined') {\n                        params[def][deepDef] = defaults[def][deepDef];\n                    }\n                }\n            }\n        }\n\n        // Swiper\n        var s = this;\n\n        // Params\n        s.params = params;\n        s.originalParams = originalParams;\n\n        // Classname\n        s.classNames = [];\n        /*=========================\n          Dom Library and plugins\n          ===========================*/\n        if (typeof $ !== 'undefined' && typeof Dom7 !== 'undefined'){\n            $ = Dom7;\n        }\n        if (typeof $ === 'undefined') {\n            if (typeof Dom7 === 'undefined') {\n                $ = window.Dom7 || window.Zepto || window.jQuery;\n            }\n            else {\n                $ = Dom7;\n            }\n            if (!$) return;\n        }\n        // Export it to Swiper instance\n        s.$ = $;\n\n        /*=========================\n          Breakpoints\n          ===========================*/\n        s.currentBreakpoint = undefined;\n        s.getActiveBreakpoint = function () {\n            //Get breakpoint for window width\n            if (!s.params.breakpoints) return false;\n            var breakpoint = false;\n            var points = [], point;\n            for ( point in s.params.breakpoints ) {\n                if (s.params.breakpoints.hasOwnProperty(point)) {\n                    points.push(point);\n                }\n            }\n            points.sort(function (a, b) {\n                return parseInt(a, 10) > parseInt(b, 10);\n            });\n            for (var i = 0; i < points.length; i++) {\n                point = points[i];\n                if (point >= window.innerWidth && !breakpoint) {\n                    breakpoint = point;\n                }\n            }\n            return breakpoint || 'max';\n        };\n        s.setBreakpoint = function () {\n            //Set breakpoint for window width and update parameters\n            var breakpoint = s.getActiveBreakpoint();\n            if (breakpoint && s.currentBreakpoint !== breakpoint) {\n                var breakPointsParams = breakpoint in s.params.breakpoints ? s.params.breakpoints[breakpoint] : s.originalParams;\n                for ( var param in breakPointsParams ) {\n                    s.params[param] = breakPointsParams[param];\n                }\n                s.currentBreakpoint = breakpoint;\n            }\n        };\n        // Set breakpoint on load\n        if (s.params.breakpoints) {\n            s.setBreakpoint();\n        }\n\n        /*=========================\n          Preparation - Define Container, Wrapper and Pagination\n          ===========================*/\n        s.container = $(container);\n        if (s.container.length === 0) return;\n        if (s.container.length > 1) {\n            s.container.each(function () {\n                new Swiper(this, params);\n            });\n            return;\n        }\n\n        // Save instance in container HTML Element and in data\n        s.container[0].swiper = s;\n        s.container.data('swiper', s);\n\n        s.classNames.push('swiper-container-' + s.params.direction);\n\n        if (s.params.freeMode) {\n            s.classNames.push('swiper-container-free-mode');\n        }\n        if (!s.support.flexbox) {\n            s.classNames.push('swiper-container-no-flexbox');\n            s.params.slidesPerColumn = 1;\n        }\n        if (s.params.autoHeight) {\n            s.classNames.push('swiper-container-autoheight');\n        }\n        // Enable slides progress when required\n        if (s.params.parallax || s.params.watchSlidesVisibility) {\n            s.params.watchSlidesProgress = true;\n        }\n        // Coverflow / 3D\n        if (['cube', 'coverflow'].indexOf(s.params.effect) >= 0) {\n            if (s.support.transforms3d) {\n                s.params.watchSlidesProgress = true;\n                s.classNames.push('swiper-container-3d');\n            }\n            else {\n                s.params.effect = 'slide';\n            }\n        }\n        if (s.params.effect !== 'slide') {\n            s.classNames.push('swiper-container-' + s.params.effect);\n        }\n        if (s.params.effect === 'cube') {\n            s.params.resistanceRatio = 0;\n            s.params.slidesPerView = 1;\n            s.params.slidesPerColumn = 1;\n            s.params.slidesPerGroup = 1;\n            s.params.centeredSlides = false;\n            s.params.spaceBetween = 0;\n            s.params.virtualTranslate = true;\n            s.params.setWrapperSize = false;\n        }\n        if (s.params.effect === 'fade') {\n            s.params.slidesPerView = 1;\n            s.params.slidesPerColumn = 1;\n            s.params.slidesPerGroup = 1;\n            s.params.watchSlidesProgress = true;\n            s.params.spaceBetween = 0;\n            if (typeof initialVirtualTranslate === 'undefined') {\n                s.params.virtualTranslate = true;\n            }\n        }\n\n        // Grab Cursor\n        if (s.params.grabCursor && s.support.touch) {\n            s.params.grabCursor = false;\n        }\n\n        // Wrapper\n        s.wrapper = s.container.children('.' + s.params.wrapperClass);\n\n        // Pagination\n        if (s.params.pagination) {\n            s.paginationContainer = $(s.params.pagination);\n            if (s.params.paginationClickable) {\n                s.paginationContainer.addClass('swiper-pagination-clickable');\n            }\n        }\n\n        // Is Horizontal\n        function isH() {\n            return s.params.direction === 'horizontal';\n        }\n\n        // RTL\n        s.rtl = isH() && (s.container[0].dir.toLowerCase() === 'rtl' || s.container.css('direction') === 'rtl');\n        if (s.rtl) {\n            s.classNames.push('swiper-container-rtl');\n        }\n\n        // Wrong RTL support\n        if (s.rtl) {\n            s.wrongRTL = s.wrapper.css('display') === '-webkit-box';\n        }\n\n        // Columns\n        if (s.params.slidesPerColumn > 1) {\n            s.classNames.push('swiper-container-multirow');\n        }\n\n        // Check for Android\n        if (s.device.android) {\n            s.classNames.push('swiper-container-android');\n        }\n\n        // Add classes\n        s.container.addClass(s.classNames.join(' '));\n\n        // Translate\n        s.translate = 0;\n\n        // Progress\n        s.progress = 0;\n\n        // Velocity\n        s.velocity = 0;\n\n        /*=========================\n          Locks, unlocks\n          ===========================*/\n        s.lockSwipeToNext = function () {\n            s.params.allowSwipeToNext = false;\n        };\n        s.lockSwipeToPrev = function () {\n            s.params.allowSwipeToPrev = false;\n        };\n        s.lockSwipes = function () {\n            s.params.allowSwipeToNext = s.params.allowSwipeToPrev = false;\n        };\n        s.unlockSwipeToNext = function () {\n            s.params.allowSwipeToNext = true;\n        };\n        s.unlockSwipeToPrev = function () {\n            s.params.allowSwipeToPrev = true;\n        };\n        s.unlockSwipes = function () {\n            s.params.allowSwipeToNext = s.params.allowSwipeToPrev = true;\n        };\n\n        /*=========================\n          Round helper\n          ===========================*/\n        function round(a) {\n            return Math.floor(a);\n        }\n        /*=========================\n          Set grab cursor\n          ===========================*/\n        if (s.params.grabCursor) {\n            s.container[0].style.cursor = 'move';\n            s.container[0].style.cursor = '-webkit-grab';\n            s.container[0].style.cursor = '-moz-grab';\n            s.container[0].style.cursor = 'grab';\n        }\n        /*=========================\n          Update on Images Ready\n          ===========================*/\n        s.imagesToLoad = [];\n        s.imagesLoaded = 0;\n\n        s.loadImage = function (imgElement, src, srcset, checkForComplete, callback) {\n            var image;\n            function onReady () {\n                if (callback) callback();\n            }\n            if (!imgElement.complete || !checkForComplete) {\n                if (src) {\n                    image = new window.Image();\n                    image.onload = onReady;\n                    image.onerror = onReady;\n                    if (srcset) {\n                        image.srcset = srcset;\n                    }\n                    if (src) {\n                        image.src = src;\n                    }\n                } else {\n                    onReady();\n                }\n\n            } else {//image already loaded...\n                onReady();\n            }\n        };\n        s.preloadImages = function () {\n            s.imagesToLoad = s.container.find('img');\n            function _onReady() {\n                if (typeof s === 'undefined' || s === null) return;\n                if (s.imagesLoaded !== undefined) s.imagesLoaded++;\n                if (s.imagesLoaded === s.imagesToLoad.length) {\n                    if (s.params.updateOnImagesReady) s.update();\n                    s.emit('onImagesReady', s);\n                }\n            }\n            for (var i = 0; i < s.imagesToLoad.length; i++) {\n                s.loadImage(s.imagesToLoad[i], (s.imagesToLoad[i].currentSrc || s.imagesToLoad[i].getAttribute('src')), (s.imagesToLoad[i].srcset || s.imagesToLoad[i].getAttribute('srcset')), true, _onReady);\n            }\n        };\n\n        /*=========================\n          Autoplay\n          ===========================*/\n        s.autoplayTimeoutId = undefined;\n        s.autoplaying = false;\n        s.autoplayPaused = false;\n        function autoplay() {\n            s.autoplayTimeoutId = setTimeout(function () {\n                if (s.params.loop) {\n                    s.fixLoop();\n                    s._slideNext();\n                }\n                else {\n                    if (!s.isEnd) {\n                        s._slideNext();\n                    }\n                    else {\n                        if (!params.autoplayStopOnLast) {\n                            s._slideTo(0);\n                        }\n                        else {\n                            s.stopAutoplay();\n                        }\n                    }\n                }\n            }, s.params.autoplay);\n        }\n        s.startAutoplay = function () {\n            if (typeof s.autoplayTimeoutId !== 'undefined') return false;\n            if (!s.params.autoplay) return false;\n            if (s.autoplaying) return false;\n            s.autoplaying = true;\n            s.emit('onAutoplayStart', s);\n            autoplay();\n        };\n        s.stopAutoplay = function (internal) {\n            if (!s.autoplayTimeoutId) return;\n            if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);\n            s.autoplaying = false;\n            s.autoplayTimeoutId = undefined;\n            s.emit('onAutoplayStop', s);\n        };\n        s.pauseAutoplay = function (speed) {\n            if (s.autoplayPaused) return;\n            if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);\n            s.autoplayPaused = true;\n            if (speed === 0) {\n                s.autoplayPaused = false;\n                autoplay();\n            }\n            else {\n                s.wrapper.transitionEnd(function () {\n                    if (!s) return;\n                    s.autoplayPaused = false;\n                    if (!s.autoplaying) {\n                        s.stopAutoplay();\n                    }\n                    else {\n                        autoplay();\n                    }\n                });\n            }\n        };\n        /*=========================\n          Min/Max Translate\n          ===========================*/\n        s.minTranslate = function () {\n            return (-s.snapGrid[0]);\n        };\n        s.maxTranslate = function () {\n            return (-s.snapGrid[s.snapGrid.length - 1]);\n        };\n        /*=========================\n          Slider/slides sizes\n          ===========================*/\n        s.updateAutoHeight = function () {\n            // Update Height\n            var newHeight = s.slides.eq(s.activeIndex)[0].offsetHeight;\n            if (newHeight) s.wrapper.css('height', s.slides.eq(s.activeIndex)[0].offsetHeight + 'px');\n        };\n        s.updateContainerSize = function () {\n            var width, height;\n            if (typeof s.params.width !== 'undefined') {\n                width = s.params.width;\n            }\n            else {\n                width = s.container[0].clientWidth;\n            }\n            if (typeof s.params.height !== 'undefined') {\n                height = s.params.height;\n            }\n            else {\n                height = s.container[0].clientHeight;\n            }\n            if (width === 0 && isH() || height === 0 && !isH()) {\n                return;\n            }\n\n            //Subtract paddings\n            width = width - parseInt(s.container.css('padding-left'), 10) - parseInt(s.container.css('padding-right'), 10);\n            height = height - parseInt(s.container.css('padding-top'), 10) - parseInt(s.container.css('padding-bottom'), 10);\n\n            // Store values\n            s.width = width;\n            s.height = height;\n            s.size = isH() ? s.width : s.height;\n        };\n\n        s.updateSlidesSize = function () {\n            s.slides = s.wrapper.children('.' + s.params.slideClass);\n            s.snapGrid = [];\n            s.slidesGrid = [];\n            s.slidesSizesGrid = [];\n\n            var spaceBetween = s.params.spaceBetween,\n                slidePosition = -s.params.slidesOffsetBefore,\n                i,\n                prevSlideSize = 0,\n                index = 0;\n            if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n                spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * s.size;\n            }\n\n            s.virtualSize = -spaceBetween;\n            // reset margins\n            if (s.rtl) s.slides.css({marginLeft: '', marginTop: ''});\n            else s.slides.css({marginRight: '', marginBottom: ''});\n\n            var slidesNumberEvenToRows;\n            if (s.params.slidesPerColumn > 1) {\n                if (Math.floor(s.slides.length / s.params.slidesPerColumn) === s.slides.length / s.params.slidesPerColumn) {\n                    slidesNumberEvenToRows = s.slides.length;\n                }\n                else {\n                    slidesNumberEvenToRows = Math.ceil(s.slides.length / s.params.slidesPerColumn) * s.params.slidesPerColumn;\n                }\n                if (s.params.slidesPerView !== 'auto' && s.params.slidesPerColumnFill === 'row') {\n                    slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, s.params.slidesPerView * s.params.slidesPerColumn);\n                }\n            }\n\n            // Calc slides\n            var slideSize;\n            var slidesPerColumn = s.params.slidesPerColumn;\n            var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;\n            var numFullColumns = slidesPerRow - (s.params.slidesPerColumn * slidesPerRow - s.slides.length);\n            for (i = 0; i < s.slides.length; i++) {\n                slideSize = 0;\n                var slide = s.slides.eq(i);\n                if (s.params.slidesPerColumn > 1) {\n                    // Set slides order\n                    var newSlideOrderIndex;\n                    var column, row;\n                    if (s.params.slidesPerColumnFill === 'column') {\n                        column = Math.floor(i / slidesPerColumn);\n                        row = i - column * slidesPerColumn;\n                        if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn-1)) {\n                            if (++row >= slidesPerColumn) {\n                                row = 0;\n                                column++;\n                            }\n                        }\n                        newSlideOrderIndex = column + row * slidesNumberEvenToRows / slidesPerColumn;\n                        slide\n                            .css({\n                                '-webkit-box-ordinal-group': newSlideOrderIndex,\n                                '-moz-box-ordinal-group': newSlideOrderIndex,\n                                '-ms-flex-order': newSlideOrderIndex,\n                                '-webkit-order': newSlideOrderIndex,\n                                'order': newSlideOrderIndex\n                            });\n                    }\n                    else {\n                        row = Math.floor(i / slidesPerRow);\n                        column = i - row * slidesPerRow;\n                    }\n                    slide\n                        .css({\n                            'margin-top': (row !== 0 && s.params.spaceBetween) && (s.params.spaceBetween + 'px')\n                        })\n                        .attr('data-swiper-column', column)\n                        .attr('data-swiper-row', row);\n\n                }\n                if (slide.css('display') === 'none') continue;\n                if (s.params.slidesPerView === 'auto') {\n                    slideSize = isH() ? slide.outerWidth(true) : slide.outerHeight(true);\n                    if (s.params.roundLengths) slideSize = round(slideSize);\n                }\n                else {\n                    slideSize = (s.size - (s.params.slidesPerView - 1) * spaceBetween) / s.params.slidesPerView;\n                    if (s.params.roundLengths) slideSize = round(slideSize);\n\n                    if (isH()) {\n                        s.slides[i].style.width = slideSize + 'px';\n                    }\n                    else {\n                        s.slides[i].style.height = slideSize + 'px';\n                    }\n                }\n                s.slides[i].swiperSlideSize = slideSize;\n                s.slidesSizesGrid.push(slideSize);\n\n\n                if (s.params.centeredSlides) {\n                    slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n                    if (i === 0) slidePosition = slidePosition - s.size / 2 - spaceBetween;\n                    if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n                    if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);\n                    s.slidesGrid.push(slidePosition);\n                }\n                else {\n                    if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);\n                    s.slidesGrid.push(slidePosition);\n                    slidePosition = slidePosition + slideSize + spaceBetween;\n                }\n\n                s.virtualSize += slideSize + spaceBetween;\n\n                prevSlideSize = slideSize;\n\n                index ++;\n            }\n            s.virtualSize = Math.max(s.virtualSize, s.size) + s.params.slidesOffsetAfter;\n            var newSlidesGrid;\n\n            if (\n                s.rtl && s.wrongRTL && (s.params.effect === 'slide' || s.params.effect === 'coverflow')) {\n                s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n            }\n            if (!s.support.flexbox || s.params.setWrapperSize) {\n                if (isH()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n                else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'});\n            }\n\n            if (s.params.slidesPerColumn > 1) {\n                s.virtualSize = (slideSize + s.params.spaceBetween) * slidesNumberEvenToRows;\n                s.virtualSize = Math.ceil(s.virtualSize / s.params.slidesPerColumn) - s.params.spaceBetween;\n                s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n                if (s.params.centeredSlides) {\n                    newSlidesGrid = [];\n                    for (i = 0; i < s.snapGrid.length; i++) {\n                        if (s.snapGrid[i] < s.virtualSize + s.snapGrid[0]) newSlidesGrid.push(s.snapGrid[i]);\n                    }\n                    s.snapGrid = newSlidesGrid;\n                }\n            }\n\n            // Remove last grid elements depending on width\n            if (!s.params.centeredSlides) {\n                newSlidesGrid = [];\n                for (i = 0; i < s.snapGrid.length; i++) {\n                    if (s.snapGrid[i] <= s.virtualSize - s.size) {\n                        newSlidesGrid.push(s.snapGrid[i]);\n                    }\n                }\n                s.snapGrid = newSlidesGrid;\n                if (Math.floor(s.virtualSize - s.size) > Math.floor(s.snapGrid[s.snapGrid.length - 1])) {\n                    s.snapGrid.push(s.virtualSize - s.size);\n                }\n            }\n            if (s.snapGrid.length === 0) s.snapGrid = [0];\n\n            if (s.params.spaceBetween !== 0) {\n                if (isH()) {\n                    if (s.rtl) s.slides.css({marginLeft: spaceBetween + 'px'});\n                    else s.slides.css({marginRight: spaceBetween + 'px'});\n                }\n                else s.slides.css({marginBottom: spaceBetween + 'px'});\n            }\n            if (s.params.watchSlidesProgress) {\n                s.updateSlidesOffset();\n            }\n        };\n        s.updateSlidesOffset = function () {\n            for (var i = 0; i < s.slides.length; i++) {\n                s.slides[i].swiperSlideOffset = isH() ? s.slides[i].offsetLeft : s.slides[i].offsetTop;\n            }\n        };\n\n        /*=========================\n          Slider/slides progress\n          ===========================*/\n        s.updateSlidesProgress = function (translate) {\n            if (typeof translate === 'undefined') {\n                translate = s.translate || 0;\n            }\n            if (s.slides.length === 0) return;\n            if (typeof s.slides[0].swiperSlideOffset === 'undefined') s.updateSlidesOffset();\n\n            var offsetCenter = -translate;\n            if (s.rtl) offsetCenter = translate;\n\n            // Visible Slides\n            s.slides.removeClass(s.params.slideVisibleClass);\n            for (var i = 0; i < s.slides.length; i++) {\n                var slide = s.slides[i];\n                var slideProgress = (offsetCenter - slide.swiperSlideOffset) / (slide.swiperSlideSize + s.params.spaceBetween);\n                if (s.params.watchSlidesVisibility) {\n                    var slideBefore = -(offsetCenter - slide.swiperSlideOffset);\n                    var slideAfter = slideBefore + s.slidesSizesGrid[i];\n                    var isVisible =\n                        (slideBefore >= 0 && slideBefore < s.size) ||\n                        (slideAfter > 0 && slideAfter <= s.size) ||\n                        (slideBefore <= 0 && slideAfter >= s.size);\n                    if (isVisible) {\n                        s.slides.eq(i).addClass(s.params.slideVisibleClass);\n                    }\n                }\n                slide.progress = s.rtl ? -slideProgress : slideProgress;\n            }\n        };\n        s.updateProgress = function (translate) {\n            if (typeof translate === 'undefined') {\n                translate = s.translate || 0;\n            }\n            var translatesDiff = s.maxTranslate() - s.minTranslate();\n            var wasBeginning = s.isBeginning;\n            var wasEnd = s.isEnd;\n            if (translatesDiff === 0) {\n                s.progress = 0;\n                s.isBeginning = s.isEnd = true;\n            }\n            else {\n                s.progress = (translate - s.minTranslate()) / (translatesDiff);\n                s.isBeginning = s.progress <= 0;\n                s.isEnd = s.progress >= 1;\n            }\n            if (s.isBeginning && !wasBeginning) s.emit('onReachBeginning', s);\n            if (s.isEnd && !wasEnd) s.emit('onReachEnd', s);\n\n            if (s.params.watchSlidesProgress) s.updateSlidesProgress(translate);\n            s.emit('onProgress', s, s.progress);\n        };\n        s.updateActiveIndex = function () {\n            var translate = s.rtl ? s.translate : -s.translate;\n            var newActiveIndex, i, snapIndex;\n            for (i = 0; i < s.slidesGrid.length; i ++) {\n                if (typeof s.slidesGrid[i + 1] !== 'undefined') {\n                    if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1] - (s.slidesGrid[i + 1] - s.slidesGrid[i]) / 2) {\n                        newActiveIndex = i;\n                    }\n                    else if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1]) {\n                        newActiveIndex = i + 1;\n                    }\n                }\n                else {\n                    if (translate >= s.slidesGrid[i]) {\n                        newActiveIndex = i;\n                    }\n                }\n            }\n            // Normalize slideIndex\n            if (newActiveIndex < 0 || typeof newActiveIndex === 'undefined') newActiveIndex = 0;\n            // for (i = 0; i < s.slidesGrid.length; i++) {\n                // if (- translate >= s.slidesGrid[i]) {\n                    // newActiveIndex = i;\n                // }\n            // }\n            snapIndex = Math.floor(newActiveIndex / s.params.slidesPerGroup);\n            if (snapIndex >= s.snapGrid.length) snapIndex = s.snapGrid.length - 1;\n\n            if (newActiveIndex === s.activeIndex) {\n                return;\n            }\n            s.snapIndex = snapIndex;\n            s.previousIndex = s.activeIndex;\n            s.activeIndex = newActiveIndex;\n            s.updateClasses();\n        };\n\n        /*=========================\n          Classes\n          ===========================*/\n        s.updateClasses = function () {\n            s.slides.removeClass(s.params.slideActiveClass + ' ' + s.params.slideNextClass + ' ' + s.params.slidePrevClass);\n            var activeSlide = s.slides.eq(s.activeIndex);\n            // Active classes\n            activeSlide.addClass(s.params.slideActiveClass);\n            activeSlide.next('.' + s.params.slideClass).addClass(s.params.slideNextClass);\n            activeSlide.prev('.' + s.params.slideClass).addClass(s.params.slidePrevClass);\n\n            // Pagination\n            if (s.bullets && s.bullets.length > 0) {\n                s.bullets.removeClass(s.params.bulletActiveClass);\n                var bulletIndex;\n                if (s.params.loop) {\n                    bulletIndex = Math.ceil(s.activeIndex - s.loopedSlides)/s.params.slidesPerGroup;\n                    if (bulletIndex > s.slides.length - 1 - s.loopedSlides * 2) {\n                        bulletIndex = bulletIndex - (s.slides.length - s.loopedSlides * 2);\n                    }\n                    if (bulletIndex > s.bullets.length - 1) bulletIndex = bulletIndex - s.bullets.length;\n                }\n                else {\n                    if (typeof s.snapIndex !== 'undefined') {\n                        bulletIndex = s.snapIndex;\n                    }\n                    else {\n                        bulletIndex = s.activeIndex || 0;\n                    }\n                }\n                if (s.paginationContainer.length > 1) {\n                    s.bullets.each(function () {\n                        if ($(this).index() === bulletIndex) $(this).addClass(s.params.bulletActiveClass);\n                    });\n                }\n                else {\n                    s.bullets.eq(bulletIndex).addClass(s.params.bulletActiveClass);\n                }\n            }\n\n            // Next/active buttons\n            if (!s.params.loop) {\n                if (s.params.prevButton) {\n                    if (s.isBeginning) {\n                        $(s.params.prevButton).addClass(s.params.buttonDisabledClass);\n                        if (s.params.a11y && s.a11y) s.a11y.disable($(s.params.prevButton));\n                    }\n                    else {\n                        $(s.params.prevButton).removeClass(s.params.buttonDisabledClass);\n                        if (s.params.a11y && s.a11y) s.a11y.enable($(s.params.prevButton));\n                    }\n                }\n                if (s.params.nextButton) {\n                    if (s.isEnd) {\n                        $(s.params.nextButton).addClass(s.params.buttonDisabledClass);\n                        if (s.params.a11y && s.a11y) s.a11y.disable($(s.params.nextButton));\n                    }\n                    else {\n                        $(s.params.nextButton).removeClass(s.params.buttonDisabledClass);\n                        if (s.params.a11y && s.a11y) s.a11y.enable($(s.params.nextButton));\n                    }\n                }\n            }\n        };\n\n        /*=========================\n          Pagination\n          ===========================*/\n        s.updatePagination = function () {\n            if (!s.params.pagination) return;\n            if (s.paginationContainer && s.paginationContainer.length > 0) {\n                var bulletsHTML = '';\n                var numberOfBullets = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;\n                for (var i = 0; i < numberOfBullets; i++) {\n                    if (s.params.paginationBulletRender) {\n                        bulletsHTML += s.params.paginationBulletRender(i, s.params.bulletClass);\n                    }\n                    else {\n                        bulletsHTML += '<' + s.params.paginationElement+' class=\"' + s.params.bulletClass + '\"></' + s.params.paginationElement + '>';\n                    }\n                }\n                s.paginationContainer.html(bulletsHTML);\n                s.bullets = s.paginationContainer.find('.' + s.params.bulletClass);\n                if (s.params.paginationClickable && s.params.a11y && s.a11y) {\n                    s.a11y.initPagination();\n                }\n            }\n        };\n        /*=========================\n          Common update method\n          ===========================*/\n        s.update = function (updateTranslate) {\n            s.updateContainerSize();\n            s.updateSlidesSize();\n            s.updateProgress();\n            s.updatePagination();\n            s.updateClasses();\n            if (s.params.scrollbar && s.scrollbar) {\n                s.scrollbar.set();\n            }\n            function forceSetTranslate() {\n                newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());\n                s.setWrapperTranslate(newTranslate);\n                s.updateActiveIndex();\n                s.updateClasses();\n            }\n            if (updateTranslate) {\n                var translated, newTranslate;\n                if (s.controller && s.controller.spline) {\n                    s.controller.spline = undefined;\n                }\n                if (s.params.freeMode) {\n                    forceSetTranslate();\n                    if (s.params.autoHeight) {\n                        s.updateAutoHeight();\n                    }\n                }\n                else {\n                    if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {\n                        translated = s.slideTo(s.slides.length - 1, 0, false, true);\n                    }\n                    else {\n                        translated = s.slideTo(s.activeIndex, 0, false, true);\n                    }\n                    if (!translated) {\n                        forceSetTranslate();\n                    }\n                }\n            }\n            else if (s.params.autoHeight) {\n                s.updateAutoHeight();\n            }\n        };\n\n        /*=========================\n          Resize Handler\n          ===========================*/\n        s.onResize = function (forceUpdatePagination) {\n            //Breakpoints\n            if (s.params.breakpoints) {\n                s.setBreakpoint();\n            }\n\n            // Disable locks on resize\n            var allowSwipeToPrev = s.params.allowSwipeToPrev;\n            var allowSwipeToNext = s.params.allowSwipeToNext;\n            s.params.allowSwipeToPrev = s.params.allowSwipeToNext = true;\n\n            s.updateContainerSize();\n            s.updateSlidesSize();\n            if (s.params.slidesPerView === 'auto' || s.params.freeMode || forceUpdatePagination) s.updatePagination();\n            if (s.params.scrollbar && s.scrollbar) {\n                s.scrollbar.set();\n            }\n            if (s.controller && s.controller.spline) {\n                s.controller.spline = undefined;\n            }\n            if (s.params.freeMode) {\n                var newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());\n                s.setWrapperTranslate(newTranslate);\n                s.updateActiveIndex();\n                s.updateClasses();\n\n                if (s.params.autoHeight) {\n                    s.updateAutoHeight();\n                }\n            }\n            else {\n                s.updateClasses();\n                if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {\n                    s.slideTo(s.slides.length - 1, 0, false, true);\n                }\n                else {\n                    s.slideTo(s.activeIndex, 0, false, true);\n                }\n            }\n            // Return locks after resize\n            s.params.allowSwipeToPrev = allowSwipeToPrev;\n            s.params.allowSwipeToNext = allowSwipeToNext;\n        };\n\n        /*=========================\n          Events\n          ===========================*/\n\n        //Define Touch Events\n        var desktopEvents = ['mousedown', 'mousemove', 'mouseup'];\n        if (window.navigator.pointerEnabled) desktopEvents = ['pointerdown', 'pointermove', 'pointerup'];\n        else if (window.navigator.msPointerEnabled) desktopEvents = ['MSPointerDown', 'MSPointerMove', 'MSPointerUp'];\n        s.touchEvents = {\n            start : s.support.touch || !s.params.simulateTouch  ? 'touchstart' : desktopEvents[0],\n            move : s.support.touch || !s.params.simulateTouch ? 'touchmove' : desktopEvents[1],\n            end : s.support.touch || !s.params.simulateTouch ? 'touchend' : desktopEvents[2]\n        };\n\n\n        // WP8 Touch Events Fix\n        if (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) {\n            (s.params.touchEventsTarget === 'container' ? s.container : s.wrapper).addClass('swiper-wp8-' + s.params.direction);\n        }\n\n        // Attach/detach events\n        s.initEvents = function (detach) {\n            var actionDom = detach ? 'off' : 'on';\n            var action = detach ? 'removeEventListener' : 'addEventListener';\n            var touchEventsTarget = s.params.touchEventsTarget === 'container' ? s.container[0] : s.wrapper[0];\n            var target = s.support.touch ? touchEventsTarget : document;\n\n            var moveCapture = s.params.nested ? true : false;\n\n            //Touch Events\n            if (s.browser.ie) {\n                touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, false);\n                target[action](s.touchEvents.move, s.onTouchMove, moveCapture);\n                target[action](s.touchEvents.end, s.onTouchEnd, false);\n            }\n            else {\n                if (s.support.touch) {\n                    touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, false);\n                    touchEventsTarget[action](s.touchEvents.move, s.onTouchMove, moveCapture);\n                    touchEventsTarget[action](s.touchEvents.end, s.onTouchEnd, false);\n                }\n                if (params.simulateTouch && !s.device.ios && !s.device.android) {\n                    touchEventsTarget[action]('mousedown', s.onTouchStart, false);\n                    document[action]('mousemove', s.onTouchMove, moveCapture);\n                    document[action]('mouseup', s.onTouchEnd, false);\n                }\n            }\n            window[action]('resize', s.onResize);\n\n            // Next, Prev, Index\n            if (s.params.nextButton) {\n                $(s.params.nextButton)[actionDom]('click', s.onClickNext);\n                if (s.params.a11y && s.a11y) $(s.params.nextButton)[actionDom]('keydown', s.a11y.onEnterKey);\n            }\n            if (s.params.prevButton) {\n                $(s.params.prevButton)[actionDom]('click', s.onClickPrev);\n                if (s.params.a11y && s.a11y) $(s.params.prevButton)[actionDom]('keydown', s.a11y.onEnterKey);\n            }\n            if (s.params.pagination && s.params.paginationClickable) {\n                $(s.paginationContainer)[actionDom]('click', '.' + s.params.bulletClass, s.onClickIndex);\n                if (s.params.a11y && s.a11y) $(s.paginationContainer)[actionDom]('keydown', '.' + s.params.bulletClass, s.a11y.onEnterKey);\n            }\n\n            // Prevent Links Clicks\n            if (s.params.preventClicks || s.params.preventClicksPropagation) touchEventsTarget[action]('click', s.preventClicks, true);\n        };\n        s.attachEvents = function (detach) {\n            s.initEvents();\n        };\n        s.detachEvents = function () {\n            s.initEvents(true);\n        };\n\n        /*=========================\n          Handle Clicks\n          ===========================*/\n        // Prevent Clicks\n        s.allowClick = true;\n        s.preventClicks = function (e) {\n            if (!s.allowClick) {\n                if (s.params.preventClicks) e.preventDefault();\n                if (s.params.preventClicksPropagation && s.animating) {\n                    e.stopPropagation();\n                    e.stopImmediatePropagation();\n                }\n            }\n        };\n        // Clicks\n        s.onClickNext = function (e) {\n            e.preventDefault();\n            if (s.isEnd && !s.params.loop) return;\n            s.slideNext();\n        };\n        s.onClickPrev = function (e) {\n            e.preventDefault();\n            if (s.isBeginning && !s.params.loop) return;\n            s.slidePrev();\n        };\n        s.onClickIndex = function (e) {\n            e.preventDefault();\n            var index = $(this).index() * s.params.slidesPerGroup;\n            if (s.params.loop) index = index + s.loopedSlides;\n            s.slideTo(index);\n        };\n\n        /*=========================\n          Handle Touches\n          ===========================*/\n        function findElementInEvent(e, selector) {\n            var el = $(e.target);\n            if (!el.is(selector)) {\n                if (typeof selector === 'string') {\n                    el = el.parents(selector);\n                }\n                else if (selector.nodeType) {\n                    var found;\n                    el.parents().each(function (index, _el) {\n                        if (_el === selector) found = selector;\n                    });\n                    if (!found) return undefined;\n                    else return selector;\n                }\n            }\n            if (el.length === 0) {\n                return undefined;\n            }\n            return el[0];\n        }\n        s.updateClickedSlide = function (e) {\n            var slide = findElementInEvent(e, '.' + s.params.slideClass);\n            var slideFound = false;\n            if (slide) {\n                for (var i = 0; i < s.slides.length; i++) {\n                    if (s.slides[i] === slide) slideFound = true;\n                }\n            }\n\n            if (slide && slideFound) {\n                s.clickedSlide = slide;\n                s.clickedIndex = $(slide).index();\n            }\n            else {\n                s.clickedSlide = undefined;\n                s.clickedIndex = undefined;\n                return;\n            }\n            if (s.params.slideToClickedSlide && s.clickedIndex !== undefined && s.clickedIndex !== s.activeIndex) {\n                var slideToIndex = s.clickedIndex,\n                    realIndex,\n                    duplicatedSlides;\n                if (s.params.loop) {\n                    if (s.animating) return;\n                    realIndex = $(s.clickedSlide).attr('data-swiper-slide-index');\n                    if (s.params.centeredSlides) {\n                        if ((slideToIndex < s.loopedSlides - s.params.slidesPerView/2) || (slideToIndex > s.slides.length - s.loopedSlides + s.params.slidesPerView/2)) {\n                            s.fixLoop();\n                            slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index=\"' + realIndex + '\"]:not(.swiper-slide-duplicate)').eq(0).index();\n                            setTimeout(function () {\n                                s.slideTo(slideToIndex);\n                            }, 0);\n                        }\n                        else {\n                            s.slideTo(slideToIndex);\n                        }\n                    }\n                    else {\n                        if (slideToIndex > s.slides.length - s.params.slidesPerView) {\n                            s.fixLoop();\n                            slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index=\"' + realIndex + '\"]:not(.swiper-slide-duplicate)').eq(0).index();\n                            setTimeout(function () {\n                                s.slideTo(slideToIndex);\n                            }, 0);\n                        }\n                        else {\n                            s.slideTo(slideToIndex);\n                        }\n                    }\n                }\n                else {\n                    s.slideTo(slideToIndex);\n                }\n            }\n        };\n\n        var isTouched,\n            isMoved,\n            allowTouchCallbacks,\n            touchStartTime,\n            isScrolling,\n            currentTranslate,\n            startTranslate,\n            allowThresholdMove,\n            // Form elements to match\n            formElements = 'input, select, textarea, button',\n            // Last click time\n            lastClickTime = Date.now(), clickTimeout,\n            //Velocities\n            velocities = [],\n            allowMomentumBounce;\n\n        // Animating Flag\n        s.animating = false;\n\n        // Touches information\n        s.touches = {\n            startX: 0,\n            startY: 0,\n            currentX: 0,\n            currentY: 0,\n            diff: 0\n        };\n\n        // Touch handlers\n        var isTouchEvent, startMoving;\n        s.onTouchStart = function (e) {\n            if (e.originalEvent) e = e.originalEvent;\n            isTouchEvent = e.type === 'touchstart';\n            if (!isTouchEvent && 'which' in e && e.which === 3) return;\n            if (s.params.noSwiping && findElementInEvent(e, '.' + s.params.noSwipingClass)) {\n                s.allowClick = true;\n                return;\n            }\n            if (s.params.swipeHandler) {\n                if (!findElementInEvent(e, s.params.swipeHandler)) return;\n            }\n\n            var startX = s.touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n            var startY = s.touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n\n            // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore\n            if(s.device.ios && s.params.iOSEdgeSwipeDetection && startX <= s.params.iOSEdgeSwipeThreshold) {\n                return;\n            }\n\n            isTouched = true;\n            isMoved = false;\n            allowTouchCallbacks = true;\n            isScrolling = undefined;\n            startMoving = undefined;\n            s.touches.startX = startX;\n            s.touches.startY = startY;\n            touchStartTime = Date.now();\n            s.allowClick = true;\n            s.updateContainerSize();\n            s.swipeDirection = undefined;\n            if (s.params.threshold > 0) allowThresholdMove = false;\n            if (e.type !== 'touchstart') {\n                var preventDefault = true;\n                if ($(e.target).is(formElements)) preventDefault = false;\n                if (document.activeElement && $(document.activeElement).is(formElements)) {\n                    document.activeElement.blur();\n                }\n                if (preventDefault) {\n                    e.preventDefault();\n                }\n            }\n            s.emit('onTouchStart', s, e);\n        };\n\n        s.onTouchMove = function (e) {\n            if (e.originalEvent) e = e.originalEvent;\n            if (isTouchEvent && e.type === 'mousemove') return;\n            if (e.preventedByNestedSwiper) return;\n            if (s.params.onlyExternal) {\n                // isMoved = true;\n                s.allowClick = false;\n                if (isTouched) {\n                    s.touches.startX = s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n                    s.touches.startY = s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n                    touchStartTime = Date.now();\n                }\n                return;\n            }\n            if (isTouchEvent && document.activeElement) {\n                if (e.target === document.activeElement && $(e.target).is(formElements)) {\n                    isMoved = true;\n                    s.allowClick = false;\n                    return;\n                }\n            }\n            if (allowTouchCallbacks) {\n                s.emit('onTouchMove', s, e);\n            }\n            if (e.targetTouches && e.targetTouches.length > 1) return;\n\n            s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n            s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n\n            if (typeof isScrolling === 'undefined') {\n                var touchAngle = Math.atan2(Math.abs(s.touches.currentY - s.touches.startY), Math.abs(s.touches.currentX - s.touches.startX)) * 180 / Math.PI;\n                isScrolling = isH() ? touchAngle > s.params.touchAngle : (90 - touchAngle > s.params.touchAngle);\n            }\n            if (isScrolling) {\n                s.emit('onTouchMoveOpposite', s, e);\n            }\n            if (typeof startMoving === 'undefined' && s.browser.ieTouch) {\n                if (s.touches.currentX !== s.touches.startX || s.touches.currentY !== s.touches.startY) {\n                    startMoving = true;\n                }\n            }\n            if (!isTouched) return;\n            if (isScrolling)  {\n                isTouched = false;\n                return;\n            }\n            if (!startMoving && s.browser.ieTouch) {\n                return;\n            }\n            s.allowClick = false;\n            s.emit('onSliderMove', s, e);\n            e.preventDefault();\n            if (s.params.touchMoveStopPropagation && !s.params.nested) {\n                e.stopPropagation();\n            }\n\n            if (!isMoved) {\n                if (params.loop) {\n                    s.fixLoop();\n                }\n                startTranslate = s.getWrapperTranslate();\n                s.setWrapperTransition(0);\n                if (s.animating) {\n                    s.wrapper.trigger('webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd');\n                }\n                if (s.params.autoplay && s.autoplaying) {\n                    if (s.params.autoplayDisableOnInteraction) {\n                        s.stopAutoplay();\n                    }\n                    else {\n                        s.pauseAutoplay();\n                    }\n                }\n                allowMomentumBounce = false;\n                //Grab Cursor\n                if (s.params.grabCursor) {\n                    s.container[0].style.cursor = 'move';\n                    s.container[0].style.cursor = '-webkit-grabbing';\n                    s.container[0].style.cursor = '-moz-grabbin';\n                    s.container[0].style.cursor = 'grabbing';\n                }\n            }\n            isMoved = true;\n\n            var diff = s.touches.diff = isH() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;\n\n            diff = diff * s.params.touchRatio;\n            if (s.rtl) diff = -diff;\n\n            s.swipeDirection = diff > 0 ? 'prev' : 'next';\n            currentTranslate = diff + startTranslate;\n\n            var disableParentSwiper = true;\n            if ((diff > 0 && currentTranslate > s.minTranslate())) {\n                disableParentSwiper = false;\n                if (s.params.resistance) currentTranslate = s.minTranslate() - 1 + Math.pow(-s.minTranslate() + startTranslate + diff, s.params.resistanceRatio);\n            }\n            else if (diff < 0 && currentTranslate < s.maxTranslate()) {\n                disableParentSwiper = false;\n                if (s.params.resistance) currentTranslate = s.maxTranslate() + 1 - Math.pow(s.maxTranslate() - startTranslate - diff, s.params.resistanceRatio);\n            }\n\n            if (disableParentSwiper) {\n                e.preventedByNestedSwiper = true;\n            }\n\n            // Directions locks\n            if (!s.params.allowSwipeToNext && s.swipeDirection === 'next' && currentTranslate < startTranslate) {\n                currentTranslate = startTranslate;\n            }\n            if (!s.params.allowSwipeToPrev && s.swipeDirection === 'prev' && currentTranslate > startTranslate) {\n                currentTranslate = startTranslate;\n            }\n\n            if (!s.params.followFinger) return;\n\n            // Threshold\n            if (s.params.threshold > 0) {\n                if (Math.abs(diff) > s.params.threshold || allowThresholdMove) {\n                    if (!allowThresholdMove) {\n                        allowThresholdMove = true;\n                        s.touches.startX = s.touches.currentX;\n                        s.touches.startY = s.touches.currentY;\n                        currentTranslate = startTranslate;\n                        s.touches.diff = isH() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;\n                        return;\n                    }\n                }\n                else {\n                    currentTranslate = startTranslate;\n                    return;\n                }\n            }\n            // Update active index in free mode\n            if (s.params.freeMode || s.params.watchSlidesProgress) {\n                s.updateActiveIndex();\n            }\n            if (s.params.freeMode) {\n                //Velocity\n                if (velocities.length === 0) {\n                    velocities.push({\n                        position: s.touches[isH() ? 'startX' : 'startY'],\n                        time: touchStartTime\n                    });\n                }\n                velocities.push({\n                    position: s.touches[isH() ? 'currentX' : 'currentY'],\n                    time: (new window.Date()).getTime()\n                });\n            }\n            // Update progress\n            s.updateProgress(currentTranslate);\n            // Update translate\n            s.setWrapperTranslate(currentTranslate);\n        };\n        s.onTouchEnd = function (e) {\n            if (e.originalEvent) e = e.originalEvent;\n            if (allowTouchCallbacks) {\n                s.emit('onTouchEnd', s, e);\n            }\n            allowTouchCallbacks = false;\n            if (!isTouched) return;\n            //Return Grab Cursor\n            if (s.params.grabCursor && isMoved && isTouched) {\n                s.container[0].style.cursor = 'move';\n                s.container[0].style.cursor = '-webkit-grab';\n                s.container[0].style.cursor = '-moz-grab';\n                s.container[0].style.cursor = 'grab';\n            }\n\n            // Time diff\n            var touchEndTime = Date.now();\n            var timeDiff = touchEndTime - touchStartTime;\n\n            // Tap, doubleTap, Click\n            if (s.allowClick) {\n                s.updateClickedSlide(e);\n                s.emit('onTap', s, e);\n                if (timeDiff < 300 && (touchEndTime - lastClickTime) > 300) {\n                    if (clickTimeout) clearTimeout(clickTimeout);\n                    clickTimeout = setTimeout(function () {\n                        if (!s) return;\n                        if (s.params.paginationHide && s.paginationContainer.length > 0 && !$(e.target).hasClass(s.params.bulletClass)) {\n                            s.paginationContainer.toggleClass(s.params.paginationHiddenClass);\n                        }\n                        s.emit('onClick', s, e);\n                    }, 300);\n\n                }\n                if (timeDiff < 300 && (touchEndTime - lastClickTime) < 300) {\n                    if (clickTimeout) clearTimeout(clickTimeout);\n                    s.emit('onDoubleTap', s, e);\n                }\n            }\n\n            lastClickTime = Date.now();\n            setTimeout(function () {\n                if (s) s.allowClick = true;\n            }, 0);\n\n            if (!isTouched || !isMoved || !s.swipeDirection || s.touches.diff === 0 || currentTranslate === startTranslate) {\n                isTouched = isMoved = false;\n                return;\n            }\n            isTouched = isMoved = false;\n\n            var currentPos;\n            if (s.params.followFinger) {\n                currentPos = s.rtl ? s.translate : -s.translate;\n            }\n            else {\n                currentPos = -currentTranslate;\n            }\n            if (s.params.freeMode) {\n                if (currentPos < -s.minTranslate()) {\n                    s.slideTo(s.activeIndex);\n                    return;\n                }\n                else if (currentPos > -s.maxTranslate()) {\n                    if (s.slides.length < s.snapGrid.length) {\n                        s.slideTo(s.snapGrid.length - 1);\n                    }\n                    else {\n                        s.slideTo(s.slides.length - 1);\n                    }\n                    return;\n                }\n\n                if (s.params.freeModeMomentum) {\n                    if (velocities.length > 1) {\n                        var lastMoveEvent = velocities.pop(), velocityEvent = velocities.pop();\n\n                        var distance = lastMoveEvent.position - velocityEvent.position;\n                        var time = lastMoveEvent.time - velocityEvent.time;\n                        s.velocity = distance / time;\n                        s.velocity = s.velocity / 2;\n                        if (Math.abs(s.velocity) < s.params.freeModeMinimumVelocity) {\n                            s.velocity = 0;\n                        }\n                        // this implies that the user stopped moving a finger then released.\n                        // There would be no events with distance zero, so the last event is stale.\n                        if (time > 150 || (new window.Date().getTime() - lastMoveEvent.time) > 300) {\n                            s.velocity = 0;\n                        }\n                    } else {\n                        s.velocity = 0;\n                    }\n\n                    velocities.length = 0;\n                    var momentumDuration = 1000 * s.params.freeModeMomentumRatio;\n                    var momentumDistance = s.velocity * momentumDuration;\n\n                    var newPosition = s.translate + momentumDistance;\n                    if (s.rtl) newPosition = - newPosition;\n                    var doBounce = false;\n                    var afterBouncePosition;\n                    var bounceAmount = Math.abs(s.velocity) * 20 * s.params.freeModeMomentumBounceRatio;\n                    if (newPosition < s.maxTranslate()) {\n                        if (s.params.freeModeMomentumBounce) {\n                            if (newPosition + s.maxTranslate() < -bounceAmount) {\n                                newPosition = s.maxTranslate() - bounceAmount;\n                            }\n                            afterBouncePosition = s.maxTranslate();\n                            doBounce = true;\n                            allowMomentumBounce = true;\n                        }\n                        else {\n                            newPosition = s.maxTranslate();\n                        }\n                    }\n                    else if (newPosition > s.minTranslate()) {\n                        if (s.params.freeModeMomentumBounce) {\n                            if (newPosition - s.minTranslate() > bounceAmount) {\n                                newPosition = s.minTranslate() + bounceAmount;\n                            }\n                            afterBouncePosition = s.minTranslate();\n                            doBounce = true;\n                            allowMomentumBounce = true;\n                        }\n                        else {\n                            newPosition = s.minTranslate();\n                        }\n                    }\n                    else if (s.params.freeModeSticky) {\n                        var j = 0,\n                            nextSlide;\n                        for (j = 0; j < s.snapGrid.length; j += 1) {\n                            if (s.snapGrid[j] > -newPosition) {\n                                nextSlide = j;\n                                break;\n                            }\n\n                        }\n                        if (Math.abs(s.snapGrid[nextSlide] - newPosition) < Math.abs(s.snapGrid[nextSlide - 1] - newPosition) || s.swipeDirection === 'next') {\n                            newPosition = s.snapGrid[nextSlide];\n                        } else {\n                            newPosition = s.snapGrid[nextSlide - 1];\n                        }\n                        if (!s.rtl) newPosition = - newPosition;\n                    }\n                    //Fix duration\n                    if (s.velocity !== 0) {\n                        if (s.rtl) {\n                            momentumDuration = Math.abs((-newPosition - s.translate) / s.velocity);\n                        }\n                        else {\n                            momentumDuration = Math.abs((newPosition - s.translate) / s.velocity);\n                        }\n                    }\n                    else if (s.params.freeModeSticky) {\n                        s.slideReset();\n                        return;\n                    }\n\n                    if (s.params.freeModeMomentumBounce && doBounce) {\n                        s.updateProgress(afterBouncePosition);\n                        s.setWrapperTransition(momentumDuration);\n                        s.setWrapperTranslate(newPosition);\n                        s.onTransitionStart();\n                        s.animating = true;\n                        s.wrapper.transitionEnd(function () {\n                            if (!s || !allowMomentumBounce) return;\n                            s.emit('onMomentumBounce', s);\n\n                            s.setWrapperTransition(s.params.speed);\n                            s.setWrapperTranslate(afterBouncePosition);\n                            s.wrapper.transitionEnd(function () {\n                                if (!s) return;\n                                s.onTransitionEnd();\n                            });\n                        });\n                    } else if (s.velocity) {\n                        s.updateProgress(newPosition);\n                        s.setWrapperTransition(momentumDuration);\n                        s.setWrapperTranslate(newPosition);\n                        s.onTransitionStart();\n                        if (!s.animating) {\n                            s.animating = true;\n                            s.wrapper.transitionEnd(function () {\n                                if (!s) return;\n                                s.onTransitionEnd();\n                            });\n                        }\n\n                    } else {\n                        s.updateProgress(newPosition);\n                    }\n\n                    s.updateActiveIndex();\n                }\n                if (!s.params.freeModeMomentum || timeDiff >= s.params.longSwipesMs) {\n                    s.updateProgress();\n                    s.updateActiveIndex();\n                }\n                return;\n            }\n\n            // Find current slide\n            var i, stopIndex = 0, groupSize = s.slidesSizesGrid[0];\n            for (i = 0; i < s.slidesGrid.length; i += s.params.slidesPerGroup) {\n                if (typeof s.slidesGrid[i + s.params.slidesPerGroup] !== 'undefined') {\n                    if (currentPos >= s.slidesGrid[i] && currentPos < s.slidesGrid[i + s.params.slidesPerGroup]) {\n                        stopIndex = i;\n                        groupSize = s.slidesGrid[i + s.params.slidesPerGroup] - s.slidesGrid[i];\n                    }\n                }\n                else {\n                    if (currentPos >= s.slidesGrid[i]) {\n                        stopIndex = i;\n                        groupSize = s.slidesGrid[s.slidesGrid.length - 1] - s.slidesGrid[s.slidesGrid.length - 2];\n                    }\n                }\n            }\n\n            // Find current slide size\n            var ratio = (currentPos - s.slidesGrid[stopIndex]) / groupSize;\n\n            if (timeDiff > s.params.longSwipesMs) {\n                // Long touches\n                if (!s.params.longSwipes) {\n                    s.slideTo(s.activeIndex);\n                    return;\n                }\n                if (s.swipeDirection === 'next') {\n                    if (ratio >= s.params.longSwipesRatio) s.slideTo(stopIndex + s.params.slidesPerGroup);\n                    else s.slideTo(stopIndex);\n\n                }\n                if (s.swipeDirection === 'prev') {\n                    if (ratio > (1 - s.params.longSwipesRatio)) s.slideTo(stopIndex + s.params.slidesPerGroup);\n                    else s.slideTo(stopIndex);\n                }\n            }\n            else {\n                // Short swipes\n                if (!s.params.shortSwipes) {\n                    s.slideTo(s.activeIndex);\n                    return;\n                }\n                if (s.swipeDirection === 'next') {\n                    s.slideTo(stopIndex + s.params.slidesPerGroup);\n\n                }\n                if (s.swipeDirection === 'prev') {\n                    s.slideTo(stopIndex);\n                }\n            }\n        };\n        /*=========================\n          Transitions\n          ===========================*/\n        s._slideTo = function (slideIndex, speed) {\n            return s.slideTo(slideIndex, speed, true, true);\n        };\n        s.slideTo = function (slideIndex, speed, runCallbacks, internal) {\n            if (typeof runCallbacks === 'undefined') runCallbacks = true;\n            if (typeof slideIndex === 'undefined') slideIndex = 0;\n            if (slideIndex < 0) slideIndex = 0;\n            s.snapIndex = Math.floor(slideIndex / s.params.slidesPerGroup);\n            if (s.snapIndex >= s.snapGrid.length) s.snapIndex = s.snapGrid.length - 1;\n\n            var translate = - s.snapGrid[s.snapIndex];\n            // Stop autoplay\n            if (s.params.autoplay && s.autoplaying) {\n                if (internal || !s.params.autoplayDisableOnInteraction) {\n                    s.pauseAutoplay(speed);\n                }\n                else {\n                    s.stopAutoplay();\n                }\n            }\n            // Update progress\n            s.updateProgress(translate);\n\n            // Normalize slideIndex\n            for (var i = 0; i < s.slidesGrid.length; i++) {\n                if (- Math.floor(translate * 100) >= Math.floor(s.slidesGrid[i] * 100)) {\n                    slideIndex = i;\n                }\n            }\n\n            // Directions locks\n            if (!s.params.allowSwipeToNext && translate < s.translate && translate < s.minTranslate()) {\n                return false;\n            }\n            if (!s.params.allowSwipeToPrev && translate > s.translate && translate > s.maxTranslate()) {\n                if ((s.activeIndex || 0) !== slideIndex ) return false;\n            }\n\n            // Update Index\n            if (typeof speed === 'undefined') speed = s.params.speed;\n            s.previousIndex = s.activeIndex || 0;\n            s.activeIndex = slideIndex;\n\n            if ((s.rtl && -translate === s.translate) || (!s.rtl && translate === s.translate)) {\n                // Update Height\n                if (s.params.autoHeight) {\n                    s.updateAutoHeight();\n                }\n                s.updateClasses();\n                if (s.params.effect !== 'slide') {\n                    s.setWrapperTranslate(translate);\n                }\n                return false;\n            }\n            s.updateClasses();\n            s.onTransitionStart(runCallbacks);\n\n            if (speed === 0) {\n                s.setWrapperTranslate(translate);\n                s.setWrapperTransition(0);\n                s.onTransitionEnd(runCallbacks);\n            }\n            else {\n                s.setWrapperTranslate(translate);\n                s.setWrapperTransition(speed);\n                if (!s.animating) {\n                    s.animating = true;\n                    s.wrapper.transitionEnd(function () {\n                        if (!s) return;\n                        s.onTransitionEnd(runCallbacks);\n                    });\n                }\n\n            }\n\n            return true;\n        };\n\n        s.onTransitionStart = function (runCallbacks) {\n            if (typeof runCallbacks === 'undefined') runCallbacks = true;\n            if (s.params.autoHeight) {\n                s.updateAutoHeight();\n            }\n            if (s.lazy) s.lazy.onTransitionStart();\n            if (runCallbacks) {\n                s.emit('onTransitionStart', s);\n                if (s.activeIndex !== s.previousIndex) {\n                    s.emit('onSlideChangeStart', s);\n                    _scope.$emit(\"$ionicSlides.slideChangeStart\", {\n                      slider: s,\n                      activeIndex: s.getSlideDataIndex(s.activeIndex),\n                      previousIndex: s.getSlideDataIndex(s.previousIndex)\n                    });\n                    if (s.activeIndex > s.previousIndex) {\n                        s.emit('onSlideNextStart', s);\n                    }\n                    else {\n                        s.emit('onSlidePrevStart', s);\n                    }\n                }\n\n            }\n        };\n        s.onTransitionEnd = function (runCallbacks) {\n            s.animating = false;\n            s.setWrapperTransition(0);\n            if (typeof runCallbacks === 'undefined') runCallbacks = true;\n            if (s.lazy) s.lazy.onTransitionEnd();\n            if (runCallbacks) {\n                s.emit('onTransitionEnd', s);\n                if (s.activeIndex !== s.previousIndex) {\n                    s.emit('onSlideChangeEnd', s);\n                    _scope.$emit(\"$ionicSlides.slideChangeEnd\", {\n                      slider: s,\n                      activeIndex: s.getSlideDataIndex(s.activeIndex),\n                      previousIndex: s.getSlideDataIndex(s.previousIndex)\n                    });\n                    if (s.activeIndex > s.previousIndex) {\n                        s.emit('onSlideNextEnd', s);\n                    }\n                    else {\n                        s.emit('onSlidePrevEnd', s);\n                    }\n                }\n            }\n            if (s.params.hashnav && s.hashnav) {\n                s.hashnav.setHash();\n            }\n\n        };\n        s.slideNext = function (runCallbacks, speed, internal) {\n            if (s.params.loop) {\n                if (s.animating) return false;\n                s.fixLoop();\n                var clientLeft = s.container[0].clientLeft;\n                return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);\n            }\n            else return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);\n        };\n        s._slideNext = function (speed) {\n            return s.slideNext(true, speed, true);\n        };\n        s.slidePrev = function (runCallbacks, speed, internal) {\n            if (s.params.loop) {\n                if (s.animating) return false;\n                s.fixLoop();\n                var clientLeft = s.container[0].clientLeft;\n                return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);\n            }\n            else return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);\n        };\n        s._slidePrev = function (speed) {\n            return s.slidePrev(true, speed, true);\n        };\n        s.slideReset = function (runCallbacks, speed, internal) {\n            return s.slideTo(s.activeIndex, speed, runCallbacks);\n        };\n\n        /*=========================\n          Translate/transition helpers\n          ===========================*/\n        s.setWrapperTransition = function (duration, byController) {\n            s.wrapper.transition(duration);\n            if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n                s.effects[s.params.effect].setTransition(duration);\n            }\n            if (s.params.parallax && s.parallax) {\n                s.parallax.setTransition(duration);\n            }\n            if (s.params.scrollbar && s.scrollbar) {\n                s.scrollbar.setTransition(duration);\n            }\n            if (s.params.control && s.controller) {\n                s.controller.setTransition(duration, byController);\n            }\n            s.emit('onSetTransition', s, duration);\n        };\n        s.setWrapperTranslate = function (translate, updateActiveIndex, byController) {\n            var x = 0, y = 0, z = 0;\n            if (isH()) {\n                x = s.rtl ? -translate : translate;\n            }\n            else {\n                y = translate;\n            }\n\n            if (s.params.roundLengths) {\n                x = round(x);\n                y = round(y);\n            }\n\n            if (!s.params.virtualTranslate) {\n                if (s.support.transforms3d) s.wrapper.transform('translate3d(' + x + 'px, ' + y + 'px, ' + z + 'px)');\n                else s.wrapper.transform('translate(' + x + 'px, ' + y + 'px)');\n            }\n\n            s.translate = isH() ? x : y;\n\n            // Check if we need to update progress\n            var progress;\n            var translatesDiff = s.maxTranslate() - s.minTranslate();\n            if (translatesDiff === 0) {\n                progress = 0;\n            }\n            else {\n                progress = (translate - s.minTranslate()) / (translatesDiff);\n            }\n            if (progress !== s.progress) {\n                s.updateProgress(translate);\n            }\n\n            if (updateActiveIndex) s.updateActiveIndex();\n            if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n                s.effects[s.params.effect].setTranslate(s.translate);\n            }\n            if (s.params.parallax && s.parallax) {\n                s.parallax.setTranslate(s.translate);\n            }\n            if (s.params.scrollbar && s.scrollbar) {\n                s.scrollbar.setTranslate(s.translate);\n            }\n            if (s.params.control && s.controller) {\n                s.controller.setTranslate(s.translate, byController);\n            }\n            s.emit('onSetTranslate', s, s.translate);\n        };\n\n        s.getTranslate = function (el, axis) {\n            var matrix, curTransform, curStyle, transformMatrix;\n\n            // automatic axis detection\n            if (typeof axis === 'undefined') {\n                axis = 'x';\n            }\n\n            if (s.params.virtualTranslate) {\n                return s.rtl ? -s.translate : s.translate;\n            }\n\n            curStyle = window.getComputedStyle(el, null);\n            if (window.WebKitCSSMatrix) {\n                curTransform = curStyle.transform || curStyle.webkitTransform;\n                if (curTransform.split(',').length > 6) {\n                    curTransform = curTransform.split(', ').map(function(a){\n                        return a.replace(',','.');\n                    }).join(', ');\n                }\n                // Some old versions of Webkit choke when 'none' is passed; pass\n                // empty string instead in this case\n                transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n            }\n            else {\n                transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform  || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n                matrix = transformMatrix.toString().split(',');\n            }\n\n            if (axis === 'x') {\n                //Latest Chrome and webkits Fix\n                if (window.WebKitCSSMatrix)\n                    curTransform = transformMatrix.m41;\n                //Crazy IE10 Matrix\n                else if (matrix.length === 16)\n                    curTransform = parseFloat(matrix[12]);\n                //Normal Browsers\n                else\n                    curTransform = parseFloat(matrix[4]);\n            }\n            if (axis === 'y') {\n                //Latest Chrome and webkits Fix\n                if (window.WebKitCSSMatrix)\n                    curTransform = transformMatrix.m42;\n                //Crazy IE10 Matrix\n                else if (matrix.length === 16)\n                    curTransform = parseFloat(matrix[13]);\n                //Normal Browsers\n                else\n                    curTransform = parseFloat(matrix[5]);\n            }\n            if (s.rtl && curTransform) curTransform = -curTransform;\n            return curTransform || 0;\n        };\n        s.getWrapperTranslate = function (axis) {\n            if (typeof axis === 'undefined') {\n                axis = isH() ? 'x' : 'y';\n            }\n            return s.getTranslate(s.wrapper[0], axis);\n        };\n\n        /*=========================\n          Observer\n          ===========================*/\n        s.observers = [];\n        function initObserver(target, options) {\n            options = options || {};\n            // create an observer instance\n            var ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n            var observer = new ObserverFunc(function (mutations) {\n                mutations.forEach(function (mutation) {\n                    s.onResize(true);\n                    s.emit('onObserverUpdate', s, mutation);\n                });\n            });\n\n            observer.observe(target, {\n                attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n                childList: typeof options.childList === 'undefined' ? true : options.childList,\n                characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n            });\n\n            s.observers.push(observer);\n        }\n        s.initObservers = function () {\n            if (s.params.observeParents) {\n                var containerParents = s.container.parents();\n                for (var i = 0; i < containerParents.length; i++) {\n                    initObserver(containerParents[i]);\n                }\n            }\n\n            // Observe container\n            initObserver(s.container[0], {childList: false});\n\n            // Observe wrapper\n            initObserver(s.wrapper[0], {attributes: false});\n        };\n        s.disconnectObservers = function () {\n            for (var i = 0; i < s.observers.length; i++) {\n                s.observers[i].disconnect();\n            }\n            s.observers = [];\n        };\n\n        s.updateLoop = function(){\n          var currentSlide = s.slides.eq(s.activeIndex);\n          if ( angular.element(currentSlide).hasClass(s.params.slideDuplicateClass) ){\n            // we're on a duplicate, so slide to the non-duplicate\n            var swiperSlideIndex = angular.element(currentSlide).attr(\"data-swiper-slide-index\");\n            var slides = s.wrapper.children('.' + s.params.slideClass);\n            for ( var i = 0; i < slides.length; i++ ){\n              if ( !angular.element(slides[i]).hasClass(s.params.slideDuplicateClass) && angular.element(slides[i]).attr(\"data-swiper-slide-index\") === swiperSlideIndex ){\n                s.slideTo(i, 0, false, true);\n                break;\n              }\n            }\n            // if we needed to switch slides, we did that.  So, now call the createLoop function internally\n            setTimeout(function(){\n              s.createLoop();\n            }, 50);\n          }\n        }\n\n        s.getSlideDataIndex = function(slideIndex){\n          // this is an Ionic custom function\n          // Swiper loops utilize duplicate DOM elements for slides when in a loop\n          // which means that we cannot rely on the actual slide index for our events\n          // because index 0 does not necessarily point to index 0\n          // and index n+1 does not necessarily point to the expected piece of data\n          // therefore, rather than using the actual slide index we should\n          // use the data index that swiper includes as an attribute on the dom elements\n          // because this is what will be meaningful to the consumer of our events\n          var slide = s.slides.eq(slideIndex);\n          var attributeIndex = angular.element(slide).attr(\"data-swiper-slide-index\");\n          return parseInt(attributeIndex);\n        }\n\n        /*=========================\n          Loop\n          ===========================*/\n        // Create looped slides\n        s.createLoop = function () {\n          //console.log(\"Slider create loop method\");\n            //var toRemove = s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass);\n            //angular.element(toRemove).remove();\n            s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();\n\n            var slides = s.wrapper.children('.' + s.params.slideClass);\n\n            if(s.params.slidesPerView === 'auto' && !s.params.loopedSlides) s.params.loopedSlides = slides.length;\n\n            s.loopedSlides = parseInt(s.params.loopedSlides || s.params.slidesPerView, 10);\n            s.loopedSlides = s.loopedSlides + s.params.loopAdditionalSlides;\n            if (s.loopedSlides > slides.length) {\n                s.loopedSlides = slides.length;\n            }\n\n            var prependSlides = [], appendSlides = [], i, scope, newNode;\n            slides.each(function (index, el) {\n                var slide = $(this);\n                if (index < s.loopedSlides) appendSlides.push(el);\n                if (index < slides.length && index >= slides.length - s.loopedSlides) prependSlides.push(el);\n                slide.attr('data-swiper-slide-index', index);\n            });\n            for (i = 0; i < appendSlides.length; i++) {\n\n              newNode = angular.element(appendSlides[i]).clone().addClass(s.params.slideDuplicateClass);\n              newNode.removeAttr('ng-transclude');\n              newNode.removeAttr('ng-repeat');\n              scope = angular.element(appendSlides[i]).scope();\n              newNode = $compile(newNode)(scope);\n              angular.element(s.wrapper).append(newNode);\n              //s.wrapper.append($(appendSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));\n            }\n            for (i = prependSlides.length - 1; i >= 0; i--) {\n              //s.wrapper.prepend($(prependSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));\n\n              newNode = angular.element(prependSlides[i]).clone().addClass(s.params.slideDuplicateClass);\n              newNode.removeAttr('ng-transclude');\n              newNode.removeAttr('ng-repeat');\n\n              scope = angular.element(prependSlides[i]).scope();\n              newNode = $compile(newNode)(scope);\n              angular.element(s.wrapper).prepend(newNode);\n            }\n        };\n        s.destroyLoop = function () {\n            s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();\n            s.slides.removeAttr('data-swiper-slide-index');\n        };\n        s.fixLoop = function () {\n            var newIndex;\n            //Fix For Negative Oversliding\n            if (s.activeIndex < s.loopedSlides) {\n                newIndex = s.slides.length - s.loopedSlides * 3 + s.activeIndex;\n                newIndex = newIndex + s.loopedSlides;\n                s.slideTo(newIndex, 0, false, true);\n            }\n            //Fix For Positive Oversliding\n            else if ((s.params.slidesPerView === 'auto' && s.activeIndex >= s.loopedSlides * 2) || (s.activeIndex > s.slides.length - s.params.slidesPerView * 2)) {\n                newIndex = -s.slides.length + s.activeIndex + s.loopedSlides;\n                newIndex = newIndex + s.loopedSlides;\n                s.slideTo(newIndex, 0, false, true);\n            }\n        };\n        /*=========================\n          Append/Prepend/Remove Slides\n          ===========================*/\n        s.appendSlide = function (slides) {\n            if (s.params.loop) {\n                s.destroyLoop();\n            }\n            if (typeof slides === 'object' && slides.length) {\n                for (var i = 0; i < slides.length; i++) {\n                    if (slides[i]) s.wrapper.append(slides[i]);\n                }\n            }\n            else {\n                s.wrapper.append(slides);\n            }\n            if (s.params.loop) {\n                s.createLoop();\n            }\n            if (!(s.params.observer && s.support.observer)) {\n                s.update(true);\n            }\n        };\n        s.prependSlide = function (slides) {\n            if (s.params.loop) {\n                s.destroyLoop();\n            }\n            var newActiveIndex = s.activeIndex + 1;\n            if (typeof slides === 'object' && slides.length) {\n                for (var i = 0; i < slides.length; i++) {\n                    if (slides[i]) s.wrapper.prepend(slides[i]);\n                }\n                newActiveIndex = s.activeIndex + slides.length;\n            }\n            else {\n                s.wrapper.prepend(slides);\n            }\n            if (s.params.loop) {\n                s.createLoop();\n            }\n            if (!(s.params.observer && s.support.observer)) {\n                s.update(true);\n            }\n            s.slideTo(newActiveIndex, 0, false);\n        };\n        s.removeSlide = function (slidesIndexes) {\n            if (s.params.loop) {\n                s.destroyLoop();\n                s.slides = s.wrapper.children('.' + s.params.slideClass);\n            }\n            var newActiveIndex = s.activeIndex,\n                indexToRemove;\n            if (typeof slidesIndexes === 'object' && slidesIndexes.length) {\n                for (var i = 0; i < slidesIndexes.length; i++) {\n                    indexToRemove = slidesIndexes[i];\n                    if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();\n                    if (indexToRemove < newActiveIndex) newActiveIndex--;\n                }\n                newActiveIndex = Math.max(newActiveIndex, 0);\n            }\n            else {\n                indexToRemove = slidesIndexes;\n                if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();\n                if (indexToRemove < newActiveIndex) newActiveIndex--;\n                newActiveIndex = Math.max(newActiveIndex, 0);\n            }\n\n            if (s.params.loop) {\n                s.createLoop();\n            }\n\n            if (!(s.params.observer && s.support.observer)) {\n                s.update(true);\n            }\n            if (s.params.loop) {\n                s.slideTo(newActiveIndex + s.loopedSlides, 0, false);\n            }\n            else {\n                s.slideTo(newActiveIndex, 0, false);\n            }\n\n        };\n        s.removeAllSlides = function () {\n            var slidesIndexes = [];\n            for (var i = 0; i < s.slides.length; i++) {\n                slidesIndexes.push(i);\n            }\n            s.removeSlide(slidesIndexes);\n        };\n\n\n        /*=========================\n          Effects\n          ===========================*/\n        s.effects = {\n            fade: {\n                setTranslate: function () {\n                    for (var i = 0; i < s.slides.length; i++) {\n                        var slide = s.slides.eq(i);\n                        var offset = slide[0].swiperSlideOffset;\n                        var tx = -offset;\n                        if (!s.params.virtualTranslate) tx = tx - s.translate;\n                        var ty = 0;\n                        if (!isH()) {\n                            ty = tx;\n                            tx = 0;\n                        }\n                        var slideOpacity = s.params.fade.crossFade ?\n                                Math.max(1 - Math.abs(slide[0].progress), 0) :\n                                1 + Math.min(Math.max(slide[0].progress, -1), 0);\n                        slide\n                            .css({\n                                opacity: slideOpacity\n                            })\n                            .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px)');\n\n                    }\n\n                },\n                setTransition: function (duration) {\n                    s.slides.transition(duration);\n                    if (s.params.virtualTranslate && duration !== 0) {\n                        var eventTriggered = false;\n                        s.slides.transitionEnd(function () {\n                            if (eventTriggered) return;\n                            if (!s) return;\n                            eventTriggered = true;\n                            s.animating = false;\n                            var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];\n                            for (var i = 0; i < triggerEvents.length; i++) {\n                                s.wrapper.trigger(triggerEvents[i]);\n                            }\n                        });\n                    }\n                }\n            },\n            cube: {\n                setTranslate: function () {\n                    var wrapperRotate = 0, cubeShadow;\n                    if (s.params.cube.shadow) {\n                        if (isH()) {\n                            cubeShadow = s.wrapper.find('.swiper-cube-shadow');\n                            if (cubeShadow.length === 0) {\n                                cubeShadow = $('<div class=\"swiper-cube-shadow\"></div>');\n                                s.wrapper.append(cubeShadow);\n                            }\n                            cubeShadow.css({height: s.width + 'px'});\n                        }\n                        else {\n                            cubeShadow = s.container.find('.swiper-cube-shadow');\n                            if (cubeShadow.length === 0) {\n                                cubeShadow = $('<div class=\"swiper-cube-shadow\"></div>');\n                                s.container.append(cubeShadow);\n                            }\n                        }\n                    }\n                    for (var i = 0; i < s.slides.length; i++) {\n                        var slide = s.slides.eq(i);\n                        var slideAngle = i * 90;\n                        var round = Math.floor(slideAngle / 360);\n                        if (s.rtl) {\n                            slideAngle = -slideAngle;\n                            round = Math.floor(-slideAngle / 360);\n                        }\n                        var progress = Math.max(Math.min(slide[0].progress, 1), -1);\n                        var tx = 0, ty = 0, tz = 0;\n                        if (i % 4 === 0) {\n                            tx = - round * 4 * s.size;\n                            tz = 0;\n                        }\n                        else if ((i - 1) % 4 === 0) {\n                            tx = 0;\n                            tz = - round * 4 * s.size;\n                        }\n                        else if ((i - 2) % 4 === 0) {\n                            tx = s.size + round * 4 * s.size;\n                            tz = s.size;\n                        }\n                        else if ((i - 3) % 4 === 0) {\n                            tx = - s.size;\n                            tz = 3 * s.size + s.size * 4 * round;\n                        }\n                        if (s.rtl) {\n                            tx = -tx;\n                        }\n\n                        if (!isH()) {\n                            ty = tx;\n                            tx = 0;\n                        }\n\n                        var transform = 'rotateX(' + (isH() ? 0 : -slideAngle) + 'deg) rotateY(' + (isH() ? slideAngle : 0) + 'deg) translate3d(' + tx + 'px, ' + ty + 'px, ' + tz + 'px)';\n                        if (progress <= 1 && progress > -1) {\n                            wrapperRotate = i * 90 + progress * 90;\n                            if (s.rtl) wrapperRotate = -i * 90 - progress * 90;\n                        }\n                        slide.transform(transform);\n                        if (s.params.cube.slideShadows) {\n                            //Set shadows\n                            var shadowBefore = isH() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');\n                            var shadowAfter = isH() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');\n                            if (shadowBefore.length === 0) {\n                                shadowBefore = $('<div class=\"swiper-slide-shadow-' + (isH() ? 'left' : 'top') + '\"></div>');\n                                slide.append(shadowBefore);\n                            }\n                            if (shadowAfter.length === 0) {\n                                shadowAfter = $('<div class=\"swiper-slide-shadow-' + (isH() ? 'right' : 'bottom') + '\"></div>');\n                                slide.append(shadowAfter);\n                            }\n                            var shadowOpacity = slide[0].progress;\n                            if (shadowBefore.length) shadowBefore[0].style.opacity = -slide[0].progress;\n                            if (shadowAfter.length) shadowAfter[0].style.opacity = slide[0].progress;\n                        }\n                    }\n                    s.wrapper.css({\n                        '-webkit-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n                        '-moz-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n                        '-ms-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n                        'transform-origin': '50% 50% -' + (s.size / 2) + 'px'\n                    });\n\n                    if (s.params.cube.shadow) {\n                        if (isH()) {\n                            cubeShadow.transform('translate3d(0px, ' + (s.width / 2 + s.params.cube.shadowOffset) + 'px, ' + (-s.width / 2) + 'px) rotateX(90deg) rotateZ(0deg) scale(' + (s.params.cube.shadowScale) + ')');\n                        }\n                        else {\n                            var shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;\n                            var multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);\n                            var scale1 = s.params.cube.shadowScale,\n                                scale2 = s.params.cube.shadowScale / multiplier,\n                                offset = s.params.cube.shadowOffset;\n                            cubeShadow.transform('scale3d(' + scale1 + ', 1, ' + scale2 + ') translate3d(0px, ' + (s.height / 2 + offset) + 'px, ' + (-s.height / 2 / scale2) + 'px) rotateX(-90deg)');\n                        }\n                    }\n                    var zFactor = (s.isSafari || s.isUiWebView) ? (-s.size / 2) : 0;\n                    s.wrapper.transform('translate3d(0px,0,' + zFactor + 'px) rotateX(' + (isH() ? 0 : wrapperRotate) + 'deg) rotateY(' + (isH() ? -wrapperRotate : 0) + 'deg)');\n                },\n                setTransition: function (duration) {\n                    s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n                    if (s.params.cube.shadow && !isH()) {\n                        s.container.find('.swiper-cube-shadow').transition(duration);\n                    }\n                }\n            },\n            coverflow: {\n                setTranslate: function () {\n                    var transform = s.translate;\n                    var center = isH() ? -transform + s.width / 2 : -transform + s.height / 2;\n                    var rotate = isH() ? s.params.coverflow.rotate: -s.params.coverflow.rotate;\n                    var translate = s.params.coverflow.depth;\n                    //Each slide offset from center\n                    for (var i = 0, length = s.slides.length; i < length; i++) {\n                        var slide = s.slides.eq(i);\n                        var slideSize = s.slidesSizesGrid[i];\n                        var slideOffset = slide[0].swiperSlideOffset;\n                        var offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * s.params.coverflow.modifier;\n\n                        var rotateY = isH() ? rotate * offsetMultiplier : 0;\n                        var rotateX = isH() ? 0 : rotate * offsetMultiplier;\n                        // var rotateZ = 0\n                        var translateZ = -translate * Math.abs(offsetMultiplier);\n\n                        var translateY = isH() ? 0 : s.params.coverflow.stretch * (offsetMultiplier);\n                        var translateX = isH() ? s.params.coverflow.stretch * (offsetMultiplier) : 0;\n\n                        //Fix for ultra small values\n                        if (Math.abs(translateX) < 0.001) translateX = 0;\n                        if (Math.abs(translateY) < 0.001) translateY = 0;\n                        if (Math.abs(translateZ) < 0.001) translateZ = 0;\n                        if (Math.abs(rotateY) < 0.001) rotateY = 0;\n                        if (Math.abs(rotateX) < 0.001) rotateX = 0;\n\n                        var slideTransform = 'translate3d(' + translateX + 'px,' + translateY + 'px,' + translateZ + 'px)  rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)';\n\n                        slide.transform(slideTransform);\n                        slide[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;\n                        if (s.params.coverflow.slideShadows) {\n                            //Set shadows\n                            var shadowBefore = isH() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');\n                            var shadowAfter = isH() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');\n                            if (shadowBefore.length === 0) {\n                                shadowBefore = $('<div class=\"swiper-slide-shadow-' + (isH() ? 'left' : 'top') + '\"></div>');\n                                slide.append(shadowBefore);\n                            }\n                            if (shadowAfter.length === 0) {\n                                shadowAfter = $('<div class=\"swiper-slide-shadow-' + (isH() ? 'right' : 'bottom') + '\"></div>');\n                                slide.append(shadowAfter);\n                            }\n                            if (shadowBefore.length) shadowBefore[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;\n                            if (shadowAfter.length) shadowAfter[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;\n                        }\n                    }\n\n                    //Set correct perspective for IE10\n                    if (s.browser.ie) {\n                        var ws = s.wrapper[0].style;\n                        ws.perspectiveOrigin = center + 'px 50%';\n                    }\n                },\n                setTransition: function (duration) {\n                    s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n                }\n            }\n        };\n\n        /*=========================\n          Images Lazy Loading\n          ===========================*/\n        s.lazy = {\n            initialImageLoaded: false,\n            loadImageInSlide: function (index, loadInDuplicate) {\n                if (typeof index === 'undefined') return;\n                if (typeof loadInDuplicate === 'undefined') loadInDuplicate = true;\n                if (s.slides.length === 0) return;\n\n                var slide = s.slides.eq(index);\n                var img = slide.find('.swiper-lazy:not(.swiper-lazy-loaded):not(.swiper-lazy-loading)');\n                if (slide.hasClass('swiper-lazy') && !slide.hasClass('swiper-lazy-loaded') && !slide.hasClass('swiper-lazy-loading')) {\n                    img = img.add(slide[0]);\n                }\n                if (img.length === 0) return;\n\n                img.each(function () {\n                    var _img = $(this);\n                    _img.addClass('swiper-lazy-loading');\n                    var background = _img.attr('data-background');\n                    var src = _img.attr('data-src'),\n                        srcset = _img.attr('data-srcset');\n                    s.loadImage(_img[0], (src || background), srcset, false, function () {\n                        if (background) {\n                            _img.css('background-image', 'url(' + background + ')');\n                            _img.removeAttr('data-background');\n                        }\n                        else {\n                            if (srcset) {\n                                _img.attr('srcset', srcset);\n                                _img.removeAttr('data-srcset');\n                            }\n                            if (src) {\n                                _img.attr('src', src);\n                                _img.removeAttr('data-src');\n                            }\n\n                        }\n\n                        _img.addClass('swiper-lazy-loaded').removeClass('swiper-lazy-loading');\n                        slide.find('.swiper-lazy-preloader, .preloader').remove();\n                        if (s.params.loop && loadInDuplicate) {\n                            var slideOriginalIndex = slide.attr('data-swiper-slide-index');\n                            if (slide.hasClass(s.params.slideDuplicateClass)) {\n                                var originalSlide = s.wrapper.children('[data-swiper-slide-index=\"' + slideOriginalIndex + '\"]:not(.' + s.params.slideDuplicateClass + ')');\n                                s.lazy.loadImageInSlide(originalSlide.index(), false);\n                            }\n                            else {\n                                var duplicatedSlide = s.wrapper.children('.' + s.params.slideDuplicateClass + '[data-swiper-slide-index=\"' + slideOriginalIndex + '\"]');\n                                s.lazy.loadImageInSlide(duplicatedSlide.index(), false);\n                            }\n                        }\n                        s.emit('onLazyImageReady', s, slide[0], _img[0]);\n                    });\n\n                    s.emit('onLazyImageLoad', s, slide[0], _img[0]);\n                });\n\n            },\n            load: function () {\n                var i;\n                if (s.params.watchSlidesVisibility) {\n                    s.wrapper.children('.' + s.params.slideVisibleClass).each(function () {\n                        s.lazy.loadImageInSlide($(this).index());\n                    });\n                }\n                else {\n                    if (s.params.slidesPerView > 1) {\n                        for (i = s.activeIndex; i < s.activeIndex + s.params.slidesPerView ; i++) {\n                            if (s.slides[i]) s.lazy.loadImageInSlide(i);\n                        }\n                    }\n                    else {\n                        s.lazy.loadImageInSlide(s.activeIndex);\n                    }\n                }\n                if (s.params.lazyLoadingInPrevNext) {\n                    if (s.params.slidesPerView > 1) {\n                        // Next Slides\n                        for (i = s.activeIndex + s.params.slidesPerView; i < s.activeIndex + s.params.slidesPerView + s.params.slidesPerView; i++) {\n                            if (s.slides[i]) s.lazy.loadImageInSlide(i);\n                        }\n                        // Prev Slides\n                        for (i = s.activeIndex - s.params.slidesPerView; i < s.activeIndex ; i++) {\n                            if (s.slides[i]) s.lazy.loadImageInSlide(i);\n                        }\n                    }\n                    else {\n                        var nextSlide = s.wrapper.children('.' + s.params.slideNextClass);\n                        if (nextSlide.length > 0) s.lazy.loadImageInSlide(nextSlide.index());\n\n                        var prevSlide = s.wrapper.children('.' + s.params.slidePrevClass);\n                        if (prevSlide.length > 0) s.lazy.loadImageInSlide(prevSlide.index());\n                    }\n                }\n            },\n            onTransitionStart: function () {\n                if (s.params.lazyLoading) {\n                    if (s.params.lazyLoadingOnTransitionStart || (!s.params.lazyLoadingOnTransitionStart && !s.lazy.initialImageLoaded)) {\n                        s.lazy.load();\n                    }\n                }\n            },\n            onTransitionEnd: function () {\n                if (s.params.lazyLoading && !s.params.lazyLoadingOnTransitionStart) {\n                    s.lazy.load();\n                }\n            }\n        };\n\n\n        /*=========================\n          Scrollbar\n          ===========================*/\n        s.scrollbar = {\n            isTouched: false,\n            setDragPosition: function (e) {\n                var sb = s.scrollbar;\n                var x = 0, y = 0;\n                var translate;\n                var pointerPosition = isH() ?\n                    ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX) :\n                    ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY) ;\n                var position = (pointerPosition) - sb.track.offset()[isH() ? 'left' : 'top'] - sb.dragSize / 2;\n                var positionMin = -s.minTranslate() * sb.moveDivider;\n                var positionMax = -s.maxTranslate() * sb.moveDivider;\n                if (position < positionMin) {\n                    position = positionMin;\n                }\n                else if (position > positionMax) {\n                    position = positionMax;\n                }\n                position = -position / sb.moveDivider;\n                s.updateProgress(position);\n                s.setWrapperTranslate(position, true);\n            },\n            dragStart: function (e) {\n                var sb = s.scrollbar;\n                sb.isTouched = true;\n                e.preventDefault();\n                e.stopPropagation();\n\n                sb.setDragPosition(e);\n                clearTimeout(sb.dragTimeout);\n\n                sb.track.transition(0);\n                if (s.params.scrollbarHide) {\n                    sb.track.css('opacity', 1);\n                }\n                s.wrapper.transition(100);\n                sb.drag.transition(100);\n                s.emit('onScrollbarDragStart', s);\n            },\n            dragMove: function (e) {\n                var sb = s.scrollbar;\n                if (!sb.isTouched) return;\n                if (e.preventDefault) e.preventDefault();\n                else e.returnValue = false;\n                sb.setDragPosition(e);\n                s.wrapper.transition(0);\n                sb.track.transition(0);\n                sb.drag.transition(0);\n                s.emit('onScrollbarDragMove', s);\n            },\n            dragEnd: function (e) {\n                var sb = s.scrollbar;\n                if (!sb.isTouched) return;\n                sb.isTouched = false;\n                if (s.params.scrollbarHide) {\n                    clearTimeout(sb.dragTimeout);\n                    sb.dragTimeout = setTimeout(function () {\n                        sb.track.css('opacity', 0);\n                        sb.track.transition(400);\n                    }, 1000);\n\n                }\n                s.emit('onScrollbarDragEnd', s);\n                if (s.params.scrollbarSnapOnRelease) {\n                    s.slideReset();\n                }\n            },\n            enableDraggable: function () {\n                var sb = s.scrollbar;\n                var target = s.support.touch ? sb.track : document;\n                $(sb.track).on(s.touchEvents.start, sb.dragStart);\n                $(target).on(s.touchEvents.move, sb.dragMove);\n                $(target).on(s.touchEvents.end, sb.dragEnd);\n            },\n            disableDraggable: function () {\n                var sb = s.scrollbar;\n                var target = s.support.touch ? sb.track : document;\n                $(sb.track).off(s.touchEvents.start, sb.dragStart);\n                $(target).off(s.touchEvents.move, sb.dragMove);\n                $(target).off(s.touchEvents.end, sb.dragEnd);\n            },\n            set: function () {\n                if (!s.params.scrollbar) return;\n                var sb = s.scrollbar;\n                sb.track = $(s.params.scrollbar);\n                sb.drag = sb.track.find('.swiper-scrollbar-drag');\n                if (sb.drag.length === 0) {\n                    sb.drag = $('<div class=\"swiper-scrollbar-drag\"></div>');\n                    sb.track.append(sb.drag);\n                }\n                sb.drag[0].style.width = '';\n                sb.drag[0].style.height = '';\n                sb.trackSize = isH() ? sb.track[0].offsetWidth : sb.track[0].offsetHeight;\n\n                sb.divider = s.size / s.virtualSize;\n                sb.moveDivider = sb.divider * (sb.trackSize / s.size);\n                sb.dragSize = sb.trackSize * sb.divider;\n\n                if (isH()) {\n                    sb.drag[0].style.width = sb.dragSize + 'px';\n                }\n                else {\n                    sb.drag[0].style.height = sb.dragSize + 'px';\n                }\n\n                if (sb.divider >= 1) {\n                    sb.track[0].style.display = 'none';\n                }\n                else {\n                    sb.track[0].style.display = '';\n                }\n                if (s.params.scrollbarHide) {\n                    sb.track[0].style.opacity = 0;\n                }\n            },\n            setTranslate: function () {\n                if (!s.params.scrollbar) return;\n                var diff;\n                var sb = s.scrollbar;\n                var translate = s.translate || 0;\n                var newPos;\n\n                var newSize = sb.dragSize;\n                newPos = (sb.trackSize - sb.dragSize) * s.progress;\n                if (s.rtl && isH()) {\n                    newPos = -newPos;\n                    if (newPos > 0) {\n                        newSize = sb.dragSize - newPos;\n                        newPos = 0;\n                    }\n                    else if (-newPos + sb.dragSize > sb.trackSize) {\n                        newSize = sb.trackSize + newPos;\n                    }\n                }\n                else {\n                    if (newPos < 0) {\n                        newSize = sb.dragSize + newPos;\n                        newPos = 0;\n                    }\n                    else if (newPos + sb.dragSize > sb.trackSize) {\n                        newSize = sb.trackSize - newPos;\n                    }\n                }\n                if (isH()) {\n                    if (s.support.transforms3d) {\n                        sb.drag.transform('translate3d(' + (newPos) + 'px, 0, 0)');\n                    }\n                    else {\n                        sb.drag.transform('translateX(' + (newPos) + 'px)');\n                    }\n                    sb.drag[0].style.width = newSize + 'px';\n                }\n                else {\n                    if (s.support.transforms3d) {\n                        sb.drag.transform('translate3d(0px, ' + (newPos) + 'px, 0)');\n                    }\n                    else {\n                        sb.drag.transform('translateY(' + (newPos) + 'px)');\n                    }\n                    sb.drag[0].style.height = newSize + 'px';\n                }\n                if (s.params.scrollbarHide) {\n                    clearTimeout(sb.timeout);\n                    sb.track[0].style.opacity = 1;\n                    sb.timeout = setTimeout(function () {\n                        sb.track[0].style.opacity = 0;\n                        sb.track.transition(400);\n                    }, 1000);\n                }\n            },\n            setTransition: function (duration) {\n                if (!s.params.scrollbar) return;\n                s.scrollbar.drag.transition(duration);\n            }\n        };\n\n        /*=========================\n          Controller\n          ===========================*/\n        s.controller = {\n            LinearSpline: function (x, y) {\n                this.x = x;\n                this.y = y;\n                this.lastIndex = x.length - 1;\n                // Given an x value (x2), return the expected y2 value:\n                // (x1,y1) is the known point before given value,\n                // (x3,y3) is the known point after given value.\n                var i1, i3;\n                var l = this.x.length;\n\n                this.interpolate = function (x2) {\n                    if (!x2) return 0;\n\n                    // Get the indexes of x1 and x3 (the array indexes before and after given x2):\n                    i3 = binarySearch(this.x, x2);\n                    i1 = i3 - 1;\n\n                    // We have our indexes i1 & i3, so we can calculate already:\n                    // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1\n                    return ((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1]) + this.y[i1];\n                };\n\n                var binarySearch = (function() {\n                    var maxIndex, minIndex, guess;\n                    return function(array, val) {\n                        minIndex = -1;\n                        maxIndex = array.length;\n                        while (maxIndex - minIndex > 1)\n                            if (array[guess = maxIndex + minIndex >> 1] <= val) {\n                                minIndex = guess;\n                            } else {\n                                maxIndex = guess;\n                            }\n                        return maxIndex;\n                    };\n                })();\n            },\n            //xxx: for now i will just save one spline function to to\n            getInterpolateFunction: function(c){\n                if(!s.controller.spline) s.controller.spline = s.params.loop ?\n                    new s.controller.LinearSpline(s.slidesGrid, c.slidesGrid) :\n                    new s.controller.LinearSpline(s.snapGrid, c.snapGrid);\n            },\n            setTranslate: function (translate, byController) {\n               var controlled = s.params.control;\n               var multiplier, controlledTranslate;\n               function setControlledTranslate(c) {\n                    // this will create an Interpolate function based on the snapGrids\n                    // x is the Grid of the scrolled scroller and y will be the controlled scroller\n                    // it makes sense to create this only once and recall it for the interpolation\n                    // the function does a lot of value caching for performance\n                    translate = c.rtl && c.params.direction === 'horizontal' ? -s.translate : s.translate;\n                    if (s.params.controlBy === 'slide') {\n                        s.controller.getInterpolateFunction(c);\n                        // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid\n                        // but it did not work out\n                        controlledTranslate = -s.controller.spline.interpolate(-translate);\n                    }\n\n                    if(!controlledTranslate || s.params.controlBy === 'container'){\n                        multiplier = (c.maxTranslate() - c.minTranslate()) / (s.maxTranslate() - s.minTranslate());\n                        controlledTranslate = (translate - s.minTranslate()) * multiplier + c.minTranslate();\n                    }\n\n                    if (s.params.controlInverse) {\n                        controlledTranslate = c.maxTranslate() - controlledTranslate;\n                    }\n                    c.updateProgress(controlledTranslate);\n                    c.setWrapperTranslate(controlledTranslate, false, s);\n                    c.updateActiveIndex();\n               }\n               if (s.isArray(controlled)) {\n                   for (var i = 0; i < controlled.length; i++) {\n                       if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n                           setControlledTranslate(controlled[i]);\n                       }\n                   }\n               }\n               else if (controlled instanceof Swiper && byController !== controlled) {\n\n                   setControlledTranslate(controlled);\n               }\n            },\n            setTransition: function (duration, byController) {\n                var controlled = s.params.control;\n                var i;\n                function setControlledTransition(c) {\n                    c.setWrapperTransition(duration, s);\n                    if (duration !== 0) {\n                        c.onTransitionStart();\n                        c.wrapper.transitionEnd(function(){\n                            if (!controlled) return;\n                            if (c.params.loop && s.params.controlBy === 'slide') {\n                                c.fixLoop();\n                            }\n                            c.onTransitionEnd();\n\n                        });\n                    }\n                }\n                if (s.isArray(controlled)) {\n                    for (i = 0; i < controlled.length; i++) {\n                        if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n                            setControlledTransition(controlled[i]);\n                        }\n                    }\n                }\n                else if (controlled instanceof Swiper && byController !== controlled) {\n                    setControlledTransition(controlled);\n                }\n            }\n        };\n\n        /*=========================\n          Hash Navigation\n          ===========================*/\n        s.hashnav = {\n            init: function () {\n                if (!s.params.hashnav) return;\n                s.hashnav.initialized = true;\n                var hash = document.location.hash.replace('#', '');\n                if (!hash) return;\n                var speed = 0;\n                for (var i = 0, length = s.slides.length; i < length; i++) {\n                    var slide = s.slides.eq(i);\n                    var slideHash = slide.attr('data-hash');\n                    if (slideHash === hash && !slide.hasClass(s.params.slideDuplicateClass)) {\n                        var index = slide.index();\n                        s.slideTo(index, speed, s.params.runCallbacksOnInit, true);\n                    }\n                }\n            },\n            setHash: function () {\n                if (!s.hashnav.initialized || !s.params.hashnav) return;\n                document.location.hash = s.slides.eq(s.activeIndex).attr('data-hash') || '';\n            }\n        };\n\n        /*=========================\n          Keyboard Control\n          ===========================*/\n        function handleKeyboard(e) {\n            if (e.originalEvent) e = e.originalEvent; //jquery fix\n            var kc = e.keyCode || e.charCode;\n            // Directions locks\n            if (!s.params.allowSwipeToNext && (isH() && kc === 39 || !isH() && kc === 40)) {\n                return false;\n            }\n            if (!s.params.allowSwipeToPrev && (isH() && kc === 37 || !isH() && kc === 38)) {\n                return false;\n            }\n            if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {\n                return;\n            }\n            if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {\n                return;\n            }\n            if (kc === 37 || kc === 39 || kc === 38 || kc === 40) {\n                var inView = false;\n                //Check that swiper should be inside of visible area of window\n                if (s.container.parents('.swiper-slide').length > 0 && s.container.parents('.swiper-slide-active').length === 0) {\n                    return;\n                }\n                var windowScroll = {\n                    left: window.pageXOffset,\n                    top: window.pageYOffset\n                };\n                var windowWidth = window.innerWidth;\n                var windowHeight = window.innerHeight;\n                var swiperOffset = s.container.offset();\n                if (s.rtl) swiperOffset.left = swiperOffset.left - s.container[0].scrollLeft;\n                var swiperCoord = [\n                    [swiperOffset.left, swiperOffset.top],\n                    [swiperOffset.left + s.width, swiperOffset.top],\n                    [swiperOffset.left, swiperOffset.top + s.height],\n                    [swiperOffset.left + s.width, swiperOffset.top + s.height]\n                ];\n                for (var i = 0; i < swiperCoord.length; i++) {\n                    var point = swiperCoord[i];\n                    if (\n                        point[0] >= windowScroll.left && point[0] <= windowScroll.left + windowWidth &&\n                        point[1] >= windowScroll.top && point[1] <= windowScroll.top + windowHeight\n                    ) {\n                        inView = true;\n                    }\n\n                }\n                if (!inView) return;\n            }\n            if (isH()) {\n                if (kc === 37 || kc === 39) {\n                    if (e.preventDefault) e.preventDefault();\n                    else e.returnValue = false;\n                }\n                if ((kc === 39 && !s.rtl) || (kc === 37 && s.rtl)) s.slideNext();\n                if ((kc === 37 && !s.rtl) || (kc === 39 && s.rtl)) s.slidePrev();\n            }\n            else {\n                if (kc === 38 || kc === 40) {\n                    if (e.preventDefault) e.preventDefault();\n                    else e.returnValue = false;\n                }\n                if (kc === 40) s.slideNext();\n                if (kc === 38) s.slidePrev();\n            }\n        }\n        s.disableKeyboardControl = function () {\n            s.params.keyboardControl = false;\n            $(document).off('keydown', handleKeyboard);\n        };\n        s.enableKeyboardControl = function () {\n            s.params.keyboardControl = true;\n            $(document).on('keydown', handleKeyboard);\n        };\n\n\n        /*=========================\n          Mousewheel Control\n          ===========================*/\n        s.mousewheel = {\n            event: false,\n            lastScrollTime: (new window.Date()).getTime()\n        };\n        if (s.params.mousewheelControl) {\n            try {\n                new window.WheelEvent('wheel');\n                s.mousewheel.event = 'wheel';\n            } catch (e) {}\n\n            if (!s.mousewheel.event && document.onmousewheel !== undefined) {\n                s.mousewheel.event = 'mousewheel';\n            }\n            if (!s.mousewheel.event) {\n                s.mousewheel.event = 'DOMMouseScroll';\n            }\n        }\n        function handleMousewheel(e) {\n            if (e.originalEvent) e = e.originalEvent; //jquery fix\n            var we = s.mousewheel.event;\n            var delta = 0;\n            var rtlFactor = s.rtl ? -1 : 1;\n            //Opera & IE\n            if (e.detail) delta = -e.detail;\n            //WebKits\n            else if (we === 'mousewheel') {\n                if (s.params.mousewheelForceToAxis) {\n                    if (isH()) {\n                        if (Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY)) delta = e.wheelDeltaX * rtlFactor;\n                        else return;\n                    }\n                    else {\n                        if (Math.abs(e.wheelDeltaY) > Math.abs(e.wheelDeltaX)) delta = e.wheelDeltaY;\n                        else return;\n                    }\n                }\n                else {\n                    delta = Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY) ? - e.wheelDeltaX * rtlFactor : - e.wheelDeltaY;\n                }\n            }\n            //Old FireFox\n            else if (we === 'DOMMouseScroll') delta = -e.detail;\n            //New FireFox\n            else if (we === 'wheel') {\n                if (s.params.mousewheelForceToAxis) {\n                    if (isH()) {\n                        if (Math.abs(e.deltaX) > Math.abs(e.deltaY)) delta = -e.deltaX * rtlFactor;\n                        else return;\n                    }\n                    else {\n                        if (Math.abs(e.deltaY) > Math.abs(e.deltaX)) delta = -e.deltaY;\n                        else return;\n                    }\n                }\n                else {\n                    delta = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? - e.deltaX * rtlFactor : - e.deltaY;\n                }\n            }\n            if (delta === 0) return;\n\n            if (s.params.mousewheelInvert) delta = -delta;\n\n            if (!s.params.freeMode) {\n                if ((new window.Date()).getTime() - s.mousewheel.lastScrollTime > 60) {\n                    if (delta < 0) {\n                        if ((!s.isEnd || s.params.loop) && !s.animating) s.slideNext();\n                        else if (s.params.mousewheelReleaseOnEdges) return true;\n                    }\n                    else {\n                        if ((!s.isBeginning || s.params.loop) && !s.animating) s.slidePrev();\n                        else if (s.params.mousewheelReleaseOnEdges) return true;\n                    }\n                }\n                s.mousewheel.lastScrollTime = (new window.Date()).getTime();\n\n            }\n            else {\n                //Freemode or scrollContainer:\n                var position = s.getWrapperTranslate() + delta * s.params.mousewheelSensitivity;\n                var wasBeginning = s.isBeginning,\n                    wasEnd = s.isEnd;\n\n                if (position >= s.minTranslate()) position = s.minTranslate();\n                if (position <= s.maxTranslate()) position = s.maxTranslate();\n\n                s.setWrapperTransition(0);\n                s.setWrapperTranslate(position);\n                s.updateProgress();\n                s.updateActiveIndex();\n\n                if (!wasBeginning && s.isBeginning || !wasEnd && s.isEnd) {\n                    s.updateClasses();\n                }\n\n                if (s.params.freeModeSticky) {\n                    clearTimeout(s.mousewheel.timeout);\n                    s.mousewheel.timeout = setTimeout(function () {\n                        s.slideReset();\n                    }, 300);\n                }\n\n                // Return page scroll on edge positions\n                if (position === 0 || position === s.maxTranslate()) return;\n            }\n            if (s.params.autoplay) s.stopAutoplay();\n\n            if (e.preventDefault) e.preventDefault();\n            else e.returnValue = false;\n            return false;\n        }\n        s.disableMousewheelControl = function () {\n            if (!s.mousewheel.event) return false;\n            s.container.off(s.mousewheel.event, handleMousewheel);\n            return true;\n        };\n\n        s.enableMousewheelControl = function () {\n            if (!s.mousewheel.event) return false;\n            s.container.on(s.mousewheel.event, handleMousewheel);\n            return true;\n        };\n\n\n        /*=========================\n          Parallax\n          ===========================*/\n        function setParallaxTransform(el, progress) {\n            el = $(el);\n            var p, pX, pY;\n            var rtlFactor = s.rtl ? -1 : 1;\n\n            p = el.attr('data-swiper-parallax') || '0';\n            pX = el.attr('data-swiper-parallax-x');\n            pY = el.attr('data-swiper-parallax-y');\n            if (pX || pY) {\n                pX = pX || '0';\n                pY = pY || '0';\n            }\n            else {\n                if (isH()) {\n                    pX = p;\n                    pY = '0';\n                }\n                else {\n                    pY = p;\n                    pX = '0';\n                }\n            }\n\n            if ((pX).indexOf('%') >= 0) {\n                pX = parseInt(pX, 10) * progress * rtlFactor + '%';\n            }\n            else {\n                pX = pX * progress * rtlFactor + 'px' ;\n            }\n            if ((pY).indexOf('%') >= 0) {\n                pY = parseInt(pY, 10) * progress + '%';\n            }\n            else {\n                pY = pY * progress + 'px' ;\n            }\n\n            el.transform('translate3d(' + pX + ', ' + pY + ',0px)');\n        }\n        s.parallax = {\n            setTranslate: function () {\n                s.container.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){\n                    setParallaxTransform(this, s.progress);\n\n                });\n                s.slides.each(function () {\n                    var slide = $(this);\n                    slide.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function () {\n                        var progress = Math.min(Math.max(slide[0].progress, -1), 1);\n                        setParallaxTransform(this, progress);\n                    });\n                });\n            },\n            setTransition: function (duration) {\n                if (typeof duration === 'undefined') duration = s.params.speed;\n                s.container.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){\n                    var el = $(this);\n                    var parallaxDuration = parseInt(el.attr('data-swiper-parallax-duration'), 10) || duration;\n                    if (duration === 0) parallaxDuration = 0;\n                    el.transition(parallaxDuration);\n                });\n            }\n        };\n\n\n        /*=========================\n          Plugins API. Collect all and init all plugins\n          ===========================*/\n        s._plugins = [];\n        for (var plugin in s.plugins) {\n            var p = s.plugins[plugin](s, s.params[plugin]);\n            if (p) s._plugins.push(p);\n        }\n        // Method to call all plugins event/method\n        s.callPlugins = function (eventName) {\n            for (var i = 0; i < s._plugins.length; i++) {\n                if (eventName in s._plugins[i]) {\n                    s._plugins[i][eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n                }\n            }\n        };\n\n        /*=========================\n          Events/Callbacks/Plugins Emitter\n          ===========================*/\n        function normalizeEventName (eventName) {\n            if (eventName.indexOf('on') !== 0) {\n                if (eventName[0] !== eventName[0].toUpperCase()) {\n                    eventName = 'on' + eventName[0].toUpperCase() + eventName.substring(1);\n                }\n                else {\n                    eventName = 'on' + eventName;\n                }\n            }\n            return eventName;\n        }\n        s.emitterEventListeners = {\n\n        };\n        s.emit = function (eventName) {\n            // Trigger callbacks\n            if (s.params[eventName]) {\n                s.params[eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n            }\n            var i;\n            // Trigger events\n            if (s.emitterEventListeners[eventName]) {\n                for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {\n                    s.emitterEventListeners[eventName][i](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n                }\n            }\n            // Trigger plugins\n            if (s.callPlugins) s.callPlugins(eventName, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n        };\n        s.on = function (eventName, handler) {\n            eventName = normalizeEventName(eventName);\n            if (!s.emitterEventListeners[eventName]) s.emitterEventListeners[eventName] = [];\n            s.emitterEventListeners[eventName].push(handler);\n            return s;\n        };\n        s.off = function (eventName, handler) {\n            var i;\n            eventName = normalizeEventName(eventName);\n            if (typeof handler === 'undefined') {\n                // Remove all handlers for such event\n                s.emitterEventListeners[eventName] = [];\n                return s;\n            }\n            if (!s.emitterEventListeners[eventName] || s.emitterEventListeners[eventName].length === 0) return;\n            for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {\n                if(s.emitterEventListeners[eventName][i] === handler) s.emitterEventListeners[eventName].splice(i, 1);\n            }\n            return s;\n        };\n        s.once = function (eventName, handler) {\n            eventName = normalizeEventName(eventName);\n            var _handler = function () {\n                handler(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);\n                s.off(eventName, _handler);\n            };\n            s.on(eventName, _handler);\n            return s;\n        };\n\n        // Accessibility tools\n        s.a11y = {\n            makeFocusable: function ($el) {\n                $el.attr('tabIndex', '0');\n                return $el;\n            },\n            addRole: function ($el, role) {\n                $el.attr('role', role);\n                return $el;\n            },\n\n            addLabel: function ($el, label) {\n                $el.attr('aria-label', label);\n                return $el;\n            },\n\n            disable: function ($el) {\n                $el.attr('aria-disabled', true);\n                return $el;\n            },\n\n            enable: function ($el) {\n                $el.attr('aria-disabled', false);\n                return $el;\n            },\n\n            onEnterKey: function (event) {\n                if (event.keyCode !== 13) return;\n                if ($(event.target).is(s.params.nextButton)) {\n                    s.onClickNext(event);\n                    if (s.isEnd) {\n                        s.a11y.notify(s.params.lastSlideMessage);\n                    }\n                    else {\n                        s.a11y.notify(s.params.nextSlideMessage);\n                    }\n                }\n                else if ($(event.target).is(s.params.prevButton)) {\n                    s.onClickPrev(event);\n                    if (s.isBeginning) {\n                        s.a11y.notify(s.params.firstSlideMessage);\n                    }\n                    else {\n                        s.a11y.notify(s.params.prevSlideMessage);\n                    }\n                }\n                if ($(event.target).is('.' + s.params.bulletClass)) {\n                    $(event.target)[0].click();\n                }\n            },\n\n            liveRegion: $('<span class=\"swiper-notification\" aria-live=\"assertive\" aria-atomic=\"true\"></span>'),\n\n            notify: function (message) {\n                var notification = s.a11y.liveRegion;\n                if (notification.length === 0) return;\n                notification.html('');\n                notification.html(message);\n            },\n            init: function () {\n                // Setup accessibility\n                if (s.params.nextButton) {\n                    var nextButton = $(s.params.nextButton);\n                    s.a11y.makeFocusable(nextButton);\n                    s.a11y.addRole(nextButton, 'button');\n                    s.a11y.addLabel(nextButton, s.params.nextSlideMessage);\n                }\n                if (s.params.prevButton) {\n                    var prevButton = $(s.params.prevButton);\n                    s.a11y.makeFocusable(prevButton);\n                    s.a11y.addRole(prevButton, 'button');\n                    s.a11y.addLabel(prevButton, s.params.prevSlideMessage);\n                }\n\n                $(s.container).append(s.a11y.liveRegion);\n            },\n            initPagination: function () {\n                if (s.params.pagination && s.params.paginationClickable && s.bullets && s.bullets.length) {\n                    s.bullets.each(function () {\n                        var bullet = $(this);\n                        s.a11y.makeFocusable(bullet);\n                        s.a11y.addRole(bullet, 'button');\n                        s.a11y.addLabel(bullet, s.params.paginationBulletMessage.replace(/{{index}}/, bullet.index() + 1));\n                    });\n                }\n            },\n            destroy: function () {\n                if (s.a11y.liveRegion && s.a11y.liveRegion.length > 0) s.a11y.liveRegion.remove();\n            }\n        };\n\n\n        /*=========================\n          Init/Destroy\n          ===========================*/\n        s.init = function () {\n            if (s.params.loop) s.createLoop();\n            s.updateContainerSize();\n            s.updateSlidesSize();\n            s.updatePagination();\n            if (s.params.scrollbar && s.scrollbar) {\n                s.scrollbar.set();\n                if (s.params.scrollbarDraggable) {\n                    s.scrollbar.enableDraggable();\n                }\n            }\n            if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n                if (!s.params.loop) s.updateProgress();\n                s.effects[s.params.effect].setTranslate();\n            }\n            if (s.params.loop) {\n                s.slideTo(s.params.initialSlide + s.loopedSlides, 0, s.params.runCallbacksOnInit);\n            }\n            else {\n                s.slideTo(s.params.initialSlide, 0, s.params.runCallbacksOnInit);\n                if (s.params.initialSlide === 0) {\n                    if (s.parallax && s.params.parallax) s.parallax.setTranslate();\n                    if (s.lazy && s.params.lazyLoading) {\n                        s.lazy.load();\n                        s.lazy.initialImageLoaded = true;\n                    }\n                }\n            }\n            s.attachEvents();\n            if (s.params.observer && s.support.observer) {\n                s.initObservers();\n            }\n            if (s.params.preloadImages && !s.params.lazyLoading) {\n                s.preloadImages();\n            }\n            if (s.params.autoplay) {\n                s.startAutoplay();\n            }\n            if (s.params.keyboardControl) {\n                if (s.enableKeyboardControl) s.enableKeyboardControl();\n            }\n            if (s.params.mousewheelControl) {\n                if (s.enableMousewheelControl) s.enableMousewheelControl();\n            }\n            if (s.params.hashnav) {\n                if (s.hashnav) s.hashnav.init();\n            }\n            if (s.params.a11y && s.a11y) s.a11y.init();\n            s.emit('onInit', s);\n        };\n\n        // Cleanup dynamic styles\n        s.cleanupStyles = function () {\n            // Container\n            s.container.removeClass(s.classNames.join(' ')).removeAttr('style');\n\n            // Wrapper\n            s.wrapper.removeAttr('style');\n\n            // Slides\n            if (s.slides && s.slides.length) {\n                s.slides\n                    .removeClass([\n                      s.params.slideVisibleClass,\n                      s.params.slideActiveClass,\n                      s.params.slideNextClass,\n                      s.params.slidePrevClass\n                    ].join(' '))\n                    .removeAttr('style')\n                    .removeAttr('data-swiper-column')\n                    .removeAttr('data-swiper-row');\n            }\n\n            // Pagination/Bullets\n            if (s.paginationContainer && s.paginationContainer.length) {\n                s.paginationContainer.removeClass(s.params.paginationHiddenClass);\n            }\n            if (s.bullets && s.bullets.length) {\n                s.bullets.removeClass(s.params.bulletActiveClass);\n            }\n\n            // Buttons\n            if (s.params.prevButton) $(s.params.prevButton).removeClass(s.params.buttonDisabledClass);\n            if (s.params.nextButton) $(s.params.nextButton).removeClass(s.params.buttonDisabledClass);\n\n            // Scrollbar\n            if (s.params.scrollbar && s.scrollbar) {\n                if (s.scrollbar.track && s.scrollbar.track.length) s.scrollbar.track.removeAttr('style');\n                if (s.scrollbar.drag && s.scrollbar.drag.length) s.scrollbar.drag.removeAttr('style');\n            }\n        };\n\n        // Destroy\n        s.destroy = function (deleteInstance, cleanupStyles) {\n            // Detach evebts\n            s.detachEvents();\n            // Stop autoplay\n            s.stopAutoplay();\n            // Disable draggable\n            if (s.params.scrollbar && s.scrollbar) {\n                if (s.params.scrollbarDraggable) {\n                    s.scrollbar.disableDraggable();\n                }\n            }\n            // Destroy loop\n            if (s.params.loop) {\n                s.destroyLoop();\n            }\n            // Cleanup styles\n            if (cleanupStyles) {\n                s.cleanupStyles();\n            }\n            // Disconnect observer\n            s.disconnectObservers();\n            // Disable keyboard/mousewheel\n            if (s.params.keyboardControl) {\n                if (s.disableKeyboardControl) s.disableKeyboardControl();\n            }\n            if (s.params.mousewheelControl) {\n                if (s.disableMousewheelControl) s.disableMousewheelControl();\n            }\n            // Disable a11y\n            if (s.params.a11y && s.a11y) s.a11y.destroy();\n            // Destroy callback\n            s.emit('onDestroy');\n            // Delete instance\n            if (deleteInstance !== false) s = null;\n        };\n\n        s.init();\n\n\n\n        // Return swiper instance\n        return s;\n    };\n\n\n    /*==================================================\n        Prototype\n    ====================================================*/\n    Swiper.prototype = {\n        isSafari: (function () {\n            var ua = navigator.userAgent.toLowerCase();\n            return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);\n        })(),\n        isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent),\n        isArray: function (arr) {\n            return Object.prototype.toString.apply(arr) === '[object Array]';\n        },\n        /*==================================================\n        Browser\n        ====================================================*/\n        browser: {\n            ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled,\n            ieTouch: (window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1) || (window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1)\n        },\n        /*==================================================\n        Devices\n        ====================================================*/\n        device: (function () {\n            var ua = navigator.userAgent;\n            var android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/);\n            var ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n            var ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n            var iphone = !ipad && ua.match(/(iPhone\\sOS)\\s([\\d_]+)/);\n            return {\n                ios: ipad || iphone || ipod,\n                android: android\n            };\n        })(),\n        /*==================================================\n        Feature Detection\n        ====================================================*/\n        support: {\n            touch : (window.Modernizr && Modernizr.touch === true) || (function () {\n                return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch);\n            })(),\n\n            transforms3d : (window.Modernizr && Modernizr.csstransforms3d === true) || (function () {\n                var div = document.createElement('div').style;\n                return ('webkitPerspective' in div || 'MozPerspective' in div || 'OPerspective' in div || 'MsPerspective' in div || 'perspective' in div);\n            })(),\n\n            flexbox: (function () {\n                var div = document.createElement('div').style;\n                var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');\n                for (var i = 0; i < styles.length; i++) {\n                    if (styles[i] in div) return true;\n                }\n            })(),\n\n            observer: (function () {\n                return ('MutationObserver' in window || 'WebkitMutationObserver' in window);\n            })()\n        },\n        /*==================================================\n        Plugins\n        ====================================================*/\n        plugins: {}\n    };\n\n\n    /*===========================\n    Dom7 Library\n    ===========================*/\n    var Dom7 = (function () {\n        var Dom7 = function (arr) {\n            var _this = this, i = 0;\n            // Create array-like object\n            for (i = 0; i < arr.length; i++) {\n                _this[i] = arr[i];\n            }\n            _this.length = arr.length;\n            // Return collection with methods\n            return this;\n        };\n        var $ = function (selector, context) {\n            var arr = [], i = 0;\n            if (selector && !context) {\n                if (selector instanceof Dom7) {\n                    return selector;\n                }\n            }\n            if (selector) {\n                // String\n                if (typeof selector === 'string') {\n                    var els, tempParent, html = selector.trim();\n                    if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {\n                        var toCreate = 'div';\n                        if (html.indexOf('<li') === 0) toCreate = 'ul';\n                        if (html.indexOf('<tr') === 0) toCreate = 'tbody';\n                        if (html.indexOf('<td') === 0 || html.indexOf('<th') === 0) toCreate = 'tr';\n                        if (html.indexOf('<tbody') === 0) toCreate = 'table';\n                        if (html.indexOf('<option') === 0) toCreate = 'select';\n                        tempParent = document.createElement(toCreate);\n                        tempParent.innerHTML = selector;\n                        for (i = 0; i < tempParent.childNodes.length; i++) {\n                            arr.push(tempParent.childNodes[i]);\n                        }\n                    }\n                    else {\n                        if (!context && selector[0] === '#' && !selector.match(/[ .<>:~]/)) {\n                            // Pure ID selector\n                            els = [document.getElementById(selector.split('#')[1])];\n                        }\n                        else {\n                            // Other selectors\n                            els = (context || document).querySelectorAll(selector);\n                        }\n                        for (i = 0; i < els.length; i++) {\n                            if (els[i]) arr.push(els[i]);\n                        }\n                    }\n                }\n                // Node/element\n                else if (selector.nodeType || selector === window || selector === document) {\n                    arr.push(selector);\n                }\n                //Array of elements or instance of Dom\n                else if (selector.length > 0 && selector[0].nodeType) {\n                    for (i = 0; i < selector.length; i++) {\n                        arr.push(selector[i]);\n                    }\n                }\n            }\n            return new Dom7(arr);\n        };\n        Dom7.prototype = {\n            // Classes and attriutes\n            addClass: function (className) {\n                if (typeof className === 'undefined') {\n                    return this;\n                }\n                var classes = className.split(' ');\n                for (var i = 0; i < classes.length; i++) {\n                    for (var j = 0; j < this.length; j++) {\n                        this[j].classList.add(classes[i]);\n                    }\n                }\n                return this;\n            },\n            removeClass: function (className) {\n                var classes = className.split(' ');\n                for (var i = 0; i < classes.length; i++) {\n                    for (var j = 0; j < this.length; j++) {\n                        this[j].classList.remove(classes[i]);\n                    }\n                }\n                return this;\n            },\n            hasClass: function (className) {\n                if (!this[0]) return false;\n                else return this[0].classList.contains(className);\n            },\n            toggleClass: function (className) {\n                var classes = className.split(' ');\n                for (var i = 0; i < classes.length; i++) {\n                    for (var j = 0; j < this.length; j++) {\n                        this[j].classList.toggle(classes[i]);\n                    }\n                }\n                return this;\n            },\n            attr: function (attrs, value) {\n                if (arguments.length === 1 && typeof attrs === 'string') {\n                    // Get attr\n                    if (this[0]) return this[0].getAttribute(attrs);\n                    else return undefined;\n                }\n                else {\n                    // Set attrs\n                    for (var i = 0; i < this.length; i++) {\n                        if (arguments.length === 2) {\n                            // String\n                            this[i].setAttribute(attrs, value);\n                        }\n                        else {\n                            // Object\n                            for (var attrName in attrs) {\n                                this[i][attrName] = attrs[attrName];\n                                this[i].setAttribute(attrName, attrs[attrName]);\n                            }\n                        }\n                    }\n                    return this;\n                }\n            },\n            removeAttr: function (attr) {\n                for (var i = 0; i < this.length; i++) {\n                    this[i].removeAttribute(attr);\n                }\n                return this;\n            },\n            data: function (key, value) {\n                if (typeof value === 'undefined') {\n                    // Get value\n                    if (this[0]) {\n                        var dataKey = this[0].getAttribute('data-' + key);\n                        if (dataKey) return dataKey;\n                        else if (this[0].dom7ElementDataStorage && (key in this[0].dom7ElementDataStorage)) return this[0].dom7ElementDataStorage[key];\n                        else return undefined;\n                    }\n                    else return undefined;\n                }\n                else {\n                    // Set value\n                    for (var i = 0; i < this.length; i++) {\n                        var el = this[i];\n                        if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};\n                        el.dom7ElementDataStorage[key] = value;\n                    }\n                    return this;\n                }\n            },\n            // Transforms\n            transform : function (transform) {\n                for (var i = 0; i < this.length; i++) {\n                    var elStyle = this[i].style;\n                    elStyle.webkitTransform = elStyle.MsTransform = elStyle.msTransform = elStyle.MozTransform = elStyle.OTransform = elStyle.transform = transform;\n                }\n                return this;\n            },\n            transition: function (duration) {\n                if (typeof duration !== 'string') {\n                    duration = duration + 'ms';\n                }\n                for (var i = 0; i < this.length; i++) {\n                    var elStyle = this[i].style;\n                    elStyle.webkitTransitionDuration = elStyle.MsTransitionDuration = elStyle.msTransitionDuration = elStyle.MozTransitionDuration = elStyle.OTransitionDuration = elStyle.transitionDuration = duration;\n                }\n                return this;\n            },\n            //Events\n            on: function (eventName, targetSelector, listener, capture) {\n                function handleLiveEvent(e) {\n                    var target = e.target;\n                    if ($(target).is(targetSelector)) listener.call(target, e);\n                    else {\n                        var parents = $(target).parents();\n                        for (var k = 0; k < parents.length; k++) {\n                            if ($(parents[k]).is(targetSelector)) listener.call(parents[k], e);\n                        }\n                    }\n                }\n                var events = eventName.split(' ');\n                var i, j;\n                for (i = 0; i < this.length; i++) {\n                    if (typeof targetSelector === 'function' || targetSelector === false) {\n                        // Usual events\n                        if (typeof targetSelector === 'function') {\n                            listener = arguments[1];\n                            capture = arguments[2] || false;\n                        }\n                        for (j = 0; j < events.length; j++) {\n                            this[i].addEventListener(events[j], listener, capture);\n                        }\n                    }\n                    else {\n                        //Live events\n                        for (j = 0; j < events.length; j++) {\n                            if (!this[i].dom7LiveListeners) this[i].dom7LiveListeners = [];\n                            this[i].dom7LiveListeners.push({listener: listener, liveListener: handleLiveEvent});\n                            this[i].addEventListener(events[j], handleLiveEvent, capture);\n                        }\n                    }\n                }\n\n                return this;\n            },\n            off: function (eventName, targetSelector, listener, capture) {\n                var events = eventName.split(' ');\n                for (var i = 0; i < events.length; i++) {\n                    for (var j = 0; j < this.length; j++) {\n                        if (typeof targetSelector === 'function' || targetSelector === false) {\n                            // Usual events\n                            if (typeof targetSelector === 'function') {\n                                listener = arguments[1];\n                                capture = arguments[2] || false;\n                            }\n                            this[j].removeEventListener(events[i], listener, capture);\n                        }\n                        else {\n                            // Live event\n                            if (this[j].dom7LiveListeners) {\n                                for (var k = 0; k < this[j].dom7LiveListeners.length; k++) {\n                                    if (this[j].dom7LiveListeners[k].listener === listener) {\n                                        this[j].removeEventListener(events[i], this[j].dom7LiveListeners[k].liveListener, capture);\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n                return this;\n            },\n            once: function (eventName, targetSelector, listener, capture) {\n                var dom = this;\n                if (typeof targetSelector === 'function') {\n                    targetSelector = false;\n                    listener = arguments[1];\n                    capture = arguments[2];\n                }\n                function proxy(e) {\n                    listener(e);\n                    dom.off(eventName, targetSelector, proxy, capture);\n                }\n                dom.on(eventName, targetSelector, proxy, capture);\n            },\n            trigger: function (eventName, eventData) {\n                for (var i = 0; i < this.length; i++) {\n                    var evt;\n                    try {\n                        evt = new window.CustomEvent(eventName, {detail: eventData, bubbles: true, cancelable: true});\n                    }\n                    catch (e) {\n                        evt = document.createEvent('Event');\n                        evt.initEvent(eventName, true, true);\n                        evt.detail = eventData;\n                    }\n                    this[i].dispatchEvent(evt);\n                }\n                return this;\n            },\n            transitionEnd: function (callback) {\n                var events = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'],\n                    i, j, dom = this;\n                function fireCallBack(e) {\n                    /*jshint validthis:true */\n                    if (e.target !== this) return;\n                    callback.call(this, e);\n                    for (i = 0; i < events.length; i++) {\n                        dom.off(events[i], fireCallBack);\n                    }\n                }\n                if (callback) {\n                    for (i = 0; i < events.length; i++) {\n                        dom.on(events[i], fireCallBack);\n                    }\n                }\n                return this;\n            },\n            // Sizing/Styles\n            width: function () {\n                if (this[0] === window) {\n                    return window.innerWidth;\n                }\n                else {\n                    if (this.length > 0) {\n                        return parseFloat(this.css('width'));\n                    }\n                    else {\n                        return null;\n                    }\n                }\n            },\n            outerWidth: function (includeMargins) {\n                if (this.length > 0) {\n                    if (includeMargins)\n                        return this[0].offsetWidth + parseFloat(this.css('margin-right')) + parseFloat(this.css('margin-left'));\n                    else\n                        return this[0].offsetWidth;\n                }\n                else return null;\n            },\n            height: function () {\n                if (this[0] === window) {\n                    return window.innerHeight;\n                }\n                else {\n                    if (this.length > 0) {\n                        return parseFloat(this.css('height'));\n                    }\n                    else {\n                        return null;\n                    }\n                }\n            },\n            outerHeight: function (includeMargins) {\n                if (this.length > 0) {\n                    if (includeMargins)\n                        return this[0].offsetHeight + parseFloat(this.css('margin-top')) + parseFloat(this.css('margin-bottom'));\n                    else\n                        return this[0].offsetHeight;\n                }\n                else return null;\n            },\n            offset: function () {\n                if (this.length > 0) {\n                    var el = this[0];\n                    var box = el.getBoundingClientRect();\n                    var body = document.body;\n                    var clientTop  = el.clientTop  || body.clientTop  || 0;\n                    var clientLeft = el.clientLeft || body.clientLeft || 0;\n                    var scrollTop  = window.pageYOffset || el.scrollTop;\n                    var scrollLeft = window.pageXOffset || el.scrollLeft;\n                    return {\n                        top: box.top  + scrollTop  - clientTop,\n                        left: box.left + scrollLeft - clientLeft\n                    };\n                }\n                else {\n                    return null;\n                }\n            },\n            css: function (props, value) {\n                var i;\n                if (arguments.length === 1) {\n                    if (typeof props === 'string') {\n                        if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props);\n                    }\n                    else {\n                        for (i = 0; i < this.length; i++) {\n                            for (var prop in props) {\n                                this[i].style[prop] = props[prop];\n                            }\n                        }\n                        return this;\n                    }\n                }\n                if (arguments.length === 2 && typeof props === 'string') {\n                    for (i = 0; i < this.length; i++) {\n                        this[i].style[props] = value;\n                    }\n                    return this;\n                }\n                return this;\n            },\n\n            //Dom manipulation\n            each: function (callback) {\n                for (var i = 0; i < this.length; i++) {\n                    callback.call(this[i], i, this[i]);\n                }\n                return this;\n            },\n            html: function (html) {\n                if (typeof html === 'undefined') {\n                    return this[0] ? this[0].innerHTML : undefined;\n                }\n                else {\n                    for (var i = 0; i < this.length; i++) {\n                        this[i].innerHTML = html;\n                    }\n                    return this;\n                }\n            },\n            is: function (selector) {\n                if (!this[0]) return false;\n                var compareWith, i;\n                if (typeof selector === 'string') {\n                    var el = this[0];\n                    if (el === document) return selector === document;\n                    if (el === window) return selector === window;\n\n                    if (el.matches) return el.matches(selector);\n                    else if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);\n                    else if (el.mozMatchesSelector) return el.mozMatchesSelector(selector);\n                    else if (el.msMatchesSelector) return el.msMatchesSelector(selector);\n                    else {\n                        compareWith = $(selector);\n                        for (i = 0; i < compareWith.length; i++) {\n                            if (compareWith[i] === this[0]) return true;\n                        }\n                        return false;\n                    }\n                }\n                else if (selector === document) return this[0] === document;\n                else if (selector === window) return this[0] === window;\n                else {\n                    if (selector.nodeType || selector instanceof Dom7) {\n                        compareWith = selector.nodeType ? [selector] : selector;\n                        for (i = 0; i < compareWith.length; i++) {\n                            if (compareWith[i] === this[0]) return true;\n                        }\n                        return false;\n                    }\n                    return false;\n                }\n\n            },\n            index: function () {\n                if (this[0]) {\n                    var child = this[0];\n                    var i = 0;\n                    while ((child = child.previousSibling) !== null) {\n                        if (child.nodeType === 1) i++;\n                    }\n                    return i;\n                }\n                else return undefined;\n            },\n            eq: function (index) {\n                if (typeof index === 'undefined') return this;\n                var length = this.length;\n                var returnIndex;\n                if (index > length - 1) {\n                    return new Dom7([]);\n                }\n                if (index < 0) {\n                    returnIndex = length + index;\n                    if (returnIndex < 0) return new Dom7([]);\n                    else return new Dom7([this[returnIndex]]);\n                }\n                return new Dom7([this[index]]);\n            },\n            append: function (newChild) {\n                var i, j;\n                for (i = 0; i < this.length; i++) {\n                    if (typeof newChild === 'string') {\n                        var tempDiv = document.createElement('div');\n                        tempDiv.innerHTML = newChild;\n                        while (tempDiv.firstChild) {\n                            this[i].appendChild(tempDiv.firstChild);\n                        }\n                    }\n                    else if (newChild instanceof Dom7) {\n                        for (j = 0; j < newChild.length; j++) {\n                            this[i].appendChild(newChild[j]);\n                        }\n                    }\n                    else {\n                        this[i].appendChild(newChild);\n                    }\n                }\n                return this;\n            },\n            prepend: function (newChild) {\n                var i, j;\n                for (i = 0; i < this.length; i++) {\n                    if (typeof newChild === 'string') {\n                        var tempDiv = document.createElement('div');\n                        tempDiv.innerHTML = newChild;\n                        for (j = tempDiv.childNodes.length - 1; j >= 0; j--) {\n                            this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]);\n                        }\n                        // this[i].insertAdjacentHTML('afterbegin', newChild);\n                    }\n                    else if (newChild instanceof Dom7) {\n                        for (j = 0; j < newChild.length; j++) {\n                            this[i].insertBefore(newChild[j], this[i].childNodes[0]);\n                        }\n                    }\n                    else {\n                        this[i].insertBefore(newChild, this[i].childNodes[0]);\n                    }\n                }\n                return this;\n            },\n            insertBefore: function (selector) {\n                var before = $(selector);\n                for (var i = 0; i < this.length; i++) {\n                    if (before.length === 1) {\n                        before[0].parentNode.insertBefore(this[i], before[0]);\n                    }\n                    else if (before.length > 1) {\n                        for (var j = 0; j < before.length; j++) {\n                            before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]);\n                        }\n                    }\n                }\n            },\n            insertAfter: function (selector) {\n                var after = $(selector);\n                for (var i = 0; i < this.length; i++) {\n                    if (after.length === 1) {\n                        after[0].parentNode.insertBefore(this[i], after[0].nextSibling);\n                    }\n                    else if (after.length > 1) {\n                        for (var j = 0; j < after.length; j++) {\n                            after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling);\n                        }\n                    }\n                }\n            },\n            next: function (selector) {\n                if (this.length > 0) {\n                    if (selector) {\n                        if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) return new Dom7([this[0].nextElementSibling]);\n                        else return new Dom7([]);\n                    }\n                    else {\n                        if (this[0].nextElementSibling) return new Dom7([this[0].nextElementSibling]);\n                        else return new Dom7([]);\n                    }\n                }\n                else return new Dom7([]);\n            },\n            nextAll: function (selector) {\n                var nextEls = [];\n                var el = this[0];\n                if (!el) return new Dom7([]);\n                while (el.nextElementSibling) {\n                    var next = el.nextElementSibling;\n                    if (selector) {\n                        if($(next).is(selector)) nextEls.push(next);\n                    }\n                    else nextEls.push(next);\n                    el = next;\n                }\n                return new Dom7(nextEls);\n            },\n            prev: function (selector) {\n                if (this.length > 0) {\n                    if (selector) {\n                        if (this[0].previousElementSibling && $(this[0].previousElementSibling).is(selector)) return new Dom7([this[0].previousElementSibling]);\n                        else return new Dom7([]);\n                    }\n                    else {\n                        if (this[0].previousElementSibling) return new Dom7([this[0].previousElementSibling]);\n                        else return new Dom7([]);\n                    }\n                }\n                else return new Dom7([]);\n            },\n            prevAll: function (selector) {\n                var prevEls = [];\n                var el = this[0];\n                if (!el) return new Dom7([]);\n                while (el.previousElementSibling) {\n                    var prev = el.previousElementSibling;\n                    if (selector) {\n                        if($(prev).is(selector)) prevEls.push(prev);\n                    }\n                    else prevEls.push(prev);\n                    el = prev;\n                }\n                return new Dom7(prevEls);\n            },\n            parent: function (selector) {\n                var parents = [];\n                for (var i = 0; i < this.length; i++) {\n                    if (selector) {\n                        if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode);\n                    }\n                    else {\n                        parents.push(this[i].parentNode);\n                    }\n                }\n                return $($.unique(parents));\n            },\n            parents: function (selector) {\n                var parents = [];\n                for (var i = 0; i < this.length; i++) {\n                    var parent = this[i].parentNode;\n                    while (parent) {\n                        if (selector) {\n                            if ($(parent).is(selector)) parents.push(parent);\n                        }\n                        else {\n                            parents.push(parent);\n                        }\n                        parent = parent.parentNode;\n                    }\n                }\n                return $($.unique(parents));\n            },\n            find : function (selector) {\n                var foundElements = [];\n                for (var i = 0; i < this.length; i++) {\n                    var found = this[i].querySelectorAll(selector);\n                    for (var j = 0; j < found.length; j++) {\n                        foundElements.push(found[j]);\n                    }\n                }\n                return new Dom7(foundElements);\n            },\n            children: function (selector) {\n                var children = [];\n                for (var i = 0; i < this.length; i++) {\n                    var childNodes = this[i].childNodes;\n\n                    for (var j = 0; j < childNodes.length; j++) {\n                        if (!selector) {\n                            if (childNodes[j].nodeType === 1) children.push(childNodes[j]);\n                        }\n                        else {\n                            if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) children.push(childNodes[j]);\n                        }\n                    }\n                }\n                return new Dom7($.unique(children));\n            },\n            remove: function () {\n                for (var i = 0; i < this.length; i++) {\n                    if (this[i].parentNode) this[i].parentNode.removeChild(this[i]);\n                }\n                return this;\n            },\n            add: function () {\n                var dom = this;\n                var i, j;\n                for (i = 0; i < arguments.length; i++) {\n                    var toAdd = $(arguments[i]);\n                    for (j = 0; j < toAdd.length; j++) {\n                        dom[dom.length] = toAdd[j];\n                        dom.length++;\n                    }\n                }\n                return dom;\n            }\n        };\n        $.fn = Dom7.prototype;\n        $.unique = function (arr) {\n            var unique = [];\n            for (var i = 0; i < arr.length; i++) {\n                if (unique.indexOf(arr[i]) === -1) unique.push(arr[i]);\n            }\n            return unique;\n        };\n\n        return $;\n    })();\n\n\n    /*===========================\n     Get Dom libraries\n     ===========================*/\n    var swiperDomPlugins = ['jQuery', 'Zepto', 'Dom7'];\n    for (var i = 0; i < swiperDomPlugins.length; i++) {\n    \tif (window[swiperDomPlugins[i]]) {\n    \t\taddLibraryPlugin(window[swiperDomPlugins[i]]);\n    \t}\n    }\n    // Required DOM Plugins\n    var domLib;\n    if (typeof Dom7 === 'undefined') {\n    \tdomLib = window.Dom7 || window.Zepto || window.jQuery;\n    }\n    else {\n    \tdomLib = Dom7;\n    }\n\n    /*===========================\n    Add .swiper plugin from Dom libraries\n    ===========================*/\n    function addLibraryPlugin(lib) {\n        lib.fn.swiper = function (params) {\n            var firstInstance;\n            lib(this).each(function () {\n                var s = new Swiper(this, params);\n                if (!firstInstance) firstInstance = s;\n            });\n            return firstInstance;\n        };\n    }\n\n    if (domLib) {\n        if (!('transitionEnd' in domLib.fn)) {\n            domLib.fn.transitionEnd = function (callback) {\n                var events = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'],\n                    i, j, dom = this;\n                function fireCallBack(e) {\n                    /*jshint validthis:true */\n                    if (e.target !== this) return;\n                    callback.call(this, e);\n                    for (i = 0; i < events.length; i++) {\n                        dom.off(events[i], fireCallBack);\n                    }\n                }\n                if (callback) {\n                    for (i = 0; i < events.length; i++) {\n                        dom.on(events[i], fireCallBack);\n                    }\n                }\n                return this;\n            };\n        }\n        if (!('transform' in domLib.fn)) {\n            domLib.fn.transform = function (transform) {\n                for (var i = 0; i < this.length; i++) {\n                    var elStyle = this[i].style;\n                    elStyle.webkitTransform = elStyle.MsTransform = elStyle.msTransform = elStyle.MozTransform = elStyle.OTransform = elStyle.transform = transform;\n                }\n                return this;\n            };\n        }\n        if (!('transition' in domLib.fn)) {\n            domLib.fn.transition = function (duration) {\n                if (typeof duration !== 'string') {\n                    duration = duration + 'ms';\n                }\n                for (var i = 0; i < this.length; i++) {\n                    var elStyle = this[i].style;\n                    elStyle.webkitTransitionDuration = elStyle.MsTransitionDuration = elStyle.msTransitionDuration = elStyle.MozTransitionDuration = elStyle.OTransitionDuration = elStyle.transitionDuration = duration;\n                }\n                return this;\n            };\n        }\n    }\n\n    ionic.views.Swiper = Swiper;\n})();\n\n(function(ionic) {\n'use strict';\n\n  ionic.views.Toggle = ionic.views.View.inherit({\n    initialize: function(opts) {\n      var self = this;\n\n      this.el = opts.el;\n      this.checkbox = opts.checkbox;\n      this.track = opts.track;\n      this.handle = opts.handle;\n      this.openPercent = -1;\n      this.onChange = opts.onChange || function() {};\n\n      this.triggerThreshold = opts.triggerThreshold || 20;\n\n      this.dragStartHandler = function(e) {\n        self.dragStart(e);\n      };\n      this.dragHandler = function(e) {\n        self.drag(e);\n      };\n      this.holdHandler = function(e) {\n        self.hold(e);\n      };\n      this.releaseHandler = function(e) {\n        self.release(e);\n      };\n\n      this.dragStartGesture = ionic.onGesture('dragstart', this.dragStartHandler, this.el);\n      this.dragGesture = ionic.onGesture('drag', this.dragHandler, this.el);\n      this.dragHoldGesture = ionic.onGesture('hold', this.holdHandler, this.el);\n      this.dragReleaseGesture = ionic.onGesture('release', this.releaseHandler, this.el);\n    },\n\n    destroy: function() {\n      ionic.offGesture(this.dragStartGesture, 'dragstart', this.dragStartGesture);\n      ionic.offGesture(this.dragGesture, 'drag', this.dragGesture);\n      ionic.offGesture(this.dragHoldGesture, 'hold', this.holdHandler);\n      ionic.offGesture(this.dragReleaseGesture, 'release', this.releaseHandler);\n    },\n\n    tap: function() {\n      if(this.el.getAttribute('disabled') !== 'disabled') {\n        this.val( !this.checkbox.checked );\n      }\n    },\n\n    dragStart: function(e) {\n      if(this.checkbox.disabled) return;\n\n      this._dragInfo = {\n        width: this.el.offsetWidth,\n        left: this.el.offsetLeft,\n        right: this.el.offsetLeft + this.el.offsetWidth,\n        triggerX: this.el.offsetWidth / 2,\n        initialState: this.checkbox.checked\n      };\n\n      // Stop any parent dragging\n      e.gesture.srcEvent.preventDefault();\n\n      // Trigger hold styles\n      this.hold(e);\n    },\n\n    drag: function(e) {\n      var self = this;\n      if(!this._dragInfo) { return; }\n\n      // Stop any parent dragging\n      e.gesture.srcEvent.preventDefault();\n\n      ionic.requestAnimationFrame(function () {\n        if (!self._dragInfo) { return; }\n\n        var px = e.gesture.touches[0].pageX - self._dragInfo.left;\n        var mx = self._dragInfo.width - self.triggerThreshold;\n\n        // The initial state was on, so \"tend towards\" on\n        if(self._dragInfo.initialState) {\n          if(px < self.triggerThreshold) {\n            self.setOpenPercent(0);\n          } else if(px > self._dragInfo.triggerX) {\n            self.setOpenPercent(100);\n          }\n        } else {\n          // The initial state was off, so \"tend towards\" off\n          if(px < self._dragInfo.triggerX) {\n            self.setOpenPercent(0);\n          } else if(px > mx) {\n            self.setOpenPercent(100);\n          }\n        }\n      });\n    },\n\n    endDrag: function() {\n      this._dragInfo = null;\n    },\n\n    hold: function() {\n      this.el.classList.add('dragging');\n    },\n    release: function(e) {\n      this.el.classList.remove('dragging');\n      this.endDrag(e);\n    },\n\n\n    setOpenPercent: function(openPercent) {\n      // only make a change if the new open percent has changed\n      if(this.openPercent < 0 || (openPercent < (this.openPercent - 3) || openPercent > (this.openPercent + 3) ) ) {\n        this.openPercent = openPercent;\n\n        if(openPercent === 0) {\n          this.val(false);\n        } else if(openPercent === 100) {\n          this.val(true);\n        } else {\n          var openPixel = Math.round( (openPercent / 100) * this.track.offsetWidth - (this.handle.offsetWidth) );\n          openPixel = (openPixel < 1 ? 0 : openPixel);\n          this.handle.style[ionic.CSS.TRANSFORM] = 'translate3d(' + openPixel + 'px,0,0)';\n        }\n      }\n    },\n\n    val: function(value) {\n      if(value === true || value === false) {\n        if(this.handle.style[ionic.CSS.TRANSFORM] !== \"\") {\n          this.handle.style[ionic.CSS.TRANSFORM] = \"\";\n        }\n        this.checkbox.checked = value;\n        this.openPercent = (value ? 100 : 0);\n        this.onChange && this.onChange();\n      }\n      return this.checkbox.checked;\n    }\n\n  });\n\n})(ionic);\n\n})();\n/*!\n * ionic.bundle.js is a concatenation of:\n * ionic.js, angular.js, angular-animate.js,\n * angular-sanitize.js, angular-ui-router.js,\n * and ionic-angular.js\n */\n\n/**\n * @license AngularJS v1.5.3\n * (c) 2010-2016 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, document, undefined) {'use strict';\n\n/**\n * @description\n *\n * This object provides a utility for producing rich Error messages within\n * Angular. It can be called as follows:\n *\n * var exampleMinErr = minErr('example');\n * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);\n *\n * The above creates an instance of minErr in the example namespace. The\n * resulting error will have a namespaced error code of example.one.  The\n * resulting error will replace {0} with the value of foo, and {1} with the\n * value of bar. The object is not restricted in the number of arguments it can\n * take.\n *\n * If fewer arguments are specified than necessary for interpolation, the extra\n * interpolation markers will be preserved in the final string.\n *\n * Since data will be parsed statically during a build step, some restrictions\n * are applied with respect to how minErr instances are created and called.\n * Instances should have names of the form namespaceMinErr for a minErr created\n * using minErr('namespace') . Error codes, namespaces and template strings\n * should all be static strings, not variables or general expressions.\n *\n * @param {string} module The namespace to use for the new minErr instance.\n * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning\n *   error from returned function, for cases when a particular type of error is useful.\n * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance\n */\n\nfunction minErr(module, ErrorConstructor) {\n  ErrorConstructor = ErrorConstructor || Error;\n  return function() {\n    var SKIP_INDEXES = 2;\n\n    var templateArgs = arguments,\n      code = templateArgs[0],\n      message = '[' + (module ? module + ':' : '') + code + '] ',\n      template = templateArgs[1],\n      paramPrefix, i;\n\n    message += template.replace(/\\{\\d+\\}/g, function(match) {\n      var index = +match.slice(1, -1),\n        shiftedIndex = index + SKIP_INDEXES;\n\n      if (shiftedIndex < templateArgs.length) {\n        return toDebugString(templateArgs[shiftedIndex]);\n      }\n\n      return match;\n    });\n\n    message += '\\nhttp://errors.angularjs.org/1.5.3/' +\n      (module ? module + '/' : '') + code;\n\n    for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {\n      message += paramPrefix + 'p' + (i - SKIP_INDEXES) + '=' +\n        encodeURIComponent(toDebugString(templateArgs[i]));\n    }\n\n    return new ErrorConstructor(message);\n  };\n}\n\n/* We need to tell jshint what variables are being exported */\n/* global angular: true,\n  msie: true,\n  jqLite: true,\n  jQuery: true,\n  slice: true,\n  splice: true,\n  push: true,\n  toString: true,\n  ngMinErr: true,\n  angularModule: true,\n  uid: true,\n  REGEX_STRING_REGEXP: true,\n  VALIDITY_STATE_PROPERTY: true,\n\n  lowercase: true,\n  uppercase: true,\n  manualLowercase: true,\n  manualUppercase: true,\n  nodeName_: true,\n  isArrayLike: true,\n  forEach: true,\n  forEachSorted: true,\n  reverseParams: true,\n  nextUid: true,\n  setHashKey: true,\n  extend: true,\n  toInt: true,\n  inherit: true,\n  merge: true,\n  noop: true,\n  identity: true,\n  valueFn: true,\n  isUndefined: true,\n  isDefined: true,\n  isObject: true,\n  isBlankObject: true,\n  isString: true,\n  isNumber: true,\n  isDate: true,\n  isArray: true,\n  isFunction: true,\n  isRegExp: true,\n  isWindow: true,\n  isScope: true,\n  isFile: true,\n  isFormData: true,\n  isBlob: true,\n  isBoolean: true,\n  isPromiseLike: true,\n  trim: true,\n  escapeForRegexp: true,\n  isElement: true,\n  makeMap: true,\n  includes: true,\n  arrayRemove: true,\n  copy: true,\n  shallowCopy: true,\n  equals: true,\n  csp: true,\n  jq: true,\n  concat: true,\n  sliceArgs: true,\n  bind: true,\n  toJsonReplacer: true,\n  toJson: true,\n  fromJson: true,\n  convertTimezoneToLocal: true,\n  timezoneToOffset: true,\n  startingTag: true,\n  tryDecodeURIComponent: true,\n  parseKeyValue: true,\n  toKeyValue: true,\n  encodeUriSegment: true,\n  encodeUriQuery: true,\n  angularInit: true,\n  bootstrap: true,\n  getTestability: true,\n  snake_case: true,\n  bindJQuery: true,\n  assertArg: true,\n  assertArgFn: true,\n  assertNotHasOwnProperty: true,\n  getter: true,\n  getBlockNodes: true,\n  hasOwnProperty: true,\n  createMap: true,\n\n  NODE_TYPE_ELEMENT: true,\n  NODE_TYPE_ATTRIBUTE: true,\n  NODE_TYPE_TEXT: true,\n  NODE_TYPE_COMMENT: true,\n  NODE_TYPE_DOCUMENT: true,\n  NODE_TYPE_DOCUMENT_FRAGMENT: true,\n*/\n\n////////////////////////////////////\n\n/**\n * @ngdoc module\n * @name ng\n * @module ng\n * @description\n *\n * # ng (core module)\n * The ng module is loaded by default when an AngularJS application is started. The module itself\n * contains the essential components for an AngularJS application to function. The table below\n * lists a high level breakdown of each of the services/factories, filters, directives and testing\n * components available within this core module.\n *\n * <div doc-module-components=\"ng\"></div>\n */\n\nvar REGEX_STRING_REGEXP = /^\\/(.+)\\/([a-z]*)$/;\n\n// The name of a form control's ValidityState property.\n// This is used so that it's possible for internal tests to create mock ValidityStates.\nvar VALIDITY_STATE_PROPERTY = 'validity';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;};\nvar uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;};\n\n\nvar manualLowercase = function(s) {\n  /* jshint bitwise: false */\n  return isString(s)\n      ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})\n      : s;\n};\nvar manualUppercase = function(s) {\n  /* jshint bitwise: false */\n  return isString(s)\n      ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})\n      : s;\n};\n\n\n// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish\n// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods\n// with correct but slower alternatives. See https://github.com/angular/angular.js/issues/11387\nif ('i' !== 'I'.toLowerCase()) {\n  lowercase = manualLowercase;\n  uppercase = manualUppercase;\n}\n\n\nvar\n    msie,             // holds major version number for IE, or NaN if UA is not IE.\n    jqLite,           // delay binding since jQuery could be loaded after us.\n    jQuery,           // delay binding\n    slice             = [].slice,\n    splice            = [].splice,\n    push              = [].push,\n    toString          = Object.prototype.toString,\n    getPrototypeOf    = Object.getPrototypeOf,\n    ngMinErr          = minErr('ng'),\n\n    /** @name angular */\n    angular           = window.angular || (window.angular = {}),\n    angularModule,\n    uid               = 0;\n\n/**\n * documentMode is an IE-only property\n * http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx\n */\nmsie = document.documentMode;\n\n\n/**\n * @private\n * @param {*} obj\n * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,\n *                   String ...)\n */\nfunction isArrayLike(obj) {\n\n  // `null`, `undefined` and `window` are not array-like\n  if (obj == null || isWindow(obj)) return false;\n\n  // arrays, strings and jQuery/jqLite objects are array like\n  // * jqLite is either the jQuery or jqLite constructor function\n  // * we have to check the existence of jqLite first as this method is called\n  //   via the forEach method when constructing the jqLite object in the first place\n  if (isArray(obj) || isString(obj) || (jqLite && obj instanceof jqLite)) return true;\n\n  // Support: iOS 8.2 (not reproducible in simulator)\n  // \"length\" in obj used to prevent JIT error (gh-11508)\n  var length = \"length\" in Object(obj) && obj.length;\n\n  // NodeList objects (with `item` method) and\n  // other objects with suitable length characteristics are array-like\n  return isNumber(length) &&\n    (length >= 0 && ((length - 1) in obj || obj instanceof Array) || typeof obj.item == 'function');\n\n}\n\n/**\n * @ngdoc function\n * @name angular.forEach\n * @module ng\n * @kind function\n *\n * @description\n * Invokes the `iterator` function once for each item in `obj` collection, which can be either an\n * object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`\n * is the value of an object property or an array element, `key` is the object property key or\n * array element index and obj is the `obj` itself. Specifying a `context` for the function is optional.\n *\n * It is worth noting that `.forEach` does not iterate over inherited properties because it filters\n * using the `hasOwnProperty` method.\n *\n * Unlike ES262's\n * [Array.prototype.forEach](http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.18),\n * providing 'undefined' or 'null' values for `obj` will not throw a TypeError, but rather just\n * return the value provided.\n *\n   ```js\n     var values = {name: 'misko', gender: 'male'};\n     var log = [];\n     angular.forEach(values, function(value, key) {\n       this.push(key + ': ' + value);\n     }, log);\n     expect(log).toEqual(['name: misko', 'gender: male']);\n   ```\n *\n * @param {Object|Array} obj Object to iterate over.\n * @param {Function} iterator Iterator function.\n * @param {Object=} context Object to become context (`this`) for the iterator function.\n * @returns {Object|Array} Reference to `obj`.\n */\n\nfunction forEach(obj, iterator, context) {\n  var key, length;\n  if (obj) {\n    if (isFunction(obj)) {\n      for (key in obj) {\n        // Need to check if hasOwnProperty exists,\n        // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function\n        if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {\n          iterator.call(context, obj[key], key, obj);\n        }\n      }\n    } else if (isArray(obj) || isArrayLike(obj)) {\n      var isPrimitive = typeof obj !== 'object';\n      for (key = 0, length = obj.length; key < length; key++) {\n        if (isPrimitive || key in obj) {\n          iterator.call(context, obj[key], key, obj);\n        }\n      }\n    } else if (obj.forEach && obj.forEach !== forEach) {\n        obj.forEach(iterator, context, obj);\n    } else if (isBlankObject(obj)) {\n      // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty\n      for (key in obj) {\n        iterator.call(context, obj[key], key, obj);\n      }\n    } else if (typeof obj.hasOwnProperty === 'function') {\n      // Slow path for objects inheriting Object.prototype, hasOwnProperty check needed\n      for (key in obj) {\n        if (obj.hasOwnProperty(key)) {\n          iterator.call(context, obj[key], key, obj);\n        }\n      }\n    } else {\n      // Slow path for objects which do not have a method `hasOwnProperty`\n      for (key in obj) {\n        if (hasOwnProperty.call(obj, key)) {\n          iterator.call(context, obj[key], key, obj);\n        }\n      }\n    }\n  }\n  return obj;\n}\n\nfunction forEachSorted(obj, iterator, context) {\n  var keys = Object.keys(obj).sort();\n  for (var i = 0; i < keys.length; i++) {\n    iterator.call(context, obj[keys[i]], keys[i]);\n  }\n  return keys;\n}\n\n\n/**\n * when using forEach the params are value, key, but it is often useful to have key, value.\n * @param {function(string, *)} iteratorFn\n * @returns {function(*, string)}\n */\nfunction reverseParams(iteratorFn) {\n  return function(value, key) {iteratorFn(key, value);};\n}\n\n/**\n * A consistent way of creating unique IDs in angular.\n *\n * Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before\n * we hit number precision issues in JavaScript.\n *\n * Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M\n *\n * @returns {number} an unique alpha-numeric string\n */\nfunction nextUid() {\n  return ++uid;\n}\n\n\n/**\n * Set or clear the hashkey for an object.\n * @param obj object\n * @param h the hashkey (!truthy to delete the hashkey)\n */\nfunction setHashKey(obj, h) {\n  if (h) {\n    obj.$$hashKey = h;\n  } else {\n    delete obj.$$hashKey;\n  }\n}\n\n\nfunction baseExtend(dst, objs, deep) {\n  var h = dst.$$hashKey;\n\n  for (var i = 0, ii = objs.length; i < ii; ++i) {\n    var obj = objs[i];\n    if (!isObject(obj) && !isFunction(obj)) continue;\n    var keys = Object.keys(obj);\n    for (var j = 0, jj = keys.length; j < jj; j++) {\n      var key = keys[j];\n      var src = obj[key];\n\n      if (deep && isObject(src)) {\n        if (isDate(src)) {\n          dst[key] = new Date(src.valueOf());\n        } else if (isRegExp(src)) {\n          dst[key] = new RegExp(src);\n        } else if (src.nodeName) {\n          dst[key] = src.cloneNode(true);\n        } else if (isElement(src)) {\n          dst[key] = src.clone();\n        } else {\n          if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};\n          baseExtend(dst[key], [src], true);\n        }\n      } else {\n        dst[key] = src;\n      }\n    }\n  }\n\n  setHashKey(dst, h);\n  return dst;\n}\n\n/**\n * @ngdoc function\n * @name angular.extend\n * @module ng\n * @kind function\n *\n * @description\n * Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)\n * to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so\n * by passing an empty object as the target: `var object = angular.extend({}, object1, object2)`.\n *\n * **Note:** Keep in mind that `angular.extend` does not support recursive merge (deep copy). Use\n * {@link angular.merge} for this.\n *\n * @param {Object} dst Destination object.\n * @param {...Object} src Source object(s).\n * @returns {Object} Reference to `dst`.\n */\nfunction extend(dst) {\n  return baseExtend(dst, slice.call(arguments, 1), false);\n}\n\n\n/**\n* @ngdoc function\n* @name angular.merge\n* @module ng\n* @kind function\n*\n* @description\n* Deeply extends the destination object `dst` by copying own enumerable properties from the `src` object(s)\n* to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so\n* by passing an empty object as the target: `var object = angular.merge({}, object1, object2)`.\n*\n* Unlike {@link angular.extend extend()}, `merge()` recursively descends into object properties of source\n* objects, performing a deep copy.\n*\n* @param {Object} dst Destination object.\n* @param {...Object} src Source object(s).\n* @returns {Object} Reference to `dst`.\n*/\nfunction merge(dst) {\n  return baseExtend(dst, slice.call(arguments, 1), true);\n}\n\n\n\nfunction toInt(str) {\n  return parseInt(str, 10);\n}\n\n\nfunction inherit(parent, extra) {\n  return extend(Object.create(parent), extra);\n}\n\n/**\n * @ngdoc function\n * @name angular.noop\n * @module ng\n * @kind function\n *\n * @description\n * A function that performs no operations. This function can be useful when writing code in the\n * functional style.\n   ```js\n     function foo(callback) {\n       var result = calculateResult();\n       (callback || angular.noop)(result);\n     }\n   ```\n */\nfunction noop() {}\nnoop.$inject = [];\n\n\n/**\n * @ngdoc function\n * @name angular.identity\n * @module ng\n * @kind function\n *\n * @description\n * A function that returns its first argument. This function is useful when writing code in the\n * functional style.\n *\n   ```js\n     function transformer(transformationFn, value) {\n       return (transformationFn || angular.identity)(value);\n     };\n   ```\n  * @param {*} value to be returned.\n  * @returns {*} the value passed in.\n */\nfunction identity($) {return $;}\nidentity.$inject = [];\n\n\nfunction valueFn(value) {return function valueRef() {return value;};}\n\nfunction hasCustomToString(obj) {\n  return isFunction(obj.toString) && obj.toString !== toString;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isUndefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is undefined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is undefined.\n */\nfunction isUndefined(value) {return typeof value === 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is defined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is defined.\n */\nfunction isDefined(value) {return typeof value !== 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isObject\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not\n * considered to be objects. Note that JavaScript arrays are objects.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Object` but not `null`.\n */\nfunction isObject(value) {\n  // http://jsperf.com/isobject4\n  return value !== null && typeof value === 'object';\n}\n\n\n/**\n * Determine if a value is an object with a null prototype\n *\n * @returns {boolean} True if `value` is an `Object` with a null prototype\n */\nfunction isBlankObject(value) {\n  return value !== null && typeof value === 'object' && !getPrototypeOf(value);\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isString\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `String`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `String`.\n */\nfunction isString(value) {return typeof value === 'string';}\n\n\n/**\n * @ngdoc function\n * @name angular.isNumber\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Number`.\n *\n * This includes the \"special\" numbers `NaN`, `+Infinity` and `-Infinity`.\n *\n * If you wish to exclude these then you can use the native\n * [`isFinite'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite)\n * method.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Number`.\n */\nfunction isNumber(value) {return typeof value === 'number';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDate\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a value is a date.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Date`.\n */\nfunction isDate(value) {\n  return toString.call(value) === '[object Date]';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isArray\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Array`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Array`.\n */\nvar isArray = Array.isArray;\n\n/**\n * @ngdoc function\n * @name angular.isFunction\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Function`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Function`.\n */\nfunction isFunction(value) {return typeof value === 'function';}\n\n\n/**\n * Determines if a value is a regular expression object.\n *\n * @private\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `RegExp`.\n */\nfunction isRegExp(value) {\n  return toString.call(value) === '[object RegExp]';\n}\n\n\n/**\n * Checks if `obj` is a window object.\n *\n * @private\n * @param {*} obj Object to check\n * @returns {boolean} True if `obj` is a window obj.\n */\nfunction isWindow(obj) {\n  return obj && obj.window === obj;\n}\n\n\nfunction isScope(obj) {\n  return obj && obj.$evalAsync && obj.$watch;\n}\n\n\nfunction isFile(obj) {\n  return toString.call(obj) === '[object File]';\n}\n\n\nfunction isFormData(obj) {\n  return toString.call(obj) === '[object FormData]';\n}\n\n\nfunction isBlob(obj) {\n  return toString.call(obj) === '[object Blob]';\n}\n\n\nfunction isBoolean(value) {\n  return typeof value === 'boolean';\n}\n\n\nfunction isPromiseLike(obj) {\n  return obj && isFunction(obj.then);\n}\n\n\nvar TYPED_ARRAY_REGEXP = /^\\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\\]$/;\nfunction isTypedArray(value) {\n  return value && isNumber(value.length) && TYPED_ARRAY_REGEXP.test(toString.call(value));\n}\n\nfunction isArrayBuffer(obj) {\n  return toString.call(obj) === '[object ArrayBuffer]';\n}\n\n\nvar trim = function(value) {\n  return isString(value) ? value.trim() : value;\n};\n\n// Copied from:\n// http://docs.closure-library.googlecode.com/git/local_closure_goog_string_string.js.source.html#line1021\n// Prereq: s is a string.\nvar escapeForRegexp = function(s) {\n  return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g, '\\\\$1').\n           replace(/\\x08/g, '\\\\x08');\n};\n\n\n/**\n * @ngdoc function\n * @name angular.isElement\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a DOM element (or wrapped jQuery element).\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).\n */\nfunction isElement(node) {\n  return !!(node &&\n    (node.nodeName  // we are a direct element\n    || (node.prop && node.attr && node.find)));  // we have an on and find method part of jQuery API\n}\n\n/**\n * @param str 'key1,key2,...'\n * @returns {object} in the form of {key1:true, key2:true, ...}\n */\nfunction makeMap(str) {\n  var obj = {}, items = str.split(','), i;\n  for (i = 0; i < items.length; i++) {\n    obj[items[i]] = true;\n  }\n  return obj;\n}\n\n\nfunction nodeName_(element) {\n  return lowercase(element.nodeName || (element[0] && element[0].nodeName));\n}\n\nfunction includes(array, obj) {\n  return Array.prototype.indexOf.call(array, obj) != -1;\n}\n\nfunction arrayRemove(array, value) {\n  var index = array.indexOf(value);\n  if (index >= 0) {\n    array.splice(index, 1);\n  }\n  return index;\n}\n\n/**\n * @ngdoc function\n * @name angular.copy\n * @module ng\n * @kind function\n *\n * @description\n * Creates a deep copy of `source`, which should be an object or an array.\n *\n * * If no destination is supplied, a copy of the object or array is created.\n * * If a destination is provided, all of its elements (for arrays) or properties (for objects)\n *   are deleted and then all elements/properties from the source are copied to it.\n * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.\n * * If `source` is identical to 'destination' an exception will be thrown.\n *\n * @param {*} source The source that will be used to make a copy.\n *                   Can be any type, including primitives, `null`, and `undefined`.\n * @param {(Object|Array)=} destination Destination into which the source is copied. If\n *     provided, must be of the same type as `source`.\n * @returns {*} The copy or updated `destination`, if `destination` was specified.\n *\n * @example\n <example module=\"copyExample\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <form novalidate class=\"simple-form\">\n Name: <input type=\"text\" ng-model=\"user.name\" /><br />\n E-mail: <input type=\"email\" ng-model=\"user.email\" /><br />\n Gender: <input type=\"radio\" ng-model=\"user.gender\" value=\"male\" />male\n <input type=\"radio\" ng-model=\"user.gender\" value=\"female\" />female<br />\n <button ng-click=\"reset()\">RESET</button>\n <button ng-click=\"update(user)\">SAVE</button>\n </form>\n <pre>form = {{user | json}}</pre>\n <pre>master = {{master | json}}</pre>\n </div>\n\n <script>\n  angular.module('copyExample', [])\n    .controller('ExampleController', ['$scope', function($scope) {\n      $scope.master= {};\n\n      $scope.update = function(user) {\n        // Example with 1 argument\n        $scope.master= angular.copy(user);\n      };\n\n      $scope.reset = function() {\n        // Example with 2 arguments\n        angular.copy($scope.master, $scope.user);\n      };\n\n      $scope.reset();\n    }]);\n </script>\n </file>\n </example>\n */\nfunction copy(source, destination) {\n  var stackSource = [];\n  var stackDest = [];\n\n  if (destination) {\n    if (isTypedArray(destination) || isArrayBuffer(destination)) {\n      throw ngMinErr('cpta', \"Can't copy! TypedArray destination cannot be mutated.\");\n    }\n    if (source === destination) {\n      throw ngMinErr('cpi', \"Can't copy! Source and destination are identical.\");\n    }\n\n    // Empty the destination object\n    if (isArray(destination)) {\n      destination.length = 0;\n    } else {\n      forEach(destination, function(value, key) {\n        if (key !== '$$hashKey') {\n          delete destination[key];\n        }\n      });\n    }\n\n    stackSource.push(source);\n    stackDest.push(destination);\n    return copyRecurse(source, destination);\n  }\n\n  return copyElement(source);\n\n  function copyRecurse(source, destination) {\n    var h = destination.$$hashKey;\n    var key;\n    if (isArray(source)) {\n      for (var i = 0, ii = source.length; i < ii; i++) {\n        destination.push(copyElement(source[i]));\n      }\n    } else if (isBlankObject(source)) {\n      // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty\n      for (key in source) {\n        destination[key] = copyElement(source[key]);\n      }\n    } else if (source && typeof source.hasOwnProperty === 'function') {\n      // Slow path, which must rely on hasOwnProperty\n      for (key in source) {\n        if (source.hasOwnProperty(key)) {\n          destination[key] = copyElement(source[key]);\n        }\n      }\n    } else {\n      // Slowest path --- hasOwnProperty can't be called as a method\n      for (key in source) {\n        if (hasOwnProperty.call(source, key)) {\n          destination[key] = copyElement(source[key]);\n        }\n      }\n    }\n    setHashKey(destination, h);\n    return destination;\n  }\n\n  function copyElement(source) {\n    // Simple values\n    if (!isObject(source)) {\n      return source;\n    }\n\n    // Already copied values\n    var index = stackSource.indexOf(source);\n    if (index !== -1) {\n      return stackDest[index];\n    }\n\n    if (isWindow(source) || isScope(source)) {\n      throw ngMinErr('cpws',\n        \"Can't copy! Making copies of Window or Scope instances is not supported.\");\n    }\n\n    var needsRecurse = false;\n    var destination = copyType(source);\n\n    if (destination === undefined) {\n      destination = isArray(source) ? [] : Object.create(getPrototypeOf(source));\n      needsRecurse = true;\n    }\n\n    stackSource.push(source);\n    stackDest.push(destination);\n\n    return needsRecurse\n      ? copyRecurse(source, destination)\n      : destination;\n  }\n\n  function copyType(source) {\n    switch (toString.call(source)) {\n      case '[object Int8Array]':\n      case '[object Int16Array]':\n      case '[object Int32Array]':\n      case '[object Float32Array]':\n      case '[object Float64Array]':\n      case '[object Uint8Array]':\n      case '[object Uint8ClampedArray]':\n      case '[object Uint16Array]':\n      case '[object Uint32Array]':\n        return new source.constructor(copyElement(source.buffer));\n\n      case '[object ArrayBuffer]':\n        //Support: IE10\n        if (!source.slice) {\n          var copied = new ArrayBuffer(source.byteLength);\n          new Uint8Array(copied).set(new Uint8Array(source));\n          return copied;\n        }\n        return source.slice(0);\n\n      case '[object Boolean]':\n      case '[object Number]':\n      case '[object String]':\n      case '[object Date]':\n        return new source.constructor(source.valueOf());\n\n      case '[object RegExp]':\n        var re = new RegExp(source.source, source.toString().match(/[^\\/]*$/)[0]);\n        re.lastIndex = source.lastIndex;\n        return re;\n\n      case '[object Blob]':\n        return new source.constructor([source], {type: source.type});\n    }\n\n    if (isFunction(source.cloneNode)) {\n      return source.cloneNode(true);\n    }\n  }\n}\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\n/**\n * @ngdoc function\n * @name angular.equals\n * @module ng\n * @kind function\n *\n * @description\n * Determines if two objects or two values are equivalent. Supports value types, regular\n * expressions, arrays and objects.\n *\n * Two objects or values are considered equivalent if at least one of the following is true:\n *\n * * Both objects or values pass `===` comparison.\n * * Both objects or values are of the same type and all of their properties are equal by\n *   comparing them with `angular.equals`.\n * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)\n * * Both values represent the same regular expression (In JavaScript,\n *   /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual\n *   representation matches).\n *\n * During a property comparison, properties of `function` type and properties with names\n * that begin with `$` are ignored.\n *\n * Scope and DOMWindow objects are being compared only by identify (`===`).\n *\n * @param {*} o1 Object or value to compare.\n * @param {*} o2 Object or value to compare.\n * @returns {boolean} True if arguments are equal.\n */\nfunction equals(o1, o2) {\n  if (o1 === o2) return true;\n  if (o1 === null || o2 === null) return false;\n  if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n  var t1 = typeof o1, t2 = typeof o2, length, key, keySet;\n  if (t1 == t2 && t1 == 'object') {\n    if (isArray(o1)) {\n      if (!isArray(o2)) return false;\n      if ((length = o1.length) == o2.length) {\n        for (key = 0; key < length; key++) {\n          if (!equals(o1[key], o2[key])) return false;\n        }\n        return true;\n      }\n    } else if (isDate(o1)) {\n      if (!isDate(o2)) return false;\n      return equals(o1.getTime(), o2.getTime());\n    } else if (isRegExp(o1)) {\n      if (!isRegExp(o2)) return false;\n      return o1.toString() == o2.toString();\n    } else {\n      if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) ||\n        isArray(o2) || isDate(o2) || isRegExp(o2)) return false;\n      keySet = createMap();\n      for (key in o1) {\n        if (key.charAt(0) === '$' || isFunction(o1[key])) continue;\n        if (!equals(o1[key], o2[key])) return false;\n        keySet[key] = true;\n      }\n      for (key in o2) {\n        if (!(key in keySet) &&\n            key.charAt(0) !== '$' &&\n            isDefined(o2[key]) &&\n            !isFunction(o2[key])) return false;\n      }\n      return true;\n    }\n  }\n  return false;\n}\n\nvar csp = function() {\n  if (!isDefined(csp.rules)) {\n\n\n    var ngCspElement = (document.querySelector('[ng-csp]') ||\n                    document.querySelector('[data-ng-csp]'));\n\n    if (ngCspElement) {\n      var ngCspAttribute = ngCspElement.getAttribute('ng-csp') ||\n                    ngCspElement.getAttribute('data-ng-csp');\n      csp.rules = {\n        noUnsafeEval: !ngCspAttribute || (ngCspAttribute.indexOf('no-unsafe-eval') !== -1),\n        noInlineStyle: !ngCspAttribute || (ngCspAttribute.indexOf('no-inline-style') !== -1)\n      };\n    } else {\n      csp.rules = {\n        noUnsafeEval: noUnsafeEval(),\n        noInlineStyle: false\n      };\n    }\n  }\n\n  return csp.rules;\n\n  function noUnsafeEval() {\n    try {\n      /* jshint -W031, -W054 */\n      new Function('');\n      /* jshint +W031, +W054 */\n      return false;\n    } catch (e) {\n      return true;\n    }\n  }\n};\n\n/**\n * @ngdoc directive\n * @module ng\n * @name ngJq\n *\n * @element ANY\n * @param {string=} ngJq the name of the library available under `window`\n * to be used for angular.element\n * @description\n * Use this directive to force the angular.element library.  This should be\n * used to force either jqLite by leaving ng-jq blank or setting the name of\n * the jquery variable under window (eg. jQuery).\n *\n * Since angular looks for this directive when it is loaded (doesn't wait for the\n * DOMContentLoaded event), it must be placed on an element that comes before the script\n * which loads angular. Also, only the first instance of `ng-jq` will be used and all\n * others ignored.\n *\n * @example\n * This example shows how to force jqLite using the `ngJq` directive to the `html` tag.\n ```html\n <!doctype html>\n <html ng-app ng-jq>\n ...\n ...\n </html>\n ```\n * @example\n * This example shows how to use a jQuery based library of a different name.\n * The library name must be available at the top most 'window'.\n ```html\n <!doctype html>\n <html ng-app ng-jq=\"jQueryLib\">\n ...\n ...\n </html>\n ```\n */\nvar jq = function() {\n  if (isDefined(jq.name_)) return jq.name_;\n  var el;\n  var i, ii = ngAttrPrefixes.length, prefix, name;\n  for (i = 0; i < ii; ++i) {\n    prefix = ngAttrPrefixes[i];\n    if (el = document.querySelector('[' + prefix.replace(':', '\\\\:') + 'jq]')) {\n      name = el.getAttribute(prefix + 'jq');\n      break;\n    }\n  }\n\n  return (jq.name_ = name);\n};\n\nfunction concat(array1, array2, index) {\n  return array1.concat(slice.call(array2, index));\n}\n\nfunction sliceArgs(args, startIndex) {\n  return slice.call(args, startIndex || 0);\n}\n\n\n/* jshint -W101 */\n/**\n * @ngdoc function\n * @name angular.bind\n * @module ng\n * @kind function\n *\n * @description\n * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for\n * `fn`). You can supply optional `args` that are prebound to the function. This feature is also\n * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as\n * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).\n *\n * @param {Object} self Context which `fn` should be evaluated in.\n * @param {function()} fn Function to be bound.\n * @param {...*} args Optional arguments to be prebound to the `fn` function call.\n * @returns {function()} Function that wraps the `fn` with all the specified bindings.\n */\n/* jshint +W101 */\nfunction bind(self, fn) {\n  var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];\n  if (isFunction(fn) && !(fn instanceof RegExp)) {\n    return curryArgs.length\n      ? function() {\n          return arguments.length\n            ? fn.apply(self, concat(curryArgs, arguments, 0))\n            : fn.apply(self, curryArgs);\n        }\n      : function() {\n          return arguments.length\n            ? fn.apply(self, arguments)\n            : fn.call(self);\n        };\n  } else {\n    // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)\n    return fn;\n  }\n}\n\n\nfunction toJsonReplacer(key, value) {\n  var val = value;\n\n  if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {\n    val = undefined;\n  } else if (isWindow(value)) {\n    val = '$WINDOW';\n  } else if (value &&  document === value) {\n    val = '$DOCUMENT';\n  } else if (isScope(value)) {\n    val = '$SCOPE';\n  }\n\n  return val;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.toJson\n * @module ng\n * @kind function\n *\n * @description\n * Serializes input into a JSON-formatted string. Properties with leading $$ characters will be\n * stripped since angular uses this notation internally.\n *\n * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.\n * @param {boolean|number} [pretty=2] If set to true, the JSON output will contain newlines and whitespace.\n *    If set to an integer, the JSON output will contain that many spaces per indentation.\n * @returns {string|undefined} JSON-ified string representing `obj`.\n */\nfunction toJson(obj, pretty) {\n  if (isUndefined(obj)) return undefined;\n  if (!isNumber(pretty)) {\n    pretty = pretty ? 2 : null;\n  }\n  return JSON.stringify(obj, toJsonReplacer, pretty);\n}\n\n\n/**\n * @ngdoc function\n * @name angular.fromJson\n * @module ng\n * @kind function\n *\n * @description\n * Deserializes a JSON string.\n *\n * @param {string} json JSON string to deserialize.\n * @returns {Object|Array|string|number} Deserialized JSON string.\n */\nfunction fromJson(json) {\n  return isString(json)\n      ? JSON.parse(json)\n      : json;\n}\n\n\nvar ALL_COLONS = /:/g;\nfunction timezoneToOffset(timezone, fallback) {\n  // IE/Edge do not \"understand\" colon (`:`) in timezone\n  timezone = timezone.replace(ALL_COLONS, '');\n  var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;\n  return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;\n}\n\n\nfunction addDateMinutes(date, minutes) {\n  date = new Date(date.getTime());\n  date.setMinutes(date.getMinutes() + minutes);\n  return date;\n}\n\n\nfunction convertTimezoneToLocal(date, timezone, reverse) {\n  reverse = reverse ? -1 : 1;\n  var dateTimezoneOffset = date.getTimezoneOffset();\n  var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n  return addDateMinutes(date, reverse * (timezoneOffset - dateTimezoneOffset));\n}\n\n\n/**\n * @returns {string} Returns the string representation of the element.\n */\nfunction startingTag(element) {\n  element = jqLite(element).clone();\n  try {\n    // turns out IE does not let you set .html() on elements which\n    // are not allowed to have children. So we just ignore it.\n    element.empty();\n  } catch (e) {}\n  var elemHtml = jqLite('<div>').append(element).html();\n  try {\n    return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) :\n        elemHtml.\n          match(/^(<[^>]+>)/)[1].\n          replace(/^<([\\w\\-]+)/, function(match, nodeName) {return '<' + lowercase(nodeName);});\n  } catch (e) {\n    return lowercase(elemHtml);\n  }\n\n}\n\n\n/////////////////////////////////////////////////\n\n/**\n * Tries to decode the URI component without throwing an exception.\n *\n * @private\n * @param str value potential URI component to check.\n * @returns {boolean} True if `value` can be decoded\n * with the decodeURIComponent function.\n */\nfunction tryDecodeURIComponent(value) {\n  try {\n    return decodeURIComponent(value);\n  } catch (e) {\n    // Ignore any invalid uri component\n  }\n}\n\n\n/**\n * Parses an escaped url query string into key-value pairs.\n * @returns {Object.<string,boolean|Array>}\n */\nfunction parseKeyValue(/**string*/keyValue) {\n  var obj = {};\n  forEach((keyValue || \"\").split('&'), function(keyValue) {\n    var splitPoint, key, val;\n    if (keyValue) {\n      key = keyValue = keyValue.replace(/\\+/g,'%20');\n      splitPoint = keyValue.indexOf('=');\n      if (splitPoint !== -1) {\n        key = keyValue.substring(0, splitPoint);\n        val = keyValue.substring(splitPoint + 1);\n      }\n      key = tryDecodeURIComponent(key);\n      if (isDefined(key)) {\n        val = isDefined(val) ? tryDecodeURIComponent(val) : true;\n        if (!hasOwnProperty.call(obj, key)) {\n          obj[key] = val;\n        } else if (isArray(obj[key])) {\n          obj[key].push(val);\n        } else {\n          obj[key] = [obj[key],val];\n        }\n      }\n    }\n  });\n  return obj;\n}\n\nfunction toKeyValue(obj) {\n  var parts = [];\n  forEach(obj, function(value, key) {\n    if (isArray(value)) {\n      forEach(value, function(arrayValue) {\n        parts.push(encodeUriQuery(key, true) +\n                   (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));\n      });\n    } else {\n    parts.push(encodeUriQuery(key, true) +\n               (value === true ? '' : '=' + encodeUriQuery(value, true)));\n    }\n  });\n  return parts.length ? parts.join('&') : '';\n}\n\n\n/**\n * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path\n * segments:\n *    segment       = *pchar\n *    pchar         = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n *    pct-encoded   = \"%\" HEXDIG HEXDIG\n *    unreserved    = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n *    sub-delims    = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n *                     / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriSegment(val) {\n  return encodeUriQuery(val, true).\n             replace(/%26/gi, '&').\n             replace(/%3D/gi, '=').\n             replace(/%2B/gi, '+');\n}\n\n\n/**\n * This method is intended for encoding *key* or *value* parts of query component. We need a custom\n * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be\n * encoded per http://tools.ietf.org/html/rfc3986:\n *    query       = *( pchar / \"/\" / \"?\" )\n *    pchar         = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n *    unreserved    = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n *    pct-encoded   = \"%\" HEXDIG HEXDIG\n *    sub-delims    = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n *                     / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriQuery(val, pctEncodeSpaces) {\n  return encodeURIComponent(val).\n             replace(/%40/gi, '@').\n             replace(/%3A/gi, ':').\n             replace(/%24/g, '$').\n             replace(/%2C/gi, ',').\n             replace(/%3B/gi, ';').\n             replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n}\n\nvar ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];\n\nfunction getNgAttribute(element, ngAttr) {\n  var attr, i, ii = ngAttrPrefixes.length;\n  for (i = 0; i < ii; ++i) {\n    attr = ngAttrPrefixes[i] + ngAttr;\n    if (isString(attr = element.getAttribute(attr))) {\n      return attr;\n    }\n  }\n  return null;\n}\n\n/**\n * @ngdoc directive\n * @name ngApp\n * @module ng\n *\n * @element ANY\n * @param {angular.Module} ngApp an optional application\n *   {@link angular.module module} name to load.\n * @param {boolean=} ngStrictDi if this attribute is present on the app element, the injector will be\n *   created in \"strict-di\" mode. This means that the application will fail to invoke functions which\n *   do not use explicit function annotation (and are thus unsuitable for minification), as described\n *   in {@link guide/di the Dependency Injection guide}, and useful debugging info will assist in\n *   tracking down the root of these bugs.\n *\n * @description\n *\n * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive\n * designates the **root element** of the application and is typically placed near the root element\n * of the page - e.g. on the `<body>` or `<html>` tags.\n *\n * There are a few things to keep in mind when using `ngApp`:\n * - only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`\n *   found in the document will be used to define the root element to auto-bootstrap as an\n *   application. To run multiple applications in an HTML document you must manually bootstrap them using\n *   {@link angular.bootstrap} instead.\n * - AngularJS applications cannot be nested within each other.\n * - Do not use a directive that uses {@link ng.$compile#transclusion transclusion} on the same element as `ngApp`.\n *   This includes directives such as {@link ng.ngIf `ngIf`}, {@link ng.ngInclude `ngInclude`} and\n *   {@link ngRoute.ngView `ngView`}.\n *   Doing this misplaces the app {@link ng.$rootElement `$rootElement`} and the app's {@link auto.$injector injector},\n *   causing animations to stop working and making the injector inaccessible from outside the app.\n *\n * You can specify an **AngularJS module** to be used as the root module for the application.  This\n * module will be loaded into the {@link auto.$injector} when the application is bootstrapped. It\n * should contain the application code needed or have dependencies on other modules that will\n * contain the code. See {@link angular.module} for more information.\n *\n * In the example below if the `ngApp` directive were not placed on the `html` element then the\n * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`\n * would not be resolved to `3`.\n *\n * `ngApp` is the easiest, and most common way to bootstrap an application.\n *\n <example module=\"ngAppDemo\">\n   <file name=\"index.html\">\n   <div ng-controller=\"ngAppDemoController\">\n     I can add: {{a}} + {{b}} =  {{ a+b }}\n   </div>\n   </file>\n   <file name=\"script.js\">\n   angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {\n     $scope.a = 1;\n     $scope.b = 2;\n   });\n   </file>\n </example>\n *\n * Using `ngStrictDi`, you would see something like this:\n *\n <example ng-app-included=\"true\">\n   <file name=\"index.html\">\n   <div ng-app=\"ngAppStrictDemo\" ng-strict-di>\n       <div ng-controller=\"GoodController1\">\n           I can add: {{a}} + {{b}} =  {{ a+b }}\n\n           <p>This renders because the controller does not fail to\n              instantiate, by using explicit annotation style (see\n              script.js for details)\n           </p>\n       </div>\n\n       <div ng-controller=\"GoodController2\">\n           Name: <input ng-model=\"name\"><br />\n           Hello, {{name}}!\n\n           <p>This renders because the controller does not fail to\n              instantiate, by using explicit annotation style\n              (see script.js for details)\n           </p>\n       </div>\n\n       <div ng-controller=\"BadController\">\n           I can add: {{a}} + {{b}} =  {{ a+b }}\n\n           <p>The controller could not be instantiated, due to relying\n              on automatic function annotations (which are disabled in\n              strict mode). As such, the content of this section is not\n              interpolated, and there should be an error in your web console.\n           </p>\n       </div>\n   </div>\n   </file>\n   <file name=\"script.js\">\n   angular.module('ngAppStrictDemo', [])\n     // BadController will fail to instantiate, due to relying on automatic function annotation,\n     // rather than an explicit annotation\n     .controller('BadController', function($scope) {\n       $scope.a = 1;\n       $scope.b = 2;\n     })\n     // Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated,\n     // due to using explicit annotations using the array style and $inject property, respectively.\n     .controller('GoodController1', ['$scope', function($scope) {\n       $scope.a = 1;\n       $scope.b = 2;\n     }])\n     .controller('GoodController2', GoodController2);\n     function GoodController2($scope) {\n       $scope.name = \"World\";\n     }\n     GoodController2.$inject = ['$scope'];\n   </file>\n   <file name=\"style.css\">\n   div[ng-controller] {\n       margin-bottom: 1em;\n       -webkit-border-radius: 4px;\n       border-radius: 4px;\n       border: 1px solid;\n       padding: .5em;\n   }\n   div[ng-controller^=Good] {\n       border-color: #d6e9c6;\n       background-color: #dff0d8;\n       color: #3c763d;\n   }\n   div[ng-controller^=Bad] {\n       border-color: #ebccd1;\n       background-color: #f2dede;\n       color: #a94442;\n       margin-bottom: 0;\n   }\n   </file>\n </example>\n */\nfunction angularInit(element, bootstrap) {\n  var appElement,\n      module,\n      config = {};\n\n  // The element `element` has priority over any other element\n  forEach(ngAttrPrefixes, function(prefix) {\n    var name = prefix + 'app';\n\n    if (!appElement && element.hasAttribute && element.hasAttribute(name)) {\n      appElement = element;\n      module = element.getAttribute(name);\n    }\n  });\n  forEach(ngAttrPrefixes, function(prefix) {\n    var name = prefix + 'app';\n    var candidate;\n\n    if (!appElement && (candidate = element.querySelector('[' + name.replace(':', '\\\\:') + ']'))) {\n      appElement = candidate;\n      module = candidate.getAttribute(name);\n    }\n  });\n  if (appElement) {\n    config.strictDi = getNgAttribute(appElement, \"strict-di\") !== null;\n    bootstrap(appElement, module ? [module] : [], config);\n  }\n}\n\n/**\n * @ngdoc function\n * @name angular.bootstrap\n * @module ng\n * @description\n * Use this function to manually start up angular application.\n *\n * For more information, see the {@link guide/bootstrap Bootstrap guide}.\n *\n * Angular will detect if it has been loaded into the browser more than once and only allow the\n * first loaded script to be bootstrapped and will report a warning to the browser console for\n * each of the subsequent scripts. This prevents strange results in applications, where otherwise\n * multiple instances of Angular try to work on the DOM.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Protractor based end-to-end tests cannot use this function to bootstrap manually.\n * They must use {@link ng.directive:ngApp ngApp}.\n * </div>\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Do not bootstrap the app on an element with a directive that uses {@link ng.$compile#transclusion transclusion},\n * such as {@link ng.ngIf `ngIf`}, {@link ng.ngInclude `ngInclude`} and {@link ngRoute.ngView `ngView`}.\n * Doing this misplaces the app {@link ng.$rootElement `$rootElement`} and the app's {@link auto.$injector injector},\n * causing animations to stop working and making the injector inaccessible from outside the app.\n * </div>\n *\n * ```html\n * <!doctype html>\n * <html>\n * <body>\n * <div ng-controller=\"WelcomeController\">\n *   {{greeting}}\n * </div>\n *\n * <script src=\"angular.js\"></script>\n * <script>\n *   var app = angular.module('demo', [])\n *   .controller('WelcomeController', function($scope) {\n *       $scope.greeting = 'Welcome!';\n *   });\n *   angular.bootstrap(document, ['demo']);\n * </script>\n * </body>\n * </html>\n * ```\n *\n * @param {DOMElement} element DOM element which is the root of angular application.\n * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.\n *     Each item in the array should be the name of a predefined module or a (DI annotated)\n *     function that will be invoked by the injector as a `config` block.\n *     See: {@link angular.module modules}\n * @param {Object=} config an object for defining configuration options for the application. The\n *     following keys are supported:\n *\n * * `strictDi` - disable automatic function annotation for the application. This is meant to\n *   assist in finding bugs which break minified code. Defaults to `false`.\n *\n * @returns {auto.$injector} Returns the newly created injector for this app.\n */\nfunction bootstrap(element, modules, config) {\n  if (!isObject(config)) config = {};\n  var defaultConfig = {\n    strictDi: false\n  };\n  config = extend(defaultConfig, config);\n  var doBootstrap = function() {\n    element = jqLite(element);\n\n    if (element.injector()) {\n      var tag = (element[0] === document) ? 'document' : startingTag(element);\n      //Encode angle brackets to prevent input from being sanitized to empty string #8683\n      throw ngMinErr(\n          'btstrpd',\n          \"App Already Bootstrapped with this Element '{0}'\",\n          tag.replace(/</,'&lt;').replace(/>/,'&gt;'));\n    }\n\n    modules = modules || [];\n    modules.unshift(['$provide', function($provide) {\n      $provide.value('$rootElement', element);\n    }]);\n\n    if (config.debugInfoEnabled) {\n      // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.\n      modules.push(['$compileProvider', function($compileProvider) {\n        $compileProvider.debugInfoEnabled(true);\n      }]);\n    }\n\n    modules.unshift('ng');\n    var injector = createInjector(modules, config.strictDi);\n    injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',\n       function bootstrapApply(scope, element, compile, injector) {\n        scope.$apply(function() {\n          element.data('$injector', injector);\n          compile(element)(scope);\n        });\n      }]\n    );\n    return injector;\n  };\n\n  var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;\n  var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;\n\n  if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) {\n    config.debugInfoEnabled = true;\n    window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, '');\n  }\n\n  if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {\n    return doBootstrap();\n  }\n\n  window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');\n  angular.resumeBootstrap = function(extraModules) {\n    forEach(extraModules, function(module) {\n      modules.push(module);\n    });\n    return doBootstrap();\n  };\n\n  if (isFunction(angular.resumeDeferredBootstrap)) {\n    angular.resumeDeferredBootstrap();\n  }\n}\n\n/**\n * @ngdoc function\n * @name angular.reloadWithDebugInfo\n * @module ng\n * @description\n * Use this function to reload the current application with debug information turned on.\n * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`.\n *\n * See {@link ng.$compileProvider#debugInfoEnabled} for more.\n */\nfunction reloadWithDebugInfo() {\n  window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;\n  window.location.reload();\n}\n\n/**\n * @name angular.getTestability\n * @module ng\n * @description\n * Get the testability service for the instance of Angular on the given\n * element.\n * @param {DOMElement} element DOM element which is the root of angular application.\n */\nfunction getTestability(rootElement) {\n  var injector = angular.element(rootElement).injector();\n  if (!injector) {\n    throw ngMinErr('test',\n      'no injector found for element argument to getTestability');\n  }\n  return injector.get('$$testability');\n}\n\nvar SNAKE_CASE_REGEXP = /[A-Z]/g;\nfunction snake_case(name, separator) {\n  separator = separator || '_';\n  return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {\n    return (pos ? separator : '') + letter.toLowerCase();\n  });\n}\n\nvar bindJQueryFired = false;\nfunction bindJQuery() {\n  var originalCleanData;\n\n  if (bindJQueryFired) {\n    return;\n  }\n\n  // bind to jQuery if present;\n  var jqName = jq();\n  jQuery = isUndefined(jqName) ? window.jQuery :   // use jQuery (if present)\n           !jqName             ? undefined     :   // use jqLite\n                                 window[jqName];   // use jQuery specified by `ngJq`\n\n  // Use jQuery if it exists with proper functionality, otherwise default to us.\n  // Angular 1.2+ requires jQuery 1.7+ for on()/off() support.\n  // Angular 1.3+ technically requires at least jQuery 2.1+ but it may work with older\n  // versions. It will not work for sure with jQuery <1.7, though.\n  if (jQuery && jQuery.fn.on) {\n    jqLite = jQuery;\n    extend(jQuery.fn, {\n      scope: JQLitePrototype.scope,\n      isolateScope: JQLitePrototype.isolateScope,\n      controller: JQLitePrototype.controller,\n      injector: JQLitePrototype.injector,\n      inheritedData: JQLitePrototype.inheritedData\n    });\n\n    // All nodes removed from the DOM via various jQuery APIs like .remove()\n    // are passed through jQuery.cleanData. Monkey-patch this method to fire\n    // the $destroy event on all removed nodes.\n    originalCleanData = jQuery.cleanData;\n    jQuery.cleanData = function(elems) {\n      var events;\n      for (var i = 0, elem; (elem = elems[i]) != null; i++) {\n        events = jQuery._data(elem, \"events\");\n        if (events && events.$destroy) {\n          jQuery(elem).triggerHandler('$destroy');\n        }\n      }\n      originalCleanData(elems);\n    };\n  } else {\n    jqLite = JQLite;\n  }\n\n  angular.element = jqLite;\n\n  // Prevent double-proxying.\n  bindJQueryFired = true;\n}\n\n/**\n * throw error if the argument is falsy.\n */\nfunction assertArg(arg, name, reason) {\n  if (!arg) {\n    throw ngMinErr('areq', \"Argument '{0}' is {1}\", (name || '?'), (reason || \"required\"));\n  }\n  return arg;\n}\n\nfunction assertArgFn(arg, name, acceptArrayAnnotation) {\n  if (acceptArrayAnnotation && isArray(arg)) {\n      arg = arg[arg.length - 1];\n  }\n\n  assertArg(isFunction(arg), name, 'not a function, got ' +\n      (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));\n  return arg;\n}\n\n/**\n * throw error if the name given is hasOwnProperty\n * @param  {String} name    the name to test\n * @param  {String} context the context in which the name is used, such as module or directive\n */\nfunction assertNotHasOwnProperty(name, context) {\n  if (name === 'hasOwnProperty') {\n    throw ngMinErr('badname', \"hasOwnProperty is not a valid {0} name\", context);\n  }\n}\n\n/**\n * Return the value accessible from the object by path. Any undefined traversals are ignored\n * @param {Object} obj starting object\n * @param {String} path path to traverse\n * @param {boolean} [bindFnToScope=true]\n * @returns {Object} value as accessible by path\n */\n//TODO(misko): this function needs to be removed\nfunction getter(obj, path, bindFnToScope) {\n  if (!path) return obj;\n  var keys = path.split('.');\n  var key;\n  var lastInstance = obj;\n  var len = keys.length;\n\n  for (var i = 0; i < len; i++) {\n    key = keys[i];\n    if (obj) {\n      obj = (lastInstance = obj)[key];\n    }\n  }\n  if (!bindFnToScope && isFunction(obj)) {\n    return bind(lastInstance, obj);\n  }\n  return obj;\n}\n\n/**\n * Return the DOM siblings between the first and last node in the given array.\n * @param {Array} array like object\n * @returns {Array} the inputted object or a jqLite collection containing the nodes\n */\nfunction getBlockNodes(nodes) {\n  // TODO(perf): update `nodes` instead of creating a new object?\n  var node = nodes[0];\n  var endNode = nodes[nodes.length - 1];\n  var blockNodes;\n\n  for (var i = 1; node !== endNode && (node = node.nextSibling); i++) {\n    if (blockNodes || nodes[i] !== node) {\n      if (!blockNodes) {\n        blockNodes = jqLite(slice.call(nodes, 0, i));\n      }\n      blockNodes.push(node);\n    }\n  }\n\n  return blockNodes || nodes;\n}\n\n\n/**\n * Creates a new object without a prototype. This object is useful for lookup without having to\n * guard against prototypically inherited properties via hasOwnProperty.\n *\n * Related micro-benchmarks:\n * - http://jsperf.com/object-create2\n * - http://jsperf.com/proto-map-lookup/2\n * - http://jsperf.com/for-in-vs-object-keys2\n *\n * @returns {Object}\n */\nfunction createMap() {\n  return Object.create(null);\n}\n\nvar NODE_TYPE_ELEMENT = 1;\nvar NODE_TYPE_ATTRIBUTE = 2;\nvar NODE_TYPE_TEXT = 3;\nvar NODE_TYPE_COMMENT = 8;\nvar NODE_TYPE_DOCUMENT = 9;\nvar NODE_TYPE_DOCUMENT_FRAGMENT = 11;\n\n/**\n * @ngdoc type\n * @name angular.Module\n * @module ng\n * @description\n *\n * Interface for configuring angular {@link angular.module modules}.\n */\n\nfunction setupModuleLoader(window) {\n\n  var $injectorMinErr = minErr('$injector');\n  var ngMinErr = minErr('ng');\n\n  function ensure(obj, name, factory) {\n    return obj[name] || (obj[name] = factory());\n  }\n\n  var angular = ensure(window, 'angular', Object);\n\n  // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap\n  angular.$$minErr = angular.$$minErr || minErr;\n\n  return ensure(angular, 'module', function() {\n    /** @type {Object.<string, angular.Module>} */\n    var modules = {};\n\n    /**\n     * @ngdoc function\n     * @name angular.module\n     * @module ng\n     * @description\n     *\n     * The `angular.module` is a global place for creating, registering and retrieving Angular\n     * modules.\n     * All modules (angular core or 3rd party) that should be available to an application must be\n     * registered using this mechanism.\n     *\n     * Passing one argument retrieves an existing {@link angular.Module},\n     * whereas passing more than one argument creates a new {@link angular.Module}\n     *\n     *\n     * # Module\n     *\n     * A module is a collection of services, directives, controllers, filters, and configuration information.\n     * `angular.module` is used to configure the {@link auto.$injector $injector}.\n     *\n     * ```js\n     * // Create a new module\n     * var myModule = angular.module('myModule', []);\n     *\n     * // register a new service\n     * myModule.value('appName', 'MyCoolApp');\n     *\n     * // configure existing services inside initialization blocks.\n     * myModule.config(['$locationProvider', function($locationProvider) {\n     *   // Configure existing providers\n     *   $locationProvider.hashPrefix('!');\n     * }]);\n     * ```\n     *\n     * Then you can create an injector and load your modules like this:\n     *\n     * ```js\n     * var injector = angular.injector(['ng', 'myModule'])\n     * ```\n     *\n     * However it's more likely that you'll just use\n     * {@link ng.directive:ngApp ngApp} or\n     * {@link angular.bootstrap} to simplify this process for you.\n     *\n     * @param {!string} name The name of the module to create or retrieve.\n     * @param {!Array.<string>=} requires If specified then new module is being created. If\n     *        unspecified then the module is being retrieved for further configuration.\n     * @param {Function=} configFn Optional configuration function for the module. Same as\n     *        {@link angular.Module#config Module#config()}.\n     * @returns {angular.Module} new module with the {@link angular.Module} api.\n     */\n    return function module(name, requires, configFn) {\n      var assertNotHasOwnProperty = function(name, context) {\n        if (name === 'hasOwnProperty') {\n          throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);\n        }\n      };\n\n      assertNotHasOwnProperty(name, 'module');\n      if (requires && modules.hasOwnProperty(name)) {\n        modules[name] = null;\n      }\n      return ensure(modules, name, function() {\n        if (!requires) {\n          throw $injectorMinErr('nomod', \"Module '{0}' is not available! You either misspelled \" +\n             \"the module name or forgot to load it. If registering a module ensure that you \" +\n             \"specify the dependencies as the second argument.\", name);\n        }\n\n        /** @type {!Array.<Array.<*>>} */\n        var invokeQueue = [];\n\n        /** @type {!Array.<Function>} */\n        var configBlocks = [];\n\n        /** @type {!Array.<Function>} */\n        var runBlocks = [];\n\n        var config = invokeLater('$injector', 'invoke', 'push', configBlocks);\n\n        /** @type {angular.Module} */\n        var moduleInstance = {\n          // Private state\n          _invokeQueue: invokeQueue,\n          _configBlocks: configBlocks,\n          _runBlocks: runBlocks,\n\n          /**\n           * @ngdoc property\n           * @name angular.Module#requires\n           * @module ng\n           *\n           * @description\n           * Holds the list of modules which the injector will load before the current module is\n           * loaded.\n           */\n          requires: requires,\n\n          /**\n           * @ngdoc property\n           * @name angular.Module#name\n           * @module ng\n           *\n           * @description\n           * Name of the module.\n           */\n          name: name,\n\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#provider\n           * @module ng\n           * @param {string} name service name\n           * @param {Function} providerType Construction function for creating new instance of the\n           *                                service.\n           * @description\n           * See {@link auto.$provide#provider $provide.provider()}.\n           */\n          provider: invokeLaterAndSetModuleName('$provide', 'provider'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#factory\n           * @module ng\n           * @param {string} name service name\n           * @param {Function} providerFunction Function for creating new instance of the service.\n           * @description\n           * See {@link auto.$provide#factory $provide.factory()}.\n           */\n          factory: invokeLaterAndSetModuleName('$provide', 'factory'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#service\n           * @module ng\n           * @param {string} name service name\n           * @param {Function} constructor A constructor function that will be instantiated.\n           * @description\n           * See {@link auto.$provide#service $provide.service()}.\n           */\n          service: invokeLaterAndSetModuleName('$provide', 'service'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#value\n           * @module ng\n           * @param {string} name service name\n           * @param {*} object Service instance object.\n           * @description\n           * See {@link auto.$provide#value $provide.value()}.\n           */\n          value: invokeLater('$provide', 'value'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#constant\n           * @module ng\n           * @param {string} name constant name\n           * @param {*} object Constant value.\n           * @description\n           * Because the constants are fixed, they get applied before other provide methods.\n           * See {@link auto.$provide#constant $provide.constant()}.\n           */\n          constant: invokeLater('$provide', 'constant', 'unshift'),\n\n           /**\n           * @ngdoc method\n           * @name angular.Module#decorator\n           * @module ng\n           * @param {string} The name of the service to decorate.\n           * @param {Function} This function will be invoked when the service needs to be\n           *                                    instantiated and should return the decorated service instance.\n           * @description\n           * See {@link auto.$provide#decorator $provide.decorator()}.\n           */\n          decorator: invokeLaterAndSetModuleName('$provide', 'decorator'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#animation\n           * @module ng\n           * @param {string} name animation name\n           * @param {Function} animationFactory Factory function for creating new instance of an\n           *                                    animation.\n           * @description\n           *\n           * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.\n           *\n           *\n           * Defines an animation hook that can be later used with\n           * {@link $animate $animate} service and directives that use this service.\n           *\n           * ```js\n           * module.animation('.animation-name', function($inject1, $inject2) {\n           *   return {\n           *     eventName : function(element, done) {\n           *       //code to run the animation\n           *       //once complete, then run done()\n           *       return function cancellationFunction(element) {\n           *         //code to cancel the animation\n           *       }\n           *     }\n           *   }\n           * })\n           * ```\n           *\n           * See {@link ng.$animateProvider#register $animateProvider.register()} and\n           * {@link ngAnimate ngAnimate module} for more information.\n           */\n          animation: invokeLaterAndSetModuleName('$animateProvider', 'register'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#filter\n           * @module ng\n           * @param {string} name Filter name - this must be a valid angular expression identifier\n           * @param {Function} filterFactory Factory function for creating new instance of filter.\n           * @description\n           * See {@link ng.$filterProvider#register $filterProvider.register()}.\n           *\n           * <div class=\"alert alert-warning\">\n           * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.\n           * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n           * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n           * (`myapp_subsection_filterx`).\n           * </div>\n           */\n          filter: invokeLaterAndSetModuleName('$filterProvider', 'register'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#controller\n           * @module ng\n           * @param {string|Object} name Controller name, or an object map of controllers where the\n           *    keys are the names and the values are the constructors.\n           * @param {Function} constructor Controller constructor function.\n           * @description\n           * See {@link ng.$controllerProvider#register $controllerProvider.register()}.\n           */\n          controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#directive\n           * @module ng\n           * @param {string|Object} name Directive name, or an object map of directives where the\n           *    keys are the names and the values are the factories.\n           * @param {Function} directiveFactory Factory function for creating new instance of\n           * directives.\n           * @description\n           * See {@link ng.$compileProvider#directive $compileProvider.directive()}.\n           */\n          directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#component\n           * @module ng\n           * @param {string} name Name of the component in camel-case (i.e. myComp which will match as my-comp)\n           * @param {Object} options Component definition object (a simplified\n           *    {@link ng.$compile#directive-definition-object directive definition object})\n           *\n           * @description\n           * See {@link ng.$compileProvider#component $compileProvider.component()}.\n           */\n          component: invokeLaterAndSetModuleName('$compileProvider', 'component'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#config\n           * @module ng\n           * @param {Function} configFn Execute this function on module load. Useful for service\n           *    configuration.\n           * @description\n           * Use this method to register work which needs to be performed on module loading.\n           * For more about how to configure services, see\n           * {@link providers#provider-recipe Provider Recipe}.\n           */\n          config: config,\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#run\n           * @module ng\n           * @param {Function} initializationFn Execute this function after injector creation.\n           *    Useful for application initialization.\n           * @description\n           * Use this method to register work which should be performed when the injector is done\n           * loading all modules.\n           */\n          run: function(block) {\n            runBlocks.push(block);\n            return this;\n          }\n        };\n\n        if (configFn) {\n          config(configFn);\n        }\n\n        return moduleInstance;\n\n        /**\n         * @param {string} provider\n         * @param {string} method\n         * @param {String=} insertMethod\n         * @returns {angular.Module}\n         */\n        function invokeLater(provider, method, insertMethod, queue) {\n          if (!queue) queue = invokeQueue;\n          return function() {\n            queue[insertMethod || 'push']([provider, method, arguments]);\n            return moduleInstance;\n          };\n        }\n\n        /**\n         * @param {string} provider\n         * @param {string} method\n         * @returns {angular.Module}\n         */\n        function invokeLaterAndSetModuleName(provider, method) {\n          return function(recipeName, factoryFunction) {\n            if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name;\n            invokeQueue.push([provider, method, arguments]);\n            return moduleInstance;\n          };\n        }\n      });\n    };\n  });\n\n}\n\n/* global: toDebugString: true */\n\nfunction serializeObject(obj) {\n  var seen = [];\n\n  return JSON.stringify(obj, function(key, val) {\n    val = toJsonReplacer(key, val);\n    if (isObject(val)) {\n\n      if (seen.indexOf(val) >= 0) return '...';\n\n      seen.push(val);\n    }\n    return val;\n  });\n}\n\nfunction toDebugString(obj) {\n  if (typeof obj === 'function') {\n    return obj.toString().replace(/ \\{[\\s\\S]*$/, '');\n  } else if (isUndefined(obj)) {\n    return 'undefined';\n  } else if (typeof obj !== 'string') {\n    return serializeObject(obj);\n  }\n  return obj;\n}\n\n/* global angularModule: true,\n  version: true,\n\n  $CompileProvider,\n\n  htmlAnchorDirective,\n  inputDirective,\n  inputDirective,\n  formDirective,\n  scriptDirective,\n  selectDirective,\n  styleDirective,\n  optionDirective,\n  ngBindDirective,\n  ngBindHtmlDirective,\n  ngBindTemplateDirective,\n  ngClassDirective,\n  ngClassEvenDirective,\n  ngClassOddDirective,\n  ngCloakDirective,\n  ngControllerDirective,\n  ngFormDirective,\n  ngHideDirective,\n  ngIfDirective,\n  ngIncludeDirective,\n  ngIncludeFillContentDirective,\n  ngInitDirective,\n  ngNonBindableDirective,\n  ngPluralizeDirective,\n  ngRepeatDirective,\n  ngShowDirective,\n  ngStyleDirective,\n  ngSwitchDirective,\n  ngSwitchWhenDirective,\n  ngSwitchDefaultDirective,\n  ngOptionsDirective,\n  ngTranscludeDirective,\n  ngModelDirective,\n  ngListDirective,\n  ngChangeDirective,\n  patternDirective,\n  patternDirective,\n  requiredDirective,\n  requiredDirective,\n  minlengthDirective,\n  minlengthDirective,\n  maxlengthDirective,\n  maxlengthDirective,\n  ngValueDirective,\n  ngModelOptionsDirective,\n  ngAttributeAliasDirectives,\n  ngEventDirectives,\n\n  $AnchorScrollProvider,\n  $AnimateProvider,\n  $CoreAnimateCssProvider,\n  $$CoreAnimateJsProvider,\n  $$CoreAnimateQueueProvider,\n  $$AnimateRunnerFactoryProvider,\n  $$AnimateAsyncRunFactoryProvider,\n  $BrowserProvider,\n  $CacheFactoryProvider,\n  $ControllerProvider,\n  $DateProvider,\n  $DocumentProvider,\n  $ExceptionHandlerProvider,\n  $FilterProvider,\n  $$ForceReflowProvider,\n  $InterpolateProvider,\n  $IntervalProvider,\n  $$HashMapProvider,\n  $HttpProvider,\n  $HttpParamSerializerProvider,\n  $HttpParamSerializerJQLikeProvider,\n  $HttpBackendProvider,\n  $xhrFactoryProvider,\n  $LocationProvider,\n  $LogProvider,\n  $ParseProvider,\n  $RootScopeProvider,\n  $QProvider,\n  $$QProvider,\n  $$SanitizeUriProvider,\n  $SceProvider,\n  $SceDelegateProvider,\n  $SnifferProvider,\n  $TemplateCacheProvider,\n  $TemplateRequestProvider,\n  $$TestabilityProvider,\n  $TimeoutProvider,\n  $$RAFProvider,\n  $WindowProvider,\n  $$jqLiteProvider,\n  $$CookieReaderProvider\n*/\n\n\n/**\n * @ngdoc object\n * @name angular.version\n * @module ng\n * @description\n * An object that contains information about the current AngularJS version.\n *\n * This object has the following properties:\n *\n * - `full` – `{string}` – Full version string, such as \"0.9.18\".\n * - `major` – `{number}` – Major version number, such as \"0\".\n * - `minor` – `{number}` – Minor version number, such as \"9\".\n * - `dot` – `{number}` – Dot version number, such as \"18\".\n * - `codeName` – `{string}` – Code name of the release, such as \"jiggling-armfat\".\n */\nvar version = {\n  full: '1.5.3',    // all of these placeholder strings will be replaced by grunt's\n  major: 1,    // package task\n  minor: 5,\n  dot: 3,\n  codeName: 'diplohaplontic-meiosis'\n};\n\n\nfunction publishExternalAPI(angular) {\n  extend(angular, {\n    'bootstrap': bootstrap,\n    'copy': copy,\n    'extend': extend,\n    'merge': merge,\n    'equals': equals,\n    'element': jqLite,\n    'forEach': forEach,\n    'injector': createInjector,\n    'noop': noop,\n    'bind': bind,\n    'toJson': toJson,\n    'fromJson': fromJson,\n    'identity': identity,\n    'isUndefined': isUndefined,\n    'isDefined': isDefined,\n    'isString': isString,\n    'isFunction': isFunction,\n    'isObject': isObject,\n    'isNumber': isNumber,\n    'isElement': isElement,\n    'isArray': isArray,\n    'version': version,\n    'isDate': isDate,\n    'lowercase': lowercase,\n    'uppercase': uppercase,\n    'callbacks': {counter: 0},\n    'getTestability': getTestability,\n    '$$minErr': minErr,\n    '$$csp': csp,\n    'reloadWithDebugInfo': reloadWithDebugInfo\n  });\n\n  angularModule = setupModuleLoader(window);\n\n  angularModule('ng', ['ngLocale'], ['$provide',\n    function ngModule($provide) {\n      // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.\n      $provide.provider({\n        $$sanitizeUri: $$SanitizeUriProvider\n      });\n      $provide.provider('$compile', $CompileProvider).\n        directive({\n            a: htmlAnchorDirective,\n            input: inputDirective,\n            textarea: inputDirective,\n            form: formDirective,\n            script: scriptDirective,\n            select: selectDirective,\n            style: styleDirective,\n            option: optionDirective,\n            ngBind: ngBindDirective,\n            ngBindHtml: ngBindHtmlDirective,\n            ngBindTemplate: ngBindTemplateDirective,\n            ngClass: ngClassDirective,\n            ngClassEven: ngClassEvenDirective,\n            ngClassOdd: ngClassOddDirective,\n            ngCloak: ngCloakDirective,\n            ngController: ngControllerDirective,\n            ngForm: ngFormDirective,\n            ngHide: ngHideDirective,\n            ngIf: ngIfDirective,\n            ngInclude: ngIncludeDirective,\n            ngInit: ngInitDirective,\n            ngNonBindable: ngNonBindableDirective,\n            ngPluralize: ngPluralizeDirective,\n            ngRepeat: ngRepeatDirective,\n            ngShow: ngShowDirective,\n            ngStyle: ngStyleDirective,\n            ngSwitch: ngSwitchDirective,\n            ngSwitchWhen: ngSwitchWhenDirective,\n            ngSwitchDefault: ngSwitchDefaultDirective,\n            ngOptions: ngOptionsDirective,\n            ngTransclude: ngTranscludeDirective,\n            ngModel: ngModelDirective,\n            ngList: ngListDirective,\n            ngChange: ngChangeDirective,\n            pattern: patternDirective,\n            ngPattern: patternDirective,\n            required: requiredDirective,\n            ngRequired: requiredDirective,\n            minlength: minlengthDirective,\n            ngMinlength: minlengthDirective,\n            maxlength: maxlengthDirective,\n            ngMaxlength: maxlengthDirective,\n            ngValue: ngValueDirective,\n            ngModelOptions: ngModelOptionsDirective\n        }).\n        directive({\n          ngInclude: ngIncludeFillContentDirective\n        }).\n        directive(ngAttributeAliasDirectives).\n        directive(ngEventDirectives);\n      $provide.provider({\n        $anchorScroll: $AnchorScrollProvider,\n        $animate: $AnimateProvider,\n        $animateCss: $CoreAnimateCssProvider,\n        $$animateJs: $$CoreAnimateJsProvider,\n        $$animateQueue: $$CoreAnimateQueueProvider,\n        $$AnimateRunner: $$AnimateRunnerFactoryProvider,\n        $$animateAsyncRun: $$AnimateAsyncRunFactoryProvider,\n        $browser: $BrowserProvider,\n        $cacheFactory: $CacheFactoryProvider,\n        $controller: $ControllerProvider,\n        $document: $DocumentProvider,\n        $exceptionHandler: $ExceptionHandlerProvider,\n        $filter: $FilterProvider,\n        $$forceReflow: $$ForceReflowProvider,\n        $interpolate: $InterpolateProvider,\n        $interval: $IntervalProvider,\n        $http: $HttpProvider,\n        $httpParamSerializer: $HttpParamSerializerProvider,\n        $httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider,\n        $httpBackend: $HttpBackendProvider,\n        $xhrFactory: $xhrFactoryProvider,\n        $location: $LocationProvider,\n        $log: $LogProvider,\n        $parse: $ParseProvider,\n        $rootScope: $RootScopeProvider,\n        $q: $QProvider,\n        $$q: $$QProvider,\n        $sce: $SceProvider,\n        $sceDelegate: $SceDelegateProvider,\n        $sniffer: $SnifferProvider,\n        $templateCache: $TemplateCacheProvider,\n        $templateRequest: $TemplateRequestProvider,\n        $$testability: $$TestabilityProvider,\n        $timeout: $TimeoutProvider,\n        $window: $WindowProvider,\n        $$rAF: $$RAFProvider,\n        $$jqLite: $$jqLiteProvider,\n        $$HashMap: $$HashMapProvider,\n        $$cookieReader: $$CookieReaderProvider\n      });\n    }\n  ]);\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n *     Any commits to this file should be reviewed with security in mind.  *\n *   Changes to this file can potentially create security vulnerabilities. *\n *          An approval from 2 Core members with history of modifying      *\n *                         this file is required.                          *\n *                                                                         *\n *  Does the change somehow allow for arbitrary javascript to be executed? *\n *    Or allows for someone to change the prototype of built-in objects?   *\n *     Or gives undesired access to variables likes document or window?    *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\n/* global JQLitePrototype: true,\n  addEventListenerFn: true,\n  removeEventListenerFn: true,\n  BOOLEAN_ATTR: true,\n  ALIASED_ATTR: true,\n*/\n\n//////////////////////////////////\n//JQLite\n//////////////////////////////////\n\n/**\n * @ngdoc function\n * @name angular.element\n * @module ng\n * @kind function\n *\n * @description\n * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.\n *\n * If jQuery is available, `angular.element` is an alias for the\n * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`\n * delegates to Angular's built-in subset of jQuery, called \"jQuery lite\" or **jqLite**.\n *\n * jqLite is a tiny, API-compatible subset of jQuery that allows\n * Angular to manipulate the DOM in a cross-browser compatible way. jqLite implements only the most\n * commonly needed functionality with the goal of having a very small footprint.\n *\n * To use `jQuery`, simply ensure it is loaded before the `angular.js` file. You can also use the\n * {@link ngJq `ngJq`} directive to specify that jqlite should be used over jQuery, or to use a\n * specific version of jQuery if multiple versions exist on the page.\n *\n * <div class=\"alert alert-info\">**Note:** All element references in Angular are always wrapped with jQuery or\n * jqLite (such as the element argument in a directive's compile / link function). They are never raw DOM references.</div>\n *\n * <div class=\"alert alert-warning\">**Note:** Keep in mind that this function will not find elements\n * by tag name / CSS selector. For lookups by tag name, try instead `angular.element(document).find(...)`\n * or `$document.find()`, or use the standard DOM APIs, e.g. `document.querySelectorAll()`.</div>\n *\n * ## Angular's jqLite\n * jqLite provides only the following jQuery methods:\n *\n * - [`addClass()`](http://api.jquery.com/addClass/)\n * - [`after()`](http://api.jquery.com/after/)\n * - [`append()`](http://api.jquery.com/append/)\n * - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters\n * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData\n * - [`children()`](http://api.jquery.com/children/) - Does not support selectors\n * - [`clone()`](http://api.jquery.com/clone/)\n * - [`contents()`](http://api.jquery.com/contents/)\n * - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`.\n *   As a setter, does not convert numbers to strings or append 'px', and also does not have automatic property prefixing.\n * - [`data()`](http://api.jquery.com/data/)\n * - [`detach()`](http://api.jquery.com/detach/)\n * - [`empty()`](http://api.jquery.com/empty/)\n * - [`eq()`](http://api.jquery.com/eq/)\n * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name\n * - [`hasClass()`](http://api.jquery.com/hasClass/)\n * - [`html()`](http://api.jquery.com/html/)\n * - [`next()`](http://api.jquery.com/next/) - Does not support selectors\n * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData\n * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces, selectors or event object as parameter\n * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors\n * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors\n * - [`prepend()`](http://api.jquery.com/prepend/)\n * - [`prop()`](http://api.jquery.com/prop/)\n * - [`ready()`](http://api.jquery.com/ready/)\n * - [`remove()`](http://api.jquery.com/remove/)\n * - [`removeAttr()`](http://api.jquery.com/removeAttr/)\n * - [`removeClass()`](http://api.jquery.com/removeClass/)\n * - [`removeData()`](http://api.jquery.com/removeData/)\n * - [`replaceWith()`](http://api.jquery.com/replaceWith/)\n * - [`text()`](http://api.jquery.com/text/)\n * - [`toggleClass()`](http://api.jquery.com/toggleClass/)\n * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.\n * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces or event object as parameter\n * - [`val()`](http://api.jquery.com/val/)\n * - [`wrap()`](http://api.jquery.com/wrap/)\n *\n * ## jQuery/jqLite Extras\n * Angular also provides the following additional methods and events to both jQuery and jqLite:\n *\n * ### Events\n * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event\n *    on all DOM nodes being removed.  This can be used to clean up any 3rd party bindings to the DOM\n *    element before it is removed.\n *\n * ### Methods\n * - `controller(name)` - retrieves the controller of the current element or its parent. By default\n *   retrieves controller associated with the `ngController` directive. If `name` is provided as\n *   camelCase directive name, then the controller for this directive will be retrieved (e.g.\n *   `'ngModel'`).\n * - `injector()` - retrieves the injector of the current element or its parent.\n * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current\n *   element or its parent. Requires {@link guide/production#disabling-debug-data Debug Data} to\n *   be enabled.\n * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the\n *   current element. This getter should be used only on elements that contain a directive which starts a new isolate\n *   scope. Calling `scope()` on this element always returns the original non-isolate scope.\n *   Requires {@link guide/production#disabling-debug-data Debug Data} to be enabled.\n * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top\n *   parent element is reached.\n *\n * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.\n * @returns {Object} jQuery object.\n */\n\nJQLite.expando = 'ng339';\n\nvar jqCache = JQLite.cache = {},\n    jqId = 1,\n    addEventListenerFn = function(element, type, fn) {\n      element.addEventListener(type, fn, false);\n    },\n    removeEventListenerFn = function(element, type, fn) {\n      element.removeEventListener(type, fn, false);\n    };\n\n/*\n * !!! This is an undocumented \"private\" function !!!\n */\nJQLite._data = function(node) {\n  //jQuery always returns an object on cache miss\n  return this.cache[node[this.expando]] || {};\n};\n\nfunction jqNextId() { return ++jqId; }\n\n\nvar SPECIAL_CHARS_REGEXP = /([\\:\\-\\_]+(.))/g;\nvar MOZ_HACK_REGEXP = /^moz([A-Z])/;\nvar MOUSE_EVENT_MAP= { mouseleave: \"mouseout\", mouseenter: \"mouseover\"};\nvar jqLiteMinErr = minErr('jqLite');\n\n/**\n * Converts snake_case to camelCase.\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction camelCase(name) {\n  return name.\n    replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {\n      return offset ? letter.toUpperCase() : letter;\n    }).\n    replace(MOZ_HACK_REGEXP, 'Moz$1');\n}\n\nvar SINGLE_TAG_REGEXP = /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/;\nvar HTML_REGEXP = /<|&#?\\w+;/;\nvar TAG_NAME_REGEXP = /<([\\w:-]+)/;\nvar XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi;\n\nvar wrapMap = {\n  'option': [1, '<select multiple=\"multiple\">', '</select>'],\n\n  'thead': [1, '<table>', '</table>'],\n  'col': [2, '<table><colgroup>', '</colgroup></table>'],\n  'tr': [2, '<table><tbody>', '</tbody></table>'],\n  'td': [3, '<table><tbody><tr>', '</tr></tbody></table>'],\n  '_default': [0, \"\", \"\"]\n};\n\nwrapMap.optgroup = wrapMap.option;\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction jqLiteIsTextNode(html) {\n  return !HTML_REGEXP.test(html);\n}\n\nfunction jqLiteAcceptsData(node) {\n  // The window object can accept data but has no nodeType\n  // Otherwise we are only interested in elements (1) and documents (9)\n  var nodeType = node.nodeType;\n  return nodeType === NODE_TYPE_ELEMENT || !nodeType || nodeType === NODE_TYPE_DOCUMENT;\n}\n\nfunction jqLiteHasData(node) {\n  for (var key in jqCache[node.ng339]) {\n    return true;\n  }\n  return false;\n}\n\nfunction jqLiteCleanData(nodes) {\n  for (var i = 0, ii = nodes.length; i < ii; i++) {\n    jqLiteRemoveData(nodes[i]);\n  }\n}\n\nfunction jqLiteBuildFragment(html, context) {\n  var tmp, tag, wrap,\n      fragment = context.createDocumentFragment(),\n      nodes = [], i;\n\n  if (jqLiteIsTextNode(html)) {\n    // Convert non-html into a text node\n    nodes.push(context.createTextNode(html));\n  } else {\n    // Convert html into DOM nodes\n    tmp = tmp || fragment.appendChild(context.createElement(\"div\"));\n    tag = (TAG_NAME_REGEXP.exec(html) || [\"\", \"\"])[1].toLowerCase();\n    wrap = wrapMap[tag] || wrapMap._default;\n    tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, \"<$1></$2>\") + wrap[2];\n\n    // Descend through wrappers to the right content\n    i = wrap[0];\n    while (i--) {\n      tmp = tmp.lastChild;\n    }\n\n    nodes = concat(nodes, tmp.childNodes);\n\n    tmp = fragment.firstChild;\n    tmp.textContent = \"\";\n  }\n\n  // Remove wrapper from fragment\n  fragment.textContent = \"\";\n  fragment.innerHTML = \"\"; // Clear inner HTML\n  forEach(nodes, function(node) {\n    fragment.appendChild(node);\n  });\n\n  return fragment;\n}\n\nfunction jqLiteParseHTML(html, context) {\n  context = context || document;\n  var parsed;\n\n  if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {\n    return [context.createElement(parsed[1])];\n  }\n\n  if ((parsed = jqLiteBuildFragment(html, context))) {\n    return parsed.childNodes;\n  }\n\n  return [];\n}\n\nfunction jqLiteWrapNode(node, wrapper) {\n  var parent = node.parentNode;\n\n  if (parent) {\n    parent.replaceChild(wrapper, node);\n  }\n\n  wrapper.appendChild(node);\n}\n\n\n// IE9-11 has no method \"contains\" in SVG element and in Node.prototype. Bug #10259.\nvar jqLiteContains = Node.prototype.contains || function(arg) {\n  // jshint bitwise: false\n  return !!(this.compareDocumentPosition(arg) & 16);\n  // jshint bitwise: true\n};\n\n/////////////////////////////////////////////\nfunction JQLite(element) {\n  if (element instanceof JQLite) {\n    return element;\n  }\n\n  var argIsString;\n\n  if (isString(element)) {\n    element = trim(element);\n    argIsString = true;\n  }\n  if (!(this instanceof JQLite)) {\n    if (argIsString && element.charAt(0) != '<') {\n      throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');\n    }\n    return new JQLite(element);\n  }\n\n  if (argIsString) {\n    jqLiteAddNodes(this, jqLiteParseHTML(element));\n  } else {\n    jqLiteAddNodes(this, element);\n  }\n}\n\nfunction jqLiteClone(element) {\n  return element.cloneNode(true);\n}\n\nfunction jqLiteDealoc(element, onlyDescendants) {\n  if (!onlyDescendants) jqLiteRemoveData(element);\n\n  if (element.querySelectorAll) {\n    var descendants = element.querySelectorAll('*');\n    for (var i = 0, l = descendants.length; i < l; i++) {\n      jqLiteRemoveData(descendants[i]);\n    }\n  }\n}\n\nfunction jqLiteOff(element, type, fn, unsupported) {\n  if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');\n\n  var expandoStore = jqLiteExpandoStore(element);\n  var events = expandoStore && expandoStore.events;\n  var handle = expandoStore && expandoStore.handle;\n\n  if (!handle) return; //no listeners registered\n\n  if (!type) {\n    for (type in events) {\n      if (type !== '$destroy') {\n        removeEventListenerFn(element, type, handle);\n      }\n      delete events[type];\n    }\n  } else {\n\n    var removeHandler = function(type) {\n      var listenerFns = events[type];\n      if (isDefined(fn)) {\n        arrayRemove(listenerFns || [], fn);\n      }\n      if (!(isDefined(fn) && listenerFns && listenerFns.length > 0)) {\n        removeEventListenerFn(element, type, handle);\n        delete events[type];\n      }\n    };\n\n    forEach(type.split(' '), function(type) {\n      removeHandler(type);\n      if (MOUSE_EVENT_MAP[type]) {\n        removeHandler(MOUSE_EVENT_MAP[type]);\n      }\n    });\n  }\n}\n\nfunction jqLiteRemoveData(element, name) {\n  var expandoId = element.ng339;\n  var expandoStore = expandoId && jqCache[expandoId];\n\n  if (expandoStore) {\n    if (name) {\n      delete expandoStore.data[name];\n      return;\n    }\n\n    if (expandoStore.handle) {\n      if (expandoStore.events.$destroy) {\n        expandoStore.handle({}, '$destroy');\n      }\n      jqLiteOff(element);\n    }\n    delete jqCache[expandoId];\n    element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it\n  }\n}\n\n\nfunction jqLiteExpandoStore(element, createIfNecessary) {\n  var expandoId = element.ng339,\n      expandoStore = expandoId && jqCache[expandoId];\n\n  if (createIfNecessary && !expandoStore) {\n    element.ng339 = expandoId = jqNextId();\n    expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined};\n  }\n\n  return expandoStore;\n}\n\n\nfunction jqLiteData(element, key, value) {\n  if (jqLiteAcceptsData(element)) {\n\n    var isSimpleSetter = isDefined(value);\n    var isSimpleGetter = !isSimpleSetter && key && !isObject(key);\n    var massGetter = !key;\n    var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter);\n    var data = expandoStore && expandoStore.data;\n\n    if (isSimpleSetter) { // data('key', value)\n      data[key] = value;\n    } else {\n      if (massGetter) {  // data()\n        return data;\n      } else {\n        if (isSimpleGetter) { // data('key')\n          // don't force creation of expandoStore if it doesn't exist yet\n          return data && data[key];\n        } else { // mass-setter: data({key1: val1, key2: val2})\n          extend(data, key);\n        }\n      }\n    }\n  }\n}\n\nfunction jqLiteHasClass(element, selector) {\n  if (!element.getAttribute) return false;\n  return ((\" \" + (element.getAttribute('class') || '') + \" \").replace(/[\\n\\t]/g, \" \").\n      indexOf(\" \" + selector + \" \") > -1);\n}\n\nfunction jqLiteRemoveClass(element, cssClasses) {\n  if (cssClasses && element.setAttribute) {\n    forEach(cssClasses.split(' '), function(cssClass) {\n      element.setAttribute('class', trim(\n          (\" \" + (element.getAttribute('class') || '') + \" \")\n          .replace(/[\\n\\t]/g, \" \")\n          .replace(\" \" + trim(cssClass) + \" \", \" \"))\n      );\n    });\n  }\n}\n\nfunction jqLiteAddClass(element, cssClasses) {\n  if (cssClasses && element.setAttribute) {\n    var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')\n                            .replace(/[\\n\\t]/g, \" \");\n\n    forEach(cssClasses.split(' '), function(cssClass) {\n      cssClass = trim(cssClass);\n      if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {\n        existingClasses += cssClass + ' ';\n      }\n    });\n\n    element.setAttribute('class', trim(existingClasses));\n  }\n}\n\n\nfunction jqLiteAddNodes(root, elements) {\n  // THIS CODE IS VERY HOT. Don't make changes without benchmarking.\n\n  if (elements) {\n\n    // if a Node (the most common case)\n    if (elements.nodeType) {\n      root[root.length++] = elements;\n    } else {\n      var length = elements.length;\n\n      // if an Array or NodeList and not a Window\n      if (typeof length === 'number' && elements.window !== elements) {\n        if (length) {\n          for (var i = 0; i < length; i++) {\n            root[root.length++] = elements[i];\n          }\n        }\n      } else {\n        root[root.length++] = elements;\n      }\n    }\n  }\n}\n\n\nfunction jqLiteController(element, name) {\n  return jqLiteInheritedData(element, '$' + (name || 'ngController') + 'Controller');\n}\n\nfunction jqLiteInheritedData(element, name, value) {\n  // if element is the document object work with the html element instead\n  // this makes $(document).scope() possible\n  if (element.nodeType == NODE_TYPE_DOCUMENT) {\n    element = element.documentElement;\n  }\n  var names = isArray(name) ? name : [name];\n\n  while (element) {\n    for (var i = 0, ii = names.length; i < ii; i++) {\n      if (isDefined(value = jqLite.data(element, names[i]))) return value;\n    }\n\n    // If dealing with a document fragment node with a host element, and no parent, use the host\n    // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM\n    // to lookup parent controllers.\n    element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host);\n  }\n}\n\nfunction jqLiteEmpty(element) {\n  jqLiteDealoc(element, true);\n  while (element.firstChild) {\n    element.removeChild(element.firstChild);\n  }\n}\n\nfunction jqLiteRemove(element, keepData) {\n  if (!keepData) jqLiteDealoc(element);\n  var parent = element.parentNode;\n  if (parent) parent.removeChild(element);\n}\n\n\nfunction jqLiteDocumentLoaded(action, win) {\n  win = win || window;\n  if (win.document.readyState === 'complete') {\n    // Force the action to be run async for consistent behavior\n    // from the action's point of view\n    // i.e. it will definitely not be in a $apply\n    win.setTimeout(action);\n  } else {\n    // No need to unbind this handler as load is only ever called once\n    jqLite(win).on('load', action);\n  }\n}\n\n//////////////////////////////////////////\n// Functions which are declared directly.\n//////////////////////////////////////////\nvar JQLitePrototype = JQLite.prototype = {\n  ready: function(fn) {\n    var fired = false;\n\n    function trigger() {\n      if (fired) return;\n      fired = true;\n      fn();\n    }\n\n    // check if document is already loaded\n    if (document.readyState === 'complete') {\n      setTimeout(trigger);\n    } else {\n      this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9\n      // we can not use jqLite since we are not done loading and jQuery could be loaded later.\n      // jshint -W064\n      JQLite(window).on('load', trigger); // fallback to window.onload for others\n      // jshint +W064\n    }\n  },\n  toString: function() {\n    var value = [];\n    forEach(this, function(e) { value.push('' + e);});\n    return '[' + value.join(', ') + ']';\n  },\n\n  eq: function(index) {\n      return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);\n  },\n\n  length: 0,\n  push: push,\n  sort: [].sort,\n  splice: [].splice\n};\n\n//////////////////////////////////////////\n// Functions iterating getter/setters.\n// these functions return self on setter and\n// value on get.\n//////////////////////////////////////////\nvar BOOLEAN_ATTR = {};\nforEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {\n  BOOLEAN_ATTR[lowercase(value)] = value;\n});\nvar BOOLEAN_ELEMENTS = {};\nforEach('input,select,option,textarea,button,form,details'.split(','), function(value) {\n  BOOLEAN_ELEMENTS[value] = true;\n});\nvar ALIASED_ATTR = {\n  'ngMinlength': 'minlength',\n  'ngMaxlength': 'maxlength',\n  'ngMin': 'min',\n  'ngMax': 'max',\n  'ngPattern': 'pattern'\n};\n\nfunction getBooleanAttrName(element, name) {\n  // check dom last since we will most likely fail on name\n  var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];\n\n  // booleanAttr is here twice to minimize DOM access\n  return booleanAttr && BOOLEAN_ELEMENTS[nodeName_(element)] && booleanAttr;\n}\n\nfunction getAliasedAttrName(name) {\n  return ALIASED_ATTR[name];\n}\n\nforEach({\n  data: jqLiteData,\n  removeData: jqLiteRemoveData,\n  hasData: jqLiteHasData,\n  cleanData: jqLiteCleanData\n}, function(fn, name) {\n  JQLite[name] = fn;\n});\n\nforEach({\n  data: jqLiteData,\n  inheritedData: jqLiteInheritedData,\n\n  scope: function(element) {\n    // Can't use jqLiteData here directly so we stay compatible with jQuery!\n    return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);\n  },\n\n  isolateScope: function(element) {\n    // Can't use jqLiteData here directly so we stay compatible with jQuery!\n    return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');\n  },\n\n  controller: jqLiteController,\n\n  injector: function(element) {\n    return jqLiteInheritedData(element, '$injector');\n  },\n\n  removeAttr: function(element, name) {\n    element.removeAttribute(name);\n  },\n\n  hasClass: jqLiteHasClass,\n\n  css: function(element, name, value) {\n    name = camelCase(name);\n\n    if (isDefined(value)) {\n      element.style[name] = value;\n    } else {\n      return element.style[name];\n    }\n  },\n\n  attr: function(element, name, value) {\n    var nodeType = element.nodeType;\n    if (nodeType === NODE_TYPE_TEXT || nodeType === NODE_TYPE_ATTRIBUTE || nodeType === NODE_TYPE_COMMENT) {\n      return;\n    }\n    var lowercasedName = lowercase(name);\n    if (BOOLEAN_ATTR[lowercasedName]) {\n      if (isDefined(value)) {\n        if (!!value) {\n          element[name] = true;\n          element.setAttribute(name, lowercasedName);\n        } else {\n          element[name] = false;\n          element.removeAttribute(lowercasedName);\n        }\n      } else {\n        return (element[name] ||\n                 (element.attributes.getNamedItem(name) || noop).specified)\n               ? lowercasedName\n               : undefined;\n      }\n    } else if (isDefined(value)) {\n      element.setAttribute(name, value);\n    } else if (element.getAttribute) {\n      // the extra argument \"2\" is to get the right thing for a.href in IE, see jQuery code\n      // some elements (e.g. Document) don't have get attribute, so return undefined\n      var ret = element.getAttribute(name, 2);\n      // normalize non-existing attributes to undefined (as jQuery)\n      return ret === null ? undefined : ret;\n    }\n  },\n\n  prop: function(element, name, value) {\n    if (isDefined(value)) {\n      element[name] = value;\n    } else {\n      return element[name];\n    }\n  },\n\n  text: (function() {\n    getText.$dv = '';\n    return getText;\n\n    function getText(element, value) {\n      if (isUndefined(value)) {\n        var nodeType = element.nodeType;\n        return (nodeType === NODE_TYPE_ELEMENT || nodeType === NODE_TYPE_TEXT) ? element.textContent : '';\n      }\n      element.textContent = value;\n    }\n  })(),\n\n  val: function(element, value) {\n    if (isUndefined(value)) {\n      if (element.multiple && nodeName_(element) === 'select') {\n        var result = [];\n        forEach(element.options, function(option) {\n          if (option.selected) {\n            result.push(option.value || option.text);\n          }\n        });\n        return result.length === 0 ? null : result;\n      }\n      return element.value;\n    }\n    element.value = value;\n  },\n\n  html: function(element, value) {\n    if (isUndefined(value)) {\n      return element.innerHTML;\n    }\n    jqLiteDealoc(element, true);\n    element.innerHTML = value;\n  },\n\n  empty: jqLiteEmpty\n}, function(fn, name) {\n  /**\n   * Properties: writes return selection, reads return first value\n   */\n  JQLite.prototype[name] = function(arg1, arg2) {\n    var i, key;\n    var nodeCount = this.length;\n\n    // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it\n    // in a way that survives minification.\n    // jqLiteEmpty takes no arguments but is a setter.\n    if (fn !== jqLiteEmpty &&\n        (isUndefined((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2))) {\n      if (isObject(arg1)) {\n\n        // we are a write, but the object properties are the key/values\n        for (i = 0; i < nodeCount; i++) {\n          if (fn === jqLiteData) {\n            // data() takes the whole object in jQuery\n            fn(this[i], arg1);\n          } else {\n            for (key in arg1) {\n              fn(this[i], key, arg1[key]);\n            }\n          }\n        }\n        // return self for chaining\n        return this;\n      } else {\n        // we are a read, so read the first child.\n        // TODO: do we still need this?\n        var value = fn.$dv;\n        // Only if we have $dv do we iterate over all, otherwise it is just the first element.\n        var jj = (isUndefined(value)) ? Math.min(nodeCount, 1) : nodeCount;\n        for (var j = 0; j < jj; j++) {\n          var nodeValue = fn(this[j], arg1, arg2);\n          value = value ? value + nodeValue : nodeValue;\n        }\n        return value;\n      }\n    } else {\n      // we are a write, so apply to all children\n      for (i = 0; i < nodeCount; i++) {\n        fn(this[i], arg1, arg2);\n      }\n      // return self for chaining\n      return this;\n    }\n  };\n});\n\nfunction createEventHandler(element, events) {\n  var eventHandler = function(event, type) {\n    // jQuery specific api\n    event.isDefaultPrevented = function() {\n      return event.defaultPrevented;\n    };\n\n    var eventFns = events[type || event.type];\n    var eventFnsLength = eventFns ? eventFns.length : 0;\n\n    if (!eventFnsLength) return;\n\n    if (isUndefined(event.immediatePropagationStopped)) {\n      var originalStopImmediatePropagation = event.stopImmediatePropagation;\n      event.stopImmediatePropagation = function() {\n        event.immediatePropagationStopped = true;\n\n        if (event.stopPropagation) {\n          event.stopPropagation();\n        }\n\n        if (originalStopImmediatePropagation) {\n          originalStopImmediatePropagation.call(event);\n        }\n      };\n    }\n\n    event.isImmediatePropagationStopped = function() {\n      return event.immediatePropagationStopped === true;\n    };\n\n    // Some events have special handlers that wrap the real handler\n    var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper;\n\n    // Copy event handlers in case event handlers array is modified during execution.\n    if ((eventFnsLength > 1)) {\n      eventFns = shallowCopy(eventFns);\n    }\n\n    for (var i = 0; i < eventFnsLength; i++) {\n      if (!event.isImmediatePropagationStopped()) {\n        handlerWrapper(element, event, eventFns[i]);\n      }\n    }\n  };\n\n  // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all\n  //       events on `element`\n  eventHandler.elem = element;\n  return eventHandler;\n}\n\nfunction defaultHandlerWrapper(element, event, handler) {\n  handler.call(element, event);\n}\n\nfunction specialMouseHandlerWrapper(target, event, handler) {\n  // Refer to jQuery's implementation of mouseenter & mouseleave\n  // Read about mouseenter and mouseleave:\n  // http://www.quirksmode.org/js/events_mouse.html#link8\n  var related = event.relatedTarget;\n  // For mousenter/leave call the handler if related is outside the target.\n  // NB: No relatedTarget if the mouse left/entered the browser window\n  if (!related || (related !== target && !jqLiteContains.call(target, related))) {\n    handler.call(target, event);\n  }\n}\n\n//////////////////////////////////////////\n// Functions iterating traversal.\n// These functions chain results into a single\n// selector.\n//////////////////////////////////////////\nforEach({\n  removeData: jqLiteRemoveData,\n\n  on: function jqLiteOn(element, type, fn, unsupported) {\n    if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');\n\n    // Do not add event handlers to non-elements because they will not be cleaned up.\n    if (!jqLiteAcceptsData(element)) {\n      return;\n    }\n\n    var expandoStore = jqLiteExpandoStore(element, true);\n    var events = expandoStore.events;\n    var handle = expandoStore.handle;\n\n    if (!handle) {\n      handle = expandoStore.handle = createEventHandler(element, events);\n    }\n\n    // http://jsperf.com/string-indexof-vs-split\n    var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type];\n    var i = types.length;\n\n    var addHandler = function(type, specialHandlerWrapper, noEventListener) {\n      var eventFns = events[type];\n\n      if (!eventFns) {\n        eventFns = events[type] = [];\n        eventFns.specialHandlerWrapper = specialHandlerWrapper;\n        if (type !== '$destroy' && !noEventListener) {\n          addEventListenerFn(element, type, handle);\n        }\n      }\n\n      eventFns.push(fn);\n    };\n\n    while (i--) {\n      type = types[i];\n      if (MOUSE_EVENT_MAP[type]) {\n        addHandler(MOUSE_EVENT_MAP[type], specialMouseHandlerWrapper);\n        addHandler(type, undefined, true);\n      } else {\n        addHandler(type);\n      }\n    }\n  },\n\n  off: jqLiteOff,\n\n  one: function(element, type, fn) {\n    element = jqLite(element);\n\n    //add the listener twice so that when it is called\n    //you can remove the original function and still be\n    //able to call element.off(ev, fn) normally\n    element.on(type, function onFn() {\n      element.off(type, fn);\n      element.off(type, onFn);\n    });\n    element.on(type, fn);\n  },\n\n  replaceWith: function(element, replaceNode) {\n    var index, parent = element.parentNode;\n    jqLiteDealoc(element);\n    forEach(new JQLite(replaceNode), function(node) {\n      if (index) {\n        parent.insertBefore(node, index.nextSibling);\n      } else {\n        parent.replaceChild(node, element);\n      }\n      index = node;\n    });\n  },\n\n  children: function(element) {\n    var children = [];\n    forEach(element.childNodes, function(element) {\n      if (element.nodeType === NODE_TYPE_ELEMENT) {\n        children.push(element);\n      }\n    });\n    return children;\n  },\n\n  contents: function(element) {\n    return element.contentDocument || element.childNodes || [];\n  },\n\n  append: function(element, node) {\n    var nodeType = element.nodeType;\n    if (nodeType !== NODE_TYPE_ELEMENT && nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT) return;\n\n    node = new JQLite(node);\n\n    for (var i = 0, ii = node.length; i < ii; i++) {\n      var child = node[i];\n      element.appendChild(child);\n    }\n  },\n\n  prepend: function(element, node) {\n    if (element.nodeType === NODE_TYPE_ELEMENT) {\n      var index = element.firstChild;\n      forEach(new JQLite(node), function(child) {\n        element.insertBefore(child, index);\n      });\n    }\n  },\n\n  wrap: function(element, wrapNode) {\n    jqLiteWrapNode(element, jqLite(wrapNode).eq(0).clone()[0]);\n  },\n\n  remove: jqLiteRemove,\n\n  detach: function(element) {\n    jqLiteRemove(element, true);\n  },\n\n  after: function(element, newElement) {\n    var index = element, parent = element.parentNode;\n    newElement = new JQLite(newElement);\n\n    for (var i = 0, ii = newElement.length; i < ii; i++) {\n      var node = newElement[i];\n      parent.insertBefore(node, index.nextSibling);\n      index = node;\n    }\n  },\n\n  addClass: jqLiteAddClass,\n  removeClass: jqLiteRemoveClass,\n\n  toggleClass: function(element, selector, condition) {\n    if (selector) {\n      forEach(selector.split(' '), function(className) {\n        var classCondition = condition;\n        if (isUndefined(classCondition)) {\n          classCondition = !jqLiteHasClass(element, className);\n        }\n        (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);\n      });\n    }\n  },\n\n  parent: function(element) {\n    var parent = element.parentNode;\n    return parent && parent.nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT ? parent : null;\n  },\n\n  next: function(element) {\n    return element.nextElementSibling;\n  },\n\n  find: function(element, selector) {\n    if (element.getElementsByTagName) {\n      return element.getElementsByTagName(selector);\n    } else {\n      return [];\n    }\n  },\n\n  clone: jqLiteClone,\n\n  triggerHandler: function(element, event, extraParameters) {\n\n    var dummyEvent, eventFnsCopy, handlerArgs;\n    var eventName = event.type || event;\n    var expandoStore = jqLiteExpandoStore(element);\n    var events = expandoStore && expandoStore.events;\n    var eventFns = events && events[eventName];\n\n    if (eventFns) {\n      // Create a dummy event to pass to the handlers\n      dummyEvent = {\n        preventDefault: function() { this.defaultPrevented = true; },\n        isDefaultPrevented: function() { return this.defaultPrevented === true; },\n        stopImmediatePropagation: function() { this.immediatePropagationStopped = true; },\n        isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; },\n        stopPropagation: noop,\n        type: eventName,\n        target: element\n      };\n\n      // If a custom event was provided then extend our dummy event with it\n      if (event.type) {\n        dummyEvent = extend(dummyEvent, event);\n      }\n\n      // Copy event handlers in case event handlers array is modified during execution.\n      eventFnsCopy = shallowCopy(eventFns);\n      handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent];\n\n      forEach(eventFnsCopy, function(fn) {\n        if (!dummyEvent.isImmediatePropagationStopped()) {\n          fn.apply(element, handlerArgs);\n        }\n      });\n    }\n  }\n}, function(fn, name) {\n  /**\n   * chaining functions\n   */\n  JQLite.prototype[name] = function(arg1, arg2, arg3) {\n    var value;\n\n    for (var i = 0, ii = this.length; i < ii; i++) {\n      if (isUndefined(value)) {\n        value = fn(this[i], arg1, arg2, arg3);\n        if (isDefined(value)) {\n          // any function which returns a value needs to be wrapped\n          value = jqLite(value);\n        }\n      } else {\n        jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));\n      }\n    }\n    return isDefined(value) ? value : this;\n  };\n\n  // bind legacy bind/unbind to on/off\n  JQLite.prototype.bind = JQLite.prototype.on;\n  JQLite.prototype.unbind = JQLite.prototype.off;\n});\n\n\n// Provider for private $$jqLite service\nfunction $$jqLiteProvider() {\n  this.$get = function $$jqLite() {\n    return extend(JQLite, {\n      hasClass: function(node, classes) {\n        if (node.attr) node = node[0];\n        return jqLiteHasClass(node, classes);\n      },\n      addClass: function(node, classes) {\n        if (node.attr) node = node[0];\n        return jqLiteAddClass(node, classes);\n      },\n      removeClass: function(node, classes) {\n        if (node.attr) node = node[0];\n        return jqLiteRemoveClass(node, classes);\n      }\n    });\n  };\n}\n\n/**\n * Computes a hash of an 'obj'.\n * Hash of a:\n *  string is string\n *  number is number as string\n *  object is either result of calling $$hashKey function on the object or uniquely generated id,\n *         that is also assigned to the $$hashKey property of the object.\n *\n * @param obj\n * @returns {string} hash string such that the same input will have the same hash string.\n *         The resulting string key is in 'type:hashKey' format.\n */\nfunction hashKey(obj, nextUidFn) {\n  var key = obj && obj.$$hashKey;\n\n  if (key) {\n    if (typeof key === 'function') {\n      key = obj.$$hashKey();\n    }\n    return key;\n  }\n\n  var objType = typeof obj;\n  if (objType == 'function' || (objType == 'object' && obj !== null)) {\n    key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)();\n  } else {\n    key = objType + ':' + obj;\n  }\n\n  return key;\n}\n\n/**\n * HashMap which can use objects as keys\n */\nfunction HashMap(array, isolatedUid) {\n  if (isolatedUid) {\n    var uid = 0;\n    this.nextUid = function() {\n      return ++uid;\n    };\n  }\n  forEach(array, this.put, this);\n}\nHashMap.prototype = {\n  /**\n   * Store key value pair\n   * @param key key to store can be any type\n   * @param value value to store can be any type\n   */\n  put: function(key, value) {\n    this[hashKey(key, this.nextUid)] = value;\n  },\n\n  /**\n   * @param key\n   * @returns {Object} the value for the key\n   */\n  get: function(key) {\n    return this[hashKey(key, this.nextUid)];\n  },\n\n  /**\n   * Remove the key/value pair\n   * @param key\n   */\n  remove: function(key) {\n    var value = this[key = hashKey(key, this.nextUid)];\n    delete this[key];\n    return value;\n  }\n};\n\nvar $$HashMapProvider = [function() {\n  this.$get = [function() {\n    return HashMap;\n  }];\n}];\n\n/**\n * @ngdoc function\n * @module ng\n * @name angular.injector\n * @kind function\n *\n * @description\n * Creates an injector object that can be used for retrieving services as well as for\n * dependency injection (see {@link guide/di dependency injection}).\n *\n * @param {Array.<string|Function>} modules A list of module functions or their aliases. See\n *     {@link angular.module}. The `ng` module must be explicitly added.\n * @param {boolean=} [strictDi=false] Whether the injector should be in strict mode, which\n *     disallows argument name annotation inference.\n * @returns {injector} Injector object. See {@link auto.$injector $injector}.\n *\n * @example\n * Typical usage\n * ```js\n *   // create an injector\n *   var $injector = angular.injector(['ng']);\n *\n *   // use the injector to kick off your application\n *   // use the type inference to auto inject arguments, or use implicit injection\n *   $injector.invoke(function($rootScope, $compile, $document) {\n *     $compile($document)($rootScope);\n *     $rootScope.$digest();\n *   });\n * ```\n *\n * Sometimes you want to get access to the injector of a currently running Angular app\n * from outside Angular. Perhaps, you want to inject and compile some markup after the\n * application has been bootstrapped. You can do this using the extra `injector()` added\n * to JQuery/jqLite elements. See {@link angular.element}.\n *\n * *This is fairly rare but could be the case if a third party library is injecting the\n * markup.*\n *\n * In the following example a new block of HTML containing a `ng-controller`\n * directive is added to the end of the document body by JQuery. We then compile and link\n * it into the current AngularJS scope.\n *\n * ```js\n * var $div = $('<div ng-controller=\"MyCtrl\">{{content.label}}</div>');\n * $(document.body).append($div);\n *\n * angular.element(document).injector().invoke(function($compile) {\n *   var scope = angular.element($div).scope();\n *   $compile($div)(scope);\n * });\n * ```\n */\n\n\n/**\n * @ngdoc module\n * @name auto\n * @description\n *\n * Implicit module which gets automatically added to each {@link auto.$injector $injector}.\n */\n\nvar ARROW_ARG = /^([^\\(]+?)=>/;\nvar FN_ARGS = /^[^\\(]*\\(\\s*([^\\)]*)\\)/m;\nvar FN_ARG_SPLIT = /,/;\nvar FN_ARG = /^\\s*(_?)(\\S+?)\\1\\s*$/;\nvar STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nvar $injectorMinErr = minErr('$injector');\n\nfunction extractArgs(fn) {\n  var fnText = fn.toString().replace(STRIP_COMMENTS, ''),\n      args = fnText.match(ARROW_ARG) || fnText.match(FN_ARGS);\n  return args;\n}\n\nfunction anonFn(fn) {\n  // For anonymous functions, showing at the very least the function signature can help in\n  // debugging.\n  var args = extractArgs(fn);\n  if (args) {\n    return 'function(' + (args[1] || '').replace(/[\\s\\r\\n]+/, ' ') + ')';\n  }\n  return 'fn';\n}\n\nfunction annotate(fn, strictDi, name) {\n  var $inject,\n      argDecl,\n      last;\n\n  if (typeof fn === 'function') {\n    if (!($inject = fn.$inject)) {\n      $inject = [];\n      if (fn.length) {\n        if (strictDi) {\n          if (!isString(name) || !name) {\n            name = fn.name || anonFn(fn);\n          }\n          throw $injectorMinErr('strictdi',\n            '{0} is not using explicit annotation and cannot be invoked in strict mode', name);\n        }\n        argDecl = extractArgs(fn);\n        forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) {\n          arg.replace(FN_ARG, function(all, underscore, name) {\n            $inject.push(name);\n          });\n        });\n      }\n      fn.$inject = $inject;\n    }\n  } else if (isArray(fn)) {\n    last = fn.length - 1;\n    assertArgFn(fn[last], 'fn');\n    $inject = fn.slice(0, last);\n  } else {\n    assertArgFn(fn, 'fn', true);\n  }\n  return $inject;\n}\n\n///////////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $injector\n *\n * @description\n *\n * `$injector` is used to retrieve object instances as defined by\n * {@link auto.$provide provider}, instantiate types, invoke methods,\n * and load modules.\n *\n * The following always holds true:\n *\n * ```js\n *   var $injector = angular.injector();\n *   expect($injector.get('$injector')).toBe($injector);\n *   expect($injector.invoke(function($injector) {\n *     return $injector;\n *   })).toBe($injector);\n * ```\n *\n * # Injection Function Annotation\n *\n * JavaScript does not have annotations, and annotations are needed for dependency injection. The\n * following are all valid ways of annotating function with injection arguments and are equivalent.\n *\n * ```js\n *   // inferred (only works if code not minified/obfuscated)\n *   $injector.invoke(function(serviceA){});\n *\n *   // annotated\n *   function explicit(serviceA) {};\n *   explicit.$inject = ['serviceA'];\n *   $injector.invoke(explicit);\n *\n *   // inline\n *   $injector.invoke(['serviceA', function(serviceA){}]);\n * ```\n *\n * ## Inference\n *\n * In JavaScript calling `toString()` on a function returns the function definition. The definition\n * can then be parsed and the function arguments can be extracted. This method of discovering\n * annotations is disallowed when the injector is in strict mode.\n * *NOTE:* This does not work with minification, and obfuscation tools since these tools change the\n * argument names.\n *\n * ## `$inject` Annotation\n * By adding an `$inject` property onto a function the injection parameters can be specified.\n *\n * ## Inline\n * As an array of injection names, where the last item in the array is the function to call.\n */\n\n/**\n * @ngdoc method\n * @name $injector#get\n *\n * @description\n * Return an instance of the service.\n *\n * @param {string} name The name of the instance to retrieve.\n * @param {string=} caller An optional string to provide the origin of the function call for error messages.\n * @return {*} The instance.\n */\n\n/**\n * @ngdoc method\n * @name $injector#invoke\n *\n * @description\n * Invoke the method and supply the method arguments from the `$injector`.\n *\n * @param {Function|Array.<string|Function>} fn The injectable function to invoke. Function parameters are\n *   injected according to the {@link guide/di $inject Annotation} rules.\n * @param {Object=} self The `this` for the invoked method.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n *                         object first, before the `$injector` is consulted.\n * @returns {*} the value returned by the invoked `fn` function.\n */\n\n/**\n * @ngdoc method\n * @name $injector#has\n *\n * @description\n * Allows the user to query if the particular service exists.\n *\n * @param {string} name Name of the service to query.\n * @returns {boolean} `true` if injector has given service.\n */\n\n/**\n * @ngdoc method\n * @name $injector#instantiate\n * @description\n * Create a new instance of JS type. The method takes a constructor function, invokes the new\n * operator, and supplies all of the arguments to the constructor function as specified by the\n * constructor annotation.\n *\n * @param {Function} Type Annotated constructor function.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {Object} new instance of `Type`.\n */\n\n/**\n * @ngdoc method\n * @name $injector#annotate\n *\n * @description\n * Returns an array of service names which the function is requesting for injection. This API is\n * used by the injector to determine which services need to be injected into the function when the\n * function is invoked. There are three ways in which the function can be annotated with the needed\n * dependencies.\n *\n * # Argument names\n *\n * The simplest form is to extract the dependencies from the arguments of the function. This is done\n * by converting the function into a string using `toString()` method and extracting the argument\n * names.\n * ```js\n *   // Given\n *   function MyController($scope, $route) {\n *     // ...\n *   }\n *\n *   // Then\n *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * You can disallow this method by using strict injection mode.\n *\n * This method does not work with code minification / obfuscation. For this reason the following\n * annotation strategies are supported.\n *\n * # The `$inject` property\n *\n * If a function has an `$inject` property and its value is an array of strings, then the strings\n * represent names of services to be injected into the function.\n * ```js\n *   // Given\n *   var MyController = function(obfuscatedScope, obfuscatedRoute) {\n *     // ...\n *   }\n *   // Define function dependencies\n *   MyController['$inject'] = ['$scope', '$route'];\n *\n *   // Then\n *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * # The array notation\n *\n * It is often desirable to inline Injected functions and that's when setting the `$inject` property\n * is very inconvenient. In these situations using the array notation to specify the dependencies in\n * a way that survives minification is a better choice:\n *\n * ```js\n *   // We wish to write this (not minification / obfuscation safe)\n *   injector.invoke(function($compile, $rootScope) {\n *     // ...\n *   });\n *\n *   // We are forced to write break inlining\n *   var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {\n *     // ...\n *   };\n *   tmpFn.$inject = ['$compile', '$rootScope'];\n *   injector.invoke(tmpFn);\n *\n *   // To better support inline function the inline annotation is supported\n *   injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {\n *     // ...\n *   }]);\n *\n *   // Therefore\n *   expect(injector.annotate(\n *      ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])\n *    ).toEqual(['$compile', '$rootScope']);\n * ```\n *\n * @param {Function|Array.<string|Function>} fn Function for which dependent service names need to\n * be retrieved as described above.\n *\n * @param {boolean=} [strictDi=false] Disallow argument name annotation inference.\n *\n * @returns {Array.<string>} The names of the services which the function requires.\n */\n\n\n\n\n/**\n * @ngdoc service\n * @name $provide\n *\n * @description\n *\n * The {@link auto.$provide $provide} service has a number of methods for registering components\n * with the {@link auto.$injector $injector}. Many of these functions are also exposed on\n * {@link angular.Module}.\n *\n * An Angular **service** is a singleton object created by a **service factory**.  These **service\n * factories** are functions which, in turn, are created by a **service provider**.\n * The **service providers** are constructor functions. When instantiated they must contain a\n * property called `$get`, which holds the **service factory** function.\n *\n * When you request a service, the {@link auto.$injector $injector} is responsible for finding the\n * correct **service provider**, instantiating it and then calling its `$get` **service factory**\n * function to get the instance of the **service**.\n *\n * Often services have no configuration options and there is no need to add methods to the service\n * provider.  The provider will be no more than a constructor function with a `$get` property. For\n * these cases the {@link auto.$provide $provide} service has additional helper methods to register\n * services without specifying a provider.\n *\n * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the\n *     {@link auto.$injector $injector}\n * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by\n *     providers and services.\n * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by\n *     services, not providers.\n * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`,\n *     that will be wrapped in a **service provider** object, whose `$get` property will contain the\n *     given factory function.\n * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class`\n *     that will be wrapped in a **service provider** object, whose `$get` property will instantiate\n *      a new object using the given constructor function.\n *\n * See the individual methods for more information and examples.\n */\n\n/**\n * @ngdoc method\n * @name $provide#provider\n * @description\n *\n * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions\n * are constructor functions, whose instances are responsible for \"providing\" a factory for a\n * service.\n *\n * Service provider names start with the name of the service they provide followed by `Provider`.\n * For example, the {@link ng.$log $log} service has a provider called\n * {@link ng.$logProvider $logProvider}.\n *\n * Service provider objects can have additional methods which allow configuration of the provider\n * and its service. Importantly, you can configure what kind of service is created by the `$get`\n * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a\n * method {@link ng.$logProvider#debugEnabled debugEnabled}\n * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the\n * console or not.\n *\n * @param {string} name The name of the instance. NOTE: the provider will be available under `name +\n                        'Provider'` key.\n * @param {(Object|function())} provider If the provider is:\n *\n *   - `Object`: then it should have a `$get` method. The `$get` method will be invoked using\n *     {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.\n *   - `Constructor`: a new instance of the provider will be created using\n *     {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.\n *\n * @returns {Object} registered provider instance\n\n * @example\n *\n * The following example shows how to create a simple event tracking service and register it using\n * {@link auto.$provide#provider $provide.provider()}.\n *\n * ```js\n *  // Define the eventTracker provider\n *  function EventTrackerProvider() {\n *    var trackingUrl = '/track';\n *\n *    // A provider method for configuring where the tracked events should been saved\n *    this.setTrackingUrl = function(url) {\n *      trackingUrl = url;\n *    };\n *\n *    // The service factory function\n *    this.$get = ['$http', function($http) {\n *      var trackedEvents = {};\n *      return {\n *        // Call this to track an event\n *        event: function(event) {\n *          var count = trackedEvents[event] || 0;\n *          count += 1;\n *          trackedEvents[event] = count;\n *          return count;\n *        },\n *        // Call this to save the tracked events to the trackingUrl\n *        save: function() {\n *          $http.post(trackingUrl, trackedEvents);\n *        }\n *      };\n *    }];\n *  }\n *\n *  describe('eventTracker', function() {\n *    var postSpy;\n *\n *    beforeEach(module(function($provide) {\n *      // Register the eventTracker provider\n *      $provide.provider('eventTracker', EventTrackerProvider);\n *    }));\n *\n *    beforeEach(module(function(eventTrackerProvider) {\n *      // Configure eventTracker provider\n *      eventTrackerProvider.setTrackingUrl('/custom-track');\n *    }));\n *\n *    it('tracks events', inject(function(eventTracker) {\n *      expect(eventTracker.event('login')).toEqual(1);\n *      expect(eventTracker.event('login')).toEqual(2);\n *    }));\n *\n *    it('saves to the tracking url', inject(function(eventTracker, $http) {\n *      postSpy = spyOn($http, 'post');\n *      eventTracker.event('login');\n *      eventTracker.save();\n *      expect(postSpy).toHaveBeenCalled();\n *      expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');\n *      expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');\n *      expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });\n *    }));\n *  });\n * ```\n */\n\n/**\n * @ngdoc method\n * @name $provide#factory\n * @description\n *\n * Register a **service factory**, which will be called to return the service instance.\n * This is short for registering a service where its provider consists of only a `$get` property,\n * which is the given service factory function.\n * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to\n * configure your service in a provider.\n *\n * @param {string} name The name of the instance.\n * @param {Function|Array.<string|Function>} $getFn The injectable $getFn for the instance creation.\n *                      Internally this is a short hand for `$provide.provider(name, {$get: $getFn})`.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service\n * ```js\n *   $provide.factory('ping', ['$http', function($http) {\n *     return function ping() {\n *       return $http.send('/ping');\n *     };\n *   }]);\n * ```\n * You would then inject and use this service like this:\n * ```js\n *   someModule.controller('Ctrl', ['ping', function(ping) {\n *     ping();\n *   }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#service\n * @description\n *\n * Register a **service constructor**, which will be invoked with `new` to create the service\n * instance.\n * This is short for registering a service where its provider's `$get` property is a factory\n * function that returns an instance instantiated by the injector from the service constructor\n * function.\n *\n * Internally it looks a bit like this:\n *\n * ```\n * {\n *   $get: function() {\n *     return $injector.instantiate(constructor);\n *   }\n * }\n * ```\n *\n *\n * You should use {@link auto.$provide#service $provide.service(class)} if you define your service\n * as a type/class.\n *\n * @param {string} name The name of the instance.\n * @param {Function|Array.<string|Function>} constructor An injectable class (constructor function)\n *     that will be instantiated.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service using\n * {@link auto.$provide#service $provide.service(class)}.\n * ```js\n *   var Ping = function($http) {\n *     this.$http = $http;\n *   };\n *\n *   Ping.$inject = ['$http'];\n *\n *   Ping.prototype.send = function() {\n *     return this.$http.get('/ping');\n *   };\n *   $provide.service('ping', Ping);\n * ```\n * You would then inject and use this service like this:\n * ```js\n *   someModule.controller('Ctrl', ['ping', function(ping) {\n *     ping.send();\n *   }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#value\n * @description\n *\n * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a\n * number, an array, an object or a function. This is short for registering a service where its\n * provider's `$get` property is a factory function that takes no arguments and returns the **value\n * service**. That also means it is not possible to inject other services into a value service.\n *\n * Value services are similar to constant services, except that they cannot be injected into a\n * module configuration function (see {@link angular.Module#config}) but they can be overridden by\n * an Angular {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the instance.\n * @param {*} value The value.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here are some examples of creating value services.\n * ```js\n *   $provide.value('ADMIN_USER', 'admin');\n *\n *   $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });\n *\n *   $provide.value('halfOf', function(value) {\n *     return value / 2;\n *   });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#constant\n * @description\n *\n * Register a **constant service** with the {@link auto.$injector $injector}, such as a string,\n * a number, an array, an object or a function. Like the {@link auto.$provide#value value}, it is not\n * possible to inject other services into a constant.\n *\n * But unlike {@link auto.$provide#value value}, a constant can be\n * injected into a module configuration function (see {@link angular.Module#config}) and it cannot\n * be overridden by an Angular {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the constant.\n * @param {*} value The constant value.\n * @returns {Object} registered instance\n *\n * @example\n * Here a some examples of creating constants:\n * ```js\n *   $provide.constant('SHARD_HEIGHT', 306);\n *\n *   $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);\n *\n *   $provide.constant('double', function(value) {\n *     return value * 2;\n *   });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#decorator\n * @description\n *\n * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator\n * intercepts the creation of a service, allowing it to override or modify the behavior of the\n * service. The object returned by the decorator may be the original service, or a new service\n * object which replaces or wraps and delegates to the original service.\n *\n * @param {string} name The name of the service to decorate.\n * @param {Function|Array.<string|Function>} decorator This function will be invoked when the service needs to be\n *    instantiated and should return the decorated service instance. The function is called using\n *    the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.\n *    Local injection arguments:\n *\n *    * `$delegate` - The original service instance, which can be monkey patched, configured,\n *      decorated or delegated to.\n *\n * @example\n * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting\n * calls to {@link ng.$log#error $log.warn()}.\n * ```js\n *   $provide.decorator('$log', ['$delegate', function($delegate) {\n *     $delegate.warn = $delegate.error;\n *     return $delegate;\n *   }]);\n * ```\n */\n\n\nfunction createInjector(modulesToLoad, strictDi) {\n  strictDi = (strictDi === true);\n  var INSTANTIATING = {},\n      providerSuffix = 'Provider',\n      path = [],\n      loadedModules = new HashMap([], true),\n      providerCache = {\n        $provide: {\n            provider: supportObject(provider),\n            factory: supportObject(factory),\n            service: supportObject(service),\n            value: supportObject(value),\n            constant: supportObject(constant),\n            decorator: decorator\n          }\n      },\n      providerInjector = (providerCache.$injector =\n          createInternalInjector(providerCache, function(serviceName, caller) {\n            if (angular.isString(caller)) {\n              path.push(caller);\n            }\n            throw $injectorMinErr('unpr', \"Unknown provider: {0}\", path.join(' <- '));\n          })),\n      instanceCache = {},\n      protoInstanceInjector =\n          createInternalInjector(instanceCache, function(serviceName, caller) {\n            var provider = providerInjector.get(serviceName + providerSuffix, caller);\n            return instanceInjector.invoke(\n                provider.$get, provider, undefined, serviceName);\n          }),\n      instanceInjector = protoInstanceInjector;\n\n  providerCache['$injector' + providerSuffix] = { $get: valueFn(protoInstanceInjector) };\n  var runBlocks = loadModules(modulesToLoad);\n  instanceInjector = protoInstanceInjector.get('$injector');\n  instanceInjector.strictDi = strictDi;\n  forEach(runBlocks, function(fn) { if (fn) instanceInjector.invoke(fn); });\n\n  return instanceInjector;\n\n  ////////////////////////////////////\n  // $provider\n  ////////////////////////////////////\n\n  function supportObject(delegate) {\n    return function(key, value) {\n      if (isObject(key)) {\n        forEach(key, reverseParams(delegate));\n      } else {\n        return delegate(key, value);\n      }\n    };\n  }\n\n  function provider(name, provider_) {\n    assertNotHasOwnProperty(name, 'service');\n    if (isFunction(provider_) || isArray(provider_)) {\n      provider_ = providerInjector.instantiate(provider_);\n    }\n    if (!provider_.$get) {\n      throw $injectorMinErr('pget', \"Provider '{0}' must define $get factory method.\", name);\n    }\n    return providerCache[name + providerSuffix] = provider_;\n  }\n\n  function enforceReturnValue(name, factory) {\n    return function enforcedReturnValue() {\n      var result = instanceInjector.invoke(factory, this);\n      if (isUndefined(result)) {\n        throw $injectorMinErr('undef', \"Provider '{0}' must return a value from $get factory method.\", name);\n      }\n      return result;\n    };\n  }\n\n  function factory(name, factoryFn, enforce) {\n    return provider(name, {\n      $get: enforce !== false ? enforceReturnValue(name, factoryFn) : factoryFn\n    });\n  }\n\n  function service(name, constructor) {\n    return factory(name, ['$injector', function($injector) {\n      return $injector.instantiate(constructor);\n    }]);\n  }\n\n  function value(name, val) { return factory(name, valueFn(val), false); }\n\n  function constant(name, value) {\n    assertNotHasOwnProperty(name, 'constant');\n    providerCache[name] = value;\n    instanceCache[name] = value;\n  }\n\n  function decorator(serviceName, decorFn) {\n    var origProvider = providerInjector.get(serviceName + providerSuffix),\n        orig$get = origProvider.$get;\n\n    origProvider.$get = function() {\n      var origInstance = instanceInjector.invoke(orig$get, origProvider);\n      return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});\n    };\n  }\n\n  ////////////////////////////////////\n  // Module Loading\n  ////////////////////////////////////\n  function loadModules(modulesToLoad) {\n    assertArg(isUndefined(modulesToLoad) || isArray(modulesToLoad), 'modulesToLoad', 'not an array');\n    var runBlocks = [], moduleFn;\n    forEach(modulesToLoad, function(module) {\n      if (loadedModules.get(module)) return;\n      loadedModules.put(module, true);\n\n      function runInvokeQueue(queue) {\n        var i, ii;\n        for (i = 0, ii = queue.length; i < ii; i++) {\n          var invokeArgs = queue[i],\n              provider = providerInjector.get(invokeArgs[0]);\n\n          provider[invokeArgs[1]].apply(provider, invokeArgs[2]);\n        }\n      }\n\n      try {\n        if (isString(module)) {\n          moduleFn = angularModule(module);\n          runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);\n          runInvokeQueue(moduleFn._invokeQueue);\n          runInvokeQueue(moduleFn._configBlocks);\n        } else if (isFunction(module)) {\n            runBlocks.push(providerInjector.invoke(module));\n        } else if (isArray(module)) {\n            runBlocks.push(providerInjector.invoke(module));\n        } else {\n          assertArgFn(module, 'module');\n        }\n      } catch (e) {\n        if (isArray(module)) {\n          module = module[module.length - 1];\n        }\n        if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {\n          // Safari & FF's stack traces don't contain error.message content\n          // unlike those of Chrome and IE\n          // So if stack doesn't contain message, we create a new string that contains both.\n          // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.\n          /* jshint -W022 */\n          e = e.message + '\\n' + e.stack;\n        }\n        throw $injectorMinErr('modulerr', \"Failed to instantiate module {0} due to:\\n{1}\",\n                  module, e.stack || e.message || e);\n      }\n    });\n    return runBlocks;\n  }\n\n  ////////////////////////////////////\n  // internal Injector\n  ////////////////////////////////////\n\n  function createInternalInjector(cache, factory) {\n\n    function getService(serviceName, caller) {\n      if (cache.hasOwnProperty(serviceName)) {\n        if (cache[serviceName] === INSTANTIATING) {\n          throw $injectorMinErr('cdep', 'Circular dependency found: {0}',\n                    serviceName + ' <- ' + path.join(' <- '));\n        }\n        return cache[serviceName];\n      } else {\n        try {\n          path.unshift(serviceName);\n          cache[serviceName] = INSTANTIATING;\n          return cache[serviceName] = factory(serviceName, caller);\n        } catch (err) {\n          if (cache[serviceName] === INSTANTIATING) {\n            delete cache[serviceName];\n          }\n          throw err;\n        } finally {\n          path.shift();\n        }\n      }\n    }\n\n\n    function injectionArgs(fn, locals, serviceName) {\n      var args = [],\n          $inject = createInjector.$$annotate(fn, strictDi, serviceName);\n\n      for (var i = 0, length = $inject.length; i < length; i++) {\n        var key = $inject[i];\n        if (typeof key !== 'string') {\n          throw $injectorMinErr('itkn',\n                  'Incorrect injection token! Expected service name as string, got {0}', key);\n        }\n        args.push(locals && locals.hasOwnProperty(key) ? locals[key] :\n                                                         getService(key, serviceName));\n      }\n      return args;\n    }\n\n    function isClass(func) {\n      // IE 9-11 do not support classes and IE9 leaks with the code below.\n      if (msie <= 11) {\n        return false;\n      }\n      // Workaround for MS Edge.\n      // Check https://connect.microsoft.com/IE/Feedback/Details/2211653\n      return typeof func === 'function'\n        && /^(?:class\\s|constructor\\()/.test(Function.prototype.toString.call(func));\n    }\n\n    function invoke(fn, self, locals, serviceName) {\n      if (typeof locals === 'string') {\n        serviceName = locals;\n        locals = null;\n      }\n\n      var args = injectionArgs(fn, locals, serviceName);\n      if (isArray(fn)) {\n        fn = fn[fn.length - 1];\n      }\n\n      if (!isClass(fn)) {\n        // http://jsperf.com/angularjs-invoke-apply-vs-switch\n        // #5388\n        return fn.apply(self, args);\n      } else {\n        args.unshift(null);\n        return new (Function.prototype.bind.apply(fn, args))();\n      }\n    }\n\n\n    function instantiate(Type, locals, serviceName) {\n      // Check if Type is annotated and use just the given function at n-1 as parameter\n      // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);\n      var ctor = (isArray(Type) ? Type[Type.length - 1] : Type);\n      var args = injectionArgs(Type, locals, serviceName);\n      // Empty object at position 0 is ignored for invocation with `new`, but required.\n      args.unshift(null);\n      return new (Function.prototype.bind.apply(ctor, args))();\n    }\n\n\n    return {\n      invoke: invoke,\n      instantiate: instantiate,\n      get: getService,\n      annotate: createInjector.$$annotate,\n      has: function(name) {\n        return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);\n      }\n    };\n  }\n}\n\ncreateInjector.$$annotate = annotate;\n\n/**\n * @ngdoc provider\n * @name $anchorScrollProvider\n *\n * @description\n * Use `$anchorScrollProvider` to disable automatic scrolling whenever\n * {@link ng.$location#hash $location.hash()} changes.\n */\nfunction $AnchorScrollProvider() {\n\n  var autoScrollingEnabled = true;\n\n  /**\n   * @ngdoc method\n   * @name $anchorScrollProvider#disableAutoScrolling\n   *\n   * @description\n   * By default, {@link ng.$anchorScroll $anchorScroll()} will automatically detect changes to\n   * {@link ng.$location#hash $location.hash()} and scroll to the element matching the new hash.<br />\n   * Use this method to disable automatic scrolling.\n   *\n   * If automatic scrolling is disabled, one must explicitly call\n   * {@link ng.$anchorScroll $anchorScroll()} in order to scroll to the element related to the\n   * current hash.\n   */\n  this.disableAutoScrolling = function() {\n    autoScrollingEnabled = false;\n  };\n\n  /**\n   * @ngdoc service\n   * @name $anchorScroll\n   * @kind function\n   * @requires $window\n   * @requires $location\n   * @requires $rootScope\n   *\n   * @description\n   * When called, it scrolls to the element related to the specified `hash` or (if omitted) to the\n   * current value of {@link ng.$location#hash $location.hash()}, according to the rules specified\n   * in the\n   * [HTML5 spec](http://www.w3.org/html/wg/drafts/html/master/browsers.html#the-indicated-part-of-the-document).\n   *\n   * It also watches the {@link ng.$location#hash $location.hash()} and automatically scrolls to\n   * match any anchor whenever it changes. This can be disabled by calling\n   * {@link ng.$anchorScrollProvider#disableAutoScrolling $anchorScrollProvider.disableAutoScrolling()}.\n   *\n   * Additionally, you can use its {@link ng.$anchorScroll#yOffset yOffset} property to specify a\n   * vertical scroll-offset (either fixed or dynamic).\n   *\n   * @param {string=} hash The hash specifying the element to scroll to. If omitted, the value of\n   *                       {@link ng.$location#hash $location.hash()} will be used.\n   *\n   * @property {(number|function|jqLite)} yOffset\n   * If set, specifies a vertical scroll-offset. This is often useful when there are fixed\n   * positioned elements at the top of the page, such as navbars, headers etc.\n   *\n   * `yOffset` can be specified in various ways:\n   * - **number**: A fixed number of pixels to be used as offset.<br /><br />\n   * - **function**: A getter function called everytime `$anchorScroll()` is executed. Must return\n   *   a number representing the offset (in pixels).<br /><br />\n   * - **jqLite**: A jqLite/jQuery element to be used for specifying the offset. The distance from\n   *   the top of the page to the element's bottom will be used as offset.<br />\n   *   **Note**: The element will be taken into account only as long as its `position` is set to\n   *   `fixed`. This option is useful, when dealing with responsive navbars/headers that adjust\n   *   their height and/or positioning according to the viewport's size.\n   *\n   * <br />\n   * <div class=\"alert alert-warning\">\n   * In order for `yOffset` to work properly, scrolling should take place on the document's root and\n   * not some child element.\n   * </div>\n   *\n   * @example\n     <example module=\"anchorScrollExample\">\n       <file name=\"index.html\">\n         <div id=\"scrollArea\" ng-controller=\"ScrollController\">\n           <a ng-click=\"gotoBottom()\">Go to bottom</a>\n           <a id=\"bottom\"></a> You're at the bottom!\n         </div>\n       </file>\n       <file name=\"script.js\">\n         angular.module('anchorScrollExample', [])\n           .controller('ScrollController', ['$scope', '$location', '$anchorScroll',\n             function ($scope, $location, $anchorScroll) {\n               $scope.gotoBottom = function() {\n                 // set the location.hash to the id of\n                 // the element you wish to scroll to.\n                 $location.hash('bottom');\n\n                 // call $anchorScroll()\n                 $anchorScroll();\n               };\n             }]);\n       </file>\n       <file name=\"style.css\">\n         #scrollArea {\n           height: 280px;\n           overflow: auto;\n         }\n\n         #bottom {\n           display: block;\n           margin-top: 2000px;\n         }\n       </file>\n     </example>\n   *\n   * <hr />\n   * The example below illustrates the use of a vertical scroll-offset (specified as a fixed value).\n   * See {@link ng.$anchorScroll#yOffset $anchorScroll.yOffset} for more details.\n   *\n   * @example\n     <example module=\"anchorScrollOffsetExample\">\n       <file name=\"index.html\">\n         <div class=\"fixed-header\" ng-controller=\"headerCtrl\">\n           <a href=\"\" ng-click=\"gotoAnchor(x)\" ng-repeat=\"x in [1,2,3,4,5]\">\n             Go to anchor {{x}}\n           </a>\n         </div>\n         <div id=\"anchor{{x}}\" class=\"anchor\" ng-repeat=\"x in [1,2,3,4,5]\">\n           Anchor {{x}} of 5\n         </div>\n       </file>\n       <file name=\"script.js\">\n         angular.module('anchorScrollOffsetExample', [])\n           .run(['$anchorScroll', function($anchorScroll) {\n             $anchorScroll.yOffset = 50;   // always scroll by 50 extra pixels\n           }])\n           .controller('headerCtrl', ['$anchorScroll', '$location', '$scope',\n             function ($anchorScroll, $location, $scope) {\n               $scope.gotoAnchor = function(x) {\n                 var newHash = 'anchor' + x;\n                 if ($location.hash() !== newHash) {\n                   // set the $location.hash to `newHash` and\n                   // $anchorScroll will automatically scroll to it\n                   $location.hash('anchor' + x);\n                 } else {\n                   // call $anchorScroll() explicitly,\n                   // since $location.hash hasn't changed\n                   $anchorScroll();\n                 }\n               };\n             }\n           ]);\n       </file>\n       <file name=\"style.css\">\n         body {\n           padding-top: 50px;\n         }\n\n         .anchor {\n           border: 2px dashed DarkOrchid;\n           padding: 10px 10px 200px 10px;\n         }\n\n         .fixed-header {\n           background-color: rgba(0, 0, 0, 0.2);\n           height: 50px;\n           position: fixed;\n           top: 0; left: 0; right: 0;\n         }\n\n         .fixed-header > a {\n           display: inline-block;\n           margin: 5px 15px;\n         }\n       </file>\n     </example>\n   */\n  this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {\n    var document = $window.document;\n\n    // Helper function to get first anchor from a NodeList\n    // (using `Array#some()` instead of `angular#forEach()` since it's more performant\n    //  and working in all supported browsers.)\n    function getFirstAnchor(list) {\n      var result = null;\n      Array.prototype.some.call(list, function(element) {\n        if (nodeName_(element) === 'a') {\n          result = element;\n          return true;\n        }\n      });\n      return result;\n    }\n\n    function getYOffset() {\n\n      var offset = scroll.yOffset;\n\n      if (isFunction(offset)) {\n        offset = offset();\n      } else if (isElement(offset)) {\n        var elem = offset[0];\n        var style = $window.getComputedStyle(elem);\n        if (style.position !== 'fixed') {\n          offset = 0;\n        } else {\n          offset = elem.getBoundingClientRect().bottom;\n        }\n      } else if (!isNumber(offset)) {\n        offset = 0;\n      }\n\n      return offset;\n    }\n\n    function scrollTo(elem) {\n      if (elem) {\n        elem.scrollIntoView();\n\n        var offset = getYOffset();\n\n        if (offset) {\n          // `offset` is the number of pixels we should scroll UP in order to align `elem` properly.\n          // This is true ONLY if the call to `elem.scrollIntoView()` initially aligns `elem` at the\n          // top of the viewport.\n          //\n          // IF the number of pixels from the top of `elem` to the end of the page's content is less\n          // than the height of the viewport, then `elem.scrollIntoView()` will align the `elem` some\n          // way down the page.\n          //\n          // This is often the case for elements near the bottom of the page.\n          //\n          // In such cases we do not need to scroll the whole `offset` up, just the difference between\n          // the top of the element and the offset, which is enough to align the top of `elem` at the\n          // desired position.\n          var elemTop = elem.getBoundingClientRect().top;\n          $window.scrollBy(0, elemTop - offset);\n        }\n      } else {\n        $window.scrollTo(0, 0);\n      }\n    }\n\n    function scroll(hash) {\n      hash = isString(hash) ? hash : $location.hash();\n      var elm;\n\n      // empty hash, scroll to the top of the page\n      if (!hash) scrollTo(null);\n\n      // element with given id\n      else if ((elm = document.getElementById(hash))) scrollTo(elm);\n\n      // first anchor with given name :-D\n      else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) scrollTo(elm);\n\n      // no element and hash == 'top', scroll to the top of the page\n      else if (hash === 'top') scrollTo(null);\n    }\n\n    // does not scroll when user clicks on anchor link that is currently on\n    // (no url change, no $location.hash() change), browser native does scroll\n    if (autoScrollingEnabled) {\n      $rootScope.$watch(function autoScrollWatch() {return $location.hash();},\n        function autoScrollWatchAction(newVal, oldVal) {\n          // skip the initial scroll if $location.hash is empty\n          if (newVal === oldVal && newVal === '') return;\n\n          jqLiteDocumentLoaded(function() {\n            $rootScope.$evalAsync(scroll);\n          });\n        });\n    }\n\n    return scroll;\n  }];\n}\n\nvar $animateMinErr = minErr('$animate');\nvar ELEMENT_NODE = 1;\nvar NG_ANIMATE_CLASSNAME = 'ng-animate';\n\nfunction mergeClasses(a,b) {\n  if (!a && !b) return '';\n  if (!a) return b;\n  if (!b) return a;\n  if (isArray(a)) a = a.join(' ');\n  if (isArray(b)) b = b.join(' ');\n  return a + ' ' + b;\n}\n\nfunction extractElementNode(element) {\n  for (var i = 0; i < element.length; i++) {\n    var elm = element[i];\n    if (elm.nodeType === ELEMENT_NODE) {\n      return elm;\n    }\n  }\n}\n\nfunction splitClasses(classes) {\n  if (isString(classes)) {\n    classes = classes.split(' ');\n  }\n\n  // Use createMap() to prevent class assumptions involving property names in\n  // Object.prototype\n  var obj = createMap();\n  forEach(classes, function(klass) {\n    // sometimes the split leaves empty string values\n    // incase extra spaces were applied to the options\n    if (klass.length) {\n      obj[klass] = true;\n    }\n  });\n  return obj;\n}\n\n// if any other type of options value besides an Object value is\n// passed into the $animate.method() animation then this helper code\n// will be run which will ignore it. While this patch is not the\n// greatest solution to this, a lot of existing plugins depend on\n// $animate to either call the callback (< 1.2) or return a promise\n// that can be changed. This helper function ensures that the options\n// are wiped clean incase a callback function is provided.\nfunction prepareAnimateOptions(options) {\n  return isObject(options)\n      ? options\n      : {};\n}\n\nvar $$CoreAnimateJsProvider = function() {\n  this.$get = noop;\n};\n\n// this is prefixed with Core since it conflicts with\n// the animateQueueProvider defined in ngAnimate/animateQueue.js\nvar $$CoreAnimateQueueProvider = function() {\n  var postDigestQueue = new HashMap();\n  var postDigestElements = [];\n\n  this.$get = ['$$AnimateRunner', '$rootScope',\n       function($$AnimateRunner,   $rootScope) {\n    return {\n      enabled: noop,\n      on: noop,\n      off: noop,\n      pin: noop,\n\n      push: function(element, event, options, domOperation) {\n        domOperation        && domOperation();\n\n        options = options || {};\n        options.from        && element.css(options.from);\n        options.to          && element.css(options.to);\n\n        if (options.addClass || options.removeClass) {\n          addRemoveClassesPostDigest(element, options.addClass, options.removeClass);\n        }\n\n        var runner = new $$AnimateRunner(); // jshint ignore:line\n\n        // since there are no animations to run the runner needs to be\n        // notified that the animation call is complete.\n        runner.complete();\n        return runner;\n      }\n    };\n\n\n    function updateData(data, classes, value) {\n      var changed = false;\n      if (classes) {\n        classes = isString(classes) ? classes.split(' ') :\n                  isArray(classes) ? classes : [];\n        forEach(classes, function(className) {\n          if (className) {\n            changed = true;\n            data[className] = value;\n          }\n        });\n      }\n      return changed;\n    }\n\n    function handleCSSClassChanges() {\n      forEach(postDigestElements, function(element) {\n        var data = postDigestQueue.get(element);\n        if (data) {\n          var existing = splitClasses(element.attr('class'));\n          var toAdd = '';\n          var toRemove = '';\n          forEach(data, function(status, className) {\n            var hasClass = !!existing[className];\n            if (status !== hasClass) {\n              if (status) {\n                toAdd += (toAdd.length ? ' ' : '') + className;\n              } else {\n                toRemove += (toRemove.length ? ' ' : '') + className;\n              }\n            }\n          });\n\n          forEach(element, function(elm) {\n            toAdd    && jqLiteAddClass(elm, toAdd);\n            toRemove && jqLiteRemoveClass(elm, toRemove);\n          });\n          postDigestQueue.remove(element);\n        }\n      });\n      postDigestElements.length = 0;\n    }\n\n\n    function addRemoveClassesPostDigest(element, add, remove) {\n      var data = postDigestQueue.get(element) || {};\n\n      var classesAdded = updateData(data, add, true);\n      var classesRemoved = updateData(data, remove, false);\n\n      if (classesAdded || classesRemoved) {\n\n        postDigestQueue.put(element, data);\n        postDigestElements.push(element);\n\n        if (postDigestElements.length === 1) {\n          $rootScope.$$postDigest(handleCSSClassChanges);\n        }\n      }\n    }\n  }];\n};\n\n/**\n * @ngdoc provider\n * @name $animateProvider\n *\n * @description\n * Default implementation of $animate that doesn't perform any animations, instead just\n * synchronously performs DOM updates and resolves the returned runner promise.\n *\n * In order to enable animations the `ngAnimate` module has to be loaded.\n *\n * To see the functional implementation check out `src/ngAnimate/animate.js`.\n */\nvar $AnimateProvider = ['$provide', function($provide) {\n  var provider = this;\n\n  this.$$registeredAnimations = Object.create(null);\n\n   /**\n   * @ngdoc method\n   * @name $animateProvider#register\n   *\n   * @description\n   * Registers a new injectable animation factory function. The factory function produces the\n   * animation object which contains callback functions for each event that is expected to be\n   * animated.\n   *\n   *   * `eventFn`: `function(element, ... , doneFunction, options)`\n   *   The element to animate, the `doneFunction` and the options fed into the animation. Depending\n   *   on the type of animation additional arguments will be injected into the animation function. The\n   *   list below explains the function signatures for the different animation methods:\n   *\n   *   - setClass: function(element, addedClasses, removedClasses, doneFunction, options)\n   *   - addClass: function(element, addedClasses, doneFunction, options)\n   *   - removeClass: function(element, removedClasses, doneFunction, options)\n   *   - enter, leave, move: function(element, doneFunction, options)\n   *   - animate: function(element, fromStyles, toStyles, doneFunction, options)\n   *\n   *   Make sure to trigger the `doneFunction` once the animation is fully complete.\n   *\n   * ```js\n   *   return {\n   *     //enter, leave, move signature\n   *     eventFn : function(element, done, options) {\n   *       //code to run the animation\n   *       //once complete, then run done()\n   *       return function endFunction(wasCancelled) {\n   *         //code to cancel the animation\n   *       }\n   *     }\n   *   }\n   * ```\n   *\n   * @param {string} name The name of the animation (this is what the class-based CSS value will be compared to).\n   * @param {Function} factory The factory function that will be executed to return the animation\n   *                           object.\n   */\n  this.register = function(name, factory) {\n    if (name && name.charAt(0) !== '.') {\n      throw $animateMinErr('notcsel', \"Expecting class selector starting with '.' got '{0}'.\", name);\n    }\n\n    var key = name + '-animation';\n    provider.$$registeredAnimations[name.substr(1)] = key;\n    $provide.factory(key, factory);\n  };\n\n  /**\n   * @ngdoc method\n   * @name $animateProvider#classNameFilter\n   *\n   * @description\n   * Sets and/or returns the CSS class regular expression that is checked when performing\n   * an animation. Upon bootstrap the classNameFilter value is not set at all and will\n   * therefore enable $animate to attempt to perform an animation on any element that is triggered.\n   * When setting the `classNameFilter` value, animations will only be performed on elements\n   * that successfully match the filter expression. This in turn can boost performance\n   * for low-powered devices as well as applications containing a lot of structural operations.\n   * @param {RegExp=} expression The className expression which will be checked against all animations\n   * @return {RegExp} The current CSS className expression value. If null then there is no expression value\n   */\n  this.classNameFilter = function(expression) {\n    if (arguments.length === 1) {\n      this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;\n      if (this.$$classNameFilter) {\n        var reservedRegex = new RegExp(\"(\\\\s+|\\\\/)\" + NG_ANIMATE_CLASSNAME + \"(\\\\s+|\\\\/)\");\n        if (reservedRegex.test(this.$$classNameFilter.toString())) {\n          throw $animateMinErr('nongcls','$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the \"{0}\" CSS class.', NG_ANIMATE_CLASSNAME);\n\n        }\n      }\n    }\n    return this.$$classNameFilter;\n  };\n\n  this.$get = ['$$animateQueue', function($$animateQueue) {\n    function domInsert(element, parentElement, afterElement) {\n      // if for some reason the previous element was removed\n      // from the dom sometime before this code runs then let's\n      // just stick to using the parent element as the anchor\n      if (afterElement) {\n        var afterNode = extractElementNode(afterElement);\n        if (afterNode && !afterNode.parentNode && !afterNode.previousElementSibling) {\n          afterElement = null;\n        }\n      }\n      afterElement ? afterElement.after(element) : parentElement.prepend(element);\n    }\n\n    /**\n     * @ngdoc service\n     * @name $animate\n     * @description The $animate service exposes a series of DOM utility methods that provide support\n     * for animation hooks. The default behavior is the application of DOM operations, however,\n     * when an animation is detected (and animations are enabled), $animate will do the heavy lifting\n     * to ensure that animation runs with the triggered DOM operation.\n     *\n     * By default $animate doesn't trigger any animations. This is because the `ngAnimate` module isn't\n     * included and only when it is active then the animation hooks that `$animate` triggers will be\n     * functional. Once active then all structural `ng-` directives will trigger animations as they perform\n     * their DOM-related operations (enter, leave and move). Other directives such as `ngClass`,\n     * `ngShow`, `ngHide` and `ngMessages` also provide support for animations.\n     *\n     * It is recommended that the`$animate` service is always used when executing DOM-related procedures within directives.\n     *\n     * To learn more about enabling animation support, click here to visit the\n     * {@link ngAnimate ngAnimate module page}.\n     */\n    return {\n      // we don't call it directly since non-existant arguments may\n      // be interpreted as null within the sub enabled function\n\n      /**\n       *\n       * @ngdoc method\n       * @name $animate#on\n       * @kind function\n       * @description Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...)\n       *    has fired on the given element or among any of its children. Once the listener is fired, the provided callback\n       *    is fired with the following params:\n       *\n       * ```js\n       * $animate.on('enter', container,\n       *    function callback(element, phase) {\n       *      // cool we detected an enter animation within the container\n       *    }\n       * );\n       * ```\n       *\n       * @param {string} event the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...)\n       * @param {DOMElement} container the container element that will capture each of the animation events that are fired on itself\n       *     as well as among its children\n       * @param {Function} callback the callback function that will be fired when the listener is triggered\n       *\n       * The arguments present in the callback function are:\n       * * `element` - The captured DOM element that the animation was fired on.\n       * * `phase` - The phase of the animation. The two possible phases are **start** (when the animation starts) and **close** (when it ends).\n       */\n      on: $$animateQueue.on,\n\n      /**\n       *\n       * @ngdoc method\n       * @name $animate#off\n       * @kind function\n       * @description Deregisters an event listener based on the event which has been associated with the provided element. This method\n       * can be used in three different ways depending on the arguments:\n       *\n       * ```js\n       * // remove all the animation event listeners listening for `enter`\n       * $animate.off('enter');\n       *\n       * // remove all the animation event listeners listening for `enter` on the given element and its children\n       * $animate.off('enter', container);\n       *\n       * // remove the event listener function provided by `callback` that is set\n       * // to listen for `enter` on the given `container` as well as its children\n       * $animate.off('enter', container, callback);\n       * ```\n       *\n       * @param {string} event the animation event (e.g. enter, leave, move, addClass, removeClass, etc...)\n       * @param {DOMElement=} container the container element the event listener was placed on\n       * @param {Function=} callback the callback function that was registered as the listener\n       */\n      off: $$animateQueue.off,\n\n      /**\n       * @ngdoc method\n       * @name $animate#pin\n       * @kind function\n       * @description Associates the provided element with a host parent element to allow the element to be animated even if it exists\n       *    outside of the DOM structure of the Angular application. By doing so, any animation triggered via `$animate` can be issued on the\n       *    element despite being outside the realm of the application or within another application. Say for example if the application\n       *    was bootstrapped on an element that is somewhere inside of the `<body>` tag, but we wanted to allow for an element to be situated\n       *    as a direct child of `document.body`, then this can be achieved by pinning the element via `$animate.pin(element)`. Keep in mind\n       *    that calling `$animate.pin(element, parentElement)` will not actually insert into the DOM anywhere; it will just create the association.\n       *\n       *    Note that this feature is only active when the `ngAnimate` module is used.\n       *\n       * @param {DOMElement} element the external element that will be pinned\n       * @param {DOMElement} parentElement the host parent element that will be associated with the external element\n       */\n      pin: $$animateQueue.pin,\n\n      /**\n       *\n       * @ngdoc method\n       * @name $animate#enabled\n       * @kind function\n       * @description Used to get and set whether animations are enabled or not on the entire application or on an element and its children. This\n       * function can be called in four ways:\n       *\n       * ```js\n       * // returns true or false\n       * $animate.enabled();\n       *\n       * // changes the enabled state for all animations\n       * $animate.enabled(false);\n       * $animate.enabled(true);\n       *\n       * // returns true or false if animations are enabled for an element\n       * $animate.enabled(element);\n       *\n       * // changes the enabled state for an element and its children\n       * $animate.enabled(element, true);\n       * $animate.enabled(element, false);\n       * ```\n       *\n       * @param {DOMElement=} element the element that will be considered for checking/setting the enabled state\n       * @param {boolean=} enabled whether or not the animations will be enabled for the element\n       *\n       * @return {boolean} whether or not animations are enabled\n       */\n      enabled: $$animateQueue.enabled,\n\n      /**\n       * @ngdoc method\n       * @name $animate#cancel\n       * @kind function\n       * @description Cancels the provided animation.\n       *\n       * @param {Promise} animationPromise The animation promise that is returned when an animation is started.\n       */\n      cancel: function(runner) {\n        runner.end && runner.end();\n      },\n\n      /**\n       *\n       * @ngdoc method\n       * @name $animate#enter\n       * @kind function\n       * @description Inserts the element into the DOM either after the `after` element (if provided) or\n       *   as the first child within the `parent` element and then triggers an animation.\n       *   A promise is returned that will be resolved during the next digest once the animation\n       *   has completed.\n       *\n       * @param {DOMElement} element the element which will be inserted into the DOM\n       * @param {DOMElement} parent the parent element which will append the element as\n       *   a child (so long as the after element is not present)\n       * @param {DOMElement=} after the sibling element after which the element will be appended\n       * @param {object=} options an optional collection of options/styles that will be applied to the element\n       *\n       * @return {Promise} the animation callback promise\n       */\n      enter: function(element, parent, after, options) {\n        parent = parent && jqLite(parent);\n        after = after && jqLite(after);\n        parent = parent || after.parent();\n        domInsert(element, parent, after);\n        return $$animateQueue.push(element, 'enter', prepareAnimateOptions(options));\n      },\n\n      /**\n       *\n       * @ngdoc method\n       * @name $animate#move\n       * @kind function\n       * @description Inserts (moves) the element into its new position in the DOM either after\n       *   the `after` element (if provided) or as the first child within the `parent` element\n       *   and then triggers an animation. A promise is returned that will be resolved\n       *   during the next digest once the animation has completed.\n       *\n       * @param {DOMElement} element the element which will be moved into the new DOM position\n       * @param {DOMElement} parent the parent element which will append the element as\n       *   a child (so long as the after element is not present)\n       * @param {DOMElement=} after the sibling element after which the element will be appended\n       * @param {object=} options an optional collection of options/styles that will be applied to the element\n       *\n       * @return {Promise} the animation callback promise\n       */\n      move: function(element, parent, after, options) {\n        parent = parent && jqLite(parent);\n        after = after && jqLite(after);\n        parent = parent || after.parent();\n        domInsert(element, parent, after);\n        return $$animateQueue.push(element, 'move', prepareAnimateOptions(options));\n      },\n\n      /**\n       * @ngdoc method\n       * @name $animate#leave\n       * @kind function\n       * @description Triggers an animation and then removes the element from the DOM.\n       * When the function is called a promise is returned that will be resolved during the next\n       * digest once the animation has completed.\n       *\n       * @param {DOMElement} element the element which will be removed from the DOM\n       * @param {object=} options an optional collection of options/styles that will be applied to the element\n       *\n       * @return {Promise} the animation callback promise\n       */\n      leave: function(element, options) {\n        return $$animateQueue.push(element, 'leave', prepareAnimateOptions(options), function() {\n          element.remove();\n        });\n      },\n\n      /**\n       * @ngdoc method\n       * @name $animate#addClass\n       * @kind function\n       *\n       * @description Triggers an addClass animation surrounding the addition of the provided CSS class(es). Upon\n       *   execution, the addClass operation will only be handled after the next digest and it will not trigger an\n       *   animation if element already contains the CSS class or if the class is removed at a later step.\n       *   Note that class-based animations are treated differently compared to structural animations\n       *   (like enter, move and leave) since the CSS classes may be added/removed at different points\n       *   depending if CSS or JavaScript animations are used.\n       *\n       * @param {DOMElement} element the element which the CSS classes will be applied to\n       * @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)\n       * @param {object=} options an optional collection of options/styles that will be applied to the element\n       *\n       * @return {Promise} the animation callback promise\n       */\n      addClass: function(element, className, options) {\n        options = prepareAnimateOptions(options);\n        options.addClass = mergeClasses(options.addclass, className);\n        return $$animateQueue.push(element, 'addClass', options);\n      },\n\n      /**\n       * @ngdoc method\n       * @name $animate#removeClass\n       * @kind function\n       *\n       * @description Triggers a removeClass animation surrounding the removal of the provided CSS class(es). Upon\n       *   execution, the removeClass operation will only be handled after the next digest and it will not trigger an\n       *   animation if element does not contain the CSS class or if the class is added at a later step.\n       *   Note that class-based animations are treated differently compared to structural animations\n       *   (like enter, move and leave) since the CSS classes may be added/removed at different points\n       *   depending if CSS or JavaScript animations are used.\n       *\n       * @param {DOMElement} element the element which the CSS classes will be applied to\n       * @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)\n       * @param {object=} options an optional collection of options/styles that will be applied to the element\n       *\n       * @return {Promise} the animation callback promise\n       */\n      removeClass: function(element, className, options) {\n        options = prepareAnimateOptions(options);\n        options.removeClass = mergeClasses(options.removeClass, className);\n        return $$animateQueue.push(element, 'removeClass', options);\n      },\n\n      /**\n       * @ngdoc method\n       * @name $animate#setClass\n       * @kind function\n       *\n       * @description Performs both the addition and removal of a CSS classes on an element and (during the process)\n       *    triggers an animation surrounding the class addition/removal. Much like `$animate.addClass` and\n       *    `$animate.removeClass`, `setClass` will only evaluate the classes being added/removed once a digest has\n       *    passed. Note that class-based animations are treated differently compared to structural animations\n       *    (like enter, move and leave) since the CSS classes may be added/removed at different points\n       *    depending if CSS or JavaScript animations are used.\n       *\n       * @param {DOMElement} element the element which the CSS classes will be applied to\n       * @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces)\n       * @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)\n       * @param {object=} options an optional collection of options/styles that will be applied to the element\n       *\n       * @return {Promise} the animation callback promise\n       */\n      setClass: function(element, add, remove, options) {\n        options = prepareAnimateOptions(options);\n        options.addClass = mergeClasses(options.addClass, add);\n        options.removeClass = mergeClasses(options.removeClass, remove);\n        return $$animateQueue.push(element, 'setClass', options);\n      },\n\n      /**\n       * @ngdoc method\n       * @name $animate#animate\n       * @kind function\n       *\n       * @description Performs an inline animation on the element which applies the provided to and from CSS styles to the element.\n       * If any detected CSS transition, keyframe or JavaScript matches the provided className value, then the animation will take\n       * on the provided styles. For example, if a transition animation is set for the given classNamem, then the provided `from` and\n       * `to` styles will be applied alongside the given transition. If the CSS style provided in `from` does not have a corresponding\n       * style in `to`, the style in `from` is applied immediately, and no animation is run.\n       * If a JavaScript animation is detected then the provided styles will be given in as function parameters into the `animate`\n       * method (or as part of the `options` parameter):\n       *\n       * ```js\n       * ngModule.animation('.my-inline-animation', function() {\n       *   return {\n       *     animate : function(element, from, to, done, options) {\n       *       //animation\n       *       done();\n       *     }\n       *   }\n       * });\n       * ```\n       *\n       * @param {DOMElement} element the element which the CSS styles will be applied to\n       * @param {object} from the from (starting) CSS styles that will be applied to the element and across the animation.\n       * @param {object} to the to (destination) CSS styles that will be applied to the element and across the animation.\n       * @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If\n       *    this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element.\n       *    (Note that if no animation is detected then this value will not be applied to the element.)\n       * @param {object=} options an optional collection of options/styles that will be applied to the element\n       *\n       * @return {Promise} the animation callback promise\n       */\n      animate: function(element, from, to, className, options) {\n        options = prepareAnimateOptions(options);\n        options.from = options.from ? extend(options.from, from) : from;\n        options.to   = options.to   ? extend(options.to, to)     : to;\n\n        className = className || 'ng-inline-animate';\n        options.tempClasses = mergeClasses(options.tempClasses, className);\n        return $$animateQueue.push(element, 'animate', options);\n      }\n    };\n  }];\n}];\n\nvar $$AnimateAsyncRunFactoryProvider = function() {\n  this.$get = ['$$rAF', function($$rAF) {\n    var waitQueue = [];\n\n    function waitForTick(fn) {\n      waitQueue.push(fn);\n      if (waitQueue.length > 1) return;\n      $$rAF(function() {\n        for (var i = 0; i < waitQueue.length; i++) {\n          waitQueue[i]();\n        }\n        waitQueue = [];\n      });\n    }\n\n    return function() {\n      var passed = false;\n      waitForTick(function() {\n        passed = true;\n      });\n      return function(callback) {\n        passed ? callback() : waitForTick(callback);\n      };\n    };\n  }];\n};\n\nvar $$AnimateRunnerFactoryProvider = function() {\n  this.$get = ['$q', '$sniffer', '$$animateAsyncRun', '$document', '$timeout',\n       function($q,   $sniffer,   $$animateAsyncRun,   $document,   $timeout) {\n\n    var INITIAL_STATE = 0;\n    var DONE_PENDING_STATE = 1;\n    var DONE_COMPLETE_STATE = 2;\n\n    AnimateRunner.chain = function(chain, callback) {\n      var index = 0;\n\n      next();\n      function next() {\n        if (index === chain.length) {\n          callback(true);\n          return;\n        }\n\n        chain[index](function(response) {\n          if (response === false) {\n            callback(false);\n            return;\n          }\n          index++;\n          next();\n        });\n      }\n    };\n\n    AnimateRunner.all = function(runners, callback) {\n      var count = 0;\n      var status = true;\n      forEach(runners, function(runner) {\n        runner.done(onProgress);\n      });\n\n      function onProgress(response) {\n        status = status && response;\n        if (++count === runners.length) {\n          callback(status);\n        }\n      }\n    };\n\n    function AnimateRunner(host) {\n      this.setHost(host);\n\n      var rafTick = $$animateAsyncRun();\n      var timeoutTick = function(fn) {\n        $timeout(fn, 0, false);\n      };\n\n      this._doneCallbacks = [];\n      this._tick = function(fn) {\n        var doc = $document[0];\n\n        // the document may not be ready or attached\n        // to the module for some internal tests\n        if (doc && doc.hidden) {\n          timeoutTick(fn);\n        } else {\n          rafTick(fn);\n        }\n      };\n      this._state = 0;\n    }\n\n    AnimateRunner.prototype = {\n      setHost: function(host) {\n        this.host = host || {};\n      },\n\n      done: function(fn) {\n        if (this._state === DONE_COMPLETE_STATE) {\n          fn();\n        } else {\n          this._doneCallbacks.push(fn);\n        }\n      },\n\n      progress: noop,\n\n      getPromise: function() {\n        if (!this.promise) {\n          var self = this;\n          this.promise = $q(function(resolve, reject) {\n            self.done(function(status) {\n              status === false ? reject() : resolve();\n            });\n          });\n        }\n        return this.promise;\n      },\n\n      then: function(resolveHandler, rejectHandler) {\n        return this.getPromise().then(resolveHandler, rejectHandler);\n      },\n\n      'catch': function(handler) {\n        return this.getPromise()['catch'](handler);\n      },\n\n      'finally': function(handler) {\n        return this.getPromise()['finally'](handler);\n      },\n\n      pause: function() {\n        if (this.host.pause) {\n          this.host.pause();\n        }\n      },\n\n      resume: function() {\n        if (this.host.resume) {\n          this.host.resume();\n        }\n      },\n\n      end: function() {\n        if (this.host.end) {\n          this.host.end();\n        }\n        this._resolve(true);\n      },\n\n      cancel: function() {\n        if (this.host.cancel) {\n          this.host.cancel();\n        }\n        this._resolve(false);\n      },\n\n      complete: function(response) {\n        var self = this;\n        if (self._state === INITIAL_STATE) {\n          self._state = DONE_PENDING_STATE;\n          self._tick(function() {\n            self._resolve(response);\n          });\n        }\n      },\n\n      _resolve: function(response) {\n        if (this._state !== DONE_COMPLETE_STATE) {\n          forEach(this._doneCallbacks, function(fn) {\n            fn(response);\n          });\n          this._doneCallbacks.length = 0;\n          this._state = DONE_COMPLETE_STATE;\n        }\n      }\n    };\n\n    return AnimateRunner;\n  }];\n};\n\n/**\n * @ngdoc service\n * @name $animateCss\n * @kind object\n *\n * @description\n * This is the core version of `$animateCss`. By default, only when the `ngAnimate` is included,\n * then the `$animateCss` service will actually perform animations.\n *\n * Click here {@link ngAnimate.$animateCss to read the documentation for $animateCss}.\n */\nvar $CoreAnimateCssProvider = function() {\n  this.$get = ['$$rAF', '$q', '$$AnimateRunner', function($$rAF, $q, $$AnimateRunner) {\n\n    return function(element, initialOptions) {\n      // all of the animation functions should create\n      // a copy of the options data, however, if a\n      // parent service has already created a copy then\n      // we should stick to using that\n      var options = initialOptions || {};\n      if (!options.$$prepared) {\n        options = copy(options);\n      }\n\n      // there is no point in applying the styles since\n      // there is no animation that goes on at all in\n      // this version of $animateCss.\n      if (options.cleanupStyles) {\n        options.from = options.to = null;\n      }\n\n      if (options.from) {\n        element.css(options.from);\n        options.from = null;\n      }\n\n      /* jshint newcap: false */\n      var closed, runner = new $$AnimateRunner();\n      return {\n        start: run,\n        end: run\n      };\n\n      function run() {\n        $$rAF(function() {\n          applyAnimationContents();\n          if (!closed) {\n            runner.complete();\n          }\n          closed = true;\n        });\n        return runner;\n      }\n\n      function applyAnimationContents() {\n        if (options.addClass) {\n          element.addClass(options.addClass);\n          options.addClass = null;\n        }\n        if (options.removeClass) {\n          element.removeClass(options.removeClass);\n          options.removeClass = null;\n        }\n        if (options.to) {\n          element.css(options.to);\n          options.to = null;\n        }\n      }\n    };\n  }];\n};\n\n/* global stripHash: true */\n\n/**\n * ! This is a private undocumented service !\n *\n * @name $browser\n * @requires $log\n * @description\n * This object has two goals:\n *\n * - hide all the global state in the browser caused by the window object\n * - abstract away all the browser specific features and inconsistencies\n *\n * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`\n * service, which can be used for convenient testing of the application without the interaction with\n * the real browser apis.\n */\n/**\n * @param {object} window The global window object.\n * @param {object} document jQuery wrapped document.\n * @param {object} $log window.console or an object with the same interface.\n * @param {object} $sniffer $sniffer service\n */\nfunction Browser(window, document, $log, $sniffer) {\n  var self = this,\n      location = window.location,\n      history = window.history,\n      setTimeout = window.setTimeout,\n      clearTimeout = window.clearTimeout,\n      pendingDeferIds = {};\n\n  self.isMock = false;\n\n  var outstandingRequestCount = 0;\n  var outstandingRequestCallbacks = [];\n\n  // TODO(vojta): remove this temporary api\n  self.$$completeOutstandingRequest = completeOutstandingRequest;\n  self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };\n\n  /**\n   * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`\n   * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.\n   */\n  function completeOutstandingRequest(fn) {\n    try {\n      fn.apply(null, sliceArgs(arguments, 1));\n    } finally {\n      outstandingRequestCount--;\n      if (outstandingRequestCount === 0) {\n        while (outstandingRequestCallbacks.length) {\n          try {\n            outstandingRequestCallbacks.pop()();\n          } catch (e) {\n            $log.error(e);\n          }\n        }\n      }\n    }\n  }\n\n  function getHash(url) {\n    var index = url.indexOf('#');\n    return index === -1 ? '' : url.substr(index);\n  }\n\n  /**\n   * @private\n   * Note: this method is used only by scenario runner\n   * TODO(vojta): prefix this method with $$ ?\n   * @param {function()} callback Function that will be called when no outstanding request\n   */\n  self.notifyWhenNoOutstandingRequests = function(callback) {\n    if (outstandingRequestCount === 0) {\n      callback();\n    } else {\n      outstandingRequestCallbacks.push(callback);\n    }\n  };\n\n  //////////////////////////////////////////////////////////////\n  // URL API\n  //////////////////////////////////////////////////////////////\n\n  var cachedState, lastHistoryState,\n      lastBrowserUrl = location.href,\n      baseElement = document.find('base'),\n      pendingLocation = null,\n      getCurrentState = !$sniffer.history ? noop : function getCurrentState() {\n        try {\n          return history.state;\n        } catch (e) {\n          // MSIE can reportedly throw when there is no state (UNCONFIRMED).\n        }\n      };\n\n  cacheState();\n  lastHistoryState = cachedState;\n\n  /**\n   * @name $browser#url\n   *\n   * @description\n   * GETTER:\n   * Without any argument, this method just returns current value of location.href.\n   *\n   * SETTER:\n   * With at least one argument, this method sets url to new value.\n   * If html5 history api supported, pushState/replaceState is used, otherwise\n   * location.href/location.replace is used.\n   * Returns its own instance to allow chaining\n   *\n   * NOTE: this api is intended for use only by the $location service. Please use the\n   * {@link ng.$location $location service} to change url.\n   *\n   * @param {string} url New url (when used as setter)\n   * @param {boolean=} replace Should new url replace current history record?\n   * @param {object=} state object to use with pushState/replaceState\n   */\n  self.url = function(url, replace, state) {\n    // In modern browsers `history.state` is `null` by default; treating it separately\n    // from `undefined` would cause `$browser.url('/foo')` to change `history.state`\n    // to undefined via `pushState`. Instead, let's change `undefined` to `null` here.\n    if (isUndefined(state)) {\n      state = null;\n    }\n\n    // Android Browser BFCache causes location, history reference to become stale.\n    if (location !== window.location) location = window.location;\n    if (history !== window.history) history = window.history;\n\n    // setter\n    if (url) {\n      var sameState = lastHistoryState === state;\n\n      // Don't change anything if previous and current URLs and states match. This also prevents\n      // IE<10 from getting into redirect loop when in LocationHashbangInHtml5Url mode.\n      // See https://github.com/angular/angular.js/commit/ffb2701\n      if (lastBrowserUrl === url && (!$sniffer.history || sameState)) {\n        return self;\n      }\n      var sameBase = lastBrowserUrl && stripHash(lastBrowserUrl) === stripHash(url);\n      lastBrowserUrl = url;\n      lastHistoryState = state;\n      // Don't use history API if only the hash changed\n      // due to a bug in IE10/IE11 which leads\n      // to not firing a `hashchange` nor `popstate` event\n      // in some cases (see #9143).\n      if ($sniffer.history && (!sameBase || !sameState)) {\n        history[replace ? 'replaceState' : 'pushState'](state, '', url);\n        cacheState();\n        // Do the assignment again so that those two variables are referentially identical.\n        lastHistoryState = cachedState;\n      } else {\n        if (!sameBase || pendingLocation) {\n          pendingLocation = url;\n        }\n        if (replace) {\n          location.replace(url);\n        } else if (!sameBase) {\n          location.href = url;\n        } else {\n          location.hash = getHash(url);\n        }\n        if (location.href !== url) {\n          pendingLocation = url;\n        }\n      }\n      return self;\n    // getter\n    } else {\n      // - pendingLocation is needed as browsers don't allow to read out\n      //   the new location.href if a reload happened or if there is a bug like in iOS 9 (see\n      //   https://openradar.appspot.com/22186109).\n      // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172\n      return pendingLocation || location.href.replace(/%27/g,\"'\");\n    }\n  };\n\n  /**\n   * @name $browser#state\n   *\n   * @description\n   * This method is a getter.\n   *\n   * Return history.state or null if history.state is undefined.\n   *\n   * @returns {object} state\n   */\n  self.state = function() {\n    return cachedState;\n  };\n\n  var urlChangeListeners = [],\n      urlChangeInit = false;\n\n  function cacheStateAndFireUrlChange() {\n    pendingLocation = null;\n    cacheState();\n    fireUrlChange();\n  }\n\n  // This variable should be used *only* inside the cacheState function.\n  var lastCachedState = null;\n  function cacheState() {\n    // This should be the only place in $browser where `history.state` is read.\n    cachedState = getCurrentState();\n    cachedState = isUndefined(cachedState) ? null : cachedState;\n\n    // Prevent callbacks fo fire twice if both hashchange & popstate were fired.\n    if (equals(cachedState, lastCachedState)) {\n      cachedState = lastCachedState;\n    }\n    lastCachedState = cachedState;\n  }\n\n  function fireUrlChange() {\n    if (lastBrowserUrl === self.url() && lastHistoryState === cachedState) {\n      return;\n    }\n\n    lastBrowserUrl = self.url();\n    lastHistoryState = cachedState;\n    forEach(urlChangeListeners, function(listener) {\n      listener(self.url(), cachedState);\n    });\n  }\n\n  /**\n   * @name $browser#onUrlChange\n   *\n   * @description\n   * Register callback function that will be called, when url changes.\n   *\n   * It's only called when the url is changed from outside of angular:\n   * - user types different url into address bar\n   * - user clicks on history (forward/back) button\n   * - user clicks on a link\n   *\n   * It's not called when url is changed by $browser.url() method\n   *\n   * The listener gets called with new url as parameter.\n   *\n   * NOTE: this api is intended for use only by the $location service. Please use the\n   * {@link ng.$location $location service} to monitor url changes in angular apps.\n   *\n   * @param {function(string)} listener Listener function to be called when url changes.\n   * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.\n   */\n  self.onUrlChange = function(callback) {\n    // TODO(vojta): refactor to use node's syntax for events\n    if (!urlChangeInit) {\n      // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)\n      // don't fire popstate when user change the address bar and don't fire hashchange when url\n      // changed by push/replaceState\n\n      // html5 history api - popstate event\n      if ($sniffer.history) jqLite(window).on('popstate', cacheStateAndFireUrlChange);\n      // hashchange event\n      jqLite(window).on('hashchange', cacheStateAndFireUrlChange);\n\n      urlChangeInit = true;\n    }\n\n    urlChangeListeners.push(callback);\n    return callback;\n  };\n\n  /**\n   * @private\n   * Remove popstate and hashchange handler from window.\n   *\n   * NOTE: this api is intended for use only by $rootScope.\n   */\n  self.$$applicationDestroyed = function() {\n    jqLite(window).off('hashchange popstate', cacheStateAndFireUrlChange);\n  };\n\n  /**\n   * Checks whether the url has changed outside of Angular.\n   * Needs to be exported to be able to check for changes that have been done in sync,\n   * as hashchange/popstate events fire in async.\n   */\n  self.$$checkUrlChange = fireUrlChange;\n\n  //////////////////////////////////////////////////////////////\n  // Misc API\n  //////////////////////////////////////////////////////////////\n\n  /**\n   * @name $browser#baseHref\n   *\n   * @description\n   * Returns current <base href>\n   * (always relative - without domain)\n   *\n   * @returns {string} The current base href\n   */\n  self.baseHref = function() {\n    var href = baseElement.attr('href');\n    return href ? href.replace(/^(https?\\:)?\\/\\/[^\\/]*/, '') : '';\n  };\n\n  /**\n   * @name $browser#defer\n   * @param {function()} fn A function, who's execution should be deferred.\n   * @param {number=} [delay=0] of milliseconds to defer the function execution.\n   * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.\n   *\n   * @description\n   * Executes a fn asynchronously via `setTimeout(fn, delay)`.\n   *\n   * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using\n   * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed\n   * via `$browser.defer.flush()`.\n   *\n   */\n  self.defer = function(fn, delay) {\n    var timeoutId;\n    outstandingRequestCount++;\n    timeoutId = setTimeout(function() {\n      delete pendingDeferIds[timeoutId];\n      completeOutstandingRequest(fn);\n    }, delay || 0);\n    pendingDeferIds[timeoutId] = true;\n    return timeoutId;\n  };\n\n\n  /**\n   * @name $browser#defer.cancel\n   *\n   * @description\n   * Cancels a deferred task identified with `deferId`.\n   *\n   * @param {*} deferId Token returned by the `$browser.defer` function.\n   * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n   *                    canceled.\n   */\n  self.defer.cancel = function(deferId) {\n    if (pendingDeferIds[deferId]) {\n      delete pendingDeferIds[deferId];\n      clearTimeout(deferId);\n      completeOutstandingRequest(noop);\n      return true;\n    }\n    return false;\n  };\n\n}\n\nfunction $BrowserProvider() {\n  this.$get = ['$window', '$log', '$sniffer', '$document',\n      function($window, $log, $sniffer, $document) {\n        return new Browser($window, $document, $log, $sniffer);\n      }];\n}\n\n/**\n * @ngdoc service\n * @name $cacheFactory\n *\n * @description\n * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to\n * them.\n *\n * ```js\n *\n *  var cache = $cacheFactory('cacheId');\n *  expect($cacheFactory.get('cacheId')).toBe(cache);\n *  expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();\n *\n *  cache.put(\"key\", \"value\");\n *  cache.put(\"another key\", \"another value\");\n *\n *  // We've specified no options on creation\n *  expect(cache.info()).toEqual({id: 'cacheId', size: 2});\n *\n * ```\n *\n *\n * @param {string} cacheId Name or id of the newly created cache.\n * @param {object=} options Options object that specifies the cache behavior. Properties:\n *\n *   - `{number=}` `capacity` — turns the cache into LRU cache.\n *\n * @returns {object} Newly created cache object with the following set of methods:\n *\n * - `{object}` `info()` — Returns id, size, and options of cache.\n * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns\n *   it.\n * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.\n * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.\n * - `{void}` `removeAll()` — Removes all cached values.\n * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.\n *\n * @example\n   <example module=\"cacheExampleApp\">\n     <file name=\"index.html\">\n       <div ng-controller=\"CacheController\">\n         <input ng-model=\"newCacheKey\" placeholder=\"Key\">\n         <input ng-model=\"newCacheValue\" placeholder=\"Value\">\n         <button ng-click=\"put(newCacheKey, newCacheValue)\">Cache</button>\n\n         <p ng-if=\"keys.length\">Cached Values</p>\n         <div ng-repeat=\"key in keys\">\n           <span ng-bind=\"key\"></span>\n           <span>: </span>\n           <b ng-bind=\"cache.get(key)\"></b>\n         </div>\n\n         <p>Cache Info</p>\n         <div ng-repeat=\"(key, value) in cache.info()\">\n           <span ng-bind=\"key\"></span>\n           <span>: </span>\n           <b ng-bind=\"value\"></b>\n         </div>\n       </div>\n     </file>\n     <file name=\"script.js\">\n       angular.module('cacheExampleApp', []).\n         controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {\n           $scope.keys = [];\n           $scope.cache = $cacheFactory('cacheId');\n           $scope.put = function(key, value) {\n             if (angular.isUndefined($scope.cache.get(key))) {\n               $scope.keys.push(key);\n             }\n             $scope.cache.put(key, angular.isUndefined(value) ? null : value);\n           };\n         }]);\n     </file>\n     <file name=\"style.css\">\n       p {\n         margin: 10px 0 3px;\n       }\n     </file>\n   </example>\n */\nfunction $CacheFactoryProvider() {\n\n  this.$get = function() {\n    var caches = {};\n\n    function cacheFactory(cacheId, options) {\n      if (cacheId in caches) {\n        throw minErr('$cacheFactory')('iid', \"CacheId '{0}' is already taken!\", cacheId);\n      }\n\n      var size = 0,\n          stats = extend({}, options, {id: cacheId}),\n          data = createMap(),\n          capacity = (options && options.capacity) || Number.MAX_VALUE,\n          lruHash = createMap(),\n          freshEnd = null,\n          staleEnd = null;\n\n      /**\n       * @ngdoc type\n       * @name $cacheFactory.Cache\n       *\n       * @description\n       * A cache object used to store and retrieve data, primarily used by\n       * {@link $http $http} and the {@link ng.directive:script script} directive to cache\n       * templates and other data.\n       *\n       * ```js\n       *  angular.module('superCache')\n       *    .factory('superCache', ['$cacheFactory', function($cacheFactory) {\n       *      return $cacheFactory('super-cache');\n       *    }]);\n       * ```\n       *\n       * Example test:\n       *\n       * ```js\n       *  it('should behave like a cache', inject(function(superCache) {\n       *    superCache.put('key', 'value');\n       *    superCache.put('another key', 'another value');\n       *\n       *    expect(superCache.info()).toEqual({\n       *      id: 'super-cache',\n       *      size: 2\n       *    });\n       *\n       *    superCache.remove('another key');\n       *    expect(superCache.get('another key')).toBeUndefined();\n       *\n       *    superCache.removeAll();\n       *    expect(superCache.info()).toEqual({\n       *      id: 'super-cache',\n       *      size: 0\n       *    });\n       *  }));\n       * ```\n       */\n      return caches[cacheId] = {\n\n        /**\n         * @ngdoc method\n         * @name $cacheFactory.Cache#put\n         * @kind function\n         *\n         * @description\n         * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be\n         * retrieved later, and incrementing the size of the cache if the key was not already\n         * present in the cache. If behaving like an LRU cache, it will also remove stale\n         * entries from the set.\n         *\n         * It will not insert undefined values into the cache.\n         *\n         * @param {string} key the key under which the cached data is stored.\n         * @param {*} value the value to store alongside the key. If it is undefined, the key\n         *    will not be stored.\n         * @returns {*} the value stored.\n         */\n        put: function(key, value) {\n          if (isUndefined(value)) return;\n          if (capacity < Number.MAX_VALUE) {\n            var lruEntry = lruHash[key] || (lruHash[key] = {key: key});\n\n            refresh(lruEntry);\n          }\n\n          if (!(key in data)) size++;\n          data[key] = value;\n\n          if (size > capacity) {\n            this.remove(staleEnd.key);\n          }\n\n          return value;\n        },\n\n        /**\n         * @ngdoc method\n         * @name $cacheFactory.Cache#get\n         * @kind function\n         *\n         * @description\n         * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.\n         *\n         * @param {string} key the key of the data to be retrieved\n         * @returns {*} the value stored.\n         */\n        get: function(key) {\n          if (capacity < Number.MAX_VALUE) {\n            var lruEntry = lruHash[key];\n\n            if (!lruEntry) return;\n\n            refresh(lruEntry);\n          }\n\n          return data[key];\n        },\n\n\n        /**\n         * @ngdoc method\n         * @name $cacheFactory.Cache#remove\n         * @kind function\n         *\n         * @description\n         * Removes an entry from the {@link $cacheFactory.Cache Cache} object.\n         *\n         * @param {string} key the key of the entry to be removed\n         */\n        remove: function(key) {\n          if (capacity < Number.MAX_VALUE) {\n            var lruEntry = lruHash[key];\n\n            if (!lruEntry) return;\n\n            if (lruEntry == freshEnd) freshEnd = lruEntry.p;\n            if (lruEntry == staleEnd) staleEnd = lruEntry.n;\n            link(lruEntry.n,lruEntry.p);\n\n            delete lruHash[key];\n          }\n\n          if (!(key in data)) return;\n\n          delete data[key];\n          size--;\n        },\n\n\n        /**\n         * @ngdoc method\n         * @name $cacheFactory.Cache#removeAll\n         * @kind function\n         *\n         * @description\n         * Clears the cache object of any entries.\n         */\n        removeAll: function() {\n          data = createMap();\n          size = 0;\n          lruHash = createMap();\n          freshEnd = staleEnd = null;\n        },\n\n\n        /**\n         * @ngdoc method\n         * @name $cacheFactory.Cache#destroy\n         * @kind function\n         *\n         * @description\n         * Destroys the {@link $cacheFactory.Cache Cache} object entirely,\n         * removing it from the {@link $cacheFactory $cacheFactory} set.\n         */\n        destroy: function() {\n          data = null;\n          stats = null;\n          lruHash = null;\n          delete caches[cacheId];\n        },\n\n\n        /**\n         * @ngdoc method\n         * @name $cacheFactory.Cache#info\n         * @kind function\n         *\n         * @description\n         * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.\n         *\n         * @returns {object} an object with the following properties:\n         *   <ul>\n         *     <li>**id**: the id of the cache instance</li>\n         *     <li>**size**: the number of entries kept in the cache instance</li>\n         *     <li>**...**: any additional properties from the options object when creating the\n         *       cache.</li>\n         *   </ul>\n         */\n        info: function() {\n          return extend({}, stats, {size: size});\n        }\n      };\n\n\n      /**\n       * makes the `entry` the freshEnd of the LRU linked list\n       */\n      function refresh(entry) {\n        if (entry != freshEnd) {\n          if (!staleEnd) {\n            staleEnd = entry;\n          } else if (staleEnd == entry) {\n            staleEnd = entry.n;\n          }\n\n          link(entry.n, entry.p);\n          link(entry, freshEnd);\n          freshEnd = entry;\n          freshEnd.n = null;\n        }\n      }\n\n\n      /**\n       * bidirectionally links two entries of the LRU linked list\n       */\n      function link(nextEntry, prevEntry) {\n        if (nextEntry != prevEntry) {\n          if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify\n          if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify\n        }\n      }\n    }\n\n\n  /**\n   * @ngdoc method\n   * @name $cacheFactory#info\n   *\n   * @description\n   * Get information about all the caches that have been created\n   *\n   * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`\n   */\n    cacheFactory.info = function() {\n      var info = {};\n      forEach(caches, function(cache, cacheId) {\n        info[cacheId] = cache.info();\n      });\n      return info;\n    };\n\n\n  /**\n   * @ngdoc method\n   * @name $cacheFactory#get\n   *\n   * @description\n   * Get access to a cache object by the `cacheId` used when it was created.\n   *\n   * @param {string} cacheId Name or id of a cache to access.\n   * @returns {object} Cache object identified by the cacheId or undefined if no such cache.\n   */\n    cacheFactory.get = function(cacheId) {\n      return caches[cacheId];\n    };\n\n\n    return cacheFactory;\n  };\n}\n\n/**\n * @ngdoc service\n * @name $templateCache\n *\n * @description\n * The first time a template is used, it is loaded in the template cache for quick retrieval. You\n * can load templates directly into the cache in a `script` tag, or by consuming the\n * `$templateCache` service directly.\n *\n * Adding via the `script` tag:\n *\n * ```html\n *   <script type=\"text/ng-template\" id=\"templateId.html\">\n *     <p>This is the content of the template</p>\n *   </script>\n * ```\n *\n * **Note:** the `script` tag containing the template does not need to be included in the `head` of\n * the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (IE,\n * element with ng-app attribute), otherwise the template will be ignored.\n *\n * Adding via the `$templateCache` service:\n *\n * ```js\n * var myApp = angular.module('myApp', []);\n * myApp.run(function($templateCache) {\n *   $templateCache.put('templateId.html', 'This is the content of the template');\n * });\n * ```\n *\n * To retrieve the template later, simply use it in your HTML:\n * ```html\n * <div ng-include=\" 'templateId.html' \"></div>\n * ```\n *\n * or get it via Javascript:\n * ```js\n * $templateCache.get('templateId.html')\n * ```\n *\n * See {@link ng.$cacheFactory $cacheFactory}.\n *\n */\nfunction $TemplateCacheProvider() {\n  this.$get = ['$cacheFactory', function($cacheFactory) {\n    return $cacheFactory('templates');\n  }];\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n *     Any commits to this file should be reviewed with security in mind.  *\n *   Changes to this file can potentially create security vulnerabilities. *\n *          An approval from 2 Core members with history of modifying      *\n *                         this file is required.                          *\n *                                                                         *\n *  Does the change somehow allow for arbitrary javascript to be executed? *\n *    Or allows for someone to change the prototype of built-in objects?   *\n *     Or gives undesired access to variables likes document or window?    *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\n/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!\n *\n * DOM-related variables:\n *\n * - \"node\" - DOM Node\n * - \"element\" - DOM Element or Node\n * - \"$node\" or \"$element\" - jqLite-wrapped node or element\n *\n *\n * Compiler related stuff:\n *\n * - \"linkFn\" - linking fn of a single directive\n * - \"nodeLinkFn\" - function that aggregates all linking fns for a particular node\n * - \"childLinkFn\" -  function that aggregates all linking fns for child nodes of a particular node\n * - \"compositeLinkFn\" - function that aggregates all linking fns for a compilation root (nodeList)\n */\n\n\n/**\n * @ngdoc service\n * @name $compile\n * @kind function\n *\n * @description\n * Compiles an HTML string or DOM into a template and produces a template function, which\n * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.\n *\n * The compilation is a process of walking the DOM tree and matching DOM elements to\n * {@link ng.$compileProvider#directive directives}.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** This document is an in-depth reference of all directive options.\n * For a gentle introduction to directives with examples of common use cases,\n * see the {@link guide/directive directive guide}.\n * </div>\n *\n * ## Comprehensive Directive API\n *\n * There are many different options for a directive.\n *\n * The difference resides in the return value of the factory function.\n * You can either return a \"Directive Definition Object\" (see below) that defines the directive properties,\n * or just the `postLink` function (all other properties will have the default values).\n *\n * <div class=\"alert alert-success\">\n * **Best Practice:** It's recommended to use the \"directive definition object\" form.\n * </div>\n *\n * Here's an example directive declared with a Directive Definition Object:\n *\n * ```js\n *   var myModule = angular.module(...);\n *\n *   myModule.directive('directiveName', function factory(injectables) {\n *     var directiveDefinitionObject = {\n *       priority: 0,\n *       template: '<div></div>', // or // function(tElement, tAttrs) { ... },\n *       // or\n *       // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },\n *       transclude: false,\n *       restrict: 'A',\n *       templateNamespace: 'html',\n *       scope: false,\n *       controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },\n *       controllerAs: 'stringIdentifier',\n *       bindToController: false,\n *       require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],\n *       compile: function compile(tElement, tAttrs, transclude) {\n *         return {\n *           pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n *           post: function postLink(scope, iElement, iAttrs, controller) { ... }\n *         }\n *         // or\n *         // return function postLink( ... ) { ... }\n *       },\n *       // or\n *       // link: {\n *       //  pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n *       //  post: function postLink(scope, iElement, iAttrs, controller) { ... }\n *       // }\n *       // or\n *       // link: function postLink( ... ) { ... }\n *     };\n *     return directiveDefinitionObject;\n *   });\n * ```\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Any unspecified options will use the default value. You can see the default values below.\n * </div>\n *\n * Therefore the above can be simplified as:\n *\n * ```js\n *   var myModule = angular.module(...);\n *\n *   myModule.directive('directiveName', function factory(injectables) {\n *     var directiveDefinitionObject = {\n *       link: function postLink(scope, iElement, iAttrs) { ... }\n *     };\n *     return directiveDefinitionObject;\n *     // or\n *     // return function postLink(scope, iElement, iAttrs) { ... }\n *   });\n * ```\n *\n *\n *\n * ### Directive Definition Object\n *\n * The directive definition object provides instructions to the {@link ng.$compile\n * compiler}. The attributes are:\n *\n * #### `multiElement`\n * When this property is set to true, the HTML compiler will collect DOM nodes between\n * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them\n * together as the directive elements. It is recommended that this feature be used on directives\n * which are not strictly behavioral (such as {@link ngClick}), and which\n * do not manipulate or replace child nodes (such as {@link ngInclude}).\n *\n * #### `priority`\n * When there are multiple directives defined on a single DOM element, sometimes it\n * is necessary to specify the order in which the directives are applied. The `priority` is used\n * to sort the directives before their `compile` functions get called. Priority is defined as a\n * number. Directives with greater numerical `priority` are compiled first. Pre-link functions\n * are also run in priority order, but post-link functions are run in reverse order. The order\n * of directives with the same priority is undefined. The default priority is `0`.\n *\n * #### `terminal`\n * If set to true then the current `priority` will be the last set of directives\n * which will execute (any directives at the current priority will still execute\n * as the order of execution on same `priority` is undefined). Note that expressions\n * and other directives used in the directive's template will also be excluded from execution.\n *\n * #### `scope`\n * The scope property can be `true`, an object or a falsy value:\n *\n * * **falsy:** No scope will be created for the directive. The directive will use its parent's scope.\n *\n * * **`true`:** A new child scope that prototypically inherits from its parent will be created for\n * the directive's element. If multiple directives on the same element request a new scope,\n * only one new scope is created. The new scope rule does not apply for the root of the template\n * since the root of the template always gets a new scope.\n *\n * * **`{...}` (an object hash):** A new \"isolate\" scope is created for the directive's element. The\n * 'isolate' scope differs from normal scope in that it does not prototypically inherit from its parent\n * scope. This is useful when creating reusable components, which should not accidentally read or modify\n * data in the parent scope.\n *\n * The 'isolate' scope object hash defines a set of local scope properties derived from attributes on the\n * directive's element. These local properties are useful for aliasing values for templates. The keys in\n * the object hash map to the name of the property on the isolate scope; the values define how the property\n * is bound to the parent scope, via matching attributes on the directive's element:\n *\n * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is\n *   always a string since DOM attributes are strings. If no `attr` name is specified then the\n *   attribute name is assumed to be the same as the local name. Given `<my-component\n *   my-attr=\"hello {{name}}\">` and the isolate scope definition `scope: { localName:'@myAttr' }`,\n *   the directive's scope property `localName` will reflect the interpolated value of `hello\n *   {{name}}`. As the `name` attribute changes so will the `localName` property on the directive's\n *   scope. The `name` is read from the parent scope (not the directive's scope).\n *\n * * `=` or `=attr` - set up a bidirectional binding between a local scope property and an expression\n *   passed via the attribute `attr`. The expression is evaluated in the context of the parent scope.\n *   If no `attr` name is specified then the attribute name is assumed to be the same as the local\n *   name. Given `<my-component my-attr=\"parentModel\">` and the isolate scope definition `scope: {\n *   localModel: '=myAttr' }`, the property `localModel` on the directive's scope will reflect the\n *   value of `parentModel` on the parent scope. Changes to `parentModel` will be reflected in\n *   `localModel` and vice versa. Optional attributes should be marked as such with a question mark:\n *   `=?` or `=?attr`. If the binding expression is non-assignable, or if the attribute isn't\n *   optional and doesn't exist, an exception ({@link error/$compile/nonassign `$compile:nonassign`})\n *   will be thrown upon discovering changes to the local value, since it will be impossible to sync\n *   them back to the parent scope. By default, the {@link ng.$rootScope.Scope#$watch `$watch`}\n *   method is used for tracking changes, and the equality check is based on object identity.\n *   However, if an object literal or an array literal is passed as the binding expression, the\n *   equality check is done by value (using the {@link angular.equals} function). It's also possible\n *   to watch the evaluated value shallowly with {@link ng.$rootScope.Scope#$watchCollection\n *   `$watchCollection`}: use `=*` or `=*attr` (`=*?` or `=*?attr` if the attribute is optional).\n *\n  * * `<` or `<attr` - set up a one-way (one-directional) binding between a local scope property and an\n *   expression passed via the attribute `attr`. The expression is evaluated in the context of the\n *   parent scope. If no `attr` name is specified then the attribute name is assumed to be the same as the\n *   local name. You can also make the binding optional by adding `?`: `<?` or `<?attr`.\n *\n *   For example, given `<my-component my-attr=\"parentModel\">` and directive definition of\n *   `scope: { localModel:'<myAttr' }`, then the isolated scope property `localModel` will reflect the\n *   value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected\n *   in `localModel`, but changes in `localModel` will not reflect in `parentModel`. There are however\n *   two caveats:\n *     1. one-way binding does not copy the value from the parent to the isolate scope, it simply\n *     sets the same value. That means if your bound value is an object, changes to its properties\n *     in the isolated scope will be reflected in the parent scope (because both reference the same object).\n *     2. one-way binding watches changes to the **identity** of the parent value. That means the\n *     {@link ng.$rootScope.Scope#$watch `$watch`} on the parent value only fires if the reference\n *     to the value has changed. In most cases, this should not be of concern, but can be important\n *     to know if you one-way bind to an object, and then replace that object in the isolated scope.\n *     If you now change a property of the object in your parent scope, the change will not be\n *     propagated to the isolated scope, because the identity of the object on the parent scope\n *     has not changed. Instead you must assign a new object.\n *\n *   One-way binding is useful if you do not plan to propagate changes to your isolated scope bindings\n *   back to the parent. However, it does not make this completely impossible.\n *\n * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope. If\n *   no `attr` name is specified then the attribute name is assumed to be the same as the local name.\n *   Given `<my-component my-attr=\"count = count + value\">` and the isolate scope definition `scope: {\n *   localFn:'&myAttr' }`, the isolate scope property `localFn` will point to a function wrapper for\n *   the `count = count + value` expression. Often it's desirable to pass data from the isolated scope\n *   via an expression to the parent scope. This can be done by passing a map of local variable names\n *   and values into the expression wrapper fn. For example, if the expression is `increment(amount)`\n *   then we can specify the amount value by calling the `localFn` as `localFn({amount: 22})`.\n *\n * In general it's possible to apply more than one directive to one element, but there might be limitations\n * depending on the type of scope required by the directives. The following points will help explain these limitations.\n * For simplicity only two directives are taken into account, but it is also applicable for several directives:\n *\n * * **no scope** + **no scope** => Two directives which don't require their own scope will use their parent's scope\n * * **child scope** + **no scope** =>  Both directives will share one single child scope\n * * **child scope** + **child scope** =>  Both directives will share one single child scope\n * * **isolated scope** + **no scope** =>  The isolated directive will use it's own created isolated scope. The other directive will use\n * its parent's scope\n * * **isolated scope** + **child scope** =>  **Won't work!** Only one scope can be related to one element. Therefore these directives cannot\n * be applied to the same element.\n * * **isolated scope** + **isolated scope**  =>  **Won't work!** Only one scope can be related to one element. Therefore these directives\n * cannot be applied to the same element.\n *\n *\n * #### `bindToController`\n * This property is used to bind scope properties directly to the controller. It can be either\n * `true` or an object hash with the same format as the `scope` property. Additionally, a controller\n * alias must be set, either by using `controllerAs: 'myAlias'` or by specifying the alias in the controller\n * definition: `controller: 'myCtrl as myAlias'`.\n *\n * When an isolate scope is used for a directive (see above), `bindToController: true` will\n * allow a component to have its properties bound to the controller, rather than to scope.\n *\n * After the controller is instantiated, the initial values of the isolate scope bindings will be bound to the controller\n * properties. You can access these bindings once they have been initialized by providing a controller method called\n * `$onInit`, which is called after all the controllers on an element have been constructed and had their bindings\n * initialized.\n *\n * <div class=\"alert alert-warning\">\n * **Deprecation warning:** although bindings for non-ES6 class controllers are currently\n * bound to `this` before the controller constructor is called, this use is now deprecated. Please place initialization\n * code that relies upon bindings inside a `$onInit` method on the controller, instead.\n * </div>\n *\n * It is also possible to set `bindToController` to an object hash with the same format as the `scope` property.\n * This will set up the scope bindings to the controller directly. Note that `scope` can still be used\n * to define which kind of scope is created. By default, no scope is created. Use `scope: {}` to create an isolate\n * scope (useful for component directives).\n *\n * If both `bindToController` and `scope` are defined and have object hashes, `bindToController` overrides `scope`.\n *\n *\n * #### `controller`\n * Controller constructor function. The controller is instantiated before the\n * pre-linking phase and can be accessed by other directives (see\n * `require` attribute). This allows the directives to communicate with each other and augment\n * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:\n *\n * * `$scope` - Current scope associated with the element\n * * `$element` - Current element\n * * `$attrs` - Current attributes object for the element\n * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope:\n *   `function([scope], cloneLinkingFn, futureParentElement, slotName)`:\n *    * `scope`: (optional) override the scope.\n *    * `cloneLinkingFn`: (optional) argument to create clones of the original transcluded content.\n *    * `futureParentElement` (optional):\n *        * defines the parent to which the `cloneLinkingFn` will add the cloned elements.\n *        * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`.\n *        * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements)\n *          and when the `cloneLinkinFn` is passed,\n *          as those elements need to created and cloned in a special way when they are defined outside their\n *          usual containers (e.g. like `<svg>`).\n *        * See also the `directive.templateNamespace` property.\n *    * `slotName`: (optional) the name of the slot to transclude. If falsy (e.g. `null`, `undefined` or `''`)\n *      then the default translusion is provided.\n *    The `$transclude` function also has a method on it, `$transclude.isSlotFilled(slotName)`, which returns\n *    `true` if the specified slot contains content (i.e. one or more DOM nodes).\n *\n * The controller can provide the following methods that act as life-cycle hooks:\n * * `$onInit()` - Called on each controller after all the controllers on an element have been constructed and\n *   had their bindings initialized (and before the pre &amp; post linking functions for the directives on\n *   this element). This is a good place to put initialization code for your controller.\n * * `$onChanges(changesObj)` - Called whenever one-way (`<`) or interpolation (`@`) bindings are updated. The\n *   `changesObj` is a hash whose keys are the names of the bound properties that have changed, and the values are an\n *   object of the form `{ currentValue: ..., previousValue: ... }`. Use this hook to trigger updates within a component\n *   such as cloning the bound value to prevent accidental mutation of the outer value.\n * * `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing\n *   external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in\n *   the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent\n *   components will have their `$onDestroy()` hook called before child components.\n * * `$postLink()` - Called after this controller's element and its children have been linked. Similar to the post-link\n *   function this hook can be used to set up DOM event handlers and do direct DOM manipulation.\n *   Note that child elements that contain `templateUrl` directives will not have been compiled and linked since\n *   they are waiting for their template to load asynchronously and their own compilation and linking has been\n *   suspended until that occurs.\n *\n *\n * #### `require`\n * Require another directive and inject its controller as the fourth argument to the linking function. The\n * `require` property can be a string, an array or an object:\n * * a **string** containing the name of the directive to pass to the linking function\n * * an **array** containing the names of directives to pass to the linking function. The argument passed to the\n * linking function will be an array of controllers in the same order as the names in the `require` property\n * * an **object** whose property values are the names of the directives to pass to the linking function. The argument\n * passed to the linking function will also be an object with matching keys, whose values will hold the corresponding\n * controllers.\n *\n * If the `require` property is an object and `bindToController` is truthy, then the required controllers are\n * bound to the controller using the keys of the `require` property. This binding occurs after all the controllers\n * have been constructed but before `$onInit` is called.\n * See the {@link $compileProvider#component} helper for an example of how this can be used.\n *\n * If no such required directive(s) can be found, or if the directive does not have a controller, then an error is\n * raised (unless no link function is specified and the required controllers are not being bound to the directive\n * controller, in which case error checking is skipped). The name can be prefixed with:\n *\n * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.\n * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.\n * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.\n * * `^^` - Locate the required controller by searching the element's parents. Throw an error if not found.\n * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass\n *   `null` to the `link` fn if not found.\n * * `?^^` - Attempt to locate the required controller by searching the element's parents, or pass\n *   `null` to the `link` fn if not found.\n *\n *\n * #### `controllerAs`\n * Identifier name for a reference to the controller in the directive's scope.\n * This allows the controller to be referenced from the directive template. This is especially\n * useful when a directive is used as component, i.e. with an `isolate` scope. It's also possible\n * to use it in a directive without an `isolate` / `new` scope, but you need to be aware that the\n * `controllerAs` reference might overwrite a property that already exists on the parent scope.\n *\n *\n * #### `restrict`\n * String of subset of `EACM` which restricts the directive to a specific directive\n * declaration style. If omitted, the defaults (elements and attributes) are used.\n *\n * * `E` - Element name (default): `<my-directive></my-directive>`\n * * `A` - Attribute (default): `<div my-directive=\"exp\"></div>`\n * * `C` - Class: `<div class=\"my-directive: exp;\"></div>`\n * * `M` - Comment: `<!-- directive: my-directive exp -->`\n *\n *\n * #### `templateNamespace`\n * String representing the document type used by the markup in the template.\n * AngularJS needs this information as those elements need to be created and cloned\n * in a special way when they are defined outside their usual containers like `<svg>` and `<math>`.\n *\n * * `html` - All root nodes in the template are HTML. Root nodes may also be\n *   top-level elements such as `<svg>` or `<math>`.\n * * `svg` - The root nodes in the template are SVG elements (excluding `<math>`).\n * * `math` - The root nodes in the template are MathML elements (excluding `<svg>`).\n *\n * If no `templateNamespace` is specified, then the namespace is considered to be `html`.\n *\n * #### `template`\n * HTML markup that may:\n * * Replace the contents of the directive's element (default).\n * * Replace the directive's element itself (if `replace` is true - DEPRECATED).\n * * Wrap the contents of the directive's element (if `transclude` is true).\n *\n * Value may be:\n *\n * * A string. For example `<div red-on-hover>{{delete_str}}</div>`.\n * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`\n *   function api below) and returns a string value.\n *\n *\n * #### `templateUrl`\n * This is similar to `template` but the template is loaded from the specified URL, asynchronously.\n *\n * Because template loading is asynchronous the compiler will suspend compilation of directives on that element\n * for later when the template has been resolved.  In the meantime it will continue to compile and link\n * sibling and parent elements as though this element had not contained any directives.\n *\n * The compiler does not suspend the entire compilation to wait for templates to be loaded because this\n * would result in the whole app \"stalling\" until all templates are loaded asynchronously - even in the\n * case when only one deeply nested directive has `templateUrl`.\n *\n * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}\n *\n * You can specify `templateUrl` as a string representing the URL or as a function which takes two\n * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns\n * a string value representing the url.  In either case, the template URL is passed through {@link\n * $sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.\n *\n *\n * #### `replace` ([*DEPRECATED*!], will be removed in next major release - i.e. v2.0)\n * specify what the template should replace. Defaults to `false`.\n *\n * * `true` - the template will replace the directive's element.\n * * `false` - the template will replace the contents of the directive's element.\n *\n * The replacement process migrates all of the attributes / classes from the old element to the new\n * one. See the {@link guide/directive#template-expanding-directive\n * Directives Guide} for an example.\n *\n * There are very few scenarios where element replacement is required for the application function,\n * the main one being reusable custom components that are used within SVG contexts\n * (because SVG doesn't work with custom elements in the DOM tree).\n *\n * #### `transclude`\n * Extract the contents of the element where the directive appears and make it available to the directive.\n * The contents are compiled and provided to the directive as a **transclusion function**. See the\n * {@link $compile#transclusion Transclusion} section below.\n *\n *\n * #### `compile`\n *\n * ```js\n *   function compile(tElement, tAttrs, transclude) { ... }\n * ```\n *\n * The compile function deals with transforming the template DOM. Since most directives do not do\n * template transformation, it is not used often. The compile function takes the following arguments:\n *\n *   * `tElement` - template element - The element where the directive has been declared. It is\n *     safe to do template transformation on the element and child elements only.\n *\n *   * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared\n *     between all directive compile functions.\n *\n *   * `transclude` -  [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`\n *\n * <div class=\"alert alert-warning\">\n * **Note:** The template instance and the link instance may be different objects if the template has\n * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that\n * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration\n * should be done in a linking function rather than in a compile function.\n * </div>\n\n * <div class=\"alert alert-warning\">\n * **Note:** The compile function cannot handle directives that recursively use themselves in their\n * own templates or compile functions. Compiling these directives results in an infinite loop and\n * stack overflow errors.\n *\n * This can be avoided by manually using $compile in the postLink function to imperatively compile\n * a directive's template instead of relying on automatic template compilation via `template` or\n * `templateUrl` declaration or manual compilation inside the compile function.\n * </div>\n *\n * <div class=\"alert alert-danger\">\n * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it\n *   e.g. does not know about the right outer scope. Please use the transclude function that is passed\n *   to the link function instead.\n * </div>\n\n * A compile function can have a return value which can be either a function or an object.\n *\n * * returning a (post-link) function - is equivalent to registering the linking function via the\n *   `link` property of the config object when the compile function is empty.\n *\n * * returning an object with function(s) registered via `pre` and `post` properties - allows you to\n *   control when a linking function should be called during the linking phase. See info about\n *   pre-linking and post-linking functions below.\n *\n *\n * #### `link`\n * This property is used only if the `compile` property is not defined.\n *\n * ```js\n *   function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }\n * ```\n *\n * The link function is responsible for registering DOM listeners as well as updating the DOM. It is\n * executed after the template has been cloned. This is where most of the directive logic will be\n * put.\n *\n *   * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the\n *     directive for registering {@link ng.$rootScope.Scope#$watch watches}.\n *\n *   * `iElement` - instance element - The element where the directive is to be used. It is safe to\n *     manipulate the children of the element only in `postLink` function since the children have\n *     already been linked.\n *\n *   * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared\n *     between all directive linking functions.\n *\n *   * `controller` - the directive's required controller instance(s) - Instances are shared\n *     among all directives, which allows the directives to use the controllers as a communication\n *     channel. The exact value depends on the directive's `require` property:\n *       * no controller(s) required: the directive's own controller, or `undefined` if it doesn't have one\n *       * `string`: the controller instance\n *       * `array`: array of controller instances\n *\n *     If a required controller cannot be found, and it is optional, the instance is `null`,\n *     otherwise the {@link error:$compile:ctreq Missing Required Controller} error is thrown.\n *\n *     Note that you can also require the directive's own controller - it will be made available like\n *     any other controller.\n *\n *   * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.\n *     This is the same as the `$transclude`\n *     parameter of directive controllers, see there for details.\n *     `function([scope], cloneLinkingFn, futureParentElement)`.\n *\n * #### Pre-linking function\n *\n * Executed before the child elements are linked. Not safe to do DOM transformation since the\n * compiler linking function will fail to locate the correct elements for linking.\n *\n * #### Post-linking function\n *\n * Executed after the child elements are linked.\n *\n * Note that child elements that contain `templateUrl` directives will not have been compiled\n * and linked since they are waiting for their template to load asynchronously and their own\n * compilation and linking has been suspended until that occurs.\n *\n * It is safe to do DOM transformation in the post-linking function on elements that are not waiting\n * for their async templates to be resolved.\n *\n *\n * ### Transclusion\n *\n * Transclusion is the process of extracting a collection of DOM elements from one part of the DOM and\n * copying them to another part of the DOM, while maintaining their connection to the original AngularJS\n * scope from where they were taken.\n *\n * Transclusion is used (often with {@link ngTransclude}) to insert the\n * original contents of a directive's element into a specified place in the template of the directive.\n * The benefit of transclusion, over simply moving the DOM elements manually, is that the transcluded\n * content has access to the properties on the scope from which it was taken, even if the directive\n * has isolated scope.\n * See the {@link guide/directive#creating-a-directive-that-wraps-other-elements Directives Guide}.\n *\n * This makes it possible for the widget to have private state for its template, while the transcluded\n * content has access to its originating scope.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** When testing an element transclude directive you must not place the directive at the root of the\n * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives\n * Testing Transclusion Directives}.\n * </div>\n *\n * There are three kinds of transclusion depending upon whether you want to transclude just the contents of the\n * directive's element, the entire element or multiple parts of the element contents:\n *\n * * `true` - transclude the content (i.e. the child nodes) of the directive's element.\n * * `'element'` - transclude the whole of the directive's element including any directives on this\n *   element that defined at a lower priority than this directive. When used, the `template`\n *   property is ignored.\n * * **`{...}` (an object hash):** - map elements of the content onto transclusion \"slots\" in the template.\n *\n * **Mult-slot transclusion** is declared by providing an object for the `transclude` property.\n *\n * This object is a map where the keys are the name of the slot to fill and the value is an element selector\n * used to match the HTML to the slot. The element selector should be in normalized form (e.g. `myElement`)\n * and will match the standard element variants (e.g. `my-element`, `my:element`, `data-my-element`, etc).\n *\n * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}\n *\n * If the element selector is prefixed with a `?` then that slot is optional.\n *\n * For example, the transclude object `{ slotA: '?myCustomElement' }` maps `<my-custom-element>` elements to\n * the `slotA` slot, which can be accessed via the `$transclude` function or via the {@link ngTransclude} directive.\n *\n * Slots that are not marked as optional (`?`) will trigger a compile time error if there are no matching elements\n * in the transclude content. If you wish to know if an optional slot was filled with content, then you can call\n * `$transclude.isSlotFilled(slotName)` on the transclude function passed to the directive's link function and\n * injectable into the directive's controller.\n *\n *\n * #### Transclusion Functions\n *\n * When a directive requests transclusion, the compiler extracts its contents and provides a **transclusion\n * function** to the directive's `link` function and `controller`. This transclusion function is a special\n * **linking function** that will return the compiled contents linked to a new transclusion scope.\n *\n * <div class=\"alert alert-info\">\n * If you are just using {@link ngTransclude} then you don't need to worry about this function, since\n * ngTransclude will deal with it for us.\n * </div>\n *\n * If you want to manually control the insertion and removal of the transcluded content in your directive\n * then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery\n * object that contains the compiled DOM, which is linked to the correct transclusion scope.\n *\n * When you call a transclusion function you can pass in a **clone attach function**. This function accepts\n * two parameters, `function(clone, scope) { ... }`, where the `clone` is a fresh compiled copy of your transcluded\n * content and the `scope` is the newly created transclusion scope, to which the clone is bound.\n *\n * <div class=\"alert alert-info\">\n * **Best Practice**: Always provide a `cloneFn` (clone attach function) when you call a transclude function\n * since you then get a fresh clone of the original DOM and also have access to the new transclusion scope.\n * </div>\n *\n * It is normal practice to attach your transcluded content (`clone`) to the DOM inside your **clone\n * attach function**:\n *\n * ```js\n * var transcludedContent, transclusionScope;\n *\n * $transclude(function(clone, scope) {\n *   element.append(clone);\n *   transcludedContent = clone;\n *   transclusionScope = scope;\n * });\n * ```\n *\n * Later, if you want to remove the transcluded content from your DOM then you should also destroy the\n * associated transclusion scope:\n *\n * ```js\n * transcludedContent.remove();\n * transclusionScope.$destroy();\n * ```\n *\n * <div class=\"alert alert-info\">\n * **Best Practice**: if you intend to add and remove transcluded content manually in your directive\n * (by calling the transclude function to get the DOM and calling `element.remove()` to remove it),\n * then you are also responsible for calling `$destroy` on the transclusion scope.\n * </div>\n *\n * The built-in DOM manipulation directives, such as {@link ngIf}, {@link ngSwitch} and {@link ngRepeat}\n * automatically destroy their transcluded clones as necessary so you do not need to worry about this if\n * you are simply using {@link ngTransclude} to inject the transclusion into your directive.\n *\n *\n * #### Transclusion Scopes\n *\n * When you call a transclude function it returns a DOM fragment that is pre-bound to a **transclusion\n * scope**. This scope is special, in that it is a child of the directive's scope (and so gets destroyed\n * when the directive's scope gets destroyed) but it inherits the properties of the scope from which it\n * was taken.\n *\n * For example consider a directive that uses transclusion and isolated scope. The DOM hierarchy might look\n * like this:\n *\n * ```html\n * <div ng-app>\n *   <div isolate>\n *     <div transclusion>\n *     </div>\n *   </div>\n * </div>\n * ```\n *\n * The `$parent` scope hierarchy will look like this:\n *\n   ```\n   - $rootScope\n     - isolate\n       - transclusion\n   ```\n *\n * but the scopes will inherit prototypically from different scopes to their `$parent`.\n *\n   ```\n   - $rootScope\n     - transclusion\n   - isolate\n   ```\n *\n *\n * ### Attributes\n *\n * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the\n * `link()` or `compile()` functions. It has a variety of uses.\n *\n * * *Accessing normalized attribute names:* Directives like 'ngBind' can be expressed in many ways:\n *   'ng:bind', `data-ng-bind`, or 'x-ng-bind'. The attributes object allows for normalized access\n *   to the attributes.\n *\n * * *Directive inter-communication:* All directives share the same instance of the attributes\n *   object which allows the directives to use the attributes object as inter directive\n *   communication.\n *\n * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object\n *   allowing other directives to read the interpolated value.\n *\n * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes\n *   that contain interpolation (e.g. `src=\"{{bar}}\"`). Not only is this very efficient but it's also\n *   the only way to easily get the actual value because during the linking phase the interpolation\n *   hasn't been evaluated yet and so the value is at this time set to `undefined`.\n *\n * ```js\n * function linkingFn(scope, elm, attrs, ctrl) {\n *   // get the attribute value\n *   console.log(attrs.ngModel);\n *\n *   // change the attribute\n *   attrs.$set('ngModel', 'new value');\n *\n *   // observe changes to interpolated attribute\n *   attrs.$observe('ngModel', function(value) {\n *     console.log('ngModel has changed value to ' + value);\n *   });\n * }\n * ```\n *\n * ## Example\n *\n * <div class=\"alert alert-warning\">\n * **Note**: Typically directives are registered with `module.directive`. The example below is\n * to illustrate how `$compile` works.\n * </div>\n *\n <example module=\"compileExample\">\n   <file name=\"index.html\">\n    <script>\n      angular.module('compileExample', [], function($compileProvider) {\n        // configure new 'compile' directive by passing a directive\n        // factory function. The factory function injects the '$compile'\n        $compileProvider.directive('compile', function($compile) {\n          // directive factory creates a link function\n          return function(scope, element, attrs) {\n            scope.$watch(\n              function(scope) {\n                 // watch the 'compile' expression for changes\n                return scope.$eval(attrs.compile);\n              },\n              function(value) {\n                // when the 'compile' expression changes\n                // assign it into the current DOM\n                element.html(value);\n\n                // compile the new DOM and link it to the current\n                // scope.\n                // NOTE: we only compile .childNodes so that\n                // we don't get into infinite loop compiling ourselves\n                $compile(element.contents())(scope);\n              }\n            );\n          };\n        });\n      })\n      .controller('GreeterController', ['$scope', function($scope) {\n        $scope.name = 'Angular';\n        $scope.html = 'Hello {{name}}';\n      }]);\n    </script>\n    <div ng-controller=\"GreeterController\">\n      <input ng-model=\"name\"> <br/>\n      <textarea ng-model=\"html\"></textarea> <br/>\n      <div compile=\"html\"></div>\n    </div>\n   </file>\n   <file name=\"protractor.js\" type=\"protractor\">\n     it('should auto compile', function() {\n       var textarea = $('textarea');\n       var output = $('div[compile]');\n       // The initial state reads 'Hello Angular'.\n       expect(output.getText()).toBe('Hello Angular');\n       textarea.clear();\n       textarea.sendKeys('{{name}}!');\n       expect(output.getText()).toBe('Angular!');\n     });\n   </file>\n </example>\n\n *\n *\n * @param {string|DOMElement} element Element or HTML string to compile into a template function.\n * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives - DEPRECATED.\n *\n * <div class=\"alert alert-danger\">\n * **Note:** Passing a `transclude` function to the $compile function is deprecated, as it\n *   e.g. will not use the right outer scope. Please pass the transclude function as a\n *   `parentBoundTranscludeFn` to the link function instead.\n * </div>\n *\n * @param {number} maxPriority only apply directives lower than given priority (Only effects the\n *                 root element(s), not their children)\n * @returns {function(scope, cloneAttachFn=, options=)} a link function which is used to bind template\n * (a DOM element/tree) to a scope. Where:\n *\n *  * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.\n *  * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the\n *  `template` and call the `cloneAttachFn` function allowing the caller to attach the\n *  cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is\n *  called as: <br/> `cloneAttachFn(clonedElement, scope)` where:\n *\n *      * `clonedElement` - is a clone of the original `element` passed into the compiler.\n *      * `scope` - is the current scope with which the linking function is working with.\n *\n *  * `options` - An optional object hash with linking options. If `options` is provided, then the following\n *  keys may be used to control linking behavior:\n *\n *      * `parentBoundTranscludeFn` - the transclude function made available to\n *        directives; if given, it will be passed through to the link functions of\n *        directives found in `element` during compilation.\n *      * `transcludeControllers` - an object hash with keys that map controller names\n *        to a hash with the key `instance`, which maps to the controller instance;\n *        if given, it will make the controllers available to directives on the compileNode:\n *        ```\n *        {\n *          parent: {\n *            instance: parentControllerInstance\n *          }\n *        }\n *        ```\n *      * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add\n *        the cloned elements; only needed for transcludes that are allowed to contain non html\n *        elements (e.g. SVG elements). See also the directive.controller property.\n *\n * Calling the linking function returns the element of the template. It is either the original\n * element passed in, or the clone of the element if the `cloneAttachFn` is provided.\n *\n * After linking the view is not updated until after a call to $digest which typically is done by\n * Angular automatically.\n *\n * If you need access to the bound view, there are two ways to do it:\n *\n * - If you are not asking the linking function to clone the template, create the DOM element(s)\n *   before you send them to the compiler and keep this reference around.\n *   ```js\n *     var element = $compile('<p>{{total}}</p>')(scope);\n *   ```\n *\n * - if on the other hand, you need the element to be cloned, the view reference from the original\n *   example would not point to the clone, but rather to the original template that was cloned. In\n *   this case, you can access the clone via the cloneAttachFn:\n *   ```js\n *     var templateElement = angular.element('<p>{{total}}</p>'),\n *         scope = ....;\n *\n *     var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {\n *       //attach the clone to DOM document at the right place\n *     });\n *\n *     //now we have reference to the cloned DOM via `clonedElement`\n *   ```\n *\n *\n * For information on how the compiler works, see the\n * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.\n */\n\nvar $compileMinErr = minErr('$compile');\n\n/**\n * @ngdoc provider\n * @name $compileProvider\n *\n * @description\n */\n$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];\nfunction $CompileProvider($provide, $$sanitizeUriProvider) {\n  var hasDirectives = {},\n      Suffix = 'Directive',\n      COMMENT_DIRECTIVE_REGEXP = /^\\s*directive\\:\\s*([\\w\\-]+)\\s+(.*)$/,\n      CLASS_DIRECTIVE_REGEXP = /(([\\w\\-]+)(?:\\:([^;]+))?;?)/,\n      ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset'),\n      REQUIRE_PREFIX_REGEXP = /^(?:(\\^\\^?)?(\\?)?(\\^\\^?)?)?/;\n\n  // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes\n  // The assumption is that future DOM event attribute names will begin with\n  // 'on' and be composed of only English letters.\n  var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;\n  var bindingCache = createMap();\n\n  function parseIsolateBindings(scope, directiveName, isController) {\n    var LOCAL_REGEXP = /^\\s*([@&<]|=(\\*?))(\\??)\\s*(\\w*)\\s*$/;\n\n    var bindings = {};\n\n    forEach(scope, function(definition, scopeName) {\n      if (definition in bindingCache) {\n        bindings[scopeName] = bindingCache[definition];\n        return;\n      }\n      var match = definition.match(LOCAL_REGEXP);\n\n      if (!match) {\n        throw $compileMinErr('iscp',\n            \"Invalid {3} for directive '{0}'.\" +\n            \" Definition: {... {1}: '{2}' ...}\",\n            directiveName, scopeName, definition,\n            (isController ? \"controller bindings definition\" :\n            \"isolate scope definition\"));\n      }\n\n      bindings[scopeName] = {\n        mode: match[1][0],\n        collection: match[2] === '*',\n        optional: match[3] === '?',\n        attrName: match[4] || scopeName\n      };\n      if (match[4]) {\n        bindingCache[definition] = bindings[scopeName];\n      }\n    });\n\n    return bindings;\n  }\n\n  function parseDirectiveBindings(directive, directiveName) {\n    var bindings = {\n      isolateScope: null,\n      bindToController: null\n    };\n    if (isObject(directive.scope)) {\n      if (directive.bindToController === true) {\n        bindings.bindToController = parseIsolateBindings(directive.scope,\n                                                         directiveName, true);\n        bindings.isolateScope = {};\n      } else {\n        bindings.isolateScope = parseIsolateBindings(directive.scope,\n                                                     directiveName, false);\n      }\n    }\n    if (isObject(directive.bindToController)) {\n      bindings.bindToController =\n          parseIsolateBindings(directive.bindToController, directiveName, true);\n    }\n    if (isObject(bindings.bindToController)) {\n      var controller = directive.controller;\n      var controllerAs = directive.controllerAs;\n      if (!controller) {\n        // There is no controller, there may or may not be a controllerAs property\n        throw $compileMinErr('noctrl',\n              \"Cannot bind to controller without directive '{0}'s controller.\",\n              directiveName);\n      } else if (!identifierForController(controller, controllerAs)) {\n        // There is a controller, but no identifier or controllerAs property\n        throw $compileMinErr('noident',\n              \"Cannot bind to controller without identifier for directive '{0}'.\",\n              directiveName);\n      }\n    }\n    return bindings;\n  }\n\n  function assertValidDirectiveName(name) {\n    var letter = name.charAt(0);\n    if (!letter || letter !== lowercase(letter)) {\n      throw $compileMinErr('baddir', \"Directive/Component name '{0}' is invalid. The first character must be a lowercase letter\", name);\n    }\n    if (name !== name.trim()) {\n      throw $compileMinErr('baddir',\n            \"Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces\",\n            name);\n    }\n  }\n\n  /**\n   * @ngdoc method\n   * @name $compileProvider#directive\n   * @kind function\n   *\n   * @description\n   * Register a new directive with the compiler.\n   *\n   * @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which\n   *    will match as <code>ng-bind</code>), or an object map of directives where the keys are the\n   *    names and the values are the factories.\n   * @param {Function|Array} directiveFactory An injectable directive factory function. See the\n   *    {@link guide/directive directive guide} and the {@link $compile compile API} for more info.\n   * @returns {ng.$compileProvider} Self for chaining.\n   */\n  this.directive = function registerDirective(name, directiveFactory) {\n    assertNotHasOwnProperty(name, 'directive');\n    if (isString(name)) {\n      assertValidDirectiveName(name);\n      assertArg(directiveFactory, 'directiveFactory');\n      if (!hasDirectives.hasOwnProperty(name)) {\n        hasDirectives[name] = [];\n        $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',\n          function($injector, $exceptionHandler) {\n            var directives = [];\n            forEach(hasDirectives[name], function(directiveFactory, index) {\n              try {\n                var directive = $injector.invoke(directiveFactory);\n                if (isFunction(directive)) {\n                  directive = { compile: valueFn(directive) };\n                } else if (!directive.compile && directive.link) {\n                  directive.compile = valueFn(directive.link);\n                }\n                directive.priority = directive.priority || 0;\n                directive.index = index;\n                directive.name = directive.name || name;\n                directive.require = directive.require || (directive.controller && directive.name);\n                directive.restrict = directive.restrict || 'EA';\n                directive.$$moduleName = directiveFactory.$$moduleName;\n                directives.push(directive);\n              } catch (e) {\n                $exceptionHandler(e);\n              }\n            });\n            return directives;\n          }]);\n      }\n      hasDirectives[name].push(directiveFactory);\n    } else {\n      forEach(name, reverseParams(registerDirective));\n    }\n    return this;\n  };\n\n  /**\n   * @ngdoc method\n   * @name $compileProvider#component\n   * @module ng\n   * @param {string} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`)\n   * @param {Object} options Component definition object (a simplified\n   *    {@link ng.$compile#directive-definition-object directive definition object}),\n   *    with the following properties (all optional):\n   *\n   *    - `controller` – `{(string|function()=}` – controller constructor function that should be\n   *      associated with newly created scope or the name of a {@link ng.$compile#-controller-\n   *      registered controller} if passed as a string. An empty `noop` function by default.\n   *    - `controllerAs` – `{string=}` – identifier name for to reference the controller in the component's scope.\n   *      If present, the controller will be published to scope under the `controllerAs` name.\n   *      If not present, this will default to be `$ctrl`.\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 as the contents of this component.\n   *      Empty string by default.\n   *\n   *      If `template` is a function, then it is {@link auto.$injector#invoke injected} with\n   *      the following locals:\n   *\n   *      - `$element` - Current element\n   *      - `$attrs` - Current attributes object for the element\n   *\n   *    - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html\n   *      template that should be used  as the contents of this component.\n   *\n   *      If `templateUrl` is a function, then it is {@link auto.$injector#invoke injected} with\n   *      the following locals:\n   *\n   *      - `$element` - Current element\n   *      - `$attrs` - Current attributes object for the element\n   *\n   *    - `bindings` – `{object=}` – defines bindings between DOM attributes and component properties.\n   *      Component properties are always bound to the component controller and not to the scope.\n   *      See {@link ng.$compile#-bindtocontroller- `bindToController`}.\n   *    - `transclude` – `{boolean=}` – whether {@link $compile#transclusion content transclusion} is enabled.\n   *      Disabled by default.\n   *    - `$...` – additional properties to attach to the directive factory function and the controller\n   *      constructor function. (This is used by the component router to annotate)\n   *\n   * @returns {ng.$compileProvider} the compile provider itself, for chaining of function calls.\n   * @description\n   * Register a **component definition** with the compiler. This is a shorthand for registering a special\n   * type of directive, which represents a self-contained UI component in your application. Such components\n   * are always isolated (i.e. `scope: {}`) and are always restricted to elements (i.e. `restrict: 'E'`).\n   *\n   * Component definitions are very simple and do not require as much configuration as defining general\n   * directives. Component definitions usually consist only of a template and a controller backing it.\n   *\n   * In order to make the definition easier, components enforce best practices like use of `controllerAs`,\n   * `bindToController`. They always have **isolate scope** and are restricted to elements.\n   *\n   * Here are a few examples of how you would usually define components:\n   *\n   * ```js\n   *   var myMod = angular.module(...);\n   *   myMod.component('myComp', {\n   *     template: '<div>My name is {{$ctrl.name}}</div>',\n   *     controller: function() {\n   *       this.name = 'shahar';\n   *     }\n   *   });\n   *\n   *   myMod.component('myComp', {\n   *     template: '<div>My name is {{$ctrl.name}}</div>',\n   *     bindings: {name: '@'}\n   *   });\n   *\n   *   myMod.component('myComp', {\n   *     templateUrl: 'views/my-comp.html',\n   *     controller: 'MyCtrl',\n   *     controllerAs: 'ctrl',\n   *     bindings: {name: '@'}\n   *   });\n   *\n   * ```\n   * For more examples, and an in-depth guide, see the {@link guide/component component guide}.\n   *\n   * <br />\n   * See also {@link ng.$compileProvider#directive $compileProvider.directive()}.\n   */\n  this.component = function registerComponent(name, options) {\n    var controller = options.controller || noop;\n\n    function factory($injector) {\n      function makeInjectable(fn) {\n        if (isFunction(fn) || isArray(fn)) {\n          return function(tElement, tAttrs) {\n            return $injector.invoke(fn, this, {$element: tElement, $attrs: tAttrs});\n          };\n        } else {\n          return fn;\n        }\n      }\n\n      var template = (!options.template && !options.templateUrl ? '' : options.template);\n      return {\n        controller: controller,\n        controllerAs: identifierForController(options.controller) || options.controllerAs || '$ctrl',\n        template: makeInjectable(template),\n        templateUrl: makeInjectable(options.templateUrl),\n        transclude: options.transclude,\n        scope: {},\n        bindToController: options.bindings || {},\n        restrict: 'E',\n        require: options.require\n      };\n    }\n\n    // Copy any annotation properties (starting with $) over to the factory function\n    // These could be used by libraries such as the new component router\n    forEach(options, function(val, key) {\n      if (key.charAt(0) === '$') {\n        factory[key] = val;\n        controller[key] = val;\n      }\n    });\n\n    factory.$inject = ['$injector'];\n\n    return this.directive(name, factory);\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name $compileProvider#aHrefSanitizationWhitelist\n   * @kind function\n   *\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during a[href] sanitization.\n   *\n   * The sanitization is a security measure aimed at preventing XSS attacks via html links.\n   *\n   * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.aHrefSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);\n      return this;\n    } else {\n      return $$sanitizeUriProvider.aHrefSanitizationWhitelist();\n    }\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name $compileProvider#imgSrcSanitizationWhitelist\n   * @kind function\n   *\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during img[src] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.imgSrcSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);\n      return this;\n    } else {\n      return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name  $compileProvider#debugInfoEnabled\n   *\n   * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the\n   * current debugInfoEnabled state\n   * @returns {*} current value if used as getter or itself (chaining) if used as setter\n   *\n   * @kind function\n   *\n   * @description\n   * Call this method to enable/disable various debug runtime information in the compiler such as adding\n   * binding information and a reference to the current scope on to DOM elements.\n   * If enabled, the compiler will add the following to DOM elements that have been bound to the scope\n   * * `ng-binding` CSS class\n   * * `$binding` data property containing an array of the binding expressions\n   *\n   * You may want to disable this in production for a significant performance boost. See\n   * {@link guide/production#disabling-debug-data Disabling Debug Data} for more.\n   *\n   * The default value is true.\n   */\n  var debugInfoEnabled = true;\n  this.debugInfoEnabled = function(enabled) {\n    if (isDefined(enabled)) {\n      debugInfoEnabled = enabled;\n      return this;\n    }\n    return debugInfoEnabled;\n  };\n\n\n  var TTL = 10;\n  /**\n   * @ngdoc method\n   * @name $compileProvider#onChangesTtl\n   * @description\n   *\n   * Sets the number of times `$onChanges` hooks can trigger new changes before giving up and\n   * assuming that the model is unstable.\n   *\n   * The current default is 10 iterations.\n   *\n   * In complex applications it's possible that dependencies between `$onChanges` hooks and bindings will result\n   * in several iterations of calls to these hooks. However if an application needs more than the default 10\n   * iterations to stabilize then you should investigate what is causing the model to continuously change during\n   * the `$onChanges` hook execution.\n   *\n   * Increasing the TTL could have performance implications, so you should not change it without proper justification.\n   *\n   * @param {number} limit The number of `$onChanges` hook iterations.\n   * @returns {number|object} the current limit (or `this` if called as a setter for chaining)\n   */\n  this.onChangesTtl = function(value) {\n    if (arguments.length) {\n      TTL = value;\n      return this;\n    }\n    return TTL;\n  };\n\n  this.$get = [\n            '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse',\n            '$controller', '$rootScope', '$sce', '$animate', '$$sanitizeUri',\n    function($injector,   $interpolate,   $exceptionHandler,   $templateRequest,   $parse,\n             $controller,   $rootScope,   $sce,   $animate,   $$sanitizeUri) {\n\n    var SIMPLE_ATTR_NAME = /^\\w/;\n    var specialAttrHolder = document.createElement('div');\n\n\n\n    var onChangesTtl = TTL;\n    // The onChanges hooks should all be run together in a single digest\n    // When changes occur, the call to trigger their hooks will be added to this queue\n    var onChangesQueue;\n\n    // This function is called in a $$postDigest to trigger all the onChanges hooks in a single digest\n    function flushOnChangesQueue() {\n      try {\n        if (!(--onChangesTtl)) {\n          // We have hit the TTL limit so reset everything\n          onChangesQueue = undefined;\n          throw $compileMinErr('infchng', '{0} $onChanges() iterations reached. Aborting!\\n', TTL);\n        }\n        // We must run this hook in an apply since the $$postDigest runs outside apply\n        $rootScope.$apply(function() {\n          for (var i = 0, ii = onChangesQueue.length; i < ii; ++i) {\n            onChangesQueue[i]();\n          }\n          // Reset the queue to trigger a new schedule next time there is a change\n          onChangesQueue = undefined;\n        });\n      } finally {\n        onChangesTtl++;\n      }\n    }\n\n\n    function Attributes(element, attributesToCopy) {\n      if (attributesToCopy) {\n        var keys = Object.keys(attributesToCopy);\n        var i, l, key;\n\n        for (i = 0, l = keys.length; i < l; i++) {\n          key = keys[i];\n          this[key] = attributesToCopy[key];\n        }\n      } else {\n        this.$attr = {};\n      }\n\n      this.$$element = element;\n    }\n\n    Attributes.prototype = {\n      /**\n       * @ngdoc method\n       * @name $compile.directive.Attributes#$normalize\n       * @kind function\n       *\n       * @description\n       * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or\n       * `data-`) to its normalized, camelCase form.\n       *\n       * Also there is special case for Moz prefix starting with upper case letter.\n       *\n       * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}\n       *\n       * @param {string} name Name to normalize\n       */\n      $normalize: directiveNormalize,\n\n\n      /**\n       * @ngdoc method\n       * @name $compile.directive.Attributes#$addClass\n       * @kind function\n       *\n       * @description\n       * Adds the CSS class value specified by the classVal parameter to the element. If animations\n       * are enabled then an animation will be triggered for the class addition.\n       *\n       * @param {string} classVal The className value that will be added to the element\n       */\n      $addClass: function(classVal) {\n        if (classVal && classVal.length > 0) {\n          $animate.addClass(this.$$element, classVal);\n        }\n      },\n\n      /**\n       * @ngdoc method\n       * @name $compile.directive.Attributes#$removeClass\n       * @kind function\n       *\n       * @description\n       * Removes the CSS class value specified by the classVal parameter from the element. If\n       * animations are enabled then an animation will be triggered for the class removal.\n       *\n       * @param {string} classVal The className value that will be removed from the element\n       */\n      $removeClass: function(classVal) {\n        if (classVal && classVal.length > 0) {\n          $animate.removeClass(this.$$element, classVal);\n        }\n      },\n\n      /**\n       * @ngdoc method\n       * @name $compile.directive.Attributes#$updateClass\n       * @kind function\n       *\n       * @description\n       * Adds and removes the appropriate CSS class values to the element based on the difference\n       * between the new and old CSS class values (specified as newClasses and oldClasses).\n       *\n       * @param {string} newClasses The current CSS className value\n       * @param {string} oldClasses The former CSS className value\n       */\n      $updateClass: function(newClasses, oldClasses) {\n        var toAdd = tokenDifference(newClasses, oldClasses);\n        if (toAdd && toAdd.length) {\n          $animate.addClass(this.$$element, toAdd);\n        }\n\n        var toRemove = tokenDifference(oldClasses, newClasses);\n        if (toRemove && toRemove.length) {\n          $animate.removeClass(this.$$element, toRemove);\n        }\n      },\n\n      /**\n       * Set a normalized attribute on the element in a way such that all directives\n       * can share the attribute. This function properly handles boolean attributes.\n       * @param {string} key Normalized key. (ie ngAttribute)\n       * @param {string|boolean} value The value to set. If `null` attribute will be deleted.\n       * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.\n       *     Defaults to true.\n       * @param {string=} attrName Optional none normalized name. Defaults to key.\n       */\n      $set: function(key, value, writeAttr, attrName) {\n        // TODO: decide whether or not to throw an error if \"class\"\n        //is set through this function since it may cause $updateClass to\n        //become unstable.\n\n        var node = this.$$element[0],\n            booleanKey = getBooleanAttrName(node, key),\n            aliasedKey = getAliasedAttrName(key),\n            observer = key,\n            nodeName;\n\n        if (booleanKey) {\n          this.$$element.prop(key, value);\n          attrName = booleanKey;\n        } else if (aliasedKey) {\n          this[aliasedKey] = value;\n          observer = aliasedKey;\n        }\n\n        this[key] = value;\n\n        // translate normalized key to actual key\n        if (attrName) {\n          this.$attr[key] = attrName;\n        } else {\n          attrName = this.$attr[key];\n          if (!attrName) {\n            this.$attr[key] = attrName = snake_case(key, '-');\n          }\n        }\n\n        nodeName = nodeName_(this.$$element);\n\n        if ((nodeName === 'a' && (key === 'href' || key === 'xlinkHref')) ||\n            (nodeName === 'img' && key === 'src')) {\n          // sanitize a[href] and img[src] values\n          this[key] = value = $$sanitizeUri(value, key === 'src');\n        } else if (nodeName === 'img' && key === 'srcset') {\n          // sanitize img[srcset] values\n          var result = \"\";\n\n          // first check if there are spaces because it's not the same pattern\n          var trimmedSrcset = trim(value);\n          //                (   999x   ,|   999w   ,|   ,|,   )\n          var srcPattern = /(\\s+\\d+x\\s*,|\\s+\\d+w\\s*,|\\s+,|,\\s+)/;\n          var pattern = /\\s/.test(trimmedSrcset) ? srcPattern : /(,)/;\n\n          // split srcset into tuple of uri and descriptor except for the last item\n          var rawUris = trimmedSrcset.split(pattern);\n\n          // for each tuples\n          var nbrUrisWith2parts = Math.floor(rawUris.length / 2);\n          for (var i = 0; i < nbrUrisWith2parts; i++) {\n            var innerIdx = i * 2;\n            // sanitize the uri\n            result += $$sanitizeUri(trim(rawUris[innerIdx]), true);\n            // add the descriptor\n            result += (\" \" + trim(rawUris[innerIdx + 1]));\n          }\n\n          // split the last item into uri and descriptor\n          var lastTuple = trim(rawUris[i * 2]).split(/\\s/);\n\n          // sanitize the last uri\n          result += $$sanitizeUri(trim(lastTuple[0]), true);\n\n          // and add the last descriptor if any\n          if (lastTuple.length === 2) {\n            result += (\" \" + trim(lastTuple[1]));\n          }\n          this[key] = value = result;\n        }\n\n        if (writeAttr !== false) {\n          if (value === null || isUndefined(value)) {\n            this.$$element.removeAttr(attrName);\n          } else {\n            if (SIMPLE_ATTR_NAME.test(attrName)) {\n              this.$$element.attr(attrName, value);\n            } else {\n              setSpecialAttr(this.$$element[0], attrName, value);\n            }\n          }\n        }\n\n        // fire observers\n        var $$observers = this.$$observers;\n        $$observers && forEach($$observers[observer], function(fn) {\n          try {\n            fn(value);\n          } catch (e) {\n            $exceptionHandler(e);\n          }\n        });\n      },\n\n\n      /**\n       * @ngdoc method\n       * @name $compile.directive.Attributes#$observe\n       * @kind function\n       *\n       * @description\n       * Observes an interpolated attribute.\n       *\n       * The observer function will be invoked once during the next `$digest` following\n       * compilation. The observer is then invoked whenever the interpolated value\n       * changes.\n       *\n       * @param {string} key Normalized key. (ie ngAttribute) .\n       * @param {function(interpolatedValue)} fn Function that will be called whenever\n                the interpolated value of the attribute changes.\n       *        See the {@link guide/interpolation#how-text-and-attribute-bindings-work Interpolation\n       *        guide} for more info.\n       * @returns {function()} Returns a deregistration function for this observer.\n       */\n      $observe: function(key, fn) {\n        var attrs = this,\n            $$observers = (attrs.$$observers || (attrs.$$observers = createMap())),\n            listeners = ($$observers[key] || ($$observers[key] = []));\n\n        listeners.push(fn);\n        $rootScope.$evalAsync(function() {\n          if (!listeners.$$inter && attrs.hasOwnProperty(key) && !isUndefined(attrs[key])) {\n            // no one registered attribute interpolation function, so lets call it manually\n            fn(attrs[key]);\n          }\n        });\n\n        return function() {\n          arrayRemove(listeners, fn);\n        };\n      }\n    };\n\n    function setSpecialAttr(element, attrName, value) {\n      // Attributes names that do not start with letters (such as `(click)`) cannot be set using `setAttribute`\n      // so we have to jump through some hoops to get such an attribute\n      // https://github.com/angular/angular.js/pull/13318\n      specialAttrHolder.innerHTML = \"<span \" + attrName + \">\";\n      var attributes = specialAttrHolder.firstChild.attributes;\n      var attribute = attributes[0];\n      // We have to remove the attribute from its container element before we can add it to the destination element\n      attributes.removeNamedItem(attribute.name);\n      attribute.value = value;\n      element.attributes.setNamedItem(attribute);\n    }\n\n    function safeAddClass($element, className) {\n      try {\n        $element.addClass(className);\n      } catch (e) {\n        // ignore, since it means that we are trying to set class on\n        // SVG element, where class name is read-only.\n      }\n    }\n\n\n    var startSymbol = $interpolate.startSymbol(),\n        endSymbol = $interpolate.endSymbol(),\n        denormalizeTemplate = (startSymbol == '{{' && endSymbol  == '}}')\n            ? identity\n            : function denormalizeTemplate(template) {\n              return template.replace(/\\{\\{/g, startSymbol).replace(/}}/g, endSymbol);\n        },\n        NG_ATTR_BINDING = /^ngAttr[A-Z]/;\n    var MULTI_ELEMENT_DIR_RE = /^(.+)Start$/;\n\n    compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) {\n      var bindings = $element.data('$binding') || [];\n\n      if (isArray(binding)) {\n        bindings = bindings.concat(binding);\n      } else {\n        bindings.push(binding);\n      }\n\n      $element.data('$binding', bindings);\n    } : noop;\n\n    compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) {\n      safeAddClass($element, 'ng-binding');\n    } : noop;\n\n    compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) {\n      var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';\n      $element.data(dataName, scope);\n    } : noop;\n\n    compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) {\n      safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope');\n    } : noop;\n\n    compile.$$createComment = function(directiveName, comment) {\n      var content = '';\n      if (debugInfoEnabled) {\n        content = ' ' + (directiveName || '') + ': ' + (comment || '') + ' ';\n      }\n      return document.createComment(content);\n    };\n\n    return compile;\n\n    //================================\n\n    function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,\n                        previousCompileContext) {\n      if (!($compileNodes instanceof jqLite)) {\n        // jquery always rewraps, whereas we need to preserve the original selector so that we can\n        // modify it.\n        $compileNodes = jqLite($compileNodes);\n      }\n\n      var NOT_EMPTY = /\\S+/;\n\n      // We can not compile top level text elements since text nodes can be merged and we will\n      // not be able to attach scope data to them, so we will wrap them in <span>\n      for (var i = 0, len = $compileNodes.length; i < len; i++) {\n        var domNode = $compileNodes[i];\n\n        if (domNode.nodeType === NODE_TYPE_TEXT && domNode.nodeValue.match(NOT_EMPTY) /* non-empty */) {\n          jqLiteWrapNode(domNode, $compileNodes[i] = document.createElement('span'));\n        }\n      }\n\n      var compositeLinkFn =\n              compileNodes($compileNodes, transcludeFn, $compileNodes,\n                           maxPriority, ignoreDirective, previousCompileContext);\n      compile.$$addScopeClass($compileNodes);\n      var namespace = null;\n      return function publicLinkFn(scope, cloneConnectFn, options) {\n        assertArg(scope, 'scope');\n\n        if (previousCompileContext && previousCompileContext.needsNewScope) {\n          // A parent directive did a replace and a directive on this element asked\n          // for transclusion, which caused us to lose a layer of element on which\n          // we could hold the new transclusion scope, so we will create it manually\n          // here.\n          scope = scope.$parent.$new();\n        }\n\n        options = options || {};\n        var parentBoundTranscludeFn = options.parentBoundTranscludeFn,\n          transcludeControllers = options.transcludeControllers,\n          futureParentElement = options.futureParentElement;\n\n        // When `parentBoundTranscludeFn` is passed, it is a\n        // `controllersBoundTransclude` function (it was previously passed\n        // as `transclude` to directive.link) so we must unwrap it to get\n        // its `boundTranscludeFn`\n        if (parentBoundTranscludeFn && parentBoundTranscludeFn.$$boundTransclude) {\n          parentBoundTranscludeFn = parentBoundTranscludeFn.$$boundTransclude;\n        }\n\n        if (!namespace) {\n          namespace = detectNamespaceForChildElements(futureParentElement);\n        }\n        var $linkNode;\n        if (namespace !== 'html') {\n          // When using a directive with replace:true and templateUrl the $compileNodes\n          // (or a child element inside of them)\n          // might change, so we need to recreate the namespace adapted compileNodes\n          // for call to the link function.\n          // Note: This will already clone the nodes...\n          $linkNode = jqLite(\n            wrapTemplate(namespace, jqLite('<div>').append($compileNodes).html())\n          );\n        } else if (cloneConnectFn) {\n          // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart\n          // and sometimes changes the structure of the DOM.\n          $linkNode = JQLitePrototype.clone.call($compileNodes);\n        } else {\n          $linkNode = $compileNodes;\n        }\n\n        if (transcludeControllers) {\n          for (var controllerName in transcludeControllers) {\n            $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance);\n          }\n        }\n\n        compile.$$addScopeInfo($linkNode, scope);\n\n        if (cloneConnectFn) cloneConnectFn($linkNode, scope);\n        if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);\n        return $linkNode;\n      };\n    }\n\n    function detectNamespaceForChildElements(parentElement) {\n      // TODO: Make this detect MathML as well...\n      var node = parentElement && parentElement[0];\n      if (!node) {\n        return 'html';\n      } else {\n        return nodeName_(node) !== 'foreignobject' && toString.call(node).match(/SVG/) ? 'svg' : 'html';\n      }\n    }\n\n    /**\n     * Compile function matches each node in nodeList against the directives. Once all directives\n     * for a particular node are collected their compile functions are executed. The compile\n     * functions return values - the linking functions - are combined into a composite linking\n     * function, which is the a linking function for the node.\n     *\n     * @param {NodeList} nodeList an array of nodes or NodeList to compile\n     * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n     *        scope argument is auto-generated to the new child of the transcluded parent scope.\n     * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then\n     *        the rootElement must be set the jqLite collection of the compile root. This is\n     *        needed so that the jqLite collection items can be replaced with widgets.\n     * @param {number=} maxPriority Max directive priority.\n     * @returns {Function} A composite linking function of all of the matched directives or null.\n     */\n    function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,\n                            previousCompileContext) {\n      var linkFns = [],\n          attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound;\n\n      for (var i = 0; i < nodeList.length; i++) {\n        attrs = new Attributes();\n\n        // we must always refer to nodeList[i] since the nodes can be replaced underneath us.\n        directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,\n                                        ignoreDirective);\n\n        nodeLinkFn = (directives.length)\n            ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,\n                                      null, [], [], previousCompileContext)\n            : null;\n\n        if (nodeLinkFn && nodeLinkFn.scope) {\n          compile.$$addScopeClass(attrs.$$element);\n        }\n\n        childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||\n                      !(childNodes = nodeList[i].childNodes) ||\n                      !childNodes.length)\n            ? null\n            : compileNodes(childNodes,\n                 nodeLinkFn ? (\n                  (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)\n                     && nodeLinkFn.transclude) : transcludeFn);\n\n        if (nodeLinkFn || childLinkFn) {\n          linkFns.push(i, nodeLinkFn, childLinkFn);\n          linkFnFound = true;\n          nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn;\n        }\n\n        //use the previous context only for the first element in the virtual group\n        previousCompileContext = null;\n      }\n\n      // return a linking function if we have found anything, null otherwise\n      return linkFnFound ? compositeLinkFn : null;\n\n      function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {\n        var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn;\n        var stableNodeList;\n\n\n        if (nodeLinkFnFound) {\n          // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our\n          // offsets don't get screwed up\n          var nodeListLength = nodeList.length;\n          stableNodeList = new Array(nodeListLength);\n\n          // create a sparse array by only copying the elements which have a linkFn\n          for (i = 0; i < linkFns.length; i+=3) {\n            idx = linkFns[i];\n            stableNodeList[idx] = nodeList[idx];\n          }\n        } else {\n          stableNodeList = nodeList;\n        }\n\n        for (i = 0, ii = linkFns.length; i < ii;) {\n          node = stableNodeList[linkFns[i++]];\n          nodeLinkFn = linkFns[i++];\n          childLinkFn = linkFns[i++];\n\n          if (nodeLinkFn) {\n            if (nodeLinkFn.scope) {\n              childScope = scope.$new();\n              compile.$$addScopeInfo(jqLite(node), childScope);\n            } else {\n              childScope = scope;\n            }\n\n            if (nodeLinkFn.transcludeOnThisElement) {\n              childBoundTranscludeFn = createBoundTranscludeFn(\n                  scope, nodeLinkFn.transclude, parentBoundTranscludeFn);\n\n            } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {\n              childBoundTranscludeFn = parentBoundTranscludeFn;\n\n            } else if (!parentBoundTranscludeFn && transcludeFn) {\n              childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);\n\n            } else {\n              childBoundTranscludeFn = null;\n            }\n\n            nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);\n\n          } else if (childLinkFn) {\n            childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);\n          }\n        }\n      }\n    }\n\n    function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {\n      function boundTranscludeFn(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {\n\n        if (!transcludedScope) {\n          transcludedScope = scope.$new(false, containingScope);\n          transcludedScope.$$transcluded = true;\n        }\n\n        return transcludeFn(transcludedScope, cloneFn, {\n          parentBoundTranscludeFn: previousBoundTranscludeFn,\n          transcludeControllers: controllers,\n          futureParentElement: futureParentElement\n        });\n      }\n\n      // We need  to attach the transclusion slots onto the `boundTranscludeFn`\n      // so that they are available inside the `controllersBoundTransclude` function\n      var boundSlots = boundTranscludeFn.$$slots = createMap();\n      for (var slotName in transcludeFn.$$slots) {\n        if (transcludeFn.$$slots[slotName]) {\n          boundSlots[slotName] = createBoundTranscludeFn(scope, transcludeFn.$$slots[slotName], previousBoundTranscludeFn);\n        } else {\n          boundSlots[slotName] = null;\n        }\n      }\n\n      return boundTranscludeFn;\n    }\n\n    /**\n     * Looks for directives on the given node and adds them to the directive collection which is\n     * sorted.\n     *\n     * @param node Node to search.\n     * @param directives An array to which the directives are added to. This array is sorted before\n     *        the function returns.\n     * @param attrs The shared attrs object which is used to populate the normalized attributes.\n     * @param {number=} maxPriority Max directive priority.\n     */\n    function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {\n      var nodeType = node.nodeType,\n          attrsMap = attrs.$attr,\n          match,\n          className;\n\n      switch (nodeType) {\n        case NODE_TYPE_ELEMENT: /* Element */\n          // use the node name: <directive>\n          addDirective(directives,\n              directiveNormalize(nodeName_(node)), 'E', maxPriority, ignoreDirective);\n\n          // iterate over the attributes\n          for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,\n                   j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {\n            var attrStartName = false;\n            var attrEndName = false;\n\n            attr = nAttrs[j];\n            name = attr.name;\n            value = trim(attr.value);\n\n            // support ngAttr attribute binding\n            ngAttrName = directiveNormalize(name);\n            if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {\n              name = name.replace(PREFIX_REGEXP, '')\n                .substr(8).replace(/_(.)/g, function(match, letter) {\n                  return letter.toUpperCase();\n                });\n            }\n\n            var multiElementMatch = ngAttrName.match(MULTI_ELEMENT_DIR_RE);\n            if (multiElementMatch && directiveIsMultiElement(multiElementMatch[1])) {\n              attrStartName = name;\n              attrEndName = name.substr(0, name.length - 5) + 'end';\n              name = name.substr(0, name.length - 6);\n            }\n\n            nName = directiveNormalize(name.toLowerCase());\n            attrsMap[nName] = name;\n            if (isNgAttr || !attrs.hasOwnProperty(nName)) {\n                attrs[nName] = value;\n                if (getBooleanAttrName(node, nName)) {\n                  attrs[nName] = true; // presence means true\n                }\n            }\n            addAttrInterpolateDirective(node, directives, value, nName, isNgAttr);\n            addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,\n                          attrEndName);\n          }\n\n          // use class as directive\n          className = node.className;\n          if (isObject(className)) {\n              // Maybe SVGAnimatedString\n              className = className.animVal;\n          }\n          if (isString(className) && className !== '') {\n            while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {\n              nName = directiveNormalize(match[2]);\n              if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {\n                attrs[nName] = trim(match[3]);\n              }\n              className = className.substr(match.index + match[0].length);\n            }\n          }\n          break;\n        case NODE_TYPE_TEXT: /* Text Node */\n          if (msie === 11) {\n            // Workaround for #11781\n            while (node.parentNode && node.nextSibling && node.nextSibling.nodeType === NODE_TYPE_TEXT) {\n              node.nodeValue = node.nodeValue + node.nextSibling.nodeValue;\n              node.parentNode.removeChild(node.nextSibling);\n            }\n          }\n          addTextInterpolateDirective(directives, node.nodeValue);\n          break;\n        case NODE_TYPE_COMMENT: /* Comment */\n          try {\n            match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);\n            if (match) {\n              nName = directiveNormalize(match[1]);\n              if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {\n                attrs[nName] = trim(match[2]);\n              }\n            }\n          } catch (e) {\n            // turns out that under some circumstances IE9 throws errors when one attempts to read\n            // comment's node value.\n            // Just ignore it and continue. (Can't seem to reproduce in test case.)\n          }\n          break;\n      }\n\n      directives.sort(byPriority);\n      return directives;\n    }\n\n    /**\n     * Given a node with an directive-start it collects all of the siblings until it finds\n     * directive-end.\n     * @param node\n     * @param attrStart\n     * @param attrEnd\n     * @returns {*}\n     */\n    function groupScan(node, attrStart, attrEnd) {\n      var nodes = [];\n      var depth = 0;\n      if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {\n        do {\n          if (!node) {\n            throw $compileMinErr('uterdir',\n                      \"Unterminated attribute, found '{0}' but no matching '{1}' found.\",\n                      attrStart, attrEnd);\n          }\n          if (node.nodeType == NODE_TYPE_ELEMENT) {\n            if (node.hasAttribute(attrStart)) depth++;\n            if (node.hasAttribute(attrEnd)) depth--;\n          }\n          nodes.push(node);\n          node = node.nextSibling;\n        } while (depth > 0);\n      } else {\n        nodes.push(node);\n      }\n\n      return jqLite(nodes);\n    }\n\n    /**\n     * Wrapper for linking function which converts normal linking function into a grouped\n     * linking function.\n     * @param linkFn\n     * @param attrStart\n     * @param attrEnd\n     * @returns {Function}\n     */\n    function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {\n      return function groupedElementsLink(scope, element, attrs, controllers, transcludeFn) {\n        element = groupScan(element[0], attrStart, attrEnd);\n        return linkFn(scope, element, attrs, controllers, transcludeFn);\n      };\n    }\n\n    /**\n     * A function generator that is used to support both eager and lazy compilation\n     * linking function.\n     * @param eager\n     * @param $compileNodes\n     * @param transcludeFn\n     * @param maxPriority\n     * @param ignoreDirective\n     * @param previousCompileContext\n     * @returns {Function}\n     */\n    function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) {\n      var compiled;\n\n      if (eager) {\n        return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);\n      }\n      return function lazyCompilation() {\n        if (!compiled) {\n          compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);\n\n          // Null out all of these references in order to make them eligible for garbage collection\n          // since this is a potentially long lived closure\n          $compileNodes = transcludeFn = previousCompileContext = null;\n        }\n        return compiled.apply(this, arguments);\n      };\n    }\n\n    /**\n     * Once the directives have been collected, their compile functions are executed. This method\n     * is responsible for inlining directive templates as well as terminating the application\n     * of the directives if the terminal directive has been reached.\n     *\n     * @param {Array} directives Array of collected directives to execute their compile function.\n     *        this needs to be pre-sorted by priority order.\n     * @param {Node} compileNode The raw DOM node to apply the compile functions to\n     * @param {Object} templateAttrs The shared attribute function\n     * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n     *                                                  scope argument is auto-generated to the new\n     *                                                  child of the transcluded parent scope.\n     * @param {JQLite} jqCollection If we are working on the root of the compile tree then this\n     *                              argument has the root jqLite array so that we can replace nodes\n     *                              on it.\n     * @param {Object=} originalReplaceDirective An optional directive that will be ignored when\n     *                                           compiling the transclusion.\n     * @param {Array.<Function>} preLinkFns\n     * @param {Array.<Function>} postLinkFns\n     * @param {Object} previousCompileContext Context used for previous compilation of the current\n     *                                        node\n     * @returns {Function} linkFn\n     */\n    function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,\n                                   jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,\n                                   previousCompileContext) {\n      previousCompileContext = previousCompileContext || {};\n\n      var terminalPriority = -Number.MAX_VALUE,\n          newScopeDirective = previousCompileContext.newScopeDirective,\n          controllerDirectives = previousCompileContext.controllerDirectives,\n          newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,\n          templateDirective = previousCompileContext.templateDirective,\n          nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,\n          hasTranscludeDirective = false,\n          hasTemplate = false,\n          hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,\n          $compileNode = templateAttrs.$$element = jqLite(compileNode),\n          directive,\n          directiveName,\n          $template,\n          replaceDirective = originalReplaceDirective,\n          childTranscludeFn = transcludeFn,\n          linkFn,\n          didScanForMultipleTransclusion = false,\n          mightHaveMultipleTransclusionError = false,\n          directiveValue;\n\n      // executes all directives on the current element\n      for (var i = 0, ii = directives.length; i < ii; i++) {\n        directive = directives[i];\n        var attrStart = directive.$$start;\n        var attrEnd = directive.$$end;\n\n        // collect multiblock sections\n        if (attrStart) {\n          $compileNode = groupScan(compileNode, attrStart, attrEnd);\n        }\n        $template = undefined;\n\n        if (terminalPriority > directive.priority) {\n          break; // prevent further processing of directives\n        }\n\n        if (directiveValue = directive.scope) {\n\n          // skip the check for directives with async templates, we'll check the derived sync\n          // directive when the template arrives\n          if (!directive.templateUrl) {\n            if (isObject(directiveValue)) {\n              // This directive is trying to add an isolated scope.\n              // Check that there is no scope of any kind already\n              assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective,\n                                directive, $compileNode);\n              newIsolateScopeDirective = directive;\n            } else {\n              // This directive is trying to add a child scope.\n              // Check that there is no isolated scope already\n              assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,\n                                $compileNode);\n            }\n          }\n\n          newScopeDirective = newScopeDirective || directive;\n        }\n\n        directiveName = directive.name;\n\n        // If we encounter a condition that can result in transclusion on the directive,\n        // then scan ahead in the remaining directives for others that may cause a multiple\n        // transclusion error to be thrown during the compilation process.  If a matching directive\n        // is found, then we know that when we encounter a transcluded directive, we need to eagerly\n        // compile the `transclude` function rather than doing it lazily in order to throw\n        // exceptions at the correct time\n        if (!didScanForMultipleTransclusion && ((directive.replace && (directive.templateUrl || directive.template))\n            || (directive.transclude && !directive.$$tlb))) {\n                var candidateDirective;\n\n                for (var scanningIndex = i + 1; candidateDirective = directives[scanningIndex++];) {\n                    if ((candidateDirective.transclude && !candidateDirective.$$tlb)\n                        || (candidateDirective.replace && (candidateDirective.templateUrl || candidateDirective.template))) {\n                        mightHaveMultipleTransclusionError = true;\n                        break;\n                    }\n                }\n\n                didScanForMultipleTransclusion = true;\n        }\n\n        if (!directive.templateUrl && directive.controller) {\n          directiveValue = directive.controller;\n          controllerDirectives = controllerDirectives || createMap();\n          assertNoDuplicate(\"'\" + directiveName + \"' controller\",\n              controllerDirectives[directiveName], directive, $compileNode);\n          controllerDirectives[directiveName] = directive;\n        }\n\n        if (directiveValue = directive.transclude) {\n          hasTranscludeDirective = true;\n\n          // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.\n          // This option should only be used by directives that know how to safely handle element transclusion,\n          // where the transcluded nodes are added or replaced after linking.\n          if (!directive.$$tlb) {\n            assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);\n            nonTlbTranscludeDirective = directive;\n          }\n\n          if (directiveValue == 'element') {\n            hasElementTranscludeDirective = true;\n            terminalPriority = directive.priority;\n            $template = $compileNode;\n            $compileNode = templateAttrs.$$element =\n                jqLite(compile.$$createComment(directiveName, templateAttrs[directiveName]));\n            compileNode = $compileNode[0];\n            replaceWith(jqCollection, sliceArgs($template), compileNode);\n\n            // Support: Chrome < 50\n            // https://github.com/angular/angular.js/issues/14041\n\n            // In the versions of V8 prior to Chrome 50, the document fragment that is created\n            // in the `replaceWith` function is improperly garbage collected despite still\n            // being referenced by the `parentNode` property of all of the child nodes.  By adding\n            // a reference to the fragment via a different property, we can avoid that incorrect\n            // behavior.\n            // TODO: remove this line after Chrome 50 has been released\n            $template[0].$$parentNode = $template[0].parentNode;\n\n            childTranscludeFn = compilationGenerator(mightHaveMultipleTransclusionError, $template, transcludeFn, terminalPriority,\n                                        replaceDirective && replaceDirective.name, {\n                                          // Don't pass in:\n                                          // - controllerDirectives - otherwise we'll create duplicates controllers\n                                          // - newIsolateScopeDirective or templateDirective - combining templates with\n                                          //   element transclusion doesn't make sense.\n                                          //\n                                          // We need only nonTlbTranscludeDirective so that we prevent putting transclusion\n                                          // on the same element more than once.\n                                          nonTlbTranscludeDirective: nonTlbTranscludeDirective\n                                        });\n          } else {\n\n            var slots = createMap();\n\n            $template = jqLite(jqLiteClone(compileNode)).contents();\n\n            if (isObject(directiveValue)) {\n\n              // We have transclusion slots,\n              // collect them up, compile them and store their transclusion functions\n              $template = [];\n\n              var slotMap = createMap();\n              var filledSlots = createMap();\n\n              // Parse the element selectors\n              forEach(directiveValue, function(elementSelector, slotName) {\n                // If an element selector starts with a ? then it is optional\n                var optional = (elementSelector.charAt(0) === '?');\n                elementSelector = optional ? elementSelector.substring(1) : elementSelector;\n\n                slotMap[elementSelector] = slotName;\n\n                // We explicitly assign `null` since this implies that a slot was defined but not filled.\n                // Later when calling boundTransclusion functions with a slot name we only error if the\n                // slot is `undefined`\n                slots[slotName] = null;\n\n                // filledSlots contains `true` for all slots that are either optional or have been\n                // filled. This is used to check that we have not missed any required slots\n                filledSlots[slotName] = optional;\n              });\n\n              // Add the matching elements into their slot\n              forEach($compileNode.contents(), function(node) {\n                var slotName = slotMap[directiveNormalize(nodeName_(node))];\n                if (slotName) {\n                  filledSlots[slotName] = true;\n                  slots[slotName] = slots[slotName] || [];\n                  slots[slotName].push(node);\n                } else {\n                  $template.push(node);\n                }\n              });\n\n              // Check for required slots that were not filled\n              forEach(filledSlots, function(filled, slotName) {\n                if (!filled) {\n                  throw $compileMinErr('reqslot', 'Required transclusion slot `{0}` was not filled.', slotName);\n                }\n              });\n\n              for (var slotName in slots) {\n                if (slots[slotName]) {\n                  // Only define a transclusion function if the slot was filled\n                  slots[slotName] = compilationGenerator(mightHaveMultipleTransclusionError, slots[slotName], transcludeFn);\n                }\n              }\n            }\n\n            $compileNode.empty(); // clear contents\n            childTranscludeFn = compilationGenerator(mightHaveMultipleTransclusionError, $template, transcludeFn, undefined,\n                undefined, { needsNewScope: directive.$$isolateScope || directive.$$newScope});\n            childTranscludeFn.$$slots = slots;\n          }\n        }\n\n        if (directive.template) {\n          hasTemplate = true;\n          assertNoDuplicate('template', templateDirective, directive, $compileNode);\n          templateDirective = directive;\n\n          directiveValue = (isFunction(directive.template))\n              ? directive.template($compileNode, templateAttrs)\n              : directive.template;\n\n          directiveValue = denormalizeTemplate(directiveValue);\n\n          if (directive.replace) {\n            replaceDirective = directive;\n            if (jqLiteIsTextNode(directiveValue)) {\n              $template = [];\n            } else {\n              $template = removeComments(wrapTemplate(directive.templateNamespace, trim(directiveValue)));\n            }\n            compileNode = $template[0];\n\n            if ($template.length != 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {\n              throw $compileMinErr('tplrt',\n                  \"Template for directive '{0}' must have exactly one root element. {1}\",\n                  directiveName, '');\n            }\n\n            replaceWith(jqCollection, $compileNode, compileNode);\n\n            var newTemplateAttrs = {$attr: {}};\n\n            // combine directives from the original node and from the template:\n            // - take the array of directives for this element\n            // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)\n            // - collect directives from the template and sort them by priority\n            // - combine directives as: processed + template + unprocessed\n            var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);\n            var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));\n\n            if (newIsolateScopeDirective || newScopeDirective) {\n              // The original directive caused the current element to be replaced but this element\n              // also needs to have a new scope, so we need to tell the template directives\n              // that they would need to get their scope from further up, if they require transclusion\n              markDirectiveScope(templateDirectives, newIsolateScopeDirective, newScopeDirective);\n            }\n            directives = directives.concat(templateDirectives).concat(unprocessedDirectives);\n            mergeTemplateAttributes(templateAttrs, newTemplateAttrs);\n\n            ii = directives.length;\n          } else {\n            $compileNode.html(directiveValue);\n          }\n        }\n\n        if (directive.templateUrl) {\n          hasTemplate = true;\n          assertNoDuplicate('template', templateDirective, directive, $compileNode);\n          templateDirective = directive;\n\n          if (directive.replace) {\n            replaceDirective = directive;\n          }\n\n          nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,\n              templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {\n                controllerDirectives: controllerDirectives,\n                newScopeDirective: (newScopeDirective !== directive) && newScopeDirective,\n                newIsolateScopeDirective: newIsolateScopeDirective,\n                templateDirective: templateDirective,\n                nonTlbTranscludeDirective: nonTlbTranscludeDirective\n              });\n          ii = directives.length;\n        } else if (directive.compile) {\n          try {\n            linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);\n            if (isFunction(linkFn)) {\n              addLinkFns(null, linkFn, attrStart, attrEnd);\n            } else if (linkFn) {\n              addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd);\n            }\n          } catch (e) {\n            $exceptionHandler(e, startingTag($compileNode));\n          }\n        }\n\n        if (directive.terminal) {\n          nodeLinkFn.terminal = true;\n          terminalPriority = Math.max(terminalPriority, directive.priority);\n        }\n\n      }\n\n      nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;\n      nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;\n      nodeLinkFn.templateOnThisElement = hasTemplate;\n      nodeLinkFn.transclude = childTranscludeFn;\n\n      previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;\n\n      // might be normal or delayed nodeLinkFn depending on if templateUrl is present\n      return nodeLinkFn;\n\n      ////////////////////\n\n      function addLinkFns(pre, post, attrStart, attrEnd) {\n        if (pre) {\n          if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);\n          pre.require = directive.require;\n          pre.directiveName = directiveName;\n          if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n            pre = cloneAndAnnotateFn(pre, {isolateScope: true});\n          }\n          preLinkFns.push(pre);\n        }\n        if (post) {\n          if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);\n          post.require = directive.require;\n          post.directiveName = directiveName;\n          if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n            post = cloneAndAnnotateFn(post, {isolateScope: true});\n          }\n          postLinkFns.push(post);\n        }\n      }\n\n      function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {\n        var i, ii, linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element,\n            attrs, removeScopeBindingWatches, removeControllerBindingWatches;\n\n        if (compileNode === linkNode) {\n          attrs = templateAttrs;\n          $element = templateAttrs.$$element;\n        } else {\n          $element = jqLite(linkNode);\n          attrs = new Attributes($element, templateAttrs);\n        }\n\n        controllerScope = scope;\n        if (newIsolateScopeDirective) {\n          isolateScope = scope.$new(true);\n        } else if (newScopeDirective) {\n          controllerScope = scope.$parent;\n        }\n\n        if (boundTranscludeFn) {\n          // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn`\n          // is later passed as `parentBoundTranscludeFn` to `publicLinkFn`\n          transcludeFn = controllersBoundTransclude;\n          transcludeFn.$$boundTransclude = boundTranscludeFn;\n          // expose the slots on the `$transclude` function\n          transcludeFn.isSlotFilled = function(slotName) {\n            return !!boundTranscludeFn.$$slots[slotName];\n          };\n        }\n\n        if (controllerDirectives) {\n          elementControllers = setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope, newIsolateScopeDirective);\n        }\n\n        if (newIsolateScopeDirective) {\n          // Initialize isolate scope bindings for new isolate scope directive.\n          compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||\n              templateDirective === newIsolateScopeDirective.$$originalDirective)));\n          compile.$$addScopeClass($element, true);\n          isolateScope.$$isolateBindings =\n              newIsolateScopeDirective.$$isolateBindings;\n          removeScopeBindingWatches = initializeDirectiveBindings(scope, attrs, isolateScope,\n                                        isolateScope.$$isolateBindings,\n                                        newIsolateScopeDirective);\n          if (removeScopeBindingWatches) {\n            isolateScope.$on('$destroy', removeScopeBindingWatches);\n          }\n        }\n\n        // Initialize bindToController bindings\n        for (var name in elementControllers) {\n          var controllerDirective = controllerDirectives[name];\n          var controller = elementControllers[name];\n          var bindings = controllerDirective.$$bindings.bindToController;\n\n          if (controller.identifier && bindings) {\n            removeControllerBindingWatches =\n              initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);\n          }\n\n          var controllerResult = controller();\n          if (controllerResult !== controller.instance) {\n            // If the controller constructor has a return value, overwrite the instance\n            // from setupControllers\n            controller.instance = controllerResult;\n            $element.data('$' + controllerDirective.name + 'Controller', controllerResult);\n            removeControllerBindingWatches && removeControllerBindingWatches();\n            removeControllerBindingWatches =\n              initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);\n          }\n        }\n\n        // Bind the required controllers to the controller, if `require` is an object and `bindToController` is truthy\n        forEach(controllerDirectives, function(controllerDirective, name) {\n          var require = controllerDirective.require;\n          if (controllerDirective.bindToController && !isArray(require) && isObject(require)) {\n            extend(elementControllers[name].instance, getControllers(name, require, $element, elementControllers));\n          }\n        });\n\n        // Handle the init and destroy lifecycle hooks on all controllers that have them\n        forEach(elementControllers, function(controller) {\n          var controllerInstance = controller.instance;\n          if (isFunction(controllerInstance.$onInit)) {\n            controllerInstance.$onInit();\n          }\n          if (isFunction(controllerInstance.$onDestroy)) {\n            controllerScope.$on('$destroy', function callOnDestroyHook() {\n              controllerInstance.$onDestroy();\n            });\n          }\n        });\n\n        // PRELINKING\n        for (i = 0, ii = preLinkFns.length; i < ii; i++) {\n          linkFn = preLinkFns[i];\n          invokeLinkFn(linkFn,\n              linkFn.isolateScope ? isolateScope : scope,\n              $element,\n              attrs,\n              linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n              transcludeFn\n          );\n        }\n\n        // RECURSION\n        // We only pass the isolate scope, if the isolate directive has a template,\n        // otherwise the child elements do not belong to the isolate directive.\n        var scopeToChild = scope;\n        if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {\n          scopeToChild = isolateScope;\n        }\n        childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);\n\n        // POSTLINKING\n        for (i = postLinkFns.length - 1; i >= 0; i--) {\n          linkFn = postLinkFns[i];\n          invokeLinkFn(linkFn,\n              linkFn.isolateScope ? isolateScope : scope,\n              $element,\n              attrs,\n              linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n              transcludeFn\n          );\n        }\n\n        // Trigger $postLink lifecycle hooks\n        forEach(elementControllers, function(controller) {\n          var controllerInstance = controller.instance;\n          if (isFunction(controllerInstance.$postLink)) {\n            controllerInstance.$postLink();\n          }\n        });\n\n        // This is the function that is injected as `$transclude`.\n        // Note: all arguments are optional!\n        function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement, slotName) {\n          var transcludeControllers;\n          // No scope passed in:\n          if (!isScope(scope)) {\n            slotName = futureParentElement;\n            futureParentElement = cloneAttachFn;\n            cloneAttachFn = scope;\n            scope = undefined;\n          }\n\n          if (hasElementTranscludeDirective) {\n            transcludeControllers = elementControllers;\n          }\n          if (!futureParentElement) {\n            futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;\n          }\n          if (slotName) {\n            // slotTranscludeFn can be one of three things:\n            //  * a transclude function - a filled slot\n            //  * `null` - an optional slot that was not filled\n            //  * `undefined` - a slot that was not declared (i.e. invalid)\n            var slotTranscludeFn = boundTranscludeFn.$$slots[slotName];\n            if (slotTranscludeFn) {\n              return slotTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);\n            } else if (isUndefined(slotTranscludeFn)) {\n              throw $compileMinErr('noslot',\n               'No parent directive that requires a transclusion with slot name \"{0}\". ' +\n               'Element: {1}',\n               slotName, startingTag($element));\n            }\n          } else {\n            return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);\n          }\n        }\n      }\n    }\n\n    function getControllers(directiveName, require, $element, elementControllers) {\n      var value;\n\n      if (isString(require)) {\n        var match = require.match(REQUIRE_PREFIX_REGEXP);\n        var name = require.substring(match[0].length);\n        var inheritType = match[1] || match[3];\n        var optional = match[2] === '?';\n\n        //If only parents then start at the parent element\n        if (inheritType === '^^') {\n          $element = $element.parent();\n        //Otherwise attempt getting the controller from elementControllers in case\n        //the element is transcluded (and has no data) and to avoid .data if possible\n        } else {\n          value = elementControllers && elementControllers[name];\n          value = value && value.instance;\n        }\n\n        if (!value) {\n          var dataName = '$' + name + 'Controller';\n          value = inheritType ? $element.inheritedData(dataName) : $element.data(dataName);\n        }\n\n        if (!value && !optional) {\n          throw $compileMinErr('ctreq',\n              \"Controller '{0}', required by directive '{1}', can't be found!\",\n              name, directiveName);\n        }\n      } else if (isArray(require)) {\n        value = [];\n        for (var i = 0, ii = require.length; i < ii; i++) {\n          value[i] = getControllers(directiveName, require[i], $element, elementControllers);\n        }\n      } else if (isObject(require)) {\n        value = {};\n        forEach(require, function(controller, property) {\n          value[property] = getControllers(directiveName, controller, $element, elementControllers);\n        });\n      }\n\n      return value || null;\n    }\n\n    function setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope, newIsolateScopeDirective) {\n      var elementControllers = createMap();\n      for (var controllerKey in controllerDirectives) {\n        var directive = controllerDirectives[controllerKey];\n        var locals = {\n          $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,\n          $element: $element,\n          $attrs: attrs,\n          $transclude: transcludeFn\n        };\n\n        var controller = directive.controller;\n        if (controller == '@') {\n          controller = attrs[directive.name];\n        }\n\n        var controllerInstance = $controller(controller, locals, true, directive.controllerAs);\n\n        // For directives with element transclusion the element is a comment.\n        // In this case .data will not attach any data.\n        // Instead, we save the controllers for the element in a local hash and attach to .data\n        // later, once we have the actual element.\n        elementControllers[directive.name] = controllerInstance;\n        $element.data('$' + directive.name + 'Controller', controllerInstance.instance);\n      }\n      return elementControllers;\n    }\n\n    // Depending upon the context in which a directive finds itself it might need to have a new isolated\n    // or child scope created. For instance:\n    // * if the directive has been pulled into a template because another directive with a higher priority\n    // asked for element transclusion\n    // * if the directive itself asks for transclusion but it is at the root of a template and the original\n    // element was replaced. See https://github.com/angular/angular.js/issues/12936\n    function markDirectiveScope(directives, isolateScope, newScope) {\n      for (var j = 0, jj = directives.length; j < jj; j++) {\n        directives[j] = inherit(directives[j], {$$isolateScope: isolateScope, $$newScope: newScope});\n      }\n    }\n\n    /**\n     * looks up the directive and decorates it with exception handling and proper parameters. We\n     * call this the boundDirective.\n     *\n     * @param {string} name name of the directive to look up.\n     * @param {string} location The directive must be found in specific format.\n     *   String containing any of theses characters:\n     *\n     *   * `E`: element name\n     *   * `A': attribute\n     *   * `C`: class\n     *   * `M`: comment\n     * @returns {boolean} true if directive was added.\n     */\n    function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,\n                          endAttrName) {\n      if (name === ignoreDirective) return null;\n      var match = null;\n      if (hasDirectives.hasOwnProperty(name)) {\n        for (var directive, directives = $injector.get(name + Suffix),\n            i = 0, ii = directives.length; i < ii; i++) {\n          try {\n            directive = directives[i];\n            if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&\n                 directive.restrict.indexOf(location) != -1) {\n              if (startAttrName) {\n                directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});\n              }\n              if (!directive.$$bindings) {\n                var bindings = directive.$$bindings =\n                    parseDirectiveBindings(directive, directive.name);\n                if (isObject(bindings.isolateScope)) {\n                  directive.$$isolateBindings = bindings.isolateScope;\n                }\n              }\n              tDirectives.push(directive);\n              match = directive;\n            }\n          } catch (e) { $exceptionHandler(e); }\n        }\n      }\n      return match;\n    }\n\n\n    /**\n     * looks up the directive and returns true if it is a multi-element directive,\n     * and therefore requires DOM nodes between -start and -end markers to be grouped\n     * together.\n     *\n     * @param {string} name name of the directive to look up.\n     * @returns true if directive was registered as multi-element.\n     */\n    function directiveIsMultiElement(name) {\n      if (hasDirectives.hasOwnProperty(name)) {\n        for (var directive, directives = $injector.get(name + Suffix),\n            i = 0, ii = directives.length; i < ii; i++) {\n          directive = directives[i];\n          if (directive.multiElement) {\n            return true;\n          }\n        }\n      }\n      return false;\n    }\n\n    /**\n     * When the element is replaced with HTML template then the new attributes\n     * on the template need to be merged with the existing attributes in the DOM.\n     * The desired effect is to have both of the attributes present.\n     *\n     * @param {object} dst destination attributes (original DOM)\n     * @param {object} src source attributes (from the directive template)\n     */\n    function mergeTemplateAttributes(dst, src) {\n      var srcAttr = src.$attr,\n          dstAttr = dst.$attr,\n          $element = dst.$$element;\n\n      // reapply the old attributes to the new element\n      forEach(dst, function(value, key) {\n        if (key.charAt(0) != '$') {\n          if (src[key] && src[key] !== value) {\n            value += (key === 'style' ? ';' : ' ') + src[key];\n          }\n          dst.$set(key, value, true, srcAttr[key]);\n        }\n      });\n\n      // copy the new attributes on the old attrs object\n      forEach(src, function(value, key) {\n        if (key == 'class') {\n          safeAddClass($element, value);\n          dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;\n        } else if (key == 'style') {\n          $element.attr('style', $element.attr('style') + ';' + value);\n          dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value;\n          // `dst` will never contain hasOwnProperty as DOM parser won't let it.\n          // You will get an \"InvalidCharacterError: DOM Exception 5\" error if you\n          // have an attribute like \"has-own-property\" or \"data-has-own-property\", etc.\n        } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {\n          dst[key] = value;\n          dstAttr[key] = srcAttr[key];\n        }\n      });\n    }\n\n\n    function compileTemplateUrl(directives, $compileNode, tAttrs,\n        $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {\n      var linkQueue = [],\n          afterTemplateNodeLinkFn,\n          afterTemplateChildLinkFn,\n          beforeTemplateCompileNode = $compileNode[0],\n          origAsyncDirective = directives.shift(),\n          derivedSyncDirective = inherit(origAsyncDirective, {\n            templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective\n          }),\n          templateUrl = (isFunction(origAsyncDirective.templateUrl))\n              ? origAsyncDirective.templateUrl($compileNode, tAttrs)\n              : origAsyncDirective.templateUrl,\n          templateNamespace = origAsyncDirective.templateNamespace;\n\n      $compileNode.empty();\n\n      $templateRequest(templateUrl)\n        .then(function(content) {\n          var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn;\n\n          content = denormalizeTemplate(content);\n\n          if (origAsyncDirective.replace) {\n            if (jqLiteIsTextNode(content)) {\n              $template = [];\n            } else {\n              $template = removeComments(wrapTemplate(templateNamespace, trim(content)));\n            }\n            compileNode = $template[0];\n\n            if ($template.length != 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {\n              throw $compileMinErr('tplrt',\n                  \"Template for directive '{0}' must have exactly one root element. {1}\",\n                  origAsyncDirective.name, templateUrl);\n            }\n\n            tempTemplateAttrs = {$attr: {}};\n            replaceWith($rootElement, $compileNode, compileNode);\n            var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs);\n\n            if (isObject(origAsyncDirective.scope)) {\n              // the original directive that caused the template to be loaded async required\n              // an isolate scope\n              markDirectiveScope(templateDirectives, true);\n            }\n            directives = templateDirectives.concat(directives);\n            mergeTemplateAttributes(tAttrs, tempTemplateAttrs);\n          } else {\n            compileNode = beforeTemplateCompileNode;\n            $compileNode.html(content);\n          }\n\n          directives.unshift(derivedSyncDirective);\n\n          afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs,\n              childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns,\n              previousCompileContext);\n          forEach($rootElement, function(node, i) {\n            if (node == compileNode) {\n              $rootElement[i] = $compileNode[0];\n            }\n          });\n          afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn);\n\n          while (linkQueue.length) {\n            var scope = linkQueue.shift(),\n                beforeTemplateLinkNode = linkQueue.shift(),\n                linkRootElement = linkQueue.shift(),\n                boundTranscludeFn = linkQueue.shift(),\n                linkNode = $compileNode[0];\n\n            if (scope.$$destroyed) continue;\n\n            if (beforeTemplateLinkNode !== beforeTemplateCompileNode) {\n              var oldClasses = beforeTemplateLinkNode.className;\n\n              if (!(previousCompileContext.hasElementTranscludeDirective &&\n                  origAsyncDirective.replace)) {\n                // it was cloned therefore we have to clone as well.\n                linkNode = jqLiteClone(compileNode);\n              }\n              replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode);\n\n              // Copy in CSS classes from original node\n              safeAddClass(jqLite(linkNode), oldClasses);\n            }\n            if (afterTemplateNodeLinkFn.transcludeOnThisElement) {\n              childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);\n            } else {\n              childBoundTranscludeFn = boundTranscludeFn;\n            }\n            afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement,\n              childBoundTranscludeFn);\n          }\n          linkQueue = null;\n        });\n\n      return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) {\n        var childBoundTranscludeFn = boundTranscludeFn;\n        if (scope.$$destroyed) return;\n        if (linkQueue) {\n          linkQueue.push(scope,\n                         node,\n                         rootElement,\n                         childBoundTranscludeFn);\n        } else {\n          if (afterTemplateNodeLinkFn.transcludeOnThisElement) {\n            childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);\n          }\n          afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn);\n        }\n      };\n    }\n\n\n    /**\n     * Sorting function for bound directives.\n     */\n    function byPriority(a, b) {\n      var diff = b.priority - a.priority;\n      if (diff !== 0) return diff;\n      if (a.name !== b.name) return (a.name < b.name) ? -1 : 1;\n      return a.index - b.index;\n    }\n\n    function assertNoDuplicate(what, previousDirective, directive, element) {\n\n      function wrapModuleNameIfDefined(moduleName) {\n        return moduleName ?\n          (' (module: ' + moduleName + ')') :\n          '';\n      }\n\n      if (previousDirective) {\n        throw $compileMinErr('multidir', 'Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}',\n            previousDirective.name, wrapModuleNameIfDefined(previousDirective.$$moduleName),\n            directive.name, wrapModuleNameIfDefined(directive.$$moduleName), what, startingTag(element));\n      }\n    }\n\n\n    function addTextInterpolateDirective(directives, text) {\n      var interpolateFn = $interpolate(text, true);\n      if (interpolateFn) {\n        directives.push({\n          priority: 0,\n          compile: function textInterpolateCompileFn(templateNode) {\n            var templateNodeParent = templateNode.parent(),\n                hasCompileParent = !!templateNodeParent.length;\n\n            // When transcluding a template that has bindings in the root\n            // we don't have a parent and thus need to add the class during linking fn.\n            if (hasCompileParent) compile.$$addBindingClass(templateNodeParent);\n\n            return function textInterpolateLinkFn(scope, node) {\n              var parent = node.parent();\n              if (!hasCompileParent) compile.$$addBindingClass(parent);\n              compile.$$addBindingInfo(parent, interpolateFn.expressions);\n              scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {\n                node[0].nodeValue = value;\n              });\n            };\n          }\n        });\n      }\n    }\n\n\n    function wrapTemplate(type, template) {\n      type = lowercase(type || 'html');\n      switch (type) {\n      case 'svg':\n      case 'math':\n        var wrapper = document.createElement('div');\n        wrapper.innerHTML = '<' + type + '>' + template + '</' + type + '>';\n        return wrapper.childNodes[0].childNodes;\n      default:\n        return template;\n      }\n    }\n\n\n    function getTrustedContext(node, attrNormalizedName) {\n      if (attrNormalizedName == \"srcdoc\") {\n        return $sce.HTML;\n      }\n      var tag = nodeName_(node);\n      // maction[xlink:href] can source SVG.  It's not limited to <maction>.\n      if (attrNormalizedName == \"xlinkHref\" ||\n          (tag == \"form\" && attrNormalizedName == \"action\") ||\n          (tag != \"img\" && (attrNormalizedName == \"src\" ||\n                            attrNormalizedName == \"ngSrc\"))) {\n        return $sce.RESOURCE_URL;\n      }\n    }\n\n\n    function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) {\n      var trustedContext = getTrustedContext(node, name);\n      allOrNothing = ALL_OR_NOTHING_ATTRS[name] || allOrNothing;\n\n      var interpolateFn = $interpolate(value, true, trustedContext, allOrNothing);\n\n      // no interpolation found -> ignore\n      if (!interpolateFn) return;\n\n\n      if (name === \"multiple\" && nodeName_(node) === \"select\") {\n        throw $compileMinErr(\"selmulti\",\n            \"Binding to the 'multiple' attribute is not supported. Element: {0}\",\n            startingTag(node));\n      }\n\n      directives.push({\n        priority: 100,\n        compile: function() {\n            return {\n              pre: function attrInterpolatePreLinkFn(scope, element, attr) {\n                var $$observers = (attr.$$observers || (attr.$$observers = createMap()));\n\n                if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {\n                  throw $compileMinErr('nodomevents',\n                      \"Interpolations for HTML DOM event attributes are disallowed.  Please use the \" +\n                          \"ng- versions (such as ng-click instead of onclick) instead.\");\n                }\n\n                // If the attribute has changed since last $interpolate()ed\n                var newValue = attr[name];\n                if (newValue !== value) {\n                  // we need to interpolate again since the attribute value has been updated\n                  // (e.g. by another directive's compile function)\n                  // ensure unset/empty values make interpolateFn falsy\n                  interpolateFn = newValue && $interpolate(newValue, true, trustedContext, allOrNothing);\n                  value = newValue;\n                }\n\n                // if attribute was updated so that there is no interpolation going on we don't want to\n                // register any observers\n                if (!interpolateFn) return;\n\n                // initialize attr object so that it's ready in case we need the value for isolate\n                // scope initialization, otherwise the value would not be available from isolate\n                // directive's linking fn during linking phase\n                attr[name] = interpolateFn(scope);\n\n                ($$observers[name] || ($$observers[name] = [])).$$inter = true;\n                (attr.$$observers && attr.$$observers[name].$$scope || scope).\n                  $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {\n                    //special case for class attribute addition + removal\n                    //so that class changes can tap into the animation\n                    //hooks provided by the $animate service. Be sure to\n                    //skip animations when the first digest occurs (when\n                    //both the new and the old values are the same) since\n                    //the CSS classes are the non-interpolated values\n                    if (name === 'class' && newValue != oldValue) {\n                      attr.$updateClass(newValue, oldValue);\n                    } else {\n                      attr.$set(name, newValue);\n                    }\n                  });\n              }\n            };\n          }\n      });\n    }\n\n\n    /**\n     * This is a special jqLite.replaceWith, which can replace items which\n     * have no parents, provided that the containing jqLite collection is provided.\n     *\n     * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes\n     *                               in the root of the tree.\n     * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep\n     *                                  the shell, but replace its DOM node reference.\n     * @param {Node} newNode The new DOM node.\n     */\n    function replaceWith($rootElement, elementsToRemove, newNode) {\n      var firstElementToRemove = elementsToRemove[0],\n          removeCount = elementsToRemove.length,\n          parent = firstElementToRemove.parentNode,\n          i, ii;\n\n      if ($rootElement) {\n        for (i = 0, ii = $rootElement.length; i < ii; i++) {\n          if ($rootElement[i] == firstElementToRemove) {\n            $rootElement[i++] = newNode;\n            for (var j = i, j2 = j + removeCount - 1,\n                     jj = $rootElement.length;\n                 j < jj; j++, j2++) {\n              if (j2 < jj) {\n                $rootElement[j] = $rootElement[j2];\n              } else {\n                delete $rootElement[j];\n              }\n            }\n            $rootElement.length -= removeCount - 1;\n\n            // If the replaced element is also the jQuery .context then replace it\n            // .context is a deprecated jQuery api, so we should set it only when jQuery set it\n            // http://api.jquery.com/context/\n            if ($rootElement.context === firstElementToRemove) {\n              $rootElement.context = newNode;\n            }\n            break;\n          }\n        }\n      }\n\n      if (parent) {\n        parent.replaceChild(newNode, firstElementToRemove);\n      }\n\n      // Append all the `elementsToRemove` to a fragment. This will...\n      // - remove them from the DOM\n      // - allow them to still be traversed with .nextSibling\n      // - allow a single fragment.qSA to fetch all elements being removed\n      var fragment = document.createDocumentFragment();\n      for (i = 0; i < removeCount; i++) {\n        fragment.appendChild(elementsToRemove[i]);\n      }\n\n      if (jqLite.hasData(firstElementToRemove)) {\n        // Copy over user data (that includes Angular's $scope etc.). Don't copy private\n        // data here because there's no public interface in jQuery to do that and copying over\n        // event listeners (which is the main use of private data) wouldn't work anyway.\n        jqLite.data(newNode, jqLite.data(firstElementToRemove));\n\n        // Remove $destroy event listeners from `firstElementToRemove`\n        jqLite(firstElementToRemove).off('$destroy');\n      }\n\n      // Cleanup any data/listeners on the elements and children.\n      // This includes invoking the $destroy event on any elements with listeners.\n      jqLite.cleanData(fragment.querySelectorAll('*'));\n\n      // Update the jqLite collection to only contain the `newNode`\n      for (i = 1; i < removeCount; i++) {\n        delete elementsToRemove[i];\n      }\n      elementsToRemove[0] = newNode;\n      elementsToRemove.length = 1;\n    }\n\n\n    function cloneAndAnnotateFn(fn, annotation) {\n      return extend(function() { return fn.apply(null, arguments); }, fn, annotation);\n    }\n\n\n    function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) {\n      try {\n        linkFn(scope, $element, attrs, controllers, transcludeFn);\n      } catch (e) {\n        $exceptionHandler(e, startingTag($element));\n      }\n    }\n\n\n    // Set up $watches for isolate scope and controller bindings. This process\n    // only occurs for isolate scopes and new scopes with controllerAs.\n    function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) {\n      var removeWatchCollection = [];\n      var changes;\n      forEach(bindings, function initializeBinding(definition, scopeName) {\n        var attrName = definition.attrName,\n        optional = definition.optional,\n        mode = definition.mode, // @, =, or &\n        lastValue,\n        parentGet, parentSet, compare, removeWatch;\n\n        switch (mode) {\n\n          case '@':\n            if (!optional && !hasOwnProperty.call(attrs, attrName)) {\n              destination[scopeName] = attrs[attrName] = void 0;\n            }\n            attrs.$observe(attrName, function(value) {\n              if (isString(value)) {\n                var oldValue = destination[scopeName];\n                recordChanges(scopeName, value, oldValue);\n                destination[scopeName] = value;\n              }\n            });\n            attrs.$$observers[attrName].$$scope = scope;\n            lastValue = attrs[attrName];\n            if (isString(lastValue)) {\n              // If the attribute has been provided then we trigger an interpolation to ensure\n              // the value is there for use in the link fn\n              destination[scopeName] = $interpolate(lastValue)(scope);\n            } else if (isBoolean(lastValue)) {\n              // If the attributes is one of the BOOLEAN_ATTR then Angular will have converted\n              // the value to boolean rather than a string, so we special case this situation\n              destination[scopeName] = lastValue;\n            }\n            break;\n\n          case '=':\n            if (!hasOwnProperty.call(attrs, attrName)) {\n              if (optional) break;\n              attrs[attrName] = void 0;\n            }\n            if (optional && !attrs[attrName]) break;\n\n            parentGet = $parse(attrs[attrName]);\n            if (parentGet.literal) {\n              compare = equals;\n            } else {\n              compare = function simpleCompare(a, b) { return a === b || (a !== a && b !== b); };\n            }\n            parentSet = parentGet.assign || function() {\n              // reset the change, or we will throw this exception on every $digest\n              lastValue = destination[scopeName] = parentGet(scope);\n              throw $compileMinErr('nonassign',\n                  \"Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!\",\n                  attrs[attrName], attrName, directive.name);\n            };\n            lastValue = destination[scopeName] = parentGet(scope);\n            var parentValueWatch = function parentValueWatch(parentValue) {\n              if (!compare(parentValue, destination[scopeName])) {\n                // we are out of sync and need to copy\n                if (!compare(parentValue, lastValue)) {\n                  // parent changed and it has precedence\n                  destination[scopeName] = parentValue;\n                } else {\n                  // if the parent can be assigned then do so\n                  parentSet(scope, parentValue = destination[scopeName]);\n                }\n              }\n              return lastValue = parentValue;\n            };\n            parentValueWatch.$stateful = true;\n            if (definition.collection) {\n              removeWatch = scope.$watchCollection(attrs[attrName], parentValueWatch);\n            } else {\n              removeWatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);\n            }\n            removeWatchCollection.push(removeWatch);\n            break;\n\n          case '<':\n            if (!hasOwnProperty.call(attrs, attrName)) {\n              if (optional) break;\n              attrs[attrName] = void 0;\n            }\n            if (optional && !attrs[attrName]) break;\n\n            parentGet = $parse(attrs[attrName]);\n\n            destination[scopeName] = parentGet(scope);\n\n            removeWatch = scope.$watch(parentGet, function parentValueWatchAction(newParentValue) {\n              var oldValue = destination[scopeName];\n              recordChanges(scopeName, newParentValue, oldValue);\n              destination[scopeName] = newParentValue;\n            }, parentGet.literal);\n\n            removeWatchCollection.push(removeWatch);\n            break;\n\n          case '&':\n            // Don't assign Object.prototype method to scope\n            parentGet = attrs.hasOwnProperty(attrName) ? $parse(attrs[attrName]) : noop;\n\n            // Don't assign noop to destination if expression is not valid\n            if (parentGet === noop && optional) break;\n\n            destination[scopeName] = function(locals) {\n              return parentGet(scope, locals);\n            };\n            break;\n        }\n      });\n\n      function recordChanges(key, currentValue, previousValue) {\n        if (isFunction(destination.$onChanges) && currentValue !== previousValue) {\n          // If we have not already scheduled the top level onChangesQueue handler then do so now\n          if (!onChangesQueue) {\n            scope.$$postDigest(flushOnChangesQueue);\n            onChangesQueue = [];\n          }\n          // If we have not already queued a trigger of onChanges for this controller then do so now\n          if (!changes) {\n            changes = {};\n            onChangesQueue.push(triggerOnChangesHook);\n          }\n          // If the has been a change on this property already then we need to reuse the previous value\n          if (changes[key]) {\n            previousValue = changes[key].previousValue;\n          }\n          // Store this change\n          changes[key] = {previousValue: previousValue, currentValue: currentValue};\n        }\n      }\n\n      function triggerOnChangesHook() {\n        destination.$onChanges(changes);\n        // Now clear the changes so that we schedule onChanges when more changes arrive\n        changes = undefined;\n      }\n\n      return removeWatchCollection.length && function removeWatches() {\n        for (var i = 0, ii = removeWatchCollection.length; i < ii; ++i) {\n          removeWatchCollection[i]();\n        }\n      };\n    }\n  }];\n}\n\nvar PREFIX_REGEXP = /^((?:x|data)[\\:\\-_])/i;\n/**\n * Converts all accepted directives format into proper directive name.\n * @param name Name to normalize\n */\nfunction directiveNormalize(name) {\n  return camelCase(name.replace(PREFIX_REGEXP, ''));\n}\n\n/**\n * @ngdoc type\n * @name $compile.directive.Attributes\n *\n * @description\n * A shared object between directive compile / linking functions which contains normalized DOM\n * element attributes. The values reflect current binding state `{{ }}`. The normalization is\n * needed since all of these are treated as equivalent in Angular:\n *\n * ```\n *    <span ng:bind=\"a\" ng-bind=\"a\" data-ng-bind=\"a\" x-ng-bind=\"a\">\n * ```\n */\n\n/**\n * @ngdoc property\n * @name $compile.directive.Attributes#$attr\n *\n * @description\n * A map of DOM element attribute names to the normalized name. This is\n * needed to do reverse lookup from normalized name back to actual name.\n */\n\n\n/**\n * @ngdoc method\n * @name $compile.directive.Attributes#$set\n * @kind function\n *\n * @description\n * Set DOM element attribute value.\n *\n *\n * @param {string} name Normalized element attribute name of the property to modify. The name is\n *          reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}\n *          property to the original name.\n * @param {string} value Value to set the attribute to. The value can be an interpolated string.\n */\n\n\n\n/**\n * Closure compiler type information\n */\n\nfunction nodesetLinkingFn(\n  /* angular.Scope */ scope,\n  /* NodeList */ nodeList,\n  /* Element */ rootElement,\n  /* function(Function) */ boundTranscludeFn\n) {}\n\nfunction directiveLinkingFn(\n  /* nodesetLinkingFn */ nodesetLinkingFn,\n  /* angular.Scope */ scope,\n  /* Node */ node,\n  /* Element */ rootElement,\n  /* function(Function) */ boundTranscludeFn\n) {}\n\nfunction tokenDifference(str1, str2) {\n  var values = '',\n      tokens1 = str1.split(/\\s+/),\n      tokens2 = str2.split(/\\s+/);\n\n  outer:\n  for (var i = 0; i < tokens1.length; i++) {\n    var token = tokens1[i];\n    for (var j = 0; j < tokens2.length; j++) {\n      if (token == tokens2[j]) continue outer;\n    }\n    values += (values.length > 0 ? ' ' : '') + token;\n  }\n  return values;\n}\n\nfunction removeComments(jqNodes) {\n  jqNodes = jqLite(jqNodes);\n  var i = jqNodes.length;\n\n  if (i <= 1) {\n    return jqNodes;\n  }\n\n  while (i--) {\n    var node = jqNodes[i];\n    if (node.nodeType === NODE_TYPE_COMMENT) {\n      splice.call(jqNodes, i, 1);\n    }\n  }\n  return jqNodes;\n}\n\nvar $controllerMinErr = minErr('$controller');\n\n\nvar CNTRL_REG = /^(\\S+)(\\s+as\\s+([\\w$]+))?$/;\nfunction identifierForController(controller, ident) {\n  if (ident && isString(ident)) return ident;\n  if (isString(controller)) {\n    var match = CNTRL_REG.exec(controller);\n    if (match) return match[3];\n  }\n}\n\n\n/**\n * @ngdoc provider\n * @name $controllerProvider\n * @description\n * The {@link ng.$controller $controller service} is used by Angular to create new\n * controllers.\n *\n * This provider allows controller registration via the\n * {@link ng.$controllerProvider#register register} method.\n */\nfunction $ControllerProvider() {\n  var controllers = {},\n      globals = false;\n\n  /**\n   * @ngdoc method\n   * @name $controllerProvider#has\n   * @param {string} name Controller name to check.\n   */\n  this.has = function(name) {\n    return controllers.hasOwnProperty(name);\n  };\n\n  /**\n   * @ngdoc method\n   * @name $controllerProvider#register\n   * @param {string|Object} name Controller name, or an object map of controllers where the keys are\n   *    the names and the values are the constructors.\n   * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI\n   *    annotations in the array notation).\n   */\n  this.register = function(name, constructor) {\n    assertNotHasOwnProperty(name, 'controller');\n    if (isObject(name)) {\n      extend(controllers, name);\n    } else {\n      controllers[name] = constructor;\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name $controllerProvider#allowGlobals\n   * @description If called, allows `$controller` to find controller constructors on `window`\n   */\n  this.allowGlobals = function() {\n    globals = true;\n  };\n\n\n  this.$get = ['$injector', '$window', function($injector, $window) {\n\n    /**\n     * @ngdoc service\n     * @name $controller\n     * @requires $injector\n     *\n     * @param {Function|string} constructor If called with a function then it's considered to be the\n     *    controller constructor function. Otherwise it's considered to be a string which is used\n     *    to retrieve the controller constructor using the following steps:\n     *\n     *    * check if a controller with given name is registered via `$controllerProvider`\n     *    * check if evaluating the string on the current scope returns a constructor\n     *    * if $controllerProvider#allowGlobals, check `window[constructor]` on the global\n     *      `window` object (not recommended)\n     *\n     *    The string can use the `controller as property` syntax, where the controller instance is published\n     *    as the specified property on the `scope`; the `scope` must be injected into `locals` param for this\n     *    to work correctly.\n     *\n     * @param {Object} locals Injection locals for Controller.\n     * @return {Object} Instance of given controller.\n     *\n     * @description\n     * `$controller` service is responsible for instantiating controllers.\n     *\n     * It's just a simple call to {@link auto.$injector $injector}, but extracted into\n     * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).\n     */\n    return function $controller(expression, locals, later, ident) {\n      // PRIVATE API:\n      //   param `later` --- indicates that the controller's constructor is invoked at a later time.\n      //                     If true, $controller will allocate the object with the correct\n      //                     prototype chain, but will not invoke the controller until a returned\n      //                     callback is invoked.\n      //   param `ident` --- An optional label which overrides the label parsed from the controller\n      //                     expression, if any.\n      var instance, match, constructor, identifier;\n      later = later === true;\n      if (ident && isString(ident)) {\n        identifier = ident;\n      }\n\n      if (isString(expression)) {\n        match = expression.match(CNTRL_REG);\n        if (!match) {\n          throw $controllerMinErr('ctrlfmt',\n            \"Badly formed controller string '{0}'. \" +\n            \"Must match `__name__ as __id__` or `__name__`.\", expression);\n        }\n        constructor = match[1],\n        identifier = identifier || match[3];\n        expression = controllers.hasOwnProperty(constructor)\n            ? controllers[constructor]\n            : getter(locals.$scope, constructor, true) ||\n                (globals ? getter($window, constructor, true) : undefined);\n\n        assertArgFn(expression, constructor, true);\n      }\n\n      if (later) {\n        // Instantiate controller later:\n        // This machinery is used to create an instance of the object before calling the\n        // controller's constructor itself.\n        //\n        // This allows properties to be added to the controller before the constructor is\n        // invoked. Primarily, this is used for isolate scope bindings in $compile.\n        //\n        // This feature is not intended for use by applications, and is thus not documented\n        // publicly.\n        // Object creation: http://jsperf.com/create-constructor/2\n        var controllerPrototype = (isArray(expression) ?\n          expression[expression.length - 1] : expression).prototype;\n        instance = Object.create(controllerPrototype || null);\n\n        if (identifier) {\n          addIdentifier(locals, identifier, instance, constructor || expression.name);\n        }\n\n        var instantiate;\n        return instantiate = extend(function $controllerInit() {\n          var result = $injector.invoke(expression, instance, locals, constructor);\n          if (result !== instance && (isObject(result) || isFunction(result))) {\n            instance = result;\n            if (identifier) {\n              // If result changed, re-assign controllerAs value to scope.\n              addIdentifier(locals, identifier, instance, constructor || expression.name);\n            }\n          }\n          return instance;\n        }, {\n          instance: instance,\n          identifier: identifier\n        });\n      }\n\n      instance = $injector.instantiate(expression, locals, constructor);\n\n      if (identifier) {\n        addIdentifier(locals, identifier, instance, constructor || expression.name);\n      }\n\n      return instance;\n    };\n\n    function addIdentifier(locals, identifier, instance, name) {\n      if (!(locals && isObject(locals.$scope))) {\n        throw minErr('$controller')('noscp',\n          \"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.\",\n          name, identifier);\n      }\n\n      locals.$scope[identifier] = instance;\n    }\n  }];\n}\n\n/**\n * @ngdoc service\n * @name $document\n * @requires $window\n *\n * @description\n * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.\n *\n * @example\n   <example module=\"documentExample\">\n     <file name=\"index.html\">\n       <div ng-controller=\"ExampleController\">\n         <p>$document title: <b ng-bind=\"title\"></b></p>\n         <p>window.document title: <b ng-bind=\"windowTitle\"></b></p>\n       </div>\n     </file>\n     <file name=\"script.js\">\n       angular.module('documentExample', [])\n         .controller('ExampleController', ['$scope', '$document', function($scope, $document) {\n           $scope.title = $document[0].title;\n           $scope.windowTitle = angular.element(window.document)[0].title;\n         }]);\n     </file>\n   </example>\n */\nfunction $DocumentProvider() {\n  this.$get = ['$window', function(window) {\n    return jqLite(window.document);\n  }];\n}\n\n/**\n * @ngdoc service\n * @name $exceptionHandler\n * @requires ng.$log\n *\n * @description\n * Any uncaught exception in angular expressions is delegated to this service.\n * The default implementation simply delegates to `$log.error` which logs it into\n * the browser console.\n *\n * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by\n * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.\n *\n * ## Example:\n *\n * ```js\n *   angular.module('exceptionOverride', []).factory('$exceptionHandler', function() {\n *     return function(exception, cause) {\n *       exception.message += ' (caused by \"' + cause + '\")';\n *       throw exception;\n *     };\n *   });\n * ```\n *\n * This example will override the normal action of `$exceptionHandler`, to make angular\n * exceptions fail hard when they happen, instead of just logging to the console.\n *\n * <hr />\n * Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`\n * methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}\n * (unless executed during a digest).\n *\n * If you wish, you can manually delegate exceptions, e.g.\n * `try { ... } catch(e) { $exceptionHandler(e); }`\n *\n * @param {Error} exception Exception associated with the error.\n * @param {string=} cause optional information about the context in which\n *       the error was thrown.\n *\n */\nfunction $ExceptionHandlerProvider() {\n  this.$get = ['$log', function($log) {\n    return function(exception, cause) {\n      $log.error.apply($log, arguments);\n    };\n  }];\n}\n\nvar $$ForceReflowProvider = function() {\n  this.$get = ['$document', function($document) {\n    return function(domNode) {\n      //the line below will force the browser to perform a repaint so\n      //that all the animated elements within the animation frame will\n      //be properly updated and drawn on screen. This is required to\n      //ensure that the preparation animation is properly flushed so that\n      //the active state picks up from there. DO NOT REMOVE THIS LINE.\n      //DO NOT OPTIMIZE THIS LINE. THE MINIFIER WILL REMOVE IT OTHERWISE WHICH\n      //WILL RESULT IN AN UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND\n      //WILL TAKE YEARS AWAY FROM YOUR LIFE.\n      if (domNode) {\n        if (!domNode.nodeType && domNode instanceof jqLite) {\n          domNode = domNode[0];\n        }\n      } else {\n        domNode = $document[0].body;\n      }\n      return domNode.offsetWidth + 1;\n    };\n  }];\n};\n\nvar APPLICATION_JSON = 'application/json';\nvar CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'};\nvar JSON_START = /^\\[|^\\{(?!\\{)/;\nvar JSON_ENDS = {\n  '[': /]$/,\n  '{': /}$/\n};\nvar JSON_PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\nvar $httpMinErr = minErr('$http');\nvar $httpMinErrLegacyFn = function(method) {\n  return function() {\n    throw $httpMinErr('legacy', 'The method `{0}` on the promise returned from `$http` has been disabled.', method);\n  };\n};\n\nfunction serializeValue(v) {\n  if (isObject(v)) {\n    return isDate(v) ? v.toISOString() : toJson(v);\n  }\n  return v;\n}\n\n\nfunction $HttpParamSerializerProvider() {\n  /**\n   * @ngdoc service\n   * @name $httpParamSerializer\n   * @description\n   *\n   * Default {@link $http `$http`} params serializer that converts objects to strings\n   * according to the following rules:\n   *\n   * * `{'foo': 'bar'}` results in `foo=bar`\n   * * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)\n   * * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)\n   * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D\"` (stringified and encoded representation of an object)\n   *\n   * Note that serializer will sort the request parameters alphabetically.\n   * */\n\n  this.$get = function() {\n    return function ngParamSerializer(params) {\n      if (!params) return '';\n      var parts = [];\n      forEachSorted(params, function(value, key) {\n        if (value === null || isUndefined(value)) return;\n        if (isArray(value)) {\n          forEach(value, function(v) {\n            parts.push(encodeUriQuery(key)  + '=' + encodeUriQuery(serializeValue(v)));\n          });\n        } else {\n          parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(value)));\n        }\n      });\n\n      return parts.join('&');\n    };\n  };\n}\n\nfunction $HttpParamSerializerJQLikeProvider() {\n  /**\n   * @ngdoc service\n   * @name $httpParamSerializerJQLike\n   * @description\n   *\n   * Alternative {@link $http `$http`} params serializer that follows\n   * jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic.\n   * The serializer will also sort the params alphabetically.\n   *\n   * To use it for serializing `$http` request parameters, set it as the `paramSerializer` property:\n   *\n   * ```js\n   * $http({\n   *   url: myUrl,\n   *   method: 'GET',\n   *   params: myParams,\n   *   paramSerializer: '$httpParamSerializerJQLike'\n   * });\n   * ```\n   *\n   * It is also possible to set it as the default `paramSerializer` in the\n   * {@link $httpProvider#defaults `$httpProvider`}.\n   *\n   * Additionally, you can inject the serializer and use it explicitly, for example to serialize\n   * form data for submission:\n   *\n   * ```js\n   * .controller(function($http, $httpParamSerializerJQLike) {\n   *   //...\n   *\n   *   $http({\n   *     url: myUrl,\n   *     method: 'POST',\n   *     data: $httpParamSerializerJQLike(myData),\n   *     headers: {\n   *       'Content-Type': 'application/x-www-form-urlencoded'\n   *     }\n   *   });\n   *\n   * });\n   * ```\n   *\n   * */\n  this.$get = function() {\n    return function jQueryLikeParamSerializer(params) {\n      if (!params) return '';\n      var parts = [];\n      serialize(params, '', true);\n      return parts.join('&');\n\n      function serialize(toSerialize, prefix, topLevel) {\n        if (toSerialize === null || isUndefined(toSerialize)) return;\n        if (isArray(toSerialize)) {\n          forEach(toSerialize, function(value, index) {\n            serialize(value, prefix + '[' + (isObject(value) ? index : '') + ']');\n          });\n        } else if (isObject(toSerialize) && !isDate(toSerialize)) {\n          forEachSorted(toSerialize, function(value, key) {\n            serialize(value, prefix +\n                (topLevel ? '' : '[') +\n                key +\n                (topLevel ? '' : ']'));\n          });\n        } else {\n          parts.push(encodeUriQuery(prefix) + '=' + encodeUriQuery(serializeValue(toSerialize)));\n        }\n      }\n    };\n  };\n}\n\nfunction defaultHttpResponseTransform(data, headers) {\n  if (isString(data)) {\n    // Strip json vulnerability protection prefix and trim whitespace\n    var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim();\n\n    if (tempData) {\n      var contentType = headers('Content-Type');\n      if ((contentType && (contentType.indexOf(APPLICATION_JSON) === 0)) || isJsonLike(tempData)) {\n        data = fromJson(tempData);\n      }\n    }\n  }\n\n  return data;\n}\n\nfunction isJsonLike(str) {\n    var jsonStart = str.match(JSON_START);\n    return jsonStart && JSON_ENDS[jsonStart[0]].test(str);\n}\n\n/**\n * Parse headers into key value object\n *\n * @param {string} headers Raw headers as a string\n * @returns {Object} Parsed headers as key value object\n */\nfunction parseHeaders(headers) {\n  var parsed = createMap(), i;\n\n  function fillInParsed(key, val) {\n    if (key) {\n      parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n    }\n  }\n\n  if (isString(headers)) {\n    forEach(headers.split('\\n'), function(line) {\n      i = line.indexOf(':');\n      fillInParsed(lowercase(trim(line.substr(0, i))), trim(line.substr(i + 1)));\n    });\n  } else if (isObject(headers)) {\n    forEach(headers, function(headerVal, headerKey) {\n      fillInParsed(lowercase(headerKey), trim(headerVal));\n    });\n  }\n\n  return parsed;\n}\n\n\n/**\n * Returns a function that provides access to parsed headers.\n *\n * Headers are lazy parsed when first requested.\n * @see parseHeaders\n *\n * @param {(string|Object)} headers Headers to provide access to.\n * @returns {function(string=)} Returns a getter function which if called with:\n *\n *   - if called with single an argument returns a single header value or null\n *   - if called with no arguments returns an object containing all headers.\n */\nfunction headersGetter(headers) {\n  var headersObj;\n\n  return function(name) {\n    if (!headersObj) headersObj =  parseHeaders(headers);\n\n    if (name) {\n      var value = headersObj[lowercase(name)];\n      if (value === void 0) {\n        value = null;\n      }\n      return value;\n    }\n\n    return headersObj;\n  };\n}\n\n\n/**\n * Chain all given functions\n *\n * This function is used for both request and response transforming\n *\n * @param {*} data Data to transform.\n * @param {function(string=)} headers HTTP headers getter fn.\n * @param {number} status HTTP status code of the response.\n * @param {(Function|Array.<Function>)} fns Function or an array of functions.\n * @returns {*} Transformed data.\n */\nfunction transformData(data, headers, status, fns) {\n  if (isFunction(fns)) {\n    return fns(data, headers, status);\n  }\n\n  forEach(fns, function(fn) {\n    data = fn(data, headers, status);\n  });\n\n  return data;\n}\n\n\nfunction isSuccess(status) {\n  return 200 <= status && status < 300;\n}\n\n\n/**\n * @ngdoc provider\n * @name $httpProvider\n * @description\n * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.\n * */\nfunction $HttpProvider() {\n  /**\n   * @ngdoc property\n   * @name $httpProvider#defaults\n   * @description\n   *\n   * Object containing default values for all {@link ng.$http $http} requests.\n   *\n   * - **`defaults.cache`** - {boolean|Object} - A boolean value or object created with\n   * {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of HTTP responses\n   * by default. See {@link $http#caching $http Caching} for more information.\n   *\n   * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.\n   * Defaults value is `'XSRF-TOKEN'`.\n   *\n   * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the\n   * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.\n   *\n   * - **`defaults.headers`** - {Object} - Default headers for all $http requests.\n   * Refer to {@link ng.$http#setting-http-headers $http} for documentation on\n   * setting default headers.\n   *     - **`defaults.headers.common`**\n   *     - **`defaults.headers.post`**\n   *     - **`defaults.headers.put`**\n   *     - **`defaults.headers.patch`**\n   *\n   *\n   * - **`defaults.paramSerializer`** - `{string|function(Object<string,string>):string}` - A function\n   *  used to the prepare string representation of request parameters (specified as an object).\n   *  If specified as string, it is interpreted as a function registered with the {@link auto.$injector $injector}.\n   *  Defaults to {@link ng.$httpParamSerializer $httpParamSerializer}.\n   *\n   **/\n  var defaults = this.defaults = {\n    // transform incoming response data\n    transformResponse: [defaultHttpResponseTransform],\n\n    // transform outgoing request data\n    transformRequest: [function(d) {\n      return isObject(d) && !isFile(d) && !isBlob(d) && !isFormData(d) ? toJson(d) : d;\n    }],\n\n    // default headers\n    headers: {\n      common: {\n        'Accept': 'application/json, text/plain, */*'\n      },\n      post:   shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n      put:    shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n      patch:  shallowCopy(CONTENT_TYPE_APPLICATION_JSON)\n    },\n\n    xsrfCookieName: 'XSRF-TOKEN',\n    xsrfHeaderName: 'X-XSRF-TOKEN',\n\n    paramSerializer: '$httpParamSerializer'\n  };\n\n  var useApplyAsync = false;\n  /**\n   * @ngdoc method\n   * @name $httpProvider#useApplyAsync\n   * @description\n   *\n   * Configure $http service to combine processing of multiple http responses received at around\n   * the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in\n   * significant performance improvement for bigger applications that make many HTTP requests\n   * concurrently (common during application bootstrap).\n   *\n   * Defaults to false. If no value is specified, returns the current configured value.\n   *\n   * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred\n   *    \"apply\" on the next tick, giving time for subsequent requests in a roughly ~10ms window\n   *    to load and share the same digest cycle.\n   *\n   * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.\n   *    otherwise, returns the current configured value.\n   **/\n  this.useApplyAsync = function(value) {\n    if (isDefined(value)) {\n      useApplyAsync = !!value;\n      return this;\n    }\n    return useApplyAsync;\n  };\n\n  var useLegacyPromise = true;\n  /**\n   * @ngdoc method\n   * @name $httpProvider#useLegacyPromiseExtensions\n   * @description\n   *\n   * Configure `$http` service to return promises without the shorthand methods `success` and `error`.\n   * This should be used to make sure that applications work without these methods.\n   *\n   * Defaults to true. If no value is specified, returns the current configured value.\n   *\n   * @param {boolean=} value If true, `$http` will return a promise with the deprecated legacy `success` and `error` methods.\n   *\n   * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.\n   *    otherwise, returns the current configured value.\n   **/\n  this.useLegacyPromiseExtensions = function(value) {\n    if (isDefined(value)) {\n      useLegacyPromise = !!value;\n      return this;\n    }\n    return useLegacyPromise;\n  };\n\n  /**\n   * @ngdoc property\n   * @name $httpProvider#interceptors\n   * @description\n   *\n   * Array containing service factories for all synchronous or asynchronous {@link ng.$http $http}\n   * pre-processing of request or postprocessing of responses.\n   *\n   * These service factories are ordered by request, i.e. they are applied in the same order as the\n   * array, on request, but reverse order, on response.\n   *\n   * {@link ng.$http#interceptors Interceptors detailed info}\n   **/\n  var interceptorFactories = this.interceptors = [];\n\n  this.$get = ['$httpBackend', '$$cookieReader', '$cacheFactory', '$rootScope', '$q', '$injector',\n      function($httpBackend, $$cookieReader, $cacheFactory, $rootScope, $q, $injector) {\n\n    var defaultCache = $cacheFactory('$http');\n\n    /**\n     * Make sure that default param serializer is exposed as a function\n     */\n    defaults.paramSerializer = isString(defaults.paramSerializer) ?\n      $injector.get(defaults.paramSerializer) : defaults.paramSerializer;\n\n    /**\n     * Interceptors stored in reverse order. Inner interceptors before outer interceptors.\n     * The reversal is needed so that we can build up the interception chain around the\n     * server request.\n     */\n    var reversedInterceptors = [];\n\n    forEach(interceptorFactories, function(interceptorFactory) {\n      reversedInterceptors.unshift(isString(interceptorFactory)\n          ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));\n    });\n\n    /**\n     * @ngdoc service\n     * @kind function\n     * @name $http\n     * @requires ng.$httpBackend\n     * @requires $cacheFactory\n     * @requires $rootScope\n     * @requires $q\n     * @requires $injector\n     *\n     * @description\n     * The `$http` service is a core Angular service that facilitates communication with the remote\n     * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest)\n     * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).\n     *\n     * For unit testing applications that use `$http` service, see\n     * {@link ngMock.$httpBackend $httpBackend mock}.\n     *\n     * For a higher level of abstraction, please check out the {@link ngResource.$resource\n     * $resource} service.\n     *\n     * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by\n     * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage\n     * it is important to familiarize yourself with these APIs and the guarantees they provide.\n     *\n     *\n     * ## General usage\n     * The `$http` service is a function which takes a single argument — a {@link $http#usage configuration object} —\n     * that is used to generate an HTTP request and returns  a {@link ng.$q promise}.\n     *\n     * ```js\n     *   // Simple GET request example:\n     *   $http({\n     *     method: 'GET',\n     *     url: '/someUrl'\n     *   }).then(function successCallback(response) {\n     *       // this callback will be called asynchronously\n     *       // when the response is available\n     *     }, function errorCallback(response) {\n     *       // called asynchronously if an error occurs\n     *       // or server returns response with an error status.\n     *     });\n     * ```\n     *\n     * The response object has these properties:\n     *\n     *   - **data** – `{string|Object}` – The response body transformed with the transform\n     *     functions.\n     *   - **status** – `{number}` – HTTP status code of the response.\n     *   - **headers** – `{function([headerName])}` – Header getter function.\n     *   - **config** – `{Object}` – The configuration object that was used to generate the request.\n     *   - **statusText** – `{string}` – HTTP status text of the response.\n     *\n     * A response status code between 200 and 299 is considered a success status and\n     * will result in the success callback being called. Note that if the response is a redirect,\n     * XMLHttpRequest will transparently follow it, meaning that the error callback will not be\n     * called for such responses.\n     *\n     *\n     * ## Shortcut methods\n     *\n     * Shortcut methods are also available. All shortcut methods require passing in the URL, and\n     * request data must be passed in for POST/PUT requests. An optional config can be passed as the\n     * last argument.\n     *\n     * ```js\n     *   $http.get('/someUrl', config).then(successCallback, errorCallback);\n     *   $http.post('/someUrl', data, config).then(successCallback, errorCallback);\n     * ```\n     *\n     * Complete list of shortcut methods:\n     *\n     * - {@link ng.$http#get $http.get}\n     * - {@link ng.$http#head $http.head}\n     * - {@link ng.$http#post $http.post}\n     * - {@link ng.$http#put $http.put}\n     * - {@link ng.$http#delete $http.delete}\n     * - {@link ng.$http#jsonp $http.jsonp}\n     * - {@link ng.$http#patch $http.patch}\n     *\n     *\n     * ## Writing Unit Tests that use $http\n     * When unit testing (using {@link ngMock ngMock}), it is necessary to call\n     * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending\n     * request using trained responses.\n     *\n     * ```\n     * $httpBackend.expectGET(...);\n     * $http.get(...);\n     * $httpBackend.flush();\n     * ```\n     *\n     * ## Deprecation Notice\n     * <div class=\"alert alert-danger\">\n     *   The `$http` legacy promise methods `success` and `error` have been deprecated.\n     *   Use the standard `then` method instead.\n     *   If {@link $httpProvider#useLegacyPromiseExtensions `$httpProvider.useLegacyPromiseExtensions`} is set to\n     *   `false` then these methods will throw {@link $http:legacy `$http/legacy`} error.\n     * </div>\n     *\n     * ## Setting HTTP Headers\n     *\n     * The $http service will automatically add certain HTTP headers to all requests. These defaults\n     * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration\n     * object, which currently contains this default configuration:\n     *\n     * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):\n     *   - `Accept: application/json, text/plain, * / *`\n     * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)\n     *   - `Content-Type: application/json`\n     * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)\n     *   - `Content-Type: application/json`\n     *\n     * To add or overwrite these defaults, simply add or remove a property from these configuration\n     * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object\n     * with the lowercased HTTP method name as the key, e.g.\n     * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }`.\n     *\n     * The defaults can also be set at runtime via the `$http.defaults` object in the same\n     * fashion. For example:\n     *\n     * ```\n     * module.run(function($http) {\n     *   $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w';\n     * });\n     * ```\n     *\n     * In addition, you can supply a `headers` property in the config object passed when\n     * calling `$http(config)`, which overrides the defaults without changing them globally.\n     *\n     * To explicitly remove a header automatically added via $httpProvider.defaults.headers on a per request basis,\n     * Use the `headers` property, setting the desired header to `undefined`. For example:\n     *\n     * ```js\n     * var req = {\n     *  method: 'POST',\n     *  url: 'http://example.com',\n     *  headers: {\n     *    'Content-Type': undefined\n     *  },\n     *  data: { test: 'test' }\n     * }\n     *\n     * $http(req).then(function(){...}, function(){...});\n     * ```\n     *\n     * ## Transforming Requests and Responses\n     *\n     * Both requests and responses can be transformed using transformation functions: `transformRequest`\n     * and `transformResponse`. These properties can be a single function that returns\n     * the transformed value (`function(data, headersGetter, status)`) or an array of such transformation functions,\n     * which allows you to `push` or `unshift` a new transformation function into the transformation chain.\n     *\n     * <div class=\"alert alert-warning\">\n     * **Note:** Angular does not make a copy of the `data` parameter before it is passed into the `transformRequest` pipeline.\n     * That means changes to the properties of `data` are not local to the transform function (since Javascript passes objects by reference).\n     * For example, when calling `$http.get(url, $scope.myObject)`, modifications to the object's properties in a transformRequest\n     * function will be reflected on the scope and in any templates where the object is data-bound.\n     * To prevent his, transform functions should have no side-effects.\n     * If you need to modify properties, it is recommended to make a copy of the data, or create new object to return.\n     * </div>\n     *\n     * ### Default Transformations\n     *\n     * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and\n     * `defaults.transformResponse` properties. If a request does not provide its own transformations\n     * then these will be applied.\n     *\n     * You can augment or replace the default transformations by modifying these properties by adding to or\n     * replacing the array.\n     *\n     * Angular provides the following default transformations:\n     *\n     * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`):\n     *\n     * - If the `data` property of the request configuration object contains an object, serialize it\n     *   into JSON format.\n     *\n     * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`):\n     *\n     *  - If XSRF prefix is detected, strip it (see Security Considerations section below).\n     *  - If JSON response is detected, deserialize it using a JSON parser.\n     *\n     *\n     * ### Overriding the Default Transformations Per Request\n     *\n     * If you wish override the request/response transformations only for a single request then provide\n     * `transformRequest` and/or `transformResponse` properties on the configuration object passed\n     * into `$http`.\n     *\n     * Note that if you provide these properties on the config object the default transformations will be\n     * overwritten. If you wish to augment the default transformations then you must include them in your\n     * local transformation array.\n     *\n     * The following code demonstrates adding a new response transformation to be run after the default response\n     * transformations have been run.\n     *\n     * ```js\n     * function appendTransform(defaults, transform) {\n     *\n     *   // We can't guarantee that the default transformation is an array\n     *   defaults = angular.isArray(defaults) ? defaults : [defaults];\n     *\n     *   // Append the new transformation to the defaults\n     *   return defaults.concat(transform);\n     * }\n     *\n     * $http({\n     *   url: '...',\n     *   method: 'GET',\n     *   transformResponse: appendTransform($http.defaults.transformResponse, function(value) {\n     *     return doTransform(value);\n     *   })\n     * });\n     * ```\n     *\n     *\n     * ## Caching\n     *\n     * {@link ng.$http `$http`} responses are not cached by default. To enable caching, you must\n     * set the config.cache value or the default cache value to TRUE or to a cache object (created\n     * with {@link ng.$cacheFactory `$cacheFactory`}). If defined, the value of config.cache takes\n     * precedence over the default cache value.\n     *\n     * In order to:\n     *   * cache all responses - set the default cache value to TRUE or to a cache object\n     *   * cache a specific response - set config.cache value to TRUE or to a cache object\n     *\n     * If caching is enabled, but neither the default cache nor config.cache are set to a cache object,\n     * then the default `$cacheFactory($http)` object is used.\n     *\n     * The default cache value can be set by updating the\n     * {@link ng.$http#defaults `$http.defaults.cache`} property or the\n     * {@link $httpProvider#defaults `$httpProvider.defaults.cache`} property.\n     *\n     * When caching is enabled, {@link ng.$http `$http`} stores the response from the server using\n     * the relevant cache object. The next time the same request is made, the response is returned\n     * from the cache without sending a request to the server.\n     *\n     * Take note that:\n     *\n     *   * Only GET and JSONP requests are cached.\n     *   * The cache key is the request URL including search parameters; headers are not considered.\n     *   * Cached responses are returned asynchronously, in the same way as responses from the server.\n     *   * If multiple identical requests are made using the same cache, which is not yet populated,\n     *     one request will be made to the server and remaining requests will return the same response.\n     *   * A cache-control header on the response does not affect if or how responses are cached.\n     *\n     *\n     * ## Interceptors\n     *\n     * Before you start creating interceptors, be sure to understand the\n     * {@link ng.$q $q and deferred/promise APIs}.\n     *\n     * For purposes of global error handling, authentication, or any kind of synchronous or\n     * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be\n     * able to intercept requests before they are handed to the server and\n     * responses before they are handed over to the application code that\n     * initiated these requests. The interceptors leverage the {@link ng.$q\n     * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.\n     *\n     * The interceptors are service factories that are registered with the `$httpProvider` by\n     * adding them to the `$httpProvider.interceptors` array. The factory is called and\n     * injected with dependencies (if specified) and returns the interceptor.\n     *\n     * There are two kinds of interceptors (and two kinds of rejection interceptors):\n     *\n     *   * `request`: interceptors get called with a http {@link $http#usage config} object. The function is free to\n     *     modify the `config` object or create a new one. The function needs to return the `config`\n     *     object directly, or a promise containing the `config` or a new `config` object.\n     *   * `requestError`: interceptor gets called when a previous interceptor threw an error or\n     *     resolved with a rejection.\n     *   * `response`: interceptors get called with http `response` object. The function is free to\n     *     modify the `response` object or create a new one. The function needs to return the `response`\n     *     object directly, or as a promise containing the `response` or a new `response` object.\n     *   * `responseError`: interceptor gets called when a previous interceptor threw an error or\n     *     resolved with a rejection.\n     *\n     *\n     * ```js\n     *   // register the interceptor as a service\n     *   $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n     *     return {\n     *       // optional method\n     *       'request': function(config) {\n     *         // do something on success\n     *         return config;\n     *       },\n     *\n     *       // optional method\n     *      'requestError': function(rejection) {\n     *         // do something on error\n     *         if (canRecover(rejection)) {\n     *           return responseOrNewPromise\n     *         }\n     *         return $q.reject(rejection);\n     *       },\n     *\n     *\n     *\n     *       // optional method\n     *       'response': function(response) {\n     *         // do something on success\n     *         return response;\n     *       },\n     *\n     *       // optional method\n     *      'responseError': function(rejection) {\n     *         // do something on error\n     *         if (canRecover(rejection)) {\n     *           return responseOrNewPromise\n     *         }\n     *         return $q.reject(rejection);\n     *       }\n     *     };\n     *   });\n     *\n     *   $httpProvider.interceptors.push('myHttpInterceptor');\n     *\n     *\n     *   // alternatively, register the interceptor via an anonymous factory\n     *   $httpProvider.interceptors.push(function($q, dependency1, dependency2) {\n     *     return {\n     *      'request': function(config) {\n     *          // same as above\n     *       },\n     *\n     *       'response': function(response) {\n     *          // same as above\n     *       }\n     *     };\n     *   });\n     * ```\n     *\n     * ## Security Considerations\n     *\n     * When designing web applications, consider security threats from:\n     *\n     * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n     * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)\n     *\n     * Both server and the client must cooperate in order to eliminate these threats. Angular comes\n     * pre-configured with strategies that address these issues, but for this to work backend server\n     * cooperation is required.\n     *\n     * ### JSON Vulnerability Protection\n     *\n     * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n     * allows third party website to turn your JSON resource URL into\n     * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To\n     * counter this your server can prefix all JSON requests with following string `\")]}',\\n\"`.\n     * Angular will automatically strip the prefix before processing it as JSON.\n     *\n     * For example if your server needs to return:\n     * ```js\n     * ['one','two']\n     * ```\n     *\n     * which is vulnerable to attack, your server can return:\n     * ```js\n     * )]}',\n     * ['one','two']\n     * ```\n     *\n     * Angular will strip the prefix, before processing the JSON.\n     *\n     *\n     * ### Cross Site Request Forgery (XSRF) Protection\n     *\n     * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is an attack technique by\n     * which the attacker can trick an authenticated user into unknowingly executing actions on your\n     * website. Angular provides a mechanism to counter XSRF. When performing XHR requests, the\n     * $http service reads a token from a cookie (by default, `XSRF-TOKEN`) and sets it as an HTTP\n     * header (`X-XSRF-TOKEN`). Since only JavaScript that runs on your domain could read the\n     * cookie, your server can be assured that the XHR came from JavaScript running on your domain.\n     * The header will not be set for cross-domain requests.\n     *\n     * To take advantage of this, your server needs to set a token in a JavaScript readable session\n     * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the\n     * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure\n     * that only JavaScript running on your domain could have sent the request. The token must be\n     * unique for each user and must be verifiable by the server (to prevent the JavaScript from\n     * making up its own tokens). We recommend that the token is a digest of your site's\n     * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography&#41;)\n     * for added security.\n     *\n     * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName\n     * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time,\n     * or the per-request config object.\n     *\n     * In order to prevent collisions in environments where multiple Angular apps share the\n     * same domain or subdomain, we recommend that each application uses unique cookie name.\n     *\n     * @param {object} config Object describing the request to be made and how it should be\n     *    processed. The object has following properties:\n     *\n     *    - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)\n     *    - **url** – `{string}` – Absolute or relative URL of the resource that is being requested.\n     *    - **params** – `{Object.<string|Object>}` – Map of strings or objects which will be serialized\n     *      with the `paramSerializer` and appended as GET parameters.\n     *    - **data** – `{string|Object}` – Data to be sent as the request message data.\n     *    - **headers** – `{Object}` – Map of strings or functions which return strings representing\n     *      HTTP headers to send to the server. If the return value of a function is null, the\n     *      header will not be sent. Functions accept a config object as an argument.\n     *    - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token.\n     *    - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token.\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     *      See {@link ng.$http#overriding-the-default-transformations-per-request\n     *      Overriding the Default Transformations}\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) version.\n     *      See {@link ng.$http#overriding-the-default-transformations-per-request\n     *      Overriding the Default Transformations}\n     *    - **paramSerializer** - `{string|function(Object<string,string>):string}` - A function used to\n     *      prepare the string representation of request parameters (specified as an object).\n     *      If specified as string, it is interpreted as function registered with the\n     *      {@link $injector $injector}, which means you can create your own serializer\n     *      by registering it as a {@link auto.$provide#service service}.\n     *      The default serializer is the {@link $httpParamSerializer $httpParamSerializer};\n     *      alternatively, you can use the {@link $httpParamSerializerJQLike $httpParamSerializerJQLike}\n     *    - **cache** – `{boolean|Object}` – 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|Promise}` – timeout in milliseconds, or {@link ng.$q promise}\n     *      that should abort the request when resolved.\n     *    - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the\n     *      XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials)\n     *      for more information.\n     *    - **responseType** - `{string}` - see\n     *      [XMLHttpRequest.responseType](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype).\n     *\n     * @returns {HttpPromise} Returns a {@link ng.$q `Promise}` that will be resolved to a response object\n     *                        when the request succeeds or fails.\n     *\n     *\n     * @property {Array.<Object>} pendingRequests Array of config objects for currently pending\n     *   requests. This is primarily meant to be used for debugging purposes.\n     *\n     *\n     * @example\n<example module=\"httpExample\">\n<file name=\"index.html\">\n  <div ng-controller=\"FetchController\">\n    <select ng-model=\"method\" aria-label=\"Request method\">\n      <option>GET</option>\n      <option>JSONP</option>\n    </select>\n    <input type=\"text\" ng-model=\"url\" size=\"80\" aria-label=\"URL\" />\n    <button id=\"fetchbtn\" ng-click=\"fetch()\">fetch</button><br>\n    <button id=\"samplegetbtn\" ng-click=\"updateModel('GET', 'http-hello.html')\">Sample GET</button>\n    <button id=\"samplejsonpbtn\"\n      ng-click=\"updateModel('JSONP',\n                    'https://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')\">\n      Sample JSONP\n    </button>\n    <button id=\"invalidjsonpbtn\"\n      ng-click=\"updateModel('JSONP', 'https://angularjs.org/doesntexist&callback=JSON_CALLBACK')\">\n        Invalid JSONP\n      </button>\n    <pre>http status code: {{status}}</pre>\n    <pre>http response data: {{data}}</pre>\n  </div>\n</file>\n<file name=\"script.js\">\n  angular.module('httpExample', [])\n    .controller('FetchController', ['$scope', '$http', '$templateCache',\n      function($scope, $http, $templateCache) {\n        $scope.method = 'GET';\n        $scope.url = 'http-hello.html';\n\n        $scope.fetch = function() {\n          $scope.code = null;\n          $scope.response = null;\n\n          $http({method: $scope.method, url: $scope.url, cache: $templateCache}).\n            then(function(response) {\n              $scope.status = response.status;\n              $scope.data = response.data;\n            }, function(response) {\n              $scope.data = response.data || \"Request failed\";\n              $scope.status = response.status;\n          });\n        };\n\n        $scope.updateModel = function(method, url) {\n          $scope.method = method;\n          $scope.url = url;\n        };\n      }]);\n</file>\n<file name=\"http-hello.html\">\n  Hello, $http!\n</file>\n<file name=\"protractor.js\" type=\"protractor\">\n  var status = element(by.binding('status'));\n  var data = element(by.binding('data'));\n  var fetchBtn = element(by.id('fetchbtn'));\n  var sampleGetBtn = element(by.id('samplegetbtn'));\n  var sampleJsonpBtn = element(by.id('samplejsonpbtn'));\n  var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));\n\n  it('should make an xhr GET request', function() {\n    sampleGetBtn.click();\n    fetchBtn.click();\n    expect(status.getText()).toMatch('200');\n    expect(data.getText()).toMatch(/Hello, \\$http!/);\n  });\n\n// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185\n// it('should make a JSONP request to angularjs.org', function() {\n//   sampleJsonpBtn.click();\n//   fetchBtn.click();\n//   expect(status.getText()).toMatch('200');\n//   expect(data.getText()).toMatch(/Super Hero!/);\n// });\n\n  it('should make JSONP request to invalid URL and invoke the error handler',\n      function() {\n    invalidJsonpBtn.click();\n    fetchBtn.click();\n    expect(status.getText()).toMatch('0');\n    expect(data.getText()).toMatch('Request failed');\n  });\n</file>\n</example>\n     */\n    function $http(requestConfig) {\n\n      if (!isObject(requestConfig)) {\n        throw minErr('$http')('badreq', 'Http request configuration must be an object.  Received: {0}', requestConfig);\n      }\n\n      if (!isString(requestConfig.url)) {\n        throw minErr('$http')('badreq', 'Http request configuration url must be a string.  Received: {0}', requestConfig.url);\n      }\n\n      var config = extend({\n        method: 'get',\n        transformRequest: defaults.transformRequest,\n        transformResponse: defaults.transformResponse,\n        paramSerializer: defaults.paramSerializer\n      }, requestConfig);\n\n      config.headers = mergeHeaders(requestConfig);\n      config.method = uppercase(config.method);\n      config.paramSerializer = isString(config.paramSerializer) ?\n        $injector.get(config.paramSerializer) : config.paramSerializer;\n\n      var serverRequest = function(config) {\n        var headers = config.headers;\n        var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);\n\n        // strip content-type if data is undefined\n        if (isUndefined(reqData)) {\n          forEach(headers, function(value, header) {\n            if (lowercase(header) === 'content-type') {\n                delete headers[header];\n            }\n          });\n        }\n\n        if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {\n          config.withCredentials = defaults.withCredentials;\n        }\n\n        // send request\n        return sendReq(config, reqData).then(transformResponse, transformResponse);\n      };\n\n      var chain = [serverRequest, undefined];\n      var promise = $q.when(config);\n\n      // apply interceptors\n      forEach(reversedInterceptors, function(interceptor) {\n        if (interceptor.request || interceptor.requestError) {\n          chain.unshift(interceptor.request, interceptor.requestError);\n        }\n        if (interceptor.response || interceptor.responseError) {\n          chain.push(interceptor.response, interceptor.responseError);\n        }\n      });\n\n      while (chain.length) {\n        var thenFn = chain.shift();\n        var rejectFn = chain.shift();\n\n        promise = promise.then(thenFn, rejectFn);\n      }\n\n      if (useLegacyPromise) {\n        promise.success = function(fn) {\n          assertArgFn(fn, 'fn');\n\n          promise.then(function(response) {\n            fn(response.data, response.status, response.headers, config);\n          });\n          return promise;\n        };\n\n        promise.error = function(fn) {\n          assertArgFn(fn, 'fn');\n\n          promise.then(null, function(response) {\n            fn(response.data, response.status, response.headers, config);\n          });\n          return promise;\n        };\n      } else {\n        promise.success = $httpMinErrLegacyFn('success');\n        promise.error = $httpMinErrLegacyFn('error');\n      }\n\n      return promise;\n\n      function transformResponse(response) {\n        // make a copy since the response must be cacheable\n        var resp = extend({}, response);\n        resp.data = transformData(response.data, response.headers, response.status,\n                                  config.transformResponse);\n        return (isSuccess(response.status))\n          ? resp\n          : $q.reject(resp);\n      }\n\n      function executeHeaderFns(headers, config) {\n        var headerContent, processedHeaders = {};\n\n        forEach(headers, function(headerFn, header) {\n          if (isFunction(headerFn)) {\n            headerContent = headerFn(config);\n            if (headerContent != null) {\n              processedHeaders[header] = headerContent;\n            }\n          } else {\n            processedHeaders[header] = headerFn;\n          }\n        });\n\n        return processedHeaders;\n      }\n\n      function mergeHeaders(config) {\n        var defHeaders = defaults.headers,\n            reqHeaders = extend({}, config.headers),\n            defHeaderName, lowercaseDefHeaderName, reqHeaderName;\n\n        defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);\n\n        // using for-in instead of forEach to avoid unnecessary iteration after header has been found\n        defaultHeadersIteration:\n        for (defHeaderName in defHeaders) {\n          lowercaseDefHeaderName = lowercase(defHeaderName);\n\n          for (reqHeaderName in reqHeaders) {\n            if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {\n              continue defaultHeadersIteration;\n            }\n          }\n\n          reqHeaders[defHeaderName] = defHeaders[defHeaderName];\n        }\n\n        // execute if header value is a function for merged headers\n        return executeHeaderFns(reqHeaders, shallowCopy(config));\n      }\n    }\n\n    $http.pendingRequests = [];\n\n    /**\n     * @ngdoc method\n     * @name $http#get\n     *\n     * @description\n     * Shortcut method to perform `GET` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name $http#delete\n     *\n     * @description\n     * Shortcut method to perform `DELETE` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name $http#head\n     *\n     * @description\n     * Shortcut method to perform `HEAD` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name $http#jsonp\n     *\n     * @description\n     * Shortcut method to perform `JSONP` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request.\n     *                     The name of the callback should be the string `JSON_CALLBACK`.\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n    createShortMethods('get', 'delete', 'head', 'jsonp');\n\n    /**\n     * @ngdoc method\n     * @name $http#post\n     *\n     * @description\n     * Shortcut method to perform `POST` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {*} data Request content\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name $http#put\n     *\n     * @description\n     * Shortcut method to perform `PUT` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {*} data Request content\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n     /**\n      * @ngdoc method\n      * @name $http#patch\n      *\n      * @description\n      * Shortcut method to perform `PATCH` request.\n      *\n      * @param {string} url Relative or absolute URL specifying the destination of the request\n      * @param {*} data Request content\n      * @param {Object=} config Optional configuration object\n      * @returns {HttpPromise} Future object\n      */\n    createShortMethodsWithData('post', 'put', 'patch');\n\n        /**\n         * @ngdoc property\n         * @name $http#defaults\n         *\n         * @description\n         * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of\n         * default headers, withCredentials as well as request and response transformations.\n         *\n         * See \"Setting HTTP Headers\" and \"Transforming Requests and Responses\" sections above.\n         */\n    $http.defaults = defaults;\n\n\n    return $http;\n\n\n    function createShortMethods(names) {\n      forEach(arguments, function(name) {\n        $http[name] = function(url, config) {\n          return $http(extend({}, config || {}, {\n            method: name,\n            url: url\n          }));\n        };\n      });\n    }\n\n\n    function createShortMethodsWithData(name) {\n      forEach(arguments, function(name) {\n        $http[name] = function(url, data, config) {\n          return $http(extend({}, config || {}, {\n            method: name,\n            url: url,\n            data: data\n          }));\n        };\n      });\n    }\n\n\n    /**\n     * Makes the request.\n     *\n     * !!! ACCESSES CLOSURE VARS:\n     * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests\n     */\n    function sendReq(config, reqData) {\n      var deferred = $q.defer(),\n          promise = deferred.promise,\n          cache,\n          cachedResp,\n          reqHeaders = config.headers,\n          url = buildUrl(config.url, config.paramSerializer(config.params));\n\n      $http.pendingRequests.push(config);\n      promise.then(removePendingReq, removePendingReq);\n\n\n      if ((config.cache || defaults.cache) && config.cache !== false &&\n          (config.method === 'GET' || config.method === 'JSONP')) {\n        cache = isObject(config.cache) ? config.cache\n              : isObject(defaults.cache) ? defaults.cache\n              : defaultCache;\n      }\n\n      if (cache) {\n        cachedResp = cache.get(url);\n        if (isDefined(cachedResp)) {\n          if (isPromiseLike(cachedResp)) {\n            // cached request has already been sent, but there is no response yet\n            cachedResp.then(resolvePromiseWithResult, resolvePromiseWithResult);\n          } else {\n            // serving from cache\n            if (isArray(cachedResp)) {\n              resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3]);\n            } else {\n              resolvePromise(cachedResp, 200, {}, 'OK');\n            }\n          }\n        } else {\n          // put the promise for the non-transformed response into cache as a placeholder\n          cache.put(url, promise);\n        }\n      }\n\n\n      // if we won't have the response in cache, set the xsrf headers and\n      // send the request to the backend\n      if (isUndefined(cachedResp)) {\n        var xsrfValue = urlIsSameOrigin(config.url)\n            ? $$cookieReader()[config.xsrfCookieName || defaults.xsrfCookieName]\n            : undefined;\n        if (xsrfValue) {\n          reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;\n        }\n\n        $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,\n            config.withCredentials, config.responseType);\n      }\n\n      return promise;\n\n\n      /**\n       * Callback registered to $httpBackend():\n       *  - caches the response if desired\n       *  - resolves the raw $http promise\n       *  - calls $apply\n       */\n      function done(status, response, headersString, statusText) {\n        if (cache) {\n          if (isSuccess(status)) {\n            cache.put(url, [status, response, parseHeaders(headersString), statusText]);\n          } else {\n            // remove promise from the cache\n            cache.remove(url);\n          }\n        }\n\n        function resolveHttpPromise() {\n          resolvePromise(response, status, headersString, statusText);\n        }\n\n        if (useApplyAsync) {\n          $rootScope.$applyAsync(resolveHttpPromise);\n        } else {\n          resolveHttpPromise();\n          if (!$rootScope.$$phase) $rootScope.$apply();\n        }\n      }\n\n\n      /**\n       * Resolves the raw $http promise.\n       */\n      function resolvePromise(response, status, headers, statusText) {\n        //status: HTTP response status code, 0, -1 (aborted by timeout / promise)\n        status = status >= -1 ? status : 0;\n\n        (isSuccess(status) ? deferred.resolve : deferred.reject)({\n          data: response,\n          status: status,\n          headers: headersGetter(headers),\n          config: config,\n          statusText: statusText\n        });\n      }\n\n      function resolvePromiseWithResult(result) {\n        resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText);\n      }\n\n      function removePendingReq() {\n        var idx = $http.pendingRequests.indexOf(config);\n        if (idx !== -1) $http.pendingRequests.splice(idx, 1);\n      }\n    }\n\n\n    function buildUrl(url, serializedParams) {\n      if (serializedParams.length > 0) {\n        url += ((url.indexOf('?') == -1) ? '?' : '&') + serializedParams;\n      }\n      return url;\n    }\n  }];\n}\n\n/**\n * @ngdoc service\n * @name $xhrFactory\n *\n * @description\n * Factory function used to create XMLHttpRequest objects.\n *\n * Replace or decorate this service to create your own custom XMLHttpRequest objects.\n *\n * ```\n * angular.module('myApp', [])\n * .factory('$xhrFactory', function() {\n *   return function createXhr(method, url) {\n *     return new window.XMLHttpRequest({mozSystem: true});\n *   };\n * });\n * ```\n *\n * @param {string} method HTTP method of the request (GET, POST, PUT, ..)\n * @param {string} url URL of the request.\n */\nfunction $xhrFactoryProvider() {\n  this.$get = function() {\n    return function createXhr() {\n      return new window.XMLHttpRequest();\n    };\n  };\n}\n\n/**\n * @ngdoc service\n * @name $httpBackend\n * @requires $window\n * @requires $document\n * @requires $xhrFactory\n *\n * @description\n * HTTP backend used by the {@link ng.$http service} that delegates to\n * XMLHttpRequest object or JSONP and deals with browser incompatibilities.\n *\n * You should never need to use this service directly, instead use the higher-level abstractions:\n * {@link ng.$http $http} or {@link ngResource.$resource $resource}.\n *\n * During testing this implementation is swapped with {@link ngMock.$httpBackend mock\n * $httpBackend} which can be trained with responses.\n */\nfunction $HttpBackendProvider() {\n  this.$get = ['$browser', '$window', '$document', '$xhrFactory', function($browser, $window, $document, $xhrFactory) {\n    return createHttpBackend($browser, $xhrFactory, $browser.defer, $window.angular.callbacks, $document[0]);\n  }];\n}\n\nfunction createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {\n  // TODO(vojta): fix the signature\n  return function(method, url, post, callback, headers, timeout, withCredentials, responseType) {\n    $browser.$$incOutstandingRequestCount();\n    url = url || $browser.url();\n\n    if (lowercase(method) == 'jsonp') {\n      var callbackId = '_' + (callbacks.counter++).toString(36);\n      callbacks[callbackId] = function(data) {\n        callbacks[callbackId].data = data;\n        callbacks[callbackId].called = true;\n      };\n\n      var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),\n          callbackId, function(status, text) {\n        completeRequest(callback, status, callbacks[callbackId].data, \"\", text);\n        callbacks[callbackId] = noop;\n      });\n    } else {\n\n      var xhr = createXhr(method, url);\n\n      xhr.open(method, url, true);\n      forEach(headers, function(value, key) {\n        if (isDefined(value)) {\n            xhr.setRequestHeader(key, value);\n        }\n      });\n\n      xhr.onload = function requestLoaded() {\n        var statusText = xhr.statusText || '';\n\n        // responseText is the old-school way of retrieving response (supported by IE9)\n        // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)\n        var response = ('response' in xhr) ? xhr.response : xhr.responseText;\n\n        // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)\n        var status = xhr.status === 1223 ? 204 : xhr.status;\n\n        // fix status code when it is 0 (0 status is undocumented).\n        // Occurs when accessing file resources or on Android 4.1 stock browser\n        // while retrieving files from application cache.\n        if (status === 0) {\n          status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0;\n        }\n\n        completeRequest(callback,\n            status,\n            response,\n            xhr.getAllResponseHeaders(),\n            statusText);\n      };\n\n      var requestError = function() {\n        // The response is always empty\n        // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error\n        completeRequest(callback, -1, null, null, '');\n      };\n\n      xhr.onerror = requestError;\n      xhr.onabort = requestError;\n\n      if (withCredentials) {\n        xhr.withCredentials = true;\n      }\n\n      if (responseType) {\n        try {\n          xhr.responseType = responseType;\n        } catch (e) {\n          // WebKit added support for the json responseType value on 09/03/2013\n          // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are\n          // known to throw when setting the value \"json\" as the response type. Other older\n          // browsers implementing the responseType\n          //\n          // The json response type can be ignored if not supported, because JSON payloads are\n          // parsed on the client-side regardless.\n          if (responseType !== 'json') {\n            throw e;\n          }\n        }\n      }\n\n      xhr.send(isUndefined(post) ? null : post);\n    }\n\n    if (timeout > 0) {\n      var timeoutId = $browserDefer(timeoutRequest, timeout);\n    } else if (isPromiseLike(timeout)) {\n      timeout.then(timeoutRequest);\n    }\n\n\n    function timeoutRequest() {\n      jsonpDone && jsonpDone();\n      xhr && xhr.abort();\n    }\n\n    function completeRequest(callback, status, response, headersString, statusText) {\n      // cancel timeout and subsequent timeout promise resolution\n      if (isDefined(timeoutId)) {\n        $browserDefer.cancel(timeoutId);\n      }\n      jsonpDone = xhr = null;\n\n      callback(status, response, headersString, statusText);\n      $browser.$$completeOutstandingRequest(noop);\n    }\n  };\n\n  function jsonpReq(url, callbackId, done) {\n    // we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.:\n    // - fetches local scripts via XHR and evals them\n    // - adds and immediately removes script elements from the document\n    var script = rawDocument.createElement('script'), callback = null;\n    script.type = \"text/javascript\";\n    script.src = url;\n    script.async = true;\n\n    callback = function(event) {\n      removeEventListenerFn(script, \"load\", callback);\n      removeEventListenerFn(script, \"error\", callback);\n      rawDocument.body.removeChild(script);\n      script = null;\n      var status = -1;\n      var text = \"unknown\";\n\n      if (event) {\n        if (event.type === \"load\" && !callbacks[callbackId].called) {\n          event = { type: \"error\" };\n        }\n        text = event.type;\n        status = event.type === \"error\" ? 404 : 200;\n      }\n\n      if (done) {\n        done(status, text);\n      }\n    };\n\n    addEventListenerFn(script, \"load\", callback);\n    addEventListenerFn(script, \"error\", callback);\n    rawDocument.body.appendChild(script);\n    return callback;\n  }\n}\n\nvar $interpolateMinErr = angular.$interpolateMinErr = minErr('$interpolate');\n$interpolateMinErr.throwNoconcat = function(text) {\n  throw $interpolateMinErr('noconcat',\n      \"Error while interpolating: {0}\\nStrict Contextual Escaping disallows \" +\n      \"interpolations that concatenate multiple expressions when a trusted value is \" +\n      \"required.  See http://docs.angularjs.org/api/ng.$sce\", text);\n};\n\n$interpolateMinErr.interr = function(text, err) {\n  return $interpolateMinErr('interr', \"Can't interpolate: {0}\\n{1}\", text, err.toString());\n};\n\n/**\n * @ngdoc provider\n * @name $interpolateProvider\n *\n * @description\n *\n * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.\n *\n * <div class=\"alert alert-danger\">\n * This feature is sometimes used to mix different markup languages, e.g. to wrap an Angular\n * template within a Python Jinja template (or any other template language). Mixing templating\n * languages is **very dangerous**. The embedding template language will not safely escape Angular\n * expressions, so any user-controlled values in the template will cause Cross Site Scripting (XSS)\n * security bugs!\n * </div>\n *\n * @example\n<example name=\"custom-interpolation-markup\" module=\"customInterpolationApp\">\n<file name=\"index.html\">\n<script>\n  var customInterpolationApp = angular.module('customInterpolationApp', []);\n\n  customInterpolationApp.config(function($interpolateProvider) {\n    $interpolateProvider.startSymbol('//');\n    $interpolateProvider.endSymbol('//');\n  });\n\n\n  customInterpolationApp.controller('DemoController', function() {\n      this.label = \"This binding is brought you by // interpolation symbols.\";\n  });\n</script>\n<div ng-controller=\"DemoController as demo\">\n    //demo.label//\n</div>\n</file>\n<file name=\"protractor.js\" type=\"protractor\">\n  it('should interpolate binding with custom symbols', function() {\n    expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');\n  });\n</file>\n</example>\n */\nfunction $InterpolateProvider() {\n  var startSymbol = '{{';\n  var endSymbol = '}}';\n\n  /**\n   * @ngdoc method\n   * @name $interpolateProvider#startSymbol\n   * @description\n   * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.\n   *\n   * @param {string=} value new value to set the starting symbol to.\n   * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n   */\n  this.startSymbol = function(value) {\n    if (value) {\n      startSymbol = value;\n      return this;\n    } else {\n      return startSymbol;\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name $interpolateProvider#endSymbol\n   * @description\n   * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n   *\n   * @param {string=} value new value to set the ending symbol to.\n   * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n   */\n  this.endSymbol = function(value) {\n    if (value) {\n      endSymbol = value;\n      return this;\n    } else {\n      return endSymbol;\n    }\n  };\n\n\n  this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {\n    var startSymbolLength = startSymbol.length,\n        endSymbolLength = endSymbol.length,\n        escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'),\n        escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g');\n\n    function escape(ch) {\n      return '\\\\\\\\\\\\' + ch;\n    }\n\n    function unescapeText(text) {\n      return text.replace(escapedStartRegexp, startSymbol).\n        replace(escapedEndRegexp, endSymbol);\n    }\n\n    function stringify(value) {\n      if (value == null) { // null || undefined\n        return '';\n      }\n      switch (typeof value) {\n        case 'string':\n          break;\n        case 'number':\n          value = '' + value;\n          break;\n        default:\n          value = toJson(value);\n      }\n\n      return value;\n    }\n\n    //TODO: this is the same as the constantWatchDelegate in parse.js\n    function constantWatchDelegate(scope, listener, objectEquality, constantInterp) {\n      var unwatch;\n      return unwatch = scope.$watch(function constantInterpolateWatch(scope) {\n        unwatch();\n        return constantInterp(scope);\n      }, listener, objectEquality);\n    }\n\n    /**\n     * @ngdoc service\n     * @name $interpolate\n     * @kind function\n     *\n     * @requires $parse\n     * @requires $sce\n     *\n     * @description\n     *\n     * Compiles a string with markup into an interpolation function. This service is used by the\n     * HTML {@link ng.$compile $compile} service for data binding. See\n     * {@link ng.$interpolateProvider $interpolateProvider} for configuring the\n     * interpolation markup.\n     *\n     *\n     * ```js\n     *   var $interpolate = ...; // injected\n     *   var exp = $interpolate('Hello {{name | uppercase}}!');\n     *   expect(exp({name:'Angular'})).toEqual('Hello ANGULAR!');\n     * ```\n     *\n     * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is\n     * `true`, the interpolation function will return `undefined` unless all embedded expressions\n     * evaluate to a value other than `undefined`.\n     *\n     * ```js\n     *   var $interpolate = ...; // injected\n     *   var context = {greeting: 'Hello', name: undefined };\n     *\n     *   // default \"forgiving\" mode\n     *   var exp = $interpolate('{{greeting}} {{name}}!');\n     *   expect(exp(context)).toEqual('Hello !');\n     *\n     *   // \"allOrNothing\" mode\n     *   exp = $interpolate('{{greeting}} {{name}}!', false, null, true);\n     *   expect(exp(context)).toBeUndefined();\n     *   context.name = 'Angular';\n     *   expect(exp(context)).toEqual('Hello Angular!');\n     * ```\n     *\n     * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.\n     *\n     * ####Escaped Interpolation\n     * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers\n     * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).\n     * It will be rendered as a regular start/end marker, and will not be interpreted as an expression\n     * or binding.\n     *\n     * This enables web-servers to prevent script injection attacks and defacing attacks, to some\n     * degree, while also enabling code examples to work without relying on the\n     * {@link ng.directive:ngNonBindable ngNonBindable} directive.\n     *\n     * **For security purposes, it is strongly encouraged that web servers escape user-supplied data,\n     * replacing angle brackets (&lt;, &gt;) with &amp;lt; and &amp;gt; respectively, and replacing all\n     * interpolation start/end markers with their escaped counterparts.**\n     *\n     * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered\n     * output when the $interpolate service processes the text. So, for HTML elements interpolated\n     * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter\n     * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such,\n     * this is typically useful only when user-data is used in rendering a template from the server, or\n     * when otherwise untrusted data is used by a directive.\n     *\n     * <example>\n     *  <file name=\"index.html\">\n     *    <div ng-init=\"username='A user'\">\n     *      <p ng-init=\"apptitle='Escaping demo'\">{{apptitle}}: \\{\\{ username = \"defaced value\"; \\}\\}\n     *        </p>\n     *      <p><strong>{{username}}</strong> attempts to inject code which will deface the\n     *        application, but fails to accomplish their task, because the server has correctly\n     *        escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash)\n     *        characters.</p>\n     *      <p>Instead, the result of the attempted script injection is visible, and can be removed\n     *        from the database by an administrator.</p>\n     *    </div>\n     *  </file>\n     * </example>\n     *\n     * @param {string} text The text with markup to interpolate.\n     * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have\n     *    embedded expression in order to return an interpolation function. Strings with no\n     *    embedded expression will return null for the interpolation function.\n     * @param {string=} trustedContext when provided, the returned function passes the interpolated\n     *    result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult,\n     *    trustedContext)} before returning it.  Refer to the {@link ng.$sce $sce} service that\n     *    provides Strict Contextual Escaping for details.\n     * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined\n     *    unless all embedded expressions evaluate to a value other than `undefined`.\n     * @returns {function(context)} an interpolation function which is used to compute the\n     *    interpolated string. The function has these parameters:\n     *\n     * - `context`: evaluation context for all expressions embedded in the interpolated text\n     */\n    function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {\n      // Provide a quick exit and simplified result function for text with no interpolation\n      if (!text.length || text.indexOf(startSymbol) === -1) {\n        var constantInterp;\n        if (!mustHaveExpression) {\n          var unescapedText = unescapeText(text);\n          constantInterp = valueFn(unescapedText);\n          constantInterp.exp = text;\n          constantInterp.expressions = [];\n          constantInterp.$$watchDelegate = constantWatchDelegate;\n        }\n        return constantInterp;\n      }\n\n      allOrNothing = !!allOrNothing;\n      var startIndex,\n          endIndex,\n          index = 0,\n          expressions = [],\n          parseFns = [],\n          textLength = text.length,\n          exp,\n          concat = [],\n          expressionPositions = [];\n\n      while (index < textLength) {\n        if (((startIndex = text.indexOf(startSymbol, index)) != -1) &&\n             ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1)) {\n          if (index !== startIndex) {\n            concat.push(unescapeText(text.substring(index, startIndex)));\n          }\n          exp = text.substring(startIndex + startSymbolLength, endIndex);\n          expressions.push(exp);\n          parseFns.push($parse(exp, parseStringifyInterceptor));\n          index = endIndex + endSymbolLength;\n          expressionPositions.push(concat.length);\n          concat.push('');\n        } else {\n          // we did not find an interpolation, so we have to add the remainder to the separators array\n          if (index !== textLength) {\n            concat.push(unescapeText(text.substring(index)));\n          }\n          break;\n        }\n      }\n\n      // Concatenating expressions makes it hard to reason about whether some combination of\n      // concatenated values are unsafe to use and could easily lead to XSS.  By requiring that a\n      // single expression be used for iframe[src], object[src], etc., we ensure that the value\n      // that's used is assigned or constructed by some JS code somewhere that is more testable or\n      // make it obvious that you bound the value to some user controlled value.  This helps reduce\n      // the load when auditing for XSS issues.\n      if (trustedContext && concat.length > 1) {\n          $interpolateMinErr.throwNoconcat(text);\n      }\n\n      if (!mustHaveExpression || expressions.length) {\n        var compute = function(values) {\n          for (var i = 0, ii = expressions.length; i < ii; i++) {\n            if (allOrNothing && isUndefined(values[i])) return;\n            concat[expressionPositions[i]] = values[i];\n          }\n          return concat.join('');\n        };\n\n        var getValue = function(value) {\n          return trustedContext ?\n            $sce.getTrusted(trustedContext, value) :\n            $sce.valueOf(value);\n        };\n\n        return extend(function interpolationFn(context) {\n            var i = 0;\n            var ii = expressions.length;\n            var values = new Array(ii);\n\n            try {\n              for (; i < ii; i++) {\n                values[i] = parseFns[i](context);\n              }\n\n              return compute(values);\n            } catch (err) {\n              $exceptionHandler($interpolateMinErr.interr(text, err));\n            }\n\n          }, {\n          // all of these properties are undocumented for now\n          exp: text, //just for compatibility with regular watchers created via $watch\n          expressions: expressions,\n          $$watchDelegate: function(scope, listener) {\n            var lastValue;\n            return scope.$watchGroup(parseFns, function interpolateFnWatcher(values, oldValues) {\n              var currValue = compute(values);\n              if (isFunction(listener)) {\n                listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope);\n              }\n              lastValue = currValue;\n            });\n          }\n        });\n      }\n\n      function parseStringifyInterceptor(value) {\n        try {\n          value = getValue(value);\n          return allOrNothing && !isDefined(value) ? value : stringify(value);\n        } catch (err) {\n          $exceptionHandler($interpolateMinErr.interr(text, err));\n        }\n      }\n    }\n\n\n    /**\n     * @ngdoc method\n     * @name $interpolate#startSymbol\n     * @description\n     * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.\n     *\n     * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change\n     * the symbol.\n     *\n     * @returns {string} start symbol.\n     */\n    $interpolate.startSymbol = function() {\n      return startSymbol;\n    };\n\n\n    /**\n     * @ngdoc method\n     * @name $interpolate#endSymbol\n     * @description\n     * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n     *\n     * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change\n     * the symbol.\n     *\n     * @returns {string} end symbol.\n     */\n    $interpolate.endSymbol = function() {\n      return endSymbol;\n    };\n\n    return $interpolate;\n  }];\n}\n\nfunction $IntervalProvider() {\n  this.$get = ['$rootScope', '$window', '$q', '$$q', '$browser',\n       function($rootScope,   $window,   $q,   $$q,   $browser) {\n    var intervals = {};\n\n\n     /**\n      * @ngdoc service\n      * @name $interval\n      *\n      * @description\n      * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay`\n      * milliseconds.\n      *\n      * The return value of registering an interval function is a promise. This promise will be\n      * notified upon each tick of the interval, and will be resolved after `count` iterations, or\n      * run indefinitely if `count` is not defined. The value of the notification will be the\n      * number of iterations that have run.\n      * To cancel an interval, call `$interval.cancel(promise)`.\n      *\n      * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to\n      * move forward by `millis` milliseconds and trigger any functions scheduled to run in that\n      * time.\n      *\n      * <div class=\"alert alert-warning\">\n      * **Note**: Intervals created by this service must be explicitly destroyed when you are finished\n      * with them.  In particular they are not automatically destroyed when a controller's scope or a\n      * directive's element are destroyed.\n      * You should take this into consideration and make sure to always cancel the interval at the\n      * appropriate moment.  See the example below for more details on how and when to do this.\n      * </div>\n      *\n      * @param {function()} fn A function that should be called repeatedly.\n      * @param {number} delay Number of milliseconds between each function call.\n      * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat\n      *   indefinitely.\n      * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n      *   will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n      * @param {...*=} Pass additional parameters to the executed function.\n      * @returns {promise} A promise which will be notified on each iteration.\n      *\n      * @example\n      * <example module=\"intervalExample\">\n      * <file name=\"index.html\">\n      *   <script>\n      *     angular.module('intervalExample', [])\n      *       .controller('ExampleController', ['$scope', '$interval',\n      *         function($scope, $interval) {\n      *           $scope.format = 'M/d/yy h:mm:ss a';\n      *           $scope.blood_1 = 100;\n      *           $scope.blood_2 = 120;\n      *\n      *           var stop;\n      *           $scope.fight = function() {\n      *             // Don't start a new fight if we are already fighting\n      *             if ( angular.isDefined(stop) ) return;\n      *\n      *             stop = $interval(function() {\n      *               if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {\n      *                 $scope.blood_1 = $scope.blood_1 - 3;\n      *                 $scope.blood_2 = $scope.blood_2 - 4;\n      *               } else {\n      *                 $scope.stopFight();\n      *               }\n      *             }, 100);\n      *           };\n      *\n      *           $scope.stopFight = function() {\n      *             if (angular.isDefined(stop)) {\n      *               $interval.cancel(stop);\n      *               stop = undefined;\n      *             }\n      *           };\n      *\n      *           $scope.resetFight = function() {\n      *             $scope.blood_1 = 100;\n      *             $scope.blood_2 = 120;\n      *           };\n      *\n      *           $scope.$on('$destroy', function() {\n      *             // Make sure that the interval is destroyed too\n      *             $scope.stopFight();\n      *           });\n      *         }])\n      *       // Register the 'myCurrentTime' directive factory method.\n      *       // We inject $interval and dateFilter service since the factory method is DI.\n      *       .directive('myCurrentTime', ['$interval', 'dateFilter',\n      *         function($interval, dateFilter) {\n      *           // return the directive link function. (compile function not needed)\n      *           return function(scope, element, attrs) {\n      *             var format,  // date format\n      *                 stopTime; // so that we can cancel the time updates\n      *\n      *             // used to update the UI\n      *             function updateTime() {\n      *               element.text(dateFilter(new Date(), format));\n      *             }\n      *\n      *             // watch the expression, and update the UI on change.\n      *             scope.$watch(attrs.myCurrentTime, function(value) {\n      *               format = value;\n      *               updateTime();\n      *             });\n      *\n      *             stopTime = $interval(updateTime, 1000);\n      *\n      *             // listen on DOM destroy (removal) event, and cancel the next UI update\n      *             // to prevent updating time after the DOM element was removed.\n      *             element.on('$destroy', function() {\n      *               $interval.cancel(stopTime);\n      *             });\n      *           }\n      *         }]);\n      *   </script>\n      *\n      *   <div>\n      *     <div ng-controller=\"ExampleController\">\n      *       <label>Date format: <input ng-model=\"format\"></label> <hr/>\n      *       Current time is: <span my-current-time=\"format\"></span>\n      *       <hr/>\n      *       Blood 1 : <font color='red'>{{blood_1}}</font>\n      *       Blood 2 : <font color='red'>{{blood_2}}</font>\n      *       <button type=\"button\" data-ng-click=\"fight()\">Fight</button>\n      *       <button type=\"button\" data-ng-click=\"stopFight()\">StopFight</button>\n      *       <button type=\"button\" data-ng-click=\"resetFight()\">resetFight</button>\n      *     </div>\n      *   </div>\n      *\n      * </file>\n      * </example>\n      */\n    function interval(fn, delay, count, invokeApply) {\n      var hasParams = arguments.length > 4,\n          args = hasParams ? sliceArgs(arguments, 4) : [],\n          setInterval = $window.setInterval,\n          clearInterval = $window.clearInterval,\n          iteration = 0,\n          skipApply = (isDefined(invokeApply) && !invokeApply),\n          deferred = (skipApply ? $$q : $q).defer(),\n          promise = deferred.promise;\n\n      count = isDefined(count) ? count : 0;\n\n      promise.$$intervalId = setInterval(function tick() {\n        if (skipApply) {\n          $browser.defer(callback);\n        } else {\n          $rootScope.$evalAsync(callback);\n        }\n        deferred.notify(iteration++);\n\n        if (count > 0 && iteration >= count) {\n          deferred.resolve(iteration);\n          clearInterval(promise.$$intervalId);\n          delete intervals[promise.$$intervalId];\n        }\n\n        if (!skipApply) $rootScope.$apply();\n\n      }, delay);\n\n      intervals[promise.$$intervalId] = deferred;\n\n      return promise;\n\n      function callback() {\n        if (!hasParams) {\n          fn(iteration);\n        } else {\n          fn.apply(null, args);\n        }\n      }\n    }\n\n\n     /**\n      * @ngdoc method\n      * @name $interval#cancel\n      *\n      * @description\n      * Cancels a task associated with the `promise`.\n      *\n      * @param {Promise=} promise returned by the `$interval` function.\n      * @returns {boolean} Returns `true` if the task was successfully canceled.\n      */\n    interval.cancel = function(promise) {\n      if (promise && promise.$$intervalId in intervals) {\n        intervals[promise.$$intervalId].reject('canceled');\n        $window.clearInterval(promise.$$intervalId);\n        delete intervals[promise.$$intervalId];\n        return true;\n      }\n      return false;\n    };\n\n    return interval;\n  }];\n}\n\n/**\n * @ngdoc service\n * @name $locale\n *\n * @description\n * $locale service provides localization rules for various Angular components. As of right now the\n * only public api is:\n *\n * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)\n */\n\nvar PATH_MATCH = /^([^\\?#]*)(\\?([^#]*))?(#(.*))?$/,\n    DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};\nvar $locationMinErr = minErr('$location');\n\n\n/**\n * Encode path using encodeUriSegment, ignoring forward slashes\n *\n * @param {string} path Path to encode\n * @returns {string}\n */\nfunction encodePath(path) {\n  var segments = path.split('/'),\n      i = segments.length;\n\n  while (i--) {\n    segments[i] = encodeUriSegment(segments[i]);\n  }\n\n  return segments.join('/');\n}\n\nfunction parseAbsoluteUrl(absoluteUrl, locationObj) {\n  var parsedUrl = urlResolve(absoluteUrl);\n\n  locationObj.$$protocol = parsedUrl.protocol;\n  locationObj.$$host = parsedUrl.hostname;\n  locationObj.$$port = toInt(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;\n}\n\n\nfunction parseAppUrl(relativeUrl, locationObj) {\n  var prefixed = (relativeUrl.charAt(0) !== '/');\n  if (prefixed) {\n    relativeUrl = '/' + relativeUrl;\n  }\n  var match = urlResolve(relativeUrl);\n  locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?\n      match.pathname.substring(1) : match.pathname);\n  locationObj.$$search = parseKeyValue(match.search);\n  locationObj.$$hash = decodeURIComponent(match.hash);\n\n  // make sure path starts with '/';\n  if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {\n    locationObj.$$path = '/' + locationObj.$$path;\n  }\n}\n\n\n/**\n *\n * @param {string} begin\n * @param {string} whole\n * @returns {string} returns text from whole after begin or undefined if it does not begin with\n *                   expected string.\n */\nfunction beginsWith(begin, whole) {\n  if (whole.indexOf(begin) === 0) {\n    return whole.substr(begin.length);\n  }\n}\n\n\nfunction stripHash(url) {\n  var index = url.indexOf('#');\n  return index == -1 ? url : url.substr(0, index);\n}\n\nfunction trimEmptyHash(url) {\n  return url.replace(/(#.+)|#$/, '$1');\n}\n\n\nfunction stripFile(url) {\n  return url.substr(0, stripHash(url).lastIndexOf('/') + 1);\n}\n\n/* return the server only (scheme://host:port) */\nfunction serverBase(url) {\n  return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));\n}\n\n\n/**\n * LocationHtml5Url represents an url\n * This object is exposed as $location service when HTML5 mode is enabled and supported\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} appBaseNoFile application base URL stripped of any filename\n * @param {string} basePrefix url path prefix\n */\nfunction LocationHtml5Url(appBase, appBaseNoFile, basePrefix) {\n  this.$$html5 = true;\n  basePrefix = basePrefix || '';\n  parseAbsoluteUrl(appBase, this);\n\n\n  /**\n   * Parse given html5 (regular) url string into properties\n   * @param {string} url HTML5 url\n   * @private\n   */\n  this.$$parse = function(url) {\n    var pathUrl = beginsWith(appBaseNoFile, url);\n    if (!isString(pathUrl)) {\n      throw $locationMinErr('ipthprfx', 'Invalid url \"{0}\", missing path prefix \"{1}\".', url,\n          appBaseNoFile);\n    }\n\n    parseAppUrl(pathUrl, this);\n\n    if (!this.$$path) {\n      this.$$path = '/';\n    }\n\n    this.$$compose();\n  };\n\n  /**\n   * Compose url and update `absUrl` property\n   * @private\n   */\n  this.$$compose = function() {\n    var search = toKeyValue(this.$$search),\n        hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n    this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n    this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'\n  };\n\n  this.$$parseLinkUrl = function(url, relHref) {\n    if (relHref && relHref[0] === '#') {\n      // special case for links to hash fragments:\n      // keep the old url and only replace the hash fragment\n      this.hash(relHref.slice(1));\n      return true;\n    }\n    var appUrl, prevAppUrl;\n    var rewrittenUrl;\n\n    if (isDefined(appUrl = beginsWith(appBase, url))) {\n      prevAppUrl = appUrl;\n      if (isDefined(appUrl = beginsWith(basePrefix, appUrl))) {\n        rewrittenUrl = appBaseNoFile + (beginsWith('/', appUrl) || appUrl);\n      } else {\n        rewrittenUrl = appBase + prevAppUrl;\n      }\n    } else if (isDefined(appUrl = beginsWith(appBaseNoFile, url))) {\n      rewrittenUrl = appBaseNoFile + appUrl;\n    } else if (appBaseNoFile == url + '/') {\n      rewrittenUrl = appBaseNoFile;\n    }\n    if (rewrittenUrl) {\n      this.$$parse(rewrittenUrl);\n    }\n    return !!rewrittenUrl;\n  };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when developer doesn't opt into html5 mode.\n * It also serves as the base class for html5 mode fallback on legacy browsers.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} appBaseNoFile application base URL stripped of any filename\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangUrl(appBase, appBaseNoFile, hashPrefix) {\n\n  parseAbsoluteUrl(appBase, this);\n\n\n  /**\n   * Parse given hashbang url into properties\n   * @param {string} url Hashbang url\n   * @private\n   */\n  this.$$parse = function(url) {\n    var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);\n    var withoutHashUrl;\n\n    if (!isUndefined(withoutBaseUrl) && withoutBaseUrl.charAt(0) === '#') {\n\n      // The rest of the url starts with a hash so we have\n      // got either a hashbang path or a plain hash fragment\n      withoutHashUrl = beginsWith(hashPrefix, withoutBaseUrl);\n      if (isUndefined(withoutHashUrl)) {\n        // There was no hashbang prefix so we just have a hash fragment\n        withoutHashUrl = withoutBaseUrl;\n      }\n\n    } else {\n      // There was no hashbang path nor hash fragment:\n      // If we are in HTML5 mode we use what is left as the path;\n      // Otherwise we ignore what is left\n      if (this.$$html5) {\n        withoutHashUrl = withoutBaseUrl;\n      } else {\n        withoutHashUrl = '';\n        if (isUndefined(withoutBaseUrl)) {\n          appBase = url;\n          this.replace();\n        }\n      }\n    }\n\n    parseAppUrl(withoutHashUrl, this);\n\n    this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);\n\n    this.$$compose();\n\n    /*\n     * In Windows, on an anchor node on documents loaded from\n     * the filesystem, the browser will return a pathname\n     * prefixed with the drive name ('/C:/path') when a\n     * pathname without a drive is set:\n     *  * a.setAttribute('href', '/foo')\n     *   * a.pathname === '/C:/foo' //true\n     *\n     * Inside of Angular, we're always using pathnames that\n     * do not include drive names for routing.\n     */\n    function removeWindowsDriveName(path, url, base) {\n      /*\n      Matches paths for file protocol on windows,\n      such as /C:/foo/bar, and captures only /foo/bar.\n      */\n      var windowsFilePathExp = /^\\/[A-Z]:(\\/.*)/;\n\n      var firstPathSegmentMatch;\n\n      //Get the relative path from the input URL.\n      if (url.indexOf(base) === 0) {\n        url = url.replace(base, '');\n      }\n\n      // The input URL intentionally contains a first path segment that ends with a colon.\n      if (windowsFilePathExp.exec(url)) {\n        return path;\n      }\n\n      firstPathSegmentMatch = windowsFilePathExp.exec(path);\n      return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;\n    }\n  };\n\n  /**\n   * Compose hashbang url and update `absUrl` property\n   * @private\n   */\n  this.$$compose = function() {\n    var search = toKeyValue(this.$$search),\n        hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n    this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n    this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');\n  };\n\n  this.$$parseLinkUrl = function(url, relHref) {\n    if (stripHash(appBase) == stripHash(url)) {\n      this.$$parse(url);\n      return true;\n    }\n    return false;\n  };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when html5 history api is enabled but the browser\n * does not support it.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} appBaseNoFile application base URL stripped of any filename\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) {\n  this.$$html5 = true;\n  LocationHashbangUrl.apply(this, arguments);\n\n  this.$$parseLinkUrl = function(url, relHref) {\n    if (relHref && relHref[0] === '#') {\n      // special case for links to hash fragments:\n      // keep the old url and only replace the hash fragment\n      this.hash(relHref.slice(1));\n      return true;\n    }\n\n    var rewrittenUrl;\n    var appUrl;\n\n    if (appBase == stripHash(url)) {\n      rewrittenUrl = url;\n    } else if ((appUrl = beginsWith(appBaseNoFile, url))) {\n      rewrittenUrl = appBase + hashPrefix + appUrl;\n    } else if (appBaseNoFile === url + '/') {\n      rewrittenUrl = appBaseNoFile;\n    }\n    if (rewrittenUrl) {\n      this.$$parse(rewrittenUrl);\n    }\n    return !!rewrittenUrl;\n  };\n\n  this.$$compose = function() {\n    var search = toKeyValue(this.$$search),\n        hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n    this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n    // include hashPrefix in $$absUrl when $$url is empty so IE9 does not reload page because of removal of '#'\n    this.$$absUrl = appBase + hashPrefix + this.$$url;\n  };\n\n}\n\n\nvar locationPrototype = {\n\n  /**\n   * Are we in html5 mode?\n   * @private\n   */\n  $$html5: false,\n\n  /**\n   * Has any change been replacing?\n   * @private\n   */\n  $$replace: false,\n\n  /**\n   * @ngdoc method\n   * @name $location#absUrl\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return full url representation with all segments encoded according to rules specified in\n   * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).\n   *\n   *\n   * ```js\n   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n   * var absUrl = $location.absUrl();\n   * // => \"http://example.com/#/some/path?foo=bar&baz=xoxo\"\n   * ```\n   *\n   * @return {string} full url\n   */\n  absUrl: locationGetter('$$absUrl'),\n\n  /**\n   * @ngdoc method\n   * @name $location#url\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return url (e.g. `/path?a=b#hash`) when called without any parameter.\n   *\n   * Change path, search and hash, when called with parameter and return `$location`.\n   *\n   *\n   * ```js\n   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n   * var url = $location.url();\n   * // => \"/some/path?foo=bar&baz=xoxo\"\n   * ```\n   *\n   * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)\n   * @return {string} url\n   */\n  url: function(url) {\n    if (isUndefined(url)) {\n      return this.$$url;\n    }\n\n    var match = PATH_MATCH.exec(url);\n    if (match[1] || url === '') this.path(decodeURIComponent(match[1]));\n    if (match[2] || match[1] || url === '') this.search(match[3] || '');\n    this.hash(match[5] || '');\n\n    return this;\n  },\n\n  /**\n   * @ngdoc method\n   * @name $location#protocol\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return protocol of current url.\n   *\n   *\n   * ```js\n   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n   * var protocol = $location.protocol();\n   * // => \"http\"\n   * ```\n   *\n   * @return {string} protocol of current url\n   */\n  protocol: locationGetter('$$protocol'),\n\n  /**\n   * @ngdoc method\n   * @name $location#host\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return host of current url.\n   *\n   * Note: compared to the non-angular version `location.host` which returns `hostname:port`, this returns the `hostname` portion only.\n   *\n   *\n   * ```js\n   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n   * var host = $location.host();\n   * // => \"example.com\"\n   *\n   * // given url http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo\n   * host = $location.host();\n   * // => \"example.com\"\n   * host = location.host;\n   * // => \"example.com:8080\"\n   * ```\n   *\n   * @return {string} host of current url.\n   */\n  host: locationGetter('$$host'),\n\n  /**\n   * @ngdoc method\n   * @name $location#port\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return port of current url.\n   *\n   *\n   * ```js\n   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n   * var port = $location.port();\n   * // => 80\n   * ```\n   *\n   * @return {Number} port\n   */\n  port: locationGetter('$$port'),\n\n  /**\n   * @ngdoc method\n   * @name $location#path\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return path of current url when called without any parameter.\n   *\n   * Change path when called with parameter and return `$location`.\n   *\n   * Note: Path should always begin with forward slash (/), this method will add the forward slash\n   * if it is missing.\n   *\n   *\n   * ```js\n   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n   * var path = $location.path();\n   * // => \"/some/path\"\n   * ```\n   *\n   * @param {(string|number)=} path New path\n   * @return {string} path\n   */\n  path: locationGetterSetter('$$path', function(path) {\n    path = path !== null ? path.toString() : '';\n    return path.charAt(0) == '/' ? path : '/' + path;\n  }),\n\n  /**\n   * @ngdoc method\n   * @name $location#search\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return search part (as object) of current url when called without any parameter.\n   *\n   * Change search part when called with parameter and return `$location`.\n   *\n   *\n   * ```js\n   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n   * var searchObject = $location.search();\n   * // => {foo: 'bar', baz: 'xoxo'}\n   *\n   * // set foo to 'yipee'\n   * $location.search('foo', 'yipee');\n   * // $location.search() => {foo: 'yipee', baz: 'xoxo'}\n   * ```\n   *\n   * @param {string|Object.<string>|Object.<Array.<string>>} search New search params - string or\n   * hash object.\n   *\n   * When called with a single argument the method acts as a setter, setting the `search` component\n   * of `$location` to the specified value.\n   *\n   * If the argument is a hash object containing an array of values, these values will be encoded\n   * as duplicate search parameters in the url.\n   *\n   * @param {(string|Number|Array<string>|boolean)=} paramValue If `search` is a string or number, then `paramValue`\n   * will override only a single search property.\n   *\n   * If `paramValue` is an array, it will override the property of the `search` component of\n   * `$location` specified via the first argument.\n   *\n   * If `paramValue` is `null`, the property specified via the first argument will be deleted.\n   *\n   * If `paramValue` is `true`, the property specified via the first argument will be added with no\n   * value nor trailing equal sign.\n   *\n   * @return {Object} If called with no arguments returns the parsed `search` object. If called with\n   * one or more arguments returns `$location` object itself.\n   */\n  search: function(search, paramValue) {\n    switch (arguments.length) {\n      case 0:\n        return this.$$search;\n      case 1:\n        if (isString(search) || isNumber(search)) {\n          search = search.toString();\n          this.$$search = parseKeyValue(search);\n        } else if (isObject(search)) {\n          search = copy(search, {});\n          // remove object undefined or null properties\n          forEach(search, function(value, key) {\n            if (value == null) delete search[key];\n          });\n\n          this.$$search = search;\n        } else {\n          throw $locationMinErr('isrcharg',\n              'The first argument of the `$location#search()` call must be a string or an object.');\n        }\n        break;\n      default:\n        if (isUndefined(paramValue) || paramValue === null) {\n          delete this.$$search[search];\n        } else {\n          this.$$search[search] = paramValue;\n        }\n    }\n\n    this.$$compose();\n    return this;\n  },\n\n  /**\n   * @ngdoc method\n   * @name $location#hash\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Returns the hash fragment when called without any parameters.\n   *\n   * Changes the hash fragment when called with a parameter and returns `$location`.\n   *\n   *\n   * ```js\n   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue\n   * var hash = $location.hash();\n   * // => \"hashValue\"\n   * ```\n   *\n   * @param {(string|number)=} hash New hash fragment\n   * @return {string} hash\n   */\n  hash: locationGetterSetter('$$hash', function(hash) {\n    return hash !== null ? hash.toString() : '';\n  }),\n\n  /**\n   * @ngdoc method\n   * @name $location#replace\n   *\n   * @description\n   * If called, all changes to $location during the current `$digest` will replace the current history\n   * record, instead of adding a new one.\n   */\n  replace: function() {\n    this.$$replace = true;\n    return this;\n  }\n};\n\nforEach([LocationHashbangInHtml5Url, LocationHashbangUrl, LocationHtml5Url], function(Location) {\n  Location.prototype = Object.create(locationPrototype);\n\n  /**\n   * @ngdoc method\n   * @name $location#state\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return the history state object when called without any parameter.\n   *\n   * Change the history state object when called with one parameter and return `$location`.\n   * The state object is later passed to `pushState` or `replaceState`.\n   *\n   * NOTE: This method is supported only in HTML5 mode and only in browsers supporting\n   * the HTML5 History API (i.e. methods `pushState` and `replaceState`). If you need to support\n   * older browsers (like IE9 or Android < 4.0), don't use this method.\n   *\n   * @param {object=} state State object for pushState or replaceState\n   * @return {object} state\n   */\n  Location.prototype.state = function(state) {\n    if (!arguments.length) {\n      return this.$$state;\n    }\n\n    if (Location !== LocationHtml5Url || !this.$$html5) {\n      throw $locationMinErr('nostate', 'History API state support is available only ' +\n        'in HTML5 mode and only in browsers supporting HTML5 History API');\n    }\n    // The user might modify `stateObject` after invoking `$location.state(stateObject)`\n    // but we're changing the $$state reference to $browser.state() during the $digest\n    // so the modification window is narrow.\n    this.$$state = isUndefined(state) ? null : state;\n\n    return this;\n  };\n});\n\n\nfunction locationGetter(property) {\n  return function() {\n    return this[property];\n  };\n}\n\n\nfunction locationGetterSetter(property, preprocess) {\n  return function(value) {\n    if (isUndefined(value)) {\n      return this[property];\n    }\n\n    this[property] = preprocess(value);\n    this.$$compose();\n\n    return this;\n  };\n}\n\n\n/**\n * @ngdoc service\n * @name $location\n *\n * @requires $rootElement\n *\n * @description\n * The $location service parses the URL in the browser address bar (based on the\n * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL\n * available to your application. Changes to the URL in the address bar are reflected into\n * $location service and changes to $location are reflected into the browser address bar.\n *\n * **The $location service:**\n *\n * - Exposes the current URL in the browser address bar, so you can\n *   - Watch and observe the URL.\n *   - Change the URL.\n * - Synchronizes the URL with the browser when the user\n *   - Changes the address bar.\n *   - Clicks the back or forward button (or clicks a History link).\n *   - Clicks on a link.\n * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).\n *\n * For more information see {@link guide/$location Developer Guide: Using $location}\n */\n\n/**\n * @ngdoc provider\n * @name $locationProvider\n * @description\n * Use the `$locationProvider` to configure how the application deep linking paths are stored.\n */\nfunction $LocationProvider() {\n  var hashPrefix = '',\n      html5Mode = {\n        enabled: false,\n        requireBase: true,\n        rewriteLinks: true\n      };\n\n  /**\n   * @ngdoc method\n   * @name $locationProvider#hashPrefix\n   * @description\n   * @param {string=} prefix Prefix for hash part (containing path and search)\n   * @returns {*} current value if used as getter or itself (chaining) if used as setter\n   */\n  this.hashPrefix = function(prefix) {\n    if (isDefined(prefix)) {\n      hashPrefix = prefix;\n      return this;\n    } else {\n      return hashPrefix;\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name $locationProvider#html5Mode\n   * @description\n   * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.\n   *   If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported\n   *   properties:\n   *   - **enabled** – `{boolean}` – (default: false) If true, will rely on `history.pushState` to\n   *     change urls where supported. Will fall back to hash-prefixed paths in browsers that do not\n   *     support `pushState`.\n   *   - **requireBase** - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies\n   *     whether or not a <base> tag is required to be present. If `enabled` and `requireBase` are\n   *     true, and a base tag is not present, an error will be thrown when `$location` is injected.\n   *     See the {@link guide/$location $location guide for more information}\n   *   - **rewriteLinks** - `{boolean}` - (default: `true`) When html5Mode is enabled,\n   *     enables/disables url rewriting for relative links.\n   *\n   * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter\n   */\n  this.html5Mode = function(mode) {\n    if (isBoolean(mode)) {\n      html5Mode.enabled = mode;\n      return this;\n    } else if (isObject(mode)) {\n\n      if (isBoolean(mode.enabled)) {\n        html5Mode.enabled = mode.enabled;\n      }\n\n      if (isBoolean(mode.requireBase)) {\n        html5Mode.requireBase = mode.requireBase;\n      }\n\n      if (isBoolean(mode.rewriteLinks)) {\n        html5Mode.rewriteLinks = mode.rewriteLinks;\n      }\n\n      return this;\n    } else {\n      return html5Mode;\n    }\n  };\n\n  /**\n   * @ngdoc event\n   * @name $location#$locationChangeStart\n   * @eventType broadcast on root scope\n   * @description\n   * Broadcasted before a URL will change.\n   *\n   * This change can be prevented by calling\n   * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more\n   * details about event object. Upon successful change\n   * {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired.\n   *\n   * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when\n   * the browser supports the HTML5 History API.\n   *\n   * @param {Object} angularEvent Synthetic event object.\n   * @param {string} newUrl New URL\n   * @param {string=} oldUrl URL that was before it was changed.\n   * @param {string=} newState New history state object\n   * @param {string=} oldState History state object that was before it was changed.\n   */\n\n  /**\n   * @ngdoc event\n   * @name $location#$locationChangeSuccess\n   * @eventType broadcast on root scope\n   * @description\n   * Broadcasted after a URL was changed.\n   *\n   * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when\n   * the browser supports the HTML5 History API.\n   *\n   * @param {Object} angularEvent Synthetic event object.\n   * @param {string} newUrl New URL\n   * @param {string=} oldUrl URL that was before it was changed.\n   * @param {string=} newState New history state object\n   * @param {string=} oldState History state object that was before it was changed.\n   */\n\n  this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement', '$window',\n      function($rootScope, $browser, $sniffer, $rootElement, $window) {\n    var $location,\n        LocationMode,\n        baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''\n        initialUrl = $browser.url(),\n        appBase;\n\n    if (html5Mode.enabled) {\n      if (!baseHref && html5Mode.requireBase) {\n        throw $locationMinErr('nobase',\n          \"$location in HTML5 mode requires a <base> tag to be present!\");\n      }\n      appBase = serverBase(initialUrl) + (baseHref || '/');\n      LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;\n    } else {\n      appBase = stripHash(initialUrl);\n      LocationMode = LocationHashbangUrl;\n    }\n    var appBaseNoFile = stripFile(appBase);\n\n    $location = new LocationMode(appBase, appBaseNoFile, '#' + hashPrefix);\n    $location.$$parseLinkUrl(initialUrl, initialUrl);\n\n    $location.$$state = $browser.state();\n\n    var IGNORE_URI_REGEXP = /^\\s*(javascript|mailto):/i;\n\n    function setBrowserUrlWithFallback(url, replace, state) {\n      var oldUrl = $location.url();\n      var oldState = $location.$$state;\n      try {\n        $browser.url(url, replace, state);\n\n        // Make sure $location.state() returns referentially identical (not just deeply equal)\n        // state object; this makes possible quick checking if the state changed in the digest\n        // loop. Checking deep equality would be too expensive.\n        $location.$$state = $browser.state();\n      } catch (e) {\n        // Restore old values if pushState fails\n        $location.url(oldUrl);\n        $location.$$state = oldState;\n\n        throw e;\n      }\n    }\n\n    $rootElement.on('click', function(event) {\n      // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)\n      // currently we open nice url link and redirect then\n\n      if (!html5Mode.rewriteLinks || event.ctrlKey || event.metaKey || event.shiftKey || event.which == 2 || event.button == 2) return;\n\n      var elm = jqLite(event.target);\n\n      // traverse the DOM up to find first A tag\n      while (nodeName_(elm[0]) !== 'a') {\n        // ignore rewriting if no A tag (reached root element, or no parent - removed from document)\n        if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;\n      }\n\n      var absHref = elm.prop('href');\n      // get the actual href attribute - see\n      // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx\n      var relHref = elm.attr('href') || elm.attr('xlink:href');\n\n      if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {\n        // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during\n        // an animation.\n        absHref = urlResolve(absHref.animVal).href;\n      }\n\n      // Ignore when url is started with javascript: or mailto:\n      if (IGNORE_URI_REGEXP.test(absHref)) return;\n\n      if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) {\n        if ($location.$$parseLinkUrl(absHref, relHref)) {\n          // We do a preventDefault for all urls that are part of the angular application,\n          // in html5mode and also without, so that we are able to abort navigation without\n          // getting double entries in the location history.\n          event.preventDefault();\n          // update location manually\n          if ($location.absUrl() != $browser.url()) {\n            $rootScope.$apply();\n            // hack to work around FF6 bug 684208 when scenario runner clicks on links\n            $window.angular['ff-684208-preventDefault'] = true;\n          }\n        }\n      }\n    });\n\n\n    // rewrite hashbang url <> html5 url\n    if (trimEmptyHash($location.absUrl()) != trimEmptyHash(initialUrl)) {\n      $browser.url($location.absUrl(), true);\n    }\n\n    var initializing = true;\n\n    // update $location when $browser url changes\n    $browser.onUrlChange(function(newUrl, newState) {\n\n      if (isUndefined(beginsWith(appBaseNoFile, newUrl))) {\n        // If we are navigating outside of the app then force a reload\n        $window.location.href = newUrl;\n        return;\n      }\n\n      $rootScope.$evalAsync(function() {\n        var oldUrl = $location.absUrl();\n        var oldState = $location.$$state;\n        var defaultPrevented;\n        newUrl = trimEmptyHash(newUrl);\n        $location.$$parse(newUrl);\n        $location.$$state = newState;\n\n        defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,\n            newState, oldState).defaultPrevented;\n\n        // if the location was changed by a `$locationChangeStart` handler then stop\n        // processing this location change\n        if ($location.absUrl() !== newUrl) return;\n\n        if (defaultPrevented) {\n          $location.$$parse(oldUrl);\n          $location.$$state = oldState;\n          setBrowserUrlWithFallback(oldUrl, false, oldState);\n        } else {\n          initializing = false;\n          afterLocationChange(oldUrl, oldState);\n        }\n      });\n      if (!$rootScope.$$phase) $rootScope.$digest();\n    });\n\n    // update browser\n    $rootScope.$watch(function $locationWatch() {\n      var oldUrl = trimEmptyHash($browser.url());\n      var newUrl = trimEmptyHash($location.absUrl());\n      var oldState = $browser.state();\n      var currentReplace = $location.$$replace;\n      var urlOrStateChanged = oldUrl !== newUrl ||\n        ($location.$$html5 && $sniffer.history && oldState !== $location.$$state);\n\n      if (initializing || urlOrStateChanged) {\n        initializing = false;\n\n        $rootScope.$evalAsync(function() {\n          var newUrl = $location.absUrl();\n          var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,\n              $location.$$state, oldState).defaultPrevented;\n\n          // if the location was changed by a `$locationChangeStart` handler then stop\n          // processing this location change\n          if ($location.absUrl() !== newUrl) return;\n\n          if (defaultPrevented) {\n            $location.$$parse(oldUrl);\n            $location.$$state = oldState;\n          } else {\n            if (urlOrStateChanged) {\n              setBrowserUrlWithFallback(newUrl, currentReplace,\n                                        oldState === $location.$$state ? null : $location.$$state);\n            }\n            afterLocationChange(oldUrl, oldState);\n          }\n        });\n      }\n\n      $location.$$replace = false;\n\n      // we don't need to return anything because $evalAsync will make the digest loop dirty when\n      // there is a change\n    });\n\n    return $location;\n\n    function afterLocationChange(oldUrl, oldState) {\n      $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl,\n        $location.$$state, oldState);\n    }\n}];\n}\n\n/**\n * @ngdoc service\n * @name $log\n * @requires $window\n *\n * @description\n * Simple service for logging. Default implementation safely writes the message\n * into the browser's console (if present).\n *\n * The main purpose of this service is to simplify debugging and troubleshooting.\n *\n * The default is to log `debug` messages. You can use\n * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.\n *\n * @example\n   <example module=\"logExample\">\n     <file name=\"script.js\">\n       angular.module('logExample', [])\n         .controller('LogController', ['$scope', '$log', function($scope, $log) {\n           $scope.$log = $log;\n           $scope.message = 'Hello World!';\n         }]);\n     </file>\n     <file name=\"index.html\">\n       <div ng-controller=\"LogController\">\n         <p>Reload this page with open console, enter text and hit the log button...</p>\n         <label>Message:\n         <input type=\"text\" ng-model=\"message\" /></label>\n         <button ng-click=\"$log.log(message)\">log</button>\n         <button ng-click=\"$log.warn(message)\">warn</button>\n         <button ng-click=\"$log.info(message)\">info</button>\n         <button ng-click=\"$log.error(message)\">error</button>\n         <button ng-click=\"$log.debug(message)\">debug</button>\n       </div>\n     </file>\n   </example>\n */\n\n/**\n * @ngdoc provider\n * @name $logProvider\n * @description\n * Use the `$logProvider` to configure how the application logs messages\n */\nfunction $LogProvider() {\n  var debug = true,\n      self = this;\n\n  /**\n   * @ngdoc method\n   * @name $logProvider#debugEnabled\n   * @description\n   * @param {boolean=} flag enable or disable debug level messages\n   * @returns {*} current value if used as getter or itself (chaining) if used as setter\n   */\n  this.debugEnabled = function(flag) {\n    if (isDefined(flag)) {\n      debug = flag;\n    return this;\n    } else {\n      return debug;\n    }\n  };\n\n  this.$get = ['$window', function($window) {\n    return {\n      /**\n       * @ngdoc method\n       * @name $log#log\n       *\n       * @description\n       * Write a log message\n       */\n      log: consoleLog('log'),\n\n      /**\n       * @ngdoc method\n       * @name $log#info\n       *\n       * @description\n       * Write an information message\n       */\n      info: consoleLog('info'),\n\n      /**\n       * @ngdoc method\n       * @name $log#warn\n       *\n       * @description\n       * Write a warning message\n       */\n      warn: consoleLog('warn'),\n\n      /**\n       * @ngdoc method\n       * @name $log#error\n       *\n       * @description\n       * Write an error message\n       */\n      error: consoleLog('error'),\n\n      /**\n       * @ngdoc method\n       * @name $log#debug\n       *\n       * @description\n       * Write a debug message\n       */\n      debug: (function() {\n        var fn = consoleLog('debug');\n\n        return function() {\n          if (debug) {\n            fn.apply(self, arguments);\n          }\n        };\n      }())\n    };\n\n    function formatError(arg) {\n      if (arg instanceof Error) {\n        if (arg.stack) {\n          arg = (arg.message && arg.stack.indexOf(arg.message) === -1)\n              ? 'Error: ' + arg.message + '\\n' + arg.stack\n              : arg.stack;\n        } else if (arg.sourceURL) {\n          arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n        }\n      }\n      return arg;\n    }\n\n    function consoleLog(type) {\n      var console = $window.console || {},\n          logFn = console[type] || console.log || noop,\n          hasApply = false;\n\n      // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.\n      // The reason behind this is that console.log has type \"object\" in IE8...\n      try {\n        hasApply = !!logFn.apply;\n      } catch (e) {}\n\n      if (hasApply) {\n        return function() {\n          var args = [];\n          forEach(arguments, function(arg) {\n            args.push(formatError(arg));\n          });\n          return logFn.apply(console, args);\n        };\n      }\n\n      // we are IE which either doesn't have window.console => this is noop and we do nothing,\n      // or we are IE where console.log doesn't have apply so we log at least first 2 args\n      return function(arg1, arg2) {\n        logFn(arg1, arg2 == null ? '' : arg2);\n      };\n    }\n  }];\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n *     Any commits to this file should be reviewed with security in mind.  *\n *   Changes to this file can potentially create security vulnerabilities. *\n *          An approval from 2 Core members with history of modifying      *\n *                         this file is required.                          *\n *                                                                         *\n *  Does the change somehow allow for arbitrary javascript to be executed? *\n *    Or allows for someone to change the prototype of built-in objects?   *\n *     Or gives undesired access to variables likes document or window?    *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\nvar $parseMinErr = minErr('$parse');\n\n// Sandboxing Angular Expressions\n// ------------------------------\n// Angular expressions are generally considered safe because these expressions only have direct\n// access to `$scope` and locals. However, one can obtain the ability to execute arbitrary JS code by\n// obtaining a reference to native JS functions such as the Function constructor.\n//\n// As an example, consider the following Angular expression:\n//\n//   {}.toString.constructor('alert(\"evil JS code\")')\n//\n// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits\n// against the expression language, but not to prevent exploits that were enabled by exposing\n// sensitive JavaScript or browser APIs on Scope. Exposing such objects on a Scope is never a good\n// practice and therefore we are not even trying to protect against interaction with an object\n// explicitly exposed in this way.\n//\n// In general, it is not possible to access a Window object from an angular expression unless a\n// window or some DOM object that has a reference to window is published onto a Scope.\n// Similarly we prevent invocations of function known to be dangerous, as well as assignments to\n// native objects.\n//\n// See https://docs.angularjs.org/guide/security\n\n\nfunction ensureSafeMemberName(name, fullExpression) {\n  if (name === \"__defineGetter__\" || name === \"__defineSetter__\"\n      || name === \"__lookupGetter__\" || name === \"__lookupSetter__\"\n      || name === \"__proto__\") {\n    throw $parseMinErr('isecfld',\n        'Attempting to access a disallowed field in Angular expressions! '\n        + 'Expression: {0}', fullExpression);\n  }\n  return name;\n}\n\nfunction getStringValue(name) {\n  // Property names must be strings. This means that non-string objects cannot be used\n  // as keys in an object. Any non-string object, including a number, is typecasted\n  // into a string via the toString method.\n  // -- MDN, https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Property_accessors#Property_names\n  //\n  // So, to ensure that we are checking the same `name` that JavaScript would use, we cast it\n  // to a string. It's not always possible. If `name` is an object and its `toString` method is\n  // 'broken' (doesn't return a string, isn't a function, etc.), an error will be thrown:\n  //\n  // TypeError: Cannot convert object to primitive value\n  //\n  // For performance reasons, we don't catch this error here and allow it to propagate up the call\n  // stack. Note that you'll get the same error in JavaScript if you try to access a property using\n  // such a 'broken' object as a key.\n  return name + '';\n}\n\nfunction ensureSafeObject(obj, fullExpression) {\n  // nifty check if obj is Function that is fast and works across iframes and other contexts\n  if (obj) {\n    if (obj.constructor === obj) {\n      throw $parseMinErr('isecfn',\n          'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n          fullExpression);\n    } else if (// isWindow(obj)\n        obj.window === obj) {\n      throw $parseMinErr('isecwindow',\n          'Referencing the Window in Angular expressions is disallowed! Expression: {0}',\n          fullExpression);\n    } else if (// isElement(obj)\n        obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) {\n      throw $parseMinErr('isecdom',\n          'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',\n          fullExpression);\n    } else if (// block Object so that we can't get hold of dangerous Object.* methods\n        obj === Object) {\n      throw $parseMinErr('isecobj',\n          'Referencing Object in Angular expressions is disallowed! Expression: {0}',\n          fullExpression);\n    }\n  }\n  return obj;\n}\n\nvar CALL = Function.prototype.call;\nvar APPLY = Function.prototype.apply;\nvar BIND = Function.prototype.bind;\n\nfunction ensureSafeFunction(obj, fullExpression) {\n  if (obj) {\n    if (obj.constructor === obj) {\n      throw $parseMinErr('isecfn',\n        'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n        fullExpression);\n    } else if (obj === CALL || obj === APPLY || obj === BIND) {\n      throw $parseMinErr('isecff',\n        'Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}',\n        fullExpression);\n    }\n  }\n}\n\nfunction ensureSafeAssignContext(obj, fullExpression) {\n  if (obj) {\n    if (obj === (0).constructor || obj === (false).constructor || obj === ''.constructor ||\n        obj === {}.constructor || obj === [].constructor || obj === Function.constructor) {\n      throw $parseMinErr('isecaf',\n        'Assigning to a constructor is disallowed! Expression: {0}', fullExpression);\n    }\n  }\n}\n\nvar OPERATORS = createMap();\nforEach('+ - * / % === !== == != < > <= >= && || ! = |'.split(' '), function(operator) { OPERATORS[operator] = true; });\nvar ESCAPE = {\"n\":\"\\n\", \"f\":\"\\f\", \"r\":\"\\r\", \"t\":\"\\t\", \"v\":\"\\v\", \"'\":\"'\", '\"':'\"'};\n\n\n/////////////////////////////////////////\n\n\n/**\n * @constructor\n */\nvar Lexer = function(options) {\n  this.options = options;\n};\n\nLexer.prototype = {\n  constructor: Lexer,\n\n  lex: function(text) {\n    this.text = text;\n    this.index = 0;\n    this.tokens = [];\n\n    while (this.index < this.text.length) {\n      var ch = this.text.charAt(this.index);\n      if (ch === '\"' || ch === \"'\") {\n        this.readString(ch);\n      } else if (this.isNumber(ch) || ch === '.' && this.isNumber(this.peek())) {\n        this.readNumber();\n      } else if (this.isIdent(ch)) {\n        this.readIdent();\n      } else if (this.is(ch, '(){}[].,;:?')) {\n        this.tokens.push({index: this.index, text: ch});\n        this.index++;\n      } else if (this.isWhitespace(ch)) {\n        this.index++;\n      } else {\n        var ch2 = ch + this.peek();\n        var ch3 = ch2 + this.peek(2);\n        var op1 = OPERATORS[ch];\n        var op2 = OPERATORS[ch2];\n        var op3 = OPERATORS[ch3];\n        if (op1 || op2 || op3) {\n          var token = op3 ? ch3 : (op2 ? ch2 : ch);\n          this.tokens.push({index: this.index, text: token, operator: true});\n          this.index += token.length;\n        } else {\n          this.throwError('Unexpected next character ', this.index, this.index + 1);\n        }\n      }\n    }\n    return this.tokens;\n  },\n\n  is: function(ch, chars) {\n    return chars.indexOf(ch) !== -1;\n  },\n\n  peek: function(i) {\n    var num = i || 1;\n    return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;\n  },\n\n  isNumber: function(ch) {\n    return ('0' <= ch && ch <= '9') && typeof ch === \"string\";\n  },\n\n  isWhitespace: function(ch) {\n    // IE treats non-breaking space as \\u00A0\n    return (ch === ' ' || ch === '\\r' || ch === '\\t' ||\n            ch === '\\n' || ch === '\\v' || ch === '\\u00A0');\n  },\n\n  isIdent: function(ch) {\n    return ('a' <= ch && ch <= 'z' ||\n            'A' <= ch && ch <= 'Z' ||\n            '_' === ch || ch === '$');\n  },\n\n  isExpOperator: function(ch) {\n    return (ch === '-' || ch === '+' || this.isNumber(ch));\n  },\n\n  throwError: function(error, start, end) {\n    end = end || this.index;\n    var colStr = (isDefined(start)\n            ? 's ' + start +  '-' + this.index + ' [' + this.text.substring(start, end) + ']'\n            : ' ' + end);\n    throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',\n        error, colStr, this.text);\n  },\n\n  readNumber: function() {\n    var number = '';\n    var start = this.index;\n    while (this.index < this.text.length) {\n      var ch = lowercase(this.text.charAt(this.index));\n      if (ch == '.' || this.isNumber(ch)) {\n        number += ch;\n      } else {\n        var peekCh = this.peek();\n        if (ch == 'e' && this.isExpOperator(peekCh)) {\n          number += ch;\n        } else if (this.isExpOperator(ch) &&\n            peekCh && this.isNumber(peekCh) &&\n            number.charAt(number.length - 1) == 'e') {\n          number += ch;\n        } else if (this.isExpOperator(ch) &&\n            (!peekCh || !this.isNumber(peekCh)) &&\n            number.charAt(number.length - 1) == 'e') {\n          this.throwError('Invalid exponent');\n        } else {\n          break;\n        }\n      }\n      this.index++;\n    }\n    this.tokens.push({\n      index: start,\n      text: number,\n      constant: true,\n      value: Number(number)\n    });\n  },\n\n  readIdent: function() {\n    var start = this.index;\n    while (this.index < this.text.length) {\n      var ch = this.text.charAt(this.index);\n      if (!(this.isIdent(ch) || this.isNumber(ch))) {\n        break;\n      }\n      this.index++;\n    }\n    this.tokens.push({\n      index: start,\n      text: this.text.slice(start, this.index),\n      identifier: true\n    });\n  },\n\n  readString: function(quote) {\n    var start = this.index;\n    this.index++;\n    var string = '';\n    var rawString = quote;\n    var escape = false;\n    while (this.index < this.text.length) {\n      var ch = this.text.charAt(this.index);\n      rawString += ch;\n      if (escape) {\n        if (ch === 'u') {\n          var hex = this.text.substring(this.index + 1, this.index + 5);\n          if (!hex.match(/[\\da-f]{4}/i)) {\n            this.throwError('Invalid unicode escape [\\\\u' + hex + ']');\n          }\n          this.index += 4;\n          string += String.fromCharCode(parseInt(hex, 16));\n        } else {\n          var rep = ESCAPE[ch];\n          string = string + (rep || ch);\n        }\n        escape = false;\n      } else if (ch === '\\\\') {\n        escape = true;\n      } else if (ch === quote) {\n        this.index++;\n        this.tokens.push({\n          index: start,\n          text: rawString,\n          constant: true,\n          value: string\n        });\n        return;\n      } else {\n        string += ch;\n      }\n      this.index++;\n    }\n    this.throwError('Unterminated quote', start);\n  }\n};\n\nvar AST = function(lexer, options) {\n  this.lexer = lexer;\n  this.options = options;\n};\n\nAST.Program = 'Program';\nAST.ExpressionStatement = 'ExpressionStatement';\nAST.AssignmentExpression = 'AssignmentExpression';\nAST.ConditionalExpression = 'ConditionalExpression';\nAST.LogicalExpression = 'LogicalExpression';\nAST.BinaryExpression = 'BinaryExpression';\nAST.UnaryExpression = 'UnaryExpression';\nAST.CallExpression = 'CallExpression';\nAST.MemberExpression = 'MemberExpression';\nAST.Identifier = 'Identifier';\nAST.Literal = 'Literal';\nAST.ArrayExpression = 'ArrayExpression';\nAST.Property = 'Property';\nAST.ObjectExpression = 'ObjectExpression';\nAST.ThisExpression = 'ThisExpression';\nAST.LocalsExpression = 'LocalsExpression';\n\n// Internal use only\nAST.NGValueParameter = 'NGValueParameter';\n\nAST.prototype = {\n  ast: function(text) {\n    this.text = text;\n    this.tokens = this.lexer.lex(text);\n\n    var value = this.program();\n\n    if (this.tokens.length !== 0) {\n      this.throwError('is an unexpected token', this.tokens[0]);\n    }\n\n    return value;\n  },\n\n  program: function() {\n    var body = [];\n    while (true) {\n      if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))\n        body.push(this.expressionStatement());\n      if (!this.expect(';')) {\n        return { type: AST.Program, body: body};\n      }\n    }\n  },\n\n  expressionStatement: function() {\n    return { type: AST.ExpressionStatement, expression: this.filterChain() };\n  },\n\n  filterChain: function() {\n    var left = this.expression();\n    var token;\n    while ((token = this.expect('|'))) {\n      left = this.filter(left);\n    }\n    return left;\n  },\n\n  expression: function() {\n    return this.assignment();\n  },\n\n  assignment: function() {\n    var result = this.ternary();\n    if (this.expect('=')) {\n      result = { type: AST.AssignmentExpression, left: result, right: this.assignment(), operator: '='};\n    }\n    return result;\n  },\n\n  ternary: function() {\n    var test = this.logicalOR();\n    var alternate;\n    var consequent;\n    if (this.expect('?')) {\n      alternate = this.expression();\n      if (this.consume(':')) {\n        consequent = this.expression();\n        return { type: AST.ConditionalExpression, test: test, alternate: alternate, consequent: consequent};\n      }\n    }\n    return test;\n  },\n\n  logicalOR: function() {\n    var left = this.logicalAND();\n    while (this.expect('||')) {\n      left = { type: AST.LogicalExpression, operator: '||', left: left, right: this.logicalAND() };\n    }\n    return left;\n  },\n\n  logicalAND: function() {\n    var left = this.equality();\n    while (this.expect('&&')) {\n      left = { type: AST.LogicalExpression, operator: '&&', left: left, right: this.equality()};\n    }\n    return left;\n  },\n\n  equality: function() {\n    var left = this.relational();\n    var token;\n    while ((token = this.expect('==','!=','===','!=='))) {\n      left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.relational() };\n    }\n    return left;\n  },\n\n  relational: function() {\n    var left = this.additive();\n    var token;\n    while ((token = this.expect('<', '>', '<=', '>='))) {\n      left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.additive() };\n    }\n    return left;\n  },\n\n  additive: function() {\n    var left = this.multiplicative();\n    var token;\n    while ((token = this.expect('+','-'))) {\n      left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.multiplicative() };\n    }\n    return left;\n  },\n\n  multiplicative: function() {\n    var left = this.unary();\n    var token;\n    while ((token = this.expect('*','/','%'))) {\n      left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.unary() };\n    }\n    return left;\n  },\n\n  unary: function() {\n    var token;\n    if ((token = this.expect('+', '-', '!'))) {\n      return { type: AST.UnaryExpression, operator: token.text, prefix: true, argument: this.unary() };\n    } else {\n      return this.primary();\n    }\n  },\n\n  primary: function() {\n    var primary;\n    if (this.expect('(')) {\n      primary = this.filterChain();\n      this.consume(')');\n    } else if (this.expect('[')) {\n      primary = this.arrayDeclaration();\n    } else if (this.expect('{')) {\n      primary = this.object();\n    } else if (this.selfReferential.hasOwnProperty(this.peek().text)) {\n      primary = copy(this.selfReferential[this.consume().text]);\n    } else if (this.options.literals.hasOwnProperty(this.peek().text)) {\n      primary = { type: AST.Literal, value: this.options.literals[this.consume().text]};\n    } else if (this.peek().identifier) {\n      primary = this.identifier();\n    } else if (this.peek().constant) {\n      primary = this.constant();\n    } else {\n      this.throwError('not a primary expression', this.peek());\n    }\n\n    var next;\n    while ((next = this.expect('(', '[', '.'))) {\n      if (next.text === '(') {\n        primary = {type: AST.CallExpression, callee: primary, arguments: this.parseArguments() };\n        this.consume(')');\n      } else if (next.text === '[') {\n        primary = { type: AST.MemberExpression, object: primary, property: this.expression(), computed: true };\n        this.consume(']');\n      } else if (next.text === '.') {\n        primary = { type: AST.MemberExpression, object: primary, property: this.identifier(), computed: false };\n      } else {\n        this.throwError('IMPOSSIBLE');\n      }\n    }\n    return primary;\n  },\n\n  filter: function(baseExpression) {\n    var args = [baseExpression];\n    var result = {type: AST.CallExpression, callee: this.identifier(), arguments: args, filter: true};\n\n    while (this.expect(':')) {\n      args.push(this.expression());\n    }\n\n    return result;\n  },\n\n  parseArguments: function() {\n    var args = [];\n    if (this.peekToken().text !== ')') {\n      do {\n        args.push(this.expression());\n      } while (this.expect(','));\n    }\n    return args;\n  },\n\n  identifier: function() {\n    var token = this.consume();\n    if (!token.identifier) {\n      this.throwError('is not a valid identifier', token);\n    }\n    return { type: AST.Identifier, name: token.text };\n  },\n\n  constant: function() {\n    // TODO check that it is a constant\n    return { type: AST.Literal, value: this.consume().value };\n  },\n\n  arrayDeclaration: function() {\n    var elements = [];\n    if (this.peekToken().text !== ']') {\n      do {\n        if (this.peek(']')) {\n          // Support trailing commas per ES5.1.\n          break;\n        }\n        elements.push(this.expression());\n      } while (this.expect(','));\n    }\n    this.consume(']');\n\n    return { type: AST.ArrayExpression, elements: elements };\n  },\n\n  object: function() {\n    var properties = [], property;\n    if (this.peekToken().text !== '}') {\n      do {\n        if (this.peek('}')) {\n          // Support trailing commas per ES5.1.\n          break;\n        }\n        property = {type: AST.Property, kind: 'init'};\n        if (this.peek().constant) {\n          property.key = this.constant();\n        } else if (this.peek().identifier) {\n          property.key = this.identifier();\n        } else {\n          this.throwError(\"invalid key\", this.peek());\n        }\n        this.consume(':');\n        property.value = this.expression();\n        properties.push(property);\n      } while (this.expect(','));\n    }\n    this.consume('}');\n\n    return {type: AST.ObjectExpression, properties: properties };\n  },\n\n  throwError: function(msg, token) {\n    throw $parseMinErr('syntax',\n        'Syntax Error: Token \\'{0}\\' {1} at column {2} of the expression [{3}] starting at [{4}].',\n          token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));\n  },\n\n  consume: function(e1) {\n    if (this.tokens.length === 0) {\n      throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n    }\n\n    var token = this.expect(e1);\n    if (!token) {\n      this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());\n    }\n    return token;\n  },\n\n  peekToken: function() {\n    if (this.tokens.length === 0) {\n      throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n    }\n    return this.tokens[0];\n  },\n\n  peek: function(e1, e2, e3, e4) {\n    return this.peekAhead(0, e1, e2, e3, e4);\n  },\n\n  peekAhead: function(i, e1, e2, e3, e4) {\n    if (this.tokens.length > i) {\n      var token = this.tokens[i];\n      var t = token.text;\n      if (t === e1 || t === e2 || t === e3 || t === e4 ||\n          (!e1 && !e2 && !e3 && !e4)) {\n        return token;\n      }\n    }\n    return false;\n  },\n\n  expect: function(e1, e2, e3, e4) {\n    var token = this.peek(e1, e2, e3, e4);\n    if (token) {\n      this.tokens.shift();\n      return token;\n    }\n    return false;\n  },\n\n  selfReferential: {\n    'this': {type: AST.ThisExpression },\n    '$locals': {type: AST.LocalsExpression }\n  }\n};\n\nfunction ifDefined(v, d) {\n  return typeof v !== 'undefined' ? v : d;\n}\n\nfunction plusFn(l, r) {\n  if (typeof l === 'undefined') return r;\n  if (typeof r === 'undefined') return l;\n  return l + r;\n}\n\nfunction isStateless($filter, filterName) {\n  var fn = $filter(filterName);\n  return !fn.$stateful;\n}\n\nfunction findConstantAndWatchExpressions(ast, $filter) {\n  var allConstants;\n  var argsToWatch;\n  switch (ast.type) {\n  case AST.Program:\n    allConstants = true;\n    forEach(ast.body, function(expr) {\n      findConstantAndWatchExpressions(expr.expression, $filter);\n      allConstants = allConstants && expr.expression.constant;\n    });\n    ast.constant = allConstants;\n    break;\n  case AST.Literal:\n    ast.constant = true;\n    ast.toWatch = [];\n    break;\n  case AST.UnaryExpression:\n    findConstantAndWatchExpressions(ast.argument, $filter);\n    ast.constant = ast.argument.constant;\n    ast.toWatch = ast.argument.toWatch;\n    break;\n  case AST.BinaryExpression:\n    findConstantAndWatchExpressions(ast.left, $filter);\n    findConstantAndWatchExpressions(ast.right, $filter);\n    ast.constant = ast.left.constant && ast.right.constant;\n    ast.toWatch = ast.left.toWatch.concat(ast.right.toWatch);\n    break;\n  case AST.LogicalExpression:\n    findConstantAndWatchExpressions(ast.left, $filter);\n    findConstantAndWatchExpressions(ast.right, $filter);\n    ast.constant = ast.left.constant && ast.right.constant;\n    ast.toWatch = ast.constant ? [] : [ast];\n    break;\n  case AST.ConditionalExpression:\n    findConstantAndWatchExpressions(ast.test, $filter);\n    findConstantAndWatchExpressions(ast.alternate, $filter);\n    findConstantAndWatchExpressions(ast.consequent, $filter);\n    ast.constant = ast.test.constant && ast.alternate.constant && ast.consequent.constant;\n    ast.toWatch = ast.constant ? [] : [ast];\n    break;\n  case AST.Identifier:\n    ast.constant = false;\n    ast.toWatch = [ast];\n    break;\n  case AST.MemberExpression:\n    findConstantAndWatchExpressions(ast.object, $filter);\n    if (ast.computed) {\n      findConstantAndWatchExpressions(ast.property, $filter);\n    }\n    ast.constant = ast.object.constant && (!ast.computed || ast.property.constant);\n    ast.toWatch = [ast];\n    break;\n  case AST.CallExpression:\n    allConstants = ast.filter ? isStateless($filter, ast.callee.name) : false;\n    argsToWatch = [];\n    forEach(ast.arguments, function(expr) {\n      findConstantAndWatchExpressions(expr, $filter);\n      allConstants = allConstants && expr.constant;\n      if (!expr.constant) {\n        argsToWatch.push.apply(argsToWatch, expr.toWatch);\n      }\n    });\n    ast.constant = allConstants;\n    ast.toWatch = ast.filter && isStateless($filter, ast.callee.name) ? argsToWatch : [ast];\n    break;\n  case AST.AssignmentExpression:\n    findConstantAndWatchExpressions(ast.left, $filter);\n    findConstantAndWatchExpressions(ast.right, $filter);\n    ast.constant = ast.left.constant && ast.right.constant;\n    ast.toWatch = [ast];\n    break;\n  case AST.ArrayExpression:\n    allConstants = true;\n    argsToWatch = [];\n    forEach(ast.elements, function(expr) {\n      findConstantAndWatchExpressions(expr, $filter);\n      allConstants = allConstants && expr.constant;\n      if (!expr.constant) {\n        argsToWatch.push.apply(argsToWatch, expr.toWatch);\n      }\n    });\n    ast.constant = allConstants;\n    ast.toWatch = argsToWatch;\n    break;\n  case AST.ObjectExpression:\n    allConstants = true;\n    argsToWatch = [];\n    forEach(ast.properties, function(property) {\n      findConstantAndWatchExpressions(property.value, $filter);\n      allConstants = allConstants && property.value.constant;\n      if (!property.value.constant) {\n        argsToWatch.push.apply(argsToWatch, property.value.toWatch);\n      }\n    });\n    ast.constant = allConstants;\n    ast.toWatch = argsToWatch;\n    break;\n  case AST.ThisExpression:\n    ast.constant = false;\n    ast.toWatch = [];\n    break;\n  case AST.LocalsExpression:\n    ast.constant = false;\n    ast.toWatch = [];\n    break;\n  }\n}\n\nfunction getInputs(body) {\n  if (body.length != 1) return;\n  var lastExpression = body[0].expression;\n  var candidate = lastExpression.toWatch;\n  if (candidate.length !== 1) return candidate;\n  return candidate[0] !== lastExpression ? candidate : undefined;\n}\n\nfunction isAssignable(ast) {\n  return ast.type === AST.Identifier || ast.type === AST.MemberExpression;\n}\n\nfunction assignableAST(ast) {\n  if (ast.body.length === 1 && isAssignable(ast.body[0].expression)) {\n    return {type: AST.AssignmentExpression, left: ast.body[0].expression, right: {type: AST.NGValueParameter}, operator: '='};\n  }\n}\n\nfunction isLiteral(ast) {\n  return ast.body.length === 0 ||\n      ast.body.length === 1 && (\n      ast.body[0].expression.type === AST.Literal ||\n      ast.body[0].expression.type === AST.ArrayExpression ||\n      ast.body[0].expression.type === AST.ObjectExpression);\n}\n\nfunction isConstant(ast) {\n  return ast.constant;\n}\n\nfunction ASTCompiler(astBuilder, $filter) {\n  this.astBuilder = astBuilder;\n  this.$filter = $filter;\n}\n\nASTCompiler.prototype = {\n  compile: function(expression, expensiveChecks) {\n    var self = this;\n    var ast = this.astBuilder.ast(expression);\n    this.state = {\n      nextId: 0,\n      filters: {},\n      expensiveChecks: expensiveChecks,\n      fn: {vars: [], body: [], own: {}},\n      assign: {vars: [], body: [], own: {}},\n      inputs: []\n    };\n    findConstantAndWatchExpressions(ast, self.$filter);\n    var extra = '';\n    var assignable;\n    this.stage = 'assign';\n    if ((assignable = assignableAST(ast))) {\n      this.state.computing = 'assign';\n      var result = this.nextId();\n      this.recurse(assignable, result);\n      this.return_(result);\n      extra = 'fn.assign=' + this.generateFunction('assign', 's,v,l');\n    }\n    var toWatch = getInputs(ast.body);\n    self.stage = 'inputs';\n    forEach(toWatch, function(watch, key) {\n      var fnKey = 'fn' + key;\n      self.state[fnKey] = {vars: [], body: [], own: {}};\n      self.state.computing = fnKey;\n      var intoId = self.nextId();\n      self.recurse(watch, intoId);\n      self.return_(intoId);\n      self.state.inputs.push(fnKey);\n      watch.watchId = key;\n    });\n    this.state.computing = 'fn';\n    this.stage = 'main';\n    this.recurse(ast);\n    var fnString =\n      // The build and minification steps remove the string \"use strict\" from the code, but this is done using a regex.\n      // This is a workaround for this until we do a better job at only removing the prefix only when we should.\n      '\"' + this.USE + ' ' + this.STRICT + '\";\\n' +\n      this.filterPrefix() +\n      'var fn=' + this.generateFunction('fn', 's,l,a,i') +\n      extra +\n      this.watchFns() +\n      'return fn;';\n\n    /* jshint -W054 */\n    var fn = (new Function('$filter',\n        'ensureSafeMemberName',\n        'ensureSafeObject',\n        'ensureSafeFunction',\n        'getStringValue',\n        'ensureSafeAssignContext',\n        'ifDefined',\n        'plus',\n        'text',\n        fnString))(\n          this.$filter,\n          ensureSafeMemberName,\n          ensureSafeObject,\n          ensureSafeFunction,\n          getStringValue,\n          ensureSafeAssignContext,\n          ifDefined,\n          plusFn,\n          expression);\n    /* jshint +W054 */\n    this.state = this.stage = undefined;\n    fn.literal = isLiteral(ast);\n    fn.constant = isConstant(ast);\n    return fn;\n  },\n\n  USE: 'use',\n\n  STRICT: 'strict',\n\n  watchFns: function() {\n    var result = [];\n    var fns = this.state.inputs;\n    var self = this;\n    forEach(fns, function(name) {\n      result.push('var ' + name + '=' + self.generateFunction(name, 's'));\n    });\n    if (fns.length) {\n      result.push('fn.inputs=[' + fns.join(',') + '];');\n    }\n    return result.join('');\n  },\n\n  generateFunction: function(name, params) {\n    return 'function(' + params + '){' +\n        this.varsPrefix(name) +\n        this.body(name) +\n        '};';\n  },\n\n  filterPrefix: function() {\n    var parts = [];\n    var self = this;\n    forEach(this.state.filters, function(id, filter) {\n      parts.push(id + '=$filter(' + self.escape(filter) + ')');\n    });\n    if (parts.length) return 'var ' + parts.join(',') + ';';\n    return '';\n  },\n\n  varsPrefix: function(section) {\n    return this.state[section].vars.length ? 'var ' + this.state[section].vars.join(',') + ';' : '';\n  },\n\n  body: function(section) {\n    return this.state[section].body.join('');\n  },\n\n  recurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {\n    var left, right, self = this, args, expression;\n    recursionFn = recursionFn || noop;\n    if (!skipWatchIdCheck && isDefined(ast.watchId)) {\n      intoId = intoId || this.nextId();\n      this.if_('i',\n        this.lazyAssign(intoId, this.computedMember('i', ast.watchId)),\n        this.lazyRecurse(ast, intoId, nameId, recursionFn, create, true)\n      );\n      return;\n    }\n    switch (ast.type) {\n    case AST.Program:\n      forEach(ast.body, function(expression, pos) {\n        self.recurse(expression.expression, undefined, undefined, function(expr) { right = expr; });\n        if (pos !== ast.body.length - 1) {\n          self.current().body.push(right, ';');\n        } else {\n          self.return_(right);\n        }\n      });\n      break;\n    case AST.Literal:\n      expression = this.escape(ast.value);\n      this.assign(intoId, expression);\n      recursionFn(expression);\n      break;\n    case AST.UnaryExpression:\n      this.recurse(ast.argument, undefined, undefined, function(expr) { right = expr; });\n      expression = ast.operator + '(' + this.ifDefined(right, 0) + ')';\n      this.assign(intoId, expression);\n      recursionFn(expression);\n      break;\n    case AST.BinaryExpression:\n      this.recurse(ast.left, undefined, undefined, function(expr) { left = expr; });\n      this.recurse(ast.right, undefined, undefined, function(expr) { right = expr; });\n      if (ast.operator === '+') {\n        expression = this.plus(left, right);\n      } else if (ast.operator === '-') {\n        expression = this.ifDefined(left, 0) + ast.operator + this.ifDefined(right, 0);\n      } else {\n        expression = '(' + left + ')' + ast.operator + '(' + right + ')';\n      }\n      this.assign(intoId, expression);\n      recursionFn(expression);\n      break;\n    case AST.LogicalExpression:\n      intoId = intoId || this.nextId();\n      self.recurse(ast.left, intoId);\n      self.if_(ast.operator === '&&' ? intoId : self.not(intoId), self.lazyRecurse(ast.right, intoId));\n      recursionFn(intoId);\n      break;\n    case AST.ConditionalExpression:\n      intoId = intoId || this.nextId();\n      self.recurse(ast.test, intoId);\n      self.if_(intoId, self.lazyRecurse(ast.alternate, intoId), self.lazyRecurse(ast.consequent, intoId));\n      recursionFn(intoId);\n      break;\n    case AST.Identifier:\n      intoId = intoId || this.nextId();\n      if (nameId) {\n        nameId.context = self.stage === 'inputs' ? 's' : this.assign(this.nextId(), this.getHasOwnProperty('l', ast.name) + '?l:s');\n        nameId.computed = false;\n        nameId.name = ast.name;\n      }\n      ensureSafeMemberName(ast.name);\n      self.if_(self.stage === 'inputs' || self.not(self.getHasOwnProperty('l', ast.name)),\n        function() {\n          self.if_(self.stage === 'inputs' || 's', function() {\n            if (create && create !== 1) {\n              self.if_(\n                self.not(self.nonComputedMember('s', ast.name)),\n                self.lazyAssign(self.nonComputedMember('s', ast.name), '{}'));\n            }\n            self.assign(intoId, self.nonComputedMember('s', ast.name));\n          });\n        }, intoId && self.lazyAssign(intoId, self.nonComputedMember('l', ast.name))\n        );\n      if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.name)) {\n        self.addEnsureSafeObject(intoId);\n      }\n      recursionFn(intoId);\n      break;\n    case AST.MemberExpression:\n      left = nameId && (nameId.context = this.nextId()) || this.nextId();\n      intoId = intoId || this.nextId();\n      self.recurse(ast.object, left, undefined, function() {\n        self.if_(self.notNull(left), function() {\n          if (create && create !== 1) {\n            self.addEnsureSafeAssignContext(left);\n          }\n          if (ast.computed) {\n            right = self.nextId();\n            self.recurse(ast.property, right);\n            self.getStringValue(right);\n            self.addEnsureSafeMemberName(right);\n            if (create && create !== 1) {\n              self.if_(self.not(self.computedMember(left, right)), self.lazyAssign(self.computedMember(left, right), '{}'));\n            }\n            expression = self.ensureSafeObject(self.computedMember(left, right));\n            self.assign(intoId, expression);\n            if (nameId) {\n              nameId.computed = true;\n              nameId.name = right;\n            }\n          } else {\n            ensureSafeMemberName(ast.property.name);\n            if (create && create !== 1) {\n              self.if_(self.not(self.nonComputedMember(left, ast.property.name)), self.lazyAssign(self.nonComputedMember(left, ast.property.name), '{}'));\n            }\n            expression = self.nonComputedMember(left, ast.property.name);\n            if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.property.name)) {\n              expression = self.ensureSafeObject(expression);\n            }\n            self.assign(intoId, expression);\n            if (nameId) {\n              nameId.computed = false;\n              nameId.name = ast.property.name;\n            }\n          }\n        }, function() {\n          self.assign(intoId, 'undefined');\n        });\n        recursionFn(intoId);\n      }, !!create);\n      break;\n    case AST.CallExpression:\n      intoId = intoId || this.nextId();\n      if (ast.filter) {\n        right = self.filter(ast.callee.name);\n        args = [];\n        forEach(ast.arguments, function(expr) {\n          var argument = self.nextId();\n          self.recurse(expr, argument);\n          args.push(argument);\n        });\n        expression = right + '(' + args.join(',') + ')';\n        self.assign(intoId, expression);\n        recursionFn(intoId);\n      } else {\n        right = self.nextId();\n        left = {};\n        args = [];\n        self.recurse(ast.callee, right, left, function() {\n          self.if_(self.notNull(right), function() {\n            self.addEnsureSafeFunction(right);\n            forEach(ast.arguments, function(expr) {\n              self.recurse(expr, self.nextId(), undefined, function(argument) {\n                args.push(self.ensureSafeObject(argument));\n              });\n            });\n            if (left.name) {\n              if (!self.state.expensiveChecks) {\n                self.addEnsureSafeObject(left.context);\n              }\n              expression = self.member(left.context, left.name, left.computed) + '(' + args.join(',') + ')';\n            } else {\n              expression = right + '(' + args.join(',') + ')';\n            }\n            expression = self.ensureSafeObject(expression);\n            self.assign(intoId, expression);\n          }, function() {\n            self.assign(intoId, 'undefined');\n          });\n          recursionFn(intoId);\n        });\n      }\n      break;\n    case AST.AssignmentExpression:\n      right = this.nextId();\n      left = {};\n      if (!isAssignable(ast.left)) {\n        throw $parseMinErr('lval', 'Trying to assign a value to a non l-value');\n      }\n      this.recurse(ast.left, undefined, left, function() {\n        self.if_(self.notNull(left.context), function() {\n          self.recurse(ast.right, right);\n          self.addEnsureSafeObject(self.member(left.context, left.name, left.computed));\n          self.addEnsureSafeAssignContext(left.context);\n          expression = self.member(left.context, left.name, left.computed) + ast.operator + right;\n          self.assign(intoId, expression);\n          recursionFn(intoId || expression);\n        });\n      }, 1);\n      break;\n    case AST.ArrayExpression:\n      args = [];\n      forEach(ast.elements, function(expr) {\n        self.recurse(expr, self.nextId(), undefined, function(argument) {\n          args.push(argument);\n        });\n      });\n      expression = '[' + args.join(',') + ']';\n      this.assign(intoId, expression);\n      recursionFn(expression);\n      break;\n    case AST.ObjectExpression:\n      args = [];\n      forEach(ast.properties, function(property) {\n        self.recurse(property.value, self.nextId(), undefined, function(expr) {\n          args.push(self.escape(\n              property.key.type === AST.Identifier ? property.key.name :\n                ('' + property.key.value)) +\n              ':' + expr);\n        });\n      });\n      expression = '{' + args.join(',') + '}';\n      this.assign(intoId, expression);\n      recursionFn(expression);\n      break;\n    case AST.ThisExpression:\n      this.assign(intoId, 's');\n      recursionFn('s');\n      break;\n    case AST.LocalsExpression:\n      this.assign(intoId, 'l');\n      recursionFn('l');\n      break;\n    case AST.NGValueParameter:\n      this.assign(intoId, 'v');\n      recursionFn('v');\n      break;\n    }\n  },\n\n  getHasOwnProperty: function(element, property) {\n    var key = element + '.' + property;\n    var own = this.current().own;\n    if (!own.hasOwnProperty(key)) {\n      own[key] = this.nextId(false, element + '&&(' + this.escape(property) + ' in ' + element + ')');\n    }\n    return own[key];\n  },\n\n  assign: function(id, value) {\n    if (!id) return;\n    this.current().body.push(id, '=', value, ';');\n    return id;\n  },\n\n  filter: function(filterName) {\n    if (!this.state.filters.hasOwnProperty(filterName)) {\n      this.state.filters[filterName] = this.nextId(true);\n    }\n    return this.state.filters[filterName];\n  },\n\n  ifDefined: function(id, defaultValue) {\n    return 'ifDefined(' + id + ',' + this.escape(defaultValue) + ')';\n  },\n\n  plus: function(left, right) {\n    return 'plus(' + left + ',' + right + ')';\n  },\n\n  return_: function(id) {\n    this.current().body.push('return ', id, ';');\n  },\n\n  if_: function(test, alternate, consequent) {\n    if (test === true) {\n      alternate();\n    } else {\n      var body = this.current().body;\n      body.push('if(', test, '){');\n      alternate();\n      body.push('}');\n      if (consequent) {\n        body.push('else{');\n        consequent();\n        body.push('}');\n      }\n    }\n  },\n\n  not: function(expression) {\n    return '!(' + expression + ')';\n  },\n\n  notNull: function(expression) {\n    return expression + '!=null';\n  },\n\n  nonComputedMember: function(left, right) {\n    return left + '.' + right;\n  },\n\n  computedMember: function(left, right) {\n    return left + '[' + right + ']';\n  },\n\n  member: function(left, right, computed) {\n    if (computed) return this.computedMember(left, right);\n    return this.nonComputedMember(left, right);\n  },\n\n  addEnsureSafeObject: function(item) {\n    this.current().body.push(this.ensureSafeObject(item), ';');\n  },\n\n  addEnsureSafeMemberName: function(item) {\n    this.current().body.push(this.ensureSafeMemberName(item), ';');\n  },\n\n  addEnsureSafeFunction: function(item) {\n    this.current().body.push(this.ensureSafeFunction(item), ';');\n  },\n\n  addEnsureSafeAssignContext: function(item) {\n    this.current().body.push(this.ensureSafeAssignContext(item), ';');\n  },\n\n  ensureSafeObject: function(item) {\n    return 'ensureSafeObject(' + item + ',text)';\n  },\n\n  ensureSafeMemberName: function(item) {\n    return 'ensureSafeMemberName(' + item + ',text)';\n  },\n\n  ensureSafeFunction: function(item) {\n    return 'ensureSafeFunction(' + item + ',text)';\n  },\n\n  getStringValue: function(item) {\n    this.assign(item, 'getStringValue(' + item + ')');\n  },\n\n  ensureSafeAssignContext: function(item) {\n    return 'ensureSafeAssignContext(' + item + ',text)';\n  },\n\n  lazyRecurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {\n    var self = this;\n    return function() {\n      self.recurse(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck);\n    };\n  },\n\n  lazyAssign: function(id, value) {\n    var self = this;\n    return function() {\n      self.assign(id, value);\n    };\n  },\n\n  stringEscapeRegex: /[^ a-zA-Z0-9]/g,\n\n  stringEscapeFn: function(c) {\n    return '\\\\u' + ('0000' + c.charCodeAt(0).toString(16)).slice(-4);\n  },\n\n  escape: function(value) {\n    if (isString(value)) return \"'\" + value.replace(this.stringEscapeRegex, this.stringEscapeFn) + \"'\";\n    if (isNumber(value)) return value.toString();\n    if (value === true) return 'true';\n    if (value === false) return 'false';\n    if (value === null) return 'null';\n    if (typeof value === 'undefined') return 'undefined';\n\n    throw $parseMinErr('esc', 'IMPOSSIBLE');\n  },\n\n  nextId: function(skip, init) {\n    var id = 'v' + (this.state.nextId++);\n    if (!skip) {\n      this.current().vars.push(id + (init ? '=' + init : ''));\n    }\n    return id;\n  },\n\n  current: function() {\n    return this.state[this.state.computing];\n  }\n};\n\n\nfunction ASTInterpreter(astBuilder, $filter) {\n  this.astBuilder = astBuilder;\n  this.$filter = $filter;\n}\n\nASTInterpreter.prototype = {\n  compile: function(expression, expensiveChecks) {\n    var self = this;\n    var ast = this.astBuilder.ast(expression);\n    this.expression = expression;\n    this.expensiveChecks = expensiveChecks;\n    findConstantAndWatchExpressions(ast, self.$filter);\n    var assignable;\n    var assign;\n    if ((assignable = assignableAST(ast))) {\n      assign = this.recurse(assignable);\n    }\n    var toWatch = getInputs(ast.body);\n    var inputs;\n    if (toWatch) {\n      inputs = [];\n      forEach(toWatch, function(watch, key) {\n        var input = self.recurse(watch);\n        watch.input = input;\n        inputs.push(input);\n        watch.watchId = key;\n      });\n    }\n    var expressions = [];\n    forEach(ast.body, function(expression) {\n      expressions.push(self.recurse(expression.expression));\n    });\n    var fn = ast.body.length === 0 ? noop :\n             ast.body.length === 1 ? expressions[0] :\n             function(scope, locals) {\n               var lastValue;\n               forEach(expressions, function(exp) {\n                 lastValue = exp(scope, locals);\n               });\n               return lastValue;\n             };\n    if (assign) {\n      fn.assign = function(scope, value, locals) {\n        return assign(scope, locals, value);\n      };\n    }\n    if (inputs) {\n      fn.inputs = inputs;\n    }\n    fn.literal = isLiteral(ast);\n    fn.constant = isConstant(ast);\n    return fn;\n  },\n\n  recurse: function(ast, context, create) {\n    var left, right, self = this, args, expression;\n    if (ast.input) {\n      return this.inputs(ast.input, ast.watchId);\n    }\n    switch (ast.type) {\n    case AST.Literal:\n      return this.value(ast.value, context);\n    case AST.UnaryExpression:\n      right = this.recurse(ast.argument);\n      return this['unary' + ast.operator](right, context);\n    case AST.BinaryExpression:\n      left = this.recurse(ast.left);\n      right = this.recurse(ast.right);\n      return this['binary' + ast.operator](left, right, context);\n    case AST.LogicalExpression:\n      left = this.recurse(ast.left);\n      right = this.recurse(ast.right);\n      return this['binary' + ast.operator](left, right, context);\n    case AST.ConditionalExpression:\n      return this['ternary?:'](\n        this.recurse(ast.test),\n        this.recurse(ast.alternate),\n        this.recurse(ast.consequent),\n        context\n      );\n    case AST.Identifier:\n      ensureSafeMemberName(ast.name, self.expression);\n      return self.identifier(ast.name,\n                             self.expensiveChecks || isPossiblyDangerousMemberName(ast.name),\n                             context, create, self.expression);\n    case AST.MemberExpression:\n      left = this.recurse(ast.object, false, !!create);\n      if (!ast.computed) {\n        ensureSafeMemberName(ast.property.name, self.expression);\n        right = ast.property.name;\n      }\n      if (ast.computed) right = this.recurse(ast.property);\n      return ast.computed ?\n        this.computedMember(left, right, context, create, self.expression) :\n        this.nonComputedMember(left, right, self.expensiveChecks, context, create, self.expression);\n    case AST.CallExpression:\n      args = [];\n      forEach(ast.arguments, function(expr) {\n        args.push(self.recurse(expr));\n      });\n      if (ast.filter) right = this.$filter(ast.callee.name);\n      if (!ast.filter) right = this.recurse(ast.callee, true);\n      return ast.filter ?\n        function(scope, locals, assign, inputs) {\n          var values = [];\n          for (var i = 0; i < args.length; ++i) {\n            values.push(args[i](scope, locals, assign, inputs));\n          }\n          var value = right.apply(undefined, values, inputs);\n          return context ? {context: undefined, name: undefined, value: value} : value;\n        } :\n        function(scope, locals, assign, inputs) {\n          var rhs = right(scope, locals, assign, inputs);\n          var value;\n          if (rhs.value != null) {\n            ensureSafeObject(rhs.context, self.expression);\n            ensureSafeFunction(rhs.value, self.expression);\n            var values = [];\n            for (var i = 0; i < args.length; ++i) {\n              values.push(ensureSafeObject(args[i](scope, locals, assign, inputs), self.expression));\n            }\n            value = ensureSafeObject(rhs.value.apply(rhs.context, values), self.expression);\n          }\n          return context ? {value: value} : value;\n        };\n    case AST.AssignmentExpression:\n      left = this.recurse(ast.left, true, 1);\n      right = this.recurse(ast.right);\n      return function(scope, locals, assign, inputs) {\n        var lhs = left(scope, locals, assign, inputs);\n        var rhs = right(scope, locals, assign, inputs);\n        ensureSafeObject(lhs.value, self.expression);\n        ensureSafeAssignContext(lhs.context);\n        lhs.context[lhs.name] = rhs;\n        return context ? {value: rhs} : rhs;\n      };\n    case AST.ArrayExpression:\n      args = [];\n      forEach(ast.elements, function(expr) {\n        args.push(self.recurse(expr));\n      });\n      return function(scope, locals, assign, inputs) {\n        var value = [];\n        for (var i = 0; i < args.length; ++i) {\n          value.push(args[i](scope, locals, assign, inputs));\n        }\n        return context ? {value: value} : value;\n      };\n    case AST.ObjectExpression:\n      args = [];\n      forEach(ast.properties, function(property) {\n        args.push({key: property.key.type === AST.Identifier ?\n                        property.key.name :\n                        ('' + property.key.value),\n                   value: self.recurse(property.value)\n        });\n      });\n      return function(scope, locals, assign, inputs) {\n        var value = {};\n        for (var i = 0; i < args.length; ++i) {\n          value[args[i].key] = args[i].value(scope, locals, assign, inputs);\n        }\n        return context ? {value: value} : value;\n      };\n    case AST.ThisExpression:\n      return function(scope) {\n        return context ? {value: scope} : scope;\n      };\n    case AST.LocalsExpression:\n      return function(scope, locals) {\n        return context ? {value: locals} : locals;\n      };\n    case AST.NGValueParameter:\n      return function(scope, locals, assign) {\n        return context ? {value: assign} : assign;\n      };\n    }\n  },\n\n  'unary+': function(argument, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = argument(scope, locals, assign, inputs);\n      if (isDefined(arg)) {\n        arg = +arg;\n      } else {\n        arg = 0;\n      }\n      return context ? {value: arg} : arg;\n    };\n  },\n  'unary-': function(argument, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = argument(scope, locals, assign, inputs);\n      if (isDefined(arg)) {\n        arg = -arg;\n      } else {\n        arg = 0;\n      }\n      return context ? {value: arg} : arg;\n    };\n  },\n  'unary!': function(argument, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = !argument(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary+': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var lhs = left(scope, locals, assign, inputs);\n      var rhs = right(scope, locals, assign, inputs);\n      var arg = plusFn(lhs, rhs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary-': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var lhs = left(scope, locals, assign, inputs);\n      var rhs = right(scope, locals, assign, inputs);\n      var arg = (isDefined(lhs) ? lhs : 0) - (isDefined(rhs) ? rhs : 0);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary*': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = left(scope, locals, assign, inputs) * right(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary/': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = left(scope, locals, assign, inputs) / right(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary%': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = left(scope, locals, assign, inputs) % right(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary===': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = left(scope, locals, assign, inputs) === right(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary!==': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = left(scope, locals, assign, inputs) !== right(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary==': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = left(scope, locals, assign, inputs) == right(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary!=': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = left(scope, locals, assign, inputs) != right(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary<': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = left(scope, locals, assign, inputs) < right(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary>': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = left(scope, locals, assign, inputs) > right(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary<=': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = left(scope, locals, assign, inputs) <= right(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary>=': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = left(scope, locals, assign, inputs) >= right(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary&&': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = left(scope, locals, assign, inputs) && right(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'binary||': function(left, right, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = left(scope, locals, assign, inputs) || right(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  'ternary?:': function(test, alternate, consequent, context) {\n    return function(scope, locals, assign, inputs) {\n      var arg = test(scope, locals, assign, inputs) ? alternate(scope, locals, assign, inputs) : consequent(scope, locals, assign, inputs);\n      return context ? {value: arg} : arg;\n    };\n  },\n  value: function(value, context) {\n    return function() { return context ? {context: undefined, name: undefined, value: value} : value; };\n  },\n  identifier: function(name, expensiveChecks, context, create, expression) {\n    return function(scope, locals, assign, inputs) {\n      var base = locals && (name in locals) ? locals : scope;\n      if (create && create !== 1 && base && !(base[name])) {\n        base[name] = {};\n      }\n      var value = base ? base[name] : undefined;\n      if (expensiveChecks) {\n        ensureSafeObject(value, expression);\n      }\n      if (context) {\n        return {context: base, name: name, value: value};\n      } else {\n        return value;\n      }\n    };\n  },\n  computedMember: function(left, right, context, create, expression) {\n    return function(scope, locals, assign, inputs) {\n      var lhs = left(scope, locals, assign, inputs);\n      var rhs;\n      var value;\n      if (lhs != null) {\n        rhs = right(scope, locals, assign, inputs);\n        rhs = getStringValue(rhs);\n        ensureSafeMemberName(rhs, expression);\n        if (create && create !== 1) {\n          ensureSafeAssignContext(lhs);\n          if (lhs && !(lhs[rhs])) {\n            lhs[rhs] = {};\n          }\n        }\n        value = lhs[rhs];\n        ensureSafeObject(value, expression);\n      }\n      if (context) {\n        return {context: lhs, name: rhs, value: value};\n      } else {\n        return value;\n      }\n    };\n  },\n  nonComputedMember: function(left, right, expensiveChecks, context, create, expression) {\n    return function(scope, locals, assign, inputs) {\n      var lhs = left(scope, locals, assign, inputs);\n      if (create && create !== 1) {\n        ensureSafeAssignContext(lhs);\n        if (lhs && !(lhs[right])) {\n          lhs[right] = {};\n        }\n      }\n      var value = lhs != null ? lhs[right] : undefined;\n      if (expensiveChecks || isPossiblyDangerousMemberName(right)) {\n        ensureSafeObject(value, expression);\n      }\n      if (context) {\n        return {context: lhs, name: right, value: value};\n      } else {\n        return value;\n      }\n    };\n  },\n  inputs: function(input, watchId) {\n    return function(scope, value, locals, inputs) {\n      if (inputs) return inputs[watchId];\n      return input(scope, value, locals);\n    };\n  }\n};\n\n/**\n * @constructor\n */\nvar Parser = function(lexer, $filter, options) {\n  this.lexer = lexer;\n  this.$filter = $filter;\n  this.options = options;\n  this.ast = new AST(lexer, options);\n  this.astCompiler = options.csp ? new ASTInterpreter(this.ast, $filter) :\n                                   new ASTCompiler(this.ast, $filter);\n};\n\nParser.prototype = {\n  constructor: Parser,\n\n  parse: function(text) {\n    return this.astCompiler.compile(text, this.options.expensiveChecks);\n  }\n};\n\nfunction isPossiblyDangerousMemberName(name) {\n  return name == 'constructor';\n}\n\nvar objectValueOf = Object.prototype.valueOf;\n\nfunction getValueOf(value) {\n  return isFunction(value.valueOf) ? value.valueOf() : objectValueOf.call(value);\n}\n\n///////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $parse\n * @kind function\n *\n * @description\n *\n * Converts Angular {@link guide/expression expression} into a function.\n *\n * ```js\n *   var getter = $parse('user.name');\n *   var setter = getter.assign;\n *   var context = {user:{name:'angular'}};\n *   var locals = {user:{name:'local'}};\n *\n *   expect(getter(context)).toEqual('angular');\n *   setter(context, 'newValue');\n *   expect(context.user.name).toEqual('newValue');\n *   expect(getter(context, locals)).toEqual('local');\n * ```\n *\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n *      are evaluated against (typically a scope object).\n *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n *      `context`.\n *\n *    The returned function also has the following properties:\n *      * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript\n *        literal.\n *      * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript\n *        constant literals.\n *      * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be\n *        set to a function to change its value on the given context.\n *\n */\n\n\n/**\n * @ngdoc provider\n * @name $parseProvider\n *\n * @description\n * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}\n *  service.\n */\nfunction $ParseProvider() {\n  var cacheDefault = createMap();\n  var cacheExpensive = createMap();\n  var literals = {\n    'true': true,\n    'false': false,\n    'null': null,\n    'undefined': undefined\n  };\n\n  /**\n   * @ngdoc method\n   * @name $parseProvider#addLiteral\n   * @description\n   *\n   * Configure $parse service to add literal values that will be present as literal at expressions.\n   *\n   * @param {string} literalName Token for the literal value. The literal name value must be a valid literal name.\n   * @param {*} literalValue Value for this literal. All literal values must be primitives or `undefined`.\n   *\n   **/\n  this.addLiteral = function(literalName, literalValue) {\n    literals[literalName] = literalValue;\n  };\n\n  this.$get = ['$filter', function($filter) {\n    var noUnsafeEval = csp().noUnsafeEval;\n    var $parseOptions = {\n          csp: noUnsafeEval,\n          expensiveChecks: false,\n          literals: copy(literals)\n        },\n        $parseOptionsExpensive = {\n          csp: noUnsafeEval,\n          expensiveChecks: true,\n          literals: copy(literals)\n        };\n    var runningChecksEnabled = false;\n\n    $parse.$$runningExpensiveChecks = function() {\n      return runningChecksEnabled;\n    };\n\n    return $parse;\n\n    function $parse(exp, interceptorFn, expensiveChecks) {\n      var parsedExpression, oneTime, cacheKey;\n\n      expensiveChecks = expensiveChecks || runningChecksEnabled;\n\n      switch (typeof exp) {\n        case 'string':\n          exp = exp.trim();\n          cacheKey = exp;\n\n          var cache = (expensiveChecks ? cacheExpensive : cacheDefault);\n          parsedExpression = cache[cacheKey];\n\n          if (!parsedExpression) {\n            if (exp.charAt(0) === ':' && exp.charAt(1) === ':') {\n              oneTime = true;\n              exp = exp.substring(2);\n            }\n            var parseOptions = expensiveChecks ? $parseOptionsExpensive : $parseOptions;\n            var lexer = new Lexer(parseOptions);\n            var parser = new Parser(lexer, $filter, parseOptions);\n            parsedExpression = parser.parse(exp);\n            if (parsedExpression.constant) {\n              parsedExpression.$$watchDelegate = constantWatchDelegate;\n            } else if (oneTime) {\n              parsedExpression.$$watchDelegate = parsedExpression.literal ?\n                  oneTimeLiteralWatchDelegate : oneTimeWatchDelegate;\n            } else if (parsedExpression.inputs) {\n              parsedExpression.$$watchDelegate = inputsWatchDelegate;\n            }\n            if (expensiveChecks) {\n              parsedExpression = expensiveChecksInterceptor(parsedExpression);\n            }\n            cache[cacheKey] = parsedExpression;\n          }\n          return addInterceptor(parsedExpression, interceptorFn);\n\n        case 'function':\n          return addInterceptor(exp, interceptorFn);\n\n        default:\n          return addInterceptor(noop, interceptorFn);\n      }\n    }\n\n    function expensiveChecksInterceptor(fn) {\n      if (!fn) return fn;\n      expensiveCheckFn.$$watchDelegate = fn.$$watchDelegate;\n      expensiveCheckFn.assign = expensiveChecksInterceptor(fn.assign);\n      expensiveCheckFn.constant = fn.constant;\n      expensiveCheckFn.literal = fn.literal;\n      for (var i = 0; fn.inputs && i < fn.inputs.length; ++i) {\n        fn.inputs[i] = expensiveChecksInterceptor(fn.inputs[i]);\n      }\n      expensiveCheckFn.inputs = fn.inputs;\n\n      return expensiveCheckFn;\n\n      function expensiveCheckFn(scope, locals, assign, inputs) {\n        var expensiveCheckOldValue = runningChecksEnabled;\n        runningChecksEnabled = true;\n        try {\n          return fn(scope, locals, assign, inputs);\n        } finally {\n          runningChecksEnabled = expensiveCheckOldValue;\n        }\n      }\n    }\n\n    function expressionInputDirtyCheck(newValue, oldValueOfValue) {\n\n      if (newValue == null || oldValueOfValue == null) { // null/undefined\n        return newValue === oldValueOfValue;\n      }\n\n      if (typeof newValue === 'object') {\n\n        // attempt to convert the value to a primitive type\n        // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can\n        //             be cheaply dirty-checked\n        newValue = getValueOf(newValue);\n\n        if (typeof newValue === 'object') {\n          // objects/arrays are not supported - deep-watching them would be too expensive\n          return false;\n        }\n\n        // fall-through to the primitive equality check\n      }\n\n      //Primitive or NaN\n      return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue);\n    }\n\n    function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) {\n      var inputExpressions = parsedExpression.inputs;\n      var lastResult;\n\n      if (inputExpressions.length === 1) {\n        var oldInputValueOf = expressionInputDirtyCheck; // init to something unique so that equals check fails\n        inputExpressions = inputExpressions[0];\n        return scope.$watch(function expressionInputWatch(scope) {\n          var newInputValue = inputExpressions(scope);\n          if (!expressionInputDirtyCheck(newInputValue, oldInputValueOf)) {\n            lastResult = parsedExpression(scope, undefined, undefined, [newInputValue]);\n            oldInputValueOf = newInputValue && getValueOf(newInputValue);\n          }\n          return lastResult;\n        }, listener, objectEquality, prettyPrintExpression);\n      }\n\n      var oldInputValueOfValues = [];\n      var oldInputValues = [];\n      for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n        oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails\n        oldInputValues[i] = null;\n      }\n\n      return scope.$watch(function expressionInputsWatch(scope) {\n        var changed = false;\n\n        for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n          var newInputValue = inputExpressions[i](scope);\n          if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i]))) {\n            oldInputValues[i] = newInputValue;\n            oldInputValueOfValues[i] = newInputValue && getValueOf(newInputValue);\n          }\n        }\n\n        if (changed) {\n          lastResult = parsedExpression(scope, undefined, undefined, oldInputValues);\n        }\n\n        return lastResult;\n      }, listener, objectEquality, prettyPrintExpression);\n    }\n\n    function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n      var unwatch, lastValue;\n      return unwatch = scope.$watch(function oneTimeWatch(scope) {\n        return parsedExpression(scope);\n      }, function oneTimeListener(value, old, scope) {\n        lastValue = value;\n        if (isFunction(listener)) {\n          listener.apply(this, arguments);\n        }\n        if (isDefined(value)) {\n          scope.$$postDigest(function() {\n            if (isDefined(lastValue)) {\n              unwatch();\n            }\n          });\n        }\n      }, objectEquality);\n    }\n\n    function oneTimeLiteralWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n      var unwatch, lastValue;\n      return unwatch = scope.$watch(function oneTimeWatch(scope) {\n        return parsedExpression(scope);\n      }, function oneTimeListener(value, old, scope) {\n        lastValue = value;\n        if (isFunction(listener)) {\n          listener.call(this, value, old, scope);\n        }\n        if (isAllDefined(value)) {\n          scope.$$postDigest(function() {\n            if (isAllDefined(lastValue)) unwatch();\n          });\n        }\n      }, objectEquality);\n\n      function isAllDefined(value) {\n        var allDefined = true;\n        forEach(value, function(val) {\n          if (!isDefined(val)) allDefined = false;\n        });\n        return allDefined;\n      }\n    }\n\n    function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n      var unwatch;\n      return unwatch = scope.$watch(function constantWatch(scope) {\n        unwatch();\n        return parsedExpression(scope);\n      }, listener, objectEquality);\n    }\n\n    function addInterceptor(parsedExpression, interceptorFn) {\n      if (!interceptorFn) return parsedExpression;\n      var watchDelegate = parsedExpression.$$watchDelegate;\n      var useInputs = false;\n\n      var regularWatch =\n          watchDelegate !== oneTimeLiteralWatchDelegate &&\n          watchDelegate !== oneTimeWatchDelegate;\n\n      var fn = regularWatch ? function regularInterceptedExpression(scope, locals, assign, inputs) {\n        var value = useInputs && inputs ? inputs[0] : parsedExpression(scope, locals, assign, inputs);\n        return interceptorFn(value, scope, locals);\n      } : function oneTimeInterceptedExpression(scope, locals, assign, inputs) {\n        var value = parsedExpression(scope, locals, assign, inputs);\n        var result = interceptorFn(value, scope, locals);\n        // we only return the interceptor's result if the\n        // initial value is defined (for bind-once)\n        return isDefined(value) ? result : value;\n      };\n\n      // Propagate $$watchDelegates other then inputsWatchDelegate\n      if (parsedExpression.$$watchDelegate &&\n          parsedExpression.$$watchDelegate !== inputsWatchDelegate) {\n        fn.$$watchDelegate = parsedExpression.$$watchDelegate;\n      } else if (!interceptorFn.$stateful) {\n        // If there is an interceptor, but no watchDelegate then treat the interceptor like\n        // we treat filters - it is assumed to be a pure function unless flagged with $stateful\n        fn.$$watchDelegate = inputsWatchDelegate;\n        useInputs = !parsedExpression.inputs;\n        fn.inputs = parsedExpression.inputs ? parsedExpression.inputs : [parsedExpression];\n      }\n\n      return fn;\n    }\n  }];\n}\n\n/**\n * @ngdoc service\n * @name $q\n * @requires $rootScope\n *\n * @description\n * A service that helps you run functions asynchronously, and use their return values (or exceptions)\n * when they are done processing.\n *\n * This is an implementation of promises/deferred objects inspired by\n * [Kris Kowal's Q](https://github.com/kriskowal/q).\n *\n * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred\n * implementations, and the other which resembles ES6 (ES2015) promises to some degree.\n *\n * # $q constructor\n *\n * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver`\n * function as the first argument. This is similar to the native Promise implementation from ES6,\n * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n *\n * While the constructor-style use is supported, not all of the supporting methods from ES6 promises are\n * available yet.\n *\n * It can be used like so:\n *\n * ```js\n *   // for the purpose of this example let's assume that variables `$q` and `okToGreet`\n *   // are available in the current lexical scope (they could have been injected or passed in).\n *\n *   function asyncGreet(name) {\n *     // perform some asynchronous operation, resolve or reject the promise when appropriate.\n *     return $q(function(resolve, reject) {\n *       setTimeout(function() {\n *         if (okToGreet(name)) {\n *           resolve('Hello, ' + name + '!');\n *         } else {\n *           reject('Greeting ' + name + ' is not allowed.');\n *         }\n *       }, 1000);\n *     });\n *   }\n *\n *   var promise = asyncGreet('Robin Hood');\n *   promise.then(function(greeting) {\n *     alert('Success: ' + greeting);\n *   }, function(reason) {\n *     alert('Failed: ' + reason);\n *   });\n * ```\n *\n * Note: progress/notify callbacks are not currently supported via the ES6-style interface.\n *\n * Note: unlike ES6 behavior, an exception thrown in the constructor function will NOT implicitly reject the promise.\n *\n * However, the more traditional CommonJS-style usage is still available, and documented below.\n *\n * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an\n * interface for interacting with an object that represents the result of an action that is\n * performed asynchronously, and may or may not be finished at any given point in time.\n *\n * From the perspective of dealing with error handling, deferred and promise APIs are to\n * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.\n *\n * ```js\n *   // for the purpose of this example let's assume that variables `$q` and `okToGreet`\n *   // are available in the current lexical scope (they could have been injected or passed in).\n *\n *   function asyncGreet(name) {\n *     var deferred = $q.defer();\n *\n *     setTimeout(function() {\n *       deferred.notify('About to greet ' + name + '.');\n *\n *       if (okToGreet(name)) {\n *         deferred.resolve('Hello, ' + name + '!');\n *       } else {\n *         deferred.reject('Greeting ' + name + ' is not allowed.');\n *       }\n *     }, 1000);\n *\n *     return deferred.promise;\n *   }\n *\n *   var promise = asyncGreet('Robin Hood');\n *   promise.then(function(greeting) {\n *     alert('Success: ' + greeting);\n *   }, function(reason) {\n *     alert('Failed: ' + reason);\n *   }, function(update) {\n *     alert('Got notification: ' + update);\n *   });\n * ```\n *\n * At first it might not be obvious why this extra complexity is worth the trouble. The payoff\n * comes in the way of guarantees that promise and deferred APIs make, see\n * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.\n *\n * Additionally the promise api allows for composition that is very hard to do with the\n * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.\n * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the\n * section on serial or parallel joining of promises.\n *\n * # The Deferred API\n *\n * A new instance of deferred is constructed by calling `$q.defer()`.\n *\n * The purpose of the deferred object is to expose the associated Promise instance as well as APIs\n * that can be used for signaling the successful or unsuccessful completion, as well as the status\n * of the task.\n *\n * **Methods**\n *\n * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection\n *   constructed via `$q.reject`, the promise will be rejected instead.\n * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to\n *   resolving it with a rejection constructed via `$q.reject`.\n * - `notify(value)` - provides updates on the status of the promise's execution. This may be called\n *   multiple times before the promise is either resolved or rejected.\n *\n * **Properties**\n *\n * - promise – `{Promise}` – promise object associated with this deferred.\n *\n *\n * # The Promise API\n *\n * A new promise instance is created when a deferred instance is created and can be retrieved by\n * calling `deferred.promise`.\n *\n * The purpose of the promise object is to allow for interested parties to get access to the result\n * of the deferred task when it completes.\n *\n * **Methods**\n *\n * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or\n *   will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously\n *   as soon as the result is available. The callbacks are called with a single argument: the result\n *   or rejection reason. Additionally, the notify callback may be called zero or more times to\n *   provide a progress indication, before the promise is resolved or rejected.\n *\n *   This method *returns a new promise* which is resolved or rejected via the return value of the\n *   `successCallback`, `errorCallback` (unless that value is a promise, in which case it is resolved\n *   with the value which is resolved in that promise using\n *   [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)).\n *   It also notifies via the return value of the `notifyCallback` method. The promise cannot be\n *   resolved or rejected from the notifyCallback method.\n *\n * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`\n *\n * - `finally(callback, notifyCallback)` – allows you to observe either the fulfillment or rejection of a promise,\n *   but to do so without modifying the final value. This is useful to release resources or do some\n *   clean-up that needs to be done whether the promise was rejected or resolved. See the [full\n *   specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for\n *   more information.\n *\n * # Chaining promises\n *\n * Because calling the `then` method of a promise returns a new derived promise, it is easily\n * possible to create a chain of promises:\n *\n * ```js\n *   promiseB = promiseA.then(function(result) {\n *     return result + 1;\n *   });\n *\n *   // promiseB will be resolved immediately after promiseA is resolved and its value\n *   // will be the result of promiseA incremented by 1\n * ```\n *\n * It is possible to create chains of any length and since a promise can be resolved with another\n * promise (which will defer its resolution further), it is possible to pause/defer resolution of\n * the promises at any point in the chain. This makes it possible to implement powerful APIs like\n * $http's response interceptors.\n *\n *\n * # Differences between Kris Kowal's Q and $q\n *\n *  There are two main differences:\n *\n * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation\n *   mechanism in angular, which means faster propagation of resolution or rejection into your\n *   models and avoiding unnecessary browser repaints, which would result in flickering UI.\n * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains\n *   all the important functionality needed for common async tasks.\n *\n * # Testing\n *\n *  ```js\n *    it('should simulate promise', inject(function($q, $rootScope) {\n *      var deferred = $q.defer();\n *      var promise = deferred.promise;\n *      var resolvedValue;\n *\n *      promise.then(function(value) { resolvedValue = value; });\n *      expect(resolvedValue).toBeUndefined();\n *\n *      // Simulate resolving of promise\n *      deferred.resolve(123);\n *      // Note that the 'then' function does not get called synchronously.\n *      // This is because we want the promise API to always be async, whether or not\n *      // it got called synchronously or asynchronously.\n *      expect(resolvedValue).toBeUndefined();\n *\n *      // Propagate promise resolution to 'then' functions using $apply().\n *      $rootScope.$apply();\n *      expect(resolvedValue).toEqual(123);\n *    }));\n *  ```\n *\n * @param {function(function, function)} resolver Function which is responsible for resolving or\n *   rejecting the newly created promise. The first parameter is a function which resolves the\n *   promise, the second parameter is a function which rejects the promise.\n *\n * @returns {Promise} The newly created promise.\n */\nfunction $QProvider() {\n\n  this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {\n    return qFactory(function(callback) {\n      $rootScope.$evalAsync(callback);\n    }, $exceptionHandler);\n  }];\n}\n\nfunction $$QProvider() {\n  this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) {\n    return qFactory(function(callback) {\n      $browser.defer(callback);\n    }, $exceptionHandler);\n  }];\n}\n\n/**\n * Constructs a promise manager.\n *\n * @param {function(function)} nextTick Function for executing functions in the next turn.\n * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for\n *     debugging purposes.\n * @returns {object} Promise manager.\n */\nfunction qFactory(nextTick, exceptionHandler) {\n  var $qMinErr = minErr('$q', TypeError);\n\n  /**\n   * @ngdoc method\n   * @name ng.$q#defer\n   * @kind function\n   *\n   * @description\n   * Creates a `Deferred` object which represents a task which will finish in the future.\n   *\n   * @returns {Deferred} Returns a new instance of deferred.\n   */\n  var defer = function() {\n    var d = new Deferred();\n    //Necessary to support unbound execution :/\n    d.resolve = simpleBind(d, d.resolve);\n    d.reject = simpleBind(d, d.reject);\n    d.notify = simpleBind(d, d.notify);\n    return d;\n  };\n\n  function Promise() {\n    this.$$state = { status: 0 };\n  }\n\n  extend(Promise.prototype, {\n    then: function(onFulfilled, onRejected, progressBack) {\n      if (isUndefined(onFulfilled) && isUndefined(onRejected) && isUndefined(progressBack)) {\n        return this;\n      }\n      var result = new Deferred();\n\n      this.$$state.pending = this.$$state.pending || [];\n      this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]);\n      if (this.$$state.status > 0) scheduleProcessQueue(this.$$state);\n\n      return result.promise;\n    },\n\n    \"catch\": function(callback) {\n      return this.then(null, callback);\n    },\n\n    \"finally\": function(callback, progressBack) {\n      return this.then(function(value) {\n        return handleCallback(value, true, callback);\n      }, function(error) {\n        return handleCallback(error, false, callback);\n      }, progressBack);\n    }\n  });\n\n  //Faster, more basic than angular.bind http://jsperf.com/angular-bind-vs-custom-vs-native\n  function simpleBind(context, fn) {\n    return function(value) {\n      fn.call(context, value);\n    };\n  }\n\n  function processQueue(state) {\n    var fn, deferred, pending;\n\n    pending = state.pending;\n    state.processScheduled = false;\n    state.pending = undefined;\n    for (var i = 0, ii = pending.length; i < ii; ++i) {\n      deferred = pending[i][0];\n      fn = pending[i][state.status];\n      try {\n        if (isFunction(fn)) {\n          deferred.resolve(fn(state.value));\n        } else if (state.status === 1) {\n          deferred.resolve(state.value);\n        } else {\n          deferred.reject(state.value);\n        }\n      } catch (e) {\n        deferred.reject(e);\n        exceptionHandler(e);\n      }\n    }\n  }\n\n  function scheduleProcessQueue(state) {\n    if (state.processScheduled || !state.pending) return;\n    state.processScheduled = true;\n    nextTick(function() { processQueue(state); });\n  }\n\n  function Deferred() {\n    this.promise = new Promise();\n  }\n\n  extend(Deferred.prototype, {\n    resolve: function(val) {\n      if (this.promise.$$state.status) return;\n      if (val === this.promise) {\n        this.$$reject($qMinErr(\n          'qcycle',\n          \"Expected promise to be resolved with value other than itself '{0}'\",\n          val));\n      } else {\n        this.$$resolve(val);\n      }\n\n    },\n\n    $$resolve: function(val) {\n      var then;\n      var that = this;\n      var done = false;\n      try {\n        if ((isObject(val) || isFunction(val))) then = val && val.then;\n        if (isFunction(then)) {\n          this.promise.$$state.status = -1;\n          then.call(val, resolvePromise, rejectPromise, simpleBind(this, this.notify));\n        } else {\n          this.promise.$$state.value = val;\n          this.promise.$$state.status = 1;\n          scheduleProcessQueue(this.promise.$$state);\n        }\n      } catch (e) {\n        rejectPromise(e);\n        exceptionHandler(e);\n      }\n\n      function resolvePromise(val) {\n        if (done) return;\n        done = true;\n        that.$$resolve(val);\n      }\n      function rejectPromise(val) {\n        if (done) return;\n        done = true;\n        that.$$reject(val);\n      }\n    },\n\n    reject: function(reason) {\n      if (this.promise.$$state.status) return;\n      this.$$reject(reason);\n    },\n\n    $$reject: function(reason) {\n      this.promise.$$state.value = reason;\n      this.promise.$$state.status = 2;\n      scheduleProcessQueue(this.promise.$$state);\n    },\n\n    notify: function(progress) {\n      var callbacks = this.promise.$$state.pending;\n\n      if ((this.promise.$$state.status <= 0) && callbacks && callbacks.length) {\n        nextTick(function() {\n          var callback, result;\n          for (var i = 0, ii = callbacks.length; i < ii; i++) {\n            result = callbacks[i][0];\n            callback = callbacks[i][3];\n            try {\n              result.notify(isFunction(callback) ? callback(progress) : progress);\n            } catch (e) {\n              exceptionHandler(e);\n            }\n          }\n        });\n      }\n    }\n  });\n\n  /**\n   * @ngdoc method\n   * @name $q#reject\n   * @kind function\n   *\n   * @description\n   * Creates a promise that is resolved as rejected with the specified `reason`. This api should be\n   * used to forward rejection in a chain of promises. If you are dealing with the last promise in\n   * a promise chain, you don't need to worry about it.\n   *\n   * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of\n   * `reject` as the `throw` keyword in JavaScript. This also means that if you \"catch\" an error via\n   * a promise error callback and you want to forward the error to the promise derived from the\n   * current promise, you have to \"rethrow\" the error by returning a rejection constructed via\n   * `reject`.\n   *\n   * ```js\n   *   promiseB = promiseA.then(function(result) {\n   *     // success: do something and resolve promiseB\n   *     //          with the old or a new result\n   *     return result;\n   *   }, function(reason) {\n   *     // error: handle the error if possible and\n   *     //        resolve promiseB with newPromiseOrValue,\n   *     //        otherwise forward the rejection to promiseB\n   *     if (canHandle(reason)) {\n   *      // handle the error and recover\n   *      return newPromiseOrValue;\n   *     }\n   *     return $q.reject(reason);\n   *   });\n   * ```\n   *\n   * @param {*} reason Constant, message, exception or an object representing the rejection reason.\n   * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.\n   */\n  var reject = function(reason) {\n    var result = new Deferred();\n    result.reject(reason);\n    return result.promise;\n  };\n\n  var makePromise = function makePromise(value, resolved) {\n    var result = new Deferred();\n    if (resolved) {\n      result.resolve(value);\n    } else {\n      result.reject(value);\n    }\n    return result.promise;\n  };\n\n  var handleCallback = function handleCallback(value, isResolved, callback) {\n    var callbackOutput = null;\n    try {\n      if (isFunction(callback)) callbackOutput = callback();\n    } catch (e) {\n      return makePromise(e, false);\n    }\n    if (isPromiseLike(callbackOutput)) {\n      return callbackOutput.then(function() {\n        return makePromise(value, isResolved);\n      }, function(error) {\n        return makePromise(error, false);\n      });\n    } else {\n      return makePromise(value, isResolved);\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name $q#when\n   * @kind function\n   *\n   * @description\n   * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.\n   * This is useful when you are dealing with an object that might or might not be a promise, or if\n   * the promise comes from a source that can't be trusted.\n   *\n   * @param {*} value Value or a promise\n   * @param {Function=} successCallback\n   * @param {Function=} errorCallback\n   * @param {Function=} progressCallback\n   * @returns {Promise} Returns a promise of the passed value or promise\n   */\n\n\n  var when = function(value, callback, errback, progressBack) {\n    var result = new Deferred();\n    result.resolve(value);\n    return result.promise.then(callback, errback, progressBack);\n  };\n\n  /**\n   * @ngdoc method\n   * @name $q#resolve\n   * @kind function\n   *\n   * @description\n   * Alias of {@link ng.$q#when when} to maintain naming consistency with ES6.\n   *\n   * @param {*} value Value or a promise\n   * @param {Function=} successCallback\n   * @param {Function=} errorCallback\n   * @param {Function=} progressCallback\n   * @returns {Promise} Returns a promise of the passed value or promise\n   */\n  var resolve = when;\n\n  /**\n   * @ngdoc method\n   * @name $q#all\n   * @kind function\n   *\n   * @description\n   * Combines multiple promises into a single promise that is resolved when all of the input\n   * promises are resolved.\n   *\n   * @param {Array.<Promise>|Object.<Promise>} promises An array or hash of promises.\n   * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,\n   *   each value corresponding to the promise at the same index/key in the `promises` array/hash.\n   *   If any of the promises is resolved with a rejection, this resulting promise will be rejected\n   *   with the same rejection value.\n   */\n\n  function all(promises) {\n    var deferred = new Deferred(),\n        counter = 0,\n        results = isArray(promises) ? [] : {};\n\n    forEach(promises, function(promise, key) {\n      counter++;\n      when(promise).then(function(value) {\n        if (results.hasOwnProperty(key)) return;\n        results[key] = value;\n        if (!(--counter)) deferred.resolve(results);\n      }, function(reason) {\n        if (results.hasOwnProperty(key)) return;\n        deferred.reject(reason);\n      });\n    });\n\n    if (counter === 0) {\n      deferred.resolve(results);\n    }\n\n    return deferred.promise;\n  }\n\n  var $Q = function Q(resolver) {\n    if (!isFunction(resolver)) {\n      throw $qMinErr('norslvr', \"Expected resolverFn, got '{0}'\", resolver);\n    }\n\n    var deferred = new Deferred();\n\n    function resolveFn(value) {\n      deferred.resolve(value);\n    }\n\n    function rejectFn(reason) {\n      deferred.reject(reason);\n    }\n\n    resolver(resolveFn, rejectFn);\n\n    return deferred.promise;\n  };\n\n  // Let's make the instanceof operator work for promises, so that\n  // `new $q(fn) instanceof $q` would evaluate to true.\n  $Q.prototype = Promise.prototype;\n\n  $Q.defer = defer;\n  $Q.reject = reject;\n  $Q.when = when;\n  $Q.resolve = resolve;\n  $Q.all = all;\n\n  return $Q;\n}\n\nfunction $$RAFProvider() { //rAF\n  this.$get = ['$window', '$timeout', function($window, $timeout) {\n    var requestAnimationFrame = $window.requestAnimationFrame ||\n                                $window.webkitRequestAnimationFrame;\n\n    var cancelAnimationFrame = $window.cancelAnimationFrame ||\n                               $window.webkitCancelAnimationFrame ||\n                               $window.webkitCancelRequestAnimationFrame;\n\n    var rafSupported = !!requestAnimationFrame;\n    var raf = rafSupported\n      ? function(fn) {\n          var id = requestAnimationFrame(fn);\n          return function() {\n            cancelAnimationFrame(id);\n          };\n        }\n      : function(fn) {\n          var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666\n          return function() {\n            $timeout.cancel(timer);\n          };\n        };\n\n    raf.supported = rafSupported;\n\n    return raf;\n  }];\n}\n\n/**\n * DESIGN NOTES\n *\n * The design decisions behind the scope are heavily favored for speed and memory consumption.\n *\n * The typical use of scope is to watch the expressions, which most of the time return the same\n * value as last time so we optimize the operation.\n *\n * Closures construction is expensive in terms of speed as well as memory:\n *   - No closures, instead use prototypical inheritance for API\n *   - Internal state needs to be stored on scope directly, which means that private state is\n *     exposed as $$____ properties\n *\n * Loop operations are optimized by using while(count--) { ... }\n *   - This means that in order to keep the same order of execution as addition we have to add\n *     items to the array at the beginning (unshift) instead of at the end (push)\n *\n * Child scopes are created and removed often\n *   - Using an array would be slow since inserts in the middle are expensive; so we use linked lists\n *\n * There are fewer watches than observers. This is why you don't want the observer to be implemented\n * in the same way as watch. Watch requires return of the initialization function which is expensive\n * to construct.\n */\n\n\n/**\n * @ngdoc provider\n * @name $rootScopeProvider\n * @description\n *\n * Provider for the $rootScope service.\n */\n\n/**\n * @ngdoc method\n * @name $rootScopeProvider#digestTtl\n * @description\n *\n * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and\n * assuming that the model is unstable.\n *\n * The current default is 10 iterations.\n *\n * In complex applications it's possible that the dependencies between `$watch`s will result in\n * several digest iterations. However if an application needs more than the default 10 digest\n * iterations for its model to stabilize then you should investigate what is causing the model to\n * continuously change during the digest.\n *\n * Increasing the TTL could have performance implications, so you should not change it without\n * proper justification.\n *\n * @param {number} limit The number of digest iterations.\n */\n\n\n/**\n * @ngdoc service\n * @name $rootScope\n * @description\n *\n * Every application has a single root {@link ng.$rootScope.Scope scope}.\n * All other scopes are descendant scopes of the root scope. Scopes provide separation\n * between the model and the view, via a mechanism for watching the model for changes.\n * They also provide event emission/broadcast and subscription facility. See the\n * {@link guide/scope developer guide on scopes}.\n */\nfunction $RootScopeProvider() {\n  var TTL = 10;\n  var $rootScopeMinErr = minErr('$rootScope');\n  var lastDirtyWatch = null;\n  var applyAsyncId = null;\n\n  this.digestTtl = function(value) {\n    if (arguments.length) {\n      TTL = value;\n    }\n    return TTL;\n  };\n\n  function createChildScopeClass(parent) {\n    function ChildScope() {\n      this.$$watchers = this.$$nextSibling =\n          this.$$childHead = this.$$childTail = null;\n      this.$$listeners = {};\n      this.$$listenerCount = {};\n      this.$$watchersCount = 0;\n      this.$id = nextUid();\n      this.$$ChildScope = null;\n    }\n    ChildScope.prototype = parent;\n    return ChildScope;\n  }\n\n  this.$get = ['$exceptionHandler', '$parse', '$browser',\n      function($exceptionHandler, $parse, $browser) {\n\n    function destroyChildScope($event) {\n        $event.currentScope.$$destroyed = true;\n    }\n\n    function cleanUpScope($scope) {\n\n      if (msie === 9) {\n        // There is a memory leak in IE9 if all child scopes are not disconnected\n        // completely when a scope is destroyed. So this code will recurse up through\n        // all this scopes children\n        //\n        // See issue https://github.com/angular/angular.js/issues/10706\n        $scope.$$childHead && cleanUpScope($scope.$$childHead);\n        $scope.$$nextSibling && cleanUpScope($scope.$$nextSibling);\n      }\n\n      // The code below works around IE9 and V8's memory leaks\n      //\n      // See:\n      // - https://code.google.com/p/v8/issues/detail?id=2073#c26\n      // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909\n      // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451\n\n      $scope.$parent = $scope.$$nextSibling = $scope.$$prevSibling = $scope.$$childHead =\n          $scope.$$childTail = $scope.$root = $scope.$$watchers = null;\n    }\n\n    /**\n     * @ngdoc type\n     * @name $rootScope.Scope\n     *\n     * @description\n     * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the\n     * {@link auto.$injector $injector}. Child scopes are created using the\n     * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when\n     * compiled HTML template is executed.) See also the {@link guide/scope Scopes guide} for\n     * an in-depth introduction and usage examples.\n     *\n     *\n     * # Inheritance\n     * A scope can inherit from a parent scope, as in this example:\n     * ```js\n         var parent = $rootScope;\n         var child = parent.$new();\n\n         parent.salutation = \"Hello\";\n         expect(child.salutation).toEqual('Hello');\n\n         child.salutation = \"Welcome\";\n         expect(child.salutation).toEqual('Welcome');\n         expect(parent.salutation).toEqual('Hello');\n     * ```\n     *\n     * When interacting with `Scope` in tests, additional helper methods are available on the\n     * instances of `Scope` type. See {@link ngMock.$rootScope.Scope ngMock Scope} for additional\n     * details.\n     *\n     *\n     * @param {Object.<string, function()>=} providers Map of service factory which need to be\n     *                                       provided for the current scope. Defaults to {@link ng}.\n     * @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should\n     *                              append/override services provided by `providers`. This is handy\n     *                              when unit-testing and having the need to override a default\n     *                              service.\n     * @returns {Object} Newly created scope.\n     *\n     */\n    function Scope() {\n      this.$id = nextUid();\n      this.$$phase = this.$parent = this.$$watchers =\n                     this.$$nextSibling = this.$$prevSibling =\n                     this.$$childHead = this.$$childTail = null;\n      this.$root = this;\n      this.$$destroyed = false;\n      this.$$listeners = {};\n      this.$$listenerCount = {};\n      this.$$watchersCount = 0;\n      this.$$isolateBindings = null;\n    }\n\n    /**\n     * @ngdoc property\n     * @name $rootScope.Scope#$id\n     *\n     * @description\n     * Unique scope ID (monotonically increasing) useful for debugging.\n     */\n\n     /**\n      * @ngdoc property\n      * @name $rootScope.Scope#$parent\n      *\n      * @description\n      * Reference to the parent scope.\n      */\n\n      /**\n       * @ngdoc property\n       * @name $rootScope.Scope#$root\n       *\n       * @description\n       * Reference to the root scope.\n       */\n\n    Scope.prototype = {\n      constructor: Scope,\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$new\n       * @kind function\n       *\n       * @description\n       * Creates a new child {@link ng.$rootScope.Scope scope}.\n       *\n       * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.\n       * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.\n       *\n       * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is\n       * desired for the scope and its child scopes to be permanently detached from the parent and\n       * thus stop participating in model change detection and listener notification by invoking.\n       *\n       * @param {boolean} isolate If true, then the scope does not prototypically inherit from the\n       *         parent scope. The scope is isolated, as it can not see parent scope properties.\n       *         When creating widgets, it is useful for the widget to not accidentally read parent\n       *         state.\n       *\n       * @param {Scope} [parent=this] The {@link ng.$rootScope.Scope `Scope`} that will be the `$parent`\n       *                              of the newly created scope. Defaults to `this` scope if not provided.\n       *                              This is used when creating a transclude scope to correctly place it\n       *                              in the scope hierarchy while maintaining the correct prototypical\n       *                              inheritance.\n       *\n       * @returns {Object} The newly created child scope.\n       *\n       */\n      $new: function(isolate, parent) {\n        var child;\n\n        parent = parent || this;\n\n        if (isolate) {\n          child = new Scope();\n          child.$root = this.$root;\n        } else {\n          // Only create a child scope class if somebody asks for one,\n          // but cache it to allow the VM to optimize lookups.\n          if (!this.$$ChildScope) {\n            this.$$ChildScope = createChildScopeClass(this);\n          }\n          child = new this.$$ChildScope();\n        }\n        child.$parent = parent;\n        child.$$prevSibling = parent.$$childTail;\n        if (parent.$$childHead) {\n          parent.$$childTail.$$nextSibling = child;\n          parent.$$childTail = child;\n        } else {\n          parent.$$childHead = parent.$$childTail = child;\n        }\n\n        // When the new scope is not isolated or we inherit from `this`, and\n        // the parent scope is destroyed, the property `$$destroyed` is inherited\n        // prototypically. In all other cases, this property needs to be set\n        // when the parent scope is destroyed.\n        // The listener needs to be added after the parent is set\n        if (isolate || parent != this) child.$on('$destroy', destroyChildScope);\n\n        return child;\n      },\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$watch\n       * @kind function\n       *\n       * @description\n       * Registers a `listener` callback to be executed whenever the `watchExpression` changes.\n       *\n       * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest\n       *   $digest()} and should return the value that will be watched. (`watchExpression` should not change\n       *   its value when executed multiple times with the same input because it may be executed multiple\n       *   times by {@link ng.$rootScope.Scope#$digest $digest()}. That is, `watchExpression` should be\n       *   [idempotent](http://en.wikipedia.org/wiki/Idempotence).\n       * - The `listener` is called only when the value from the current `watchExpression` and the\n       *   previous call to `watchExpression` are not equal (with the exception of the initial run,\n       *   see below). Inequality is determined according to reference inequality,\n       *   [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)\n       *    via the `!==` Javascript operator, unless `objectEquality == true`\n       *   (see next point)\n       * - When `objectEquality == true`, inequality of the `watchExpression` is determined\n       *   according to the {@link angular.equals} function. To save the value of the object for\n       *   later comparison, the {@link angular.copy} function is used. This therefore means that\n       *   watching complex objects will have adverse memory and performance implications.\n       * - The watch `listener` may change the model, which may trigger other `listener`s to fire.\n       *   This is achieved by rerunning the watchers until no changes are detected. The rerun\n       *   iteration limit is 10 to prevent an infinite loop deadlock.\n       *\n       *\n       * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,\n       * you can register a `watchExpression` function with no `listener`. (Be prepared for\n       * multiple calls to your `watchExpression` because it will execute multiple times in a\n       * single {@link ng.$rootScope.Scope#$digest $digest} cycle if a change is detected.)\n       *\n       * After a watcher is registered with the scope, the `listener` fn is called asynchronously\n       * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the\n       * watcher. In rare cases, this is undesirable because the listener is called when the result\n       * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you\n       * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the\n       * listener was called due to initialization.\n       *\n       *\n       *\n       * # Example\n       * ```js\n           // let's assume that scope was dependency injected as the $rootScope\n           var scope = $rootScope;\n           scope.name = 'misko';\n           scope.counter = 0;\n\n           expect(scope.counter).toEqual(0);\n           scope.$watch('name', function(newValue, oldValue) {\n             scope.counter = scope.counter + 1;\n           });\n           expect(scope.counter).toEqual(0);\n\n           scope.$digest();\n           // the listener is always called during the first $digest loop after it was registered\n           expect(scope.counter).toEqual(1);\n\n           scope.$digest();\n           // but now it will not be called unless the value changes\n           expect(scope.counter).toEqual(1);\n\n           scope.name = 'adam';\n           scope.$digest();\n           expect(scope.counter).toEqual(2);\n\n\n\n           // Using a function as a watchExpression\n           var food;\n           scope.foodCounter = 0;\n           expect(scope.foodCounter).toEqual(0);\n           scope.$watch(\n             // This function returns the value being watched. It is called for each turn of the $digest loop\n             function() { return food; },\n             // This is the change listener, called when the value returned from the above function changes\n             function(newValue, oldValue) {\n               if ( newValue !== oldValue ) {\n                 // Only increment the counter if the value changed\n                 scope.foodCounter = scope.foodCounter + 1;\n               }\n             }\n           );\n           // No digest has been run so the counter will be zero\n           expect(scope.foodCounter).toEqual(0);\n\n           // Run the digest but since food has not changed count will still be zero\n           scope.$digest();\n           expect(scope.foodCounter).toEqual(0);\n\n           // Update food and run digest.  Now the counter will increment\n           food = 'cheeseburger';\n           scope.$digest();\n           expect(scope.foodCounter).toEqual(1);\n\n       * ```\n       *\n       *\n       *\n       * @param {(function()|string)} watchExpression Expression that is evaluated on each\n       *    {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers\n       *    a call to the `listener`.\n       *\n       *    - `string`: Evaluated as {@link guide/expression expression}\n       *    - `function(scope)`: called with current `scope` as a parameter.\n       * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value\n       *    of `watchExpression` changes.\n       *\n       *    - `newVal` contains the current value of the `watchExpression`\n       *    - `oldVal` contains the previous value of the `watchExpression`\n       *    - `scope` refers to the current scope\n       * @param {boolean=} [objectEquality=false] Compare for object equality using {@link angular.equals} instead of\n       *     comparing for reference equality.\n       * @returns {function()} Returns a deregistration function for this listener.\n       */\n      $watch: function(watchExp, listener, objectEquality, prettyPrintExpression) {\n        var get = $parse(watchExp);\n\n        if (get.$$watchDelegate) {\n          return get.$$watchDelegate(this, listener, objectEquality, get, watchExp);\n        }\n        var scope = this,\n            array = scope.$$watchers,\n            watcher = {\n              fn: listener,\n              last: initWatchVal,\n              get: get,\n              exp: prettyPrintExpression || watchExp,\n              eq: !!objectEquality\n            };\n\n        lastDirtyWatch = null;\n\n        if (!isFunction(listener)) {\n          watcher.fn = noop;\n        }\n\n        if (!array) {\n          array = scope.$$watchers = [];\n        }\n        // we use unshift since we use a while loop in $digest for speed.\n        // the while loop reads in reverse order.\n        array.unshift(watcher);\n        incrementWatchersCount(this, 1);\n\n        return function deregisterWatch() {\n          if (arrayRemove(array, watcher) >= 0) {\n            incrementWatchersCount(scope, -1);\n          }\n          lastDirtyWatch = null;\n        };\n      },\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$watchGroup\n       * @kind function\n       *\n       * @description\n       * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`.\n       * If any one expression in the collection changes the `listener` is executed.\n       *\n       * - The items in the `watchExpressions` array are observed via standard $watch operation and are examined on every\n       *   call to $digest() to see if any items changes.\n       * - The `listener` is called whenever any expression in the `watchExpressions` array changes.\n       *\n       * @param {Array.<string|Function(scope)>} watchExpressions Array of expressions that will be individually\n       * watched using {@link ng.$rootScope.Scope#$watch $watch()}\n       *\n       * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any\n       *    expression in `watchExpressions` changes\n       *    The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching\n       *    those of `watchExpression`\n       *    and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching\n       *    those of `watchExpression`\n       *    The `scope` refers to the current scope.\n       * @returns {function()} Returns a de-registration function for all listeners.\n       */\n      $watchGroup: function(watchExpressions, listener) {\n        var oldValues = new Array(watchExpressions.length);\n        var newValues = new Array(watchExpressions.length);\n        var deregisterFns = [];\n        var self = this;\n        var changeReactionScheduled = false;\n        var firstRun = true;\n\n        if (!watchExpressions.length) {\n          // No expressions means we call the listener ASAP\n          var shouldCall = true;\n          self.$evalAsync(function() {\n            if (shouldCall) listener(newValues, newValues, self);\n          });\n          return function deregisterWatchGroup() {\n            shouldCall = false;\n          };\n        }\n\n        if (watchExpressions.length === 1) {\n          // Special case size of one\n          return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) {\n            newValues[0] = value;\n            oldValues[0] = oldValue;\n            listener(newValues, (value === oldValue) ? newValues : oldValues, scope);\n          });\n        }\n\n        forEach(watchExpressions, function(expr, i) {\n          var unwatchFn = self.$watch(expr, function watchGroupSubAction(value, oldValue) {\n            newValues[i] = value;\n            oldValues[i] = oldValue;\n            if (!changeReactionScheduled) {\n              changeReactionScheduled = true;\n              self.$evalAsync(watchGroupAction);\n            }\n          });\n          deregisterFns.push(unwatchFn);\n        });\n\n        function watchGroupAction() {\n          changeReactionScheduled = false;\n\n          if (firstRun) {\n            firstRun = false;\n            listener(newValues, newValues, self);\n          } else {\n            listener(newValues, oldValues, self);\n          }\n        }\n\n        return function deregisterWatchGroup() {\n          while (deregisterFns.length) {\n            deregisterFns.shift()();\n          }\n        };\n      },\n\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$watchCollection\n       * @kind function\n       *\n       * @description\n       * Shallow watches the properties of an object and fires whenever any of the properties change\n       * (for arrays, this implies watching the array items; for object maps, this implies watching\n       * the properties). If a change is detected, the `listener` callback is fired.\n       *\n       * - The `obj` collection is observed via standard $watch operation and is examined on every\n       *   call to $digest() to see if any items have been added, removed, or moved.\n       * - The `listener` is called whenever anything within the `obj` has changed. Examples include\n       *   adding, removing, and moving items belonging to an object or array.\n       *\n       *\n       * # Example\n       * ```js\n          $scope.names = ['igor', 'matias', 'misko', 'james'];\n          $scope.dataCount = 4;\n\n          $scope.$watchCollection('names', function(newNames, oldNames) {\n            $scope.dataCount = newNames.length;\n          });\n\n          expect($scope.dataCount).toEqual(4);\n          $scope.$digest();\n\n          //still at 4 ... no changes\n          expect($scope.dataCount).toEqual(4);\n\n          $scope.names.pop();\n          $scope.$digest();\n\n          //now there's been a change\n          expect($scope.dataCount).toEqual(3);\n       * ```\n       *\n       *\n       * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The\n       *    expression value should evaluate to an object or an array which is observed on each\n       *    {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the\n       *    collection will trigger a call to the `listener`.\n       *\n       * @param {function(newCollection, oldCollection, scope)} listener a callback function called\n       *    when a change is detected.\n       *    - The `newCollection` object is the newly modified data obtained from the `obj` expression\n       *    - The `oldCollection` object is a copy of the former collection data.\n       *      Due to performance considerations, the`oldCollection` value is computed only if the\n       *      `listener` function declares two or more arguments.\n       *    - The `scope` argument refers to the current scope.\n       *\n       * @returns {function()} Returns a de-registration function for this listener. When the\n       *    de-registration function is executed, the internal watch operation is terminated.\n       */\n      $watchCollection: function(obj, listener) {\n        $watchCollectionInterceptor.$stateful = true;\n\n        var self = this;\n        // the current value, updated on each dirty-check run\n        var newValue;\n        // a shallow copy of the newValue from the last dirty-check run,\n        // updated to match newValue during dirty-check run\n        var oldValue;\n        // a shallow copy of the newValue from when the last change happened\n        var veryOldValue;\n        // only track veryOldValue if the listener is asking for it\n        var trackVeryOldValue = (listener.length > 1);\n        var changeDetected = 0;\n        var changeDetector = $parse(obj, $watchCollectionInterceptor);\n        var internalArray = [];\n        var internalObject = {};\n        var initRun = true;\n        var oldLength = 0;\n\n        function $watchCollectionInterceptor(_value) {\n          newValue = _value;\n          var newLength, key, bothNaN, newItem, oldItem;\n\n          // If the new value is undefined, then return undefined as the watch may be a one-time watch\n          if (isUndefined(newValue)) return;\n\n          if (!isObject(newValue)) { // if primitive\n            if (oldValue !== newValue) {\n              oldValue = newValue;\n              changeDetected++;\n            }\n          } else if (isArrayLike(newValue)) {\n            if (oldValue !== internalArray) {\n              // we are transitioning from something which was not an array into array.\n              oldValue = internalArray;\n              oldLength = oldValue.length = 0;\n              changeDetected++;\n            }\n\n            newLength = newValue.length;\n\n            if (oldLength !== newLength) {\n              // if lengths do not match we need to trigger change notification\n              changeDetected++;\n              oldValue.length = oldLength = newLength;\n            }\n            // copy the items to oldValue and look for changes.\n            for (var i = 0; i < newLength; i++) {\n              oldItem = oldValue[i];\n              newItem = newValue[i];\n\n              bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n              if (!bothNaN && (oldItem !== newItem)) {\n                changeDetected++;\n                oldValue[i] = newItem;\n              }\n            }\n          } else {\n            if (oldValue !== internalObject) {\n              // we are transitioning from something which was not an object into object.\n              oldValue = internalObject = {};\n              oldLength = 0;\n              changeDetected++;\n            }\n            // copy the items to oldValue and look for changes.\n            newLength = 0;\n            for (key in newValue) {\n              if (hasOwnProperty.call(newValue, key)) {\n                newLength++;\n                newItem = newValue[key];\n                oldItem = oldValue[key];\n\n                if (key in oldValue) {\n                  bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n                  if (!bothNaN && (oldItem !== newItem)) {\n                    changeDetected++;\n                    oldValue[key] = newItem;\n                  }\n                } else {\n                  oldLength++;\n                  oldValue[key] = newItem;\n                  changeDetected++;\n                }\n              }\n            }\n            if (oldLength > newLength) {\n              // we used to have more keys, need to find them and destroy them.\n              changeDetected++;\n              for (key in oldValue) {\n                if (!hasOwnProperty.call(newValue, key)) {\n                  oldLength--;\n                  delete oldValue[key];\n                }\n              }\n            }\n          }\n          return changeDetected;\n        }\n\n        function $watchCollectionAction() {\n          if (initRun) {\n            initRun = false;\n            listener(newValue, newValue, self);\n          } else {\n            listener(newValue, veryOldValue, self);\n          }\n\n          // make a copy for the next time a collection is changed\n          if (trackVeryOldValue) {\n            if (!isObject(newValue)) {\n              //primitive\n              veryOldValue = newValue;\n            } else if (isArrayLike(newValue)) {\n              veryOldValue = new Array(newValue.length);\n              for (var i = 0; i < newValue.length; i++) {\n                veryOldValue[i] = newValue[i];\n              }\n            } else { // if object\n              veryOldValue = {};\n              for (var key in newValue) {\n                if (hasOwnProperty.call(newValue, key)) {\n                  veryOldValue[key] = newValue[key];\n                }\n              }\n            }\n          }\n        }\n\n        return this.$watch(changeDetector, $watchCollectionAction);\n      },\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$digest\n       * @kind function\n       *\n       * @description\n       * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and\n       * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change\n       * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}\n       * until no more listeners are firing. This means that it is possible to get into an infinite\n       * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of\n       * iterations exceeds 10.\n       *\n       * Usually, you don't call `$digest()` directly in\n       * {@link ng.directive:ngController controllers} or in\n       * {@link ng.$compileProvider#directive directives}.\n       * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within\n       * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`.\n       *\n       * If you want to be notified whenever `$digest()` is called,\n       * you can register a `watchExpression` function with\n       * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.\n       *\n       * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.\n       *\n       * # Example\n       * ```js\n           var scope = ...;\n           scope.name = 'misko';\n           scope.counter = 0;\n\n           expect(scope.counter).toEqual(0);\n           scope.$watch('name', function(newValue, oldValue) {\n             scope.counter = scope.counter + 1;\n           });\n           expect(scope.counter).toEqual(0);\n\n           scope.$digest();\n           // the listener is always called during the first $digest loop after it was registered\n           expect(scope.counter).toEqual(1);\n\n           scope.$digest();\n           // but now it will not be called unless the value changes\n           expect(scope.counter).toEqual(1);\n\n           scope.name = 'adam';\n           scope.$digest();\n           expect(scope.counter).toEqual(2);\n       * ```\n       *\n       */\n      $digest: function() {\n        var watch, value, last, fn, get,\n            watchers,\n            length,\n            dirty, ttl = TTL,\n            next, current, target = this,\n            watchLog = [],\n            logIdx, asyncTask;\n\n        beginPhase('$digest');\n        // Check for changes to browser url that happened in sync before the call to $digest\n        $browser.$$checkUrlChange();\n\n        if (this === $rootScope && applyAsyncId !== null) {\n          // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then\n          // cancel the scheduled $apply and flush the queue of expressions to be evaluated.\n          $browser.defer.cancel(applyAsyncId);\n          flushApplyAsync();\n        }\n\n        lastDirtyWatch = null;\n\n        do { // \"while dirty\" loop\n          dirty = false;\n          current = target;\n\n          while (asyncQueue.length) {\n            try {\n              asyncTask = asyncQueue.shift();\n              asyncTask.scope.$eval(asyncTask.expression, asyncTask.locals);\n            } catch (e) {\n              $exceptionHandler(e);\n            }\n            lastDirtyWatch = null;\n          }\n\n          traverseScopesLoop:\n          do { // \"traverse the scopes\" loop\n            if ((watchers = current.$$watchers)) {\n              // process our watches\n              length = watchers.length;\n              while (length--) {\n                try {\n                  watch = watchers[length];\n                  // Most common watches are on primitives, in which case we can short\n                  // circuit it with === operator, only when === fails do we use .equals\n                  if (watch) {\n                    get = watch.get;\n                    if ((value = get(current)) !== (last = watch.last) &&\n                        !(watch.eq\n                            ? equals(value, last)\n                            : (typeof value === 'number' && typeof last === 'number'\n                               && isNaN(value) && isNaN(last)))) {\n                      dirty = true;\n                      lastDirtyWatch = watch;\n                      watch.last = watch.eq ? copy(value, null) : value;\n                      fn = watch.fn;\n                      fn(value, ((last === initWatchVal) ? value : last), current);\n                      if (ttl < 5) {\n                        logIdx = 4 - ttl;\n                        if (!watchLog[logIdx]) watchLog[logIdx] = [];\n                        watchLog[logIdx].push({\n                          msg: isFunction(watch.exp) ? 'fn: ' + (watch.exp.name || watch.exp.toString()) : watch.exp,\n                          newVal: value,\n                          oldVal: last\n                        });\n                      }\n                    } else if (watch === lastDirtyWatch) {\n                      // If the most recently dirty watcher is now clean, short circuit since the remaining watchers\n                      // have already been tested.\n                      dirty = false;\n                      break traverseScopesLoop;\n                    }\n                  }\n                } catch (e) {\n                  $exceptionHandler(e);\n                }\n              }\n            }\n\n            // Insanity Warning: scope depth-first traversal\n            // yes, this code is a bit crazy, but it works and we have tests to prove it!\n            // this piece should be kept in sync with the traversal in $broadcast\n            if (!(next = ((current.$$watchersCount && current.$$childHead) ||\n                (current !== target && current.$$nextSibling)))) {\n              while (current !== target && !(next = current.$$nextSibling)) {\n                current = current.$parent;\n              }\n            }\n          } while ((current = next));\n\n          // `break traverseScopesLoop;` takes us to here\n\n          if ((dirty || asyncQueue.length) && !(ttl--)) {\n            clearPhase();\n            throw $rootScopeMinErr('infdig',\n                '{0} $digest() iterations reached. Aborting!\\n' +\n                'Watchers fired in the last 5 iterations: {1}',\n                TTL, watchLog);\n          }\n\n        } while (dirty || asyncQueue.length);\n\n        clearPhase();\n\n        while (postDigestQueue.length) {\n          try {\n            postDigestQueue.shift()();\n          } catch (e) {\n            $exceptionHandler(e);\n          }\n        }\n      },\n\n\n      /**\n       * @ngdoc event\n       * @name $rootScope.Scope#$destroy\n       * @eventType broadcast on scope being destroyed\n       *\n       * @description\n       * Broadcasted when a scope and its children are being destroyed.\n       *\n       * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n       * clean up DOM bindings before an element is removed from the DOM.\n       */\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$destroy\n       * @kind function\n       *\n       * @description\n       * Removes the current scope (and all of its children) from the parent scope. Removal implies\n       * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer\n       * propagate to the current scope and its children. Removal also implies that the current\n       * scope is eligible for garbage collection.\n       *\n       * The `$destroy()` is usually used by directives such as\n       * {@link ng.directive:ngRepeat ngRepeat} for managing the\n       * unrolling of the loop.\n       *\n       * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.\n       * Application code can register a `$destroy` event handler that will give it a chance to\n       * perform any necessary cleanup.\n       *\n       * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n       * clean up DOM bindings before an element is removed from the DOM.\n       */\n      $destroy: function() {\n        // We can't destroy a scope that has been already destroyed.\n        if (this.$$destroyed) return;\n        var parent = this.$parent;\n\n        this.$broadcast('$destroy');\n        this.$$destroyed = true;\n\n        if (this === $rootScope) {\n          //Remove handlers attached to window when $rootScope is removed\n          $browser.$$applicationDestroyed();\n        }\n\n        incrementWatchersCount(this, -this.$$watchersCount);\n        for (var eventName in this.$$listenerCount) {\n          decrementListenerCount(this, this.$$listenerCount[eventName], eventName);\n        }\n\n        // sever all the references to parent scopes (after this cleanup, the current scope should\n        // not be retained by any of our references and should be eligible for garbage collection)\n        if (parent && parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;\n        if (parent && parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;\n        if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;\n        if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;\n\n        // Disable listeners, watchers and apply/digest methods\n        this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = noop;\n        this.$on = this.$watch = this.$watchGroup = function() { return noop; };\n        this.$$listeners = {};\n\n        // Disconnect the next sibling to prevent `cleanUpScope` destroying those too\n        this.$$nextSibling = null;\n        cleanUpScope(this);\n      },\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$eval\n       * @kind function\n       *\n       * @description\n       * Executes the `expression` on the current scope and returns the result. Any exceptions in\n       * the expression are propagated (uncaught). This is useful when evaluating Angular\n       * expressions.\n       *\n       * # Example\n       * ```js\n           var scope = ng.$rootScope.Scope();\n           scope.a = 1;\n           scope.b = 2;\n\n           expect(scope.$eval('a+b')).toEqual(3);\n           expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);\n       * ```\n       *\n       * @param {(string|function())=} expression An angular expression to be executed.\n       *\n       *    - `string`: execute using the rules as defined in  {@link guide/expression expression}.\n       *    - `function(scope)`: execute the function with the current `scope` parameter.\n       *\n       * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n       * @returns {*} The result of evaluating the expression.\n       */\n      $eval: function(expr, locals) {\n        return $parse(expr)(this, locals);\n      },\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$evalAsync\n       * @kind function\n       *\n       * @description\n       * Executes the expression on the current scope at a later point in time.\n       *\n       * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only\n       * that:\n       *\n       *   - it will execute after the function that scheduled the evaluation (preferably before DOM\n       *     rendering).\n       *   - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after\n       *     `expression` execution.\n       *\n       * Any exceptions from the execution of the expression are forwarded to the\n       * {@link ng.$exceptionHandler $exceptionHandler} service.\n       *\n       * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle\n       * will be scheduled. However, it is encouraged to always call code that changes the model\n       * from within an `$apply` call. That includes code evaluated via `$evalAsync`.\n       *\n       * @param {(string|function())=} expression An angular expression to be executed.\n       *\n       *    - `string`: execute using the rules as defined in {@link guide/expression expression}.\n       *    - `function(scope)`: execute the function with the current `scope` parameter.\n       *\n       * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n       */\n      $evalAsync: function(expr, locals) {\n        // if we are outside of an $digest loop and this is the first time we are scheduling async\n        // task also schedule async auto-flush\n        if (!$rootScope.$$phase && !asyncQueue.length) {\n          $browser.defer(function() {\n            if (asyncQueue.length) {\n              $rootScope.$digest();\n            }\n          });\n        }\n\n        asyncQueue.push({scope: this, expression: $parse(expr), locals: locals});\n      },\n\n      $$postDigest: function(fn) {\n        postDigestQueue.push(fn);\n      },\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$apply\n       * @kind function\n       *\n       * @description\n       * `$apply()` is used to execute an expression in angular from outside of the angular\n       * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).\n       * Because we are calling into the angular framework we need to perform proper scope life\n       * cycle of {@link ng.$exceptionHandler exception handling},\n       * {@link ng.$rootScope.Scope#$digest executing watches}.\n       *\n       * ## Life cycle\n       *\n       * # Pseudo-Code of `$apply()`\n       * ```js\n           function $apply(expr) {\n             try {\n               return $eval(expr);\n             } catch (e) {\n               $exceptionHandler(e);\n             } finally {\n               $root.$digest();\n             }\n           }\n       * ```\n       *\n       *\n       * Scope's `$apply()` method transitions through the following stages:\n       *\n       * 1. The {@link guide/expression expression} is executed using the\n       *    {@link ng.$rootScope.Scope#$eval $eval()} method.\n       * 2. Any exceptions from the execution of the expression are forwarded to the\n       *    {@link ng.$exceptionHandler $exceptionHandler} service.\n       * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the\n       *    expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.\n       *\n       *\n       * @param {(string|function())=} exp An angular expression to be executed.\n       *\n       *    - `string`: execute using the rules as defined in {@link guide/expression expression}.\n       *    - `function(scope)`: execute the function with current `scope` parameter.\n       *\n       * @returns {*} The result of evaluating the expression.\n       */\n      $apply: function(expr) {\n        try {\n          beginPhase('$apply');\n          try {\n            return this.$eval(expr);\n          } finally {\n            clearPhase();\n          }\n        } catch (e) {\n          $exceptionHandler(e);\n        } finally {\n          try {\n            $rootScope.$digest();\n          } catch (e) {\n            $exceptionHandler(e);\n            throw e;\n          }\n        }\n      },\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$applyAsync\n       * @kind function\n       *\n       * @description\n       * Schedule the invocation of $apply to occur at a later time. The actual time difference\n       * varies across browsers, but is typically around ~10 milliseconds.\n       *\n       * This can be used to queue up multiple expressions which need to be evaluated in the same\n       * digest.\n       *\n       * @param {(string|function())=} exp An angular expression to be executed.\n       *\n       *    - `string`: execute using the rules as defined in {@link guide/expression expression}.\n       *    - `function(scope)`: execute the function with current `scope` parameter.\n       */\n      $applyAsync: function(expr) {\n        var scope = this;\n        expr && applyAsyncQueue.push($applyAsyncExpression);\n        expr = $parse(expr);\n        scheduleApplyAsync();\n\n        function $applyAsyncExpression() {\n          scope.$eval(expr);\n        }\n      },\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$on\n       * @kind function\n       *\n       * @description\n       * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for\n       * discussion of event life cycle.\n       *\n       * The event listener function format is: `function(event, args...)`. The `event` object\n       * passed into the listener has the following attributes:\n       *\n       *   - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or\n       *     `$broadcast`-ed.\n       *   - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the\n       *     event propagates through the scope hierarchy, this property is set to null.\n       *   - `name` - `{string}`: name of the event.\n       *   - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel\n       *     further event propagation (available only for events that were `$emit`-ed).\n       *   - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag\n       *     to true.\n       *   - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.\n       *\n       * @param {string} name Event name to listen on.\n       * @param {function(event, ...args)} listener Function to call when the event is emitted.\n       * @returns {function()} Returns a deregistration function for this listener.\n       */\n      $on: function(name, listener) {\n        var namedListeners = this.$$listeners[name];\n        if (!namedListeners) {\n          this.$$listeners[name] = namedListeners = [];\n        }\n        namedListeners.push(listener);\n\n        var current = this;\n        do {\n          if (!current.$$listenerCount[name]) {\n            current.$$listenerCount[name] = 0;\n          }\n          current.$$listenerCount[name]++;\n        } while ((current = current.$parent));\n\n        var self = this;\n        return function() {\n          var indexOfListener = namedListeners.indexOf(listener);\n          if (indexOfListener !== -1) {\n            namedListeners[indexOfListener] = null;\n            decrementListenerCount(self, 1, name);\n          }\n        };\n      },\n\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$emit\n       * @kind function\n       *\n       * @description\n       * Dispatches an event `name` upwards through the scope hierarchy notifying the\n       * registered {@link ng.$rootScope.Scope#$on} listeners.\n       *\n       * The event life cycle starts at the scope on which `$emit` was called. All\n       * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n       * notified. Afterwards, the event traverses upwards toward the root scope and calls all\n       * registered listeners along the way. The event will stop propagating if one of the listeners\n       * cancels it.\n       *\n       * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n       * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n       *\n       * @param {string} name Event name to emit.\n       * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n       * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).\n       */\n      $emit: function(name, args) {\n        var empty = [],\n            namedListeners,\n            scope = this,\n            stopPropagation = false,\n            event = {\n              name: name,\n              targetScope: scope,\n              stopPropagation: function() {stopPropagation = true;},\n              preventDefault: function() {\n                event.defaultPrevented = true;\n              },\n              defaultPrevented: false\n            },\n            listenerArgs = concat([event], arguments, 1),\n            i, length;\n\n        do {\n          namedListeners = scope.$$listeners[name] || empty;\n          event.currentScope = scope;\n          for (i = 0, length = namedListeners.length; i < length; i++) {\n\n            // if listeners were deregistered, defragment the array\n            if (!namedListeners[i]) {\n              namedListeners.splice(i, 1);\n              i--;\n              length--;\n              continue;\n            }\n            try {\n              //allow all listeners attached to the current scope to run\n              namedListeners[i].apply(null, listenerArgs);\n            } catch (e) {\n              $exceptionHandler(e);\n            }\n          }\n          //if any listener on the current scope stops propagation, prevent bubbling\n          if (stopPropagation) {\n            event.currentScope = null;\n            return event;\n          }\n          //traverse upwards\n          scope = scope.$parent;\n        } while (scope);\n\n        event.currentScope = null;\n\n        return event;\n      },\n\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$broadcast\n       * @kind function\n       *\n       * @description\n       * Dispatches an event `name` downwards to all child scopes (and their children) notifying the\n       * registered {@link ng.$rootScope.Scope#$on} listeners.\n       *\n       * The event life cycle starts at the scope on which `$broadcast` was called. All\n       * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n       * notified. Afterwards, the event propagates to all direct and indirect scopes of the current\n       * scope and calls all registered listeners along the way. The event cannot be canceled.\n       *\n       * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n       * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n       *\n       * @param {string} name Event name to broadcast.\n       * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n       * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}\n       */\n      $broadcast: function(name, args) {\n        var target = this,\n            current = target,\n            next = target,\n            event = {\n              name: name,\n              targetScope: target,\n              preventDefault: function() {\n                event.defaultPrevented = true;\n              },\n              defaultPrevented: false\n            };\n\n        if (!target.$$listenerCount[name]) return event;\n\n        var listenerArgs = concat([event], arguments, 1),\n            listeners, i, length;\n\n        //down while you can, then up and next sibling or up and next sibling until back at root\n        while ((current = next)) {\n          event.currentScope = current;\n          listeners = current.$$listeners[name] || [];\n          for (i = 0, length = listeners.length; i < length; i++) {\n            // if listeners were deregistered, defragment the array\n            if (!listeners[i]) {\n              listeners.splice(i, 1);\n              i--;\n              length--;\n              continue;\n            }\n\n            try {\n              listeners[i].apply(null, listenerArgs);\n            } catch (e) {\n              $exceptionHandler(e);\n            }\n          }\n\n          // Insanity Warning: scope depth-first traversal\n          // yes, this code is a bit crazy, but it works and we have tests to prove it!\n          // this piece should be kept in sync with the traversal in $digest\n          // (though it differs due to having the extra check for $$listenerCount)\n          if (!(next = ((current.$$listenerCount[name] && current.$$childHead) ||\n              (current !== target && current.$$nextSibling)))) {\n            while (current !== target && !(next = current.$$nextSibling)) {\n              current = current.$parent;\n            }\n          }\n        }\n\n        event.currentScope = null;\n        return event;\n      }\n    };\n\n    var $rootScope = new Scope();\n\n    //The internal queues. Expose them on the $rootScope for debugging/testing purposes.\n    var asyncQueue = $rootScope.$$asyncQueue = [];\n    var postDigestQueue = $rootScope.$$postDigestQueue = [];\n    var applyAsyncQueue = $rootScope.$$applyAsyncQueue = [];\n\n    return $rootScope;\n\n\n    function beginPhase(phase) {\n      if ($rootScope.$$phase) {\n        throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase);\n      }\n\n      $rootScope.$$phase = phase;\n    }\n\n    function clearPhase() {\n      $rootScope.$$phase = null;\n    }\n\n    function incrementWatchersCount(current, count) {\n      do {\n        current.$$watchersCount += count;\n      } while ((current = current.$parent));\n    }\n\n    function decrementListenerCount(current, count, name) {\n      do {\n        current.$$listenerCount[name] -= count;\n\n        if (current.$$listenerCount[name] === 0) {\n          delete current.$$listenerCount[name];\n        }\n      } while ((current = current.$parent));\n    }\n\n    /**\n     * function used as an initial value for watchers.\n     * because it's unique we can easily tell it apart from other values\n     */\n    function initWatchVal() {}\n\n    function flushApplyAsync() {\n      while (applyAsyncQueue.length) {\n        try {\n          applyAsyncQueue.shift()();\n        } catch (e) {\n          $exceptionHandler(e);\n        }\n      }\n      applyAsyncId = null;\n    }\n\n    function scheduleApplyAsync() {\n      if (applyAsyncId === null) {\n        applyAsyncId = $browser.defer(function() {\n          $rootScope.$apply(flushApplyAsync);\n        });\n      }\n    }\n  }];\n}\n\n/**\n * @ngdoc service\n * @name $rootElement\n *\n * @description\n * The root element of Angular application. This is either the element where {@link\n * ng.directive:ngApp ngApp} was declared or the element passed into\n * {@link angular.bootstrap}. The element represents the root element of application. It is also the\n * location where the application's {@link auto.$injector $injector} service gets\n * published, and can be retrieved using `$rootElement.injector()`.\n */\n\n\n// the implementation is in angular.bootstrap\n\n/**\n * @description\n * Private service to sanitize uris for links and images. Used by $compile and $sanitize.\n */\nfunction $$SanitizeUriProvider() {\n  var aHrefSanitizationWhitelist = /^\\s*(https?|ftp|mailto|tel|file):/,\n    imgSrcSanitizationWhitelist = /^\\s*((https?|ftp|file|blob):|data:image\\/)/;\n\n  /**\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during a[href] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.aHrefSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      aHrefSanitizationWhitelist = regexp;\n      return this;\n    }\n    return aHrefSanitizationWhitelist;\n  };\n\n\n  /**\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during img[src] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.imgSrcSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      imgSrcSanitizationWhitelist = regexp;\n      return this;\n    }\n    return imgSrcSanitizationWhitelist;\n  };\n\n  this.$get = function() {\n    return function sanitizeUri(uri, isImage) {\n      var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist;\n      var normalizedVal;\n      normalizedVal = urlResolve(uri).href;\n      if (normalizedVal !== '' && !normalizedVal.match(regex)) {\n        return 'unsafe:' + normalizedVal;\n      }\n      return uri;\n    };\n  };\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n *     Any commits to this file should be reviewed with security in mind.  *\n *   Changes to this file can potentially create security vulnerabilities. *\n *          An approval from 2 Core members with history of modifying      *\n *                         this file is required.                          *\n *                                                                         *\n *  Does the change somehow allow for arbitrary javascript to be executed? *\n *    Or allows for someone to change the prototype of built-in objects?   *\n *     Or gives undesired access to variables likes document or window?    *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\nvar $sceMinErr = minErr('$sce');\n\nvar SCE_CONTEXTS = {\n  HTML: 'html',\n  CSS: 'css',\n  URL: 'url',\n  // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a\n  // url.  (e.g. ng-include, script src, templateUrl)\n  RESOURCE_URL: 'resourceUrl',\n  JS: 'js'\n};\n\n// Helper functions follow.\n\nfunction adjustMatcher(matcher) {\n  if (matcher === 'self') {\n    return matcher;\n  } else if (isString(matcher)) {\n    // Strings match exactly except for 2 wildcards - '*' and '**'.\n    // '*' matches any character except those from the set ':/.?&'.\n    // '**' matches any character (like .* in a RegExp).\n    // More than 2 *'s raises an error as it's ill defined.\n    if (matcher.indexOf('***') > -1) {\n      throw $sceMinErr('iwcard',\n          'Illegal sequence *** in string matcher.  String: {0}', matcher);\n    }\n    matcher = escapeForRegexp(matcher).\n                  replace('\\\\*\\\\*', '.*').\n                  replace('\\\\*', '[^:/.?&;]*');\n    return new RegExp('^' + matcher + '$');\n  } else if (isRegExp(matcher)) {\n    // The only other type of matcher allowed is a Regexp.\n    // Match entire URL / disallow partial matches.\n    // Flags are reset (i.e. no global, ignoreCase or multiline)\n    return new RegExp('^' + matcher.source + '$');\n  } else {\n    throw $sceMinErr('imatcher',\n        'Matchers may only be \"self\", string patterns or RegExp objects');\n  }\n}\n\n\nfunction adjustMatchers(matchers) {\n  var adjustedMatchers = [];\n  if (isDefined(matchers)) {\n    forEach(matchers, function(matcher) {\n      adjustedMatchers.push(adjustMatcher(matcher));\n    });\n  }\n  return adjustedMatchers;\n}\n\n\n/**\n * @ngdoc service\n * @name $sceDelegate\n * @kind function\n *\n * @description\n *\n * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict\n * Contextual Escaping (SCE)} services to AngularJS.\n *\n * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of\n * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS.  This is\n * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to\n * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things\n * work because `$sce` delegates to `$sceDelegate` for these operations.\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.\n *\n * The default instance of `$sceDelegate` should work out of the box with little pain.  While you\n * can override it completely to change the behavior of `$sce`, the common case would\n * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting\n * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as\n * templates.  Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist\n * $sceDelegateProvider.resourceUrlWhitelist} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n */\n\n/**\n * @ngdoc provider\n * @name $sceDelegateProvider\n * @description\n *\n * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate\n * $sceDelegate} service.  This allows one to get/set the whitelists and blacklists used to ensure\n * that the URLs used for sourcing Angular templates are safe.  Refer {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and\n * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n *\n * For the general details about this service in Angular, read the main page for {@link ng.$sce\n * Strict Contextual Escaping (SCE)}.\n *\n * **Example**:  Consider the following case. <a name=\"example\"></a>\n *\n * - your app is hosted at url `http://myapp.example.com/`\n * - but some of your templates are hosted on other domains you control such as\n *   `http://srv01.assets.example.com/`,  `http://srv02.assets.example.com/`, etc.\n * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.\n *\n * Here is what a secure configuration for this scenario might look like:\n *\n * ```\n *  angular.module('myApp', []).config(function($sceDelegateProvider) {\n *    $sceDelegateProvider.resourceUrlWhitelist([\n *      // Allow same origin resource loads.\n *      'self',\n *      // Allow loading from our assets domain.  Notice the difference between * and **.\n *      'http://srv*.assets.example.com/**'\n *    ]);\n *\n *    // The blacklist overrides the whitelist so the open redirect here is blocked.\n *    $sceDelegateProvider.resourceUrlBlacklist([\n *      'http://myapp.example.com/clickThru**'\n *    ]);\n *  });\n * ```\n */\n\nfunction $SceDelegateProvider() {\n  this.SCE_CONTEXTS = SCE_CONTEXTS;\n\n  // Resource URLs can also be trusted by policy.\n  var resourceUrlWhitelist = ['self'],\n      resourceUrlBlacklist = [];\n\n  /**\n   * @ngdoc method\n   * @name $sceDelegateProvider#resourceUrlWhitelist\n   * @kind function\n   *\n   * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value\n   *    provided.  This must be an array or null.  A snapshot of this array is used so further\n   *    changes to the array are ignored.\n   *\n   *    Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n   *    allowed in this array.\n   *\n   *    <div class=\"alert alert-warning\">\n   *    **Note:** an empty whitelist array will block all URLs!\n   *    </div>\n   *\n   * @return {Array} the currently set whitelist array.\n   *\n   * The **default value** when no whitelist has been explicitly set is `['self']` allowing only\n   * same origin resource requests.\n   *\n   * @description\n   * Sets/Gets the whitelist of trusted resource URLs.\n   */\n  this.resourceUrlWhitelist = function(value) {\n    if (arguments.length) {\n      resourceUrlWhitelist = adjustMatchers(value);\n    }\n    return resourceUrlWhitelist;\n  };\n\n  /**\n   * @ngdoc method\n   * @name $sceDelegateProvider#resourceUrlBlacklist\n   * @kind function\n   *\n   * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value\n   *    provided.  This must be an array or null.  A snapshot of this array is used so further\n   *    changes to the array are ignored.\n   *\n   *    Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n   *    allowed in this array.\n   *\n   *    The typical usage for the blacklist is to **block\n   *    [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as\n   *    these would otherwise be trusted but actually return content from the redirected domain.\n   *\n   *    Finally, **the blacklist overrides the whitelist** and has the final say.\n   *\n   * @return {Array} the currently set blacklist array.\n   *\n   * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there\n   * is no blacklist.)\n   *\n   * @description\n   * Sets/Gets the blacklist of trusted resource URLs.\n   */\n\n  this.resourceUrlBlacklist = function(value) {\n    if (arguments.length) {\n      resourceUrlBlacklist = adjustMatchers(value);\n    }\n    return resourceUrlBlacklist;\n  };\n\n  this.$get = ['$injector', function($injector) {\n\n    var htmlSanitizer = function htmlSanitizer(html) {\n      throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n    };\n\n    if ($injector.has('$sanitize')) {\n      htmlSanitizer = $injector.get('$sanitize');\n    }\n\n\n    function matchUrl(matcher, parsedUrl) {\n      if (matcher === 'self') {\n        return urlIsSameOrigin(parsedUrl);\n      } else {\n        // definitely a regex.  See adjustMatchers()\n        return !!matcher.exec(parsedUrl.href);\n      }\n    }\n\n    function isResourceUrlAllowedByPolicy(url) {\n      var parsedUrl = urlResolve(url.toString());\n      var i, n, allowed = false;\n      // Ensure that at least one item from the whitelist allows this url.\n      for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {\n        if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {\n          allowed = true;\n          break;\n        }\n      }\n      if (allowed) {\n        // Ensure that no item from the blacklist blocked this url.\n        for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {\n          if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {\n            allowed = false;\n            break;\n          }\n        }\n      }\n      return allowed;\n    }\n\n    function generateHolderType(Base) {\n      var holderType = function TrustedValueHolderType(trustedValue) {\n        this.$$unwrapTrustedValue = function() {\n          return trustedValue;\n        };\n      };\n      if (Base) {\n        holderType.prototype = new Base();\n      }\n      holderType.prototype.valueOf = function sceValueOf() {\n        return this.$$unwrapTrustedValue();\n      };\n      holderType.prototype.toString = function sceToString() {\n        return this.$$unwrapTrustedValue().toString();\n      };\n      return holderType;\n    }\n\n    var trustedValueHolderBase = generateHolderType(),\n        byType = {};\n\n    byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);\n\n    /**\n     * @ngdoc method\n     * @name $sceDelegate#trustAs\n     *\n     * @description\n     * Returns an object that is trusted by angular for use in specified strict\n     * contextual escaping contexts (such as ng-bind-html, ng-include, any src\n     * attribute interpolation, any dom event binding attribute interpolation\n     * such as for onclick,  etc.) that uses the provided value.\n     * See {@link ng.$sce $sce} for enabling strict contextual escaping.\n     *\n     * @param {string} type The kind of context in which this value is safe for use.  e.g. url,\n     *   resourceUrl, html, js and css.\n     * @param {*} value The value that that should be considered trusted/safe.\n     * @returns {*} A value that can be used to stand in for the provided `value` in places\n     * where Angular expects a $sce.trustAs() return value.\n     */\n    function trustAs(type, trustedValue) {\n      var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n      if (!Constructor) {\n        throw $sceMinErr('icontext',\n            'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',\n            type, trustedValue);\n      }\n      if (trustedValue === null || isUndefined(trustedValue) || trustedValue === '') {\n        return trustedValue;\n      }\n      // All the current contexts in SCE_CONTEXTS happen to be strings.  In order to avoid trusting\n      // mutable objects, we ensure here that the value passed in is actually a string.\n      if (typeof trustedValue !== 'string') {\n        throw $sceMinErr('itype',\n            'Attempted to trust a non-string value in a content requiring a string: Context: {0}',\n            type);\n      }\n      return new Constructor(trustedValue);\n    }\n\n    /**\n     * @ngdoc method\n     * @name $sceDelegate#valueOf\n     *\n     * @description\n     * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs\n     * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link\n     * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.\n     *\n     * If the passed parameter is not a value that had been returned by {@link\n     * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, returns it as-is.\n     *\n     * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}\n     *      call or anything else.\n     * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs\n     *     `$sceDelegate.trustAs`} if `value` is the result of such a call.  Otherwise, returns\n     *     `value` unchanged.\n     */\n    function valueOf(maybeTrusted) {\n      if (maybeTrusted instanceof trustedValueHolderBase) {\n        return maybeTrusted.$$unwrapTrustedValue();\n      } else {\n        return maybeTrusted;\n      }\n    }\n\n    /**\n     * @ngdoc method\n     * @name $sceDelegate#getTrusted\n     *\n     * @description\n     * Takes the result of a {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call and\n     * returns the originally supplied value if the queried context type is a supertype of the\n     * created type.  If this condition isn't satisfied, throws an exception.\n     *\n     * <div class=\"alert alert-danger\">\n     * Disabling auto-escaping is extremely dangerous, it usually creates a Cross Site Scripting\n     * (XSS) vulnerability in your application.\n     * </div>\n     *\n     * @param {string} type The kind of context in which this value is to be used.\n     * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs\n     *     `$sceDelegate.trustAs`} call.\n     * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#trustAs\n     *     `$sceDelegate.trustAs`} if valid in this context.  Otherwise, throws an exception.\n     */\n    function getTrusted(type, maybeTrusted) {\n      if (maybeTrusted === null || isUndefined(maybeTrusted) || maybeTrusted === '') {\n        return maybeTrusted;\n      }\n      var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n      if (constructor && maybeTrusted instanceof constructor) {\n        return maybeTrusted.$$unwrapTrustedValue();\n      }\n      // If we get here, then we may only take one of two actions.\n      // 1. sanitize the value for the requested type, or\n      // 2. throw an exception.\n      if (type === SCE_CONTEXTS.RESOURCE_URL) {\n        if (isResourceUrlAllowedByPolicy(maybeTrusted)) {\n          return maybeTrusted;\n        } else {\n          throw $sceMinErr('insecurl',\n              'Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}',\n              maybeTrusted.toString());\n        }\n      } else if (type === SCE_CONTEXTS.HTML) {\n        return htmlSanitizer(maybeTrusted);\n      }\n      throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n    }\n\n    return { trustAs: trustAs,\n             getTrusted: getTrusted,\n             valueOf: valueOf };\n  }];\n}\n\n\n/**\n * @ngdoc provider\n * @name $sceProvider\n * @description\n *\n * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.\n * -   enable/disable Strict Contextual Escaping (SCE) in a module\n * -   override the default implementation with a custom delegate\n *\n * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.\n */\n\n/* jshint maxlen: false*/\n\n/**\n * @ngdoc service\n * @name $sce\n * @kind function\n *\n * @description\n *\n * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.\n *\n * # Strict Contextual Escaping\n *\n * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain\n * contexts to result in a value that is marked as safe to use for that context.  One example of\n * such a context is binding arbitrary html controlled by the user via `ng-bind-html`.  We refer\n * to these contexts as privileged or SCE contexts.\n *\n * As of version 1.2, Angular ships with SCE enabled by default.\n *\n * Note:  When enabled (the default), IE<11 in quirks mode is not supported.  In this mode, IE<11 allow\n * one to execute arbitrary javascript by the use of the expression() syntax.  Refer\n * <http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx> to learn more about them.\n * You can ensure your document is in standards mode and not quirks mode by adding `<!doctype html>`\n * to the top of your HTML document.\n *\n * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for\n * security vulnerabilities such as XSS, clickjacking, etc. a lot easier.\n *\n * Here's an example of a binding in a privileged context:\n *\n * ```\n * <input ng-model=\"userHtml\" aria-label=\"User input\">\n * <div ng-bind-html=\"userHtml\"></div>\n * ```\n *\n * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user.  With SCE\n * disabled, this application allows the user to render arbitrary HTML into the DIV.\n * In a more realistic example, one may be rendering user comments, blog articles, etc. via\n * bindings.  (HTML is just one example of a context where rendering user controlled input creates\n * security vulnerabilities.)\n *\n * For the case of HTML, you might use a library, either on the client side, or on the server side,\n * to sanitize unsafe HTML before binding to the value and rendering it in the document.\n *\n * How would you ensure that every place that used these types of bindings was bound to a value that\n * was sanitized by your library (or returned as safe for rendering by your server?)  How can you\n * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some\n * properties/fields and forgot to update the binding to the sanitized value?\n *\n * To be secure by default, you want to ensure that any such bindings are disallowed unless you can\n * determine that something explicitly says it's safe to use a value for binding in that\n * context.  You can then audit your code (a simple grep would do) to ensure that this is only done\n * for those values that you can easily tell are safe - because they were received from your server,\n * sanitized by your library, etc.  You can organize your codebase to help with this - perhaps\n * allowing only the files in a specific directory to do this.  Ensuring that the internal API\n * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.\n *\n * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs}\n * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to\n * obtain values that will be accepted by SCE / privileged contexts.\n *\n *\n * ## How does it work?\n *\n * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted\n * $sce.getTrusted(context, value)} rather than to the value directly.  Directives use {@link\n * ng.$sce#parseAs $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the\n * {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals.\n *\n * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link\n * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}.  Here's the actual code (slightly\n * simplified):\n *\n * ```\n * var ngBindHtmlDirective = ['$sce', function($sce) {\n *   return function(scope, element, attr) {\n *     scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {\n *       element.html(value || '');\n *     });\n *   };\n * }];\n * ```\n *\n * ## Impact on loading templates\n *\n * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as\n * `templateUrl`'s specified by {@link guide/directive directives}.\n *\n * By default, Angular only loads templates from the same domain and protocol as the application\n * document.  This is done by calling {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on the template URL.  To load templates from other domains and/or\n * protocols, you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist\n * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value.\n *\n * *Please note*:\n * The browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy apply in addition to this and may further restrict whether the template is successfully\n * loaded.  This means that without the right CORS policy, loading templates from a different domain\n * won't work on all browsers.  Also, loading templates from `file://` URL does not work on some\n * browsers.\n *\n * ## This feels like too much overhead\n *\n * It's important to remember that SCE only applies to interpolation expressions.\n *\n * If your expressions are constant literals, they're automatically trusted and you don't need to\n * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g.\n * `<div ng-bind-html=\"'<b>implicitly trusted</b>'\"></div>`) just works.\n *\n * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them\n * through {@link ng.$sce#getTrusted $sce.getTrusted}.  SCE doesn't play a role here.\n *\n * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load\n * templates in `ng-include` from your application's domain without having to even know about SCE.\n * It blocks loading templates from other domains or loading templates over http from an https\n * served document.  You can change these by setting your own custom {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs.\n *\n * This significantly reduces the overhead.  It is far easier to pay the small overhead and have an\n * application that's secure and can be audited to verify that with much more ease than bolting\n * security onto an application later.\n *\n * <a name=\"contexts\"></a>\n * ## What trusted context types are supported?\n *\n * | Context             | Notes          |\n * |---------------------|----------------|\n * | `$sce.HTML`         | For HTML that's safe to source into the application.  The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. |\n * | `$sce.CSS`          | For CSS that's safe to source into the application.  Currently unused.  Feel free to use it in your own directives. |\n * | `$sce.URL`          | For URLs that are safe to follow as links.  Currently unused (`<a href=` and `<img src=` sanitize their urls and don't constitute an SCE context. |\n * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contents are also safe to include in your application.  Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.)  <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |\n * | `$sce.JS`           | For JavaScript that is safe to execute in your application's context.  Currently unused.  Feel free to use it in your own directives. |\n *\n * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} <a name=\"resourceUrlPatternItem\"></a>\n *\n *  Each element in these arrays must be one of the following:\n *\n *  - **'self'**\n *    - The special **string**, `'self'`, can be used to match against all URLs of the **same\n *      domain** as the application document using the **same protocol**.\n *  - **String** (except the special value `'self'`)\n *    - The string is matched against the full *normalized / absolute URL* of the resource\n *      being tested (substring matches are not good enough.)\n *    - There are exactly **two wildcard sequences** - `*` and `**`.  All other characters\n *      match themselves.\n *    - `*`: matches zero or more occurrences of any character other than one of the following 6\n *      characters: '`:`', '`/`', '`.`', '`?`', '`&`' and '`;`'.  It's a useful wildcard for use\n *      in a whitelist.\n *    - `**`: matches zero or more occurrences of *any* character.  As such, it's not\n *      appropriate for use in a scheme, domain, etc. as it would match too much.  (e.g.\n *      http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might\n *      not have been the intention.)  Its usage at the very end of the path is ok.  (e.g.\n *      http://foo.example.com/templates/**).\n *  - **RegExp** (*see caveat below*)\n *    - *Caveat*:  While regular expressions are powerful and offer great flexibility,  their syntax\n *      (and all the inevitable escaping) makes them *harder to maintain*.  It's easy to\n *      accidentally introduce a bug when one updates a complex expression (imho, all regexes should\n *      have good test coverage).  For instance, the use of `.` in the regex is correct only in a\n *      small number of cases.  A `.` character in the regex used when matching the scheme or a\n *      subdomain could be matched against a `:` or literal `.` that was likely not intended.   It\n *      is highly recommended to use the string patterns and only fall back to regular expressions\n *      as a last resort.\n *    - The regular expression must be an instance of RegExp (i.e. not a string.)  It is\n *      matched against the **entire** *normalized / absolute URL* of the resource being tested\n *      (even when the RegExp did not have the `^` and `$` codes.)  In addition, any flags\n *      present on the RegExp (such as multiline, global, ignoreCase) are ignored.\n *    - If you are generating your JavaScript from some other templating engine (not\n *      recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),\n *      remember to escape your regular expression (and be aware that you might need more than\n *      one level of escaping depending on your templating engine and the way you interpolated\n *      the value.)  Do make use of your platform's escaping mechanism as it might be good\n *      enough before coding your own.  E.g. Ruby has\n *      [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)\n *      and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).\n *      Javascript lacks a similar built in function for escaping.  Take a look at Google\n *      Closure library's [goog.string.regExpEscape(s)](\n *      http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.\n *\n * ## Show me an example using SCE.\n *\n * <example module=\"mySceApp\" deps=\"angular-sanitize.js\">\n * <file name=\"index.html\">\n *   <div ng-controller=\"AppController as myCtrl\">\n *     <i ng-bind-html=\"myCtrl.explicitlyTrustedHtml\" id=\"explicitlyTrustedHtml\"></i><br><br>\n *     <b>User comments</b><br>\n *     By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when\n *     $sanitize is available.  If $sanitize isn't available, this results in an error instead of an\n *     exploit.\n *     <div class=\"well\">\n *       <div ng-repeat=\"userComment in myCtrl.userComments\">\n *         <b>{{userComment.name}}</b>:\n *         <span ng-bind-html=\"userComment.htmlComment\" class=\"htmlComment\"></span>\n *         <br>\n *       </div>\n *     </div>\n *   </div>\n * </file>\n *\n * <file name=\"script.js\">\n *   angular.module('mySceApp', ['ngSanitize'])\n *     .controller('AppController', ['$http', '$templateCache', '$sce',\n *       function($http, $templateCache, $sce) {\n *         var self = this;\n *         $http.get(\"test_data.json\", {cache: $templateCache}).success(function(userComments) {\n *           self.userComments = userComments;\n *         });\n *         self.explicitlyTrustedHtml = $sce.trustAsHtml(\n *             '<span onmouseover=\"this.textContent=&quot;Explicitly trusted HTML bypasses ' +\n *             'sanitization.&quot;\">Hover over this text.</span>');\n *       }]);\n * </file>\n *\n * <file name=\"test_data.json\">\n * [\n *   { \"name\": \"Alice\",\n *     \"htmlComment\":\n *         \"<span onmouseover='this.textContent=\\\"PWN3D!\\\"'>Is <i>anyone</i> reading this?</span>\"\n *   },\n *   { \"name\": \"Bob\",\n *     \"htmlComment\": \"<i>Yes!</i>  Am I the only other one?\"\n *   }\n * ]\n * </file>\n *\n * <file name=\"protractor.js\" type=\"protractor\">\n *   describe('SCE doc demo', function() {\n *     it('should sanitize untrusted values', function() {\n *       expect(element.all(by.css('.htmlComment')).first().getInnerHtml())\n *           .toBe('<span>Is <i>anyone</i> reading this?</span>');\n *     });\n *\n *     it('should NOT sanitize explicitly trusted values', function() {\n *       expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(\n *           '<span onmouseover=\"this.textContent=&quot;Explicitly trusted HTML bypasses ' +\n *           'sanitization.&quot;\">Hover over this text.</span>');\n *     });\n *   });\n * </file>\n * </example>\n *\n *\n *\n * ## Can I disable SCE completely?\n *\n * Yes, you can.  However, this is strongly discouraged.  SCE gives you a lot of security benefits\n * for little coding overhead.  It will be much harder to take an SCE disabled application and\n * either secure it on your own or enable SCE at a later stage.  It might make sense to disable SCE\n * for cases where you have a lot of existing code that was written before SCE was introduced and\n * you're migrating them a module at a time.\n *\n * That said, here's how you can completely disable SCE:\n *\n * ```\n * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {\n *   // Completely disable SCE.  For demonstration purposes only!\n *   // Do not use in new projects.\n *   $sceProvider.enabled(false);\n * });\n * ```\n *\n */\n/* jshint maxlen: 100 */\n\nfunction $SceProvider() {\n  var enabled = true;\n\n  /**\n   * @ngdoc method\n   * @name $sceProvider#enabled\n   * @kind function\n   *\n   * @param {boolean=} value If provided, then enables/disables SCE.\n   * @return {boolean} true if SCE is enabled, false otherwise.\n   *\n   * @description\n   * Enables/disables SCE and returns the current value.\n   */\n  this.enabled = function(value) {\n    if (arguments.length) {\n      enabled = !!value;\n    }\n    return enabled;\n  };\n\n\n  /* Design notes on the default implementation for SCE.\n   *\n   * The API contract for the SCE delegate\n   * -------------------------------------\n   * The SCE delegate object must provide the following 3 methods:\n   *\n   * - trustAs(contextEnum, value)\n   *     This method is used to tell the SCE service that the provided value is OK to use in the\n   *     contexts specified by contextEnum.  It must return an object that will be accepted by\n   *     getTrusted() for a compatible contextEnum and return this value.\n   *\n   * - valueOf(value)\n   *     For values that were not produced by trustAs(), return them as is.  For values that were\n   *     produced by trustAs(), return the corresponding input value to trustAs.  Basically, if\n   *     trustAs is wrapping the given values into some type, this operation unwraps it when given\n   *     such a value.\n   *\n   * - getTrusted(contextEnum, value)\n   *     This function should return the a value that is safe to use in the context specified by\n   *     contextEnum or throw and exception otherwise.\n   *\n   * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be\n   * opaque or wrapped in some holder object.  That happens to be an implementation detail.  For\n   * instance, an implementation could maintain a registry of all trusted objects by context.  In\n   * such a case, trustAs() would return the same object that was passed in.  getTrusted() would\n   * return the same object passed in if it was found in the registry under a compatible context or\n   * throw an exception otherwise.  An implementation might only wrap values some of the time based\n   * on some criteria.  getTrusted() might return a value and not throw an exception for special\n   * constants or objects even if not wrapped.  All such implementations fulfill this contract.\n   *\n   *\n   * A note on the inheritance model for SCE contexts\n   * ------------------------------------------------\n   * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types.  This\n   * is purely an implementation details.\n   *\n   * The contract is simply this:\n   *\n   *     getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)\n   *     will also succeed.\n   *\n   * Inheritance happens to capture this in a natural way.  In some future, we\n   * may not use inheritance anymore.  That is OK because no code outside of\n   * sce.js and sceSpecs.js would need to be aware of this detail.\n   */\n\n  this.$get = ['$parse', '$sceDelegate', function(\n                $parse,   $sceDelegate) {\n    // Prereq: Ensure that we're not running in IE<11 quirks mode.  In that mode, IE < 11 allow\n    // the \"expression(javascript expression)\" syntax which is insecure.\n    if (enabled && msie < 8) {\n      throw $sceMinErr('iequirks',\n        'Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks ' +\n        'mode.  You can fix this by adding the text <!doctype html> to the top of your HTML ' +\n        'document.  See http://docs.angularjs.org/api/ng.$sce for more information.');\n    }\n\n    var sce = shallowCopy(SCE_CONTEXTS);\n\n    /**\n     * @ngdoc method\n     * @name $sce#isEnabled\n     * @kind function\n     *\n     * @return {Boolean} true if SCE is enabled, false otherwise.  If you want to set the value, you\n     * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.\n     *\n     * @description\n     * Returns a boolean indicating if SCE is enabled.\n     */\n    sce.isEnabled = function() {\n      return enabled;\n    };\n    sce.trustAs = $sceDelegate.trustAs;\n    sce.getTrusted = $sceDelegate.getTrusted;\n    sce.valueOf = $sceDelegate.valueOf;\n\n    if (!enabled) {\n      sce.trustAs = sce.getTrusted = function(type, value) { return value; };\n      sce.valueOf = identity;\n    }\n\n    /**\n     * @ngdoc method\n     * @name $sce#parseAs\n     *\n     * @description\n     * Converts Angular {@link guide/expression expression} into a function.  This is like {@link\n     * ng.$parse $parse} and is identical when the expression is a literal constant.  Otherwise, it\n     * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,\n     * *result*)}\n     *\n     * @param {string} type The kind of SCE context in which this result will be used.\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n    sce.parseAs = function sceParseAs(type, expr) {\n      var parsed = $parse(expr);\n      if (parsed.literal && parsed.constant) {\n        return parsed;\n      } else {\n        return $parse(expr, function(value) {\n          return sce.getTrusted(type, value);\n        });\n      }\n    };\n\n    /**\n     * @ngdoc method\n     * @name $sce#trustAs\n     *\n     * @description\n     * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.  As such,\n     * returns an object that is trusted by angular for use in specified strict contextual\n     * escaping contexts (such as ng-bind-html, ng-include, any src attribute\n     * interpolation, any dom event binding attribute interpolation such as for onclick,  etc.)\n     * that uses the provided value.  See * {@link ng.$sce $sce} for enabling strict contextual\n     * escaping.\n     *\n     * @param {string} type The kind of context in which this value is safe for use.  e.g. url,\n     *   resourceUrl, html, js and css.\n     * @param {*} value The value that that should be considered trusted/safe.\n     * @returns {*} A value that can be used to stand in for the provided `value` in places\n     * where Angular expects a $sce.trustAs() return value.\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#trustAsHtml\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsHtml(value)` →\n     *     {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedHtml\n     *     $sce.getTrustedHtml(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the\n     *     return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#trustAsUrl\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsUrl(value)` →\n     *     {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedUrl\n     *     $sce.getTrustedUrl(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the\n     *     return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#trustAsResourceUrl\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsResourceUrl(value)` →\n     *     {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedResourceUrl\n     *     $sce.getTrustedResourceUrl(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the return\n     *     value of {@link ng.$sce#trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#trustAsJs\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsJs(value)` →\n     *     {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedJs\n     *     $sce.getTrustedJs(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the\n     *     return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#getTrusted\n     *\n     * @description\n     * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}.  As such,\n     * takes the result of a {@link ng.$sce#trustAs `$sce.trustAs`}() call and returns the\n     * originally supplied value if the queried context type is a supertype of the created type.\n     * If this condition isn't satisfied, throws an exception.\n     *\n     * @param {string} type The kind of context in which this value is to be used.\n     * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs `$sce.trustAs`}\n     *                         call.\n     * @returns {*} The value the was originally provided to\n     *              {@link ng.$sce#trustAs `$sce.trustAs`} if valid in this context.\n     *              Otherwise, throws an exception.\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#getTrustedHtml\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedHtml(value)` →\n     *     {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#getTrustedCss\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedCss(value)` →\n     *     {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#getTrustedUrl\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedUrl(value)` →\n     *     {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#getTrustedResourceUrl\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedResourceUrl(value)` →\n     *     {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}\n     *\n     * @param {*} value The value to pass to `$sceDelegate.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#getTrustedJs\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedJs(value)` →\n     *     {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#parseAsHtml\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsHtml(expression string)` →\n     *     {@link ng.$sce#parseAs `$sce.parseAs($sce.HTML, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#parseAsCss\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsCss(value)` →\n     *     {@link ng.$sce#parseAs `$sce.parseAs($sce.CSS, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#parseAsUrl\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsUrl(value)` →\n     *     {@link ng.$sce#parseAs `$sce.parseAs($sce.URL, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#parseAsResourceUrl\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsResourceUrl(value)` →\n     *     {@link ng.$sce#parseAs `$sce.parseAs($sce.RESOURCE_URL, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#parseAsJs\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsJs(value)` →\n     *     {@link ng.$sce#parseAs `$sce.parseAs($sce.JS, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    // Shorthand delegations.\n    var parse = sce.parseAs,\n        getTrusted = sce.getTrusted,\n        trustAs = sce.trustAs;\n\n    forEach(SCE_CONTEXTS, function(enumValue, name) {\n      var lName = lowercase(name);\n      sce[camelCase(\"parse_as_\" + lName)] = function(expr) {\n        return parse(enumValue, expr);\n      };\n      sce[camelCase(\"get_trusted_\" + lName)] = function(value) {\n        return getTrusted(enumValue, value);\n      };\n      sce[camelCase(\"trust_as_\" + lName)] = function(value) {\n        return trustAs(enumValue, value);\n      };\n    });\n\n    return sce;\n  }];\n}\n\n/**\n * !!! This is an undocumented \"private\" service !!!\n *\n * @name $sniffer\n * @requires $window\n * @requires $document\n *\n * @property {boolean} history Does the browser support html5 history api ?\n * @property {boolean} transitions Does the browser support CSS transition events ?\n * @property {boolean} animations Does the browser support CSS animation events ?\n *\n * @description\n * This is very simple implementation of testing browser's features.\n */\nfunction $SnifferProvider() {\n  this.$get = ['$window', '$document', function($window, $document) {\n    var eventSupport = {},\n        // Chrome Packaged Apps are not allowed to access `history.pushState`. They can be detected by\n        // the presence of `chrome.app.runtime` (see https://developer.chrome.com/apps/api_index)\n        isChromePackagedApp = $window.chrome && $window.chrome.app && $window.chrome.app.runtime,\n        hasHistoryPushState = !isChromePackagedApp && $window.history && $window.history.pushState,\n        android =\n          toInt((/android (\\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),\n        boxee = /Boxee/i.test(($window.navigator || {}).userAgent),\n        document = $document[0] || {},\n        vendorPrefix,\n        vendorRegex = /^(Moz|webkit|ms)(?=[A-Z])/,\n        bodyStyle = document.body && document.body.style,\n        transitions = false,\n        animations = false,\n        match;\n\n    if (bodyStyle) {\n      for (var prop in bodyStyle) {\n        if (match = vendorRegex.exec(prop)) {\n          vendorPrefix = match[0];\n          vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1);\n          break;\n        }\n      }\n\n      if (!vendorPrefix) {\n        vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit';\n      }\n\n      transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));\n      animations  = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));\n\n      if (android && (!transitions ||  !animations)) {\n        transitions = isString(bodyStyle.webkitTransition);\n        animations = isString(bodyStyle.webkitAnimation);\n      }\n    }\n\n\n    return {\n      // Android has history.pushState, but it does not update location correctly\n      // so let's not use the history API at all.\n      // http://code.google.com/p/android/issues/detail?id=17471\n      // https://github.com/angular/angular.js/issues/904\n\n      // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has\n      // so let's not use the history API also\n      // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined\n      // jshint -W018\n      history: !!(hasHistoryPushState && !(android < 4) && !boxee),\n      // jshint +W018\n      hasEvent: function(event) {\n        // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have\n        // it. In particular the event is not fired when backspace or delete key are pressed or\n        // when cut operation is performed.\n        // IE10+ implements 'input' event but it erroneously fires under various situations,\n        // e.g. when placeholder changes, or a form is focused.\n        if (event === 'input' && msie <= 11) return false;\n\n        if (isUndefined(eventSupport[event])) {\n          var divElm = document.createElement('div');\n          eventSupport[event] = 'on' + event in divElm;\n        }\n\n        return eventSupport[event];\n      },\n      csp: csp(),\n      vendorPrefix: vendorPrefix,\n      transitions: transitions,\n      animations: animations,\n      android: android\n    };\n  }];\n}\n\nvar $templateRequestMinErr = minErr('$compile');\n\n/**\n * @ngdoc provider\n * @name $templateRequestProvider\n * @description\n * Used to configure the options passed to the {@link $http} service when making a template request.\n *\n * For example, it can be used for specifying the \"Accept\" header that is sent to the server, when\n * requesting a template.\n */\nfunction $TemplateRequestProvider() {\n\n  var httpOptions;\n\n  /**\n   * @ngdoc method\n   * @name $templateRequestProvider#httpOptions\n   * @description\n   * The options to be passed to the {@link $http} service when making the request.\n   * You can use this to override options such as the \"Accept\" header for template requests.\n   *\n   * The {@link $templateRequest} will set the `cache` and the `transformResponse` properties of the\n   * options if not overridden here.\n   *\n   * @param {string=} value new value for the {@link $http} options.\n   * @returns {string|self} Returns the {@link $http} options when used as getter and self if used as setter.\n   */\n  this.httpOptions = function(val) {\n    if (val) {\n      httpOptions = val;\n      return this;\n    }\n    return httpOptions;\n  };\n\n  /**\n   * @ngdoc service\n   * @name $templateRequest\n   *\n   * @description\n   * The `$templateRequest` service runs security checks then downloads the provided template using\n   * `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request\n   * fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the\n   * exception can be thwarted by setting the 2nd parameter of the function to true). Note that the\n   * contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted\n   * when `tpl` is of type string and `$templateCache` has the matching entry.\n   *\n   * If you want to pass custom options to the `$http` service, such as setting the Accept header you\n   * can configure this via {@link $templateRequestProvider#httpOptions}.\n   *\n   * @param {string|TrustedResourceUrl} tpl The HTTP request template URL\n   * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty\n   *\n   * @return {Promise} a promise for the HTTP response data of the given URL.\n   *\n   * @property {number} totalPendingRequests total amount of pending template requests being downloaded.\n   */\n  this.$get = ['$templateCache', '$http', '$q', '$sce', function($templateCache, $http, $q, $sce) {\n\n    function handleRequestFn(tpl, ignoreRequestError) {\n      handleRequestFn.totalPendingRequests++;\n\n      // We consider the template cache holds only trusted templates, so\n      // there's no need to go through whitelisting again for keys that already\n      // are included in there. This also makes Angular accept any script\n      // directive, no matter its name. However, we still need to unwrap trusted\n      // types.\n      if (!isString(tpl) || !$templateCache.get(tpl)) {\n        tpl = $sce.getTrustedResourceUrl(tpl);\n      }\n\n      var transformResponse = $http.defaults && $http.defaults.transformResponse;\n\n      if (isArray(transformResponse)) {\n        transformResponse = transformResponse.filter(function(transformer) {\n          return transformer !== defaultHttpResponseTransform;\n        });\n      } else if (transformResponse === defaultHttpResponseTransform) {\n        transformResponse = null;\n      }\n\n      return $http.get(tpl, extend({\n          cache: $templateCache,\n          transformResponse: transformResponse\n        }, httpOptions))\n        ['finally'](function() {\n          handleRequestFn.totalPendingRequests--;\n        })\n        .then(function(response) {\n          $templateCache.put(tpl, response.data);\n          return response.data;\n        }, handleError);\n\n      function handleError(resp) {\n        if (!ignoreRequestError) {\n          throw $templateRequestMinErr('tpload', 'Failed to load template: {0} (HTTP status: {1} {2})',\n            tpl, resp.status, resp.statusText);\n        }\n        return $q.reject(resp);\n      }\n    }\n\n    handleRequestFn.totalPendingRequests = 0;\n\n    return handleRequestFn;\n  }];\n}\n\nfunction $$TestabilityProvider() {\n  this.$get = ['$rootScope', '$browser', '$location',\n       function($rootScope,   $browser,   $location) {\n\n    /**\n     * @name $testability\n     *\n     * @description\n     * The private $$testability service provides a collection of methods for use when debugging\n     * or by automated test and debugging tools.\n     */\n    var testability = {};\n\n    /**\n     * @name $$testability#findBindings\n     *\n     * @description\n     * Returns an array of elements that are bound (via ng-bind or {{}})\n     * to expressions matching the input.\n     *\n     * @param {Element} element The element root to search from.\n     * @param {string} expression The binding expression to match.\n     * @param {boolean} opt_exactMatch If true, only returns exact matches\n     *     for the expression. Filters and whitespace are ignored.\n     */\n    testability.findBindings = function(element, expression, opt_exactMatch) {\n      var bindings = element.getElementsByClassName('ng-binding');\n      var matches = [];\n      forEach(bindings, function(binding) {\n        var dataBinding = angular.element(binding).data('$binding');\n        if (dataBinding) {\n          forEach(dataBinding, function(bindingName) {\n            if (opt_exactMatch) {\n              var matcher = new RegExp('(^|\\\\s)' + escapeForRegexp(expression) + '(\\\\s|\\\\||$)');\n              if (matcher.test(bindingName)) {\n                matches.push(binding);\n              }\n            } else {\n              if (bindingName.indexOf(expression) != -1) {\n                matches.push(binding);\n              }\n            }\n          });\n        }\n      });\n      return matches;\n    };\n\n    /**\n     * @name $$testability#findModels\n     *\n     * @description\n     * Returns an array of elements that are two-way found via ng-model to\n     * expressions matching the input.\n     *\n     * @param {Element} element The element root to search from.\n     * @param {string} expression The model expression to match.\n     * @param {boolean} opt_exactMatch If true, only returns exact matches\n     *     for the expression.\n     */\n    testability.findModels = function(element, expression, opt_exactMatch) {\n      var prefixes = ['ng-', 'data-ng-', 'ng\\\\:'];\n      for (var p = 0; p < prefixes.length; ++p) {\n        var attributeEquals = opt_exactMatch ? '=' : '*=';\n        var selector = '[' + prefixes[p] + 'model' + attributeEquals + '\"' + expression + '\"]';\n        var elements = element.querySelectorAll(selector);\n        if (elements.length) {\n          return elements;\n        }\n      }\n    };\n\n    /**\n     * @name $$testability#getLocation\n     *\n     * @description\n     * Shortcut for getting the location in a browser agnostic way. Returns\n     *     the path, search, and hash. (e.g. /path?a=b#hash)\n     */\n    testability.getLocation = function() {\n      return $location.url();\n    };\n\n    /**\n     * @name $$testability#setLocation\n     *\n     * @description\n     * Shortcut for navigating to a location without doing a full page reload.\n     *\n     * @param {string} url The location url (path, search and hash,\n     *     e.g. /path?a=b#hash) to go to.\n     */\n    testability.setLocation = function(url) {\n      if (url !== $location.url()) {\n        $location.url(url);\n        $rootScope.$digest();\n      }\n    };\n\n    /**\n     * @name $$testability#whenStable\n     *\n     * @description\n     * Calls the callback when $timeout and $http requests are completed.\n     *\n     * @param {function} callback\n     */\n    testability.whenStable = function(callback) {\n      $browser.notifyWhenNoOutstandingRequests(callback);\n    };\n\n    return testability;\n  }];\n}\n\nfunction $TimeoutProvider() {\n  this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler',\n       function($rootScope,   $browser,   $q,   $$q,   $exceptionHandler) {\n\n    var deferreds = {};\n\n\n     /**\n      * @ngdoc service\n      * @name $timeout\n      *\n      * @description\n      * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch\n      * block and delegates any exceptions to\n      * {@link ng.$exceptionHandler $exceptionHandler} service.\n      *\n      * The return value of calling `$timeout` is a promise, which will be resolved when\n      * the delay has passed and the timeout function, if provided, is executed.\n      *\n      * To cancel a timeout request, call `$timeout.cancel(promise)`.\n      *\n      * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to\n      * synchronously flush the queue of deferred functions.\n      *\n      * If you only want a promise that will be resolved after some specified delay\n      * then you can call `$timeout` without the `fn` function.\n      *\n      * @param {function()=} fn A function, whose execution should be delayed.\n      * @param {number=} [delay=0] Delay in milliseconds.\n      * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n      *   will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n      * @param {...*=} Pass additional parameters to the executed function.\n      * @returns {Promise} Promise that will be resolved when the timeout is reached. The promise\n      *   will be resolved with the return value of the `fn` function.\n      *\n      */\n    function timeout(fn, delay, invokeApply) {\n      if (!isFunction(fn)) {\n        invokeApply = delay;\n        delay = fn;\n        fn = noop;\n      }\n\n      var args = sliceArgs(arguments, 3),\n          skipApply = (isDefined(invokeApply) && !invokeApply),\n          deferred = (skipApply ? $$q : $q).defer(),\n          promise = deferred.promise,\n          timeoutId;\n\n      timeoutId = $browser.defer(function() {\n        try {\n          deferred.resolve(fn.apply(null, args));\n        } catch (e) {\n          deferred.reject(e);\n          $exceptionHandler(e);\n        }\n        finally {\n          delete deferreds[promise.$$timeoutId];\n        }\n\n        if (!skipApply) $rootScope.$apply();\n      }, delay);\n\n      promise.$$timeoutId = timeoutId;\n      deferreds[timeoutId] = deferred;\n\n      return promise;\n    }\n\n\n     /**\n      * @ngdoc method\n      * @name $timeout#cancel\n      *\n      * @description\n      * Cancels a task associated with the `promise`. As a result of this, the promise will be\n      * resolved with a rejection.\n      *\n      * @param {Promise=} promise Promise returned by the `$timeout` function.\n      * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n      *   canceled.\n      */\n    timeout.cancel = function(promise) {\n      if (promise && promise.$$timeoutId in deferreds) {\n        deferreds[promise.$$timeoutId].reject('canceled');\n        delete deferreds[promise.$$timeoutId];\n        return $browser.defer.cancel(promise.$$timeoutId);\n      }\n      return false;\n    };\n\n    return timeout;\n  }];\n}\n\n// NOTE:  The usage of window and document instead of $window and $document here is\n// deliberate.  This service depends on the specific behavior of anchor nodes created by the\n// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and\n// cause us to break tests.  In addition, when the browser resolves a URL for XHR, it\n// doesn't know about mocked locations and resolves URLs to the real document - which is\n// exactly the behavior needed here.  There is little value is mocking these out for this\n// service.\nvar urlParsingNode = document.createElement(\"a\");\nvar originUrl = urlResolve(window.location.href);\n\n\n/**\n *\n * Implementation Notes for non-IE browsers\n * ----------------------------------------\n * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,\n * results both in the normalizing and parsing of the URL.  Normalizing means that a relative\n * URL will be resolved into an absolute URL in the context of the application document.\n * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related\n * properties are all populated to reflect the normalized URL.  This approach has wide\n * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc.  See\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *\n * Implementation Notes for IE\n * ---------------------------\n * IE <= 10 normalizes the URL when assigned to the anchor node similar to the other\n * browsers.  However, the parsed components will not be set if the URL assigned did not specify\n * them.  (e.g. if you assign a.href = \"foo\", then a.protocol, a.host, etc. will be empty.)  We\n * work around that by performing the parsing in a 2nd step by taking a previously normalized\n * URL (e.g. by assigning to a.href) and assigning it a.href again.  This correctly populates the\n * properties such as protocol, hostname, port, etc.\n *\n * References:\n *   http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement\n *   http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *   http://url.spec.whatwg.org/#urlutils\n *   https://github.com/angular/angular.js/pull/2902\n *   http://james.padolsey.com/javascript/parsing-urls-with-the-dom/\n *\n * @kind function\n * @param {string} url The URL to be parsed.\n * @description Normalizes and parses a URL.\n * @returns {object} Returns the normalized URL as a dictionary.\n *\n *   | member name   | Description    |\n *   |---------------|----------------|\n *   | href          | A normalized version of the provided URL if it was not an absolute URL |\n *   | protocol      | The protocol including the trailing colon                              |\n *   | host          | The host and port (if the port is non-default) of the normalizedUrl    |\n *   | search        | The search params, minus the question mark                             |\n *   | hash          | The hash string, minus the hash symbol\n *   | hostname      | The hostname\n *   | port          | The port, without \":\"\n *   | pathname      | The pathname, beginning with \"/\"\n *\n */\nfunction urlResolve(url) {\n  var href = url;\n\n  if (msie) {\n    // Normalize before parse.  Refer Implementation Notes on why this is\n    // done in two steps on IE.\n    urlParsingNode.setAttribute(\"href\", href);\n    href = urlParsingNode.href;\n  }\n\n  urlParsingNode.setAttribute('href', href);\n\n  // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n  return {\n    href: urlParsingNode.href,\n    protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n    host: urlParsingNode.host,\n    search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n    hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n    hostname: urlParsingNode.hostname,\n    port: urlParsingNode.port,\n    pathname: (urlParsingNode.pathname.charAt(0) === '/')\n      ? urlParsingNode.pathname\n      : '/' + urlParsingNode.pathname\n  };\n}\n\n/**\n * Parse a request URL and determine whether this is a same-origin request as the application document.\n *\n * @param {string|object} requestUrl The url of the request as a string that will be resolved\n * or a parsed URL object.\n * @returns {boolean} Whether the request is for the same origin as the application document.\n */\nfunction urlIsSameOrigin(requestUrl) {\n  var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n  return (parsed.protocol === originUrl.protocol &&\n          parsed.host === originUrl.host);\n}\n\n/**\n * @ngdoc service\n * @name $window\n *\n * @description\n * A reference to the browser's `window` object. While `window`\n * is globally available in JavaScript, it causes testability problems, because\n * it is a global variable. In angular we always refer to it through the\n * `$window` service, so it may be overridden, removed or mocked for testing.\n *\n * Expressions, like the one defined for the `ngClick` directive in the example\n * below, are evaluated with respect to the current scope.  Therefore, there is\n * no risk of inadvertently coding in a dependency on a global value in such an\n * expression.\n *\n * @example\n   <example module=\"windowExample\">\n     <file name=\"index.html\">\n       <script>\n         angular.module('windowExample', [])\n           .controller('ExampleController', ['$scope', '$window', function($scope, $window) {\n             $scope.greeting = 'Hello, World!';\n             $scope.doGreeting = function(greeting) {\n               $window.alert(greeting);\n             };\n           }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n         <input type=\"text\" ng-model=\"greeting\" aria-label=\"greeting\" />\n         <button ng-click=\"doGreeting(greeting)\">ALERT</button>\n       </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n      it('should display the greeting in the input box', function() {\n       element(by.model('greeting')).sendKeys('Hello, E2E Tests');\n       // If we click the button it will block the test runner\n       // element(':button').click();\n      });\n     </file>\n   </example>\n */\nfunction $WindowProvider() {\n  this.$get = valueFn(window);\n}\n\n/**\n * @name $$cookieReader\n * @requires $document\n *\n * @description\n * This is a private service for reading cookies used by $http and ngCookies\n *\n * @return {Object} a key/value map of the current cookies\n */\nfunction $$CookieReader($document) {\n  var rawDocument = $document[0] || {};\n  var lastCookies = {};\n  var lastCookieString = '';\n\n  function safeDecodeURIComponent(str) {\n    try {\n      return decodeURIComponent(str);\n    } catch (e) {\n      return str;\n    }\n  }\n\n  return function() {\n    var cookieArray, cookie, i, index, name;\n    var currentCookieString = rawDocument.cookie || '';\n\n    if (currentCookieString !== lastCookieString) {\n      lastCookieString = currentCookieString;\n      cookieArray = lastCookieString.split('; ');\n      lastCookies = {};\n\n      for (i = 0; i < cookieArray.length; i++) {\n        cookie = cookieArray[i];\n        index = cookie.indexOf('=');\n        if (index > 0) { //ignore nameless cookies\n          name = safeDecodeURIComponent(cookie.substring(0, index));\n          // the first value that is seen for a cookie is the most\n          // specific one.  values for the same cookie name that\n          // follow are for less specific paths.\n          if (isUndefined(lastCookies[name])) {\n            lastCookies[name] = safeDecodeURIComponent(cookie.substring(index + 1));\n          }\n        }\n      }\n    }\n    return lastCookies;\n  };\n}\n\n$$CookieReader.$inject = ['$document'];\n\nfunction $$CookieReaderProvider() {\n  this.$get = $$CookieReader;\n}\n\n/* global currencyFilter: true,\n dateFilter: true,\n filterFilter: true,\n jsonFilter: true,\n limitToFilter: true,\n lowercaseFilter: true,\n numberFilter: true,\n orderByFilter: true,\n uppercaseFilter: true,\n */\n\n/**\n * @ngdoc provider\n * @name $filterProvider\n * @description\n *\n * Filters are just functions which transform input to an output. However filters need to be\n * Dependency Injected. To achieve this a filter definition consists of a factory function which is\n * annotated with dependencies and is responsible for creating a filter function.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.\n * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n * (`myapp_subsection_filterx`).\n * </div>\n *\n * ```js\n *   // Filter registration\n *   function MyModule($provide, $filterProvider) {\n *     // create a service to demonstrate injection (not always needed)\n *     $provide.value('greet', function(name){\n *       return 'Hello ' + name + '!';\n *     });\n *\n *     // register a filter factory which uses the\n *     // greet service to demonstrate DI.\n *     $filterProvider.register('greet', function(greet){\n *       // return the filter function which uses the greet service\n *       // to generate salutation\n *       return function(text) {\n *         // filters need to be forgiving so check input validity\n *         return text && greet(text) || text;\n *       };\n *     });\n *   }\n * ```\n *\n * The filter function is registered with the `$injector` under the filter name suffix with\n * `Filter`.\n *\n * ```js\n *   it('should be the same instance', inject(\n *     function($filterProvider) {\n *       $filterProvider.register('reverse', function(){\n *         return ...;\n *       });\n *     },\n *     function($filter, reverseFilter) {\n *       expect($filter('reverse')).toBe(reverseFilter);\n *     });\n * ```\n *\n *\n * For more information about how angular filters work, and how to create your own filters, see\n * {@link guide/filter Filters} in the Angular Developer Guide.\n */\n\n/**\n * @ngdoc service\n * @name $filter\n * @kind function\n * @description\n * Filters are used for formatting data displayed to the user.\n *\n * The general syntax in templates is as follows:\n *\n *         {{ expression [| filter_name[:parameter_value] ... ] }}\n *\n * @param {String} name Name of the filter function to retrieve\n * @return {Function} the filter function\n * @example\n   <example name=\"$filter\" module=\"filterExample\">\n     <file name=\"index.html\">\n       <div ng-controller=\"MainCtrl\">\n        <h3>{{ originalText }}</h3>\n        <h3>{{ filteredText }}</h3>\n       </div>\n     </file>\n\n     <file name=\"script.js\">\n      angular.module('filterExample', [])\n      .controller('MainCtrl', function($scope, $filter) {\n        $scope.originalText = 'hello';\n        $scope.filteredText = $filter('uppercase')($scope.originalText);\n      });\n     </file>\n   </example>\n  */\n$FilterProvider.$inject = ['$provide'];\nfunction $FilterProvider($provide) {\n  var suffix = 'Filter';\n\n  /**\n   * @ngdoc method\n   * @name $filterProvider#register\n   * @param {string|Object} name Name of the filter function, or an object map of filters where\n   *    the keys are the filter names and the values are the filter factories.\n   *\n   *    <div class=\"alert alert-warning\">\n   *    **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.\n   *    Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n   *    your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n   *    (`myapp_subsection_filterx`).\n   *    </div>\n    * @param {Function} factory If the first argument was a string, a factory function for the filter to be registered.\n   * @returns {Object} Registered filter instance, or if a map of filters was provided then a map\n   *    of the registered filter instances.\n   */\n  function register(name, factory) {\n    if (isObject(name)) {\n      var filters = {};\n      forEach(name, function(filter, key) {\n        filters[key] = register(key, filter);\n      });\n      return filters;\n    } else {\n      return $provide.factory(name + suffix, factory);\n    }\n  }\n  this.register = register;\n\n  this.$get = ['$injector', function($injector) {\n    return function(name) {\n      return $injector.get(name + suffix);\n    };\n  }];\n\n  ////////////////////////////////////////\n\n  /* global\n    currencyFilter: false,\n    dateFilter: false,\n    filterFilter: false,\n    jsonFilter: false,\n    limitToFilter: false,\n    lowercaseFilter: false,\n    numberFilter: false,\n    orderByFilter: false,\n    uppercaseFilter: false,\n  */\n\n  register('currency', currencyFilter);\n  register('date', dateFilter);\n  register('filter', filterFilter);\n  register('json', jsonFilter);\n  register('limitTo', limitToFilter);\n  register('lowercase', lowercaseFilter);\n  register('number', numberFilter);\n  register('orderBy', orderByFilter);\n  register('uppercase', uppercaseFilter);\n}\n\n/**\n * @ngdoc filter\n * @name filter\n * @kind function\n *\n * @description\n * Selects a subset of items from `array` and returns it as a new array.\n *\n * @param {Array} array The source array.\n * @param {string|Object|function()} expression The predicate to be used for selecting items from\n *   `array`.\n *\n *   Can be one of:\n *\n *   - `string`: The string is used for matching against the contents of the `array`. All strings or\n *     objects with string properties in `array` that match this string will be returned. This also\n *     applies to nested object properties.\n *     The predicate can be negated by prefixing the string with `!`.\n *\n *   - `Object`: A pattern object can be used to filter specific properties on objects contained\n *     by `array`. For example `{name:\"M\", phone:\"1\"}` predicate will return an array of items\n *     which have property `name` containing \"M\" and property `phone` containing \"1\". A special\n *     property name `$` can be used (as in `{$:\"text\"}`) to accept a match against any\n *     property of the object or its nested object properties. That's equivalent to the simple\n *     substring match with a `string` as described above. The predicate can be negated by prefixing\n *     the string with `!`.\n *     For example `{name: \"!M\"}` predicate will return an array of items which have property `name`\n *     not containing \"M\".\n *\n *     Note that a named property will match properties on the same level only, while the special\n *     `$` property will match properties on the same level or deeper. E.g. an array item like\n *     `{name: {first: 'John', last: 'Doe'}}` will **not** be matched by `{name: 'John'}`, but\n *     **will** be matched by `{$: 'John'}`.\n *\n *   - `function(value, index, array)`: A predicate function can be used to write arbitrary filters.\n *     The function is called for each element of the array, with the element, its index, and\n *     the entire array itself as arguments.\n *\n *     The final result is an array of those elements that the predicate returned true for.\n *\n * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in\n *     determining if the expected value (from the filter expression) and actual value (from\n *     the object in the array) should be considered a match.\n *\n *   Can be one of:\n *\n *   - `function(actual, expected)`:\n *     The function will be given the object value and the predicate value to compare and\n *     should return true if both values should be considered equal.\n *\n *   - `true`: A shorthand for `function(actual, expected) { return angular.equals(actual, expected)}`.\n *     This is essentially strict comparison of expected and actual.\n *\n *   - `false|undefined`: A short hand for a function which will look for a substring match in case\n *     insensitive way.\n *\n *     Primitive values are converted to strings. Objects are not compared against primitives,\n *     unless they have a custom `toString` method (e.g. `Date` objects).\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n       <div ng-init=\"friends = [{name:'John', phone:'555-1276'},\n                                {name:'Mary', phone:'800-BIG-MARY'},\n                                {name:'Mike', phone:'555-4321'},\n                                {name:'Adam', phone:'555-5678'},\n                                {name:'Julie', phone:'555-8765'},\n                                {name:'Juliette', phone:'555-5678'}]\"></div>\n\n       <label>Search: <input ng-model=\"searchText\"></label>\n       <table id=\"searchTextResults\">\n         <tr><th>Name</th><th>Phone</th></tr>\n         <tr ng-repeat=\"friend in friends | filter:searchText\">\n           <td>{{friend.name}}</td>\n           <td>{{friend.phone}}</td>\n         </tr>\n       </table>\n       <hr>\n       <label>Any: <input ng-model=\"search.$\"></label> <br>\n       <label>Name only <input ng-model=\"search.name\"></label><br>\n       <label>Phone only <input ng-model=\"search.phone\"></label><br>\n       <label>Equality <input type=\"checkbox\" ng-model=\"strict\"></label><br>\n       <table id=\"searchObjResults\">\n         <tr><th>Name</th><th>Phone</th></tr>\n         <tr ng-repeat=\"friendObj in friends | filter:search:strict\">\n           <td>{{friendObj.name}}</td>\n           <td>{{friendObj.phone}}</td>\n         </tr>\n       </table>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       var expectFriendNames = function(expectedNames, key) {\n         element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {\n           arr.forEach(function(wd, i) {\n             expect(wd.getText()).toMatch(expectedNames[i]);\n           });\n         });\n       };\n\n       it('should search across all fields when filtering with a string', function() {\n         var searchText = element(by.model('searchText'));\n         searchText.clear();\n         searchText.sendKeys('m');\n         expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');\n\n         searchText.clear();\n         searchText.sendKeys('76');\n         expectFriendNames(['John', 'Julie'], 'friend');\n       });\n\n       it('should search in specific fields when filtering with a predicate object', function() {\n         var searchAny = element(by.model('search.$'));\n         searchAny.clear();\n         searchAny.sendKeys('i');\n         expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');\n       });\n       it('should use a equal comparison when comparator is true', function() {\n         var searchName = element(by.model('search.name'));\n         var strict = element(by.model('strict'));\n         searchName.clear();\n         searchName.sendKeys('Julie');\n         strict.click();\n         expectFriendNames(['Julie'], 'friendObj');\n       });\n     </file>\n   </example>\n */\nfunction filterFilter() {\n  return function(array, expression, comparator) {\n    if (!isArrayLike(array)) {\n      if (array == null) {\n        return array;\n      } else {\n        throw minErr('filter')('notarray', 'Expected array but received: {0}', array);\n      }\n    }\n\n    var expressionType = getTypeForFilter(expression);\n    var predicateFn;\n    var matchAgainstAnyProp;\n\n    switch (expressionType) {\n      case 'function':\n        predicateFn = expression;\n        break;\n      case 'boolean':\n      case 'null':\n      case 'number':\n      case 'string':\n        matchAgainstAnyProp = true;\n        //jshint -W086\n      case 'object':\n        //jshint +W086\n        predicateFn = createPredicateFn(expression, comparator, matchAgainstAnyProp);\n        break;\n      default:\n        return array;\n    }\n\n    return Array.prototype.filter.call(array, predicateFn);\n  };\n}\n\n// Helper functions for `filterFilter`\nfunction createPredicateFn(expression, comparator, matchAgainstAnyProp) {\n  var shouldMatchPrimitives = isObject(expression) && ('$' in expression);\n  var predicateFn;\n\n  if (comparator === true) {\n    comparator = equals;\n  } else if (!isFunction(comparator)) {\n    comparator = function(actual, expected) {\n      if (isUndefined(actual)) {\n        // No substring matching against `undefined`\n        return false;\n      }\n      if ((actual === null) || (expected === null)) {\n        // No substring matching against `null`; only match against `null`\n        return actual === expected;\n      }\n      if (isObject(expected) || (isObject(actual) && !hasCustomToString(actual))) {\n        // Should not compare primitives against objects, unless they have custom `toString` method\n        return false;\n      }\n\n      actual = lowercase('' + actual);\n      expected = lowercase('' + expected);\n      return actual.indexOf(expected) !== -1;\n    };\n  }\n\n  predicateFn = function(item) {\n    if (shouldMatchPrimitives && !isObject(item)) {\n      return deepCompare(item, expression.$, comparator, false);\n    }\n    return deepCompare(item, expression, comparator, matchAgainstAnyProp);\n  };\n\n  return predicateFn;\n}\n\nfunction deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatchWholeObject) {\n  var actualType = getTypeForFilter(actual);\n  var expectedType = getTypeForFilter(expected);\n\n  if ((expectedType === 'string') && (expected.charAt(0) === '!')) {\n    return !deepCompare(actual, expected.substring(1), comparator, matchAgainstAnyProp);\n  } else if (isArray(actual)) {\n    // In case `actual` is an array, consider it a match\n    // if ANY of it's items matches `expected`\n    return actual.some(function(item) {\n      return deepCompare(item, expected, comparator, matchAgainstAnyProp);\n    });\n  }\n\n  switch (actualType) {\n    case 'object':\n      var key;\n      if (matchAgainstAnyProp) {\n        for (key in actual) {\n          if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, true)) {\n            return true;\n          }\n        }\n        return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, false);\n      } else if (expectedType === 'object') {\n        for (key in expected) {\n          var expectedVal = expected[key];\n          if (isFunction(expectedVal) || isUndefined(expectedVal)) {\n            continue;\n          }\n\n          var matchAnyProperty = key === '$';\n          var actualVal = matchAnyProperty ? actual : actual[key];\n          if (!deepCompare(actualVal, expectedVal, comparator, matchAnyProperty, matchAnyProperty)) {\n            return false;\n          }\n        }\n        return true;\n      } else {\n        return comparator(actual, expected);\n      }\n      break;\n    case 'function':\n      return false;\n    default:\n      return comparator(actual, expected);\n  }\n}\n\n// Used for easily differentiating between `null` and actual `object`\nfunction getTypeForFilter(val) {\n  return (val === null) ? 'null' : typeof val;\n}\n\nvar MAX_DIGITS = 22;\nvar DECIMAL_SEP = '.';\nvar ZERO_CHAR = '0';\n\n/**\n * @ngdoc filter\n * @name currency\n * @kind function\n *\n * @description\n * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default\n * symbol for current locale is used.\n *\n * @param {number} amount Input to filter.\n * @param {string=} symbol Currency symbol or identifier to be displayed.\n * @param {number=} fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale\n * @returns {string} Formatted number.\n *\n *\n * @example\n   <example module=\"currencyExample\">\n     <file name=\"index.html\">\n       <script>\n         angular.module('currencyExample', [])\n           .controller('ExampleController', ['$scope', function($scope) {\n             $scope.amount = 1234.56;\n           }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n         <input type=\"number\" ng-model=\"amount\" aria-label=\"amount\"> <br>\n         default currency symbol ($): <span id=\"currency-default\">{{amount | currency}}</span><br>\n         custom currency identifier (USD$): <span id=\"currency-custom\">{{amount | currency:\"USD$\"}}</span>\n         no fractions (0): <span id=\"currency-no-fractions\">{{amount | currency:\"USD$\":0}}</span>\n       </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should init with 1234.56', function() {\n         expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');\n         expect(element(by.id('currency-custom')).getText()).toBe('USD$1,234.56');\n         expect(element(by.id('currency-no-fractions')).getText()).toBe('USD$1,235');\n       });\n       it('should update', function() {\n         if (browser.params.browser == 'safari') {\n           // Safari does not understand the minus key. See\n           // https://github.com/angular/protractor/issues/481\n           return;\n         }\n         element(by.model('amount')).clear();\n         element(by.model('amount')).sendKeys('-1234');\n         expect(element(by.id('currency-default')).getText()).toBe('-$1,234.00');\n         expect(element(by.id('currency-custom')).getText()).toBe('-USD$1,234.00');\n         expect(element(by.id('currency-no-fractions')).getText()).toBe('-USD$1,234');\n       });\n     </file>\n   </example>\n */\ncurrencyFilter.$inject = ['$locale'];\nfunction currencyFilter($locale) {\n  var formats = $locale.NUMBER_FORMATS;\n  return function(amount, currencySymbol, fractionSize) {\n    if (isUndefined(currencySymbol)) {\n      currencySymbol = formats.CURRENCY_SYM;\n    }\n\n    if (isUndefined(fractionSize)) {\n      fractionSize = formats.PATTERNS[1].maxFrac;\n    }\n\n    // if null or undefined pass it through\n    return (amount == null)\n        ? amount\n        : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, fractionSize).\n            replace(/\\u00A4/g, currencySymbol);\n  };\n}\n\n/**\n * @ngdoc filter\n * @name number\n * @kind function\n *\n * @description\n * Formats a number as text.\n *\n * If the input is null or undefined, it will just be returned.\n * If the input is infinite (Infinity or -Infinity), the Infinity symbol '∞' or '-∞' is returned, respectively.\n * If the input is not a number an empty string is returned.\n *\n *\n * @param {number|string} number Number to format.\n * @param {(number|string)=} fractionSize Number of decimal places to round the number to.\n * If this is not provided then the fraction size is computed from the current locale's number\n * formatting pattern. In the case of the default locale, it will be 3.\n * @returns {string} Number rounded to fractionSize and places a “,” after each third digit.\n *\n * @example\n   <example module=\"numberFilterExample\">\n     <file name=\"index.html\">\n       <script>\n         angular.module('numberFilterExample', [])\n           .controller('ExampleController', ['$scope', function($scope) {\n             $scope.val = 1234.56789;\n           }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n         <label>Enter number: <input ng-model='val'></label><br>\n         Default formatting: <span id='number-default'>{{val | number}}</span><br>\n         No fractions: <span>{{val | number:0}}</span><br>\n         Negative number: <span>{{-val | number:4}}</span>\n       </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should format numbers', function() {\n         expect(element(by.id('number-default')).getText()).toBe('1,234.568');\n         expect(element(by.binding('val | number:0')).getText()).toBe('1,235');\n         expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');\n       });\n\n       it('should update', function() {\n         element(by.model('val')).clear();\n         element(by.model('val')).sendKeys('3374.333');\n         expect(element(by.id('number-default')).getText()).toBe('3,374.333');\n         expect(element(by.binding('val | number:0')).getText()).toBe('3,374');\n         expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');\n      });\n     </file>\n   </example>\n */\nnumberFilter.$inject = ['$locale'];\nfunction numberFilter($locale) {\n  var formats = $locale.NUMBER_FORMATS;\n  return function(number, fractionSize) {\n\n    // if null or undefined pass it through\n    return (number == null)\n        ? number\n        : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,\n                       fractionSize);\n  };\n}\n\n/**\n * Parse a number (as a string) into three components that can be used\n * for formatting the number.\n *\n * (Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/)\n *\n * @param  {string} numStr The number to parse\n * @return {object} An object describing this number, containing the following keys:\n *  - d : an array of digits containing leading zeros as necessary\n *  - i : the number of the digits in `d` that are to the left of the decimal point\n *  - e : the exponent for numbers that would need more than `MAX_DIGITS` digits in `d`\n *\n */\nfunction parse(numStr) {\n  var exponent = 0, digits, numberOfIntegerDigits;\n  var i, j, zeros;\n\n  // Decimal point?\n  if ((numberOfIntegerDigits = numStr.indexOf(DECIMAL_SEP)) > -1) {\n    numStr = numStr.replace(DECIMAL_SEP, '');\n  }\n\n  // Exponential form?\n  if ((i = numStr.search(/e/i)) > 0) {\n    // Work out the exponent.\n    if (numberOfIntegerDigits < 0) numberOfIntegerDigits = i;\n    numberOfIntegerDigits += +numStr.slice(i + 1);\n    numStr = numStr.substring(0, i);\n  } else if (numberOfIntegerDigits < 0) {\n    // There was no decimal point or exponent so it is an integer.\n    numberOfIntegerDigits = numStr.length;\n  }\n\n  // Count the number of leading zeros.\n  for (i = 0; numStr.charAt(i) == ZERO_CHAR; i++) {/* jshint noempty: false */}\n\n  if (i == (zeros = numStr.length)) {\n    // The digits are all zero.\n    digits = [0];\n    numberOfIntegerDigits = 1;\n  } else {\n    // Count the number of trailing zeros\n    zeros--;\n    while (numStr.charAt(zeros) == ZERO_CHAR) zeros--;\n\n    // Trailing zeros are insignificant so ignore them\n    numberOfIntegerDigits -= i;\n    digits = [];\n    // Convert string to array of digits without leading/trailing zeros.\n    for (j = 0; i <= zeros; i++, j++) {\n      digits[j] = +numStr.charAt(i);\n    }\n  }\n\n  // If the number overflows the maximum allowed digits then use an exponent.\n  if (numberOfIntegerDigits > MAX_DIGITS) {\n    digits = digits.splice(0, MAX_DIGITS - 1);\n    exponent = numberOfIntegerDigits - 1;\n    numberOfIntegerDigits = 1;\n  }\n\n  return { d: digits, e: exponent, i: numberOfIntegerDigits };\n}\n\n/**\n * Round the parsed number to the specified number of decimal places\n * This function changed the parsedNumber in-place\n */\nfunction roundNumber(parsedNumber, fractionSize, minFrac, maxFrac) {\n    var digits = parsedNumber.d;\n    var fractionLen = digits.length - parsedNumber.i;\n\n    // determine fractionSize if it is not specified; `+fractionSize` converts it to a number\n    fractionSize = (isUndefined(fractionSize)) ? Math.min(Math.max(minFrac, fractionLen), maxFrac) : +fractionSize;\n\n    // The index of the digit to where rounding is to occur\n    var roundAt = fractionSize + parsedNumber.i;\n    var digit = digits[roundAt];\n\n    if (roundAt > 0) {\n      // Drop fractional digits beyond `roundAt`\n      digits.splice(Math.max(parsedNumber.i, roundAt));\n\n      // Set non-fractional digits beyond `roundAt` to 0\n      for (var j = roundAt; j < digits.length; j++) {\n        digits[j] = 0;\n      }\n    } else {\n      // We rounded to zero so reset the parsedNumber\n      fractionLen = Math.max(0, fractionLen);\n      parsedNumber.i = 1;\n      digits.length = Math.max(1, roundAt = fractionSize + 1);\n      digits[0] = 0;\n      for (var i = 1; i < roundAt; i++) digits[i] = 0;\n    }\n\n    if (digit >= 5) {\n      if (roundAt - 1 < 0) {\n        for (var k = 0; k > roundAt; k--) {\n          digits.unshift(0);\n          parsedNumber.i++;\n        }\n        digits.unshift(1);\n        parsedNumber.i++;\n      } else {\n        digits[roundAt - 1]++;\n      }\n    }\n\n    // Pad out with zeros to get the required fraction length\n    for (; fractionLen < Math.max(0, fractionSize); fractionLen++) digits.push(0);\n\n\n    // Do any carrying, e.g. a digit was rounded up to 10\n    var carry = digits.reduceRight(function(carry, d, i, digits) {\n      d = d + carry;\n      digits[i] = d % 10;\n      return Math.floor(d / 10);\n    }, 0);\n    if (carry) {\n      digits.unshift(carry);\n      parsedNumber.i++;\n    }\n}\n\n/**\n * Format a number into a string\n * @param  {number} number       The number to format\n * @param  {{\n *           minFrac, // the minimum number of digits required in the fraction part of the number\n *           maxFrac, // the maximum number of digits required in the fraction part of the number\n *           gSize,   // number of digits in each group of separated digits\n *           lgSize,  // number of digits in the last group of digits before the decimal separator\n *           negPre,  // the string to go in front of a negative number (e.g. `-` or `(`))\n *           posPre,  // the string to go in front of a positive number\n *           negSuf,  // the string to go after a negative number (e.g. `)`)\n *           posSuf   // the string to go after a positive number\n *         }} pattern\n * @param  {string} groupSep     The string to separate groups of number (e.g. `,`)\n * @param  {string} decimalSep   The string to act as the decimal separator (e.g. `.`)\n * @param  {[type]} fractionSize The size of the fractional part of the number\n * @return {string}              The number formatted as a string\n */\nfunction formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {\n\n  if (!(isString(number) || isNumber(number)) || isNaN(number)) return '';\n\n  var isInfinity = !isFinite(number);\n  var isZero = false;\n  var numStr = Math.abs(number) + '',\n      formattedText = '',\n      parsedNumber;\n\n  if (isInfinity) {\n    formattedText = '\\u221e';\n  } else {\n    parsedNumber = parse(numStr);\n\n    roundNumber(parsedNumber, fractionSize, pattern.minFrac, pattern.maxFrac);\n\n    var digits = parsedNumber.d;\n    var integerLen = parsedNumber.i;\n    var exponent = parsedNumber.e;\n    var decimals = [];\n    isZero = digits.reduce(function(isZero, d) { return isZero && !d; }, true);\n\n    // pad zeros for small numbers\n    while (integerLen < 0) {\n      digits.unshift(0);\n      integerLen++;\n    }\n\n    // extract decimals digits\n    if (integerLen > 0) {\n      decimals = digits.splice(integerLen);\n    } else {\n      decimals = digits;\n      digits = [0];\n    }\n\n    // format the integer digits with grouping separators\n    var groups = [];\n    if (digits.length >= pattern.lgSize) {\n      groups.unshift(digits.splice(-pattern.lgSize).join(''));\n    }\n    while (digits.length > pattern.gSize) {\n      groups.unshift(digits.splice(-pattern.gSize).join(''));\n    }\n    if (digits.length) {\n      groups.unshift(digits.join(''));\n    }\n    formattedText = groups.join(groupSep);\n\n    // append the decimal digits\n    if (decimals.length) {\n      formattedText += decimalSep + decimals.join('');\n    }\n\n    if (exponent) {\n      formattedText += 'e+' + exponent;\n    }\n  }\n  if (number < 0 && !isZero) {\n    return pattern.negPre + formattedText + pattern.negSuf;\n  } else {\n    return pattern.posPre + formattedText + pattern.posSuf;\n  }\n}\n\nfunction padNumber(num, digits, trim, negWrap) {\n  var neg = '';\n  if (num < 0 || (negWrap && num <= 0)) {\n    if (negWrap) {\n      num = -num + 1;\n    } else {\n      num = -num;\n      neg = '-';\n    }\n  }\n  num = '' + num;\n  while (num.length < digits) num = ZERO_CHAR + num;\n  if (trim) {\n    num = num.substr(num.length - digits);\n  }\n  return neg + num;\n}\n\n\nfunction dateGetter(name, size, offset, trim, negWrap) {\n  offset = offset || 0;\n  return function(date) {\n    var value = date['get' + name]();\n    if (offset > 0 || value > -offset) {\n      value += offset;\n    }\n    if (value === 0 && offset == -12) value = 12;\n    return padNumber(value, size, trim, negWrap);\n  };\n}\n\nfunction dateStrGetter(name, shortForm, standAlone) {\n  return function(date, formats) {\n    var value = date['get' + name]();\n    var propPrefix = (standAlone ? 'STANDALONE' : '') + (shortForm ? 'SHORT' : '');\n    var get = uppercase(propPrefix + name);\n\n    return formats[get][value];\n  };\n}\n\nfunction timeZoneGetter(date, formats, offset) {\n  var zone = -1 * offset;\n  var paddedZone = (zone >= 0) ? \"+\" : \"\";\n\n  paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +\n                padNumber(Math.abs(zone % 60), 2);\n\n  return paddedZone;\n}\n\nfunction getFirstThursdayOfYear(year) {\n    // 0 = index of January\n    var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay();\n    // 4 = index of Thursday (+1 to account for 1st = 5)\n    // 11 = index of *next* Thursday (+1 account for 1st = 12)\n    return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst);\n}\n\nfunction getThursdayThisWeek(datetime) {\n    return new Date(datetime.getFullYear(), datetime.getMonth(),\n      // 4 = index of Thursday\n      datetime.getDate() + (4 - datetime.getDay()));\n}\n\nfunction weekGetter(size) {\n   return function(date) {\n      var firstThurs = getFirstThursdayOfYear(date.getFullYear()),\n         thisThurs = getThursdayThisWeek(date);\n\n      var diff = +thisThurs - +firstThurs,\n         result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n\n      return padNumber(result, size);\n   };\n}\n\nfunction ampmGetter(date, formats) {\n  return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];\n}\n\nfunction eraGetter(date, formats) {\n  return date.getFullYear() <= 0 ? formats.ERAS[0] : formats.ERAS[1];\n}\n\nfunction longEraGetter(date, formats) {\n  return date.getFullYear() <= 0 ? formats.ERANAMES[0] : formats.ERANAMES[1];\n}\n\nvar DATE_FORMATS = {\n  yyyy: dateGetter('FullYear', 4, 0, false, true),\n    yy: dateGetter('FullYear', 2, 0, true, true),\n     y: dateGetter('FullYear', 1, 0, false, true),\n  MMMM: dateStrGetter('Month'),\n   MMM: dateStrGetter('Month', true),\n    MM: dateGetter('Month', 2, 1),\n     M: dateGetter('Month', 1, 1),\n  LLLL: dateStrGetter('Month', false, true),\n    dd: dateGetter('Date', 2),\n     d: dateGetter('Date', 1),\n    HH: dateGetter('Hours', 2),\n     H: dateGetter('Hours', 1),\n    hh: dateGetter('Hours', 2, -12),\n     h: dateGetter('Hours', 1, -12),\n    mm: dateGetter('Minutes', 2),\n     m: dateGetter('Minutes', 1),\n    ss: dateGetter('Seconds', 2),\n     s: dateGetter('Seconds', 1),\n     // while ISO 8601 requires fractions to be prefixed with `.` or `,`\n     // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions\n   sss: dateGetter('Milliseconds', 3),\n  EEEE: dateStrGetter('Day'),\n   EEE: dateStrGetter('Day', true),\n     a: ampmGetter,\n     Z: timeZoneGetter,\n    ww: weekGetter(2),\n     w: weekGetter(1),\n     G: eraGetter,\n     GG: eraGetter,\n     GGG: eraGetter,\n     GGGG: longEraGetter\n};\n\nvar DATE_FORMATS_SPLIT = /((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,\n    NUMBER_STRING = /^\\-?\\d+$/;\n\n/**\n * @ngdoc filter\n * @name date\n * @kind function\n *\n * @description\n *   Formats `date` to a string based on the requested `format`.\n *\n *   `format` string can be composed of the following elements:\n *\n *   * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)\n *   * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n *   * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)\n *   * `'MMMM'`: Month in year (January-December)\n *   * `'MMM'`: Month in year (Jan-Dec)\n *   * `'MM'`: Month in year, padded (01-12)\n *   * `'M'`: Month in year (1-12)\n *   * `'LLLL'`: Stand-alone month in year (January-December)\n *   * `'dd'`: Day in month, padded (01-31)\n *   * `'d'`: Day in month (1-31)\n *   * `'EEEE'`: Day in Week,(Sunday-Saturday)\n *   * `'EEE'`: Day in Week, (Sun-Sat)\n *   * `'HH'`: Hour in day, padded (00-23)\n *   * `'H'`: Hour in day (0-23)\n *   * `'hh'`: Hour in AM/PM, padded (01-12)\n *   * `'h'`: Hour in AM/PM, (1-12)\n *   * `'mm'`: Minute in hour, padded (00-59)\n *   * `'m'`: Minute in hour (0-59)\n *   * `'ss'`: Second in minute, padded (00-59)\n *   * `'s'`: Second in minute (0-59)\n *   * `'sss'`: Millisecond in second, padded (000-999)\n *   * `'a'`: AM/PM marker\n *   * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)\n *   * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year\n *   * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year\n *   * `'G'`, `'GG'`, `'GGG'`: The abbreviated form of the era string (e.g. 'AD')\n *   * `'GGGG'`: The long form of the era string (e.g. 'Anno Domini')\n *\n *   `format` string can also be one of the following predefined\n *   {@link guide/i18n localizable formats}:\n *\n *   * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale\n *     (e.g. Sep 3, 2010 12:05:08 PM)\n *   * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US  locale (e.g. 9/3/10 12:05 PM)\n *   * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US  locale\n *     (e.g. Friday, September 3, 2010)\n *   * `'longDate'`: equivalent to `'MMMM d, y'` for en_US  locale (e.g. September 3, 2010)\n *   * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US  locale (e.g. Sep 3, 2010)\n *   * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)\n *   * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM)\n *   * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM)\n *\n *   `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g.\n *   `\"h 'in the morning'\"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence\n *   (e.g. `\"h 'o''clock'\"`).\n *\n * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or\n *    number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its\n *    shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is\n *    specified in the string input, the time is considered to be in the local timezone.\n * @param {string=} format Formatting rules (see Description). If not specified,\n *    `mediumDate` is used.\n * @param {string=} timezone Timezone to be used for formatting. It understands UTC/GMT and the\n *    continental US time zone abbreviations, but for general use, use a time zone offset, for\n *    example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)\n *    If not specified, the timezone of the browser will be used.\n * @returns {string} Formatted string or the input if input is not recognized as date/millis.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n       <span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:\n           <span>{{1288323623006 | date:'medium'}}</span><br>\n       <span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:\n          <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>\n       <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:\n          <span>{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}</span><br>\n       <span ng-non-bindable>{{1288323623006 | date:\"MM/dd/yyyy 'at' h:mma\"}}</span>:\n          <span>{{'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"}}</span><br>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should format date', function() {\n         expect(element(by.binding(\"1288323623006 | date:'medium'\")).getText()).\n            toMatch(/Oct 2\\d, 2010 \\d{1,2}:\\d{2}:\\d{2} (AM|PM)/);\n         expect(element(by.binding(\"1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'\")).getText()).\n            toMatch(/2010\\-10\\-2\\d \\d{2}:\\d{2}:\\d{2} (\\-|\\+)?\\d{4}/);\n         expect(element(by.binding(\"'1288323623006' | date:'MM/dd/yyyy @ h:mma'\")).getText()).\n            toMatch(/10\\/2\\d\\/2010 @ \\d{1,2}:\\d{2}(AM|PM)/);\n         expect(element(by.binding(\"'1288323623006' | date:\\\"MM/dd/yyyy 'at' h:mma\\\"\")).getText()).\n            toMatch(/10\\/2\\d\\/2010 at \\d{1,2}:\\d{2}(AM|PM)/);\n       });\n     </file>\n   </example>\n */\ndateFilter.$inject = ['$locale'];\nfunction dateFilter($locale) {\n\n\n  var R_ISO8601_STR = /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n                     // 1        2       3         4          5          6          7          8  9     10      11\n  function jsonStringToDate(string) {\n    var match;\n    if (match = string.match(R_ISO8601_STR)) {\n      var date = new Date(0),\n          tzHour = 0,\n          tzMin  = 0,\n          dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n          timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n      if (match[9]) {\n        tzHour = toInt(match[9] + match[10]);\n        tzMin = toInt(match[9] + match[11]);\n      }\n      dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n      var h = toInt(match[4] || 0) - tzHour;\n      var m = toInt(match[5] || 0) - tzMin;\n      var s = toInt(match[6] || 0);\n      var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n      timeSetter.call(date, h, m, s, ms);\n      return date;\n    }\n    return string;\n  }\n\n\n  return function(date, format, timezone) {\n    var text = '',\n        parts = [],\n        fn, match;\n\n    format = format || 'mediumDate';\n    format = $locale.DATETIME_FORMATS[format] || format;\n    if (isString(date)) {\n      date = NUMBER_STRING.test(date) ? toInt(date) : jsonStringToDate(date);\n    }\n\n    if (isNumber(date)) {\n      date = new Date(date);\n    }\n\n    if (!isDate(date) || !isFinite(date.getTime())) {\n      return date;\n    }\n\n    while (format) {\n      match = DATE_FORMATS_SPLIT.exec(format);\n      if (match) {\n        parts = concat(parts, match, 1);\n        format = parts.pop();\n      } else {\n        parts.push(format);\n        format = null;\n      }\n    }\n\n    var dateTimezoneOffset = date.getTimezoneOffset();\n    if (timezone) {\n      dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n      date = convertTimezoneToLocal(date, timezone, true);\n    }\n    forEach(parts, function(value) {\n      fn = DATE_FORMATS[value];\n      text += fn ? fn(date, $locale.DATETIME_FORMATS, dateTimezoneOffset)\n                 : value === \"''\" ? \"'\" : value.replace(/(^'|'$)/g, '').replace(/''/g, \"'\");\n    });\n\n    return text;\n  };\n}\n\n\n/**\n * @ngdoc filter\n * @name json\n * @kind function\n *\n * @description\n *   Allows you to convert a JavaScript object into JSON string.\n *\n *   This filter is mostly useful for debugging. When using the double curly {{value}} notation\n *   the binding is automatically converted to JSON.\n *\n * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.\n * @param {number=} spacing The number of spaces to use per indentation, defaults to 2.\n * @returns {string} JSON string.\n *\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n       <pre id=\"default-spacing\">{{ {'name':'value'} | json }}</pre>\n       <pre id=\"custom-spacing\">{{ {'name':'value'} | json:4 }}</pre>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should jsonify filtered objects', function() {\n         expect(element(by.id('default-spacing')).getText()).toMatch(/\\{\\n  \"name\": ?\"value\"\\n}/);\n         expect(element(by.id('custom-spacing')).getText()).toMatch(/\\{\\n    \"name\": ?\"value\"\\n}/);\n       });\n     </file>\n   </example>\n *\n */\nfunction jsonFilter() {\n  return function(object, spacing) {\n    if (isUndefined(spacing)) {\n        spacing = 2;\n    }\n    return toJson(object, spacing);\n  };\n}\n\n\n/**\n * @ngdoc filter\n * @name lowercase\n * @kind function\n * @description\n * Converts string to lowercase.\n * @see angular.lowercase\n */\nvar lowercaseFilter = valueFn(lowercase);\n\n\n/**\n * @ngdoc filter\n * @name uppercase\n * @kind function\n * @description\n * Converts string to uppercase.\n * @see angular.uppercase\n */\nvar uppercaseFilter = valueFn(uppercase);\n\n/**\n * @ngdoc filter\n * @name limitTo\n * @kind function\n *\n * @description\n * Creates a new array or string containing only a specified number of elements. The elements\n * are taken from either the beginning or the end of the source array, string or number, as specified by\n * the value and sign (positive or negative) of `limit`. If a number is used as input, it is\n * converted to a string.\n *\n * @param {Array|string|number} input Source array, string or number to be limited.\n * @param {string|number} limit The length of the returned array or string. If the `limit` number\n *     is positive, `limit` number of items from the beginning of the source array/string are copied.\n *     If the number is negative, `limit` number  of items from the end of the source array/string\n *     are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined,\n *     the input will be returned unchanged.\n * @param {(string|number)=} begin Index at which to begin limitation. As a negative index, `begin`\n *     indicates an offset from the end of `input`. Defaults to `0`.\n * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array\n *     had less than `limit` elements.\n *\n * @example\n   <example module=\"limitToExample\">\n     <file name=\"index.html\">\n       <script>\n         angular.module('limitToExample', [])\n           .controller('ExampleController', ['$scope', function($scope) {\n             $scope.numbers = [1,2,3,4,5,6,7,8,9];\n             $scope.letters = \"abcdefghi\";\n             $scope.longNumber = 2345432342;\n             $scope.numLimit = 3;\n             $scope.letterLimit = 3;\n             $scope.longNumberLimit = 3;\n           }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n         <label>\n            Limit {{numbers}} to:\n            <input type=\"number\" step=\"1\" ng-model=\"numLimit\">\n         </label>\n         <p>Output numbers: {{ numbers | limitTo:numLimit }}</p>\n         <label>\n            Limit {{letters}} to:\n            <input type=\"number\" step=\"1\" ng-model=\"letterLimit\">\n         </label>\n         <p>Output letters: {{ letters | limitTo:letterLimit }}</p>\n         <label>\n            Limit {{longNumber}} to:\n            <input type=\"number\" step=\"1\" ng-model=\"longNumberLimit\">\n         </label>\n         <p>Output long number: {{ longNumber | limitTo:longNumberLimit }}</p>\n       </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       var numLimitInput = element(by.model('numLimit'));\n       var letterLimitInput = element(by.model('letterLimit'));\n       var longNumberLimitInput = element(by.model('longNumberLimit'));\n       var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));\n       var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));\n       var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit'));\n\n       it('should limit the number array to first three items', function() {\n         expect(numLimitInput.getAttribute('value')).toBe('3');\n         expect(letterLimitInput.getAttribute('value')).toBe('3');\n         expect(longNumberLimitInput.getAttribute('value')).toBe('3');\n         expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');\n         expect(limitedLetters.getText()).toEqual('Output letters: abc');\n         expect(limitedLongNumber.getText()).toEqual('Output long number: 234');\n       });\n\n       // There is a bug in safari and protractor that doesn't like the minus key\n       // it('should update the output when -3 is entered', function() {\n       //   numLimitInput.clear();\n       //   numLimitInput.sendKeys('-3');\n       //   letterLimitInput.clear();\n       //   letterLimitInput.sendKeys('-3');\n       //   longNumberLimitInput.clear();\n       //   longNumberLimitInput.sendKeys('-3');\n       //   expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');\n       //   expect(limitedLetters.getText()).toEqual('Output letters: ghi');\n       //   expect(limitedLongNumber.getText()).toEqual('Output long number: 342');\n       // });\n\n       it('should not exceed the maximum size of input array', function() {\n         numLimitInput.clear();\n         numLimitInput.sendKeys('100');\n         letterLimitInput.clear();\n         letterLimitInput.sendKeys('100');\n         longNumberLimitInput.clear();\n         longNumberLimitInput.sendKeys('100');\n         expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');\n         expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');\n         expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342');\n       });\n     </file>\n   </example>\n*/\nfunction limitToFilter() {\n  return function(input, limit, begin) {\n    if (Math.abs(Number(limit)) === Infinity) {\n      limit = Number(limit);\n    } else {\n      limit = toInt(limit);\n    }\n    if (isNaN(limit)) return input;\n\n    if (isNumber(input)) input = input.toString();\n    if (!isArray(input) && !isString(input)) return input;\n\n    begin = (!begin || isNaN(begin)) ? 0 : toInt(begin);\n    begin = (begin < 0) ? Math.max(0, input.length + begin) : begin;\n\n    if (limit >= 0) {\n      return input.slice(begin, begin + limit);\n    } else {\n      if (begin === 0) {\n        return input.slice(limit, input.length);\n      } else {\n        return input.slice(Math.max(0, begin + limit), begin);\n      }\n    }\n  };\n}\n\n/**\n * @ngdoc filter\n * @name orderBy\n * @kind function\n *\n * @description\n * Orders a specified `array` by the `expression` predicate. It is ordered alphabetically\n * for strings and numerically for numbers. Note: if you notice numbers are not being sorted\n * as expected, make sure they are actually being saved as numbers and not strings.\n * Array-like values (e.g. NodeLists, jQuery objects, TypedArrays, Strings, etc) are also supported.\n *\n * @param {Array} array The array (or array-like object) to sort.\n * @param {function(*)|string|Array.<(function(*)|string)>=} expression A predicate to be\n *    used by the comparator to determine the order of elements.\n *\n *    Can be one of:\n *\n *    - `function`: Getter function. The result of this function will be sorted using the\n *      `<`, `===`, `>` operator.\n *    - `string`: An Angular expression. The result of this expression is used to compare elements\n *      (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by\n *      3 first characters of a property called `name`). The result of a constant expression\n *      is interpreted as a property name to be used in comparisons (for example `\"special name\"`\n *      to sort object by the value of their `special name` property). An expression can be\n *      optionally prefixed with `+` or `-` to control ascending or descending sort order\n *      (for example, `+name` or `-name`). If no property is provided, (e.g. `'+'`) then the array\n *      element itself is used to compare where sorting.\n *    - `Array`: An array of function or string predicates. The first predicate in the array\n *      is used for sorting, but when two items are equivalent, the next predicate is used.\n *\n *    If the predicate is missing or empty then it defaults to `'+'`.\n *\n * @param {boolean=} reverse Reverse the order of the array.\n * @returns {Array} Sorted copy of the source array.\n *\n *\n * @example\n * The example below demonstrates a simple ngRepeat, where the data is sorted\n * by age in descending order (predicate is set to `'-age'`).\n * `reverse` is not set, which means it defaults to `false`.\n   <example module=\"orderByExample\">\n     <file name=\"index.html\">\n       <div ng-controller=\"ExampleController\">\n         <table class=\"friend\">\n           <tr>\n             <th>Name</th>\n             <th>Phone Number</th>\n             <th>Age</th>\n           </tr>\n           <tr ng-repeat=\"friend in friends | orderBy:'-age'\">\n             <td>{{friend.name}}</td>\n             <td>{{friend.phone}}</td>\n             <td>{{friend.age}}</td>\n           </tr>\n         </table>\n       </div>\n     </file>\n     <file name=\"script.js\">\n       angular.module('orderByExample', [])\n         .controller('ExampleController', ['$scope', function($scope) {\n           $scope.friends =\n               [{name:'John', phone:'555-1212', age:10},\n                {name:'Mary', phone:'555-9876', age:19},\n                {name:'Mike', phone:'555-4321', age:21},\n                {name:'Adam', phone:'555-5678', age:35},\n                {name:'Julie', phone:'555-8765', age:29}];\n         }]);\n     </file>\n   </example>\n *\n * The predicate and reverse parameters can be controlled dynamically through scope properties,\n * as shown in the next example.\n * @example\n   <example module=\"orderByExample\">\n     <file name=\"index.html\">\n       <div ng-controller=\"ExampleController\">\n         <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>\n         <hr/>\n         <button ng-click=\"predicate=''\">Set to unsorted</button>\n         <table class=\"friend\">\n           <tr>\n            <th>\n                <button ng-click=\"order('name')\">Name</button>\n                <span class=\"sortorder\" ng-show=\"predicate === 'name'\" ng-class=\"{reverse:reverse}\"></span>\n            </th>\n            <th>\n                <button ng-click=\"order('phone')\">Phone Number</button>\n                <span class=\"sortorder\" ng-show=\"predicate === 'phone'\" ng-class=\"{reverse:reverse}\"></span>\n            </th>\n            <th>\n                <button ng-click=\"order('age')\">Age</button>\n                <span class=\"sortorder\" ng-show=\"predicate === 'age'\" ng-class=\"{reverse:reverse}\"></span>\n            </th>\n           </tr>\n           <tr ng-repeat=\"friend in friends | orderBy:predicate:reverse\">\n             <td>{{friend.name}}</td>\n             <td>{{friend.phone}}</td>\n             <td>{{friend.age}}</td>\n           </tr>\n         </table>\n       </div>\n     </file>\n     <file name=\"script.js\">\n       angular.module('orderByExample', [])\n         .controller('ExampleController', ['$scope', function($scope) {\n           $scope.friends =\n               [{name:'John', phone:'555-1212', age:10},\n                {name:'Mary', phone:'555-9876', age:19},\n                {name:'Mike', phone:'555-4321', age:21},\n                {name:'Adam', phone:'555-5678', age:35},\n                {name:'Julie', phone:'555-8765', age:29}];\n           $scope.predicate = 'age';\n           $scope.reverse = true;\n           $scope.order = function(predicate) {\n             $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;\n             $scope.predicate = predicate;\n           };\n         }]);\n      </file>\n     <file name=\"style.css\">\n       .sortorder:after {\n         content: '\\25b2';\n       }\n       .sortorder.reverse:after {\n         content: '\\25bc';\n       }\n     </file>\n   </example>\n *\n * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the\n * filter routine with `$filter('orderBy')`, and calling the returned filter routine with the\n * desired parameters.\n *\n * Example:\n *\n * @example\n  <example module=\"orderByExample\">\n    <file name=\"index.html\">\n    <div ng-controller=\"ExampleController\">\n      <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>\n      <table class=\"friend\">\n        <tr>\n          <th>\n              <button ng-click=\"order('name')\">Name</button>\n              <span class=\"sortorder\" ng-show=\"predicate === 'name'\" ng-class=\"{reverse:reverse}\"></span>\n          </th>\n          <th>\n              <button ng-click=\"order('phone')\">Phone Number</button>\n              <span class=\"sortorder\" ng-show=\"predicate === 'phone'\" ng-class=\"{reverse:reverse}\"></span>\n          </th>\n          <th>\n              <button ng-click=\"order('age')\">Age</button>\n              <span class=\"sortorder\" ng-show=\"predicate === 'age'\" ng-class=\"{reverse:reverse}\"></span>\n          </th>\n        </tr>\n        <tr ng-repeat=\"friend in friends\">\n          <td>{{friend.name}}</td>\n          <td>{{friend.phone}}</td>\n          <td>{{friend.age}}</td>\n        </tr>\n      </table>\n    </div>\n    </file>\n\n    <file name=\"script.js\">\n      angular.module('orderByExample', [])\n        .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {\n          var orderBy = $filter('orderBy');\n          $scope.friends = [\n            { name: 'John',    phone: '555-1212',    age: 10 },\n            { name: 'Mary',    phone: '555-9876',    age: 19 },\n            { name: 'Mike',    phone: '555-4321',    age: 21 },\n            { name: 'Adam',    phone: '555-5678',    age: 35 },\n            { name: 'Julie',   phone: '555-8765',    age: 29 }\n          ];\n          $scope.order = function(predicate) {\n            $scope.predicate = predicate;\n            $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;\n            $scope.friends = orderBy($scope.friends, predicate, $scope.reverse);\n          };\n          $scope.order('age', true);\n        }]);\n    </file>\n\n    <file name=\"style.css\">\n       .sortorder:after {\n         content: '\\25b2';\n       }\n       .sortorder.reverse:after {\n         content: '\\25bc';\n       }\n    </file>\n</example>\n */\norderByFilter.$inject = ['$parse'];\nfunction orderByFilter($parse) {\n  return function(array, sortPredicate, reverseOrder) {\n\n    if (array == null) return array;\n    if (!isArrayLike(array)) {\n      throw minErr('orderBy')('notarray', 'Expected array but received: {0}', array);\n    }\n\n    if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; }\n    if (sortPredicate.length === 0) { sortPredicate = ['+']; }\n\n    var predicates = processPredicates(sortPredicate, reverseOrder);\n    // Add a predicate at the end that evaluates to the element index. This makes the\n    // sort stable as it works as a tie-breaker when all the input predicates cannot\n    // distinguish between two elements.\n    predicates.push({ get: function() { return {}; }, descending: reverseOrder ? -1 : 1});\n\n    // The next three lines are a version of a Swartzian Transform idiom from Perl\n    // (sometimes called the Decorate-Sort-Undecorate idiom)\n    // See https://en.wikipedia.org/wiki/Schwartzian_transform\n    var compareValues = Array.prototype.map.call(array, getComparisonObject);\n    compareValues.sort(doComparison);\n    array = compareValues.map(function(item) { return item.value; });\n\n    return array;\n\n    function getComparisonObject(value, index) {\n      return {\n        value: value,\n        predicateValues: predicates.map(function(predicate) {\n          return getPredicateValue(predicate.get(value), index);\n        })\n      };\n    }\n\n    function doComparison(v1, v2) {\n      var result = 0;\n      for (var index=0, length = predicates.length; index < length; ++index) {\n        result = compare(v1.predicateValues[index], v2.predicateValues[index]) * predicates[index].descending;\n        if (result) break;\n      }\n      return result;\n    }\n  };\n\n  function processPredicates(sortPredicate, reverseOrder) {\n    reverseOrder = reverseOrder ? -1 : 1;\n    return sortPredicate.map(function(predicate) {\n      var descending = 1, get = identity;\n\n      if (isFunction(predicate)) {\n        get = predicate;\n      } else if (isString(predicate)) {\n        if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {\n          descending = predicate.charAt(0) == '-' ? -1 : 1;\n          predicate = predicate.substring(1);\n        }\n        if (predicate !== '') {\n          get = $parse(predicate);\n          if (get.constant) {\n            var key = get();\n            get = function(value) { return value[key]; };\n          }\n        }\n      }\n      return { get: get, descending: descending * reverseOrder };\n    });\n  }\n\n  function isPrimitive(value) {\n    switch (typeof value) {\n      case 'number': /* falls through */\n      case 'boolean': /* falls through */\n      case 'string':\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function objectValue(value, index) {\n    // If `valueOf` is a valid function use that\n    if (typeof value.valueOf === 'function') {\n      value = value.valueOf();\n      if (isPrimitive(value)) return value;\n    }\n    // If `toString` is a valid function and not the one from `Object.prototype` use that\n    if (hasCustomToString(value)) {\n      value = value.toString();\n      if (isPrimitive(value)) return value;\n    }\n    // We have a basic object so we use the position of the object in the collection\n    return index;\n  }\n\n  function getPredicateValue(value, index) {\n    var type = typeof value;\n    if (value === null) {\n      type = 'string';\n      value = 'null';\n    } else if (type === 'string') {\n      value = value.toLowerCase();\n    } else if (type === 'object') {\n      value = objectValue(value, index);\n    }\n    return { value: value, type: type };\n  }\n\n  function compare(v1, v2) {\n    var result = 0;\n    if (v1.type === v2.type) {\n      if (v1.value !== v2.value) {\n        result = v1.value < v2.value ? -1 : 1;\n      }\n    } else {\n      result = v1.type < v2.type ? -1 : 1;\n    }\n    return result;\n  }\n}\n\nfunction ngDirective(directive) {\n  if (isFunction(directive)) {\n    directive = {\n      link: directive\n    };\n  }\n  directive.restrict = directive.restrict || 'AC';\n  return valueFn(directive);\n}\n\n/**\n * @ngdoc directive\n * @name a\n * @restrict E\n *\n * @description\n * Modifies the default behavior of the html A tag so that the default action is prevented when\n * the href attribute is empty.\n *\n * This change permits the easy creation of action links with the `ngClick` directive\n * without changing the location or causing page reloads, e.g.:\n * `<a href=\"\" ng-click=\"list.addItem()\">Add Item</a>`\n */\nvar htmlAnchorDirective = valueFn({\n  restrict: 'E',\n  compile: function(element, attr) {\n    if (!attr.href && !attr.xlinkHref) {\n      return function(scope, element) {\n        // If the linked element is not an anchor tag anymore, do nothing\n        if (element[0].nodeName.toLowerCase() !== 'a') return;\n\n        // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n        var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\n                   'xlink:href' : 'href';\n        element.on('click', function(event) {\n          // if we have no href url, then don't navigate anywhere.\n          if (!element.attr(href)) {\n            event.preventDefault();\n          }\n        });\n      };\n    }\n  }\n});\n\n/**\n * @ngdoc directive\n * @name ngHref\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in an href attribute will\n * make the link go to the wrong URL if the user clicks it before\n * Angular has a chance to replace the `{{hash}}` markup with its\n * value. Until Angular replaces the markup the link will be broken\n * and will most likely return a 404 error. The `ngHref` directive\n * solves this problem.\n *\n * The wrong way to write it:\n * ```html\n * <a href=\"http://www.gravatar.com/avatar/{{hash}}\">link1</a>\n * ```\n *\n * The correct way to write it:\n * ```html\n * <a ng-href=\"http://www.gravatar.com/avatar/{{hash}}\">link1</a>\n * ```\n *\n * @element A\n * @param {template} ngHref any string which can contain `{{}}` markup.\n *\n * @example\n * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes\n * in links and their different behaviors:\n    <example>\n      <file name=\"index.html\">\n        <input ng-model=\"value\" /><br />\n        <a id=\"link-1\" href ng-click=\"value = 1\">link 1</a> (link, don't reload)<br />\n        <a id=\"link-2\" href=\"\" ng-click=\"value = 2\">link 2</a> (link, don't reload)<br />\n        <a id=\"link-3\" ng-href=\"/{{'123'}}\">link 3</a> (link, reload!)<br />\n        <a id=\"link-4\" href=\"\" name=\"xx\" ng-click=\"value = 4\">anchor</a> (link, don't reload)<br />\n        <a id=\"link-5\" name=\"xxx\" ng-click=\"value = 5\">anchor</a> (no link)<br />\n        <a id=\"link-6\" ng-href=\"{{value}}\">link</a> (link, change location)\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should execute ng-click but not reload when href without value', function() {\n          element(by.id('link-1')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('1');\n          expect(element(by.id('link-1')).getAttribute('href')).toBe('');\n        });\n\n        it('should execute ng-click but not reload when href empty string', function() {\n          element(by.id('link-2')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('2');\n          expect(element(by.id('link-2')).getAttribute('href')).toBe('');\n        });\n\n        it('should execute ng-click and change url when ng-href specified', function() {\n          expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\\/123$/);\n\n          element(by.id('link-3')).click();\n\n          // At this point, we navigate away from an Angular page, so we need\n          // to use browser.driver to get the base webdriver.\n\n          browser.wait(function() {\n            return browser.driver.getCurrentUrl().then(function(url) {\n              return url.match(/\\/123$/);\n            });\n          }, 5000, 'page should navigate to /123');\n        });\n\n        it('should execute ng-click but not reload when href empty string and name specified', function() {\n          element(by.id('link-4')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('4');\n          expect(element(by.id('link-4')).getAttribute('href')).toBe('');\n        });\n\n        it('should execute ng-click but not reload when no href but name specified', function() {\n          element(by.id('link-5')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('5');\n          expect(element(by.id('link-5')).getAttribute('href')).toBe(null);\n        });\n\n        it('should only change url when only ng-href', function() {\n          element(by.model('value')).clear();\n          element(by.model('value')).sendKeys('6');\n          expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\\/6$/);\n\n          element(by.id('link-6')).click();\n\n          // At this point, we navigate away from an Angular page, so we need\n          // to use browser.driver to get the base webdriver.\n          browser.wait(function() {\n            return browser.driver.getCurrentUrl().then(function(url) {\n              return url.match(/\\/6$/);\n            });\n          }, 5000, 'page should navigate to /6');\n        });\n      </file>\n    </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngSrc\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `src` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrc` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * <img src=\"http://www.gravatar.com/avatar/{{hash}}\" alt=\"Description\"/>\n * ```\n *\n * The correct way to write it:\n * ```html\n * <img ng-src=\"http://www.gravatar.com/avatar/{{hash}}\" alt=\"Description\" />\n * ```\n *\n * @element IMG\n * @param {template} ngSrc any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngSrcset\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrcset` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * <img srcset=\"http://www.gravatar.com/avatar/{{hash}} 2x\" alt=\"Description\"/>\n * ```\n *\n * The correct way to write it:\n * ```html\n * <img ng-srcset=\"http://www.gravatar.com/avatar/{{hash}} 2x\" alt=\"Description\" />\n * ```\n *\n * @element IMG\n * @param {template} ngSrcset any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngDisabled\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * This directive sets the `disabled` attribute on the element if the\n * {@link guide/expression expression} inside `ngDisabled` evaluates to truthy.\n *\n * A special directive is necessary because we cannot use interpolation inside the `disabled`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n    <example>\n      <file name=\"index.html\">\n        <label>Click me to toggle: <input type=\"checkbox\" ng-model=\"checked\"></label><br/>\n        <button ng-model=\"button\" ng-disabled=\"checked\">Button</button>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should toggle button', function() {\n          expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();\n          element(by.model('checked')).click();\n          expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();\n        });\n      </file>\n    </example>\n *\n * @element INPUT\n * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,\n *     then the `disabled` attribute will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngChecked\n * @restrict A\n * @priority 100\n *\n * @description\n * Sets the `checked` attribute on the element, if the expression inside `ngChecked` is truthy.\n *\n * Note that this directive should not be used together with {@link ngModel `ngModel`},\n * as this can lead to unexpected behavior.\n *\n * A special directive is necessary because we cannot use interpolation inside the `checked`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n    <example>\n      <file name=\"index.html\">\n        <label>Check me to check both: <input type=\"checkbox\" ng-model=\"master\"></label><br/>\n        <input id=\"checkSlave\" type=\"checkbox\" ng-checked=\"master\" aria-label=\"Slave input\">\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should check both checkBoxes', function() {\n          expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();\n          element(by.model('master')).click();\n          expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();\n        });\n      </file>\n    </example>\n *\n * @element INPUT\n * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,\n *     then the `checked` attribute will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngReadonly\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * Sets the `readOnly` attribute on the element, if the expression inside `ngReadonly` is truthy.\n *\n * A special directive is necessary because we cannot use interpolation inside the `readOnly`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n    <example>\n      <file name=\"index.html\">\n        <label>Check me to make text readonly: <input type=\"checkbox\" ng-model=\"checked\"></label><br/>\n        <input type=\"text\" ng-readonly=\"checked\" value=\"I'm Angular\" aria-label=\"Readonly field\" />\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should toggle readonly attr', function() {\n          expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeFalsy();\n          element(by.model('checked')).click();\n          expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeTruthy();\n        });\n      </file>\n    </example>\n *\n * @element INPUT\n * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,\n *     then special attribute \"readonly\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngSelected\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * Sets the `selected` attribute on the element, if the expression inside `ngSelected` is truthy.\n *\n * A special directive is necessary because we cannot use interpolation inside the `selected`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n    <example>\n      <file name=\"index.html\">\n        <label>Check me to select: <input type=\"checkbox\" ng-model=\"selected\"></label><br/>\n        <select aria-label=\"ngSelected demo\">\n          <option>Hello!</option>\n          <option id=\"greet\" ng-selected=\"selected\">Greetings!</option>\n        </select>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should select Greetings!', function() {\n          expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();\n          element(by.model('selected')).click();\n          expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();\n        });\n      </file>\n    </example>\n *\n * @element OPTION\n * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,\n *     then special attribute \"selected\" will be set on the element\n */\n\n/**\n * @ngdoc directive\n * @name ngOpen\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * Sets the `open` attribute on the element, if the expression inside `ngOpen` is truthy.\n *\n * A special directive is necessary because we cannot use interpolation inside the `open`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n     <example>\n       <file name=\"index.html\">\n         <label>Check me check multiple: <input type=\"checkbox\" ng-model=\"open\"></label><br/>\n         <details id=\"details\" ng-open=\"open\">\n            <summary>Show/Hide me</summary>\n         </details>\n       </file>\n       <file name=\"protractor.js\" type=\"protractor\">\n         it('should toggle open', function() {\n           expect(element(by.id('details')).getAttribute('open')).toBeFalsy();\n           element(by.model('open')).click();\n           expect(element(by.id('details')).getAttribute('open')).toBeTruthy();\n         });\n       </file>\n     </example>\n *\n * @element DETAILS\n * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,\n *     then special attribute \"open\" will be set on the element\n */\n\nvar ngAttributeAliasDirectives = {};\n\n// boolean attrs are evaluated\nforEach(BOOLEAN_ATTR, function(propName, attrName) {\n  // binding to multiple is not supported\n  if (propName == \"multiple\") return;\n\n  function defaultLinkFn(scope, element, attr) {\n    scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {\n      attr.$set(attrName, !!value);\n    });\n  }\n\n  var normalized = directiveNormalize('ng-' + attrName);\n  var linkFn = defaultLinkFn;\n\n  if (propName === 'checked') {\n    linkFn = function(scope, element, attr) {\n      // ensuring ngChecked doesn't interfere with ngModel when both are set on the same input\n      if (attr.ngModel !== attr[normalized]) {\n        defaultLinkFn(scope, element, attr);\n      }\n    };\n  }\n\n  ngAttributeAliasDirectives[normalized] = function() {\n    return {\n      restrict: 'A',\n      priority: 100,\n      link: linkFn\n    };\n  };\n});\n\n// aliased input attrs are evaluated\nforEach(ALIASED_ATTR, function(htmlAttr, ngAttr) {\n  ngAttributeAliasDirectives[ngAttr] = function() {\n    return {\n      priority: 100,\n      link: function(scope, element, attr) {\n        //special case ngPattern when a literal regular expression value\n        //is used as the expression (this way we don't have to watch anything).\n        if (ngAttr === \"ngPattern\" && attr.ngPattern.charAt(0) == \"/\") {\n          var match = attr.ngPattern.match(REGEX_STRING_REGEXP);\n          if (match) {\n            attr.$set(\"ngPattern\", new RegExp(match[1], match[2]));\n            return;\n          }\n        }\n\n        scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) {\n          attr.$set(ngAttr, value);\n        });\n      }\n    };\n  };\n});\n\n// ng-src, ng-srcset, ng-href are interpolated\nforEach(['src', 'srcset', 'href'], function(attrName) {\n  var normalized = directiveNormalize('ng-' + attrName);\n  ngAttributeAliasDirectives[normalized] = function() {\n    return {\n      priority: 99, // it needs to run after the attributes are interpolated\n      link: function(scope, element, attr) {\n        var propName = attrName,\n            name = attrName;\n\n        if (attrName === 'href' &&\n            toString.call(element.prop('href')) === '[object SVGAnimatedString]') {\n          name = 'xlinkHref';\n          attr.$attr[name] = 'xlink:href';\n          propName = null;\n        }\n\n        attr.$observe(normalized, function(value) {\n          if (!value) {\n            if (attrName === 'href') {\n              attr.$set(name, null);\n            }\n            return;\n          }\n\n          attr.$set(name, value);\n\n          // on IE, if \"ng:src\" directive declaration is used and \"src\" attribute doesn't exist\n          // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need\n          // to set the property as well to achieve the desired effect.\n          // we use attr[attrName] value since $set can sanitize the url.\n          if (msie && propName) element.prop(propName, attr[name]);\n        });\n      }\n    };\n  };\n});\n\n/* global -nullFormCtrl, -SUBMITTED_CLASS, addSetValidityMethod: true\n */\nvar nullFormCtrl = {\n  $addControl: noop,\n  $$renameControl: nullFormRenameControl,\n  $removeControl: noop,\n  $setValidity: noop,\n  $setDirty: noop,\n  $setPristine: noop,\n  $setSubmitted: noop\n},\nSUBMITTED_CLASS = 'ng-submitted';\n\nfunction nullFormRenameControl(control, name) {\n  control.$name = name;\n}\n\n/**\n * @ngdoc type\n * @name form.FormController\n *\n * @property {boolean} $pristine True if user has not interacted with the form yet.\n * @property {boolean} $dirty True if user has already interacted with the form.\n * @property {boolean} $valid True if all of the containing forms and controls are valid.\n * @property {boolean} $invalid True if at least one containing control or form is invalid.\n * @property {boolean} $pending True if at least one containing control or form is pending.\n * @property {boolean} $submitted True if user has submitted the form even if its invalid.\n *\n * @property {Object} $error Is an object hash, containing references to controls or\n *  forms with failing validators, where:\n *\n *  - keys are validation tokens (error names),\n *  - values are arrays of controls or forms that have a failing validator for given error name.\n *\n *  Built-in validation tokens:\n *\n *  - `email`\n *  - `max`\n *  - `maxlength`\n *  - `min`\n *  - `minlength`\n *  - `number`\n *  - `pattern`\n *  - `required`\n *  - `url`\n *  - `date`\n *  - `datetimelocal`\n *  - `time`\n *  - `week`\n *  - `month`\n *\n * @description\n * `FormController` keeps track of all its controls and nested forms as well as the state of them,\n * such as being valid/invalid or dirty/pristine.\n *\n * Each {@link ng.directive:form form} directive creates an instance\n * of `FormController`.\n *\n */\n//asks for $scope to fool the BC controller module\nFormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate'];\nfunction FormController(element, attrs, $scope, $animate, $interpolate) {\n  var form = this,\n      controls = [];\n\n  // init state\n  form.$error = {};\n  form.$$success = {};\n  form.$pending = undefined;\n  form.$name = $interpolate(attrs.name || attrs.ngForm || '')($scope);\n  form.$dirty = false;\n  form.$pristine = true;\n  form.$valid = true;\n  form.$invalid = false;\n  form.$submitted = false;\n  form.$$parentForm = nullFormCtrl;\n\n  /**\n   * @ngdoc method\n   * @name form.FormController#$rollbackViewValue\n   *\n   * @description\n   * Rollback all form controls pending updates to the `$modelValue`.\n   *\n   * Updates may be pending by a debounced event or because the input is waiting for a some future\n   * event defined in `ng-model-options`. This method is typically needed by the reset button of\n   * a form that uses `ng-model-options` to pend updates.\n   */\n  form.$rollbackViewValue = function() {\n    forEach(controls, function(control) {\n      control.$rollbackViewValue();\n    });\n  };\n\n  /**\n   * @ngdoc method\n   * @name form.FormController#$commitViewValue\n   *\n   * @description\n   * Commit all form controls pending updates to the `$modelValue`.\n   *\n   * Updates may be pending by a debounced event or because the input is waiting for a some future\n   * event defined in `ng-model-options`. This method is rarely needed as `NgModelController`\n   * usually handles calling this in response to input events.\n   */\n  form.$commitViewValue = function() {\n    forEach(controls, function(control) {\n      control.$commitViewValue();\n    });\n  };\n\n  /**\n   * @ngdoc method\n   * @name form.FormController#$addControl\n   * @param {object} control control object, either a {@link form.FormController} or an\n   * {@link ngModel.NgModelController}\n   *\n   * @description\n   * Register a control with the form. Input elements using ngModelController do this automatically\n   * when they are linked.\n   *\n   * Note that the current state of the control will not be reflected on the new parent form. This\n   * is not an issue with normal use, as freshly compiled and linked controls are in a `$pristine`\n   * state.\n   *\n   * However, if the method is used programmatically, for example by adding dynamically created controls,\n   * or controls that have been previously removed without destroying their corresponding DOM element,\n   * it's the developers responsibility to make sure the current state propagates to the parent form.\n   *\n   * For example, if an input control is added that is already `$dirty` and has `$error` properties,\n   * calling `$setDirty()` and `$validate()` afterwards will propagate the state to the parent form.\n   */\n  form.$addControl = function(control) {\n    // Breaking change - before, inputs whose name was \"hasOwnProperty\" were quietly ignored\n    // and not added to the scope.  Now we throw an error.\n    assertNotHasOwnProperty(control.$name, 'input');\n    controls.push(control);\n\n    if (control.$name) {\n      form[control.$name] = control;\n    }\n\n    control.$$parentForm = form;\n  };\n\n  // Private API: rename a form control\n  form.$$renameControl = function(control, newName) {\n    var oldName = control.$name;\n\n    if (form[oldName] === control) {\n      delete form[oldName];\n    }\n    form[newName] = control;\n    control.$name = newName;\n  };\n\n  /**\n   * @ngdoc method\n   * @name form.FormController#$removeControl\n   * @param {object} control control object, either a {@link form.FormController} or an\n   * {@link ngModel.NgModelController}\n   *\n   * @description\n   * Deregister a control from the form.\n   *\n   * Input elements using ngModelController do this automatically when they are destroyed.\n   *\n   * Note that only the removed control's validation state (`$errors`etc.) will be removed from the\n   * form. `$dirty`, `$submitted` states will not be changed, because the expected behavior can be\n   * different from case to case. For example, removing the only `$dirty` control from a form may or\n   * may not mean that the form is still `$dirty`.\n   */\n  form.$removeControl = function(control) {\n    if (control.$name && form[control.$name] === control) {\n      delete form[control.$name];\n    }\n    forEach(form.$pending, function(value, name) {\n      form.$setValidity(name, null, control);\n    });\n    forEach(form.$error, function(value, name) {\n      form.$setValidity(name, null, control);\n    });\n    forEach(form.$$success, function(value, name) {\n      form.$setValidity(name, null, control);\n    });\n\n    arrayRemove(controls, control);\n    control.$$parentForm = nullFormCtrl;\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name form.FormController#$setValidity\n   *\n   * @description\n   * Sets the validity of a form control.\n   *\n   * This method will also propagate to parent forms.\n   */\n  addSetValidityMethod({\n    ctrl: this,\n    $element: element,\n    set: function(object, property, controller) {\n      var list = object[property];\n      if (!list) {\n        object[property] = [controller];\n      } else {\n        var index = list.indexOf(controller);\n        if (index === -1) {\n          list.push(controller);\n        }\n      }\n    },\n    unset: function(object, property, controller) {\n      var list = object[property];\n      if (!list) {\n        return;\n      }\n      arrayRemove(list, controller);\n      if (list.length === 0) {\n        delete object[property];\n      }\n    },\n    $animate: $animate\n  });\n\n  /**\n   * @ngdoc method\n   * @name form.FormController#$setDirty\n   *\n   * @description\n   * Sets the form to a dirty state.\n   *\n   * This method can be called to add the 'ng-dirty' class and set the form to a dirty\n   * state (ng-dirty class). This method will also propagate to parent forms.\n   */\n  form.$setDirty = function() {\n    $animate.removeClass(element, PRISTINE_CLASS);\n    $animate.addClass(element, DIRTY_CLASS);\n    form.$dirty = true;\n    form.$pristine = false;\n    form.$$parentForm.$setDirty();\n  };\n\n  /**\n   * @ngdoc method\n   * @name form.FormController#$setPristine\n   *\n   * @description\n   * Sets the form to its pristine state.\n   *\n   * This method can be called to remove the 'ng-dirty' class and set the form to its pristine\n   * state (ng-pristine class). This method will also propagate to all the controls contained\n   * in this form.\n   *\n   * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after\n   * saving or resetting it.\n   */\n  form.$setPristine = function() {\n    $animate.setClass(element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS);\n    form.$dirty = false;\n    form.$pristine = true;\n    form.$submitted = false;\n    forEach(controls, function(control) {\n      control.$setPristine();\n    });\n  };\n\n  /**\n   * @ngdoc method\n   * @name form.FormController#$setUntouched\n   *\n   * @description\n   * Sets the form to its untouched state.\n   *\n   * This method can be called to remove the 'ng-touched' class and set the form controls to their\n   * untouched state (ng-untouched class).\n   *\n   * Setting a form controls back to their untouched state is often useful when setting the form\n   * back to its pristine state.\n   */\n  form.$setUntouched = function() {\n    forEach(controls, function(control) {\n      control.$setUntouched();\n    });\n  };\n\n  /**\n   * @ngdoc method\n   * @name form.FormController#$setSubmitted\n   *\n   * @description\n   * Sets the form to its submitted state.\n   */\n  form.$setSubmitted = function() {\n    $animate.addClass(element, SUBMITTED_CLASS);\n    form.$submitted = true;\n    form.$$parentForm.$setSubmitted();\n  };\n}\n\n/**\n * @ngdoc directive\n * @name ngForm\n * @restrict EAC\n *\n * @description\n * Nestable alias of {@link ng.directive:form `form`} directive. HTML\n * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a\n * sub-group of controls needs to be determined.\n *\n * Note: the purpose of `ngForm` is to group controls,\n * but not to be a replacement for the `<form>` tag with all of its capabilities\n * (e.g. posting to the server, ...).\n *\n * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into\n *                       related scope, under this name.\n *\n */\n\n /**\n * @ngdoc directive\n * @name form\n * @restrict E\n *\n * @description\n * Directive that instantiates\n * {@link form.FormController FormController}.\n *\n * If the `name` attribute is specified, the form controller is published onto the current scope under\n * this name.\n *\n * # Alias: {@link ng.directive:ngForm `ngForm`}\n *\n * In Angular, forms can be nested. This means that the outer form is valid when all of the child\n * forms are valid as well. However, browsers do not allow nesting of `<form>` elements, so\n * Angular provides the {@link ng.directive:ngForm `ngForm`} directive, which behaves identically to\n * `form` but can be nested. Nested forms can be useful, for example, if the validity of a sub-group\n * of controls needs to be determined.\n *\n * # CSS classes\n *  - `ng-valid` is set if the form is valid.\n *  - `ng-invalid` is set if the form is invalid.\n *  - `ng-pending` is set if the form is pending.\n *  - `ng-pristine` is set if the form is pristine.\n *  - `ng-dirty` is set if the form is dirty.\n *  - `ng-submitted` is set if the form was submitted.\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n *\n * # Submitting a form and preventing the default action\n *\n * Since the role of forms in client-side Angular applications is different than in classical\n * roundtrip apps, it is desirable for the browser not to translate the form submission into a full\n * page reload that sends the data to the server. Instead some javascript logic should be triggered\n * to handle the form submission in an application-specific way.\n *\n * For this reason, Angular prevents the default action (form submission to the server) unless the\n * `<form>` element has an `action` attribute specified.\n *\n * You can use one of the following two ways to specify what javascript method should be called when\n * a form is submitted:\n *\n * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element\n * - {@link ng.directive:ngClick ngClick} directive on the first\n  *  button or input field of type submit (input[type=submit])\n *\n * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}\n * or {@link ng.directive:ngClick ngClick} directives.\n * This is because of the following form submission rules in the HTML specification:\n *\n * - If a form has only one input field then hitting enter in this field triggers form submit\n * (`ngSubmit`)\n * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter\n * doesn't trigger submit\n * - if a form has one or more input fields and one or more buttons or input[type=submit] then\n * hitting enter in any of the input fields will trigger the click handler on the *first* button or\n * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)\n *\n * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is\n * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * ## Animation Hooks\n *\n * Animations in ngForm are triggered when any of the associated CSS classes are added and removed.\n * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any\n * other validations that are performed within the form. Animations in ngForm are similar to how\n * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well\n * as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style a form element\n * that has been rendered as invalid after it has been validated:\n *\n * <pre>\n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-form {\n *   transition:0.5s linear all;\n *   background: white;\n * }\n * .my-form.ng-invalid {\n *   background: red;\n *   color:white;\n * }\n * </pre>\n *\n * @example\n    <example deps=\"angular-animate.js\" animations=\"true\" fixBase=\"true\" module=\"formExample\">\n      <file name=\"index.html\">\n       <script>\n         angular.module('formExample', [])\n           .controller('FormController', ['$scope', function($scope) {\n             $scope.userType = 'guest';\n           }]);\n       </script>\n       <style>\n        .my-form {\n          transition:all linear 0.5s;\n          background: transparent;\n        }\n        .my-form.ng-invalid {\n          background: red;\n        }\n       </style>\n       <form name=\"myForm\" ng-controller=\"FormController\" class=\"my-form\">\n         userType: <input name=\"input\" ng-model=\"userType\" required>\n         <span class=\"error\" ng-show=\"myForm.input.$error.required\">Required!</span><br>\n         <code>userType = {{userType}}</code><br>\n         <code>myForm.input.$valid = {{myForm.input.$valid}}</code><br>\n         <code>myForm.input.$error = {{myForm.input.$error}}</code><br>\n         <code>myForm.$valid = {{myForm.$valid}}</code><br>\n         <code>myForm.$error.required = {{!!myForm.$error.required}}</code><br>\n        </form>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should initialize to model', function() {\n          var userType = element(by.binding('userType'));\n          var valid = element(by.binding('myForm.input.$valid'));\n\n          expect(userType.getText()).toContain('guest');\n          expect(valid.getText()).toContain('true');\n        });\n\n        it('should be invalid if empty', function() {\n          var userType = element(by.binding('userType'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var userInput = element(by.model('userType'));\n\n          userInput.clear();\n          userInput.sendKeys('');\n\n          expect(userType.getText()).toEqual('userType =');\n          expect(valid.getText()).toContain('false');\n        });\n      </file>\n    </example>\n *\n * @param {string=} name Name of the form. If specified, the form controller will be published into\n *                       related scope, under this name.\n */\nvar formDirectiveFactory = function(isNgForm) {\n  return ['$timeout', '$parse', function($timeout, $parse) {\n    var formDirective = {\n      name: 'form',\n      restrict: isNgForm ? 'EAC' : 'E',\n      require: ['form', '^^?form'], //first is the form's own ctrl, second is an optional parent form\n      controller: FormController,\n      compile: function ngFormCompile(formElement, attr) {\n        // Setup initial state of the control\n        formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS);\n\n        var nameAttr = attr.name ? 'name' : (isNgForm && attr.ngForm ? 'ngForm' : false);\n\n        return {\n          pre: function ngFormPreLink(scope, formElement, attr, ctrls) {\n            var controller = ctrls[0];\n\n            // if `action` attr is not present on the form, prevent the default action (submission)\n            if (!('action' in attr)) {\n              // we can't use jq events because if a form is destroyed during submission the default\n              // action is not prevented. see #1238\n              //\n              // IE 9 is not affected because it doesn't fire a submit event and try to do a full\n              // page reload if the form was destroyed by submission of the form via a click handler\n              // on a button in the form. Looks like an IE9 specific bug.\n              var handleFormSubmission = function(event) {\n                scope.$apply(function() {\n                  controller.$commitViewValue();\n                  controller.$setSubmitted();\n                });\n\n                event.preventDefault();\n              };\n\n              addEventListenerFn(formElement[0], 'submit', handleFormSubmission);\n\n              // unregister the preventDefault listener so that we don't not leak memory but in a\n              // way that will achieve the prevention of the default action.\n              formElement.on('$destroy', function() {\n                $timeout(function() {\n                  removeEventListenerFn(formElement[0], 'submit', handleFormSubmission);\n                }, 0, false);\n              });\n            }\n\n            var parentFormCtrl = ctrls[1] || controller.$$parentForm;\n            parentFormCtrl.$addControl(controller);\n\n            var setter = nameAttr ? getSetter(controller.$name) : noop;\n\n            if (nameAttr) {\n              setter(scope, controller);\n              attr.$observe(nameAttr, function(newValue) {\n                if (controller.$name === newValue) return;\n                setter(scope, undefined);\n                controller.$$parentForm.$$renameControl(controller, newValue);\n                setter = getSetter(controller.$name);\n                setter(scope, controller);\n              });\n            }\n            formElement.on('$destroy', function() {\n              controller.$$parentForm.$removeControl(controller);\n              setter(scope, undefined);\n              extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards\n            });\n          }\n        };\n      }\n    };\n\n    return formDirective;\n\n    function getSetter(expression) {\n      if (expression === '') {\n        //create an assignable expression, so forms with an empty name can be renamed later\n        return $parse('this[\"\"]').assign;\n      }\n      return $parse(expression).assign || noop;\n    }\n  }];\n};\n\nvar formDirective = formDirectiveFactory();\nvar ngFormDirective = formDirectiveFactory(true);\n\n/* global VALID_CLASS: false,\n  INVALID_CLASS: false,\n  PRISTINE_CLASS: false,\n  DIRTY_CLASS: false,\n  UNTOUCHED_CLASS: false,\n  TOUCHED_CLASS: false,\n  ngModelMinErr: false,\n*/\n\n// Regex code was initially obtained from SO prior to modification: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231\nvar ISO_DATE_REGEXP = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/;\n// See valid URLs in RFC3987 (http://tools.ietf.org/html/rfc3987)\n// Note: We are being more lenient, because browsers are too.\n//   1. Scheme\n//   2. Slashes\n//   3. Username\n//   4. Password\n//   5. Hostname\n//   6. Port\n//   7. Path\n//   8. Query\n//   9. Fragment\n//                 1111111111111111 222   333333    44444        555555555555555555555555    666     77777777     8888888     999\nvar URL_REGEXP = /^[a-z][a-z\\d.+-]*:\\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\\s:/?#]+|\\[[a-f\\d:]+\\])(?::\\d+)?(?:\\/[^?#]*)?(?:\\?[^#]*)?(?:#.*)?$/i;\nvar EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;\nvar NUMBER_REGEXP = /^\\s*(\\-|\\+)?(\\d+|(\\d*(\\.\\d*)))([eE][+-]?\\d+)?\\s*$/;\nvar DATE_REGEXP = /^(\\d{4,})-(\\d{2})-(\\d{2})$/;\nvar DATETIMELOCAL_REGEXP = /^(\\d{4,})-(\\d\\d)-(\\d\\d)T(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\nvar WEEK_REGEXP = /^(\\d{4,})-W(\\d\\d)$/;\nvar MONTH_REGEXP = /^(\\d{4,})-(\\d\\d)$/;\nvar TIME_REGEXP = /^(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\n\nvar PARTIAL_VALIDATION_EVENTS = 'keydown wheel mousedown';\nvar PARTIAL_VALIDATION_TYPES = createMap();\nforEach('date,datetime-local,month,time,week'.split(','), function(type) {\n  PARTIAL_VALIDATION_TYPES[type] = true;\n});\n\nvar inputType = {\n\n  /**\n   * @ngdoc input\n   * @name input[text]\n   *\n   * @description\n   * Standard HTML text input with angular data binding, inherited by most of the `input` elements.\n   *\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} required Adds `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n   *    any length.\n   * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n   *    that contains the regular expression body that will be converted to a regular expression\n   *    as in the ngPattern directive.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n   *    does not match a RegExp found by evaluating the Angular expression given in the attribute value.\n   *    If the expression evaluates to a RegExp object, then this is used directly.\n   *    If the expression evaluates to a string, then it will be converted to a RegExp\n   *    after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n   *    `new RegExp('^abc$')`.<br />\n   *    **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n   *    start at the index of the last search's match, thus not taking the whole input value into\n   *    account.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n   *    This parameter is ignored for input[type=password] controls, which will never trim the\n   *    input.\n   *\n   * @example\n      <example name=\"text-input-directive\" module=\"textInputExample\">\n        <file name=\"index.html\">\n         <script>\n           angular.module('textInputExample', [])\n             .controller('ExampleController', ['$scope', function($scope) {\n               $scope.example = {\n                 text: 'guest',\n                 word: /^\\s*\\w*\\s*$/\n               };\n             }]);\n         </script>\n         <form name=\"myForm\" ng-controller=\"ExampleController\">\n           <label>Single word:\n             <input type=\"text\" name=\"input\" ng-model=\"example.text\"\n                    ng-pattern=\"example.word\" required ng-trim=\"false\">\n           </label>\n           <div role=\"alert\">\n             <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n               Required!</span>\n             <span class=\"error\" ng-show=\"myForm.input.$error.pattern\">\n               Single word only!</span>\n           </div>\n           <tt>text = {{example.text}}</tt><br/>\n           <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n           <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n           <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n          </form>\n        </file>\n        <file name=\"protractor.js\" type=\"protractor\">\n          var text = element(by.binding('example.text'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('example.text'));\n\n          it('should initialize to model', function() {\n            expect(text.getText()).toContain('guest');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n\n            expect(text.getText()).toEqual('text =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if multi word', function() {\n            input.clear();\n            input.sendKeys('hello world');\n\n            expect(valid.getText()).toContain('false');\n          });\n        </file>\n      </example>\n   */\n  'text': textInputType,\n\n    /**\n     * @ngdoc input\n     * @name input[date]\n     *\n     * @description\n     * Input with date validation and transformation. In browsers that do not yet support\n     * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601\n     * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many\n     * modern browsers do not yet support this input type, it is important to provide cues to users on the\n     * expected input format via a placeholder or label.\n     *\n     * The model must always be a Date object, otherwise Angular will throw an error.\n     * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n     *\n     * The timezone to be used to read/write the `Date` instance in the model can be defined using\n     * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n     *\n     * @param {string} ngModel Assignable angular expression to data-bind to.\n     * @param {string=} name Property name of the form under which the control is published.\n     * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n     *   valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute\n     *   (e.g. `min=\"{{minDate | date:'yyyy-MM-dd'}}\"`). Note that `min` will also add native HTML5\n     *   constraint validation.\n     * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n     *   a valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute\n     *   (e.g. `max=\"{{maxDate | date:'yyyy-MM-dd'}}\"`). Note that `max` will also add native HTML5\n     *   constraint validation.\n     * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO date string\n     *   the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n     * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO date string\n     *   the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n     * @param {string=} required Sets `required` validation error key if the value is not entered.\n     * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n     *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n     *    `required` when you want to data-bind to the `required` attribute.\n     * @param {string=} ngChange Angular expression to be executed when input changes due to user\n     *    interaction with the input element.\n     *\n     * @example\n     <example name=\"date-input-directive\" module=\"dateInputExample\">\n     <file name=\"index.html\">\n       <script>\n          angular.module('dateInputExample', [])\n            .controller('DateController', ['$scope', function($scope) {\n              $scope.example = {\n                value: new Date(2013, 9, 22)\n              };\n            }]);\n       </script>\n       <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n          <label for=\"exampleInput\">Pick a date in 2013:</label>\n          <input type=\"date\" id=\"exampleInput\" name=\"input\" ng-model=\"example.value\"\n              placeholder=\"yyyy-MM-dd\" min=\"2013-01-01\" max=\"2013-12-31\" required />\n          <div role=\"alert\">\n            <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n                Required!</span>\n            <span class=\"error\" ng-show=\"myForm.input.$error.date\">\n                Not a valid date!</span>\n           </div>\n           <tt>value = {{example.value | date: \"yyyy-MM-dd\"}}</tt><br/>\n           <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n           <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n           <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n       </form>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n        var value = element(by.binding('example.value | date: \"yyyy-MM-dd\"'));\n        var valid = element(by.binding('myForm.input.$valid'));\n        var input = element(by.model('example.value'));\n\n        // currently protractor/webdriver does not support\n        // sending keys to all known HTML5 input controls\n        // for various browsers (see https://github.com/angular/protractor/issues/562).\n        function setInput(val) {\n          // set the value of the element and force validation.\n          var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n          \"ipt.value = '\" + val + \"';\" +\n          \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n          browser.executeScript(scr);\n        }\n\n        it('should initialize to model', function() {\n          expect(value.getText()).toContain('2013-10-22');\n          expect(valid.getText()).toContain('myForm.input.$valid = true');\n        });\n\n        it('should be invalid if empty', function() {\n          setInput('');\n          expect(value.getText()).toEqual('value =');\n          expect(valid.getText()).toContain('myForm.input.$valid = false');\n        });\n\n        it('should be invalid if over max', function() {\n          setInput('2015-01-01');\n          expect(value.getText()).toContain('');\n          expect(valid.getText()).toContain('myForm.input.$valid = false');\n        });\n     </file>\n     </example>\n     */\n  'date': createDateInputType('date', DATE_REGEXP,\n         createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']),\n         'yyyy-MM-dd'),\n\n   /**\n    * @ngdoc input\n    * @name input[datetime-local]\n    *\n    * @description\n    * Input with datetime validation and transformation. In browsers that do not yet support\n    * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n    * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`.\n    *\n    * The model must always be a Date object, otherwise Angular will throw an error.\n    * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n    *\n    * The timezone to be used to read/write the `Date` instance in the model can be defined using\n    * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n    *\n    * @param {string} ngModel Assignable angular expression to data-bind to.\n    * @param {string=} name Property name of the form under which the control is published.\n    * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n    *   This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation\n    *   inside this attribute (e.g. `min=\"{{minDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}\"`).\n    *   Note that `min` will also add native HTML5 constraint validation.\n    * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n    *   This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation\n    *   inside this attribute (e.g. `max=\"{{maxDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}\"`).\n    *   Note that `max` will also add native HTML5 constraint validation.\n    * @param {(date|string)=} ngMin Sets the `min` validation error key to the Date / ISO datetime string\n    *   the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n    * @param {(date|string)=} ngMax Sets the `max` validation error key to the Date / ISO datetime string\n    *   the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n    * @param {string=} required Sets `required` validation error key if the value is not entered.\n    * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n    *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n    *    `required` when you want to data-bind to the `required` attribute.\n    * @param {string=} ngChange Angular expression to be executed when input changes due to user\n    *    interaction with the input element.\n    *\n    * @example\n    <example name=\"datetimelocal-input-directive\" module=\"dateExample\">\n    <file name=\"index.html\">\n      <script>\n        angular.module('dateExample', [])\n          .controller('DateController', ['$scope', function($scope) {\n            $scope.example = {\n              value: new Date(2010, 11, 28, 14, 57)\n            };\n          }]);\n      </script>\n      <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n        <label for=\"exampleInput\">Pick a date between in 2013:</label>\n        <input type=\"datetime-local\" id=\"exampleInput\" name=\"input\" ng-model=\"example.value\"\n            placeholder=\"yyyy-MM-ddTHH:mm:ss\" min=\"2001-01-01T00:00:00\" max=\"2013-12-31T00:00:00\" required />\n        <div role=\"alert\">\n          <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n              Required!</span>\n          <span class=\"error\" ng-show=\"myForm.input.$error.datetimelocal\">\n              Not a valid date!</span>\n        </div>\n        <tt>value = {{example.value | date: \"yyyy-MM-ddTHH:mm:ss\"}}</tt><br/>\n        <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n        <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n        <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n        <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n      </form>\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      var value = element(by.binding('example.value | date: \"yyyy-MM-ddTHH:mm:ss\"'));\n      var valid = element(by.binding('myForm.input.$valid'));\n      var input = element(by.model('example.value'));\n\n      // currently protractor/webdriver does not support\n      // sending keys to all known HTML5 input controls\n      // for various browsers (https://github.com/angular/protractor/issues/562).\n      function setInput(val) {\n        // set the value of the element and force validation.\n        var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n        \"ipt.value = '\" + val + \"';\" +\n        \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n        browser.executeScript(scr);\n      }\n\n      it('should initialize to model', function() {\n        expect(value.getText()).toContain('2010-12-28T14:57:00');\n        expect(valid.getText()).toContain('myForm.input.$valid = true');\n      });\n\n      it('should be invalid if empty', function() {\n        setInput('');\n        expect(value.getText()).toEqual('value =');\n        expect(valid.getText()).toContain('myForm.input.$valid = false');\n      });\n\n      it('should be invalid if over max', function() {\n        setInput('2015-01-01T23:59:00');\n        expect(value.getText()).toContain('');\n        expect(valid.getText()).toContain('myForm.input.$valid = false');\n      });\n    </file>\n    </example>\n    */\n  'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP,\n      createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']),\n      'yyyy-MM-ddTHH:mm:ss.sss'),\n\n  /**\n   * @ngdoc input\n   * @name input[time]\n   *\n   * @description\n   * Input with time validation and transformation. In browsers that do not yet support\n   * the HTML5 time input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n   * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a\n   * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`.\n   *\n   * The model must always be a Date object, otherwise Angular will throw an error.\n   * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n   *\n   * The timezone to be used to read/write the `Date` instance in the model can be defined using\n   * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n   *   This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this\n   *   attribute (e.g. `min=\"{{minTime | date:'HH:mm:ss'}}\"`). Note that `min` will also add\n   *   native HTML5 constraint validation.\n   * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n   *   This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this\n   *   attribute (e.g. `max=\"{{maxTime | date:'HH:mm:ss'}}\"`). Note that `max` will also add\n   *   native HTML5 constraint validation.\n   * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO time string the\n   *   `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n   * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO time string the\n   *   `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n   * @param {string=} required Sets `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n   <example name=\"time-input-directive\" module=\"timeExample\">\n   <file name=\"index.html\">\n     <script>\n      angular.module('timeExample', [])\n        .controller('DateController', ['$scope', function($scope) {\n          $scope.example = {\n            value: new Date(1970, 0, 1, 14, 57, 0)\n          };\n        }]);\n     </script>\n     <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n        <label for=\"exampleInput\">Pick a time between 8am and 5pm:</label>\n        <input type=\"time\" id=\"exampleInput\" name=\"input\" ng-model=\"example.value\"\n            placeholder=\"HH:mm:ss\" min=\"08:00:00\" max=\"17:00:00\" required />\n        <div role=\"alert\">\n          <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n              Required!</span>\n          <span class=\"error\" ng-show=\"myForm.input.$error.time\">\n              Not a valid date!</span>\n        </div>\n        <tt>value = {{example.value | date: \"HH:mm:ss\"}}</tt><br/>\n        <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n        <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n        <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n        <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n     </form>\n   </file>\n   <file name=\"protractor.js\" type=\"protractor\">\n      var value = element(by.binding('example.value | date: \"HH:mm:ss\"'));\n      var valid = element(by.binding('myForm.input.$valid'));\n      var input = element(by.model('example.value'));\n\n      // currently protractor/webdriver does not support\n      // sending keys to all known HTML5 input controls\n      // for various browsers (https://github.com/angular/protractor/issues/562).\n      function setInput(val) {\n        // set the value of the element and force validation.\n        var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n        \"ipt.value = '\" + val + \"';\" +\n        \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n        browser.executeScript(scr);\n      }\n\n      it('should initialize to model', function() {\n        expect(value.getText()).toContain('14:57:00');\n        expect(valid.getText()).toContain('myForm.input.$valid = true');\n      });\n\n      it('should be invalid if empty', function() {\n        setInput('');\n        expect(value.getText()).toEqual('value =');\n        expect(valid.getText()).toContain('myForm.input.$valid = false');\n      });\n\n      it('should be invalid if over max', function() {\n        setInput('23:59:00');\n        expect(value.getText()).toContain('');\n        expect(valid.getText()).toContain('myForm.input.$valid = false');\n      });\n   </file>\n   </example>\n   */\n  'time': createDateInputType('time', TIME_REGEXP,\n      createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']),\n     'HH:mm:ss.sss'),\n\n   /**\n    * @ngdoc input\n    * @name input[week]\n    *\n    * @description\n    * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support\n    * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n    * week format (yyyy-W##), for example: `2013-W02`.\n    *\n    * The model must always be a Date object, otherwise Angular will throw an error.\n    * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n    *\n    * The timezone to be used to read/write the `Date` instance in the model can be defined using\n    * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n    *\n    * @param {string} ngModel Assignable angular expression to data-bind to.\n    * @param {string=} name Property name of the form under which the control is published.\n    * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n    *   This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this\n    *   attribute (e.g. `min=\"{{minWeek | date:'yyyy-Www'}}\"`). Note that `min` will also add\n    *   native HTML5 constraint validation.\n    * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n    *   This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this\n    *   attribute (e.g. `max=\"{{maxWeek | date:'yyyy-Www'}}\"`). Note that `max` will also add\n    *   native HTML5 constraint validation.\n    * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string\n    *   the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n    * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string\n    *   the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n    * @param {string=} required Sets `required` validation error key if the value is not entered.\n    * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n    *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n    *    `required` when you want to data-bind to the `required` attribute.\n    * @param {string=} ngChange Angular expression to be executed when input changes due to user\n    *    interaction with the input element.\n    *\n    * @example\n    <example name=\"week-input-directive\" module=\"weekExample\">\n    <file name=\"index.html\">\n      <script>\n      angular.module('weekExample', [])\n        .controller('DateController', ['$scope', function($scope) {\n          $scope.example = {\n            value: new Date(2013, 0, 3)\n          };\n        }]);\n      </script>\n      <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n        <label>Pick a date between in 2013:\n          <input id=\"exampleInput\" type=\"week\" name=\"input\" ng-model=\"example.value\"\n                 placeholder=\"YYYY-W##\" min=\"2012-W32\"\n                 max=\"2013-W52\" required />\n        </label>\n        <div role=\"alert\">\n          <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n              Required!</span>\n          <span class=\"error\" ng-show=\"myForm.input.$error.week\">\n              Not a valid date!</span>\n        </div>\n        <tt>value = {{example.value | date: \"yyyy-Www\"}}</tt><br/>\n        <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n        <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n        <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n        <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n      </form>\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      var value = element(by.binding('example.value | date: \"yyyy-Www\"'));\n      var valid = element(by.binding('myForm.input.$valid'));\n      var input = element(by.model('example.value'));\n\n      // currently protractor/webdriver does not support\n      // sending keys to all known HTML5 input controls\n      // for various browsers (https://github.com/angular/protractor/issues/562).\n      function setInput(val) {\n        // set the value of the element and force validation.\n        var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n        \"ipt.value = '\" + val + \"';\" +\n        \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n        browser.executeScript(scr);\n      }\n\n      it('should initialize to model', function() {\n        expect(value.getText()).toContain('2013-W01');\n        expect(valid.getText()).toContain('myForm.input.$valid = true');\n      });\n\n      it('should be invalid if empty', function() {\n        setInput('');\n        expect(value.getText()).toEqual('value =');\n        expect(valid.getText()).toContain('myForm.input.$valid = false');\n      });\n\n      it('should be invalid if over max', function() {\n        setInput('2015-W01');\n        expect(value.getText()).toContain('');\n        expect(valid.getText()).toContain('myForm.input.$valid = false');\n      });\n    </file>\n    </example>\n    */\n  'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'),\n\n  /**\n   * @ngdoc input\n   * @name input[month]\n   *\n   * @description\n   * Input with month validation and transformation. In browsers that do not yet support\n   * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n   * month format (yyyy-MM), for example: `2009-01`.\n   *\n   * The model must always be a Date object, otherwise Angular will throw an error.\n   * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n   * If the model is not set to the first of the month, the next view to model update will set it\n   * to the first of the month.\n   *\n   * The timezone to be used to read/write the `Date` instance in the model can be defined using\n   * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n   *   This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this\n   *   attribute (e.g. `min=\"{{minMonth | date:'yyyy-MM'}}\"`). Note that `min` will also add\n   *   native HTML5 constraint validation.\n   * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n   *   This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this\n   *   attribute (e.g. `max=\"{{maxMonth | date:'yyyy-MM'}}\"`). Note that `max` will also add\n   *   native HTML5 constraint validation.\n   * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string\n   *   the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n   * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string\n   *   the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n\n   * @param {string=} required Sets `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n   <example name=\"month-input-directive\" module=\"monthExample\">\n   <file name=\"index.html\">\n     <script>\n      angular.module('monthExample', [])\n        .controller('DateController', ['$scope', function($scope) {\n          $scope.example = {\n            value: new Date(2013, 9, 1)\n          };\n        }]);\n     </script>\n     <form name=\"myForm\" ng-controller=\"DateController as dateCtrl\">\n       <label for=\"exampleInput\">Pick a month in 2013:</label>\n       <input id=\"exampleInput\" type=\"month\" name=\"input\" ng-model=\"example.value\"\n          placeholder=\"yyyy-MM\" min=\"2013-01\" max=\"2013-12\" required />\n       <div role=\"alert\">\n         <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n            Required!</span>\n         <span class=\"error\" ng-show=\"myForm.input.$error.month\">\n            Not a valid month!</span>\n       </div>\n       <tt>value = {{example.value | date: \"yyyy-MM\"}}</tt><br/>\n       <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n       <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n       <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n       <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n     </form>\n   </file>\n   <file name=\"protractor.js\" type=\"protractor\">\n      var value = element(by.binding('example.value | date: \"yyyy-MM\"'));\n      var valid = element(by.binding('myForm.input.$valid'));\n      var input = element(by.model('example.value'));\n\n      // currently protractor/webdriver does not support\n      // sending keys to all known HTML5 input controls\n      // for various browsers (https://github.com/angular/protractor/issues/562).\n      function setInput(val) {\n        // set the value of the element and force validation.\n        var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n        \"ipt.value = '\" + val + \"';\" +\n        \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n        browser.executeScript(scr);\n      }\n\n      it('should initialize to model', function() {\n        expect(value.getText()).toContain('2013-10');\n        expect(valid.getText()).toContain('myForm.input.$valid = true');\n      });\n\n      it('should be invalid if empty', function() {\n        setInput('');\n        expect(value.getText()).toEqual('value =');\n        expect(valid.getText()).toContain('myForm.input.$valid = false');\n      });\n\n      it('should be invalid if over max', function() {\n        setInput('2015-01');\n        expect(value.getText()).toContain('');\n        expect(valid.getText()).toContain('myForm.input.$valid = false');\n      });\n   </file>\n   </example>\n   */\n  'month': createDateInputType('month', MONTH_REGEXP,\n     createDateParser(MONTH_REGEXP, ['yyyy', 'MM']),\n     'yyyy-MM'),\n\n  /**\n   * @ngdoc input\n   * @name input[number]\n   *\n   * @description\n   * Text input with number validation and transformation. Sets the `number` validation\n   * error if not a valid number.\n   *\n   * <div class=\"alert alert-warning\">\n   * The model must always be of type `number` otherwise Angular will throw an error.\n   * Be aware that a string containing a number is not enough. See the {@link ngModel:numfmt}\n   * error docs for more information and an example of how to convert your model if necessary.\n   * </div>\n   *\n   * ## Issues with HTML5 constraint validation\n   *\n   * In browsers that follow the\n   * [HTML5 specification](https://html.spec.whatwg.org/multipage/forms.html#number-state-%28type=number%29),\n   * `input[number]` does not work as expected with {@link ngModelOptions `ngModelOptions.allowInvalid`}.\n   * If a non-number is entered in the input, the browser will report the value as an empty string,\n   * which means the view / model values in `ngModel` and subsequently the scope value\n   * will also be an empty string.\n   *\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n   * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n   * @param {string=} required Sets `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n   *    any length.\n   * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n   *    that contains the regular expression body that will be converted to a regular expression\n   *    as in the ngPattern directive.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n   *    does not match a RegExp found by evaluating the Angular expression given in the attribute value.\n   *    If the expression evaluates to a RegExp object, then this is used directly.\n   *    If the expression evaluates to a string, then it will be converted to a RegExp\n   *    after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n   *    `new RegExp('^abc$')`.<br />\n   *    **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n   *    start at the index of the last search's match, thus not taking the whole input value into\n   *    account.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <example name=\"number-input-directive\" module=\"numberExample\">\n        <file name=\"index.html\">\n         <script>\n           angular.module('numberExample', [])\n             .controller('ExampleController', ['$scope', function($scope) {\n               $scope.example = {\n                 value: 12\n               };\n             }]);\n         </script>\n         <form name=\"myForm\" ng-controller=\"ExampleController\">\n           <label>Number:\n             <input type=\"number\" name=\"input\" ng-model=\"example.value\"\n                    min=\"0\" max=\"99\" required>\n          </label>\n           <div role=\"alert\">\n             <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n               Required!</span>\n             <span class=\"error\" ng-show=\"myForm.input.$error.number\">\n               Not valid number!</span>\n           </div>\n           <tt>value = {{example.value}}</tt><br/>\n           <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n           <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n           <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n          </form>\n        </file>\n        <file name=\"protractor.js\" type=\"protractor\">\n          var value = element(by.binding('example.value'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('example.value'));\n\n          it('should initialize to model', function() {\n            expect(value.getText()).toContain('12');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n            expect(value.getText()).toEqual('value =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if over max', function() {\n            input.clear();\n            input.sendKeys('123');\n            expect(value.getText()).toEqual('value =');\n            expect(valid.getText()).toContain('false');\n          });\n        </file>\n      </example>\n   */\n  'number': numberInputType,\n\n\n  /**\n   * @ngdoc input\n   * @name input[url]\n   *\n   * @description\n   * Text input with URL validation. Sets the `url` validation error key if the content is not a\n   * valid URL.\n   *\n   * <div class=\"alert alert-warning\">\n   * **Note:** `input[url]` uses a regex to validate urls that is derived from the regex\n   * used in Chromium. If you need stricter validation, you can use `ng-pattern` or modify\n   * the built-in validators (see the {@link guide/forms Forms guide})\n   * </div>\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} required Sets `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n   *    any length.\n   * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n   *    that contains the regular expression body that will be converted to a regular expression\n   *    as in the ngPattern directive.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n   *    does not match a RegExp found by evaluating the Angular expression given in the attribute value.\n   *    If the expression evaluates to a RegExp object, then this is used directly.\n   *    If the expression evaluates to a string, then it will be converted to a RegExp\n   *    after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n   *    `new RegExp('^abc$')`.<br />\n   *    **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n   *    start at the index of the last search's match, thus not taking the whole input value into\n   *    account.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <example name=\"url-input-directive\" module=\"urlExample\">\n        <file name=\"index.html\">\n         <script>\n           angular.module('urlExample', [])\n             .controller('ExampleController', ['$scope', function($scope) {\n               $scope.url = {\n                 text: 'http://google.com'\n               };\n             }]);\n         </script>\n         <form name=\"myForm\" ng-controller=\"ExampleController\">\n           <label>URL:\n             <input type=\"url\" name=\"input\" ng-model=\"url.text\" required>\n           <label>\n           <div role=\"alert\">\n             <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n               Required!</span>\n             <span class=\"error\" ng-show=\"myForm.input.$error.url\">\n               Not valid url!</span>\n           </div>\n           <tt>text = {{url.text}}</tt><br/>\n           <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n           <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n           <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n           <tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/>\n          </form>\n        </file>\n        <file name=\"protractor.js\" type=\"protractor\">\n          var text = element(by.binding('url.text'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('url.text'));\n\n          it('should initialize to model', function() {\n            expect(text.getText()).toContain('http://google.com');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n\n            expect(text.getText()).toEqual('text =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if not url', function() {\n            input.clear();\n            input.sendKeys('box');\n\n            expect(valid.getText()).toContain('false');\n          });\n        </file>\n      </example>\n   */\n  'url': urlInputType,\n\n\n  /**\n   * @ngdoc input\n   * @name input[email]\n   *\n   * @description\n   * Text input with email validation. Sets the `email` validation error key if not a valid email\n   * address.\n   *\n   * <div class=\"alert alert-warning\">\n   * **Note:** `input[email]` uses a regex to validate email addresses that is derived from the regex\n   * used in Chromium. If you need stricter validation (e.g. requiring a top-level domain), you can\n   * use `ng-pattern` or modify the built-in validators (see the {@link guide/forms Forms guide})\n   * </div>\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} required Sets `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n   *    any length.\n   * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n   *    that contains the regular expression body that will be converted to a regular expression\n   *    as in the ngPattern directive.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n   *    does not match a RegExp found by evaluating the Angular expression given in the attribute value.\n   *    If the expression evaluates to a RegExp object, then this is used directly.\n   *    If the expression evaluates to a string, then it will be converted to a RegExp\n   *    after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n   *    `new RegExp('^abc$')`.<br />\n   *    **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n   *    start at the index of the last search's match, thus not taking the whole input value into\n   *    account.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <example name=\"email-input-directive\" module=\"emailExample\">\n        <file name=\"index.html\">\n         <script>\n           angular.module('emailExample', [])\n             .controller('ExampleController', ['$scope', function($scope) {\n               $scope.email = {\n                 text: 'me@example.com'\n               };\n             }]);\n         </script>\n           <form name=\"myForm\" ng-controller=\"ExampleController\">\n             <label>Email:\n               <input type=\"email\" name=\"input\" ng-model=\"email.text\" required>\n             </label>\n             <div role=\"alert\">\n               <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n                 Required!</span>\n               <span class=\"error\" ng-show=\"myForm.input.$error.email\">\n                 Not valid email!</span>\n             </div>\n             <tt>text = {{email.text}}</tt><br/>\n             <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n             <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n             <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n             <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n             <tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/>\n           </form>\n         </file>\n        <file name=\"protractor.js\" type=\"protractor\">\n          var text = element(by.binding('email.text'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('email.text'));\n\n          it('should initialize to model', function() {\n            expect(text.getText()).toContain('me@example.com');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n            expect(text.getText()).toEqual('text =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if not email', function() {\n            input.clear();\n            input.sendKeys('xxx');\n\n            expect(valid.getText()).toContain('false');\n          });\n        </file>\n      </example>\n   */\n  'email': emailInputType,\n\n\n  /**\n   * @ngdoc input\n   * @name input[radio]\n   *\n   * @description\n   * HTML radio button.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string} value The value to which the `ngModel` expression should be set when selected.\n   *    Note that `value` only supports `string` values, i.e. the scope model needs to be a string,\n   *    too. Use `ngValue` if you need complex models (`number`, `object`, ...).\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   * @param {string} ngValue Angular expression to which `ngModel` will be be set when the radio\n   *    is selected. Should be used instead of the `value` attribute if you need\n   *    a non-string `ngModel` (`boolean`, `array`, ...).\n   *\n   * @example\n      <example name=\"radio-input-directive\" module=\"radioExample\">\n        <file name=\"index.html\">\n         <script>\n           angular.module('radioExample', [])\n             .controller('ExampleController', ['$scope', function($scope) {\n               $scope.color = {\n                 name: 'blue'\n               };\n               $scope.specialValue = {\n                 \"id\": \"12345\",\n                 \"value\": \"green\"\n               };\n             }]);\n         </script>\n         <form name=\"myForm\" ng-controller=\"ExampleController\">\n           <label>\n             <input type=\"radio\" ng-model=\"color.name\" value=\"red\">\n             Red\n           </label><br/>\n           <label>\n             <input type=\"radio\" ng-model=\"color.name\" ng-value=\"specialValue\">\n             Green\n           </label><br/>\n           <label>\n             <input type=\"radio\" ng-model=\"color.name\" value=\"blue\">\n             Blue\n           </label><br/>\n           <tt>color = {{color.name | json}}</tt><br/>\n          </form>\n          Note that `ng-value=\"specialValue\"` sets radio item's value to be the value of `$scope.specialValue`.\n        </file>\n        <file name=\"protractor.js\" type=\"protractor\">\n          it('should change state', function() {\n            var color = element(by.binding('color.name'));\n\n            expect(color.getText()).toContain('blue');\n\n            element.all(by.model('color.name')).get(0).click();\n\n            expect(color.getText()).toContain('red');\n          });\n        </file>\n      </example>\n   */\n  'radio': radioInputType,\n\n\n  /**\n   * @ngdoc input\n   * @name input[checkbox]\n   *\n   * @description\n   * HTML checkbox.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {expression=} ngTrueValue The value to which the expression should be set when selected.\n   * @param {expression=} ngFalseValue The value to which the expression should be set when not selected.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <example name=\"checkbox-input-directive\" module=\"checkboxExample\">\n        <file name=\"index.html\">\n         <script>\n           angular.module('checkboxExample', [])\n             .controller('ExampleController', ['$scope', function($scope) {\n               $scope.checkboxModel = {\n                value1 : true,\n                value2 : 'YES'\n              };\n             }]);\n         </script>\n         <form name=\"myForm\" ng-controller=\"ExampleController\">\n           <label>Value1:\n             <input type=\"checkbox\" ng-model=\"checkboxModel.value1\">\n           </label><br/>\n           <label>Value2:\n             <input type=\"checkbox\" ng-model=\"checkboxModel.value2\"\n                    ng-true-value=\"'YES'\" ng-false-value=\"'NO'\">\n            </label><br/>\n           <tt>value1 = {{checkboxModel.value1}}</tt><br/>\n           <tt>value2 = {{checkboxModel.value2}}</tt><br/>\n          </form>\n        </file>\n        <file name=\"protractor.js\" type=\"protractor\">\n          it('should change state', function() {\n            var value1 = element(by.binding('checkboxModel.value1'));\n            var value2 = element(by.binding('checkboxModel.value2'));\n\n            expect(value1.getText()).toContain('true');\n            expect(value2.getText()).toContain('YES');\n\n            element(by.model('checkboxModel.value1')).click();\n            element(by.model('checkboxModel.value2')).click();\n\n            expect(value1.getText()).toContain('false');\n            expect(value2.getText()).toContain('NO');\n          });\n        </file>\n      </example>\n   */\n  'checkbox': checkboxInputType,\n\n  'hidden': noop,\n  'button': noop,\n  'submit': noop,\n  'reset': noop,\n  'file': noop\n};\n\nfunction stringBasedInputType(ctrl) {\n  ctrl.$formatters.push(function(value) {\n    return ctrl.$isEmpty(value) ? value : value.toString();\n  });\n}\n\nfunction textInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n  stringBasedInputType(ctrl);\n}\n\nfunction baseInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  var type = lowercase(element[0].type);\n\n  // In composition mode, users are still inputing intermediate text buffer,\n  // hold the listener until composition is done.\n  // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent\n  if (!$sniffer.android) {\n    var composing = false;\n\n    element.on('compositionstart', function() {\n      composing = true;\n    });\n\n    element.on('compositionend', function() {\n      composing = false;\n      listener();\n    });\n  }\n\n  var timeout;\n\n  var listener = function(ev) {\n    if (timeout) {\n      $browser.defer.cancel(timeout);\n      timeout = null;\n    }\n    if (composing) return;\n    var value = element.val(),\n        event = ev && ev.type;\n\n    // By default we will trim the value\n    // If the attribute ng-trim exists we will avoid trimming\n    // If input type is 'password', the value is never trimmed\n    if (type !== 'password' && (!attr.ngTrim || attr.ngTrim !== 'false')) {\n      value = trim(value);\n    }\n\n    // If a control is suffering from bad input (due to native validators), browsers discard its\n    // value, so it may be necessary to revalidate (by calling $setViewValue again) even if the\n    // control's value is the same empty value twice in a row.\n    if (ctrl.$viewValue !== value || (value === '' && ctrl.$$hasNativeValidators)) {\n      ctrl.$setViewValue(value, event);\n    }\n  };\n\n  // if the browser does support \"input\" event, we are fine - except on IE9 which doesn't fire the\n  // input event on backspace, delete or cut\n  if ($sniffer.hasEvent('input')) {\n    element.on('input', listener);\n  } else {\n    var deferListener = function(ev, input, origValue) {\n      if (!timeout) {\n        timeout = $browser.defer(function() {\n          timeout = null;\n          if (!input || input.value !== origValue) {\n            listener(ev);\n          }\n        });\n      }\n    };\n\n    element.on('keydown', function(event) {\n      var key = event.keyCode;\n\n      // ignore\n      //    command            modifiers                   arrows\n      if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return;\n\n      deferListener(event, this, this.value);\n    });\n\n    // if user modifies input value using context menu in IE, we need \"paste\" and \"cut\" events to catch it\n    if ($sniffer.hasEvent('paste')) {\n      element.on('paste cut', deferListener);\n    }\n  }\n\n  // if user paste into input using mouse on older browser\n  // or form autocomplete on newer browser, we need \"change\" event to catch it\n  element.on('change', listener);\n\n  // Some native input types (date-family) have the ability to change validity without\n  // firing any input/change events.\n  // For these event types, when native validators are present and the browser supports the type,\n  // check for validity changes on various DOM events.\n  if (PARTIAL_VALIDATION_TYPES[type] && ctrl.$$hasNativeValidators && type === attr.type) {\n    element.on(PARTIAL_VALIDATION_EVENTS, function(ev) {\n      if (!timeout) {\n        var validity = this[VALIDITY_STATE_PROPERTY];\n        var origBadInput = validity.badInput;\n        var origTypeMismatch = validity.typeMismatch;\n        timeout = $browser.defer(function() {\n          timeout = null;\n          if (validity.badInput !== origBadInput || validity.typeMismatch !== origTypeMismatch) {\n            listener(ev);\n          }\n        });\n      }\n    });\n  }\n\n  ctrl.$render = function() {\n    // Workaround for Firefox validation #12102.\n    var value = ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue;\n    if (element.val() !== value) {\n      element.val(value);\n    }\n  };\n}\n\nfunction weekParser(isoWeek, existingDate) {\n  if (isDate(isoWeek)) {\n    return isoWeek;\n  }\n\n  if (isString(isoWeek)) {\n    WEEK_REGEXP.lastIndex = 0;\n    var parts = WEEK_REGEXP.exec(isoWeek);\n    if (parts) {\n      var year = +parts[1],\n          week = +parts[2],\n          hours = 0,\n          minutes = 0,\n          seconds = 0,\n          milliseconds = 0,\n          firstThurs = getFirstThursdayOfYear(year),\n          addDays = (week - 1) * 7;\n\n      if (existingDate) {\n        hours = existingDate.getHours();\n        minutes = existingDate.getMinutes();\n        seconds = existingDate.getSeconds();\n        milliseconds = existingDate.getMilliseconds();\n      }\n\n      return new Date(year, 0, firstThurs.getDate() + addDays, hours, minutes, seconds, milliseconds);\n    }\n  }\n\n  return NaN;\n}\n\nfunction createDateParser(regexp, mapping) {\n  return function(iso, date) {\n    var parts, map;\n\n    if (isDate(iso)) {\n      return iso;\n    }\n\n    if (isString(iso)) {\n      // When a date is JSON'ified to wraps itself inside of an extra\n      // set of double quotes. This makes the date parsing code unable\n      // to match the date string and parse it as a date.\n      if (iso.charAt(0) == '\"' && iso.charAt(iso.length - 1) == '\"') {\n        iso = iso.substring(1, iso.length - 1);\n      }\n      if (ISO_DATE_REGEXP.test(iso)) {\n        return new Date(iso);\n      }\n      regexp.lastIndex = 0;\n      parts = regexp.exec(iso);\n\n      if (parts) {\n        parts.shift();\n        if (date) {\n          map = {\n            yyyy: date.getFullYear(),\n            MM: date.getMonth() + 1,\n            dd: date.getDate(),\n            HH: date.getHours(),\n            mm: date.getMinutes(),\n            ss: date.getSeconds(),\n            sss: date.getMilliseconds() / 1000\n          };\n        } else {\n          map = { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 };\n        }\n\n        forEach(parts, function(part, index) {\n          if (index < mapping.length) {\n            map[mapping[index]] = +part;\n          }\n        });\n        return new Date(map.yyyy, map.MM - 1, map.dd, map.HH, map.mm, map.ss || 0, map.sss * 1000 || 0);\n      }\n    }\n\n    return NaN;\n  };\n}\n\nfunction createDateInputType(type, regexp, parseDate, format) {\n  return function dynamicDateInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter) {\n    badInputChecker(scope, element, attr, ctrl);\n    baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n    var timezone = ctrl && ctrl.$options && ctrl.$options.timezone;\n    var previousDate;\n\n    ctrl.$$parserName = type;\n    ctrl.$parsers.push(function(value) {\n      if (ctrl.$isEmpty(value)) return null;\n      if (regexp.test(value)) {\n        // Note: We cannot read ctrl.$modelValue, as there might be a different\n        // parser/formatter in the processing chain so that the model\n        // contains some different data format!\n        var parsedDate = parseDate(value, previousDate);\n        if (timezone) {\n          parsedDate = convertTimezoneToLocal(parsedDate, timezone);\n        }\n        return parsedDate;\n      }\n      return undefined;\n    });\n\n    ctrl.$formatters.push(function(value) {\n      if (value && !isDate(value)) {\n        throw ngModelMinErr('datefmt', 'Expected `{0}` to be a date', value);\n      }\n      if (isValidDate(value)) {\n        previousDate = value;\n        if (previousDate && timezone) {\n          previousDate = convertTimezoneToLocal(previousDate, timezone, true);\n        }\n        return $filter('date')(value, format, timezone);\n      } else {\n        previousDate = null;\n        return '';\n      }\n    });\n\n    if (isDefined(attr.min) || attr.ngMin) {\n      var minVal;\n      ctrl.$validators.min = function(value) {\n        return !isValidDate(value) || isUndefined(minVal) || parseDate(value) >= minVal;\n      };\n      attr.$observe('min', function(val) {\n        minVal = parseObservedDateValue(val);\n        ctrl.$validate();\n      });\n    }\n\n    if (isDefined(attr.max) || attr.ngMax) {\n      var maxVal;\n      ctrl.$validators.max = function(value) {\n        return !isValidDate(value) || isUndefined(maxVal) || parseDate(value) <= maxVal;\n      };\n      attr.$observe('max', function(val) {\n        maxVal = parseObservedDateValue(val);\n        ctrl.$validate();\n      });\n    }\n\n    function isValidDate(value) {\n      // Invalid Date: getTime() returns NaN\n      return value && !(value.getTime && value.getTime() !== value.getTime());\n    }\n\n    function parseObservedDateValue(val) {\n      return isDefined(val) && !isDate(val) ? parseDate(val) || undefined : val;\n    }\n  };\n}\n\nfunction badInputChecker(scope, element, attr, ctrl) {\n  var node = element[0];\n  var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity);\n  if (nativeValidation) {\n    ctrl.$parsers.push(function(value) {\n      var validity = element.prop(VALIDITY_STATE_PROPERTY) || {};\n      return validity.badInput || validity.typeMismatch ? undefined : value;\n    });\n  }\n}\n\nfunction numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  badInputChecker(scope, element, attr, ctrl);\n  baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n  ctrl.$$parserName = 'number';\n  ctrl.$parsers.push(function(value) {\n    if (ctrl.$isEmpty(value))      return null;\n    if (NUMBER_REGEXP.test(value)) return parseFloat(value);\n    return undefined;\n  });\n\n  ctrl.$formatters.push(function(value) {\n    if (!ctrl.$isEmpty(value)) {\n      if (!isNumber(value)) {\n        throw ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value);\n      }\n      value = value.toString();\n    }\n    return value;\n  });\n\n  if (isDefined(attr.min) || attr.ngMin) {\n    var minVal;\n    ctrl.$validators.min = function(value) {\n      return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal;\n    };\n\n    attr.$observe('min', function(val) {\n      if (isDefined(val) && !isNumber(val)) {\n        val = parseFloat(val, 10);\n      }\n      minVal = isNumber(val) && !isNaN(val) ? val : undefined;\n      // TODO(matsko): implement validateLater to reduce number of validations\n      ctrl.$validate();\n    });\n  }\n\n  if (isDefined(attr.max) || attr.ngMax) {\n    var maxVal;\n    ctrl.$validators.max = function(value) {\n      return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal;\n    };\n\n    attr.$observe('max', function(val) {\n      if (isDefined(val) && !isNumber(val)) {\n        val = parseFloat(val, 10);\n      }\n      maxVal = isNumber(val) && !isNaN(val) ? val : undefined;\n      // TODO(matsko): implement validateLater to reduce number of validations\n      ctrl.$validate();\n    });\n  }\n}\n\nfunction urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  // Note: no badInputChecker here by purpose as `url` is only a validation\n  // in browsers, i.e. we can always read out input.value even if it is not valid!\n  baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n  stringBasedInputType(ctrl);\n\n  ctrl.$$parserName = 'url';\n  ctrl.$validators.url = function(modelValue, viewValue) {\n    var value = modelValue || viewValue;\n    return ctrl.$isEmpty(value) || URL_REGEXP.test(value);\n  };\n}\n\nfunction emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  // Note: no badInputChecker here by purpose as `url` is only a validation\n  // in browsers, i.e. we can always read out input.value even if it is not valid!\n  baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n  stringBasedInputType(ctrl);\n\n  ctrl.$$parserName = 'email';\n  ctrl.$validators.email = function(modelValue, viewValue) {\n    var value = modelValue || viewValue;\n    return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value);\n  };\n}\n\nfunction radioInputType(scope, element, attr, ctrl) {\n  // make the name unique, if not defined\n  if (isUndefined(attr.name)) {\n    element.attr('name', nextUid());\n  }\n\n  var listener = function(ev) {\n    if (element[0].checked) {\n      ctrl.$setViewValue(attr.value, ev && ev.type);\n    }\n  };\n\n  element.on('click', listener);\n\n  ctrl.$render = function() {\n    var value = attr.value;\n    element[0].checked = (value == ctrl.$viewValue);\n  };\n\n  attr.$observe('value', ctrl.$render);\n}\n\nfunction parseConstantExpr($parse, context, name, expression, fallback) {\n  var parseFn;\n  if (isDefined(expression)) {\n    parseFn = $parse(expression);\n    if (!parseFn.constant) {\n      throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +\n                                   '`{1}`.', name, expression);\n    }\n    return parseFn(context);\n  }\n  return fallback;\n}\n\nfunction checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {\n  var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);\n  var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false);\n\n  var listener = function(ev) {\n    ctrl.$setViewValue(element[0].checked, ev && ev.type);\n  };\n\n  element.on('click', listener);\n\n  ctrl.$render = function() {\n    element[0].checked = ctrl.$viewValue;\n  };\n\n  // Override the standard `$isEmpty` because the $viewValue of an empty checkbox is always set to `false`\n  // This is because of the parser below, which compares the `$modelValue` with `trueValue` to convert\n  // it to a boolean.\n  ctrl.$isEmpty = function(value) {\n    return value === false;\n  };\n\n  ctrl.$formatters.push(function(value) {\n    return equals(value, trueValue);\n  });\n\n  ctrl.$parsers.push(function(value) {\n    return value ? trueValue : falseValue;\n  });\n}\n\n\n/**\n * @ngdoc directive\n * @name textarea\n * @restrict E\n *\n * @description\n * HTML textarea element control with angular data-binding. The data-binding and validation\n * properties of this element are exactly the same as those of the\n * {@link ng.directive:input input element}.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n *    `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n *    minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n *    maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any\n *    length.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n *    does not match a RegExp found by evaluating the Angular expression given in the attribute value.\n *    If the expression evaluates to a RegExp object, then this is used directly.\n *    If the expression evaluates to a string, then it will be converted to a RegExp\n *    after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n *    `new RegExp('^abc$')`.<br />\n *    **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n *    start at the index of the last search's match, thus not taking the whole input value into\n *    account.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n *    interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n */\n\n\n/**\n * @ngdoc directive\n * @name input\n * @restrict E\n *\n * @description\n * HTML input element control. When used together with {@link ngModel `ngModel`}, it provides data-binding,\n * input state control, and validation.\n * Input control follows HTML5 input types and polyfills the HTML5 validation behavior for older browsers.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Not every feature offered is available for all input types.\n * Specifically, data binding and event handling via `ng-model` is unsupported for `input[file]`.\n * </div>\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {boolean=} ngRequired Sets `required` attribute if set to true\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n *    minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n *    maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any\n *    length.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n *    value does not match a RegExp found by evaluating the Angular expression given in the attribute value.\n *    If the expression evaluates to a RegExp object, then this is used directly.\n *    If the expression evaluates to a string, then it will be converted to a RegExp\n *    after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n *    `new RegExp('^abc$')`.<br />\n *    **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n *    start at the index of the last search's match, thus not taking the whole input value into\n *    account.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n *    interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n *    This parameter is ignored for input[type=password] controls, which will never trim the\n *    input.\n *\n * @example\n    <example name=\"input-directive\" module=\"inputExample\">\n      <file name=\"index.html\">\n       <script>\n          angular.module('inputExample', [])\n            .controller('ExampleController', ['$scope', function($scope) {\n              $scope.user = {name: 'guest', last: 'visitor'};\n            }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n         <form name=\"myForm\">\n           <label>\n              User name:\n              <input type=\"text\" name=\"userName\" ng-model=\"user.name\" required>\n           </label>\n           <div role=\"alert\">\n             <span class=\"error\" ng-show=\"myForm.userName.$error.required\">\n              Required!</span>\n           </div>\n           <label>\n              Last name:\n              <input type=\"text\" name=\"lastName\" ng-model=\"user.last\"\n              ng-minlength=\"3\" ng-maxlength=\"10\">\n           </label>\n           <div role=\"alert\">\n             <span class=\"error\" ng-show=\"myForm.lastName.$error.minlength\">\n               Too short!</span>\n             <span class=\"error\" ng-show=\"myForm.lastName.$error.maxlength\">\n               Too long!</span>\n           </div>\n         </form>\n         <hr>\n         <tt>user = {{user}}</tt><br/>\n         <tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br/>\n         <tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br/>\n         <tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br/>\n         <tt>myForm.lastName.$error = {{myForm.lastName.$error}}</tt><br/>\n         <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n         <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n         <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br/>\n         <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br/>\n       </div>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        var user = element(by.exactBinding('user'));\n        var userNameValid = element(by.binding('myForm.userName.$valid'));\n        var lastNameValid = element(by.binding('myForm.lastName.$valid'));\n        var lastNameError = element(by.binding('myForm.lastName.$error'));\n        var formValid = element(by.binding('myForm.$valid'));\n        var userNameInput = element(by.model('user.name'));\n        var userLastInput = element(by.model('user.last'));\n\n        it('should initialize to model', function() {\n          expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"visitor\"}');\n          expect(userNameValid.getText()).toContain('true');\n          expect(formValid.getText()).toContain('true');\n        });\n\n        it('should be invalid if empty when required', function() {\n          userNameInput.clear();\n          userNameInput.sendKeys('');\n\n          expect(user.getText()).toContain('{\"last\":\"visitor\"}');\n          expect(userNameValid.getText()).toContain('false');\n          expect(formValid.getText()).toContain('false');\n        });\n\n        it('should be valid if empty when min length is set', function() {\n          userLastInput.clear();\n          userLastInput.sendKeys('');\n\n          expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"\"}');\n          expect(lastNameValid.getText()).toContain('true');\n          expect(formValid.getText()).toContain('true');\n        });\n\n        it('should be invalid if less than required min length', function() {\n          userLastInput.clear();\n          userLastInput.sendKeys('xx');\n\n          expect(user.getText()).toContain('{\"name\":\"guest\"}');\n          expect(lastNameValid.getText()).toContain('false');\n          expect(lastNameError.getText()).toContain('minlength');\n          expect(formValid.getText()).toContain('false');\n        });\n\n        it('should be invalid if longer than max length', function() {\n          userLastInput.clear();\n          userLastInput.sendKeys('some ridiculously long name');\n\n          expect(user.getText()).toContain('{\"name\":\"guest\"}');\n          expect(lastNameValid.getText()).toContain('false');\n          expect(lastNameError.getText()).toContain('maxlength');\n          expect(formValid.getText()).toContain('false');\n        });\n      </file>\n    </example>\n */\nvar inputDirective = ['$browser', '$sniffer', '$filter', '$parse',\n    function($browser, $sniffer, $filter, $parse) {\n  return {\n    restrict: 'E',\n    require: ['?ngModel'],\n    link: {\n      pre: function(scope, element, attr, ctrls) {\n        if (ctrls[0]) {\n          (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,\n                                                              $browser, $filter, $parse);\n        }\n      }\n    }\n  };\n}];\n\n\n\nvar CONSTANT_VALUE_REGEXP = /^(true|false|\\d+)$/;\n/**\n * @ngdoc directive\n * @name ngValue\n *\n * @description\n * Binds the given expression to the value of `<option>` or {@link input[radio] `input[radio]`},\n * so that when the element is selected, the {@link ngModel `ngModel`} of that element is set to\n * the bound value.\n *\n * `ngValue` is useful when dynamically generating lists of radio buttons using\n * {@link ngRepeat `ngRepeat`}, as shown below.\n *\n * Likewise, `ngValue` can be used to generate `<option>` elements for\n * the {@link select `select`} element. In that case however, only strings are supported\n * for the `value `attribute, so the resulting `ngModel` will always be a string.\n * Support for `select` models with non-string values is available via `ngOptions`.\n *\n * @element input\n * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute\n *   of the `input` element\n *\n * @example\n    <example name=\"ngValue-directive\" module=\"valueExample\">\n      <file name=\"index.html\">\n       <script>\n          angular.module('valueExample', [])\n            .controller('ExampleController', ['$scope', function($scope) {\n              $scope.names = ['pizza', 'unicorns', 'robots'];\n              $scope.my = { favorite: 'unicorns' };\n            }]);\n       </script>\n        <form ng-controller=\"ExampleController\">\n          <h2>Which is your favorite?</h2>\n            <label ng-repeat=\"name in names\" for=\"{{name}}\">\n              {{name}}\n              <input type=\"radio\"\n                     ng-model=\"my.favorite\"\n                     ng-value=\"name\"\n                     id=\"{{name}}\"\n                     name=\"favorite\">\n            </label>\n          <div>You chose {{my.favorite}}</div>\n        </form>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        var favorite = element(by.binding('my.favorite'));\n\n        it('should initialize to model', function() {\n          expect(favorite.getText()).toContain('unicorns');\n        });\n        it('should bind the values to the inputs', function() {\n          element.all(by.model('my.favorite')).get(0).click();\n          expect(favorite.getText()).toContain('pizza');\n        });\n      </file>\n    </example>\n */\nvar ngValueDirective = function() {\n  return {\n    restrict: 'A',\n    priority: 100,\n    compile: function(tpl, tplAttr) {\n      if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {\n        return function ngValueConstantLink(scope, elm, attr) {\n          attr.$set('value', scope.$eval(attr.ngValue));\n        };\n      } else {\n        return function ngValueLink(scope, elm, attr) {\n          scope.$watch(attr.ngValue, function valueWatchAction(value) {\n            attr.$set('value', value);\n          });\n        };\n      }\n    }\n  };\n};\n\n/**\n * @ngdoc directive\n * @name ngBind\n * @restrict AC\n *\n * @description\n * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element\n * with the value of a given expression, and to update the text content when the value of that\n * expression changes.\n *\n * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like\n * `{{ expression }}` which is similar but less verbose.\n *\n * It is preferable to use `ngBind` instead of `{{ expression }}` if a template is momentarily\n * displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an\n * element attribute, it makes the bindings invisible to the user while the page is loading.\n *\n * An alternative solution to this problem would be using the\n * {@link ng.directive:ngCloak ngCloak} directive.\n *\n *\n * @element ANY\n * @param {expression} ngBind {@link guide/expression Expression} to evaluate.\n *\n * @example\n * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.\n   <example module=\"bindExample\">\n     <file name=\"index.html\">\n       <script>\n         angular.module('bindExample', [])\n           .controller('ExampleController', ['$scope', function($scope) {\n             $scope.name = 'Whirled';\n           }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n         <label>Enter name: <input type=\"text\" ng-model=\"name\"></label><br>\n         Hello <span ng-bind=\"name\"></span>!\n       </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-bind', function() {\n         var nameInput = element(by.model('name'));\n\n         expect(element(by.binding('name')).getText()).toBe('Whirled');\n         nameInput.clear();\n         nameInput.sendKeys('world');\n         expect(element(by.binding('name')).getText()).toBe('world');\n       });\n     </file>\n   </example>\n */\nvar ngBindDirective = ['$compile', function($compile) {\n  return {\n    restrict: 'AC',\n    compile: function ngBindCompile(templateElement) {\n      $compile.$$addBindingClass(templateElement);\n      return function ngBindLink(scope, element, attr) {\n        $compile.$$addBindingInfo(element, attr.ngBind);\n        element = element[0];\n        scope.$watch(attr.ngBind, function ngBindWatchAction(value) {\n          element.textContent = isUndefined(value) ? '' : value;\n        });\n      };\n    }\n  };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindTemplate\n *\n * @description\n * The `ngBindTemplate` directive specifies that the element\n * text content should be replaced with the interpolation of the template\n * in the `ngBindTemplate` attribute.\n * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`\n * expressions. This directive is needed since some HTML elements\n * (such as TITLE and OPTION) cannot contain SPAN elements.\n *\n * @element ANY\n * @param {string} ngBindTemplate template of form\n *   <tt>{{</tt> <tt>expression</tt> <tt>}}</tt> to eval.\n *\n * @example\n * Try it here: enter text in text box and watch the greeting change.\n   <example module=\"bindExample\">\n     <file name=\"index.html\">\n       <script>\n         angular.module('bindExample', [])\n           .controller('ExampleController', ['$scope', function($scope) {\n             $scope.salutation = 'Hello';\n             $scope.name = 'World';\n           }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n        <label>Salutation: <input type=\"text\" ng-model=\"salutation\"></label><br>\n        <label>Name: <input type=\"text\" ng-model=\"name\"></label><br>\n        <pre ng-bind-template=\"{{salutation}} {{name}}!\"></pre>\n       </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-bind', function() {\n         var salutationElem = element(by.binding('salutation'));\n         var salutationInput = element(by.model('salutation'));\n         var nameInput = element(by.model('name'));\n\n         expect(salutationElem.getText()).toBe('Hello World!');\n\n         salutationInput.clear();\n         salutationInput.sendKeys('Greetings');\n         nameInput.clear();\n         nameInput.sendKeys('user');\n\n         expect(salutationElem.getText()).toBe('Greetings user!');\n       });\n     </file>\n   </example>\n */\nvar ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate, $compile) {\n  return {\n    compile: function ngBindTemplateCompile(templateElement) {\n      $compile.$$addBindingClass(templateElement);\n      return function ngBindTemplateLink(scope, element, attr) {\n        var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));\n        $compile.$$addBindingInfo(element, interpolateFn.expressions);\n        element = element[0];\n        attr.$observe('ngBindTemplate', function(value) {\n          element.textContent = isUndefined(value) ? '' : value;\n        });\n      };\n    }\n  };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindHtml\n *\n * @description\n * Evaluates the expression and inserts the resulting HTML into the element in a secure way. By default,\n * the resulting HTML content will be sanitized using the {@link ngSanitize.$sanitize $sanitize} service.\n * To utilize this functionality, ensure that `$sanitize` is available, for example, by including {@link\n * ngSanitize} in your module's dependencies (not in core Angular). In order to use {@link ngSanitize}\n * in your module's dependencies, you need to include \"angular-sanitize.js\" in your application.\n *\n * You may also bypass sanitization for values you know are safe. To do so, bind to\n * an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}.  See the example\n * under {@link ng.$sce#show-me-an-example-using-sce- Strict Contextual Escaping (SCE)}.\n *\n * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you\n * will have an exception (instead of an exploit.)\n *\n * @element ANY\n * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.\n *\n * @example\n\n   <example module=\"bindHtmlExample\" deps=\"angular-sanitize.js\">\n     <file name=\"index.html\">\n       <div ng-controller=\"ExampleController\">\n        <p ng-bind-html=\"myHTML\"></p>\n       </div>\n     </file>\n\n     <file name=\"script.js\">\n       angular.module('bindHtmlExample', ['ngSanitize'])\n         .controller('ExampleController', ['$scope', function($scope) {\n           $scope.myHTML =\n              'I am an <code>HTML</code>string with ' +\n              '<a href=\"#\">links!</a> and other <em>stuff</em>';\n         }]);\n     </file>\n\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-bind-html', function() {\n         expect(element(by.binding('myHTML')).getText()).toBe(\n             'I am an HTMLstring with links! and other stuff');\n       });\n     </file>\n   </example>\n */\nvar ngBindHtmlDirective = ['$sce', '$parse', '$compile', function($sce, $parse, $compile) {\n  return {\n    restrict: 'A',\n    compile: function ngBindHtmlCompile(tElement, tAttrs) {\n      var ngBindHtmlGetter = $parse(tAttrs.ngBindHtml);\n      var ngBindHtmlWatch = $parse(tAttrs.ngBindHtml, function getStringValue(value) {\n        return (value || '').toString();\n      });\n      $compile.$$addBindingClass(tElement);\n\n      return function ngBindHtmlLink(scope, element, attr) {\n        $compile.$$addBindingInfo(element, attr.ngBindHtml);\n\n        scope.$watch(ngBindHtmlWatch, function ngBindHtmlWatchAction() {\n          // we re-evaluate the expr because we want a TrustedValueHolderType\n          // for $sce, not a string\n          element.html($sce.getTrustedHtml(ngBindHtmlGetter(scope)) || '');\n        });\n      };\n    }\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ngChange\n *\n * @description\n * Evaluate the given expression when the user changes the input.\n * The expression is evaluated immediately, unlike the JavaScript onchange event\n * which only triggers at the end of a change (usually, when the user leaves the\n * form element or presses the return key).\n *\n * The `ngChange` expression is only evaluated when a change in the input value causes\n * a new value to be committed to the model.\n *\n * It will not be evaluated:\n * * if the value returned from the `$parsers` transformation pipeline has not changed\n * * if the input has continued to be invalid since the model will stay `null`\n * * if the model is changed programmatically and not by a change to the input value\n *\n *\n * Note, this directive requires `ngModel` to be present.\n *\n * @element input\n * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change\n * in input value.\n *\n * @example\n * <example name=\"ngChange-directive\" module=\"changeExample\">\n *   <file name=\"index.html\">\n *     <script>\n *       angular.module('changeExample', [])\n *         .controller('ExampleController', ['$scope', function($scope) {\n *           $scope.counter = 0;\n *           $scope.change = function() {\n *             $scope.counter++;\n *           };\n *         }]);\n *     </script>\n *     <div ng-controller=\"ExampleController\">\n *       <input type=\"checkbox\" ng-model=\"confirmed\" ng-change=\"change()\" id=\"ng-change-example1\" />\n *       <input type=\"checkbox\" ng-model=\"confirmed\" id=\"ng-change-example2\" />\n *       <label for=\"ng-change-example2\">Confirmed</label><br />\n *       <tt>debug = {{confirmed}}</tt><br/>\n *       <tt>counter = {{counter}}</tt><br/>\n *     </div>\n *   </file>\n *   <file name=\"protractor.js\" type=\"protractor\">\n *     var counter = element(by.binding('counter'));\n *     var debug = element(by.binding('confirmed'));\n *\n *     it('should evaluate the expression if changing from view', function() {\n *       expect(counter.getText()).toContain('0');\n *\n *       element(by.id('ng-change-example1')).click();\n *\n *       expect(counter.getText()).toContain('1');\n *       expect(debug.getText()).toContain('true');\n *     });\n *\n *     it('should not evaluate the expression if changing from model', function() {\n *       element(by.id('ng-change-example2')).click();\n\n *       expect(counter.getText()).toContain('0');\n *       expect(debug.getText()).toContain('true');\n *     });\n *   </file>\n * </example>\n */\nvar ngChangeDirective = valueFn({\n  restrict: 'A',\n  require: 'ngModel',\n  link: function(scope, element, attr, ctrl) {\n    ctrl.$viewChangeListeners.push(function() {\n      scope.$eval(attr.ngChange);\n    });\n  }\n});\n\nfunction classDirective(name, selector) {\n  name = 'ngClass' + name;\n  return ['$animate', function($animate) {\n    return {\n      restrict: 'AC',\n      link: function(scope, element, attr) {\n        var oldVal;\n\n        scope.$watch(attr[name], ngClassWatchAction, true);\n\n        attr.$observe('class', function(value) {\n          ngClassWatchAction(scope.$eval(attr[name]));\n        });\n\n\n        if (name !== 'ngClass') {\n          scope.$watch('$index', function($index, old$index) {\n            // jshint bitwise: false\n            var mod = $index & 1;\n            if (mod !== (old$index & 1)) {\n              var classes = arrayClasses(scope.$eval(attr[name]));\n              mod === selector ?\n                addClasses(classes) :\n                removeClasses(classes);\n            }\n          });\n        }\n\n        function addClasses(classes) {\n          var newClasses = digestClassCounts(classes, 1);\n          attr.$addClass(newClasses);\n        }\n\n        function removeClasses(classes) {\n          var newClasses = digestClassCounts(classes, -1);\n          attr.$removeClass(newClasses);\n        }\n\n        function digestClassCounts(classes, count) {\n          // Use createMap() to prevent class assumptions involving property\n          // names in Object.prototype\n          var classCounts = element.data('$classCounts') || createMap();\n          var classesToUpdate = [];\n          forEach(classes, function(className) {\n            if (count > 0 || classCounts[className]) {\n              classCounts[className] = (classCounts[className] || 0) + count;\n              if (classCounts[className] === +(count > 0)) {\n                classesToUpdate.push(className);\n              }\n            }\n          });\n          element.data('$classCounts', classCounts);\n          return classesToUpdate.join(' ');\n        }\n\n        function updateClasses(oldClasses, newClasses) {\n          var toAdd = arrayDifference(newClasses, oldClasses);\n          var toRemove = arrayDifference(oldClasses, newClasses);\n          toAdd = digestClassCounts(toAdd, 1);\n          toRemove = digestClassCounts(toRemove, -1);\n          if (toAdd && toAdd.length) {\n            $animate.addClass(element, toAdd);\n          }\n          if (toRemove && toRemove.length) {\n            $animate.removeClass(element, toRemove);\n          }\n        }\n\n        function ngClassWatchAction(newVal) {\n          if (selector === true || scope.$index % 2 === selector) {\n            var newClasses = arrayClasses(newVal || []);\n            if (!oldVal) {\n              addClasses(newClasses);\n            } else if (!equals(newVal,oldVal)) {\n              var oldClasses = arrayClasses(oldVal);\n              updateClasses(oldClasses, newClasses);\n            }\n          }\n          oldVal = shallowCopy(newVal);\n        }\n      }\n    };\n\n    function arrayDifference(tokens1, tokens2) {\n      var values = [];\n\n      outer:\n      for (var i = 0; i < tokens1.length; i++) {\n        var token = tokens1[i];\n        for (var j = 0; j < tokens2.length; j++) {\n          if (token == tokens2[j]) continue outer;\n        }\n        values.push(token);\n      }\n      return values;\n    }\n\n    function arrayClasses(classVal) {\n      var classes = [];\n      if (isArray(classVal)) {\n        forEach(classVal, function(v) {\n          classes = classes.concat(arrayClasses(v));\n        });\n        return classes;\n      } else if (isString(classVal)) {\n        return classVal.split(' ');\n      } else if (isObject(classVal)) {\n        forEach(classVal, function(v, k) {\n          if (v) {\n            classes = classes.concat(k.split(' '));\n          }\n        });\n        return classes;\n      }\n      return classVal;\n    }\n  }];\n}\n\n/**\n * @ngdoc directive\n * @name ngClass\n * @restrict AC\n *\n * @description\n * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding\n * an expression that represents all classes to be added.\n *\n * The directive operates in three different ways, depending on which of three types the expression\n * evaluates to:\n *\n * 1. If the expression evaluates to a string, the string should be one or more space-delimited class\n * names.\n *\n * 2. If the expression evaluates to an object, then for each key-value pair of the\n * object with a truthy value the corresponding key is used as a class name.\n *\n * 3. If the expression evaluates to an array, each element of the array should either be a string as in\n * type 1 or an object as in type 2. This means that you can mix strings and objects together in an array\n * to give you more control over what CSS classes appear. See the code below for an example of this.\n *\n *\n * The directive won't add duplicate classes if a particular class was already set.\n *\n * When the expression changes, the previously added classes are removed and only then are the\n * new classes added.\n *\n * @animations\n * | Animation                        | Occurs                              |\n * |----------------------------------|-------------------------------------|\n * | {@link ng.$animate#addClass addClass}       | just before the class is applied to the element   |\n * | {@link ng.$animate#removeClass removeClass} | just before the class is removed from the element |\n *\n * @element ANY\n * @param {expression} ngClass {@link guide/expression Expression} to eval. The result\n *   of the evaluation can be a string representing space delimited class\n *   names, an array, or a map of class names to boolean values. In the case of a map, the\n *   names of the properties whose values are truthy will be added as css classes to the\n *   element.\n *\n * @example Example that demonstrates basic bindings via ngClass directive.\n   <example>\n     <file name=\"index.html\">\n       <p ng-class=\"{strike: deleted, bold: important, 'has-error': error}\">Map Syntax Example</p>\n       <label>\n          <input type=\"checkbox\" ng-model=\"deleted\">\n          deleted (apply \"strike\" class)\n       </label><br>\n       <label>\n          <input type=\"checkbox\" ng-model=\"important\">\n          important (apply \"bold\" class)\n       </label><br>\n       <label>\n          <input type=\"checkbox\" ng-model=\"error\">\n          error (apply \"has-error\" class)\n       </label>\n       <hr>\n       <p ng-class=\"style\">Using String Syntax</p>\n       <input type=\"text\" ng-model=\"style\"\n              placeholder=\"Type: bold strike red\" aria-label=\"Type: bold strike red\">\n       <hr>\n       <p ng-class=\"[style1, style2, style3]\">Using Array Syntax</p>\n       <input ng-model=\"style1\"\n              placeholder=\"Type: bold, strike or red\" aria-label=\"Type: bold, strike or red\"><br>\n       <input ng-model=\"style2\"\n              placeholder=\"Type: bold, strike or red\" aria-label=\"Type: bold, strike or red 2\"><br>\n       <input ng-model=\"style3\"\n              placeholder=\"Type: bold, strike or red\" aria-label=\"Type: bold, strike or red 3\"><br>\n       <hr>\n       <p ng-class=\"[style4, {orange: warning}]\">Using Array and Map Syntax</p>\n       <input ng-model=\"style4\" placeholder=\"Type: bold, strike\" aria-label=\"Type: bold, strike\"><br>\n       <label><input type=\"checkbox\" ng-model=\"warning\"> warning (apply \"orange\" class)</label>\n     </file>\n     <file name=\"style.css\">\n       .strike {\n           text-decoration: line-through;\n       }\n       .bold {\n           font-weight: bold;\n       }\n       .red {\n           color: red;\n       }\n       .has-error {\n           color: red;\n           background-color: yellow;\n       }\n       .orange {\n           color: orange;\n       }\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       var ps = element.all(by.css('p'));\n\n       it('should let you toggle the class', function() {\n\n         expect(ps.first().getAttribute('class')).not.toMatch(/bold/);\n         expect(ps.first().getAttribute('class')).not.toMatch(/has-error/);\n\n         element(by.model('important')).click();\n         expect(ps.first().getAttribute('class')).toMatch(/bold/);\n\n         element(by.model('error')).click();\n         expect(ps.first().getAttribute('class')).toMatch(/has-error/);\n       });\n\n       it('should let you toggle string example', function() {\n         expect(ps.get(1).getAttribute('class')).toBe('');\n         element(by.model('style')).clear();\n         element(by.model('style')).sendKeys('red');\n         expect(ps.get(1).getAttribute('class')).toBe('red');\n       });\n\n       it('array example should have 3 classes', function() {\n         expect(ps.get(2).getAttribute('class')).toBe('');\n         element(by.model('style1')).sendKeys('bold');\n         element(by.model('style2')).sendKeys('strike');\n         element(by.model('style3')).sendKeys('red');\n         expect(ps.get(2).getAttribute('class')).toBe('bold strike red');\n       });\n\n       it('array with map example should have 2 classes', function() {\n         expect(ps.last().getAttribute('class')).toBe('');\n         element(by.model('style4')).sendKeys('bold');\n         element(by.model('warning')).click();\n         expect(ps.last().getAttribute('class')).toBe('bold orange');\n       });\n     </file>\n   </example>\n\n   ## Animations\n\n   The example below demonstrates how to perform animations using ngClass.\n\n   <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n     <file name=\"index.html\">\n      <input id=\"setbtn\" type=\"button\" value=\"set\" ng-click=\"myVar='my-class'\">\n      <input id=\"clearbtn\" type=\"button\" value=\"clear\" ng-click=\"myVar=''\">\n      <br>\n      <span class=\"base-class\" ng-class=\"myVar\">Sample Text</span>\n     </file>\n     <file name=\"style.css\">\n       .base-class {\n         transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n       }\n\n       .base-class.my-class {\n         color: red;\n         font-size:3em;\n       }\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-class', function() {\n         expect(element(by.css('.base-class')).getAttribute('class')).not.\n           toMatch(/my-class/);\n\n         element(by.id('setbtn')).click();\n\n         expect(element(by.css('.base-class')).getAttribute('class')).\n           toMatch(/my-class/);\n\n         element(by.id('clearbtn')).click();\n\n         expect(element(by.css('.base-class')).getAttribute('class')).not.\n           toMatch(/my-class/);\n       });\n     </file>\n   </example>\n\n\n   ## ngClass and pre-existing CSS3 Transitions/Animations\n   The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.\n   Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder\n   any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure\n   to view the step by step details of {@link $animate#addClass $animate.addClass} and\n   {@link $animate#removeClass $animate.removeClass}.\n */\nvar ngClassDirective = classDirective('', true);\n\n/**\n * @ngdoc directive\n * @name ngClassOdd\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result\n *   of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n        <ol ng-init=\"names=['John', 'Mary', 'Cate', 'Suz']\">\n          <li ng-repeat=\"name in names\">\n           <span ng-class-odd=\"'odd'\" ng-class-even=\"'even'\">\n             {{name}}\n           </span>\n          </li>\n        </ol>\n     </file>\n     <file name=\"style.css\">\n       .odd {\n         color: red;\n       }\n       .even {\n         color: blue;\n       }\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-class-odd and ng-class-even', function() {\n         expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n           toMatch(/odd/);\n         expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n           toMatch(/even/);\n       });\n     </file>\n   </example>\n */\nvar ngClassOddDirective = classDirective('Odd', 0);\n\n/**\n * @ngdoc directive\n * @name ngClassEven\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The\n *   result of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n        <ol ng-init=\"names=['John', 'Mary', 'Cate', 'Suz']\">\n          <li ng-repeat=\"name in names\">\n           <span ng-class-odd=\"'odd'\" ng-class-even=\"'even'\">\n             {{name}} &nbsp; &nbsp; &nbsp;\n           </span>\n          </li>\n        </ol>\n     </file>\n     <file name=\"style.css\">\n       .odd {\n         color: red;\n       }\n       .even {\n         color: blue;\n       }\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-class-odd and ng-class-even', function() {\n         expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n           toMatch(/odd/);\n         expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n           toMatch(/even/);\n       });\n     </file>\n   </example>\n */\nvar ngClassEvenDirective = classDirective('Even', 1);\n\n/**\n * @ngdoc directive\n * @name ngCloak\n * @restrict AC\n *\n * @description\n * The `ngCloak` directive is used to prevent the Angular html template from being briefly\n * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this\n * directive to avoid the undesirable flicker effect caused by the html template display.\n *\n * The directive can be applied to the `<body>` element, but the preferred usage is to apply\n * multiple `ngCloak` directives to small portions of the page to permit progressive rendering\n * of the browser view.\n *\n * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and\n * `angular.min.js`.\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```css\n * [ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {\n *   display: none !important;\n * }\n * ```\n *\n * When this css rule is loaded by the browser, all html elements (including their children) that\n * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive\n * during the compilation of the template it deletes the `ngCloak` element attribute, making\n * the compiled element visible.\n *\n * For the best result, the `angular.js` script must be loaded in the head section of the html\n * document; alternatively, the css rule above must be included in the external stylesheet of the\n * application.\n *\n * @element ANY\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n        <div id=\"template1\" ng-cloak>{{ 'hello' }}</div>\n        <div id=\"template2\" class=\"ng-cloak\">{{ 'world' }}</div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should remove the template directive and css class', function() {\n         expect($('#template1').getAttribute('ng-cloak')).\n           toBeNull();\n         expect($('#template2').getAttribute('ng-cloak')).\n           toBeNull();\n       });\n     </file>\n   </example>\n *\n */\nvar ngCloakDirective = ngDirective({\n  compile: function(element, attr) {\n    attr.$set('ngCloak', undefined);\n    element.removeClass('ng-cloak');\n  }\n});\n\n/**\n * @ngdoc directive\n * @name ngController\n *\n * @description\n * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular\n * supports the principles behind the Model-View-Controller design pattern.\n *\n * MVC components in angular:\n *\n * * Model — Models are the properties of a scope; scopes are attached to the DOM where scope properties\n *   are accessed through bindings.\n * * View — The template (HTML with data bindings) that is rendered into the View.\n * * Controller — The `ngController` directive specifies a Controller class; the class contains business\n *   logic behind the application to decorate the scope with functions and values\n *\n * Note that you can also attach controllers to the DOM by declaring it in a route definition\n * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller\n * again using `ng-controller` in the template itself.  This will cause the controller to be attached\n * and executed twice.\n *\n * @element ANY\n * @scope\n * @priority 500\n * @param {expression} ngController Name of a constructor function registered with the current\n * {@link ng.$controllerProvider $controllerProvider} or an {@link guide/expression expression}\n * that on the current scope evaluates to a constructor function.\n *\n * The controller instance can be published into a scope property by specifying\n * `ng-controller=\"as propertyName\"`.\n *\n * If the current `$controllerProvider` is configured to use globals (via\n * {@link ng.$controllerProvider#allowGlobals `$controllerProvider.allowGlobals()` }), this may\n * also be the name of a globally accessible constructor function (not recommended).\n *\n * @example\n * Here is a simple form for editing user contact information. Adding, removing, clearing, and\n * greeting are methods declared on the controller (see source tab). These methods can\n * easily be called from the angular markup. Any changes to the data are automatically reflected\n * in the View without the need for a manual update.\n *\n * Two different declaration styles are included below:\n *\n * * one binds methods and properties directly onto the controller using `this`:\n * `ng-controller=\"SettingsController1 as settings\"`\n * * one injects `$scope` into the controller:\n * `ng-controller=\"SettingsController2\"`\n *\n * The second option is more common in the Angular community, and is generally used in boilerplates\n * and in this guide. However, there are advantages to binding properties directly to the controller\n * and avoiding scope.\n *\n * * Using `controller as` makes it obvious which controller you are accessing in the template when\n * multiple controllers apply to an element.\n * * If you are writing your controllers as classes you have easier access to the properties and\n * methods, which will appear on the scope, from inside the controller code.\n * * Since there is always a `.` in the bindings, you don't have to worry about prototypal\n * inheritance masking primitives.\n *\n * This example demonstrates the `controller as` syntax.\n *\n * <example name=\"ngControllerAs\" module=\"controllerAsExample\">\n *   <file name=\"index.html\">\n *    <div id=\"ctrl-as-exmpl\" ng-controller=\"SettingsController1 as settings\">\n *      <label>Name: <input type=\"text\" ng-model=\"settings.name\"/></label>\n *      <button ng-click=\"settings.greet()\">greet</button><br/>\n *      Contact:\n *      <ul>\n *        <li ng-repeat=\"contact in settings.contacts\">\n *          <select ng-model=\"contact.type\" aria-label=\"Contact method\" id=\"select_{{$index}}\">\n *             <option>phone</option>\n *             <option>email</option>\n *          </select>\n *          <input type=\"text\" ng-model=\"contact.value\" aria-labelledby=\"select_{{$index}}\" />\n *          <button ng-click=\"settings.clearContact(contact)\">clear</button>\n *          <button ng-click=\"settings.removeContact(contact)\" aria-label=\"Remove\">X</button>\n *        </li>\n *        <li><button ng-click=\"settings.addContact()\">add</button></li>\n *     </ul>\n *    </div>\n *   </file>\n *   <file name=\"app.js\">\n *    angular.module('controllerAsExample', [])\n *      .controller('SettingsController1', SettingsController1);\n *\n *    function SettingsController1() {\n *      this.name = \"John Smith\";\n *      this.contacts = [\n *        {type: 'phone', value: '408 555 1212'},\n *        {type: 'email', value: 'john.smith@example.org'} ];\n *    }\n *\n *    SettingsController1.prototype.greet = function() {\n *      alert(this.name);\n *    };\n *\n *    SettingsController1.prototype.addContact = function() {\n *      this.contacts.push({type: 'email', value: 'yourname@example.org'});\n *    };\n *\n *    SettingsController1.prototype.removeContact = function(contactToRemove) {\n *     var index = this.contacts.indexOf(contactToRemove);\n *      this.contacts.splice(index, 1);\n *    };\n *\n *    SettingsController1.prototype.clearContact = function(contact) {\n *      contact.type = 'phone';\n *      contact.value = '';\n *    };\n *   </file>\n *   <file name=\"protractor.js\" type=\"protractor\">\n *     it('should check controller as', function() {\n *       var container = element(by.id('ctrl-as-exmpl'));\n *         expect(container.element(by.model('settings.name'))\n *           .getAttribute('value')).toBe('John Smith');\n *\n *       var firstRepeat =\n *           container.element(by.repeater('contact in settings.contacts').row(0));\n *       var secondRepeat =\n *           container.element(by.repeater('contact in settings.contacts').row(1));\n *\n *       expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n *           .toBe('408 555 1212');\n *\n *       expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n *           .toBe('john.smith@example.org');\n *\n *       firstRepeat.element(by.buttonText('clear')).click();\n *\n *       expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n *           .toBe('');\n *\n *       container.element(by.buttonText('add')).click();\n *\n *       expect(container.element(by.repeater('contact in settings.contacts').row(2))\n *           .element(by.model('contact.value'))\n *           .getAttribute('value'))\n *           .toBe('yourname@example.org');\n *     });\n *   </file>\n * </example>\n *\n * This example demonstrates the \"attach to `$scope`\" style of controller.\n *\n * <example name=\"ngController\" module=\"controllerExample\">\n *  <file name=\"index.html\">\n *   <div id=\"ctrl-exmpl\" ng-controller=\"SettingsController2\">\n *     <label>Name: <input type=\"text\" ng-model=\"name\"/></label>\n *     <button ng-click=\"greet()\">greet</button><br/>\n *     Contact:\n *     <ul>\n *       <li ng-repeat=\"contact in contacts\">\n *         <select ng-model=\"contact.type\" id=\"select_{{$index}}\">\n *            <option>phone</option>\n *            <option>email</option>\n *         </select>\n *         <input type=\"text\" ng-model=\"contact.value\" aria-labelledby=\"select_{{$index}}\" />\n *         <button ng-click=\"clearContact(contact)\">clear</button>\n *         <button ng-click=\"removeContact(contact)\">X</button>\n *       </li>\n *       <li>[ <button ng-click=\"addContact()\">add</button> ]</li>\n *    </ul>\n *   </div>\n *  </file>\n *  <file name=\"app.js\">\n *   angular.module('controllerExample', [])\n *     .controller('SettingsController2', ['$scope', SettingsController2]);\n *\n *   function SettingsController2($scope) {\n *     $scope.name = \"John Smith\";\n *     $scope.contacts = [\n *       {type:'phone', value:'408 555 1212'},\n *       {type:'email', value:'john.smith@example.org'} ];\n *\n *     $scope.greet = function() {\n *       alert($scope.name);\n *     };\n *\n *     $scope.addContact = function() {\n *       $scope.contacts.push({type:'email', value:'yourname@example.org'});\n *     };\n *\n *     $scope.removeContact = function(contactToRemove) {\n *       var index = $scope.contacts.indexOf(contactToRemove);\n *       $scope.contacts.splice(index, 1);\n *     };\n *\n *     $scope.clearContact = function(contact) {\n *       contact.type = 'phone';\n *       contact.value = '';\n *     };\n *   }\n *  </file>\n *  <file name=\"protractor.js\" type=\"protractor\">\n *    it('should check controller', function() {\n *      var container = element(by.id('ctrl-exmpl'));\n *\n *      expect(container.element(by.model('name'))\n *          .getAttribute('value')).toBe('John Smith');\n *\n *      var firstRepeat =\n *          container.element(by.repeater('contact in contacts').row(0));\n *      var secondRepeat =\n *          container.element(by.repeater('contact in contacts').row(1));\n *\n *      expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n *          .toBe('408 555 1212');\n *      expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n *          .toBe('john.smith@example.org');\n *\n *      firstRepeat.element(by.buttonText('clear')).click();\n *\n *      expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n *          .toBe('');\n *\n *      container.element(by.buttonText('add')).click();\n *\n *      expect(container.element(by.repeater('contact in contacts').row(2))\n *          .element(by.model('contact.value'))\n *          .getAttribute('value'))\n *          .toBe('yourname@example.org');\n *    });\n *  </file>\n *</example>\n\n */\nvar ngControllerDirective = [function() {\n  return {\n    restrict: 'A',\n    scope: true,\n    controller: '@',\n    priority: 500\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ngCsp\n *\n * @element html\n * @description\n *\n * Angular has some features that can break certain\n * [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) rules.\n *\n * If you intend to implement these rules then you must tell Angular not to use these features.\n *\n * This is necessary when developing things like Google Chrome Extensions or Universal Windows Apps.\n *\n *\n * The following rules affect Angular:\n *\n * * `unsafe-eval`: this rule forbids apps to use `eval` or `Function(string)` generated functions\n * (among other things). Angular makes use of this in the {@link $parse} service to provide a 30%\n * increase in the speed of evaluating Angular expressions.\n *\n * * `unsafe-inline`: this rule forbids apps from inject custom styles into the document. Angular\n * makes use of this to include some CSS rules (e.g. {@link ngCloak} and {@link ngHide}).\n * To make these directives work when a CSP rule is blocking inline styles, you must link to the\n * `angular-csp.css` in your HTML manually.\n *\n * If you do not provide `ngCsp` then Angular tries to autodetect if CSP is blocking unsafe-eval\n * and automatically deactivates this feature in the {@link $parse} service. This autodetection,\n * however, triggers a CSP error to be logged in the console:\n *\n * ```\n * Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of\n * script in the following Content Security Policy directive: \"default-src 'self'\". Note that\n * 'script-src' was not explicitly set, so 'default-src' is used as a fallback.\n * ```\n *\n * This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`\n * directive on an element of the HTML document that appears before the `<script>` tag that loads\n * the `angular.js` file.\n *\n * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*\n *\n * You can specify which of the CSP related Angular features should be deactivated by providing\n * a value for the `ng-csp` attribute. The options are as follows:\n *\n * * no-inline-style: this stops Angular from injecting CSS styles into the DOM\n *\n * * no-unsafe-eval: this stops Angular from optimizing $parse with unsafe eval of strings\n *\n * You can use these values in the following combinations:\n *\n *\n * * No declaration means that Angular will assume that you can do inline styles, but it will do\n * a runtime check for unsafe-eval. E.g. `<body>`. This is backwardly compatible with previous versions\n * of Angular.\n *\n * * A simple `ng-csp` (or `data-ng-csp`) attribute will tell Angular to deactivate both inline\n * styles and unsafe eval. E.g. `<body ng-csp>`. This is backwardly compatible with previous versions\n * of Angular.\n *\n * * Specifying only `no-unsafe-eval` tells Angular that we must not use eval, but that we can inject\n * inline styles. E.g. `<body ng-csp=\"no-unsafe-eval\">`.\n *\n * * Specifying only `no-inline-style` tells Angular that we must not inject styles, but that we can\n * run eval - no automatic check for unsafe eval will occur. E.g. `<body ng-csp=\"no-inline-style\">`\n *\n * * Specifying both `no-unsafe-eval` and `no-inline-style` tells Angular that we must not inject\n * styles nor use eval, which is the same as an empty: ng-csp.\n * E.g.`<body ng-csp=\"no-inline-style;no-unsafe-eval\">`\n *\n * @example\n * This example shows how to apply the `ngCsp` directive to the `html` tag.\n   ```html\n     <!doctype html>\n     <html ng-app ng-csp>\n     ...\n     ...\n     </html>\n   ```\n  * @example\n      // Note: the suffix `.csp` in the example name triggers\n      // csp mode in our http server!\n      <example name=\"example.csp\" module=\"cspExample\" ng-csp=\"true\">\n        <file name=\"index.html\">\n          <div ng-controller=\"MainController as ctrl\">\n            <div>\n              <button ng-click=\"ctrl.inc()\" id=\"inc\">Increment</button>\n              <span id=\"counter\">\n                {{ctrl.counter}}\n              </span>\n            </div>\n\n            <div>\n              <button ng-click=\"ctrl.evil()\" id=\"evil\">Evil</button>\n              <span id=\"evilError\">\n                {{ctrl.evilError}}\n              </span>\n            </div>\n          </div>\n        </file>\n        <file name=\"script.js\">\n           angular.module('cspExample', [])\n             .controller('MainController', function() {\n                this.counter = 0;\n                this.inc = function() {\n                  this.counter++;\n                };\n                this.evil = function() {\n                  // jshint evil:true\n                  try {\n                    eval('1+2');\n                  } catch (e) {\n                    this.evilError = e.message;\n                  }\n                };\n              });\n        </file>\n        <file name=\"protractor.js\" type=\"protractor\">\n          var util, webdriver;\n\n          var incBtn = element(by.id('inc'));\n          var counter = element(by.id('counter'));\n          var evilBtn = element(by.id('evil'));\n          var evilError = element(by.id('evilError'));\n\n          function getAndClearSevereErrors() {\n            return browser.manage().logs().get('browser').then(function(browserLog) {\n              return browserLog.filter(function(logEntry) {\n                return logEntry.level.value > webdriver.logging.Level.WARNING.value;\n              });\n            });\n          }\n\n          function clearErrors() {\n            getAndClearSevereErrors();\n          }\n\n          function expectNoErrors() {\n            getAndClearSevereErrors().then(function(filteredLog) {\n              expect(filteredLog.length).toEqual(0);\n              if (filteredLog.length) {\n                console.log('browser console errors: ' + util.inspect(filteredLog));\n              }\n            });\n          }\n\n          function expectError(regex) {\n            getAndClearSevereErrors().then(function(filteredLog) {\n              var found = false;\n              filteredLog.forEach(function(log) {\n                if (log.message.match(regex)) {\n                  found = true;\n                }\n              });\n              if (!found) {\n                throw new Error('expected an error that matches ' + regex);\n              }\n            });\n          }\n\n          beforeEach(function() {\n            util = require('util');\n            webdriver = require('protractor/node_modules/selenium-webdriver');\n          });\n\n          // For now, we only test on Chrome,\n          // as Safari does not load the page with Protractor's injected scripts,\n          // and Firefox webdriver always disables content security policy (#6358)\n          if (browser.params.browser !== 'chrome') {\n            return;\n          }\n\n          it('should not report errors when the page is loaded', function() {\n            // clear errors so we are not dependent on previous tests\n            clearErrors();\n            // Need to reload the page as the page is already loaded when\n            // we come here\n            browser.driver.getCurrentUrl().then(function(url) {\n              browser.get(url);\n            });\n            expectNoErrors();\n          });\n\n          it('should evaluate expressions', function() {\n            expect(counter.getText()).toEqual('0');\n            incBtn.click();\n            expect(counter.getText()).toEqual('1');\n            expectNoErrors();\n          });\n\n          it('should throw and report an error when using \"eval\"', function() {\n            evilBtn.click();\n            expect(evilError.getText()).toMatch(/Content Security Policy/);\n            expectError(/Content Security Policy/);\n          });\n        </file>\n      </example>\n  */\n\n// ngCsp is not implemented as a proper directive any more, because we need it be processed while we\n// bootstrap the system (before $parse is instantiated), for this reason we just have\n// the csp() fn that looks for the `ng-csp` attribute anywhere in the current doc\n\n/**\n * @ngdoc directive\n * @name ngClick\n *\n * @description\n * The ngClick directive allows you to specify custom behavior when\n * an element is clicked.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon\n * click. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-click=\"count = count + 1\" ng-init=\"count=0\">\n        Increment\n      </button>\n      <span>\n        count: {{count}}\n      </span>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-click', function() {\n         expect(element(by.binding('count')).getText()).toMatch('0');\n         element(by.css('button')).click();\n         expect(element(by.binding('count')).getText()).toMatch('1');\n       });\n     </file>\n   </example>\n */\n/*\n * A collection of directives that allows creation of custom event handlers that are defined as\n * angular expressions and are compiled and executed within the current scope.\n */\nvar ngEventDirectives = {};\n\n// For events that might fire synchronously during DOM manipulation\n// we need to execute their event handlers asynchronously using $evalAsync,\n// so that they are not executed in an inconsistent state.\nvar forceAsyncEvents = {\n  'blur': true,\n  'focus': true\n};\nforEach(\n  'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),\n  function(eventName) {\n    var directiveName = directiveNormalize('ng-' + eventName);\n    ngEventDirectives[directiveName] = ['$parse', '$rootScope', function($parse, $rootScope) {\n      return {\n        restrict: 'A',\n        compile: function($element, attr) {\n          // We expose the powerful $event object on the scope that provides access to the Window,\n          // etc. that isn't protected by the fast paths in $parse.  We explicitly request better\n          // checks at the cost of speed since event handler expressions are not executed as\n          // frequently as regular change detection.\n          var fn = $parse(attr[directiveName], /* interceptorFn */ null, /* expensiveChecks */ true);\n          return function ngEventHandler(scope, element) {\n            element.on(eventName, function(event) {\n              var callback = function() {\n                fn(scope, {$event:event});\n              };\n              if (forceAsyncEvents[eventName] && $rootScope.$$phase) {\n                scope.$evalAsync(callback);\n              } else {\n                scope.$apply(callback);\n              }\n            });\n          };\n        }\n      };\n    }];\n  }\n);\n\n/**\n * @ngdoc directive\n * @name ngDblclick\n *\n * @description\n * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon\n * a dblclick. (The Event object is available as `$event`)\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-dblclick=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (on double click)\n      </button>\n      count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousedown\n *\n * @description\n * The ngMousedown directive allows you to specify custom behavior on mousedown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon\n * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-mousedown=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (on mouse down)\n      </button>\n      count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseup\n *\n * @description\n * Specify custom behavior on mouseup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon\n * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-mouseup=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (on mouse up)\n      </button>\n      count: {{count}}\n     </file>\n   </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngMouseover\n *\n * @description\n * Specify custom behavior on mouseover event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon\n * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-mouseover=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse is over)\n      </button>\n      count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseenter\n *\n * @description\n * Specify custom behavior on mouseenter event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon\n * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-mouseenter=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse enters)\n      </button>\n      count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseleave\n *\n * @description\n * Specify custom behavior on mouseleave event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon\n * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-mouseleave=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse leaves)\n      </button>\n      count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousemove\n *\n * @description\n * Specify custom behavior on mousemove event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon\n * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-mousemove=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse moves)\n      </button>\n      count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeydown\n *\n * @description\n * Specify custom behavior on keydown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon\n * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <input ng-keydown=\"count = count + 1\" ng-init=\"count=0\">\n      key down count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeyup\n *\n * @description\n * Specify custom behavior on keyup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon\n * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n       <p>Typing in the input box below updates the key count</p>\n       <input ng-keyup=\"count = count + 1\" ng-init=\"count=0\"> key up count: {{count}}\n\n       <p>Typing in the input box below updates the keycode</p>\n       <input ng-keyup=\"event=$event\">\n       <p>event keyCode: {{ event.keyCode }}</p>\n       <p>event altKey: {{ event.altKey }}</p>\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeypress\n *\n * @description\n * Specify custom behavior on keypress event.\n *\n * @element ANY\n * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon\n * keypress. ({@link guide/expression#-event- Event object is available as `$event`}\n * and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <input ng-keypress=\"count = count + 1\" ng-init=\"count=0\">\n      key press count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngSubmit\n *\n * @description\n * Enables binding angular expressions to onsubmit events.\n *\n * Additionally it prevents the default action (which for form means sending the request to the\n * server and reloading the current page), but only if the form does not contain `action`,\n * `data-action`, or `x-action` attributes.\n *\n * <div class=\"alert alert-warning\">\n * **Warning:** Be careful not to cause \"double-submission\" by using both the `ngClick` and\n * `ngSubmit` handlers together. See the\n * {@link form#submitting-a-form-and-preventing-the-default-action `form` directive documentation}\n * for a detailed discussion of when `ngSubmit` may be triggered.\n * </div>\n *\n * @element form\n * @priority 0\n * @param {expression} ngSubmit {@link guide/expression Expression} to eval.\n * ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example module=\"submitExample\">\n     <file name=\"index.html\">\n      <script>\n        angular.module('submitExample', [])\n          .controller('ExampleController', ['$scope', function($scope) {\n            $scope.list = [];\n            $scope.text = 'hello';\n            $scope.submit = function() {\n              if ($scope.text) {\n                $scope.list.push(this.text);\n                $scope.text = '';\n              }\n            };\n          }]);\n      </script>\n      <form ng-submit=\"submit()\" ng-controller=\"ExampleController\">\n        Enter text and hit enter:\n        <input type=\"text\" ng-model=\"text\" name=\"text\" />\n        <input type=\"submit\" id=\"submit\" value=\"Submit\" />\n        <pre>list={{list}}</pre>\n      </form>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-submit', function() {\n         expect(element(by.binding('list')).getText()).toBe('list=[]');\n         element(by.css('#submit')).click();\n         expect(element(by.binding('list')).getText()).toContain('hello');\n         expect(element(by.model('text')).getAttribute('value')).toBe('');\n       });\n       it('should ignore empty strings', function() {\n         expect(element(by.binding('list')).getText()).toBe('list=[]');\n         element(by.css('#submit')).click();\n         element(by.css('#submit')).click();\n         expect(element(by.binding('list')).getText()).toContain('hello');\n        });\n     </file>\n   </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngFocus\n *\n * @description\n * Specify custom behavior on focus event.\n *\n * Note: As the `focus` event is executed synchronously when calling `input.focus()`\n * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n * during an `$apply` to ensure a consistent state.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon\n * focus. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngBlur\n *\n * @description\n * Specify custom behavior on blur event.\n *\n * A [blur event](https://developer.mozilla.org/en-US/docs/Web/Events/blur) fires when\n * an element has lost focus.\n *\n * Note: As the `blur` event is executed synchronously also during DOM manipulations\n * (e.g. removing a focussed input),\n * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n * during an `$apply` to ensure a consistent state.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon\n * blur. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngCopy\n *\n * @description\n * Specify custom behavior on copy event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon\n * copy. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <input ng-copy=\"copied=true\" ng-init=\"copied=false; value='copy me'\" ng-model=\"value\">\n      copied: {{copied}}\n     </file>\n   </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngCut\n *\n * @description\n * Specify custom behavior on cut event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon\n * cut. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <input ng-cut=\"cut=true\" ng-init=\"cut=false; value='cut me'\" ng-model=\"value\">\n      cut: {{cut}}\n     </file>\n   </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngPaste\n *\n * @description\n * Specify custom behavior on paste event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon\n * paste. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <input ng-paste=\"paste=true\" ng-init=\"paste=false\" placeholder='paste here'>\n      pasted: {{paste}}\n     </file>\n   </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngIf\n * @restrict A\n * @multiElement\n *\n * @description\n * The `ngIf` directive removes or recreates a portion of the DOM tree based on an\n * {expression}. If the expression assigned to `ngIf` evaluates to a false\n * value then the element is removed from the DOM, otherwise a clone of the\n * element is reinserted into the DOM.\n *\n * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the\n * element in the DOM rather than changing its visibility via the `display` css property.  A common\n * case when this difference is significant is when using css selectors that rely on an element's\n * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.\n *\n * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope\n * is created when the element is restored.  The scope created within `ngIf` inherits from\n * its parent scope using\n * [prototypal inheritance](https://github.com/angular/angular.js/wiki/Understanding-Scopes#javascript-prototypal-inheritance).\n * An important implication of this is if `ngModel` is used within `ngIf` to bind to\n * a javascript primitive defined in the parent scope. In this case any modifications made to the\n * variable within the child scope will override (hide) the value in the parent scope.\n *\n * Also, `ngIf` recreates elements using their compiled state. An example of this behavior\n * is if an element's class attribute is directly modified after it's compiled, using something like\n * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element\n * the added class will be lost because the original compiled state is used to regenerate the element.\n *\n * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`\n * and `leave` effects.\n *\n * @animations\n * | Animation                        | Occurs                               |\n * |----------------------------------|-------------------------------------|\n * | {@link ng.$animate#enter enter}  | just after the `ngIf` contents change and a new DOM element is created and injected into the `ngIf` container |\n * | {@link ng.$animate#leave leave}  | just before the `ngIf` contents are removed from the DOM |\n *\n * @element ANY\n * @scope\n * @priority 600\n * @param {expression} ngIf If the {@link guide/expression expression} is falsy then\n *     the element is removed from the DOM tree. If it is truthy a copy of the compiled\n *     element is added to the DOM tree.\n *\n * @example\n  <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n    <file name=\"index.html\">\n      <label>Click me: <input type=\"checkbox\" ng-model=\"checked\" ng-init=\"checked=true\" /></label><br/>\n      Show when checked:\n      <span ng-if=\"checked\" class=\"animate-if\">\n        This is removed when the checkbox is unchecked.\n      </span>\n    </file>\n    <file name=\"animations.css\">\n      .animate-if {\n        background:white;\n        border:1px solid black;\n        padding:10px;\n      }\n\n      .animate-if.ng-enter, .animate-if.ng-leave {\n        transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n      }\n\n      .animate-if.ng-enter,\n      .animate-if.ng-leave.ng-leave-active {\n        opacity:0;\n      }\n\n      .animate-if.ng-leave,\n      .animate-if.ng-enter.ng-enter-active {\n        opacity:1;\n      }\n    </file>\n  </example>\n */\nvar ngIfDirective = ['$animate', '$compile', function($animate, $compile) {\n  return {\n    multiElement: true,\n    transclude: 'element',\n    priority: 600,\n    terminal: true,\n    restrict: 'A',\n    $$tlb: true,\n    link: function($scope, $element, $attr, ctrl, $transclude) {\n        var block, childScope, previousElements;\n        $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {\n\n          if (value) {\n            if (!childScope) {\n              $transclude(function(clone, newScope) {\n                childScope = newScope;\n                clone[clone.length++] = $compile.$$createComment('end ngIf', $attr.ngIf);\n                // Note: We only need the first/last node of the cloned nodes.\n                // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n                // by a directive with templateUrl when its template arrives.\n                block = {\n                  clone: clone\n                };\n                $animate.enter(clone, $element.parent(), $element);\n              });\n            }\n          } else {\n            if (previousElements) {\n              previousElements.remove();\n              previousElements = null;\n            }\n            if (childScope) {\n              childScope.$destroy();\n              childScope = null;\n            }\n            if (block) {\n              previousElements = getBlockNodes(block.clone);\n              $animate.leave(previousElements).then(function() {\n                previousElements = null;\n              });\n              block = null;\n            }\n          }\n        });\n    }\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ngInclude\n * @restrict ECA\n *\n * @description\n * Fetches, compiles and includes an external HTML fragment.\n *\n * By default, the template URL is restricted to the same domain and protocol as the\n * application document. This is done by calling {@link $sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols\n * you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or\n * {@link $sce#trustAsResourceUrl wrap them} as trusted values. Refer to Angular's {@link\n * ng.$sce Strict Contextual Escaping}.\n *\n * In addition, the browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy may further restrict whether the template is successfully loaded.\n * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`\n * access on some browsers.\n *\n * @animations\n * | Animation                        | Occurs                              |\n * |----------------------------------|-------------------------------------|\n * | {@link ng.$animate#enter enter}  | when the expression changes, on the new include |\n * | {@link ng.$animate#leave leave}  | when the expression changes, on the old include |\n *\n * The enter and leave animation occur concurrently.\n *\n * @scope\n * @priority 400\n *\n * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,\n *                 make sure you wrap it in **single** quotes, e.g. `src=\"'myPartialTemplate.html'\"`.\n * @param {string=} onload Expression to evaluate when a new partial is loaded.\n *                  <div class=\"alert alert-warning\">\n *                  **Note:** When using onload on SVG elements in IE11, the browser will try to call\n *                  a function with the name on the window element, which will usually throw a\n *                  \"function is undefined\" error. To fix this, you can instead use `data-onload` or a\n *                  different form that {@link guide/directive#normalization matches} `onload`.\n *                  </div>\n   *\n * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll\n *                  $anchorScroll} to scroll the viewport after the content is loaded.\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 expression evaluates to truthy value.\n *\n * @example\n  <example module=\"includeExample\" deps=\"angular-animate.js\" animations=\"true\">\n    <file name=\"index.html\">\n     <div ng-controller=\"ExampleController\">\n       <select ng-model=\"template\" ng-options=\"t.name for t in templates\">\n        <option value=\"\">(blank)</option>\n       </select>\n       url of the template: <code>{{template.url}}</code>\n       <hr/>\n       <div class=\"slide-animate-container\">\n         <div class=\"slide-animate\" ng-include=\"template.url\"></div>\n       </div>\n     </div>\n    </file>\n    <file name=\"script.js\">\n      angular.module('includeExample', ['ngAnimate'])\n        .controller('ExampleController', ['$scope', function($scope) {\n          $scope.templates =\n            [ { name: 'template1.html', url: 'template1.html'},\n              { name: 'template2.html', url: 'template2.html'} ];\n          $scope.template = $scope.templates[0];\n        }]);\n     </file>\n    <file name=\"template1.html\">\n      Content of template1.html\n    </file>\n    <file name=\"template2.html\">\n      Content of template2.html\n    </file>\n    <file name=\"animations.css\">\n      .slide-animate-container {\n        position:relative;\n        background:white;\n        border:1px solid black;\n        height:40px;\n        overflow:hidden;\n      }\n\n      .slide-animate {\n        padding:10px;\n      }\n\n      .slide-animate.ng-enter, .slide-animate.ng-leave {\n        transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n        position:absolute;\n        top:0;\n        left:0;\n        right:0;\n        bottom:0;\n        display:block;\n        padding:10px;\n      }\n\n      .slide-animate.ng-enter {\n        top:-50px;\n      }\n      .slide-animate.ng-enter.ng-enter-active {\n        top:0;\n      }\n\n      .slide-animate.ng-leave {\n        top:0;\n      }\n      .slide-animate.ng-leave.ng-leave-active {\n        top:50px;\n      }\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      var templateSelect = element(by.model('template'));\n      var includeElem = element(by.css('[ng-include]'));\n\n      it('should load template1.html', function() {\n        expect(includeElem.getText()).toMatch(/Content of template1.html/);\n      });\n\n      it('should load template2.html', function() {\n        if (browser.params.browser == 'firefox') {\n          // Firefox can't handle using selects\n          // See https://github.com/angular/protractor/issues/480\n          return;\n        }\n        templateSelect.click();\n        templateSelect.all(by.css('option')).get(2).click();\n        expect(includeElem.getText()).toMatch(/Content of template2.html/);\n      });\n\n      it('should change to blank', function() {\n        if (browser.params.browser == 'firefox') {\n          // Firefox can't handle using selects\n          return;\n        }\n        templateSelect.click();\n        templateSelect.all(by.css('option')).get(0).click();\n        expect(includeElem.isPresent()).toBe(false);\n      });\n    </file>\n  </example>\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentRequested\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted every time the ngInclude content is requested.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentLoaded\n * @eventType emit on the current ngInclude scope\n * @description\n * Emitted every time the ngInclude content is reloaded.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentError\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted when a template HTTP request yields an erroneous response (status < 200 || status > 299)\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\nvar ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate',\n                  function($templateRequest,   $anchorScroll,   $animate) {\n  return {\n    restrict: 'ECA',\n    priority: 400,\n    terminal: true,\n    transclude: 'element',\n    controller: angular.noop,\n    compile: function(element, attr) {\n      var srcExp = attr.ngInclude || attr.src,\n          onloadExp = attr.onload || '',\n          autoScrollExp = attr.autoscroll;\n\n      return function(scope, $element, $attr, ctrl, $transclude) {\n        var changeCounter = 0,\n            currentScope,\n            previousElement,\n            currentElement;\n\n        var cleanupLastIncludeContent = function() {\n          if (previousElement) {\n            previousElement.remove();\n            previousElement = null;\n          }\n          if (currentScope) {\n            currentScope.$destroy();\n            currentScope = null;\n          }\n          if (currentElement) {\n            $animate.leave(currentElement).then(function() {\n              previousElement = null;\n            });\n            previousElement = currentElement;\n            currentElement = null;\n          }\n        };\n\n        scope.$watch(srcExp, function ngIncludeWatchAction(src) {\n          var afterAnimation = function() {\n            if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {\n              $anchorScroll();\n            }\n          };\n          var thisChangeId = ++changeCounter;\n\n          if (src) {\n            //set the 2nd param to true to ignore the template request error so that the inner\n            //contents and scope can be cleaned up.\n            $templateRequest(src, true).then(function(response) {\n              if (scope.$$destroyed) return;\n\n              if (thisChangeId !== changeCounter) return;\n              var newScope = scope.$new();\n              ctrl.template = response;\n\n              // Note: This will also link all children of ng-include that were contained in the original\n              // html. If that content contains controllers, ... they could pollute/change the scope.\n              // However, using ng-include 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                cleanupLastIncludeContent();\n                $animate.enter(clone, null, $element).then(afterAnimation);\n              });\n\n              currentScope = newScope;\n              currentElement = clone;\n\n              currentScope.$emit('$includeContentLoaded', src);\n              scope.$eval(onloadExp);\n            }, function() {\n              if (scope.$$destroyed) return;\n\n              if (thisChangeId === changeCounter) {\n                cleanupLastIncludeContent();\n                scope.$emit('$includeContentError', src);\n              }\n            });\n            scope.$emit('$includeContentRequested', src);\n          } else {\n            cleanupLastIncludeContent();\n            ctrl.template = null;\n          }\n        });\n      };\n    }\n  };\n}];\n\n// This directive is called during the $transclude call of the first `ngInclude` 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 ngInclude\n// is called.\nvar ngIncludeFillContentDirective = ['$compile',\n  function($compile) {\n    return {\n      restrict: 'ECA',\n      priority: -400,\n      require: 'ngInclude',\n      link: function(scope, $element, $attr, ctrl) {\n        if (toString.call($element[0]).match(/SVG/)) {\n          // WebKit: https://bugs.webkit.org/show_bug.cgi?id=135698 --- SVG elements do not\n          // support innerHTML, so detect this here and try to generate the contents\n          // specially.\n          $element.empty();\n          $compile(jqLiteBuildFragment(ctrl.template, document).childNodes)(scope,\n              function namespaceAdaptedClone(clone) {\n            $element.append(clone);\n          }, {futureParentElement: $element});\n          return;\n        }\n\n        $element.html(ctrl.template);\n        $compile($element.contents())(scope);\n      }\n    };\n  }];\n\n/**\n * @ngdoc directive\n * @name ngInit\n * @restrict AC\n *\n * @description\n * The `ngInit` directive allows you to evaluate an expression in the\n * current scope.\n *\n * <div class=\"alert alert-danger\">\n * This directive can be abused to add unnecessary amounts of logic into your templates.\n * There are only a few appropriate uses of `ngInit`, such as for aliasing special properties of\n * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below; and for injecting data via\n * server side scripting. Besides these few cases, you should use {@link guide/controller controllers}\n * rather than `ngInit` to initialize values on a scope.\n * </div>\n *\n * <div class=\"alert alert-warning\">\n * **Note**: If you have assignment in `ngInit` along with a {@link ng.$filter `filter`}, make\n * sure you have parentheses to ensure correct operator precedence:\n * <pre class=\"prettyprint\">\n * `<div ng-init=\"test1 = ($index | toString)\"></div>`\n * </pre>\n * </div>\n *\n * @priority 450\n *\n * @element ANY\n * @param {expression} ngInit {@link guide/expression Expression} to eval.\n *\n * @example\n   <example module=\"initExample\">\n     <file name=\"index.html\">\n   <script>\n     angular.module('initExample', [])\n       .controller('ExampleController', ['$scope', function($scope) {\n         $scope.list = [['a', 'b'], ['c', 'd']];\n       }]);\n   </script>\n   <div ng-controller=\"ExampleController\">\n     <div ng-repeat=\"innerList in list\" ng-init=\"outerIndex = $index\">\n       <div ng-repeat=\"value in innerList\" ng-init=\"innerIndex = $index\">\n          <span class=\"example-init\">list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};</span>\n       </div>\n     </div>\n   </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should alias index positions', function() {\n         var elements = element.all(by.css('.example-init'));\n         expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');\n         expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');\n         expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');\n         expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');\n       });\n     </file>\n   </example>\n */\nvar ngInitDirective = ngDirective({\n  priority: 450,\n  compile: function() {\n    return {\n      pre: function(scope, element, attrs) {\n        scope.$eval(attrs.ngInit);\n      }\n    };\n  }\n});\n\n/**\n * @ngdoc directive\n * @name ngList\n *\n * @description\n * Text input that converts between a delimited string and an array of strings. The default\n * delimiter is a comma followed by a space - equivalent to `ng-list=\", \"`. You can specify a custom\n * delimiter as the value of the `ngList` attribute - for example, `ng-list=\" | \"`.\n *\n * The behaviour of the directive is affected by the use of the `ngTrim` attribute.\n * * If `ngTrim` is set to `\"false\"` then whitespace around both the separator and each\n *   list item is respected. This implies that the user of the directive is responsible for\n *   dealing with whitespace but also allows you to use whitespace as a delimiter, such as a\n *   tab or newline character.\n * * Otherwise whitespace around the delimiter is ignored when splitting (although it is respected\n *   when joining the list items back together) and whitespace around each list item is stripped\n *   before it is added to the model.\n *\n * ### Example with Validation\n *\n * <example name=\"ngList-directive\" module=\"listExample\">\n *   <file name=\"app.js\">\n *      angular.module('listExample', [])\n *        .controller('ExampleController', ['$scope', function($scope) {\n *          $scope.names = ['morpheus', 'neo', 'trinity'];\n *        }]);\n *   </file>\n *   <file name=\"index.html\">\n *    <form name=\"myForm\" ng-controller=\"ExampleController\">\n *      <label>List: <input name=\"namesInput\" ng-model=\"names\" ng-list required></label>\n *      <span role=\"alert\">\n *        <span class=\"error\" ng-show=\"myForm.namesInput.$error.required\">\n *        Required!</span>\n *      </span>\n *      <br>\n *      <tt>names = {{names}}</tt><br/>\n *      <tt>myForm.namesInput.$valid = {{myForm.namesInput.$valid}}</tt><br/>\n *      <tt>myForm.namesInput.$error = {{myForm.namesInput.$error}}</tt><br/>\n *      <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n *      <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n *     </form>\n *   </file>\n *   <file name=\"protractor.js\" type=\"protractor\">\n *     var listInput = element(by.model('names'));\n *     var names = element(by.exactBinding('names'));\n *     var valid = element(by.binding('myForm.namesInput.$valid'));\n *     var error = element(by.css('span.error'));\n *\n *     it('should initialize to model', function() {\n *       expect(names.getText()).toContain('[\"morpheus\",\"neo\",\"trinity\"]');\n *       expect(valid.getText()).toContain('true');\n *       expect(error.getCssValue('display')).toBe('none');\n *     });\n *\n *     it('should be invalid if empty', function() {\n *       listInput.clear();\n *       listInput.sendKeys('');\n *\n *       expect(names.getText()).toContain('');\n *       expect(valid.getText()).toContain('false');\n *       expect(error.getCssValue('display')).not.toBe('none');\n *     });\n *   </file>\n * </example>\n *\n * ### Example - splitting on newline\n * <example name=\"ngList-directive-newlines\">\n *   <file name=\"index.html\">\n *    <textarea ng-model=\"list\" ng-list=\"&#10;\" ng-trim=\"false\"></textarea>\n *    <pre>{{ list | json }}</pre>\n *   </file>\n *   <file name=\"protractor.js\" type=\"protractor\">\n *     it(\"should split the text by newlines\", function() {\n *       var listInput = element(by.model('list'));\n *       var output = element(by.binding('list | json'));\n *       listInput.sendKeys('abc\\ndef\\nghi');\n *       expect(output.getText()).toContain('[\\n  \"abc\",\\n  \"def\",\\n  \"ghi\"\\n]');\n *     });\n *   </file>\n * </example>\n *\n * @element input\n * @param {string=} ngList optional delimiter that should be used to split the value.\n */\nvar ngListDirective = function() {\n  return {\n    restrict: 'A',\n    priority: 100,\n    require: 'ngModel',\n    link: function(scope, element, attr, ctrl) {\n      // We want to control whitespace trimming so we use this convoluted approach\n      // to access the ngList attribute, which doesn't pre-trim the attribute\n      var ngList = element.attr(attr.$attr.ngList) || ', ';\n      var trimValues = attr.ngTrim !== 'false';\n      var separator = trimValues ? trim(ngList) : ngList;\n\n      var parse = function(viewValue) {\n        // If the viewValue is invalid (say required but empty) it will be `undefined`\n        if (isUndefined(viewValue)) return;\n\n        var list = [];\n\n        if (viewValue) {\n          forEach(viewValue.split(separator), function(value) {\n            if (value) list.push(trimValues ? trim(value) : value);\n          });\n        }\n\n        return list;\n      };\n\n      ctrl.$parsers.push(parse);\n      ctrl.$formatters.push(function(value) {\n        if (isArray(value)) {\n          return value.join(ngList);\n        }\n\n        return undefined;\n      });\n\n      // Override the standard $isEmpty because an empty array means the input is empty.\n      ctrl.$isEmpty = function(value) {\n        return !value || !value.length;\n      };\n    }\n  };\n};\n\n/* global VALID_CLASS: true,\n  INVALID_CLASS: true,\n  PRISTINE_CLASS: true,\n  DIRTY_CLASS: true,\n  UNTOUCHED_CLASS: true,\n  TOUCHED_CLASS: true,\n*/\n\nvar VALID_CLASS = 'ng-valid',\n    INVALID_CLASS = 'ng-invalid',\n    PRISTINE_CLASS = 'ng-pristine',\n    DIRTY_CLASS = 'ng-dirty',\n    UNTOUCHED_CLASS = 'ng-untouched',\n    TOUCHED_CLASS = 'ng-touched',\n    PENDING_CLASS = 'ng-pending',\n    EMPTY_CLASS = 'ng-empty',\n    NOT_EMPTY_CLASS = 'ng-not-empty';\n\nvar ngModelMinErr = minErr('ngModel');\n\n/**\n * @ngdoc type\n * @name ngModel.NgModelController\n *\n * @property {*} $viewValue The actual value from the control's view. For `input` elements, this is a\n * String. See {@link ngModel.NgModelController#$setViewValue} for information about when the $viewValue\n * is set.\n * @property {*} $modelValue The value in the model that the control is bound to.\n * @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever\n       the control reads value from the DOM. The functions are called in array order, each passing\n       its return value through to the next. The last return value is forwarded to the\n       {@link ngModel.NgModelController#$validators `$validators`} collection.\n\nParsers are used to sanitize / convert the {@link ngModel.NgModelController#$viewValue\n`$viewValue`}.\n\nReturning `undefined` from a parser means a parse error occurred. In that case,\nno {@link ngModel.NgModelController#$validators `$validators`} will run and the `ngModel`\nwill be set to `undefined` unless {@link ngModelOptions `ngModelOptions.allowInvalid`}\nis set to `true`. The parse error is stored in `ngModel.$error.parse`.\n\n *\n * @property {Array.<Function>} $formatters Array of functions to execute, as a pipeline, whenever\n       the model value changes. The functions are called in reverse array order, each passing the value through to the\n       next. The last return value is used as the actual DOM value.\n       Used to format / convert values for display in the control.\n * ```js\n * function formatter(value) {\n *   if (value) {\n *     return value.toUpperCase();\n *   }\n * }\n * ngModel.$formatters.push(formatter);\n * ```\n *\n * @property {Object.<string, function>} $validators A collection of validators that are applied\n *      whenever the model value changes. The key value within the object refers to the name of the\n *      validator while the function refers to the validation operation. The validation operation is\n *      provided with the model value as an argument and must return a true or false value depending\n *      on the response of that validation.\n *\n * ```js\n * ngModel.$validators.validCharacters = function(modelValue, viewValue) {\n *   var value = modelValue || viewValue;\n *   return /[0-9]+/.test(value) &&\n *          /[a-z]+/.test(value) &&\n *          /[A-Z]+/.test(value) &&\n *          /\\W+/.test(value);\n * };\n * ```\n *\n * @property {Object.<string, function>} $asyncValidators A collection of validations that are expected to\n *      perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided\n *      is expected to return a promise when it is run during the model validation process. Once the promise\n *      is delivered then the validation status will be set to true when fulfilled and false when rejected.\n *      When the asynchronous validators are triggered, each of the validators will run in parallel and the model\n *      value will only be updated once all validators have been fulfilled. As long as an asynchronous validator\n *      is unfulfilled, its key will be added to the controllers `$pending` property. Also, all asynchronous validators\n *      will only run once all synchronous validators have passed.\n *\n * Please note that if $http is used then it is important that the server returns a success HTTP response code\n * in order to fulfill the validation and a status level of `4xx` in order to reject the validation.\n *\n * ```js\n * ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) {\n *   var value = modelValue || viewValue;\n *\n *   // Lookup user by username\n *   return $http.get('/api/users/' + value).\n *      then(function resolved() {\n *        //username exists, this means validation fails\n *        return $q.reject('exists');\n *      }, function rejected() {\n *        //username does not exist, therefore this validation passes\n *        return true;\n *      });\n * };\n * ```\n *\n * @property {Array.<Function>} $viewChangeListeners Array of functions to execute whenever the\n *     view value has changed. It is called with no arguments, and its return value is ignored.\n *     This can be used in place of additional $watches against the model value.\n *\n * @property {Object} $error An object hash with all failing validator ids as keys.\n * @property {Object} $pending An object hash with all pending validator ids as keys.\n *\n * @property {boolean} $untouched True if control has not lost focus yet.\n * @property {boolean} $touched True if control has lost focus.\n * @property {boolean} $pristine True if user has not interacted with the control yet.\n * @property {boolean} $dirty True if user has already interacted with the control.\n * @property {boolean} $valid True if there is no error.\n * @property {boolean} $invalid True if at least one error on the control.\n * @property {string} $name The name attribute of the control.\n *\n * @description\n *\n * `NgModelController` provides API for the {@link ngModel `ngModel`} directive.\n * The controller contains services for data-binding, validation, CSS updates, and value formatting\n * and parsing. It purposefully does not contain any logic which deals with DOM rendering or\n * listening to DOM events.\n * Such DOM related logic should be provided by other directives which make use of\n * `NgModelController` for data-binding to control elements.\n * Angular provides this DOM logic for most {@link input `input`} elements.\n * At the end of this page you can find a {@link ngModel.NgModelController#custom-control-example\n * custom control example} that uses `ngModelController` to bind to `contenteditable` elements.\n *\n * @example\n * ### Custom Control Example\n * This example shows how to use `NgModelController` with a custom control to achieve\n * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)\n * collaborate together to achieve the desired result.\n *\n * `contenteditable` is an HTML5 attribute, which tells the browser to let the element\n * contents be edited in place by the user.\n *\n * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}\n * module to automatically remove \"bad\" content like inline event listener (e.g. `<span onclick=\"...\">`).\n * However, as we are using `$sce` the model can still decide to provide unsafe content if it marks\n * that content using the `$sce` service.\n *\n * <example name=\"NgModelController\" module=\"customControl\" deps=\"angular-sanitize.js\">\n    <file name=\"style.css\">\n      [contenteditable] {\n        border: 1px solid black;\n        background-color: white;\n        min-height: 20px;\n      }\n\n      .ng-invalid {\n        border: 1px solid red;\n      }\n\n    </file>\n    <file name=\"script.js\">\n      angular.module('customControl', ['ngSanitize']).\n        directive('contenteditable', ['$sce', function($sce) {\n          return {\n            restrict: 'A', // only activate on element attribute\n            require: '?ngModel', // get a hold of NgModelController\n            link: function(scope, element, attrs, ngModel) {\n              if (!ngModel) return; // do nothing if no ng-model\n\n              // Specify how UI should be updated\n              ngModel.$render = function() {\n                element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));\n              };\n\n              // Listen for change events to enable binding\n              element.on('blur keyup change', function() {\n                scope.$evalAsync(read);\n              });\n              read(); // initialize\n\n              // Write data to the model\n              function read() {\n                var html = element.html();\n                // When we clear the content editable the browser leaves a <br> behind\n                // If strip-br attribute is provided then we strip this out\n                if ( attrs.stripBr && html == '<br>' ) {\n                  html = '';\n                }\n                ngModel.$setViewValue(html);\n              }\n            }\n          };\n        }]);\n    </file>\n    <file name=\"index.html\">\n      <form name=\"myForm\">\n       <div contenteditable\n            name=\"myWidget\" ng-model=\"userContent\"\n            strip-br=\"true\"\n            required>Change me!</div>\n        <span ng-show=\"myForm.myWidget.$error.required\">Required!</span>\n       <hr>\n       <textarea ng-model=\"userContent\" aria-label=\"Dynamic textarea\"></textarea>\n      </form>\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n    it('should data-bind and become invalid', function() {\n      if (browser.params.browser == 'safari' || browser.params.browser == 'firefox') {\n        // SafariDriver can't handle contenteditable\n        // and Firefox driver can't clear contenteditables very well\n        return;\n      }\n      var contentEditable = element(by.css('[contenteditable]'));\n      var content = 'Change me!';\n\n      expect(contentEditable.getText()).toEqual(content);\n\n      contentEditable.clear();\n      contentEditable.sendKeys(protractor.Key.BACK_SPACE);\n      expect(contentEditable.getText()).toEqual('');\n      expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);\n    });\n    </file>\n * </example>\n *\n *\n */\nvar NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$rootScope', '$q', '$interpolate',\n    function($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $rootScope, $q, $interpolate) {\n  this.$viewValue = Number.NaN;\n  this.$modelValue = Number.NaN;\n  this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity.\n  this.$validators = {};\n  this.$asyncValidators = {};\n  this.$parsers = [];\n  this.$formatters = [];\n  this.$viewChangeListeners = [];\n  this.$untouched = true;\n  this.$touched = false;\n  this.$pristine = true;\n  this.$dirty = false;\n  this.$valid = true;\n  this.$invalid = false;\n  this.$error = {}; // keep invalid keys here\n  this.$$success = {}; // keep valid keys here\n  this.$pending = undefined; // keep pending keys here\n  this.$name = $interpolate($attr.name || '', false)($scope);\n  this.$$parentForm = nullFormCtrl;\n\n  var parsedNgModel = $parse($attr.ngModel),\n      parsedNgModelAssign = parsedNgModel.assign,\n      ngModelGet = parsedNgModel,\n      ngModelSet = parsedNgModelAssign,\n      pendingDebounce = null,\n      parserValid,\n      ctrl = this;\n\n  this.$$setOptions = function(options) {\n    ctrl.$options = options;\n    if (options && options.getterSetter) {\n      var invokeModelGetter = $parse($attr.ngModel + '()'),\n          invokeModelSetter = $parse($attr.ngModel + '($$$p)');\n\n      ngModelGet = function($scope) {\n        var modelValue = parsedNgModel($scope);\n        if (isFunction(modelValue)) {\n          modelValue = invokeModelGetter($scope);\n        }\n        return modelValue;\n      };\n      ngModelSet = function($scope, newValue) {\n        if (isFunction(parsedNgModel($scope))) {\n          invokeModelSetter($scope, {$$$p: newValue});\n        } else {\n          parsedNgModelAssign($scope, newValue);\n        }\n      };\n    } else if (!parsedNgModel.assign) {\n      throw ngModelMinErr('nonassign', \"Expression '{0}' is non-assignable. Element: {1}\",\n          $attr.ngModel, startingTag($element));\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$render\n   *\n   * @description\n   * Called when the view needs to be updated. It is expected that the user of the ng-model\n   * directive will implement this method.\n   *\n   * The `$render()` method is invoked in the following situations:\n   *\n   * * `$rollbackViewValue()` is called.  If we are rolling back the view value to the last\n   *   committed value then `$render()` is called to update the input control.\n   * * The value referenced by `ng-model` is changed programmatically and both the `$modelValue` and\n   *   the `$viewValue` are different from last time.\n   *\n   * Since `ng-model` does not do a deep watch, `$render()` is only invoked if the values of\n   * `$modelValue` and `$viewValue` are actually different from their previous values. If `$modelValue`\n   * or `$viewValue` are objects (rather than a string or number) then `$render()` will not be\n   * invoked if you only change a property on the objects.\n   */\n  this.$render = noop;\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$isEmpty\n   *\n   * @description\n   * This is called when we need to determine if the value of an input is empty.\n   *\n   * For instance, the required directive does this to work out if the input has data or not.\n   *\n   * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.\n   *\n   * You can override this for input directives whose concept of being empty is different from the\n   * default. The `checkboxInputType` directive does this because in its case a value of `false`\n   * implies empty.\n   *\n   * @param {*} value The value of the input to check for emptiness.\n   * @returns {boolean} True if `value` is \"empty\".\n   */\n  this.$isEmpty = function(value) {\n    return isUndefined(value) || value === '' || value === null || value !== value;\n  };\n\n  this.$$updateEmptyClasses = function(value) {\n    if (ctrl.$isEmpty(value)) {\n      $animate.removeClass($element, NOT_EMPTY_CLASS);\n      $animate.addClass($element, EMPTY_CLASS);\n    } else {\n      $animate.removeClass($element, EMPTY_CLASS);\n      $animate.addClass($element, NOT_EMPTY_CLASS);\n    }\n  };\n\n\n  var currentValidationRunId = 0;\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$setValidity\n   *\n   * @description\n   * Change the validity state, and notify the form.\n   *\n   * This method can be called within $parsers/$formatters or a custom validation implementation.\n   * However, in most cases it should be sufficient to use the `ngModel.$validators` and\n   * `ngModel.$asyncValidators` collections which will call `$setValidity` automatically.\n   *\n   * @param {string} validationErrorKey Name of the validator. The `validationErrorKey` will be assigned\n   *        to either `$error[validationErrorKey]` or `$pending[validationErrorKey]`\n   *        (for unfulfilled `$asyncValidators`), so that it is available for data-binding.\n   *        The `validationErrorKey` should be in camelCase and will get converted into dash-case\n   *        for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`\n   *        class and can be bound to as  `{{someForm.someControl.$error.myError}}` .\n   * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending (undefined),\n   *                          or skipped (null). Pending is used for unfulfilled `$asyncValidators`.\n   *                          Skipped is used by Angular when validators do not run because of parse errors and\n   *                          when `$asyncValidators` do not run because any of the `$validators` failed.\n   */\n  addSetValidityMethod({\n    ctrl: this,\n    $element: $element,\n    set: function(object, property) {\n      object[property] = true;\n    },\n    unset: function(object, property) {\n      delete object[property];\n    },\n    $animate: $animate\n  });\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$setPristine\n   *\n   * @description\n   * Sets the control to its pristine state.\n   *\n   * This method can be called to remove the `ng-dirty` class and set the control to its pristine\n   * state (`ng-pristine` class). A model is considered to be pristine when the control\n   * has not been changed from when first compiled.\n   */\n  this.$setPristine = function() {\n    ctrl.$dirty = false;\n    ctrl.$pristine = true;\n    $animate.removeClass($element, DIRTY_CLASS);\n    $animate.addClass($element, PRISTINE_CLASS);\n  };\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$setDirty\n   *\n   * @description\n   * Sets the control to its dirty state.\n   *\n   * This method can be called to remove the `ng-pristine` class and set the control to its dirty\n   * state (`ng-dirty` class). A model is considered to be dirty when the control has been changed\n   * from when first compiled.\n   */\n  this.$setDirty = function() {\n    ctrl.$dirty = true;\n    ctrl.$pristine = false;\n    $animate.removeClass($element, PRISTINE_CLASS);\n    $animate.addClass($element, DIRTY_CLASS);\n    ctrl.$$parentForm.$setDirty();\n  };\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$setUntouched\n   *\n   * @description\n   * Sets the control to its untouched state.\n   *\n   * This method can be called to remove the `ng-touched` class and set the control to its\n   * untouched state (`ng-untouched` class). Upon compilation, a model is set as untouched\n   * by default, however this function can be used to restore that state if the model has\n   * already been touched by the user.\n   */\n  this.$setUntouched = function() {\n    ctrl.$touched = false;\n    ctrl.$untouched = true;\n    $animate.setClass($element, UNTOUCHED_CLASS, TOUCHED_CLASS);\n  };\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$setTouched\n   *\n   * @description\n   * Sets the control to its touched state.\n   *\n   * This method can be called to remove the `ng-untouched` class and set the control to its\n   * touched state (`ng-touched` class). A model is considered to be touched when the user has\n   * first focused the control element and then shifted focus away from the control (blur event).\n   */\n  this.$setTouched = function() {\n    ctrl.$touched = true;\n    ctrl.$untouched = false;\n    $animate.setClass($element, TOUCHED_CLASS, UNTOUCHED_CLASS);\n  };\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$rollbackViewValue\n   *\n   * @description\n   * Cancel an update and reset the input element's value to prevent an update to the `$modelValue`,\n   * which may be caused by a pending debounced event or because the input is waiting for a some\n   * future event.\n   *\n   * If you have an input that uses `ng-model-options` to set up debounced updates or updates that\n   * depend on special events such as blur, you can have a situation where there is a period when\n   * the `$viewValue` is out of sync with the ngModel's `$modelValue`.\n   *\n   * In this case, you can use `$rollbackViewValue()` to manually cancel the debounced / future update\n   * and reset the input to the last committed view value.\n   *\n   * It is also possible that you run into difficulties if you try to update the ngModel's `$modelValue`\n   * programmatically before these debounced/future events have resolved/occurred, because Angular's\n   * dirty checking mechanism is not able to tell whether the model has actually changed or not.\n   *\n   * The `$rollbackViewValue()` method should be called before programmatically changing the model of an\n   * input which may have such events pending. This is important in order to make sure that the\n   * input field will be updated with the new model value and any pending operations are cancelled.\n   *\n   * <example name=\"ng-model-cancel-update\" module=\"cancel-update-example\">\n   *   <file name=\"app.js\">\n   *     angular.module('cancel-update-example', [])\n   *\n   *     .controller('CancelUpdateController', ['$scope', function($scope) {\n   *       $scope.model = {};\n   *\n   *       $scope.setEmpty = function(e, value, rollback) {\n   *         if (e.keyCode == 27) {\n   *           e.preventDefault();\n   *           if (rollback) {\n   *             $scope.myForm[value].$rollbackViewValue();\n   *           }\n   *           $scope.model[value] = '';\n   *         }\n   *       };\n   *     }]);\n   *   </file>\n   *   <file name=\"index.html\">\n   *     <div ng-controller=\"CancelUpdateController\">\n   *        <p>Both of these inputs are only updated if they are blurred. Hitting escape should\n   *        empty them. Follow these steps and observe the difference:</p>\n   *       <ol>\n   *         <li>Type something in the input. You will see that the model is not yet updated</li>\n   *         <li>Press the Escape key.\n   *           <ol>\n   *             <li> In the first example, nothing happens, because the model is already '', and no\n   *             update is detected. If you blur the input, the model will be set to the current view.\n   *             </li>\n   *             <li> In the second example, the pending update is cancelled, and the input is set back\n   *             to the last committed view value (''). Blurring the input does nothing.\n   *             </li>\n   *           </ol>\n   *         </li>\n   *       </ol>\n   *\n   *       <form name=\"myForm\" ng-model-options=\"{ updateOn: 'blur' }\">\n   *         <div>\n   *        <p id=\"inputDescription1\">Without $rollbackViewValue():</p>\n   *         <input name=\"value1\" aria-describedby=\"inputDescription1\" ng-model=\"model.value1\"\n   *                ng-keydown=\"setEmpty($event, 'value1')\">\n   *         value1: \"{{ model.value1 }}\"\n   *         </div>\n   *\n   *         <div>\n   *        <p id=\"inputDescription2\">With $rollbackViewValue():</p>\n   *         <input name=\"value2\" aria-describedby=\"inputDescription2\" ng-model=\"model.value2\"\n   *                ng-keydown=\"setEmpty($event, 'value2', true)\">\n   *         value2: \"{{ model.value2 }}\"\n   *         </div>\n   *       </form>\n   *     </div>\n   *   </file>\n       <file name=\"style.css\">\n          div {\n            display: table-cell;\n          }\n          div:nth-child(1) {\n            padding-right: 30px;\n          }\n\n        </file>\n   * </example>\n   */\n  this.$rollbackViewValue = function() {\n    $timeout.cancel(pendingDebounce);\n    ctrl.$viewValue = ctrl.$$lastCommittedViewValue;\n    ctrl.$render();\n  };\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$validate\n   *\n   * @description\n   * Runs each of the registered validators (first synchronous validators and then\n   * asynchronous validators).\n   * If the validity changes to invalid, the model will be set to `undefined`,\n   * unless {@link ngModelOptions `ngModelOptions.allowInvalid`} is `true`.\n   * If the validity changes to valid, it will set the model to the last available valid\n   * `$modelValue`, i.e. either the last parsed value or the last value set from the scope.\n   */\n  this.$validate = function() {\n    // ignore $validate before model is initialized\n    if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {\n      return;\n    }\n\n    var viewValue = ctrl.$$lastCommittedViewValue;\n    // Note: we use the $$rawModelValue as $modelValue might have been\n    // set to undefined during a view -> model update that found validation\n    // errors. We can't parse the view here, since that could change\n    // the model although neither viewValue nor the model on the scope changed\n    var modelValue = ctrl.$$rawModelValue;\n\n    var prevValid = ctrl.$valid;\n    var prevModelValue = ctrl.$modelValue;\n\n    var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;\n\n    ctrl.$$runValidators(modelValue, viewValue, function(allValid) {\n      // If there was no change in validity, don't update the model\n      // This prevents changing an invalid modelValue to undefined\n      if (!allowInvalid && prevValid !== allValid) {\n        // Note: Don't check ctrl.$valid here, as we could have\n        // external validators (e.g. calculated on the server),\n        // that just call $setValidity and need the model value\n        // to calculate their validity.\n        ctrl.$modelValue = allValid ? modelValue : undefined;\n\n        if (ctrl.$modelValue !== prevModelValue) {\n          ctrl.$$writeModelToScope();\n        }\n      }\n    });\n\n  };\n\n  this.$$runValidators = function(modelValue, viewValue, doneCallback) {\n    currentValidationRunId++;\n    var localValidationRunId = currentValidationRunId;\n\n    // check parser error\n    if (!processParseErrors()) {\n      validationDone(false);\n      return;\n    }\n    if (!processSyncValidators()) {\n      validationDone(false);\n      return;\n    }\n    processAsyncValidators();\n\n    function processParseErrors() {\n      var errorKey = ctrl.$$parserName || 'parse';\n      if (isUndefined(parserValid)) {\n        setValidity(errorKey, null);\n      } else {\n        if (!parserValid) {\n          forEach(ctrl.$validators, function(v, name) {\n            setValidity(name, null);\n          });\n          forEach(ctrl.$asyncValidators, function(v, name) {\n            setValidity(name, null);\n          });\n        }\n        // Set the parse error last, to prevent unsetting it, should a $validators key == parserName\n        setValidity(errorKey, parserValid);\n        return parserValid;\n      }\n      return true;\n    }\n\n    function processSyncValidators() {\n      var syncValidatorsValid = true;\n      forEach(ctrl.$validators, function(validator, name) {\n        var result = validator(modelValue, viewValue);\n        syncValidatorsValid = syncValidatorsValid && result;\n        setValidity(name, result);\n      });\n      if (!syncValidatorsValid) {\n        forEach(ctrl.$asyncValidators, function(v, name) {\n          setValidity(name, null);\n        });\n        return false;\n      }\n      return true;\n    }\n\n    function processAsyncValidators() {\n      var validatorPromises = [];\n      var allValid = true;\n      forEach(ctrl.$asyncValidators, function(validator, name) {\n        var promise = validator(modelValue, viewValue);\n        if (!isPromiseLike(promise)) {\n          throw ngModelMinErr('nopromise',\n            \"Expected asynchronous validator to return a promise but got '{0}' instead.\", promise);\n        }\n        setValidity(name, undefined);\n        validatorPromises.push(promise.then(function() {\n          setValidity(name, true);\n        }, function() {\n          allValid = false;\n          setValidity(name, false);\n        }));\n      });\n      if (!validatorPromises.length) {\n        validationDone(true);\n      } else {\n        $q.all(validatorPromises).then(function() {\n          validationDone(allValid);\n        }, noop);\n      }\n    }\n\n    function setValidity(name, isValid) {\n      if (localValidationRunId === currentValidationRunId) {\n        ctrl.$setValidity(name, isValid);\n      }\n    }\n\n    function validationDone(allValid) {\n      if (localValidationRunId === currentValidationRunId) {\n\n        doneCallback(allValid);\n      }\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$commitViewValue\n   *\n   * @description\n   * Commit a pending update to the `$modelValue`.\n   *\n   * Updates may be pending by a debounced event or because the input is waiting for a some future\n   * event defined in `ng-model-options`. this method is rarely needed as `NgModelController`\n   * usually handles calling this in response to input events.\n   */\n  this.$commitViewValue = function() {\n    var viewValue = ctrl.$viewValue;\n\n    $timeout.cancel(pendingDebounce);\n\n    // If the view value has not changed then we should just exit, except in the case where there is\n    // a native validator on the element. In this case the validation state may have changed even though\n    // the viewValue has stayed empty.\n    if (ctrl.$$lastCommittedViewValue === viewValue && (viewValue !== '' || !ctrl.$$hasNativeValidators)) {\n      return;\n    }\n    ctrl.$$updateEmptyClasses(viewValue);\n    ctrl.$$lastCommittedViewValue = viewValue;\n\n    // change to dirty\n    if (ctrl.$pristine) {\n      this.$setDirty();\n    }\n    this.$$parseAndValidate();\n  };\n\n  this.$$parseAndValidate = function() {\n    var viewValue = ctrl.$$lastCommittedViewValue;\n    var modelValue = viewValue;\n    parserValid = isUndefined(modelValue) ? undefined : true;\n\n    if (parserValid) {\n      for (var i = 0; i < ctrl.$parsers.length; i++) {\n        modelValue = ctrl.$parsers[i](modelValue);\n        if (isUndefined(modelValue)) {\n          parserValid = false;\n          break;\n        }\n      }\n    }\n    if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {\n      // ctrl.$modelValue has not been touched yet...\n      ctrl.$modelValue = ngModelGet($scope);\n    }\n    var prevModelValue = ctrl.$modelValue;\n    var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;\n    ctrl.$$rawModelValue = modelValue;\n\n    if (allowInvalid) {\n      ctrl.$modelValue = modelValue;\n      writeToModelIfNeeded();\n    }\n\n    // Pass the $$lastCommittedViewValue here, because the cached viewValue might be out of date.\n    // This can happen if e.g. $setViewValue is called from inside a parser\n    ctrl.$$runValidators(modelValue, ctrl.$$lastCommittedViewValue, function(allValid) {\n      if (!allowInvalid) {\n        // Note: Don't check ctrl.$valid here, as we could have\n        // external validators (e.g. calculated on the server),\n        // that just call $setValidity and need the model value\n        // to calculate their validity.\n        ctrl.$modelValue = allValid ? modelValue : undefined;\n        writeToModelIfNeeded();\n      }\n    });\n\n    function writeToModelIfNeeded() {\n      if (ctrl.$modelValue !== prevModelValue) {\n        ctrl.$$writeModelToScope();\n      }\n    }\n  };\n\n  this.$$writeModelToScope = function() {\n    ngModelSet($scope, ctrl.$modelValue);\n    forEach(ctrl.$viewChangeListeners, function(listener) {\n      try {\n        listener();\n      } catch (e) {\n        $exceptionHandler(e);\n      }\n    });\n  };\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$setViewValue\n   *\n   * @description\n   * Update the view value.\n   *\n   * This method should be called when a control wants to change the view value; typically,\n   * this is done from within a DOM event handler. For example, the {@link ng.directive:input input}\n   * directive calls it when the value of the input changes and {@link ng.directive:select select}\n   * calls it when an option is selected.\n   *\n   * When `$setViewValue` is called, the new `value` will be staged for committing through the `$parsers`\n   * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged\n   * value sent directly for processing, finally to be applied to `$modelValue` and then the\n   * **expression** specified in the `ng-model` attribute. Lastly, all the registered change listeners,\n   * in the `$viewChangeListeners` list, are called.\n   *\n   * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`\n   * and the `default` trigger is not listed, all those actions will remain pending until one of the\n   * `updateOn` events is triggered on the DOM element.\n   * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}\n   * directive is used with a custom debounce for this particular event.\n   * Note that a `$digest` is only triggered once the `updateOn` events are fired, or if `debounce`\n   * is specified, once the timer runs out.\n   *\n   * When used with standard inputs, the view value will always be a string (which is in some cases\n   * parsed into another type, such as a `Date` object for `input[date]`.)\n   * However, custom controls might also pass objects to this method. In this case, we should make\n   * a copy of the object before passing it to `$setViewValue`. This is because `ngModel` does not\n   * perform a deep watch of objects, it only looks for a change of identity. If you only change\n   * the property of the object then ngModel will not realize that the object has changed and\n   * will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should\n   * not change properties of the copy once it has been passed to `$setViewValue`.\n   * Otherwise you may cause the model value on the scope to change incorrectly.\n   *\n   * <div class=\"alert alert-info\">\n   * In any case, the value passed to the method should always reflect the current value\n   * of the control. For example, if you are calling `$setViewValue` for an input element,\n   * you should pass the input DOM value. Otherwise, the control and the scope model become\n   * out of sync. It's also important to note that `$setViewValue` does not call `$render` or change\n   * the control's DOM value in any way. If we want to change the control's DOM value\n   * programmatically, we should update the `ngModel` scope expression. Its new value will be\n   * picked up by the model controller, which will run it through the `$formatters`, `$render` it\n   * to update the DOM, and finally call `$validate` on it.\n   * </div>\n   *\n   * @param {*} value value from the view.\n   * @param {string} trigger Event that triggered the update.\n   */\n  this.$setViewValue = function(value, trigger) {\n    ctrl.$viewValue = value;\n    if (!ctrl.$options || ctrl.$options.updateOnDefault) {\n      ctrl.$$debounceViewValueCommit(trigger);\n    }\n  };\n\n  this.$$debounceViewValueCommit = function(trigger) {\n    var debounceDelay = 0,\n        options = ctrl.$options,\n        debounce;\n\n    if (options && isDefined(options.debounce)) {\n      debounce = options.debounce;\n      if (isNumber(debounce)) {\n        debounceDelay = debounce;\n      } else if (isNumber(debounce[trigger])) {\n        debounceDelay = debounce[trigger];\n      } else if (isNumber(debounce['default'])) {\n        debounceDelay = debounce['default'];\n      }\n    }\n\n    $timeout.cancel(pendingDebounce);\n    if (debounceDelay) {\n      pendingDebounce = $timeout(function() {\n        ctrl.$commitViewValue();\n      }, debounceDelay);\n    } else if ($rootScope.$$phase) {\n      ctrl.$commitViewValue();\n    } else {\n      $scope.$apply(function() {\n        ctrl.$commitViewValue();\n      });\n    }\n  };\n\n  // model -> value\n  // Note: we cannot use a normal scope.$watch as we want to detect the following:\n  // 1. scope value is 'a'\n  // 2. user enters 'b'\n  // 3. ng-change kicks in and reverts scope value to 'a'\n  //    -> scope value did not change since the last digest as\n  //       ng-change executes in apply phase\n  // 4. view should be changed back to 'a'\n  $scope.$watch(function ngModelWatch() {\n    var modelValue = ngModelGet($scope);\n\n    // if scope model value and ngModel value are out of sync\n    // TODO(perf): why not move this to the action fn?\n    if (modelValue !== ctrl.$modelValue &&\n       // checks for NaN is needed to allow setting the model to NaN when there's an asyncValidator\n       (ctrl.$modelValue === ctrl.$modelValue || modelValue === modelValue)\n    ) {\n      ctrl.$modelValue = ctrl.$$rawModelValue = modelValue;\n      parserValid = undefined;\n\n      var formatters = ctrl.$formatters,\n          idx = formatters.length;\n\n      var viewValue = modelValue;\n      while (idx--) {\n        viewValue = formatters[idx](viewValue);\n      }\n      if (ctrl.$viewValue !== viewValue) {\n        ctrl.$$updateEmptyClasses(viewValue);\n        ctrl.$viewValue = ctrl.$$lastCommittedViewValue = viewValue;\n        ctrl.$render();\n\n        ctrl.$$runValidators(modelValue, viewValue, noop);\n      }\n    }\n\n    return modelValue;\n  });\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngModel\n *\n * @element input\n * @priority 1\n *\n * @description\n * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a\n * property on the scope using {@link ngModel.NgModelController NgModelController},\n * which is created and exposed by this directive.\n *\n * `ngModel` is responsible for:\n *\n * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`\n *   require.\n * - Providing validation behavior (i.e. required, number, email, url).\n * - Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors).\n * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`, `ng-touched`,\n *   `ng-untouched`, `ng-empty`, `ng-not-empty`) including animations.\n * - Registering the control with its parent {@link ng.directive:form form}.\n *\n * Note: `ngModel` will try to bind to the property given by evaluating the expression on the\n * current scope. If the property doesn't already exist on this scope, it will be created\n * implicitly and added to the scope.\n *\n * For best practices on using `ngModel`, see:\n *\n *  - [Understanding Scopes](https://github.com/angular/angular.js/wiki/Understanding-Scopes)\n *\n * For basic examples, how to use `ngModel`, see:\n *\n *  - {@link ng.directive:input input}\n *    - {@link input[text] text}\n *    - {@link input[checkbox] checkbox}\n *    - {@link input[radio] radio}\n *    - {@link input[number] number}\n *    - {@link input[email] email}\n *    - {@link input[url] url}\n *    - {@link input[date] date}\n *    - {@link input[datetime-local] datetime-local}\n *    - {@link input[time] time}\n *    - {@link input[month] month}\n *    - {@link input[week] week}\n *  - {@link ng.directive:select select}\n *  - {@link ng.directive:textarea textarea}\n *\n * # Complex Models (objects or collections)\n *\n * By default, `ngModel` watches the model by reference, not value. This is important to know when\n * binding inputs to models that are objects (e.g. `Date`) or collections (e.g. arrays). If only properties of the\n * object or collection change, `ngModel` will not be notified and so the input will not be  re-rendered.\n *\n * The model must be assigned an entirely new object or collection before a re-rendering will occur.\n *\n * Some directives have options that will cause them to use a custom `$watchCollection` on the model expression\n * - for example, `ngOptions` will do so when a `track by` clause is included in the comprehension expression or\n * if the select is given the `multiple` attribute.\n *\n * The `$watchCollection()` method only does a shallow comparison, meaning that changing properties deeper than the\n * first level of the object (or only changing the properties of an item in the collection if it's an array) will still\n * not trigger a re-rendering of the model.\n *\n * # CSS classes\n * The following CSS classes are added and removed on the associated input/select/textarea element\n * depending on the validity of the model.\n *\n *  - `ng-valid`: the model is valid\n *  - `ng-invalid`: the model is invalid\n *  - `ng-valid-[key]`: for each valid key added by `$setValidity`\n *  - `ng-invalid-[key]`: for each invalid key added by `$setValidity`\n *  - `ng-pristine`: the control hasn't been interacted with yet\n *  - `ng-dirty`: the control has been interacted with\n *  - `ng-touched`: the control has been blurred\n *  - `ng-untouched`: the control hasn't been blurred\n *  - `ng-pending`: any `$asyncValidators` are unfulfilled\n *  - `ng-empty`: the view does not contain a value or the value is deemed \"empty\", as defined\n *     by the {@link ngModel.NgModelController#$isEmpty} method\n *  - `ng-not-empty`: the view contains a non-empty value\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n * ## Animation Hooks\n *\n * Animations within models are triggered when any of the associated CSS classes are added and removed\n * on the input element which is attached to the model. These classes include: `.ng-pristine`, `.ng-dirty`,\n * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself.\n * The animations that are triggered within ngModel are similar to how they work in ngClass and\n * animations can be hooked into using CSS transitions, keyframes as well as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style an input element\n * that has been rendered as invalid after it has been validated:\n *\n * <pre>\n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-input {\n *   transition:0.5s linear all;\n *   background: white;\n * }\n * .my-input.ng-invalid {\n *   background: red;\n *   color:white;\n * }\n * </pre>\n *\n * @example\n * <example deps=\"angular-animate.js\" animations=\"true\" fixBase=\"true\" module=\"inputExample\">\n     <file name=\"index.html\">\n       <script>\n        angular.module('inputExample', [])\n          .controller('ExampleController', ['$scope', function($scope) {\n            $scope.val = '1';\n          }]);\n       </script>\n       <style>\n         .my-input {\n           transition:all linear 0.5s;\n           background: transparent;\n         }\n         .my-input.ng-invalid {\n           color:white;\n           background: red;\n         }\n       </style>\n       <p id=\"inputDescription\">\n        Update input to see transitions when valid/invalid.\n        Integer is a valid value.\n       </p>\n       <form name=\"testForm\" ng-controller=\"ExampleController\">\n         <input ng-model=\"val\" ng-pattern=\"/^\\d+$/\" name=\"anim\" class=\"my-input\"\n                aria-describedby=\"inputDescription\" />\n       </form>\n     </file>\n * </example>\n *\n * ## Binding to a getter/setter\n *\n * Sometimes it's helpful to bind `ngModel` to a getter/setter function.  A getter/setter is a\n * function that returns a representation of the model when called with zero arguments, and sets\n * the internal state of a model when called with an argument. It's sometimes useful to use this\n * for models that have an internal representation that's different from what the model exposes\n * to the view.\n *\n * <div class=\"alert alert-success\">\n * **Best Practice:** It's best to keep getters fast because Angular is likely to call them more\n * frequently than other parts of your code.\n * </div>\n *\n * You use this behavior by adding `ng-model-options=\"{ getterSetter: true }\"` to an element that\n * has `ng-model` attached to it. You can also add `ng-model-options=\"{ getterSetter: true }\"` to\n * a `<form>`, which will enable this behavior for all `<input>`s within it. See\n * {@link ng.directive:ngModelOptions `ngModelOptions`} for more.\n *\n * The following example shows how to use `ngModel` with a getter/setter:\n *\n * @example\n * <example name=\"ngModel-getter-setter\" module=\"getterSetterExample\">\n     <file name=\"index.html\">\n       <div ng-controller=\"ExampleController\">\n         <form name=\"userForm\">\n           <label>Name:\n             <input type=\"text\" name=\"userName\"\n                    ng-model=\"user.name\"\n                    ng-model-options=\"{ getterSetter: true }\" />\n           </label>\n         </form>\n         <pre>user.name = <span ng-bind=\"user.name()\"></span></pre>\n       </div>\n     </file>\n     <file name=\"app.js\">\n       angular.module('getterSetterExample', [])\n         .controller('ExampleController', ['$scope', function($scope) {\n           var _name = 'Brian';\n           $scope.user = {\n             name: function(newName) {\n              // Note that newName can be undefined for two reasons:\n              // 1. Because it is called as a getter and thus called with no arguments\n              // 2. Because the property should actually be set to undefined. This happens e.g. if the\n              //    input is invalid\n              return arguments.length ? (_name = newName) : _name;\n             }\n           };\n         }]);\n     </file>\n * </example>\n */\nvar ngModelDirective = ['$rootScope', function($rootScope) {\n  return {\n    restrict: 'A',\n    require: ['ngModel', '^?form', '^?ngModelOptions'],\n    controller: NgModelController,\n    // Prelink needs to run before any input directive\n    // so that we can set the NgModelOptions in NgModelController\n    // before anyone else uses it.\n    priority: 1,\n    compile: function ngModelCompile(element) {\n      // Setup initial state of the control\n      element.addClass(PRISTINE_CLASS).addClass(UNTOUCHED_CLASS).addClass(VALID_CLASS);\n\n      return {\n        pre: function ngModelPreLink(scope, element, attr, ctrls) {\n          var modelCtrl = ctrls[0],\n              formCtrl = ctrls[1] || modelCtrl.$$parentForm;\n\n          modelCtrl.$$setOptions(ctrls[2] && ctrls[2].$options);\n\n          // notify others, especially parent forms\n          formCtrl.$addControl(modelCtrl);\n\n          attr.$observe('name', function(newValue) {\n            if (modelCtrl.$name !== newValue) {\n              modelCtrl.$$parentForm.$$renameControl(modelCtrl, newValue);\n            }\n          });\n\n          scope.$on('$destroy', function() {\n            modelCtrl.$$parentForm.$removeControl(modelCtrl);\n          });\n        },\n        post: function ngModelPostLink(scope, element, attr, ctrls) {\n          var modelCtrl = ctrls[0];\n          if (modelCtrl.$options && modelCtrl.$options.updateOn) {\n            element.on(modelCtrl.$options.updateOn, function(ev) {\n              modelCtrl.$$debounceViewValueCommit(ev && ev.type);\n            });\n          }\n\n          element.on('blur', function() {\n            if (modelCtrl.$touched) return;\n\n            if ($rootScope.$$phase) {\n              scope.$evalAsync(modelCtrl.$setTouched);\n            } else {\n              scope.$apply(modelCtrl.$setTouched);\n            }\n          });\n        }\n      };\n    }\n  };\n}];\n\nvar DEFAULT_REGEXP = /(\\s+|^)default(\\s+|$)/;\n\n/**\n * @ngdoc directive\n * @name ngModelOptions\n *\n * @description\n * Allows tuning how model updates are done. Using `ngModelOptions` you can specify a custom list of\n * events that will trigger a model update and/or a debouncing delay so that the actual update only\n * takes place when a timer expires; this timer will be reset after another change takes place.\n *\n * Given the nature of `ngModelOptions`, the value displayed inside input fields in the view might\n * be different from the value in the actual model. This means that if you update the model you\n * should also invoke {@link ngModel.NgModelController `$rollbackViewValue`} on the relevant input field in\n * order to make sure it is synchronized with the model and that any debounced action is canceled.\n *\n * The easiest way to reference the control's {@link ngModel.NgModelController `$rollbackViewValue`}\n * method is by making sure the input is placed inside a form that has a `name` attribute. This is\n * important because `form` controllers are published to the related scope under the name in their\n * `name` attribute.\n *\n * Any pending changes will take place immediately when an enclosing form is submitted via the\n * `submit` event. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * `ngModelOptions` has an effect on the element it's declared on and its descendants.\n *\n * @param {Object} ngModelOptions options to apply to the current model. Valid keys are:\n *   - `updateOn`: string specifying which event should the input be bound to. You can set several\n *     events using an space delimited list. There is a special event called `default` that\n *     matches the default events belonging of the control.\n *   - `debounce`: integer value which contains the debounce model update value in milliseconds. A\n *     value of 0 triggers an immediate update. If an object is supplied instead, you can specify a\n *     custom value for each event. For example:\n *     `ng-model-options=\"{ updateOn: 'default blur', debounce: { 'default': 500, 'blur': 0 } }\"`\n *   - `allowInvalid`: boolean value which indicates that the model can be set with values that did\n *     not validate correctly instead of the default behavior of setting the model to undefined.\n *   - `getterSetter`: boolean value which determines whether or not to treat functions bound to\n       `ngModel` as getters/setters.\n *   - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for\n *     `<input type=\"date\">`, `<input type=\"time\">`, ... . It understands UTC/GMT and the\n *     continental US time zone abbreviations, but for general use, use a time zone offset, for\n *     example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)\n *     If not specified, the timezone of the browser will be used.\n *\n * @example\n\n  The following example shows how to override immediate updates. Changes on the inputs within the\n  form will update the model only when the control loses focus (blur event). If `escape` key is\n  pressed while the input field is focused, the value is reset to the value in the current model.\n\n  <example name=\"ngModelOptions-directive-blur\" module=\"optionsExample\">\n    <file name=\"index.html\">\n      <div ng-controller=\"ExampleController\">\n        <form name=\"userForm\">\n          <label>Name:\n            <input type=\"text\" name=\"userName\"\n                   ng-model=\"user.name\"\n                   ng-model-options=\"{ updateOn: 'blur' }\"\n                   ng-keyup=\"cancel($event)\" />\n          </label><br />\n          <label>Other data:\n            <input type=\"text\" ng-model=\"user.data\" />\n          </label><br />\n        </form>\n        <pre>user.name = <span ng-bind=\"user.name\"></span></pre>\n        <pre>user.data = <span ng-bind=\"user.data\"></span></pre>\n      </div>\n    </file>\n    <file name=\"app.js\">\n      angular.module('optionsExample', [])\n        .controller('ExampleController', ['$scope', function($scope) {\n          $scope.user = { name: 'John', data: '' };\n\n          $scope.cancel = function(e) {\n            if (e.keyCode == 27) {\n              $scope.userForm.userName.$rollbackViewValue();\n            }\n          };\n        }]);\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      var model = element(by.binding('user.name'));\n      var input = element(by.model('user.name'));\n      var other = element(by.model('user.data'));\n\n      it('should allow custom events', function() {\n        input.sendKeys(' Doe');\n        input.click();\n        expect(model.getText()).toEqual('John');\n        other.click();\n        expect(model.getText()).toEqual('John Doe');\n      });\n\n      it('should $rollbackViewValue when model changes', function() {\n        input.sendKeys(' Doe');\n        expect(input.getAttribute('value')).toEqual('John Doe');\n        input.sendKeys(protractor.Key.ESCAPE);\n        expect(input.getAttribute('value')).toEqual('John');\n        other.click();\n        expect(model.getText()).toEqual('John');\n      });\n    </file>\n  </example>\n\n  This one shows how to debounce model changes. Model will be updated only 1 sec after last change.\n  If the `Clear` button is pressed, any debounced action is canceled and the value becomes empty.\n\n  <example name=\"ngModelOptions-directive-debounce\" module=\"optionsExample\">\n    <file name=\"index.html\">\n      <div ng-controller=\"ExampleController\">\n        <form name=\"userForm\">\n          <label>Name:\n            <input type=\"text\" name=\"userName\"\n                   ng-model=\"user.name\"\n                   ng-model-options=\"{ debounce: 1000 }\" />\n          </label>\n          <button ng-click=\"userForm.userName.$rollbackViewValue(); user.name=''\">Clear</button>\n          <br />\n        </form>\n        <pre>user.name = <span ng-bind=\"user.name\"></span></pre>\n      </div>\n    </file>\n    <file name=\"app.js\">\n      angular.module('optionsExample', [])\n        .controller('ExampleController', ['$scope', function($scope) {\n          $scope.user = { name: 'Igor' };\n        }]);\n    </file>\n  </example>\n\n  This one shows how to bind to getter/setters:\n\n  <example name=\"ngModelOptions-directive-getter-setter\" module=\"getterSetterExample\">\n    <file name=\"index.html\">\n      <div ng-controller=\"ExampleController\">\n        <form name=\"userForm\">\n          <label>Name:\n            <input type=\"text\" name=\"userName\"\n                   ng-model=\"user.name\"\n                   ng-model-options=\"{ getterSetter: true }\" />\n          </label>\n        </form>\n        <pre>user.name = <span ng-bind=\"user.name()\"></span></pre>\n      </div>\n    </file>\n    <file name=\"app.js\">\n      angular.module('getterSetterExample', [])\n        .controller('ExampleController', ['$scope', function($scope) {\n          var _name = 'Brian';\n          $scope.user = {\n            name: function(newName) {\n              // Note that newName can be undefined for two reasons:\n              // 1. Because it is called as a getter and thus called with no arguments\n              // 2. Because the property should actually be set to undefined. This happens e.g. if the\n              //    input is invalid\n              return arguments.length ? (_name = newName) : _name;\n            }\n          };\n        }]);\n    </file>\n  </example>\n */\nvar ngModelOptionsDirective = function() {\n  return {\n    restrict: 'A',\n    controller: ['$scope', '$attrs', function($scope, $attrs) {\n      var that = this;\n      this.$options = copy($scope.$eval($attrs.ngModelOptions));\n      // Allow adding/overriding bound events\n      if (isDefined(this.$options.updateOn)) {\n        this.$options.updateOnDefault = false;\n        // extract \"default\" pseudo-event from list of events that can trigger a model update\n        this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {\n          that.$options.updateOnDefault = true;\n          return ' ';\n        }));\n      } else {\n        this.$options.updateOnDefault = true;\n      }\n    }]\n  };\n};\n\n\n\n// helper methods\nfunction addSetValidityMethod(context) {\n  var ctrl = context.ctrl,\n      $element = context.$element,\n      classCache = {},\n      set = context.set,\n      unset = context.unset,\n      $animate = context.$animate;\n\n  classCache[INVALID_CLASS] = !(classCache[VALID_CLASS] = $element.hasClass(VALID_CLASS));\n\n  ctrl.$setValidity = setValidity;\n\n  function setValidity(validationErrorKey, state, controller) {\n    if (isUndefined(state)) {\n      createAndSet('$pending', validationErrorKey, controller);\n    } else {\n      unsetAndCleanup('$pending', validationErrorKey, controller);\n    }\n    if (!isBoolean(state)) {\n      unset(ctrl.$error, validationErrorKey, controller);\n      unset(ctrl.$$success, validationErrorKey, controller);\n    } else {\n      if (state) {\n        unset(ctrl.$error, validationErrorKey, controller);\n        set(ctrl.$$success, validationErrorKey, controller);\n      } else {\n        set(ctrl.$error, validationErrorKey, controller);\n        unset(ctrl.$$success, validationErrorKey, controller);\n      }\n    }\n    if (ctrl.$pending) {\n      cachedToggleClass(PENDING_CLASS, true);\n      ctrl.$valid = ctrl.$invalid = undefined;\n      toggleValidationCss('', null);\n    } else {\n      cachedToggleClass(PENDING_CLASS, false);\n      ctrl.$valid = isObjectEmpty(ctrl.$error);\n      ctrl.$invalid = !ctrl.$valid;\n      toggleValidationCss('', ctrl.$valid);\n    }\n\n    // re-read the state as the set/unset methods could have\n    // combined state in ctrl.$error[validationError] (used for forms),\n    // where setting/unsetting only increments/decrements the value,\n    // and does not replace it.\n    var combinedState;\n    if (ctrl.$pending && ctrl.$pending[validationErrorKey]) {\n      combinedState = undefined;\n    } else if (ctrl.$error[validationErrorKey]) {\n      combinedState = false;\n    } else if (ctrl.$$success[validationErrorKey]) {\n      combinedState = true;\n    } else {\n      combinedState = null;\n    }\n\n    toggleValidationCss(validationErrorKey, combinedState);\n    ctrl.$$parentForm.$setValidity(validationErrorKey, combinedState, ctrl);\n  }\n\n  function createAndSet(name, value, controller) {\n    if (!ctrl[name]) {\n      ctrl[name] = {};\n    }\n    set(ctrl[name], value, controller);\n  }\n\n  function unsetAndCleanup(name, value, controller) {\n    if (ctrl[name]) {\n      unset(ctrl[name], value, controller);\n    }\n    if (isObjectEmpty(ctrl[name])) {\n      ctrl[name] = undefined;\n    }\n  }\n\n  function cachedToggleClass(className, switchValue) {\n    if (switchValue && !classCache[className]) {\n      $animate.addClass($element, className);\n      classCache[className] = true;\n    } else if (!switchValue && classCache[className]) {\n      $animate.removeClass($element, className);\n      classCache[className] = false;\n    }\n  }\n\n  function toggleValidationCss(validationErrorKey, isValid) {\n    validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n\n    cachedToggleClass(VALID_CLASS + validationErrorKey, isValid === true);\n    cachedToggleClass(INVALID_CLASS + validationErrorKey, isValid === false);\n  }\n}\n\nfunction isObjectEmpty(obj) {\n  if (obj) {\n    for (var prop in obj) {\n      if (obj.hasOwnProperty(prop)) {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\n/**\n * @ngdoc directive\n * @name ngNonBindable\n * @restrict AC\n * @priority 1000\n *\n * @description\n * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current\n * DOM element. This is useful if the element contains what appears to be Angular directives and\n * bindings but which should be ignored by Angular. This could be the case if you have a site that\n * displays snippets of code, for instance.\n *\n * @element ANY\n *\n * @example\n * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,\n * but the one wrapped in `ngNonBindable` is left alone.\n *\n * @example\n    <example>\n      <file name=\"index.html\">\n        <div>Normal: {{1 + 2}}</div>\n        <div ng-non-bindable>Ignored: {{1 + 2}}</div>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-non-bindable', function() {\n         expect(element(by.binding('1 + 2')).getText()).toContain('3');\n         expect(element.all(by.css('div')).last().getText()).toMatch(/1 \\+ 2/);\n       });\n      </file>\n    </example>\n */\nvar ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });\n\n/* global jqLiteRemove */\n\nvar ngOptionsMinErr = minErr('ngOptions');\n\n/**\n * @ngdoc directive\n * @name ngOptions\n * @restrict A\n *\n * @description\n *\n * The `ngOptions` attribute can be used to dynamically generate a list of `<option>`\n * elements for the `<select>` element using the array or object obtained by evaluating the\n * `ngOptions` comprehension expression.\n *\n * In many cases, `ngRepeat` can be used on `<option>` elements instead of `ngOptions` to achieve a\n * similar result. However, `ngOptions` provides some benefits such as reducing memory and\n * increasing speed by not creating a new scope for each repeated instance, as well as providing\n * more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the\n * comprehension expression. `ngOptions` should be used when the `<select>` model needs to be bound\n *  to a non-string value. This is because an option element can only be bound to string values at\n * present.\n *\n * When an item in the `<select>` menu is selected, the array element or object property\n * represented by the selected option will be bound to the model identified by the `ngModel`\n * directive.\n *\n * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can\n * be nested into the `<select>` element. This element will then represent the `null` or \"not selected\"\n * option. See example below for demonstration.\n *\n * ## Complex Models (objects or collections)\n *\n * By default, `ngModel` watches the model by reference, not value. This is important to know when\n * binding the select to a model that is an object or a collection.\n *\n * One issue occurs if you want to preselect an option. For example, if you set\n * the model to an object that is equal to an object in your collection, `ngOptions` won't be able to set the selection,\n * because the objects are not identical. So by default, you should always reference the item in your collection\n * for preselections, e.g.: `$scope.selected = $scope.collection[3]`.\n *\n * Another solution is to use a `track by` clause, because then `ngOptions` will track the identity\n * of the item not by reference, but by the result of the `track by` expression. For example, if your\n * collection items have an id property, you would `track by item.id`.\n *\n * A different issue with objects or collections is that ngModel won't detect if an object property or\n * a collection item changes. For that reason, `ngOptions` additionally watches the model using\n * `$watchCollection`, when the expression contains a `track by` clause or the the select has the `multiple` attribute.\n * This allows ngOptions to trigger a re-rendering of the options even if the actual object/collection\n * has not changed identity, but only a property on the object or an item in the collection changes.\n *\n * Note that `$watchCollection` does a shallow comparison of the properties of the object (or the items in the collection\n * if the model is an array). This means that changing a property deeper than the first level inside the\n * object/collection will not trigger a re-rendering.\n *\n * ## `select` **`as`**\n *\n * Using `select` **`as`** will bind the result of the `select` expression to the model, but\n * the value of the `<select>` and `<option>` html elements will be either the index (for array data sources)\n * or property name (for object data sources) of the value within the collection. If a **`track by`** expression\n * is used, the result of that expression will be set as the value of the `option` and `select` elements.\n *\n *\n * ### `select` **`as`** and **`track by`**\n *\n * <div class=\"alert alert-warning\">\n * Be careful when using `select` **`as`** and **`track by`** in the same expression.\n * </div>\n *\n * Given this array of items on the $scope:\n *\n * ```js\n * $scope.items = [{\n *   id: 1,\n *   label: 'aLabel',\n *   subItem: { name: 'aSubItem' }\n * }, {\n *   id: 2,\n *   label: 'bLabel',\n *   subItem: { name: 'bSubItem' }\n * }];\n * ```\n *\n * This will work:\n *\n * ```html\n * <select ng-options=\"item as item.label for item in items track by item.id\" ng-model=\"selected\"></select>\n * ```\n * ```js\n * $scope.selected = $scope.items[0];\n * ```\n *\n * but this will not work:\n *\n * ```html\n * <select ng-options=\"item.subItem as item.label for item in items track by item.id\" ng-model=\"selected\"></select>\n * ```\n * ```js\n * $scope.selected = $scope.items[0].subItem;\n * ```\n *\n * In both examples, the **`track by`** expression is applied successfully to each `item` in the\n * `items` array. Because the selected option has been set programmatically in the controller, the\n * **`track by`** expression is also applied to the `ngModel` value. In the first example, the\n * `ngModel` value is `items[0]` and the **`track by`** expression evaluates to `items[0].id` with\n * no issue. In the second example, the `ngModel` value is `items[0].subItem` and the **`track by`**\n * expression evaluates to `items[0].subItem.id` (which is undefined). As a result, the model value\n * is not matched against any `<option>` and the `<select>` appears as having no selected value.\n *\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required The control is considered valid only if value is entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n *    `required` when you want to data-bind to the `required` attribute.\n * @param {comprehension_expression=} ngOptions in one of the following forms:\n *\n *   * for array data sources:\n *     * `label` **`for`** `value` **`in`** `array`\n *     * `select` **`as`** `label` **`for`** `value` **`in`** `array`\n *     * `label` **`group by`** `group` **`for`** `value` **`in`** `array`\n *     * `label` **`disable when`** `disable` **`for`** `value` **`in`** `array`\n *     * `label` **`group by`** `group` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`\n *     * `label` **`disable when`** `disable` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`\n *     * `label` **`for`** `value` **`in`** `array` | orderBy:`orderexpr` **`track by`** `trackexpr`\n *        (for including a filter with `track by`)\n *   * for object data sources:\n *     * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n *     * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n *     * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`\n *     * `label` **`disable when`** `disable` **`for (`**`key`**`,`** `value`**`) in`** `object`\n *     * `select` **`as`** `label` **`group by`** `group`\n *         **`for` `(`**`key`**`,`** `value`**`) in`** `object`\n *     * `select` **`as`** `label` **`disable when`** `disable`\n *         **`for` `(`**`key`**`,`** `value`**`) in`** `object`\n *\n * Where:\n *\n *   * `array` / `object`: an expression which evaluates to an array / object to iterate over.\n *   * `value`: local variable which will refer to each item in the `array` or each property value\n *      of `object` during iteration.\n *   * `key`: local variable which will refer to a property name in `object` during iteration.\n *   * `label`: The result of this expression will be the label for `<option>` element. The\n *     `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).\n *   * `select`: The result of this expression will be bound to the model of the parent `<select>`\n *      element. If not specified, `select` expression will default to `value`.\n *   * `group`: The result of this expression will be used to group options using the `<optgroup>`\n *      DOM element.\n *   * `disable`: The result of this expression will be used to disable the rendered `<option>`\n *      element. Return `true` to disable.\n *   * `trackexpr`: Used when working with an array of objects. The result of this expression will be\n *      used to identify the objects in the array. The `trackexpr` will most likely refer to the\n *     `value` variable (e.g. `value.propertyName`). With this the selection is preserved\n *      even when the options are recreated (e.g. reloaded from the server).\n *\n * @example\n    <example module=\"selectExample\">\n      <file name=\"index.html\">\n        <script>\n        angular.module('selectExample', [])\n          .controller('ExampleController', ['$scope', function($scope) {\n            $scope.colors = [\n              {name:'black', shade:'dark'},\n              {name:'white', shade:'light', notAnOption: true},\n              {name:'red', shade:'dark'},\n              {name:'blue', shade:'dark', notAnOption: true},\n              {name:'yellow', shade:'light', notAnOption: false}\n            ];\n            $scope.myColor = $scope.colors[2]; // red\n          }]);\n        </script>\n        <div ng-controller=\"ExampleController\">\n          <ul>\n            <li ng-repeat=\"color in colors\">\n              <label>Name: <input ng-model=\"color.name\"></label>\n              <label><input type=\"checkbox\" ng-model=\"color.notAnOption\"> Disabled?</label>\n              <button ng-click=\"colors.splice($index, 1)\" aria-label=\"Remove\">X</button>\n            </li>\n            <li>\n              <button ng-click=\"colors.push({})\">add</button>\n            </li>\n          </ul>\n          <hr/>\n          <label>Color (null not allowed):\n            <select ng-model=\"myColor\" ng-options=\"color.name for color in colors\"></select>\n          </label><br/>\n          <label>Color (null allowed):\n          <span  class=\"nullable\">\n            <select ng-model=\"myColor\" ng-options=\"color.name for color in colors\">\n              <option value=\"\">-- choose color --</option>\n            </select>\n          </span></label><br/>\n\n          <label>Color grouped by shade:\n            <select ng-model=\"myColor\" ng-options=\"color.name group by color.shade for color in colors\">\n            </select>\n          </label><br/>\n\n          <label>Color grouped by shade, with some disabled:\n            <select ng-model=\"myColor\"\n                  ng-options=\"color.name group by color.shade disable when color.notAnOption for color in colors\">\n            </select>\n          </label><br/>\n\n\n\n          Select <button ng-click=\"myColor = { name:'not in list', shade: 'other' }\">bogus</button>.\n          <br/>\n          <hr/>\n          Currently selected: {{ {selected_color:myColor} }}\n          <div style=\"border:solid 1px black; height:20px\"\n               ng-style=\"{'background-color':myColor.name}\">\n          </div>\n        </div>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n         it('should check ng-options', function() {\n           expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');\n           element.all(by.model('myColor')).first().click();\n           element.all(by.css('select[ng-model=\"myColor\"] option')).first().click();\n           expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');\n           element(by.css('.nullable select[ng-model=\"myColor\"]')).click();\n           element.all(by.css('.nullable select[ng-model=\"myColor\"] option')).first().click();\n           expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null');\n         });\n      </file>\n    </example>\n */\n\n// jshint maxlen: false\n//                     //00001111111111000000000002222222222000000000000000000000333333333300000000000000000000000004444444444400000000000005555555555555550000000006666666666666660000000777777777777777000000000000000888888888800000000000000000009999999999\nvar NG_OPTIONS_REGEXP = /^\\s*([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+group\\s+by\\s+([\\s\\S]+?))?(?:\\s+disable\\s+when\\s+([\\s\\S]+?))?\\s+for\\s+(?:([\\$\\w][\\$\\w]*)|(?:\\(\\s*([\\$\\w][\\$\\w]*)\\s*,\\s*([\\$\\w][\\$\\w]*)\\s*\\)))\\s+in\\s+([\\s\\S]+?)(?:\\s+track\\s+by\\s+([\\s\\S]+?))?$/;\n                        // 1: value expression (valueFn)\n                        // 2: label expression (displayFn)\n                        // 3: group by expression (groupByFn)\n                        // 4: disable when expression (disableWhenFn)\n                        // 5: array item variable name\n                        // 6: object item key variable name\n                        // 7: object item value variable name\n                        // 8: collection expression\n                        // 9: track by expression\n// jshint maxlen: 100\n\n\nvar ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {\n\n  function parseOptionsExpression(optionsExp, selectElement, scope) {\n\n    var match = optionsExp.match(NG_OPTIONS_REGEXP);\n    if (!(match)) {\n      throw ngOptionsMinErr('iexp',\n        \"Expected expression in form of \" +\n        \"'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'\" +\n        \" but got '{0}'. Element: {1}\",\n        optionsExp, startingTag(selectElement));\n    }\n\n    // Extract the parts from the ngOptions expression\n\n    // The variable name for the value of the item in the collection\n    var valueName = match[5] || match[7];\n    // The variable name for the key of the item in the collection\n    var keyName = match[6];\n\n    // An expression that generates the viewValue for an option if there is a label expression\n    var selectAs = / as /.test(match[0]) && match[1];\n    // An expression that is used to track the id of each object in the options collection\n    var trackBy = match[9];\n    // An expression that generates the viewValue for an option if there is no label expression\n    var valueFn = $parse(match[2] ? match[1] : valueName);\n    var selectAsFn = selectAs && $parse(selectAs);\n    var viewValueFn = selectAsFn || valueFn;\n    var trackByFn = trackBy && $parse(trackBy);\n\n    // Get the value by which we are going to track the option\n    // if we have a trackFn then use that (passing scope and locals)\n    // otherwise just hash the given viewValue\n    var getTrackByValueFn = trackBy ?\n                              function(value, locals) { return trackByFn(scope, locals); } :\n                              function getHashOfValue(value) { return hashKey(value); };\n    var getTrackByValue = function(value, key) {\n      return getTrackByValueFn(value, getLocals(value, key));\n    };\n\n    var displayFn = $parse(match[2] || match[1]);\n    var groupByFn = $parse(match[3] || '');\n    var disableWhenFn = $parse(match[4] || '');\n    var valuesFn = $parse(match[8]);\n\n    var locals = {};\n    var getLocals = keyName ? function(value, key) {\n      locals[keyName] = key;\n      locals[valueName] = value;\n      return locals;\n    } : function(value) {\n      locals[valueName] = value;\n      return locals;\n    };\n\n\n    function Option(selectValue, viewValue, label, group, disabled) {\n      this.selectValue = selectValue;\n      this.viewValue = viewValue;\n      this.label = label;\n      this.group = group;\n      this.disabled = disabled;\n    }\n\n    function getOptionValuesKeys(optionValues) {\n      var optionValuesKeys;\n\n      if (!keyName && isArrayLike(optionValues)) {\n        optionValuesKeys = optionValues;\n      } else {\n        // if object, extract keys, in enumeration order, unsorted\n        optionValuesKeys = [];\n        for (var itemKey in optionValues) {\n          if (optionValues.hasOwnProperty(itemKey) && itemKey.charAt(0) !== '$') {\n            optionValuesKeys.push(itemKey);\n          }\n        }\n      }\n      return optionValuesKeys;\n    }\n\n    return {\n      trackBy: trackBy,\n      getTrackByValue: getTrackByValue,\n      getWatchables: $parse(valuesFn, function(optionValues) {\n        // Create a collection of things that we would like to watch (watchedArray)\n        // so that they can all be watched using a single $watchCollection\n        // that only runs the handler once if anything changes\n        var watchedArray = [];\n        optionValues = optionValues || [];\n\n        var optionValuesKeys = getOptionValuesKeys(optionValues);\n        var optionValuesLength = optionValuesKeys.length;\n        for (var index = 0; index < optionValuesLength; index++) {\n          var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index];\n          var value = optionValues[key];\n\n          var locals = getLocals(value, key);\n          var selectValue = getTrackByValueFn(value, locals);\n          watchedArray.push(selectValue);\n\n          // Only need to watch the displayFn if there is a specific label expression\n          if (match[2] || match[1]) {\n            var label = displayFn(scope, locals);\n            watchedArray.push(label);\n          }\n\n          // Only need to watch the disableWhenFn if there is a specific disable expression\n          if (match[4]) {\n            var disableWhen = disableWhenFn(scope, locals);\n            watchedArray.push(disableWhen);\n          }\n        }\n        return watchedArray;\n      }),\n\n      getOptions: function() {\n\n        var optionItems = [];\n        var selectValueMap = {};\n\n        // The option values were already computed in the `getWatchables` fn,\n        // which must have been called to trigger `getOptions`\n        var optionValues = valuesFn(scope) || [];\n        var optionValuesKeys = getOptionValuesKeys(optionValues);\n        var optionValuesLength = optionValuesKeys.length;\n\n        for (var index = 0; index < optionValuesLength; index++) {\n          var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index];\n          var value = optionValues[key];\n          var locals = getLocals(value, key);\n          var viewValue = viewValueFn(scope, locals);\n          var selectValue = getTrackByValueFn(viewValue, locals);\n          var label = displayFn(scope, locals);\n          var group = groupByFn(scope, locals);\n          var disabled = disableWhenFn(scope, locals);\n          var optionItem = new Option(selectValue, viewValue, label, group, disabled);\n\n          optionItems.push(optionItem);\n          selectValueMap[selectValue] = optionItem;\n        }\n\n        return {\n          items: optionItems,\n          selectValueMap: selectValueMap,\n          getOptionFromViewValue: function(value) {\n            return selectValueMap[getTrackByValue(value)];\n          },\n          getViewValueFromOption: function(option) {\n            // If the viewValue could be an object that may be mutated by the application,\n            // we need to make a copy and not return the reference to the value on the option.\n            return trackBy ? angular.copy(option.viewValue) : option.viewValue;\n          }\n        };\n      }\n    };\n  }\n\n\n  // we can't just jqLite('<option>') since jqLite is not smart enough\n  // to create it in <select> and IE barfs otherwise.\n  var optionTemplate = document.createElement('option'),\n      optGroupTemplate = document.createElement('optgroup');\n\n    function ngOptionsPostLink(scope, selectElement, attr, ctrls) {\n\n      var selectCtrl = ctrls[0];\n      var ngModelCtrl = ctrls[1];\n      var multiple = attr.multiple;\n\n      // The emptyOption allows the application developer to provide their own custom \"empty\"\n      // option when the viewValue does not match any of the option values.\n      var emptyOption;\n      for (var i = 0, children = selectElement.children(), ii = children.length; i < ii; i++) {\n        if (children[i].value === '') {\n          emptyOption = children.eq(i);\n          break;\n        }\n      }\n\n      var providedEmptyOption = !!emptyOption;\n\n      var unknownOption = jqLite(optionTemplate.cloneNode(false));\n      unknownOption.val('?');\n\n      var options;\n      var ngOptions = parseOptionsExpression(attr.ngOptions, selectElement, scope);\n\n\n      var renderEmptyOption = function() {\n        if (!providedEmptyOption) {\n          selectElement.prepend(emptyOption);\n        }\n        selectElement.val('');\n        emptyOption.prop('selected', true); // needed for IE\n        emptyOption.attr('selected', true);\n      };\n\n      var removeEmptyOption = function() {\n        if (!providedEmptyOption) {\n          emptyOption.remove();\n        }\n      };\n\n\n      var renderUnknownOption = function() {\n        selectElement.prepend(unknownOption);\n        selectElement.val('?');\n        unknownOption.prop('selected', true); // needed for IE\n        unknownOption.attr('selected', true);\n      };\n\n      var removeUnknownOption = function() {\n        unknownOption.remove();\n      };\n\n      // Update the controller methods for multiple selectable options\n      if (!multiple) {\n\n        selectCtrl.writeValue = function writeNgOptionsValue(value) {\n          var option = options.getOptionFromViewValue(value);\n\n          if (option && !option.disabled) {\n            // Don't update the option when it is already selected.\n            // For example, the browser will select the first option by default. In that case,\n            // most properties are set automatically - except the `selected` attribute, which we\n            // set always\n\n            if (selectElement[0].value !== option.selectValue) {\n              removeUnknownOption();\n              removeEmptyOption();\n\n              selectElement[0].value = option.selectValue;\n              option.element.selected = true;\n            }\n\n            option.element.setAttribute('selected', 'selected');\n          } else {\n            if (value === null || providedEmptyOption) {\n              removeUnknownOption();\n              renderEmptyOption();\n            } else {\n              removeEmptyOption();\n              renderUnknownOption();\n            }\n          }\n        };\n\n        selectCtrl.readValue = function readNgOptionsValue() {\n\n          var selectedOption = options.selectValueMap[selectElement.val()];\n\n          if (selectedOption && !selectedOption.disabled) {\n            removeEmptyOption();\n            removeUnknownOption();\n            return options.getViewValueFromOption(selectedOption);\n          }\n          return null;\n        };\n\n        // If we are using `track by` then we must watch the tracked value on the model\n        // since ngModel only watches for object identity change\n        if (ngOptions.trackBy) {\n          scope.$watch(\n            function() { return ngOptions.getTrackByValue(ngModelCtrl.$viewValue); },\n            function() { ngModelCtrl.$render(); }\n          );\n        }\n\n      } else {\n\n        ngModelCtrl.$isEmpty = function(value) {\n          return !value || value.length === 0;\n        };\n\n\n        selectCtrl.writeValue = function writeNgOptionsMultiple(value) {\n          options.items.forEach(function(option) {\n            option.element.selected = false;\n          });\n\n          if (value) {\n            value.forEach(function(item) {\n              var option = options.getOptionFromViewValue(item);\n              if (option && !option.disabled) option.element.selected = true;\n            });\n          }\n        };\n\n\n        selectCtrl.readValue = function readNgOptionsMultiple() {\n          var selectedValues = selectElement.val() || [],\n              selections = [];\n\n          forEach(selectedValues, function(value) {\n            var option = options.selectValueMap[value];\n            if (option && !option.disabled) selections.push(options.getViewValueFromOption(option));\n          });\n\n          return selections;\n        };\n\n        // If we are using `track by` then we must watch these tracked values on the model\n        // since ngModel only watches for object identity change\n        if (ngOptions.trackBy) {\n\n          scope.$watchCollection(function() {\n            if (isArray(ngModelCtrl.$viewValue)) {\n              return ngModelCtrl.$viewValue.map(function(value) {\n                return ngOptions.getTrackByValue(value);\n              });\n            }\n          }, function() {\n            ngModelCtrl.$render();\n          });\n\n        }\n      }\n\n\n      if (providedEmptyOption) {\n\n        // we need to remove it before calling selectElement.empty() because otherwise IE will\n        // remove the label from the element. wtf?\n        emptyOption.remove();\n\n        // compile the element since there might be bindings in it\n        $compile(emptyOption)(scope);\n\n        // remove the class, which is added automatically because we recompile the element and it\n        // becomes the compilation root\n        emptyOption.removeClass('ng-scope');\n      } else {\n        emptyOption = jqLite(optionTemplate.cloneNode(false));\n      }\n\n      // We need to do this here to ensure that the options object is defined\n      // when we first hit it in writeNgOptionsValue\n      updateOptions();\n\n      // We will re-render the option elements if the option values or labels change\n      scope.$watchCollection(ngOptions.getWatchables, updateOptions);\n\n      // ------------------------------------------------------------------ //\n\n\n      function updateOptionElement(option, element) {\n        option.element = element;\n        element.disabled = option.disabled;\n        // NOTE: The label must be set before the value, otherwise IE10/11/EDGE create unresponsive\n        // selects in certain circumstances when multiple selects are next to each other and display\n        // the option list in listbox style, i.e. the select is [multiple], or specifies a [size].\n        // See https://github.com/angular/angular.js/issues/11314 for more info.\n        // This is unfortunately untestable with unit / e2e tests\n        if (option.label !== element.label) {\n          element.label = option.label;\n          element.textContent = option.label;\n        }\n        if (option.value !== element.value) element.value = option.selectValue;\n      }\n\n      function addOrReuseElement(parent, current, type, templateElement) {\n        var element;\n        // Check whether we can reuse the next element\n        if (current && lowercase(current.nodeName) === type) {\n          // The next element is the right type so reuse it\n          element = current;\n        } else {\n          // The next element is not the right type so create a new one\n          element = templateElement.cloneNode(false);\n          if (!current) {\n            // There are no more elements so just append it to the select\n            parent.appendChild(element);\n          } else {\n            // The next element is not a group so insert the new one\n            parent.insertBefore(element, current);\n          }\n        }\n        return element;\n      }\n\n\n      function removeExcessElements(current) {\n        var next;\n        while (current) {\n          next = current.nextSibling;\n          jqLiteRemove(current);\n          current = next;\n        }\n      }\n\n\n      function skipEmptyAndUnknownOptions(current) {\n        var emptyOption_ = emptyOption && emptyOption[0];\n        var unknownOption_ = unknownOption && unknownOption[0];\n\n        // We cannot rely on the extracted empty option being the same as the compiled empty option,\n        // because the compiled empty option might have been replaced by a comment because\n        // it had an \"element\" transclusion directive on it (such as ngIf)\n        if (emptyOption_ || unknownOption_) {\n          while (current &&\n                (current === emptyOption_ ||\n                current === unknownOption_ ||\n                current.nodeType === NODE_TYPE_COMMENT ||\n                (nodeName_(current) === 'option' && current.value === ''))) {\n            current = current.nextSibling;\n          }\n        }\n        return current;\n      }\n\n\n      function updateOptions() {\n\n        var previousValue = options && selectCtrl.readValue();\n\n        options = ngOptions.getOptions();\n\n        var groupMap = {};\n        var currentElement = selectElement[0].firstChild;\n\n        // Ensure that the empty option is always there if it was explicitly provided\n        if (providedEmptyOption) {\n          selectElement.prepend(emptyOption);\n        }\n\n        currentElement = skipEmptyAndUnknownOptions(currentElement);\n\n        options.items.forEach(function updateOption(option) {\n          var group;\n          var groupElement;\n          var optionElement;\n\n          if (isDefined(option.group)) {\n\n            // This option is to live in a group\n            // See if we have already created this group\n            group = groupMap[option.group];\n\n            if (!group) {\n\n              // We have not already created this group\n              groupElement = addOrReuseElement(selectElement[0],\n                                               currentElement,\n                                               'optgroup',\n                                               optGroupTemplate);\n              // Move to the next element\n              currentElement = groupElement.nextSibling;\n\n              // Update the label on the group element\n              groupElement.label = option.group;\n\n              // Store it for use later\n              group = groupMap[option.group] = {\n                groupElement: groupElement,\n                currentOptionElement: groupElement.firstChild\n              };\n\n            }\n\n            // So now we have a group for this option we add the option to the group\n            optionElement = addOrReuseElement(group.groupElement,\n                                              group.currentOptionElement,\n                                              'option',\n                                              optionTemplate);\n            updateOptionElement(option, optionElement);\n            // Move to the next element\n            group.currentOptionElement = optionElement.nextSibling;\n\n          } else {\n\n            // This option is not in a group\n            optionElement = addOrReuseElement(selectElement[0],\n                                              currentElement,\n                                              'option',\n                                              optionTemplate);\n            updateOptionElement(option, optionElement);\n            // Move to the next element\n            currentElement = optionElement.nextSibling;\n          }\n        });\n\n\n        // Now remove all excess options and group\n        Object.keys(groupMap).forEach(function(key) {\n          removeExcessElements(groupMap[key].currentOptionElement);\n        });\n        removeExcessElements(currentElement);\n\n        ngModelCtrl.$render();\n\n        // Check to see if the value has changed due to the update to the options\n        if (!ngModelCtrl.$isEmpty(previousValue)) {\n          var nextValue = selectCtrl.readValue();\n          var isNotPrimitive = ngOptions.trackBy || multiple;\n          if (isNotPrimitive ? !equals(previousValue, nextValue) : previousValue !== nextValue) {\n            ngModelCtrl.$setViewValue(nextValue);\n            ngModelCtrl.$render();\n          }\n        }\n\n      }\n  }\n\n  return {\n    restrict: 'A',\n    terminal: true,\n    require: ['select', 'ngModel'],\n    link: {\n      pre: function ngOptionsPreLink(scope, selectElement, attr, ctrls) {\n        // Deactivate the SelectController.register method to prevent\n        // option directives from accidentally registering themselves\n        // (and unwanted $destroy handlers etc.)\n        ctrls[0].registerOption = noop;\n      },\n      post: ngOptionsPostLink\n    }\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ngPluralize\n * @restrict EA\n *\n * @description\n * `ngPluralize` is a directive that displays messages according to en-US localization rules.\n * These rules are bundled with angular.js, but can be overridden\n * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive\n * by specifying the mappings between\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * and the strings to be displayed.\n *\n * # Plural categories and explicit number rules\n * There are two\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * in Angular's default en-US locale: \"one\" and \"other\".\n *\n * While a plural category may match many numbers (for example, in en-US locale, \"other\" can match\n * any number that is not 1), an explicit number rule can only match one number. For example, the\n * explicit number rule for \"3\" matches the number 3. There are examples of plural categories\n * and explicit number rules throughout the rest of this documentation.\n *\n * # Configuring ngPluralize\n * You configure ngPluralize by providing 2 attributes: `count` and `when`.\n * You can also provide an optional attribute, `offset`.\n *\n * The value of the `count` attribute can be either a string or an {@link guide/expression\n * Angular expression}; these are evaluated on the current scope for its bound value.\n *\n * The `when` attribute specifies the mappings between plural categories and the actual\n * string to be displayed. The value of the attribute should be a JSON object.\n *\n * The following example shows how to configure ngPluralize:\n *\n * ```html\n * <ng-pluralize count=\"personCount\"\n                 when=\"{'0': 'Nobody is viewing.',\n *                      'one': '1 person is viewing.',\n *                      'other': '{} people are viewing.'}\">\n * </ng-pluralize>\n *```\n *\n * In the example, `\"0: Nobody is viewing.\"` is an explicit number rule. If you did not\n * specify this rule, 0 would be matched to the \"other\" category and \"0 people are viewing\"\n * would be shown instead of \"Nobody is viewing\". You can specify an explicit number rule for\n * other numbers, for example 12, so that instead of showing \"12 people are viewing\", you can\n * show \"a dozen people are viewing\".\n *\n * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted\n * into pluralized strings. In the previous example, Angular will replace `{}` with\n * <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder\n * for <span ng-non-bindable>{{numberExpression}}</span>.\n *\n * If no rule is defined for a category, then an empty string is displayed and a warning is generated.\n * Note that some locales define more categories than `one` and `other`. For example, fr-fr defines `few` and `many`.\n *\n * # Configuring ngPluralize with offset\n * The `offset` attribute allows further customization of pluralized text, which can result in\n * a better user experience. For example, instead of the message \"4 people are viewing this document\",\n * you might display \"John, Kate and 2 others are viewing this document\".\n * The offset attribute allows you to offset a number by any desired value.\n * Let's take a look at an example:\n *\n * ```html\n * <ng-pluralize count=\"personCount\" offset=2\n *               when=\"{'0': 'Nobody is viewing.',\n *                      '1': '{{person1}} is viewing.',\n *                      '2': '{{person1}} and {{person2}} are viewing.',\n *                      'one': '{{person1}}, {{person2}} and one other person are viewing.',\n *                      'other': '{{person1}}, {{person2}} and {} other people are viewing.'}\">\n * </ng-pluralize>\n * ```\n *\n * Notice that we are still using two plural categories(one, other), but we added\n * three explicit number rules 0, 1 and 2.\n * When one person, perhaps John, views the document, \"John is viewing\" will be shown.\n * When three people view the document, no explicit number rule is found, so\n * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.\n * In this case, plural category 'one' is matched and \"John, Mary and one other person are viewing\"\n * is shown.\n *\n * Note that when you specify offsets, you must provide explicit number rules for\n * numbers from 0 up to and including the offset. If you use an offset of 3, for example,\n * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for\n * plural categories \"one\" and \"other\".\n *\n * @param {string|expression} count The variable to be bound to.\n * @param {string} when The mapping between plural category to its corresponding strings.\n * @param {number=} offset Offset to deduct from the total number.\n *\n * @example\n    <example module=\"pluralizeExample\">\n      <file name=\"index.html\">\n        <script>\n          angular.module('pluralizeExample', [])\n            .controller('ExampleController', ['$scope', function($scope) {\n              $scope.person1 = 'Igor';\n              $scope.person2 = 'Misko';\n              $scope.personCount = 1;\n            }]);\n        </script>\n        <div ng-controller=\"ExampleController\">\n          <label>Person 1:<input type=\"text\" ng-model=\"person1\" value=\"Igor\" /></label><br/>\n          <label>Person 2:<input type=\"text\" ng-model=\"person2\" value=\"Misko\" /></label><br/>\n          <label>Number of People:<input type=\"text\" ng-model=\"personCount\" value=\"1\" /></label><br/>\n\n          <!--- Example with simple pluralization rules for en locale --->\n          Without Offset:\n          <ng-pluralize count=\"personCount\"\n                        when=\"{'0': 'Nobody is viewing.',\n                               'one': '1 person is viewing.',\n                               'other': '{} people are viewing.'}\">\n          </ng-pluralize><br>\n\n          <!--- Example with offset --->\n          With Offset(2):\n          <ng-pluralize count=\"personCount\" offset=2\n                        when=\"{'0': 'Nobody is viewing.',\n                               '1': '{{person1}} is viewing.',\n                               '2': '{{person1}} and {{person2}} are viewing.',\n                               'one': '{{person1}}, {{person2}} and one other person are viewing.',\n                               'other': '{{person1}}, {{person2}} and {} other people are viewing.'}\">\n          </ng-pluralize>\n        </div>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should show correct pluralized string', function() {\n          var withoutOffset = element.all(by.css('ng-pluralize')).get(0);\n          var withOffset = element.all(by.css('ng-pluralize')).get(1);\n          var countInput = element(by.model('personCount'));\n\n          expect(withoutOffset.getText()).toEqual('1 person is viewing.');\n          expect(withOffset.getText()).toEqual('Igor is viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('0');\n\n          expect(withoutOffset.getText()).toEqual('Nobody is viewing.');\n          expect(withOffset.getText()).toEqual('Nobody is viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('2');\n\n          expect(withoutOffset.getText()).toEqual('2 people are viewing.');\n          expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('3');\n\n          expect(withoutOffset.getText()).toEqual('3 people are viewing.');\n          expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('4');\n\n          expect(withoutOffset.getText()).toEqual('4 people are viewing.');\n          expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');\n        });\n        it('should show data-bound names', function() {\n          var withOffset = element.all(by.css('ng-pluralize')).get(1);\n          var personCount = element(by.model('personCount'));\n          var person1 = element(by.model('person1'));\n          var person2 = element(by.model('person2'));\n          personCount.clear();\n          personCount.sendKeys('4');\n          person1.clear();\n          person1.sendKeys('Di');\n          person2.clear();\n          person2.sendKeys('Vojta');\n          expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');\n        });\n      </file>\n    </example>\n */\nvar ngPluralizeDirective = ['$locale', '$interpolate', '$log', function($locale, $interpolate, $log) {\n  var BRACE = /{}/g,\n      IS_WHEN = /^when(Minus)?(.+)$/;\n\n  return {\n    link: function(scope, element, attr) {\n      var numberExp = attr.count,\n          whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs\n          offset = attr.offset || 0,\n          whens = scope.$eval(whenExp) || {},\n          whensExpFns = {},\n          startSymbol = $interpolate.startSymbol(),\n          endSymbol = $interpolate.endSymbol(),\n          braceReplacement = startSymbol + numberExp + '-' + offset + endSymbol,\n          watchRemover = angular.noop,\n          lastCount;\n\n      forEach(attr, function(expression, attributeName) {\n        var tmpMatch = IS_WHEN.exec(attributeName);\n        if (tmpMatch) {\n          var whenKey = (tmpMatch[1] ? '-' : '') + lowercase(tmpMatch[2]);\n          whens[whenKey] = element.attr(attr.$attr[attributeName]);\n        }\n      });\n      forEach(whens, function(expression, key) {\n        whensExpFns[key] = $interpolate(expression.replace(BRACE, braceReplacement));\n\n      });\n\n      scope.$watch(numberExp, function ngPluralizeWatchAction(newVal) {\n        var count = parseFloat(newVal);\n        var countIsNaN = isNaN(count);\n\n        if (!countIsNaN && !(count in whens)) {\n          // If an explicit number rule such as 1, 2, 3... is defined, just use it.\n          // Otherwise, check it against pluralization rules in $locale service.\n          count = $locale.pluralCat(count - offset);\n        }\n\n        // If both `count` and `lastCount` are NaN, we don't need to re-register a watch.\n        // In JS `NaN !== NaN`, so we have to explicitly check.\n        if ((count !== lastCount) && !(countIsNaN && isNumber(lastCount) && isNaN(lastCount))) {\n          watchRemover();\n          var whenExpFn = whensExpFns[count];\n          if (isUndefined(whenExpFn)) {\n            if (newVal != null) {\n              $log.debug(\"ngPluralize: no rule defined for '\" + count + \"' in \" + whenExp);\n            }\n            watchRemover = noop;\n            updateElementText();\n          } else {\n            watchRemover = scope.$watch(whenExpFn, updateElementText);\n          }\n          lastCount = count;\n        }\n      });\n\n      function updateElementText(newText) {\n        element.text(newText || '');\n      }\n    }\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ngRepeat\n * @multiElement\n *\n * @description\n * The `ngRepeat` directive instantiates a template once per item from a collection. Each template\n * instance gets its own scope, where the given loop variable is set to the current collection item,\n * and `$index` is set to the item index or key.\n *\n * Special properties are exposed on the local scope of each template instance, including:\n *\n * | Variable  | Type            | Details                                                                     |\n * |-----------|-----------------|-----------------------------------------------------------------------------|\n * | `$index`  | {@type number}  | iterator offset of the repeated element (0..length-1)                       |\n * | `$first`  | {@type boolean} | true if the repeated element is first in the iterator.                      |\n * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |\n * | `$last`   | {@type boolean} | true if the repeated element is last in the iterator.                       |\n * | `$even`   | {@type boolean} | true if the iterator position `$index` is even (otherwise false).           |\n * | `$odd`    | {@type boolean} | true if the iterator position `$index` is odd (otherwise false).            |\n *\n * <div class=\"alert alert-info\">\n *   Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.\n *   This may be useful when, for instance, nesting ngRepeats.\n * </div>\n *\n *\n * # Iterating over object properties\n *\n * It is possible to get `ngRepeat` to iterate over the properties of an object using the following\n * syntax:\n *\n * ```js\n * <div ng-repeat=\"(key, value) in myObj\"> ... </div>\n * ```\n *\n * However, there are a limitations compared to array iteration:\n *\n * - The JavaScript specification does not define the order of keys\n *   returned for an object, so Angular relies on the order returned by the browser\n *   when running `for key in myObj`. Browsers generally follow the strategy of providing\n *   keys in the order in which they were defined, although there are exceptions when keys are deleted\n *   and reinstated. See the\n *   [MDN page on `delete` for more info](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete#Cross-browser_notes).\n *\n * - `ngRepeat` will silently *ignore* object keys starting with `$`, because\n *   it's a prefix used by Angular for public (`$`) and private (`$$`) properties.\n *\n * - The built-in filters {@link ng.orderBy orderBy} and {@link ng.filter filter} do not work with\n *   objects, and will throw if used with one.\n *\n * If you are hitting any of these limitations, the recommended workaround is to convert your object into an array\n * that is sorted into the order that you prefer before providing it to `ngRepeat`. You could\n * do this with a filter such as [toArrayFilter](http://ngmodules.org/modules/angular-toArrayFilter)\n * or implement a `$watch` on the object yourself.\n *\n *\n * # Tracking and Duplicates\n *\n * `ngRepeat` uses {@link $rootScope.Scope#$watchCollection $watchCollection} to detect changes in\n * the collection. When a change happens, ngRepeat then makes the corresponding changes to the DOM:\n *\n * * When an item is added, a new instance of the template is added to the DOM.\n * * When an item is removed, its template instance is removed from the DOM.\n * * When items are reordered, their respective templates are reordered in the DOM.\n *\n * To minimize creation of DOM elements, `ngRepeat` uses a function\n * to \"keep track\" of all items in the collection and their corresponding DOM elements.\n * For example, if an item is added to the collection, ngRepeat will know that all other items\n * already have DOM elements, and will not re-render them.\n *\n * The default tracking function (which tracks items by their identity) does not allow\n * duplicate items in arrays. This is because when there are duplicates, it is not possible\n * to maintain a one-to-one mapping between collection items and DOM elements.\n *\n * If you do need to repeat duplicate items, you can substitute the default tracking behavior\n * with your own using the `track by` expression.\n *\n * For example, you may track items by the index of each item in the collection, using the\n * special scope property `$index`:\n * ```html\n *    <div ng-repeat=\"n in [42, 42, 43, 43] track by $index\">\n *      {{n}}\n *    </div>\n * ```\n *\n * You may also use arbitrary expressions in `track by`, including references to custom functions\n * on the scope:\n * ```html\n *    <div ng-repeat=\"n in [42, 42, 43, 43] track by myTrackingFunction(n)\">\n *      {{n}}\n *    </div>\n * ```\n *\n * <div class=\"alert alert-success\">\n * If you are working with objects that have an identifier property, you should track\n * by the identifier instead of the whole object. Should you reload your data later, `ngRepeat`\n * will not have to rebuild the DOM elements for items it has already rendered, even if the\n * JavaScript objects in the collection have been substituted for new ones. For large collections,\n * this significantly improves rendering performance. If you don't have a unique identifier,\n * `track by $index` can also provide a performance boost.\n * </div>\n * ```html\n *    <div ng-repeat=\"model in collection track by model.id\">\n *      {{model.name}}\n *    </div>\n * ```\n *\n * When no `track by` expression is provided, it is equivalent to tracking by the built-in\n * `$id` function, which tracks items by their identity:\n * ```html\n *    <div ng-repeat=\"obj in collection track by $id(obj)\">\n *      {{obj.prop}}\n *    </div>\n * ```\n *\n * <div class=\"alert alert-warning\">\n * **Note:** `track by` must always be the last expression:\n * </div>\n * ```\n * <div ng-repeat=\"model in collection | orderBy: 'id' as filtered_result track by model.id\">\n *     {{model.name}}\n * </div>\n * ```\n *\n * # Special repeat start and end points\n * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending\n * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.\n * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)\n * up to and including the ending HTML tag where **ng-repeat-end** is placed.\n *\n * The example below makes use of this feature:\n * ```html\n *   <header ng-repeat-start=\"item in items\">\n *     Header {{ item }}\n *   </header>\n *   <div class=\"body\">\n *     Body {{ item }}\n *   </div>\n *   <footer ng-repeat-end>\n *     Footer {{ item }}\n *   </footer>\n * ```\n *\n * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:\n * ```html\n *   <header>\n *     Header A\n *   </header>\n *   <div class=\"body\">\n *     Body A\n *   </div>\n *   <footer>\n *     Footer A\n *   </footer>\n *   <header>\n *     Header B\n *   </header>\n *   <div class=\"body\">\n *     Body B\n *   </div>\n *   <footer>\n *     Footer B\n *   </footer>\n * ```\n *\n * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such\n * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).\n *\n * @animations\n * | Animation                        | Occurs                              |\n * |----------------------------------|-------------------------------------|\n * | {@link ng.$animate#enter enter} | when a new item is added to the list or when an item is revealed after a filter |\n * | {@link ng.$animate#leave leave} | when an item is removed from the list or when an item is filtered out |\n * | {@link ng.$animate#move move } | when an adjacent item is filtered out causing a reorder or when the item contents are reordered |\n *\n * See the example below for defining CSS animations with ngRepeat.\n *\n * @element ANY\n * @scope\n * @priority 1000\n * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These\n *   formats are currently supported:\n *\n *   * `variable in expression` – where variable is the user defined loop variable and `expression`\n *     is a scope expression giving the collection to enumerate.\n *\n *     For example: `album in artist.albums`.\n *\n *   * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers,\n *     and `expression` is the scope expression giving the collection to enumerate.\n *\n *     For example: `(name, age) in {'adam':10, 'amalie':12}`.\n *\n *   * `variable in expression track by tracking_expression` – You can also provide an optional tracking expression\n *     which can be used to associate the objects in the collection with the DOM elements. If no tracking expression\n *     is specified, ng-repeat associates elements by identity. It is an error to have\n *     more than one tracking expression value resolve to the same key. (This would mean that two distinct objects are\n *     mapped to the same DOM element, which is not possible.)\n *\n *     Note that the tracking expression must come last, after any filters, and the alias expression.\n *\n *     For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements\n *     will be associated by item identity in the array.\n *\n *     For example: `item in items track by $id(item)`. A built in `$id()` function can be used to assign a unique\n *     `$$hashKey` property to each item in the array. This property is then used as a key to associated DOM elements\n *     with the corresponding item in the array by identity. Moving the same object in array would move the DOM\n *     element in the same way in the DOM.\n *\n *     For example: `item in items track by item.id` is a typical pattern when the items come from the database. In this\n *     case the object identity does not matter. Two objects are considered equivalent as long as their `id`\n *     property is same.\n *\n *     For example: `item in items | filter:searchText track by item.id` is a pattern that might be used to apply a filter\n *     to items in conjunction with a tracking expression.\n *\n *   * `variable in expression as alias_expression` – You can also provide an optional alias expression which will then store the\n *     intermediate results of the repeater after the filters have been applied. Typically this is used to render a special message\n *     when a filter is active on the repeater, but the filtered result set is empty.\n *\n *     For example: `item in items | filter:x as results` will store the fragment of the repeated items as `results`, but only after\n *     the items have been processed through the filter.\n *\n *     Please note that `as [variable name] is not an operator but rather a part of ngRepeat micro-syntax so it can be used only at the end\n *     (and not as operator, inside an expression).\n *\n *     For example: `item in items | filter : x | orderBy : order | limitTo : limit as results` .\n *\n * @example\n * This example uses `ngRepeat` to display a list of people. A filter is used to restrict the displayed\n * results by name. New (entering) and removed (leaving) items are animated.\n  <example module=\"ngRepeat\" name=\"ngRepeat\" deps=\"angular-animate.js\" animations=\"true\">\n    <file name=\"index.html\">\n      <div ng-controller=\"repeatController\">\n        I have {{friends.length}} friends. They are:\n        <input type=\"search\" ng-model=\"q\" placeholder=\"filter friends...\" aria-label=\"filter friends\" />\n        <ul class=\"example-animate-container\">\n          <li class=\"animate-repeat\" ng-repeat=\"friend in friends | filter:q as results\">\n            [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.\n          </li>\n          <li class=\"animate-repeat\" ng-if=\"results.length == 0\">\n            <strong>No results found...</strong>\n          </li>\n        </ul>\n      </div>\n    </file>\n    <file name=\"script.js\">\n      angular.module('ngRepeat', ['ngAnimate']).controller('repeatController', function($scope) {\n        $scope.friends = [\n          {name:'John', age:25, gender:'boy'},\n          {name:'Jessie', age:30, gender:'girl'},\n          {name:'Johanna', age:28, gender:'girl'},\n          {name:'Joy', age:15, gender:'girl'},\n          {name:'Mary', age:28, gender:'girl'},\n          {name:'Peter', age:95, gender:'boy'},\n          {name:'Sebastian', age:50, gender:'boy'},\n          {name:'Erika', age:27, gender:'girl'},\n          {name:'Patrick', age:40, gender:'boy'},\n          {name:'Samantha', age:60, gender:'girl'}\n        ];\n      });\n    </file>\n    <file name=\"animations.css\">\n      .example-animate-container {\n        background:white;\n        border:1px solid black;\n        list-style:none;\n        margin:0;\n        padding:0 10px;\n      }\n\n      .animate-repeat {\n        line-height:30px;\n        list-style:none;\n        box-sizing:border-box;\n      }\n\n      .animate-repeat.ng-move,\n      .animate-repeat.ng-enter,\n      .animate-repeat.ng-leave {\n        transition:all linear 0.5s;\n      }\n\n      .animate-repeat.ng-leave.ng-leave-active,\n      .animate-repeat.ng-move,\n      .animate-repeat.ng-enter {\n        opacity:0;\n        max-height:0;\n      }\n\n      .animate-repeat.ng-leave,\n      .animate-repeat.ng-move.ng-move-active,\n      .animate-repeat.ng-enter.ng-enter-active {\n        opacity:1;\n        max-height:30px;\n      }\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      var friends = element.all(by.repeater('friend in friends'));\n\n      it('should render initial data set', function() {\n        expect(friends.count()).toBe(10);\n        expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');\n        expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');\n        expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');\n        expect(element(by.binding('friends.length')).getText())\n            .toMatch(\"I have 10 friends. They are:\");\n      });\n\n       it('should update repeater when filter predicate changes', function() {\n         expect(friends.count()).toBe(10);\n\n         element(by.model('q')).sendKeys('ma');\n\n         expect(friends.count()).toBe(2);\n         expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');\n         expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');\n       });\n      </file>\n    </example>\n */\nvar ngRepeatDirective = ['$parse', '$animate', '$compile', function($parse, $animate, $compile) {\n  var NG_REMOVED = '$$NG_REMOVED';\n  var ngRepeatMinErr = minErr('ngRepeat');\n\n  var updateScope = function(scope, index, valueIdentifier, value, keyIdentifier, key, arrayLength) {\n    // TODO(perf): generate setters to shave off ~40ms or 1-1.5%\n    scope[valueIdentifier] = value;\n    if (keyIdentifier) scope[keyIdentifier] = key;\n    scope.$index = index;\n    scope.$first = (index === 0);\n    scope.$last = (index === (arrayLength - 1));\n    scope.$middle = !(scope.$first || scope.$last);\n    // jshint bitwise: false\n    scope.$odd = !(scope.$even = (index&1) === 0);\n    // jshint bitwise: true\n  };\n\n  var getBlockStart = function(block) {\n    return block.clone[0];\n  };\n\n  var getBlockEnd = function(block) {\n    return block.clone[block.clone.length - 1];\n  };\n\n\n  return {\n    restrict: 'A',\n    multiElement: true,\n    transclude: 'element',\n    priority: 1000,\n    terminal: true,\n    $$tlb: true,\n    compile: function ngRepeatCompile($element, $attr) {\n      var expression = $attr.ngRepeat;\n      var ngRepeatEndComment = $compile.$$createComment('end ngRepeat', expression);\n\n      var match = expression.match(/^\\s*([\\s\\S]+?)\\s+in\\s+([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/);\n\n      if (!match) {\n        throw ngRepeatMinErr('iexp', \"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.\",\n            expression);\n      }\n\n      var lhs = match[1];\n      var rhs = match[2];\n      var aliasAs = match[3];\n      var trackByExp = match[4];\n\n      match = lhs.match(/^(?:(\\s*[\\$\\w]+)|\\(\\s*([\\$\\w]+)\\s*,\\s*([\\$\\w]+)\\s*\\))$/);\n\n      if (!match) {\n        throw ngRepeatMinErr('iidexp', \"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.\",\n            lhs);\n      }\n      var valueIdentifier = match[3] || match[1];\n      var keyIdentifier = match[2];\n\n      if (aliasAs && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs) ||\n          /^(null|undefined|this|\\$index|\\$first|\\$middle|\\$last|\\$even|\\$odd|\\$parent|\\$root|\\$id)$/.test(aliasAs))) {\n        throw ngRepeatMinErr('badident', \"alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.\",\n          aliasAs);\n      }\n\n      var trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn;\n      var hashFnLocals = {$id: hashKey};\n\n      if (trackByExp) {\n        trackByExpGetter = $parse(trackByExp);\n      } else {\n        trackByIdArrayFn = function(key, value) {\n          return hashKey(value);\n        };\n        trackByIdObjFn = function(key) {\n          return key;\n        };\n      }\n\n      return function ngRepeatLink($scope, $element, $attr, ctrl, $transclude) {\n\n        if (trackByExpGetter) {\n          trackByIdExpFn = function(key, value, index) {\n            // assign key, value, and $index to the locals so that they can be used in hash functions\n            if (keyIdentifier) hashFnLocals[keyIdentifier] = key;\n            hashFnLocals[valueIdentifier] = value;\n            hashFnLocals.$index = index;\n            return trackByExpGetter($scope, hashFnLocals);\n          };\n        }\n\n        // Store a list of elements from previous run. This is a hash where key is the item from the\n        // iterator, and the value is objects with following properties.\n        //   - scope: bound scope\n        //   - element: previous element.\n        //   - index: position\n        //\n        // We are using no-proto object so that we don't need to guard against inherited props via\n        // hasOwnProperty.\n        var lastBlockMap = createMap();\n\n        //watch props\n        $scope.$watchCollection(rhs, function ngRepeatAction(collection) {\n          var index, length,\n              previousNode = $element[0],     // node that cloned nodes should be inserted after\n                                              // initialized to the comment node anchor\n              nextNode,\n              // Same as lastBlockMap but it has the current state. It will become the\n              // lastBlockMap on the next iteration.\n              nextBlockMap = createMap(),\n              collectionLength,\n              key, value, // key/value of iteration\n              trackById,\n              trackByIdFn,\n              collectionKeys,\n              block,       // last object information {scope, element, id}\n              nextBlockOrder,\n              elementsToRemove;\n\n          if (aliasAs) {\n            $scope[aliasAs] = collection;\n          }\n\n          if (isArrayLike(collection)) {\n            collectionKeys = collection;\n            trackByIdFn = trackByIdExpFn || trackByIdArrayFn;\n          } else {\n            trackByIdFn = trackByIdExpFn || trackByIdObjFn;\n            // if object, extract keys, in enumeration order, unsorted\n            collectionKeys = [];\n            for (var itemKey in collection) {\n              if (hasOwnProperty.call(collection, itemKey) && itemKey.charAt(0) !== '$') {\n                collectionKeys.push(itemKey);\n              }\n            }\n          }\n\n          collectionLength = collectionKeys.length;\n          nextBlockOrder = new Array(collectionLength);\n\n          // locate existing items\n          for (index = 0; index < collectionLength; index++) {\n            key = (collection === collectionKeys) ? index : collectionKeys[index];\n            value = collection[key];\n            trackById = trackByIdFn(key, value, index);\n            if (lastBlockMap[trackById]) {\n              // found previously seen block\n              block = lastBlockMap[trackById];\n              delete lastBlockMap[trackById];\n              nextBlockMap[trackById] = block;\n              nextBlockOrder[index] = block;\n            } else if (nextBlockMap[trackById]) {\n              // if collision detected. restore lastBlockMap and throw an error\n              forEach(nextBlockOrder, function(block) {\n                if (block && block.scope) lastBlockMap[block.id] = block;\n              });\n              throw ngRepeatMinErr('dupes',\n                  \"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}\",\n                  expression, trackById, value);\n            } else {\n              // new never before seen block\n              nextBlockOrder[index] = {id: trackById, scope: undefined, clone: undefined};\n              nextBlockMap[trackById] = true;\n            }\n          }\n\n          // remove leftover items\n          for (var blockKey in lastBlockMap) {\n            block = lastBlockMap[blockKey];\n            elementsToRemove = getBlockNodes(block.clone);\n            $animate.leave(elementsToRemove);\n            if (elementsToRemove[0].parentNode) {\n              // if the element was not removed yet because of pending animation, mark it as deleted\n              // so that we can ignore it later\n              for (index = 0, length = elementsToRemove.length; index < length; index++) {\n                elementsToRemove[index][NG_REMOVED] = true;\n              }\n            }\n            block.scope.$destroy();\n          }\n\n          // we are not using forEach for perf reasons (trying to avoid #call)\n          for (index = 0; index < collectionLength; index++) {\n            key = (collection === collectionKeys) ? index : collectionKeys[index];\n            value = collection[key];\n            block = nextBlockOrder[index];\n\n            if (block.scope) {\n              // if we have already seen this object, then we need to reuse the\n              // associated scope/element\n\n              nextNode = previousNode;\n\n              // skip nodes that are already pending removal via leave animation\n              do {\n                nextNode = nextNode.nextSibling;\n              } while (nextNode && nextNode[NG_REMOVED]);\n\n              if (getBlockStart(block) != nextNode) {\n                // existing item which got moved\n                $animate.move(getBlockNodes(block.clone), null, previousNode);\n              }\n              previousNode = getBlockEnd(block);\n              updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n            } else {\n              // new item which we don't know about\n              $transclude(function ngRepeatTransclude(clone, scope) {\n                block.scope = scope;\n                // http://jsperf.com/clone-vs-createcomment\n                var endNode = ngRepeatEndComment.cloneNode(false);\n                clone[clone.length++] = endNode;\n\n                $animate.enter(clone, null, previousNode);\n                previousNode = endNode;\n                // Note: We only need the first/last node of the cloned nodes.\n                // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n                // by a directive with templateUrl when its template arrives.\n                block.clone = clone;\n                nextBlockMap[block.id] = block;\n                updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n              });\n            }\n          }\n          lastBlockMap = nextBlockMap;\n        });\n      };\n    }\n  };\n}];\n\nvar NG_HIDE_CLASS = 'ng-hide';\nvar NG_HIDE_IN_PROGRESS_CLASS = 'ng-hide-animate';\n/**\n * @ngdoc directive\n * @name ngShow\n * @multiElement\n *\n * @description\n * The `ngShow` directive shows or hides the given HTML element based on the expression\n * provided to the `ngShow` attribute. The element is shown or hidden by removing or adding\n * the `.ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * <!-- when $scope.myValue is truthy (element is visible) -->\n * <div ng-show=\"myValue\"></div>\n *\n * <!-- when $scope.myValue is falsy (element is hidden) -->\n * <div ng-show=\"myValue\" class=\"ng-hide\"></div>\n * ```\n *\n * When the `ngShow` expression evaluates to a falsy value then the `.ng-hide` CSS class is added to the class\n * attribute on the element causing it to become hidden. When truthy, the `.ng-hide` CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding `.ng-hide`\n *\n * By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change\n * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n * class CSS. Note that the selector that needs to be used is actually `.ng-hide:not(.ng-hide-animate)` to cope\n * with extra animation classes that can be added.\n *\n * ```css\n * .ng-hide:not(.ng-hide-animate) {\n *   /&#42; this is just another form of hiding an element &#42;/\n *   display: block!important;\n *   position: absolute;\n *   top: -9999px;\n *   left: -9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the display style.\n *\n * ## A note about animations with `ngShow`\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass except that\n * you must also include the !important flag to override the display property\n * so that you can perform an animation when the element is hidden during the time of the animation.\n *\n * ```css\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n *   /&#42; this is required as of 1.3x to properly\n *      apply all styling in a show/hide animation &#42;/\n *   transition: 0s linear all;\n * }\n *\n * .my-element.ng-hide-add-active,\n * .my-element.ng-hide-remove-active {\n *   /&#42; the transition is defined in the active class &#42;/\n *   transition: 1s linear all;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.3, there is no need to change the display\n * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n *\n * @animations\n * | Animation                        | Occurs                              |\n * |----------------------------------|-------------------------------------|\n * | {@link $animate#addClass addClass} `.ng-hide`  | after the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden |\n * | {@link $animate#removeClass removeClass}  `.ng-hide`  | after the `ngShow` expression evaluates to a truthy value and just before contents are set to visible |\n *\n * @element ANY\n * @param {expression} ngShow If the {@link guide/expression expression} is truthy\n *     then the element is shown or hidden respectively.\n *\n * @example\n  <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n    <file name=\"index.html\">\n      Click me: <input type=\"checkbox\" ng-model=\"checked\" aria-label=\"Toggle ngHide\"><br/>\n      <div>\n        Show:\n        <div class=\"check-element animate-show\" ng-show=\"checked\">\n          <span class=\"glyphicon glyphicon-thumbs-up\"></span> I show up when your checkbox is checked.\n        </div>\n      </div>\n      <div>\n        Hide:\n        <div class=\"check-element animate-show\" ng-hide=\"checked\">\n          <span class=\"glyphicon glyphicon-thumbs-down\"></span> I hide when your checkbox is checked.\n        </div>\n      </div>\n    </file>\n    <file name=\"glyphicons.css\">\n      @import url(../../components/bootstrap-3.1.1/css/bootstrap.css);\n    </file>\n    <file name=\"animations.css\">\n      .animate-show {\n        line-height: 20px;\n        opacity: 1;\n        padding: 10px;\n        border: 1px solid black;\n        background: white;\n      }\n\n      .animate-show.ng-hide-add, .animate-show.ng-hide-remove {\n        transition: all linear 0.5s;\n      }\n\n      .animate-show.ng-hide {\n        line-height: 0;\n        opacity: 0;\n        padding: 0 10px;\n      }\n\n      .check-element {\n        padding: 10px;\n        border: 1px solid black;\n        background: white;\n      }\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n      var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\n      it('should check ng-show / ng-hide', function() {\n        expect(thumbsUp.isDisplayed()).toBeFalsy();\n        expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n        element(by.model('checked')).click();\n\n        expect(thumbsUp.isDisplayed()).toBeTruthy();\n        expect(thumbsDown.isDisplayed()).toBeFalsy();\n      });\n    </file>\n  </example>\n */\nvar ngShowDirective = ['$animate', function($animate) {\n  return {\n    restrict: 'A',\n    multiElement: true,\n    link: function(scope, element, attr) {\n      scope.$watch(attr.ngShow, function ngShowWatchAction(value) {\n        // we're adding a temporary, animation-specific class for ng-hide since this way\n        // we can control when the element is actually displayed on screen without having\n        // to have a global/greedy CSS selector that breaks when other animations are run.\n        // Read: https://github.com/angular/angular.js/issues/9103#issuecomment-58335845\n        $animate[value ? 'removeClass' : 'addClass'](element, NG_HIDE_CLASS, {\n          tempClasses: NG_HIDE_IN_PROGRESS_CLASS\n        });\n      });\n    }\n  };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngHide\n * @multiElement\n *\n * @description\n * The `ngHide` directive shows or hides the given HTML element based on the expression\n * provided to the `ngHide` attribute. The element is shown or hidden by removing or adding\n * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * <!-- when $scope.myValue is truthy (element is hidden) -->\n * <div ng-hide=\"myValue\" class=\"ng-hide\"></div>\n *\n * <!-- when $scope.myValue is falsy (element is visible) -->\n * <div ng-hide=\"myValue\"></div>\n * ```\n *\n * When the `ngHide` expression evaluates to a truthy value then the `.ng-hide` CSS class is added to the class\n * attribute on the element causing it to become hidden. When falsy, the `.ng-hide` CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding `.ng-hide`\n *\n * By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change\n * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n * class in CSS:\n *\n * ```css\n * .ng-hide {\n *   /&#42; this is just another form of hiding an element &#42;/\n *   display: block!important;\n *   position: absolute;\n *   top: -9999px;\n *   left: -9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the display style.\n *\n * ## A note about animations with `ngHide`\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass, except that the `.ng-hide`\n * CSS class is added and removed for you instead of your own CSS class.\n *\n * ```css\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n *   transition: 0.5s linear all;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.3, there is no need to change the display\n * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n *\n * @animations\n * | Animation                        | Occurs                              |\n * |----------------------------------|-------------------------------------|\n * | {@link $animate#addClass addClass} `.ng-hide`  | after the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden |\n * | {@link $animate#removeClass removeClass}  `.ng-hide`  | after the `ngHide` expression evaluates to a non truthy value and just before contents are set to visible |\n *\n *\n * @element ANY\n * @param {expression} ngHide If the {@link guide/expression expression} is truthy then\n *     the element is shown or hidden respectively.\n *\n * @example\n  <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n    <file name=\"index.html\">\n      Click me: <input type=\"checkbox\" ng-model=\"checked\" aria-label=\"Toggle ngShow\"><br/>\n      <div>\n        Show:\n        <div class=\"check-element animate-hide\" ng-show=\"checked\">\n          <span class=\"glyphicon glyphicon-thumbs-up\"></span> I show up when your checkbox is checked.\n        </div>\n      </div>\n      <div>\n        Hide:\n        <div class=\"check-element animate-hide\" ng-hide=\"checked\">\n          <span class=\"glyphicon glyphicon-thumbs-down\"></span> I hide when your checkbox is checked.\n        </div>\n      </div>\n    </file>\n    <file name=\"glyphicons.css\">\n      @import url(../../components/bootstrap-3.1.1/css/bootstrap.css);\n    </file>\n    <file name=\"animations.css\">\n      .animate-hide {\n        transition: all linear 0.5s;\n        line-height: 20px;\n        opacity: 1;\n        padding: 10px;\n        border: 1px solid black;\n        background: white;\n      }\n\n      .animate-hide.ng-hide {\n        line-height: 0;\n        opacity: 0;\n        padding: 0 10px;\n      }\n\n      .check-element {\n        padding: 10px;\n        border: 1px solid black;\n        background: white;\n      }\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n      var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\n      it('should check ng-show / ng-hide', function() {\n        expect(thumbsUp.isDisplayed()).toBeFalsy();\n        expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n        element(by.model('checked')).click();\n\n        expect(thumbsUp.isDisplayed()).toBeTruthy();\n        expect(thumbsDown.isDisplayed()).toBeFalsy();\n      });\n    </file>\n  </example>\n */\nvar ngHideDirective = ['$animate', function($animate) {\n  return {\n    restrict: 'A',\n    multiElement: true,\n    link: function(scope, element, attr) {\n      scope.$watch(attr.ngHide, function ngHideWatchAction(value) {\n        // The comment inside of the ngShowDirective explains why we add and\n        // remove a temporary class for the show/hide animation\n        $animate[value ? 'addClass' : 'removeClass'](element,NG_HIDE_CLASS, {\n          tempClasses: NG_HIDE_IN_PROGRESS_CLASS\n        });\n      });\n    }\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ngStyle\n * @restrict AC\n *\n * @description\n * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.\n *\n * @element ANY\n * @param {expression} ngStyle\n *\n * {@link guide/expression Expression} which evals to an\n * object whose keys are CSS style names and values are corresponding values for those CSS\n * keys.\n *\n * Since some CSS style names are not valid keys for an object, they must be quoted.\n * See the 'background-color' style in the example below.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n        <input type=\"button\" value=\"set color\" ng-click=\"myStyle={color:'red'}\">\n        <input type=\"button\" value=\"set background\" ng-click=\"myStyle={'background-color':'blue'}\">\n        <input type=\"button\" value=\"clear\" ng-click=\"myStyle={}\">\n        <br/>\n        <span ng-style=\"myStyle\">Sample Text</span>\n        <pre>myStyle={{myStyle}}</pre>\n     </file>\n     <file name=\"style.css\">\n       span {\n         color: black;\n       }\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       var colorSpan = element(by.css('span'));\n\n       it('should check ng-style', function() {\n         expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n         element(by.css('input[value=\\'set color\\']')).click();\n         expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');\n         element(by.css('input[value=clear]')).click();\n         expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n       });\n     </file>\n   </example>\n */\nvar ngStyleDirective = ngDirective(function(scope, element, attr) {\n  scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {\n    if (oldStyles && (newStyles !== oldStyles)) {\n      forEach(oldStyles, function(val, style) { element.css(style, '');});\n    }\n    if (newStyles) element.css(newStyles);\n  }, true);\n});\n\n/**\n * @ngdoc directive\n * @name ngSwitch\n * @restrict EA\n *\n * @description\n * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.\n * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location\n * as specified in the template.\n *\n * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it\n * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element\n * matches the value obtained from the evaluated expression. In other words, you define a container element\n * (where you place the directive), place an expression on the **`on=\"...\"` attribute**\n * (or the **`ng-switch=\"...\"` attribute**), define any inner elements inside of the directive and place\n * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on\n * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default\n * attribute is displayed.\n *\n * <div class=\"alert alert-info\">\n * Be aware that the attribute values to match against cannot be expressions. They are interpreted\n * as literal string values to match against.\n * For example, **`ng-switch-when=\"someVal\"`** will match against the string `\"someVal\"` not against the\n * value of the expression `$scope.someVal`.\n * </div>\n\n * @animations\n * | Animation                        | Occurs                              |\n * |----------------------------------|-------------------------------------|\n * | {@link ng.$animate#enter enter}  | after the ngSwitch contents change and the matched child element is placed inside the container |\n * | {@link ng.$animate#leave leave}  | after the ngSwitch contents change and just before the former contents are removed from the DOM |\n *\n * @usage\n *\n * ```\n * <ANY ng-switch=\"expression\">\n *   <ANY ng-switch-when=\"matchValue1\">...</ANY>\n *   <ANY ng-switch-when=\"matchValue2\">...</ANY>\n *   <ANY ng-switch-default>...</ANY>\n * </ANY>\n * ```\n *\n *\n * @scope\n * @priority 1200\n * @param {*} ngSwitch|on expression to match against <code>ng-switch-when</code>.\n * On child elements add:\n *\n * * `ngSwitchWhen`: the case statement to match against. If match then this\n *   case will be displayed. If the same match appears multiple times, all the\n *   elements will be displayed.\n * * `ngSwitchDefault`: the default case when no other case match. If there\n *   are multiple default cases, all of them will be displayed when no other\n *   case match.\n *\n *\n * @example\n  <example module=\"switchExample\" deps=\"angular-animate.js\" animations=\"true\">\n    <file name=\"index.html\">\n      <div ng-controller=\"ExampleController\">\n        <select ng-model=\"selection\" ng-options=\"item for item in items\">\n        </select>\n        <code>selection={{selection}}</code>\n        <hr/>\n        <div class=\"animate-switch-container\"\n          ng-switch on=\"selection\">\n            <div class=\"animate-switch\" ng-switch-when=\"settings\">Settings Div</div>\n            <div class=\"animate-switch\" ng-switch-when=\"home\">Home Span</div>\n            <div class=\"animate-switch\" ng-switch-default>default</div>\n        </div>\n      </div>\n    </file>\n    <file name=\"script.js\">\n      angular.module('switchExample', ['ngAnimate'])\n        .controller('ExampleController', ['$scope', function($scope) {\n          $scope.items = ['settings', 'home', 'other'];\n          $scope.selection = $scope.items[0];\n        }]);\n    </file>\n    <file name=\"animations.css\">\n      .animate-switch-container {\n        position:relative;\n        background:white;\n        border:1px solid black;\n        height:40px;\n        overflow:hidden;\n      }\n\n      .animate-switch {\n        padding:10px;\n      }\n\n      .animate-switch.ng-animate {\n        transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n        position:absolute;\n        top:0;\n        left:0;\n        right:0;\n        bottom:0;\n      }\n\n      .animate-switch.ng-leave.ng-leave-active,\n      .animate-switch.ng-enter {\n        top:-50px;\n      }\n      .animate-switch.ng-leave,\n      .animate-switch.ng-enter.ng-enter-active {\n        top:0;\n      }\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      var switchElem = element(by.css('[ng-switch]'));\n      var select = element(by.model('selection'));\n\n      it('should start in settings', function() {\n        expect(switchElem.getText()).toMatch(/Settings Div/);\n      });\n      it('should change to home', function() {\n        select.all(by.css('option')).get(1).click();\n        expect(switchElem.getText()).toMatch(/Home Span/);\n      });\n      it('should select default', function() {\n        select.all(by.css('option')).get(2).click();\n        expect(switchElem.getText()).toMatch(/default/);\n      });\n    </file>\n  </example>\n */\nvar ngSwitchDirective = ['$animate', '$compile', function($animate, $compile) {\n  return {\n    require: 'ngSwitch',\n\n    // asks for $scope to fool the BC controller module\n    controller: ['$scope', function ngSwitchController() {\n     this.cases = {};\n    }],\n    link: function(scope, element, attr, ngSwitchController) {\n      var watchExpr = attr.ngSwitch || attr.on,\n          selectedTranscludes = [],\n          selectedElements = [],\n          previousLeaveAnimations = [],\n          selectedScopes = [];\n\n      var spliceFactory = function(array, index) {\n          return function() { array.splice(index, 1); };\n      };\n\n      scope.$watch(watchExpr, function ngSwitchWatchAction(value) {\n        var i, ii;\n        for (i = 0, ii = previousLeaveAnimations.length; i < ii; ++i) {\n          $animate.cancel(previousLeaveAnimations[i]);\n        }\n        previousLeaveAnimations.length = 0;\n\n        for (i = 0, ii = selectedScopes.length; i < ii; ++i) {\n          var selected = getBlockNodes(selectedElements[i].clone);\n          selectedScopes[i].$destroy();\n          var promise = previousLeaveAnimations[i] = $animate.leave(selected);\n          promise.then(spliceFactory(previousLeaveAnimations, i));\n        }\n\n        selectedElements.length = 0;\n        selectedScopes.length = 0;\n\n        if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {\n          forEach(selectedTranscludes, function(selectedTransclude) {\n            selectedTransclude.transclude(function(caseElement, selectedScope) {\n              selectedScopes.push(selectedScope);\n              var anchor = selectedTransclude.element;\n              caseElement[caseElement.length++] = $compile.$$createComment('end ngSwitchWhen');\n              var block = { clone: caseElement };\n\n              selectedElements.push(block);\n              $animate.enter(caseElement, anchor.parent(), anchor);\n            });\n          });\n        }\n      });\n    }\n  };\n}];\n\nvar ngSwitchWhenDirective = ngDirective({\n  transclude: 'element',\n  priority: 1200,\n  require: '^ngSwitch',\n  multiElement: true,\n  link: function(scope, element, attrs, ctrl, $transclude) {\n    ctrl.cases['!' + attrs.ngSwitchWhen] = (ctrl.cases['!' + attrs.ngSwitchWhen] || []);\n    ctrl.cases['!' + attrs.ngSwitchWhen].push({ transclude: $transclude, element: element });\n  }\n});\n\nvar ngSwitchDefaultDirective = ngDirective({\n  transclude: 'element',\n  priority: 1200,\n  require: '^ngSwitch',\n  multiElement: true,\n  link: function(scope, element, attr, ctrl, $transclude) {\n    ctrl.cases['?'] = (ctrl.cases['?'] || []);\n    ctrl.cases['?'].push({ transclude: $transclude, element: element });\n   }\n});\n\n/**\n * @ngdoc directive\n * @name ngTransclude\n * @restrict EAC\n *\n * @description\n * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.\n *\n * You can specify that you want to insert a named transclusion slot, instead of the default slot, by providing the slot name\n * as the value of the `ng-transclude` or `ng-transclude-slot` attribute.\n *\n * If the transcluded content is not empty (i.e. contains one or more DOM nodes, including whitespace text nodes), any existing\n * content of this element will be removed before the transcluded content is inserted.\n * If the transcluded content is empty, the existing content is left intact. This lets you provide fallback content in the case\n * that no transcluded content is provided.\n *\n * @element ANY\n *\n * @param {string} ngTransclude|ngTranscludeSlot the name of the slot to insert at this point. If this is not provided, is empty\n *                                               or its value is the same as the name of the attribute then the default slot is used.\n *\n * @example\n * ### Basic transclusion\n * This example demonstrates basic transclusion of content into a component directive.\n * <example name=\"simpleTranscludeExample\" module=\"transcludeExample\">\n *   <file name=\"index.html\">\n *     <script>\n *       angular.module('transcludeExample', [])\n *        .directive('pane', function(){\n *           return {\n *             restrict: 'E',\n *             transclude: true,\n *             scope: { title:'@' },\n *             template: '<div style=\"border: 1px solid black;\">' +\n *                         '<div style=\"background-color: gray\">{{title}}</div>' +\n *                         '<ng-transclude></ng-transclude>' +\n *                       '</div>'\n *           };\n *       })\n *       .controller('ExampleController', ['$scope', function($scope) {\n *         $scope.title = 'Lorem Ipsum';\n *         $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';\n *       }]);\n *     </script>\n *     <div ng-controller=\"ExampleController\">\n *       <input ng-model=\"title\" aria-label=\"title\"> <br/>\n *       <textarea ng-model=\"text\" aria-label=\"text\"></textarea> <br/>\n *       <pane title=\"{{title}}\">{{text}}</pane>\n *     </div>\n *   </file>\n *   <file name=\"protractor.js\" type=\"protractor\">\n *      it('should have transcluded', function() {\n *        var titleElement = element(by.model('title'));\n *        titleElement.clear();\n *        titleElement.sendKeys('TITLE');\n *        var textElement = element(by.model('text'));\n *        textElement.clear();\n *        textElement.sendKeys('TEXT');\n *        expect(element(by.binding('title')).getText()).toEqual('TITLE');\n *        expect(element(by.binding('text')).getText()).toEqual('TEXT');\n *      });\n *   </file>\n * </example>\n *\n * @example\n * ### Transclude fallback content\n * This example shows how to use `NgTransclude` with fallback content, that\n * is displayed if no transcluded content is provided.\n *\n * <example module=\"transcludeFallbackContentExample\">\n * <file name=\"index.html\">\n * <script>\n * angular.module('transcludeFallbackContentExample', [])\n * .directive('myButton', function(){\n *             return {\n *               restrict: 'E',\n *               transclude: true,\n *               scope: true,\n *               template: '<button style=\"cursor: pointer;\">' +\n *                           '<ng-transclude>' +\n *                             '<b style=\"color: red;\">Button1</b>' +\n *                           '</ng-transclude>' +\n *                         '</button>'\n *             };\n *         });\n * </script>\n * <!-- fallback button content -->\n * <my-button id=\"fallback\"></my-button>\n * <!-- modified button content -->\n * <my-button id=\"modified\">\n *   <i style=\"color: green;\">Button2</i>\n * </my-button>\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it('should have different transclude element content', function() {\n *          expect(element(by.id('fallback')).getText()).toBe('Button1');\n *          expect(element(by.id('modified')).getText()).toBe('Button2');\n *        });\n * </file>\n * </example>\n *\n * @example\n * ### Multi-slot transclusion\n * This example demonstrates using multi-slot transclusion in a component directive.\n * <example name=\"multiSlotTranscludeExample\" module=\"multiSlotTranscludeExample\">\n *   <file name=\"index.html\">\n *    <style>\n *      .title, .footer {\n *        background-color: gray\n *      }\n *    </style>\n *    <div ng-controller=\"ExampleController\">\n *      <input ng-model=\"title\" aria-label=\"title\"> <br/>\n *      <textarea ng-model=\"text\" aria-label=\"text\"></textarea> <br/>\n *      <pane>\n *        <pane-title><a ng-href=\"{{link}}\">{{title}}</a></pane-title>\n *        <pane-body><p>{{text}}</p></pane-body>\n *      </pane>\n *    </div>\n *   </file>\n *   <file name=\"app.js\">\n *    angular.module('multiSlotTranscludeExample', [])\n *     .directive('pane', function(){\n *        return {\n *          restrict: 'E',\n *          transclude: {\n *            'title': '?paneTitle',\n *            'body': 'paneBody',\n *            'footer': '?paneFooter'\n *          },\n *          template: '<div style=\"border: 1px solid black;\">' +\n *                      '<div class=\"title\" ng-transclude=\"title\">Fallback Title</div>' +\n *                      '<div ng-transclude=\"body\"></div>' +\n *                      '<div class=\"footer\" ng-transclude=\"footer\">Fallback Footer</div>' +\n *                    '</div>'\n *        };\n *    })\n *    .controller('ExampleController', ['$scope', function($scope) {\n *      $scope.title = 'Lorem Ipsum';\n *      $scope.link = \"https://google.com\";\n *      $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';\n *    }]);\n *   </file>\n *   <file name=\"protractor.js\" type=\"protractor\">\n *      it('should have transcluded the title and the body', function() {\n *        var titleElement = element(by.model('title'));\n *        titleElement.clear();\n *        titleElement.sendKeys('TITLE');\n *        var textElement = element(by.model('text'));\n *        textElement.clear();\n *        textElement.sendKeys('TEXT');\n *        expect(element(by.css('.title')).getText()).toEqual('TITLE');\n *        expect(element(by.binding('text')).getText()).toEqual('TEXT');\n *        expect(element(by.css('.footer')).getText()).toEqual('Fallback Footer');\n *      });\n *   </file>\n * </example>\n */\nvar ngTranscludeMinErr = minErr('ngTransclude');\nvar ngTranscludeDirective = ngDirective({\n  restrict: 'EAC',\n  link: function($scope, $element, $attrs, controller, $transclude) {\n\n    if ($attrs.ngTransclude === $attrs.$attr.ngTransclude) {\n      // If the attribute is of the form: `ng-transclude=\"ng-transclude\"`\n      // then treat it like the default\n      $attrs.ngTransclude = '';\n    }\n\n    function ngTranscludeCloneAttachFn(clone) {\n      if (clone.length) {\n        $element.empty();\n        $element.append(clone);\n      }\n    }\n\n    if (!$transclude) {\n      throw ngTranscludeMinErr('orphan',\n       'Illegal use of ngTransclude directive in the template! ' +\n       'No parent directive that requires a transclusion found. ' +\n       'Element: {0}',\n       startingTag($element));\n    }\n\n    // If there is no slot name defined or the slot name is not optional\n    // then transclude the slot\n    var slotName = $attrs.ngTransclude || $attrs.ngTranscludeSlot;\n    $transclude(ngTranscludeCloneAttachFn, null, slotName);\n  }\n});\n\n/**\n * @ngdoc directive\n * @name script\n * @restrict E\n *\n * @description\n * Load the content of a `<script>` element into {@link ng.$templateCache `$templateCache`}, so that the\n * template can be used by {@link ng.directive:ngInclude `ngInclude`},\n * {@link ngRoute.directive:ngView `ngView`}, or {@link guide/directive directives}. The type of the\n * `<script>` element must be specified as `text/ng-template`, and a cache name for the template must be\n * assigned through the element's `id`, which can then be used as a directive's `templateUrl`.\n *\n * @param {string} type Must be set to `'text/ng-template'`.\n * @param {string} id Cache name of the template.\n *\n * @example\n  <example>\n    <file name=\"index.html\">\n      <script type=\"text/ng-template\" id=\"/tpl.html\">\n        Content of the template.\n      </script>\n\n      <a ng-click=\"currentTpl='/tpl.html'\" id=\"tpl-link\">Load inlined template</a>\n      <div id=\"tpl-content\" ng-include src=\"currentTpl\"></div>\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      it('should load template defined inside script tag', function() {\n        element(by.css('#tpl-link')).click();\n        expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);\n      });\n    </file>\n  </example>\n */\nvar scriptDirective = ['$templateCache', function($templateCache) {\n  return {\n    restrict: 'E',\n    terminal: true,\n    compile: function(element, attr) {\n      if (attr.type == 'text/ng-template') {\n        var templateUrl = attr.id,\n            text = element[0].text;\n\n        $templateCache.put(templateUrl, text);\n      }\n    }\n  };\n}];\n\nvar noopNgModelController = { $setViewValue: noop, $render: noop };\n\nfunction chromeHack(optionElement) {\n  // Workaround for https://code.google.com/p/chromium/issues/detail?id=381459\n  // Adding an <option selected=\"selected\"> element to a <select required=\"required\"> should\n  // automatically select the new element\n  if (optionElement[0].hasAttribute('selected')) {\n    optionElement[0].selected = true;\n  }\n}\n\n/**\n * @ngdoc type\n * @name  select.SelectController\n * @description\n * The controller for the `<select>` directive. This provides support for reading\n * and writing the selected value(s) of the control and also coordinates dynamically\n * added `<option>` elements, perhaps by an `ngRepeat` directive.\n */\nvar SelectController =\n        ['$element', '$scope', function($element, $scope) {\n\n  var self = this,\n      optionsMap = new HashMap();\n\n  // If the ngModel doesn't get provided then provide a dummy noop version to prevent errors\n  self.ngModelCtrl = noopNgModelController;\n\n  // The \"unknown\" option is one that is prepended to the list if the viewValue\n  // does not match any of the options. When it is rendered the value of the unknown\n  // option is '? XXX ?' where XXX is the hashKey of the value that is not known.\n  //\n  // We can't just jqLite('<option>') since jqLite is not smart enough\n  // to create it in <select> and IE barfs otherwise.\n  self.unknownOption = jqLite(document.createElement('option'));\n  self.renderUnknownOption = function(val) {\n    var unknownVal = '? ' + hashKey(val) + ' ?';\n    self.unknownOption.val(unknownVal);\n    $element.prepend(self.unknownOption);\n    $element.val(unknownVal);\n  };\n\n  $scope.$on('$destroy', function() {\n    // disable unknown option so that we don't do work when the whole select is being destroyed\n    self.renderUnknownOption = noop;\n  });\n\n  self.removeUnknownOption = function() {\n    if (self.unknownOption.parent()) self.unknownOption.remove();\n  };\n\n\n  // Read the value of the select control, the implementation of this changes depending\n  // upon whether the select can have multiple values and whether ngOptions is at work.\n  self.readValue = function readSingleValue() {\n    self.removeUnknownOption();\n    return $element.val();\n  };\n\n\n  // Write the value to the select control, the implementation of this changes depending\n  // upon whether the select can have multiple values and whether ngOptions is at work.\n  self.writeValue = function writeSingleValue(value) {\n    if (self.hasOption(value)) {\n      self.removeUnknownOption();\n      $element.val(value);\n      if (value === '') self.emptyOption.prop('selected', true); // to make IE9 happy\n    } else {\n      if (value == null && self.emptyOption) {\n        self.removeUnknownOption();\n        $element.val('');\n      } else {\n        self.renderUnknownOption(value);\n      }\n    }\n  };\n\n\n  // Tell the select control that an option, with the given value, has been added\n  self.addOption = function(value, element) {\n    // Skip comment nodes, as they only pollute the `optionsMap`\n    if (element[0].nodeType === NODE_TYPE_COMMENT) return;\n\n    assertNotHasOwnProperty(value, '\"option value\"');\n    if (value === '') {\n      self.emptyOption = element;\n    }\n    var count = optionsMap.get(value) || 0;\n    optionsMap.put(value, count + 1);\n    self.ngModelCtrl.$render();\n    chromeHack(element);\n  };\n\n  // Tell the select control that an option, with the given value, has been removed\n  self.removeOption = function(value) {\n    var count = optionsMap.get(value);\n    if (count) {\n      if (count === 1) {\n        optionsMap.remove(value);\n        if (value === '') {\n          self.emptyOption = undefined;\n        }\n      } else {\n        optionsMap.put(value, count - 1);\n      }\n    }\n  };\n\n  // Check whether the select control has an option matching the given value\n  self.hasOption = function(value) {\n    return !!optionsMap.get(value);\n  };\n\n\n  self.registerOption = function(optionScope, optionElement, optionAttrs, interpolateValueFn, interpolateTextFn) {\n\n    if (interpolateValueFn) {\n      // The value attribute is interpolated\n      var oldVal;\n      optionAttrs.$observe('value', function valueAttributeObserveAction(newVal) {\n        if (isDefined(oldVal)) {\n          self.removeOption(oldVal);\n        }\n        oldVal = newVal;\n        self.addOption(newVal, optionElement);\n      });\n    } else if (interpolateTextFn) {\n      // The text content is interpolated\n      optionScope.$watch(interpolateTextFn, function interpolateWatchAction(newVal, oldVal) {\n        optionAttrs.$set('value', newVal);\n        if (oldVal !== newVal) {\n          self.removeOption(oldVal);\n        }\n        self.addOption(newVal, optionElement);\n      });\n    } else {\n      // The value attribute is static\n      self.addOption(optionAttrs.value, optionElement);\n    }\n\n    optionElement.on('$destroy', function() {\n      self.removeOption(optionAttrs.value);\n      self.ngModelCtrl.$render();\n    });\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name select\n * @restrict E\n *\n * @description\n * HTML `SELECT` element with angular data-binding.\n *\n * The `select` directive is used together with {@link ngModel `ngModel`} to provide data-binding\n * between the scope and the `<select>` control (including setting default values).\n * It also handles dynamic `<option>` elements, which can be added using the {@link ngRepeat `ngRepeat}` or\n * {@link ngOptions `ngOptions`} directives.\n *\n * When an item in the `<select>` menu is selected, the value of the selected option will be bound\n * to the model identified by the `ngModel` directive. With static or repeated options, this is\n * the content of the `value` attribute or the textContent of the `<option>`, if the value attribute is missing.\n * If you want dynamic value attributes, you can use interpolation inside the value attribute.\n *\n * <div class=\"alert alert-warning\">\n * Note that the value of a `select` directive used without `ngOptions` is always a string.\n * When the model needs to be bound to a non-string value, you must either explicitly convert it\n * using a directive (see example below) or use `ngOptions` to specify the set of options.\n * This is because an option element can only be bound to string values at present.\n * </div>\n *\n * If the viewValue of `ngModel` does not match any of the options, then the control\n * will automatically add an \"unknown\" option, which it then removes when the mismatch is resolved.\n *\n * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can\n * be nested into the `<select>` element. This element will then represent the `null` or \"not selected\"\n * option. See example below for demonstration.\n *\n * <div class=\"alert alert-info\">\n * In many cases, `ngRepeat` can be used on `<option>` elements instead of {@link ng.directive:ngOptions\n * ngOptions} to achieve a similar result. However, `ngOptions` provides some benefits, such as\n * more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the\n * comprehension expression, and additionally in reducing memory and increasing speed by not creating\n * a new scope for each repeated instance.\n * </div>\n *\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} multiple Allows multiple options to be selected. The selected values will be\n *     bound to the model as an array.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds required attribute and required validation constraint to\n * the element when the ngRequired expression evaluates to true. Use ngRequired instead of required\n * when you want to data-bind to the required attribute.\n * @param {string=} ngChange Angular expression to be executed when selected option(s) changes due to user\n *    interaction with the select element.\n * @param {string=} ngOptions sets the options that the select is populated with and defines what is\n * set on the model on selection. See {@link ngOptions `ngOptions`}.\n *\n * @example\n * ### Simple `select` elements with static options\n *\n * <example name=\"static-select\" module=\"staticSelect\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n *   <form name=\"myForm\">\n *     <label for=\"singleSelect\"> Single select: </label><br>\n *     <select name=\"singleSelect\" ng-model=\"data.singleSelect\">\n *       <option value=\"option-1\">Option 1</option>\n *       <option value=\"option-2\">Option 2</option>\n *     </select><br>\n *\n *     <label for=\"singleSelect\"> Single select with \"not selected\" option and dynamic option values: </label><br>\n *     <select name=\"singleSelect\" id=\"singleSelect\" ng-model=\"data.singleSelect\">\n *       <option value=\"\">---Please select---</option> <!-- not selected / blank option -->\n *       <option value=\"{{data.option1}}\">Option 1</option> <!-- interpolation -->\n *       <option value=\"option-2\">Option 2</option>\n *     </select><br>\n *     <button ng-click=\"forceUnknownOption()\">Force unknown option</button><br>\n *     <tt>singleSelect = {{data.singleSelect}}</tt>\n *\n *     <hr>\n *     <label for=\"multipleSelect\"> Multiple select: </label><br>\n *     <select name=\"multipleSelect\" id=\"multipleSelect\" ng-model=\"data.multipleSelect\" multiple>\n *       <option value=\"option-1\">Option 1</option>\n *       <option value=\"option-2\">Option 2</option>\n *       <option value=\"option-3\">Option 3</option>\n *     </select><br>\n *     <tt>multipleSelect = {{data.multipleSelect}}</tt><br/>\n *   </form>\n * </div>\n * </file>\n * <file name=\"app.js\">\n *  angular.module('staticSelect', [])\n *    .controller('ExampleController', ['$scope', function($scope) {\n *      $scope.data = {\n *       singleSelect: null,\n *       multipleSelect: [],\n *       option1: 'option-1',\n *      };\n *\n *      $scope.forceUnknownOption = function() {\n *        $scope.data.singleSelect = 'nonsense';\n *      };\n *   }]);\n * </file>\n *</example>\n *\n * ### Using `ngRepeat` to generate `select` options\n * <example name=\"ngrepeat-select\" module=\"ngrepeatSelect\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n *   <form name=\"myForm\">\n *     <label for=\"repeatSelect\"> Repeat select: </label>\n *     <select name=\"repeatSelect\" id=\"repeatSelect\" ng-model=\"data.repeatSelect\">\n *       <option ng-repeat=\"option in data.availableOptions\" value=\"{{option.id}}\">{{option.name}}</option>\n *     </select>\n *   </form>\n *   <hr>\n *   <tt>repeatSelect = {{data.repeatSelect}}</tt><br/>\n * </div>\n * </file>\n * <file name=\"app.js\">\n *  angular.module('ngrepeatSelect', [])\n *    .controller('ExampleController', ['$scope', function($scope) {\n *      $scope.data = {\n *       repeatSelect: null,\n *       availableOptions: [\n *         {id: '1', name: 'Option A'},\n *         {id: '2', name: 'Option B'},\n *         {id: '3', name: 'Option C'}\n *       ],\n *      };\n *   }]);\n * </file>\n *</example>\n *\n *\n * ### Using `select` with `ngOptions` and setting a default value\n * See the {@link ngOptions ngOptions documentation} for more `ngOptions` usage examples.\n *\n * <example name=\"select-with-default-values\" module=\"defaultValueSelect\">\n * <file name=\"index.html\">\n * <div ng-controller=\"ExampleController\">\n *   <form name=\"myForm\">\n *     <label for=\"mySelect\">Make a choice:</label>\n *     <select name=\"mySelect\" id=\"mySelect\"\n *       ng-options=\"option.name for option in data.availableOptions track by option.id\"\n *       ng-model=\"data.selectedOption\"></select>\n *   </form>\n *   <hr>\n *   <tt>option = {{data.selectedOption}}</tt><br/>\n * </div>\n * </file>\n * <file name=\"app.js\">\n *  angular.module('defaultValueSelect', [])\n *    .controller('ExampleController', ['$scope', function($scope) {\n *      $scope.data = {\n *       availableOptions: [\n *         {id: '1', name: 'Option A'},\n *         {id: '2', name: 'Option B'},\n *         {id: '3', name: 'Option C'}\n *       ],\n *       selectedOption: {id: '3', name: 'Option C'} //This sets the default value of the select in the ui\n *       };\n *   }]);\n * </file>\n *</example>\n *\n *\n * ### Binding `select` to a non-string value via `ngModel` parsing / formatting\n *\n * <example name=\"select-with-non-string-options\" module=\"nonStringSelect\">\n *   <file name=\"index.html\">\n *     <select ng-model=\"model.id\" convert-to-number>\n *       <option value=\"0\">Zero</option>\n *       <option value=\"1\">One</option>\n *       <option value=\"2\">Two</option>\n *     </select>\n *     {{ model }}\n *   </file>\n *   <file name=\"app.js\">\n *     angular.module('nonStringSelect', [])\n *       .run(function($rootScope) {\n *         $rootScope.model = { id: 2 };\n *       })\n *       .directive('convertToNumber', function() {\n *         return {\n *           require: 'ngModel',\n *           link: function(scope, element, attrs, ngModel) {\n *             ngModel.$parsers.push(function(val) {\n *               return parseInt(val, 10);\n *             });\n *             ngModel.$formatters.push(function(val) {\n *               return '' + val;\n *             });\n *           }\n *         };\n *       });\n *   </file>\n *   <file name=\"protractor.js\" type=\"protractor\">\n *     it('should initialize to model', function() {\n *       var select = element(by.css('select'));\n *       expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two');\n *     });\n *   </file>\n * </example>\n *\n */\nvar selectDirective = function() {\n\n  return {\n    restrict: 'E',\n    require: ['select', '?ngModel'],\n    controller: SelectController,\n    priority: 1,\n    link: {\n      pre: selectPreLink,\n      post: selectPostLink\n    }\n  };\n\n  function selectPreLink(scope, element, attr, ctrls) {\n\n      // if ngModel is not defined, we don't need to do anything\n      var ngModelCtrl = ctrls[1];\n      if (!ngModelCtrl) return;\n\n      var selectCtrl = ctrls[0];\n\n      selectCtrl.ngModelCtrl = ngModelCtrl;\n\n      // When the selected item(s) changes we delegate getting the value of the select control\n      // to the `readValue` method, which can be changed if the select can have multiple\n      // selected values or if the options are being generated by `ngOptions`\n      element.on('change', function() {\n        scope.$apply(function() {\n          ngModelCtrl.$setViewValue(selectCtrl.readValue());\n        });\n      });\n\n      // If the select allows multiple values then we need to modify how we read and write\n      // values from and to the control; also what it means for the value to be empty and\n      // we have to add an extra watch since ngModel doesn't work well with arrays - it\n      // doesn't trigger rendering if only an item in the array changes.\n      if (attr.multiple) {\n\n        // Read value now needs to check each option to see if it is selected\n        selectCtrl.readValue = function readMultipleValue() {\n          var array = [];\n          forEach(element.find('option'), function(option) {\n            if (option.selected) {\n              array.push(option.value);\n            }\n          });\n          return array;\n        };\n\n        // Write value now needs to set the selected property of each matching option\n        selectCtrl.writeValue = function writeMultipleValue(value) {\n          var items = new HashMap(value);\n          forEach(element.find('option'), function(option) {\n            option.selected = isDefined(items.get(option.value));\n          });\n        };\n\n        // we have to do it on each watch since ngModel watches reference, but\n        // we need to work of an array, so we need to see if anything was inserted/removed\n        var lastView, lastViewRef = NaN;\n        scope.$watch(function selectMultipleWatch() {\n          if (lastViewRef === ngModelCtrl.$viewValue && !equals(lastView, ngModelCtrl.$viewValue)) {\n            lastView = shallowCopy(ngModelCtrl.$viewValue);\n            ngModelCtrl.$render();\n          }\n          lastViewRef = ngModelCtrl.$viewValue;\n        });\n\n        // If we are a multiple select then value is now a collection\n        // so the meaning of $isEmpty changes\n        ngModelCtrl.$isEmpty = function(value) {\n          return !value || value.length === 0;\n        };\n\n      }\n    }\n\n    function selectPostLink(scope, element, attrs, ctrls) {\n      // if ngModel is not defined, we don't need to do anything\n      var ngModelCtrl = ctrls[1];\n      if (!ngModelCtrl) return;\n\n      var selectCtrl = ctrls[0];\n\n      // We delegate rendering to the `writeValue` method, which can be changed\n      // if the select can have multiple selected values or if the options are being\n      // generated by `ngOptions`.\n      // This must be done in the postLink fn to prevent $render to be called before\n      // all nodes have been linked correctly.\n      ngModelCtrl.$render = function() {\n        selectCtrl.writeValue(ngModelCtrl.$viewValue);\n      };\n    }\n};\n\n\n// The option directive is purely designed to communicate the existence (or lack of)\n// of dynamically created (and destroyed) option elements to their containing select\n// directive via its controller.\nvar optionDirective = ['$interpolate', function($interpolate) {\n  return {\n    restrict: 'E',\n    priority: 100,\n    compile: function(element, attr) {\n      if (isDefined(attr.value)) {\n        // If the value attribute is defined, check if it contains an interpolation\n        var interpolateValueFn = $interpolate(attr.value, true);\n      } else {\n        // If the value attribute is not defined then we fall back to the\n        // text content of the option element, which may be interpolated\n        var interpolateTextFn = $interpolate(element.text(), true);\n        if (!interpolateTextFn) {\n          attr.$set('value', element.text());\n        }\n      }\n\n      return function(scope, element, attr) {\n        // This is an optimization over using ^^ since we don't want to have to search\n        // all the way to the root of the DOM for every single option element\n        var selectCtrlName = '$selectController',\n            parent = element.parent(),\n            selectCtrl = parent.data(selectCtrlName) ||\n              parent.parent().data(selectCtrlName); // in case we are in optgroup\n\n        if (selectCtrl) {\n          selectCtrl.registerOption(scope, element, attr, interpolateValueFn, interpolateTextFn);\n        }\n      };\n    }\n  };\n}];\n\nvar styleDirective = valueFn({\n  restrict: 'E',\n  terminal: false\n});\n\n/**\n * @ngdoc directive\n * @name ngRequired\n *\n * @description\n *\n * ngRequired adds the required {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for {@link input `input`} and {@link select `select`} controls, but can also be\n * applied to custom controls.\n *\n * The directive sets the `required` attribute on the element if the Angular expression inside\n * `ngRequired` evaluates to true. A special directive for setting `required` is necessary because we\n * cannot use interpolation inside `required`. See the {@link guide/interpolation interpolation guide}\n * for more info.\n *\n * The validator will set the `required` error key to true if the `required` attribute is set and\n * calling {@link ngModel.NgModelController#$isEmpty `NgModelController.$isEmpty`} with the\n * {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} returns `true`. For example, the\n * `$isEmpty()` implementation for `input[text]` checks the length of the `$viewValue`. When developing\n * custom controls, `$isEmpty()` can be overwritten to account for a $viewValue that is not string-based.\n *\n * @example\n * <example name=\"ngRequiredDirective\" module=\"ngRequiredExample\">\n *   <file name=\"index.html\">\n *     <script>\n *       angular.module('ngRequiredExample', [])\n *         .controller('ExampleController', ['$scope', function($scope) {\n *           $scope.required = true;\n *         }]);\n *     </script>\n *     <div ng-controller=\"ExampleController\">\n *       <form name=\"form\">\n *         <label for=\"required\">Toggle required: </label>\n *         <input type=\"checkbox\" ng-model=\"required\" id=\"required\" />\n *         <br>\n *         <label for=\"input\">This input must be filled if `required` is true: </label>\n *         <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-required=\"required\" /><br>\n *         <hr>\n *         required error set? = <code>{{form.input.$error.required}}</code><br>\n *         model = <code>{{model}}</code>\n *       </form>\n *     </div>\n *   </file>\n *   <file name=\"protractor.js\" type=\"protractor\">\n       var required = element(by.binding('form.input.$error.required'));\n       var model = element(by.binding('model'));\n       var input = element(by.id('input'));\n\n       it('should set the required error', function() {\n         expect(required.getText()).toContain('true');\n\n         input.sendKeys('123');\n         expect(required.getText()).not.toContain('true');\n         expect(model.getText()).toContain('123');\n       });\n *   </file>\n * </example>\n */\nvar requiredDirective = function() {\n  return {\n    restrict: 'A',\n    require: '?ngModel',\n    link: function(scope, elm, attr, ctrl) {\n      if (!ctrl) return;\n      attr.required = true; // force truthy in case we are on non input element\n\n      ctrl.$validators.required = function(modelValue, viewValue) {\n        return !attr.required || !ctrl.$isEmpty(viewValue);\n      };\n\n      attr.$observe('required', function() {\n        ctrl.$validate();\n      });\n    }\n  };\n};\n\n/**\n * @ngdoc directive\n * @name ngPattern\n *\n * @description\n *\n * ngPattern adds the pattern {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n *\n * The validator sets the `pattern` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n * does not match a RegExp which is obtained by evaluating the Angular expression given in the\n * `ngPattern` attribute value:\n * * If the expression evaluates to a RegExp object, then this is used directly.\n * * If the expression evaluates to a string, then it will be converted to a RegExp after wrapping it\n * in `^` and `$` characters. For instance, `\"abc\"` will be converted to `new RegExp('^abc$')`.\n *\n * <div class=\"alert alert-info\">\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * </div>\n *\n * <div class=\"alert alert-info\">\n * **Note:** This directive is also added when the plain `pattern` attribute is used, with two\n * differences:\n * <ol>\n *   <li>\n *     `ngPattern` does not set the `pattern` attribute and therefore HTML5 constraint validation is\n *     not available.\n *   </li>\n *   <li>\n *     The `ngPattern` attribute must be an expression, while the `pattern` value must be\n *     interpolated.\n *   </li>\n * </ol>\n * </div>\n *\n * @example\n * <example name=\"ngPatternDirective\" module=\"ngPatternExample\">\n *   <file name=\"index.html\">\n *     <script>\n *       angular.module('ngPatternExample', [])\n *         .controller('ExampleController', ['$scope', function($scope) {\n *           $scope.regex = '\\\\d+';\n *         }]);\n *     </script>\n *     <div ng-controller=\"ExampleController\">\n *       <form name=\"form\">\n *         <label for=\"regex\">Set a pattern (regex string): </label>\n *         <input type=\"text\" ng-model=\"regex\" id=\"regex\" />\n *         <br>\n *         <label for=\"input\">This input is restricted by the current pattern: </label>\n *         <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-pattern=\"regex\" /><br>\n *         <hr>\n *         input valid? = <code>{{form.input.$valid}}</code><br>\n *         model = <code>{{model}}</code>\n *       </form>\n *     </div>\n *   </file>\n *   <file name=\"protractor.js\" type=\"protractor\">\n       var model = element(by.binding('model'));\n       var input = element(by.id('input'));\n\n       it('should validate the input with the default pattern', function() {\n         input.sendKeys('aaa');\n         expect(model.getText()).not.toContain('aaa');\n\n         input.clear().then(function() {\n           input.sendKeys('123');\n           expect(model.getText()).toContain('123');\n         });\n       });\n *   </file>\n * </example>\n */\nvar patternDirective = function() {\n  return {\n    restrict: 'A',\n    require: '?ngModel',\n    link: function(scope, elm, attr, ctrl) {\n      if (!ctrl) return;\n\n      var regexp, patternExp = attr.ngPattern || attr.pattern;\n      attr.$observe('pattern', function(regex) {\n        if (isString(regex) && regex.length > 0) {\n          regex = new RegExp('^' + regex + '$');\n        }\n\n        if (regex && !regex.test) {\n          throw minErr('ngPattern')('noregexp',\n            'Expected {0} to be a RegExp but was {1}. Element: {2}', patternExp,\n            regex, startingTag(elm));\n        }\n\n        regexp = regex || undefined;\n        ctrl.$validate();\n      });\n\n      ctrl.$validators.pattern = function(modelValue, viewValue) {\n        // HTML5 pattern constraint validates the input value, so we validate the viewValue\n        return ctrl.$isEmpty(viewValue) || isUndefined(regexp) || regexp.test(viewValue);\n      };\n    }\n  };\n};\n\n/**\n * @ngdoc directive\n * @name ngMaxlength\n *\n * @description\n *\n * ngMaxlength adds the maxlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n *\n * The validator sets the `maxlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n * is longer than the integer obtained by evaluating the Angular expression given in the\n * `ngMaxlength` attribute value.\n *\n * <div class=\"alert alert-info\">\n * **Note:** This directive is also added when the plain `maxlength` attribute is used, with two\n * differences:\n * <ol>\n *   <li>\n *     `ngMaxlength` does not set the `maxlength` attribute and therefore HTML5 constraint\n *     validation is not available.\n *   </li>\n *   <li>\n *     The `ngMaxlength` attribute must be an expression, while the `maxlength` value must be\n *     interpolated.\n *   </li>\n * </ol>\n * </div>\n *\n * @example\n * <example name=\"ngMaxlengthDirective\" module=\"ngMaxlengthExample\">\n *   <file name=\"index.html\">\n *     <script>\n *       angular.module('ngMaxlengthExample', [])\n *         .controller('ExampleController', ['$scope', function($scope) {\n *           $scope.maxlength = 5;\n *         }]);\n *     </script>\n *     <div ng-controller=\"ExampleController\">\n *       <form name=\"form\">\n *         <label for=\"maxlength\">Set a maxlength: </label>\n *         <input type=\"number\" ng-model=\"maxlength\" id=\"maxlength\" />\n *         <br>\n *         <label for=\"input\">This input is restricted by the current maxlength: </label>\n *         <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-maxlength=\"maxlength\" /><br>\n *         <hr>\n *         input valid? = <code>{{form.input.$valid}}</code><br>\n *         model = <code>{{model}}</code>\n *       </form>\n *     </div>\n *   </file>\n *   <file name=\"protractor.js\" type=\"protractor\">\n       var model = element(by.binding('model'));\n       var input = element(by.id('input'));\n\n       it('should validate the input with the default maxlength', function() {\n         input.sendKeys('abcdef');\n         expect(model.getText()).not.toContain('abcdef');\n\n         input.clear().then(function() {\n           input.sendKeys('abcde');\n           expect(model.getText()).toContain('abcde');\n         });\n       });\n *   </file>\n * </example>\n */\nvar maxlengthDirective = function() {\n  return {\n    restrict: 'A',\n    require: '?ngModel',\n    link: function(scope, elm, attr, ctrl) {\n      if (!ctrl) return;\n\n      var maxlength = -1;\n      attr.$observe('maxlength', function(value) {\n        var intVal = toInt(value);\n        maxlength = isNaN(intVal) ? -1 : intVal;\n        ctrl.$validate();\n      });\n      ctrl.$validators.maxlength = function(modelValue, viewValue) {\n        return (maxlength < 0) || ctrl.$isEmpty(viewValue) || (viewValue.length <= maxlength);\n      };\n    }\n  };\n};\n\n/**\n * @ngdoc directive\n * @name ngMinlength\n *\n * @description\n *\n * ngMinlength adds the minlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n *\n * The validator sets the `minlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n * is shorter than the integer obtained by evaluating the Angular expression given in the\n * `ngMinlength` attribute value.\n *\n * <div class=\"alert alert-info\">\n * **Note:** This directive is also added when the plain `minlength` attribute is used, with two\n * differences:\n * <ol>\n *   <li>\n *     `ngMinlength` does not set the `minlength` attribute and therefore HTML5 constraint\n *     validation is not available.\n *   </li>\n *   <li>\n *     The `ngMinlength` value must be an expression, while the `minlength` value must be\n *     interpolated.\n *   </li>\n * </ol>\n * </div>\n *\n * @example\n * <example name=\"ngMinlengthDirective\" module=\"ngMinlengthExample\">\n *   <file name=\"index.html\">\n *     <script>\n *       angular.module('ngMinlengthExample', [])\n *         .controller('ExampleController', ['$scope', function($scope) {\n *           $scope.minlength = 3;\n *         }]);\n *     </script>\n *     <div ng-controller=\"ExampleController\">\n *       <form name=\"form\">\n *         <label for=\"minlength\">Set a minlength: </label>\n *         <input type=\"number\" ng-model=\"minlength\" id=\"minlength\" />\n *         <br>\n *         <label for=\"input\">This input is restricted by the current minlength: </label>\n *         <input type=\"text\" ng-model=\"model\" id=\"input\" name=\"input\" ng-minlength=\"minlength\" /><br>\n *         <hr>\n *         input valid? = <code>{{form.input.$valid}}</code><br>\n *         model = <code>{{model}}</code>\n *       </form>\n *     </div>\n *   </file>\n *   <file name=\"protractor.js\" type=\"protractor\">\n       var model = element(by.binding('model'));\n       var input = element(by.id('input'));\n\n       it('should validate the input with the default minlength', function() {\n         input.sendKeys('ab');\n         expect(model.getText()).not.toContain('ab');\n\n         input.sendKeys('abc');\n         expect(model.getText()).toContain('abc');\n       });\n *   </file>\n * </example>\n */\nvar minlengthDirective = function() {\n  return {\n    restrict: 'A',\n    require: '?ngModel',\n    link: function(scope, elm, attr, ctrl) {\n      if (!ctrl) return;\n\n      var minlength = 0;\n      attr.$observe('minlength', function(value) {\n        minlength = toInt(value) || 0;\n        ctrl.$validate();\n      });\n      ctrl.$validators.minlength = function(modelValue, viewValue) {\n        return ctrl.$isEmpty(viewValue) || viewValue.length >= minlength;\n      };\n    }\n  };\n};\n\nif (window.angular.bootstrap) {\n  //AngularJS is already loaded, so we can return here...\n  if (window.console) {\n    console.log('WARNING: Tried to load angular more than once.');\n  }\n  return;\n}\n\n//try to bind to jquery now so that one can write jqLite(document).ready()\n//but we will rebind on bootstrap again.\nbindJQuery();\n\npublishExternalAPI(angular);\n\nangular.module(\"ngLocale\", [], [\"$provide\", function($provide) {\nvar PLURAL_CATEGORY = {ZERO: \"zero\", ONE: \"one\", TWO: \"two\", FEW: \"few\", MANY: \"many\", OTHER: \"other\"};\nfunction getDecimals(n) {\n  n = n + '';\n  var i = n.indexOf('.');\n  return (i == -1) ? 0 : n.length - i - 1;\n}\n\nfunction getVF(n, opt_precision) {\n  var v = opt_precision;\n\n  if (undefined === v) {\n    v = Math.min(getDecimals(n), 3);\n  }\n\n  var base = Math.pow(10, v);\n  var f = ((n * base) | 0) % base;\n  return {v: v, f: f};\n}\n\n$provide.value(\"$locale\", {\n  \"DATETIME_FORMATS\": {\n    \"AMPMS\": [\n      \"AM\",\n      \"PM\"\n    ],\n    \"DAY\": [\n      \"Sunday\",\n      \"Monday\",\n      \"Tuesday\",\n      \"Wednesday\",\n      \"Thursday\",\n      \"Friday\",\n      \"Saturday\"\n    ],\n    \"ERANAMES\": [\n      \"Before Christ\",\n      \"Anno Domini\"\n    ],\n    \"ERAS\": [\n      \"BC\",\n      \"AD\"\n    ],\n    \"FIRSTDAYOFWEEK\": 6,\n    \"MONTH\": [\n      \"January\",\n      \"February\",\n      \"March\",\n      \"April\",\n      \"May\",\n      \"June\",\n      \"July\",\n      \"August\",\n      \"September\",\n      \"October\",\n      \"November\",\n      \"December\"\n    ],\n    \"SHORTDAY\": [\n      \"Sun\",\n      \"Mon\",\n      \"Tue\",\n      \"Wed\",\n      \"Thu\",\n      \"Fri\",\n      \"Sat\"\n    ],\n    \"SHORTMONTH\": [\n      \"Jan\",\n      \"Feb\",\n      \"Mar\",\n      \"Apr\",\n      \"May\",\n      \"Jun\",\n      \"Jul\",\n      \"Aug\",\n      \"Sep\",\n      \"Oct\",\n      \"Nov\",\n      \"Dec\"\n    ],\n    \"STANDALONEMONTH\": [\n      \"January\",\n      \"February\",\n      \"March\",\n      \"April\",\n      \"May\",\n      \"June\",\n      \"July\",\n      \"August\",\n      \"September\",\n      \"October\",\n      \"November\",\n      \"December\"\n    ],\n    \"WEEKENDRANGE\": [\n      5,\n      6\n    ],\n    \"fullDate\": \"EEEE, MMMM d, y\",\n    \"longDate\": \"MMMM d, y\",\n    \"medium\": \"MMM d, y h:mm:ss a\",\n    \"mediumDate\": \"MMM d, y\",\n    \"mediumTime\": \"h:mm:ss a\",\n    \"short\": \"M/d/yy h:mm a\",\n    \"shortDate\": \"M/d/yy\",\n    \"shortTime\": \"h:mm a\"\n  },\n  \"NUMBER_FORMATS\": {\n    \"CURRENCY_SYM\": \"$\",\n    \"DECIMAL_SEP\": \".\",\n    \"GROUP_SEP\": \",\",\n    \"PATTERNS\": [\n      {\n        \"gSize\": 3,\n        \"lgSize\": 3,\n        \"maxFrac\": 3,\n        \"minFrac\": 0,\n        \"minInt\": 1,\n        \"negPre\": \"-\",\n        \"negSuf\": \"\",\n        \"posPre\": \"\",\n        \"posSuf\": \"\"\n      },\n      {\n        \"gSize\": 3,\n        \"lgSize\": 3,\n        \"maxFrac\": 2,\n        \"minFrac\": 2,\n        \"minInt\": 1,\n        \"negPre\": \"-\\u00a4\",\n        \"negSuf\": \"\",\n        \"posPre\": \"\\u00a4\",\n        \"posSuf\": \"\"\n      }\n    ]\n  },\n  \"id\": \"en-us\",\n  \"localeID\": \"en_US\",\n  \"pluralCat\": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (i == 1 && vf.v == 0) {    return PLURAL_CATEGORY.ONE;  }  return PLURAL_CATEGORY.OTHER;}\n});\n}]);\n\n  jqLite(document).ready(function() {\n    angularInit(document, bootstrap);\n  });\n\n})(window, document);\n\n!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style type=\"text/css\">@charset \"UTF-8\";[ng\\\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>');\n/*!\n * ionic.bundle.js is a concatenation of:\n * ionic.js, angular.js, angular-animate.js,\n * angular-sanitize.js, angular-ui-router.js,\n * and ionic-angular.js\n */\n\n/**\n * @license AngularJS v1.5.3\n * (c) 2010-2016 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\n/* jshint ignore:start */\nvar noop        = angular.noop;\nvar copy        = angular.copy;\nvar extend      = angular.extend;\nvar jqLite      = angular.element;\nvar forEach     = angular.forEach;\nvar isArray     = angular.isArray;\nvar isString    = angular.isString;\nvar isObject    = angular.isObject;\nvar isUndefined = angular.isUndefined;\nvar isDefined   = angular.isDefined;\nvar isFunction  = angular.isFunction;\nvar isElement   = angular.isElement;\n\nvar ELEMENT_NODE = 1;\nvar COMMENT_NODE = 8;\n\nvar ADD_CLASS_SUFFIX = '-add';\nvar REMOVE_CLASS_SUFFIX = '-remove';\nvar EVENT_CLASS_PREFIX = 'ng-';\nvar ACTIVE_CLASS_SUFFIX = '-active';\nvar PREPARE_CLASS_SUFFIX = '-prepare';\n\nvar NG_ANIMATE_CLASSNAME = 'ng-animate';\nvar NG_ANIMATE_CHILDREN_DATA = '$$ngAnimateChildren';\n\n// Detect proper transitionend/animationend event names.\nvar CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;\n\n// If unprefixed events are not supported but webkit-prefixed are, use the latter.\n// Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.\n// Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`\n// but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.\n// Register both events in case `window.onanimationend` is not supported because of that,\n// do the same for `transitionend` as Safari is likely to exhibit similar behavior.\n// Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit\n// therefore there is no reason to test anymore for other vendor prefixes:\n// http://caniuse.com/#search=transition\nif (isUndefined(window.ontransitionend) && isDefined(window.onwebkittransitionend)) {\n  CSS_PREFIX = '-webkit-';\n  TRANSITION_PROP = 'WebkitTransition';\n  TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';\n} else {\n  TRANSITION_PROP = 'transition';\n  TRANSITIONEND_EVENT = 'transitionend';\n}\n\nif (isUndefined(window.onanimationend) && isDefined(window.onwebkitanimationend)) {\n  CSS_PREFIX = '-webkit-';\n  ANIMATION_PROP = 'WebkitAnimation';\n  ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';\n} else {\n  ANIMATION_PROP = 'animation';\n  ANIMATIONEND_EVENT = 'animationend';\n}\n\nvar DURATION_KEY = 'Duration';\nvar PROPERTY_KEY = 'Property';\nvar DELAY_KEY = 'Delay';\nvar TIMING_KEY = 'TimingFunction';\nvar ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';\nvar ANIMATION_PLAYSTATE_KEY = 'PlayState';\nvar SAFE_FAST_FORWARD_DURATION_VALUE = 9999;\n\nvar ANIMATION_DELAY_PROP = ANIMATION_PROP + DELAY_KEY;\nvar ANIMATION_DURATION_PROP = ANIMATION_PROP + DURATION_KEY;\nvar TRANSITION_DELAY_PROP = TRANSITION_PROP + DELAY_KEY;\nvar TRANSITION_DURATION_PROP = TRANSITION_PROP + DURATION_KEY;\n\nvar isPromiseLike = function(p) {\n  return p && p.then ? true : false;\n};\n\nvar ngMinErr = angular.$$minErr('ng');\nfunction assertArg(arg, name, reason) {\n  if (!arg) {\n    throw ngMinErr('areq', \"Argument '{0}' is {1}\", (name || '?'), (reason || \"required\"));\n  }\n  return arg;\n}\n\nfunction mergeClasses(a,b) {\n  if (!a && !b) return '';\n  if (!a) return b;\n  if (!b) return a;\n  if (isArray(a)) a = a.join(' ');\n  if (isArray(b)) b = b.join(' ');\n  return a + ' ' + b;\n}\n\nfunction packageStyles(options) {\n  var styles = {};\n  if (options && (options.to || options.from)) {\n    styles.to = options.to;\n    styles.from = options.from;\n  }\n  return styles;\n}\n\nfunction pendClasses(classes, fix, isPrefix) {\n  var className = '';\n  classes = isArray(classes)\n      ? classes\n      : classes && isString(classes) && classes.length\n          ? classes.split(/\\s+/)\n          : [];\n  forEach(classes, function(klass, i) {\n    if (klass && klass.length > 0) {\n      className += (i > 0) ? ' ' : '';\n      className += isPrefix ? fix + klass\n                            : klass + fix;\n    }\n  });\n  return className;\n}\n\nfunction removeFromArray(arr, val) {\n  var index = arr.indexOf(val);\n  if (val >= 0) {\n    arr.splice(index, 1);\n  }\n}\n\nfunction stripCommentsFromElement(element) {\n  if (element instanceof jqLite) {\n    switch (element.length) {\n      case 0:\n        return [];\n        break;\n\n      case 1:\n        // there is no point of stripping anything if the element\n        // is the only element within the jqLite wrapper.\n        // (it's important that we retain the element instance.)\n        if (element[0].nodeType === ELEMENT_NODE) {\n          return element;\n        }\n        break;\n\n      default:\n        return jqLite(extractElementNode(element));\n        break;\n    }\n  }\n\n  if (element.nodeType === ELEMENT_NODE) {\n    return jqLite(element);\n  }\n}\n\nfunction extractElementNode(element) {\n  if (!element[0]) return element;\n  for (var i = 0; i < element.length; i++) {\n    var elm = element[i];\n    if (elm.nodeType == ELEMENT_NODE) {\n      return elm;\n    }\n  }\n}\n\nfunction $$addClass($$jqLite, element, className) {\n  forEach(element, function(elm) {\n    $$jqLite.addClass(elm, className);\n  });\n}\n\nfunction $$removeClass($$jqLite, element, className) {\n  forEach(element, function(elm) {\n    $$jqLite.removeClass(elm, className);\n  });\n}\n\nfunction applyAnimationClassesFactory($$jqLite) {\n  return function(element, options) {\n    if (options.addClass) {\n      $$addClass($$jqLite, element, options.addClass);\n      options.addClass = null;\n    }\n    if (options.removeClass) {\n      $$removeClass($$jqLite, element, options.removeClass);\n      options.removeClass = null;\n    }\n  }\n}\n\nfunction prepareAnimationOptions(options) {\n  options = options || {};\n  if (!options.$$prepared) {\n    var domOperation = options.domOperation || noop;\n    options.domOperation = function() {\n      options.$$domOperationFired = true;\n      domOperation();\n      domOperation = noop;\n    };\n    options.$$prepared = true;\n  }\n  return options;\n}\n\nfunction applyAnimationStyles(element, options) {\n  applyAnimationFromStyles(element, options);\n  applyAnimationToStyles(element, options);\n}\n\nfunction applyAnimationFromStyles(element, options) {\n  if (options.from) {\n    element.css(options.from);\n    options.from = null;\n  }\n}\n\nfunction applyAnimationToStyles(element, options) {\n  if (options.to) {\n    element.css(options.to);\n    options.to = null;\n  }\n}\n\nfunction mergeAnimationDetails(element, oldAnimation, newAnimation) {\n  var target = oldAnimation.options || {};\n  var newOptions = newAnimation.options || {};\n\n  var toAdd = (target.addClass || '') + ' ' + (newOptions.addClass || '');\n  var toRemove = (target.removeClass || '') + ' ' + (newOptions.removeClass || '');\n  var classes = resolveElementClasses(element.attr('class'), toAdd, toRemove);\n\n  if (newOptions.preparationClasses) {\n    target.preparationClasses = concatWithSpace(newOptions.preparationClasses, target.preparationClasses);\n    delete newOptions.preparationClasses;\n  }\n\n  // noop is basically when there is no callback; otherwise something has been set\n  var realDomOperation = target.domOperation !== noop ? target.domOperation : null;\n\n  extend(target, newOptions);\n\n  // TODO(matsko or sreeramu): proper fix is to maintain all animation callback in array and call at last,but now only leave has the callback so no issue with this.\n  if (realDomOperation) {\n    target.domOperation = realDomOperation;\n  }\n\n  if (classes.addClass) {\n    target.addClass = classes.addClass;\n  } else {\n    target.addClass = null;\n  }\n\n  if (classes.removeClass) {\n    target.removeClass = classes.removeClass;\n  } else {\n    target.removeClass = null;\n  }\n\n  oldAnimation.addClass = target.addClass;\n  oldAnimation.removeClass = target.removeClass;\n\n  return target;\n}\n\nfunction resolveElementClasses(existing, toAdd, toRemove) {\n  var ADD_CLASS = 1;\n  var REMOVE_CLASS = -1;\n\n  var flags = {};\n  existing = splitClassesToLookup(existing);\n\n  toAdd = splitClassesToLookup(toAdd);\n  forEach(toAdd, function(value, key) {\n    flags[key] = ADD_CLASS;\n  });\n\n  toRemove = splitClassesToLookup(toRemove);\n  forEach(toRemove, function(value, key) {\n    flags[key] = flags[key] === ADD_CLASS ? null : REMOVE_CLASS;\n  });\n\n  var classes = {\n    addClass: '',\n    removeClass: ''\n  };\n\n  forEach(flags, function(val, klass) {\n    var prop, allow;\n    if (val === ADD_CLASS) {\n      prop = 'addClass';\n      allow = !existing[klass];\n    } else if (val === REMOVE_CLASS) {\n      prop = 'removeClass';\n      allow = existing[klass];\n    }\n    if (allow) {\n      if (classes[prop].length) {\n        classes[prop] += ' ';\n      }\n      classes[prop] += klass;\n    }\n  });\n\n  function splitClassesToLookup(classes) {\n    if (isString(classes)) {\n      classes = classes.split(' ');\n    }\n\n    var obj = {};\n    forEach(classes, function(klass) {\n      // sometimes the split leaves empty string values\n      // incase extra spaces were applied to the options\n      if (klass.length) {\n        obj[klass] = true;\n      }\n    });\n    return obj;\n  }\n\n  return classes;\n}\n\nfunction getDomNode(element) {\n  return (element instanceof angular.element) ? element[0] : element;\n}\n\nfunction applyGeneratedPreparationClasses(element, event, options) {\n  var classes = '';\n  if (event) {\n    classes = pendClasses(event, EVENT_CLASS_PREFIX, true);\n  }\n  if (options.addClass) {\n    classes = concatWithSpace(classes, pendClasses(options.addClass, ADD_CLASS_SUFFIX));\n  }\n  if (options.removeClass) {\n    classes = concatWithSpace(classes, pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX));\n  }\n  if (classes.length) {\n    options.preparationClasses = classes;\n    element.addClass(classes);\n  }\n}\n\nfunction clearGeneratedClasses(element, options) {\n  if (options.preparationClasses) {\n    element.removeClass(options.preparationClasses);\n    options.preparationClasses = null;\n  }\n  if (options.activeClasses) {\n    element.removeClass(options.activeClasses);\n    options.activeClasses = null;\n  }\n}\n\nfunction blockTransitions(node, duration) {\n  // we use a negative delay value since it performs blocking\n  // yet it doesn't kill any existing transitions running on the\n  // same element which makes this safe for class-based animations\n  var value = duration ? '-' + duration + 's' : '';\n  applyInlineStyle(node, [TRANSITION_DELAY_PROP, value]);\n  return [TRANSITION_DELAY_PROP, value];\n}\n\nfunction blockKeyframeAnimations(node, applyBlock) {\n  var value = applyBlock ? 'paused' : '';\n  var key = ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY;\n  applyInlineStyle(node, [key, value]);\n  return [key, value];\n}\n\nfunction applyInlineStyle(node, styleTuple) {\n  var prop = styleTuple[0];\n  var value = styleTuple[1];\n  node.style[prop] = value;\n}\n\nfunction concatWithSpace(a,b) {\n  if (!a) return b;\n  if (!b) return a;\n  return a + ' ' + b;\n}\n\nvar $$rAFSchedulerFactory = ['$$rAF', function($$rAF) {\n  var queue, cancelFn;\n\n  function scheduler(tasks) {\n    // we make a copy since RAFScheduler mutates the state\n    // of the passed in array variable and this would be difficult\n    // to track down on the outside code\n    queue = queue.concat(tasks);\n    nextTick();\n  }\n\n  queue = scheduler.queue = [];\n\n  /* waitUntilQuiet does two things:\n   * 1. It will run the FINAL `fn` value only when an uncanceled RAF has passed through\n   * 2. It will delay the next wave of tasks from running until the quiet `fn` has run.\n   *\n   * The motivation here is that animation code can request more time from the scheduler\n   * before the next wave runs. This allows for certain DOM properties such as classes to\n   * be resolved in time for the next animation to run.\n   */\n  scheduler.waitUntilQuiet = function(fn) {\n    if (cancelFn) cancelFn();\n\n    cancelFn = $$rAF(function() {\n      cancelFn = null;\n      fn();\n      nextTick();\n    });\n  };\n\n  return scheduler;\n\n  function nextTick() {\n    if (!queue.length) return;\n\n    var items = queue.shift();\n    for (var i = 0; i < items.length; i++) {\n      items[i]();\n    }\n\n    if (!cancelFn) {\n      $$rAF(function() {\n        if (!cancelFn) nextTick();\n      });\n    }\n  }\n}];\n\n/**\n * @ngdoc directive\n * @name ngAnimateChildren\n * @restrict AE\n * @element ANY\n *\n * @description\n *\n * ngAnimateChildren allows you to specify that children of this element should animate even if any\n * of the children's parents are currently animating. By default, when an element has an active `enter`, `leave`, or `move`\n * (structural) animation, child elements that also have an active structural animation are not animated.\n *\n * Note that even if `ngAnimteChildren` is set, no child animations will run when the parent element is removed from the DOM (`leave` animation).\n *\n *\n * @param {string} ngAnimateChildren If the value is empty, `true` or `on`,\n *     then child animations are allowed. If the value is `false`, child animations are not allowed.\n *\n * @example\n * <example module=\"ngAnimateChildren\" name=\"ngAnimateChildren\" deps=\"angular-animate.js\" animations=\"true\">\n     <file name=\"index.html\">\n       <div ng-controller=\"mainController as main\">\n         <label>Show container? <input type=\"checkbox\" ng-model=\"main.enterElement\" /></label>\n         <label>Animate children? <input type=\"checkbox\" ng-model=\"main.animateChildren\" /></label>\n         <hr>\n         <div ng-animate-children=\"{{main.animateChildren}}\">\n           <div ng-if=\"main.enterElement\" class=\"container\">\n             List of items:\n             <div ng-repeat=\"item in [0, 1, 2, 3]\" class=\"item\">Item {{item}}</div>\n           </div>\n         </div>\n       </div>\n     </file>\n     <file name=\"animations.css\">\n\n      .container.ng-enter,\n      .container.ng-leave {\n        transition: all ease 1.5s;\n      }\n\n      .container.ng-enter,\n      .container.ng-leave-active {\n        opacity: 0;\n      }\n\n      .container.ng-leave,\n      .container.ng-enter-active {\n        opacity: 1;\n      }\n\n      .item {\n        background: firebrick;\n        color: #FFF;\n        margin-bottom: 10px;\n      }\n\n      .item.ng-enter,\n      .item.ng-leave {\n        transition: transform 1.5s ease;\n      }\n\n      .item.ng-enter {\n        transform: translateX(50px);\n      }\n\n      .item.ng-enter-active {\n        transform: translateX(0);\n      }\n    </file>\n    <file name=\"script.js\">\n      angular.module('ngAnimateChildren', ['ngAnimate'])\n        .controller('mainController', function() {\n          this.animateChildren = false;\n          this.enterElement = false;\n        });\n    </file>\n  </example>\n */\nvar $$AnimateChildrenDirective = ['$interpolate', function($interpolate) {\n  return {\n    link: function(scope, element, attrs) {\n      var val = attrs.ngAnimateChildren;\n      if (angular.isString(val) && val.length === 0) { //empty attribute\n        element.data(NG_ANIMATE_CHILDREN_DATA, true);\n      } else {\n        // Interpolate and set the value, so that it is available to\n        // animations that run right after compilation\n        setData($interpolate(val)(scope));\n        attrs.$observe('ngAnimateChildren', setData);\n      }\n\n      function setData(value) {\n        value = value === 'on' || value === 'true';\n        element.data(NG_ANIMATE_CHILDREN_DATA, value);\n      }\n    }\n  };\n}];\n\nvar ANIMATE_TIMER_KEY = '$$animateCss';\n\n/**\n * @ngdoc service\n * @name $animateCss\n * @kind object\n *\n * @description\n * The `$animateCss` service is a useful utility to trigger customized CSS-based transitions/keyframes\n * from a JavaScript-based animation or directly from a directive. The purpose of `$animateCss` is NOT\n * to side-step how `$animate` and ngAnimate work, but the goal is to allow pre-existing animations or\n * directives to create more complex animations that can be purely driven using CSS code.\n *\n * Note that only browsers that support CSS transitions and/or keyframe animations are capable of\n * rendering animations triggered via `$animateCss` (bad news for IE9 and lower).\n *\n * ## Usage\n * Once again, `$animateCss` is designed to be used inside of a registered JavaScript animation that\n * is powered by ngAnimate. It is possible to use `$animateCss` directly inside of a directive, however,\n * any automatic control over cancelling animations and/or preventing animations from being run on\n * child elements will not be handled by Angular. For this to work as expected, please use `$animate` to\n * trigger the animation and then setup a JavaScript animation that injects `$animateCss` to trigger\n * the CSS animation.\n *\n * The example below shows how we can create a folding animation on an element using `ng-if`:\n *\n * ```html\n * <!-- notice the `fold-animation` CSS class -->\n * <div ng-if=\"onOff\" class=\"fold-animation\">\n *   This element will go BOOM\n * </div>\n * <button ng-click=\"onOff=true\">Fold In</button>\n * ```\n *\n * Now we create the **JavaScript animation** that will trigger the CSS transition:\n *\n * ```js\n * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) {\n *   return {\n *     enter: function(element, doneFn) {\n *       var height = element[0].offsetHeight;\n *       return $animateCss(element, {\n *         from: { height:'0px' },\n *         to: { height:height + 'px' },\n *         duration: 1 // one second\n *       });\n *     }\n *   }\n * }]);\n * ```\n *\n * ## More Advanced Uses\n *\n * `$animateCss` is the underlying code that ngAnimate uses to power **CSS-based animations** behind the scenes. Therefore CSS hooks\n * like `.ng-EVENT`, `.ng-EVENT-active`, `.ng-EVENT-stagger` are all features that can be triggered using `$animateCss` via JavaScript code.\n *\n * This also means that just about any combination of adding classes, removing classes, setting styles, dynamically setting a keyframe animation,\n * applying a hardcoded duration or delay value, changing the animation easing or applying a stagger animation are all options that work with\n * `$animateCss`. The service itself is smart enough to figure out the combination of options and examine the element styling properties in order\n * to provide a working animation that will run in CSS.\n *\n * The example below showcases a more advanced version of the `.fold-animation` from the example above:\n *\n * ```js\n * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) {\n *   return {\n *     enter: function(element, doneFn) {\n *       var height = element[0].offsetHeight;\n *       return $animateCss(element, {\n *         addClass: 'red large-text pulse-twice',\n *         easing: 'ease-out',\n *         from: { height:'0px' },\n *         to: { height:height + 'px' },\n *         duration: 1 // one second\n *       });\n *     }\n *   }\n * }]);\n * ```\n *\n * Since we're adding/removing CSS classes then the CSS transition will also pick those up:\n *\n * ```css\n * /&#42; since a hardcoded duration value of 1 was provided in the JavaScript animation code,\n * the CSS classes below will be transitioned despite them being defined as regular CSS classes &#42;/\n * .red { background:red; }\n * .large-text { font-size:20px; }\n *\n * /&#42; we can also use a keyframe animation and $animateCss will make it work alongside the transition &#42;/\n * .pulse-twice {\n *   animation: 0.5s pulse linear 2;\n *   -webkit-animation: 0.5s pulse linear 2;\n * }\n *\n * @keyframes pulse {\n *   from { transform: scale(0.5); }\n *   to { transform: scale(1.5); }\n * }\n *\n * @-webkit-keyframes pulse {\n *   from { -webkit-transform: scale(0.5); }\n *   to { -webkit-transform: scale(1.5); }\n * }\n * ```\n *\n * Given this complex combination of CSS classes, styles and options, `$animateCss` will figure everything out and make the animation happen.\n *\n * ## How the Options are handled\n *\n * `$animateCss` is very versatile and intelligent when it comes to figuring out what configurations to apply to the element to ensure the animation\n * works with the options provided. Say for example we were adding a class that contained a keyframe value and we wanted to also animate some inline\n * styles using the `from` and `to` properties.\n *\n * ```js\n * var animator = $animateCss(element, {\n *   from: { background:'red' },\n *   to: { background:'blue' }\n * });\n * animator.start();\n * ```\n *\n * ```css\n * .rotating-animation {\n *   animation:0.5s rotate linear;\n *   -webkit-animation:0.5s rotate linear;\n * }\n *\n * @keyframes rotate {\n *   from { transform: rotate(0deg); }\n *   to { transform: rotate(360deg); }\n * }\n *\n * @-webkit-keyframes rotate {\n *   from { -webkit-transform: rotate(0deg); }\n *   to { -webkit-transform: rotate(360deg); }\n * }\n * ```\n *\n * The missing pieces here are that we do not have a transition set (within the CSS code nor within the `$animateCss` options) and the duration of the animation is\n * going to be detected from what the keyframe styles on the CSS class are. In this event, `$animateCss` will automatically create an inline transition\n * style matching the duration detected from the keyframe style (which is present in the CSS class that is being added) and then prepare both the transition\n * and keyframe animations to run in parallel on the element. Then when the animation is underway the provided `from` and `to` CSS styles will be applied\n * and spread across the transition and keyframe animation.\n *\n * ## What is returned\n *\n * `$animateCss` works in two stages: a preparation phase and an animation phase. Therefore when `$animateCss` is first called it will NOT actually\n * start the animation. All that is going on here is that the element is being prepared for the animation (which means that the generated CSS classes are\n * added and removed on the element). Once `$animateCss` is called it will return an object with the following properties:\n *\n * ```js\n * var animator = $animateCss(element, { ... });\n * ```\n *\n * Now what do the contents of our `animator` variable look like:\n *\n * ```js\n * {\n *   // starts the animation\n *   start: Function,\n *\n *   // ends (aborts) the animation\n *   end: Function\n * }\n * ```\n *\n * To actually start the animation we need to run `animation.start()` which will then return a promise that we can hook into to detect when the animation ends.\n * If we choose not to run the animation then we MUST run `animation.end()` to perform a cleanup on the element (since some CSS classes and styles may have been\n * applied to the element during the preparation phase). Note that all other properties such as duration, delay, transitions and keyframes are just properties\n * and that changing them will not reconfigure the parameters of the animation.\n *\n * ### runner.done() vs runner.then()\n * It is documented that `animation.start()` will return a promise object and this is true, however, there is also an additional method available on the\n * runner called `.done(callbackFn)`. The done method works the same as `.finally(callbackFn)`, however, it does **not trigger a digest to occur**.\n * Therefore, for performance reasons, it's always best to use `runner.done(callback)` instead of `runner.then()`, `runner.catch()` or `runner.finally()`\n * unless you really need a digest to kick off afterwards.\n *\n * Keep in mind that, to make this easier, ngAnimate has tweaked the JS animations API to recognize when a runner instance is returned from $animateCss\n * (so there is no need to call `runner.done(doneFn)` inside of your JavaScript animation code).\n * Check the {@link ngAnimate.$animateCss#usage animation code above} to see how this works.\n *\n * @param {DOMElement} element the element that will be animated\n * @param {object} options the animation-related options that will be applied during the animation\n *\n * * `event` - The DOM event (e.g. enter, leave, move). When used, a generated CSS class of `ng-EVENT` and `ng-EVENT-active` will be applied\n * to the element during the animation. Multiple events can be provided when spaces are used as a separator. (Note that this will not perform any DOM operation.)\n * * `structural` - Indicates that the `ng-` prefix will be added to the event class. Setting to `false` or omitting will turn `ng-EVENT` and\n * `ng-EVENT-active` in `EVENT` and `EVENT-active`. Unused if `event` is omitted.\n * * `easing` - The CSS easing value that will be applied to the transition or keyframe animation (or both).\n * * `transitionStyle` - The raw CSS transition style that will be used (e.g. `1s linear all`).\n * * `keyframeStyle` - The raw CSS keyframe animation style that will be used (e.g. `1s my_animation linear`).\n * * `from` - The starting CSS styles (a key/value object) that will be applied at the start of the animation.\n * * `to` - The ending CSS styles (a key/value object) that will be applied across the animation via a CSS transition.\n * * `addClass` - A space separated list of CSS classes that will be added to the element and spread across the animation.\n * * `removeClass` - A space separated list of CSS classes that will be removed from the element and spread across the animation.\n * * `duration` - A number value representing the total duration of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `0`\n * is provided then the animation will be skipped entirely.\n * * `delay` - A number value representing the total delay of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `true` is\n * used then whatever delay value is detected from the CSS classes will be mirrored on the elements styles (e.g. by setting delay true then the style value\n * of the element will be `transition-delay: DETECTED_VALUE`). Using `true` is useful when you want the CSS classes and inline styles to all share the same\n * CSS delay value.\n * * `stagger` - A numeric time value representing the delay between successively animated elements\n * ({@link ngAnimate#css-staggering-animations Click here to learn how CSS-based staggering works in ngAnimate.})\n * * `staggerIndex` - The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item in the stagger; therefore when a\n *   `stagger` option value of `0.1` is used then there will be a stagger delay of `600ms`)\n * * `applyClassesEarly` - Whether or not the classes being added or removed will be used when detecting the animation. This is set by `$animate` when enter/leave/move animations are fired to ensure that the CSS classes are resolved in time. (Note that this will prevent any transitions from occurring on the classes being added and removed.)\n * * `cleanupStyles` - Whether or not the provided `from` and `to` styles will be removed once\n *    the animation is closed. This is useful for when the styles are used purely for the sake of\n *    the animation and do not have a lasting visual effect on the element (e.g. a collapse and open animation).\n *    By default this value is set to `false`.\n *\n * @return {object} an object with start and end methods and details about the animation.\n *\n * * `start` - The method to start the animation. This will return a `Promise` when called.\n * * `end` - This method will cancel the animation and remove all applied CSS classes and styles.\n */\nvar ONE_SECOND = 1000;\nvar BASE_TEN = 10;\n\nvar ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;\nvar CLOSING_TIME_BUFFER = 1.5;\n\nvar DETECT_CSS_PROPERTIES = {\n  transitionDuration:      TRANSITION_DURATION_PROP,\n  transitionDelay:         TRANSITION_DELAY_PROP,\n  transitionProperty:      TRANSITION_PROP + PROPERTY_KEY,\n  animationDuration:       ANIMATION_DURATION_PROP,\n  animationDelay:          ANIMATION_DELAY_PROP,\n  animationIterationCount: ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY\n};\n\nvar DETECT_STAGGER_CSS_PROPERTIES = {\n  transitionDuration:      TRANSITION_DURATION_PROP,\n  transitionDelay:         TRANSITION_DELAY_PROP,\n  animationDuration:       ANIMATION_DURATION_PROP,\n  animationDelay:          ANIMATION_DELAY_PROP\n};\n\nfunction getCssKeyframeDurationStyle(duration) {\n  return [ANIMATION_DURATION_PROP, duration + 's'];\n}\n\nfunction getCssDelayStyle(delay, isKeyframeAnimation) {\n  var prop = isKeyframeAnimation ? ANIMATION_DELAY_PROP : TRANSITION_DELAY_PROP;\n  return [prop, delay + 's'];\n}\n\nfunction computeCssStyles($window, element, properties) {\n  var styles = Object.create(null);\n  var detectedStyles = $window.getComputedStyle(element) || {};\n  forEach(properties, function(formalStyleName, actualStyleName) {\n    var val = detectedStyles[formalStyleName];\n    if (val) {\n      var c = val.charAt(0);\n\n      // only numerical-based values have a negative sign or digit as the first value\n      if (c === '-' || c === '+' || c >= 0) {\n        val = parseMaxTime(val);\n      }\n\n      // by setting this to null in the event that the delay is not set or is set directly as 0\n      // then we can still allow for negative values to be used later on and not mistake this\n      // value for being greater than any other negative value.\n      if (val === 0) {\n        val = null;\n      }\n      styles[actualStyleName] = val;\n    }\n  });\n\n  return styles;\n}\n\nfunction parseMaxTime(str) {\n  var maxValue = 0;\n  var values = str.split(/\\s*,\\s*/);\n  forEach(values, function(value) {\n    // it's always safe to consider only second values and omit `ms` values since\n    // getComputedStyle will always handle the conversion for us\n    if (value.charAt(value.length - 1) == 's') {\n      value = value.substring(0, value.length - 1);\n    }\n    value = parseFloat(value) || 0;\n    maxValue = maxValue ? Math.max(value, maxValue) : value;\n  });\n  return maxValue;\n}\n\nfunction truthyTimingValue(val) {\n  return val === 0 || val != null;\n}\n\nfunction getCssTransitionDurationStyle(duration, applyOnlyDuration) {\n  var style = TRANSITION_PROP;\n  var value = duration + 's';\n  if (applyOnlyDuration) {\n    style += DURATION_KEY;\n  } else {\n    value += ' linear all';\n  }\n  return [style, value];\n}\n\nfunction createLocalCacheLookup() {\n  var cache = Object.create(null);\n  return {\n    flush: function() {\n      cache = Object.create(null);\n    },\n\n    count: function(key) {\n      var entry = cache[key];\n      return entry ? entry.total : 0;\n    },\n\n    get: function(key) {\n      var entry = cache[key];\n      return entry && entry.value;\n    },\n\n    put: function(key, value) {\n      if (!cache[key]) {\n        cache[key] = { total: 1, value: value };\n      } else {\n        cache[key].total++;\n      }\n    }\n  };\n}\n\n// we do not reassign an already present style value since\n// if we detect the style property value again we may be\n// detecting styles that were added via the `from` styles.\n// We make use of `isDefined` here since an empty string\n// or null value (which is what getPropertyValue will return\n// for a non-existing style) will still be marked as a valid\n// value for the style (a falsy value implies that the style\n// is to be removed at the end of the animation). If we had a simple\n// \"OR\" statement then it would not be enough to catch that.\nfunction registerRestorableStyles(backup, node, properties) {\n  forEach(properties, function(prop) {\n    backup[prop] = isDefined(backup[prop])\n        ? backup[prop]\n        : node.style.getPropertyValue(prop);\n  });\n}\n\nvar $AnimateCssProvider = ['$animateProvider', function($animateProvider) {\n  var gcsLookup = createLocalCacheLookup();\n  var gcsStaggerLookup = createLocalCacheLookup();\n\n  this.$get = ['$window', '$$jqLite', '$$AnimateRunner', '$timeout',\n               '$$forceReflow', '$sniffer', '$$rAFScheduler', '$$animateQueue',\n       function($window,   $$jqLite,   $$AnimateRunner,   $timeout,\n                $$forceReflow,   $sniffer,   $$rAFScheduler, $$animateQueue) {\n\n    var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);\n\n    var parentCounter = 0;\n    function gcsHashFn(node, extraClasses) {\n      var KEY = \"$$ngAnimateParentKey\";\n      var parentNode = node.parentNode;\n      var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter);\n      return parentID + '-' + node.getAttribute('class') + '-' + extraClasses;\n    }\n\n    function computeCachedCssStyles(node, className, cacheKey, properties) {\n      var timings = gcsLookup.get(cacheKey);\n\n      if (!timings) {\n        timings = computeCssStyles($window, node, properties);\n        if (timings.animationIterationCount === 'infinite') {\n          timings.animationIterationCount = 1;\n        }\n      }\n\n      // we keep putting this in multiple times even though the value and the cacheKey are the same\n      // because we're keeping an internal tally of how many duplicate animations are detected.\n      gcsLookup.put(cacheKey, timings);\n      return timings;\n    }\n\n    function computeCachedCssStaggerStyles(node, className, cacheKey, properties) {\n      var stagger;\n\n      // if we have one or more existing matches of matching elements\n      // containing the same parent + CSS styles (which is how cacheKey works)\n      // then staggering is possible\n      if (gcsLookup.count(cacheKey) > 0) {\n        stagger = gcsStaggerLookup.get(cacheKey);\n\n        if (!stagger) {\n          var staggerClassName = pendClasses(className, '-stagger');\n\n          $$jqLite.addClass(node, staggerClassName);\n\n          stagger = computeCssStyles($window, node, properties);\n\n          // force the conversion of a null value to zero incase not set\n          stagger.animationDuration = Math.max(stagger.animationDuration, 0);\n          stagger.transitionDuration = Math.max(stagger.transitionDuration, 0);\n\n          $$jqLite.removeClass(node, staggerClassName);\n\n          gcsStaggerLookup.put(cacheKey, stagger);\n        }\n      }\n\n      return stagger || {};\n    }\n\n    var cancelLastRAFRequest;\n    var rafWaitQueue = [];\n    function waitUntilQuiet(callback) {\n      rafWaitQueue.push(callback);\n      $$rAFScheduler.waitUntilQuiet(function() {\n        gcsLookup.flush();\n        gcsStaggerLookup.flush();\n\n        // DO NOT REMOVE THIS LINE OR REFACTOR OUT THE `pageWidth` variable.\n        // PLEASE EXAMINE THE `$$forceReflow` service to understand why.\n        var pageWidth = $$forceReflow();\n\n        // we use a for loop to ensure that if the queue is changed\n        // during this looping then it will consider new requests\n        for (var i = 0; i < rafWaitQueue.length; i++) {\n          rafWaitQueue[i](pageWidth);\n        }\n        rafWaitQueue.length = 0;\n      });\n    }\n\n    function computeTimings(node, className, cacheKey) {\n      var timings = computeCachedCssStyles(node, className, cacheKey, DETECT_CSS_PROPERTIES);\n      var aD = timings.animationDelay;\n      var tD = timings.transitionDelay;\n      timings.maxDelay = aD && tD\n          ? Math.max(aD, tD)\n          : (aD || tD);\n      timings.maxDuration = Math.max(\n          timings.animationDuration * timings.animationIterationCount,\n          timings.transitionDuration);\n\n      return timings;\n    }\n\n    return function init(element, initialOptions) {\n      // all of the animation functions should create\n      // a copy of the options data, however, if a\n      // parent service has already created a copy then\n      // we should stick to using that\n      var options = initialOptions || {};\n      if (!options.$$prepared) {\n        options = prepareAnimationOptions(copy(options));\n      }\n\n      var restoreStyles = {};\n      var node = getDomNode(element);\n      if (!node\n          || !node.parentNode\n          || !$$animateQueue.enabled()) {\n        return closeAndReturnNoopAnimator();\n      }\n\n      var temporaryStyles = [];\n      var classes = element.attr('class');\n      var styles = packageStyles(options);\n      var animationClosed;\n      var animationPaused;\n      var animationCompleted;\n      var runner;\n      var runnerHost;\n      var maxDelay;\n      var maxDelayTime;\n      var maxDuration;\n      var maxDurationTime;\n      var startTime;\n      var events = [];\n\n      if (options.duration === 0 || (!$sniffer.animations && !$sniffer.transitions)) {\n        return closeAndReturnNoopAnimator();\n      }\n\n      var method = options.event && isArray(options.event)\n            ? options.event.join(' ')\n            : options.event;\n\n      var isStructural = method && options.structural;\n      var structuralClassName = '';\n      var addRemoveClassName = '';\n\n      if (isStructural) {\n        structuralClassName = pendClasses(method, EVENT_CLASS_PREFIX, true);\n      } else if (method) {\n        structuralClassName = method;\n      }\n\n      if (options.addClass) {\n        addRemoveClassName += pendClasses(options.addClass, ADD_CLASS_SUFFIX);\n      }\n\n      if (options.removeClass) {\n        if (addRemoveClassName.length) {\n          addRemoveClassName += ' ';\n        }\n        addRemoveClassName += pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX);\n      }\n\n      // there may be a situation where a structural animation is combined together\n      // with CSS classes that need to resolve before the animation is computed.\n      // However this means that there is no explicit CSS code to block the animation\n      // from happening (by setting 0s none in the class name). If this is the case\n      // we need to apply the classes before the first rAF so we know to continue if\n      // there actually is a detected transition or keyframe animation\n      if (options.applyClassesEarly && addRemoveClassName.length) {\n        applyAnimationClasses(element, options);\n      }\n\n      var preparationClasses = [structuralClassName, addRemoveClassName].join(' ').trim();\n      var fullClassName = classes + ' ' + preparationClasses;\n      var activeClasses = pendClasses(preparationClasses, ACTIVE_CLASS_SUFFIX);\n      var hasToStyles = styles.to && Object.keys(styles.to).length > 0;\n      var containsKeyframeAnimation = (options.keyframeStyle || '').length > 0;\n\n      // there is no way we can trigger an animation if no styles and\n      // no classes are being applied which would then trigger a transition,\n      // unless there a is raw keyframe value that is applied to the element.\n      if (!containsKeyframeAnimation\n           && !hasToStyles\n           && !preparationClasses) {\n        return closeAndReturnNoopAnimator();\n      }\n\n      var cacheKey, stagger;\n      if (options.stagger > 0) {\n        var staggerVal = parseFloat(options.stagger);\n        stagger = {\n          transitionDelay: staggerVal,\n          animationDelay: staggerVal,\n          transitionDuration: 0,\n          animationDuration: 0\n        };\n      } else {\n        cacheKey = gcsHashFn(node, fullClassName);\n        stagger = computeCachedCssStaggerStyles(node, preparationClasses, cacheKey, DETECT_STAGGER_CSS_PROPERTIES);\n      }\n\n      if (!options.$$skipPreparationClasses) {\n        $$jqLite.addClass(element, preparationClasses);\n      }\n\n      var applyOnlyDuration;\n\n      if (options.transitionStyle) {\n        var transitionStyle = [TRANSITION_PROP, options.transitionStyle];\n        applyInlineStyle(node, transitionStyle);\n        temporaryStyles.push(transitionStyle);\n      }\n\n      if (options.duration >= 0) {\n        applyOnlyDuration = node.style[TRANSITION_PROP].length > 0;\n        var durationStyle = getCssTransitionDurationStyle(options.duration, applyOnlyDuration);\n\n        // we set the duration so that it will be picked up by getComputedStyle later\n        applyInlineStyle(node, durationStyle);\n        temporaryStyles.push(durationStyle);\n      }\n\n      if (options.keyframeStyle) {\n        var keyframeStyle = [ANIMATION_PROP, options.keyframeStyle];\n        applyInlineStyle(node, keyframeStyle);\n        temporaryStyles.push(keyframeStyle);\n      }\n\n      var itemIndex = stagger\n          ? options.staggerIndex >= 0\n              ? options.staggerIndex\n              : gcsLookup.count(cacheKey)\n          : 0;\n\n      var isFirst = itemIndex === 0;\n\n      // this is a pre-emptive way of forcing the setup classes to be added and applied INSTANTLY\n      // without causing any combination of transitions to kick in. By adding a negative delay value\n      // it forces the setup class' transition to end immediately. We later then remove the negative\n      // transition delay to allow for the transition to naturally do it's thing. The beauty here is\n      // that if there is no transition defined then nothing will happen and this will also allow\n      // other transitions to be stacked on top of each other without any chopping them out.\n      if (isFirst && !options.skipBlocking) {\n        blockTransitions(node, SAFE_FAST_FORWARD_DURATION_VALUE);\n      }\n\n      var timings = computeTimings(node, fullClassName, cacheKey);\n      var relativeDelay = timings.maxDelay;\n      maxDelay = Math.max(relativeDelay, 0);\n      maxDuration = timings.maxDuration;\n\n      var flags = {};\n      flags.hasTransitions          = timings.transitionDuration > 0;\n      flags.hasAnimations           = timings.animationDuration > 0;\n      flags.hasTransitionAll        = flags.hasTransitions && timings.transitionProperty == 'all';\n      flags.applyTransitionDuration = hasToStyles && (\n                                        (flags.hasTransitions && !flags.hasTransitionAll)\n                                         || (flags.hasAnimations && !flags.hasTransitions));\n      flags.applyAnimationDuration  = options.duration && flags.hasAnimations;\n      flags.applyTransitionDelay    = truthyTimingValue(options.delay) && (flags.applyTransitionDuration || flags.hasTransitions);\n      flags.applyAnimationDelay     = truthyTimingValue(options.delay) && flags.hasAnimations;\n      flags.recalculateTimingStyles = addRemoveClassName.length > 0;\n\n      if (flags.applyTransitionDuration || flags.applyAnimationDuration) {\n        maxDuration = options.duration ? parseFloat(options.duration) : maxDuration;\n\n        if (flags.applyTransitionDuration) {\n          flags.hasTransitions = true;\n          timings.transitionDuration = maxDuration;\n          applyOnlyDuration = node.style[TRANSITION_PROP + PROPERTY_KEY].length > 0;\n          temporaryStyles.push(getCssTransitionDurationStyle(maxDuration, applyOnlyDuration));\n        }\n\n        if (flags.applyAnimationDuration) {\n          flags.hasAnimations = true;\n          timings.animationDuration = maxDuration;\n          temporaryStyles.push(getCssKeyframeDurationStyle(maxDuration));\n        }\n      }\n\n      if (maxDuration === 0 && !flags.recalculateTimingStyles) {\n        return closeAndReturnNoopAnimator();\n      }\n\n      if (options.delay != null) {\n        var delayStyle;\n        if (typeof options.delay !== \"boolean\") {\n          delayStyle = parseFloat(options.delay);\n          // number in options.delay means we have to recalculate the delay for the closing timeout\n          maxDelay = Math.max(delayStyle, 0);\n        }\n\n        if (flags.applyTransitionDelay) {\n          temporaryStyles.push(getCssDelayStyle(delayStyle));\n        }\n\n        if (flags.applyAnimationDelay) {\n          temporaryStyles.push(getCssDelayStyle(delayStyle, true));\n        }\n      }\n\n      // we need to recalculate the delay value since we used a pre-emptive negative\n      // delay value and the delay value is required for the final event checking. This\n      // property will ensure that this will happen after the RAF phase has passed.\n      if (options.duration == null && timings.transitionDuration > 0) {\n        flags.recalculateTimingStyles = flags.recalculateTimingStyles || isFirst;\n      }\n\n      maxDelayTime = maxDelay * ONE_SECOND;\n      maxDurationTime = maxDuration * ONE_SECOND;\n      if (!options.skipBlocking) {\n        flags.blockTransition = timings.transitionDuration > 0;\n        flags.blockKeyframeAnimation = timings.animationDuration > 0 &&\n                                       stagger.animationDelay > 0 &&\n                                       stagger.animationDuration === 0;\n      }\n\n      if (options.from) {\n        if (options.cleanupStyles) {\n          registerRestorableStyles(restoreStyles, node, Object.keys(options.from));\n        }\n        applyAnimationFromStyles(element, options);\n      }\n\n      if (flags.blockTransition || flags.blockKeyframeAnimation) {\n        applyBlocking(maxDuration);\n      } else if (!options.skipBlocking) {\n        blockTransitions(node, false);\n      }\n\n      // TODO(matsko): for 1.5 change this code to have an animator object for better debugging\n      return {\n        $$willAnimate: true,\n        end: endFn,\n        start: function() {\n          if (animationClosed) return;\n\n          runnerHost = {\n            end: endFn,\n            cancel: cancelFn,\n            resume: null, //this will be set during the start() phase\n            pause: null\n          };\n\n          runner = new $$AnimateRunner(runnerHost);\n\n          waitUntilQuiet(start);\n\n          // we don't have access to pause/resume the animation\n          // since it hasn't run yet. AnimateRunner will therefore\n          // set noop functions for resume and pause and they will\n          // later be overridden once the animation is triggered\n          return runner;\n        }\n      };\n\n      function endFn() {\n        close();\n      }\n\n      function cancelFn() {\n        close(true);\n      }\n\n      function close(rejected) { // jshint ignore:line\n        // if the promise has been called already then we shouldn't close\n        // the animation again\n        if (animationClosed || (animationCompleted && animationPaused)) return;\n        animationClosed = true;\n        animationPaused = false;\n\n        if (!options.$$skipPreparationClasses) {\n          $$jqLite.removeClass(element, preparationClasses);\n        }\n        $$jqLite.removeClass(element, activeClasses);\n\n        blockKeyframeAnimations(node, false);\n        blockTransitions(node, false);\n\n        forEach(temporaryStyles, function(entry) {\n          // There is only one way to remove inline style properties entirely from elements.\n          // By using `removeProperty` this works, but we need to convert camel-cased CSS\n          // styles down to hyphenated values.\n          node.style[entry[0]] = '';\n        });\n\n        applyAnimationClasses(element, options);\n        applyAnimationStyles(element, options);\n\n        if (Object.keys(restoreStyles).length) {\n          forEach(restoreStyles, function(value, prop) {\n            value ? node.style.setProperty(prop, value)\n                  : node.style.removeProperty(prop);\n          });\n        }\n\n        // the reason why we have this option is to allow a synchronous closing callback\n        // that is fired as SOON as the animation ends (when the CSS is removed) or if\n        // the animation never takes off at all. A good example is a leave animation since\n        // the element must be removed just after the animation is over or else the element\n        // will appear on screen for one animation frame causing an overbearing flicker.\n        if (options.onDone) {\n          options.onDone();\n        }\n\n        if (events && events.length) {\n          // Remove the transitionend / animationend listener(s)\n          element.off(events.join(' '), onAnimationProgress);\n        }\n\n        //Cancel the fallback closing timeout and remove the timer data\n        var animationTimerData = element.data(ANIMATE_TIMER_KEY);\n        if (animationTimerData) {\n          $timeout.cancel(animationTimerData[0].timer);\n          element.removeData(ANIMATE_TIMER_KEY);\n        }\n\n        // if the preparation function fails then the promise is not setup\n        if (runner) {\n          runner.complete(!rejected);\n        }\n      }\n\n      function applyBlocking(duration) {\n        if (flags.blockTransition) {\n          blockTransitions(node, duration);\n        }\n\n        if (flags.blockKeyframeAnimation) {\n          blockKeyframeAnimations(node, !!duration);\n        }\n      }\n\n      function closeAndReturnNoopAnimator() {\n        runner = new $$AnimateRunner({\n          end: endFn,\n          cancel: cancelFn\n        });\n\n        // should flush the cache animation\n        waitUntilQuiet(noop);\n        close();\n\n        return {\n          $$willAnimate: false,\n          start: function() {\n            return runner;\n          },\n          end: endFn\n        };\n      }\n\n      function onAnimationProgress(event) {\n        event.stopPropagation();\n        var ev = event.originalEvent || event;\n\n        // we now always use `Date.now()` due to the recent changes with\n        // event.timeStamp in Firefox, Webkit and Chrome (see #13494 for more info)\n        var timeStamp = ev.$manualTimeStamp || Date.now();\n\n        /* Firefox (or possibly just Gecko) likes to not round values up\n         * when a ms measurement is used for the animation */\n        var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));\n\n        /* $manualTimeStamp is a mocked timeStamp value which is set\n         * within browserTrigger(). This is only here so that tests can\n         * mock animations properly. Real events fallback to event.timeStamp,\n         * or, if they don't, then a timeStamp is automatically created for them.\n         * We're checking to see if the timeStamp surpasses the expected delay,\n         * but we're using elapsedTime instead of the timeStamp on the 2nd\n         * pre-condition since animationPauseds sometimes close off early */\n        if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) {\n          // we set this flag to ensure that if the transition is paused then, when resumed,\n          // the animation will automatically close itself since transitions cannot be paused.\n          animationCompleted = true;\n          close();\n        }\n      }\n\n      function start() {\n        if (animationClosed) return;\n        if (!node.parentNode) {\n          close();\n          return;\n        }\n\n        // even though we only pause keyframe animations here the pause flag\n        // will still happen when transitions are used. Only the transition will\n        // not be paused since that is not possible. If the animation ends when\n        // paused then it will not complete until unpaused or cancelled.\n        var playPause = function(playAnimation) {\n          if (!animationCompleted) {\n            animationPaused = !playAnimation;\n            if (timings.animationDuration) {\n              var value = blockKeyframeAnimations(node, animationPaused);\n              animationPaused\n                  ? temporaryStyles.push(value)\n                  : removeFromArray(temporaryStyles, value);\n            }\n          } else if (animationPaused && playAnimation) {\n            animationPaused = false;\n            close();\n          }\n        };\n\n        // checking the stagger duration prevents an accidentally cascade of the CSS delay style\n        // being inherited from the parent. If the transition duration is zero then we can safely\n        // rely that the delay value is an intentional stagger delay style.\n        var maxStagger = itemIndex > 0\n                         && ((timings.transitionDuration && stagger.transitionDuration === 0) ||\n                            (timings.animationDuration && stagger.animationDuration === 0))\n                         && Math.max(stagger.animationDelay, stagger.transitionDelay);\n        if (maxStagger) {\n          $timeout(triggerAnimationStart,\n                   Math.floor(maxStagger * itemIndex * ONE_SECOND),\n                   false);\n        } else {\n          triggerAnimationStart();\n        }\n\n        // this will decorate the existing promise runner with pause/resume methods\n        runnerHost.resume = function() {\n          playPause(true);\n        };\n\n        runnerHost.pause = function() {\n          playPause(false);\n        };\n\n        function triggerAnimationStart() {\n          // just incase a stagger animation kicks in when the animation\n          // itself was cancelled entirely\n          if (animationClosed) return;\n\n          applyBlocking(false);\n\n          forEach(temporaryStyles, function(entry) {\n            var key = entry[0];\n            var value = entry[1];\n            node.style[key] = value;\n          });\n\n          applyAnimationClasses(element, options);\n          $$jqLite.addClass(element, activeClasses);\n\n          if (flags.recalculateTimingStyles) {\n            fullClassName = node.className + ' ' + preparationClasses;\n            cacheKey = gcsHashFn(node, fullClassName);\n\n            timings = computeTimings(node, fullClassName, cacheKey);\n            relativeDelay = timings.maxDelay;\n            maxDelay = Math.max(relativeDelay, 0);\n            maxDuration = timings.maxDuration;\n\n            if (maxDuration === 0) {\n              close();\n              return;\n            }\n\n            flags.hasTransitions = timings.transitionDuration > 0;\n            flags.hasAnimations = timings.animationDuration > 0;\n          }\n\n          if (flags.applyAnimationDelay) {\n            relativeDelay = typeof options.delay !== \"boolean\" && truthyTimingValue(options.delay)\n                  ? parseFloat(options.delay)\n                  : relativeDelay;\n\n            maxDelay = Math.max(relativeDelay, 0);\n            timings.animationDelay = relativeDelay;\n            delayStyle = getCssDelayStyle(relativeDelay, true);\n            temporaryStyles.push(delayStyle);\n            node.style[delayStyle[0]] = delayStyle[1];\n          }\n\n          maxDelayTime = maxDelay * ONE_SECOND;\n          maxDurationTime = maxDuration * ONE_SECOND;\n\n          if (options.easing) {\n            var easeProp, easeVal = options.easing;\n            if (flags.hasTransitions) {\n              easeProp = TRANSITION_PROP + TIMING_KEY;\n              temporaryStyles.push([easeProp, easeVal]);\n              node.style[easeProp] = easeVal;\n            }\n            if (flags.hasAnimations) {\n              easeProp = ANIMATION_PROP + TIMING_KEY;\n              temporaryStyles.push([easeProp, easeVal]);\n              node.style[easeProp] = easeVal;\n            }\n          }\n\n          if (timings.transitionDuration) {\n            events.push(TRANSITIONEND_EVENT);\n          }\n\n          if (timings.animationDuration) {\n            events.push(ANIMATIONEND_EVENT);\n          }\n\n          startTime = Date.now();\n          var timerTime = maxDelayTime + CLOSING_TIME_BUFFER * maxDurationTime;\n          var endTime = startTime + timerTime;\n\n          var animationsData = element.data(ANIMATE_TIMER_KEY) || [];\n          var setupFallbackTimer = true;\n          if (animationsData.length) {\n            var currentTimerData = animationsData[0];\n            setupFallbackTimer = endTime > currentTimerData.expectedEndTime;\n            if (setupFallbackTimer) {\n              $timeout.cancel(currentTimerData.timer);\n            } else {\n              animationsData.push(close);\n            }\n          }\n\n          if (setupFallbackTimer) {\n            var timer = $timeout(onAnimationExpired, timerTime, false);\n            animationsData[0] = {\n              timer: timer,\n              expectedEndTime: endTime\n            };\n            animationsData.push(close);\n            element.data(ANIMATE_TIMER_KEY, animationsData);\n          }\n\n          if (events.length) {\n            element.on(events.join(' '), onAnimationProgress);\n          }\n\n          if (options.to) {\n            if (options.cleanupStyles) {\n              registerRestorableStyles(restoreStyles, node, Object.keys(options.to));\n            }\n            applyAnimationToStyles(element, options);\n          }\n        }\n\n        function onAnimationExpired() {\n          var animationsData = element.data(ANIMATE_TIMER_KEY);\n\n          // this will be false in the event that the element was\n          // removed from the DOM (via a leave animation or something\n          // similar)\n          if (animationsData) {\n            for (var i = 1; i < animationsData.length; i++) {\n              animationsData[i]();\n            }\n            element.removeData(ANIMATE_TIMER_KEY);\n          }\n        }\n      }\n    };\n  }];\n}];\n\nvar $$AnimateCssDriverProvider = ['$$animationProvider', function($$animationProvider) {\n  $$animationProvider.drivers.push('$$animateCssDriver');\n\n  var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim';\n  var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor';\n\n  var NG_OUT_ANCHOR_CLASS_NAME = 'ng-anchor-out';\n  var NG_IN_ANCHOR_CLASS_NAME = 'ng-anchor-in';\n\n  function isDocumentFragment(node) {\n    return node.parentNode && node.parentNode.nodeType === 11;\n  }\n\n  this.$get = ['$animateCss', '$rootScope', '$$AnimateRunner', '$rootElement', '$sniffer', '$$jqLite', '$document',\n       function($animateCss,   $rootScope,   $$AnimateRunner,   $rootElement,   $sniffer,   $$jqLite,   $document) {\n\n    // only browsers that support these properties can render animations\n    if (!$sniffer.animations && !$sniffer.transitions) return noop;\n\n    var bodyNode = $document[0].body;\n    var rootNode = getDomNode($rootElement);\n\n    var rootBodyElement = jqLite(\n      // this is to avoid using something that exists outside of the body\n      // we also special case the doc fragment case because our unit test code\n      // appends the $rootElement to the body after the app has been bootstrapped\n      isDocumentFragment(rootNode) || bodyNode.contains(rootNode) ? rootNode : bodyNode\n    );\n\n    var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);\n\n    return function initDriverFn(animationDetails) {\n      return animationDetails.from && animationDetails.to\n          ? prepareFromToAnchorAnimation(animationDetails.from,\n                                         animationDetails.to,\n                                         animationDetails.classes,\n                                         animationDetails.anchors)\n          : prepareRegularAnimation(animationDetails);\n    };\n\n    function filterCssClasses(classes) {\n      //remove all the `ng-` stuff\n      return classes.replace(/\\bng-\\S+\\b/g, '');\n    }\n\n    function getUniqueValues(a, b) {\n      if (isString(a)) a = a.split(' ');\n      if (isString(b)) b = b.split(' ');\n      return a.filter(function(val) {\n        return b.indexOf(val) === -1;\n      }).join(' ');\n    }\n\n    function prepareAnchoredAnimation(classes, outAnchor, inAnchor) {\n      var clone = jqLite(getDomNode(outAnchor).cloneNode(true));\n      var startingClasses = filterCssClasses(getClassVal(clone));\n\n      outAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME);\n      inAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME);\n\n      clone.addClass(NG_ANIMATE_ANCHOR_CLASS_NAME);\n\n      rootBodyElement.append(clone);\n\n      var animatorIn, animatorOut = prepareOutAnimation();\n\n      // the user may not end up using the `out` animation and\n      // only making use of the `in` animation or vice-versa.\n      // In either case we should allow this and not assume the\n      // animation is over unless both animations are not used.\n      if (!animatorOut) {\n        animatorIn = prepareInAnimation();\n        if (!animatorIn) {\n          return end();\n        }\n      }\n\n      var startingAnimator = animatorOut || animatorIn;\n\n      return {\n        start: function() {\n          var runner;\n\n          var currentAnimation = startingAnimator.start();\n          currentAnimation.done(function() {\n            currentAnimation = null;\n            if (!animatorIn) {\n              animatorIn = prepareInAnimation();\n              if (animatorIn) {\n                currentAnimation = animatorIn.start();\n                currentAnimation.done(function() {\n                  currentAnimation = null;\n                  end();\n                  runner.complete();\n                });\n                return currentAnimation;\n              }\n            }\n            // in the event that there is no `in` animation\n            end();\n            runner.complete();\n          });\n\n          runner = new $$AnimateRunner({\n            end: endFn,\n            cancel: endFn\n          });\n\n          return runner;\n\n          function endFn() {\n            if (currentAnimation) {\n              currentAnimation.end();\n            }\n          }\n        }\n      };\n\n      function calculateAnchorStyles(anchor) {\n        var styles = {};\n\n        var coords = getDomNode(anchor).getBoundingClientRect();\n\n        // we iterate directly since safari messes up and doesn't return\n        // all the keys for the coords object when iterated\n        forEach(['width','height','top','left'], function(key) {\n          var value = coords[key];\n          switch (key) {\n            case 'top':\n              value += bodyNode.scrollTop;\n              break;\n            case 'left':\n              value += bodyNode.scrollLeft;\n              break;\n          }\n          styles[key] = Math.floor(value) + 'px';\n        });\n        return styles;\n      }\n\n      function prepareOutAnimation() {\n        var animator = $animateCss(clone, {\n          addClass: NG_OUT_ANCHOR_CLASS_NAME,\n          delay: true,\n          from: calculateAnchorStyles(outAnchor)\n        });\n\n        // read the comment within `prepareRegularAnimation` to understand\n        // why this check is necessary\n        return animator.$$willAnimate ? animator : null;\n      }\n\n      function getClassVal(element) {\n        return element.attr('class') || '';\n      }\n\n      function prepareInAnimation() {\n        var endingClasses = filterCssClasses(getClassVal(inAnchor));\n        var toAdd = getUniqueValues(endingClasses, startingClasses);\n        var toRemove = getUniqueValues(startingClasses, endingClasses);\n\n        var animator = $animateCss(clone, {\n          to: calculateAnchorStyles(inAnchor),\n          addClass: NG_IN_ANCHOR_CLASS_NAME + ' ' + toAdd,\n          removeClass: NG_OUT_ANCHOR_CLASS_NAME + ' ' + toRemove,\n          delay: true\n        });\n\n        // read the comment within `prepareRegularAnimation` to understand\n        // why this check is necessary\n        return animator.$$willAnimate ? animator : null;\n      }\n\n      function end() {\n        clone.remove();\n        outAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME);\n        inAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME);\n      }\n    }\n\n    function prepareFromToAnchorAnimation(from, to, classes, anchors) {\n      var fromAnimation = prepareRegularAnimation(from, noop);\n      var toAnimation = prepareRegularAnimation(to, noop);\n\n      var anchorAnimations = [];\n      forEach(anchors, function(anchor) {\n        var outElement = anchor['out'];\n        var inElement = anchor['in'];\n        var animator = prepareAnchoredAnimation(classes, outElement, inElement);\n        if (animator) {\n          anchorAnimations.push(animator);\n        }\n      });\n\n      // no point in doing anything when there are no elements to animate\n      if (!fromAnimation && !toAnimation && anchorAnimations.length === 0) return;\n\n      return {\n        start: function() {\n          var animationRunners = [];\n\n          if (fromAnimation) {\n            animationRunners.push(fromAnimation.start());\n          }\n\n          if (toAnimation) {\n            animationRunners.push(toAnimation.start());\n          }\n\n          forEach(anchorAnimations, function(animation) {\n            animationRunners.push(animation.start());\n          });\n\n          var runner = new $$AnimateRunner({\n            end: endFn,\n            cancel: endFn // CSS-driven animations cannot be cancelled, only ended\n          });\n\n          $$AnimateRunner.all(animationRunners, function(status) {\n            runner.complete(status);\n          });\n\n          return runner;\n\n          function endFn() {\n            forEach(animationRunners, function(runner) {\n              runner.end();\n            });\n          }\n        }\n      };\n    }\n\n    function prepareRegularAnimation(animationDetails) {\n      var element = animationDetails.element;\n      var options = animationDetails.options || {};\n\n      if (animationDetails.structural) {\n        options.event = animationDetails.event;\n        options.structural = true;\n        options.applyClassesEarly = true;\n\n        // we special case the leave animation since we want to ensure that\n        // the element is removed as soon as the animation is over. Otherwise\n        // a flicker might appear or the element may not be removed at all\n        if (animationDetails.event === 'leave') {\n          options.onDone = options.domOperation;\n        }\n      }\n\n      // We assign the preparationClasses as the actual animation event since\n      // the internals of $animateCss will just suffix the event token values\n      // with `-active` to trigger the animation.\n      if (options.preparationClasses) {\n        options.event = concatWithSpace(options.event, options.preparationClasses);\n      }\n\n      var animator = $animateCss(element, options);\n\n      // the driver lookup code inside of $$animation attempts to spawn a\n      // driver one by one until a driver returns a.$$willAnimate animator object.\n      // $animateCss will always return an object, however, it will pass in\n      // a flag as a hint as to whether an animation was detected or not\n      return animator.$$willAnimate ? animator : null;\n    }\n  }];\n}];\n\n// TODO(matsko): use caching here to speed things up for detection\n// TODO(matsko): add documentation\n//  by the time...\n\nvar $$AnimateJsProvider = ['$animateProvider', function($animateProvider) {\n  this.$get = ['$injector', '$$AnimateRunner', '$$jqLite',\n       function($injector,   $$AnimateRunner,   $$jqLite) {\n\n    var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);\n         // $animateJs(element, 'enter');\n    return function(element, event, classes, options) {\n      var animationClosed = false;\n\n      // the `classes` argument is optional and if it is not used\n      // then the classes will be resolved from the element's className\n      // property as well as options.addClass/options.removeClass.\n      if (arguments.length === 3 && isObject(classes)) {\n        options = classes;\n        classes = null;\n      }\n\n      options = prepareAnimationOptions(options);\n      if (!classes) {\n        classes = element.attr('class') || '';\n        if (options.addClass) {\n          classes += ' ' + options.addClass;\n        }\n        if (options.removeClass) {\n          classes += ' ' + options.removeClass;\n        }\n      }\n\n      var classesToAdd = options.addClass;\n      var classesToRemove = options.removeClass;\n\n      // the lookupAnimations function returns a series of animation objects that are\n      // matched up with one or more of the CSS classes. These animation objects are\n      // defined via the module.animation factory function. If nothing is detected then\n      // we don't return anything which then makes $animation query the next driver.\n      var animations = lookupAnimations(classes);\n      var before, after;\n      if (animations.length) {\n        var afterFn, beforeFn;\n        if (event == 'leave') {\n          beforeFn = 'leave';\n          afterFn = 'afterLeave'; // TODO(matsko): get rid of this\n        } else {\n          beforeFn = 'before' + event.charAt(0).toUpperCase() + event.substr(1);\n          afterFn = event;\n        }\n\n        if (event !== 'enter' && event !== 'move') {\n          before = packageAnimations(element, event, options, animations, beforeFn);\n        }\n        after  = packageAnimations(element, event, options, animations, afterFn);\n      }\n\n      // no matching animations\n      if (!before && !after) return;\n\n      function applyOptions() {\n        options.domOperation();\n        applyAnimationClasses(element, options);\n      }\n\n      function close() {\n        animationClosed = true;\n        applyOptions();\n        applyAnimationStyles(element, options);\n      }\n\n      var runner;\n\n      return {\n        $$willAnimate: true,\n        end: function() {\n          if (runner) {\n            runner.end();\n          } else {\n            close();\n            runner = new $$AnimateRunner();\n            runner.complete(true);\n          }\n          return runner;\n        },\n        start: function() {\n          if (runner) {\n            return runner;\n          }\n\n          runner = new $$AnimateRunner();\n          var closeActiveAnimations;\n          var chain = [];\n\n          if (before) {\n            chain.push(function(fn) {\n              closeActiveAnimations = before(fn);\n            });\n          }\n\n          if (chain.length) {\n            chain.push(function(fn) {\n              applyOptions();\n              fn(true);\n            });\n          } else {\n            applyOptions();\n          }\n\n          if (after) {\n            chain.push(function(fn) {\n              closeActiveAnimations = after(fn);\n            });\n          }\n\n          runner.setHost({\n            end: function() {\n              endAnimations();\n            },\n            cancel: function() {\n              endAnimations(true);\n            }\n          });\n\n          $$AnimateRunner.chain(chain, onComplete);\n          return runner;\n\n          function onComplete(success) {\n            close(success);\n            runner.complete(success);\n          }\n\n          function endAnimations(cancelled) {\n            if (!animationClosed) {\n              (closeActiveAnimations || noop)(cancelled);\n              onComplete(cancelled);\n            }\n          }\n        }\n      };\n\n      function executeAnimationFn(fn, element, event, options, onDone) {\n        var args;\n        switch (event) {\n          case 'animate':\n            args = [element, options.from, options.to, onDone];\n            break;\n\n          case 'setClass':\n            args = [element, classesToAdd, classesToRemove, onDone];\n            break;\n\n          case 'addClass':\n            args = [element, classesToAdd, onDone];\n            break;\n\n          case 'removeClass':\n            args = [element, classesToRemove, onDone];\n            break;\n\n          default:\n            args = [element, onDone];\n            break;\n        }\n\n        args.push(options);\n\n        var value = fn.apply(fn, args);\n        if (value) {\n          if (isFunction(value.start)) {\n            value = value.start();\n          }\n\n          if (value instanceof $$AnimateRunner) {\n            value.done(onDone);\n          } else if (isFunction(value)) {\n            // optional onEnd / onCancel callback\n            return value;\n          }\n        }\n\n        return noop;\n      }\n\n      function groupEventedAnimations(element, event, options, animations, fnName) {\n        var operations = [];\n        forEach(animations, function(ani) {\n          var animation = ani[fnName];\n          if (!animation) return;\n\n          // note that all of these animations will run in parallel\n          operations.push(function() {\n            var runner;\n            var endProgressCb;\n\n            var resolved = false;\n            var onAnimationComplete = function(rejected) {\n              if (!resolved) {\n                resolved = true;\n                (endProgressCb || noop)(rejected);\n                runner.complete(!rejected);\n              }\n            };\n\n            runner = new $$AnimateRunner({\n              end: function() {\n                onAnimationComplete();\n              },\n              cancel: function() {\n                onAnimationComplete(true);\n              }\n            });\n\n            endProgressCb = executeAnimationFn(animation, element, event, options, function(result) {\n              var cancelled = result === false;\n              onAnimationComplete(cancelled);\n            });\n\n            return runner;\n          });\n        });\n\n        return operations;\n      }\n\n      function packageAnimations(element, event, options, animations, fnName) {\n        var operations = groupEventedAnimations(element, event, options, animations, fnName);\n        if (operations.length === 0) {\n          var a,b;\n          if (fnName === 'beforeSetClass') {\n            a = groupEventedAnimations(element, 'removeClass', options, animations, 'beforeRemoveClass');\n            b = groupEventedAnimations(element, 'addClass', options, animations, 'beforeAddClass');\n          } else if (fnName === 'setClass') {\n            a = groupEventedAnimations(element, 'removeClass', options, animations, 'removeClass');\n            b = groupEventedAnimations(element, 'addClass', options, animations, 'addClass');\n          }\n\n          if (a) {\n            operations = operations.concat(a);\n          }\n          if (b) {\n            operations = operations.concat(b);\n          }\n        }\n\n        if (operations.length === 0) return;\n\n        // TODO(matsko): add documentation\n        return function startAnimation(callback) {\n          var runners = [];\n          if (operations.length) {\n            forEach(operations, function(animateFn) {\n              runners.push(animateFn());\n            });\n          }\n\n          runners.length ? $$AnimateRunner.all(runners, callback) : callback();\n\n          return function endFn(reject) {\n            forEach(runners, function(runner) {\n              reject ? runner.cancel() : runner.end();\n            });\n          };\n        };\n      }\n    };\n\n    function lookupAnimations(classes) {\n      classes = isArray(classes) ? classes : classes.split(' ');\n      var matches = [], flagMap = {};\n      for (var i=0; i < classes.length; i++) {\n        var klass = classes[i],\n            animationFactory = $animateProvider.$$registeredAnimations[klass];\n        if (animationFactory && !flagMap[klass]) {\n          matches.push($injector.get(animationFactory));\n          flagMap[klass] = true;\n        }\n      }\n      return matches;\n    }\n  }];\n}];\n\nvar $$AnimateJsDriverProvider = ['$$animationProvider', function($$animationProvider) {\n  $$animationProvider.drivers.push('$$animateJsDriver');\n  this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) {\n    return function initDriverFn(animationDetails) {\n      if (animationDetails.from && animationDetails.to) {\n        var fromAnimation = prepareAnimation(animationDetails.from);\n        var toAnimation = prepareAnimation(animationDetails.to);\n        if (!fromAnimation && !toAnimation) return;\n\n        return {\n          start: function() {\n            var animationRunners = [];\n\n            if (fromAnimation) {\n              animationRunners.push(fromAnimation.start());\n            }\n\n            if (toAnimation) {\n              animationRunners.push(toAnimation.start());\n            }\n\n            $$AnimateRunner.all(animationRunners, done);\n\n            var runner = new $$AnimateRunner({\n              end: endFnFactory(),\n              cancel: endFnFactory()\n            });\n\n            return runner;\n\n            function endFnFactory() {\n              return function() {\n                forEach(animationRunners, function(runner) {\n                  // at this point we cannot cancel animations for groups just yet. 1.5+\n                  runner.end();\n                });\n              };\n            }\n\n            function done(status) {\n              runner.complete(status);\n            }\n          }\n        };\n      } else {\n        return prepareAnimation(animationDetails);\n      }\n    };\n\n    function prepareAnimation(animationDetails) {\n      // TODO(matsko): make sure to check for grouped animations and delegate down to normal animations\n      var element = animationDetails.element;\n      var event = animationDetails.event;\n      var options = animationDetails.options;\n      var classes = animationDetails.classes;\n      return $$animateJs(element, event, classes, options);\n    }\n  }];\n}];\n\nvar NG_ANIMATE_ATTR_NAME = 'data-ng-animate';\nvar NG_ANIMATE_PIN_DATA = '$ngAnimatePin';\nvar $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {\n  var PRE_DIGEST_STATE = 1;\n  var RUNNING_STATE = 2;\n  var ONE_SPACE = ' ';\n\n  var rules = this.rules = {\n    skip: [],\n    cancel: [],\n    join: []\n  };\n\n  function makeTruthyCssClassMap(classString) {\n    if (!classString) {\n      return null;\n    }\n\n    var keys = classString.split(ONE_SPACE);\n    var map = Object.create(null);\n\n    forEach(keys, function(key) {\n      map[key] = true;\n    });\n    return map;\n  }\n\n  function hasMatchingClasses(newClassString, currentClassString) {\n    if (newClassString && currentClassString) {\n      var currentClassMap = makeTruthyCssClassMap(currentClassString);\n      return newClassString.split(ONE_SPACE).some(function(className) {\n        return currentClassMap[className];\n      });\n    }\n  }\n\n  function isAllowed(ruleType, element, currentAnimation, previousAnimation) {\n    return rules[ruleType].some(function(fn) {\n      return fn(element, currentAnimation, previousAnimation);\n    });\n  }\n\n  function hasAnimationClasses(animation, and) {\n    var a = (animation.addClass || '').length > 0;\n    var b = (animation.removeClass || '').length > 0;\n    return and ? a && b : a || b;\n  }\n\n  rules.join.push(function(element, newAnimation, currentAnimation) {\n    // if the new animation is class-based then we can just tack that on\n    return !newAnimation.structural && hasAnimationClasses(newAnimation);\n  });\n\n  rules.skip.push(function(element, newAnimation, currentAnimation) {\n    // there is no need to animate anything if no classes are being added and\n    // there is no structural animation that will be triggered\n    return !newAnimation.structural && !hasAnimationClasses(newAnimation);\n  });\n\n  rules.skip.push(function(element, newAnimation, currentAnimation) {\n    // why should we trigger a new structural animation if the element will\n    // be removed from the DOM anyway?\n    return currentAnimation.event == 'leave' && newAnimation.structural;\n  });\n\n  rules.skip.push(function(element, newAnimation, currentAnimation) {\n    // if there is an ongoing current animation then don't even bother running the class-based animation\n    return currentAnimation.structural && currentAnimation.state === RUNNING_STATE && !newAnimation.structural;\n  });\n\n  rules.cancel.push(function(element, newAnimation, currentAnimation) {\n    // there can never be two structural animations running at the same time\n    return currentAnimation.structural && newAnimation.structural;\n  });\n\n  rules.cancel.push(function(element, newAnimation, currentAnimation) {\n    // if the previous animation is already running, but the new animation will\n    // be triggered, but the new animation is structural\n    return currentAnimation.state === RUNNING_STATE && newAnimation.structural;\n  });\n\n  rules.cancel.push(function(element, newAnimation, currentAnimation) {\n    // cancel the animation if classes added / removed in both animation cancel each other out,\n    // but only if the current animation isn't structural\n\n    if (currentAnimation.structural) return false;\n\n    var nA = newAnimation.addClass;\n    var nR = newAnimation.removeClass;\n    var cA = currentAnimation.addClass;\n    var cR = currentAnimation.removeClass;\n\n    // early detection to save the global CPU shortage :)\n    if ((isUndefined(nA) && isUndefined(nR)) || (isUndefined(cA) && isUndefined(cR))) {\n      return false;\n    }\n\n    return hasMatchingClasses(nA, cR) || hasMatchingClasses(nR, cA);\n  });\n\n  this.$get = ['$$rAF', '$rootScope', '$rootElement', '$document', '$$HashMap',\n               '$$animation', '$$AnimateRunner', '$templateRequest', '$$jqLite', '$$forceReflow',\n       function($$rAF,   $rootScope,   $rootElement,   $document,   $$HashMap,\n                $$animation,   $$AnimateRunner,   $templateRequest,   $$jqLite,   $$forceReflow) {\n\n    var activeAnimationsLookup = new $$HashMap();\n    var disabledElementsLookup = new $$HashMap();\n    var animationsEnabled = null;\n\n    function postDigestTaskFactory() {\n      var postDigestCalled = false;\n      return function(fn) {\n        // we only issue a call to postDigest before\n        // it has first passed. This prevents any callbacks\n        // from not firing once the animation has completed\n        // since it will be out of the digest cycle.\n        if (postDigestCalled) {\n          fn();\n        } else {\n          $rootScope.$$postDigest(function() {\n            postDigestCalled = true;\n            fn();\n          });\n        }\n      };\n    }\n\n    // Wait until all directive and route-related templates are downloaded and\n    // compiled. The $templateRequest.totalPendingRequests variable keeps track of\n    // all of the remote templates being currently downloaded. If there are no\n    // templates currently downloading then the watcher will still fire anyway.\n    var deregisterWatch = $rootScope.$watch(\n      function() { return $templateRequest.totalPendingRequests === 0; },\n      function(isEmpty) {\n        if (!isEmpty) return;\n        deregisterWatch();\n\n        // Now that all templates have been downloaded, $animate will wait until\n        // the post digest queue is empty before enabling animations. By having two\n        // calls to $postDigest calls we can ensure that the flag is enabled at the\n        // very end of the post digest queue. Since all of the animations in $animate\n        // use $postDigest, it's important that the code below executes at the end.\n        // This basically means that the page is fully downloaded and compiled before\n        // any animations are triggered.\n        $rootScope.$$postDigest(function() {\n          $rootScope.$$postDigest(function() {\n            // we check for null directly in the event that the application already called\n            // .enabled() with whatever arguments that it provided it with\n            if (animationsEnabled === null) {\n              animationsEnabled = true;\n            }\n          });\n        });\n      }\n    );\n\n    var callbackRegistry = {};\n\n    // remember that the classNameFilter is set during the provider/config\n    // stage therefore we can optimize here and setup a helper function\n    var classNameFilter = $animateProvider.classNameFilter();\n    var isAnimatableClassName = !classNameFilter\n              ? function() { return true; }\n              : function(className) {\n                return classNameFilter.test(className);\n              };\n\n    var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);\n\n    function normalizeAnimationDetails(element, animation) {\n      return mergeAnimationDetails(element, animation, {});\n    }\n\n    // IE9-11 has no method \"contains\" in SVG element and in Node.prototype. Bug #10259.\n    var contains = Node.prototype.contains || function(arg) {\n      // jshint bitwise: false\n      return this === arg || !!(this.compareDocumentPosition(arg) & 16);\n      // jshint bitwise: true\n    };\n\n    function findCallbacks(parent, element, event) {\n      var targetNode = getDomNode(element);\n      var targetParentNode = getDomNode(parent);\n\n      var matches = [];\n      var entries = callbackRegistry[event];\n      if (entries) {\n        forEach(entries, function(entry) {\n          if (contains.call(entry.node, targetNode)) {\n            matches.push(entry.callback);\n          } else if (event === 'leave' && contains.call(entry.node, targetParentNode)) {\n            matches.push(entry.callback);\n          }\n        });\n      }\n\n      return matches;\n    }\n\n    var $animate = {\n      on: function(event, container, callback) {\n        var node = extractElementNode(container);\n        callbackRegistry[event] = callbackRegistry[event] || [];\n        callbackRegistry[event].push({\n          node: node,\n          callback: callback\n        });\n\n        // Remove the callback when the element is removed from the DOM\n        jqLite(container).on('$destroy', function() {\n          $animate.off(event, container, callback);\n        });\n      },\n\n      off: function(event, container, callback) {\n        var entries = callbackRegistry[event];\n        if (!entries) return;\n\n        callbackRegistry[event] = arguments.length === 1\n            ? null\n            : filterFromRegistry(entries, container, callback);\n\n        function filterFromRegistry(list, matchContainer, matchCallback) {\n          var containerNode = extractElementNode(matchContainer);\n          return list.filter(function(entry) {\n            var isMatch = entry.node === containerNode &&\n                            (!matchCallback || entry.callback === matchCallback);\n            return !isMatch;\n          });\n        }\n      },\n\n      pin: function(element, parentElement) {\n        assertArg(isElement(element), 'element', 'not an element');\n        assertArg(isElement(parentElement), 'parentElement', 'not an element');\n        element.data(NG_ANIMATE_PIN_DATA, parentElement);\n      },\n\n      push: function(element, event, options, domOperation) {\n        options = options || {};\n        options.domOperation = domOperation;\n        return queueAnimation(element, event, options);\n      },\n\n      // this method has four signatures:\n      //  () - global getter\n      //  (bool) - global setter\n      //  (element) - element getter\n      //  (element, bool) - element setter<F37>\n      enabled: function(element, bool) {\n        var argCount = arguments.length;\n\n        if (argCount === 0) {\n          // () - Global getter\n          bool = !!animationsEnabled;\n        } else {\n          var hasElement = isElement(element);\n\n          if (!hasElement) {\n            // (bool) - Global setter\n            bool = animationsEnabled = !!element;\n          } else {\n            var node = getDomNode(element);\n            var recordExists = disabledElementsLookup.get(node);\n\n            if (argCount === 1) {\n              // (element) - Element getter\n              bool = !recordExists;\n            } else {\n              // (element, bool) - Element setter\n              disabledElementsLookup.put(node, !bool);\n            }\n          }\n        }\n\n        return bool;\n      }\n    };\n\n    return $animate;\n\n    function queueAnimation(element, event, initialOptions) {\n      // we always make a copy of the options since\n      // there should never be any side effects on\n      // the input data when running `$animateCss`.\n      var options = copy(initialOptions);\n\n      var node, parent;\n      element = stripCommentsFromElement(element);\n      if (element) {\n        node = getDomNode(element);\n        parent = element.parent();\n      }\n\n      options = prepareAnimationOptions(options);\n\n      // we create a fake runner with a working promise.\n      // These methods will become available after the digest has passed\n      var runner = new $$AnimateRunner();\n\n      // this is used to trigger callbacks in postDigest mode\n      var runInNextPostDigestOrNow = postDigestTaskFactory();\n\n      if (isArray(options.addClass)) {\n        options.addClass = options.addClass.join(' ');\n      }\n\n      if (options.addClass && !isString(options.addClass)) {\n        options.addClass = null;\n      }\n\n      if (isArray(options.removeClass)) {\n        options.removeClass = options.removeClass.join(' ');\n      }\n\n      if (options.removeClass && !isString(options.removeClass)) {\n        options.removeClass = null;\n      }\n\n      if (options.from && !isObject(options.from)) {\n        options.from = null;\n      }\n\n      if (options.to && !isObject(options.to)) {\n        options.to = null;\n      }\n\n      // there are situations where a directive issues an animation for\n      // a jqLite wrapper that contains only comment nodes... If this\n      // happens then there is no way we can perform an animation\n      if (!node) {\n        close();\n        return runner;\n      }\n\n      var className = [node.className, options.addClass, options.removeClass].join(' ');\n      if (!isAnimatableClassName(className)) {\n        close();\n        return runner;\n      }\n\n      var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;\n\n      // this is a hard disable of all animations for the application or on\n      // the element itself, therefore  there is no need to continue further\n      // past this point if not enabled\n      // Animations are also disabled if the document is currently hidden (page is not visible\n      // to the user), because browsers slow down or do not flush calls to requestAnimationFrame\n      var skipAnimations = !animationsEnabled || $document[0].hidden || disabledElementsLookup.get(node);\n      var existingAnimation = (!skipAnimations && activeAnimationsLookup.get(node)) || {};\n      var hasExistingAnimation = !!existingAnimation.state;\n\n      // there is no point in traversing the same collection of parent ancestors if a followup\n      // animation will be run on the same element that already did all that checking work\n      if (!skipAnimations && (!hasExistingAnimation || existingAnimation.state != PRE_DIGEST_STATE)) {\n        skipAnimations = !areAnimationsAllowed(element, parent, event);\n      }\n\n      if (skipAnimations) {\n        close();\n        return runner;\n      }\n\n      if (isStructural) {\n        closeChildAnimations(element);\n      }\n\n      var newAnimation = {\n        structural: isStructural,\n        element: element,\n        event: event,\n        addClass: options.addClass,\n        removeClass: options.removeClass,\n        close: close,\n        options: options,\n        runner: runner\n      };\n\n      if (hasExistingAnimation) {\n        var skipAnimationFlag = isAllowed('skip', element, newAnimation, existingAnimation);\n        if (skipAnimationFlag) {\n          if (existingAnimation.state === RUNNING_STATE) {\n            close();\n            return runner;\n          } else {\n            mergeAnimationDetails(element, existingAnimation, newAnimation);\n            return existingAnimation.runner;\n          }\n        }\n        var cancelAnimationFlag = isAllowed('cancel', element, newAnimation, existingAnimation);\n        if (cancelAnimationFlag) {\n          if (existingAnimation.state === RUNNING_STATE) {\n            // this will end the animation right away and it is safe\n            // to do so since the animation is already running and the\n            // runner callback code will run in async\n            existingAnimation.runner.end();\n          } else if (existingAnimation.structural) {\n            // this means that the animation is queued into a digest, but\n            // hasn't started yet. Therefore it is safe to run the close\n            // method which will call the runner methods in async.\n            existingAnimation.close();\n          } else {\n            // this will merge the new animation options into existing animation options\n            mergeAnimationDetails(element, existingAnimation, newAnimation);\n\n            return existingAnimation.runner;\n          }\n        } else {\n          // a joined animation means that this animation will take over the existing one\n          // so an example would involve a leave animation taking over an enter. Then when\n          // the postDigest kicks in the enter will be ignored.\n          var joinAnimationFlag = isAllowed('join', element, newAnimation, existingAnimation);\n          if (joinAnimationFlag) {\n            if (existingAnimation.state === RUNNING_STATE) {\n              normalizeAnimationDetails(element, newAnimation);\n            } else {\n              applyGeneratedPreparationClasses(element, isStructural ? event : null, options);\n\n              event = newAnimation.event = existingAnimation.event;\n              options = mergeAnimationDetails(element, existingAnimation, newAnimation);\n\n              //we return the same runner since only the option values of this animation will\n              //be fed into the `existingAnimation`.\n              return existingAnimation.runner;\n            }\n          }\n        }\n      } else {\n        // normalization in this case means that it removes redundant CSS classes that\n        // already exist (addClass) or do not exist (removeClass) on the element\n        normalizeAnimationDetails(element, newAnimation);\n      }\n\n      // when the options are merged and cleaned up we may end up not having to do\n      // an animation at all, therefore we should check this before issuing a post\n      // digest callback. Structural animations will always run no matter what.\n      var isValidAnimation = newAnimation.structural;\n      if (!isValidAnimation) {\n        // animate (from/to) can be quickly checked first, otherwise we check if any classes are present\n        isValidAnimation = (newAnimation.event === 'animate' && Object.keys(newAnimation.options.to || {}).length > 0)\n                            || hasAnimationClasses(newAnimation);\n      }\n\n      if (!isValidAnimation) {\n        close();\n        clearElementAnimationState(element);\n        return runner;\n      }\n\n      // the counter keeps track of cancelled animations\n      var counter = (existingAnimation.counter || 0) + 1;\n      newAnimation.counter = counter;\n\n      markElementAnimationState(element, PRE_DIGEST_STATE, newAnimation);\n\n      $rootScope.$$postDigest(function() {\n        var animationDetails = activeAnimationsLookup.get(node);\n        var animationCancelled = !animationDetails;\n        animationDetails = animationDetails || {};\n\n        // if addClass/removeClass is called before something like enter then the\n        // registered parent element may not be present. The code below will ensure\n        // that a final value for parent element is obtained\n        var parentElement = element.parent() || [];\n\n        // animate/structural/class-based animations all have requirements. Otherwise there\n        // is no point in performing an animation. The parent node must also be set.\n        var isValidAnimation = parentElement.length > 0\n                                && (animationDetails.event === 'animate'\n                                    || animationDetails.structural\n                                    || hasAnimationClasses(animationDetails));\n\n        // this means that the previous animation was cancelled\n        // even if the follow-up animation is the same event\n        if (animationCancelled || animationDetails.counter !== counter || !isValidAnimation) {\n          // if another animation did not take over then we need\n          // to make sure that the domOperation and options are\n          // handled accordingly\n          if (animationCancelled) {\n            applyAnimationClasses(element, options);\n            applyAnimationStyles(element, options);\n          }\n\n          // if the event changed from something like enter to leave then we do\n          // it, otherwise if it's the same then the end result will be the same too\n          if (animationCancelled || (isStructural && animationDetails.event !== event)) {\n            options.domOperation();\n            runner.end();\n          }\n\n          // in the event that the element animation was not cancelled or a follow-up animation\n          // isn't allowed to animate from here then we need to clear the state of the element\n          // so that any future animations won't read the expired animation data.\n          if (!isValidAnimation) {\n            clearElementAnimationState(element);\n          }\n\n          return;\n        }\n\n        // this combined multiple class to addClass / removeClass into a setClass event\n        // so long as a structural event did not take over the animation\n        event = !animationDetails.structural && hasAnimationClasses(animationDetails, true)\n            ? 'setClass'\n            : animationDetails.event;\n\n        markElementAnimationState(element, RUNNING_STATE);\n        var realRunner = $$animation(element, event, animationDetails.options);\n\n        realRunner.done(function(status) {\n          close(!status);\n          var animationDetails = activeAnimationsLookup.get(node);\n          if (animationDetails && animationDetails.counter === counter) {\n            clearElementAnimationState(getDomNode(element));\n          }\n          notifyProgress(runner, event, 'close', {});\n        });\n\n        // this will update the runner's flow-control events based on\n        // the `realRunner` object.\n        runner.setHost(realRunner);\n        notifyProgress(runner, event, 'start', {});\n      });\n\n      return runner;\n\n      function notifyProgress(runner, event, phase, data) {\n        runInNextPostDigestOrNow(function() {\n          var callbacks = findCallbacks(parent, element, event);\n          if (callbacks.length) {\n            // do not optimize this call here to RAF because\n            // we don't know how heavy the callback code here will\n            // be and if this code is buffered then this can\n            // lead to a performance regression.\n            $$rAF(function() {\n              forEach(callbacks, function(callback) {\n                callback(element, phase, data);\n              });\n            });\n          }\n        });\n        runner.progress(event, phase, data);\n      }\n\n      function close(reject) { // jshint ignore:line\n        clearGeneratedClasses(element, options);\n        applyAnimationClasses(element, options);\n        applyAnimationStyles(element, options);\n        options.domOperation();\n        runner.complete(!reject);\n      }\n    }\n\n    function closeChildAnimations(element) {\n      var node = getDomNode(element);\n      var children = node.querySelectorAll('[' + NG_ANIMATE_ATTR_NAME + ']');\n      forEach(children, function(child) {\n        var state = parseInt(child.getAttribute(NG_ANIMATE_ATTR_NAME));\n        var animationDetails = activeAnimationsLookup.get(child);\n        if (animationDetails) {\n          switch (state) {\n            case RUNNING_STATE:\n              animationDetails.runner.end();\n              /* falls through */\n            case PRE_DIGEST_STATE:\n              activeAnimationsLookup.remove(child);\n              break;\n          }\n        }\n      });\n    }\n\n    function clearElementAnimationState(element) {\n      var node = getDomNode(element);\n      node.removeAttribute(NG_ANIMATE_ATTR_NAME);\n      activeAnimationsLookup.remove(node);\n    }\n\n    function isMatchingElement(nodeOrElmA, nodeOrElmB) {\n      return getDomNode(nodeOrElmA) === getDomNode(nodeOrElmB);\n    }\n\n    /**\n     * This fn returns false if any of the following is true:\n     * a) animations on any parent element are disabled, and animations on the element aren't explicitly allowed\n     * b) a parent element has an ongoing structural animation, and animateChildren is false\n     * c) the element is not a child of the body\n     * d) the element is not a child of the $rootElement\n     */\n    function areAnimationsAllowed(element, parentElement, event) {\n      var bodyElement = jqLite($document[0].body);\n      var bodyElementDetected = isMatchingElement(element, bodyElement) || element[0].nodeName === 'HTML';\n      var rootElementDetected = isMatchingElement(element, $rootElement);\n      var parentAnimationDetected = false;\n      var animateChildren;\n      var elementDisabled = disabledElementsLookup.get(getDomNode(element));\n\n      var parentHost = jqLite.data(element[0], NG_ANIMATE_PIN_DATA);\n      if (parentHost) {\n        parentElement = parentHost;\n      }\n\n      parentElement = getDomNode(parentElement);\n\n      while (parentElement) {\n        if (!rootElementDetected) {\n          // angular doesn't want to attempt to animate elements outside of the application\n          // therefore we need to ensure that the rootElement is an ancestor of the current element\n          rootElementDetected = isMatchingElement(parentElement, $rootElement);\n        }\n\n        if (parentElement.nodeType !== ELEMENT_NODE) {\n          // no point in inspecting the #document element\n          break;\n        }\n\n        var details = activeAnimationsLookup.get(parentElement) || {};\n        // either an enter, leave or move animation will commence\n        // therefore we can't allow any animations to take place\n        // but if a parent animation is class-based then that's ok\n        if (!parentAnimationDetected) {\n          var parentElementDisabled = disabledElementsLookup.get(parentElement);\n\n          if (parentElementDisabled === true && elementDisabled !== false) {\n            // disable animations if the user hasn't explicitly enabled animations on the\n            // current element\n            elementDisabled = true;\n            // element is disabled via parent element, no need to check anything else\n            break;\n          } else if (parentElementDisabled === false) {\n            elementDisabled = false;\n          }\n          parentAnimationDetected = details.structural;\n        }\n\n        if (isUndefined(animateChildren) || animateChildren === true) {\n          var value = jqLite.data(parentElement, NG_ANIMATE_CHILDREN_DATA);\n          if (isDefined(value)) {\n            animateChildren = value;\n          }\n        }\n\n        // there is no need to continue traversing at this point\n        if (parentAnimationDetected && animateChildren === false) break;\n\n        if (!bodyElementDetected) {\n          // we also need to ensure that the element is or will be a part of the body element\n          // otherwise it is pointless to even issue an animation to be rendered\n          bodyElementDetected = isMatchingElement(parentElement, bodyElement);\n        }\n\n        if (bodyElementDetected && rootElementDetected) {\n          // If both body and root have been found, any other checks are pointless,\n          // as no animation data should live outside the application\n          break;\n        }\n\n        if (!rootElementDetected) {\n          // If no rootElement is detected, check if the parentElement is pinned to another element\n          parentHost = jqLite.data(parentElement, NG_ANIMATE_PIN_DATA);\n          if (parentHost) {\n            // The pin target element becomes the next parent element\n            parentElement = getDomNode(parentHost);\n            continue;\n          }\n        }\n\n        parentElement = parentElement.parentNode;\n      }\n\n      var allowAnimation = (!parentAnimationDetected || animateChildren) && elementDisabled !== true;\n      return allowAnimation && rootElementDetected && bodyElementDetected;\n    }\n\n    function markElementAnimationState(element, state, details) {\n      details = details || {};\n      details.state = state;\n\n      var node = getDomNode(element);\n      node.setAttribute(NG_ANIMATE_ATTR_NAME, state);\n\n      var oldValue = activeAnimationsLookup.get(node);\n      var newValue = oldValue\n          ? extend(oldValue, details)\n          : details;\n      activeAnimationsLookup.put(node, newValue);\n    }\n  }];\n}];\n\nvar $$AnimationProvider = ['$animateProvider', function($animateProvider) {\n  var NG_ANIMATE_REF_ATTR = 'ng-animate-ref';\n\n  var drivers = this.drivers = [];\n\n  var RUNNER_STORAGE_KEY = '$$animationRunner';\n\n  function setRunner(element, runner) {\n    element.data(RUNNER_STORAGE_KEY, runner);\n  }\n\n  function removeRunner(element) {\n    element.removeData(RUNNER_STORAGE_KEY);\n  }\n\n  function getRunner(element) {\n    return element.data(RUNNER_STORAGE_KEY);\n  }\n\n  this.$get = ['$$jqLite', '$rootScope', '$injector', '$$AnimateRunner', '$$HashMap', '$$rAFScheduler',\n       function($$jqLite,   $rootScope,   $injector,   $$AnimateRunner,   $$HashMap,   $$rAFScheduler) {\n\n    var animationQueue = [];\n    var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);\n\n    function sortAnimations(animations) {\n      var tree = { children: [] };\n      var i, lookup = new $$HashMap();\n\n      // this is done first beforehand so that the hashmap\n      // is filled with a list of the elements that will be animated\n      for (i = 0; i < animations.length; i++) {\n        var animation = animations[i];\n        lookup.put(animation.domNode, animations[i] = {\n          domNode: animation.domNode,\n          fn: animation.fn,\n          children: []\n        });\n      }\n\n      for (i = 0; i < animations.length; i++) {\n        processNode(animations[i]);\n      }\n\n      return flatten(tree);\n\n      function processNode(entry) {\n        if (entry.processed) return entry;\n        entry.processed = true;\n\n        var elementNode = entry.domNode;\n        var parentNode = elementNode.parentNode;\n        lookup.put(elementNode, entry);\n\n        var parentEntry;\n        while (parentNode) {\n          parentEntry = lookup.get(parentNode);\n          if (parentEntry) {\n            if (!parentEntry.processed) {\n              parentEntry = processNode(parentEntry);\n            }\n            break;\n          }\n          parentNode = parentNode.parentNode;\n        }\n\n        (parentEntry || tree).children.push(entry);\n        return entry;\n      }\n\n      function flatten(tree) {\n        var result = [];\n        var queue = [];\n        var i;\n\n        for (i = 0; i < tree.children.length; i++) {\n          queue.push(tree.children[i]);\n        }\n\n        var remainingLevelEntries = queue.length;\n        var nextLevelEntries = 0;\n        var row = [];\n\n        for (i = 0; i < queue.length; i++) {\n          var entry = queue[i];\n          if (remainingLevelEntries <= 0) {\n            remainingLevelEntries = nextLevelEntries;\n            nextLevelEntries = 0;\n            result.push(row);\n            row = [];\n          }\n          row.push(entry.fn);\n          entry.children.forEach(function(childEntry) {\n            nextLevelEntries++;\n            queue.push(childEntry);\n          });\n          remainingLevelEntries--;\n        }\n\n        if (row.length) {\n          result.push(row);\n        }\n\n        return result;\n      }\n    }\n\n    // TODO(matsko): document the signature in a better way\n    return function(element, event, options) {\n      options = prepareAnimationOptions(options);\n      var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;\n\n      // there is no animation at the current moment, however\n      // these runner methods will get later updated with the\n      // methods leading into the driver's end/cancel methods\n      // for now they just stop the animation from starting\n      var runner = new $$AnimateRunner({\n        end: function() { close(); },\n        cancel: function() { close(true); }\n      });\n\n      if (!drivers.length) {\n        close();\n        return runner;\n      }\n\n      setRunner(element, runner);\n\n      var classes = mergeClasses(element.attr('class'), mergeClasses(options.addClass, options.removeClass));\n      var tempClasses = options.tempClasses;\n      if (tempClasses) {\n        classes += ' ' + tempClasses;\n        options.tempClasses = null;\n      }\n\n      var prepareClassName;\n      if (isStructural) {\n        prepareClassName = 'ng-' + event + PREPARE_CLASS_SUFFIX;\n        $$jqLite.addClass(element, prepareClassName);\n      }\n\n      animationQueue.push({\n        // this data is used by the postDigest code and passed into\n        // the driver step function\n        element: element,\n        classes: classes,\n        event: event,\n        structural: isStructural,\n        options: options,\n        beforeStart: beforeStart,\n        close: close\n      });\n\n      element.on('$destroy', handleDestroyedElement);\n\n      // we only want there to be one function called within the post digest\n      // block. This way we can group animations for all the animations that\n      // were apart of the same postDigest flush call.\n      if (animationQueue.length > 1) return runner;\n\n      $rootScope.$$postDigest(function() {\n        var animations = [];\n        forEach(animationQueue, function(entry) {\n          // the element was destroyed early on which removed the runner\n          // form its storage. This means we can't animate this element\n          // at all and it already has been closed due to destruction.\n          if (getRunner(entry.element)) {\n            animations.push(entry);\n          } else {\n            entry.close();\n          }\n        });\n\n        // now any future animations will be in another postDigest\n        animationQueue.length = 0;\n\n        var groupedAnimations = groupAnimations(animations);\n        var toBeSortedAnimations = [];\n\n        forEach(groupedAnimations, function(animationEntry) {\n          toBeSortedAnimations.push({\n            domNode: getDomNode(animationEntry.from ? animationEntry.from.element : animationEntry.element),\n            fn: function triggerAnimationStart() {\n              // it's important that we apply the `ng-animate` CSS class and the\n              // temporary classes before we do any driver invoking since these\n              // CSS classes may be required for proper CSS detection.\n              animationEntry.beforeStart();\n\n              var startAnimationFn, closeFn = animationEntry.close;\n\n              // in the event that the element was removed before the digest runs or\n              // during the RAF sequencing then we should not trigger the animation.\n              var targetElement = animationEntry.anchors\n                  ? (animationEntry.from.element || animationEntry.to.element)\n                  : animationEntry.element;\n\n              if (getRunner(targetElement)) {\n                var operation = invokeFirstDriver(animationEntry);\n                if (operation) {\n                  startAnimationFn = operation.start;\n                }\n              }\n\n              if (!startAnimationFn) {\n                closeFn();\n              } else {\n                var animationRunner = startAnimationFn();\n                animationRunner.done(function(status) {\n                  closeFn(!status);\n                });\n                updateAnimationRunners(animationEntry, animationRunner);\n              }\n            }\n          });\n        });\n\n        // we need to sort each of the animations in order of parent to child\n        // relationships. This ensures that the child classes are applied at the\n        // right time.\n        $$rAFScheduler(sortAnimations(toBeSortedAnimations));\n      });\n\n      return runner;\n\n      // TODO(matsko): change to reference nodes\n      function getAnchorNodes(node) {\n        var SELECTOR = '[' + NG_ANIMATE_REF_ATTR + ']';\n        var items = node.hasAttribute(NG_ANIMATE_REF_ATTR)\n              ? [node]\n              : node.querySelectorAll(SELECTOR);\n        var anchors = [];\n        forEach(items, function(node) {\n          var attr = node.getAttribute(NG_ANIMATE_REF_ATTR);\n          if (attr && attr.length) {\n            anchors.push(node);\n          }\n        });\n        return anchors;\n      }\n\n      function groupAnimations(animations) {\n        var preparedAnimations = [];\n        var refLookup = {};\n        forEach(animations, function(animation, index) {\n          var element = animation.element;\n          var node = getDomNode(element);\n          var event = animation.event;\n          var enterOrMove = ['enter', 'move'].indexOf(event) >= 0;\n          var anchorNodes = animation.structural ? getAnchorNodes(node) : [];\n\n          if (anchorNodes.length) {\n            var direction = enterOrMove ? 'to' : 'from';\n\n            forEach(anchorNodes, function(anchor) {\n              var key = anchor.getAttribute(NG_ANIMATE_REF_ATTR);\n              refLookup[key] = refLookup[key] || {};\n              refLookup[key][direction] = {\n                animationID: index,\n                element: jqLite(anchor)\n              };\n            });\n          } else {\n            preparedAnimations.push(animation);\n          }\n        });\n\n        var usedIndicesLookup = {};\n        var anchorGroups = {};\n        forEach(refLookup, function(operations, key) {\n          var from = operations.from;\n          var to = operations.to;\n\n          if (!from || !to) {\n            // only one of these is set therefore we can't have an\n            // anchor animation since all three pieces are required\n            var index = from ? from.animationID : to.animationID;\n            var indexKey = index.toString();\n            if (!usedIndicesLookup[indexKey]) {\n              usedIndicesLookup[indexKey] = true;\n              preparedAnimations.push(animations[index]);\n            }\n            return;\n          }\n\n          var fromAnimation = animations[from.animationID];\n          var toAnimation = animations[to.animationID];\n          var lookupKey = from.animationID.toString();\n          if (!anchorGroups[lookupKey]) {\n            var group = anchorGroups[lookupKey] = {\n              structural: true,\n              beforeStart: function() {\n                fromAnimation.beforeStart();\n                toAnimation.beforeStart();\n              },\n              close: function() {\n                fromAnimation.close();\n                toAnimation.close();\n              },\n              classes: cssClassesIntersection(fromAnimation.classes, toAnimation.classes),\n              from: fromAnimation,\n              to: toAnimation,\n              anchors: [] // TODO(matsko): change to reference nodes\n            };\n\n            // the anchor animations require that the from and to elements both have at least\n            // one shared CSS class which effectively marries the two elements together to use\n            // the same animation driver and to properly sequence the anchor animation.\n            if (group.classes.length) {\n              preparedAnimations.push(group);\n            } else {\n              preparedAnimations.push(fromAnimation);\n              preparedAnimations.push(toAnimation);\n            }\n          }\n\n          anchorGroups[lookupKey].anchors.push({\n            'out': from.element, 'in': to.element\n          });\n        });\n\n        return preparedAnimations;\n      }\n\n      function cssClassesIntersection(a,b) {\n        a = a.split(' ');\n        b = b.split(' ');\n        var matches = [];\n\n        for (var i = 0; i < a.length; i++) {\n          var aa = a[i];\n          if (aa.substring(0,3) === 'ng-') continue;\n\n          for (var j = 0; j < b.length; j++) {\n            if (aa === b[j]) {\n              matches.push(aa);\n              break;\n            }\n          }\n        }\n\n        return matches.join(' ');\n      }\n\n      function invokeFirstDriver(animationDetails) {\n        // we loop in reverse order since the more general drivers (like CSS and JS)\n        // may attempt more elements, but custom drivers are more particular\n        for (var i = drivers.length - 1; i >= 0; i--) {\n          var driverName = drivers[i];\n          if (!$injector.has(driverName)) continue; // TODO(matsko): remove this check\n\n          var factory = $injector.get(driverName);\n          var driver = factory(animationDetails);\n          if (driver) {\n            return driver;\n          }\n        }\n      }\n\n      function beforeStart() {\n        element.addClass(NG_ANIMATE_CLASSNAME);\n        if (tempClasses) {\n          $$jqLite.addClass(element, tempClasses);\n        }\n        if (prepareClassName) {\n          $$jqLite.removeClass(element, prepareClassName);\n          prepareClassName = null;\n        }\n      }\n\n      function updateAnimationRunners(animation, newRunner) {\n        if (animation.from && animation.to) {\n          update(animation.from.element);\n          update(animation.to.element);\n        } else {\n          update(animation.element);\n        }\n\n        function update(element) {\n          getRunner(element).setHost(newRunner);\n        }\n      }\n\n      function handleDestroyedElement() {\n        var runner = getRunner(element);\n        if (runner && (event !== 'leave' || !options.$$domOperationFired)) {\n          runner.end();\n        }\n      }\n\n      function close(rejected) { // jshint ignore:line\n        element.off('$destroy', handleDestroyedElement);\n        removeRunner(element);\n\n        applyAnimationClasses(element, options);\n        applyAnimationStyles(element, options);\n        options.domOperation();\n\n        if (tempClasses) {\n          $$jqLite.removeClass(element, tempClasses);\n        }\n\n        element.removeClass(NG_ANIMATE_CLASSNAME);\n        runner.complete(!rejected);\n      }\n    };\n  }];\n}];\n\n/**\n * @ngdoc directive\n * @name ngAnimateSwap\n * @restrict A\n * @scope\n *\n * @description\n *\n * ngAnimateSwap is a animation-oriented directive that allows for the container to\n * be removed and entered in whenever the associated expression changes. A\n * common usecase for this directive is a rotating banner or slider component which\n * contains one image being present at a time. When the active image changes\n * then the old image will perform a `leave` animation and the new element\n * will be inserted via an `enter` animation.\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 the DOM |\n *\n * @example\n * <example name=\"ngAnimateSwap-directive\" module=\"ngAnimateSwapExample\"\n *          deps=\"angular-animate.js\"\n *          animations=\"true\" fixBase=\"true\">\n *   <file name=\"index.html\">\n *     <div class=\"container\" ng-controller=\"AppCtrl\">\n *       <div ng-animate-swap=\"number\" class=\"cell swap-animation\" ng-class=\"colorClass(number)\">\n *         {{ number }}\n *       </div>\n *     </div>\n *   </file>\n *   <file name=\"script.js\">\n *     angular.module('ngAnimateSwapExample', ['ngAnimate'])\n *       .controller('AppCtrl', ['$scope', '$interval', function($scope, $interval) {\n *         $scope.number = 0;\n *         $interval(function() {\n *           $scope.number++;\n *         }, 1000);\n *\n *         var colors = ['red','blue','green','yellow','orange'];\n *         $scope.colorClass = function(number) {\n *           return colors[number % colors.length];\n *         };\n *       }]);\n *   </file>\n *  <file name=\"animations.css\">\n *  .container {\n *    height:250px;\n *    width:250px;\n *    position:relative;\n *    overflow:hidden;\n *    border:2px solid black;\n *  }\n *  .container .cell {\n *    font-size:150px;\n *    text-align:center;\n *    line-height:250px;\n *    position:absolute;\n *    top:0;\n *    left:0;\n *    right:0;\n *    border-bottom:2px solid black;\n *  }\n *  .swap-animation.ng-enter, .swap-animation.ng-leave {\n *    transition:0.5s linear all;\n *  }\n *  .swap-animation.ng-enter {\n *    top:-250px;\n *  }\n *  .swap-animation.ng-enter-active {\n *    top:0px;\n *  }\n *  .swap-animation.ng-leave {\n *    top:0px;\n *  }\n *  .swap-animation.ng-leave-active {\n *    top:250px;\n *  }\n *  .red { background:red; }\n *  .green { background:green; }\n *  .blue { background:blue; }\n *  .yellow { background:yellow; }\n *  .orange { background:orange; }\n *  </file>\n * </example>\n */\nvar ngAnimateSwapDirective = ['$animate', '$rootScope', function($animate, $rootScope) {\n  return {\n    restrict: 'A',\n    transclude: 'element',\n    terminal: true,\n    priority: 600, // we use 600 here to ensure that the directive is caught before others\n    link: function(scope, $element, attrs, ctrl, $transclude) {\n      var previousElement, previousScope;\n      scope.$watchCollection(attrs.ngAnimateSwap || attrs['for'], function(value) {\n        if (previousElement) {\n          $animate.leave(previousElement);\n        }\n        if (previousScope) {\n          previousScope.$destroy();\n          previousScope = null;\n        }\n        if (value || value === 0) {\n          previousScope = scope.$new();\n          $transclude(previousScope, function(element) {\n            previousElement = element;\n            $animate.enter(element, null, $element);\n          });\n        }\n      });\n    }\n  };\n}];\n\n/* global angularAnimateModule: true,\n\n   ngAnimateSwapDirective,\n   $$AnimateAsyncRunFactory,\n   $$rAFSchedulerFactory,\n   $$AnimateChildrenDirective,\n   $$AnimateQueueProvider,\n   $$AnimationProvider,\n   $AnimateCssProvider,\n   $$AnimateCssDriverProvider,\n   $$AnimateJsProvider,\n   $$AnimateJsDriverProvider,\n*/\n\n/**\n * @ngdoc module\n * @name ngAnimate\n * @description\n *\n * The `ngAnimate` module provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via\n * callback hooks. Animations are not enabled by default, however, by including `ngAnimate` the animation hooks are enabled for an Angular app.\n *\n * <div doc-module-components=\"ngAnimate\"></div>\n *\n * # Usage\n * Simply put, there are two ways to make use of animations when ngAnimate is used: by using **CSS** and **JavaScript**. The former works purely based\n * using CSS (by using matching CSS selectors/styles) and the latter triggers animations that are registered via `module.animation()`. For\n * both CSS and JS animations the sole requirement is to have a matching `CSS class` that exists both in the registered animation and within\n * the HTML element that the animation will be triggered on.\n *\n * ## Directive Support\n * The following directives are \"animation aware\":\n *\n * | Directive                                                                                                | Supported Animations                                                     |\n * |----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|\n * | {@link ng.directive:ngRepeat#animations ngRepeat}                                                        | enter, leave and move                                                    |\n * | {@link ngRoute.directive:ngView#animations ngView}                                                       | enter and leave                                                          |\n * | {@link ng.directive:ngInclude#animations ngInclude}                                                      | enter and leave                                                          |\n * | {@link ng.directive:ngSwitch#animations ngSwitch}                                                        | enter and leave                                                          |\n * | {@link ng.directive:ngIf#animations ngIf}                                                                | enter and leave                                                          |\n * | {@link ng.directive:ngClass#animations ngClass}                                                          | add and remove (the CSS class(es) present)                               |\n * | {@link ng.directive:ngShow#animations ngShow} & {@link ng.directive:ngHide#animations ngHide}            | add and remove (the ng-hide class value)                                 |\n * | {@link ng.directive:form#animation-hooks form} & {@link ng.directive:ngModel#animation-hooks ngModel}    | add and remove (dirty, pristine, valid, invalid & all other validations) |\n * | {@link module:ngMessages#animations ngMessages}                                                          | add and remove (ng-active & ng-inactive)                                 |\n * | {@link module:ngMessages#animations ngMessage}                                                           | enter and leave                                                          |\n *\n * (More information can be found by visiting each the documentation associated with each directive.)\n *\n * ## CSS-based Animations\n *\n * CSS-based animations with ngAnimate are unique since they require no JavaScript code at all. By using a CSS class that we reference between our HTML\n * and CSS code we can create an animation that will be picked up by Angular when an the underlying directive performs an operation.\n *\n * The example below shows how an `enter` animation can be made possible on an element using `ng-if`:\n *\n * ```html\n * <div ng-if=\"bool\" class=\"fade\">\n *    Fade me in out\n * </div>\n * <button ng-click=\"bool=true\">Fade In!</button>\n * <button ng-click=\"bool=false\">Fade Out!</button>\n * ```\n *\n * Notice the CSS class **fade**? We can now create the CSS transition code that references this class:\n *\n * ```css\n * /&#42; The starting CSS styles for the enter animation &#42;/\n * .fade.ng-enter {\n *   transition:0.5s linear all;\n *   opacity:0;\n * }\n *\n * /&#42; The finishing CSS styles for the enter animation &#42;/\n * .fade.ng-enter.ng-enter-active {\n *   opacity:1;\n * }\n * ```\n *\n * The key thing to remember here is that, depending on the animation event (which each of the directives above trigger depending on what's going on) two\n * generated CSS classes will be applied to the element; in the example above we have `.ng-enter` and `.ng-enter-active`. For CSS transitions, the transition\n * code **must** be defined within the starting CSS class (in this case `.ng-enter`). The destination class is what the transition will animate towards.\n *\n * If for example we wanted to create animations for `leave` and `move` (ngRepeat triggers move) then we can do so using the same CSS naming conventions:\n *\n * ```css\n * /&#42; now the element will fade out before it is removed from the DOM &#42;/\n * .fade.ng-leave {\n *   transition:0.5s linear all;\n *   opacity:1;\n * }\n * .fade.ng-leave.ng-leave-active {\n *   opacity:0;\n * }\n * ```\n *\n * We can also make use of **CSS Keyframes** by referencing the keyframe animation within the starting CSS class:\n *\n * ```css\n * /&#42; there is no need to define anything inside of the destination\n * CSS class since the keyframe will take charge of the animation &#42;/\n * .fade.ng-leave {\n *   animation: my_fade_animation 0.5s linear;\n *   -webkit-animation: my_fade_animation 0.5s linear;\n * }\n *\n * @keyframes my_fade_animation {\n *   from { opacity:1; }\n *   to { opacity:0; }\n * }\n *\n * @-webkit-keyframes my_fade_animation {\n *   from { opacity:1; }\n *   to { opacity:0; }\n * }\n * ```\n *\n * Feel free also mix transitions and keyframes together as well as any other CSS classes on the same element.\n *\n * ### CSS Class-based Animations\n *\n * Class-based animations (animations that are triggered via `ngClass`, `ngShow`, `ngHide` and some other directives) have a slightly different\n * naming convention. Class-based animations are basic enough that a standard transition or keyframe can be referenced on the class being added\n * and removed.\n *\n * For example if we wanted to do a CSS animation for `ngHide` then we place an animation on the `.ng-hide` CSS class:\n *\n * ```html\n * <div ng-show=\"bool\" class=\"fade\">\n *   Show and hide me\n * </div>\n * <button ng-click=\"bool=true\">Toggle</button>\n *\n * <style>\n * .fade.ng-hide {\n *   transition:0.5s linear all;\n *   opacity:0;\n * }\n * </style>\n * ```\n *\n * All that is going on here with ngShow/ngHide behind the scenes is the `.ng-hide` class is added/removed (when the hidden state is valid). Since\n * ngShow and ngHide are animation aware then we can match up a transition and ngAnimate handles the rest.\n *\n * In addition the addition and removal of the CSS class, ngAnimate also provides two helper methods that we can use to further decorate the animation\n * with CSS styles.\n *\n * ```html\n * <div ng-class=\"{on:onOff}\" class=\"highlight\">\n *   Highlight this box\n * </div>\n * <button ng-click=\"onOff=!onOff\">Toggle</button>\n *\n * <style>\n * .highlight {\n *   transition:0.5s linear all;\n * }\n * .highlight.on-add {\n *   background:white;\n * }\n * .highlight.on {\n *   background:yellow;\n * }\n * .highlight.on-remove {\n *   background:black;\n * }\n * </style>\n * ```\n *\n * We can also make use of CSS keyframes by placing them within the CSS classes.\n *\n *\n * ### CSS Staggering Animations\n * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a\n * curtain-like effect. The ngAnimate module (versions >=1.2) supports staggering animations and the stagger effect can be\n * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for\n * the animation. The style property expected within the stagger class can either be a **transition-delay** or an\n * **animation-delay** property (or both if your animation contains both transitions and keyframe animations).\n *\n * ```css\n * .my-animation.ng-enter {\n *   /&#42; standard transition code &#42;/\n *   transition: 1s linear all;\n *   opacity:0;\n * }\n * .my-animation.ng-enter-stagger {\n *   /&#42; this will have a 100ms delay between each successive leave animation &#42;/\n *   transition-delay: 0.1s;\n *\n *   /&#42; As of 1.4.4, this must always be set: it signals ngAnimate\n *     to not accidentally inherit a delay property from another CSS class &#42;/\n *   transition-duration: 0s;\n * }\n * .my-animation.ng-enter.ng-enter-active {\n *   /&#42; standard transition styles &#42;/\n *   opacity:1;\n * }\n * ```\n *\n * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations\n * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this\n * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation\n * will also be reset if one or more animation frames have passed since the multiple calls to `$animate` were fired.\n *\n * The following code will issue the **ng-leave-stagger** event on the element provided:\n *\n * ```js\n * var kids = parent.children();\n *\n * $animate.leave(kids[0]); //stagger index=0\n * $animate.leave(kids[1]); //stagger index=1\n * $animate.leave(kids[2]); //stagger index=2\n * $animate.leave(kids[3]); //stagger index=3\n * $animate.leave(kids[4]); //stagger index=4\n *\n * window.requestAnimationFrame(function() {\n *   //stagger has reset itself\n *   $animate.leave(kids[5]); //stagger index=0\n *   $animate.leave(kids[6]); //stagger index=1\n *\n *   $scope.$digest();\n * });\n * ```\n *\n * Stagger animations are currently only supported within CSS-defined animations.\n *\n * ### The `ng-animate` CSS class\n *\n * When ngAnimate is animating an element it will apply the `ng-animate` CSS class to the element for the duration of the animation.\n * This is a temporary CSS class and it will be removed once the animation is over (for both JavaScript and CSS-based animations).\n *\n * Therefore, animations can be applied to an element using this temporary class directly via CSS.\n *\n * ```css\n * .zipper.ng-animate {\n *   transition:0.5s linear all;\n * }\n * .zipper.ng-enter {\n *   opacity:0;\n * }\n * .zipper.ng-enter.ng-enter-active {\n *   opacity:1;\n * }\n * .zipper.ng-leave {\n *   opacity:1;\n * }\n * .zipper.ng-leave.ng-leave-active {\n *   opacity:0;\n * }\n * ```\n *\n * (Note that the `ng-animate` CSS class is reserved and it cannot be applied on an element directly since ngAnimate will always remove\n * the CSS class once an animation has completed.)\n *\n *\n * ### The `ng-[event]-prepare` class\n *\n * This is a special class that can be used to prevent unwanted flickering / flash of content before\n * the actual animation starts. The class is added as soon as an animation is initialized, but removed\n * before the actual animation starts (after waiting for a $digest).\n * It is also only added for *structural* animations (`enter`, `move`, and `leave`).\n *\n * In practice, flickering can appear when nesting elements with structural animations such as `ngIf`\n * into elements that have class-based animations such as `ngClass`.\n *\n * ```html\n * <div ng-class=\"{red: myProp}\">\n *   <div ng-class=\"{blue: myProp}\">\n *     <div class=\"message\" ng-if=\"myProp\"></div>\n *   </div>\n * </div>\n * ```\n *\n * It is possible that during the `enter` animation, the `.message` div will be briefly visible before it starts animating.\n * In that case, you can add styles to the CSS that make sure the element stays hidden before the animation starts:\n *\n * ```css\n * .message.ng-enter-prepare {\n *   opacity: 0;\n * }\n *\n * ```\n *\n * ## JavaScript-based Animations\n *\n * ngAnimate also allows for animations to be consumed by JavaScript code. The approach is similar to CSS-based animations (where there is a shared\n * CSS class that is referenced in our HTML code) but in addition we need to register the JavaScript animation on the module. By making use of the\n * `module.animation()` module function we can register the animation.\n *\n * Let's see an example of a enter/leave animation using `ngRepeat`:\n *\n * ```html\n * <div ng-repeat=\"item in items\" class=\"slide\">\n *   {{ item }}\n * </div>\n * ```\n *\n * See the **slide** CSS class? Let's use that class to define an animation that we'll structure in our module code by using `module.animation`:\n *\n * ```js\n * myModule.animation('.slide', [function() {\n *   return {\n *     // make note that other events (like addClass/removeClass)\n *     // have different function input parameters\n *     enter: function(element, doneFn) {\n *       jQuery(element).fadeIn(1000, doneFn);\n *\n *       // remember to call doneFn so that angular\n *       // knows that the animation has concluded\n *     },\n *\n *     move: function(element, doneFn) {\n *       jQuery(element).fadeIn(1000, doneFn);\n *     },\n *\n *     leave: function(element, doneFn) {\n *       jQuery(element).fadeOut(1000, doneFn);\n *     }\n *   }\n * }]);\n * ```\n *\n * The nice thing about JS-based animations is that we can inject other services and make use of advanced animation libraries such as\n * greensock.js and velocity.js.\n *\n * If our animation code class-based (meaning that something like `ngClass`, `ngHide` and `ngShow` triggers it) then we can still define\n * our animations inside of the same registered animation, however, the function input arguments are a bit different:\n *\n * ```html\n * <div ng-class=\"color\" class=\"colorful\">\n *   this box is moody\n * </div>\n * <button ng-click=\"color='red'\">Change to red</button>\n * <button ng-click=\"color='blue'\">Change to blue</button>\n * <button ng-click=\"color='green'\">Change to green</button>\n * ```\n *\n * ```js\n * myModule.animation('.colorful', [function() {\n *   return {\n *     addClass: function(element, className, doneFn) {\n *       // do some cool animation and call the doneFn\n *     },\n *     removeClass: function(element, className, doneFn) {\n *       // do some cool animation and call the doneFn\n *     },\n *     setClass: function(element, addedClass, removedClass, doneFn) {\n *       // do some cool animation and call the doneFn\n *     }\n *   }\n * }]);\n * ```\n *\n * ## CSS + JS Animations Together\n *\n * AngularJS 1.4 and higher has taken steps to make the amalgamation of CSS and JS animations more flexible. However, unlike earlier versions of Angular,\n * defining CSS and JS animations to work off of the same CSS class will not work anymore. Therefore the example below will only result in **JS animations taking\n * charge of the animation**:\n *\n * ```html\n * <div ng-if=\"bool\" class=\"slide\">\n *   Slide in and out\n * </div>\n * ```\n *\n * ```js\n * myModule.animation('.slide', [function() {\n *   return {\n *     enter: function(element, doneFn) {\n *       jQuery(element).slideIn(1000, doneFn);\n *     }\n *   }\n * }]);\n * ```\n *\n * ```css\n * .slide.ng-enter {\n *   transition:0.5s linear all;\n *   transform:translateY(-100px);\n * }\n * .slide.ng-enter.ng-enter-active {\n *   transform:translateY(0);\n * }\n * ```\n *\n * Does this mean that CSS and JS animations cannot be used together? Do JS-based animations always have higher priority? We can make up for the\n * lack of CSS animations by using the `$animateCss` service to trigger our own tweaked-out, CSS-based animations directly from\n * our own JS-based animation code:\n *\n * ```js\n * myModule.animation('.slide', ['$animateCss', function($animateCss) {\n *   return {\n *     enter: function(element) {\n*        // this will trigger `.slide.ng-enter` and `.slide.ng-enter-active`.\n *       return $animateCss(element, {\n *         event: 'enter',\n *         structural: true\n *       });\n *     }\n *   }\n * }]);\n * ```\n *\n * The nice thing here is that we can save bandwidth by sticking to our CSS-based animation code and we don't need to rely on a 3rd-party animation framework.\n *\n * The `$animateCss` service is very powerful since we can feed in all kinds of extra properties that will be evaluated and fed into a CSS transition or\n * keyframe animation. For example if we wanted to animate the height of an element while adding and removing classes then we can do so by providing that\n * data into `$animateCss` directly:\n *\n * ```js\n * myModule.animation('.slide', ['$animateCss', function($animateCss) {\n *   return {\n *     enter: function(element) {\n *       return $animateCss(element, {\n *         event: 'enter',\n *         structural: true,\n *         addClass: 'maroon-setting',\n *         from: { height:0 },\n *         to: { height: 200 }\n *       });\n *     }\n *   }\n * }]);\n * ```\n *\n * Now we can fill in the rest via our transition CSS code:\n *\n * ```css\n * /&#42; the transition tells ngAnimate to make the animation happen &#42;/\n * .slide.ng-enter { transition:0.5s linear all; }\n *\n * /&#42; this extra CSS class will be absorbed into the transition\n * since the $animateCss code is adding the class &#42;/\n * .maroon-setting { background:red; }\n * ```\n *\n * And `$animateCss` will figure out the rest. Just make sure to have the `done()` callback fire the `doneFn` function to signal when the animation is over.\n *\n * To learn more about what's possible be sure to visit the {@link ngAnimate.$animateCss $animateCss service}.\n *\n * ## Animation Anchoring (via `ng-animate-ref`)\n *\n * ngAnimate in AngularJS 1.4 comes packed with the ability to cross-animate elements between\n * structural areas of an application (like views) by pairing up elements using an attribute\n * called `ng-animate-ref`.\n *\n * Let's say for example we have two views that are managed by `ng-view` and we want to show\n * that there is a relationship between two components situated in within these views. By using the\n * `ng-animate-ref` attribute we can identify that the two components are paired together and we\n * can then attach an animation, which is triggered when the view changes.\n *\n * Say for example we have the following template code:\n *\n * ```html\n * <!-- index.html -->\n * <div ng-view class=\"view-animation\">\n * </div>\n *\n * <!-- home.html -->\n * <a href=\"#/banner-page\">\n *   <img src=\"./banner.jpg\" class=\"banner\" ng-animate-ref=\"banner\">\n * </a>\n *\n * <!-- banner-page.html -->\n * <img src=\"./banner.jpg\" class=\"banner\" ng-animate-ref=\"banner\">\n * ```\n *\n * Now, when the view changes (once the link is clicked), ngAnimate will examine the\n * HTML contents to see if there is a match reference between any components in the view\n * that is leaving and the view that is entering. It will scan both the view which is being\n * removed (leave) and inserted (enter) to see if there are any paired DOM elements that\n * contain a matching ref value.\n *\n * The two images match since they share the same ref value. ngAnimate will now create a\n * transport element (which is a clone of the first image element) and it will then attempt\n * to animate to the position of the second image element in the next view. For the animation to\n * work a special CSS class called `ng-anchor` will be added to the transported element.\n *\n * We can now attach a transition onto the `.banner.ng-anchor` CSS class and then\n * ngAnimate will handle the entire transition for us as well as the addition and removal of\n * any changes of CSS classes between the elements:\n *\n * ```css\n * .banner.ng-anchor {\n *   /&#42; this animation will last for 1 second since there are\n *          two phases to the animation (an `in` and an `out` phase) &#42;/\n *   transition:0.5s linear all;\n * }\n * ```\n *\n * We also **must** include animations for the views that are being entered and removed\n * (otherwise anchoring wouldn't be possible since the new view would be inserted right away).\n *\n * ```css\n * .view-animation.ng-enter, .view-animation.ng-leave {\n *   transition:0.5s linear all;\n *   position:fixed;\n *   left:0;\n *   top:0;\n *   width:100%;\n * }\n * .view-animation.ng-enter {\n *   transform:translateX(100%);\n * }\n * .view-animation.ng-leave,\n * .view-animation.ng-enter.ng-enter-active {\n *   transform:translateX(0%);\n * }\n * .view-animation.ng-leave.ng-leave-active {\n *   transform:translateX(-100%);\n * }\n * ```\n *\n * Now we can jump back to the anchor animation. When the animation happens, there are two stages that occur:\n * an `out` and an `in` stage. The `out` stage happens first and that is when the element is animated away\n * from its origin. Once that animation is over then the `in` stage occurs which animates the\n * element to its destination. The reason why there are two animations is to give enough time\n * for the enter animation on the new element to be ready.\n *\n * The example above sets up a transition for both the in and out phases, but we can also target the out or\n * in phases directly via `ng-anchor-out` and `ng-anchor-in`.\n *\n * ```css\n * .banner.ng-anchor-out {\n *   transition: 0.5s linear all;\n *\n *   /&#42; the scale will be applied during the out animation,\n *          but will be animated away when the in animation runs &#42;/\n *   transform: scale(1.2);\n * }\n *\n * .banner.ng-anchor-in {\n *   transition: 1s linear all;\n * }\n * ```\n *\n *\n *\n *\n * ### Anchoring Demo\n *\n  <example module=\"anchoringExample\"\n           name=\"anchoringExample\"\n           id=\"anchoringExample\"\n           deps=\"angular-animate.js;angular-route.js\"\n           animations=\"true\">\n    <file name=\"index.html\">\n      <a href=\"#/\">Home</a>\n      <hr />\n      <div class=\"view-container\">\n        <div ng-view class=\"view\"></div>\n      </div>\n    </file>\n    <file name=\"script.js\">\n      angular.module('anchoringExample', ['ngAnimate', 'ngRoute'])\n        .config(['$routeProvider', function($routeProvider) {\n          $routeProvider.when('/', {\n            templateUrl: 'home.html',\n            controller: 'HomeController as home'\n          });\n          $routeProvider.when('/profile/:id', {\n            templateUrl: 'profile.html',\n            controller: 'ProfileController as profile'\n          });\n        }])\n        .run(['$rootScope', function($rootScope) {\n          $rootScope.records = [\n            { id:1, title: \"Miss Beulah Roob\" },\n            { id:2, title: \"Trent Morissette\" },\n            { id:3, title: \"Miss Ava Pouros\" },\n            { id:4, title: \"Rod Pouros\" },\n            { id:5, title: \"Abdul Rice\" },\n            { id:6, title: \"Laurie Rutherford Sr.\" },\n            { id:7, title: \"Nakia McLaughlin\" },\n            { id:8, title: \"Jordon Blanda DVM\" },\n            { id:9, title: \"Rhoda Hand\" },\n            { id:10, title: \"Alexandrea Sauer\" }\n          ];\n        }])\n        .controller('HomeController', [function() {\n          //empty\n        }])\n        .controller('ProfileController', ['$rootScope', '$routeParams', function($rootScope, $routeParams) {\n          var index = parseInt($routeParams.id, 10);\n          var record = $rootScope.records[index - 1];\n\n          this.title = record.title;\n          this.id = record.id;\n        }]);\n    </file>\n    <file name=\"home.html\">\n      <h2>Welcome to the home page</h1>\n      <p>Please click on an element</p>\n      <a class=\"record\"\n         ng-href=\"#/profile/{{ record.id }}\"\n         ng-animate-ref=\"{{ record.id }}\"\n         ng-repeat=\"record in records\">\n        {{ record.title }}\n      </a>\n    </file>\n    <file name=\"profile.html\">\n      <div class=\"profile record\" ng-animate-ref=\"{{ profile.id }}\">\n        {{ profile.title }}\n      </div>\n    </file>\n    <file name=\"animations.css\">\n      .record {\n        display:block;\n        font-size:20px;\n      }\n      .profile {\n        background:black;\n        color:white;\n        font-size:100px;\n      }\n      .view-container {\n        position:relative;\n      }\n      .view-container > .view.ng-animate {\n        position:absolute;\n        top:0;\n        left:0;\n        width:100%;\n        min-height:500px;\n      }\n      .view.ng-enter, .view.ng-leave,\n      .record.ng-anchor {\n        transition:0.5s linear all;\n      }\n      .view.ng-enter {\n        transform:translateX(100%);\n      }\n      .view.ng-enter.ng-enter-active, .view.ng-leave {\n        transform:translateX(0%);\n      }\n      .view.ng-leave.ng-leave-active {\n        transform:translateX(-100%);\n      }\n      .record.ng-anchor-out {\n        background:red;\n      }\n    </file>\n  </example>\n *\n * ### How is the element transported?\n *\n * When an anchor animation occurs, ngAnimate will clone the starting element and position it exactly where the starting\n * element is located on screen via absolute positioning. The cloned element will be placed inside of the root element\n * of the application (where ng-app was defined) and all of the CSS classes of the starting element will be applied. The\n * element will then animate into the `out` and `in` animations and will eventually reach the coordinates and match\n * the dimensions of the destination element. During the entire animation a CSS class of `.ng-animate-shim` will be applied\n * to both the starting and destination elements in order to hide them from being visible (the CSS styling for the class\n * is: `visibility:hidden`). Once the anchor reaches its destination then it will be removed and the destination element\n * will become visible since the shim class will be removed.\n *\n * ### How is the morphing handled?\n *\n * CSS Anchoring relies on transitions and keyframes and the internal code is intelligent enough to figure out\n * what CSS classes differ between the starting element and the destination element. These different CSS classes\n * will be added/removed on the anchor element and a transition will be applied (the transition that is provided\n * in the anchor class). Long story short, ngAnimate will figure out what classes to add and remove which will\n * make the transition of the element as smooth and automatic as possible. Be sure to use simple CSS classes that\n * do not rely on DOM nesting structure so that the anchor element appears the same as the starting element (since\n * the cloned element is placed inside of root element which is likely close to the body element).\n *\n * Note that if the root element is on the `<html>` element then the cloned node will be placed inside of body.\n *\n *\n * ## Using $animate in your directive code\n *\n * So far we've explored how to feed in animations into an Angular application, but how do we trigger animations within our own directives in our application?\n * By injecting the `$animate` service into our directive code, we can trigger structural and class-based hooks which can then be consumed by animations. Let's\n * imagine we have a greeting box that shows and hides itself when the data changes\n *\n * ```html\n * <greeting-box active=\"onOrOff\">Hi there</greeting-box>\n * ```\n *\n * ```js\n * ngModule.directive('greetingBox', ['$animate', function($animate) {\n *   return function(scope, element, attrs) {\n *     attrs.$observe('active', function(value) {\n *       value ? $animate.addClass(element, 'on') : $animate.removeClass(element, 'on');\n *     });\n *   });\n * }]);\n * ```\n *\n * Now the `on` CSS class is added and removed on the greeting box component. Now if we add a CSS class on top of the greeting box element\n * in our HTML code then we can trigger a CSS or JS animation to happen.\n *\n * ```css\n * /&#42; normally we would create a CSS class to reference on the element &#42;/\n * greeting-box.on { transition:0.5s linear all; background:green; color:white; }\n * ```\n *\n * The `$animate` service contains a variety of other methods like `enter`, `leave`, `animate` and `setClass`. To learn more about what's\n * possible be sure to visit the {@link ng.$animate $animate service API page}.\n *\n *\n * ## Callbacks and Promises\n *\n * When `$animate` is called it returns a promise that can be used to capture when the animation has ended. Therefore if we were to trigger\n * an animation (within our directive code) then we can continue performing directive and scope related activities after the animation has\n * ended by chaining onto the returned promise that animation method returns.\n *\n * ```js\n * // somewhere within the depths of the directive\n * $animate.enter(element, parent).then(function() {\n *   //the animation has completed\n * });\n * ```\n *\n * (Note that earlier versions of Angular prior to v1.4 required the promise code to be wrapped using `$scope.$apply(...)`. This is not the case\n * anymore.)\n *\n * In addition to the animation promise, we can also make use of animation-related callbacks within our directives and controller code by registering\n * an event listener using the `$animate` service. Let's say for example that an animation was triggered on our view\n * routing controller to hook into that:\n *\n * ```js\n * ngModule.controller('HomePageController', ['$animate', function($animate) {\n *   $animate.on('enter', ngViewElement, function(element) {\n *     // the animation for this route has completed\n *   }]);\n * }])\n * ```\n *\n * (Note that you will need to trigger a digest within the callback to get angular to notice any scope-related changes.)\n */\n\n/**\n * @ngdoc service\n * @name $animate\n * @kind object\n *\n * @description\n * The ngAnimate `$animate` service documentation is the same for the core `$animate` service.\n *\n * Click here {@link ng.$animate to learn more about animations with `$animate`}.\n */\nangular.module('ngAnimate', [])\n  .directive('ngAnimateSwap', ngAnimateSwapDirective)\n\n  .directive('ngAnimateChildren', $$AnimateChildrenDirective)\n  .factory('$$rAFScheduler', $$rAFSchedulerFactory)\n\n  .provider('$$animateQueue', $$AnimateQueueProvider)\n  .provider('$$animation', $$AnimationProvider)\n\n  .provider('$animateCss', $AnimateCssProvider)\n  .provider('$$animateCssDriver', $$AnimateCssDriverProvider)\n\n  .provider('$$animateJs', $$AnimateJsProvider)\n  .provider('$$animateJsDriver', $$AnimateJsDriverProvider);\n\n\n})(window, window.angular);\n\n/*!\n * ionic.bundle.js is a concatenation of:\n * ionic.js, angular.js, angular-animate.js,\n * angular-sanitize.js, angular-ui-router.js,\n * and ionic-angular.js\n */\n\n/**\n * @license AngularJS v1.5.3\n * (c) 2010-2016 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n *     Any commits to this file should be reviewed with security in mind.  *\n *   Changes to this file can potentially create security vulnerabilities. *\n *          An approval from 2 Core members with history of modifying      *\n *                         this file is required.                          *\n *                                                                         *\n *  Does the change somehow allow for arbitrary javascript to be executed? *\n *    Or allows for someone to change the prototype of built-in objects?   *\n *     Or gives undesired access to variables likes document or window?    *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\nvar $sanitizeMinErr = angular.$$minErr('$sanitize');\n\n/**\n * @ngdoc module\n * @name ngSanitize\n * @description\n *\n * # ngSanitize\n *\n * The `ngSanitize` module provides functionality to sanitize HTML.\n *\n *\n * <div doc-module-components=\"ngSanitize\"></div>\n *\n * See {@link ngSanitize.$sanitize `$sanitize`} for usage.\n */\n\n/**\n * @ngdoc service\n * @name $sanitize\n * @kind function\n *\n * @description\n *   Sanitizes an html string by stripping all potentially dangerous tokens.\n *\n *   The input is sanitized by parsing the HTML into tokens. All safe tokens (from a whitelist) are\n *   then serialized back to properly escaped html string. This means that no unsafe input can make\n *   it into the returned string.\n *\n *   The whitelist for URL sanitization of attribute values is configured using the functions\n *   `aHrefSanitizationWhitelist` and `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider\n *   `$compileProvider`}.\n *\n *   The input may also contain SVG markup if this is enabled via {@link $sanitizeProvider}.\n *\n * @param {string} html HTML input.\n * @returns {string} Sanitized HTML.\n *\n * @example\n   <example module=\"sanitizeExample\" deps=\"angular-sanitize.js\">\n   <file name=\"index.html\">\n     <script>\n         angular.module('sanitizeExample', ['ngSanitize'])\n           .controller('ExampleController', ['$scope', '$sce', function($scope, $sce) {\n             $scope.snippet =\n               '<p style=\"color:blue\">an html\\n' +\n               '<em onmouseover=\"this.textContent=\\'PWN3D!\\'\">click here</em>\\n' +\n               'snippet</p>';\n             $scope.deliberatelyTrustDangerousSnippet = function() {\n               return $sce.trustAsHtml($scope.snippet);\n             };\n           }]);\n     </script>\n     <div ng-controller=\"ExampleController\">\n        Snippet: <textarea ng-model=\"snippet\" cols=\"60\" rows=\"3\"></textarea>\n       <table>\n         <tr>\n           <td>Directive</td>\n           <td>How</td>\n           <td>Source</td>\n           <td>Rendered</td>\n         </tr>\n         <tr id=\"bind-html-with-sanitize\">\n           <td>ng-bind-html</td>\n           <td>Automatically uses $sanitize</td>\n           <td><pre>&lt;div ng-bind-html=\"snippet\"&gt;<br/>&lt;/div&gt;</pre></td>\n           <td><div ng-bind-html=\"snippet\"></div></td>\n         </tr>\n         <tr id=\"bind-html-with-trust\">\n           <td>ng-bind-html</td>\n           <td>Bypass $sanitize by explicitly trusting the dangerous value</td>\n           <td>\n           <pre>&lt;div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"&gt;\n&lt;/div&gt;</pre>\n           </td>\n           <td><div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"></div></td>\n         </tr>\n         <tr id=\"bind-default\">\n           <td>ng-bind</td>\n           <td>Automatically escapes</td>\n           <td><pre>&lt;div ng-bind=\"snippet\"&gt;<br/>&lt;/div&gt;</pre></td>\n           <td><div ng-bind=\"snippet\"></div></td>\n         </tr>\n       </table>\n       </div>\n   </file>\n   <file name=\"protractor.js\" type=\"protractor\">\n     it('should sanitize the html snippet by default', function() {\n       expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).\n         toBe('<p>an html\\n<em>click here</em>\\nsnippet</p>');\n     });\n\n     it('should inline raw snippet if bound to a trusted value', function() {\n       expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).\n         toBe(\"<p style=\\\"color:blue\\\">an html\\n\" +\n              \"<em onmouseover=\\\"this.textContent='PWN3D!'\\\">click here</em>\\n\" +\n              \"snippet</p>\");\n     });\n\n     it('should escape snippet without any filter', function() {\n       expect(element(by.css('#bind-default div')).getInnerHtml()).\n         toBe(\"&lt;p style=\\\"color:blue\\\"&gt;an html\\n\" +\n              \"&lt;em onmouseover=\\\"this.textContent='PWN3D!'\\\"&gt;click here&lt;/em&gt;\\n\" +\n              \"snippet&lt;/p&gt;\");\n     });\n\n     it('should update', function() {\n       element(by.model('snippet')).clear();\n       element(by.model('snippet')).sendKeys('new <b onclick=\"alert(1)\">text</b>');\n       expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).\n         toBe('new <b>text</b>');\n       expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe(\n         'new <b onclick=\"alert(1)\">text</b>');\n       expect(element(by.css('#bind-default div')).getInnerHtml()).toBe(\n         \"new &lt;b onclick=\\\"alert(1)\\\"&gt;text&lt;/b&gt;\");\n     });\n   </file>\n   </example>\n */\n\n\n/**\n * @ngdoc provider\n * @name $sanitizeProvider\n *\n * @description\n * Creates and configures {@link $sanitize} instance.\n */\nfunction $SanitizeProvider() {\n  var svgEnabled = false;\n\n  this.$get = ['$$sanitizeUri', function($$sanitizeUri) {\n    if (svgEnabled) {\n      angular.extend(validElements, svgElements);\n    }\n    return function(html) {\n      var buf = [];\n      htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) {\n        return !/^unsafe:/.test($$sanitizeUri(uri, isImage));\n      }));\n      return buf.join('');\n    };\n  }];\n\n\n  /**\n   * @ngdoc method\n   * @name $sanitizeProvider#enableSvg\n   * @kind function\n   *\n   * @description\n   * Enables a subset of svg to be supported by the sanitizer.\n   *\n   * <div class=\"alert alert-warning\">\n   *   <p>By enabling this setting without taking other precautions, you might expose your\n   *   application to click-hijacking attacks. In these attacks, sanitized svg elements could be positioned\n   *   outside of the containing element and be rendered over other elements on the page (e.g. a login\n   *   link). Such behavior can then result in phishing incidents.</p>\n   *\n   *   <p>To protect against these, explicitly setup `overflow: hidden` css rule for all potential svg\n   *   tags within the sanitized content:</p>\n   *\n   *   <br>\n   *\n   *   <pre><code>\n   *   .rootOfTheIncludedContent svg {\n   *     overflow: hidden !important;\n   *   }\n   *   </code></pre>\n   * </div>\n   *\n   * @param {boolean=} regexp New regexp to whitelist urls with.\n   * @returns {boolean|ng.$sanitizeProvider} Returns the currently configured value if called\n   *    without an argument or self for chaining otherwise.\n   */\n  this.enableSvg = function(enableSvg) {\n    if (angular.isDefined(enableSvg)) {\n      svgEnabled = enableSvg;\n      return this;\n    } else {\n      return svgEnabled;\n    }\n  };\n}\n\nfunction sanitizeText(chars) {\n  var buf = [];\n  var writer = htmlSanitizeWriter(buf, angular.noop);\n  writer.chars(chars);\n  return buf.join('');\n}\n\n\n// Regular Expressions for parsing tags and attributes\nvar SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\n  // Match everything outside of normal chars and \" (quote character)\n  NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n\n\n// Good source of info about elements and attributes\n// http://dev.w3.org/html5/spec/Overview.html#semantics\n// http://simon.html5.org/html-elements\n\n// Safe Void Elements - HTML5\n// http://dev.w3.org/html5/spec/Overview.html#void-elements\nvar voidElements = toMap(\"area,br,col,hr,img,wbr\");\n\n// Elements that you can, intentionally, leave open (and which close themselves)\n// http://dev.w3.org/html5/spec/Overview.html#optional-tags\nvar optionalEndTagBlockElements = toMap(\"colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr\"),\n    optionalEndTagInlineElements = toMap(\"rp,rt\"),\n    optionalEndTagElements = angular.extend({},\n                                            optionalEndTagInlineElements,\n                                            optionalEndTagBlockElements);\n\n// Safe Block Elements - HTML5\nvar blockElements = angular.extend({}, optionalEndTagBlockElements, toMap(\"address,article,\" +\n        \"aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,\" +\n        \"h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul\"));\n\n// Inline Elements - HTML5\nvar inlineElements = angular.extend({}, optionalEndTagInlineElements, toMap(\"a,abbr,acronym,b,\" +\n        \"bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,\" +\n        \"samp,small,span,strike,strong,sub,sup,time,tt,u,var\"));\n\n// SVG Elements\n// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Elements\n// Note: the elements animate,animateColor,animateMotion,animateTransform,set are intentionally omitted.\n// They can potentially allow for arbitrary javascript to be executed. See #11290\nvar svgElements = toMap(\"circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,\" +\n        \"hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,\" +\n        \"radialGradient,rect,stop,svg,switch,text,title,tspan\");\n\n// Blocked Elements (will be stripped)\nvar blockedElements = toMap(\"script,style\");\n\nvar validElements = angular.extend({},\n                                   voidElements,\n                                   blockElements,\n                                   inlineElements,\n                                   optionalEndTagElements);\n\n//Attributes that have href and hence need to be sanitized\nvar uriAttrs = toMap(\"background,cite,href,longdesc,src,xlink:href\");\n\nvar htmlAttrs = toMap('abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,' +\n    'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,' +\n    'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,' +\n    'scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,' +\n    'valign,value,vspace,width');\n\n// SVG attributes (without \"id\" and \"name\" attributes)\n// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Attributes\nvar svgAttrs = toMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,' +\n    'baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,' +\n    'cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,' +\n    'font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,' +\n    'height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,' +\n    'marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,' +\n    'max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,' +\n    'path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,' +\n    'requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,' +\n    'stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,' +\n    'stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,' +\n    'stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,' +\n    'underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,' +\n    'width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,' +\n    'xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan', true);\n\nvar validAttrs = angular.extend({},\n                                uriAttrs,\n                                svgAttrs,\n                                htmlAttrs);\n\nfunction toMap(str, lowercaseKeys) {\n  var obj = {}, items = str.split(','), i;\n  for (i = 0; i < items.length; i++) {\n    obj[lowercaseKeys ? angular.lowercase(items[i]) : items[i]] = true;\n  }\n  return obj;\n}\n\nvar inertBodyElement;\n(function(window) {\n  var doc;\n  if (window.document && window.document.implementation) {\n    doc = window.document.implementation.createHTMLDocument(\"inert\");\n  } else {\n    throw $sanitizeMinErr('noinert', \"Can't create an inert html document\");\n  }\n  var docElement = doc.documentElement || doc.getDocumentElement();\n  var bodyElements = docElement.getElementsByTagName('body');\n\n  // usually there should be only one body element in the document, but IE doesn't have any, so we need to create one\n  if (bodyElements.length === 1) {\n    inertBodyElement = bodyElements[0];\n  } else {\n    var html = doc.createElement('html');\n    inertBodyElement = doc.createElement('body');\n    html.appendChild(inertBodyElement);\n    doc.appendChild(html);\n  }\n})(window);\n\n/**\n * @example\n * htmlParser(htmlString, {\n *     start: function(tag, attrs) {},\n *     end: function(tag) {},\n *     chars: function(text) {},\n *     comment: function(text) {}\n * });\n *\n * @param {string} html string\n * @param {object} handler\n */\nfunction htmlParser(html, handler) {\n  if (html === null || html === undefined) {\n    html = '';\n  } else if (typeof html !== 'string') {\n    html = '' + html;\n  }\n  inertBodyElement.innerHTML = html;\n\n  //mXSS protection\n  var mXSSAttempts = 5;\n  do {\n    if (mXSSAttempts === 0) {\n      throw $sanitizeMinErr('uinput', \"Failed to sanitize html because the input is unstable\");\n    }\n    mXSSAttempts--;\n\n    // strip custom-namespaced attributes on IE<=11\n    if (document.documentMode <= 11) {\n      stripCustomNsAttrs(inertBodyElement);\n    }\n    html = inertBodyElement.innerHTML; //trigger mXSS\n    inertBodyElement.innerHTML = html;\n  } while (html !== inertBodyElement.innerHTML);\n\n  var node = inertBodyElement.firstChild;\n  while (node) {\n    switch (node.nodeType) {\n      case 1: // ELEMENT_NODE\n        handler.start(node.nodeName.toLowerCase(), attrToMap(node.attributes));\n        break;\n      case 3: // TEXT NODE\n        handler.chars(node.textContent);\n        break;\n    }\n\n    var nextNode;\n    if (!(nextNode = node.firstChild)) {\n      if (node.nodeType == 1) {\n        handler.end(node.nodeName.toLowerCase());\n      }\n      nextNode = node.nextSibling;\n      if (!nextNode) {\n        while (nextNode == null) {\n          node = node.parentNode;\n          if (node === inertBodyElement) break;\n          nextNode = node.nextSibling;\n          if (node.nodeType == 1) {\n            handler.end(node.nodeName.toLowerCase());\n          }\n        }\n      }\n    }\n    node = nextNode;\n  }\n\n  while (node = inertBodyElement.firstChild) {\n    inertBodyElement.removeChild(node);\n  }\n}\n\nfunction attrToMap(attrs) {\n  var map = {};\n  for (var i = 0, ii = attrs.length; i < ii; i++) {\n    var attr = attrs[i];\n    map[attr.name] = attr.value;\n  }\n  return map;\n}\n\n\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n * @returns {string} escaped text\n */\nfunction encodeEntities(value) {\n  return value.\n    replace(/&/g, '&amp;').\n    replace(SURROGATE_PAIR_REGEXP, function(value) {\n      var hi = value.charCodeAt(0);\n      var low = value.charCodeAt(1);\n      return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n    }).\n    replace(NON_ALPHANUMERIC_REGEXP, function(value) {\n      return '&#' + value.charCodeAt(0) + ';';\n    }).\n    replace(/</g, '&lt;').\n    replace(/>/g, '&gt;');\n}\n\n/**\n * create an HTML/XML writer which writes to buffer\n * @param {Array} buf use buf.join('') to get out sanitized html string\n * @returns {object} in the form of {\n *     start: function(tag, attrs) {},\n *     end: function(tag) {},\n *     chars: function(text) {},\n *     comment: function(text) {}\n * }\n */\nfunction htmlSanitizeWriter(buf, uriValidator) {\n  var ignoreCurrentElement = false;\n  var out = angular.bind(buf, buf.push);\n  return {\n    start: function(tag, attrs) {\n      tag = angular.lowercase(tag);\n      if (!ignoreCurrentElement && blockedElements[tag]) {\n        ignoreCurrentElement = tag;\n      }\n      if (!ignoreCurrentElement && validElements[tag] === true) {\n        out('<');\n        out(tag);\n        angular.forEach(attrs, function(value, key) {\n          var lkey=angular.lowercase(key);\n          var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background');\n          if (validAttrs[lkey] === true &&\n            (uriAttrs[lkey] !== true || uriValidator(value, isImage))) {\n            out(' ');\n            out(key);\n            out('=\"');\n            out(encodeEntities(value));\n            out('\"');\n          }\n        });\n        out('>');\n      }\n    },\n    end: function(tag) {\n      tag = angular.lowercase(tag);\n      if (!ignoreCurrentElement && validElements[tag] === true && voidElements[tag] !== true) {\n        out('</');\n        out(tag);\n        out('>');\n      }\n      if (tag == ignoreCurrentElement) {\n        ignoreCurrentElement = false;\n      }\n    },\n    chars: function(chars) {\n      if (!ignoreCurrentElement) {\n        out(encodeEntities(chars));\n      }\n    }\n  };\n}\n\n\n/**\n * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1' attribute to declare\n * ns1 namespace and prefixes the attribute with 'ns1' (e.g. 'ns1:xlink:foo'). This is undesirable since we don't want\n * to allow any of these custom attributes. This method strips them all.\n *\n * @param node Root element to process\n */\nfunction stripCustomNsAttrs(node) {\n  if (node.nodeType === Node.ELEMENT_NODE) {\n    var attrs = node.attributes;\n    for (var i = 0, l = attrs.length; i < l; i++) {\n      var attrNode = attrs[i];\n      var attrName = attrNode.name.toLowerCase();\n      if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n        node.removeAttributeNode(attrNode);\n        i--;\n        l--;\n      }\n    }\n  }\n\n  var nextNode = node.firstChild;\n  if (nextNode) {\n    stripCustomNsAttrs(nextNode);\n  }\n\n  nextNode = node.nextSibling;\n  if (nextNode) {\n    stripCustomNsAttrs(nextNode);\n  }\n}\n\n\n\n// define ngSanitize module and register $sanitize service\nangular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider);\n\n/* global sanitizeText: false */\n\n/**\n * @ngdoc filter\n * @name linky\n * @kind function\n *\n * @description\n * Finds links in text input and turns them into html links. Supports `http/https/ftp/mailto` and\n * plain email address links.\n *\n * Requires the {@link ngSanitize `ngSanitize`} module to be installed.\n *\n * @param {string} text Input text.\n * @param {string} target Window (`_blank|_self|_parent|_top`) or named frame to open links in.\n * @param {object|function(url)} [attributes] Add custom attributes to the link element.\n *\n *    Can be one of:\n *\n *    - `object`: A map of attributes\n *    - `function`: Takes the url as a parameter and returns a map of attributes\n *\n *    If the map of attributes contains a value for `target`, it overrides the value of\n *    the target parameter.\n *\n *\n * @returns {string} Html-linkified and {@link $sanitize sanitized} text.\n *\n * @usage\n   <span ng-bind-html=\"linky_expression | linky\"></span>\n *\n * @example\n   <example module=\"linkyExample\" deps=\"angular-sanitize.js\">\n     <file name=\"index.html\">\n       <div ng-controller=\"ExampleController\">\n       Snippet: <textarea ng-model=\"snippet\" cols=\"60\" rows=\"3\"></textarea>\n       <table>\n         <tr>\n           <th>Filter</th>\n           <th>Source</th>\n           <th>Rendered</th>\n         </tr>\n         <tr id=\"linky-filter\">\n           <td>linky filter</td>\n           <td>\n             <pre>&lt;div ng-bind-html=\"snippet | linky\"&gt;<br>&lt;/div&gt;</pre>\n           </td>\n           <td>\n             <div ng-bind-html=\"snippet | linky\"></div>\n           </td>\n         </tr>\n         <tr id=\"linky-target\">\n          <td>linky target</td>\n          <td>\n            <pre>&lt;div ng-bind-html=\"snippetWithSingleURL | linky:'_blank'\"&gt;<br>&lt;/div&gt;</pre>\n          </td>\n          <td>\n            <div ng-bind-html=\"snippetWithSingleURL | linky:'_blank'\"></div>\n          </td>\n         </tr>\n         <tr id=\"linky-custom-attributes\">\n          <td>linky custom attributes</td>\n          <td>\n            <pre>&lt;div ng-bind-html=\"snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}\"&gt;<br>&lt;/div&gt;</pre>\n          </td>\n          <td>\n            <div ng-bind-html=\"snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}\"></div>\n          </td>\n         </tr>\n         <tr id=\"escaped-html\">\n           <td>no filter</td>\n           <td><pre>&lt;div ng-bind=\"snippet\"&gt;<br>&lt;/div&gt;</pre></td>\n           <td><div ng-bind=\"snippet\"></div></td>\n         </tr>\n       </table>\n     </file>\n     <file name=\"script.js\">\n       angular.module('linkyExample', ['ngSanitize'])\n         .controller('ExampleController', ['$scope', function($scope) {\n           $scope.snippet =\n             'Pretty text with some links:\\n'+\n             'http://angularjs.org/,\\n'+\n             'mailto:us@somewhere.org,\\n'+\n             'another@somewhere.org,\\n'+\n             'and one more: ftp://127.0.0.1/.';\n           $scope.snippetWithSingleURL = 'http://angularjs.org/';\n         }]);\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should linkify the snippet with urls', function() {\n         expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).\n             toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' +\n                  'another@somewhere.org, and one more: ftp://127.0.0.1/.');\n         expect(element.all(by.css('#linky-filter a')).count()).toEqual(4);\n       });\n\n       it('should not linkify snippet without the linky filter', function() {\n         expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()).\n             toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' +\n                  'another@somewhere.org, and one more: ftp://127.0.0.1/.');\n         expect(element.all(by.css('#escaped-html a')).count()).toEqual(0);\n       });\n\n       it('should update', function() {\n         element(by.model('snippet')).clear();\n         element(by.model('snippet')).sendKeys('new http://link.');\n         expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).\n             toBe('new http://link.');\n         expect(element.all(by.css('#linky-filter a')).count()).toEqual(1);\n         expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText())\n             .toBe('new http://link.');\n       });\n\n       it('should work with the target property', function() {\n        expect(element(by.id('linky-target')).\n            element(by.binding(\"snippetWithSingleURL | linky:'_blank'\")).getText()).\n            toBe('http://angularjs.org/');\n        expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank');\n       });\n\n       it('should optionally add custom attributes', function() {\n        expect(element(by.id('linky-custom-attributes')).\n            element(by.binding(\"snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}\")).getText()).\n            toBe('http://angularjs.org/');\n        expect(element(by.css('#linky-custom-attributes a')).getAttribute('rel')).toEqual('nofollow');\n       });\n     </file>\n   </example>\n */\nangular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {\n  var LINKY_URL_REGEXP =\n        /((ftp|https?):\\/\\/|(www\\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\\S*[^\\s.;,(){}<>\"\\u201d\\u2019]/i,\n      MAILTO_REGEXP = /^mailto:/i;\n\n  var linkyMinErr = angular.$$minErr('linky');\n  var isString = angular.isString;\n\n  return function(text, target, attributes) {\n    if (text == null || text === '') return text;\n    if (!isString(text)) throw linkyMinErr('notstring', 'Expected string but received: {0}', text);\n\n    var match;\n    var raw = text;\n    var html = [];\n    var url;\n    var i;\n    while ((match = raw.match(LINKY_URL_REGEXP))) {\n      // We can not end in these as they are sometimes found at the end of the sentence\n      url = match[0];\n      // if we did not match ftp/http/www/mailto then assume mailto\n      if (!match[2] && !match[4]) {\n        url = (match[3] ? 'http://' : 'mailto:') + url;\n      }\n      i = match.index;\n      addText(raw.substr(0, i));\n      addLink(url, match[0].replace(MAILTO_REGEXP, ''));\n      raw = raw.substring(i + match[0].length);\n    }\n    addText(raw);\n    return $sanitize(html.join(''));\n\n    function addText(text) {\n      if (!text) {\n        return;\n      }\n      html.push(sanitizeText(text));\n    }\n\n    function addLink(url, text) {\n      var key;\n      html.push('<a ');\n      if (angular.isFunction(attributes)) {\n        attributes = attributes(url);\n      }\n      if (angular.isObject(attributes)) {\n        for (key in attributes) {\n          html.push(key + '=\"' + attributes[key] + '\" ');\n        }\n      } else {\n        attributes = {};\n      }\n      if (angular.isDefined(target) && !('target' in attributes)) {\n        html.push('target=\"',\n                  target,\n                  '\" ');\n      }\n      html.push('href=\"',\n                url.replace(/\"/g, '&quot;'),\n                '\">');\n      addText(text);\n      html.push('</a>');\n    }\n  };\n}]);\n\n\n})(window, window.angular);\n\n/*!\n * ionic.bundle.js is a concatenation of:\n * ionic.js, angular.js, angular-animate.js,\n * angular-sanitize.js, angular-ui-router.js,\n * and ionic-angular.js\n */\n\n/**\n * State-based routing for AngularJS\n * @version v0.2.13\n * @link http://angular-ui.github.com/\n * @license MIT License, http://www.opensource.org/licenses/MIT\n */\n\n/* commonjs package manager support (eg componentjs) */\nif (typeof module !== \"undefined\" && typeof exports !== \"undefined\" && module.exports === exports){\n  module.exports = 'ui.router';\n}\n\n(function (window, angular, undefined) {\n/*jshint globalstrict:true*/\n/*global angular:false*/\n'use strict';\n\nvar isDefined = angular.isDefined,\n    isFunction = angular.isFunction,\n    isString = angular.isString,\n    isObject = angular.isObject,\n    isArray = angular.isArray,\n    forEach = angular.forEach,\n    extend = angular.extend,\n    copy = angular.copy;\n\nfunction inherit(parent, extra) {\n  return extend(new (extend(function() {}, { prototype: parent }))(), extra);\n}\n\nfunction merge(dst) {\n  forEach(arguments, function(obj) {\n    if (obj !== dst) {\n      forEach(obj, function(value, key) {\n        if (!dst.hasOwnProperty(key)) dst[key] = value;\n      });\n    }\n  });\n  return dst;\n}\n\n/**\n * Finds the common ancestor path between two states.\n *\n * @param {Object} first The first state.\n * @param {Object} second The second state.\n * @return {Array} Returns an array of state names in descending order, not including the root.\n */\nfunction ancestors(first, second) {\n  var path = [];\n\n  for (var n in first.path) {\n    if (first.path[n] !== second.path[n]) break;\n    path.push(first.path[n]);\n  }\n  return path;\n}\n\n/**\n * IE8-safe wrapper for `Object.keys()`.\n *\n * @param {Object} object A JavaScript object.\n * @return {Array} Returns the keys of the object as an array.\n */\nfunction objectKeys(object) {\n  if (Object.keys) {\n    return Object.keys(object);\n  }\n  var result = [];\n\n  angular.forEach(object, function(val, key) {\n    result.push(key);\n  });\n  return result;\n}\n\n/**\n * IE8-safe wrapper for `Array.prototype.indexOf()`.\n *\n * @param {Array} array A JavaScript array.\n * @param {*} value A value to search the array for.\n * @return {Number} Returns the array index value of `value`, or `-1` if not present.\n */\nfunction indexOf(array, value) {\n  if (Array.prototype.indexOf) {\n    return array.indexOf(value, Number(arguments[2]) || 0);\n  }\n  var len = array.length >>> 0, from = Number(arguments[2]) || 0;\n  from = (from < 0) ? Math.ceil(from) : Math.floor(from);\n\n  if (from < 0) from += len;\n\n  for (; from < len; from++) {\n    if (from in array && array[from] === value) return from;\n  }\n  return -1;\n}\n\n/**\n * Merges a set of parameters with all parameters inherited between the common parents of the\n * current state and a given destination state.\n *\n * @param {Object} currentParams The value of the current state parameters ($stateParams).\n * @param {Object} newParams The set of parameters which will be composited with inherited params.\n * @param {Object} $current Internal definition of object representing the current state.\n * @param {Object} $to Internal definition of object representing state to transition to.\n */\nfunction inheritParams(currentParams, newParams, $current, $to) {\n  var parents = ancestors($current, $to), parentParams, inherited = {}, inheritList = [];\n\n  for (var i in parents) {\n    if (!parents[i].params) continue;\n    parentParams = objectKeys(parents[i].params);\n    if (!parentParams.length) continue;\n\n    for (var j in parentParams) {\n      if (indexOf(inheritList, parentParams[j]) >= 0) continue;\n      inheritList.push(parentParams[j]);\n      inherited[parentParams[j]] = currentParams[parentParams[j]];\n    }\n  }\n  return extend({}, inherited, newParams);\n}\n\n/**\n * Performs a non-strict comparison of the subset of two objects, defined by a list of keys.\n *\n * @param {Object} a The first object.\n * @param {Object} b The second object.\n * @param {Array} keys The list of keys within each object to compare. If the list is empty or not specified,\n *                     it defaults to the list of keys in `a`.\n * @return {Boolean} Returns `true` if the keys match, otherwise `false`.\n */\nfunction equalForKeys(a, b, keys) {\n  if (!keys) {\n    keys = [];\n    for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility\n  }\n\n  for (var i=0; i<keys.length; i++) {\n    var k = keys[i];\n    if (a[k] != b[k]) return false; // Not '===', values aren't necessarily normalized\n  }\n  return true;\n}\n\n/**\n * Returns the subset of an object, based on a list of keys.\n *\n * @param {Array} keys\n * @param {Object} values\n * @return {Boolean} Returns a subset of `values`.\n */\nfunction filterByKeys(keys, values) {\n  var filtered = {};\n\n  forEach(keys, function (name) {\n    filtered[name] = values[name];\n  });\n  return filtered;\n}\n\n// like _.indexBy\n// when you know that your index values will be unique, or you want last-one-in to win\nfunction indexBy(array, propName) {\n  var result = {};\n  forEach(array, function(item) {\n    result[item[propName]] = item;\n  });\n  return result;\n}\n\n// extracted from underscore.js\n// Return a copy of the object only containing the whitelisted properties.\nfunction pick(obj) {\n  var copy = {};\n  var keys = Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(arguments, 1));\n  forEach(keys, function(key) {\n    if (key in obj) copy[key] = obj[key];\n  });\n  return copy;\n}\n\n// extracted from underscore.js\n// Return a copy of the object omitting the blacklisted properties.\nfunction omit(obj) {\n  var copy = {};\n  var keys = Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(arguments, 1));\n  for (var key in obj) {\n    if (indexOf(keys, key) == -1) copy[key] = obj[key];\n  }\n  return copy;\n}\n\nfunction pluck(collection, key) {\n  var result = isArray(collection) ? [] : {};\n\n  forEach(collection, function(val, i) {\n    result[i] = isFunction(key) ? key(val) : val[key];\n  });\n  return result;\n}\n\nfunction filter(collection, callback) {\n  var array = isArray(collection);\n  var result = array ? [] : {};\n  forEach(collection, function(val, i) {\n    if (callback(val, i)) {\n      result[array ? result.length : i] = val;\n    }\n  });\n  return result;\n}\n\nfunction map(collection, callback) {\n  var result = isArray(collection) ? [] : {};\n\n  forEach(collection, function(val, i) {\n    result[i] = callback(val, i);\n  });\n  return result;\n}\n\n/**\n * @ngdoc overview\n * @name ui.router.util\n *\n * @description\n * # ui.router.util sub-module\n *\n * This module is a dependency of other sub-modules. Do not include this module as a dependency\n * in your angular app (use {@link ui.router} module instead).\n *\n */\nangular.module('ui.router.util', ['ng']);\n\n/**\n * @ngdoc overview\n * @name ui.router.router\n * \n * @requires ui.router.util\n *\n * @description\n * # ui.router.router sub-module\n *\n * This module is a dependency of other sub-modules. Do not include this module as a dependency\n * in your angular app (use {@link ui.router} module instead).\n */\nangular.module('ui.router.router', ['ui.router.util']);\n\n/**\n * @ngdoc overview\n * @name ui.router.state\n * \n * @requires ui.router.router\n * @requires ui.router.util\n *\n * @description\n * # ui.router.state sub-module\n *\n * This module is a dependency of the main ui.router module. Do not include this module as a dependency\n * in your angular app (use {@link ui.router} module instead).\n * \n */\nangular.module('ui.router.state', ['ui.router.router', 'ui.router.util']);\n\n/**\n * @ngdoc overview\n * @name ui.router\n *\n * @requires ui.router.state\n *\n * @description\n * # ui.router\n * \n * ## The main module for ui.router \n * There are several sub-modules included with the ui.router module, however only this module is needed\n * as a dependency within your angular app. The other modules are for organization purposes. \n *\n * The modules are:\n * * ui.router - the main \"umbrella\" module\n * * ui.router.router - \n * \n * *You'll need to include **only** this module as the dependency within your angular app.*\n * \n * <pre>\n * <!doctype html>\n * <html ng-app=\"myApp\">\n * <head>\n *   <script src=\"js/angular.js\"></script>\n *   <!-- Include the ui-router script -->\n *   <script src=\"js/angular-ui-router.min.js\"></script>\n *   <script>\n *     // ...and add 'ui.router' as a dependency\n *     var myApp = angular.module('myApp', ['ui.router']);\n *   </script>\n * </head>\n * <body>\n * </body>\n * </html>\n * </pre>\n */\nangular.module('ui.router', ['ui.router.state']);\n\nangular.module('ui.router.compat', ['ui.router']);\n\n/**\n * @ngdoc object\n * @name ui.router.util.$resolve\n *\n * @requires $q\n * @requires $injector\n *\n * @description\n * Manages resolution of (acyclic) graphs of promises.\n */\n$Resolve.$inject = ['$q', '$injector'];\nfunction $Resolve(  $q,    $injector) {\n  \n  var VISIT_IN_PROGRESS = 1,\n      VISIT_DONE = 2,\n      NOTHING = {},\n      NO_DEPENDENCIES = [],\n      NO_LOCALS = NOTHING,\n      NO_PARENT = extend($q.when(NOTHING), { $$promises: NOTHING, $$values: NOTHING });\n  \n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$resolve#study\n   * @methodOf ui.router.util.$resolve\n   *\n   * @description\n   * Studies a set of invocables that are likely to be used multiple times.\n   * <pre>\n   * $resolve.study(invocables)(locals, parent, self)\n   * </pre>\n   * is equivalent to\n   * <pre>\n   * $resolve.resolve(invocables, locals, parent, self)\n   * </pre>\n   * but the former is more efficient (in fact `resolve` just calls `study` \n   * internally).\n   *\n   * @param {object} invocables Invocable objects\n   * @return {function} a function to pass in locals, parent and self\n   */\n  this.study = function (invocables) {\n    if (!isObject(invocables)) throw new Error(\"'invocables' must be an object\");\n    var invocableKeys = objectKeys(invocables || {});\n    \n    // Perform a topological sort of invocables to build an ordered plan\n    var plan = [], cycle = [], visited = {};\n    function visit(value, key) {\n      if (visited[key] === VISIT_DONE) return;\n      \n      cycle.push(key);\n      if (visited[key] === VISIT_IN_PROGRESS) {\n        cycle.splice(0, indexOf(cycle, key));\n        throw new Error(\"Cyclic dependency: \" + cycle.join(\" -> \"));\n      }\n      visited[key] = VISIT_IN_PROGRESS;\n      \n      if (isString(value)) {\n        plan.push(key, [ function() { return $injector.get(value); }], NO_DEPENDENCIES);\n      } else {\n        var params = $injector.annotate(value);\n        forEach(params, function (param) {\n          if (param !== key && invocables.hasOwnProperty(param)) visit(invocables[param], param);\n        });\n        plan.push(key, value, params);\n      }\n      \n      cycle.pop();\n      visited[key] = VISIT_DONE;\n    }\n    forEach(invocables, visit);\n    invocables = cycle = visited = null; // plan is all that's required\n    \n    function isResolve(value) {\n      return isObject(value) && value.then && value.$$promises;\n    }\n    \n    return function (locals, parent, self) {\n      if (isResolve(locals) && self === undefined) {\n        self = parent; parent = locals; locals = null;\n      }\n      if (!locals) locals = NO_LOCALS;\n      else if (!isObject(locals)) {\n        throw new Error(\"'locals' must be an object\");\n      }       \n      if (!parent) parent = NO_PARENT;\n      else if (!isResolve(parent)) {\n        throw new Error(\"'parent' must be a promise returned by $resolve.resolve()\");\n      }\n      \n      // To complete the overall resolution, we have to wait for the parent\n      // promise and for the promise for each invokable in our plan.\n      var resolution = $q.defer(),\n          result = resolution.promise,\n          promises = result.$$promises = {},\n          values = extend({}, locals),\n          wait = 1 + plan.length/3,\n          merged = false;\n          \n      function done() {\n        // Merge parent values we haven't got yet and publish our own $$values\n        if (!--wait) {\n          if (!merged) merge(values, parent.$$values); \n          result.$$values = values;\n          result.$$promises = result.$$promises || true; // keep for isResolve()\n          delete result.$$inheritedValues;\n          resolution.resolve(values);\n        }\n      }\n      \n      function fail(reason) {\n        result.$$failure = reason;\n        resolution.reject(reason);\n      }\n\n      // Short-circuit if parent has already failed\n      if (isDefined(parent.$$failure)) {\n        fail(parent.$$failure);\n        return result;\n      }\n      \n      if (parent.$$inheritedValues) {\n        merge(values, omit(parent.$$inheritedValues, invocableKeys));\n      }\n\n      // Merge parent values if the parent has already resolved, or merge\n      // parent promises and wait if the parent resolve is still in progress.\n      extend(promises, parent.$$promises);\n      if (parent.$$values) {\n        merged = merge(values, omit(parent.$$values, invocableKeys));\n        result.$$inheritedValues = omit(parent.$$values, invocableKeys);\n        done();\n      } else {\n        if (parent.$$inheritedValues) {\n          result.$$inheritedValues = omit(parent.$$inheritedValues, invocableKeys);\n        }        \n        parent.then(done, fail);\n      }\n      \n      // Process each invocable in the plan, but ignore any where a local of the same name exists.\n      for (var i=0, ii=plan.length; i<ii; i+=3) {\n        if (locals.hasOwnProperty(plan[i])) done();\n        else invoke(plan[i], plan[i+1], plan[i+2]);\n      }\n      \n      function invoke(key, invocable, params) {\n        // Create a deferred for this invocation. Failures will propagate to the resolution as well.\n        var invocation = $q.defer(), waitParams = 0;\n        function onfailure(reason) {\n          invocation.reject(reason);\n          fail(reason);\n        }\n        // Wait for any parameter that we have a promise for (either from parent or from this\n        // resolve; in that case study() will have made sure it's ordered before us in the plan).\n        forEach(params, function (dep) {\n          if (promises.hasOwnProperty(dep) && !locals.hasOwnProperty(dep)) {\n            waitParams++;\n            promises[dep].then(function (result) {\n              values[dep] = result;\n              if (!(--waitParams)) proceed();\n            }, onfailure);\n          }\n        });\n        if (!waitParams) proceed();\n        function proceed() {\n          if (isDefined(result.$$failure)) return;\n          try {\n            invocation.resolve($injector.invoke(invocable, self, values));\n            invocation.promise.then(function (result) {\n              values[key] = result;\n              done();\n            }, onfailure);\n          } catch (e) {\n            onfailure(e);\n          }\n        }\n        // Publish promise synchronously; invocations further down in the plan may depend on it.\n        promises[key] = invocation.promise;\n      }\n      \n      return result;\n    };\n  };\n  \n  /**\n   * @ngdoc function\n   * @name ui.router.util.$resolve#resolve\n   * @methodOf ui.router.util.$resolve\n   *\n   * @description\n   * Resolves a set of invocables. An invocable is a function to be invoked via \n   * `$injector.invoke()`, and can have an arbitrary number of dependencies. \n   * An invocable can either return a value directly,\n   * or a `$q` promise. If a promise is returned it will be resolved and the \n   * resulting value will be used instead. Dependencies of invocables are resolved \n   * (in this order of precedence)\n   *\n   * - from the specified `locals`\n   * - from another invocable that is part of this `$resolve` call\n   * - from an invocable that is inherited from a `parent` call to `$resolve` \n   *   (or recursively\n   * - from any ancestor `$resolve` of that parent).\n   *\n   * The return value of `$resolve` is a promise for an object that contains \n   * (in this order of precedence)\n   *\n   * - any `locals` (if specified)\n   * - the resolved return values of all injectables\n   * - any values inherited from a `parent` call to `$resolve` (if specified)\n   *\n   * The promise will resolve after the `parent` promise (if any) and all promises \n   * returned by injectables have been resolved. If any invocable \n   * (or `$injector.invoke`) throws an exception, or if a promise returned by an \n   * invocable is rejected, the `$resolve` promise is immediately rejected with the \n   * same error. A rejection of a `parent` promise (if specified) will likewise be \n   * propagated immediately. Once the `$resolve` promise has been rejected, no \n   * further invocables will be called.\n   * \n   * Cyclic dependencies between invocables are not permitted and will caues `$resolve`\n   * to throw an error. As a special case, an injectable can depend on a parameter \n   * with the same name as the injectable, which will be fulfilled from the `parent` \n   * injectable of the same name. This allows inherited values to be decorated. \n   * Note that in this case any other injectable in the same `$resolve` with the same\n   * dependency would see the decorated value, not the inherited value.\n   *\n   * Note that missing dependencies -- unlike cyclic dependencies -- will cause an \n   * (asynchronous) rejection of the `$resolve` promise rather than a (synchronous) \n   * exception.\n   *\n   * Invocables are invoked eagerly as soon as all dependencies are available. \n   * This is true even for dependencies inherited from a `parent` call to `$resolve`.\n   *\n   * As a special case, an invocable can be a string, in which case it is taken to \n   * be a service name to be passed to `$injector.get()`. This is supported primarily \n   * for backwards-compatibility with the `resolve` property of `$routeProvider` \n   * routes.\n   *\n   * @param {object} invocables functions to invoke or \n   * `$injector` services to fetch.\n   * @param {object} locals  values to make available to the injectables\n   * @param {object} parent  a promise returned by another call to `$resolve`.\n   * @param {object} self  the `this` for the invoked methods\n   * @return {object} Promise for an object that contains the resolved return value\n   * of all invocables, as well as any inherited and local values.\n   */\n  this.resolve = function (invocables, locals, parent, self) {\n    return this.study(invocables)(locals, parent, self);\n  };\n}\n\nangular.module('ui.router.util').service('$resolve', $Resolve);\n\n\n/**\n * @ngdoc object\n * @name ui.router.util.$templateFactory\n *\n * @requires $http\n * @requires $templateCache\n * @requires $injector\n *\n * @description\n * Service. Manages loading of templates.\n */\n$TemplateFactory.$inject = ['$http', '$templateCache', '$injector'];\nfunction $TemplateFactory(  $http,   $templateCache,   $injector) {\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$templateFactory#fromConfig\n   * @methodOf ui.router.util.$templateFactory\n   *\n   * @description\n   * Creates a template from a configuration object. \n   *\n   * @param {object} config Configuration object for which to load a template. \n   * The following properties are search in the specified order, and the first one \n   * that is defined is used to create the template:\n   *\n   * @param {string|object} config.template html string template or function to \n   * load via {@link ui.router.util.$templateFactory#fromString fromString}.\n   * @param {string|object} config.templateUrl url to load or a function returning \n   * the url to load via {@link ui.router.util.$templateFactory#fromUrl fromUrl}.\n   * @param {Function} config.templateProvider function to invoke via \n   * {@link ui.router.util.$templateFactory#fromProvider fromProvider}.\n   * @param {object} params  Parameters to pass to the template function.\n   * @param {object} locals Locals to pass to `invoke` if the template is loaded \n   * via a `templateProvider`. Defaults to `{ params: params }`.\n   *\n   * @return {string|object}  The template html as a string, or a promise for \n   * that string,or `null` if no template is configured.\n   */\n  this.fromConfig = function (config, params, locals) {\n    return (\n      isDefined(config.template) ? this.fromString(config.template, params) :\n      isDefined(config.templateUrl) ? this.fromUrl(config.templateUrl, params) :\n      isDefined(config.templateProvider) ? this.fromProvider(config.templateProvider, params, locals) :\n      null\n    );\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$templateFactory#fromString\n   * @methodOf ui.router.util.$templateFactory\n   *\n   * @description\n   * Creates a template from a string or a function returning a string.\n   *\n   * @param {string|object} template html template as a string or function that \n   * returns an html template as a string.\n   * @param {object} params Parameters to pass to the template function.\n   *\n   * @return {string|object} The template html as a string, or a promise for that \n   * string.\n   */\n  this.fromString = function (template, params) {\n    return isFunction(template) ? template(params) : template;\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$templateFactory#fromUrl\n   * @methodOf ui.router.util.$templateFactory\n   * \n   * @description\n   * Loads a template from the a URL via `$http` and `$templateCache`.\n   *\n   * @param {string|Function} url url of the template to load, or a function \n   * that returns a url.\n   * @param {Object} params Parameters to pass to the url function.\n   * @return {string|Promise.<string>} The template html as a string, or a promise \n   * for that string.\n   */\n  this.fromUrl = function (url, params) {\n    if (isFunction(url)) url = url(params);\n    if (url == null) return null;\n    else return $http\n        .get(url, { cache: $templateCache, headers: { Accept: 'text/html' }})\n        .then(function(response) { return response.data; });\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$templateFactory#fromProvider\n   * @methodOf ui.router.util.$templateFactory\n   *\n   * @description\n   * Creates a template by invoking an injectable provider function.\n   *\n   * @param {Function} provider Function to invoke via `$injector.invoke`\n   * @param {Object} params Parameters for the template.\n   * @param {Object} locals Locals to pass to `invoke`. Defaults to \n   * `{ params: params }`.\n   * @return {string|Promise.<string>} The template html as a string, or a promise \n   * for that string.\n   */\n  this.fromProvider = function (provider, params, locals) {\n    return $injector.invoke(provider, null, locals || { params: params });\n  };\n}\n\nangular.module('ui.router.util').service('$templateFactory', $TemplateFactory);\n\nvar $$UMFP; // reference to $UrlMatcherFactoryProvider\n\n/**\n * @ngdoc object\n * @name ui.router.util.type:UrlMatcher\n *\n * @description\n * Matches URLs against patterns and extracts named parameters from the path or the search\n * part of the URL. A URL pattern consists of a path pattern, optionally followed by '?' and a list\n * of search parameters. Multiple search parameter names are separated by '&'. Search parameters\n * do not influence whether or not a URL is matched, but their values are passed through into\n * the matched parameters returned by {@link ui.router.util.type:UrlMatcher#methods_exec exec}.\n * \n * Path parameter placeholders can be specified using simple colon/catch-all syntax or curly brace\n * syntax, which optionally allows a regular expression for the parameter to be specified:\n *\n * * `':'` name - colon placeholder\n * * `'*'` name - catch-all placeholder\n * * `'{' name '}'` - curly placeholder\n * * `'{' name ':' regexp|type '}'` - curly placeholder with regexp or type name. Should the\n *   regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash.\n *\n * Parameter names may contain only word characters (latin letters, digits, and underscore) and\n * must be unique within the pattern (across both path and search parameters). For colon \n * placeholders or curly placeholders without an explicit regexp, a path parameter matches any\n * number of characters other than '/'. For catch-all placeholders the path parameter matches\n * any number of characters.\n * \n * Examples:\n * \n * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for\n *   trailing slashes, and patterns have to match the entire path, not just a prefix.\n * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or\n *   '/user/bob/details'. The second path segment will be captured as the parameter 'id'.\n * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax.\n * * `'/user/{id:[^/]*}'` - Same as the previous example.\n * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id\n *   parameter consists of 1 to 8 hex digits.\n * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the\n *   path into the parameter 'path'.\n * * `'/files/*path'` - ditto.\n * * `'/calendar/{start:date}'` - Matches \"/calendar/2014-11-12\" (because the pattern defined\n *   in the built-in  `date` Type matches `2014-11-12`) and provides a Date object in $stateParams.start\n *\n * @param {string} pattern  The pattern to compile into a matcher.\n * @param {Object} config  A configuration object hash:\n * @param {Object=} parentMatcher Used to concatenate the pattern/config onto\n *   an existing UrlMatcher\n *\n * * `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`.\n * * `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`.\n *\n * @property {string} prefix  A static prefix of this pattern. The matcher guarantees that any\n *   URL matching this matcher (i.e. any string for which {@link ui.router.util.type:UrlMatcher#methods_exec exec()} returns\n *   non-null) will start with this prefix.\n *\n * @property {string} source  The pattern that was passed into the constructor\n *\n * @property {string} sourcePath  The path portion of the source property\n *\n * @property {string} sourceSearch  The search portion of the source property\n *\n * @property {string} regex  The constructed regex that will be used to match against the url when \n *   it is time to determine which url will match.\n *\n * @returns {Object}  New `UrlMatcher` object\n */\nfunction UrlMatcher(pattern, config, parentMatcher) {\n  config = extend({ params: {} }, isObject(config) ? config : {});\n\n  // Find all placeholders and create a compiled pattern, using either classic or curly syntax:\n  //   '*' name\n  //   ':' name\n  //   '{' name '}'\n  //   '{' name ':' regexp '}'\n  // The regular expression is somewhat complicated due to the need to allow curly braces\n  // inside the regular expression. The placeholder regexp breaks down as follows:\n  //    ([:*])([\\w\\[\\]]+)              - classic placeholder ($1 / $2) (search version has - for snake-case)\n  //    \\{([\\w\\[\\]]+)(?:\\:( ... ))?\\}  - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case\n  //    (?: ... | ... | ... )+         - the regexp consists of any number of atoms, an atom being either\n  //    [^{}\\\\]+                       - anything other than curly braces or backslash\n  //    \\\\.                            - a backslash escape\n  //    \\{(?:[^{}\\\\]+|\\\\.)*\\}          - a matched set of curly braces containing other atoms\n  var placeholder       = /([:*])([\\w\\[\\]]+)|\\{([\\w\\[\\]]+)(?:\\:((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n      searchPlaceholder = /([:]?)([\\w\\[\\]-]+)|\\{([\\w\\[\\]-]+)(?:\\:((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n      compiled = '^', last = 0, m,\n      segments = this.segments = [],\n      parentParams = parentMatcher ? parentMatcher.params : {},\n      params = this.params = parentMatcher ? parentMatcher.params.$$new() : new $$UMFP.ParamSet(),\n      paramNames = [];\n\n  function addParameter(id, type, config, location) {\n    paramNames.push(id);\n    if (parentParams[id]) return parentParams[id];\n    if (!/^\\w+(-+\\w+)*(?:\\[\\])?$/.test(id)) throw new Error(\"Invalid parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n    if (params[id]) throw new Error(\"Duplicate parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n    params[id] = new $$UMFP.Param(id, type, config, location);\n    return params[id];\n  }\n\n  function quoteRegExp(string, pattern, squash) {\n    var surroundPattern = ['',''], result = string.replace(/[\\\\\\[\\]\\^$*+?.()|{}]/g, \"\\\\$&\");\n    if (!pattern) return result;\n    switch(squash) {\n      case false: surroundPattern = ['(', ')'];   break;\n      case true:  surroundPattern = ['?(', ')?']; break;\n      default:    surroundPattern = ['(' + squash + \"|\", ')?'];  break;\n    }\n    return result + surroundPattern[0] + pattern + surroundPattern[1];\n  }\n\n  this.source = pattern;\n\n  // Split into static segments separated by path parameter placeholders.\n  // The number of segments is always 1 more than the number of parameters.\n  function matchDetails(m, isSearch) {\n    var id, regexp, segment, type, cfg, arrayMode;\n    id          = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n    cfg         = config.params[id];\n    segment     = pattern.substring(last, m.index);\n    regexp      = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n    type        = $$UMFP.type(regexp || \"string\") || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp) });\n    return {\n      id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n    };\n  }\n\n  var p, param, segment;\n  while ((m = placeholder.exec(pattern))) {\n    p = matchDetails(m, false);\n    if (p.segment.indexOf('?') >= 0) break; // we're into the search part\n\n    param = addParameter(p.id, p.type, p.cfg, \"path\");\n    compiled += quoteRegExp(p.segment, param.type.pattern.source, param.squash);\n    segments.push(p.segment);\n    last = placeholder.lastIndex;\n  }\n  segment = pattern.substring(last);\n\n  // Find any search parameter names and remove them from the last segment\n  var i = segment.indexOf('?');\n\n  if (i >= 0) {\n    var search = this.sourceSearch = segment.substring(i);\n    segment = segment.substring(0, i);\n    this.sourcePath = pattern.substring(0, last + i);\n\n    if (search.length > 0) {\n      last = 0;\n      while ((m = searchPlaceholder.exec(search))) {\n        p = matchDetails(m, true);\n        param = addParameter(p.id, p.type, p.cfg, \"search\");\n        last = placeholder.lastIndex;\n        // check if ?&\n      }\n    }\n  } else {\n    this.sourcePath = pattern;\n    this.sourceSearch = '';\n  }\n\n  compiled += quoteRegExp(segment) + (config.strict === false ? '\\/?' : '') + '$';\n  segments.push(segment);\n\n  this.regexp = new RegExp(compiled, config.caseInsensitive ? 'i' : undefined);\n  this.prefix = segments[0];\n  this.$$paramNames = paramNames;\n}\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#concat\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Returns a new matcher for a pattern constructed by appending the path part and adding the\n * search parameters of the specified pattern to this pattern. The current pattern is not\n * modified. This can be understood as creating a pattern for URLs that are relative to (or\n * suffixes of) the current pattern.\n *\n * @example\n * The following two matchers are equivalent:\n * <pre>\n * new UrlMatcher('/user/{id}?q').concat('/details?date');\n * new UrlMatcher('/user/{id}/details?q&date');\n * </pre>\n *\n * @param {string} pattern  The pattern to append.\n * @param {Object} config  An object hash of the configuration for the matcher.\n * @returns {UrlMatcher}  A matcher for the concatenated pattern.\n */\nUrlMatcher.prototype.concat = function (pattern, config) {\n  // Because order of search parameters is irrelevant, we can add our own search\n  // parameters to the end of the new pattern. Parse the new pattern by itself\n  // and then join the bits together, but it's much easier to do this on a string level.\n  var defaultConfig = {\n    caseInsensitive: $$UMFP.caseInsensitive(),\n    strict: $$UMFP.strictMode(),\n    squash: $$UMFP.defaultSquashPolicy()\n  };\n  return new UrlMatcher(this.sourcePath + pattern + this.sourceSearch, extend(defaultConfig, config), this);\n};\n\nUrlMatcher.prototype.toString = function () {\n  return this.source;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#exec\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Tests the specified path against this matcher, and returns an object containing the captured\n * parameter values, or null if the path does not match. The returned object contains the values\n * of any search parameters that are mentioned in the pattern, but their value may be null if\n * they are not present in `searchParams`. This means that search parameters are always treated\n * as optional.\n *\n * @example\n * <pre>\n * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {\n *   x: '1', q: 'hello'\n * });\n * // returns { id: 'bob', q: 'hello', r: null }\n * </pre>\n *\n * @param {string} path  The URL path to match, e.g. `$location.path()`.\n * @param {Object} searchParams  URL search parameters, e.g. `$location.search()`.\n * @returns {Object}  The captured parameter values.\n */\nUrlMatcher.prototype.exec = function (path, searchParams) {\n  var m = this.regexp.exec(path);\n  if (!m) return null;\n  searchParams = searchParams || {};\n\n  var paramNames = this.parameters(), nTotal = paramNames.length,\n    nPath = this.segments.length - 1,\n    values = {}, i, j, cfg, paramName;\n\n  if (nPath !== m.length - 1) throw new Error(\"Unbalanced capture group in route '\" + this.source + \"'\");\n\n  function decodePathArray(string) {\n    function reverseString(str) { return str.split(\"\").reverse().join(\"\"); }\n    function unquoteDashes(str) { return str.replace(/\\\\-/, \"-\"); }\n\n    var split = reverseString(string).split(/-(?!\\\\)/);\n    var allReversed = map(split, reverseString);\n    return map(allReversed, unquoteDashes).reverse();\n  }\n\n  for (i = 0; i < nPath; i++) {\n    paramName = paramNames[i];\n    var param = this.params[paramName];\n    var paramVal = m[i+1];\n    // if the param value matches a pre-replace pair, replace the value before decoding.\n    for (j = 0; j < param.replace; j++) {\n      if (param.replace[j].from === paramVal) paramVal = param.replace[j].to;\n    }\n    if (paramVal && param.array === true) paramVal = decodePathArray(paramVal);\n    values[paramName] = param.value(paramVal);\n  }\n  for (/**/; i < nTotal; i++) {\n    paramName = paramNames[i];\n    values[paramName] = this.params[paramName].value(searchParams[paramName]);\n  }\n\n  return values;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#parameters\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Returns the names of all path and search parameters of this pattern in an unspecified order.\n * \n * @returns {Array.<string>}  An array of parameter names. Must be treated as read-only. If the\n *    pattern has no parameters, an empty array is returned.\n */\nUrlMatcher.prototype.parameters = function (param) {\n  if (!isDefined(param)) return this.$$paramNames;\n  return this.params[param] || null;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#validate\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Checks an object hash of parameters to validate their correctness according to the parameter\n * types of this `UrlMatcher`.\n *\n * @param {Object} params The object hash of parameters to validate.\n * @returns {boolean} Returns `true` if `params` validates, otherwise `false`.\n */\nUrlMatcher.prototype.validates = function (params) {\n  return this.params.$$validates(params);\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#format\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Creates a URL that matches this pattern by substituting the specified values\n * for the path and search parameters. Null values for path parameters are\n * treated as empty strings.\n *\n * @example\n * <pre>\n * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });\n * // returns '/user/bob?q=yes'\n * </pre>\n *\n * @param {Object} values  the values to substitute for the parameters in this pattern.\n * @returns {string}  the formatted URL (path and optionally search part).\n */\nUrlMatcher.prototype.format = function (values) {\n  values = values || {};\n  var segments = this.segments, params = this.parameters(), paramset = this.params;\n  if (!this.validates(values)) return null;\n\n  var i, search = false, nPath = segments.length - 1, nTotal = params.length, result = segments[0];\n\n  function encodeDashes(str) { // Replace dashes with encoded \"\\-\"\n    return encodeURIComponent(str).replace(/-/g, function(c) { return '%5C%' + c.charCodeAt(0).toString(16).toUpperCase(); });\n  }\n\n  for (i = 0; i < nTotal; i++) {\n    var isPathParam = i < nPath;\n    var name = params[i], param = paramset[name], value = param.value(values[name]);\n    var isDefaultValue = param.isOptional && param.type.equals(param.value(), value);\n    var squash = isDefaultValue ? param.squash : false;\n    var encoded = param.type.encode(value);\n\n    if (isPathParam) {\n      var nextSegment = segments[i + 1];\n      if (squash === false) {\n        if (encoded != null) {\n          if (isArray(encoded)) {\n            result += map(encoded, encodeDashes).join(\"-\");\n          } else {\n            result += encodeURIComponent(encoded);\n          }\n        }\n        result += nextSegment;\n      } else if (squash === true) {\n        var capture = result.match(/\\/$/) ? /\\/?(.*)/ : /(.*)/;\n        result += nextSegment.match(capture)[1];\n      } else if (isString(squash)) {\n        result += squash + nextSegment;\n      }\n    } else {\n      if (encoded == null || (isDefaultValue && squash !== false)) continue;\n      if (!isArray(encoded)) encoded = [ encoded ];\n      encoded = map(encoded, encodeURIComponent).join('&' + name + '=');\n      result += (search ? '&' : '?') + (name + '=' + encoded);\n      search = true;\n    }\n  }\n\n  return result;\n};\n\n/**\n * @ngdoc object\n * @name ui.router.util.type:Type\n *\n * @description\n * Implements an interface to define custom parameter types that can be decoded from and encoded to\n * string parameters matched in a URL. Used by {@link ui.router.util.type:UrlMatcher `UrlMatcher`}\n * objects when matching or formatting URLs, or comparing or validating parameter values.\n *\n * See {@link ui.router.util.$urlMatcherFactory#methods_type `$urlMatcherFactory#type()`} for more\n * information on registering custom types.\n *\n * @param {Object} config  A configuration object which contains the custom type definition.  The object's\n *        properties will override the default methods and/or pattern in `Type`'s public interface.\n * @example\n * <pre>\n * {\n *   decode: function(val) { return parseInt(val, 10); },\n *   encode: function(val) { return val && val.toString(); },\n *   equals: function(a, b) { return this.is(a) && a === b; },\n *   is: function(val) { return angular.isNumber(val) isFinite(val) && val % 1 === 0; },\n *   pattern: /\\d+/\n * }\n * </pre>\n *\n * @property {RegExp} pattern The regular expression pattern used to match values of this type when\n *           coming from a substring of a URL.\n *\n * @returns {Object}  Returns a new `Type` object.\n */\nfunction Type(config) {\n  extend(this, config);\n}\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:Type#is\n * @methodOf ui.router.util.type:Type\n *\n * @description\n * Detects whether a value is of a particular type. Accepts a native (decoded) value\n * and determines whether it matches the current `Type` object.\n *\n * @param {*} val  The value to check.\n * @param {string} key  Optional. If the type check is happening in the context of a specific\n *        {@link ui.router.util.type:UrlMatcher `UrlMatcher`} object, this is the name of the\n *        parameter in which `val` is stored. Can be used for meta-programming of `Type` objects.\n * @returns {Boolean}  Returns `true` if the value matches the type, otherwise `false`.\n */\nType.prototype.is = function(val, key) {\n  return true;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:Type#encode\n * @methodOf ui.router.util.type:Type\n *\n * @description\n * Encodes a custom/native type value to a string that can be embedded in a URL. Note that the\n * return value does *not* need to be URL-safe (i.e. passed through `encodeURIComponent()`), it\n * only needs to be a representation of `val` that has been coerced to a string.\n *\n * @param {*} val  The value to encode.\n * @param {string} key  The name of the parameter in which `val` is stored. Can be used for\n *        meta-programming of `Type` objects.\n * @returns {string}  Returns a string representation of `val` that can be encoded in a URL.\n */\nType.prototype.encode = function(val, key) {\n  return val;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:Type#decode\n * @methodOf ui.router.util.type:Type\n *\n * @description\n * Converts a parameter value (from URL string or transition param) to a custom/native value.\n *\n * @param {string} val  The URL parameter value to decode.\n * @param {string} key  The name of the parameter in which `val` is stored. Can be used for\n *        meta-programming of `Type` objects.\n * @returns {*}  Returns a custom representation of the URL parameter value.\n */\nType.prototype.decode = function(val, key) {\n  return val;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:Type#equals\n * @methodOf ui.router.util.type:Type\n *\n * @description\n * Determines whether two decoded values are equivalent.\n *\n * @param {*} a  A value to compare against.\n * @param {*} b  A value to compare against.\n * @returns {Boolean}  Returns `true` if the values are equivalent/equal, otherwise `false`.\n */\nType.prototype.equals = function(a, b) {\n  return a == b;\n};\n\nType.prototype.$subPattern = function() {\n  var sub = this.pattern.toString();\n  return sub.substr(1, sub.length - 2);\n};\n\nType.prototype.pattern = /.*/;\n\nType.prototype.toString = function() { return \"{Type:\" + this.name + \"}\"; };\n\n/*\n * Wraps an existing custom Type as an array of Type, depending on 'mode'.\n * e.g.:\n * - urlmatcher pattern \"/path?{queryParam[]:int}\"\n * - url: \"/path?queryParam=1&queryParam=2\n * - $stateParams.queryParam will be [1, 2]\n * if `mode` is \"auto\", then\n * - url: \"/path?queryParam=1 will create $stateParams.queryParam: 1\n * - url: \"/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]\n */\nType.prototype.$asArray = function(mode, isSearch) {\n  if (!mode) return this;\n  if (mode === \"auto\" && !isSearch) throw new Error(\"'auto' array mode is for query parameters only\");\n  return new ArrayType(this, mode);\n\n  function ArrayType(type, mode) {\n    function bindTo(type, callbackName) {\n      return function() {\n        return type[callbackName].apply(type, arguments);\n      };\n    }\n\n    // Wrap non-array value as array\n    function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }\n    // Unwrap array value for \"auto\" mode. Return undefined for empty array.\n    function arrayUnwrap(val) {\n      switch(val.length) {\n        case 0: return undefined;\n        case 1: return mode === \"auto\" ? val[0] : val;\n        default: return val;\n      }\n    }\n    function falsey(val) { return !val; }\n\n    // Wraps type (.is/.encode/.decode) functions to operate on each value of an array\n    function arrayHandler(callback, allTruthyMode) {\n      return function handleArray(val) {\n        val = arrayWrap(val);\n        var result = map(val, callback);\n        if (allTruthyMode === true)\n          return filter(result, falsey).length === 0;\n        return arrayUnwrap(result);\n      };\n    }\n\n    // Wraps type (.equals) functions to operate on each value of an array\n    function arrayEqualsHandler(callback) {\n      return function handleArray(val1, val2) {\n        var left = arrayWrap(val1), right = arrayWrap(val2);\n        if (left.length !== right.length) return false;\n        for (var i = 0; i < left.length; i++) {\n          if (!callback(left[i], right[i])) return false;\n        }\n        return true;\n      };\n    }\n\n    this.encode = arrayHandler(bindTo(type, 'encode'));\n    this.decode = arrayHandler(bindTo(type, 'decode'));\n    this.is     = arrayHandler(bindTo(type, 'is'), true);\n    this.equals = arrayEqualsHandler(bindTo(type, 'equals'));\n    this.pattern = type.pattern;\n    this.$arrayMode = mode;\n  }\n};\n\n\n\n/**\n * @ngdoc object\n * @name ui.router.util.$urlMatcherFactory\n *\n * @description\n * Factory for {@link ui.router.util.type:UrlMatcher `UrlMatcher`} instances. The factory\n * is also available to providers under the name `$urlMatcherFactoryProvider`.\n */\nfunction $UrlMatcherFactory() {\n  $$UMFP = this;\n\n  var isCaseInsensitive = false, isStrictMode = true, defaultSquashPolicy = false;\n\n  function valToString(val) { return val != null ? val.toString().replace(/\\//g, \"%2F\") : val; }\n  function valFromString(val) { return val != null ? val.toString().replace(/%2F/g, \"/\") : val; }\n//  TODO: in 1.0, make string .is() return false if value is undefined by default.\n//  function regexpMatches(val) { /*jshint validthis:true */ return isDefined(val) && this.pattern.test(val); }\n  function regexpMatches(val) { /*jshint validthis:true */ return this.pattern.test(val); }\n\n  var $types = {}, enqueue = true, typeQueue = [], injector, defaultTypes = {\n    string: {\n      encode: valToString,\n      decode: valFromString,\n      is: regexpMatches,\n      pattern: /[^/]*/\n    },\n    int: {\n      encode: valToString,\n      decode: function(val) { return parseInt(val, 10); },\n      is: function(val) { return isDefined(val) && this.decode(val.toString()) === val; },\n      pattern: /\\d+/\n    },\n    bool: {\n      encode: function(val) { return val ? 1 : 0; },\n      decode: function(val) { return parseInt(val, 10) !== 0; },\n      is: function(val) { return val === true || val === false; },\n      pattern: /0|1/\n    },\n    date: {\n      encode: function (val) {\n        if (!this.is(val))\n          return undefined;\n        return [ val.getFullYear(),\n          ('0' + (val.getMonth() + 1)).slice(-2),\n          ('0' + val.getDate()).slice(-2)\n        ].join(\"-\");\n      },\n      decode: function (val) {\n        if (this.is(val)) return val;\n        var match = this.capture.exec(val);\n        return match ? new Date(match[1], match[2] - 1, match[3]) : undefined;\n      },\n      is: function(val) { return val instanceof Date && !isNaN(val.valueOf()); },\n      equals: function (a, b) { return this.is(a) && this.is(b) && a.toISOString() === b.toISOString(); },\n      pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,\n      capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/\n    },\n    json: {\n      encode: angular.toJson,\n      decode: angular.fromJson,\n      is: angular.isObject,\n      equals: angular.equals,\n      pattern: /[^/]*/\n    },\n    any: { // does not encode/decode\n      encode: angular.identity,\n      decode: angular.identity,\n      is: angular.identity,\n      equals: angular.equals,\n      pattern: /.*/\n    }\n  };\n\n  function getDefaultConfig() {\n    return {\n      strict: isStrictMode,\n      caseInsensitive: isCaseInsensitive\n    };\n  }\n\n  function isInjectable(value) {\n    return (isFunction(value) || (isArray(value) && isFunction(value[value.length - 1])));\n  }\n\n  /**\n   * [Internal] Get the default value of a parameter, which may be an injectable function.\n   */\n  $UrlMatcherFactory.$$getDefaultValue = function(config) {\n    if (!isInjectable(config.value)) return config.value;\n    if (!injector) throw new Error(\"Injectable functions cannot be called at configuration time\");\n    return injector.invoke(config.value);\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$urlMatcherFactory#caseInsensitive\n   * @methodOf ui.router.util.$urlMatcherFactory\n   *\n   * @description\n   * Defines whether URL matching should be case sensitive (the default behavior), or not.\n   *\n   * @param {boolean} value `false` to match URL in a case sensitive manner; otherwise `true`;\n   * @returns {boolean} the current value of caseInsensitive\n   */\n  this.caseInsensitive = function(value) {\n    if (isDefined(value))\n      isCaseInsensitive = value;\n    return isCaseInsensitive;\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$urlMatcherFactory#strictMode\n   * @methodOf ui.router.util.$urlMatcherFactory\n   *\n   * @description\n   * Defines whether URLs should match trailing slashes, or not (the default behavior).\n   *\n   * @param {boolean=} value `false` to match trailing slashes in URLs, otherwise `true`.\n   * @returns {boolean} the current value of strictMode\n   */\n  this.strictMode = function(value) {\n    if (isDefined(value))\n      isStrictMode = value;\n    return isStrictMode;\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$urlMatcherFactory#defaultSquashPolicy\n   * @methodOf ui.router.util.$urlMatcherFactory\n   *\n   * @description\n   * Sets the default behavior when generating or matching URLs with default parameter values.\n   *\n   * @param {string} value A string that defines the default parameter URL squashing behavior.\n   *    `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL\n   *    `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the\n   *             parameter is surrounded by slashes, squash (remove) one slash from the URL\n   *    any other string, e.g. \"~\": When generating an href with a default parameter value, squash (remove)\n   *             the parameter value from the URL and replace it with this string.\n   */\n  this.defaultSquashPolicy = function(value) {\n    if (!isDefined(value)) return defaultSquashPolicy;\n    if (value !== true && value !== false && !isString(value))\n      throw new Error(\"Invalid squash policy: \" + value + \". Valid policies: false, true, arbitrary-string\");\n    defaultSquashPolicy = value;\n    return value;\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$urlMatcherFactory#compile\n   * @methodOf ui.router.util.$urlMatcherFactory\n   *\n   * @description\n   * Creates a {@link ui.router.util.type:UrlMatcher `UrlMatcher`} for the specified pattern.\n   *\n   * @param {string} pattern  The URL pattern.\n   * @param {Object} config  The config object hash.\n   * @returns {UrlMatcher}  The UrlMatcher.\n   */\n  this.compile = function (pattern, config) {\n    return new UrlMatcher(pattern, extend(getDefaultConfig(), config));\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$urlMatcherFactory#isMatcher\n   * @methodOf ui.router.util.$urlMatcherFactory\n   *\n   * @description\n   * Returns true if the specified object is a `UrlMatcher`, or false otherwise.\n   *\n   * @param {Object} object  The object to perform the type check against.\n   * @returns {Boolean}  Returns `true` if the object matches the `UrlMatcher` interface, by\n   *          implementing all the same methods.\n   */\n  this.isMatcher = function (o) {\n    if (!isObject(o)) return false;\n    var result = true;\n\n    forEach(UrlMatcher.prototype, function(val, name) {\n      if (isFunction(val)) {\n        result = result && (isDefined(o[name]) && isFunction(o[name]));\n      }\n    });\n    return result;\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$urlMatcherFactory#type\n   * @methodOf ui.router.util.$urlMatcherFactory\n   *\n   * @description\n   * Registers a custom {@link ui.router.util.type:Type `Type`} object that can be used to\n   * generate URLs with typed parameters.\n   *\n   * @param {string} name  The type name.\n   * @param {Object|Function} definition   The type definition. See\n   *        {@link ui.router.util.type:Type `Type`} for information on the values accepted.\n   * @param {Object|Function} definitionFn (optional) A function that is injected before the app\n   *        runtime starts.  The result of this function is merged into the existing `definition`.\n   *        See {@link ui.router.util.type:Type `Type`} for information on the values accepted.\n   *\n   * @returns {Object}  Returns `$urlMatcherFactoryProvider`.\n   *\n   * @example\n   * This is a simple example of a custom type that encodes and decodes items from an\n   * array, using the array index as the URL-encoded value:\n   *\n   * <pre>\n   * var list = ['John', 'Paul', 'George', 'Ringo'];\n   *\n   * $urlMatcherFactoryProvider.type('listItem', {\n   *   encode: function(item) {\n   *     // Represent the list item in the URL using its corresponding index\n   *     return list.indexOf(item);\n   *   },\n   *   decode: function(item) {\n   *     // Look up the list item by index\n   *     return list[parseInt(item, 10)];\n   *   },\n   *   is: function(item) {\n   *     // Ensure the item is valid by checking to see that it appears\n   *     // in the list\n   *     return list.indexOf(item) > -1;\n   *   }\n   * });\n   *\n   * $stateProvider.state('list', {\n   *   url: \"/list/{item:listItem}\",\n   *   controller: function($scope, $stateParams) {\n   *     console.log($stateParams.item);\n   *   }\n   * });\n   *\n   * // ...\n   *\n   * // Changes URL to '/list/3', logs \"Ringo\" to the console\n   * $state.go('list', { item: \"Ringo\" });\n   * </pre>\n   *\n   * This is a more complex example of a type that relies on dependency injection to\n   * interact with services, and uses the parameter name from the URL to infer how to\n   * handle encoding and decoding parameter values:\n   *\n   * <pre>\n   * // Defines a custom type that gets a value from a service,\n   * // where each service gets different types of values from\n   * // a backend API:\n   * $urlMatcherFactoryProvider.type('dbObject', {}, function(Users, Posts) {\n   *\n   *   // Matches up services to URL parameter names\n   *   var services = {\n   *     user: Users,\n   *     post: Posts\n   *   };\n   *\n   *   return {\n   *     encode: function(object) {\n   *       // Represent the object in the URL using its unique ID\n   *       return object.id;\n   *     },\n   *     decode: function(value, key) {\n   *       // Look up the object by ID, using the parameter\n   *       // name (key) to call the correct service\n   *       return services[key].findById(value);\n   *     },\n   *     is: function(object, key) {\n   *       // Check that object is a valid dbObject\n   *       return angular.isObject(object) && object.id && services[key];\n   *     }\n   *     equals: function(a, b) {\n   *       // Check the equality of decoded objects by comparing\n   *       // their unique IDs\n   *       return a.id === b.id;\n   *     }\n   *   };\n   * });\n   *\n   * // In a config() block, you can then attach URLs with\n   * // type-annotated parameters:\n   * $stateProvider.state('users', {\n   *   url: \"/users\",\n   *   // ...\n   * }).state('users.item', {\n   *   url: \"/{user:dbObject}\",\n   *   controller: function($scope, $stateParams) {\n   *     // $stateParams.user will now be an object returned from\n   *     // the Users service\n   *   },\n   *   // ...\n   * });\n   * </pre>\n   */\n  this.type = function (name, definition, definitionFn) {\n    if (!isDefined(definition)) return $types[name];\n    if ($types.hasOwnProperty(name)) throw new Error(\"A type named '\" + name + \"' has already been defined.\");\n\n    $types[name] = new Type(extend({ name: name }, definition));\n    if (definitionFn) {\n      typeQueue.push({ name: name, def: definitionFn });\n      if (!enqueue) flushTypeQueue();\n    }\n    return this;\n  };\n\n  // `flushTypeQueue()` waits until `$urlMatcherFactory` is injected before invoking the queued `definitionFn`s\n  function flushTypeQueue() {\n    while(typeQueue.length) {\n      var type = typeQueue.shift();\n      if (type.pattern) throw new Error(\"You cannot override a type's .pattern at runtime.\");\n      angular.extend($types[type.name], injector.invoke(type.def));\n    }\n  }\n\n  // Register default types. Store them in the prototype of $types.\n  forEach(defaultTypes, function(type, name) { $types[name] = new Type(extend({name: name}, type)); });\n  $types = inherit($types, {});\n\n  /* No need to document $get, since it returns this */\n  this.$get = ['$injector', function ($injector) {\n    injector = $injector;\n    enqueue = false;\n    flushTypeQueue();\n\n    forEach(defaultTypes, function(type, name) {\n      if (!$types[name]) $types[name] = new Type(type);\n    });\n    return this;\n  }];\n\n  this.Param = function Param(id, type, config, location) {\n    var self = this;\n    config = unwrapShorthand(config);\n    type = getType(config, type, location);\n    var arrayMode = getArrayMode();\n    type = arrayMode ? type.$asArray(arrayMode, location === \"search\") : type;\n    if (type.name === \"string\" && !arrayMode && location === \"path\" && config.value === undefined)\n      config.value = \"\"; // for 0.2.x; in 0.3.0+ do not automatically default to \"\"\n    var isOptional = config.value !== undefined;\n    var squash = getSquashPolicy(config, isOptional);\n    var replace = getReplace(config, arrayMode, isOptional, squash);\n\n    function unwrapShorthand(config) {\n      var keys = isObject(config) ? objectKeys(config) : [];\n      var isShorthand = indexOf(keys, \"value\") === -1 && indexOf(keys, \"type\") === -1 &&\n                        indexOf(keys, \"squash\") === -1 && indexOf(keys, \"array\") === -1;\n      if (isShorthand) config = { value: config };\n      config.$$fn = isInjectable(config.value) ? config.value : function () { return config.value; };\n      return config;\n    }\n\n    function getType(config, urlType, location) {\n      if (config.type && urlType) throw new Error(\"Param '\"+id+\"' has two type configurations.\");\n      if (urlType) return urlType;\n      if (!config.type) return (location === \"config\" ? $types.any : $types.string);\n      return config.type instanceof Type ? config.type : new Type(config.type);\n    }\n\n    // array config: param name (param[]) overrides default settings.  explicit config overrides param name.\n    function getArrayMode() {\n      var arrayDefaults = { array: (location === \"search\" ? \"auto\" : false) };\n      var arrayParamNomenclature = id.match(/\\[\\]$/) ? { array: true } : {};\n      return extend(arrayDefaults, arrayParamNomenclature, config).array;\n    }\n\n    /**\n     * returns false, true, or the squash value to indicate the \"default parameter url squash policy\".\n     */\n    function getSquashPolicy(config, isOptional) {\n      var squash = config.squash;\n      if (!isOptional || squash === false) return false;\n      if (!isDefined(squash) || squash == null) return defaultSquashPolicy;\n      if (squash === true || isString(squash)) return squash;\n      throw new Error(\"Invalid squash policy: '\" + squash + \"'. Valid policies: false, true, or arbitrary string\");\n    }\n\n    function getReplace(config, arrayMode, isOptional, squash) {\n      var replace, configuredKeys, defaultPolicy = [\n        { from: \"\",   to: (isOptional || arrayMode ? undefined : \"\") },\n        { from: null, to: (isOptional || arrayMode ? undefined : \"\") }\n      ];\n      replace = isArray(config.replace) ? config.replace : [];\n      if (isString(squash))\n        replace.push({ from: squash, to: undefined });\n      configuredKeys = map(replace, function(item) { return item.from; } );\n      return filter(defaultPolicy, function(item) { return indexOf(configuredKeys, item.from) === -1; }).concat(replace);\n    }\n\n    /**\n     * [Internal] Get the default value of a parameter, which may be an injectable function.\n     */\n    function $$getDefaultValue() {\n      if (!injector) throw new Error(\"Injectable functions cannot be called at configuration time\");\n      return injector.invoke(config.$$fn);\n    }\n\n    /**\n     * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the\n     * default value, which may be the result of an injectable function.\n     */\n    function $value(value) {\n      function hasReplaceVal(val) { return function(obj) { return obj.from === val; }; }\n      function $replace(value) {\n        var replacement = map(filter(self.replace, hasReplaceVal(value)), function(obj) { return obj.to; });\n        return replacement.length ? replacement[0] : value;\n      }\n      value = $replace(value);\n      return isDefined(value) ? self.type.decode(value) : $$getDefaultValue();\n    }\n\n    function toString() { return \"{Param:\" + id + \" \" + type + \" squash: '\" + squash + \"' optional: \" + isOptional + \"}\"; }\n\n    extend(this, {\n      id: id,\n      type: type,\n      location: location,\n      array: arrayMode,\n      squash: squash,\n      replace: replace,\n      isOptional: isOptional,\n      value: $value,\n      dynamic: undefined,\n      config: config,\n      toString: toString\n    });\n  };\n\n  function ParamSet(params) {\n    extend(this, params || {});\n  }\n\n  ParamSet.prototype = {\n    $$new: function() {\n      return inherit(this, extend(new ParamSet(), { $$parent: this}));\n    },\n    $$keys: function () {\n      var keys = [], chain = [], parent = this,\n        ignore = objectKeys(ParamSet.prototype);\n      while (parent) { chain.push(parent); parent = parent.$$parent; }\n      chain.reverse();\n      forEach(chain, function(paramset) {\n        forEach(objectKeys(paramset), function(key) {\n            if (indexOf(keys, key) === -1 && indexOf(ignore, key) === -1) keys.push(key);\n        });\n      });\n      return keys;\n    },\n    $$values: function(paramValues) {\n      var values = {}, self = this;\n      forEach(self.$$keys(), function(key) {\n        values[key] = self[key].value(paramValues && paramValues[key]);\n      });\n      return values;\n    },\n    $$equals: function(paramValues1, paramValues2) {\n      var equal = true, self = this;\n      forEach(self.$$keys(), function(key) {\n        var left = paramValues1 && paramValues1[key], right = paramValues2 && paramValues2[key];\n        if (!self[key].type.equals(left, right)) equal = false;\n      });\n      return equal;\n    },\n    $$validates: function $$validate(paramValues) {\n      var result = true, isOptional, val, param, self = this;\n\n      forEach(this.$$keys(), function(key) {\n        param = self[key];\n        val = paramValues[key];\n        isOptional = !val && param.isOptional;\n        result = result && (isOptional || !!param.type.is(val));\n      });\n      return result;\n    },\n    $$parent: undefined\n  };\n\n  this.ParamSet = ParamSet;\n}\n\n// Register as a provider so it's available to other providers\nangular.module('ui.router.util').provider('$urlMatcherFactory', $UrlMatcherFactory);\nangular.module('ui.router.util').run(['$urlMatcherFactory', function($urlMatcherFactory) { }]);\n\n/**\n * @ngdoc object\n * @name ui.router.router.$urlRouterProvider\n *\n * @requires ui.router.util.$urlMatcherFactoryProvider\n * @requires $locationProvider\n *\n * @description\n * `$urlRouterProvider` has the responsibility of watching `$location`. \n * When `$location` changes it runs through a list of rules one by one until a \n * match is found. `$urlRouterProvider` is used behind the scenes anytime you specify \n * a url in a state configuration. All urls are compiled into a UrlMatcher object.\n *\n * There are several methods on `$urlRouterProvider` that make it useful to use directly\n * in your module config.\n */\n$UrlRouterProvider.$inject = ['$locationProvider', '$urlMatcherFactoryProvider'];\nfunction $UrlRouterProvider(   $locationProvider,   $urlMatcherFactory) {\n  var rules = [], otherwise = null, interceptDeferred = false, listener;\n\n  // Returns a string that is a prefix of all strings matching the RegExp\n  function regExpPrefix(re) {\n    var prefix = /^\\^((?:\\\\[^a-zA-Z0-9]|[^\\\\\\[\\]\\^$*+?.()|{}]+)*)/.exec(re.source);\n    return (prefix != null) ? prefix[1].replace(/\\\\(.)/g, \"$1\") : '';\n  }\n\n  // Interpolates matched values into a String.replace()-style pattern\n  function interpolate(pattern, match) {\n    return pattern.replace(/\\$(\\$|\\d{1,2})/, function (m, what) {\n      return match[what === '$' ? 0 : Number(what)];\n    });\n  }\n\n  /**\n   * @ngdoc function\n   * @name ui.router.router.$urlRouterProvider#rule\n   * @methodOf ui.router.router.$urlRouterProvider\n   *\n   * @description\n   * Defines rules that are used by `$urlRouterProvider` to find matches for\n   * specific URLs.\n   *\n   * @example\n   * <pre>\n   * var app = angular.module('app', ['ui.router.router']);\n   *\n   * app.config(function ($urlRouterProvider) {\n   *   // Here's an example of how you might allow case insensitive urls\n   *   $urlRouterProvider.rule(function ($injector, $location) {\n   *     var path = $location.path(),\n   *         normalized = path.toLowerCase();\n   *\n   *     if (path !== normalized) {\n   *       return normalized;\n   *     }\n   *   });\n   * });\n   * </pre>\n   *\n   * @param {object} rule Handler function that takes `$injector` and `$location`\n   * services as arguments. You can use them to return a valid path as a string.\n   *\n   * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n   */\n  this.rule = function (rule) {\n    if (!isFunction(rule)) throw new Error(\"'rule' must be a function\");\n    rules.push(rule);\n    return this;\n  };\n\n  /**\n   * @ngdoc object\n   * @name ui.router.router.$urlRouterProvider#otherwise\n   * @methodOf ui.router.router.$urlRouterProvider\n   *\n   * @description\n   * Defines a path that is used when an invalid route is requested.\n   *\n   * @example\n   * <pre>\n   * var app = angular.module('app', ['ui.router.router']);\n   *\n   * app.config(function ($urlRouterProvider) {\n   *   // if the path doesn't match any of the urls you configured\n   *   // otherwise will take care of routing the user to the\n   *   // specified url\n   *   $urlRouterProvider.otherwise('/index');\n   *\n   *   // Example of using function rule as param\n   *   $urlRouterProvider.otherwise(function ($injector, $location) {\n   *     return '/a/valid/url';\n   *   });\n   * });\n   * </pre>\n   *\n   * @param {string|object} rule The url path you want to redirect to or a function \n   * rule that returns the url path. The function version is passed two params: \n   * `$injector` and `$location` services, and must return a url string.\n   *\n   * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n   */\n  this.otherwise = function (rule) {\n    if (isString(rule)) {\n      var redirect = rule;\n      rule = function () { return redirect; };\n    }\n    else if (!isFunction(rule)) throw new Error(\"'rule' must be a function\");\n    otherwise = rule;\n    return this;\n  };\n\n\n  function handleIfMatch($injector, handler, match) {\n    if (!match) return false;\n    var result = $injector.invoke(handler, handler, { $match: match });\n    return isDefined(result) ? result : true;\n  }\n\n  /**\n   * @ngdoc function\n   * @name ui.router.router.$urlRouterProvider#when\n   * @methodOf ui.router.router.$urlRouterProvider\n   *\n   * @description\n   * Registers a handler for a given url matching. if handle is a string, it is\n   * treated as a redirect, and is interpolated according to the syntax of match\n   * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n   *\n   * If the handler is a function, it is injectable. It gets invoked if `$location`\n   * matches. You have the option of inject the match object as `$match`.\n   *\n   * The handler can return\n   *\n   * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n   *   will continue trying to find another one that matches.\n   * - **string** which is treated as a redirect and passed to `$location.url()`\n   * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n   *\n   * @example\n   * <pre>\n   * var app = angular.module('app', ['ui.router.router']);\n   *\n   * app.config(function ($urlRouterProvider) {\n   *   $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n   *     if ($state.$current.navigable !== state ||\n   *         !equalForKeys($match, $stateParams) {\n   *      $state.transitionTo(state, $match, false);\n   *     }\n   *   });\n   * });\n   * </pre>\n   *\n   * @param {string|object} what The incoming path that you want to redirect.\n   * @param {string|object} handler The path you want to redirect your user to.\n   */\n  this.when = function (what, handler) {\n    var redirect, handlerIsString = isString(handler);\n    if (isString(what)) what = $urlMatcherFactory.compile(what);\n\n    if (!handlerIsString && !isFunction(handler) && !isArray(handler))\n      throw new Error(\"invalid 'handler' in when()\");\n\n    var strategies = {\n      matcher: function (what, handler) {\n        if (handlerIsString) {\n          redirect = $urlMatcherFactory.compile(handler);\n          handler = ['$match', function ($match) { return redirect.format($match); }];\n        }\n        return extend(function ($injector, $location) {\n          return handleIfMatch($injector, handler, what.exec($location.path(), $location.search()));\n        }, {\n          prefix: isString(what.prefix) ? what.prefix : ''\n        });\n      },\n      regex: function (what, handler) {\n        if (what.global || what.sticky) throw new Error(\"when() RegExp must not be global or sticky\");\n\n        if (handlerIsString) {\n          redirect = handler;\n          handler = ['$match', function ($match) { return interpolate(redirect, $match); }];\n        }\n        return extend(function ($injector, $location) {\n          return handleIfMatch($injector, handler, what.exec($location.path()));\n        }, {\n          prefix: regExpPrefix(what)\n        });\n      }\n    };\n\n    var check = { matcher: $urlMatcherFactory.isMatcher(what), regex: what instanceof RegExp };\n\n    for (var n in check) {\n      if (check[n]) return this.rule(strategies[n](what, handler));\n    }\n\n    throw new Error(\"invalid 'what' in when()\");\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.router.$urlRouterProvider#deferIntercept\n   * @methodOf ui.router.router.$urlRouterProvider\n   *\n   * @description\n   * Disables (or enables) deferring location change interception.\n   *\n   * If you wish to customize the behavior of syncing the URL (for example, if you wish to\n   * defer a transition but maintain the current URL), call this method at configuration time.\n   * Then, at run time, call `$urlRouter.listen()` after you have configured your own\n   * `$locationChangeSuccess` event handler.\n   *\n   * @example\n   * <pre>\n   * var app = angular.module('app', ['ui.router.router']);\n   *\n   * app.config(function ($urlRouterProvider) {\n   *\n   *   // Prevent $urlRouter from automatically intercepting URL changes;\n   *   // this allows you to configure custom behavior in between\n   *   // location changes and route synchronization:\n   *   $urlRouterProvider.deferIntercept();\n   *\n   * }).run(function ($rootScope, $urlRouter, UserService) {\n   *\n   *   $rootScope.$on('$locationChangeSuccess', function(e) {\n   *     // UserService is an example service for managing user state\n   *     if (UserService.isLoggedIn()) return;\n   *\n   *     // Prevent $urlRouter's default handler from firing\n   *     e.preventDefault();\n   *\n   *     UserService.handleLogin().then(function() {\n   *       // Once the user has logged in, sync the current URL\n   *       // to the router:\n   *       $urlRouter.sync();\n   *     });\n   *   });\n   *\n   *   // Configures $urlRouter's listener *after* your custom listener\n   *   $urlRouter.listen();\n   * });\n   * </pre>\n   *\n   * @param {boolean} defer Indicates whether to defer location change interception. Passing\n            no parameter is equivalent to `true`.\n   */\n  this.deferIntercept = function (defer) {\n    if (defer === undefined) defer = true;\n    interceptDeferred = defer;\n  };\n\n  /**\n   * @ngdoc object\n   * @name ui.router.router.$urlRouter\n   *\n   * @requires $location\n   * @requires $rootScope\n   * @requires $injector\n   * @requires $browser\n   *\n   * @description\n   *\n   */\n  this.$get = $get;\n  $get.$inject = ['$location', '$rootScope', '$injector', '$browser'];\n  function $get(   $location,   $rootScope,   $injector,   $browser) {\n\n    var baseHref = $browser.baseHref(), location = $location.url(), lastPushedUrl;\n\n    function appendBasePath(url, isHtml5, absolute) {\n      if (baseHref === '/') return url;\n      if (isHtml5) return baseHref.slice(0, -1) + url;\n      if (absolute) return baseHref.slice(1) + url;\n      return url;\n    }\n\n    // TODO: Optimize groups of rules with non-empty prefix into some sort of decision tree\n    function update(evt) {\n      if (evt && evt.defaultPrevented) return;\n      var ignoreUpdate = lastPushedUrl && $location.url() === lastPushedUrl;\n      lastPushedUrl = undefined;\n      if (ignoreUpdate) return true;\n\n      function check(rule) {\n        var handled = rule($injector, $location);\n\n        if (!handled) return false;\n        if (isString(handled)) $location.replace().url(handled);\n        return true;\n      }\n      var n = rules.length, i;\n\n      for (i = 0; i < n; i++) {\n        if (check(rules[i])) return;\n      }\n      // always check otherwise last to allow dynamic updates to the set of rules\n      if (otherwise) check(otherwise);\n    }\n\n    function listen() {\n      listener = listener || $rootScope.$on('$locationChangeSuccess', update);\n      return listener;\n    }\n\n    if (!interceptDeferred) listen();\n\n    return {\n      /**\n       * @ngdoc function\n       * @name ui.router.router.$urlRouter#sync\n       * @methodOf ui.router.router.$urlRouter\n       *\n       * @description\n       * Triggers an update; the same update that happens when the address bar url changes, aka `$locationChangeSuccess`.\n       * This method is useful when you need to use `preventDefault()` on the `$locationChangeSuccess` event,\n       * perform some custom logic (route protection, auth, config, redirection, etc) and then finally proceed\n       * with the transition by calling `$urlRouter.sync()`.\n       *\n       * @example\n       * <pre>\n       * angular.module('app', ['ui.router'])\n       *   .run(function($rootScope, $urlRouter) {\n       *     $rootScope.$on('$locationChangeSuccess', function(evt) {\n       *       // Halt state change from even starting\n       *       evt.preventDefault();\n       *       // Perform custom logic\n       *       var meetsRequirement = ...\n       *       // Continue with the update and state transition if logic allows\n       *       if (meetsRequirement) $urlRouter.sync();\n       *     });\n       * });\n       * </pre>\n       */\n      sync: function() {\n        update();\n      },\n\n      listen: function() {\n        return listen();\n      },\n\n      update: function(read) {\n        if (read) {\n          location = $location.url();\n          return;\n        }\n        if ($location.url() === location) return;\n\n        $location.url(location);\n        $location.replace();\n      },\n\n      push: function(urlMatcher, params, options) {\n        $location.url(urlMatcher.format(params || {}));\n        lastPushedUrl = options && options.$$avoidResync ? $location.url() : undefined;\n        if (options && options.replace) $location.replace();\n      },\n\n      /**\n       * @ngdoc function\n       * @name ui.router.router.$urlRouter#href\n       * @methodOf ui.router.router.$urlRouter\n       *\n       * @description\n       * A URL generation method that returns the compiled URL for a given\n       * {@link ui.router.util.type:UrlMatcher `UrlMatcher`}, populated with the provided parameters.\n       *\n       * @example\n       * <pre>\n       * $bob = $urlRouter.href(new UrlMatcher(\"/about/:person\"), {\n       *   person: \"bob\"\n       * });\n       * // $bob == \"/about/bob\";\n       * </pre>\n       *\n       * @param {UrlMatcher} urlMatcher The `UrlMatcher` object which is used as the template of the URL to generate.\n       * @param {object=} params An object of parameter values to fill the matcher's required parameters.\n       * @param {object=} options Options object. The options are:\n       *\n       * - **`absolute`** - {boolean=false},  If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n       *\n       * @returns {string} Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher`\n       */\n      href: function(urlMatcher, params, options) {\n        if (!urlMatcher.validates(params)) return null;\n\n        var isHtml5 = $locationProvider.html5Mode();\n        if (angular.isObject(isHtml5)) {\n          isHtml5 = isHtml5.enabled;\n        }\n        \n        var url = urlMatcher.format(params);\n        options = options || {};\n\n        if (!isHtml5 && url !== null) {\n          url = \"#\" + $locationProvider.hashPrefix() + url;\n        }\n        url = appendBasePath(url, isHtml5, options.absolute);\n\n        if (!options.absolute || !url) {\n          return url;\n        }\n\n        var slash = (!isHtml5 && url ? '/' : ''), port = $location.port();\n        port = (port === 80 || port === 443 ? '' : ':' + port);\n\n        return [$location.protocol(), '://', $location.host(), port, slash, url].join('');\n      }\n    };\n  }\n}\n\nangular.module('ui.router.router').provider('$urlRouter', $UrlRouterProvider);\n\n/**\n * @ngdoc object\n * @name ui.router.state.$stateProvider\n *\n * @requires ui.router.router.$urlRouterProvider\n * @requires ui.router.util.$urlMatcherFactoryProvider\n *\n * @description\n * The new `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n * on state.\n *\n * A state corresponds to a \"place\" in the application in terms of the overall UI and\n * navigation. A state describes (via the controller / template / view properties) what\n * the UI looks like and does at that place.\n *\n * States often have things in common, and the primary way of factoring out these\n * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n * nested states.\n *\n * The `$stateProvider` provides interfaces to declare these states for your app.\n */\n$StateProvider.$inject = ['$urlRouterProvider', '$urlMatcherFactoryProvider'];\nfunction $StateProvider(   $urlRouterProvider,   $urlMatcherFactory) {\n\n  var root, states = {}, $state, queue = {}, abstractKey = 'abstract';\n\n  // Builds state properties from definition passed to registerState()\n  var stateBuilder = {\n\n    // Derive parent state from a hierarchical name only if 'parent' is not explicitly defined.\n    // state.children = [];\n    // if (parent) parent.children.push(state);\n    parent: function(state) {\n      if (isDefined(state.parent) && state.parent) return findState(state.parent);\n      // regex matches any valid composite state name\n      // would match \"contact.list\" but not \"contacts\"\n      var compositeName = /^(.+)\\.[^.]+$/.exec(state.name);\n      return compositeName ? findState(compositeName[1]) : root;\n    },\n\n    // inherit 'data' from parent and override by own values (if any)\n    data: function(state) {\n      if (state.parent && state.parent.data) {\n        state.data = state.self.data = extend({}, state.parent.data, state.data);\n      }\n      return state.data;\n    },\n\n    // Build a URLMatcher if necessary, either via a relative or absolute URL\n    url: function(state) {\n      var url = state.url, config = { params: state.params || {} };\n\n      if (isString(url)) {\n        if (url.charAt(0) == '^') return $urlMatcherFactory.compile(url.substring(1), config);\n        return (state.parent.navigable || root).url.concat(url, config);\n      }\n\n      if (!url || $urlMatcherFactory.isMatcher(url)) return url;\n      throw new Error(\"Invalid url '\" + url + \"' in state '\" + state + \"'\");\n    },\n\n    // Keep track of the closest ancestor state that has a URL (i.e. is navigable)\n    navigable: function(state) {\n      return state.url ? state : (state.parent ? state.parent.navigable : null);\n    },\n\n    // Own parameters for this state. state.url.params is already built at this point. Create and add non-url params\n    ownParams: function(state) {\n      var params = state.url && state.url.params || new $$UMFP.ParamSet();\n      forEach(state.params || {}, function(config, id) {\n        if (!params[id]) params[id] = new $$UMFP.Param(id, null, config, \"config\");\n      });\n      return params;\n    },\n\n    // Derive parameters for this state and ensure they're a super-set of parent's parameters\n    params: function(state) {\n      return state.parent && state.parent.params ? extend(state.parent.params.$$new(), state.ownParams) : new $$UMFP.ParamSet();\n    },\n\n    // If there is no explicit multi-view configuration, make one up so we don't have\n    // to handle both cases in the view directive later. Note that having an explicit\n    // 'views' property will mean the default unnamed view properties are ignored. This\n    // is also a good time to resolve view names to absolute names, so everything is a\n    // straight lookup at link time.\n    views: function(state) {\n      var views = {};\n\n      forEach(isDefined(state.views) ? state.views : { '': state }, function (view, name) {\n        if (name.indexOf('@') < 0) name += '@' + state.parent.name;\n        views[name] = view;\n      });\n      return views;\n    },\n\n    // Keep a full path from the root down to this state as this is needed for state activation.\n    path: function(state) {\n      return state.parent ? state.parent.path.concat(state) : []; // exclude root from path\n    },\n\n    // Speed up $state.contains() as it's used a lot\n    includes: function(state) {\n      var includes = state.parent ? extend({}, state.parent.includes) : {};\n      includes[state.name] = true;\n      return includes;\n    },\n\n    $delegates: {}\n  };\n\n  function isRelative(stateName) {\n    return stateName.indexOf(\".\") === 0 || stateName.indexOf(\"^\") === 0;\n  }\n\n  function findState(stateOrName, base) {\n    if (!stateOrName) return undefined;\n\n    var isStr = isString(stateOrName),\n        name  = isStr ? stateOrName : stateOrName.name,\n        path  = isRelative(name);\n\n    if (path) {\n      if (!base) throw new Error(\"No reference point given for path '\"  + name + \"'\");\n      base = findState(base);\n      \n      var rel = name.split(\".\"), i = 0, pathLength = rel.length, current = base;\n\n      for (; i < pathLength; i++) {\n        if (rel[i] === \"\" && i === 0) {\n          current = base;\n          continue;\n        }\n        if (rel[i] === \"^\") {\n          if (!current.parent) throw new Error(\"Path '\" + name + \"' not valid for state '\" + base.name + \"'\");\n          current = current.parent;\n          continue;\n        }\n        break;\n      }\n      rel = rel.slice(i).join(\".\");\n      name = current.name + (current.name && rel ? \".\" : \"\") + rel;\n    }\n    var state = states[name];\n\n    if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) {\n      return state;\n    }\n    return undefined;\n  }\n\n  function queueState(parentName, state) {\n    if (!queue[parentName]) {\n      queue[parentName] = [];\n    }\n    queue[parentName].push(state);\n  }\n\n  function flushQueuedChildren(parentName) {\n    var queued = queue[parentName] || [];\n    while(queued.length) {\n      registerState(queued.shift());\n    }\n  }\n\n  function registerState(state) {\n    // Wrap a new object around the state so we can store our private details easily.\n    state = inherit(state, {\n      self: state,\n      resolve: state.resolve || {},\n      toString: function() { return this.name; }\n    });\n\n    var name = state.name;\n    if (!isString(name) || name.indexOf('@') >= 0) throw new Error(\"State must have a valid name\");\n    if (states.hasOwnProperty(name)) throw new Error(\"State '\" + name + \"'' is already defined\");\n\n    // Get parent name\n    var parentName = (name.indexOf('.') !== -1) ? name.substring(0, name.lastIndexOf('.'))\n        : (isString(state.parent)) ? state.parent\n        : (isObject(state.parent) && isString(state.parent.name)) ? state.parent.name\n        : '';\n\n    // If parent is not registered yet, add state to queue and register later\n    if (parentName && !states[parentName]) {\n      return queueState(parentName, state.self);\n    }\n\n    for (var key in stateBuilder) {\n      if (isFunction(stateBuilder[key])) state[key] = stateBuilder[key](state, stateBuilder.$delegates[key]);\n    }\n    states[name] = state;\n\n    // Register the state in the global state list and with $urlRouter if necessary.\n    if (!state[abstractKey] && state.url) {\n      $urlRouterProvider.when(state.url, ['$match', '$stateParams', function ($match, $stateParams) {\n        if ($state.$current.navigable != state || !equalForKeys($match, $stateParams)) {\n          $state.transitionTo(state, $match, { inherit: true, location: false });\n        }\n      }]);\n    }\n\n    // Register any queued children\n    flushQueuedChildren(name);\n\n    return state;\n  }\n\n  // Checks text to see if it looks like a glob.\n  function isGlob (text) {\n    return text.indexOf('*') > -1;\n  }\n\n  // Returns true if glob matches current $state name.\n  function doesStateMatchGlob (glob) {\n    var globSegments = glob.split('.'),\n        segments = $state.$current.name.split('.');\n\n    //match greedy starts\n    if (globSegments[0] === '**') {\n       segments = segments.slice(indexOf(segments, globSegments[1]));\n       segments.unshift('**');\n    }\n    //match greedy ends\n    if (globSegments[globSegments.length - 1] === '**') {\n       segments.splice(indexOf(segments, globSegments[globSegments.length - 2]) + 1, Number.MAX_VALUE);\n       segments.push('**');\n    }\n\n    if (globSegments.length != segments.length) {\n      return false;\n    }\n\n    //match single stars\n    for (var i = 0, l = globSegments.length; i < l; i++) {\n      if (globSegments[i] === '*') {\n        segments[i] = '*';\n      }\n    }\n\n    return segments.join('') === globSegments.join('');\n  }\n\n\n  // Implicit root state that is always active\n  root = registerState({\n    name: '',\n    url: '^',\n    views: null,\n    'abstract': true\n  });\n  root.navigable = null;\n\n\n  /**\n   * @ngdoc function\n   * @name ui.router.state.$stateProvider#decorator\n   * @methodOf ui.router.state.$stateProvider\n   *\n   * @description\n   * Allows you to extend (carefully) or override (at your own peril) the \n   * `stateBuilder` object used internally by `$stateProvider`. This can be used \n   * to add custom functionality to ui-router, for example inferring templateUrl \n   * based on the state name.\n   *\n   * When passing only a name, it returns the current (original or decorated) builder\n   * function that matches `name`.\n   *\n   * The builder functions that can be decorated are listed below. Though not all\n   * necessarily have a good use case for decoration, that is up to you to decide.\n   *\n   * In addition, users can attach custom decorators, which will generate new \n   * properties within the state's internal definition. There is currently no clear \n   * use-case for this beyond accessing internal states (i.e. $state.$current), \n   * however, expect this to become increasingly relevant as we introduce additional \n   * meta-programming features.\n   *\n   * **Warning**: Decorators should not be interdependent because the order of \n   * execution of the builder functions in non-deterministic. Builder functions \n   * should only be dependent on the state definition object and super function.\n   *\n   *\n   * Existing builder functions and current return values:\n   *\n   * - **parent** `{object}` - returns the parent state object.\n   * - **data** `{object}` - returns state data, including any inherited data that is not\n   *   overridden by own values (if any).\n   * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n   *   or `null`.\n   * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is \n   *   navigable).\n   * - **params** `{object}` - returns an array of state params that are ensured to \n   *   be a super-set of parent's params.\n   * - **views** `{object}` - returns a views object where each key is an absolute view \n   *   name (i.e. \"viewName@stateName\") and each value is the config object \n   *   (template, controller) for the view. Even when you don't use the views object \n   *   explicitly on a state config, one is still created for you internally.\n   *   So by decorating this builder function you have access to decorating template \n   *   and controller properties.\n   * - **ownParams** `{object}` - returns an array of params that belong to the state, \n   *   not including any params defined by ancestor states.\n   * - **path** `{string}` - returns the full path from the root down to this state. \n   *   Needed for state activation.\n   * - **includes** `{object}` - returns an object that includes every state that \n   *   would pass a `$state.includes()` test.\n   *\n   * @example\n   * <pre>\n   * // Override the internal 'views' builder with a function that takes the state\n   * // definition, and a reference to the internal function being overridden:\n   * $stateProvider.decorator('views', function (state, parent) {\n   *   var result = {},\n   *       views = parent(state);\n   *\n   *   angular.forEach(views, function (config, name) {\n   *     var autoName = (state.name + '.' + name).replace('.', '/');\n   *     config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n   *     result[name] = config;\n   *   });\n   *   return result;\n   * });\n   *\n   * $stateProvider.state('home', {\n   *   views: {\n   *     'contact.list': { controller: 'ListController' },\n   *     'contact.item': { controller: 'ItemController' }\n   *   }\n   * });\n   *\n   * // ...\n   *\n   * $state.go('home');\n   * // Auto-populates list and item views with /partials/home/contact/list.html,\n   * // and /partials/home/contact/item.html, respectively.\n   * </pre>\n   *\n   * @param {string} name The name of the builder function to decorate. \n   * @param {object} func A function that is responsible for decorating the original \n   * builder function. The function receives two parameters:\n   *\n   *   - `{object}` - state - The state config object.\n   *   - `{object}` - super - The original builder function.\n   *\n   * @return {object} $stateProvider - $stateProvider instance\n   */\n  this.decorator = decorator;\n  function decorator(name, func) {\n    /*jshint validthis: true */\n    if (isString(name) && !isDefined(func)) {\n      return stateBuilder[name];\n    }\n    if (!isFunction(func) || !isString(name)) {\n      return this;\n    }\n    if (stateBuilder[name] && !stateBuilder.$delegates[name]) {\n      stateBuilder.$delegates[name] = stateBuilder[name];\n    }\n    stateBuilder[name] = func;\n    return this;\n  }\n\n  /**\n   * @ngdoc function\n   * @name ui.router.state.$stateProvider#state\n   * @methodOf ui.router.state.$stateProvider\n   *\n   * @description\n   * Registers a state configuration under a given state name. The stateConfig object\n   * has the following acceptable properties.\n   *\n   * @param {string} name A unique state name, e.g. \"home\", \"about\", \"contacts\".\n   * To create a parent/child state use a dot, e.g. \"about.sales\", \"home.newest\".\n   * @param {object} stateConfig State configuration object.\n   * @param {string|function=} stateConfig.template\n   * <a id='template'></a>\n   *   html template as a string or a function that returns\n   *   an html template as a string which should be used by the uiView directives. This property \n   *   takes precedence over templateUrl.\n   *   \n   *   If `template` is a function, it will be called with the following parameters:\n   *\n   *   - {array.&lt;object&gt;} - state parameters extracted from the current $location.path() by\n   *     applying the current state\n   *\n   * <pre>template:\n   *   \"<h1>inline template definition</h1>\" +\n   *   \"<div ui-view></div>\"</pre>\n   * <pre>template: function(params) {\n   *       return \"<h1>generated template</h1>\"; }</pre>\n   * </div>\n   *\n   * @param {string|function=} stateConfig.templateUrl\n   * <a id='templateUrl'></a>\n   *\n   *   path or function that returns a path to an html\n   *   template that should be used by uiView.\n   *   \n   *   If `templateUrl` is a function, it will be called with the following parameters:\n   *\n   *   - {array.&lt;object&gt;} - state parameters extracted from the current $location.path() by \n   *     applying the current state\n   *\n   * <pre>templateUrl: \"home.html\"</pre>\n   * <pre>templateUrl: function(params) {\n   *     return myTemplates[params.pageId]; }</pre>\n   *\n   * @param {function=} stateConfig.templateProvider\n   * <a id='templateProvider'></a>\n   *    Provider function that returns HTML content string.\n   * <pre> templateProvider:\n   *       function(MyTemplateService, params) {\n   *         return MyTemplateService.getTemplate(params.pageId);\n   *       }</pre>\n   *\n   * @param {string|function=} stateConfig.controller\n   * <a id='controller'></a>\n   *\n   *  Controller fn that should be associated with newly\n   *   related scope or the name of a registered controller if passed as a string.\n   *   Optionally, the ControllerAs may be declared here.\n   * <pre>controller: \"MyRegisteredController\"</pre>\n   * <pre>controller:\n   *     \"MyRegisteredController as fooCtrl\"}</pre>\n   * <pre>controller: function($scope, MyService) {\n   *     $scope.data = MyService.getData(); }</pre>\n   *\n   * @param {function=} stateConfig.controllerProvider\n   * <a id='controllerProvider'></a>\n   *\n   * Injectable provider function that returns the actual controller or string.\n   * <pre>controllerProvider:\n   *   function(MyResolveData) {\n   *     if (MyResolveData.foo)\n   *       return \"FooCtrl\"\n   *     else if (MyResolveData.bar)\n   *       return \"BarCtrl\";\n   *     else return function($scope) {\n   *       $scope.baz = \"Qux\";\n   *     }\n   *   }</pre>\n   *\n   * @param {string=} stateConfig.controllerAs\n   * <a id='controllerAs'></a>\n   * \n   * A controller alias name. If present the controller will be\n   *   published to scope under the controllerAs name.\n   * <pre>controllerAs: \"myCtrl\"</pre>\n   *\n   * @param {object=} stateConfig.resolve\n   * <a id='resolve'></a>\n   *\n   * An optional map&lt;string, function&gt; of dependencies which\n   *   should be injected into the controller. If any of these dependencies are promises, \n   *   the router will wait for them all to be resolved before the controller is instantiated.\n   *   If all the promises are resolved successfully, the $stateChangeSuccess event is fired\n   *   and the values of the resolved promises are injected into any controllers that reference them.\n   *   If any  of the promises are rejected the $stateChangeError event is fired.\n   *\n   *   The map object is:\n   *   \n   *   - key - {string}: name of dependency to be injected into controller\n   *   - factory - {string|function}: If string then it is alias for service. Otherwise if function, \n   *     it is injected and return value it treated as dependency. If result is a promise, it is \n   *     resolved before its value is injected into controller.\n   *\n   * <pre>resolve: {\n   *     myResolve1:\n   *       function($http, $stateParams) {\n   *         return $http.get(\"/api/foos/\"+stateParams.fooID);\n   *       }\n   *     }</pre>\n   *\n   * @param {string=} stateConfig.url\n   * <a id='url'></a>\n   *\n   *   A url fragment with optional parameters. When a state is navigated or\n   *   transitioned to, the `$stateParams` service will be populated with any \n   *   parameters that were passed.\n   *\n   * examples:\n   * <pre>url: \"/home\"\n   * url: \"/users/:userid\"\n   * url: \"/books/{bookid:[a-zA-Z_-]}\"\n   * url: \"/books/{categoryid:int}\"\n   * url: \"/books/{publishername:string}/{categoryid:int}\"\n   * url: \"/messages?before&after\"\n   * url: \"/messages?{before:date}&{after:date}\"</pre>\n   * url: \"/messages/:mailboxid?{before:date}&{after:date}\"\n   *\n   * @param {object=} stateConfig.views\n   * <a id='views'></a>\n   * an optional map&lt;string, object&gt; which defined multiple views, or targets views\n   * manually/explicitly.\n   *\n   * Examples:\n   *\n   * Targets three named `ui-view`s in the parent state's template\n   * <pre>views: {\n   *     header: {\n   *       controller: \"headerCtrl\",\n   *       templateUrl: \"header.html\"\n   *     }, body: {\n   *       controller: \"bodyCtrl\",\n   *       templateUrl: \"body.html\"\n   *     }, footer: {\n   *       controller: \"footCtrl\",\n   *       templateUrl: \"footer.html\"\n   *     }\n   *   }</pre>\n   *\n   * Targets named `ui-view=\"header\"` from grandparent state 'top''s template, and named `ui-view=\"body\" from parent state's template.\n   * <pre>views: {\n   *     'header@top': {\n   *       controller: \"msgHeaderCtrl\",\n   *       templateUrl: \"msgHeader.html\"\n   *     }, 'body': {\n   *       controller: \"messagesCtrl\",\n   *       templateUrl: \"messages.html\"\n   *     }\n   *   }</pre>\n   *\n   * @param {boolean=} [stateConfig.abstract=false]\n   * <a id='abstract'></a>\n   * An abstract state will never be directly activated,\n   *   but can provide inherited properties to its common children states.\n   * <pre>abstract: true</pre>\n   *\n   * @param {function=} stateConfig.onEnter\n   * <a id='onEnter'></a>\n   *\n   * Callback function for when a state is entered. Good way\n   *   to trigger an action or dispatch an event, such as opening a dialog.\n   * If minifying your scripts, make sure to explictly annotate this function,\n   * because it won't be automatically annotated by your build tools.\n   *\n   * <pre>onEnter: function(MyService, $stateParams) {\n   *     MyService.foo($stateParams.myParam);\n   * }</pre>\n   *\n   * @param {function=} stateConfig.onExit\n   * <a id='onExit'></a>\n   *\n   * Callback function for when a state is exited. Good way to\n   *   trigger an action or dispatch an event, such as opening a dialog.\n   * If minifying your scripts, make sure to explictly annotate this function,\n   * because it won't be automatically annotated by your build tools.\n   *\n   * <pre>onExit: function(MyService, $stateParams) {\n   *     MyService.cleanup($stateParams.myParam);\n   * }</pre>\n   *\n   * @param {boolean=} [stateConfig.reloadOnSearch=true]\n   * <a id='reloadOnSearch'></a>\n   *\n   * If `false`, will not retrigger the same state\n   *   just because a search/query parameter has changed (via $location.search() or $location.hash()). \n   *   Useful for when you'd like to modify $location.search() without triggering a reload.\n   * <pre>reloadOnSearch: false</pre>\n   *\n   * @param {object=} stateConfig.data\n   * <a id='data'></a>\n   *\n   * Arbitrary data object, useful for custom configuration.  The parent state's `data` is\n   *   prototypally inherited.  In other words, adding a data property to a state adds it to\n   *   the entire subtree via prototypal inheritance.\n   *\n   * <pre>data: {\n   *     requiredRole: 'foo'\n   * } </pre>\n   *\n   * @param {object=} stateConfig.params\n   * <a id='params'></a>\n   *\n   * A map which optionally configures parameters declared in the `url`, or\n   *   defines additional non-url parameters.  For each parameter being\n   *   configured, add a configuration object keyed to the name of the parameter.\n   *\n   *   Each parameter configuration object may contain the following properties:\n   *\n   *   - ** value ** - {object|function=}: specifies the default value for this\n   *     parameter.  This implicitly sets this parameter as optional.\n   *\n   *     When UI-Router routes to a state and no value is\n   *     specified for this parameter in the URL or transition, the\n   *     default value will be used instead.  If `value` is a function,\n   *     it will be injected and invoked, and the return value used.\n   *\n   *     *Note*: `undefined` is treated as \"no default value\" while `null`\n   *     is treated as \"the default value is `null`\".\n   *\n   *     *Shorthand*: If you only need to configure the default value of the\n   *     parameter, you may use a shorthand syntax.   In the **`params`**\n   *     map, instead mapping the param name to a full parameter configuration\n   *     object, simply set map it to the default parameter value, e.g.:\n   *\n   * <pre>// define a parameter's default value\n   * params: {\n   *     param1: { value: \"defaultValue\" }\n   * }\n   * // shorthand default values\n   * params: {\n   *     param1: \"defaultValue\",\n   *     param2: \"param2Default\"\n   * }</pre>\n   *\n   *   - ** array ** - {boolean=}: *(default: false)* If true, the param value will be\n   *     treated as an array of values.  If you specified a Type, the value will be\n   *     treated as an array of the specified Type.  Note: query parameter values\n   *     default to a special `\"auto\"` mode.\n   *\n   *     For query parameters in `\"auto\"` mode, if multiple  values for a single parameter\n   *     are present in the URL (e.g.: `/foo?bar=1&bar=2&bar=3`) then the values\n   *     are mapped to an array (e.g.: `{ foo: [ '1', '2', '3' ] }`).  However, if\n   *     only one value is present (e.g.: `/foo?bar=1`) then the value is treated as single\n   *     value (e.g.: `{ foo: '1' }`).\n   *\n   * <pre>params: {\n   *     param1: { array: true }\n   * }</pre>\n   *\n   *   - ** squash ** - {bool|string=}: `squash` configures how a default parameter value is represented in the URL when\n   *     the current parameter value is the same as the default value. If `squash` is not set, it uses the\n   *     configured default squash policy.\n   *     (See {@link ui.router.util.$urlMatcherFactory#methods_defaultSquashPolicy `defaultSquashPolicy()`})\n   *\n   *   There are three squash settings:\n   *\n   *     - false: The parameter's default value is not squashed.  It is encoded and included in the URL\n   *     - true: The parameter's default value is omitted from the URL.  If the parameter is preceeded and followed\n   *       by slashes in the state's `url` declaration, then one of those slashes are omitted.\n   *       This can allow for cleaner looking URLs.\n   *     - `\"<arbitrary string>\"`: The parameter's default value is replaced with an arbitrary placeholder of  your choice.\n   *\n   * <pre>params: {\n   *     param1: {\n   *       value: \"defaultId\",\n   *       squash: true\n   * } }\n   * // squash \"defaultValue\" to \"~\"\n   * params: {\n   *     param1: {\n   *       value: \"defaultValue\",\n   *       squash: \"~\"\n   * } }\n   * </pre>\n   *\n   *\n   * @example\n   * <pre>\n   * // Some state name examples\n   *\n   * // stateName can be a single top-level name (must be unique).\n   * $stateProvider.state(\"home\", {});\n   *\n   * // Or it can be a nested state name. This state is a child of the\n   * // above \"home\" state.\n   * $stateProvider.state(\"home.newest\", {});\n   *\n   * // Nest states as deeply as needed.\n   * $stateProvider.state(\"home.newest.abc.xyz.inception\", {});\n   *\n   * // state() returns $stateProvider, so you can chain state declarations.\n   * $stateProvider\n   *   .state(\"home\", {})\n   *   .state(\"about\", {})\n   *   .state(\"contacts\", {});\n   * </pre>\n   *\n   */\n  this.state = state;\n  function state(name, definition) {\n    /*jshint validthis: true */\n    if (isObject(name)) definition = name;\n    else definition.name = name;\n    registerState(definition);\n    return this;\n  }\n\n  /**\n   * @ngdoc object\n   * @name ui.router.state.$state\n   *\n   * @requires $rootScope\n   * @requires $q\n   * @requires ui.router.state.$view\n   * @requires $injector\n   * @requires ui.router.util.$resolve\n   * @requires ui.router.state.$stateParams\n   * @requires ui.router.router.$urlRouter\n   *\n   * @property {object} params A param object, e.g. {sectionId: section.id)}, that \n   * you'd like to test against the current active state.\n   * @property {object} current A reference to the state's config object. However \n   * you passed it in. Useful for accessing custom data.\n   * @property {object} transition Currently pending transition. A promise that'll \n   * resolve or reject.\n   *\n   * @description\n   * `$state` service is responsible for representing states as well as transitioning\n   * between them. It also provides interfaces to ask for current state or even states\n   * you're coming from.\n   */\n  this.$get = $get;\n  $get.$inject = ['$rootScope', '$q', '$view', '$injector', '$resolve', '$stateParams', '$urlRouter', '$location', '$urlMatcherFactory'];\n  function $get(   $rootScope,   $q,   $view,   $injector,   $resolve,   $stateParams,   $urlRouter,   $location,   $urlMatcherFactory) {\n\n    var TransitionSuperseded = $q.reject(new Error('transition superseded'));\n    var TransitionPrevented = $q.reject(new Error('transition prevented'));\n    var TransitionAborted = $q.reject(new Error('transition aborted'));\n    var TransitionFailed = $q.reject(new Error('transition failed'));\n\n    // Handles the case where a state which is the target of a transition is not found, and the user\n    // can optionally retry or defer the transition\n    function handleRedirect(redirect, state, params, options) {\n      /**\n       * @ngdoc event\n       * @name ui.router.state.$state#$stateNotFound\n       * @eventOf ui.router.state.$state\n       * @eventType broadcast on root scope\n       * @description\n       * Fired when a requested state **cannot be found** using the provided state name during transition.\n       * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n       * lazy-loading the unfound state). A special `unfoundState` object is passed to the listener handler,\n       * you can see its three properties in the example. You can use `event.preventDefault()` to abort the\n       * transition and the promise returned from `go` will be rejected with a `'transition aborted'` value.\n       *\n       * @param {Object} event Event object.\n       * @param {Object} unfoundState Unfound State information. Contains: `to, toParams, options` properties.\n       * @param {State} fromState Current state object.\n       * @param {Object} fromParams Current state params.\n       *\n       * @example\n       *\n       * <pre>\n       * // somewhere, assume lazy.state has not been defined\n       * $state.go(\"lazy.state\", {a:1, b:2}, {inherit:false});\n       *\n       * // somewhere else\n       * $scope.$on('$stateNotFound',\n       * function(event, unfoundState, fromState, fromParams){\n       *     console.log(unfoundState.to); // \"lazy.state\"\n       *     console.log(unfoundState.toParams); // {a:1, b:2}\n       *     console.log(unfoundState.options); // {inherit:false} + default options\n       * })\n       * </pre>\n       */\n      var evt = $rootScope.$broadcast('$stateNotFound', redirect, state, params);\n\n      if (evt.defaultPrevented) {\n        $urlRouter.update();\n        return TransitionAborted;\n      }\n\n      if (!evt.retry) {\n        return null;\n      }\n\n      // Allow the handler to return a promise to defer state lookup retry\n      if (options.$retry) {\n        $urlRouter.update();\n        return TransitionFailed;\n      }\n      var retryTransition = $state.transition = $q.when(evt.retry);\n\n      retryTransition.then(function() {\n        if (retryTransition !== $state.transition) return TransitionSuperseded;\n        redirect.options.$retry = true;\n        return $state.transitionTo(redirect.to, redirect.toParams, redirect.options);\n      }, function() {\n        return TransitionAborted;\n      });\n      $urlRouter.update();\n\n      return retryTransition;\n    }\n\n    root.locals = { resolve: null, globals: { $stateParams: {} } };\n\n    $state = {\n      params: {},\n      current: root.self,\n      $current: root,\n      transition: null\n    };\n\n    /**\n     * @ngdoc function\n     * @name ui.router.state.$state#reload\n     * @methodOf ui.router.state.$state\n     *\n     * @description\n     * A method that force reloads the current state. All resolves are re-resolved, events are not re-fired, \n     * and controllers reinstantiated (bug with controllers reinstantiating right now, fixing soon).\n     *\n     * @example\n     * <pre>\n     * var app angular.module('app', ['ui.router']);\n     *\n     * app.controller('ctrl', function ($scope, $state) {\n     *   $scope.reload = function(){\n     *     $state.reload();\n     *   }\n     * });\n     * </pre>\n     *\n     * `reload()` is just an alias for:\n     * <pre>\n     * $state.transitionTo($state.current, $stateParams, { \n     *   reload: true, inherit: false, notify: true\n     * });\n     * </pre>\n     *\n     * @returns {promise} A promise representing the state of the new transition. See\n     * {@link ui.router.state.$state#methods_go $state.go}.\n     */\n    $state.reload = function reload() {\n      return $state.transitionTo($state.current, $stateParams, { reload: true, inherit: false, notify: true });\n    };\n\n    /**\n     * @ngdoc function\n     * @name ui.router.state.$state#go\n     * @methodOf ui.router.state.$state\n     *\n     * @description\n     * Convenience method for transitioning to a new state. `$state.go` calls \n     * `$state.transitionTo` internally but automatically sets options to \n     * `{ location: true, inherit: true, relative: $state.$current, notify: true }`. \n     * This allows you to easily use an absolute or relative to path and specify \n     * only the parameters you'd like to update (while letting unspecified parameters \n     * inherit from the currently active ancestor states).\n     *\n     * @example\n     * <pre>\n     * var app = angular.module('app', ['ui.router']);\n     *\n     * app.controller('ctrl', function ($scope, $state) {\n     *   $scope.changeState = function () {\n     *     $state.go('contact.detail');\n     *   };\n     * });\n     * </pre>\n     * <img src='../ngdoc_assets/StateGoExamples.png'/>\n     *\n     * @param {string} to Absolute state name or relative state path. Some examples:\n     *\n     * - `$state.go('contact.detail')` - will go to the `contact.detail` state\n     * - `$state.go('^')` - will go to a parent state\n     * - `$state.go('^.sibling')` - will go to a sibling state\n     * - `$state.go('.child.grandchild')` - will go to grandchild state\n     *\n     * @param {object=} params A map of the parameters that will be sent to the state, \n     * will populate $stateParams. Any parameters that are not specified will be inherited from currently \n     * defined parameters. This allows, for example, going to a sibling state that shares parameters\n     * specified in a parent state. Parameter inheritance only works between common ancestor states, I.e.\n     * transitioning to a sibling will get you the parameters for all parents, transitioning to a child\n     * will get you all current parameters, etc.\n     * @param {object=} options Options object. The options are:\n     *\n     * - **`location`** - {boolean=true|string=} - If `true` will update the url in the location bar, if `false`\n     *    will not. If string, must be `\"replace\"`, which will update url and also replace last history record.\n     * - **`inherit`** - {boolean=true}, If `true` will inherit url parameters from current url.\n     * - **`relative`** - {object=$state.$current}, When transitioning with relative path (e.g '^'), \n     *    defines which state to be relative from.\n     * - **`notify`** - {boolean=true}, If `true` will broadcast $stateChangeStart and $stateChangeSuccess events.\n     * - **`reload`** (v0.2.5) - {boolean=false}, If `true` will force transition even if the state or params \n     *    have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd\n     *    use this when you want to force a reload when *everything* is the same, including search params.\n     *\n     * @returns {promise} A promise representing the state of the new transition.\n     *\n     * Possible success values:\n     *\n     * - $state.current\n     *\n     * <br/>Possible rejection values:\n     *\n     * - 'transition superseded' - when a newer transition has been started after this one\n     * - 'transition prevented' - when `event.preventDefault()` has been called in a `$stateChangeStart` listener\n     * - 'transition aborted' - when `event.preventDefault()` has been called in a `$stateNotFound` listener or\n     *   when a `$stateNotFound` `event.retry` promise errors.\n     * - 'transition failed' - when a state has been unsuccessfully found after 2 tries.\n     * - *resolve error* - when an error has occurred with a `resolve`\n     *\n     */\n    $state.go = function go(to, params, options) {\n      return $state.transitionTo(to, params, extend({ inherit: true, relative: $state.$current }, options));\n    };\n\n    /**\n     * @ngdoc function\n     * @name ui.router.state.$state#transitionTo\n     * @methodOf ui.router.state.$state\n     *\n     * @description\n     * Low-level method for transitioning to a new state. {@link ui.router.state.$state#methods_go $state.go}\n     * uses `transitionTo` internally. `$state.go` is recommended in most situations.\n     *\n     * @example\n     * <pre>\n     * var app = angular.module('app', ['ui.router']);\n     *\n     * app.controller('ctrl', function ($scope, $state) {\n     *   $scope.changeState = function () {\n     *     $state.transitionTo('contact.detail');\n     *   };\n     * });\n     * </pre>\n     *\n     * @param {string} to State name.\n     * @param {object=} toParams A map of the parameters that will be sent to the state,\n     * will populate $stateParams.\n     * @param {object=} options Options object. The options are:\n     *\n     * - **`location`** - {boolean=true|string=} - If `true` will update the url in the location bar, if `false`\n     *    will not. If string, must be `\"replace\"`, which will update url and also replace last history record.\n     * - **`inherit`** - {boolean=false}, If `true` will inherit url parameters from current url.\n     * - **`relative`** - {object=}, When transitioning with relative path (e.g '^'), \n     *    defines which state to be relative from.\n     * - **`notify`** - {boolean=true}, If `true` will broadcast $stateChangeStart and $stateChangeSuccess events.\n     * - **`reload`** (v0.2.5) - {boolean=false}, If `true` will force transition even if the state or params \n     *    have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd\n     *    use this when you want to force a reload when *everything* is the same, including search params.\n     *\n     * @returns {promise} A promise representing the state of the new transition. See\n     * {@link ui.router.state.$state#methods_go $state.go}.\n     */\n    $state.transitionTo = function transitionTo(to, toParams, options) {\n      toParams = toParams || {};\n      options = extend({\n        location: true, inherit: false, relative: null, notify: true, reload: false, $retry: false\n      }, options || {});\n\n      var from = $state.$current, fromParams = $state.params, fromPath = from.path;\n      var evt, toState = findState(to, options.relative);\n\n      if (!isDefined(toState)) {\n        var redirect = { to: to, toParams: toParams, options: options };\n        var redirectResult = handleRedirect(redirect, from.self, fromParams, options);\n\n        if (redirectResult) {\n          return redirectResult;\n        }\n\n        // Always retry once if the $stateNotFound was not prevented\n        // (handles either redirect changed or state lazy-definition)\n        to = redirect.to;\n        toParams = redirect.toParams;\n        options = redirect.options;\n        toState = findState(to, options.relative);\n\n        if (!isDefined(toState)) {\n          if (!options.relative) throw new Error(\"No such state '\" + to + \"'\");\n          throw new Error(\"Could not resolve '\" + to + \"' from state '\" + options.relative + \"'\");\n        }\n      }\n      if (toState[abstractKey]) throw new Error(\"Cannot transition to abstract state '\" + to + \"'\");\n      if (options.inherit) toParams = inheritParams($stateParams, toParams || {}, $state.$current, toState);\n      if (!toState.params.$$validates(toParams)) return TransitionFailed;\n\n      toParams = toState.params.$$values(toParams);\n      to = toState;\n\n      var toPath = to.path;\n\n      // Starting from the root of the path, keep all levels that haven't changed\n      var keep = 0, state = toPath[keep], locals = root.locals, toLocals = [];\n\n      if (!options.reload) {\n        while (state && state === fromPath[keep] && state.ownParams.$$equals(toParams, fromParams)) {\n          locals = toLocals[keep] = state.locals;\n          keep++;\n          state = toPath[keep];\n        }\n      }\n\n      // If we're going to the same state and all locals are kept, we've got nothing to do.\n      // But clear 'transition', as we still want to cancel any other pending transitions.\n      // TODO: We may not want to bump 'transition' if we're called from a location change\n      // that we've initiated ourselves, because we might accidentally abort a legitimate\n      // transition initiated from code?\n      if (shouldTriggerReload(to, from, locals, options)) {\n        if (to.self.reloadOnSearch !== false) $urlRouter.update();\n        $state.transition = null;\n        return $q.when($state.current);\n      }\n\n      // Filter parameters before we pass them to event handlers etc.\n      toParams = filterByKeys(to.params.$$keys(), toParams || {});\n\n      // Broadcast start event and cancel the transition if requested\n      if (options.notify) {\n        /**\n         * @ngdoc event\n         * @name ui.router.state.$state#$stateChangeStart\n         * @eventOf ui.router.state.$state\n         * @eventType broadcast on root scope\n         * @description\n         * Fired when the state transition **begins**. You can use `event.preventDefault()`\n         * to prevent the transition from happening and then the transition promise will be\n         * rejected with a `'transition prevented'` value.\n         *\n         * @param {Object} event Event object.\n         * @param {State} toState The state being transitioned to.\n         * @param {Object} toParams The params supplied to the `toState`.\n         * @param {State} fromState The current state, pre-transition.\n         * @param {Object} fromParams The params supplied to the `fromState`.\n         *\n         * @example\n         *\n         * <pre>\n         * $rootScope.$on('$stateChangeStart',\n         * function(event, toState, toParams, fromState, fromParams){\n         *     event.preventDefault();\n         *     // transitionTo() promise will be rejected with\n         *     // a 'transition prevented' error\n         * })\n         * </pre>\n         */\n        if ($rootScope.$broadcast('$stateChangeStart', to.self, toParams, from.self, fromParams).defaultPrevented) {\n          $urlRouter.update();\n          return TransitionPrevented;\n        }\n      }\n\n      // Resolve locals for the remaining states, but don't update any global state just\n      // yet -- if anything fails to resolve the current state needs to remain untouched.\n      // We also set up an inheritance chain for the locals here. This allows the view directive\n      // to quickly look up the correct definition for each view in the current state. Even\n      // though we create the locals object itself outside resolveState(), it is initially\n      // empty and gets filled asynchronously. We need to keep track of the promise for the\n      // (fully resolved) current locals, and pass this down the chain.\n      var resolved = $q.when(locals);\n\n      for (var l = keep; l < toPath.length; l++, state = toPath[l]) {\n        locals = toLocals[l] = inherit(locals);\n        resolved = resolveState(state, toParams, state === to, resolved, locals, options);\n      }\n\n      // Once everything is resolved, we are ready to perform the actual transition\n      // and return a promise for the new state. We also keep track of what the\n      // current promise is, so that we can detect overlapping transitions and\n      // keep only the outcome of the last transition.\n      var transition = $state.transition = resolved.then(function () {\n        var l, entering, exiting;\n\n        if ($state.transition !== transition) return TransitionSuperseded;\n\n        // Exit 'from' states not kept\n        for (l = fromPath.length - 1; l >= keep; l--) {\n          exiting = fromPath[l];\n          if (exiting.self.onExit) {\n            $injector.invoke(exiting.self.onExit, exiting.self, exiting.locals.globals);\n          }\n          exiting.locals = null;\n        }\n\n        // Enter 'to' states not kept\n        for (l = keep; l < toPath.length; l++) {\n          entering = toPath[l];\n          entering.locals = toLocals[l];\n          if (entering.self.onEnter) {\n            $injector.invoke(entering.self.onEnter, entering.self, entering.locals.globals);\n          }\n        }\n\n        // Run it again, to catch any transitions in callbacks\n        if ($state.transition !== transition) return TransitionSuperseded;\n\n        // Update globals in $state\n        $state.$current = to;\n        $state.current = to.self;\n        $state.params = toParams;\n        copy($state.params, $stateParams);\n        $state.transition = null;\n\n        if (options.location && to.navigable) {\n          $urlRouter.push(to.navigable.url, to.navigable.locals.globals.$stateParams, {\n            $$avoidResync: true, replace: options.location === 'replace'\n          });\n        }\n\n        if (options.notify) {\n        /**\n         * @ngdoc event\n         * @name ui.router.state.$state#$stateChangeSuccess\n         * @eventOf ui.router.state.$state\n         * @eventType broadcast on root scope\n         * @description\n         * Fired once the state transition is **complete**.\n         *\n         * @param {Object} event Event object.\n         * @param {State} toState The state being transitioned to.\n         * @param {Object} toParams The params supplied to the `toState`.\n         * @param {State} fromState The current state, pre-transition.\n         * @param {Object} fromParams The params supplied to the `fromState`.\n         */\n          $rootScope.$broadcast('$stateChangeSuccess', to.self, toParams, from.self, fromParams);\n        }\n        $urlRouter.update(true);\n\n        return $state.current;\n      }, function (error) {\n        if ($state.transition !== transition) return TransitionSuperseded;\n\n        $state.transition = null;\n        /**\n         * @ngdoc event\n         * @name ui.router.state.$state#$stateChangeError\n         * @eventOf ui.router.state.$state\n         * @eventType broadcast on root scope\n         * @description\n         * Fired when an **error occurs** during transition. It's important to note that if you\n         * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n         * they will not throw traditionally. You must listen for this $stateChangeError event to\n         * catch **ALL** errors.\n         *\n         * @param {Object} event Event object.\n         * @param {State} toState The state being transitioned to.\n         * @param {Object} toParams The params supplied to the `toState`.\n         * @param {State} fromState The current state, pre-transition.\n         * @param {Object} fromParams The params supplied to the `fromState`.\n         * @param {Error} error The resolve error object.\n         */\n        evt = $rootScope.$broadcast('$stateChangeError', to.self, toParams, from.self, fromParams, error);\n\n        if (!evt.defaultPrevented) {\n            $urlRouter.update();\n        }\n\n        return $q.reject(error);\n      });\n\n      return transition;\n    };\n\n    /**\n     * @ngdoc function\n     * @name ui.router.state.$state#is\n     * @methodOf ui.router.state.$state\n     *\n     * @description\n     * Similar to {@link ui.router.state.$state#methods_includes $state.includes},\n     * but only checks for the full state name. If params is supplied then it will be\n     * tested for strict equality against the current active params object, so all params\n     * must match with none missing and no extras.\n     *\n     * @example\n     * <pre>\n     * $state.$current.name = 'contacts.details.item';\n     *\n     * // absolute name\n     * $state.is('contact.details.item'); // returns true\n     * $state.is(contactDetailItemStateObject); // returns true\n     *\n     * // relative name (. and ^), typically from a template\n     * // E.g. from the 'contacts.details' template\n     * <div ng-class=\"{highlighted: $state.is('.item')}\">Item</div>\n     * </pre>\n     *\n     * @param {string|object} stateOrName The state name (absolute or relative) or state object you'd like to check.\n     * @param {object=} params A param object, e.g. `{sectionId: section.id}`, that you'd like\n     * to test against the current active state.\n     * @param {object=} options An options object.  The options are:\n     *\n     * - **`relative`** - {string|object} -  If `stateOrName` is a relative state name and `options.relative` is set, .is will\n     * test relative to `options.relative` state (or name).\n     *\n     * @returns {boolean} Returns true if it is the state.\n     */\n    $state.is = function is(stateOrName, params, options) {\n      options = extend({ relative: $state.$current }, options || {});\n      var state = findState(stateOrName, options.relative);\n\n      if (!isDefined(state)) { return undefined; }\n      if ($state.$current !== state) { return false; }\n      return params ? equalForKeys(state.params.$$values(params), $stateParams) : true;\n    };\n\n    /**\n     * @ngdoc function\n     * @name ui.router.state.$state#includes\n     * @methodOf ui.router.state.$state\n     *\n     * @description\n     * A method to determine if the current active state is equal to or is the child of the\n     * state stateName. If any params are passed then they will be tested for a match as well.\n     * Not all the parameters need to be passed, just the ones you'd like to test for equality.\n     *\n     * @example\n     * Partial and relative names\n     * <pre>\n     * $state.$current.name = 'contacts.details.item';\n     *\n     * // Using partial names\n     * $state.includes(\"contacts\"); // returns true\n     * $state.includes(\"contacts.details\"); // returns true\n     * $state.includes(\"contacts.details.item\"); // returns true\n     * $state.includes(\"contacts.list\"); // returns false\n     * $state.includes(\"about\"); // returns false\n     *\n     * // Using relative names (. and ^), typically from a template\n     * // E.g. from the 'contacts.details' template\n     * <div ng-class=\"{highlighted: $state.includes('.item')}\">Item</div>\n     * </pre>\n     *\n     * Basic globbing patterns\n     * <pre>\n     * $state.$current.name = 'contacts.details.item.url';\n     *\n     * $state.includes(\"*.details.*.*\"); // returns true\n     * $state.includes(\"*.details.**\"); // returns true\n     * $state.includes(\"**.item.**\"); // returns true\n     * $state.includes(\"*.details.item.url\"); // returns true\n     * $state.includes(\"*.details.*.url\"); // returns true\n     * $state.includes(\"*.details.*\"); // returns false\n     * $state.includes(\"item.**\"); // returns false\n     * </pre>\n     *\n     * @param {string} stateOrName A partial name, relative name, or glob pattern\n     * to be searched for within the current state name.\n     * @param {object=} params A param object, e.g. `{sectionId: section.id}`,\n     * that you'd like to test against the current active state.\n     * @param {object=} options An options object.  The options are:\n     *\n     * - **`relative`** - {string|object=} -  If `stateOrName` is a relative state reference and `options.relative` is set,\n     * .includes will test relative to `options.relative` state (or name).\n     *\n     * @returns {boolean} Returns true if it does include the state\n     */\n    $state.includes = function includes(stateOrName, params, options) {\n      options = extend({ relative: $state.$current }, options || {});\n      if (isString(stateOrName) && isGlob(stateOrName)) {\n        if (!doesStateMatchGlob(stateOrName)) {\n          return false;\n        }\n        stateOrName = $state.$current.name;\n      }\n\n      var state = findState(stateOrName, options.relative);\n      if (!isDefined(state)) { return undefined; }\n      if (!isDefined($state.$current.includes[state.name])) { return false; }\n      return params ? equalForKeys(state.params.$$values(params), $stateParams, objectKeys(params)) : true;\n    };\n\n\n    /**\n     * @ngdoc function\n     * @name ui.router.state.$state#href\n     * @methodOf ui.router.state.$state\n     *\n     * @description\n     * A url generation method that returns the compiled url for the given state populated with the given params.\n     *\n     * @example\n     * <pre>\n     * expect($state.href(\"about.person\", { person: \"bob\" })).toEqual(\"/about/bob\");\n     * </pre>\n     *\n     * @param {string|object} stateOrName The state name or state object you'd like to generate a url from.\n     * @param {object=} params An object of parameter values to fill the state's required parameters.\n     * @param {object=} options Options object. The options are:\n     *\n     * - **`lossy`** - {boolean=true} -  If true, and if there is no url associated with the state provided in the\n     *    first parameter, then the constructed href url will be built from the first navigable ancestor (aka\n     *    ancestor with a valid url).\n     * - **`inherit`** - {boolean=true}, If `true` will inherit url parameters from current url.\n     * - **`relative`** - {object=$state.$current}, When transitioning with relative path (e.g '^'), \n     *    defines which state to be relative from.\n     * - **`absolute`** - {boolean=false},  If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n     * \n     * @returns {string} compiled state url\n     */\n    $state.href = function href(stateOrName, params, options) {\n      options = extend({\n        lossy:    true,\n        inherit:  true,\n        absolute: false,\n        relative: $state.$current\n      }, options || {});\n\n      var state = findState(stateOrName, options.relative);\n\n      if (!isDefined(state)) return null;\n      if (options.inherit) params = inheritParams($stateParams, params || {}, $state.$current, state);\n      \n      var nav = (state && options.lossy) ? state.navigable : state;\n\n      if (!nav || nav.url === undefined || nav.url === null) {\n        return null;\n      }\n      return $urlRouter.href(nav.url, filterByKeys(state.params.$$keys(), params || {}), {\n        absolute: options.absolute\n      });\n    };\n\n    /**\n     * @ngdoc function\n     * @name ui.router.state.$state#get\n     * @methodOf ui.router.state.$state\n     *\n     * @description\n     * Returns the state configuration object for any specific state or all states.\n     *\n     * @param {string|object=} stateOrName (absolute or relative) If provided, will only get the config for\n     * the requested state. If not provided, returns an array of ALL state configs.\n     * @param {string|object=} context When stateOrName is a relative state reference, the state will be retrieved relative to context.\n     * @returns {Object|Array} State configuration object or array of all objects.\n     */\n    $state.get = function (stateOrName, context) {\n      if (arguments.length === 0) return map(objectKeys(states), function(name) { return states[name].self; });\n      var state = findState(stateOrName, context || $state.$current);\n      return (state && state.self) ? state.self : null;\n    };\n\n    function resolveState(state, params, paramsAreFiltered, inherited, dst, options) {\n      // Make a restricted $stateParams with only the parameters that apply to this state if\n      // necessary. In addition to being available to the controller and onEnter/onExit callbacks,\n      // we also need $stateParams to be available for any $injector calls we make during the\n      // dependency resolution process.\n      var $stateParams = (paramsAreFiltered) ? params : filterByKeys(state.params.$$keys(), params);\n      var locals = { $stateParams: $stateParams };\n\n      // Resolve 'global' dependencies for the state, i.e. those not specific to a view.\n      // We're also including $stateParams in this; that way the parameters are restricted\n      // to the set that should be visible to the state, and are independent of when we update\n      // the global $state and $stateParams values.\n      dst.resolve = $resolve.resolve(state.resolve, locals, dst.resolve, state);\n      var promises = [dst.resolve.then(function (globals) {\n        dst.globals = globals;\n      })];\n      if (inherited) promises.push(inherited);\n\n      // Resolve template and dependencies for all views.\n      forEach(state.views, function (view, name) {\n        var injectables = (view.resolve && view.resolve !== state.resolve ? view.resolve : {});\n        injectables.$template = [ function () {\n          return $view.load(name, { view: view, locals: locals, params: $stateParams, notify: options.notify }) || '';\n        }];\n\n        promises.push($resolve.resolve(injectables, locals, dst.resolve, state).then(function (result) {\n          // References to the controller (only instantiated at link time)\n          if (isFunction(view.controllerProvider) || isArray(view.controllerProvider)) {\n            var injectLocals = angular.extend({}, injectables, locals);\n            result.$$controller = $injector.invoke(view.controllerProvider, null, injectLocals);\n          } else {\n            result.$$controller = view.controller;\n          }\n          // Provide access to the state itself for internal use\n          result.$$state = state;\n          result.$$controllerAs = view.controllerAs;\n          dst[name] = result;\n        }));\n      });\n\n      // Wait for all the promises and then return the activation object\n      return $q.all(promises).then(function (values) {\n        return dst;\n      });\n    }\n\n    return $state;\n  }\n\n  function shouldTriggerReload(to, from, locals, options) {\n    if (to === from && ((locals === from.locals && !options.reload) || (to.self.reloadOnSearch === false))) {\n      return true;\n    }\n  }\n}\n\nangular.module('ui.router.state')\n  .value('$stateParams', {})\n  .provider('$state', $StateProvider);\n\n\n$ViewProvider.$inject = [];\nfunction $ViewProvider() {\n\n  this.$get = $get;\n  /**\n   * @ngdoc object\n   * @name ui.router.state.$view\n   *\n   * @requires ui.router.util.$templateFactory\n   * @requires $rootScope\n   *\n   * @description\n   *\n   */\n  $get.$inject = ['$rootScope', '$templateFactory'];\n  function $get(   $rootScope,   $templateFactory) {\n    return {\n      // $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... })\n      /**\n       * @ngdoc function\n       * @name ui.router.state.$view#load\n       * @methodOf ui.router.state.$view\n       *\n       * @description\n       *\n       * @param {string} name name\n       * @param {object} options option object.\n       */\n      load: function load(name, options) {\n        var result, defaults = {\n          template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {}\n        };\n        options = extend(defaults, options);\n\n        if (options.view) {\n          result = $templateFactory.fromConfig(options.view, options.params, options.locals);\n        }\n        if (result && options.notify) {\n        /**\n         * @ngdoc event\n         * @name ui.router.state.$state#$viewContentLoading\n         * @eventOf ui.router.state.$view\n         * @eventType broadcast on root scope\n         * @description\n         *\n         * Fired once the view **begins loading**, *before* the DOM is rendered.\n         *\n         * @param {Object} event Event object.\n         * @param {Object} viewConfig The view config properties (template, controller, etc).\n         *\n         * @example\n         *\n         * <pre>\n         * $scope.$on('$viewContentLoading',\n         * function(event, viewConfig){\n         *     // Access to all the view config properties.\n         *     // and one special property 'targetView'\n         *     // viewConfig.targetView\n         * });\n         * </pre>\n         */\n          $rootScope.$broadcast('$viewContentLoading', options);\n        }\n        return result;\n      }\n    };\n  }\n}\n\nangular.module('ui.router.state').provider('$view', $ViewProvider);\n\n/**\n * @ngdoc object\n * @name ui.router.state.$uiViewScrollProvider\n *\n * @description\n * Provider that returns the {@link ui.router.state.$uiViewScroll} service function.\n */\nfunction $ViewScrollProvider() {\n\n  var useAnchorScroll = false;\n\n  /**\n   * @ngdoc function\n   * @name ui.router.state.$uiViewScrollProvider#useAnchorScroll\n   * @methodOf ui.router.state.$uiViewScrollProvider\n   *\n   * @description\n   * Reverts back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) service for\n   * scrolling based on the url anchor.\n   */\n  this.useAnchorScroll = function () {\n    useAnchorScroll = true;\n  };\n\n  /**\n   * @ngdoc object\n   * @name ui.router.state.$uiViewScroll\n   *\n   * @requires $anchorScroll\n   * @requires $timeout\n   *\n   * @description\n   * When called with a jqLite element, it scrolls the element into view (after a\n   * `$timeout` so the DOM has time to refresh).\n   *\n   * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor,\n   * this can be enabled by calling {@link ui.router.state.$uiViewScrollProvider#methods_useAnchorScroll `$uiViewScrollProvider.useAnchorScroll()`}.\n   */\n  this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) {\n    if (useAnchorScroll) {\n      return $anchorScroll;\n    }\n\n    return function ($element) {\n      $timeout(function () {\n        $element[0].scrollIntoView();\n      }, 0, false);\n    };\n  }];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);\n\n/**\n * @ngdoc directive\n * @name ui.router.state.directive:ui-view\n *\n * @requires ui.router.state.$state\n * @requires $compile\n * @requires $controller\n * @requires $injector\n * @requires ui.router.state.$uiViewScroll\n * @requires $document\n *\n * @restrict ECA\n *\n * @description\n * The ui-view directive tells $state where to place your templates.\n *\n * @param {string=} name A view name. The name should be unique amongst the other views in the\n * same state. You can have views of the same name that live in different states.\n *\n * @param {string=} autoscroll It allows you to set the scroll behavior of the browser window\n * when a view is populated. By default, $anchorScroll is overridden by ui-router's custom scroll\n * service, {@link ui.router.state.$uiViewScroll}. This custom service let's you\n * scroll ui-view elements into view when they are populated during a state activation.\n *\n * *Note: To revert back to old [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * functionality, call `$uiViewScrollProvider.useAnchorScroll()`.*\n *\n * @param {string=} onload Expression to evaluate whenever the view updates.\n * \n * @example\n * A view can be unnamed or named. \n * <pre>\n * <!-- Unnamed -->\n * <div ui-view></div> \n * \n * <!-- Named -->\n * <div ui-view=\"viewName\"></div>\n * </pre>\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a \n * single view and it is unnamed then you can populate it like so:\n * <pre>\n * <div ui-view></div> \n * $stateProvider.state(\"home\", {\n *   template: \"<h1>HELLO!</h1>\"\n * })\n * </pre>\n * \n * The above is a convenient shortcut equivalent to specifying your view explicitly with the {@link ui.router.state.$stateProvider#views `views`}\n * config property, by name, in this case an empty name:\n * <pre>\n * $stateProvider.state(\"home\", {\n *   views: {\n *     \"\": {\n *       template: \"<h1>HELLO!</h1>\"\n *     }\n *   }    \n * })\n * </pre>\n * \n * But typically you'll only use the views property if you name your view or have more than one view \n * in the same template. There's not really a compelling reason to name a view if its the only one, \n * but you could if you wanted, like so:\n * <pre>\n * <div ui-view=\"main\"></div>\n * </pre> \n * <pre>\n * $stateProvider.state(\"home\", {\n *   views: {\n *     \"main\": {\n *       template: \"<h1>HELLO!</h1>\"\n *     }\n *   }    \n * })\n * </pre>\n * \n * Really though, you'll use views to set up multiple views:\n * <pre>\n * <div ui-view></div>\n * <div ui-view=\"chart\"></div> \n * <div ui-view=\"data\"></div> \n * </pre>\n * \n * <pre>\n * $stateProvider.state(\"home\", {\n *   views: {\n *     \"\": {\n *       template: \"<h1>HELLO!</h1>\"\n *     },\n *     \"chart\": {\n *       template: \"<chart_thing/>\"\n *     },\n *     \"data\": {\n *       template: \"<data_thing/>\"\n *     }\n *   }    \n * })\n * </pre>\n *\n * Examples for `autoscroll`:\n *\n * <pre>\n * <!-- If autoscroll present with no expression,\n *      then scroll ui-view into view -->\n * <ui-view autoscroll/>\n *\n * <!-- If autoscroll present with valid expression,\n *      then scroll ui-view into view if expression evaluates to true -->\n * <ui-view autoscroll='true'/>\n * <ui-view autoscroll='false'/>\n * <ui-view autoscroll='scopeVariable'/>\n * </pre>\n */\n$ViewDirective.$inject = ['$state', '$injector', '$uiViewScroll', '$interpolate'];\nfunction $ViewDirective(   $state,   $injector,   $uiViewScroll,   $interpolate) {\n\n  function getService() {\n    return ($injector.has) ? function(service) {\n      return $injector.has(service) ? $injector.get(service) : null;\n    } : function(service) {\n      try {\n        return $injector.get(service);\n      } catch (e) {\n        return null;\n      }\n    };\n  }\n\n  var service = getService(),\n      $animator = service('$animator'),\n      $animate = service('$animate');\n\n  // Returns a set of DOM manipulation functions based on which Angular version\n  // it should use\n  function getRenderer(attrs, scope) {\n    var statics = function() {\n      return {\n        enter: function (element, target, cb) { target.after(element); cb(); },\n        leave: function (element, cb) { element.remove(); cb(); }\n      };\n    };\n\n    if ($animate) {\n      return {\n        enter: function(element, target, cb) {\n          var promise = $animate.enter(element, null, target, cb);\n          if (promise && promise.then) promise.then(cb);\n        },\n        leave: function(element, cb) {\n          var promise = $animate.leave(element, cb);\n          if (promise && promise.then) promise.then(cb);\n        }\n      };\n    }\n\n    if ($animator) {\n      var animate = $animator && $animator(scope, attrs);\n\n      return {\n        enter: function(element, target, cb) {animate.enter(element, null, target); cb(); },\n        leave: function(element, cb) { animate.leave(element); cb(); }\n      };\n    }\n\n    return statics();\n  }\n\n  var directive = {\n    restrict: 'ECA',\n    terminal: true,\n    priority: 400,\n    transclude: 'element',\n    compile: function (tElement, tAttrs, $transclude) {\n      return function (scope, $element, attrs) {\n        var previousEl, currentEl, currentScope, latestLocals,\n            onloadExp     = attrs.onload || '',\n            autoScrollExp = attrs.autoscroll,\n            renderer      = getRenderer(attrs, scope);\n\n        scope.$on('$stateChangeSuccess', function() {\n          updateView(false);\n        });\n        scope.$on('$viewContentLoading', function() {\n          updateView(false);\n        });\n\n        updateView(true);\n\n        function cleanupLastView() {\n          if (previousEl) {\n            previousEl.remove();\n            previousEl = null;\n          }\n\n          if (currentScope) {\n            currentScope.$destroy();\n            currentScope = null;\n          }\n\n          if (currentEl) {\n            renderer.leave(currentEl, function() {\n              previousEl = null;\n            });\n\n            previousEl = currentEl;\n            currentEl = null;\n          }\n        }\n\n        function updateView(firstTime) {\n          var newScope,\n              name            = getUiViewName(scope, attrs, $element, $interpolate),\n              previousLocals  = name && $state.$current && $state.$current.locals[name];\n\n          if (!firstTime && previousLocals === latestLocals) return; // nothing to do\n          newScope = scope.$new();\n          latestLocals = $state.$current.locals[name];\n\n          var clone = $transclude(newScope, function(clone) {\n            renderer.enter(clone, $element, function onUiViewEnter() {\n              if(currentScope) {\n                currentScope.$emit('$viewContentAnimationEnded');\n              }\n\n              if (angular.isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) {\n                $uiViewScroll(clone);\n              }\n            });\n            cleanupLastView();\n          });\n\n          currentEl = clone;\n          currentScope = newScope;\n          /**\n           * @ngdoc event\n           * @name ui.router.state.directive:ui-view#$viewContentLoaded\n           * @eventOf ui.router.state.directive:ui-view\n           * @eventType emits on ui-view directive scope\n           * @description           *\n           * Fired once the view is **loaded**, *after* the DOM is rendered.\n           *\n           * @param {Object} event Event object.\n           */\n          currentScope.$emit('$viewContentLoaded');\n          currentScope.$eval(onloadExp);\n        }\n      };\n    }\n  };\n\n  return directive;\n}\n\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$state', '$interpolate'];\nfunction $ViewDirectiveFill (  $compile,   $controller,   $state,   $interpolate) {\n  return {\n    restrict: 'ECA',\n    priority: -400,\n    compile: function (tElement) {\n      var initial = tElement.html();\n      return function (scope, $element, attrs) {\n        var current = $state.$current,\n            name = getUiViewName(scope, attrs, $element, $interpolate),\n            locals  = current && current.locals[name];\n\n        if (! locals) {\n          return;\n        }\n\n        $element.data('$uiView', { name: name, state: locals.$$state });\n        $element.html(locals.$template ? locals.$template : initial);\n\n        var link = $compile($element.contents());\n\n        if (locals.$$controller) {\n          locals.$scope = scope;\n          var controller = $controller(locals.$$controller, locals);\n          if (locals.$$controllerAs) {\n            scope[locals.$$controllerAs] = controller;\n          }\n          $element.data('$ngControllerController', controller);\n          $element.children().data('$ngControllerController', controller);\n        }\n\n        link(scope);\n      };\n    }\n  };\n}\n\n/**\n * Shared ui-view code for both directives:\n * Given scope, element, and its attributes, return the view's name\n */\nfunction getUiViewName(scope, attrs, element, $interpolate) {\n  var name = $interpolate(attrs.uiView || attrs.name || '')(scope);\n  var inherited = element.inheritedData('$uiView');\n  return name.indexOf('@') >= 0 ?  name :  (name + '@' + (inherited ? inherited.state.name : ''));\n}\n\nangular.module('ui.router.state').directive('uiView', $ViewDirective);\nangular.module('ui.router.state').directive('uiView', $ViewDirectiveFill);\n\nfunction parseStateRef(ref, current) {\n  var preparsed = ref.match(/^\\s*({[^}]*})\\s*$/), parsed;\n  if (preparsed) ref = current + '(' + preparsed[1] + ')';\n  parsed = ref.replace(/\\n/g, \" \").match(/^([^(]+?)\\s*(\\((.*)\\))?$/);\n  if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n  return { state: parsed[1], paramExpr: parsed[3] || null };\n}\n\nfunction stateContext(el) {\n  var stateData = el.parent().inheritedData('$uiView');\n\n  if (stateData && stateData.state && stateData.state.name) {\n    return stateData.state;\n  }\n}\n\n/**\n * @ngdoc directive\n * @name ui.router.state.directive:ui-sref\n *\n * @requires ui.router.state.$state\n * @requires $timeout\n *\n * @restrict A\n *\n * @description\n * A directive that binds a link (`<a>` tag) to a state. If the state has an associated \n * URL, the directive will automatically generate & update the `href` attribute via \n * the {@link ui.router.state.$state#methods_href $state.href()} method. Clicking \n * the link will trigger a state transition with optional parameters. \n *\n * Also middle-clicking, right-clicking, and ctrl-clicking on the link will be \n * handled natively by the browser.\n *\n * You can also use relative state paths within ui-sref, just like the relative \n * paths passed to `$state.go()`. You just need to be aware that the path is relative\n * to the state that the link lives in, in other words the state that loaded the \n * template containing the link.\n *\n * You can specify options to pass to {@link ui.router.state.$state#go $state.go()}\n * using the `ui-sref-opts` attribute. Options are restricted to `location`, `inherit`,\n * and `reload`.\n *\n * @example\n * Here's an example of how you'd use ui-sref and how it would compile. If you have the \n * following template:\n * <pre>\n * <a ui-sref=\"home\">Home</a> | <a ui-sref=\"about\">About</a> | <a ui-sref=\"{page: 2}\">Next page</a>\n * \n * <ul>\n *     <li ng-repeat=\"contact in contacts\">\n *         <a ui-sref=\"contacts.detail({ id: contact.id })\">{{ contact.name }}</a>\n *     </li>\n * </ul>\n * </pre>\n * \n * Then the compiled html would be (assuming Html5Mode is off and current state is contacts):\n * <pre>\n * <a href=\"#/home\" ui-sref=\"home\">Home</a> | <a href=\"#/about\" ui-sref=\"about\">About</a> | <a href=\"#/contacts?page=2\" ui-sref=\"{page: 2}\">Next page</a>\n * \n * <ul>\n *     <li ng-repeat=\"contact in contacts\">\n *         <a href=\"#/contacts/1\" ui-sref=\"contacts.detail({ id: contact.id })\">Joe</a>\n *     </li>\n *     <li ng-repeat=\"contact in contacts\">\n *         <a href=\"#/contacts/2\" ui-sref=\"contacts.detail({ id: contact.id })\">Alice</a>\n *     </li>\n *     <li ng-repeat=\"contact in contacts\">\n *         <a href=\"#/contacts/3\" ui-sref=\"contacts.detail({ id: contact.id })\">Bob</a>\n *     </li>\n * </ul>\n *\n * <a ui-sref=\"home\" ui-sref-opts=\"{reload: true}\">Home</a>\n * </pre>\n *\n * @param {string} ui-sref 'stateName' can be any valid absolute or relative state\n * @param {Object} ui-sref-opts options to pass to {@link ui.router.state.$state#go $state.go()}\n */\n$StateRefDirective.$inject = ['$state', '$timeout'];\nfunction $StateRefDirective($state, $timeout) {\n  var allowedOptions = ['location', 'inherit', 'reload'];\n\n  return {\n    restrict: 'A',\n    require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n    link: function(scope, element, attrs, uiSrefActive) {\n      var ref = parseStateRef(attrs.uiSref, $state.current.name);\n      var params = null, url = null, base = stateContext(element) || $state.$current;\n      var newHref = null, isAnchor = element.prop(\"tagName\") === \"A\";\n      var isForm = element[0].nodeName === \"FORM\";\n      var attr = isForm ? \"action\" : \"href\", nav = true;\n\n      var options = { relative: base, inherit: true };\n      var optionsOverride = scope.$eval(attrs.uiSrefOpts) || {};\n\n      angular.forEach(allowedOptions, function(option) {\n        if (option in optionsOverride) {\n          options[option] = optionsOverride[option];\n        }\n      });\n\n      var update = function(newVal) {\n        if (newVal) params = angular.copy(newVal);\n        if (!nav) return;\n\n        newHref = $state.href(ref.state, params, options);\n\n        var activeDirective = uiSrefActive[1] || uiSrefActive[0];\n        if (activeDirective) {\n          activeDirective.$$setStateInfo(ref.state, params);\n        }\n        if (newHref === null) {\n          nav = false;\n          return false;\n        }\n        attrs.$set(attr, newHref);\n      };\n\n      if (ref.paramExpr) {\n        scope.$watch(ref.paramExpr, function(newVal, oldVal) {\n          if (newVal !== params) update(newVal);\n        }, true);\n        params = angular.copy(scope.$eval(ref.paramExpr));\n      }\n      update();\n\n      if (isForm) return;\n\n      element.bind(\"click\", function(e) {\n        var button = e.which || e.button;\n        if ( !(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || element.attr('target')) ) {\n          // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n          var transition = $timeout(function() {\n            $state.go(ref.state, params, options);\n          });\n          e.preventDefault();\n\n          // if the state has no URL, ignore one preventDefault from the <a> directive.\n          var ignorePreventDefaultCount = isAnchor && !newHref ? 1: 0;\n          e.preventDefault = function() {\n            if (ignorePreventDefaultCount-- <= 0)\n              $timeout.cancel(transition);\n          };\n        }\n      });\n    }\n  };\n}\n\n/**\n * @ngdoc directive\n * @name ui.router.state.directive:ui-sref-active\n *\n * @requires ui.router.state.$state\n * @requires ui.router.state.$stateParams\n * @requires $interpolate\n *\n * @restrict A\n *\n * @description\n * A directive working alongside ui-sref to add classes to an element when the\n * related ui-sref directive's state is active, and removing them when it is inactive.\n * The primary use-case is to simplify the special appearance of navigation menus\n * relying on `ui-sref`, by having the \"active\" state's menu button appear different,\n * distinguishing it from the inactive menu items.\n *\n * ui-sref-active can live on the same element as ui-sref or on a parent element. The first\n * ui-sref-active found at the same level or above the ui-sref will be used.\n *\n * Will activate when the ui-sref's target state or any child state is active. If you\n * need to activate only when the ui-sref target state is active and *not* any of\n * it's children, then you will use\n * {@link ui.router.state.directive:ui-sref-active-eq ui-sref-active-eq}\n *\n * @example\n * Given the following template:\n * <pre>\n * <ul>\n *   <li ui-sref-active=\"active\" class=\"item\">\n *     <a href ui-sref=\"app.user({user: 'bilbobaggins'})\">@bilbobaggins</a>\n *   </li>\n * </ul>\n * </pre>\n *\n *\n * When the app state is \"app.user\" (or any children states), and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n * <pre>\n * <ul>\n *   <li ui-sref-active=\"active\" class=\"item active\">\n *     <a ui-sref=\"app.user({user: 'bilbobaggins'})\" href=\"/users/bilbobaggins\">@bilbobaggins</a>\n *   </li>\n * </ul>\n * </pre>\n *\n * The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * Multiple classes may be specified in a space-separated format:\n * <pre>\n * <ul>\n *   <li ui-sref-active='class1 class2 class3'>\n *     <a ui-sref=\"app.user\">link</a>\n *   </li>\n * </ul>\n * </pre>\n */\n\n/**\n * @ngdoc directive\n * @name ui.router.state.directive:ui-sref-active-eq\n *\n * @requires ui.router.state.$state\n * @requires ui.router.state.$stateParams\n * @requires $interpolate\n *\n * @restrict A\n *\n * @description\n * The same as {@link ui.router.state.directive:ui-sref-active ui-sref-active} but will only activate\n * when the exact target state used in the `ui-sref` is active; no child states.\n *\n */\n$StateRefActiveDirective.$inject = ['$state', '$stateParams', '$interpolate'];\nfunction $StateRefActiveDirective($state, $stateParams, $interpolate) {\n  return  {\n    restrict: \"A\",\n    controller: ['$scope', '$element', '$attrs', function ($scope, $element, $attrs) {\n      var state, params, activeClass;\n\n      // There probably isn't much point in $observing this\n      // uiSrefActive and uiSrefActiveEq share the same directive object with some\n      // slight difference in logic routing\n      activeClass = $interpolate($attrs.uiSrefActiveEq || $attrs.uiSrefActive || '', false)($scope);\n\n      // Allow uiSref to communicate with uiSrefActive[Equals]\n      this.$$setStateInfo = function (newState, newParams) {\n        state = $state.get(newState, stateContext($element));\n        params = newParams;\n        update();\n      };\n\n      $scope.$on('$stateChangeSuccess', update);\n\n      // Update route state\n      function update() {\n        if (isMatch()) {\n          $element.addClass(activeClass);\n        } else {\n          $element.removeClass(activeClass);\n        }\n      }\n\n      function isMatch() {\n        if (typeof $attrs.uiSrefActiveEq !== 'undefined') {\n          return state && $state.is(state.name, params);\n        } else {\n          return state && $state.includes(state.name, params);\n        }\n      }\n    }]\n  };\n}\n\nangular.module('ui.router.state')\n  .directive('uiSref', $StateRefDirective)\n  .directive('uiSrefActive', $StateRefActiveDirective)\n  .directive('uiSrefActiveEq', $StateRefActiveDirective);\n\n/**\n * @ngdoc filter\n * @name ui.router.state.filter:isState\n *\n * @requires ui.router.state.$state\n *\n * @description\n * Translates to {@link ui.router.state.$state#methods_is $state.is(\"stateName\")}.\n */\n$IsStateFilter.$inject = ['$state'];\nfunction $IsStateFilter($state) {\n  var isFilter = function (state) {\n    return $state.is(state);\n  };\n  isFilter.$stateful = true;\n  return isFilter;\n}\n\n/**\n * @ngdoc filter\n * @name ui.router.state.filter:includedByState\n *\n * @requires ui.router.state.$state\n *\n * @description\n * Translates to {@link ui.router.state.$state#methods_includes $state.includes('fullOrPartialStateName')}.\n */\n$IncludedByStateFilter.$inject = ['$state'];\nfunction $IncludedByStateFilter($state) {\n  var includesFilter = function (state) {\n    return $state.includes(state);\n  };\n  includesFilter.$stateful = true;\n  return  includesFilter;\n}\n\nangular.module('ui.router.state')\n  .filter('isState', $IsStateFilter)\n  .filter('includedByState', $IncludedByStateFilter);\n})(window, window.angular);\n/*!\n * ionic.bundle.js is a concatenation of:\n * ionic.js, angular.js, angular-animate.js,\n * angular-sanitize.js, angular-ui-router.js,\n * and ionic-angular.js\n */\n\n/*!\n * Copyright 2015 Drifty Co.\n * http://drifty.com/\n *\n * Ionic, v1.3.4\n * A powerful HTML5 mobile app framework.\n * http://ionicframework.com/\n *\n * By @maxlynch, @benjsperry, @adamdbradley <3\n *\n * Licensed under the MIT license. Please see LICENSE for more information.\n *\n */\n\n(function() {\n/* eslint no-unused-vars:0 */\nvar IonicModule = angular.module('ionic', ['ngAnimate', 'ngSanitize', 'ui.router', 'ngIOS9UIWebViewPatch']),\n  extend = angular.extend,\n  forEach = angular.forEach,\n  isDefined = angular.isDefined,\n  isNumber = angular.isNumber,\n  isString = angular.isString,\n  jqLite = angular.element,\n  noop = angular.noop;\n\n/**\n * @ngdoc service\n * @name $ionicActionSheet\n * @module ionic\n * @description\n * The Action Sheet is a slide-up pane that lets the user choose from a set of options.\n * Dangerous options are highlighted in red and made obvious.\n *\n * There are easy ways to cancel out of the action sheet, such as tapping the backdrop or even\n * hitting escape on the keyboard for desktop testing.\n *\n * ![Action Sheet](http://ionicframework.com.s3.amazonaws.com/docs/controllers/actionSheet.gif)\n *\n * @usage\n * To trigger an Action Sheet in your code, use the $ionicActionSheet service in your angular controllers:\n *\n * ```js\n * angular.module('mySuperApp', ['ionic'])\n * .controller(function($scope, $ionicActionSheet, $timeout) {\n *\n *  // Triggered on a button click, or some other target\n *  $scope.show = function() {\n *\n *    // Show the action sheet\n *    var hideSheet = $ionicActionSheet.show({\n *      buttons: [\n *        { text: '<b>Share</b> This' },\n *        { text: 'Move' }\n *      ],\n *      destructiveText: 'Delete',\n *      titleText: 'Modify your album',\n *      cancelText: 'Cancel',\n *      cancel: function() {\n          // add cancel code..\n        },\n *      buttonClicked: function(index) {\n *        return true;\n *      }\n *    });\n *\n *    // For example's sake, hide the sheet after two seconds\n *    $timeout(function() {\n *      hideSheet();\n *    }, 2000);\n *\n *  };\n * });\n * ```\n *\n */\nIonicModule\n.factory('$ionicActionSheet', [\n  '$rootScope',\n  '$compile',\n  '$animate',\n  '$timeout',\n  '$ionicTemplateLoader',\n  '$ionicPlatform',\n  '$ionicBody',\n  'IONIC_BACK_PRIORITY',\nfunction($rootScope, $compile, $animate, $timeout, $ionicTemplateLoader, $ionicPlatform, $ionicBody, IONIC_BACK_PRIORITY) {\n\n  return {\n    show: actionSheet\n  };\n\n  /**\n   * @ngdoc method\n   * @name $ionicActionSheet#show\n   * @description\n   * Load and return a new action sheet.\n   *\n   * A new isolated scope will be created for the\n   * action sheet and the new element will be appended into the body.\n   *\n   * @param {object} options The options for this ActionSheet. Properties:\n   *\n   *  - `[Object]` `buttons` Which buttons to show.  Each button is an object with a `text` field.\n   *  - `{string}` `titleText` The title to show on the action sheet.\n   *  - `{string=}` `cancelText` the text for a 'cancel' button on the action sheet.\n   *  - `{string=}` `destructiveText` The text for a 'danger' on the action sheet.\n   *  - `{function=}` `cancel` Called if the cancel button is pressed, the backdrop is tapped or\n   *     the hardware back button is pressed.\n   *  - `{function=}` `buttonClicked` Called when one of the non-destructive buttons is clicked,\n   *     with the index of the button that was clicked and the button object. Return true to close\n   *     the action sheet, or false to keep it opened.\n   *  - `{function=}` `destructiveButtonClicked` Called when the destructive button is clicked.\n   *     Return true to close the action sheet, or false to keep it opened.\n   *  -  `{boolean=}` `cancelOnStateChange` Whether to cancel the actionSheet when navigating\n   *     to a new state.  Default true.\n   *  - `{string}` `cssClass` The custom CSS class name.\n   *\n   * @returns {function} `hideSheet` A function which, when called, hides & cancels the action sheet.\n   */\n  function actionSheet(opts) {\n    var scope = $rootScope.$new(true);\n\n    extend(scope, {\n      cancel: noop,\n      destructiveButtonClicked: noop,\n      buttonClicked: noop,\n      $deregisterBackButton: noop,\n      buttons: [],\n      cancelOnStateChange: true\n    }, opts || {});\n\n    function textForIcon(text) {\n      if (text && /icon/.test(text)) {\n        scope.$actionSheetHasIcon = true;\n      }\n    }\n\n    for (var x = 0; x < scope.buttons.length; x++) {\n      textForIcon(scope.buttons[x].text);\n    }\n    textForIcon(scope.cancelText);\n    textForIcon(scope.destructiveText);\n\n    // Compile the template\n    var element = scope.element = $compile('<ion-action-sheet ng-class=\"cssClass\" buttons=\"buttons\"></ion-action-sheet>')(scope);\n\n    // Grab the sheet element for animation\n    var sheetEl = jqLite(element[0].querySelector('.action-sheet-wrapper'));\n\n    var stateChangeListenDone = scope.cancelOnStateChange ?\n      $rootScope.$on('$stateChangeSuccess', function() { scope.cancel(); }) :\n      noop;\n\n    // removes the actionSheet from the screen\n    scope.removeSheet = function(done) {\n      if (scope.removed) return;\n\n      scope.removed = true;\n      sheetEl.removeClass('action-sheet-up');\n      $timeout(function() {\n        // wait to remove this due to a 300ms delay native\n        // click which would trigging whatever was underneath this\n        $ionicBody.removeClass('action-sheet-open');\n      }, 400);\n      scope.$deregisterBackButton();\n      stateChangeListenDone();\n\n      $animate.removeClass(element, 'active').then(function() {\n        scope.$destroy();\n        element.remove();\n        // scope.cancel.$scope is defined near the bottom\n        scope.cancel.$scope = sheetEl = null;\n        (done || noop)(opts.buttons);\n      });\n    };\n\n    scope.showSheet = function(done) {\n      if (scope.removed) return;\n\n      $ionicBody.append(element)\n                .addClass('action-sheet-open');\n\n      $animate.addClass(element, 'active').then(function() {\n        if (scope.removed) return;\n        (done || noop)();\n      });\n      $timeout(function() {\n        if (scope.removed) return;\n        sheetEl.addClass('action-sheet-up');\n      }, 20, false);\n    };\n\n    // registerBackButtonAction returns a callback to deregister the action\n    scope.$deregisterBackButton = $ionicPlatform.registerBackButtonAction(\n      function() {\n        $timeout(scope.cancel);\n      },\n      IONIC_BACK_PRIORITY.actionSheet\n    );\n\n    // called when the user presses the cancel button\n    scope.cancel = function() {\n      // after the animation is out, call the cancel callback\n      scope.removeSheet(opts.cancel);\n    };\n\n    scope.buttonClicked = function(index) {\n      // Check if the button click event returned true, which means\n      // we can close the action sheet\n      if (opts.buttonClicked(index, opts.buttons[index]) === true) {\n        scope.removeSheet();\n      }\n    };\n\n    scope.destructiveButtonClicked = function() {\n      // Check if the destructive button click event returned true, which means\n      // we can close the action sheet\n      if (opts.destructiveButtonClicked() === true) {\n        scope.removeSheet();\n      }\n    };\n\n    scope.showSheet();\n\n    // Expose the scope on $ionicActionSheet's return value for the sake\n    // of testing it.\n    scope.cancel.$scope = scope;\n\n    return scope.cancel;\n  }\n}]);\n\n\njqLite.prototype.addClass = function(cssClasses) {\n  var x, y, cssClass, el, splitClasses, existingClasses;\n  if (cssClasses && cssClasses != 'ng-scope' && cssClasses != 'ng-isolate-scope') {\n    for (x = 0; x < this.length; x++) {\n      el = this[x];\n      if (el.setAttribute) {\n\n        if (cssClasses.indexOf(' ') < 0 && el.classList.add) {\n          el.classList.add(cssClasses);\n        } else {\n          existingClasses = (' ' + (el.getAttribute('class') || '') + ' ')\n            .replace(/[\\n\\t]/g, \" \");\n          splitClasses = cssClasses.split(' ');\n\n          for (y = 0; y < splitClasses.length; y++) {\n            cssClass = splitClasses[y].trim();\n            if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {\n              existingClasses += cssClass + ' ';\n            }\n          }\n          el.setAttribute('class', existingClasses.trim());\n        }\n      }\n    }\n  }\n  return this;\n};\n\njqLite.prototype.removeClass = function(cssClasses) {\n  var x, y, splitClasses, cssClass, el;\n  if (cssClasses) {\n    for (x = 0; x < this.length; x++) {\n      el = this[x];\n      if (el.getAttribute) {\n        if (cssClasses.indexOf(' ') < 0 && el.classList.remove) {\n          el.classList.remove(cssClasses);\n        } else {\n          splitClasses = cssClasses.split(' ');\n\n          for (y = 0; y < splitClasses.length; y++) {\n            cssClass = splitClasses[y];\n            el.setAttribute('class', (\n                (\" \" + (el.getAttribute('class') || '') + \" \")\n                .replace(/[\\n\\t]/g, \" \")\n                .replace(\" \" + cssClass.trim() + \" \", \" \")).trim()\n            );\n          }\n        }\n      }\n    }\n  }\n  return this;\n};\n\n/**\n * @ngdoc service\n * @name $ionicBackdrop\n * @module ionic\n * @description\n * Shows and hides a backdrop over the UI.  Appears behind popups, loading,\n * and other overlays.\n *\n * Often, multiple UI components require a backdrop, but only one backdrop is\n * ever needed in the DOM at a time.\n *\n * Therefore, each component that requires the backdrop to be shown calls\n * `$ionicBackdrop.retain()` when it wants the backdrop, then `$ionicBackdrop.release()`\n * when it is done with the backdrop.\n *\n * For each time `retain` is called, the backdrop will be shown until `release` is called.\n *\n * For example, if `retain` is called three times, the backdrop will be shown until `release`\n * is called three times.\n *\n * **Notes:**\n * - The backdrop service will broadcast 'backdrop.shown' and 'backdrop.hidden' events from the root scope,\n * this is useful for alerting native components not in html.\n *\n * @usage\n *\n * ```js\n * function MyController($scope, $ionicBackdrop, $timeout, $rootScope) {\n *   //Show a backdrop for one second\n *   $scope.action = function() {\n *     $ionicBackdrop.retain();\n *     $timeout(function() {\n *       $ionicBackdrop.release();\n *     }, 1000);\n *   };\n *\n *   // Execute action on backdrop disappearing\n *   $scope.$on('backdrop.hidden', function() {\n *     // Execute action\n *   });\n *\n *   // Execute action on backdrop appearing\n *   $scope.$on('backdrop.shown', function() {\n *     // Execute action\n *   });\n *\n * }\n * ```\n */\nIonicModule\n.factory('$ionicBackdrop', [\n  '$document', '$timeout', '$$rAF', '$rootScope',\nfunction($document, $timeout, $$rAF, $rootScope) {\n\n  var el = jqLite('<div class=\"backdrop\">');\n  var backdropHolds = 0;\n\n  $document[0].body.appendChild(el[0]);\n\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicBackdrop#retain\n     * @description Retains the backdrop.\n     */\n    retain: retain,\n    /**\n     * @ngdoc method\n     * @name $ionicBackdrop#release\n     * @description\n     * Releases the backdrop.\n     */\n    release: release,\n\n    getElement: getElement,\n\n    // exposed for testing\n    _element: el\n  };\n\n  function retain() {\n    backdropHolds++;\n    if (backdropHolds === 1) {\n      el.addClass('visible');\n      $rootScope.$broadcast('backdrop.shown');\n      $$rAF(function() {\n        // If we're still at >0 backdropHolds after async...\n        if (backdropHolds >= 1) el.addClass('active');\n      });\n    }\n  }\n  function release() {\n    if (backdropHolds === 1) {\n      el.removeClass('active');\n      $rootScope.$broadcast('backdrop.hidden');\n      $timeout(function() {\n        // If we're still at 0 backdropHolds after async...\n        if (backdropHolds === 0) el.removeClass('visible');\n      }, 400, false);\n    }\n    backdropHolds = Math.max(0, backdropHolds - 1);\n  }\n\n  function getElement() {\n    return el;\n  }\n\n}]);\n\n/**\n * @private\n */\nIonicModule\n.factory('$ionicBind', ['$parse', '$interpolate', function($parse, $interpolate) {\n  var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n  return function(scope, attrs, bindDefinition) {\n    forEach(bindDefinition || {}, function(definition, scopeName) {\n      //Adapted from angular.js $compile\n      var match = definition.match(LOCAL_REGEXP) || [],\n        attrName = match[3] || scopeName,\n        mode = match[1], // @, =, or &\n        parentGet,\n        unwatch;\n\n      switch (mode) {\n        case '@':\n          if (!attrs[attrName]) {\n            return;\n          }\n          attrs.$observe(attrName, function(value) {\n            scope[scopeName] = value;\n          });\n          // we trigger an interpolation to ensure\n          // the value is there for use immediately\n          if (attrs[attrName]) {\n            scope[scopeName] = $interpolate(attrs[attrName])(scope);\n          }\n          break;\n\n        case '=':\n          if (!attrs[attrName]) {\n            return;\n          }\n          unwatch = scope.$watch(attrs[attrName], function(value) {\n            scope[scopeName] = value;\n          });\n          //Destroy parent scope watcher when this scope is destroyed\n          scope.$on('$destroy', unwatch);\n          break;\n\n        case '&':\n          /* jshint -W044 */\n          if (attrs[attrName] && attrs[attrName].match(RegExp(scopeName + '\\(.*?\\)'))) {\n            throw new Error('& expression binding \"' + scopeName + '\" looks like it will recursively call \"' +\n                          attrs[attrName] + '\" and cause a stack overflow! Please choose a different scopeName.');\n          }\n          parentGet = $parse(attrs[attrName]);\n          scope[scopeName] = function(locals) {\n            return parentGet(scope, locals);\n          };\n          break;\n      }\n    });\n  };\n}]);\n\n/**\n * @ngdoc service\n * @name $ionicBody\n * @module ionic\n * @description An angular utility service to easily and efficiently\n * add and remove CSS classes from the document's body element.\n */\nIonicModule\n.factory('$ionicBody', ['$document', function($document) {\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicBody#addClass\n     * @description Add a class to the document's body element.\n     * @param {string} class Each argument will be added to the body element.\n     * @returns {$ionicBody} The $ionicBody service so methods can be chained.\n     */\n    addClass: function() {\n      for (var x = 0; x < arguments.length; x++) {\n        $document[0].body.classList.add(arguments[x]);\n      }\n      return this;\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicBody#removeClass\n     * @description Remove a class from the document's body element.\n     * @param {string} class Each argument will be removed from the body element.\n     * @returns {$ionicBody} The $ionicBody service so methods can be chained.\n     */\n    removeClass: function() {\n      for (var x = 0; x < arguments.length; x++) {\n        $document[0].body.classList.remove(arguments[x]);\n      }\n      return this;\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicBody#enableClass\n     * @description Similar to the `add` method, except the first parameter accepts a boolean\n     * value determining if the class should be added or removed. Rather than writing user code,\n     * such as \"if true then add the class, else then remove the class\", this method can be\n     * given a true or false value which reduces redundant code.\n     * @param {boolean} shouldEnableClass A true/false value if the class should be added or removed.\n     * @param {string} class Each remaining argument would be added or removed depending on\n     * the first argument.\n     * @returns {$ionicBody} The $ionicBody service so methods can be chained.\n     */\n    enableClass: function(shouldEnableClass) {\n      var args = Array.prototype.slice.call(arguments).slice(1);\n      if (shouldEnableClass) {\n        this.addClass.apply(this, args);\n      } else {\n        this.removeClass.apply(this, args);\n      }\n      return this;\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicBody#append\n     * @description Append a child to the document's body.\n     * @param {element} element The element to be appended to the body. The passed in element\n     * can be either a jqLite element, or a DOM element.\n     * @returns {$ionicBody} The $ionicBody service so methods can be chained.\n     */\n    append: function(ele) {\n      $document[0].body.appendChild(ele.length ? ele[0] : ele);\n      return this;\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicBody#get\n     * @description Get the document's body element.\n     * @returns {element} Returns the document's body element.\n     */\n    get: function() {\n      return $document[0].body;\n    }\n  };\n}]);\n\nIonicModule\n.factory('$ionicClickBlock', [\n  '$document',\n  '$ionicBody',\n  '$timeout',\nfunction($document, $ionicBody, $timeout) {\n  var CSS_HIDE = 'click-block-hide';\n  var cbEle, fallbackTimer, pendingShow;\n\n  function preventClick(ev) {\n    ev.preventDefault();\n    ev.stopPropagation();\n  }\n\n  function addClickBlock() {\n    if (pendingShow) {\n      if (cbEle) {\n        cbEle.classList.remove(CSS_HIDE);\n      } else {\n        cbEle = $document[0].createElement('div');\n        cbEle.className = 'click-block';\n        $ionicBody.append(cbEle);\n        cbEle.addEventListener('touchstart', preventClick);\n        cbEle.addEventListener('mousedown', preventClick);\n      }\n      pendingShow = false;\n    }\n  }\n\n  function removeClickBlock() {\n    cbEle && cbEle.classList.add(CSS_HIDE);\n  }\n\n  return {\n    show: function(autoExpire) {\n      pendingShow = true;\n      $timeout.cancel(fallbackTimer);\n      fallbackTimer = $timeout(this.hide, autoExpire || 310, false);\n      addClickBlock();\n    },\n    hide: function() {\n      pendingShow = false;\n      $timeout.cancel(fallbackTimer);\n      removeClickBlock();\n    }\n  };\n}]);\n\n/**\n * @ngdoc service\n * @name $ionicGesture\n * @module ionic\n * @description An angular service exposing ionic\n * {@link ionic.utility:ionic.EventController}'s gestures.\n */\nIonicModule\n.factory('$ionicGesture', [function() {\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicGesture#on\n     * @description Add an event listener for a gesture on an element. See {@link ionic.utility:ionic.EventController#onGesture}.\n     * @param {string} eventType The gesture event to listen for.\n     * @param {function(e)} callback The function to call when the gesture\n     * happens.\n     * @param {element} $element The angular element to listen for the event on.\n     * @param {object} options object.\n     * @returns {ionic.Gesture} The gesture object (use this to remove the gesture later on).\n     */\n    on: function(eventType, cb, $element, options) {\n      return window.ionic.onGesture(eventType, cb, $element[0], options);\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicGesture#off\n     * @description Remove an event listener for a gesture on an element. See {@link ionic.utility:ionic.EventController#offGesture}.\n     * @param {ionic.Gesture} gesture The gesture that should be removed.\n     * @param {string} eventType The gesture event to remove the listener for.\n     * @param {function(e)} callback The listener to remove.\n     */\n    off: function(gesture, eventType, cb) {\n      return window.ionic.offGesture(gesture, eventType, cb);\n    }\n  };\n}]);\n\n/**\n * @ngdoc service\n * @name $ionicHistory\n * @module ionic\n * @description\n * $ionicHistory keeps track of views as the user navigates through an app. Similar to the way a\n * browser behaves, an Ionic app is able to keep track of the previous view, the current view, and\n * the forward view (if there is one).  However, a typical web browser only keeps track of one\n * history stack in a linear fashion.\n *\n * Unlike a traditional browser environment, apps and webapps have parallel independent histories,\n * such as with tabs. Should a user navigate few pages deep on one tab, and then switch to a new\n * tab and back, the back button relates not to the previous tab, but to the previous pages\n * visited within _that_ tab.\n *\n * `$ionicHistory` facilitates this parallel history architecture.\n */\n\nIonicModule\n.factory('$ionicHistory', [\n  '$rootScope',\n  '$state',\n  '$location',\n  '$window',\n  '$timeout',\n  '$ionicViewSwitcher',\n  '$ionicNavViewDelegate',\nfunction($rootScope, $state, $location, $window, $timeout, $ionicViewSwitcher, $ionicNavViewDelegate) {\n\n  // history actions while navigating views\n  var ACTION_INITIAL_VIEW = 'initialView';\n  var ACTION_NEW_VIEW = 'newView';\n  var ACTION_MOVE_BACK = 'moveBack';\n  var ACTION_MOVE_FORWARD = 'moveForward';\n\n  // direction of navigation\n  var DIRECTION_BACK = 'back';\n  var DIRECTION_FORWARD = 'forward';\n  var DIRECTION_ENTER = 'enter';\n  var DIRECTION_EXIT = 'exit';\n  var DIRECTION_SWAP = 'swap';\n  var DIRECTION_NONE = 'none';\n\n  var stateChangeCounter = 0;\n  var lastStateId, nextViewOptions, deregisterStateChangeListener, nextViewExpireTimer, forcedNav;\n\n  var viewHistory = {\n    histories: { root: { historyId: 'root', parentHistoryId: null, stack: [], cursor: -1 } },\n    views: {},\n    backView: null,\n    forwardView: null,\n    currentView: null\n  };\n\n  var View = function() {};\n  View.prototype.initialize = function(data) {\n    if (data) {\n      for (var name in data) this[name] = data[name];\n      return this;\n    }\n    return null;\n  };\n  View.prototype.go = function() {\n\n    if (this.stateName) {\n      return $state.go(this.stateName, this.stateParams);\n    }\n\n    if (this.url && this.url !== $location.url()) {\n\n      if (viewHistory.backView === this) {\n        return $window.history.go(-1);\n      } else if (viewHistory.forwardView === this) {\n        return $window.history.go(1);\n      }\n\n      $location.url(this.url);\n    }\n\n    return null;\n  };\n  View.prototype.destroy = function() {\n    if (this.scope) {\n      this.scope.$destroy && this.scope.$destroy();\n      this.scope = null;\n    }\n  };\n\n\n  function getViewById(viewId) {\n    return (viewId ? viewHistory.views[ viewId ] : null);\n  }\n\n  function getBackView(view) {\n    return (view ? getViewById(view.backViewId) : null);\n  }\n\n  function getForwardView(view) {\n    return (view ? getViewById(view.forwardViewId) : null);\n  }\n\n  function getHistoryById(historyId) {\n    return (historyId ? viewHistory.histories[ historyId ] : null);\n  }\n\n  function getHistory(scope) {\n    var histObj = getParentHistoryObj(scope);\n\n    if (!viewHistory.histories[ histObj.historyId ]) {\n      // this history object exists in parent scope, but doesn't\n      // exist in the history data yet\n      viewHistory.histories[ histObj.historyId ] = {\n        historyId: histObj.historyId,\n        parentHistoryId: getParentHistoryObj(histObj.scope.$parent).historyId,\n        stack: [],\n        cursor: -1\n      };\n    }\n    return getHistoryById(histObj.historyId);\n  }\n\n  function getParentHistoryObj(scope) {\n    var parentScope = scope;\n    while (parentScope) {\n      if (parentScope.hasOwnProperty('$historyId')) {\n        // this parent scope has a historyId\n        return { historyId: parentScope.$historyId, scope: parentScope };\n      }\n      // nothing found keep climbing up\n      parentScope = parentScope.$parent;\n    }\n    // no history for the parent, use the root\n    return { historyId: 'root', scope: $rootScope };\n  }\n\n  function setNavViews(viewId) {\n    viewHistory.currentView = getViewById(viewId);\n    viewHistory.backView = getBackView(viewHistory.currentView);\n    viewHistory.forwardView = getForwardView(viewHistory.currentView);\n  }\n\n  function getCurrentStateId() {\n    var id;\n    if ($state && $state.current && $state.current.name) {\n      id = $state.current.name;\n      if ($state.params) {\n        for (var key in $state.params) {\n          if ($state.params.hasOwnProperty(key) && $state.params[key]) {\n            id += \"_\" + key + \"=\" + $state.params[key];\n          }\n        }\n      }\n      return id;\n    }\n    // if something goes wrong make sure its got a unique stateId\n    return ionic.Utils.nextUid();\n  }\n\n  function getCurrentStateParams() {\n    var rtn;\n    if ($state && $state.params) {\n      for (var key in $state.params) {\n        if ($state.params.hasOwnProperty(key)) {\n          rtn = rtn || {};\n          rtn[key] = $state.params[key];\n        }\n      }\n    }\n    return rtn;\n  }\n\n\n  return {\n\n    register: function(parentScope, viewLocals) {\n\n      var currentStateId = getCurrentStateId(),\n          hist = getHistory(parentScope),\n          currentView = viewHistory.currentView,\n          backView = viewHistory.backView,\n          forwardView = viewHistory.forwardView,\n          viewId = null,\n          action = null,\n          direction = DIRECTION_NONE,\n          historyId = hist.historyId,\n          url = $location.url(),\n          tmp, x, ele;\n\n      if (lastStateId !== currentStateId) {\n        lastStateId = currentStateId;\n        stateChangeCounter++;\n      }\n\n      if (forcedNav) {\n        // we've previously set exactly what to do\n        viewId = forcedNav.viewId;\n        action = forcedNav.action;\n        direction = forcedNav.direction;\n        forcedNav = null;\n\n      } else if (backView && backView.stateId === currentStateId) {\n        // they went back one, set the old current view as a forward view\n        viewId = backView.viewId;\n        historyId = backView.historyId;\n        action = ACTION_MOVE_BACK;\n        if (backView.historyId === currentView.historyId) {\n          // went back in the same history\n          direction = DIRECTION_BACK;\n\n        } else if (currentView) {\n          direction = DIRECTION_EXIT;\n\n          tmp = getHistoryById(backView.historyId);\n          if (tmp && tmp.parentHistoryId === currentView.historyId) {\n            direction = DIRECTION_ENTER;\n\n          } else {\n            tmp = getHistoryById(currentView.historyId);\n            if (tmp && tmp.parentHistoryId === hist.parentHistoryId) {\n              direction = DIRECTION_SWAP;\n            }\n          }\n        }\n\n      } else if (forwardView && forwardView.stateId === currentStateId) {\n        // they went to the forward one, set the forward view to no longer a forward view\n        viewId = forwardView.viewId;\n        historyId = forwardView.historyId;\n        action = ACTION_MOVE_FORWARD;\n        if (forwardView.historyId === currentView.historyId) {\n          direction = DIRECTION_FORWARD;\n\n        } else if (currentView) {\n          direction = DIRECTION_EXIT;\n\n          if (currentView.historyId === hist.parentHistoryId) {\n            direction = DIRECTION_ENTER;\n\n          } else {\n            tmp = getHistoryById(currentView.historyId);\n            if (tmp && tmp.parentHistoryId === hist.parentHistoryId) {\n              direction = DIRECTION_SWAP;\n            }\n          }\n        }\n\n        tmp = getParentHistoryObj(parentScope);\n        if (forwardView.historyId && tmp.scope) {\n          // if a history has already been created by the forward view then make sure it stays the same\n          tmp.scope.$historyId = forwardView.historyId;\n          historyId = forwardView.historyId;\n        }\n\n      } else if (currentView && currentView.historyId !== historyId &&\n                hist.cursor > -1 && hist.stack.length > 0 && hist.cursor < hist.stack.length &&\n                hist.stack[hist.cursor].stateId === currentStateId) {\n        // they just changed to a different history and the history already has views in it\n        var switchToView = hist.stack[hist.cursor];\n        viewId = switchToView.viewId;\n        historyId = switchToView.historyId;\n        action = ACTION_MOVE_BACK;\n        direction = DIRECTION_SWAP;\n\n        tmp = getHistoryById(currentView.historyId);\n        if (tmp && tmp.parentHistoryId === historyId) {\n          direction = DIRECTION_EXIT;\n\n        } else {\n          tmp = getHistoryById(historyId);\n          if (tmp && tmp.parentHistoryId === currentView.historyId) {\n            direction = DIRECTION_ENTER;\n          }\n        }\n\n        // if switching to a different history, and the history of the view we're switching\n        // to has an existing back view from a different history than itself, then\n        // it's back view would be better represented using the current view as its back view\n        tmp = getViewById(switchToView.backViewId);\n        if (tmp && switchToView.historyId !== tmp.historyId) {\n          // the new view is being removed from it's old position in the history and being placed at the top,\n          // so we need to update any views that reference it as a backview, otherwise there will be infinitely loops\n          var viewIds = Object.keys(viewHistory.views);\n          viewIds.forEach(function(viewId) {\n            var view = viewHistory.views[viewId];\n            if ((view.backViewId === switchToView.viewId) && (view.historyId !== switchToView.historyId)) {\n              view.backViewId = null;\n            }\n          });\n\n          hist.stack[hist.cursor].backViewId = currentView.viewId;\n        }\n\n      } else {\n\n        // create an element from the viewLocals template\n        ele = $ionicViewSwitcher.createViewEle(viewLocals);\n        if (this.isAbstractEle(ele, viewLocals)) {\n          return {\n            action: 'abstractView',\n            direction: DIRECTION_NONE,\n            ele: ele\n          };\n        }\n\n        // set a new unique viewId\n        viewId = ionic.Utils.nextUid();\n\n        if (currentView) {\n          // set the forward view if there is a current view (ie: if its not the first view)\n          currentView.forwardViewId = viewId;\n\n          action = ACTION_NEW_VIEW;\n\n          // check if there is a new forward view within the same history\n          if (forwardView && currentView.stateId !== forwardView.stateId &&\n             currentView.historyId === forwardView.historyId) {\n            // they navigated to a new view but the stack already has a forward view\n            // since its a new view remove any forwards that existed\n            tmp = getHistoryById(forwardView.historyId);\n            if (tmp) {\n              // the forward has a history\n              for (x = tmp.stack.length - 1; x >= forwardView.index; x--) {\n                // starting from the end destroy all forwards in this history from this point\n                var stackItem = tmp.stack[x];\n                stackItem && stackItem.destroy && stackItem.destroy();\n                tmp.stack.splice(x);\n              }\n              historyId = forwardView.historyId;\n            }\n          }\n\n          // its only moving forward if its in the same history\n          if (hist.historyId === currentView.historyId) {\n            direction = DIRECTION_FORWARD;\n\n          } else if (currentView.historyId !== hist.historyId) {\n            // DB: this is a new view in a different tab\n            direction = DIRECTION_ENTER;\n\n            tmp = getHistoryById(currentView.historyId);\n            if (tmp && tmp.parentHistoryId === hist.parentHistoryId) {\n              direction = DIRECTION_SWAP;\n\n            } else {\n              tmp = getHistoryById(tmp.parentHistoryId);\n              if (tmp && tmp.historyId === hist.historyId) {\n                direction = DIRECTION_EXIT;\n              }\n            }\n          }\n\n        } else {\n          // there's no current view, so this must be the initial view\n          action = ACTION_INITIAL_VIEW;\n        }\n\n        if (stateChangeCounter < 2) {\n          // views that were spun up on the first load should not animate\n          direction = DIRECTION_NONE;\n        }\n\n        // add the new view\n        viewHistory.views[viewId] = this.createView({\n          viewId: viewId,\n          index: hist.stack.length,\n          historyId: hist.historyId,\n          backViewId: (currentView && currentView.viewId ? currentView.viewId : null),\n          forwardViewId: null,\n          stateId: currentStateId,\n          stateName: this.currentStateName(),\n          stateParams: getCurrentStateParams(),\n          url: url,\n          canSwipeBack: canSwipeBack(ele, viewLocals)\n        });\n\n        // add the new view to this history's stack\n        hist.stack.push(viewHistory.views[viewId]);\n      }\n\n      deregisterStateChangeListener && deregisterStateChangeListener();\n      $timeout.cancel(nextViewExpireTimer);\n      if (nextViewOptions) {\n        if (nextViewOptions.disableAnimate) direction = DIRECTION_NONE;\n        if (nextViewOptions.disableBack) viewHistory.views[viewId].backViewId = null;\n        if (nextViewOptions.historyRoot) {\n          for (x = 0; x < hist.stack.length; x++) {\n            if (hist.stack[x].viewId === viewId) {\n              hist.stack[x].index = 0;\n              hist.stack[x].backViewId = hist.stack[x].forwardViewId = null;\n            } else {\n              delete viewHistory.views[hist.stack[x].viewId];\n            }\n          }\n          hist.stack = [viewHistory.views[viewId]];\n        }\n        nextViewOptions = null;\n      }\n\n      setNavViews(viewId);\n\n      if (viewHistory.backView && historyId == viewHistory.backView.historyId && currentStateId == viewHistory.backView.stateId && url == viewHistory.backView.url) {\n        for (x = 0; x < hist.stack.length; x++) {\n          if (hist.stack[x].viewId == viewId) {\n            action = 'dupNav';\n            direction = DIRECTION_NONE;\n            if (x > 0) {\n              hist.stack[x - 1].forwardViewId = null;\n            }\n            viewHistory.forwardView = null;\n            viewHistory.currentView.index = viewHistory.backView.index;\n            viewHistory.currentView.backViewId = viewHistory.backView.backViewId;\n            viewHistory.backView = getBackView(viewHistory.backView);\n            hist.stack.splice(x, 1);\n            break;\n          }\n        }\n      }\n\n      hist.cursor = viewHistory.currentView.index;\n\n      return {\n        viewId: viewId,\n        action: action,\n        direction: direction,\n        historyId: historyId,\n        enableBack: this.enabledBack(viewHistory.currentView),\n        isHistoryRoot: (viewHistory.currentView.index === 0),\n        ele: ele\n      };\n    },\n\n    registerHistory: function(scope) {\n      scope.$historyId = ionic.Utils.nextUid();\n    },\n\n    createView: function(data) {\n      var newView = new View();\n      return newView.initialize(data);\n    },\n\n    getViewById: getViewById,\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#viewHistory\n     * @description The app's view history data, such as all the views and histories, along\n     * with how they are ordered and linked together within the navigation stack.\n     * @returns {object} Returns an object containing the apps view history data.\n     */\n    viewHistory: function() {\n      return viewHistory;\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#currentView\n     * @description The app's current view.\n     * @returns {object} Returns the current view.\n     */\n    currentView: function(view) {\n      if (arguments.length) {\n        viewHistory.currentView = view;\n      }\n      return viewHistory.currentView;\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#currentHistoryId\n     * @description The ID of the history stack which is the parent container of the current view.\n     * @returns {string} Returns the current history ID.\n     */\n    currentHistoryId: function() {\n      return viewHistory.currentView ? viewHistory.currentView.historyId : null;\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#currentTitle\n     * @description Gets and sets the current view's title.\n     * @param {string=} val The title to update the current view with.\n     * @returns {string} Returns the current view's title.\n     */\n    currentTitle: function(val) {\n      if (viewHistory.currentView) {\n        if (arguments.length) {\n          viewHistory.currentView.title = val;\n        }\n        return viewHistory.currentView.title;\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#backView\n     * @description Returns the view that was before the current view in the history stack.\n     * If the user navigated from View A to View B, then View A would be the back view, and\n     * View B would be the current view.\n     * @returns {object} Returns the back view.\n     */\n    backView: function(view) {\n      if (arguments.length) {\n        viewHistory.backView = view;\n      }\n      return viewHistory.backView;\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#backTitle\n     * @description Gets the back view's title.\n     * @returns {string} Returns the back view's title.\n     */\n    backTitle: function(view) {\n      var backView = (view && getViewById(view.backViewId)) || viewHistory.backView;\n      return backView && backView.title;\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#forwardView\n     * @description Returns the view that was in front of the current view in the history stack.\n     * A forward view would exist if the user navigated from View A to View B, then\n     * navigated back to View A. At this point then View B would be the forward view, and View\n     * A would be the current view.\n     * @returns {object} Returns the forward view.\n     */\n    forwardView: function(view) {\n      if (arguments.length) {\n        viewHistory.forwardView = view;\n      }\n      return viewHistory.forwardView;\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#currentStateName\n     * @description Returns the current state name.\n     * @returns {string}\n     */\n    currentStateName: function() {\n      return ($state && $state.current ? $state.current.name : null);\n    },\n\n    isCurrentStateNavView: function(navView) {\n      return !!($state && $state.current && $state.current.views && $state.current.views[navView]);\n    },\n\n    goToHistoryRoot: function(historyId) {\n      if (historyId) {\n        var hist = getHistoryById(historyId);\n        if (hist && hist.stack.length) {\n          if (viewHistory.currentView && viewHistory.currentView.viewId === hist.stack[0].viewId) {\n            return;\n          }\n          forcedNav = {\n            viewId: hist.stack[0].viewId,\n            action: ACTION_MOVE_BACK,\n            direction: DIRECTION_BACK\n          };\n          hist.stack[0].go();\n        }\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#goBack\n     * @param {number=} backCount Optional negative integer setting how many views to go\n     * back. By default it'll go back one view by using the value `-1`. To go back two\n     * views you would use `-2`. If the number goes farther back than the number of views\n     * in the current history's stack then it'll go to the first view in the current history's\n     * stack. If the number is zero or greater then it'll do nothing. It also does not\n     * cross history stacks, meaning it can only go as far back as the current history.\n     * @description Navigates the app to the back view, if a back view exists.\n     */\n    goBack: function(backCount) {\n      if (isDefined(backCount) && backCount !== -1) {\n        if (backCount > -1) return;\n\n        var currentHistory = viewHistory.histories[this.currentHistoryId()];\n        var newCursor = currentHistory.cursor + backCount + 1;\n        if (newCursor < 1) {\n          newCursor = 1;\n        }\n\n        currentHistory.cursor = newCursor;\n        setNavViews(currentHistory.stack[newCursor].viewId);\n\n        var cursor = newCursor - 1;\n        var clearStateIds = [];\n        var fwdView = getViewById(currentHistory.stack[cursor].forwardViewId);\n        while (fwdView) {\n          clearStateIds.push(fwdView.stateId || fwdView.viewId);\n          cursor++;\n          if (cursor >= currentHistory.stack.length) break;\n          fwdView = getViewById(currentHistory.stack[cursor].forwardViewId);\n        }\n\n        var self = this;\n        if (clearStateIds.length) {\n          $timeout(function() {\n            self.clearCache(clearStateIds);\n          }, 300);\n        }\n      }\n\n      viewHistory.backView && viewHistory.backView.go();\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#removeBackView\n     * @description Remove the previous view from the history completely, including the\n     * cached element and scope (if they exist).\n     */\n    removeBackView: function() {\n      var self = this;\n      var currentHistory = viewHistory.histories[this.currentHistoryId()];\n      var currentCursor = currentHistory.cursor;\n\n      var currentView = currentHistory.stack[currentCursor];\n      var backView = currentHistory.stack[currentCursor - 1];\n      var replacementView = currentHistory.stack[currentCursor - 2];\n\n      // fail if we dont have enough views in the history\n      if (!backView || !replacementView) {\n        return;\n      }\n\n      // remove the old backView and the cached element/scope\n      currentHistory.stack.splice(currentCursor - 1, 1);\n      self.clearCache([backView.viewId]);\n      // make the replacementView and currentView point to each other (bypass the old backView)\n      currentView.backViewId = replacementView.viewId;\n      currentView.index = currentView.index - 1;\n      replacementView.forwardViewId = currentView.viewId;\n      // update the cursor and set new backView\n      viewHistory.backView = replacementView;\n      currentHistory.currentCursor += -1;\n    },\n\n    enabledBack: function(view) {\n      var backView = getBackView(view);\n      return !!(backView && backView.historyId === view.historyId);\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#clearHistory\n     * @description Clears out the app's entire history, except for the current view.\n     */\n    clearHistory: function() {\n      var\n      histories = viewHistory.histories,\n      currentView = viewHistory.currentView;\n\n      if (histories) {\n        for (var historyId in histories) {\n\n          if (histories[historyId].stack) {\n            histories[historyId].stack = [];\n            histories[historyId].cursor = -1;\n          }\n\n          if (currentView && currentView.historyId === historyId) {\n            currentView.backViewId = currentView.forwardViewId = null;\n            histories[historyId].stack.push(currentView);\n          } else if (histories[historyId].destroy) {\n            histories[historyId].destroy();\n          }\n\n        }\n      }\n\n      for (var viewId in viewHistory.views) {\n        if (viewId !== currentView.viewId) {\n          delete viewHistory.views[viewId];\n        }\n      }\n\n      if (currentView) {\n        setNavViews(currentView.viewId);\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#clearCache\n\t * @return promise\n     * @description Removes all cached views within every {@link ionic.directive:ionNavView}.\n     * This both removes the view element from the DOM, and destroy it's scope.\n     */\n    clearCache: function(stateIds) {\n      return $timeout(function() {\n        $ionicNavViewDelegate._instances.forEach(function(instance) {\n          instance.clearCache(stateIds);\n        });\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicHistory#nextViewOptions\n     * @description Sets options for the next view. This method can be useful to override\n     * certain view/transition defaults right before a view transition happens. For example,\n     * the {@link ionic.directive:menuClose} directive uses this method internally to ensure\n     * an animated view transition does not happen when a side menu is open, and also sets\n     * the next view as the root of its history stack. After the transition these options\n     * are set back to null.\n     *\n     * Available options:\n     *\n     * * `disableAnimate`: Do not animate the next transition.\n     * * `disableBack`: The next view should forget its back view, and set it to null.\n     * * `historyRoot`: The next view should become the root view in its history stack.\n     *\n     * ```js\n     * $ionicHistory.nextViewOptions({\n     *   disableAnimate: true,\n     *   disableBack: true\n     * });\n     * ```\n     */\n    nextViewOptions: function(opts) {\n      deregisterStateChangeListener && deregisterStateChangeListener();\n      if (arguments.length) {\n        $timeout.cancel(nextViewExpireTimer);\n        if (opts === null) {\n          nextViewOptions = opts;\n        } else {\n          nextViewOptions = nextViewOptions || {};\n          extend(nextViewOptions, opts);\n          if (nextViewOptions.expire) {\n              deregisterStateChangeListener = $rootScope.$on('$stateChangeSuccess', function() {\n                nextViewExpireTimer = $timeout(function() {\n                  nextViewOptions = null;\n                  }, nextViewOptions.expire);\n              });\n          }\n        }\n      }\n      return nextViewOptions;\n    },\n\n    isAbstractEle: function(ele, viewLocals) {\n      if (viewLocals && viewLocals.$$state && viewLocals.$$state.self['abstract']) {\n        return true;\n      }\n      return !!(ele && (isAbstractTag(ele) || isAbstractTag(ele.children())));\n    },\n\n    isActiveScope: function(scope) {\n      if (!scope) return false;\n\n      var climbScope = scope;\n      var currentHistoryId = this.currentHistoryId();\n      var foundHistoryId;\n\n      while (climbScope) {\n        if (climbScope.$$disconnected) {\n          return false;\n        }\n\n        if (!foundHistoryId && climbScope.hasOwnProperty('$historyId')) {\n          foundHistoryId = true;\n        }\n\n        if (currentHistoryId) {\n          if (climbScope.hasOwnProperty('$historyId') && currentHistoryId == climbScope.$historyId) {\n            return true;\n          }\n          if (climbScope.hasOwnProperty('$activeHistoryId')) {\n            if (currentHistoryId == climbScope.$activeHistoryId) {\n              if (climbScope.hasOwnProperty('$historyId')) {\n                return true;\n              }\n              if (!foundHistoryId) {\n                return true;\n              }\n            }\n          }\n        }\n\n        if (foundHistoryId && climbScope.hasOwnProperty('$activeHistoryId')) {\n          foundHistoryId = false;\n        }\n\n        climbScope = climbScope.$parent;\n      }\n\n      return currentHistoryId ? currentHistoryId == 'root' : true;\n    }\n\n  };\n\n  function isAbstractTag(ele) {\n    return ele && ele.length && /ion-side-menus|ion-tabs/i.test(ele[0].tagName);\n  }\n\n  function canSwipeBack(ele, viewLocals) {\n    if (viewLocals && viewLocals.$$state && viewLocals.$$state.self.canSwipeBack === false) {\n      return false;\n    }\n    if (ele && ele.attr('can-swipe-back') === 'false') {\n      return false;\n    }\n    var eleChild = ele.find('ion-view');\n    if (eleChild && eleChild.attr('can-swipe-back') === 'false') {\n      return false;\n    }\n    return true;\n  }\n\n}])\n\n.run([\n  '$rootScope',\n  '$state',\n  '$location',\n  '$document',\n  '$ionicPlatform',\n  '$ionicHistory',\n  'IONIC_BACK_PRIORITY',\nfunction($rootScope, $state, $location, $document, $ionicPlatform, $ionicHistory, IONIC_BACK_PRIORITY) {\n\n  // always reset the keyboard state when change stage\n  $rootScope.$on('$ionicView.beforeEnter', function() {\n    ionic.keyboard && ionic.keyboard.hide && ionic.keyboard.hide();\n  });\n\n  $rootScope.$on('$ionicHistory.change', function(e, data) {\n    if (!data) return null;\n\n    var viewHistory = $ionicHistory.viewHistory();\n\n    var hist = (data.historyId ? viewHistory.histories[ data.historyId ] : null);\n    if (hist && hist.cursor > -1 && hist.cursor < hist.stack.length) {\n      // the history they're going to already exists\n      // go to it's last view in its stack\n      var view = hist.stack[ hist.cursor ];\n      return view.go(data);\n    }\n\n    // this history does not have a URL, but it does have a uiSref\n    // figure out its URL from the uiSref\n    if (!data.url && data.uiSref) {\n      data.url = $state.href(data.uiSref);\n    }\n\n    if (data.url) {\n      // don't let it start with a #, messes with $location.url()\n      if (data.url.indexOf('#') === 0) {\n        data.url = data.url.replace('#', '');\n      }\n      if (data.url !== $location.url()) {\n        // we've got a good URL, ready GO!\n        $location.url(data.url);\n      }\n    }\n  });\n\n  $rootScope.$ionicGoBack = function(backCount) {\n    $ionicHistory.goBack(backCount);\n  };\n\n  // Set the document title when a new view is shown\n  $rootScope.$on('$ionicView.afterEnter', function(ev, data) {\n    if (data && data.title) {\n      $document[0].title = data.title;\n    }\n  });\n\n  // Triggered when devices with a hardware back button (Android) is clicked by the user\n  // This is a Cordova/Phonegap platform specifc method\n  function onHardwareBackButton(e) {\n    var backView = $ionicHistory.backView();\n    if (backView) {\n      // there is a back view, go to it\n      backView.go();\n    } else {\n      // there is no back view, so close the app instead\n      ionic.Platform.exitApp();\n    }\n    e.preventDefault();\n    return false;\n  }\n  $ionicPlatform.registerBackButtonAction(\n    onHardwareBackButton,\n    IONIC_BACK_PRIORITY.view\n  );\n\n}]);\n\n/**\n * @ngdoc provider\n * @name $ionicConfigProvider\n * @module ionic\n * @description\n * Ionic automatically takes platform configurations into account to adjust things like what\n * transition style to use and whether tab icons should show on the top or bottom. For example,\n * iOS will move forward by transitioning the entering view from right to center and the leaving\n * view from center to left. However, Android will transition with the entering view going from\n * bottom to center, covering the previous view, which remains stationary. It should be noted\n * that when a platform is not iOS or Android, then it'll default to iOS. So if you are\n * developing on a desktop browser, it's going to take on iOS default configs.\n *\n * These configs can be changed using the `$ionicConfigProvider` during the configuration phase\n * of your app. Additionally, `$ionicConfig` can also set and get config values during the run\n * phase and within the app itself.\n *\n * By default, all base config variables are set to `'platform'`, which means it'll take on the\n * default config of the platform on which it's running. Config variables can be set at this\n * level so all platforms follow the same setting, rather than its platform config.\n * The following code would set the same config variable for all platforms:\n *\n * ```js\n * $ionicConfigProvider.views.maxCache(10);\n * ```\n *\n * Additionally, each platform can have its own config within the `$ionicConfigProvider.platform`\n * property. The config below would only apply to Android devices.\n *\n * ```js\n * $ionicConfigProvider.platform.android.views.maxCache(5);\n * ```\n *\n * @usage\n * ```js\n * var myApp = angular.module('reallyCoolApp', ['ionic']);\n *\n * myApp.config(function($ionicConfigProvider) {\n *   $ionicConfigProvider.views.maxCache(5);\n *\n *   // note that you can also chain configs\n *   $ionicConfigProvider.backButton.text('Go Back').icon('ion-chevron-left');\n * });\n * ```\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#views.transition\n * @description Animation style when transitioning between views. Default `platform`.\n *\n * @param {string} transition Which style of view transitioning to use.\n *\n * * `platform`: Dynamically choose the correct transition style depending on the platform\n * the app is running from. If the platform is not `ios` or `android` then it will default\n * to `ios`.\n * * `ios`: iOS style transition.\n * * `android`: Android style transition.\n * * `none`: Do not perform animated transitions.\n *\n * @returns {string} value\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#views.maxCache\n * @description  Maximum number of view elements to cache in the DOM. When the max number is\n * exceeded, the view with the longest time period since it was accessed is removed. Views that\n * stay in the DOM cache the view's scope, current state, and scroll position. The scope is\n * disconnected from the `$watch` cycle when it is cached and reconnected when it enters again.\n * When the maximum cache is `0`, the leaving view's element will be removed from the DOM after\n * each view transition, and the next time the same view is shown, it will have to re-compile,\n * attach to the DOM, and link the element again. This disables caching, in effect.\n * @param {number} maxNumber Maximum number of views to retain. Default `10`.\n * @returns {number} How many views Ionic will hold onto until the a view is removed.\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#views.forwardCache\n * @description  By default, when navigating, views that were recently visited are cached, and\n * the same instance data and DOM elements are referenced when navigating back. However, when\n * navigating back in the history, the \"forward\" views are removed from the cache. If you\n * navigate forward to the same view again, it'll create a new DOM element and controller\n * instance. Basically, any forward views are reset each time. Set this config to `true` to have\n * forward views cached and not reset on each load.\n * @param {boolean} value\n * @returns {boolean}\n */\n\n /**\n  * @ngdoc method\n  * @name $ionicConfigProvider#views.swipeBackEnabled\n  * @description  By default on iOS devices, swipe to go back functionality is enabled by default.\n  * This method can be used to disable it globally, or on a per-view basis.\n  * Note: This functionality is only supported on iOS.\n  * @param {boolean} value\n  * @returns {boolean}\n  */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#scrolling.jsScrolling\n * @description  Whether to use JS or Native scrolling. Defaults to native scrolling. Setting this to\n * `true` has the same effect as setting each `ion-content` to have `overflow-scroll='false'`.\n * @param {boolean} value Defaults to `false` as of Ionic 1.2\n * @returns {boolean}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#backButton.icon\n * @description Back button icon.\n * @param {string} value\n * @returns {string}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#backButton.text\n * @description Back button text.\n * @param {string} value Defaults to `Back`.\n * @returns {string}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#backButton.previousTitleText\n * @description If the previous title text should become the back button text. This\n * is the default for iOS.\n * @param {boolean} value\n * @returns {boolean}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#form.checkbox\n * @description Checkbox style. Android defaults to `square` and iOS defaults to `circle`.\n * @param {string} value\n * @returns {string}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#form.toggle\n * @description Toggle item style. Android defaults to `small` and iOS defaults to `large`.\n * @param {string} value\n * @returns {string}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#spinner.icon\n * @description Default spinner icon to use.\n * @param {string} value Can be: `android`, `ios`, `ios-small`, `bubbles`, `circles`, `crescent`,\n * `dots`, `lines`, `ripple`, or `spiral`.\n * @returns {string}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#tabs.style\n * @description Tab style. Android defaults to `striped` and iOS defaults to `standard`.\n * @param {string} value Available values include `striped` and `standard`.\n * @returns {string}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#tabs.position\n * @description Tab position. Android defaults to `top` and iOS defaults to `bottom`.\n * @param {string} value Available values include `top` and `bottom`.\n * @returns {string}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#templates.maxPrefetch\n * @description Sets the maximum number of templates to prefetch from the templateUrls defined in\n * $stateProvider.state. If set to `0`, the user will have to wait\n * for a template to be fetched the first time when navigating to a new page. Default `30`.\n * @param {integer} value Max number of template to prefetch from the templateUrls defined in\n * `$stateProvider.state()`.\n * @returns {integer}\n */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#navBar.alignTitle\n * @description Which side of the navBar to align the title. Default `center`.\n *\n * @param {string} value side of the navBar to align the title.\n *\n * * `platform`: Dynamically choose the correct title style depending on the platform\n * the app is running from. If the platform is `ios`, it will default to `center`.\n * If the platform is `android`, it will default to `left`. If the platform is not\n * `ios` or `android`, it will default to `center`.\n *\n * * `left`: Left align the title in the navBar\n * * `center`: Center align the title in the navBar\n * * `right`: Right align the title in the navBar.\n *\n * @returns {string} value\n */\n\n/**\n  * @ngdoc method\n  * @name $ionicConfigProvider#navBar.positionPrimaryButtons\n  * @description Which side of the navBar to align the primary navBar buttons. Default `left`.\n  *\n  * @param {string} value side of the navBar to align the primary navBar buttons.\n  *\n  * * `platform`: Dynamically choose the correct title style depending on the platform\n  * the app is running from. If the platform is `ios`, it will default to `left`.\n  * If the platform is `android`, it will default to `right`. If the platform is not\n  * `ios` or `android`, it will default to `left`.\n  *\n  * * `left`: Left align the primary navBar buttons in the navBar\n  * * `right`: Right align the primary navBar buttons in the navBar.\n  *\n  * @returns {string} value\n  */\n\n/**\n * @ngdoc method\n * @name $ionicConfigProvider#navBar.positionSecondaryButtons\n * @description Which side of the navBar to align the secondary navBar buttons. Default `right`.\n *\n * @param {string} value side of the navBar to align the secondary navBar buttons.\n *\n * * `platform`: Dynamically choose the correct title style depending on the platform\n * the app is running from. If the platform is `ios`, it will default to `right`.\n * If the platform is `android`, it will default to `right`. If the platform is not\n * `ios` or `android`, it will default to `right`.\n *\n * * `left`: Left align the secondary navBar buttons in the navBar\n * * `right`: Right align the secondary navBar buttons in the navBar.\n *\n * @returns {string} value\n */\n\nIonicModule\n.provider('$ionicConfig', function() {\n\n  var provider = this;\n  provider.platform = {};\n  var PLATFORM = 'platform';\n\n  var configProperties = {\n    views: {\n      maxCache: PLATFORM,\n      forwardCache: PLATFORM,\n      transition: PLATFORM,\n      swipeBackEnabled: PLATFORM,\n      swipeBackHitWidth: PLATFORM\n    },\n    navBar: {\n      alignTitle: PLATFORM,\n      positionPrimaryButtons: PLATFORM,\n      positionSecondaryButtons: PLATFORM,\n      transition: PLATFORM\n    },\n    backButton: {\n      icon: PLATFORM,\n      text: PLATFORM,\n      previousTitleText: PLATFORM\n    },\n    form: {\n      checkbox: PLATFORM,\n      toggle: PLATFORM\n    },\n    scrolling: {\n      jsScrolling: PLATFORM\n    },\n    spinner: {\n      icon: PLATFORM\n    },\n    tabs: {\n      style: PLATFORM,\n      position: PLATFORM\n    },\n    templates: {\n      maxPrefetch: PLATFORM\n    },\n    platform: {}\n  };\n  createConfig(configProperties, provider, '');\n\n\n\n  // Default\n  // -------------------------\n  setPlatformConfig('default', {\n\n    views: {\n      maxCache: 10,\n      forwardCache: false,\n      transition: 'ios',\n      swipeBackEnabled: true,\n      swipeBackHitWidth: 45\n    },\n\n    navBar: {\n      alignTitle: 'center',\n      positionPrimaryButtons: 'left',\n      positionSecondaryButtons: 'right',\n      transition: 'view'\n    },\n\n    backButton: {\n      icon: 'ion-ios-arrow-back',\n      text: 'Back',\n      previousTitleText: true\n    },\n\n    form: {\n      checkbox: 'circle',\n      toggle: 'large'\n    },\n\n    scrolling: {\n      jsScrolling: true\n    },\n\n    spinner: {\n      icon: 'ios'\n    },\n\n    tabs: {\n      style: 'standard',\n      position: 'bottom'\n    },\n\n    templates: {\n      maxPrefetch: 30\n    }\n\n  });\n\n\n\n  // iOS (it is the default already)\n  // -------------------------\n  setPlatformConfig('ios', {});\n\n\n\n  // Android\n  // -------------------------\n  setPlatformConfig('android', {\n\n    views: {\n      transition: 'android',\n      swipeBackEnabled: false\n    },\n\n    navBar: {\n      alignTitle: 'left',\n      positionPrimaryButtons: 'right',\n      positionSecondaryButtons: 'right'\n    },\n\n    backButton: {\n      icon: 'ion-android-arrow-back',\n      text: false,\n      previousTitleText: false\n    },\n\n    form: {\n      checkbox: 'square',\n      toggle: 'small'\n    },\n\n    spinner: {\n      icon: 'android'\n    },\n\n    tabs: {\n      style: 'striped',\n      position: 'top'\n    },\n\n    scrolling: {\n      jsScrolling: false\n    }\n  });\n\n  // Windows Phone\n  // -------------------------\n  setPlatformConfig('windowsphone', {\n    //scrolling: {\n    //  jsScrolling: false\n    //}\n    spinner: {\n      icon: 'android'\n    }\n  });\n\n\n  provider.transitions = {\n    views: {},\n    navBar: {}\n  };\n\n\n  // iOS Transitions\n  // -----------------------\n  provider.transitions.views.ios = function(enteringEle, leavingEle, direction, shouldAnimate) {\n\n    function setStyles(ele, opacity, x, boxShadowOpacity) {\n      var css = {};\n      css[ionic.CSS.TRANSITION_DURATION] = d.shouldAnimate ? '' : 0;\n      css.opacity = opacity;\n      if (boxShadowOpacity > -1) {\n        css.boxShadow = '0 0 10px rgba(0,0,0,' + (d.shouldAnimate ? boxShadowOpacity * 0.45 : 0.3) + ')';\n      }\n      css[ionic.CSS.TRANSFORM] = 'translate3d(' + x + '%,0,0)';\n      ionic.DomUtil.cachedStyles(ele, css);\n    }\n\n    var d = {\n      run: function(step) {\n        if (direction == 'forward') {\n          setStyles(enteringEle, 1, (1 - step) * 99, 1 - step); // starting at 98% prevents a flicker\n          setStyles(leavingEle, (1 - 0.1 * step), step * -33, -1);\n\n        } else if (direction == 'back') {\n          setStyles(enteringEle, (1 - 0.1 * (1 - step)), (1 - step) * -33, -1);\n          setStyles(leavingEle, 1, step * 100, 1 - step);\n\n        } else {\n          // swap, enter, exit\n          setStyles(enteringEle, 1, 0, -1);\n          setStyles(leavingEle, 0, 0, -1);\n        }\n      },\n      shouldAnimate: shouldAnimate && (direction == 'forward' || direction == 'back')\n    };\n\n    return d;\n  };\n\n  provider.transitions.navBar.ios = function(enteringHeaderBar, leavingHeaderBar, direction, shouldAnimate) {\n\n    function setStyles(ctrl, opacity, titleX, backTextX) {\n      var css = {};\n      css[ionic.CSS.TRANSITION_DURATION] = d.shouldAnimate ? '' : '0ms';\n      css.opacity = opacity === 1 ? '' : opacity;\n\n      ctrl.setCss('buttons-left', css);\n      ctrl.setCss('buttons-right', css);\n      ctrl.setCss('back-button', css);\n\n      css[ionic.CSS.TRANSFORM] = 'translate3d(' + backTextX + 'px,0,0)';\n      ctrl.setCss('back-text', css);\n\n      css[ionic.CSS.TRANSFORM] = 'translate3d(' + titleX + 'px,0,0)';\n      ctrl.setCss('title', css);\n    }\n\n    function enter(ctrlA, ctrlB, step) {\n      if (!ctrlA || !ctrlB) return;\n      var titleX = (ctrlA.titleTextX() + ctrlA.titleWidth()) * (1 - step);\n      var backTextX = (ctrlB && (ctrlB.titleTextX() - ctrlA.backButtonTextLeft()) * (1 - step)) || 0;\n      setStyles(ctrlA, step, titleX, backTextX);\n    }\n\n    function leave(ctrlA, ctrlB, step) {\n      if (!ctrlA || !ctrlB) return;\n      var titleX = (-(ctrlA.titleTextX() - ctrlB.backButtonTextLeft()) - (ctrlA.titleLeftRight())) * step;\n      setStyles(ctrlA, 1 - step, titleX, 0);\n    }\n\n    var d = {\n      run: function(step) {\n        var enteringHeaderCtrl = enteringHeaderBar.controller();\n        var leavingHeaderCtrl = leavingHeaderBar && leavingHeaderBar.controller();\n        if (d.direction == 'back') {\n          leave(enteringHeaderCtrl, leavingHeaderCtrl, 1 - step);\n          enter(leavingHeaderCtrl, enteringHeaderCtrl, 1 - step);\n        } else {\n          enter(enteringHeaderCtrl, leavingHeaderCtrl, step);\n          leave(leavingHeaderCtrl, enteringHeaderCtrl, step);\n        }\n      },\n      direction: direction,\n      shouldAnimate: shouldAnimate && (direction == 'forward' || direction == 'back')\n    };\n\n    return d;\n  };\n\n\n  // Android Transitions\n  // -----------------------\n\n  provider.transitions.views.android = function(enteringEle, leavingEle, direction, shouldAnimate) {\n    shouldAnimate = shouldAnimate && (direction == 'forward' || direction == 'back');\n\n    function setStyles(ele, x, opacity) {\n      var css = {};\n      css[ionic.CSS.TRANSITION_DURATION] = d.shouldAnimate ? '' : 0;\n      css[ionic.CSS.TRANSFORM] = 'translate3d(' + x + '%,0,0)';\n      css.opacity = opacity;\n      ionic.DomUtil.cachedStyles(ele, css);\n    }\n\n    var d = {\n      run: function(step) {\n        if (direction == 'forward') {\n          setStyles(enteringEle, (1 - step) * 99, 1); // starting at 98% prevents a flicker\n          setStyles(leavingEle, step * -100, 1);\n\n        } else if (direction == 'back') {\n          setStyles(enteringEle, (1 - step) * -100, 1);\n          setStyles(leavingEle, step * 100, 1);\n\n        } else {\n          // swap, enter, exit\n          setStyles(enteringEle, 0, 1);\n          setStyles(leavingEle, 0, 0);\n        }\n      },\n      shouldAnimate: shouldAnimate\n    };\n\n    return d;\n  };\n\n  provider.transitions.navBar.android = function(enteringHeaderBar, leavingHeaderBar, direction, shouldAnimate) {\n\n    function setStyles(ctrl, opacity) {\n      if (!ctrl) return;\n      var css = {};\n      css.opacity = opacity === 1 ? '' : opacity;\n\n      ctrl.setCss('buttons-left', css);\n      ctrl.setCss('buttons-right', css);\n      ctrl.setCss('back-button', css);\n      ctrl.setCss('back-text', css);\n      ctrl.setCss('title', css);\n    }\n\n    return {\n      run: function(step) {\n        setStyles(enteringHeaderBar.controller(), step);\n        setStyles(leavingHeaderBar && leavingHeaderBar.controller(), 1 - step);\n      },\n      shouldAnimate: shouldAnimate && (direction == 'forward' || direction == 'back')\n    };\n  };\n\n\n  // No Transition\n  // -----------------------\n\n  provider.transitions.views.none = function(enteringEle, leavingEle) {\n    return {\n      run: function(step) {\n        provider.transitions.views.android(enteringEle, leavingEle, false, false).run(step);\n      },\n      shouldAnimate: false\n    };\n  };\n\n  provider.transitions.navBar.none = function(enteringHeaderBar, leavingHeaderBar) {\n    return {\n      run: function(step) {\n        provider.transitions.navBar.ios(enteringHeaderBar, leavingHeaderBar, false, false).run(step);\n        provider.transitions.navBar.android(enteringHeaderBar, leavingHeaderBar, false, false).run(step);\n      },\n      shouldAnimate: false\n    };\n  };\n\n\n  // private: used to set platform configs\n  function setPlatformConfig(platformName, platformConfigs) {\n    configProperties.platform[platformName] = platformConfigs;\n    provider.platform[platformName] = {};\n\n    addConfig(configProperties, configProperties.platform[platformName]);\n\n    createConfig(configProperties.platform[platformName], provider.platform[platformName], '');\n  }\n\n\n  // private: used to recursively add new platform configs\n  function addConfig(configObj, platformObj) {\n    for (var n in configObj) {\n      if (n != PLATFORM && configObj.hasOwnProperty(n)) {\n        if (angular.isObject(configObj[n])) {\n          if (!isDefined(platformObj[n])) {\n            platformObj[n] = {};\n          }\n          addConfig(configObj[n], platformObj[n]);\n\n        } else if (!isDefined(platformObj[n])) {\n          platformObj[n] = null;\n        }\n      }\n    }\n  }\n\n\n  // private: create methods for each config to get/set\n  function createConfig(configObj, providerObj, platformPath) {\n    forEach(configObj, function(value, namespace) {\n\n      if (angular.isObject(configObj[namespace])) {\n        // recursively drill down the config object so we can create a method for each one\n        providerObj[namespace] = {};\n        createConfig(configObj[namespace], providerObj[namespace], platformPath + '.' + namespace);\n\n      } else {\n        // create a method for the provider/config methods that will be exposed\n        providerObj[namespace] = function(newValue) {\n          if (arguments.length) {\n            configObj[namespace] = newValue;\n            return providerObj;\n          }\n          if (configObj[namespace] == PLATFORM) {\n            // if the config is set to 'platform', then get this config's platform value\n            var platformConfig = stringObj(configProperties.platform, ionic.Platform.platform() + platformPath + '.' + namespace);\n            if (platformConfig || platformConfig === false) {\n              return platformConfig;\n            }\n            // didnt find a specific platform config, now try the default\n            return stringObj(configProperties.platform, 'default' + platformPath + '.' + namespace);\n          }\n          return configObj[namespace];\n        };\n      }\n\n    });\n  }\n\n  function stringObj(obj, str) {\n    str = str.split(\".\");\n    for (var i = 0; i < str.length; i++) {\n      if (obj && isDefined(obj[str[i]])) {\n        obj = obj[str[i]];\n      } else {\n        return null;\n      }\n    }\n    return obj;\n  }\n\n  provider.setPlatformConfig = setPlatformConfig;\n\n\n  // private: Service definition for internal Ionic use\n  /**\n   * @ngdoc service\n   * @name $ionicConfig\n   * @module ionic\n   * @private\n   */\n  provider.$get = function() {\n    return provider;\n  };\n})\n// Fix for URLs in Cordova apps on Windows Phone\n// http://blogs.msdn.com/b/msdn_answers/archive/2015/02/10/\n// running-cordova-apps-on-windows-and-windows-phone-8-1-using-ionic-angularjs-and-other-frameworks.aspx\n.config(['$compileProvider', function($compileProvider) {\n  $compileProvider.aHrefSanitizationWhitelist(/^\\s*(https?|sms|tel|geo|ftp|mailto|file|ghttps?|ms-appx-web|ms-appx|x-wmapp0):/);\n  $compileProvider.imgSrcSanitizationWhitelist(/^\\s*(https?|ftp|file|content|blob|ms-appx|ms-appx-web|x-wmapp0):|data:image\\//);\n}]);\n\n\nvar LOADING_TPL =\n  '<div class=\"loading-container\">' +\n    '<div class=\"loading\">' +\n    '</div>' +\n  '</div>';\n\n/**\n * @ngdoc service\n * @name $ionicLoading\n * @module ionic\n * @description\n * An overlay that can be used to indicate activity while blocking user\n * interaction.\n *\n * @usage\n * ```js\n * angular.module('LoadingApp', ['ionic'])\n * .controller('LoadingCtrl', function($scope, $ionicLoading) {\n *   $scope.show = function() {\n *     $ionicLoading.show({\n *       template: 'Loading...',\n *       duration: 3000\n *     }).then(function(){\n *        console.log(\"The loading indicator is now displayed\");\n *     });\n *   };\n *   $scope.hide = function(){\n *     $ionicLoading.hide().then(function(){\n *        console.log(\"The loading indicator is now hidden\");\n *     });\n *   };\n * });\n * ```\n */\n/**\n * @ngdoc object\n * @name $ionicLoadingConfig\n * @module ionic\n * @description\n * Set the default options to be passed to the {@link ionic.service:$ionicLoading} service.\n *\n * @usage\n * ```js\n * var app = angular.module('myApp', ['ionic'])\n * app.constant('$ionicLoadingConfig', {\n *   template: 'Default Loading Template...'\n * });\n * app.controller('AppCtrl', function($scope, $ionicLoading) {\n *   $scope.showLoading = function() {\n *     //options default to values in $ionicLoadingConfig\n *     $ionicLoading.show().then(function(){\n *        console.log(\"The loading indicator is now displayed\");\n *     });\n *   };\n * });\n * ```\n */\nIonicModule\n.constant('$ionicLoadingConfig', {\n  template: '<ion-spinner></ion-spinner>'\n})\n.factory('$ionicLoading', [\n  '$ionicLoadingConfig',\n  '$ionicBody',\n  '$ionicTemplateLoader',\n  '$ionicBackdrop',\n  '$timeout',\n  '$q',\n  '$log',\n  '$compile',\n  '$ionicPlatform',\n  '$rootScope',\n  'IONIC_BACK_PRIORITY',\nfunction($ionicLoadingConfig, $ionicBody, $ionicTemplateLoader, $ionicBackdrop, $timeout, $q, $log, $compile, $ionicPlatform, $rootScope, IONIC_BACK_PRIORITY) {\n\n  var loaderInstance;\n  //default values\n  var deregisterBackAction = noop;\n  var deregisterStateListener1 = noop;\n  var deregisterStateListener2 = noop;\n  var loadingShowDelay = $q.when();\n\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicLoading#show\n     * @description Shows a loading indicator. If the indicator is already shown,\n     * it will set the options given and keep the indicator shown.\n     * @returns {promise} A promise which is resolved when the loading indicator is presented.\n     * @param {object} opts The options for the loading indicator. Available properties:\n     *  - `{string=}` `template` The html content of the indicator.\n     *  - `{string=}` `templateUrl` The url of an html template to load as the content of the indicator.\n     *  - `{object=}` `scope` The scope to be a child of. Default: creates a child of $rootScope.\n     *  - `{boolean=}` `noBackdrop` Whether to hide the backdrop. By default it will be shown.\n     *  - `{boolean=}` `hideOnStateChange` Whether to hide the loading spinner when navigating\n     *    to a new state. Default false.\n     *  - `{number=}` `delay` How many milliseconds to delay showing the indicator. By default there is no delay.\n     *  - `{number=}` `duration` How many milliseconds to wait until automatically\n     *  hiding the indicator. By default, the indicator will be shown until `.hide()` is called.\n     */\n    show: showLoader,\n    /**\n     * @ngdoc method\n     * @name $ionicLoading#hide\n     * @description Hides the loading indicator, if shown.\n     * @returns {promise} A promise which is resolved when the loading indicator is hidden.\n     */\n    hide: hideLoader,\n    /**\n     * @private for testing\n     */\n    _getLoader: getLoader\n  };\n\n  function getLoader() {\n    if (!loaderInstance) {\n      loaderInstance = $ionicTemplateLoader.compile({\n        template: LOADING_TPL,\n        appendTo: $ionicBody.get()\n      })\n      .then(function(self) {\n        self.show = function(options) {\n          var templatePromise = options.templateUrl ?\n            $ionicTemplateLoader.load(options.templateUrl) :\n            //options.content: deprecated\n            $q.when(options.template || options.content || '');\n\n          self.scope = options.scope || self.scope;\n\n          if (!self.isShown) {\n            //options.showBackdrop: deprecated\n            self.hasBackdrop = !options.noBackdrop && options.showBackdrop !== false;\n            if (self.hasBackdrop) {\n              $ionicBackdrop.retain();\n              $ionicBackdrop.getElement().addClass('backdrop-loading');\n            }\n          }\n\n          if (options.duration) {\n            $timeout.cancel(self.durationTimeout);\n            self.durationTimeout = $timeout(\n              angular.bind(self, self.hide),\n              +options.duration\n            );\n          }\n\n          deregisterBackAction();\n          //Disable hardware back button while loading\n          deregisterBackAction = $ionicPlatform.registerBackButtonAction(\n            noop,\n            IONIC_BACK_PRIORITY.loading\n          );\n\n          templatePromise.then(function(html) {\n            if (html) {\n              var loading = self.element.children();\n              loading.html(html);\n              $compile(loading.contents())(self.scope);\n            }\n\n            //Don't show until template changes\n            if (self.isShown) {\n              self.element.addClass('visible');\n              ionic.requestAnimationFrame(function() {\n                if (self.isShown) {\n                  self.element.addClass('active');\n                  $ionicBody.addClass('loading-active');\n                }\n              });\n            }\n          });\n\n          self.isShown = true;\n        };\n        self.hide = function() {\n\n          deregisterBackAction();\n          if (self.isShown) {\n            if (self.hasBackdrop) {\n              $ionicBackdrop.release();\n              $ionicBackdrop.getElement().removeClass('backdrop-loading');\n            }\n            self.element.removeClass('active');\n            $ionicBody.removeClass('loading-active');\n            self.element.removeClass('visible');\n            ionic.requestAnimationFrame(function() {\n              !self.isShown && self.element.removeClass('visible');\n            });\n          }\n          $timeout.cancel(self.durationTimeout);\n          self.isShown = false;\n          var loading = self.element.children();\n          loading.html(\"\");\n        };\n\n        return self;\n      });\n    }\n    return loaderInstance;\n  }\n\n  function showLoader(options) {\n    options = extend({}, $ionicLoadingConfig || {}, options || {});\n    // use a default delay of 100 to avoid some issues reported on github\n    // https://github.com/ionic-team/ionic/issues/3717\n    var delay = options.delay || options.showDelay || 0;\n\n    deregisterStateListener1();\n    deregisterStateListener2();\n    if (options.hideOnStateChange) {\n      deregisterStateListener1 = $rootScope.$on('$stateChangeSuccess', hideLoader);\n      deregisterStateListener2 = $rootScope.$on('$stateChangeError', hideLoader);\n    }\n\n    //If loading.show() was called previously, cancel it and show with our new options\n    $timeout.cancel(loadingShowDelay);\n    loadingShowDelay = $timeout(noop, delay);\n    return loadingShowDelay.then(getLoader).then(function(loader) {\n      return loader.show(options);\n    });\n  }\n\n  function hideLoader() {\n    deregisterStateListener1();\n    deregisterStateListener2();\n    $timeout.cancel(loadingShowDelay);\n    return getLoader().then(function(loader) {\n      return loader.hide();\n    });\n  }\n}]);\n\n/**\n * @ngdoc service\n * @name $ionicModal\n * @module ionic\n * @codepen gblny\n * @description\n *\n * Related: {@link ionic.controller:ionicModal ionicModal controller}.\n *\n * The Modal is a content pane that can go over the user's main view\n * temporarily.  Usually used for making a choice or editing an item.\n *\n * Put the content of the modal inside of an `<ion-modal-view>` element.\n *\n * **Notes:**\n * - A modal will broadcast 'modal.shown', 'modal.hidden', and 'modal.removed' events from its originating\n * scope, passing in itself as an event argument. Both the modal.removed and modal.hidden events are\n * called when the modal is removed.\n *\n * - This example assumes your modal is in your main index file or another template file. If it is in its own\n * template file, remove the script tags and call it by file name.\n *\n * @usage\n * ```html\n * <script id=\"my-modal.html\" type=\"text/ng-template\">\n *   <ion-modal-view>\n *     <ion-header-bar>\n *       <h1 class=\"title\">My Modal title</h1>\n *     </ion-header-bar>\n *     <ion-content>\n *       Hello!\n *     </ion-content>\n *   </ion-modal-view>\n * </script>\n * ```\n * ```js\n * angular.module('testApp', ['ionic'])\n * .controller('MyController', function($scope, $ionicModal) {\n *   $ionicModal.fromTemplateUrl('my-modal.html', {\n *     scope: $scope,\n *     animation: 'slide-in-up'\n *   }).then(function(modal) {\n *     $scope.modal = modal;\n *   });\n *   $scope.openModal = function() {\n *     $scope.modal.show();\n *   };\n *   $scope.closeModal = function() {\n *     $scope.modal.hide();\n *   };\n *   // Cleanup the modal when we're done with it!\n *   $scope.$on('$destroy', function() {\n *     $scope.modal.remove();\n *   });\n *   // Execute action on hide modal\n *   $scope.$on('modal.hidden', function() {\n *     // Execute action\n *   });\n *   // Execute action on remove modal\n *   $scope.$on('modal.removed', function() {\n *     // Execute action\n *   });\n * });\n * ```\n */\nIonicModule\n.factory('$ionicModal', [\n  '$rootScope',\n  '$ionicBody',\n  '$compile',\n  '$timeout',\n  '$ionicPlatform',\n  '$ionicTemplateLoader',\n  '$$q',\n  '$log',\n  '$ionicClickBlock',\n  '$window',\n  'IONIC_BACK_PRIORITY',\nfunction($rootScope, $ionicBody, $compile, $timeout, $ionicPlatform, $ionicTemplateLoader, $$q, $log, $ionicClickBlock, $window, IONIC_BACK_PRIORITY) {\n\n  /**\n   * @ngdoc controller\n   * @name ionicModal\n   * @module ionic\n   * @description\n   * Instantiated by the {@link ionic.service:$ionicModal} service.\n   *\n   * Be sure to call [remove()](#remove) when you are done with each modal\n   * to clean it up and avoid memory leaks.\n   *\n   * Note: a modal will broadcast 'modal.shown', 'modal.hidden', and 'modal.removed' events from its originating\n   * scope, passing in itself as an event argument. Note: both modal.removed and modal.hidden are\n   * called when the modal is removed.\n   */\n  var ModalView = ionic.views.Modal.inherit({\n    /**\n     * @ngdoc method\n     * @name ionicModal#initialize\n     * @description Creates a new modal controller instance.\n     * @param {object} options An options object with the following properties:\n     *  - `{object=}` `scope` The scope to be a child of.\n     *    Default: creates a child of $rootScope.\n     *  - `{string=}` `animation` The animation to show & hide with.\n     *    Default: 'slide-in-up'\n     *  - `{boolean=}` `focusFirstInput` Whether to autofocus the first input of\n     *    the modal when shown. Will only show the keyboard on iOS, to force the keyboard to show\n     *    on Android, please use the [Ionic keyboard plugin](https://github.com/ionic-team/ionic-plugin-keyboard#keyboardshow).\n     *    Default: false.\n     *  - `{boolean=}` `backdropClickToClose` Whether to close the modal on clicking the backdrop.\n     *    Default: true.\n     *  - `{boolean=}` `hardwareBackButtonClose` Whether the modal can be closed using the hardware\n     *    back button on Android and similar devices.  Default: true.\n     */\n    initialize: function(opts) {\n      ionic.views.Modal.prototype.initialize.call(this, opts);\n      this.animation = opts.animation || 'slide-in-up';\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#show\n     * @description Show this modal instance.\n     * @returns {promise} A promise which is resolved when the modal is finished animating in.\n     */\n    show: function(target) {\n      var self = this;\n\n      if (self.scope.$$destroyed) {\n        $log.error('Cannot call ' + self.viewType + '.show() after remove(). Please create a new ' + self.viewType + ' instance.');\n        return $$q.when();\n      }\n\n      // on iOS, clicks will sometimes bleed through/ghost click on underlying\n      // elements\n      $ionicClickBlock.show(600);\n      stack.add(self);\n\n      var modalEl = jqLite(self.modalEl);\n\n      self.el.classList.remove('hide');\n      $timeout(function() {\n        if (!self._isShown) return;\n        $ionicBody.addClass(self.viewType + '-open');\n      }, 400, false);\n\n      if (!self.el.parentElement) {\n        modalEl.addClass(self.animation);\n        $ionicBody.append(self.el);\n      }\n\n      // if modal was closed while the keyboard was up, reset scroll view on\n      // next show since we can only resize it once it's visible\n      var scrollCtrl = modalEl.data('$$ionicScrollController');\n      scrollCtrl && scrollCtrl.resize();\n\n      if (target && self.positionView) {\n        self.positionView(target, modalEl);\n        // set up a listener for in case the window size changes\n\n        self._onWindowResize = function() {\n          if (self._isShown) self.positionView(target, modalEl);\n        };\n        ionic.on('resize', self._onWindowResize, window);\n      }\n\n      modalEl.addClass('ng-enter active')\n             .removeClass('ng-leave ng-leave-active');\n\n      self._isShown = true;\n      self._deregisterBackButton = $ionicPlatform.registerBackButtonAction(\n        self.hardwareBackButtonClose ? angular.bind(self, self.hide) : noop,\n        IONIC_BACK_PRIORITY.modal\n      );\n\n      ionic.views.Modal.prototype.show.call(self);\n\n      $timeout(function() {\n        if (!self._isShown) return;\n        modalEl.addClass('ng-enter-active');\n        ionic.trigger('resize');\n        self.scope.$parent && self.scope.$parent.$broadcast(self.viewType + '.shown', self);\n        self.el.classList.add('active');\n        self.scope.$broadcast('$ionicHeader.align');\n        self.scope.$broadcast('$ionicFooter.align');\n        self.scope.$broadcast('$ionic.modalPresented');\n      }, 20);\n\n      return $timeout(function() {\n        if (!self._isShown) return;\n        self.$el.on('touchmove', function(e) {\n          //Don't allow scrolling while open by dragging on backdrop\n          var isInScroll = ionic.DomUtil.getParentOrSelfWithClass(e.target, 'scroll');\n          if (!isInScroll) {\n            e.preventDefault();\n          }\n        });\n        //After animating in, allow hide on backdrop click\n        self.$el.on('click', function(e) {\n          if (self.backdropClickToClose && e.target === self.el && stack.isHighest(self)) {\n            self.hide();\n          }\n        });\n      }, 400);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#hide\n     * @description Hide this modal instance.\n     * @returns {promise} A promise which is resolved when the modal is finished animating out.\n     */\n    hide: function() {\n      var self = this;\n      var modalEl = jqLite(self.modalEl);\n\n      // on iOS, clicks will sometimes bleed through/ghost click on underlying\n      // elements\n      $ionicClickBlock.show(600);\n      stack.remove(self);\n\n      self.el.classList.remove('active');\n      modalEl.addClass('ng-leave');\n\n      $timeout(function() {\n        if (self._isShown) return;\n        modalEl.addClass('ng-leave-active')\n               .removeClass('ng-enter ng-enter-active active');\n\n        self.scope.$broadcast('$ionic.modalRemoved');\n      }, 20, false);\n\n      self.$el.off('click');\n      self._isShown = false;\n      self.scope.$parent && self.scope.$parent.$broadcast(self.viewType + '.hidden', self);\n      self._deregisterBackButton && self._deregisterBackButton();\n\n      ionic.views.Modal.prototype.hide.call(self);\n\n      // clean up event listeners\n      if (self.positionView) {\n        ionic.off('resize', self._onWindowResize, window);\n      }\n\n      return $timeout(function() {\n        if (!modalStack.length) {\n          $ionicBody.removeClass(self.viewType + '-open');\n        }\n        self.el.classList.add('hide');\n      }, self.hideDelay || 320);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#remove\n     * @description Remove this modal instance from the DOM and clean up.\n     * @returns {promise} A promise which is resolved when the modal is finished animating out.\n     */\n    remove: function() {\n      var self = this,\n          deferred, promise;\n      self.scope.$parent && self.scope.$parent.$broadcast(self.viewType + '.removed', self);\n\n      // Only hide modal, when it is actually shown!\n      // The hide function shows a click-block-div for a split second, because on iOS,\n      // clicks will sometimes bleed through/ghost click on underlying elements.\n      // However, this will make the app unresponsive for short amount of time.\n      // We don't want that, if the modal window is already hidden.\n      if (self._isShown) {\n        promise = self.hide();\n      } else {\n        deferred = $$q.defer();\n        deferred.resolve();\n        promise = deferred.promise;\n      }\n\n      return promise.then(function() {\n        self.scope.$destroy();\n        self.$el.remove();\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#isShown\n     * @returns boolean Whether this modal is currently shown.\n     */\n    isShown: function() {\n      return !!this._isShown;\n    }\n  });\n\n  var createModal = function(templateString, options) {\n    // Create a new scope for the modal\n    var scope = options.scope && options.scope.$new() || $rootScope.$new(true);\n\n    options.viewType = options.viewType || 'modal';\n\n    extend(scope, {\n      $hasHeader: false,\n      $hasSubheader: false,\n      $hasFooter: false,\n      $hasSubfooter: false,\n      $hasTabs: false,\n      $hasTabsTop: false\n    });\n\n    // Compile the template\n    var element = $compile('<ion-' + options.viewType + '>' + templateString + '</ion-' + options.viewType + '>')(scope);\n\n    options.$el = element;\n    options.el = element[0];\n    options.modalEl = options.el.querySelector('.' + options.viewType);\n    var modal = new ModalView(options);\n\n    modal.scope = scope;\n\n    // If this wasn't a defined scope, we can assign the viewType to the isolated scope\n    // we created\n    if (!options.scope) {\n      scope[ options.viewType ] = modal;\n    }\n\n    return modal;\n  };\n\n  var modalStack = [];\n  var stack = {\n    add: function(modal) {\n      modalStack.push(modal);\n    },\n    remove: function(modal) {\n      var index = modalStack.indexOf(modal);\n      if (index > -1 && index < modalStack.length) {\n        modalStack.splice(index, 1);\n      }\n    },\n    isHighest: function(modal) {\n      var index = modalStack.indexOf(modal);\n      return (index > -1 && index === modalStack.length - 1);\n    }\n  };\n\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicModal#fromTemplate\n     * @param {string} templateString The template string to use as the modal's\n     * content.\n     * @param {object} options Options to be passed {@link ionic.controller:ionicModal#initialize ionicModal#initialize} method.\n     * @returns {object} An instance of an {@link ionic.controller:ionicModal}\n     * controller.\n     */\n    fromTemplate: function(templateString, options) {\n      var modal = createModal(templateString, options || {});\n      return modal;\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicModal#fromTemplateUrl\n     * @param {string} templateUrl The url to load the template from.\n     * @param {object} options Options to be passed {@link ionic.controller:ionicModal#initialize ionicModal#initialize} method.\n     * options object.\n     * @returns {promise} A promise that will be resolved with an instance of\n     * an {@link ionic.controller:ionicModal} controller.\n     */\n    fromTemplateUrl: function(url, options, _) {\n      var cb;\n      //Deprecated: allow a callback as second parameter. Now we return a promise.\n      if (angular.isFunction(options)) {\n        cb = options;\n        options = _;\n      }\n      return $ionicTemplateLoader.load(url).then(function(templateString) {\n        var modal = createModal(templateString, options || {});\n        cb && cb(modal);\n        return modal;\n      });\n    },\n\n    stack: stack\n  };\n}]);\n\n\n/**\n * @ngdoc service\n * @name $ionicNavBarDelegate\n * @module ionic\n * @description\n * Delegate for controlling the {@link ionic.directive:ionNavBar} directive.\n *\n * @usage\n *\n * ```html\n * <body ng-controller=\"MyCtrl\">\n *   <ion-nav-bar>\n *     <button ng-click=\"setNavTitle('banana')\">\n *       Set title to banana!\n *     </button>\n *   </ion-nav-bar>\n * </body>\n * ```\n * ```js\n * function MyCtrl($scope, $ionicNavBarDelegate) {\n *   $scope.setNavTitle = function(title) {\n *     $ionicNavBarDelegate.title(title);\n *   }\n * }\n * ```\n */\nIonicModule\n.service('$ionicNavBarDelegate', ionic.DelegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicNavBarDelegate#align\n   * @description Aligns the title with the buttons in a given direction.\n   * @param {string=} direction The direction to the align the title text towards.\n   * Available: 'left', 'right', 'center'. Default: 'center'.\n   */\n  'align',\n  /**\n   * @ngdoc method\n   * @name $ionicNavBarDelegate#showBackButton\n   * @description\n   * Set/get whether the {@link ionic.directive:ionNavBackButton} is shown\n   * (if it exists and there is a previous view that can be navigated to).\n   * @param {boolean=} show Whether to show the back button.\n   * @returns {boolean} Whether the back button is shown.\n   */\n  'showBackButton',\n  /**\n   * @ngdoc method\n   * @name $ionicNavBarDelegate#showBar\n   * @description\n   * Set/get whether the {@link ionic.directive:ionNavBar} is shown.\n   * @param {boolean} show Whether to show the bar.\n   * @returns {boolean} Whether the bar is shown.\n   */\n  'showBar',\n  /**\n   * @ngdoc method\n   * @name $ionicNavBarDelegate#title\n   * @description\n   * Set the title for the {@link ionic.directive:ionNavBar}.\n   * @param {string} title The new title to show.\n   */\n  'title',\n\n  // DEPRECATED, as of v1.0.0-beta14 -------\n  'changeTitle',\n  'setTitle',\n  'getTitle',\n  'back',\n  'getPreviousTitle'\n  // END DEPRECATED -------\n]));\n\n\nIonicModule\n.service('$ionicNavViewDelegate', ionic.DelegateService([\n  'clearCache'\n]));\n\n\n\n/**\n * @ngdoc service\n * @name $ionicPlatform\n * @module ionic\n * @description\n * An angular abstraction of {@link ionic.utility:ionic.Platform}.\n *\n * Used to detect the current platform, as well as do things like override the\n * Android back button in PhoneGap/Cordova.\n */\nIonicModule\n.constant('IONIC_BACK_PRIORITY', {\n  view: 100,\n  sideMenu: 150,\n  modal: 200,\n  actionSheet: 300,\n  popup: 400,\n  loading: 500\n})\n.provider('$ionicPlatform', function() {\n  return {\n    $get: ['$q', '$ionicScrollDelegate', function($q, $ionicScrollDelegate) {\n      var self = {\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#onHardwareBackButton\n         * @description\n         * Some platforms have a hardware back button, so this is one way to\n         * bind to it.\n         * @param {function} callback the callback to trigger when this event occurs\n         */\n        onHardwareBackButton: function(cb) {\n          ionic.Platform.ready(function() {\n            document.addEventListener('backbutton', cb, false);\n          });\n        },\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#offHardwareBackButton\n         * @description\n         * Remove an event listener for the backbutton.\n         * @param {function} callback The listener function that was\n         * originally bound.\n         */\n        offHardwareBackButton: function(fn) {\n          ionic.Platform.ready(function() {\n            document.removeEventListener('backbutton', fn);\n          });\n        },\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#registerBackButtonAction\n         * @description\n         * Register a hardware back button action. Only one action will execute\n         * when the back button is clicked, so this method decides which of\n         * the registered back button actions has the highest priority.\n         *\n         * For example, if an actionsheet is showing, the back button should\n         * close the actionsheet, but it should not also go back a page view\n         * or close a modal which may be open.\n         *\n         * The priorities for the existing back button hooks are as follows:\n         *   Return to previous view = 100\n         *   Close side menu = 150\n         *   Dismiss modal = 200\n         *   Close action sheet = 300\n         *   Dismiss popup = 400\n         *   Dismiss loading overlay = 500\n         *\n         * Your back button action will override each of the above actions\n         * whose priority is less than the priority you provide. For example,\n         * an action assigned a priority of 101 will override the 'return to\n         * previous view' action, but not any of the other actions.\n         *\n         * @param {function} callback Called when the back button is pressed,\n         * if this listener is the highest priority.\n         * @param {number} priority Only the highest priority will execute.\n         * @param {*=} actionId The id to assign this action. Default: a\n         * random unique id.\n         * @returns {function} A function that, when called, will deregister\n         * this backButtonAction.\n         */\n        $backButtonActions: {},\n        registerBackButtonAction: function(fn, priority, actionId) {\n\n          if (!self._hasBackButtonHandler) {\n            // add a back button listener if one hasn't been setup yet\n            self.$backButtonActions = {};\n            self.onHardwareBackButton(self.hardwareBackButtonClick);\n            self._hasBackButtonHandler = true;\n          }\n\n          var action = {\n            id: (actionId ? actionId : ionic.Utils.nextUid()),\n            priority: (priority ? priority : 0),\n            fn: fn\n          };\n          self.$backButtonActions[action.id] = action;\n\n          // return a function to de-register this back button action\n          return function() {\n            delete self.$backButtonActions[action.id];\n          };\n        },\n\n        /**\n         * @private\n         */\n        hardwareBackButtonClick: function(e) {\n          // loop through all the registered back button actions\n          // and only run the last one of the highest priority\n          var priorityAction, actionId;\n          for (actionId in self.$backButtonActions) {\n            if (!priorityAction || self.$backButtonActions[actionId].priority >= priorityAction.priority) {\n              priorityAction = self.$backButtonActions[actionId];\n            }\n          }\n          if (priorityAction) {\n            priorityAction.fn(e);\n            return priorityAction;\n          }\n        },\n\n        is: function(type) {\n          return ionic.Platform.is(type);\n        },\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#on\n         * @description\n         * Add Cordova event listeners, such as `pause`, `resume`, `volumedownbutton`, `batterylow`,\n         * `offline`, etc. More information about available event types can be found in\n         * [Cordova's event documentation](https://cordova.apache.org/docs/en/latest/cordova/events/events.html).\n         * @param {string} type Cordova [event type](https://cordova.apache.org/docs/en/latest/cordova/events/events.html).\n         * @param {function} callback Called when the Cordova event is fired.\n         * @returns {function} Returns a deregistration function to remove the event listener.\n         */\n        on: function(type, cb) {\n          ionic.Platform.ready(function() {\n            document.addEventListener(type, cb, false);\n          });\n          return function() {\n            ionic.Platform.ready(function() {\n              document.removeEventListener(type, cb);\n            });\n          };\n        },\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#ready\n         * @description\n         * Trigger a callback once the device is ready,\n         * or immediately if the device is already ready.\n         * @param {function=} callback The function to call.\n         * @returns {promise} A promise which is resolved when the device is ready.\n         */\n        ready: function(cb) {\n          var q = $q.defer();\n\n          ionic.Platform.ready(function() {\n\n            window.addEventListener('statusTap', function() {\n              $ionicScrollDelegate.scrollTop(true);\n            });\n\n            q.resolve();\n            cb && cb();\n          });\n\n          return q.promise;\n        }\n      };\n\n      return self;\n    }]\n  };\n\n});\n\n/**\n * @ngdoc service\n * @name $ionicPopover\n * @module ionic\n * @description\n *\n * Related: {@link ionic.controller:ionicPopover ionicPopover controller}.\n *\n * The Popover is a view that floats above an app’s content. Popovers provide an\n * easy way to present or gather information from the user and are\n * commonly used in the following situations:\n *\n * - Show more info about the current view\n * - Select a commonly used tool or configuration\n * - Present a list of actions to perform inside one of your views\n *\n * Put the content of the popover inside of an `<ion-popover-view>` element.\n *\n * @usage\n * ```html\n * <p>\n *   <button ng-click=\"openPopover($event)\">Open Popover</button>\n * </p>\n *\n * <script id=\"my-popover.html\" type=\"text/ng-template\">\n *   <ion-popover-view>\n *     <ion-header-bar>\n *       <h1 class=\"title\">My Popover Title</h1>\n *     </ion-header-bar>\n *     <ion-content>\n *       Hello!\n *     </ion-content>\n *   </ion-popover-view>\n * </script>\n * ```\n * ```js\n * angular.module('testApp', ['ionic'])\n * .controller('MyController', function($scope, $ionicPopover) {\n *\n *   // .fromTemplate() method\n *   var template = '<ion-popover-view><ion-header-bar> <h1 class=\"title\">My Popover Title</h1> </ion-header-bar> <ion-content> Hello! </ion-content></ion-popover-view>';\n *\n *   $scope.popover = $ionicPopover.fromTemplate(template, {\n *     scope: $scope\n *   });\n *\n *   // .fromTemplateUrl() method\n *   $ionicPopover.fromTemplateUrl('my-popover.html', {\n *     scope: $scope\n *   }).then(function(popover) {\n *     $scope.popover = popover;\n *   });\n *\n *\n *   $scope.openPopover = function($event) {\n *     $scope.popover.show($event);\n *   };\n *   $scope.closePopover = function() {\n *     $scope.popover.hide();\n *   };\n *   //Cleanup the popover when we're done with it!\n *   $scope.$on('$destroy', function() {\n *     $scope.popover.remove();\n *   });\n *   // Execute action on hidden popover\n *   $scope.$on('popover.hidden', function() {\n *     // Execute action\n *   });\n *   // Execute action on remove popover\n *   $scope.$on('popover.removed', function() {\n *     // Execute action\n *   });\n * });\n * ```\n */\n\n\nIonicModule\n.factory('$ionicPopover', ['$ionicModal', '$ionicPosition', '$document', '$window',\nfunction($ionicModal, $ionicPosition, $document, $window) {\n\n  var POPOVER_BODY_PADDING = 6;\n\n  var POPOVER_OPTIONS = {\n    viewType: 'popover',\n    hideDelay: 1,\n    animation: 'none',\n    positionView: positionView\n  };\n\n  function positionView(target, popoverEle) {\n    var targetEle = jqLite(target.target || target);\n    var buttonOffset = $ionicPosition.offset(targetEle);\n    var popoverWidth = popoverEle.prop('offsetWidth');\n    var popoverHeight = popoverEle.prop('offsetHeight');\n    // Use innerWidth and innerHeight, because clientWidth and clientHeight\n    // doesn't work consistently for body on all platforms\n    var bodyWidth = $window.innerWidth;\n    var bodyHeight = $window.innerHeight;\n\n    var popoverCSS = {\n      left: buttonOffset.left + buttonOffset.width / 2 - popoverWidth / 2\n    };\n    var arrowEle = jqLite(popoverEle[0].querySelector('.popover-arrow'));\n\n    if (popoverCSS.left < POPOVER_BODY_PADDING) {\n      popoverCSS.left = POPOVER_BODY_PADDING;\n    } else if (popoverCSS.left + popoverWidth + POPOVER_BODY_PADDING > bodyWidth) {\n      popoverCSS.left = bodyWidth - popoverWidth - POPOVER_BODY_PADDING;\n    }\n\n    // If the popover when popped down stretches past bottom of screen,\n    // make it pop up if there's room above\n    if (buttonOffset.top + buttonOffset.height + popoverHeight > bodyHeight &&\n        buttonOffset.top - popoverHeight > 0) {\n      popoverCSS.top = buttonOffset.top - popoverHeight;\n      popoverEle.addClass('popover-bottom');\n    } else {\n      popoverCSS.top = buttonOffset.top + buttonOffset.height;\n      popoverEle.removeClass('popover-bottom');\n    }\n\n    arrowEle.css({\n      left: buttonOffset.left + buttonOffset.width / 2 -\n        arrowEle.prop('offsetWidth') / 2 - popoverCSS.left + 'px'\n    });\n\n    popoverEle.css({\n      top: popoverCSS.top + 'px',\n      left: popoverCSS.left + 'px',\n      marginLeft: '0',\n      opacity: '1'\n    });\n\n  }\n\n  /**\n   * @ngdoc controller\n   * @name ionicPopover\n   * @module ionic\n   * @description\n   * Instantiated by the {@link ionic.service:$ionicPopover} service.\n   *\n   * Be sure to call [remove()](#remove) when you are done with each popover\n   * to clean it up and avoid memory leaks.\n   *\n   * Note: a popover will broadcast 'popover.shown', 'popover.hidden', and 'popover.removed' events from its originating\n   * scope, passing in itself as an event argument. Both the popover.removed and popover.hidden events are\n   * called when the popover is removed.\n   */\n\n  /**\n   * @ngdoc method\n   * @name ionicPopover#initialize\n   * @description Creates a new popover controller instance.\n   * @param {object} options An options object with the following properties:\n   *  - `{object=}` `scope` The scope to be a child of.\n   *    Default: creates a child of $rootScope.\n   *  - `{boolean=}` `focusFirstInput` Whether to autofocus the first input of\n   *    the popover when shown.  Default: false.\n   *  - `{boolean=}` `backdropClickToClose` Whether to close the popover on clicking the backdrop.\n   *    Default: true.\n   *  - `{boolean=}` `hardwareBackButtonClose` Whether the popover can be closed using the hardware\n   *    back button on Android and similar devices.  Default: true.\n   */\n\n  /**\n   * @ngdoc method\n   * @name ionicPopover#show\n   * @description Show this popover instance.\n   * @param {$event} $event The $event or target element which the popover should align\n   * itself next to.\n   * @returns {promise} A promise which is resolved when the popover is finished animating in.\n   */\n\n  /**\n   * @ngdoc method\n   * @name ionicPopover#hide\n   * @description Hide this popover instance.\n   * @returns {promise} A promise which is resolved when the popover is finished animating out.\n   */\n\n  /**\n   * @ngdoc method\n   * @name ionicPopover#remove\n   * @description Remove this popover instance from the DOM and clean up.\n   * @returns {promise} A promise which is resolved when the popover is finished animating out.\n   */\n\n  /**\n   * @ngdoc method\n   * @name ionicPopover#isShown\n   * @returns boolean Whether this popover is currently shown.\n   */\n\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicPopover#fromTemplate\n     * @param {string} templateString The template string to use as the popovers's\n     * content.\n     * @param {object} options Options to be passed to the initialize method.\n     * @returns {object} An instance of an {@link ionic.controller:ionicPopover}\n     * controller (ionicPopover is built on top of $ionicPopover).\n     */\n    fromTemplate: function(templateString, options) {\n      return $ionicModal.fromTemplate(templateString, ionic.Utils.extend({}, POPOVER_OPTIONS, options));\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicPopover#fromTemplateUrl\n     * @param {string} templateUrl The url to load the template from.\n     * @param {object} options Options to be passed to the initialize method.\n     * @returns {promise} A promise that will be resolved with an instance of\n     * an {@link ionic.controller:ionicPopover} controller (ionicPopover is built on top of $ionicPopover).\n     */\n    fromTemplateUrl: function(url, options) {\n      return $ionicModal.fromTemplateUrl(url, ionic.Utils.extend({}, POPOVER_OPTIONS, options));\n    }\n  };\n\n}]);\n\n\nvar POPUP_TPL =\n  '<div class=\"popup-container\" ng-class=\"cssClass\">' +\n    '<div class=\"popup\">' +\n      '<div class=\"popup-head\">' +\n        '<h3 class=\"popup-title\" ng-bind-html=\"title\"></h3>' +\n        '<h5 class=\"popup-sub-title\" ng-bind-html=\"subTitle\" ng-if=\"subTitle\"></h5>' +\n      '</div>' +\n      '<div class=\"popup-body\">' +\n      '</div>' +\n      '<div class=\"popup-buttons\" ng-show=\"buttons.length\">' +\n        '<button ng-repeat=\"button in buttons\" ng-click=\"$buttonTapped(button, $event)\" class=\"button\" ng-class=\"button.type || \\'button-default\\'\" ng-bind-html=\"button.text\"></button>' +\n      '</div>' +\n    '</div>' +\n  '</div>';\n\n/**\n * @ngdoc service\n * @name $ionicPopup\n * @module ionic\n * @restrict E\n * @codepen zkmhJ\n * @description\n *\n * The Ionic Popup service allows programmatically creating and showing popup\n * windows that require the user to respond in order to continue.\n *\n * The popup system has support for more flexible versions of the built in `alert()`, `prompt()`,\n * and `confirm()` functions that users are used to, in addition to allowing popups with completely\n * custom content and look.\n *\n * An input can be given an `autofocus` attribute so it automatically receives focus when\n * the popup first shows. However, depending on certain use-cases this can cause issues with\n * the tap/click system, which is why Ionic prefers using the `autofocus` attribute as\n * an opt-in feature and not the default.\n *\n * @usage\n * A few basic examples, see below for details about all of the options available.\n *\n * ```js\n *angular.module('mySuperApp', ['ionic'])\n *.controller('PopupCtrl',function($scope, $ionicPopup, $timeout) {\n *\n * // Triggered on a button click, or some other target\n * $scope.showPopup = function() {\n *   $scope.data = {};\n *\n *   // An elaborate, custom popup\n *   var myPopup = $ionicPopup.show({\n *     template: '<input type=\"password\" ng-model=\"data.wifi\">',\n *     title: 'Enter Wi-Fi Password',\n *     subTitle: 'Please use normal things',\n *     scope: $scope,\n *     buttons: [\n *       { text: 'Cancel' },\n *       {\n *         text: '<b>Save</b>',\n *         type: 'button-positive',\n *         onTap: function(e) {\n *           if (!$scope.data.wifi) {\n *             //don't allow the user to close unless he enters wifi password\n *             e.preventDefault();\n *           } else {\n *             return $scope.data.wifi;\n *           }\n *         }\n *       }\n *     ]\n *   });\n *\n *   myPopup.then(function(res) {\n *     console.log('Tapped!', res);\n *   });\n *\n *   $timeout(function() {\n *      myPopup.close(); //close the popup after 3 seconds for some reason\n *   }, 3000);\n *  };\n *\n *  // A confirm dialog\n *  $scope.showConfirm = function() {\n *    var confirmPopup = $ionicPopup.confirm({\n *      title: 'Consume Ice Cream',\n *      template: 'Are you sure you want to eat this ice cream?'\n *    });\n *\n *    confirmPopup.then(function(res) {\n *      if(res) {\n *        console.log('You are sure');\n *      } else {\n *        console.log('You are not sure');\n *      }\n *    });\n *  };\n *\n *  // An alert dialog\n *  $scope.showAlert = function() {\n *    var alertPopup = $ionicPopup.alert({\n *      title: 'Don\\'t eat that!',\n *      template: 'It might taste good'\n *    });\n *\n *    alertPopup.then(function(res) {\n *      console.log('Thank you for not eating my delicious ice cream cone');\n *    });\n *  };\n *});\n *```\n */\n\nIonicModule\n.factory('$ionicPopup', [\n  '$ionicTemplateLoader',\n  '$ionicBackdrop',\n  '$q',\n  '$timeout',\n  '$rootScope',\n  '$ionicBody',\n  '$compile',\n  '$ionicPlatform',\n  '$ionicModal',\n  'IONIC_BACK_PRIORITY',\nfunction($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicBody, $compile, $ionicPlatform, $ionicModal, IONIC_BACK_PRIORITY) {\n  //TODO allow this to be configured\n  var config = {\n    stackPushDelay: 75\n  };\n  var popupStack = [];\n\n  var $ionicPopup = {\n    /**\n     * @ngdoc method\n     * @description\n     * Show a complex popup. This is the master show function for all popups.\n     *\n     * A complex popup has a `buttons` array, with each button having a `text` and `type`\n     * field, in addition to an `onTap` function.  The `onTap` function, called when\n     * the corresponding button on the popup is tapped, will by default close the popup\n     * and resolve the popup promise with its return value.  If you wish to prevent the\n     * default and keep the popup open on button tap, call `event.preventDefault()` on the\n     * passed in tap event.  Details below.\n     *\n     * @name $ionicPopup#show\n     * @param {object} options The options for the new popup, of the form:\n     *\n     * ```\n     * {\n     *   title: '', // String. The title of the popup.\n     *   cssClass: '', // String, The custom CSS class name\n     *   subTitle: '', // String (optional). The sub-title of the popup.\n     *   template: '', // String (optional). The html template to place in the popup body.\n     *   templateUrl: '', // String (optional). The URL of an html template to place in the popup   body.\n     *   scope: null, // Scope (optional). A scope to link to the popup content.\n     *   buttons: [{ // Array[Object] (optional). Buttons to place in the popup footer.\n     *     text: 'Cancel',\n     *     type: 'button-default',\n     *     onTap: function(e) {\n     *       // e.preventDefault() will stop the popup from closing when tapped.\n     *       e.preventDefault();\n     *     }\n     *   }, {\n     *     text: 'OK',\n     *     type: 'button-positive',\n     *     onTap: function(e) {\n     *       // Returning a value will cause the promise to resolve with the given value.\n     *       return scope.data.response;\n     *     }\n     *   }]\n     * }\n     * ```\n     *\n     * @returns {object} A promise which is resolved when the popup is closed. Has an additional\n     * `close` function, which can be used to programmatically close the popup.\n     */\n    show: showPopup,\n\n    /**\n     * @ngdoc method\n     * @name $ionicPopup#alert\n     * @description Show a simple alert popup with a message and one button that the user can\n     * tap to close the popup.\n     *\n     * @param {object} options The options for showing the alert, of the form:\n     *\n     * ```\n     * {\n     *   title: '', // String. The title of the popup.\n     *   cssClass: '', // String, The custom CSS class name\n     *   subTitle: '', // String (optional). The sub-title of the popup.\n     *   template: '', // String (optional). The html template to place in the popup body.\n     *   templateUrl: '', // String (optional). The URL of an html template to place in the popup   body.\n     *   okText: '', // String (default: 'OK'). The text of the OK button.\n     *   okType: '', // String (default: 'button-positive'). The type of the OK button.\n     * }\n     * ```\n     *\n     * @returns {object} A promise which is resolved when the popup is closed. Has one additional\n     * function `close`, which can be called with any value to programmatically close the popup\n     * with the given value.\n     */\n    alert: showAlert,\n\n    /**\n     * @ngdoc method\n     * @name $ionicPopup#confirm\n     * @description\n     * Show a simple confirm popup with a Cancel and OK button.\n     *\n     * Resolves the promise with true if the user presses the OK button, and false if the\n     * user presses the Cancel button.\n     *\n     * @param {object} options The options for showing the confirm popup, of the form:\n     *\n     * ```\n     * {\n     *   title: '', // String. The title of the popup.\n     *   cssClass: '', // String, The custom CSS class name\n     *   subTitle: '', // String (optional). The sub-title of the popup.\n     *   template: '', // String (optional). The html template to place in the popup body.\n     *   templateUrl: '', // String (optional). The URL of an html template to place in the popup   body.\n     *   cancelText: '', // String (default: 'Cancel'). The text of the Cancel button.\n     *   cancelType: '', // String (default: 'button-default'). The type of the Cancel button.\n     *   okText: '', // String (default: 'OK'). The text of the OK button.\n     *   okType: '', // String (default: 'button-positive'). The type of the OK button.\n     * }\n     * ```\n     *\n     * @returns {object} A promise which is resolved when the popup is closed. Has one additional\n     * function `close`, which can be called with any value to programmatically close the popup\n     * with the given value.\n     */\n    confirm: showConfirm,\n\n    /**\n     * @ngdoc method\n     * @name $ionicPopup#prompt\n     * @description Show a simple prompt popup, which has an input, OK button, and Cancel button.\n     * Resolves the promise with the value of the input if the user presses OK, and with undefined\n     * if the user presses Cancel.\n     *\n     * ```javascript\n     *  $ionicPopup.prompt({\n     *    title: 'Password Check',\n     *    template: 'Enter your secret password',\n     *    inputType: 'password',\n     *    inputPlaceholder: 'Your password'\n     *  }).then(function(res) {\n     *    console.log('Your password is', res);\n     *  });\n     * ```\n     * @param {object} options The options for showing the prompt popup, of the form:\n     *\n     * ```\n     * {\n     *   title: '', // String. The title of the popup.\n     *   cssClass: '', // String, The custom CSS class name\n     *   subTitle: '', // String (optional). The sub-title of the popup.\n     *   template: '', // String (optional). The html template to place in the popup body.\n     *   templateUrl: '', // String (optional). The URL of an html template to place in the popup body.\n     *   inputType: // String (default: 'text'). The type of input to use\n     *   defaultText: // String (default: ''). The initial value placed into the input.\n     *   maxLength: // Integer (default: null). Specify a maxlength attribute for the input.\n     *   inputPlaceholder: // String (default: ''). A placeholder to use for the input.\n     *   cancelText: // String (default: 'Cancel'. The text of the Cancel button.\n     *   cancelType: // String (default: 'button-default'). The type of the Cancel button.\n     *   okText: // String (default: 'OK'). The text of the OK button.\n     *   okType: // String (default: 'button-positive'). The type of the OK button.\n     * }\n     * ```\n     *\n     * @returns {object} A promise which is resolved when the popup is closed. Has one additional\n     * function `close`, which can be called with any value to programmatically close the popup\n     * with the given value.\n     */\n    prompt: showPrompt,\n    /**\n     * @private for testing\n     */\n    _createPopup: createPopup,\n    _popupStack: popupStack\n  };\n\n  return $ionicPopup;\n\n  function createPopup(options) {\n    options = extend({\n      scope: null,\n      title: '',\n      buttons: []\n    }, options || {});\n\n    var self = {};\n    self.scope = (options.scope || $rootScope).$new();\n    self.element = jqLite(POPUP_TPL);\n    self.responseDeferred = $q.defer();\n\n    $ionicBody.get().appendChild(self.element[0]);\n    $compile(self.element)(self.scope);\n\n    extend(self.scope, {\n      title: options.title,\n      buttons: options.buttons,\n      subTitle: options.subTitle,\n      cssClass: options.cssClass,\n      $buttonTapped: function(button, event) {\n        var result = (button.onTap || noop).apply(self, [event]);\n        event = event.originalEvent || event; //jquery events\n\n        if (!event.defaultPrevented) {\n          self.responseDeferred.resolve(result);\n        }\n      }\n    });\n\n    $q.when(\n      options.templateUrl ?\n      $ionicTemplateLoader.load(options.templateUrl) :\n        (options.template || options.content || '')\n    ).then(function(template) {\n      var popupBody = jqLite(self.element[0].querySelector('.popup-body'));\n      if (template) {\n        popupBody.html(template);\n        $compile(popupBody.contents())(self.scope);\n      } else {\n        popupBody.remove();\n      }\n    });\n\n    self.show = function() {\n      if (self.isShown || self.removed) return;\n\n      $ionicModal.stack.add(self);\n      self.isShown = true;\n      ionic.requestAnimationFrame(function() {\n        //if hidden while waiting for raf, don't show\n        if (!self.isShown) return;\n\n        self.element.removeClass('popup-hidden');\n        self.element.addClass('popup-showing active');\n        focusInput(self.element);\n      });\n    };\n\n    self.hide = function(callback) {\n      callback = callback || noop;\n      if (!self.isShown) return callback();\n\n      $ionicModal.stack.remove(self);\n      self.isShown = false;\n      self.element.removeClass('active');\n      self.element.addClass('popup-hidden');\n      $timeout(callback, 250, false);\n    };\n\n    self.remove = function() {\n      if (self.removed) return;\n\n      self.hide(function() {\n        self.element.remove();\n        self.scope.$destroy();\n      });\n\n      self.removed = true;\n    };\n\n    return self;\n  }\n\n  function onHardwareBackButton() {\n    var last = popupStack[popupStack.length - 1];\n    last && last.responseDeferred.resolve();\n  }\n\n  function showPopup(options) {\n    var popup = $ionicPopup._createPopup(options);\n    var showDelay = 0;\n\n    if (popupStack.length > 0) {\n      showDelay = config.stackPushDelay;\n      $timeout(popupStack[popupStack.length - 1].hide, showDelay, false);\n    } else {\n      //Add popup-open & backdrop if this is first popup\n      $ionicBody.addClass('popup-open');\n      $ionicBackdrop.retain();\n      //only show the backdrop on the first popup\n      $ionicPopup._backButtonActionDone = $ionicPlatform.registerBackButtonAction(\n        onHardwareBackButton,\n        IONIC_BACK_PRIORITY.popup\n      );\n    }\n\n    // Expose a 'close' method on the returned promise\n    popup.responseDeferred.promise.close = function popupClose(result) {\n      if (!popup.removed) popup.responseDeferred.resolve(result);\n    };\n    //DEPRECATED: notify the promise with an object with a close method\n    popup.responseDeferred.notify({ close: popup.responseDeferred.close });\n\n    doShow();\n\n    return popup.responseDeferred.promise;\n\n    function doShow() {\n      popupStack.push(popup);\n      $timeout(popup.show, showDelay, false);\n\n      popup.responseDeferred.promise.then(function(result) {\n        var index = popupStack.indexOf(popup);\n        if (index !== -1) {\n          popupStack.splice(index, 1);\n        }\n\n        popup.remove();\n\n        if (popupStack.length > 0) {\n          popupStack[popupStack.length - 1].show();\n        } else {\n          $ionicBackdrop.release();\n          //Remove popup-open & backdrop if this is last popup\n          $timeout(function() {\n            // wait to remove this due to a 300ms delay native\n            // click which would trigging whatever was underneath this\n            if (!popupStack.length) {\n              $ionicBody.removeClass('popup-open');\n            }\n          }, 400, false);\n          ($ionicPopup._backButtonActionDone || noop)();\n        }\n\n\n        return result;\n      });\n\n    }\n\n  }\n\n  function focusInput(element) {\n    var focusOn = element[0].querySelector('[autofocus]');\n    if (focusOn) {\n      focusOn.focus();\n    }\n  }\n\n  function showAlert(opts) {\n    return showPopup(extend({\n      buttons: [{\n        text: opts.okText || 'OK',\n        type: opts.okType || 'button-positive',\n        onTap: function() {\n          return true;\n        }\n      }]\n    }, opts || {}));\n  }\n\n  function showConfirm(opts) {\n    return showPopup(extend({\n      buttons: [{\n        text: opts.cancelText || 'Cancel',\n        type: opts.cancelType || 'button-default',\n        onTap: function() { return false; }\n      }, {\n        text: opts.okText || 'OK',\n        type: opts.okType || 'button-positive',\n        onTap: function() { return true; }\n      }]\n    }, opts || {}));\n  }\n\n  function showPrompt(opts) {\n    var scope = $rootScope.$new(true);\n    scope.data = {};\n    scope.data.fieldtype = opts.inputType ? opts.inputType : 'text';\n    scope.data.response = opts.defaultText ? opts.defaultText : '';\n    scope.data.placeholder = opts.inputPlaceholder ? opts.inputPlaceholder : '';\n    scope.data.maxlength = opts.maxLength ? parseInt(opts.maxLength) : '';\n    var text = '';\n    if (opts.template && /<[a-z][\\s\\S]*>/i.test(opts.template) === false) {\n      text = '<span>' + opts.template + '</span>';\n      delete opts.template;\n    }\n    return showPopup(extend({\n      template: text + '<input ng-model=\"data.response\" '\n        + 'type=\"{{ data.fieldtype }}\"'\n        + 'maxlength=\"{{ data.maxlength }}\"'\n        + 'placeholder=\"{{ data.placeholder }}\"'\n        + '>',\n      scope: scope,\n      buttons: [{\n        text: opts.cancelText || 'Cancel',\n        type: opts.cancelType || 'button-default',\n        onTap: function() {}\n      }, {\n        text: opts.okText || 'OK',\n        type: opts.okType || 'button-positive',\n        onTap: function() {\n          return scope.data.response || '';\n        }\n      }]\n    }, opts || {}));\n  }\n}]);\n\n/**\n * @ngdoc service\n * @name $ionicPosition\n * @module ionic\n * @description\n * A set of utility methods that can be use to retrieve position of DOM elements.\n * It is meant to be used where we need to absolute-position DOM elements in\n * relation to other, existing elements (this is the case for tooltips, popovers, etc.).\n *\n * Adapted from [AngularUI Bootstrap](https://github.com/angular-ui/bootstrap/blob/master/src/position/position.js),\n * ([license](https://github.com/angular-ui/bootstrap/blob/master/LICENSE))\n */\nIonicModule\n.factory('$ionicPosition', ['$document', '$window', function($document, $window) {\n\n  function getStyle(el, cssprop) {\n    if (el.currentStyle) { //IE\n      return el.currentStyle[cssprop];\n    } else if ($window.getComputedStyle) {\n      return $window.getComputedStyle(el)[cssprop];\n    }\n    // finally try and get inline style\n    return el.style[cssprop];\n  }\n\n  /**\n   * Checks if a given element is statically positioned\n   * @param element - raw DOM element\n   */\n  function isStaticPositioned(element) {\n    return (getStyle(element, 'position') || 'static') === 'static';\n  }\n\n  /**\n   * returns the closest, non-statically positioned parentOffset of a given element\n   * @param element\n   */\n  var parentOffsetEl = function(element) {\n    var docDomEl = $document[0];\n    var offsetParent = element.offsetParent || docDomEl;\n    while (offsetParent && offsetParent !== docDomEl && isStaticPositioned(offsetParent)) {\n      offsetParent = offsetParent.offsetParent;\n    }\n    return offsetParent || docDomEl;\n  };\n\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicPosition#position\n     * @description Get the current coordinates of the element, relative to the offset parent.\n     * Read-only equivalent of [jQuery's position function](http://api.jquery.com/position/).\n     * @param {element} element The element to get the position of.\n     * @returns {object} Returns an object containing the properties top, left, width and height.\n     */\n    position: function(element) {\n      var elBCR = this.offset(element);\n      var offsetParentBCR = { top: 0, left: 0 };\n      var offsetParentEl = parentOffsetEl(element[0]);\n      if (offsetParentEl != $document[0]) {\n        offsetParentBCR = this.offset(jqLite(offsetParentEl));\n        offsetParentBCR.top += offsetParentEl.clientTop - offsetParentEl.scrollTop;\n        offsetParentBCR.left += offsetParentEl.clientLeft - offsetParentEl.scrollLeft;\n      }\n\n      var boundingClientRect = element[0].getBoundingClientRect();\n      return {\n        width: boundingClientRect.width || element.prop('offsetWidth'),\n        height: boundingClientRect.height || element.prop('offsetHeight'),\n        top: elBCR.top - offsetParentBCR.top,\n        left: elBCR.left - offsetParentBCR.left\n      };\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicPosition#offset\n     * @description Get the current coordinates of the element, relative to the document.\n     * Read-only equivalent of [jQuery's offset function](http://api.jquery.com/offset/).\n     * @param {element} element The element to get the offset of.\n     * @returns {object} Returns an object containing the properties top, left, width and height.\n     */\n    offset: function(element) {\n      var boundingClientRect = element[0].getBoundingClientRect();\n      return {\n        width: boundingClientRect.width || element.prop('offsetWidth'),\n        height: boundingClientRect.height || element.prop('offsetHeight'),\n        top: boundingClientRect.top + ($window.pageYOffset || $document[0].documentElement.scrollTop),\n        left: boundingClientRect.left + ($window.pageXOffset || $document[0].documentElement.scrollLeft)\n      };\n    }\n\n  };\n}]);\n\n\n/**\n * @ngdoc service\n * @name $ionicScrollDelegate\n * @module ionic\n * @description\n * Delegate for controlling scrollViews (created by\n * {@link ionic.directive:ionContent} and\n * {@link ionic.directive:ionScroll} directives).\n *\n * Methods called directly on the $ionicScrollDelegate service will control all scroll\n * views.  Use the {@link ionic.service:$ionicScrollDelegate#$getByHandle $getByHandle}\n * method to control specific scrollViews.\n *\n * @usage\n *\n * ```html\n * <body ng-controller=\"MainCtrl\">\n *   <ion-content>\n *     <button ng-click=\"scrollTop()\">Scroll to Top!</button>\n *   </ion-content>\n * </body>\n * ```\n * ```js\n * function MainCtrl($scope, $ionicScrollDelegate) {\n *   $scope.scrollTop = function() {\n *     $ionicScrollDelegate.scrollTop();\n *   };\n * }\n * ```\n *\n * Example of advanced usage, with two scroll areas using `delegate-handle`\n * for fine control.\n *\n * ```html\n * <body ng-controller=\"MainCtrl\">\n *   <ion-content delegate-handle=\"mainScroll\">\n *     <button ng-click=\"scrollMainToTop()\">\n *       Scroll content to top!\n *     </button>\n *     <ion-scroll delegate-handle=\"small\" style=\"height: 100px;\">\n *       <button ng-click=\"scrollSmallToTop()\">\n *         Scroll small area to top!\n *       </button>\n *     </ion-scroll>\n *   </ion-content>\n * </body>\n * ```\n * ```js\n * function MainCtrl($scope, $ionicScrollDelegate) {\n *   $scope.scrollMainToTop = function() {\n *     $ionicScrollDelegate.$getByHandle('mainScroll').scrollTop();\n *   };\n *   $scope.scrollSmallToTop = function() {\n *     $ionicScrollDelegate.$getByHandle('small').scrollTop();\n *   };\n * }\n * ```\n */\nIonicModule\n.service('$ionicScrollDelegate', ionic.DelegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#resize\n   * @description Tell the scrollView to recalculate the size of its container.\n   */\n  'resize',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scrollTop\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'scrollTop',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scrollBottom\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'scrollBottom',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scrollTo\n   * @param {number} left The x-value to scroll to.\n   * @param {number} top The y-value to scroll to.\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'scrollTo',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scrollBy\n   * @param {number} left The x-offset to scroll by.\n   * @param {number} top The y-offset to scroll by.\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'scrollBy',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#zoomTo\n   * @param {number} level Level to zoom to.\n   * @param {boolean=} animate Whether to animate the zoom.\n   * @param {number=} originLeft Zoom in at given left coordinate.\n   * @param {number=} originTop Zoom in at given top coordinate.\n   */\n  'zoomTo',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#zoomBy\n   * @param {number} factor The factor to zoom by.\n   * @param {boolean=} animate Whether to animate the zoom.\n   * @param {number=} originLeft Zoom in at given left coordinate.\n   * @param {number=} originTop Zoom in at given top coordinate.\n   */\n  'zoomBy',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#getScrollPosition\n   * @returns {object} The scroll position of this view, with the following properties:\n   *  - `{number}` `left` The distance the user has scrolled from the left (starts at 0).\n   *  - `{number}` `top` The distance the user has scrolled from the top (starts at 0).\n   *  - `{number}` `zoom` The current zoom level.\n   */\n  'getScrollPosition',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#anchorScroll\n   * @description Tell the scrollView to scroll to the element with an id\n   * matching window.location.hash.\n   *\n   * If no matching element is found, it will scroll to top.\n   *\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'anchorScroll',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#freezeScroll\n   * @description Does not allow this scroll view to scroll either x or y.\n   * @param {boolean=} shouldFreeze Should this scroll view be prevented from scrolling or not.\n   * @returns {boolean} If the scroll view is being prevented from scrolling or not.\n   */\n  'freezeScroll',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#freezeAllScrolls\n   * @description Does not allow any of the app's scroll views to scroll either x or y.\n   * @param {boolean=} shouldFreeze Should all app scrolls be prevented from scrolling or not.\n   */\n  'freezeAllScrolls',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#getScrollView\n   * @returns {object} The scrollView associated with this delegate.\n   */\n  'getScrollView'\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#$getByHandle\n   * @param {string} handle\n   * @returns `delegateInstance` A delegate instance that controls only the\n   * scrollViews with `delegate-handle` matching the given handle.\n   *\n   * Example: `$ionicScrollDelegate.$getByHandle('my-handle').scrollTop();`\n   */\n]));\n\n\n/**\n * @ngdoc service\n * @name $ionicSideMenuDelegate\n * @module ionic\n *\n * @description\n * Delegate for controlling the {@link ionic.directive:ionSideMenus} directive.\n *\n * Methods called directly on the $ionicSideMenuDelegate service will control all side\n * menus.  Use the {@link ionic.service:$ionicSideMenuDelegate#$getByHandle $getByHandle}\n * method to control specific ionSideMenus instances.\n *\n * @usage\n *\n * ```html\n * <body ng-controller=\"MainCtrl\">\n *   <ion-side-menus>\n *     <ion-side-menu-content>\n *       Content!\n *       <button ng-click=\"toggleLeftSideMenu()\">\n *         Toggle Left Side Menu\n *       </button>\n *     </ion-side-menu-content>\n *     <ion-side-menu side=\"left\">\n *       Left Menu!\n *     <ion-side-menu>\n *   </ion-side-menus>\n * </body>\n * ```\n * ```js\n * function MainCtrl($scope, $ionicSideMenuDelegate) {\n *   $scope.toggleLeftSideMenu = function() {\n *     $ionicSideMenuDelegate.toggleLeft();\n *   };\n * }\n * ```\n */\nIonicModule\n.service('$ionicSideMenuDelegate', ionic.DelegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#toggleLeft\n   * @description Toggle the left side menu (if it exists).\n   * @param {boolean=} isOpen Whether to open or close the menu.\n   * Default: Toggles the menu.\n   */\n  'toggleLeft',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#toggleRight\n   * @description Toggle the right side menu (if it exists).\n   * @param {boolean=} isOpen Whether to open or close the menu.\n   * Default: Toggles the menu.\n   */\n  'toggleRight',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#getOpenRatio\n   * @description Gets the ratio of open amount over menu width. For example, a\n   * menu of width 100 that is opened by 50 pixels is 50% opened, and would return\n   * a ratio of 0.5.\n   *\n   * @returns {float} 0 if nothing is open, between 0 and 1 if left menu is\n   * opened/opening, and between 0 and -1 if right menu is opened/opening.\n   */\n  'getOpenRatio',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#isOpen\n   * @returns {boolean} Whether either the left or right menu is currently opened.\n   */\n  'isOpen',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#isOpenLeft\n   * @returns {boolean} Whether the left menu is currently opened.\n   */\n  'isOpenLeft',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#isOpenRight\n   * @returns {boolean} Whether the right menu is currently opened.\n   */\n  'isOpenRight',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#canDragContent\n   * @param {boolean=} canDrag Set whether the content can or cannot be dragged to open\n   * side menus.\n   * @returns {boolean} Whether the content can be dragged to open side menus.\n   */\n  'canDragContent',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#edgeDragThreshold\n   * @param {boolean|number=} value Set whether the content drag can only start if it is below a certain threshold distance from the edge of the screen. Accepts three different values:\n   *  - If a non-zero number is given, that many pixels is used as the maximum allowed distance from the edge that starts dragging the side menu.\n   *  - If true is given, the default number of pixels (25) is used as the maximum allowed distance.\n   *  - If false or 0 is given, the edge drag threshold is disabled, and dragging from anywhere on the content is allowed.\n   * @returns {boolean} Whether the drag can start only from within the edge of screen threshold.\n   */\n  'edgeDragThreshold'\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#$getByHandle\n   * @param {string} handle\n   * @returns `delegateInstance` A delegate instance that controls only the\n   * {@link ionic.directive:ionSideMenus} directives with `delegate-handle` matching\n   * the given handle.\n   *\n   * Example: `$ionicSideMenuDelegate.$getByHandle('my-handle').toggleLeft();`\n   */\n]));\n\n\n/**\n * @ngdoc service\n * @name $ionicSlideBoxDelegate\n * @module ionic\n * @description\n * Delegate that controls the {@link ionic.directive:ionSlideBox} directive.\n *\n * Methods called directly on the $ionicSlideBoxDelegate service will control all slide boxes.  Use the {@link ionic.service:$ionicSlideBoxDelegate#$getByHandle $getByHandle}\n * method to control specific slide box instances.\n *\n * @usage\n *\n * ```html\n * <ion-view>\n *   <ion-slide-box>\n *     <ion-slide>\n *       <div class=\"box blue\">\n *         <button ng-click=\"nextSlide()\">Next slide!</button>\n *       </div>\n *     </ion-slide>\n *     <ion-slide>\n *       <div class=\"box red\">\n *         Slide 2!\n *       </div>\n *     </ion-slide>\n *   </ion-slide-box>\n * </ion-view>\n * ```\n * ```js\n * function MyCtrl($scope, $ionicSlideBoxDelegate) {\n *   $scope.nextSlide = function() {\n *     $ionicSlideBoxDelegate.next();\n *   }\n * }\n * ```\n */\nIonicModule\n.service('$ionicSlideBoxDelegate', ionic.DelegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#update\n   * @description\n   * Update the slidebox (for example if using Angular with ng-repeat,\n   * resize it for the elements inside).\n   */\n  'update',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#slide\n   * @param {number} to The index to slide to.\n   * @param {number=} speed The number of milliseconds the change should take.\n   */\n  'slide',\n  'select',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#enableSlide\n   * @param {boolean=} shouldEnable Whether to enable sliding the slidebox.\n   * @returns {boolean} Whether sliding is enabled.\n   */\n  'enableSlide',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#previous\n   * @param {number=} speed The number of milliseconds the change should take.\n   * @description Go to the previous slide. Wraps around if at the beginning.\n   */\n  'previous',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#next\n   * @param {number=} speed The number of milliseconds the change should take.\n   * @description Go to the next slide. Wraps around if at the end.\n   */\n  'next',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#stop\n   * @description Stop sliding. The slideBox will not move again until\n   * explicitly told to do so.\n   */\n  'stop',\n  'autoPlay',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#start\n   * @description Start sliding again if the slideBox was stopped.\n   */\n  'start',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#currentIndex\n   * @returns number The index of the current slide.\n   */\n  'currentIndex',\n  'selected',\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#slidesCount\n   * @returns number The number of slides there are currently.\n   */\n  'slidesCount',\n  'count',\n  'loop'\n  /**\n   * @ngdoc method\n   * @name $ionicSlideBoxDelegate#$getByHandle\n   * @param {string} handle\n   * @returns `delegateInstance` A delegate instance that controls only the\n   * {@link ionic.directive:ionSlideBox} directives with `delegate-handle` matching\n   * the given handle.\n   *\n   * Example: `$ionicSlideBoxDelegate.$getByHandle('my-handle').stop();`\n   */\n]));\n\n\n/**\n * @ngdoc service\n * @name $ionicTabsDelegate\n * @module ionic\n *\n * @description\n * Delegate for controlling the {@link ionic.directive:ionTabs} directive.\n *\n * Methods called directly on the $ionicTabsDelegate service will control all ionTabs\n * directives. Use the {@link ionic.service:$ionicTabsDelegate#$getByHandle $getByHandle}\n * method to control specific ionTabs instances.\n *\n * @usage\n *\n * ```html\n * <body ng-controller=\"MyCtrl\">\n *   <ion-tabs>\n *\n *     <ion-tab title=\"Tab 1\">\n *       Hello tab 1!\n *       <button ng-click=\"selectTabWithIndex(1)\">Select tab 2!</button>\n *     </ion-tab>\n *     <ion-tab title=\"Tab 2\">Hello tab 2!</ion-tab>\n *\n *   </ion-tabs>\n * </body>\n * ```\n * ```js\n * function MyCtrl($scope, $ionicTabsDelegate) {\n *   $scope.selectTabWithIndex = function(index) {\n *     $ionicTabsDelegate.select(index);\n *   }\n * }\n * ```\n */\nIonicModule\n.service('$ionicTabsDelegate', ionic.DelegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicTabsDelegate#select\n   * @description Select the tab matching the given index.\n   *\n   * @param {number} index Index of the tab to select.\n   */\n  'select',\n  /**\n   * @ngdoc method\n   * @name $ionicTabsDelegate#selectedIndex\n   * @returns `number` The index of the selected tab, or -1.\n   */\n  'selectedIndex',\n  /**\n   * @ngdoc method\n   * @name $ionicTabsDelegate#showBar\n   * @description\n   * Set/get whether the {@link ionic.directive:ionTabs} is shown\n   * @param {boolean} show Whether to show the bar.\n   * @returns {boolean} Whether the bar is shown.\n   */\n  'showBar'\n  /**\n   * @ngdoc method\n   * @name $ionicTabsDelegate#$getByHandle\n   * @param {string} handle\n   * @returns `delegateInstance` A delegate instance that controls only the\n   * {@link ionic.directive:ionTabs} directives with `delegate-handle` matching\n   * the given handle.\n   *\n   * Example: `$ionicTabsDelegate.$getByHandle('my-handle').select(0);`\n   */\n]));\n\n// closure to keep things neat\n(function() {\n  var templatesToCache = [];\n\n/**\n * @ngdoc service\n * @name $ionicTemplateCache\n * @module ionic\n * @description A service that preemptively caches template files to eliminate transition flicker and boost performance.\n * @usage\n * State templates are cached automatically, but you can optionally cache other templates.\n *\n * ```js\n * $ionicTemplateCache('myNgIncludeTemplate.html');\n * ```\n *\n * Optionally disable all preemptive caching with the `$ionicConfigProvider` or individual states by setting `prefetchTemplate`\n * in the `$state` definition\n *\n * ```js\n *   angular.module('myApp', ['ionic'])\n *   .config(function($stateProvider, $ionicConfigProvider) {\n *\n *     // disable preemptive template caching globally\n *     $ionicConfigProvider.templates.prefetch(false);\n *\n *     // disable individual states\n *     $stateProvider\n *       .state('tabs', {\n *         url: \"/tab\",\n *         abstract: true,\n *         prefetchTemplate: false,\n *         templateUrl: \"tabs-templates/tabs.html\"\n *       })\n *       .state('tabs.home', {\n *         url: \"/home\",\n *         views: {\n *           'home-tab': {\n *             prefetchTemplate: false,\n *             templateUrl: \"tabs-templates/home.html\",\n *             controller: 'HomeTabCtrl'\n *           }\n *         }\n *       });\n *   });\n * ```\n */\nIonicModule\n.factory('$ionicTemplateCache', [\n'$http',\n'$templateCache',\n'$timeout',\nfunction($http, $templateCache, $timeout) {\n  var toCache = templatesToCache,\n      hasRun;\n\n  function $ionicTemplateCache(templates) {\n    if (typeof templates === 'undefined') {\n      return run();\n    }\n    if (isString(templates)) {\n      templates = [templates];\n    }\n    forEach(templates, function(template) {\n      toCache.push(template);\n    });\n    if (hasRun) {\n      run();\n    }\n  }\n\n  // run through methods - internal method\n  function run() {\n    var template;\n    $ionicTemplateCache._runCount++;\n\n    hasRun = true;\n    // ignore if race condition already zeroed out array\n    if (toCache.length === 0) return;\n\n    var i = 0;\n    while (i < 4 && (template = toCache.pop())) {\n      // note that inline templates are ignored by this request\n      if (isString(template)) $http.get(template, { cache: $templateCache });\n      i++;\n    }\n    // only preload 3 templates a second\n    if (toCache.length) {\n      $timeout(run, 1000);\n    }\n  }\n\n  // exposing for testing\n  $ionicTemplateCache._runCount = 0;\n  // default method\n  return $ionicTemplateCache;\n}])\n\n// Intercepts the $stateprovider.state() command to look for templateUrls that can be cached\n.config([\n'$stateProvider',\n'$ionicConfigProvider',\nfunction($stateProvider, $ionicConfigProvider) {\n  var stateProviderState = $stateProvider.state;\n  $stateProvider.state = function(stateName, definition) {\n    // don't even bother if it's disabled. note, another config may run after this, so it's not a catch-all\n    if (typeof definition === 'object') {\n      var enabled = definition.prefetchTemplate !== false && templatesToCache.length < $ionicConfigProvider.templates.maxPrefetch();\n      if (enabled && isString(definition.templateUrl)) templatesToCache.push(definition.templateUrl);\n      if (angular.isObject(definition.views)) {\n        for (var key in definition.views) {\n          enabled = definition.views[key].prefetchTemplate !== false && templatesToCache.length < $ionicConfigProvider.templates.maxPrefetch();\n          if (enabled && isString(definition.views[key].templateUrl)) templatesToCache.push(definition.views[key].templateUrl);\n        }\n      }\n    }\n    return stateProviderState.call($stateProvider, stateName, definition);\n  };\n}])\n\n// process the templateUrls collected by the $stateProvider, adding them to the cache\n.run(['$ionicTemplateCache', function($ionicTemplateCache) {\n  $ionicTemplateCache();\n}]);\n\n})();\n\nIonicModule\n.factory('$ionicTemplateLoader', [\n  '$compile',\n  '$controller',\n  '$http',\n  '$q',\n  '$rootScope',\n  '$templateCache',\nfunction($compile, $controller, $http, $q, $rootScope, $templateCache) {\n\n  return {\n    load: fetchTemplate,\n    compile: loadAndCompile\n  };\n\n  function fetchTemplate(url) {\n    return $http.get(url, {cache: $templateCache})\n    .then(function(response) {\n      return response.data && response.data.trim();\n    });\n  }\n\n  function loadAndCompile(options) {\n    options = extend({\n      template: '',\n      templateUrl: '',\n      scope: null,\n      controller: null,\n      locals: {},\n      appendTo: null\n    }, options || {});\n\n    var templatePromise = options.templateUrl ?\n      this.load(options.templateUrl) :\n      $q.when(options.template);\n\n    return templatePromise.then(function(template) {\n      var controller;\n      var scope = options.scope || $rootScope.$new();\n\n      //Incase template doesn't have just one root element, do this\n      var element = jqLite('<div>').html(template).contents();\n\n      if (options.controller) {\n        controller = $controller(\n          options.controller,\n          extend(options.locals, {\n            $scope: scope\n          })\n        );\n        element.children().data('$ngControllerController', controller);\n      }\n      if (options.appendTo) {\n        jqLite(options.appendTo).append(element);\n      }\n\n      $compile(element)(scope);\n\n      return {\n        element: element,\n        scope: scope\n      };\n    });\n  }\n\n}]);\n\n/**\n * @private\n * DEPRECATED, as of v1.0.0-beta14 -------\n */\nIonicModule\n.factory('$ionicViewService', ['$ionicHistory', '$log', function($ionicHistory, $log) {\n\n  function warn(oldMethod, newMethod) {\n    $log.warn('$ionicViewService' + oldMethod + ' is deprecated, please use $ionicHistory' + newMethod + ' instead: http://ionicframework.com/docs/nightly/api/service/$ionicHistory/');\n  }\n\n  warn('', '');\n\n  var methodsMap = {\n    getCurrentView: 'currentView',\n    getBackView: 'backView',\n    getForwardView: 'forwardView',\n    getCurrentStateName: 'currentStateName',\n    nextViewOptions: 'nextViewOptions',\n    clearHistory: 'clearHistory'\n  };\n\n  forEach(methodsMap, function(newMethod, oldMethod) {\n    methodsMap[oldMethod] = function() {\n      warn('.' + oldMethod, '.' + newMethod);\n      return $ionicHistory[newMethod].apply(this, arguments);\n    };\n  });\n\n  return methodsMap;\n\n}]);\n\n/**\n * @private\n * TODO document\n */\n\nIonicModule.factory('$ionicViewSwitcher', [\n  '$timeout',\n  '$document',\n  '$q',\n  '$ionicClickBlock',\n  '$ionicConfig',\n  '$ionicNavBarDelegate',\nfunction($timeout, $document, $q, $ionicClickBlock, $ionicConfig, $ionicNavBarDelegate) {\n\n  var TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';\n  var DATA_NO_CACHE = '$noCache';\n  var DATA_DESTROY_ELE = '$destroyEle';\n  var DATA_ELE_IDENTIFIER = '$eleId';\n  var DATA_VIEW_ACCESSED = '$accessed';\n  var DATA_FALLBACK_TIMER = '$fallbackTimer';\n  var DATA_VIEW = '$viewData';\n  var NAV_VIEW_ATTR = 'nav-view';\n  var VIEW_STATUS_ACTIVE = 'active';\n  var VIEW_STATUS_CACHED = 'cached';\n  var VIEW_STATUS_STAGED = 'stage';\n\n  var transitionCounter = 0;\n  var nextTransition, nextDirection;\n  ionic.transition = ionic.transition || {};\n  ionic.transition.isActive = false;\n  var isActiveTimer;\n  var cachedAttr = ionic.DomUtil.cachedAttr;\n  var transitionPromises = [];\n  var defaultTimeout = 1100;\n\n  var ionicViewSwitcher = {\n\n    create: function(navViewCtrl, viewLocals, enteringView, leavingView, renderStart, renderEnd) {\n      // get a reference to an entering/leaving element if they exist\n      // loop through to see if the view is already in the navViewElement\n      var enteringEle, leavingEle;\n      var transitionId = ++transitionCounter;\n      var alreadyInDom;\n\n      var switcher = {\n\n        init: function(registerData, callback) {\n          ionicViewSwitcher.isTransitioning(true);\n\n          switcher.loadViewElements(registerData);\n\n          switcher.render(registerData, function() {\n            callback && callback();\n          });\n        },\n\n        loadViewElements: function(registerData) {\n          var x, l, viewEle;\n          var viewElements = navViewCtrl.getViewElements();\n          var enteringEleIdentifier = getViewElementIdentifier(viewLocals, enteringView);\n          var navViewActiveEleId = navViewCtrl.activeEleId();\n\n          for (x = 0, l = viewElements.length; x < l; x++) {\n            viewEle = viewElements.eq(x);\n\n            if (viewEle.data(DATA_ELE_IDENTIFIER) === enteringEleIdentifier) {\n              // we found an existing element in the DOM that should be entering the view\n              if (viewEle.data(DATA_NO_CACHE)) {\n                // the existing element should not be cached, don't use it\n                viewEle.data(DATA_ELE_IDENTIFIER, enteringEleIdentifier + ionic.Utils.nextUid());\n                viewEle.data(DATA_DESTROY_ELE, true);\n\n              } else {\n                enteringEle = viewEle;\n              }\n\n            } else if (isDefined(navViewActiveEleId) && viewEle.data(DATA_ELE_IDENTIFIER) === navViewActiveEleId) {\n              leavingEle = viewEle;\n            }\n\n            if (enteringEle && leavingEle) break;\n          }\n\n          alreadyInDom = !!enteringEle;\n\n          if (!alreadyInDom) {\n            // still no existing element to use\n            // create it using existing template/scope/locals\n            enteringEle = registerData.ele || ionicViewSwitcher.createViewEle(viewLocals);\n\n            // existing elements in the DOM are looked up by their state name and state id\n            enteringEle.data(DATA_ELE_IDENTIFIER, enteringEleIdentifier);\n          }\n\n          if (renderEnd) {\n            navViewCtrl.activeEleId(enteringEleIdentifier);\n          }\n\n          registerData.ele = null;\n        },\n\n        render: function(registerData, callback) {\n          if (alreadyInDom) {\n            // it was already found in the DOM, just reconnect the scope\n            ionic.Utils.reconnectScope(enteringEle.scope());\n\n          } else {\n            // the entering element is not already in the DOM\n            // set that the entering element should be \"staged\" and its\n            // styles of where this element will go before it hits the DOM\n            navViewAttr(enteringEle, VIEW_STATUS_STAGED);\n\n            var enteringData = getTransitionData(viewLocals, enteringEle, registerData.direction, enteringView);\n            var transitionFn = $ionicConfig.transitions.views[enteringData.transition] || $ionicConfig.transitions.views.none;\n            transitionFn(enteringEle, null, enteringData.direction, true).run(0);\n\n            enteringEle.data(DATA_VIEW, {\n              viewId: enteringData.viewId,\n              historyId: enteringData.historyId,\n              stateName: enteringData.stateName,\n              stateParams: enteringData.stateParams\n            });\n\n            // if the current state has cache:false\n            // or the element has cache-view=\"false\" attribute\n            if (viewState(viewLocals).cache === false || viewState(viewLocals).cache === 'false' ||\n                enteringEle.attr('cache-view') == 'false' || $ionicConfig.views.maxCache() === 0) {\n              enteringEle.data(DATA_NO_CACHE, true);\n            }\n\n            // append the entering element to the DOM, create a new scope and run link\n            var viewScope = navViewCtrl.appendViewElement(enteringEle, viewLocals);\n\n            delete enteringData.direction;\n            delete enteringData.transition;\n            viewScope.$emit('$ionicView.loaded', enteringData);\n          }\n\n          // update that this view was just accessed\n          enteringEle.data(DATA_VIEW_ACCESSED, Date.now());\n\n          callback && callback();\n        },\n\n        transition: function(direction, enableBack, allowAnimate) {\n          var deferred;\n          var enteringData = getTransitionData(viewLocals, enteringEle, direction, enteringView);\n          var leavingData = extend(extend({}, enteringData), getViewData(leavingView));\n          enteringData.transitionId = leavingData.transitionId = transitionId;\n          enteringData.fromCache = !!alreadyInDom;\n          enteringData.enableBack = !!enableBack;\n          enteringData.renderStart = renderStart;\n          enteringData.renderEnd = renderEnd;\n\n          cachedAttr(enteringEle.parent(), 'nav-view-transition', enteringData.transition);\n          cachedAttr(enteringEle.parent(), 'nav-view-direction', enteringData.direction);\n\n          // cancel any previous transition complete fallbacks\n          $timeout.cancel(enteringEle.data(DATA_FALLBACK_TIMER));\n\n          // get the transition ready and see if it'll animate\n          var transitionFn = $ionicConfig.transitions.views[enteringData.transition] || $ionicConfig.transitions.views.none;\n          var viewTransition = transitionFn(enteringEle, leavingEle, enteringData.direction,\n                                            enteringData.shouldAnimate && allowAnimate && renderEnd);\n\n          if (viewTransition.shouldAnimate) {\n            // attach transitionend events (and fallback timer)\n            enteringEle.on(TRANSITIONEND_EVENT, completeOnTransitionEnd);\n            enteringEle.data(DATA_FALLBACK_TIMER, $timeout(transitionComplete, defaultTimeout));\n            $ionicClickBlock.show(defaultTimeout);\n          }\n\n          if (renderStart) {\n            // notify the views \"before\" the transition starts\n            switcher.emit('before', enteringData, leavingData);\n\n            // stage entering element, opacity 0, no transition duration\n            navViewAttr(enteringEle, VIEW_STATUS_STAGED);\n\n            // render the elements in the correct location for their starting point\n            viewTransition.run(0);\n          }\n\n          if (renderEnd) {\n            // create a promise so we can keep track of when all transitions finish\n            // only required if this transition should complete\n            deferred = $q.defer();\n            transitionPromises.push(deferred.promise);\n          }\n\n          if (renderStart && renderEnd) {\n            // CSS \"auto\" transitioned, not manually transitioned\n            // wait a frame so the styles apply before auto transitioning\n            $timeout(function() {\n              ionic.requestAnimationFrame(onReflow);\n            });\n          } else if (!renderEnd) {\n            // just the start of a manual transition\n            // but it will not render the end of the transition\n            navViewAttr(enteringEle, 'entering');\n            navViewAttr(leavingEle, 'leaving');\n\n            // return the transition run method so each step can be ran manually\n            return {\n              run: viewTransition.run,\n              cancel: function(shouldAnimate) {\n                if (shouldAnimate) {\n                  enteringEle.on(TRANSITIONEND_EVENT, cancelOnTransitionEnd);\n                  enteringEle.data(DATA_FALLBACK_TIMER, $timeout(cancelTransition, defaultTimeout));\n                  $ionicClickBlock.show(defaultTimeout);\n                } else {\n                  cancelTransition();\n                }\n                viewTransition.shouldAnimate = shouldAnimate;\n                viewTransition.run(0);\n                viewTransition = null;\n              }\n            };\n\n          } else if (renderEnd) {\n            // just the end of a manual transition\n            // happens after the manual transition has completed\n            // and a full history change has happened\n            onReflow();\n          }\n\n\n          function onReflow() {\n            // remove that we're staging the entering element so it can auto transition\n            navViewAttr(enteringEle, viewTransition.shouldAnimate ? 'entering' : VIEW_STATUS_ACTIVE);\n            navViewAttr(leavingEle, viewTransition.shouldAnimate ? 'leaving' : VIEW_STATUS_CACHED);\n\n            // start the auto transition and let the CSS take over\n            viewTransition.run(1);\n\n            // trigger auto transitions on the associated nav bars\n            $ionicNavBarDelegate._instances.forEach(function(instance) {\n              instance.triggerTransitionStart(transitionId);\n            });\n\n            if (!viewTransition.shouldAnimate) {\n              // no animated auto transition\n              transitionComplete();\n            }\n          }\n\n          // Make sure that transitionend events bubbling up from children won't fire\n          // transitionComplete. Will only go forward if ev.target == the element listening.\n          function completeOnTransitionEnd(ev) {\n            if (ev.target !== this) return;\n            transitionComplete();\n          }\n          function transitionComplete() {\n            if (transitionComplete.x) return;\n            transitionComplete.x = true;\n\n            enteringEle.off(TRANSITIONEND_EVENT, completeOnTransitionEnd);\n            $timeout.cancel(enteringEle.data(DATA_FALLBACK_TIMER));\n            leavingEle && $timeout.cancel(leavingEle.data(DATA_FALLBACK_TIMER));\n\n            // resolve that this one transition (there could be many w/ nested views)\n            deferred && deferred.resolve(navViewCtrl);\n\n            // the most recent transition added has completed and all the active\n            // transition promises should be added to the services array of promises\n            if (transitionId === transitionCounter) {\n              $q.all(transitionPromises).then(ionicViewSwitcher.transitionEnd);\n\n              // emit that the views have finished transitioning\n              // each parent nav-view will update which views are active and cached\n              switcher.emit('after', enteringData, leavingData);\n              switcher.cleanup(enteringData);\n            }\n\n            // tell the nav bars that the transition has ended\n            $ionicNavBarDelegate._instances.forEach(function(instance) {\n              instance.triggerTransitionEnd();\n            });\n\n\n            // remove any references that could cause memory issues\n            nextTransition = nextDirection = enteringView = leavingView = enteringEle = leavingEle = null;\n          }\n\n          // Make sure that transitionend events bubbling up from children won't fire\n          // transitionComplete. Will only go forward if ev.target == the element listening.\n          function cancelOnTransitionEnd(ev) {\n            if (ev.target !== this) return;\n            cancelTransition();\n          }\n          function cancelTransition() {\n            navViewAttr(enteringEle, VIEW_STATUS_CACHED);\n            navViewAttr(leavingEle, VIEW_STATUS_ACTIVE);\n            enteringEle.off(TRANSITIONEND_EVENT, cancelOnTransitionEnd);\n            $timeout.cancel(enteringEle.data(DATA_FALLBACK_TIMER));\n            ionicViewSwitcher.transitionEnd([navViewCtrl]);\n          }\n\n        },\n\n      emit: function(step, enteringData, leavingData) {\n          var enteringScope = getScopeForElement(enteringEle, enteringData);\n          var leavingScope = getScopeForElement(leavingEle, leavingData);\n\n          var prefixesAreEqual;\n\n          if ( !enteringData.viewId || enteringData.abstractView ) {\n            // it's an abstract view, so treat it accordingly\n\n            // we only get access to the leaving scope once in the transition,\n            // so dispatch all events right away if it exists\n            if ( leavingScope ) {\n              leavingScope.$emit('$ionicView.beforeLeave', leavingData);\n              leavingScope.$emit('$ionicView.leave', leavingData);\n              leavingScope.$emit('$ionicView.afterLeave', leavingData);\n              leavingScope.$broadcast('$ionicParentView.beforeLeave', leavingData);\n              leavingScope.$broadcast('$ionicParentView.leave', leavingData);\n              leavingScope.$broadcast('$ionicParentView.afterLeave', leavingData);\n            }\n          }\n          else {\n            // it's a regular view, so do the normal process\n            if (step == 'after') {\n              if (enteringScope) {\n                enteringScope.$emit('$ionicView.enter', enteringData);\n                enteringScope.$broadcast('$ionicParentView.enter', enteringData);\n              }\n\n              if (leavingScope) {\n                leavingScope.$emit('$ionicView.leave', leavingData);\n                leavingScope.$broadcast('$ionicParentView.leave', leavingData);\n              }\n              else if (enteringScope && leavingData && leavingData.viewId && enteringData.stateName !== leavingData.stateName) {\n                // we only want to dispatch this when we are doing a single-tier\n                // state change such as changing a tab, so compare the state\n                // for the same state-prefix but different suffix\n                prefixesAreEqual = compareStatePrefixes(enteringData.stateName, leavingData.stateName);\n                if ( prefixesAreEqual ) {\n                  enteringScope.$emit('$ionicNavView.leave', leavingData);\n                }\n              }\n            }\n\n            if (enteringScope) {\n              enteringScope.$emit('$ionicView.' + step + 'Enter', enteringData);\n              enteringScope.$broadcast('$ionicParentView.' + step + 'Enter', enteringData);\n            }\n\n            if (leavingScope) {\n              leavingScope.$emit('$ionicView.' + step + 'Leave', leavingData);\n              leavingScope.$broadcast('$ionicParentView.' + step + 'Leave', leavingData);\n\n            } else if (enteringScope && leavingData && leavingData.viewId && enteringData.stateName !== leavingData.stateName) {\n              // we only want to dispatch this when we are doing a single-tier\n              // state change such as changing a tab, so compare the state\n              // for the same state-prefix but different suffix\n              prefixesAreEqual = compareStatePrefixes(enteringData.stateName, leavingData.stateName);\n              if ( prefixesAreEqual ) {\n                enteringScope.$emit('$ionicNavView.' + step + 'Leave', leavingData);\n              }\n            }\n          }\n        },\n\n        cleanup: function(transData) {\n          // check if any views should be removed\n          if (leavingEle && transData.direction == 'back' && !$ionicConfig.views.forwardCache()) {\n            // if they just navigated back we can destroy the forward view\n            // do not remove forward views if cacheForwardViews config is true\n            destroyViewEle(leavingEle);\n          }\n\n          var viewElements = navViewCtrl.getViewElements();\n          var viewElementsLength = viewElements.length;\n          var x, viewElement;\n          var removeOldestAccess = (viewElementsLength - 1) > $ionicConfig.views.maxCache();\n          var removableEle;\n          var oldestAccess = Date.now();\n\n          for (x = 0; x < viewElementsLength; x++) {\n            viewElement = viewElements.eq(x);\n\n            if (removeOldestAccess && viewElement.data(DATA_VIEW_ACCESSED) < oldestAccess) {\n              // remember what was the oldest element to be accessed so it can be destroyed\n              oldestAccess = viewElement.data(DATA_VIEW_ACCESSED);\n              removableEle = viewElements.eq(x);\n\n            } else if (viewElement.data(DATA_DESTROY_ELE) && navViewAttr(viewElement) != VIEW_STATUS_ACTIVE) {\n              destroyViewEle(viewElement);\n            }\n          }\n\n          destroyViewEle(removableEle);\n\n          if (enteringEle.data(DATA_NO_CACHE)) {\n            enteringEle.data(DATA_DESTROY_ELE, true);\n          }\n        },\n\n        enteringEle: function() { return enteringEle; },\n        leavingEle: function() { return leavingEle; }\n\n      };\n\n      return switcher;\n    },\n\n    transitionEnd: function(navViewCtrls) {\n      forEach(navViewCtrls, function(navViewCtrl) {\n        navViewCtrl.transitionEnd();\n      });\n\n      ionicViewSwitcher.isTransitioning(false);\n      $ionicClickBlock.hide();\n      transitionPromises = [];\n    },\n\n    nextTransition: function(val) {\n      nextTransition = val;\n    },\n\n    nextDirection: function(val) {\n      nextDirection = val;\n    },\n\n    isTransitioning: function(val) {\n      if (arguments.length) {\n        ionic.transition.isActive = !!val;\n        $timeout.cancel(isActiveTimer);\n        if (val) {\n          isActiveTimer = $timeout(function() {\n            ionicViewSwitcher.isTransitioning(false);\n          }, 999);\n        }\n      }\n      return ionic.transition.isActive;\n    },\n\n    createViewEle: function(viewLocals) {\n      var containerEle = $document[0].createElement('div');\n      if (viewLocals && viewLocals.$template) {\n        containerEle.innerHTML = viewLocals.$template;\n        if (containerEle.children.length === 1) {\n          containerEle.children[0].classList.add('pane');\n          if ( viewLocals.$$state && viewLocals.$$state.self && viewLocals.$$state.self['abstract'] ) {\n            angular.element(containerEle.children[0]).attr(\"abstract\", \"true\");\n          }\n          else {\n            if ( viewLocals.$$state && viewLocals.$$state.self ) {\n              angular.element(containerEle.children[0]).attr(\"state\", viewLocals.$$state.self.name);\n            }\n\n          }\n          return jqLite(containerEle.children[0]);\n        }\n      }\n      containerEle.className = \"pane\";\n      return jqLite(containerEle);\n    },\n\n    viewEleIsActive: function(viewEle, isActiveAttr) {\n      navViewAttr(viewEle, isActiveAttr ? VIEW_STATUS_ACTIVE : VIEW_STATUS_CACHED);\n    },\n\n    getTransitionData: getTransitionData,\n    navViewAttr: navViewAttr,\n    destroyViewEle: destroyViewEle\n\n  };\n\n  return ionicViewSwitcher;\n\n\n  function getViewElementIdentifier(locals, view) {\n    if (viewState(locals)['abstract']) return viewState(locals).name;\n    if (view) return view.stateId || view.viewId;\n    return ionic.Utils.nextUid();\n  }\n\n  function viewState(locals) {\n    return locals && locals.$$state && locals.$$state.self || {};\n  }\n\n  function getTransitionData(viewLocals, enteringEle, direction, view) {\n    // Priority\n    // 1) attribute directive on the button/link to this view\n    // 2) entering element's attribute\n    // 3) entering view's $state config property\n    // 4) view registration data\n    // 5) global config\n    // 6) fallback value\n\n    var state = viewState(viewLocals);\n    var viewTransition = nextTransition || cachedAttr(enteringEle, 'view-transition') || state.viewTransition || $ionicConfig.views.transition() || 'ios';\n    var navBarTransition = $ionicConfig.navBar.transition();\n    direction = nextDirection || cachedAttr(enteringEle, 'view-direction') || state.viewDirection || direction || 'none';\n\n    return extend(getViewData(view), {\n      transition: viewTransition,\n      navBarTransition: navBarTransition === 'view' ? viewTransition : navBarTransition,\n      direction: direction,\n      shouldAnimate: (viewTransition !== 'none' && direction !== 'none')\n    });\n  }\n\n  function getViewData(view) {\n    view = view || {};\n    return {\n      viewId: view.viewId,\n      historyId: view.historyId,\n      stateId: view.stateId,\n      stateName: view.stateName,\n      stateParams: view.stateParams\n    };\n  }\n\n  function navViewAttr(ele, value) {\n    if (arguments.length > 1) {\n      cachedAttr(ele, NAV_VIEW_ATTR, value);\n    } else {\n      return cachedAttr(ele, NAV_VIEW_ATTR);\n    }\n  }\n\n  function destroyViewEle(ele) {\n    // we found an element that should be removed\n    // destroy its scope, then remove the element\n    if (ele && ele.length) {\n      var viewScope = ele.scope();\n      if (viewScope) {\n        viewScope.$emit('$ionicView.unloaded', ele.data(DATA_VIEW));\n        viewScope.$destroy();\n      }\n      ele.remove();\n    }\n  }\n\n  function compareStatePrefixes(enteringStateName, exitingStateName) {\n    var enteringStateSuffixIndex = enteringStateName.lastIndexOf('.');\n    var exitingStateSuffixIndex = exitingStateName.lastIndexOf('.');\n\n    // if either of the prefixes are empty, just return false\n    if ( enteringStateSuffixIndex < 0 || exitingStateSuffixIndex < 0 ) {\n      return false;\n    }\n\n    var enteringPrefix = enteringStateName.substring(0, enteringStateSuffixIndex);\n    var exitingPrefix = exitingStateName.substring(0, exitingStateSuffixIndex);\n\n    return enteringPrefix === exitingPrefix;\n  }\n\n  function getScopeForElement(element, stateData) {\n    if ( !element ) {\n      return null;\n    }\n    // check if it's abstract\n    var attributeValue = angular.element(element).attr(\"abstract\");\n    var stateValue = angular.element(element).attr(\"state\");\n\n    if ( attributeValue !== \"true\" ) {\n      // it's not an abstract view, so make sure the element\n      // matches the state.  Due to abstract view weirdness,\n      // sometimes it doesn't. If it doesn't, don't dispatch events\n      // so leave the scope undefined\n      if ( stateValue === stateData.stateName ) {\n        return angular.element(element).scope();\n      }\n      return null;\n    }\n    else {\n      // it is an abstract element, so look for element with the \"state\" attributeValue\n      // set to the name of the stateData state\n      var elements = aggregateNavViewChildren(element);\n      for ( var i = 0; i < elements.length; i++ ) {\n          var state = angular.element(elements[i]).attr(\"state\");\n          if ( state === stateData.stateName ) {\n            stateData.abstractView = true;\n            return angular.element(elements[i]).scope();\n          }\n      }\n      // we didn't find a match, so return null\n      return null;\n    }\n  }\n\n  function aggregateNavViewChildren(element) {\n    var aggregate = [];\n    var navViews = angular.element(element).find(\"ion-nav-view\");\n    for ( var i = 0; i < navViews.length; i++ ) {\n      var children = angular.element(navViews[i]).children();\n      var childrenAggregated = [];\n      for ( var j = 0; j < children.length; j++ ) {\n        childrenAggregated = childrenAggregated.concat(children[j]);\n      }\n      aggregate = aggregate.concat(childrenAggregated);\n    }\n    return aggregate;\n  }\n\n}]);\n\n/**\n * ==================  angular-ios9-uiwebview.patch.js v1.1.1 ==================\n *\n * This patch works around iOS9 UIWebView regression that causes infinite digest\n * errors in Angular.\n *\n * The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular\n * have the workaround baked in.\n *\n * To apply this patch load/bundle this file with your application and add a\n * dependency on the \"ngIOS9UIWebViewPatch\" module to your main app module.\n *\n * For example:\n *\n * ```\n * angular.module('myApp', ['ngRoute'])`\n * ```\n *\n * becomes\n *\n * ```\n * angular.module('myApp', ['ngRoute', 'ngIOS9UIWebViewPatch'])\n * ```\n *\n *\n * More info:\n * - https://openradar.appspot.com/22186109\n * - https://github.com/angular/angular.js/issues/12241\n * - https://github.com/ionic-team/ionic/issues/4082\n *\n *\n * @license AngularJS\n * (c) 2010-2015 Google, Inc. http://angularjs.org\n * License: MIT\n */\n\nangular.module('ngIOS9UIWebViewPatch', ['ng']).config(['$provide', function($provide) {\n  'use strict';\n\n  $provide.decorator('$browser', ['$delegate', '$window', function($delegate, $window) {\n\n    if (isIOS9UIWebView($window.navigator.userAgent)) {\n      return applyIOS9Shim($delegate);\n    }\n\n    return $delegate;\n\n    function isIOS9UIWebView(userAgent) {\n      return /(iPhone|iPad|iPod).* OS 9_\\d/.test(userAgent) && !/Version\\/9\\./.test(userAgent);\n    }\n\n    function applyIOS9Shim(browser) {\n      var pendingLocationUrl = null;\n      var originalUrlFn = browser.url;\n\n      browser.url = function() {\n        if (arguments.length) {\n          pendingLocationUrl = arguments[0];\n          return originalUrlFn.apply(browser, arguments);\n        }\n\n        return pendingLocationUrl || originalUrlFn.apply(browser, arguments);\n      };\n\n      window.addEventListener('popstate', clearPendingLocationUrl, false);\n      window.addEventListener('hashchange', clearPendingLocationUrl, false);\n\n      function clearPendingLocationUrl() {\n        pendingLocationUrl = null;\n      }\n\n      return browser;\n    }\n  }]);\n}]);\n\n/**\n * @private\n * Parts of Ionic requires that $scope data is attached to the element.\n * We do not want to disable adding $scope data to the $element when\n * $compileProvider.debugInfoEnabled(false) is used.\n */\nIonicModule.config(['$provide', function($provide) {\n  $provide.decorator('$compile', ['$delegate', function($compile) {\n     $compile.$$addScopeInfo = function $$addScopeInfo($element, scope, isolated, noTemplate) {\n       var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';\n       $element.data(dataName, scope);\n     };\n     return $compile;\n  }]);\n}]);\n\n/**\n * @private\n */\nIonicModule.config([\n  '$provide',\nfunction($provide) {\n  function $LocationDecorator($location, $timeout) {\n\n    $location.__hash = $location.hash;\n    //Fix: when window.location.hash is set, the scrollable area\n    //found nearest to body's scrollTop is set to scroll to an element\n    //with that ID.\n    $location.hash = function(value) {\n      if (isDefined(value) && value.length > 0) {\n        $timeout(function() {\n          var scroll = document.querySelector('.scroll-content');\n          if (scroll) {\n            scroll.scrollTop = 0;\n          }\n        }, 0, false);\n      }\n      return $location.__hash(value);\n    };\n\n    return $location;\n  }\n\n  $provide.decorator('$location', ['$delegate', '$timeout', $LocationDecorator]);\n}]);\n\nIonicModule\n\n.controller('$ionicHeaderBar', [\n  '$scope',\n  '$element',\n  '$attrs',\n  '$q',\n  '$ionicConfig',\n  '$ionicHistory',\nfunction($scope, $element, $attrs, $q, $ionicConfig, $ionicHistory) {\n  var TITLE = 'title';\n  var BACK_TEXT = 'back-text';\n  var BACK_BUTTON = 'back-button';\n  var DEFAULT_TITLE = 'default-title';\n  var PREVIOUS_TITLE = 'previous-title';\n  var HIDE = 'hide';\n\n  var self = this;\n  var titleText = '';\n  var previousTitleText = '';\n  var titleLeft = 0;\n  var titleRight = 0;\n  var titleCss = '';\n  var isBackEnabled = false;\n  var isBackShown = true;\n  var isNavBackShown = true;\n  var isBackElementShown = false;\n  var titleTextWidth = 0;\n\n\n  self.beforeEnter = function(viewData) {\n    $scope.$broadcast('$ionicView.beforeEnter', viewData);\n  };\n\n\n  self.title = function(newTitleText) {\n    if (arguments.length && newTitleText !== titleText) {\n      getEle(TITLE).innerHTML = newTitleText;\n      titleText = newTitleText;\n      titleTextWidth = 0;\n    }\n    return titleText;\n  };\n\n\n  self.enableBack = function(shouldEnable, disableReset) {\n    // whether or not the back button show be visible, according\n    // to the navigation and history\n    if (arguments.length) {\n      isBackEnabled = shouldEnable;\n      if (!disableReset) self.updateBackButton();\n    }\n    return isBackEnabled;\n  };\n\n\n  self.showBack = function(shouldShow, disableReset) {\n    // different from enableBack() because this will always have the back\n    // visually hidden if false, even if the history says it should show\n    if (arguments.length) {\n      isBackShown = shouldShow;\n      if (!disableReset) self.updateBackButton();\n    }\n    return isBackShown;\n  };\n\n\n  self.showNavBack = function(shouldShow) {\n    // different from showBack() because this is for the entire nav bar's\n    // setting for all of it's child headers. For internal use.\n    isNavBackShown = shouldShow;\n    self.updateBackButton();\n  };\n\n\n  self.updateBackButton = function() {\n    var ele;\n    if ((isBackShown && isNavBackShown && isBackEnabled) !== isBackElementShown) {\n      isBackElementShown = isBackShown && isNavBackShown && isBackEnabled;\n      ele = getEle(BACK_BUTTON);\n      ele && ele.classList[ isBackElementShown ? 'remove' : 'add' ](HIDE);\n    }\n\n    if (isBackEnabled) {\n      ele = ele || getEle(BACK_BUTTON);\n      if (ele) {\n        if (self.backButtonIcon !== $ionicConfig.backButton.icon()) {\n          ele = getEle(BACK_BUTTON + ' .icon');\n          if (ele) {\n            self.backButtonIcon = $ionicConfig.backButton.icon();\n            ele.className = 'icon ' + self.backButtonIcon;\n          }\n        }\n\n        if (self.backButtonText !== $ionicConfig.backButton.text()) {\n          ele = getEle(BACK_BUTTON + ' .back-text');\n          if (ele) {\n            ele.textContent = self.backButtonText = $ionicConfig.backButton.text();\n          }\n        }\n      }\n    }\n  };\n\n\n  self.titleTextWidth = function() {\n    var element = getEle(TITLE);\n    if ( element ) {\n      // If the element has a nav-bar-title, use that instead\n      // to calculate the width of the title\n      var children = angular.element(element).children();\n      for ( var i = 0; i < children.length; i++ ) {\n        if ( angular.element(children[i]).hasClass('nav-bar-title') ) {\n          element = children[i];\n          break;\n        }\n      }\n    }\n    var bounds = ionic.DomUtil.getTextBounds(element);\n    titleTextWidth = Math.min(bounds && bounds.width || 30);\n    return titleTextWidth;\n  };\n\n\n  self.titleWidth = function() {\n    var titleWidth = self.titleTextWidth();\n    var offsetWidth = getEle(TITLE).offsetWidth;\n    if (offsetWidth < titleWidth) {\n      titleWidth = offsetWidth + (titleLeft - titleRight - 5);\n    }\n    return titleWidth;\n  };\n\n\n  self.titleTextX = function() {\n    return ($element[0].offsetWidth / 2) - (self.titleWidth() / 2);\n  };\n\n\n  self.titleLeftRight = function() {\n    return titleLeft - titleRight;\n  };\n\n\n  self.backButtonTextLeft = function() {\n    var offsetLeft = 0;\n    var ele = getEle(BACK_TEXT);\n    while (ele) {\n      offsetLeft += ele.offsetLeft;\n      ele = ele.parentElement;\n    }\n    return offsetLeft;\n  };\n\n\n  self.resetBackButton = function(viewData) {\n    if ($ionicConfig.backButton.previousTitleText()) {\n      var previousTitleEle = getEle(PREVIOUS_TITLE);\n      if (previousTitleEle) {\n        previousTitleEle.classList.remove(HIDE);\n\n        var view = (viewData && $ionicHistory.getViewById(viewData.viewId));\n        var newPreviousTitleText = $ionicHistory.backTitle(view);\n\n        if (newPreviousTitleText !== previousTitleText) {\n          previousTitleText = previousTitleEle.innerHTML = newPreviousTitleText;\n        }\n      }\n      var defaultTitleEle = getEle(DEFAULT_TITLE);\n      if (defaultTitleEle) {\n        defaultTitleEle.classList.remove(HIDE);\n      }\n    }\n  };\n\n\n  self.align = function(textAlign) {\n    var titleEle = getEle(TITLE);\n\n    textAlign = textAlign || $attrs.alignTitle || $ionicConfig.navBar.alignTitle();\n\n    var widths = self.calcWidths(textAlign, false);\n\n    if (isBackShown && previousTitleText && $ionicConfig.backButton.previousTitleText()) {\n      var previousTitleWidths = self.calcWidths(textAlign, true);\n\n      var availableTitleWidth = $element[0].offsetWidth - previousTitleWidths.titleLeft - previousTitleWidths.titleRight;\n\n      if (self.titleTextWidth() <= availableTitleWidth) {\n        widths = previousTitleWidths;\n      }\n    }\n\n    return self.updatePositions(titleEle, widths.titleLeft, widths.titleRight, widths.buttonsLeft, widths.buttonsRight, widths.css, widths.showPrevTitle);\n  };\n\n\n  self.calcWidths = function(textAlign, isPreviousTitle) {\n    var titleEle = getEle(TITLE);\n    var backBtnEle = getEle(BACK_BUTTON);\n    var x, y, z, b, c, d, childSize, bounds;\n    var childNodes = $element[0].childNodes;\n    var buttonsLeft = 0;\n    var buttonsRight = 0;\n    var isCountRightOfTitle;\n    var updateTitleLeft = 0;\n    var updateTitleRight = 0;\n    var updateCss = '';\n    var backButtonWidth = 0;\n\n    // Compute how wide the left children are\n    // Skip all titles (there may still be two titles, one leaving the dom)\n    // Once we encounter a titleEle, realize we are now counting the right-buttons, not left\n    for (x = 0; x < childNodes.length; x++) {\n      c = childNodes[x];\n\n      childSize = 0;\n      if (c.nodeType == 1) {\n        // element node\n        if (c === titleEle) {\n          isCountRightOfTitle = true;\n          continue;\n        }\n\n        if (c.classList.contains(HIDE)) {\n          continue;\n        }\n\n        if (isBackShown && c === backBtnEle) {\n\n          for (y = 0; y < c.childNodes.length; y++) {\n            b = c.childNodes[y];\n\n            if (b.nodeType == 1) {\n\n              if (b.classList.contains(BACK_TEXT)) {\n                for (z = 0; z < b.children.length; z++) {\n                  d = b.children[z];\n\n                  if (isPreviousTitle) {\n                    if (d.classList.contains(DEFAULT_TITLE)) continue;\n                    backButtonWidth += d.offsetWidth;\n                  } else {\n                    if (d.classList.contains(PREVIOUS_TITLE)) continue;\n                    backButtonWidth += d.offsetWidth;\n                  }\n                }\n\n              } else {\n                backButtonWidth += b.offsetWidth;\n              }\n\n            } else if (b.nodeType == 3 && b.nodeValue.trim()) {\n              bounds = ionic.DomUtil.getTextBounds(b);\n              backButtonWidth += bounds && bounds.width || 0;\n            }\n\n          }\n          childSize = backButtonWidth || c.offsetWidth;\n\n        } else {\n          // not the title, not the back button, not a hidden element\n          childSize = c.offsetWidth;\n        }\n\n      } else if (c.nodeType == 3 && c.nodeValue.trim()) {\n        // text node\n        bounds = ionic.DomUtil.getTextBounds(c);\n        childSize = bounds && bounds.width || 0;\n      }\n\n      if (isCountRightOfTitle) {\n        buttonsRight += childSize;\n      } else {\n        buttonsLeft += childSize;\n      }\n    }\n\n    // Size and align the header titleEle based on the sizes of the left and\n    // right children, and the desired alignment mode\n    if (textAlign == 'left') {\n      updateCss = 'title-left';\n      if (buttonsLeft) {\n        updateTitleLeft = buttonsLeft + 15;\n      }\n      if (buttonsRight) {\n        updateTitleRight = buttonsRight + 15;\n      }\n\n    } else if (textAlign == 'right') {\n      updateCss = 'title-right';\n      if (buttonsLeft) {\n        updateTitleLeft = buttonsLeft + 15;\n      }\n      if (buttonsRight) {\n        updateTitleRight = buttonsRight + 15;\n      }\n\n    } else {\n      // center the default\n      var margin = Math.max(buttonsLeft, buttonsRight) + 10;\n      if (margin > 10) {\n        updateTitleLeft = updateTitleRight = margin;\n      }\n    }\n\n    return {\n      backButtonWidth: backButtonWidth,\n      buttonsLeft: buttonsLeft,\n      buttonsRight: buttonsRight,\n      titleLeft: updateTitleLeft,\n      titleRight: updateTitleRight,\n      showPrevTitle: isPreviousTitle,\n      css: updateCss\n    };\n  };\n\n\n  self.updatePositions = function(titleEle, updateTitleLeft, updateTitleRight, buttonsLeft, buttonsRight, updateCss, showPreviousTitle) {\n    var deferred = $q.defer();\n\n    // only make DOM updates when there are actual changes\n    if (titleEle) {\n      if (updateTitleLeft !== titleLeft) {\n        titleEle.style.left = updateTitleLeft ? updateTitleLeft + 'px' : '';\n        titleLeft = updateTitleLeft;\n      }\n      if (updateTitleRight !== titleRight) {\n        titleEle.style.right = updateTitleRight ? updateTitleRight + 'px' : '';\n        titleRight = updateTitleRight;\n      }\n\n      if (updateCss !== titleCss) {\n        updateCss && titleEle.classList.add(updateCss);\n        titleCss && titleEle.classList.remove(titleCss);\n        titleCss = updateCss;\n      }\n    }\n\n    if ($ionicConfig.backButton.previousTitleText()) {\n      var prevTitle = getEle(PREVIOUS_TITLE);\n      var defaultTitle = getEle(DEFAULT_TITLE);\n\n      prevTitle && prevTitle.classList[ showPreviousTitle ? 'remove' : 'add'](HIDE);\n      defaultTitle && defaultTitle.classList[ showPreviousTitle ? 'add' : 'remove'](HIDE);\n    }\n\n    ionic.requestAnimationFrame(function() {\n      if (titleEle && titleEle.offsetWidth + 10 < titleEle.scrollWidth) {\n        var minRight = buttonsRight + 5;\n        var testRight = $element[0].offsetWidth - titleLeft - self.titleTextWidth() - 20;\n        updateTitleRight = testRight < minRight ? minRight : testRight;\n        if (updateTitleRight !== titleRight) {\n          titleEle.style.right = updateTitleRight + 'px';\n          titleRight = updateTitleRight;\n        }\n      }\n      deferred.resolve();\n    });\n\n    return deferred.promise;\n  };\n\n\n  self.setCss = function(elementClassname, css) {\n    ionic.DomUtil.cachedStyles(getEle(elementClassname), css);\n  };\n\n\n  var eleCache = {};\n  function getEle(className) {\n    if (!eleCache[className]) {\n      eleCache[className] = $element[0].querySelector('.' + className);\n    }\n    return eleCache[className];\n  }\n\n\n  $scope.$on('$destroy', function() {\n    for (var n in eleCache) eleCache[n] = null;\n  });\n\n}]);\n\nIonicModule\n.controller('$ionInfiniteScroll', [\n  '$scope',\n  '$attrs',\n  '$element',\n  '$timeout',\nfunction($scope, $attrs, $element, $timeout) {\n  var self = this;\n  self.isLoading = false;\n\n  $scope.icon = function() {\n    return isDefined($attrs.icon) ? $attrs.icon : 'ion-load-d';\n  };\n\n  $scope.spinner = function() {\n    return isDefined($attrs.spinner) ? $attrs.spinner : '';\n  };\n\n  $scope.$on('scroll.infiniteScrollComplete', function() {\n    finishInfiniteScroll();\n  });\n\n  $scope.$on('$destroy', function() {\n    if (self.scrollCtrl && self.scrollCtrl.$element) self.scrollCtrl.$element.off('scroll', self.checkBounds);\n    if (self.scrollEl && self.scrollEl.removeEventListener) {\n      self.scrollEl.removeEventListener('scroll', self.checkBounds);\n    }\n  });\n\n  // debounce checking infinite scroll events\n  self.checkBounds = ionic.Utils.throttle(checkInfiniteBounds, 300);\n\n  function onInfinite() {\n    ionic.requestAnimationFrame(function() {\n      $element[0].classList.add('active');\n    });\n    self.isLoading = true;\n    $scope.$parent && $scope.$parent.$apply($attrs.onInfinite || '');\n  }\n\n  function finishInfiniteScroll() {\n    ionic.requestAnimationFrame(function() {\n      $element[0].classList.remove('active');\n    });\n    $timeout(function() {\n      if (self.jsScrolling) self.scrollView.resize();\n      // only check bounds again immediately if the page isn't cached (scroll el has height)\n      if ((self.jsScrolling && self.scrollView.__container && self.scrollView.__container.offsetHeight > 0) ||\n      !self.jsScrolling) {\n        self.checkBounds();\n      }\n    }, 30, false);\n    self.isLoading = false;\n  }\n\n  // check if we've scrolled far enough to trigger an infinite scroll\n  function checkInfiniteBounds() {\n    if (self.isLoading) return;\n    var maxScroll = {};\n\n    if (self.jsScrolling) {\n      maxScroll = self.getJSMaxScroll();\n      var scrollValues = self.scrollView.getValues();\n      if ((maxScroll.left !== -1 && scrollValues.left >= maxScroll.left) ||\n        (maxScroll.top !== -1 && scrollValues.top >= maxScroll.top)) {\n        onInfinite();\n      }\n    } else {\n      maxScroll = self.getNativeMaxScroll();\n      if ((\n        maxScroll.left !== -1 &&\n        self.scrollEl.scrollLeft >= maxScroll.left - self.scrollEl.clientWidth\n        ) || (\n        maxScroll.top !== -1 &&\n        self.scrollEl.scrollTop >= maxScroll.top - self.scrollEl.clientHeight\n        )) {\n        onInfinite();\n      }\n    }\n  }\n\n  // determine the threshold at which we should fire an infinite scroll\n  // note: this gets processed every scroll event, can it be cached?\n  self.getJSMaxScroll = function() {\n    var maxValues = self.scrollView.getScrollMax();\n    return {\n      left: self.scrollView.options.scrollingX ?\n        calculateMaxValue(maxValues.left) :\n        -1,\n      top: self.scrollView.options.scrollingY ?\n        calculateMaxValue(maxValues.top) :\n        -1\n    };\n  };\n\n  self.getNativeMaxScroll = function() {\n    var maxValues = {\n      left: self.scrollEl.scrollWidth,\n      top: self.scrollEl.scrollHeight\n    };\n    var computedStyle = window.getComputedStyle(self.scrollEl) || {};\n    return {\n      left: maxValues.left &&\n        (computedStyle.overflowX === 'scroll' ||\n        computedStyle.overflowX === 'auto' ||\n        self.scrollEl.style['overflow-x'] === 'scroll') ?\n        calculateMaxValue(maxValues.left) : -1,\n      top: maxValues.top &&\n        (computedStyle.overflowY === 'scroll' ||\n        computedStyle.overflowY === 'auto' ||\n        self.scrollEl.style['overflow-y'] === 'scroll' ) ?\n        calculateMaxValue(maxValues.top) : -1\n    };\n  };\n\n  // determine pixel refresh distance based on % or value\n  function calculateMaxValue(maximum) {\n    var distance = ($attrs.distance || '2.5%').trim();\n    var isPercent = distance.indexOf('%') !== -1;\n    return isPercent ?\n    maximum * (1 - parseFloat(distance) / 100) :\n    maximum - parseFloat(distance);\n  }\n\n  //for testing\n  self.__finishInfiniteScroll = finishInfiniteScroll;\n\n}]);\n\n/**\n * @ngdoc service\n * @name $ionicListDelegate\n * @module ionic\n *\n * @description\n * Delegate for controlling the {@link ionic.directive:ionList} directive.\n *\n * Methods called directly on the $ionicListDelegate service will control all lists.\n * Use the {@link ionic.service:$ionicListDelegate#$getByHandle $getByHandle}\n * method to control specific ionList instances.\n *\n * @usage\n * ```html\n * {% raw %}\n * <ion-content ng-controller=\"MyCtrl\">\n *   <button class=\"button\" ng-click=\"showDeleteButtons()\"></button>\n *   <ion-list>\n *     <ion-item ng-repeat=\"i in items\">\n *       Hello, {{i}}!\n *       <ion-delete-button class=\"ion-minus-circled\"></ion-delete-button>\n *     </ion-item>\n *   </ion-list>\n * </ion-content>\n * {% endraw %}\n * ```\n\n * ```js\n * function MyCtrl($scope, $ionicListDelegate) {\n *   $scope.showDeleteButtons = function() {\n *     $ionicListDelegate.showDelete(true);\n *   };\n * }\n * ```\n */\nIonicModule.service('$ionicListDelegate', ionic.DelegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicListDelegate#showReorder\n   * @param {boolean=} showReorder Set whether or not this list is showing its reorder buttons.\n   * @returns {boolean} Whether the reorder buttons are shown.\n   */\n  'showReorder',\n  /**\n   * @ngdoc method\n   * @name $ionicListDelegate#showDelete\n   * @param {boolean=} showDelete Set whether or not this list is showing its delete buttons.\n   * @returns {boolean} Whether the delete buttons are shown.\n   */\n  'showDelete',\n  /**\n   * @ngdoc method\n   * @name $ionicListDelegate#canSwipeItems\n   * @param {boolean=} canSwipeItems Set whether or not this list is able to swipe to show\n   * option buttons.\n   * @returns {boolean} Whether the list is able to swipe to show option buttons.\n   */\n  'canSwipeItems',\n  /**\n   * @ngdoc method\n   * @name $ionicListDelegate#closeOptionButtons\n   * @description Closes any option buttons on the list that are swiped open.\n   */\n  'closeOptionButtons'\n  /**\n   * @ngdoc method\n   * @name $ionicListDelegate#$getByHandle\n   * @param {string} handle\n   * @returns `delegateInstance` A delegate instance that controls only the\n   * {@link ionic.directive:ionList} directives with `delegate-handle` matching\n   * the given handle.\n   *\n   * Example: `$ionicListDelegate.$getByHandle('my-handle').showReorder(true);`\n   */\n]))\n\n.controller('$ionicList', [\n  '$scope',\n  '$attrs',\n  '$ionicListDelegate',\n  '$ionicHistory',\nfunction($scope, $attrs, $ionicListDelegate, $ionicHistory) {\n  var self = this;\n  var isSwipeable = true;\n  var isReorderShown = false;\n  var isDeleteShown = false;\n\n  var deregisterInstance = $ionicListDelegate._registerInstance(\n    self, $attrs.delegateHandle, function() {\n      return $ionicHistory.isActiveScope($scope);\n    }\n  );\n  $scope.$on('$destroy', deregisterInstance);\n\n  self.showReorder = function(show) {\n    if (arguments.length) {\n      isReorderShown = !!show;\n    }\n    return isReorderShown;\n  };\n\n  self.showDelete = function(show) {\n    if (arguments.length) {\n      isDeleteShown = !!show;\n    }\n    return isDeleteShown;\n  };\n\n  self.canSwipeItems = function(can) {\n    if (arguments.length) {\n      isSwipeable = !!can;\n    }\n    return isSwipeable;\n  };\n\n  self.closeOptionButtons = function() {\n    self.listView && self.listView.clearDragEffects();\n  };\n}]);\n\nIonicModule\n\n.controller('$ionicNavBar', [\n  '$scope',\n  '$element',\n  '$attrs',\n  '$compile',\n  '$timeout',\n  '$ionicNavBarDelegate',\n  '$ionicConfig',\n  '$ionicHistory',\nfunction($scope, $element, $attrs, $compile, $timeout, $ionicNavBarDelegate, $ionicConfig, $ionicHistory) {\n\n  var CSS_HIDE = 'hide';\n  var DATA_NAV_BAR_CTRL = '$ionNavBarController';\n  var PRIMARY_BUTTONS = 'primaryButtons';\n  var SECONDARY_BUTTONS = 'secondaryButtons';\n  var BACK_BUTTON = 'backButton';\n  var ITEM_TYPES = 'primaryButtons secondaryButtons leftButtons rightButtons title'.split(' ');\n\n  var self = this;\n  var headerBars = [];\n  var navElementHtml = {};\n  var isVisible = true;\n  var queuedTransitionStart, queuedTransitionEnd, latestTransitionId;\n\n  $element.parent().data(DATA_NAV_BAR_CTRL, self);\n\n  var delegateHandle = $attrs.delegateHandle || 'navBar' + ionic.Utils.nextUid();\n\n  var deregisterInstance = $ionicNavBarDelegate._registerInstance(self, delegateHandle);\n\n\n  self.init = function() {\n    $element.addClass('nav-bar-container');\n    ionic.DomUtil.cachedAttr($element, 'nav-bar-transition', $ionicConfig.views.transition());\n\n    // create two nav bar blocks which will trade out which one is shown\n    self.createHeaderBar(false);\n    self.createHeaderBar(true);\n\n    $scope.$emit('ionNavBar.init', delegateHandle);\n  };\n\n\n  self.createHeaderBar = function(isActive) {\n    var containerEle = jqLite('<div class=\"nav-bar-block\">');\n    ionic.DomUtil.cachedAttr(containerEle, 'nav-bar', isActive ? 'active' : 'cached');\n\n    var alignTitle = $attrs.alignTitle || $ionicConfig.navBar.alignTitle();\n    var headerBarEle = jqLite('<ion-header-bar>').addClass($attrs['class']).attr('align-title', alignTitle);\n    if (isDefined($attrs.noTapScroll)) headerBarEle.attr('no-tap-scroll', $attrs.noTapScroll);\n    var titleEle = jqLite('<div class=\"title title-' + alignTitle + '\">');\n    var navEle = {};\n    var lastViewItemEle = {};\n    var leftButtonsEle, rightButtonsEle;\n\n    navEle[BACK_BUTTON] = createNavElement(BACK_BUTTON);\n    navEle[BACK_BUTTON] && headerBarEle.append(navEle[BACK_BUTTON]);\n\n    // append title in the header, this is the rock to where buttons append\n    headerBarEle.append(titleEle);\n\n    forEach(ITEM_TYPES, function(itemType) {\n      // create default button elements\n      navEle[itemType] = createNavElement(itemType);\n      // append and position buttons\n      positionItem(navEle[itemType], itemType);\n    });\n\n    // add header-item to the root children\n    for (var x = 0; x < headerBarEle[0].children.length; x++) {\n      headerBarEle[0].children[x].classList.add('header-item');\n    }\n\n    // compile header and append to the DOM\n    containerEle.append(headerBarEle);\n    $element.append($compile(containerEle)($scope.$new()));\n\n    var headerBarCtrl = headerBarEle.data('$ionHeaderBarController');\n    headerBarCtrl.backButtonIcon = $ionicConfig.backButton.icon();\n    headerBarCtrl.backButtonText = $ionicConfig.backButton.text();\n\n    var headerBarInstance = {\n      isActive: isActive,\n      title: function(newTitleText) {\n        headerBarCtrl.title(newTitleText);\n      },\n      setItem: function(navBarItemEle, itemType) {\n        // first make sure any exiting nav bar item has been removed\n        headerBarInstance.removeItem(itemType);\n\n        if (navBarItemEle) {\n          if (itemType === 'title') {\n            // clear out the text based title\n            headerBarInstance.title(\"\");\n          }\n\n          // there's a custom nav bar item\n          positionItem(navBarItemEle, itemType);\n\n          if (navEle[itemType]) {\n            // make sure the default on this itemType is hidden\n            navEle[itemType].addClass(CSS_HIDE);\n          }\n          lastViewItemEle[itemType] = navBarItemEle;\n\n        } else if (navEle[itemType]) {\n          // there's a default button for this side and no view button\n          navEle[itemType].removeClass(CSS_HIDE);\n        }\n      },\n      removeItem: function(itemType) {\n        if (lastViewItemEle[itemType]) {\n          lastViewItemEle[itemType].scope().$destroy();\n          lastViewItemEle[itemType].remove();\n          lastViewItemEle[itemType] = null;\n        }\n      },\n      containerEle: function() {\n        return containerEle;\n      },\n      headerBarEle: function() {\n        return headerBarEle;\n      },\n      afterLeave: function() {\n        forEach(ITEM_TYPES, function(itemType) {\n          headerBarInstance.removeItem(itemType);\n        });\n        headerBarCtrl.resetBackButton();\n      },\n      controller: function() {\n        return headerBarCtrl;\n      },\n      destroy: function() {\n        forEach(ITEM_TYPES, function(itemType) {\n          headerBarInstance.removeItem(itemType);\n        });\n        containerEle.scope().$destroy();\n        for (var n in navEle) {\n          if (navEle[n]) {\n            navEle[n].removeData();\n            navEle[n] = null;\n          }\n        }\n        leftButtonsEle && leftButtonsEle.removeData();\n        rightButtonsEle && rightButtonsEle.removeData();\n        titleEle.removeData();\n        headerBarEle.removeData();\n        containerEle.remove();\n        containerEle = headerBarEle = titleEle = leftButtonsEle = rightButtonsEle = null;\n      }\n    };\n\n    function positionItem(ele, itemType) {\n      if (!ele) return;\n\n      if (itemType === 'title') {\n        // title element\n        titleEle.append(ele);\n\n      } else if (itemType == 'rightButtons' ||\n                (itemType == SECONDARY_BUTTONS && $ionicConfig.navBar.positionSecondaryButtons() != 'left') ||\n                (itemType == PRIMARY_BUTTONS && $ionicConfig.navBar.positionPrimaryButtons() == 'right')) {\n        // right side\n        if (!rightButtonsEle) {\n          rightButtonsEle = jqLite('<div class=\"buttons buttons-right\">');\n          headerBarEle.append(rightButtonsEle);\n        }\n        if (itemType == SECONDARY_BUTTONS) {\n          rightButtonsEle.append(ele);\n        } else {\n          rightButtonsEle.prepend(ele);\n        }\n\n      } else {\n        // left side\n        if (!leftButtonsEle) {\n          leftButtonsEle = jqLite('<div class=\"buttons buttons-left\">');\n          if (navEle[BACK_BUTTON]) {\n            navEle[BACK_BUTTON].after(leftButtonsEle);\n          } else {\n            headerBarEle.prepend(leftButtonsEle);\n          }\n        }\n        if (itemType == SECONDARY_BUTTONS) {\n          leftButtonsEle.append(ele);\n        } else {\n          leftButtonsEle.prepend(ele);\n        }\n      }\n\n    }\n\n    headerBars.push(headerBarInstance);\n\n    return headerBarInstance;\n  };\n\n\n  self.navElement = function(type, html) {\n    if (isDefined(html)) {\n      navElementHtml[type] = html;\n    }\n    return navElementHtml[type];\n  };\n\n\n  self.update = function(viewData) {\n    var showNavBar = !viewData.hasHeaderBar && viewData.showNavBar;\n    viewData.transition = $ionicConfig.views.transition();\n\n    if (!showNavBar) {\n      viewData.direction = 'none';\n    }\n\n    self.enable(showNavBar);\n    var enteringHeaderBar = self.isInitialized ? getOffScreenHeaderBar() : getOnScreenHeaderBar();\n    var leavingHeaderBar = self.isInitialized ? getOnScreenHeaderBar() : null;\n    var enteringHeaderCtrl = enteringHeaderBar.controller();\n\n    // update if the entering header should show the back button or not\n    enteringHeaderCtrl.enableBack(viewData.enableBack, true);\n    enteringHeaderCtrl.showBack(viewData.showBack, true);\n    enteringHeaderCtrl.updateBackButton();\n\n    // update the entering header bar's title\n    self.title(viewData.title, enteringHeaderBar);\n\n    self.showBar(showNavBar);\n\n    // update the nav bar items, depending if the view has their own or not\n    if (viewData.navBarItems) {\n      forEach(ITEM_TYPES, function(itemType) {\n        enteringHeaderBar.setItem(viewData.navBarItems[itemType], itemType);\n      });\n    }\n\n    // begin transition of entering and leaving header bars\n    self.transition(enteringHeaderBar, leavingHeaderBar, viewData);\n\n    self.isInitialized = true;\n    navSwipeAttr('');\n  };\n\n\n  self.transition = function(enteringHeaderBar, leavingHeaderBar, viewData) {\n    var enteringHeaderBarCtrl = enteringHeaderBar.controller();\n    var transitionFn = $ionicConfig.transitions.navBar[viewData.navBarTransition] || $ionicConfig.transitions.navBar.none;\n    var transitionId = viewData.transitionId;\n\n    enteringHeaderBarCtrl.beforeEnter(viewData);\n\n    var navBarTransition = transitionFn(enteringHeaderBar, leavingHeaderBar, viewData.direction, viewData.shouldAnimate && self.isInitialized);\n\n    ionic.DomUtil.cachedAttr($element, 'nav-bar-transition', viewData.navBarTransition);\n    ionic.DomUtil.cachedAttr($element, 'nav-bar-direction', viewData.direction);\n\n    if (navBarTransition.shouldAnimate && viewData.renderEnd) {\n      navBarAttr(enteringHeaderBar, 'stage');\n    } else {\n      navBarAttr(enteringHeaderBar, 'entering');\n      navBarAttr(leavingHeaderBar, 'leaving');\n    }\n\n    enteringHeaderBarCtrl.resetBackButton(viewData);\n\n    navBarTransition.run(0);\n\n    self.activeTransition = {\n      run: function(step) {\n        navBarTransition.shouldAnimate = false;\n        navBarTransition.direction = 'back';\n        navBarTransition.run(step);\n      },\n      cancel: function(shouldAnimate, speed, cancelData) {\n        navSwipeAttr(speed);\n        navBarAttr(leavingHeaderBar, 'active');\n        navBarAttr(enteringHeaderBar, 'cached');\n        navBarTransition.shouldAnimate = shouldAnimate;\n        navBarTransition.run(0);\n        self.activeTransition = navBarTransition = null;\n\n        var runApply;\n        if (cancelData.showBar !== self.showBar()) {\n          self.showBar(cancelData.showBar);\n        }\n        if (cancelData.showBackButton !== self.showBackButton()) {\n          self.showBackButton(cancelData.showBackButton);\n        }\n        if (runApply) {\n          $scope.$apply();\n        }\n      },\n      complete: function(shouldAnimate, speed) {\n        navSwipeAttr(speed);\n        navBarTransition.shouldAnimate = shouldAnimate;\n        navBarTransition.run(1);\n        queuedTransitionEnd = transitionEnd;\n      }\n    };\n\n    $timeout(enteringHeaderBarCtrl.align, 16);\n\n    queuedTransitionStart = function() {\n      if (latestTransitionId !== transitionId) return;\n\n      navBarAttr(enteringHeaderBar, 'entering');\n      navBarAttr(leavingHeaderBar, 'leaving');\n\n      navBarTransition.run(1);\n\n      queuedTransitionEnd = function() {\n        if (latestTransitionId == transitionId || !navBarTransition.shouldAnimate) {\n          transitionEnd();\n        }\n      };\n\n      queuedTransitionStart = null;\n    };\n\n    function transitionEnd() {\n      for (var x = 0; x < headerBars.length; x++) {\n        headerBars[x].isActive = false;\n      }\n      enteringHeaderBar.isActive = true;\n\n      navBarAttr(enteringHeaderBar, 'active');\n      navBarAttr(leavingHeaderBar, 'cached');\n\n      self.activeTransition = navBarTransition = queuedTransitionEnd = null;\n    }\n\n    queuedTransitionStart();\n  };\n\n\n  self.triggerTransitionStart = function(triggerTransitionId) {\n    latestTransitionId = triggerTransitionId;\n    queuedTransitionStart && queuedTransitionStart();\n  };\n\n\n  self.triggerTransitionEnd = function() {\n    queuedTransitionEnd && queuedTransitionEnd();\n  };\n\n\n  self.showBar = function(shouldShow) {\n    if (arguments.length) {\n      self.visibleBar(shouldShow);\n      $scope.$parent.$hasHeader = !!shouldShow;\n    }\n    return !!$scope.$parent.$hasHeader;\n  };\n\n\n  self.visibleBar = function(shouldShow) {\n    if (shouldShow && !isVisible) {\n      $element.removeClass(CSS_HIDE);\n      self.align();\n    } else if (!shouldShow && isVisible) {\n      $element.addClass(CSS_HIDE);\n    }\n    isVisible = shouldShow;\n  };\n\n\n  self.enable = function(val) {\n    // set primary to show first\n    self.visibleBar(val);\n\n    // set non primary to hide second\n    for (var x = 0; x < $ionicNavBarDelegate._instances.length; x++) {\n      if ($ionicNavBarDelegate._instances[x] !== self) $ionicNavBarDelegate._instances[x].visibleBar(false);\n    }\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name $ionicNavBar#showBackButton\n   * @description Show/hide the nav bar back button when there is a\n   * back view. If the back button is not possible, for example, the\n   * first view in the stack, then this will not force the back button\n   * to show.\n   */\n  self.showBackButton = function(shouldShow) {\n    if (arguments.length) {\n      for (var x = 0; x < headerBars.length; x++) {\n        headerBars[x].controller().showNavBack(!!shouldShow);\n      }\n      $scope.$isBackButtonShown = !!shouldShow;\n    }\n    return $scope.$isBackButtonShown;\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name $ionicNavBar#showActiveBackButton\n   * @description Show/hide only the active header bar's back button.\n   */\n  self.showActiveBackButton = function(shouldShow) {\n    var headerBar = getOnScreenHeaderBar();\n    if (headerBar) {\n      if (arguments.length) {\n        return headerBar.controller().showBack(shouldShow);\n      }\n      return headerBar.controller().showBack();\n    }\n  };\n\n\n  self.title = function(newTitleText, headerBar) {\n    if (isDefined(newTitleText)) {\n      newTitleText = newTitleText || '';\n      headerBar = headerBar || getOnScreenHeaderBar();\n      headerBar && headerBar.title(newTitleText);\n      $scope.$title = newTitleText;\n      $ionicHistory.currentTitle(newTitleText);\n    }\n    return $scope.$title;\n  };\n\n\n  self.align = function(val, headerBar) {\n    headerBar = headerBar || getOnScreenHeaderBar();\n    headerBar && headerBar.controller().align(val);\n  };\n\n\n  self.hasTabsTop = function(isTabsTop) {\n    $element[isTabsTop ? 'addClass' : 'removeClass']('nav-bar-tabs-top');\n  };\n\n  self.hasBarSubheader = function(isBarSubheader) {\n    $element[isBarSubheader ? 'addClass' : 'removeClass']('nav-bar-has-subheader');\n  };\n\n  // DEPRECATED, as of v1.0.0-beta14 -------\n  self.changeTitle = function(val) {\n    deprecatedWarning('changeTitle(val)', 'title(val)');\n    self.title(val);\n  };\n  self.setTitle = function(val) {\n    deprecatedWarning('setTitle(val)', 'title(val)');\n    self.title(val);\n  };\n  self.getTitle = function() {\n    deprecatedWarning('getTitle()', 'title()');\n    return self.title();\n  };\n  self.back = function() {\n    deprecatedWarning('back()', '$ionicHistory.goBack()');\n    $ionicHistory.goBack();\n  };\n  self.getPreviousTitle = function() {\n    deprecatedWarning('getPreviousTitle()', '$ionicHistory.backTitle()');\n    $ionicHistory.goBack();\n  };\n  function deprecatedWarning(oldMethod, newMethod) {\n    var warn = console.warn || console.log;\n    warn && warn.call(console, 'navBarController.' + oldMethod + ' is deprecated, please use ' + newMethod + ' instead');\n  }\n  // END DEPRECATED -------\n\n\n  function createNavElement(type) {\n    if (navElementHtml[type]) {\n      return jqLite(navElementHtml[type]);\n    }\n  }\n\n\n  function getOnScreenHeaderBar() {\n    for (var x = 0; x < headerBars.length; x++) {\n      if (headerBars[x].isActive) return headerBars[x];\n    }\n  }\n\n\n  function getOffScreenHeaderBar() {\n    for (var x = 0; x < headerBars.length; x++) {\n      if (!headerBars[x].isActive) return headerBars[x];\n    }\n  }\n\n\n  function navBarAttr(ctrl, val) {\n    ctrl && ionic.DomUtil.cachedAttr(ctrl.containerEle(), 'nav-bar', val);\n  }\n\n  function navSwipeAttr(val) {\n    ionic.DomUtil.cachedAttr($element, 'nav-swipe', val);\n  }\n\n\n  $scope.$on('$destroy', function() {\n    $scope.$parent.$hasHeader = false;\n    $element.parent().removeData(DATA_NAV_BAR_CTRL);\n    for (var x = 0; x < headerBars.length; x++) {\n      headerBars[x].destroy();\n    }\n    $element.remove();\n    $element = headerBars = null;\n    deregisterInstance();\n  });\n\n}]);\n\nIonicModule\n.controller('$ionicNavView', [\n  '$scope',\n  '$element',\n  '$attrs',\n  '$compile',\n  '$controller',\n  '$ionicNavBarDelegate',\n  '$ionicNavViewDelegate',\n  '$ionicHistory',\n  '$ionicViewSwitcher',\n  '$ionicConfig',\n  '$ionicScrollDelegate',\n  '$ionicSideMenuDelegate',\nfunction($scope, $element, $attrs, $compile, $controller, $ionicNavBarDelegate, $ionicNavViewDelegate, $ionicHistory, $ionicViewSwitcher, $ionicConfig, $ionicScrollDelegate, $ionicSideMenuDelegate) {\n\n  var DATA_ELE_IDENTIFIER = '$eleId';\n  var DATA_DESTROY_ELE = '$destroyEle';\n  var DATA_NO_CACHE = '$noCache';\n  var VIEW_STATUS_ACTIVE = 'active';\n  var VIEW_STATUS_CACHED = 'cached';\n\n  var self = this;\n  var direction;\n  var isPrimary = false;\n  var navBarDelegate;\n  var activeEleId;\n  var navViewAttr = $ionicViewSwitcher.navViewAttr;\n  var disableRenderStartViewId, disableAnimation;\n\n  self.scope = $scope;\n  self.element = $element;\n\n  self.init = function() {\n    var navViewName = $attrs.name || '';\n\n    // Find the details of the parent view directive (if any) and use it\n    // to derive our own qualified view name, then hang our own details\n    // off the DOM so child directives can find it.\n    var parent = $element.parent().inheritedData('$uiView');\n    var parentViewName = ((parent && parent.state) ? parent.state.name : '');\n    if (navViewName.indexOf('@') < 0) navViewName = navViewName + '@' + parentViewName;\n\n    var viewData = { name: navViewName, state: null };\n    $element.data('$uiView', viewData);\n\n    var deregisterInstance = $ionicNavViewDelegate._registerInstance(self, $attrs.delegateHandle);\n    $scope.$on('$destroy', function() {\n      deregisterInstance();\n\n      // ensure no scrolls have been left frozen\n      if (self.isSwipeFreeze) {\n        $ionicScrollDelegate.freezeAllScrolls(false);\n      }\n    });\n\n    $scope.$on('$ionicHistory.deselect', self.cacheCleanup);\n    $scope.$on('$ionicTabs.top', onTabsTop);\n    $scope.$on('$ionicSubheader', onBarSubheader);\n\n    $scope.$on('$ionicTabs.beforeLeave', onTabsLeave);\n    $scope.$on('$ionicTabs.afterLeave', onTabsLeave);\n    $scope.$on('$ionicTabs.leave', onTabsLeave);\n\n    ionic.Platform.ready(function() {\n      if ( ionic.Platform.isWebView() && ionic.Platform.isIOS() ) {\n          self.initSwipeBack();\n      }\n    });\n\n    return viewData;\n  };\n\n\n  self.register = function(viewLocals) {\n    var leavingView = extend({}, $ionicHistory.currentView());\n\n    // register that a view is coming in and get info on how it should transition\n    var registerData = $ionicHistory.register($scope, viewLocals);\n\n    // update which direction\n    self.update(registerData);\n\n    // begin rendering and transitioning\n    var enteringView = $ionicHistory.getViewById(registerData.viewId) || {};\n\n    var renderStart = (disableRenderStartViewId !== registerData.viewId);\n    self.render(registerData, viewLocals, enteringView, leavingView, renderStart, true);\n  };\n\n\n  self.update = function(registerData) {\n    // always reset that this is the primary navView\n    isPrimary = true;\n\n    // remember what direction this navView should use\n    // this may get updated later by a child navView\n    direction = registerData.direction;\n\n    var parentNavViewCtrl = $element.parent().inheritedData('$ionNavViewController');\n    if (parentNavViewCtrl) {\n      // this navView is nested inside another one\n      // update the parent to use this direction and not\n      // the other it originally was set to\n\n      // inform the parent navView that it is not the primary navView\n      parentNavViewCtrl.isPrimary(false);\n\n      if (direction === 'enter' || direction === 'exit') {\n        // they're entering/exiting a history\n        // find parent navViewController\n        parentNavViewCtrl.direction(direction);\n\n        if (direction === 'enter') {\n          // reset the direction so this navView doesn't animate\n          // because it's parent will\n          direction = 'none';\n        }\n      }\n    }\n  };\n\n\n  self.render = function(registerData, viewLocals, enteringView, leavingView, renderStart, renderEnd) {\n    // register the view and figure out where it lives in the various\n    // histories and nav stacks, along with how views should enter/leave\n    var switcher = $ionicViewSwitcher.create(self, viewLocals, enteringView, leavingView, renderStart, renderEnd);\n\n    // init the rendering of views for this navView directive\n    switcher.init(registerData, function() {\n      // the view is now compiled, in the dom and linked, now lets transition the views.\n      // this uses a callback incase THIS nav-view has a nested nav-view, and after the NESTED\n      // nav-view links, the NESTED nav-view would update which direction THIS nav-view should use\n\n      // kick off the transition of views\n      switcher.transition(self.direction(), registerData.enableBack, !disableAnimation);\n\n      // reset private vars for next time\n      disableRenderStartViewId = disableAnimation = null;\n    });\n\n  };\n\n\n  self.beforeEnter = function(transitionData) {\n    if (isPrimary) {\n      // only update this nav-view's nav-bar if this is the primary nav-view\n      navBarDelegate = transitionData.navBarDelegate;\n      var associatedNavBarCtrl = getAssociatedNavBarCtrl();\n      associatedNavBarCtrl && associatedNavBarCtrl.update(transitionData);\n      navSwipeAttr('');\n    }\n  };\n\n\n  self.activeEleId = function(eleId) {\n    if (arguments.length) {\n      activeEleId = eleId;\n    }\n    return activeEleId;\n  };\n\n\n  self.transitionEnd = function() {\n    var viewElements = $element.children();\n    var x, l, viewElement;\n\n    for (x = 0, l = viewElements.length; x < l; x++) {\n      viewElement = viewElements.eq(x);\n\n      if (viewElement.data(DATA_ELE_IDENTIFIER) === activeEleId) {\n        // this is the active element\n        navViewAttr(viewElement, VIEW_STATUS_ACTIVE);\n\n      } else if (navViewAttr(viewElement) === 'leaving' || navViewAttr(viewElement) === VIEW_STATUS_ACTIVE || navViewAttr(viewElement) === VIEW_STATUS_CACHED) {\n        // this is a leaving element or was the former active element, or is an cached element\n        if (viewElement.data(DATA_DESTROY_ELE) || viewElement.data(DATA_NO_CACHE)) {\n          // this element shouldn't stay cached\n          $ionicViewSwitcher.destroyViewEle(viewElement);\n\n        } else {\n          // keep in the DOM, mark as cached\n          navViewAttr(viewElement, VIEW_STATUS_CACHED);\n\n          // disconnect the leaving scope\n          ionic.Utils.disconnectScope(viewElement.scope());\n        }\n      }\n    }\n\n    navSwipeAttr('');\n\n    // ensure no scrolls have been left frozen\n    if (self.isSwipeFreeze) {\n      $ionicScrollDelegate.freezeAllScrolls(false);\n    }\n  };\n\n\n  function onTabsLeave(ev, data) {\n    var viewElements = $element.children();\n    var viewElement, viewScope;\n\n    for (var x = 0, l = viewElements.length; x < l; x++) {\n      viewElement = viewElements.eq(x);\n      if (navViewAttr(viewElement) == VIEW_STATUS_ACTIVE) {\n        viewScope = viewElement.scope();\n        viewScope && viewScope.$emit(ev.name.replace('Tabs', 'View'), data);\n        viewScope && viewScope.$broadcast(ev.name.replace('Tabs', 'ParentView'), data);\n        break;\n      }\n    }\n  }\n\n\n  self.cacheCleanup = function() {\n    var viewElements = $element.children();\n    for (var x = 0, l = viewElements.length; x < l; x++) {\n      if (viewElements.eq(x).data(DATA_DESTROY_ELE)) {\n        $ionicViewSwitcher.destroyViewEle(viewElements.eq(x));\n      }\n    }\n  };\n\n\n  self.clearCache = function(stateIds) {\n    var viewElements = $element.children();\n    var viewElement, viewScope, x, l, y, eleIdentifier;\n\n    for (x = 0, l = viewElements.length; x < l; x++) {\n      viewElement = viewElements.eq(x);\n\n      if (stateIds) {\n        eleIdentifier = viewElement.data(DATA_ELE_IDENTIFIER);\n\n        for (y = 0; y < stateIds.length; y++) {\n          if (eleIdentifier === stateIds[y]) {\n            $ionicViewSwitcher.destroyViewEle(viewElement);\n          }\n        }\n        continue;\n      }\n\n      if (navViewAttr(viewElement) == VIEW_STATUS_CACHED) {\n        $ionicViewSwitcher.destroyViewEle(viewElement);\n\n      } else if (navViewAttr(viewElement) == VIEW_STATUS_ACTIVE) {\n        viewScope = viewElement.scope();\n        viewScope && viewScope.$broadcast('$ionicView.clearCache');\n      }\n\n    }\n  };\n\n\n  self.getViewElements = function() {\n    return $element.children();\n  };\n\n\n  self.appendViewElement = function(viewEle, viewLocals) {\n    // compile the entering element and get the link function\n    var linkFn = $compile(viewEle);\n\n    $element.append(viewEle);\n\n    var viewScope = $scope.$new();\n\n    if (viewLocals && viewLocals.$$controller) {\n      viewLocals.$scope = viewScope;\n      var controller = $controller(viewLocals.$$controller, viewLocals);\n      if (viewLocals.$$controllerAs) {\n        viewScope[viewLocals.$$controllerAs] = controller;\n      }\n      $element.children().data('$ngControllerController', controller);\n    }\n\n    linkFn(viewScope);\n\n    return viewScope;\n  };\n\n\n  self.title = function(val) {\n    var associatedNavBarCtrl = getAssociatedNavBarCtrl();\n    associatedNavBarCtrl && associatedNavBarCtrl.title(val);\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name $ionicNavView#enableBackButton\n   * @description Enable/disable if the back button can be shown or not. For\n   * example, the very first view in the navigation stack would not have a\n   * back view, so the back button would be disabled.\n   */\n  self.enableBackButton = function(shouldEnable) {\n    var associatedNavBarCtrl = getAssociatedNavBarCtrl();\n    associatedNavBarCtrl && associatedNavBarCtrl.enableBackButton(shouldEnable);\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name $ionicNavView#showBackButton\n   * @description Show/hide the nav bar active back button. If the back button\n   * is not possible this will not force the back button to show. The\n   * `enableBackButton()` method handles if a back button is even possible or not.\n   */\n  self.showBackButton = function(shouldShow) {\n    var associatedNavBarCtrl = getAssociatedNavBarCtrl();\n    if (associatedNavBarCtrl) {\n      if (arguments.length) {\n        return associatedNavBarCtrl.showActiveBackButton(shouldShow);\n      }\n      return associatedNavBarCtrl.showActiveBackButton();\n    }\n    return true;\n  };\n\n\n  self.showBar = function(val) {\n    var associatedNavBarCtrl = getAssociatedNavBarCtrl();\n    if (associatedNavBarCtrl) {\n      if (arguments.length) {\n        return associatedNavBarCtrl.showBar(val);\n      }\n      return associatedNavBarCtrl.showBar();\n    }\n    return true;\n  };\n\n\n  self.isPrimary = function(val) {\n    if (arguments.length) {\n      isPrimary = val;\n    }\n    return isPrimary;\n  };\n\n\n  self.direction = function(val) {\n    if (arguments.length) {\n      direction = val;\n    }\n    return direction;\n  };\n\n\n  self.initSwipeBack = function() {\n    var swipeBackHitWidth = $ionicConfig.views.swipeBackHitWidth();\n    var viewTransition, associatedNavBarCtrl, backView;\n    var deregDragStart, deregDrag, deregRelease;\n    var windowWidth, startDragX, dragPoints;\n    var cancelData = {};\n\n    function onDragStart(ev) {\n      if (!isPrimary || !$ionicConfig.views.swipeBackEnabled() || $ionicSideMenuDelegate.isOpenRight() ) return;\n\n\n      startDragX = getDragX(ev);\n      if (startDragX > swipeBackHitWidth) return;\n\n      backView = $ionicHistory.backView();\n\n      var currentView = $ionicHistory.currentView();\n\n      if (!backView || backView.historyId !== currentView.historyId || currentView.canSwipeBack === false) return;\n\n      if (!windowWidth) windowWidth = window.innerWidth;\n\n      self.isSwipeFreeze = $ionicScrollDelegate.freezeAllScrolls(true);\n\n      var registerData = {\n        direction: 'back'\n      };\n\n      dragPoints = [];\n\n      cancelData = {\n        showBar: self.showBar(),\n        showBackButton: self.showBackButton()\n      };\n\n      var switcher = $ionicViewSwitcher.create(self, registerData, backView, currentView, true, false);\n      switcher.loadViewElements(registerData);\n      switcher.render(registerData);\n\n      viewTransition = switcher.transition('back', $ionicHistory.enabledBack(backView), true);\n\n      associatedNavBarCtrl = getAssociatedNavBarCtrl();\n\n      deregDrag = ionic.onGesture('drag', onDrag, $element[0]);\n      deregRelease = ionic.onGesture('release', onRelease, $element[0]);\n    }\n\n    function onDrag(ev) {\n      if (isPrimary && viewTransition) {\n        var dragX = getDragX(ev);\n\n        dragPoints.push({\n          t: Date.now(),\n          x: dragX\n        });\n\n        if (dragX >= windowWidth - 15) {\n          onRelease(ev);\n\n        } else {\n          var step = Math.min(Math.max(getSwipeCompletion(dragX), 0), 1);\n          viewTransition.run(step);\n          associatedNavBarCtrl && associatedNavBarCtrl.activeTransition && associatedNavBarCtrl.activeTransition.run(step);\n        }\n\n      }\n    }\n\n    function onRelease(ev) {\n      if (isPrimary && viewTransition && dragPoints && dragPoints.length > 1) {\n\n        var now = Date.now();\n        var releaseX = getDragX(ev);\n        var startDrag = dragPoints[dragPoints.length - 1];\n\n        for (var x = dragPoints.length - 2; x >= 0; x--) {\n          if (now - startDrag.t > 200) {\n            break;\n          }\n          startDrag = dragPoints[x];\n        }\n\n        var isSwipingRight = (releaseX >= dragPoints[dragPoints.length - 2].x);\n        var releaseSwipeCompletion = getSwipeCompletion(releaseX);\n        var velocity = Math.abs(startDrag.x - releaseX) / (now - startDrag.t);\n\n        // private variables because ui-router has no way to pass custom data using $state.go\n        disableRenderStartViewId = backView.viewId;\n        disableAnimation = (releaseSwipeCompletion < 0.03 || releaseSwipeCompletion > 0.97);\n\n        if (isSwipingRight && (releaseSwipeCompletion > 0.5 || velocity > 0.1)) {\n          // complete view transition on release\n          var speed = (velocity > 0.5 || velocity < 0.05 || releaseX > windowWidth - 45) ? 'fast' : 'slow';\n          navSwipeAttr(disableAnimation ? '' : speed);\n          backView.go();\n          associatedNavBarCtrl && associatedNavBarCtrl.activeTransition && associatedNavBarCtrl.activeTransition.complete(!disableAnimation, speed);\n\n        } else {\n          // cancel view transition on release\n          navSwipeAttr(disableAnimation ? '' : 'fast');\n          disableRenderStartViewId = null;\n          viewTransition.cancel(!disableAnimation);\n          associatedNavBarCtrl && associatedNavBarCtrl.activeTransition && associatedNavBarCtrl.activeTransition.cancel(!disableAnimation, 'fast', cancelData);\n          disableAnimation = null;\n        }\n\n      }\n\n      ionic.offGesture(deregDrag, 'drag', onDrag);\n      ionic.offGesture(deregRelease, 'release', onRelease);\n\n      windowWidth = viewTransition = dragPoints = null;\n\n      self.isSwipeFreeze = $ionicScrollDelegate.freezeAllScrolls(false);\n    }\n\n    function getDragX(ev) {\n      return ionic.tap.pointerCoord(ev.gesture.srcEvent).x;\n    }\n\n    function getSwipeCompletion(dragX) {\n      return (dragX - startDragX) / windowWidth;\n    }\n\n    deregDragStart = ionic.onGesture('dragstart', onDragStart, $element[0]);\n\n    $scope.$on('$destroy', function() {\n      ionic.offGesture(deregDragStart, 'dragstart', onDragStart);\n      ionic.offGesture(deregDrag, 'drag', onDrag);\n      ionic.offGesture(deregRelease, 'release', onRelease);\n      self.element = viewTransition = associatedNavBarCtrl = null;\n    });\n  };\n\n\n  function navSwipeAttr(val) {\n    ionic.DomUtil.cachedAttr($element, 'nav-swipe', val);\n  }\n\n\n  function onTabsTop(ev, isTabsTop) {\n    var associatedNavBarCtrl = getAssociatedNavBarCtrl();\n    associatedNavBarCtrl && associatedNavBarCtrl.hasTabsTop(isTabsTop);\n  }\n\n  function onBarSubheader(ev, isBarSubheader) {\n    var associatedNavBarCtrl = getAssociatedNavBarCtrl();\n    associatedNavBarCtrl && associatedNavBarCtrl.hasBarSubheader(isBarSubheader);\n  }\n\n  function getAssociatedNavBarCtrl() {\n    if (navBarDelegate) {\n      for (var x = 0; x < $ionicNavBarDelegate._instances.length; x++) {\n        if ($ionicNavBarDelegate._instances[x].$$delegateHandle == navBarDelegate) {\n          return $ionicNavBarDelegate._instances[x];\n        }\n      }\n    }\n    return $element.inheritedData('$ionNavBarController');\n  }\n\n}]);\n\nIonicModule\n.controller('$ionicRefresher', [\n  '$scope',\n  '$attrs',\n  '$element',\n  '$ionicBind',\n  '$timeout',\n  function($scope, $attrs, $element, $ionicBind, $timeout) {\n    var self = this,\n        isDragging = false,\n        isOverscrolling = false,\n        dragOffset = 0,\n        lastOverscroll = 0,\n        ptrThreshold = 60,\n        activated = false,\n        scrollTime = 500,\n        startY = null,\n        deltaY = null,\n        canOverscroll = true,\n        scrollParent,\n        scrollChild;\n\n    if (!isDefined($attrs.pullingIcon)) {\n      $attrs.$set('pullingIcon', 'ion-android-arrow-down');\n    }\n\n    $scope.showSpinner = !isDefined($attrs.refreshingIcon) && $attrs.spinner != 'none';\n\n    $scope.showIcon = isDefined($attrs.refreshingIcon);\n\n    $ionicBind($scope, $attrs, {\n      pullingIcon: '@',\n      pullingText: '@',\n      refreshingIcon: '@',\n      refreshingText: '@',\n      spinner: '@',\n      disablePullingRotation: '@',\n      $onRefresh: '&onRefresh',\n      $onPulling: '&onPulling'\n    });\n\n    function handleMousedown(e) {\n      e.touches = e.touches || [{\n        screenX: e.screenX,\n        screenY: e.screenY\n      }];\n      // Mouse needs this\n      startY = Math.floor(e.touches[0].screenY);\n    }\n\n    function handleTouchstart(e) {\n      e.touches = e.touches || [{\n        screenX: e.screenX,\n        screenY: e.screenY\n      }];\n\n      startY = e.touches[0].screenY;\n    }\n\n    function handleTouchend() {\n      // reset Y\n      startY = null;\n      // if this wasn't an overscroll, get out immediately\n      if (!canOverscroll && !isDragging) {\n        return;\n      }\n      // the user has overscrolled but went back to native scrolling\n      if (!isDragging) {\n        dragOffset = 0;\n        isOverscrolling = false;\n        setScrollLock(false);\n      } else {\n        isDragging = false;\n        dragOffset = 0;\n\n        // the user has scroll far enough to trigger a refresh\n        if (lastOverscroll > ptrThreshold) {\n          start();\n          scrollTo(ptrThreshold, scrollTime);\n\n        // the user has overscrolled but not far enough to trigger a refresh\n        } else {\n          scrollTo(0, scrollTime, deactivate);\n          isOverscrolling = false;\n        }\n      }\n    }\n\n    function handleTouchmove(e) {\n      e.touches = e.touches || [{\n        screenX: e.screenX,\n        screenY: e.screenY\n      }];\n\n      // Force mouse events to have had a down event first\n      if (!startY && e.type == 'mousemove') {\n        return;\n      }\n\n      // if multitouch or regular scroll event, get out immediately\n      if (!canOverscroll || e.touches.length > 1) {\n        return;\n      }\n      //if this is a new drag, keep track of where we start\n      if (startY === null) {\n        startY = e.touches[0].screenY;\n      }\n\n      deltaY = e.touches[0].screenY - startY;\n\n      // how far have we dragged so far?\n      // kitkat fix for touchcancel events http://updates.html5rocks.com/2014/05/A-More-Compatible-Smoother-Touch\n      // Only do this if we're not on crosswalk\n      if (ionic.Platform.isAndroid() && ionic.Platform.version() === 4.4 && !ionic.Platform.isCrosswalk() && scrollParent.scrollTop === 0 && deltaY > 0) {\n        isDragging = true;\n        e.preventDefault();\n      }\n\n\n      // if we've dragged up and back down in to native scroll territory\n      if (deltaY - dragOffset <= 0 || scrollParent.scrollTop !== 0) {\n\n        if (isOverscrolling) {\n          isOverscrolling = false;\n          setScrollLock(false);\n        }\n\n        if (isDragging) {\n          nativescroll(scrollParent, deltaY - dragOffset * -1);\n        }\n\n        // if we're not at overscroll 0 yet, 0 out\n        if (lastOverscroll !== 0) {\n          overscroll(0);\n        }\n        return;\n\n      } else if (deltaY > 0 && scrollParent.scrollTop === 0 && !isOverscrolling) {\n        // starting overscroll, but drag started below scrollTop 0, so we need to offset the position\n        dragOffset = deltaY;\n      }\n\n      // prevent native scroll events while overscrolling\n      e.preventDefault();\n\n      // if not overscrolling yet, initiate overscrolling\n      if (!isOverscrolling) {\n        isOverscrolling = true;\n        setScrollLock(true);\n      }\n\n      isDragging = true;\n      // overscroll according to the user's drag so far\n      overscroll((deltaY - dragOffset) / 3);\n\n      // update the icon accordingly\n      if (!activated && lastOverscroll > ptrThreshold) {\n        activated = true;\n        ionic.requestAnimationFrame(activate);\n\n      } else if (activated && lastOverscroll < ptrThreshold) {\n        activated = false;\n        ionic.requestAnimationFrame(deactivate);\n      }\n    }\n\n    function handleScroll(e) {\n      // canOverscrol is used to greatly simplify the drag handler during normal scrolling\n      canOverscroll = (e.target.scrollTop === 0) || isDragging;\n    }\n\n    function overscroll(val) {\n      scrollChild.style[ionic.CSS.TRANSFORM] = 'translate3d(0px, ' + val + 'px, 0px)';\n      lastOverscroll = val;\n    }\n\n    function nativescroll(target, newScrollTop) {\n      // creates a scroll event that bubbles, can be cancelled, and with its view\n      // and detail property initialized to window and 1, respectively\n      target.scrollTop = newScrollTop;\n      var e = document.createEvent(\"UIEvents\");\n      e.initUIEvent(\"scroll\", true, true, window, 1);\n      target.dispatchEvent(e);\n    }\n\n    function setScrollLock(enabled) {\n      // set the scrollbar to be position:fixed in preparation to overscroll\n      // or remove it so the app can be natively scrolled\n      if (enabled) {\n        ionic.requestAnimationFrame(function() {\n          scrollChild.classList.add('overscroll');\n          show();\n        });\n\n      } else {\n        ionic.requestAnimationFrame(function() {\n          scrollChild.classList.remove('overscroll');\n          hide();\n          deactivate();\n        });\n      }\n    }\n\n    $scope.$on('scroll.refreshComplete', function() {\n      // prevent the complete from firing before the scroll has started\n      $timeout(function() {\n\n        ionic.requestAnimationFrame(tail);\n\n        // scroll back to home during tail animation\n        scrollTo(0, scrollTime, deactivate);\n\n        // return to native scrolling after tail animation has time to finish\n        $timeout(function() {\n\n          if (isOverscrolling) {\n            isOverscrolling = false;\n            setScrollLock(false);\n          }\n\n        }, scrollTime);\n\n      }, scrollTime);\n    });\n\n    function scrollTo(Y, duration, callback) {\n      // scroll animation loop w/ easing\n      // credit https://gist.github.com/dezinezync/5487119\n      var start = Date.now(),\n          from = lastOverscroll;\n\n      if (from === Y) {\n        callback();\n        return; /* Prevent scrolling to the Y point if already there */\n      }\n\n      // decelerating to zero velocity\n      function easeOutCubic(t) {\n        return (--t) * t * t + 1;\n      }\n\n      // scroll loop\n      function scroll() {\n        var currentTime = Date.now(),\n          time = Math.min(1, ((currentTime - start) / duration)),\n          // where .5 would be 50% of time on a linear scale easedT gives a\n          // fraction based on the easing method\n          easedT = easeOutCubic(time);\n\n        overscroll(Math.floor((easedT * (Y - from)) + from));\n\n        if (time < 1) {\n          ionic.requestAnimationFrame(scroll);\n\n        } else {\n\n          if (Y < 5 && Y > -5) {\n            isOverscrolling = false;\n            setScrollLock(false);\n          }\n\n          callback && callback();\n        }\n      }\n\n      // start scroll loop\n      ionic.requestAnimationFrame(scroll);\n    }\n\n\n    var touchStartEvent, touchMoveEvent, touchEndEvent;\n    if (window.navigator.pointerEnabled) {\n      touchStartEvent = 'pointerdown';\n      touchMoveEvent = 'pointermove';\n      touchEndEvent = 'pointerup';\n    } else if (window.navigator.msPointerEnabled) {\n      touchStartEvent = 'MSPointerDown';\n      touchMoveEvent = 'MSPointerMove';\n      touchEndEvent = 'MSPointerUp';\n    } else {\n      touchStartEvent = 'touchstart';\n      touchMoveEvent = 'touchmove';\n      touchEndEvent = 'touchend';\n    }\n\n    self.init = function() {\n      scrollParent = $element.parent().parent()[0];\n      scrollChild = $element.parent()[0];\n\n      if (!scrollParent || !scrollParent.classList.contains('ionic-scroll') ||\n        !scrollChild || !scrollChild.classList.contains('scroll')) {\n        throw new Error('Refresher must be immediate child of ion-content or ion-scroll');\n      }\n\n\n      ionic.on(touchStartEvent, handleTouchstart, scrollChild);\n      ionic.on(touchMoveEvent, handleTouchmove, scrollChild);\n      ionic.on(touchEndEvent, handleTouchend, scrollChild);\n      ionic.on('mousedown', handleMousedown, scrollChild);\n      ionic.on('mousemove', handleTouchmove, scrollChild);\n      ionic.on('mouseup', handleTouchend, scrollChild);\n      ionic.on('scroll', handleScroll, scrollParent);\n\n      // cleanup when done\n      $scope.$on('$destroy', destroy);\n    };\n\n    function destroy() {\n      if ( scrollChild ) {\n        ionic.off(touchStartEvent, handleTouchstart, scrollChild);\n        ionic.off(touchMoveEvent, handleTouchmove, scrollChild);\n        ionic.off(touchEndEvent, handleTouchend, scrollChild);\n        ionic.off('mousedown', handleMousedown, scrollChild);\n        ionic.off('mousemove', handleTouchmove, scrollChild);\n        ionic.off('mouseup', handleTouchend, scrollChild);\n      }\n      if ( scrollParent ) {\n        ionic.off('scroll', handleScroll, scrollParent);\n      }\n      scrollParent = null;\n      scrollChild = null;\n    }\n\n    // DOM manipulation and broadcast methods shared by JS and Native Scrolling\n    // getter used by JS Scrolling\n    self.getRefresherDomMethods = function() {\n      return {\n        activate: activate,\n        deactivate: deactivate,\n        start: start,\n        show: show,\n        hide: hide,\n        tail: tail\n      };\n    };\n\n    function activate() {\n      $element[0].classList.add('active');\n      $scope.$onPulling();\n    }\n\n    function deactivate() {\n      // give tail 150ms to finish\n      $timeout(function() {\n        // deactivateCallback\n        $element.removeClass('active refreshing refreshing-tail');\n        if (activated) activated = false;\n      }, 150);\n    }\n\n    function start() {\n      // startCallback\n      $element[0].classList.add('refreshing');\n      var q = $scope.$onRefresh();\n\n      if (q && q.then) {\n        q['finally'](function() {\n          $scope.$broadcast('scroll.refreshComplete');\n        });\n      }\n    }\n\n    function show() {\n      // showCallback\n      $element[0].classList.remove('invisible');\n    }\n\n    function hide() {\n      // showCallback\n      $element[0].classList.add('invisible');\n    }\n\n    function tail() {\n      // tailCallback\n      $element[0].classList.add('refreshing-tail');\n    }\n\n    // for testing\n    self.__handleTouchmove = handleTouchmove;\n    self.__getScrollChild = function() { return scrollChild; };\n    self.__getScrollParent = function() { return scrollParent; };\n  }\n]);\n\n/**\n * @private\n */\nIonicModule\n\n.controller('$ionicScroll', [\n  '$scope',\n  'scrollViewOptions',\n  '$timeout',\n  '$window',\n  '$location',\n  '$document',\n  '$ionicScrollDelegate',\n  '$ionicHistory',\nfunction($scope,\n         scrollViewOptions,\n         $timeout,\n         $window,\n         $location,\n         $document,\n         $ionicScrollDelegate,\n         $ionicHistory) {\n\n  var self = this;\n  // for testing\n  self.__timeout = $timeout;\n\n  self._scrollViewOptions = scrollViewOptions; //for testing\n  self.isNative = function() {\n    return !!scrollViewOptions.nativeScrolling;\n  };\n\n  var element = self.element = scrollViewOptions.el;\n  var $element = self.$element = jqLite(element);\n  var scrollView;\n  if (self.isNative()) {\n    scrollView = self.scrollView = new ionic.views.ScrollNative(scrollViewOptions);\n  } else {\n    scrollView = self.scrollView = new ionic.views.Scroll(scrollViewOptions);\n  }\n\n\n  //Attach self to element as a controller so other directives can require this controller\n  //through `require: '$ionicScroll'\n  //Also attach to parent so that sibling elements can require this\n  ($element.parent().length ? $element.parent() : $element)\n    .data('$$ionicScrollController', self);\n\n  var deregisterInstance = $ionicScrollDelegate._registerInstance(\n    self, scrollViewOptions.delegateHandle, function() {\n      return $ionicHistory.isActiveScope($scope);\n    }\n  );\n\n  if (!isDefined(scrollViewOptions.bouncing)) {\n    ionic.Platform.ready(function() {\n      if (scrollView && scrollView.options) {\n        scrollView.options.bouncing = true;\n        if (ionic.Platform.isAndroid()) {\n          // No bouncing by default on Android\n          scrollView.options.bouncing = false;\n          // Faster scroll decel\n          scrollView.options.deceleration = 0.95;\n        }\n      }\n    });\n  }\n\n  var resize = angular.bind(scrollView, scrollView.resize);\n  angular.element($window).on('resize', resize);\n\n  var scrollFunc = function(e) {\n    var detail = (e.originalEvent || e).detail || {};\n    $scope.$onScroll && $scope.$onScroll({\n      event: e,\n      scrollTop: detail.scrollTop || 0,\n      scrollLeft: detail.scrollLeft || 0\n    });\n  };\n\n  $element.on('scroll', scrollFunc);\n\n  $scope.$on('$destroy', function() {\n    deregisterInstance();\n    scrollView && scrollView.__cleanup && scrollView.__cleanup();\n    angular.element($window).off('resize', resize);\n    if ( $element ) {\n      $element.off('scroll', scrollFunc);\n    }\n    if ( self._scrollViewOptions ) {\n      self._scrollViewOptions.el = null;\n    }\n    if ( scrollViewOptions ) {\n        scrollViewOptions.el = null;\n    }\n\n    scrollView = self.scrollView = scrollViewOptions = self._scrollViewOptions = element = self.$element = $element = null;\n  });\n\n  $timeout(function() {\n    scrollView && scrollView.run && scrollView.run();\n  });\n\n  self.getScrollView = function() {\n    return scrollView;\n  };\n\n  self.getScrollPosition = function() {\n    return scrollView.getValues();\n  };\n\n  self.resize = function() {\n    return $timeout(resize, 0, false).then(function() {\n      $element && $element.triggerHandler('scroll-resize');\n    });\n  };\n\n  self.scrollTop = function(shouldAnimate) {\n    self.resize().then(function() {\n      if (!scrollView) {\n        return;\n      }\n      scrollView.scrollTo(0, 0, !!shouldAnimate);\n    });\n  };\n\n  self.scrollBottom = function(shouldAnimate) {\n    self.resize().then(function() {\n      if (!scrollView) {\n        return;\n      }\n      var max = scrollView.getScrollMax();\n      scrollView.scrollTo(max.left, max.top, !!shouldAnimate);\n    });\n  };\n\n  self.scrollTo = function(left, top, shouldAnimate) {\n    self.resize().then(function() {\n      if (!scrollView) {\n        return;\n      }\n      scrollView.scrollTo(left, top, !!shouldAnimate);\n    });\n  };\n\n  self.zoomTo = function(zoom, shouldAnimate, originLeft, originTop) {\n    self.resize().then(function() {\n      if (!scrollView) {\n        return;\n      }\n      scrollView.zoomTo(zoom, !!shouldAnimate, originLeft, originTop);\n    });\n  };\n\n  self.zoomBy = function(zoom, shouldAnimate, originLeft, originTop) {\n    self.resize().then(function() {\n      if (!scrollView) {\n        return;\n      }\n      scrollView.zoomBy(zoom, !!shouldAnimate, originLeft, originTop);\n    });\n  };\n\n  self.scrollBy = function(left, top, shouldAnimate) {\n    self.resize().then(function() {\n      if (!scrollView) {\n        return;\n      }\n      scrollView.scrollBy(left, top, !!shouldAnimate);\n    });\n  };\n\n  self.anchorScroll = function(shouldAnimate) {\n    self.resize().then(function() {\n      if (!scrollView) {\n        return;\n      }\n      var hash = $location.hash();\n      var elm = hash && $document[0].getElementById(hash);\n      if (!(hash && elm)) {\n        scrollView.scrollTo(0, 0, !!shouldAnimate);\n        return;\n      }\n      var curElm = elm;\n      var scrollLeft = 0, scrollTop = 0;\n      do {\n        if (curElm !== null) scrollLeft += curElm.offsetLeft;\n        if (curElm !== null) scrollTop += curElm.offsetTop;\n        curElm = curElm.offsetParent;\n      } while (curElm.attributes != self.element.attributes && curElm.offsetParent);\n      scrollView.scrollTo(scrollLeft, scrollTop, !!shouldAnimate);\n    });\n  };\n\n  self.freezeScroll = scrollView.freeze;\n  self.freezeScrollShut = scrollView.freezeShut;\n\n  self.freezeAllScrolls = function(shouldFreeze) {\n    for (var i = 0; i < $ionicScrollDelegate._instances.length; i++) {\n      $ionicScrollDelegate._instances[i].freezeScroll(shouldFreeze);\n    }\n  };\n\n\n  /**\n   * @private\n   */\n  self._setRefresher = function(refresherScope, refresherElement, refresherMethods) {\n    self.refresher = refresherElement;\n    var refresherHeight = self.refresher.clientHeight || 60;\n    scrollView.activatePullToRefresh(\n      refresherHeight,\n      refresherMethods\n    );\n  };\n\n}]);\n\nIonicModule\n.controller('$ionicSideMenus', [\n  '$scope',\n  '$attrs',\n  '$ionicSideMenuDelegate',\n  '$ionicPlatform',\n  '$ionicBody',\n  '$ionicHistory',\n  '$ionicScrollDelegate',\n  'IONIC_BACK_PRIORITY',\n  '$rootScope',\nfunction($scope, $attrs, $ionicSideMenuDelegate, $ionicPlatform, $ionicBody, $ionicHistory, $ionicScrollDelegate, IONIC_BACK_PRIORITY, $rootScope) {\n  var self = this;\n  var rightShowing, leftShowing, isDragging;\n  var startX, lastX, offsetX, isAsideExposed;\n  var enableMenuWithBackViews = true;\n\n  self.$scope = $scope;\n\n  self.initialize = function(options) {\n    self.left = options.left;\n    self.right = options.right;\n    self.setContent(options.content);\n    self.dragThresholdX = options.dragThresholdX || 10;\n    $ionicHistory.registerHistory(self.$scope);\n  };\n\n  /**\n   * Set the content view controller if not passed in the constructor options.\n   *\n   * @param {object} content\n   */\n  self.setContent = function(content) {\n    if (content) {\n      self.content = content;\n\n      self.content.onDrag = function(e) {\n        self._handleDrag(e);\n      };\n\n      self.content.endDrag = function(e) {\n        self._endDrag(e);\n      };\n    }\n  };\n\n  self.isOpenLeft = function() {\n    return self.getOpenAmount() > 0;\n  };\n\n  self.isOpenRight = function() {\n    return self.getOpenAmount() < 0;\n  };\n\n  /**\n   * Toggle the left menu to open 100%\n   */\n  self.toggleLeft = function(shouldOpen) {\n    if (isAsideExposed || !self.left.isEnabled) return;\n    var openAmount = self.getOpenAmount();\n    if (arguments.length === 0) {\n      shouldOpen = openAmount <= 0;\n    }\n    self.content.enableAnimation();\n    if (!shouldOpen) {\n      self.openPercentage(0);\n      $rootScope.$emit('$ionicSideMenuClose', 'left');\n    } else {\n      self.openPercentage(100);\n      $rootScope.$emit('$ionicSideMenuOpen', 'left');\n    }\n  };\n\n  /**\n   * Toggle the right menu to open 100%\n   */\n  self.toggleRight = function(shouldOpen) {\n    if (isAsideExposed || !self.right.isEnabled) return;\n    var openAmount = self.getOpenAmount();\n    if (arguments.length === 0) {\n      shouldOpen = openAmount >= 0;\n    }\n    self.content.enableAnimation();\n    if (!shouldOpen) {\n      self.openPercentage(0);\n      $rootScope.$emit('$ionicSideMenuClose', 'right');\n    } else {\n      self.openPercentage(-100);\n      $rootScope.$emit('$ionicSideMenuOpen', 'right');\n    }\n  };\n\n  self.toggle = function(side) {\n    if (side == 'right') {\n      self.toggleRight();\n    } else {\n      self.toggleLeft();\n    }\n  };\n\n  /**\n   * Close all menus.\n   */\n  self.close = function() {\n    self.openPercentage(0);\n    $rootScope.$emit('$ionicSideMenuClose', 'left');\n    $rootScope.$emit('$ionicSideMenuClose', 'right');\n  };\n\n  /**\n   * @return {float} The amount the side menu is open, either positive or negative for left (positive), or right (negative)\n   */\n  self.getOpenAmount = function() {\n    return self.content && self.content.getTranslateX() || 0;\n  };\n\n  /**\n   * @return {float} The ratio of open amount over menu width. For example, a\n   * menu of width 100 open 50 pixels would be open 50% or a ratio of 0.5. Value is negative\n   * for right menu.\n   */\n  self.getOpenRatio = function() {\n    var amount = self.getOpenAmount();\n    if (amount >= 0) {\n      return amount / self.left.width;\n    }\n    return amount / self.right.width;\n  };\n\n  self.isOpen = function() {\n    return self.getOpenAmount() !== 0;\n  };\n\n  /**\n   * @return {float} The percentage of open amount over menu width. For example, a\n   * menu of width 100 open 50 pixels would be open 50%. Value is negative\n   * for right menu.\n   */\n  self.getOpenPercentage = function() {\n    return self.getOpenRatio() * 100;\n  };\n\n  /**\n   * Open the menu with a given percentage amount.\n   * @param {float} percentage The percentage (positive or negative for left/right) to open the menu.\n   */\n  self.openPercentage = function(percentage) {\n    var p = percentage / 100;\n\n    if (self.left && percentage >= 0) {\n      self.openAmount(self.left.width * p);\n    } else if (self.right && percentage < 0) {\n      self.openAmount(self.right.width * p);\n    }\n\n    // add the CSS class \"menu-open\" if the percentage does not\n    // equal 0, otherwise remove the class from the body element\n    $ionicBody.enableClass((percentage !== 0), 'menu-open');\n\n    self.content.setCanScroll(percentage == 0);\n  };\n\n  /*\n  function freezeAllScrolls(shouldFreeze) {\n    if (shouldFreeze && !self.isScrollFreeze) {\n      $ionicScrollDelegate.freezeAllScrolls(shouldFreeze);\n\n    } else if (!shouldFreeze && self.isScrollFreeze) {\n      $ionicScrollDelegate.freezeAllScrolls(false);\n    }\n    self.isScrollFreeze = shouldFreeze;\n  }\n  */\n\n  /**\n   * Open the menu the given pixel amount.\n   * @param {float} amount the pixel amount to open the menu. Positive value for left menu,\n   * negative value for right menu (only one menu will be visible at a time).\n   */\n  self.openAmount = function(amount) {\n    var maxLeft = self.left && self.left.width || 0;\n    var maxRight = self.right && self.right.width || 0;\n\n    // Check if we can move to that side, depending if the left/right panel is enabled\n    if (!(self.left && self.left.isEnabled) && amount > 0) {\n      self.content.setTranslateX(0);\n      return;\n    }\n\n    if (!(self.right && self.right.isEnabled) && amount < 0) {\n      self.content.setTranslateX(0);\n      return;\n    }\n\n    if (leftShowing && amount > maxLeft) {\n      self.content.setTranslateX(maxLeft);\n      return;\n    }\n\n    if (rightShowing && amount < -maxRight) {\n      self.content.setTranslateX(-maxRight);\n      return;\n    }\n\n    self.content.setTranslateX(amount);\n\n    leftShowing = amount > 0;\n    rightShowing = amount < 0;\n\n    if (amount > 0) {\n      // Push the z-index of the right menu down\n      self.right && self.right.pushDown && self.right.pushDown();\n      // Bring the z-index of the left menu up\n      self.left && self.left.bringUp && self.left.bringUp();\n    } else {\n      // Bring the z-index of the right menu up\n      self.right && self.right.bringUp && self.right.bringUp();\n      // Push the z-index of the left menu down\n      self.left && self.left.pushDown && self.left.pushDown();\n    }\n  };\n\n  /**\n   * Given an event object, find the final resting position of this side\n   * menu. For example, if the user \"throws\" the content to the right and\n   * releases the touch, the left menu should snap open (animated, of course).\n   *\n   * @param {Event} e the gesture event to use for snapping\n   */\n  self.snapToRest = function(e) {\n    // We want to animate at the end of this\n    self.content.enableAnimation();\n    isDragging = false;\n\n    // Check how much the panel is open after the drag, and\n    // what the drag velocity is\n    var ratio = self.getOpenRatio();\n\n    if (ratio === 0) {\n      // Just to be safe\n      self.openPercentage(0);\n      return;\n    }\n\n    var velocityThreshold = 0.3;\n    var velocityX = e.gesture.velocityX;\n    var direction = e.gesture.direction;\n\n    // Going right, less than half, too slow (snap back)\n    if (ratio > 0 && ratio < 0.5 && direction == 'right' && velocityX < velocityThreshold) {\n      self.openPercentage(0);\n    }\n\n    // Going left, more than half, too slow (snap back)\n    else if (ratio > 0.5 && direction == 'left' && velocityX < velocityThreshold) {\n      self.openPercentage(100);\n    }\n\n    // Going left, less than half, too slow (snap back)\n    else if (ratio < 0 && ratio > -0.5 && direction == 'left' && velocityX < velocityThreshold) {\n      self.openPercentage(0);\n    }\n\n    // Going right, more than half, too slow (snap back)\n    else if (ratio < 0.5 && direction == 'right' && velocityX < velocityThreshold) {\n      self.openPercentage(-100);\n    }\n\n    // Going right, more than half, or quickly (snap open)\n    else if (direction == 'right' && ratio >= 0 && (ratio >= 0.5 || velocityX > velocityThreshold)) {\n      self.openPercentage(100);\n    }\n\n    // Going left, more than half, or quickly (span open)\n    else if (direction == 'left' && ratio <= 0 && (ratio <= -0.5 || velocityX > velocityThreshold)) {\n      self.openPercentage(-100);\n    }\n\n    // Snap back for safety\n    else {\n      self.openPercentage(0);\n    }\n  };\n\n  self.enableMenuWithBackViews = function(val) {\n    if (arguments.length) {\n      enableMenuWithBackViews = !!val;\n    }\n    return enableMenuWithBackViews;\n  };\n\n  self.isAsideExposed = function() {\n    return !!isAsideExposed;\n  };\n\n  self.exposeAside = function(shouldExposeAside) {\n    if (!(self.left && self.left.isEnabled) && !(self.right && self.right.isEnabled)) return;\n    self.close();\n\n    isAsideExposed = shouldExposeAside;\n    if ((self.left && self.left.isEnabled) && (self.right && self.right.isEnabled)) {\n      self.content.setMarginLeftAndRight(isAsideExposed ? self.left.width : 0, isAsideExposed ? self.right.width : 0);\n    } else if (self.left && self.left.isEnabled) {\n      // set the left marget width if it should be exposed\n      // otherwise set false so there's no left margin\n      self.content.setMarginLeft(isAsideExposed ? self.left.width : 0);\n    } else if (self.right && self.right.isEnabled) {\n      self.content.setMarginRight(isAsideExposed ? self.right.width : 0);\n    }\n    self.$scope.$emit('$ionicExposeAside', isAsideExposed);\n  };\n\n  self.activeAsideResizing = function(isResizing) {\n    $ionicBody.enableClass(isResizing, 'aside-resizing');\n  };\n\n  // End a drag with the given event\n  self._endDrag = function(e) {\n    if (isAsideExposed) return;\n\n    if (isDragging) {\n      self.snapToRest(e);\n    }\n    startX = null;\n    lastX = null;\n    offsetX = null;\n  };\n\n  // Handle a drag event\n  self._handleDrag = function(e) {\n    if (isAsideExposed || !$scope.dragContent) return;\n\n    // If we don't have start coords, grab and store them\n    if (!startX) {\n      startX = e.gesture.touches[0].pageX;\n      lastX = startX;\n    } else {\n      // Grab the current tap coords\n      lastX = e.gesture.touches[0].pageX;\n    }\n\n    // Calculate difference from the tap points\n    if (!isDragging && Math.abs(lastX - startX) > self.dragThresholdX) {\n      // if the difference is greater than threshold, start dragging using the current\n      // point as the starting point\n      startX = lastX;\n\n      isDragging = true;\n      // Initialize dragging\n      self.content.disableAnimation();\n      offsetX = self.getOpenAmount();\n    }\n\n    if (isDragging) {\n      self.openAmount(offsetX + (lastX - startX));\n      //self.content.setCanScroll(false);\n    }\n  };\n\n  self.canDragContent = function(canDrag) {\n    if (arguments.length) {\n      $scope.dragContent = !!canDrag;\n    }\n    return $scope.dragContent;\n  };\n\n  self.edgeThreshold = 25;\n  self.edgeThresholdEnabled = false;\n  self.edgeDragThreshold = function(value) {\n    if (arguments.length) {\n      if (isNumber(value) && value > 0) {\n        self.edgeThreshold = value;\n        self.edgeThresholdEnabled = true;\n      } else {\n        self.edgeThresholdEnabled = !!value;\n      }\n    }\n    return self.edgeThresholdEnabled;\n  };\n\n  self.isDraggableTarget = function(e) {\n    //Only restrict edge when sidemenu is closed and restriction is enabled\n    var shouldOnlyAllowEdgeDrag = self.edgeThresholdEnabled && !self.isOpen();\n    var startX = e.gesture.startEvent && e.gesture.startEvent.center &&\n      e.gesture.startEvent.center.pageX;\n\n    var dragIsWithinBounds = !shouldOnlyAllowEdgeDrag ||\n      startX <= self.edgeThreshold ||\n      startX >= self.content.element.offsetWidth - self.edgeThreshold;\n\n    var backView = $ionicHistory.backView();\n    var menuEnabled = enableMenuWithBackViews ? true : !backView;\n    if (!menuEnabled) {\n      var currentView = $ionicHistory.currentView() || {};\n      return (dragIsWithinBounds && (backView.historyId !== currentView.historyId));\n    }\n\n    return ($scope.dragContent || self.isOpen()) &&\n      dragIsWithinBounds &&\n      !e.gesture.srcEvent.defaultPrevented &&\n      menuEnabled &&\n      !e.target.tagName.match(/input|textarea|select|object|embed/i) &&\n      !e.target.isContentEditable &&\n      !(e.target.dataset ? e.target.dataset.preventScroll : e.target.getAttribute('data-prevent-scroll') == 'true');\n  };\n\n  $scope.sideMenuContentTranslateX = 0;\n\n  var deregisterBackButtonAction = noop;\n  var closeSideMenu = angular.bind(self, self.close);\n\n  $scope.$watch(function() {\n    return self.getOpenAmount() !== 0;\n  }, function(isOpen) {\n    deregisterBackButtonAction();\n    if (isOpen) {\n      deregisterBackButtonAction = $ionicPlatform.registerBackButtonAction(\n        closeSideMenu,\n        IONIC_BACK_PRIORITY.sideMenu\n      );\n    }\n  });\n\n  var deregisterInstance = $ionicSideMenuDelegate._registerInstance(\n    self, $attrs.delegateHandle, function() {\n      return $ionicHistory.isActiveScope($scope);\n    }\n  );\n\n  $scope.$on('$destroy', function() {\n    deregisterInstance();\n    deregisterBackButtonAction();\n    self.$scope = null;\n    if (self.content) {\n      self.content.setCanScroll(true);\n      self.content.element = null;\n      self.content = null;\n    }\n  });\n\n  self.initialize({\n    left: {\n      width: 275\n    },\n    right: {\n      width: 275\n    }\n  });\n\n}]);\n\n(function(ionic) {\n\n  var TRANSLATE32 = 'translate(32,32)';\n  var STROKE_OPACITY = 'stroke-opacity';\n  var ROUND = 'round';\n  var INDEFINITE = 'indefinite';\n  var DURATION = '750ms';\n  var NONE = 'none';\n  var SHORTCUTS = {\n    a: 'animate',\n    an: 'attributeName',\n    at: 'animateTransform',\n    c: 'circle',\n    da: 'stroke-dasharray',\n    os: 'stroke-dashoffset',\n    f: 'fill',\n    lc: 'stroke-linecap',\n    rc: 'repeatCount',\n    sw: 'stroke-width',\n    t: 'transform',\n    v: 'values'\n  };\n\n  var SPIN_ANIMATION = {\n    v: '0,32,32;360,32,32',\n    an: 'transform',\n    type: 'rotate',\n    rc: INDEFINITE,\n    dur: DURATION\n  };\n\n  function createSvgElement(tagName, data, parent, spinnerName) {\n    var ele = document.createElement(SHORTCUTS[tagName] || tagName);\n    var k, x, y;\n\n    for (k in data) {\n\n      if (angular.isArray(data[k])) {\n        for (x = 0; x < data[k].length; x++) {\n          if (data[k][x].fn) {\n            for (y = 0; y < data[k][x].t; y++) {\n              createSvgElement(k, data[k][x].fn(y, spinnerName), ele, spinnerName);\n            }\n          } else {\n            createSvgElement(k, data[k][x], ele, spinnerName);\n          }\n        }\n\n      } else {\n        setSvgAttribute(ele, k, data[k]);\n      }\n    }\n\n    parent.appendChild(ele);\n  }\n\n  function setSvgAttribute(ele, k, v) {\n    ele.setAttribute(SHORTCUTS[k] || k, v);\n  }\n\n  function animationValues(strValues, i) {\n    var values = strValues.split(';');\n    var back = values.slice(i);\n    var front = values.slice(0, values.length - back.length);\n    values = back.concat(front).reverse();\n    return values.join(';') + ';' + values[0];\n  }\n\n  var IOS_SPINNER = {\n    sw: 4,\n    lc: ROUND,\n    line: [{\n      fn: function(i, spinnerName) {\n        return {\n          y1: spinnerName == 'ios' ? 17 : 12,\n          y2: spinnerName == 'ios' ? 29 : 20,\n          t: TRANSLATE32 + ' rotate(' + (30 * i + (i < 6 ? 180 : -180)) + ')',\n          a: [{\n            fn: function() {\n              return {\n                an: STROKE_OPACITY,\n                dur: DURATION,\n                v: animationValues('0;.1;.15;.25;.35;.45;.55;.65;.7;.85;1', i),\n                rc: INDEFINITE\n              };\n            },\n            t: 1\n          }]\n        };\n      },\n      t: 12\n    }]\n  };\n\n  var spinners = {\n\n    android: {\n      c: [{\n        sw: 6,\n        da: 128,\n        os: 82,\n        r: 26,\n        cx: 32,\n        cy: 32,\n        f: NONE\n      }]\n    },\n\n    ios: IOS_SPINNER,\n\n    'ios-small': IOS_SPINNER,\n\n    bubbles: {\n      sw: 0,\n      c: [{\n        fn: function(i) {\n          return {\n            cx: 24 * Math.cos(2 * Math.PI * i / 8),\n            cy: 24 * Math.sin(2 * Math.PI * i / 8),\n            t: TRANSLATE32,\n            a: [{\n              fn: function() {\n                return {\n                  an: 'r',\n                  dur: DURATION,\n                  v: animationValues('1;2;3;4;5;6;7;8', i),\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }]\n          };\n        },\n        t: 8\n      }]\n    },\n\n    circles: {\n\n      c: [{\n        fn: function(i) {\n          return {\n            r: 5,\n            cx: 24 * Math.cos(2 * Math.PI * i / 8),\n            cy: 24 * Math.sin(2 * Math.PI * i / 8),\n            t: TRANSLATE32,\n            sw: 0,\n            a: [{\n              fn: function() {\n                return {\n                  an: 'fill-opacity',\n                  dur: DURATION,\n                  v: animationValues('.3;.3;.3;.4;.7;.85;.9;1', i),\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }]\n          };\n        },\n        t: 8\n      }]\n    },\n\n    crescent: {\n      c: [{\n        sw: 4,\n        da: 128,\n        os: 82,\n        r: 26,\n        cx: 32,\n        cy: 32,\n        f: NONE,\n        at: [SPIN_ANIMATION]\n      }]\n    },\n\n    dots: {\n\n      c: [{\n        fn: function(i) {\n          return {\n            cx: 16 + (16 * i),\n            cy: 32,\n            sw: 0,\n            a: [{\n              fn: function() {\n                return {\n                  an: 'fill-opacity',\n                  dur: DURATION,\n                  v: animationValues('.5;.6;.8;1;.8;.6;.5', i),\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }, {\n              fn: function() {\n                return {\n                  an: 'r',\n                  dur: DURATION,\n                  v: animationValues('4;5;6;5;4;3;3', i),\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }]\n          };\n        },\n        t: 3\n      }]\n    },\n\n    lines: {\n      sw: 7,\n      lc: ROUND,\n      line: [{\n        fn: function(i) {\n          return {\n            x1: 10 + (i * 14),\n            x2: 10 + (i * 14),\n            a: [{\n              fn: function() {\n                return {\n                  an: 'y1',\n                  dur: DURATION,\n                  v: animationValues('16;18;28;18;16', i),\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }, {\n              fn: function() {\n                return {\n                  an: 'y2',\n                  dur: DURATION,\n                  v: animationValues('48;44;36;46;48', i),\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }, {\n              fn: function() {\n                return {\n                  an: STROKE_OPACITY,\n                  dur: DURATION,\n                  v: animationValues('1;.8;.5;.4;1', i),\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }]\n          };\n        },\n        t: 4\n      }]\n    },\n\n    ripple: {\n      f: NONE,\n      'fill-rule': 'evenodd',\n      sw: 3,\n      circle: [{\n        fn: function(i) {\n          return {\n            cx: 32,\n            cy: 32,\n            a: [{\n              fn: function() {\n                return {\n                  an: 'r',\n                  begin: (i * -1) + 's',\n                  dur: '2s',\n                  v: '0;24',\n                  keyTimes: '0;1',\n                  keySplines: '0.1,0.2,0.3,1',\n                  calcMode: 'spline',\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }, {\n              fn: function() {\n                return {\n                  an: STROKE_OPACITY,\n                  begin: (i * -1) + 's',\n                  dur: '2s',\n                  v: '.2;1;.2;0',\n                  rc: INDEFINITE\n                };\n              },\n              t: 1\n            }]\n          };\n        },\n        t: 2\n      }]\n    },\n\n    spiral: {\n      defs: [{\n        linearGradient: [{\n          id: 'sGD',\n          gradientUnits: 'userSpaceOnUse',\n          x1: 55, y1: 46, x2: 2, y2: 46,\n          stop: [{\n            offset: 0.1,\n            class: 'stop1'\n          }, {\n            offset: 1,\n            class: 'stop2'\n          }]\n        }]\n      }],\n      g: [{\n        sw: 4,\n        lc: ROUND,\n        f: NONE,\n        path: [{\n          stroke: 'url(#sGD)',\n          d: 'M4,32 c0,15,12,28,28,28c8,0,16-4,21-9'\n        }, {\n          d: 'M60,32 C60,16,47.464,4,32,4S4,16,4,32'\n        }],\n        at: [SPIN_ANIMATION]\n      }]\n    }\n\n  };\n\n  var animations = {\n\n    android: function(ele) {\n      // Note that this is called as a function, not a constructor.\n      var self = {};\n\n      this.stop = false;\n\n      var rIndex = 0;\n      var rotateCircle = 0;\n      var startTime;\n      var svgEle = ele.querySelector('g');\n      var circleEle = ele.querySelector('circle');\n\n      function run() {\n        if (self.stop) return;\n\n        var v = easeInOutCubic(Date.now() - startTime, 650);\n        var scaleX = 1;\n        var translateX = 0;\n        var dasharray = (188 - (58 * v));\n        var dashoffset = (182 - (182 * v));\n\n        if (rIndex % 2) {\n          scaleX = -1;\n          translateX = -64;\n          dasharray = (128 - (-58 * v));\n          dashoffset = (182 * v);\n        }\n\n        var rotateLine = [0, -101, -90, -11, -180, 79, -270, -191][rIndex];\n\n        setSvgAttribute(circleEle, 'da', Math.max(Math.min(dasharray, 188), 128));\n        setSvgAttribute(circleEle, 'os', Math.max(Math.min(dashoffset, 182), 0));\n        setSvgAttribute(circleEle, 't', 'scale(' + scaleX + ',1) translate(' + translateX + ',0) rotate(' + rotateLine + ',32,32)');\n\n        rotateCircle += 4.1;\n        if (rotateCircle > 359) rotateCircle = 0;\n        setSvgAttribute(svgEle, 't', 'rotate(' + rotateCircle + ',32,32)');\n\n        if (v >= 1) {\n          rIndex++;\n          if (rIndex > 7) rIndex = 0;\n          startTime = Date.now();\n        }\n\n        ionic.requestAnimationFrame(run);\n      }\n\n      return function() {\n        startTime = Date.now();\n        run();\n        return self;\n      };\n\n    }\n\n  };\n\n  function easeInOutCubic(t, c) {\n    t /= c / 2;\n    if (t < 1) return 1 / 2 * t * t * t;\n    t -= 2;\n    return 1 / 2 * (t * t * t + 2);\n  }\n\n\n  IonicModule\n  .controller('$ionicSpinner', [\n    '$element',\n    '$attrs',\n    '$ionicConfig',\n  function($element, $attrs, $ionicConfig) {\n    var spinnerName, anim;\n\n    this.init = function() {\n      spinnerName = $attrs.icon || $ionicConfig.spinner.icon();\n\n      var container = document.createElement('div');\n      createSvgElement('svg', {\n        viewBox: '0 0 64 64',\n        g: [spinners[spinnerName]]\n      }, container, spinnerName);\n\n      // Specifically for animations to work,\n      // Android 4.3 and below requires the element to be\n      // added as an html string, rather than dynmically\n      // building up the svg element and appending it.\n      $element.html(container.innerHTML);\n\n      this.start();\n\n      return spinnerName;\n    };\n\n    this.start = function() {\n      animations[spinnerName] && (anim = animations[spinnerName]($element[0])());\n    };\n\n    this.stop = function() {\n      animations[spinnerName] && (anim.stop = true);\n    };\n\n  }]);\n\n})(ionic);\n\nIonicModule\n.controller('$ionicTab', [\n  '$scope',\n  '$ionicHistory',\n  '$attrs',\n  '$location',\n  '$state',\nfunction($scope, $ionicHistory, $attrs, $location, $state) {\n  this.$scope = $scope;\n\n  //All of these exposed for testing\n  this.hrefMatchesState = function() {\n    return $attrs.href && $location.path().indexOf(\n      $attrs.href.replace(/^#/, '').replace(/\\/$/, '')\n    ) === 0;\n  };\n  this.srefMatchesState = function() {\n    return $attrs.uiSref && $state.includes($attrs.uiSref.split('(')[0]);\n  };\n  this.navNameMatchesState = function() {\n    return this.navViewName && $ionicHistory.isCurrentStateNavView(this.navViewName);\n  };\n\n  this.tabMatchesState = function() {\n    return this.hrefMatchesState() || this.srefMatchesState() || this.navNameMatchesState();\n  };\n}]);\n\nIonicModule\n.controller('$ionicTabs', [\n  '$scope',\n  '$element',\n  '$ionicHistory',\nfunction($scope, $element, $ionicHistory) {\n  var self = this;\n  var selectedTab = null;\n  var previousSelectedTab = null;\n  var selectedTabIndex;\n  var isVisible = true;\n  self.tabs = [];\n\n  self.selectedIndex = function() {\n    return self.tabs.indexOf(selectedTab);\n  };\n  self.selectedTab = function() {\n    return selectedTab;\n  };\n  self.previousSelectedTab = function() {\n    return previousSelectedTab;\n  };\n\n  self.add = function(tab) {\n    $ionicHistory.registerHistory(tab);\n    self.tabs.push(tab);\n  };\n\n  self.remove = function(tab) {\n    var tabIndex = self.tabs.indexOf(tab);\n    if (tabIndex === -1) {\n      return;\n    }\n    //Use a field like '$tabSelected' so developers won't accidentally set it in controllers etc\n    if (tab.$tabSelected) {\n      self.deselect(tab);\n      //Try to select a new tab if we're removing a tab\n      if (self.tabs.length === 1) {\n        //Do nothing if there are no other tabs to select\n      } else {\n        //Select previous tab if it's the last tab, else select next tab\n        var newTabIndex = tabIndex === self.tabs.length - 1 ? tabIndex - 1 : tabIndex + 1;\n        self.select(self.tabs[newTabIndex]);\n      }\n    }\n    self.tabs.splice(tabIndex, 1);\n  };\n\n  self.deselect = function(tab) {\n    if (tab.$tabSelected) {\n      previousSelectedTab = selectedTab;\n      selectedTab = selectedTabIndex = null;\n      tab.$tabSelected = false;\n      (tab.onDeselect || noop)();\n      tab.$broadcast && tab.$broadcast('$ionicHistory.deselect');\n    }\n  };\n\n  self.select = function(tab, shouldEmitEvent) {\n    var tabIndex;\n    if (isNumber(tab)) {\n      tabIndex = tab;\n      if (tabIndex >= self.tabs.length) return;\n      tab = self.tabs[tabIndex];\n    } else {\n      tabIndex = self.tabs.indexOf(tab);\n    }\n\n    if (arguments.length === 1) {\n      shouldEmitEvent = !!(tab.navViewName || tab.uiSref);\n    }\n\n    if (selectedTab && selectedTab.$historyId == tab.$historyId) {\n      if (shouldEmitEvent) {\n        $ionicHistory.goToHistoryRoot(tab.$historyId);\n      }\n\n    } else if (selectedTabIndex !== tabIndex) {\n      forEach(self.tabs, function(tab) {\n        self.deselect(tab);\n      });\n\n      selectedTab = tab;\n      selectedTabIndex = tabIndex;\n\n      if (self.$scope && self.$scope.$parent) {\n        self.$scope.$parent.$activeHistoryId = tab.$historyId;\n      }\n\n      //Use a funny name like $tabSelected so the developer doesn't overwrite the var in a child scope\n      tab.$tabSelected = true;\n      (tab.onSelect || noop)();\n\n      if (shouldEmitEvent) {\n        $scope.$emit('$ionicHistory.change', {\n          type: 'tab',\n          tabIndex: tabIndex,\n          historyId: tab.$historyId,\n          navViewName: tab.navViewName,\n          hasNavView: !!tab.navViewName,\n          title: tab.title,\n          url: tab.href,\n          uiSref: tab.uiSref\n        });\n      }\n\n      $scope.$broadcast(\"tabSelected\", { selectedTab: tab, selectedTabIndex: tabIndex});\n    }\n  };\n\n  self.hasActiveScope = function() {\n    for (var x = 0; x < self.tabs.length; x++) {\n      if ($ionicHistory.isActiveScope(self.tabs[x])) {\n        return true;\n      }\n    }\n    return false;\n  };\n\n  self.showBar = function(show) {\n    if (arguments.length) {\n      if (show) {\n        $element.removeClass('tabs-item-hide');\n      } else {\n        $element.addClass('tabs-item-hide');\n      }\n      isVisible = !!show;\n    }\n    return isVisible;\n  };\n}]);\n\nIonicModule\n.controller('$ionicView', [\n  '$scope',\n  '$element',\n  '$attrs',\n  '$compile',\n  '$rootScope',\nfunction($scope, $element, $attrs, $compile, $rootScope) {\n  var self = this;\n  var navElementHtml = {};\n  var navViewCtrl;\n  var navBarDelegateHandle;\n  var hasViewHeaderBar;\n  var deregisters = [];\n  var viewTitle;\n\n  var deregIonNavBarInit = $scope.$on('ionNavBar.init', function(ev, delegateHandle) {\n    // this view has its own ion-nav-bar, remember the navBarDelegateHandle for this view\n    ev.stopPropagation();\n    navBarDelegateHandle = delegateHandle;\n  });\n\n\n  self.init = function() {\n    deregIonNavBarInit();\n\n    var modalCtrl = $element.inheritedData('$ionModalController');\n    navViewCtrl = $element.inheritedData('$ionNavViewController');\n\n    // don't bother if inside a modal or there's no parent navView\n    if (!navViewCtrl || modalCtrl) return;\n\n    // add listeners for when this view changes\n    $scope.$on('$ionicView.beforeEnter', self.beforeEnter);\n    $scope.$on('$ionicView.afterEnter', afterEnter);\n    $scope.$on('$ionicView.beforeLeave', deregisterFns);\n  };\n\n  self.beforeEnter = function(ev, transData) {\n    // this event was emitted, starting at intial ion-view, then bubbles up\n    // only the first ion-view should do something with it, parent ion-views should ignore\n    if (transData && !transData.viewNotified) {\n      transData.viewNotified = true;\n\n      if (!$rootScope.$$phase) $scope.$digest();\n      viewTitle = isDefined($attrs.viewTitle) ? $attrs.viewTitle : $attrs.title;\n\n      var navBarItems = {};\n      for (var n in navElementHtml) {\n        navBarItems[n] = generateNavBarItem(navElementHtml[n]);\n      }\n\n      navViewCtrl.beforeEnter(extend(transData, {\n        title: viewTitle,\n        showBack: !attrTrue('hideBackButton'),\n        navBarItems: navBarItems,\n        navBarDelegate: navBarDelegateHandle || null,\n        showNavBar: !attrTrue('hideNavBar'),\n        hasHeaderBar: !!hasViewHeaderBar\n      }));\n\n      // make sure any existing observers are cleaned up\n      deregisterFns();\n    }\n  };\n\n\n  function afterEnter() {\n    // only listen for title updates after it has entered\n    // but also deregister the observe before it leaves\n    var viewTitleAttr = isDefined($attrs.viewTitle) && 'viewTitle' || isDefined($attrs.title) && 'title';\n    if (viewTitleAttr) {\n      titleUpdate($attrs[viewTitleAttr]);\n      deregisters.push($attrs.$observe(viewTitleAttr, titleUpdate));\n    }\n\n    if (isDefined($attrs.hideBackButton)) {\n      deregisters.push($scope.$watch($attrs.hideBackButton, function(val) {\n        navViewCtrl.showBackButton(!val);\n      }));\n    }\n\n    if (isDefined($attrs.hideNavBar)) {\n      deregisters.push($scope.$watch($attrs.hideNavBar, function(val) {\n        navViewCtrl.showBar(!val);\n      }));\n    }\n  }\n\n\n  function titleUpdate(newTitle) {\n    if (isDefined(newTitle) && newTitle !== viewTitle) {\n      viewTitle = newTitle;\n      navViewCtrl.title(viewTitle);\n    }\n  }\n\n\n  function deregisterFns() {\n    // remove all existing $attrs.$observe's\n    for (var x = 0; x < deregisters.length; x++) {\n      deregisters[x]();\n    }\n    deregisters = [];\n  }\n\n\n  function generateNavBarItem(html) {\n    if (html) {\n      // every time a view enters we need to recreate its view buttons if they exist\n      return $compile(html)($scope.$new());\n    }\n  }\n\n\n  function attrTrue(key) {\n    return !!$scope.$eval($attrs[key]);\n  }\n\n\n  self.navElement = function(type, html) {\n    navElementHtml[type] = html;\n  };\n\n}]);\n\n/*\n * We don't document the ionActionSheet directive, we instead document\n * the $ionicActionSheet service\n */\nIonicModule\n.directive('ionActionSheet', ['$document', function($document) {\n  return {\n    restrict: 'E',\n    scope: true,\n    replace: true,\n    link: function($scope, $element) {\n\n      var keyUp = function(e) {\n        if (e.which == 27) {\n          $scope.cancel();\n          $scope.$apply();\n        }\n      };\n\n      var backdropClick = function(e) {\n        if (e.target == $element[0]) {\n          $scope.cancel();\n          $scope.$apply();\n        }\n      };\n      $scope.$on('$destroy', function() {\n        $element.remove();\n        $document.unbind('keyup', keyUp);\n      });\n\n      $document.bind('keyup', keyUp);\n      $element.bind('click', backdropClick);\n    },\n    template: '<div class=\"action-sheet-backdrop\">' +\n                '<div class=\"action-sheet-wrapper\">' +\n                  '<div class=\"action-sheet\" ng-class=\"{\\'action-sheet-has-icons\\': $actionSheetHasIcon}\">' +\n                    '<div class=\"action-sheet-group action-sheet-options\">' +\n                      '<div class=\"action-sheet-title\" ng-if=\"titleText\" ng-bind-html=\"titleText\"></div>' +\n                      '<button class=\"button action-sheet-option\" ng-click=\"buttonClicked($index)\" ng-class=\"b.className\" ng-repeat=\"b in buttons\" ng-bind-html=\"b.text\"></button>' +\n                      '<button class=\"button destructive action-sheet-destructive\" ng-if=\"destructiveText\" ng-click=\"destructiveButtonClicked()\" ng-bind-html=\"destructiveText\"></button>' +\n                    '</div>' +\n                    '<div class=\"action-sheet-group action-sheet-cancel\" ng-if=\"cancelText\">' +\n                      '<button class=\"button\" ng-click=\"cancel()\" ng-bind-html=\"cancelText\"></button>' +\n                    '</div>' +\n                  '</div>' +\n                '</div>' +\n              '</div>'\n  };\n}]);\n\n\n/**\n * @ngdoc directive\n * @name ionCheckbox\n * @module ionic\n * @restrict E\n * @codepen hqcju\n * @description\n * The checkbox is no different than the HTML checkbox input, except it's styled differently.\n *\n * The checkbox behaves like any [AngularJS checkbox](http://docs.angularjs.org/api/ng/input/input[checkbox]).\n *\n * @usage\n * ```html\n * <ion-checkbox ng-model=\"isChecked\">Checkbox Label</ion-checkbox>\n * ```\n */\n\nIonicModule\n.directive('ionCheckbox', ['$ionicConfig', function($ionicConfig) {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '?ngModel',\n    transclude: true,\n    template:\n      '<label class=\"item item-checkbox\">' +\n        '<div class=\"checkbox checkbox-input-hidden disable-pointer-events\">' +\n          '<input type=\"checkbox\">' +\n          '<i class=\"checkbox-icon\"></i>' +\n        '</div>' +\n        '<div class=\"item-content disable-pointer-events\" ng-transclude></div>' +\n      '</label>',\n    compile: function(element, attr) {\n      var input = element.find('input');\n      forEach({\n        'name': attr.name,\n        'ng-value': attr.ngValue,\n        'ng-model': attr.ngModel,\n        'ng-checked': attr.ngChecked,\n        'ng-disabled': attr.ngDisabled,\n        'ng-true-value': attr.ngTrueValue,\n        'ng-false-value': attr.ngFalseValue,\n        'ng-change': attr.ngChange,\n        'ng-required': attr.ngRequired,\n        'required': attr.required\n      }, function(value, name) {\n        if (isDefined(value)) {\n          input.attr(name, value);\n        }\n      });\n      var checkboxWrapper = element[0].querySelector('.checkbox');\n      checkboxWrapper.classList.add('checkbox-' + $ionicConfig.form.checkbox());\n    }\n  };\n}]);\n\n\n/**\n * @ngdoc directive\n * @restrict A\n * @name collectionRepeat\n * @module ionic\n * @codepen 7ec1ec58f2489ab8f359fa1a0fe89c15\n * @description\n * `collection-repeat` allows an app to show huge lists of items much more performantly than\n * `ng-repeat`.\n *\n * It renders into the DOM only as many items as are currently visible.\n *\n * This means that on a phone screen that can fit eight items, only the eight items matching\n * the current scroll position will be rendered.\n *\n * **The Basics**:\n *\n * - The data given to collection-repeat must be an array.\n * - If the `item-height` and `item-width` attributes are not supplied, it will be assumed that\n *   every item in the list has the same dimensions as the first item.\n * - Don't use angular one-time binding (`::`) with collection-repeat. The scope of each item is\n *   assigned new data and re-digested as you scroll. Bindings need to update, and one-time bindings\n *   won't.\n *\n * **Performance Tips**:\n *\n * - The iOS webview has a performance bottleneck when switching out `<img src>` attributes.\n *   To increase performance of images on iOS, cache your images in advance and,\n *   if possible, lower the number of unique images. We're working on [a solution](https://github.com/ionic-team/ionic/issues/3194).\n *\n * @usage\n * #### Basic Item List ([codepen](http://codepen.io/ionic/pen/0c2c35a34a8b18ad4d793fef0b081693))\n * ```html\n * <ion-content>\n *   <ion-item collection-repeat=\"item in items\">\n *     {% raw %}{{item}}{% endraw %}\n *   </ion-item>\n * </ion-content>\n * ```\n *\n * #### Grid of Images ([codepen](http://codepen.io/ionic/pen/5515d4efd9d66f780e96787387f41664))\n * ```html\n * <ion-content>\n *   <img collection-repeat=\"photo in photos\"\n *     item-width=\"33%\"\n *     item-height=\"200px\"\n *     ng-src=\"{% raw %}{{photo.url}}{% endraw %}\">\n * </ion-content>\n * ```\n *\n * #### Horizontal Scroller, Dynamic Item Width ([codepen](http://codepen.io/ionic/pen/67cc56b349124a349acb57a0740e030e))\n * ```html\n * <ion-content>\n *   <h2>Available Kittens:</h2>\n *   <ion-scroll direction=\"x\" class=\"available-scroller\">\n *     <div class=\"photo\" collection-repeat=\"photo in main.photos\"\n *        item-height=\"250\" item-width=\"photo.width + 30\">\n *        <img ng-src=\"{% raw %}{{photo.src}}{% endraw %}\">\n *     </div>\n *   </ion-scroll>\n * </ion-content>\n * ```\n *\n * @param {expression} collection-repeat The expression indicating how to enumerate a collection,\n *   of the format  `variable in expression` – where variable is the user defined loop variable\n *   and `expression` is a scope expression giving the collection to enumerate.\n *   For example: `album in artist.albums` or `album in artist.albums | orderBy:'name'`.\n * @param {expression=} item-width The width of the repeated element. The expression must return\n *   a number (pixels) or a percentage. Defaults to the width of the first item in the list.\n *   (previously named collection-item-width)\n * @param {expression=} item-height The height of the repeated element. The expression must return\n *   a number (pixels) or a percentage. Defaults to the height of the first item in the list.\n *   (previously named collection-item-height)\n * @param {number=} item-render-buffer The number of items to load before and after the visible\n *   items in the list. Default 3. Tip: set this higher if you have lots of images to preload, but\n *   don't set it too high or you'll see performance loss.\n * @param {boolean=} force-refresh-images Force images to refresh as you scroll. This fixes a problem\n *   where, when an element is interchanged as scrolling, its image will still have the old src\n *   while the new src loads. Setting this to true comes with a small performance loss.\n */\n\nIonicModule\n.directive('collectionRepeat', CollectionRepeatDirective)\n.factory('$ionicCollectionManager', RepeatManagerFactory);\n\nvar ONE_PX_TRANSPARENT_IMG_SRC = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';\nvar WIDTH_HEIGHT_REGEX = /height:.*?px;\\s*width:.*?px/;\nvar DEFAULT_RENDER_BUFFER = 3;\n\nCollectionRepeatDirective.$inject = ['$ionicCollectionManager', '$parse', '$window', '$$rAF', '$rootScope', '$timeout'];\nfunction CollectionRepeatDirective($ionicCollectionManager, $parse, $window, $$rAF, $rootScope, $timeout) {\n  return {\n    restrict: 'A',\n    priority: 1000,\n    transclude: 'element',\n    $$tlb: true,\n    require: '^^$ionicScroll',\n    link: postLink\n  };\n\n  function postLink(scope, element, attr, scrollCtrl, transclude) {\n    var scrollView = scrollCtrl.scrollView;\n    var node = element[0];\n    var containerNode = angular.element('<div class=\"collection-repeat-container\">')[0];\n    node.parentNode.replaceChild(containerNode, node);\n\n    if (scrollView.options.scrollingX && scrollView.options.scrollingY) {\n      throw new Error(\"collection-repeat expected a parent x or y scrollView, not \" +\n                      \"an xy scrollView.\");\n    }\n\n    var repeatExpr = attr.collectionRepeat;\n    var match = repeatExpr.match(/^\\s*([\\s\\S]+?)\\s+in\\s+([\\s\\S]+?)(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/);\n    if (!match) {\n      throw new Error(\"collection-repeat expected expression in form of '_item_ in \" +\n                      \"_collection_[ track by _id_]' but got '\" + attr.collectionRepeat + \"'.\");\n    }\n    var keyExpr = match[1];\n    var listExpr = match[2];\n    var listGetter = $parse(listExpr);\n    var heightData = {};\n    var widthData = {};\n    var computedStyleDimensions = {};\n    var data = [];\n    var repeatManager;\n\n    // attr.collectionBufferSize is deprecated\n    var renderBufferExpr = attr.itemRenderBuffer || attr.collectionBufferSize;\n    var renderBuffer = angular.isDefined(renderBufferExpr) ?\n      parseInt(renderBufferExpr) :\n      DEFAULT_RENDER_BUFFER;\n\n    // attr.collectionItemHeight is deprecated\n    var heightExpr = attr.itemHeight || attr.collectionItemHeight;\n    // attr.collectionItemWidth is deprecated\n    var widthExpr = attr.itemWidth || attr.collectionItemWidth;\n\n    var afterItemsContainer = initAfterItemsContainer();\n\n    var changeValidator = makeChangeValidator();\n    initDimensions();\n\n    // Dimensions are refreshed on resize or data change.\n    scrollCtrl.$element.on('scroll-resize', refreshDimensions);\n\n    angular.element($window).on('resize', onResize);\n    var unlistenToExposeAside = $rootScope.$on('$ionicExposeAside', ionic.animationFrameThrottle(function() {\n      scrollCtrl.scrollView.resize();\n      onResize();\n    }));\n    $timeout(refreshDimensions, 0, false);\n\n    function onResize() {\n      if (changeValidator.resizeRequiresRefresh(scrollView.__clientWidth, scrollView.__clientHeight)) {\n        refreshDimensions();\n      }\n    }\n\n    scope.$watchCollection(listGetter, function(newValue) {\n      data = newValue || (newValue = []);\n      if (!angular.isArray(newValue)) {\n        throw new Error(\"collection-repeat expected an array for '\" + listExpr + \"', \" +\n          \"but got a \" + typeof value);\n      }\n      // Wait for this digest to end before refreshing everything.\n      scope.$$postDigest(function() {\n        getRepeatManager().setData(data);\n        if (changeValidator.dataChangeRequiresRefresh(data)) refreshDimensions();\n      });\n    });\n\n    scope.$on('$destroy', function() {\n      angular.element($window).off('resize', onResize);\n      unlistenToExposeAside();\n      scrollCtrl.$element && scrollCtrl.$element.off('scroll-resize', refreshDimensions);\n\n      computedStyleNode && computedStyleNode.parentNode &&\n        computedStyleNode.parentNode.removeChild(computedStyleNode);\n      computedStyleScope && computedStyleScope.$destroy();\n      computedStyleScope = computedStyleNode = null;\n\n      repeatManager && repeatManager.destroy();\n      repeatManager = null;\n    });\n\n    function makeChangeValidator() {\n      var self;\n      return (self = {\n        dataLength: 0,\n        width: 0,\n        height: 0,\n        // A resize triggers a refresh only if we have data, the scrollView has size,\n        // and the size has changed.\n        resizeRequiresRefresh: function(newWidth, newHeight) {\n          var requiresRefresh = self.dataLength && newWidth && newHeight &&\n            (newWidth !== self.width || newHeight !== self.height);\n\n          self.width = newWidth;\n          self.height = newHeight;\n\n          return !!requiresRefresh;\n        },\n        // A change in data only triggers a refresh if the data has length, or if the data's\n        // length is less than before.\n        dataChangeRequiresRefresh: function(newData) {\n          var requiresRefresh = newData.length > 0 || newData.length < self.dataLength;\n\n          self.dataLength = newData.length;\n\n          return !!requiresRefresh;\n        }\n      });\n    }\n\n    function getRepeatManager() {\n      return repeatManager || (repeatManager = new $ionicCollectionManager({\n        afterItemsNode: afterItemsContainer[0],\n        containerNode: containerNode,\n        heightData: heightData,\n        widthData: widthData,\n        forceRefreshImages: !!(isDefined(attr.forceRefreshImages) && attr.forceRefreshImages !== 'false'),\n        keyExpression: keyExpr,\n        renderBuffer: renderBuffer,\n        scope: scope,\n        scrollView: scrollCtrl.scrollView,\n        transclude: transclude\n      }));\n    }\n\n    function initAfterItemsContainer() {\n      var container = angular.element(\n        scrollView.__content.querySelector('.collection-repeat-after-container')\n      );\n      // Put everything in the view after the repeater into a container.\n      if (!container.length) {\n        var elementIsAfterRepeater = false;\n        var afterNodes = [].filter.call(scrollView.__content.childNodes, function(node) {\n          if (ionic.DomUtil.contains(node, containerNode)) {\n            elementIsAfterRepeater = true;\n            return false;\n          }\n          return elementIsAfterRepeater;\n        });\n        container = angular.element('<span class=\"collection-repeat-after-container\">');\n        if (scrollView.options.scrollingX) {\n          container.addClass('horizontal');\n        }\n        container.append(afterNodes);\n        scrollView.__content.appendChild(container[0]);\n      }\n      return container;\n    }\n\n    function initDimensions() {\n      //Height and width have four 'modes':\n      //1) Computed Mode\n      //  - Nothing is supplied, so we getComputedStyle() on one element in the list and use\n      //    that width and height value for the width and height of every item. This is re-computed\n      //    every resize.\n      //2) Constant Mode, Static Integer\n      //  - The user provides a constant number for width or height, in pixels. We parse it,\n      //    store it on the `value` field, and it never changes\n      //3) Constant Mode, Percent\n      //  - The user provides a percent string for width or height. The getter for percent is\n      //    stored on the `getValue()` field, and is re-evaluated once every resize. The result\n      //    is stored on the `value` field.\n      //4) Dynamic Mode\n      //  - The user provides a dynamic expression for the width or height.  This is re-evaluated\n      //    for every item, stored on the `.getValue()` field.\n      if (heightExpr) {\n        parseDimensionAttr(heightExpr, heightData);\n      } else {\n        heightData.computed = true;\n      }\n      if (widthExpr) {\n        parseDimensionAttr(widthExpr, widthData);\n      } else {\n        widthData.computed = true;\n      }\n    }\n\n    function refreshDimensions() {\n      var hasData = data.length > 0;\n\n      if (hasData && (heightData.computed || widthData.computed)) {\n        computeStyleDimensions();\n      }\n\n      if (hasData && heightData.computed) {\n        heightData.value = computedStyleDimensions.height;\n        if (!heightData.value) {\n          throw new Error('collection-repeat tried to compute the height of repeated elements \"' +\n            repeatExpr + '\", but was unable to. Please provide the \"item-height\" attribute. ' +\n            'http://ionicframework.com/docs/api/directive/collectionRepeat/');\n        }\n      } else if (!heightData.dynamic && heightData.getValue) {\n        // If it's a constant with a getter (eg percent), we just refresh .value after resize\n        heightData.value = heightData.getValue();\n      }\n\n      if (hasData && widthData.computed) {\n        widthData.value = computedStyleDimensions.width;\n        if (!widthData.value) {\n          throw new Error('collection-repeat tried to compute the width of repeated elements \"' +\n            repeatExpr + '\", but was unable to. Please provide the \"item-width\" attribute. ' +\n            'http://ionicframework.com/docs/api/directive/collectionRepeat/');\n        }\n      } else if (!widthData.dynamic && widthData.getValue) {\n        // If it's a constant with a getter (eg percent), we just refresh .value after resize\n        widthData.value = widthData.getValue();\n      }\n      // Dynamic dimensions aren't updated on resize. Since they're already dynamic anyway,\n      // .getValue() will be used.\n\n      getRepeatManager().refreshLayout();\n    }\n\n    function parseDimensionAttr(attrValue, dimensionData) {\n      if (!attrValue) return;\n\n      var parsedValue;\n      // Try to just parse the plain attr value\n      try {\n        parsedValue = $parse(attrValue);\n      } catch (e) {\n        // If the parse fails and the value has `px` or `%` in it, surround the attr in\n        // quotes, to attempt to let the user provide a simple `attr=\"100%\"` or `attr=\"100px\"`\n        if (attrValue.trim().match(/\\d+(px|%)$/)) {\n          attrValue = '\"' + attrValue + '\"';\n        }\n        parsedValue = $parse(attrValue);\n      }\n\n      var constantAttrValue = attrValue.replace(/(\\'|\\\"|px|%)/g, '').trim();\n      var isConstant = constantAttrValue.length && !/([a-zA-Z]|\\$|:|\\?)/.test(constantAttrValue);\n      dimensionData.attrValue = attrValue;\n\n      // If it's a constant, it's either a percent or just a constant pixel number.\n      if (isConstant) {\n        // For percents, store the percent getter on .getValue()\n        if (attrValue.indexOf('%') > -1) {\n          var decimalValue = parseFloat(parsedValue()) / 100;\n          dimensionData.getValue = dimensionData === heightData ?\n            function() { return Math.floor(decimalValue * scrollView.__clientHeight); } :\n            function() { return Math.floor(decimalValue * scrollView.__clientWidth); };\n        } else {\n          // For static constants, just store the static constant.\n          dimensionData.value = parseInt(parsedValue());\n        }\n\n      } else {\n        dimensionData.dynamic = true;\n        dimensionData.getValue = dimensionData === heightData ?\n          function heightGetter(scope, locals) {\n            var result = parsedValue(scope, locals);\n            if (result.charAt && result.charAt(result.length - 1) === '%') {\n              return Math.floor(parseFloat(result) / 100 * scrollView.__clientHeight);\n            }\n            return parseInt(result);\n          } :\n          function widthGetter(scope, locals) {\n            var result = parsedValue(scope, locals);\n            if (result.charAt && result.charAt(result.length - 1) === '%') {\n              return Math.floor(parseFloat(result) / 100 * scrollView.__clientWidth);\n            }\n            return parseInt(result);\n          };\n      }\n    }\n\n    var computedStyleNode;\n    var computedStyleScope;\n    function computeStyleDimensions() {\n      if (!computedStyleNode) {\n        transclude(computedStyleScope = scope.$new(), function(clone) {\n          clone[0].removeAttribute('collection-repeat'); // remove absolute position styling\n          computedStyleNode = clone[0];\n        });\n      }\n\n      computedStyleScope[keyExpr] = (listGetter(scope) || [])[0];\n      if (!$rootScope.$$phase) computedStyleScope.$digest();\n      containerNode.appendChild(computedStyleNode);\n\n      var style = $window.getComputedStyle(computedStyleNode);\n      computedStyleDimensions.width = parseInt(style.width);\n      computedStyleDimensions.height = parseInt(style.height);\n\n      containerNode.removeChild(computedStyleNode);\n    }\n\n  }\n\n}\n\nRepeatManagerFactory.$inject = ['$rootScope', '$window', '$$rAF'];\nfunction RepeatManagerFactory($rootScope, $window, $$rAF) {\n  var EMPTY_DIMENSION = { primaryPos: 0, secondaryPos: 0, primarySize: 0, secondarySize: 0, rowPrimarySize: 0 };\n\n  return function RepeatController(options) {\n    var afterItemsNode = options.afterItemsNode;\n    var containerNode = options.containerNode;\n    var forceRefreshImages = options.forceRefreshImages;\n    var heightData = options.heightData;\n    var widthData = options.widthData;\n    var keyExpression = options.keyExpression;\n    var renderBuffer = options.renderBuffer;\n    var scope = options.scope;\n    var scrollView = options.scrollView;\n    var transclude = options.transclude;\n\n    var data = [];\n\n    var getterLocals = {};\n    var heightFn = heightData.getValue || function() { return heightData.value; };\n    var heightGetter = function(index, value) {\n      getterLocals[keyExpression] = value;\n      getterLocals.$index = index;\n      return heightFn(scope, getterLocals);\n    };\n\n    var widthFn = widthData.getValue || function() { return widthData.value; };\n    var widthGetter = function(index, value) {\n      getterLocals[keyExpression] = value;\n      getterLocals.$index = index;\n      return widthFn(scope, getterLocals);\n    };\n\n    var isVertical = !!scrollView.options.scrollingY;\n\n    // We say it's a grid view if we're either dynamic or not 100% width\n    var isGridView = isVertical ?\n      (widthData.dynamic || widthData.value !== scrollView.__clientWidth) :\n      (heightData.dynamic || heightData.value !== scrollView.__clientHeight);\n\n    var isStaticView = !heightData.dynamic && !widthData.dynamic;\n\n    var PRIMARY = 'PRIMARY';\n    var SECONDARY = 'SECONDARY';\n    var TRANSLATE_TEMPLATE_STR = isVertical ?\n      'translate3d(SECONDARYpx,PRIMARYpx,0)' :\n      'translate3d(PRIMARYpx,SECONDARYpx,0)';\n    var WIDTH_HEIGHT_TEMPLATE_STR = isVertical ?\n      'height: PRIMARYpx; width: SECONDARYpx;' :\n      'height: SECONDARYpx; width: PRIMARYpx;';\n\n    var estimatedHeight;\n    var estimatedWidth;\n\n    var repeaterBeforeSize = 0;\n    var repeaterAfterSize = 0;\n\n    var renderStartIndex = -1;\n    var renderEndIndex = -1;\n    var renderAfterBoundary = -1;\n    var renderBeforeBoundary = -1;\n\n    var itemsPool = [];\n    var itemsLeaving = [];\n    var itemsEntering = [];\n    var itemsShownMap = {};\n    var nextItemId = 0;\n\n    var scrollViewSetDimensions = isVertical ?\n      function() { scrollView.setDimensions(null, null, null, view.getContentSize(), true); } :\n      function() { scrollView.setDimensions(null, null, view.getContentSize(), null, true); };\n\n    // view is a mix of list/grid methods + static/dynamic methods.\n    // See bottom for implementations. Available methods:\n    //\n    // getEstimatedPrimaryPos(i), getEstimatedSecondaryPos(i), getEstimatedIndex(scrollTop),\n    // calculateDimensions(toIndex), getDimensions(index),\n    // updateRenderRange(scrollTop, scrollValueEnd), onRefreshLayout(), onRefreshData()\n    var view = isVertical ? new VerticalViewType() : new HorizontalViewType();\n    (isGridView ? GridViewType : ListViewType).call(view);\n    (isStaticView ? StaticViewType : DynamicViewType).call(view);\n\n    var contentSizeStr = isVertical ? 'getContentHeight' : 'getContentWidth';\n    var originalGetContentSize = scrollView.options[contentSizeStr];\n    scrollView.options[contentSizeStr] = angular.bind(view, view.getContentSize);\n\n    scrollView.__$callback = scrollView.__callback;\n    scrollView.__callback = function(transformLeft, transformTop, zoom, wasResize) {\n      var scrollValue = view.getScrollValue();\n      if (renderStartIndex === -1 ||\n          scrollValue + view.scrollPrimarySize > renderAfterBoundary ||\n          scrollValue < renderBeforeBoundary) {\n        render();\n      }\n      scrollView.__$callback(transformLeft, transformTop, zoom, wasResize);\n    };\n\n    var isLayoutReady = false;\n    var isDataReady = false;\n    this.refreshLayout = function() {\n      if (data.length) {\n        estimatedHeight = heightGetter(0, data[0]);\n        estimatedWidth = widthGetter(0, data[0]);\n      } else {\n        // If we don't have any data in our array, just guess.\n        estimatedHeight = 100;\n        estimatedWidth = 100;\n      }\n\n      // Get the size of every element AFTER the repeater. We have to get the margin before and\n      // after the first/last element to fix a browser bug with getComputedStyle() not counting\n      // the first/last child's margins into height.\n      var style = getComputedStyle(afterItemsNode) || {};\n      var firstStyle = afterItemsNode.firstElementChild && getComputedStyle(afterItemsNode.firstElementChild) || {};\n      var lastStyle = afterItemsNode.lastElementChild && getComputedStyle(afterItemsNode.lastElementChild) || {};\n      repeaterAfterSize = (parseInt(style[isVertical ? 'height' : 'width']) || 0) +\n        (firstStyle && parseInt(firstStyle[isVertical ? 'marginTop' : 'marginLeft']) || 0) +\n        (lastStyle && parseInt(lastStyle[isVertical ? 'marginBottom' : 'marginRight']) || 0);\n\n      // Get the offsetTop of the repeater.\n      repeaterBeforeSize = 0;\n      var current = containerNode;\n      do {\n        repeaterBeforeSize += current[isVertical ? 'offsetTop' : 'offsetLeft'];\n      } while ( ionic.DomUtil.contains(scrollView.__content, current = current.offsetParent) );\n\n      var containerPrevNode = containerNode.previousElementSibling;\n      var beforeStyle = containerPrevNode ? $window.getComputedStyle(containerPrevNode) : {};\n      var beforeMargin = parseInt(beforeStyle[isVertical ? 'marginBottom' : 'marginRight'] || 0);\n\n      // Because we position the collection container with position: relative, it doesn't take\n      // into account where to position itself relative to the previous element's marginBottom.\n      // To compensate, we translate the container up by the previous element's margin.\n      containerNode.style[ionic.CSS.TRANSFORM] = TRANSLATE_TEMPLATE_STR\n        .replace(PRIMARY, -beforeMargin)\n        .replace(SECONDARY, 0);\n      repeaterBeforeSize -= beforeMargin;\n\n      if (!scrollView.__clientHeight || !scrollView.__clientWidth) {\n        scrollView.__clientWidth = scrollView.__container.clientWidth;\n        scrollView.__clientHeight = scrollView.__container.clientHeight;\n      }\n\n      (view.onRefreshLayout || angular.noop)();\n      view.refreshDirection();\n      scrollViewSetDimensions();\n\n      // Create the pool of items for reuse, setting the size to (estimatedItemsOnScreen) * 2,\n      // plus the size of the renderBuffer.\n      if (!isLayoutReady) {\n        var poolSize = Math.max(20, renderBuffer * 3);\n        for (var i = 0; i < poolSize; i++) {\n          itemsPool.push(new RepeatItem());\n        }\n      }\n\n      isLayoutReady = true;\n      if (isLayoutReady && isDataReady) {\n        // If the resize or latest data change caused the scrollValue to\n        // now be out of bounds, resize the scrollView.\n        if (scrollView.__scrollLeft > scrollView.__maxScrollLeft ||\n            scrollView.__scrollTop > scrollView.__maxScrollTop) {\n          scrollView.resize();\n        }\n        forceRerender(true);\n      }\n    };\n\n    this.setData = function(newData) {\n      data = newData;\n      (view.onRefreshData || angular.noop)();\n      isDataReady = true;\n    };\n\n    this.destroy = function() {\n      render.destroyed = true;\n\n      itemsPool.forEach(function(item) {\n        item.scope.$destroy();\n        item.scope = item.element = item.node = item.images = null;\n      });\n      itemsPool.length = itemsEntering.length = itemsLeaving.length = 0;\n      itemsShownMap = {};\n\n      //Restore the scrollView's normal behavior and resize it to normal size.\n      scrollView.options[contentSizeStr] = originalGetContentSize;\n      scrollView.__callback = scrollView.__$callback;\n      scrollView.resize();\n\n      (view.onDestroy || angular.noop)();\n    };\n\n    function forceRerender() {\n      return render(true);\n    }\n    function render(forceRerender) {\n      if (render.destroyed) return;\n      var i;\n      var ii;\n      var item;\n      var dim;\n      var scope;\n      var scrollValue = view.getScrollValue();\n      var scrollValueEnd = scrollValue + view.scrollPrimarySize;\n\n      view.updateRenderRange(scrollValue, scrollValueEnd);\n\n      renderStartIndex = Math.max(0, renderStartIndex - renderBuffer);\n      renderEndIndex = Math.min(data.length - 1, renderEndIndex + renderBuffer);\n\n      for (i in itemsShownMap) {\n        if (i < renderStartIndex || i > renderEndIndex) {\n          item = itemsShownMap[i];\n          delete itemsShownMap[i];\n          itemsLeaving.push(item);\n          item.isShown = false;\n        }\n      }\n\n      // Render indicies that aren't shown yet\n      //\n      // NOTE(ajoslin): this may sound crazy, but calling any other functions during this render\n      // loop will often push the render time over the edge from less than one frame to over\n      // one frame, causing visible jank.\n      // DON'T call any other functions inside this loop unless it's vital.\n      for (i = renderStartIndex; i <= renderEndIndex; i++) {\n        // We only go forward with render if the index is in data, the item isn't already shown,\n        // or forceRerender is on.\n        if (i >= data.length || (itemsShownMap[i] && !forceRerender)) continue;\n\n        item = itemsShownMap[i] || (itemsShownMap[i] = itemsLeaving.length ? itemsLeaving.pop() :\n                                    itemsPool.length ? itemsPool.shift() :\n                                    new RepeatItem());\n        itemsEntering.push(item);\n        item.isShown = true;\n\n        scope = item.scope;\n        scope.$index = i;\n        scope[keyExpression] = data[i];\n        scope.$first = (i === 0);\n        scope.$last = (i === (data.length - 1));\n        scope.$middle = !(scope.$first || scope.$last);\n        scope.$odd = !(scope.$even = (i & 1) === 0);\n\n        if (scope.$$disconnected) ionic.Utils.reconnectScope(item.scope);\n\n        dim = view.getDimensions(i);\n        if (item.secondaryPos !== dim.secondaryPos || item.primaryPos !== dim.primaryPos) {\n          item.node.style[ionic.CSS.TRANSFORM] = TRANSLATE_TEMPLATE_STR\n            .replace(PRIMARY, (item.primaryPos = dim.primaryPos))\n            .replace(SECONDARY, (item.secondaryPos = dim.secondaryPos));\n        }\n        if (item.secondarySize !== dim.secondarySize || item.primarySize !== dim.primarySize) {\n          item.node.style.cssText = item.node.style.cssText\n            .replace(WIDTH_HEIGHT_REGEX, WIDTH_HEIGHT_TEMPLATE_STR\n              //TODO fix item.primarySize + 1 hack\n              .replace(PRIMARY, (item.primarySize = dim.primarySize) + 1)\n              .replace(SECONDARY, (item.secondarySize = dim.secondarySize))\n            );\n        }\n\n      }\n\n      // If we reach the end of the list, render the afterItemsNode - this contains all the\n      // elements the developer placed after the collection-repeat\n      if (renderEndIndex === data.length - 1) {\n        dim = view.getDimensions(data.length - 1) || EMPTY_DIMENSION;\n        afterItemsNode.style[ionic.CSS.TRANSFORM] = TRANSLATE_TEMPLATE_STR\n          .replace(PRIMARY, dim.primaryPos + dim.primarySize)\n          .replace(SECONDARY, 0);\n      }\n\n      while (itemsLeaving.length) {\n        item = itemsLeaving.pop();\n        item.scope.$broadcast('$collectionRepeatLeave');\n        ionic.Utils.disconnectScope(item.scope);\n        itemsPool.push(item);\n        item.node.style[ionic.CSS.TRANSFORM] = 'translate3d(-9999px,-9999px,0)';\n        item.primaryPos = item.secondaryPos = null;\n      }\n\n      if (forceRefreshImages) {\n        for (i = 0, ii = itemsEntering.length; i < ii && (item = itemsEntering[i]); i++) {\n          if (!item.images) continue;\n          for (var j = 0, jj = item.images.length, img; j < jj && (img = item.images[j]); j++) {\n            var src = img.src;\n            img.src = ONE_PX_TRANSPARENT_IMG_SRC;\n            img.src = src;\n          }\n        }\n      }\n      if (forceRerender) {\n        var rootScopePhase = $rootScope.$$phase;\n        while (itemsEntering.length) {\n          item = itemsEntering.pop();\n          if (!rootScopePhase) item.scope.$digest();\n        }\n      } else {\n        digestEnteringItems();\n      }\n    }\n\n    function digestEnteringItems() {\n      var item;\n      if (digestEnteringItems.running) return;\n      digestEnteringItems.running = true;\n\n      $$rAF(function process() {\n        var rootScopePhase = $rootScope.$$phase;\n        while (itemsEntering.length) {\n          item = itemsEntering.pop();\n          if (item.isShown) {\n            if (!rootScopePhase) item.scope.$digest();\n          }\n        }\n        digestEnteringItems.running = false;\n      });\n    }\n\n    function RepeatItem() {\n      var self = this;\n      this.scope = scope.$new();\n      this.id = 'item' + (nextItemId++);\n      transclude(this.scope, function(clone) {\n        self.element = clone;\n        self.element.data('$$collectionRepeatItem', self);\n        // TODO destroy\n        self.node = clone[0];\n        // Batch style setting to lower repaints\n        self.node.style[ionic.CSS.TRANSFORM] = 'translate3d(-9999px,-9999px,0)';\n        self.node.style.cssText += ' height: 0px; width: 0px;';\n        ionic.Utils.disconnectScope(self.scope);\n        containerNode.appendChild(self.node);\n        self.images = clone[0].getElementsByTagName('img');\n      });\n    }\n\n    function VerticalViewType() {\n      this.getItemPrimarySize = heightGetter;\n      this.getItemSecondarySize = widthGetter;\n\n      this.getScrollValue = function() {\n        return Math.max(0, Math.min(scrollView.__scrollTop - repeaterBeforeSize,\n          scrollView.__maxScrollTop - repeaterBeforeSize - repeaterAfterSize));\n      };\n\n      this.refreshDirection = function() {\n        this.scrollPrimarySize = scrollView.__clientHeight;\n        this.scrollSecondarySize = scrollView.__clientWidth;\n\n        this.estimatedPrimarySize = estimatedHeight;\n        this.estimatedSecondarySize = estimatedWidth;\n        this.estimatedItemsAcross = isGridView &&\n          Math.floor(scrollView.__clientWidth / estimatedWidth) ||\n          1;\n      };\n    }\n    function HorizontalViewType() {\n      this.getItemPrimarySize = widthGetter;\n      this.getItemSecondarySize = heightGetter;\n\n      this.getScrollValue = function() {\n        return Math.max(0, Math.min(scrollView.__scrollLeft - repeaterBeforeSize,\n          scrollView.__maxScrollLeft - repeaterBeforeSize - repeaterAfterSize));\n      };\n\n      this.refreshDirection = function() {\n        this.scrollPrimarySize = scrollView.__clientWidth;\n        this.scrollSecondarySize = scrollView.__clientHeight;\n\n        this.estimatedPrimarySize = estimatedWidth;\n        this.estimatedSecondarySize = estimatedHeight;\n        this.estimatedItemsAcross = isGridView &&\n          Math.floor(scrollView.__clientHeight / estimatedHeight) ||\n          1;\n      };\n    }\n\n    function GridViewType() {\n      this.getEstimatedSecondaryPos = function(index) {\n        return (index % this.estimatedItemsAcross) * this.estimatedSecondarySize;\n      };\n      this.getEstimatedPrimaryPos = function(index) {\n        return Math.floor(index / this.estimatedItemsAcross) * this.estimatedPrimarySize;\n      };\n      this.getEstimatedIndex = function(scrollValue) {\n        return Math.floor(scrollValue / this.estimatedPrimarySize) *\n          this.estimatedItemsAcross;\n      };\n    }\n\n    function ListViewType() {\n      this.getEstimatedSecondaryPos = function() {\n        return 0;\n      };\n      this.getEstimatedPrimaryPos = function(index) {\n        return index * this.estimatedPrimarySize;\n      };\n      this.getEstimatedIndex = function(scrollValue) {\n        return Math.floor((scrollValue) / this.estimatedPrimarySize);\n      };\n    }\n\n    function StaticViewType() {\n      this.getContentSize = function() {\n        return this.getEstimatedPrimaryPos(data.length - 1) + this.estimatedPrimarySize +\n          repeaterBeforeSize + repeaterAfterSize;\n      };\n      // static view always returns the same object for getDimensions, to avoid memory allocation\n      // while scrolling. This could be dangerous if this was a public function, but it's not.\n      // Only we use it.\n      var dim = {};\n      this.getDimensions = function(index) {\n        dim.primaryPos = this.getEstimatedPrimaryPos(index);\n        dim.secondaryPos = this.getEstimatedSecondaryPos(index);\n        dim.primarySize = this.estimatedPrimarySize;\n        dim.secondarySize = this.estimatedSecondarySize;\n        return dim;\n      };\n      this.updateRenderRange = function(scrollValue, scrollValueEnd) {\n        renderStartIndex = Math.max(0, this.getEstimatedIndex(scrollValue));\n\n        // Make sure the renderEndIndex takes into account all the items on the row\n        renderEndIndex = Math.min(data.length - 1,\n          this.getEstimatedIndex(scrollValueEnd) + this.estimatedItemsAcross - 1);\n\n        renderBeforeBoundary = Math.max(0,\n          this.getEstimatedPrimaryPos(renderStartIndex));\n        renderAfterBoundary = this.getEstimatedPrimaryPos(renderEndIndex) +\n          this.estimatedPrimarySize;\n      };\n    }\n\n    function DynamicViewType() {\n      var self = this;\n      var debouncedScrollViewSetDimensions = ionic.debounce(scrollViewSetDimensions, 25, true);\n      var calculateDimensions = isGridView ? calculateDimensionsGrid : calculateDimensionsList;\n      var dimensionsIndex;\n      var dimensions = [];\n\n\n      // Get the dimensions at index. {width, height, left, top}.\n      // We start with no dimensions calculated, then any time dimensions are asked for at an\n      // index we calculate dimensions up to there.\n      function calculateDimensionsList(toIndex) {\n        var i, prevDimension, dim;\n        for (i = Math.max(0, dimensionsIndex); i <= toIndex && (dim = dimensions[i]); i++) {\n          prevDimension = dimensions[i - 1] || EMPTY_DIMENSION;\n          dim.primarySize = self.getItemPrimarySize(i, data[i]);\n          dim.secondarySize = self.scrollSecondarySize;\n          dim.primaryPos = prevDimension.primaryPos + prevDimension.primarySize;\n          dim.secondaryPos = 0;\n        }\n      }\n      function calculateDimensionsGrid(toIndex) {\n        var i, prevDimension, dim;\n        for (i = Math.max(dimensionsIndex, 0); i <= toIndex && (dim = dimensions[i]); i++) {\n          prevDimension = dimensions[i - 1] || EMPTY_DIMENSION;\n          dim.secondarySize = Math.min(\n            self.getItemSecondarySize(i, data[i]),\n            self.scrollSecondarySize\n          );\n          dim.secondaryPos = prevDimension.secondaryPos + prevDimension.secondarySize;\n\n          if (i === 0 || dim.secondaryPos + dim.secondarySize > self.scrollSecondarySize) {\n            dim.secondaryPos = 0;\n            dim.primarySize = self.getItemPrimarySize(i, data[i]);\n            dim.primaryPos = prevDimension.primaryPos + prevDimension.rowPrimarySize;\n\n            dim.rowStartIndex = i;\n            dim.rowPrimarySize = dim.primarySize;\n          } else {\n            dim.primarySize = self.getItemPrimarySize(i, data[i]);\n            dim.primaryPos = prevDimension.primaryPos;\n            dim.rowStartIndex = prevDimension.rowStartIndex;\n\n            dimensions[dim.rowStartIndex].rowPrimarySize = dim.rowPrimarySize = Math.max(\n              dimensions[dim.rowStartIndex].rowPrimarySize,\n              dim.primarySize\n            );\n            dim.rowPrimarySize = Math.max(dim.primarySize, dim.rowPrimarySize);\n          }\n        }\n      }\n\n      this.getContentSize = function() {\n        var dim = dimensions[dimensionsIndex] || EMPTY_DIMENSION;\n        return ((dim.primaryPos + dim.primarySize) || 0) +\n          this.getEstimatedPrimaryPos(data.length - dimensionsIndex - 1) +\n          repeaterBeforeSize + repeaterAfterSize;\n      };\n      this.onDestroy = function() {\n        dimensions.length = 0;\n      };\n\n      this.onRefreshData = function() {\n        var i;\n        var ii;\n        // Make sure dimensions has as many items as data.length.\n        // This is to be sure we don't have to allocate objects while scrolling.\n        for (i = dimensions.length, ii = data.length; i < ii; i++) {\n          dimensions.push({});\n        }\n        dimensionsIndex = -1;\n      };\n      this.onRefreshLayout = function() {\n        dimensionsIndex = -1;\n      };\n      this.getDimensions = function(index) {\n        index = Math.min(index, data.length - 1);\n\n        if (dimensionsIndex < index) {\n          // Once we start asking for dimensions near the end of the list, go ahead and calculate\n          // everything. This is to make sure when the user gets to the end of the list, the\n          // scroll height of the list is 100% accurate (not estimated anymore).\n          if (index > data.length * 0.9) {\n            calculateDimensions(data.length - 1);\n            dimensionsIndex = data.length - 1;\n            scrollViewSetDimensions();\n          } else {\n            calculateDimensions(index);\n            dimensionsIndex = index;\n            debouncedScrollViewSetDimensions();\n          }\n\n        }\n        return dimensions[index];\n      };\n\n      var oldRenderStartIndex = -1;\n      var oldScrollValue = -1;\n      this.updateRenderRange = function(scrollValue, scrollValueEnd) {\n        var i;\n        var len;\n        var dim;\n\n        // Calculate more dimensions than we estimate we'll need, to be sure.\n        this.getDimensions( this.getEstimatedIndex(scrollValueEnd) * 2 );\n\n        // -- Calculate renderStartIndex\n        // base case: start at 0\n        if (oldRenderStartIndex === -1 || scrollValue === 0) {\n          i = 0;\n        // scrolling down\n        } else if (scrollValue >= oldScrollValue) {\n          for (i = oldRenderStartIndex, len = data.length; i < len; i++) {\n            if ((dim = this.getDimensions(i)) && dim.primaryPos + dim.rowPrimarySize >= scrollValue) {\n              break;\n            }\n          }\n        // scrolling up\n        } else {\n          for (i = oldRenderStartIndex; i >= 0; i--) {\n            if ((dim = this.getDimensions(i)) && dim.primaryPos <= scrollValue) {\n              // when grid view, make sure the render starts at the beginning of a row.\n              i = isGridView ? dim.rowStartIndex : i;\n              break;\n            }\n          }\n        }\n\n        renderStartIndex = Math.min(Math.max(0, i), data.length - 1);\n        renderBeforeBoundary = renderStartIndex !== -1 ? this.getDimensions(renderStartIndex).primaryPos : -1;\n\n        // -- Calculate renderEndIndex\n        var lastRowDim;\n        for (i = renderStartIndex + 1, len = data.length; i < len; i++) {\n          if ((dim = this.getDimensions(i)) && dim.primaryPos + dim.rowPrimarySize > scrollValueEnd) {\n\n            // Go all the way to the end of the row if we're in a grid\n            if (isGridView) {\n              lastRowDim = dim;\n              while (i < len - 1 &&\n                    (dim = this.getDimensions(i + 1)).primaryPos === lastRowDim.primaryPos) {\n                i++;\n              }\n            }\n            break;\n          }\n        }\n\n        renderEndIndex = Math.min(i, data.length - 1);\n        renderAfterBoundary = renderEndIndex !== -1 ?\n          ((dim = this.getDimensions(renderEndIndex)).primaryPos + (dim.rowPrimarySize || dim.primarySize)) :\n          -1;\n\n        oldScrollValue = scrollValue;\n        oldRenderStartIndex = renderStartIndex;\n      };\n    }\n\n\n  };\n\n}\n\n/**\n * @ngdoc directive\n * @name ionContent\n * @module ionic\n * @delegate ionic.service:$ionicScrollDelegate\n * @restrict E\n *\n * @description\n * The ionContent directive provides an easy to use content area that can be configured\n * to use Ionic's custom Scroll View, or the built in overflow scrolling of the browser.\n *\n * While we recommend using the custom Scroll features in Ionic in most cases, sometimes\n * (for performance reasons) only the browser's native overflow scrolling will suffice,\n * and so we've made it easy to toggle between the Ionic scroll implementation and\n * overflow scrolling.\n *\n * You can implement pull-to-refresh with the {@link ionic.directive:ionRefresher}\n * directive, and infinite scrolling with the {@link ionic.directive:ionInfiniteScroll}\n * directive.\n *\n * If there is any dynamic content inside the ion-content, be sure to call `.resize()` with {@link ionic.service:$ionicScrollDelegate}\n * after the content has been added.\n *\n * Be aware that this directive gets its own child scope. If you do not understand why this\n * is important, you can read [https://docs.angularjs.org/guide/scope](https://docs.angularjs.org/guide/scope).\n *\n * @param {string=} delegate-handle The handle used to identify this scrollView\n * with {@link ionic.service:$ionicScrollDelegate}.\n * @param {string=} direction Which way to scroll. 'x' or 'y' or 'xy'. Default 'y'.\n * @param {boolean=} locking Whether to lock scrolling in one direction at a time. Useful to set to false when zoomed in or scrolling in two directions. Default true.\n * @param {boolean=} padding Whether to add padding to the content.\n * Defaults to true on iOS, false on Android.\n * @param {boolean=} scroll Whether to allow scrolling of content.  Defaults to true.\n * @param {boolean=} overflow-scroll Whether to use overflow-scrolling instead of\n * Ionic scroll. See {@link ionic.provider:$ionicConfigProvider} to set this as the global default.\n * @param {boolean=} scrollbar-x Whether to show the horizontal scrollbar. Default true.\n * @param {boolean=} scrollbar-y Whether to show the vertical scrollbar. Default true.\n * @param {string=} start-x Initial horizontal scroll position. Default 0.\n * @param {string=} start-y Initial vertical scroll position. Default 0.\n * @param {expression=} on-scroll Expression to evaluate when the content is scrolled.\n * @param {expression=} on-scroll-complete Expression to evaluate when a scroll action completes. Has access to 'scrollLeft' and 'scrollTop' locals.\n * @param {boolean=} has-bouncing Whether to allow scrolling to bounce past the edges\n * of the content.  Defaults to true on iOS, false on Android.\n * @param {number=} scroll-event-interval Number of milliseconds between each firing of the 'on-scroll' expression. Default 10.\n */\nIonicModule\n.directive('ionContent', [\n  '$timeout',\n  '$controller',\n  '$ionicBind',\n  '$ionicConfig',\nfunction($timeout, $controller, $ionicBind, $ionicConfig) {\n  return {\n    restrict: 'E',\n    require: '^?ionNavView',\n    scope: true,\n    priority: 800,\n    compile: function(element, attr) {\n      var innerElement;\n      var scrollCtrl;\n\n      element.addClass('scroll-content ionic-scroll');\n\n      if (attr.scroll != 'false') {\n        //We cannot use normal transclude here because it breaks element.data()\n        //inheritance on compile\n        innerElement = jqLite('<div class=\"scroll\"></div>');\n        innerElement.append(element.contents());\n        element.append(innerElement);\n      } else {\n        element.addClass('scroll-content-false');\n      }\n\n      var nativeScrolling = attr.overflowScroll !== \"false\" && (attr.overflowScroll === \"true\" || !$ionicConfig.scrolling.jsScrolling());\n\n      // collection-repeat requires JS scrolling\n      if (nativeScrolling) {\n        nativeScrolling = !element[0].querySelector('[collection-repeat]');\n      }\n      return { pre: prelink };\n      function prelink($scope, $element, $attr) {\n        var parentScope = $scope.$parent;\n        $scope.$watch(function() {\n          return (parentScope.$hasHeader ? ' has-header' : '') +\n            (parentScope.$hasSubheader ? ' has-subheader' : '') +\n            (parentScope.$hasFooter ? ' has-footer' : '') +\n            (parentScope.$hasSubfooter ? ' has-subfooter' : '') +\n            (parentScope.$hasTabs ? ' has-tabs' : '') +\n            (parentScope.$hasTabsTop ? ' has-tabs-top' : '');\n        }, function(className, oldClassName) {\n          $element.removeClass(oldClassName);\n          $element.addClass(className);\n        });\n\n        //Only this ionContent should use these variables from parent scopes\n        $scope.$hasHeader = $scope.$hasSubheader =\n          $scope.$hasFooter = $scope.$hasSubfooter =\n          $scope.$hasTabs = $scope.$hasTabsTop =\n          false;\n        $ionicBind($scope, $attr, {\n          $onScroll: '&onScroll',\n          $onScrollComplete: '&onScrollComplete',\n          hasBouncing: '@',\n          padding: '@',\n          direction: '@',\n          scrollbarX: '@',\n          scrollbarY: '@',\n          startX: '@',\n          startY: '@',\n          scrollEventInterval: '@'\n        });\n        $scope.direction = $scope.direction || 'y';\n\n        if (isDefined($attr.padding)) {\n          $scope.$watch($attr.padding, function(newVal) {\n              (innerElement || $element).toggleClass('padding', !!newVal);\n          });\n        }\n\n        if ($attr.scroll === \"false\") {\n          //do nothing\n        } else {\n          var scrollViewOptions = {};\n\n          // determined in compile phase above\n          if (nativeScrolling) {\n            // use native scrolling\n            $element.addClass('overflow-scroll');\n\n            scrollViewOptions = {\n              el: $element[0],\n              delegateHandle: attr.delegateHandle,\n              startX: $scope.$eval($scope.startX) || 0,\n              startY: $scope.$eval($scope.startY) || 0,\n              nativeScrolling: true\n            };\n\n          } else {\n            // Use JS scrolling\n            scrollViewOptions = {\n              el: $element[0],\n              delegateHandle: attr.delegateHandle,\n              locking: (attr.locking || 'true') === 'true',\n              bouncing: $scope.$eval($scope.hasBouncing),\n              startX: $scope.$eval($scope.startX) || 0,\n              startY: $scope.$eval($scope.startY) || 0,\n              scrollbarX: $scope.$eval($scope.scrollbarX) !== false,\n              scrollbarY: $scope.$eval($scope.scrollbarY) !== false,\n              scrollingX: $scope.direction.indexOf('x') >= 0,\n              scrollingY: $scope.direction.indexOf('y') >= 0,\n              scrollEventInterval: parseInt($scope.scrollEventInterval, 10) || 10,\n              scrollingComplete: onScrollComplete\n            };\n          }\n\n          // init scroll controller with appropriate options\n          scrollCtrl = $controller('$ionicScroll', {\n            $scope: $scope,\n            scrollViewOptions: scrollViewOptions\n          });\n\n          $scope.scrollCtrl = scrollCtrl;\n\n          $scope.$on('$destroy', function() {\n            if (scrollViewOptions) {\n              scrollViewOptions.scrollingComplete = noop;\n              delete scrollViewOptions.el;\n            }\n            innerElement = null;\n            $element = null;\n            attr.$$element = null;\n          });\n        }\n\n        function onScrollComplete() {\n          $scope.$onScrollComplete({\n            scrollTop: scrollCtrl.scrollView.__scrollTop,\n            scrollLeft: scrollCtrl.scrollView.__scrollLeft\n          });\n        }\n\n      }\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name exposeAsideWhen\n * @module ionic\n * @restrict A\n * @parent ionic.directive:ionSideMenus\n *\n * @description\n * It is common for a tablet application to hide a menu when in portrait mode, but to show the\n * same menu on the left side when the tablet is in landscape mode. The `exposeAsideWhen` attribute\n * directive can be used to accomplish a similar interface.\n *\n * By default, side menus are hidden underneath its side menu content, and can be opened by either\n * swiping the content left or right, or toggling a button to show the side menu. However, by adding the\n * `exposeAsideWhen` attribute directive to an {@link ionic.directive:ionSideMenu} element directive,\n * a side menu can be given instructions on \"when\" the menu should be exposed (always viewable). For\n * example, the `expose-aside-when=\"large\"` attribute will keep the side menu hidden when the viewport's\n * width is less than `768px`, but when the viewport's width is `768px` or greater, the menu will then\n * always be shown and can no longer be opened or closed like it could when it was hidden for smaller\n * viewports.\n *\n * Using `large` as the attribute's value is a shortcut value to `(min-width:768px)` since it is\n * the most common use-case. However, for added flexibility, any valid media query could be added\n * as the value, such as `(min-width:600px)` or even multiple queries such as\n * `(min-width:750px) and (max-width:1200px)`.\n * @usage\n * ```html\n * <ion-side-menus>\n *   <!-- Center content -->\n *   <ion-side-menu-content>\n *   </ion-side-menu-content>\n *\n *   <!-- Left menu -->\n *   <ion-side-menu expose-aside-when=\"large\">\n *   </ion-side-menu>\n * </ion-side-menus>\n * ```\n * For a complete side menu example, see the\n * {@link ionic.directive:ionSideMenus} documentation.\n */\n\nIonicModule.directive('exposeAsideWhen', ['$window', function($window) {\n  return {\n    restrict: 'A',\n    require: '^ionSideMenus',\n    link: function($scope, $element, $attr, sideMenuCtrl) {\n\n      var prevInnerWidth = $window.innerWidth;\n      var prevInnerHeight = $window.innerHeight;\n\n      ionic.on('resize', function() {\n        if (prevInnerWidth === $window.innerWidth && prevInnerHeight === $window.innerHeight) {\n          return;\n        }\n        prevInnerWidth = $window.innerWidth;\n        prevInnerHeight = $window.innerHeight;\n        onResize();\n      }, $window);\n\n      function checkAsideExpose() {\n        var mq = $attr.exposeAsideWhen == 'large' ? '(min-width:768px)' : $attr.exposeAsideWhen;\n        sideMenuCtrl.exposeAside($window.matchMedia(mq).matches);\n        sideMenuCtrl.activeAsideResizing(false);\n      }\n\n      function onResize() {\n        sideMenuCtrl.activeAsideResizing(true);\n        debouncedCheck();\n      }\n\n      var debouncedCheck = ionic.debounce(function() {\n        $scope.$apply(checkAsideExpose);\n      }, 300, false);\n\n      $scope.$evalAsync(checkAsideExpose);\n    }\n  };\n}]);\n\nvar GESTURE_DIRECTIVES = 'onHold onTap onDoubleTap onTouch onRelease onDragStart onDrag onDragEnd onDragUp onDragRight onDragDown onDragLeft onSwipe onSwipeUp onSwipeRight onSwipeDown onSwipeLeft'.split(' ');\n\nGESTURE_DIRECTIVES.forEach(function(name) {\n  IonicModule.directive(name, gestureDirective(name));\n});\n\n\n/**\n * @ngdoc directive\n * @name onHold\n * @module ionic\n * @restrict A\n *\n * @description\n * Touch stays at the same location for 500ms. Similar to long touch events available for AngularJS and jQuery.\n *\n * @usage\n * ```html\n * <button on-hold=\"onHold()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onTap\n * @module ionic\n * @restrict A\n *\n * @description\n * Quick touch at a location. If the duration of the touch goes\n * longer than 250ms it is no longer a tap gesture.\n *\n * @usage\n * ```html\n * <button on-tap=\"onTap()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onDoubleTap\n * @module ionic\n * @restrict A\n *\n * @description\n * Double tap touch at a location.\n *\n * @usage\n * ```html\n * <button on-double-tap=\"onDoubleTap()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onTouch\n * @module ionic\n * @restrict A\n *\n * @description\n * Called immediately when the user first begins a touch. This\n * gesture does not wait for a touchend/mouseup.\n *\n * @usage\n * ```html\n * <button on-touch=\"onTouch()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onRelease\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when the user ends a touch.\n *\n * @usage\n * ```html\n * <button on-release=\"onRelease()\" class=\"button\">Test</button>\n * ```\n */\n\n/**\n * @ngdoc directive\n * @name onDragStart\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when a drag gesture has started.\n *\n * @usage\n * ```html\n * <button on-drag-start=\"onDragStart()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onDrag\n * @module ionic\n * @restrict A\n *\n * @description\n * Move with one touch around on the page. Blocking the scrolling when\n * moving left and right is a good practice. When all the drag events are\n * blocking you disable scrolling on that area.\n *\n * @usage\n * ```html\n * <button on-drag=\"onDrag()\" class=\"button\">Test</button>\n * ```\n */\n\n/**\n * @ngdoc directive\n * @name onDragEnd\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when a drag gesture has ended.\n *\n * @usage\n * ```html\n * <button on-drag-end=\"onDragEnd()\" class=\"button\">Test</button>\n * ```\n */\n\n/**\n * @ngdoc directive\n * @name onDragUp\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when the element is dragged up.\n *\n * @usage\n * ```html\n * <button on-drag-up=\"onDragUp()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onDragRight\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when the element is dragged to the right.\n *\n * @usage\n * ```html\n * <button on-drag-right=\"onDragRight()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onDragDown\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when the element is dragged down.\n *\n * @usage\n * ```html\n * <button on-drag-down=\"onDragDown()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onDragLeft\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when the element is dragged to the left.\n *\n * @usage\n * ```html\n * <button on-drag-left=\"onDragLeft()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onSwipe\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when a moving touch has a high velocity in any direction.\n *\n * @usage\n * ```html\n * <button on-swipe=\"onSwipe()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onSwipeUp\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when a moving touch has a high velocity moving up.\n *\n * @usage\n * ```html\n * <button on-swipe-up=\"onSwipeUp()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onSwipeRight\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when a moving touch has a high velocity moving to the right.\n *\n * @usage\n * ```html\n * <button on-swipe-right=\"onSwipeRight()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onSwipeDown\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when a moving touch has a high velocity moving down.\n *\n * @usage\n * ```html\n * <button on-swipe-down=\"onSwipeDown()\" class=\"button\">Test</button>\n * ```\n */\n\n\n/**\n * @ngdoc directive\n * @name onSwipeLeft\n * @module ionic\n * @restrict A\n *\n * @description\n * Called when a moving touch has a high velocity moving to the left.\n *\n * @usage\n * ```html\n * <button on-swipe-left=\"onSwipeLeft()\" class=\"button\">Test</button>\n * ```\n */\n\n\nfunction gestureDirective(directiveName) {\n  return ['$ionicGesture', '$parse', function($ionicGesture, $parse) {\n    var eventType = directiveName.substr(2).toLowerCase();\n\n    return function(scope, element, attr) {\n      var fn = $parse( attr[directiveName] );\n\n      var listener = function(ev) {\n        scope.$apply(function() {\n          fn(scope, {\n            $event: ev\n          });\n        });\n      };\n\n      var gesture = $ionicGesture.on(eventType, listener, element);\n\n      scope.$on('$destroy', function() {\n        $ionicGesture.off(gesture, eventType, listener);\n      });\n    };\n  }];\n}\n\n\nIonicModule\n//.directive('ionHeaderBar', tapScrollToTopDirective())\n\n/**\n * @ngdoc directive\n * @name ionHeaderBar\n * @module ionic\n * @restrict E\n *\n * @description\n * Adds a fixed header bar above some content.\n *\n * Can also be a subheader (lower down) if the 'bar-subheader' class is applied.\n * See [the header CSS docs](/docs/components/#subheader).\n *\n * @param {string=} align-title How to align the title. By default the title\n * will be aligned the same as how the platform aligns its titles (iOS centers\n * titles, Android aligns them left).\n * Available: 'left', 'right', or 'center'.  Defaults to the same as the platform.\n * @param {boolean=} no-tap-scroll By default, the header bar will scroll the\n * content to the top when tapped.  Set no-tap-scroll to true to disable this\n * behavior.\n * Available: true or false.  Defaults to false.\n *\n * @usage\n * ```html\n * <ion-header-bar align-title=\"left\" class=\"bar-positive\">\n *   <div class=\"buttons\">\n *     <button class=\"button\" ng-click=\"doSomething()\">Left Button</button>\n *   </div>\n *   <h1 class=\"title\">Title!</h1>\n *   <div class=\"buttons\">\n *     <button class=\"button\">Right Button</button>\n *   </div>\n * </ion-header-bar>\n * <ion-content class=\"has-header\">\n *   Some content!\n * </ion-content>\n * ```\n */\n.directive('ionHeaderBar', headerFooterBarDirective(true))\n\n/**\n * @ngdoc directive\n * @name ionFooterBar\n * @module ionic\n * @restrict E\n *\n * @description\n * Adds a fixed footer bar below some content.\n *\n * Can also be a subfooter (higher up) if the 'bar-subfooter' class is applied.\n * See [the footer CSS docs](/docs/components/#footer).\n *\n * Note: If you use ionFooterBar in combination with ng-if, the surrounding content\n * will not align correctly.  This will be fixed soon.\n *\n * @param {string=} align-title Where to align the title.\n * Available: 'left', 'right', or 'center'.  Defaults to 'center'.\n *\n * @usage\n * ```html\n * <ion-content class=\"has-footer\">\n *   Some content!\n * </ion-content>\n * <ion-footer-bar align-title=\"left\" class=\"bar-assertive\">\n *   <div class=\"buttons\">\n *     <button class=\"button\">Left Button</button>\n *   </div>\n *   <h1 class=\"title\">Title!</h1>\n *   <div class=\"buttons\" ng-click=\"doSomething()\">\n *     <button class=\"button\">Right Button</button>\n *   </div>\n * </ion-footer-bar>\n * ```\n */\n.directive('ionFooterBar', headerFooterBarDirective(false));\n\nfunction tapScrollToTopDirective() { //eslint-disable-line no-unused-vars\n  return ['$ionicScrollDelegate', function($ionicScrollDelegate) {\n    return {\n      restrict: 'E',\n      link: function($scope, $element, $attr) {\n        if ($attr.noTapScroll == 'true') {\n          return;\n        }\n        ionic.on('tap', onTap, $element[0]);\n        $scope.$on('$destroy', function() {\n          ionic.off('tap', onTap, $element[0]);\n        });\n\n        function onTap(e) {\n          var depth = 3;\n          var current = e.target;\n          //Don't scroll to top in certain cases\n          while (depth-- && current) {\n            if (current.classList.contains('button') ||\n                current.tagName.match(/input|textarea|select/i) ||\n                current.isContentEditable) {\n              return;\n            }\n            current = current.parentNode;\n          }\n          var touch = e.gesture && e.gesture.touches[0] || e.detail.touches[0];\n          var bounds = $element[0].getBoundingClientRect();\n          if (ionic.DomUtil.rectContains(\n            touch.pageX, touch.pageY,\n            bounds.left, bounds.top - 20,\n            bounds.left + bounds.width, bounds.top + bounds.height\n          )) {\n            $ionicScrollDelegate.scrollTop(true);\n          }\n        }\n      }\n    };\n  }];\n}\n\nfunction headerFooterBarDirective(isHeader) {\n  return ['$document', '$timeout', function($document, $timeout) {\n    return {\n      restrict: 'E',\n      controller: '$ionicHeaderBar',\n      compile: function(tElement) {\n        tElement.addClass(isHeader ? 'bar bar-header' : 'bar bar-footer');\n        // top style tabs? if so, remove bottom border for seamless display\n        $timeout(function() {\n          if (isHeader && $document[0].getElementsByClassName('tabs-top').length) tElement.addClass('has-tabs-top');\n        });\n\n        return { pre: prelink };\n        function prelink($scope, $element, $attr, ctrl) {\n          if (isHeader) {\n            $scope.$watch(function() { return $element[0].className; }, function(value) {\n              var isShown = value.indexOf('ng-hide') === -1;\n              var isSubheader = value.indexOf('bar-subheader') !== -1;\n              $scope.$hasHeader = isShown && !isSubheader;\n              $scope.$hasSubheader = isShown && isSubheader;\n              $scope.$emit('$ionicSubheader', $scope.$hasSubheader);\n            });\n            $scope.$on('$destroy', function() {\n              delete $scope.$hasHeader;\n              delete $scope.$hasSubheader;\n            });\n            ctrl.align();\n            $scope.$on('$ionicHeader.align', function() {\n              ionic.requestAnimationFrame(function() {\n                ctrl.align();\n              });\n            });\n\n          } else {\n            $scope.$watch(function() { return $element[0].className; }, function(value) {\n              var isShown = value.indexOf('ng-hide') === -1;\n              var isSubfooter = value.indexOf('bar-subfooter') !== -1;\n              $scope.$hasFooter = isShown && !isSubfooter;\n              $scope.$hasSubfooter = isShown && isSubfooter;\n            });\n            $scope.$on('$destroy', function() {\n              delete $scope.$hasFooter;\n              delete $scope.$hasSubfooter;\n            });\n            $scope.$watch('$hasTabs', function(val) {\n              $element.toggleClass('has-tabs', !!val);\n            });\n            ctrl.align();\n            $scope.$on('$ionicFooter.align', function() {\n              ionic.requestAnimationFrame(function() {\n                ctrl.align();\n              });\n            });\n          }\n        }\n      }\n    };\n  }];\n}\n\n/**\n * @ngdoc directive\n * @name ionInfiniteScroll\n * @module ionic\n * @parent ionic.directive:ionContent, ionic.directive:ionScroll\n * @restrict E\n *\n * @description\n * The ionInfiniteScroll directive allows you to call a function whenever\n * the user gets to the bottom of the page or near the bottom of the page.\n *\n * The expression you pass in for `on-infinite` is called when the user scrolls\n * greater than `distance` away from the bottom of the content.  Once `on-infinite`\n * is done loading new data, it should broadcast the `scroll.infiniteScrollComplete`\n * event from your controller (see below example).\n *\n * @param {expression} on-infinite What to call when the scroller reaches the\n * bottom.\n * @param {string=} distance The distance from the bottom that the scroll must\n * reach to trigger the on-infinite expression. Default: 1%.\n * @param {string=} spinner The {@link ionic.directive:ionSpinner} to show while loading. The SVG\n * {@link ionic.directive:ionSpinner} is now the default, replacing rotating font icons.\n * @param {string=} icon The icon to show while loading. Default: 'ion-load-d'.  This is depreciated\n * in favor of the SVG {@link ionic.directive:ionSpinner}.\n * @param {boolean=} immediate-check Whether to check the infinite scroll bounds immediately on load.\n *\n * @usage\n * ```html\n * <ion-content ng-controller=\"MyController\">\n *   <ion-list>\n *   ....\n *   ....\n *   </ion-list>\n *\n *   <ion-infinite-scroll\n *     on-infinite=\"loadMore()\"\n *     distance=\"1%\">\n *   </ion-infinite-scroll>\n * </ion-content>\n * ```\n * ```js\n * function MyController($scope, $http) {\n *   $scope.items = [];\n *   $scope.loadMore = function() {\n *     $http.get('/more-items').success(function(items) {\n *       useItems(items);\n *       $scope.$broadcast('scroll.infiniteScrollComplete');\n *     });\n *   };\n *\n *   $scope.$on('$stateChangeSuccess', function() {\n *     $scope.loadMore();\n *   });\n * }\n * ```\n *\n * An easy to way to stop infinite scroll once there is no more data to load\n * is to use angular's `ng-if` directive:\n *\n * ```html\n * <ion-infinite-scroll\n *   ng-if=\"moreDataCanBeLoaded()\"\n *   icon=\"ion-loading-c\"\n *   on-infinite=\"loadMoreData()\">\n * </ion-infinite-scroll>\n * ```\n */\nIonicModule\n.directive('ionInfiniteScroll', ['$timeout', function($timeout) {\n  return {\n    restrict: 'E',\n    require: ['?^$ionicScroll', 'ionInfiniteScroll'],\n    template: function($element, $attrs) {\n      if ($attrs.icon) return '<i class=\"icon {{icon()}} icon-refreshing {{scrollingType}}\"></i>';\n      return '<ion-spinner icon=\"{{spinner()}}\"></ion-spinner>';\n    },\n    scope: true,\n    controller: '$ionInfiniteScroll',\n    link: function($scope, $element, $attrs, ctrls) {\n      var infiniteScrollCtrl = ctrls[1];\n      var scrollCtrl = infiniteScrollCtrl.scrollCtrl = ctrls[0];\n      var jsScrolling = infiniteScrollCtrl.jsScrolling = !scrollCtrl.isNative();\n\n      // if this view is not beneath a scrollCtrl, it can't be injected, proceed w/ native scrolling\n      if (jsScrolling) {\n        infiniteScrollCtrl.scrollView = scrollCtrl.scrollView;\n        $scope.scrollingType = 'js-scrolling';\n        //bind to JS scroll events\n        scrollCtrl.$element.on('scroll', infiniteScrollCtrl.checkBounds);\n      } else {\n        // grabbing the scrollable element, to determine dimensions, and current scroll pos\n        var scrollEl = ionic.DomUtil.getParentOrSelfWithClass($element[0].parentNode, 'overflow-scroll');\n        infiniteScrollCtrl.scrollEl = scrollEl;\n        // if there's no scroll controller, and no overflow scroll div, infinite scroll wont work\n        if (!scrollEl) {\n          throw 'Infinite scroll must be used inside a scrollable div';\n        }\n        //bind to native scroll events\n        infiniteScrollCtrl.scrollEl.addEventListener('scroll', infiniteScrollCtrl.checkBounds);\n      }\n\n      // Optionally check bounds on start after scrollView is fully rendered\n      var doImmediateCheck = isDefined($attrs.immediateCheck) ? $scope.$eval($attrs.immediateCheck) : true;\n      if (doImmediateCheck) {\n        $timeout(function() { infiniteScrollCtrl.checkBounds(); });\n      }\n    }\n  };\n}]);\n\n/**\n* @ngdoc directive\n* @name ionInput\n* @parent ionic.directive:ionList\n* @module ionic\n* @restrict E\n* Creates a text input group that can easily be focused\n*\n* @usage\n*\n* ```html\n* <ion-list>\n*   <ion-input>\n*     <input type=\"text\" placeholder=\"First Name\">\n*   </ion-input>\n*\n*   <ion-input>\n*     <ion-label>Username</ion-label>\n*     <input type=\"text\">\n*   </ion-input>\n* </ion-list>\n* ```\n*/\n\nvar labelIds = -1;\n\nIonicModule\n.directive('ionInput', [function() {\n  return {\n    restrict: 'E',\n    controller: ['$scope', '$element', function($scope, $element) {\n      this.$scope = $scope;\n      this.$element = $element;\n\n      this.setInputAriaLabeledBy = function(id) {\n        var inputs = $element[0].querySelectorAll('input,textarea');\n        inputs.length && inputs[0].setAttribute('aria-labelledby', id);\n      };\n\n      this.focus = function() {\n        var inputs = $element[0].querySelectorAll('input,textarea');\n        inputs.length && inputs[0].focus();\n      };\n    }]\n  };\n}]);\n\n/**\n* @ngdoc directive\n* @name ionLabel\n* @parent ionic.directive:ionList\n* @module ionic\n* @restrict E\n*\n* New in Ionic 1.2. It is strongly recommended that you use `<ion-label>` in place\n* of any `<label>` elements for maximum cross-browser support and performance.\n*\n* Creates a label for a form input.\n*\n* @usage\n*\n* ```html\n* <ion-list>\n*   <ion-input>\n*     <ion-label>Username</ion-label>\n*     <input type=\"text\">\n*   </ion-input>\n* </ion-list>\n* ```\n*/\nIonicModule\n.directive('ionLabel', [function() {\n  return {\n    restrict: 'E',\n    require: '?^ionInput',\n    compile: function() {\n\n      return function link($scope, $element, $attrs, ionInputCtrl) {\n        var element = $element[0];\n\n        $element.addClass('input-label');\n\n        $element.attr('aria-label', $element.text());\n        var id = element.id || '_label-' + ++labelIds;\n\n        if (!element.id) {\n          $element.attr('id', id);\n        }\n\n        if (ionInputCtrl) {\n\n          ionInputCtrl.setInputAriaLabeledBy(id);\n\n          $element.on('click', function() {\n            ionInputCtrl.focus();\n          });\n        }\n      };\n    }\n  };\n}]);\n\n/**\n * Input label adds accessibility to <span class=\"input-label\">.\n */\nIonicModule\n.directive('inputLabel', [function() {\n  return {\n    restrict: 'C',\n    require: '?^ionInput',\n    compile: function() {\n\n      return function link($scope, $element, $attrs, ionInputCtrl) {\n        var element = $element[0];\n\n        $element.attr('aria-label', $element.text());\n        var id = element.id || '_label-' + ++labelIds;\n\n        if (!element.id) {\n          $element.attr('id', id);\n        }\n\n        if (ionInputCtrl) {\n          ionInputCtrl.setInputAriaLabeledBy(id);\n        }\n\n      };\n    }\n  };\n}]);\n\n/**\n* @ngdoc directive\n* @name ionItem\n* @parent ionic.directive:ionList\n* @module ionic\n* @restrict E\n* Creates a list-item that can easily be swiped,\n* deleted, reordered, edited, and more.\n*\n* See {@link ionic.directive:ionList} for a complete example & explanation.\n*\n* Can be assigned any item class name. See the\n* [list CSS documentation](/docs/components/#list).\n*\n* @usage\n*\n* ```html\n* <ion-list>\n*   <ion-item>Hello!</ion-item>\n*   <ion-item href=\"#/detail\">\n*     Link to detail page\n*   </ion-item>\n* </ion-list>\n* ```\n*/\nIonicModule\n.directive('ionItem', ['$$rAF', function($$rAF) {\n  return {\n    restrict: 'E',\n    controller: ['$scope', '$element', function($scope, $element) {\n      this.$scope = $scope;\n      this.$element = $element;\n    }],\n    scope: true,\n    compile: function($element, $attrs) {\n      var isAnchor = isDefined($attrs.href) ||\n                     isDefined($attrs.ngHref) ||\n                     isDefined($attrs.uiSref);\n      var isComplexItem = isAnchor ||\n        //Lame way of testing, but we have to know at compile what to do with the element\n        /ion-(delete|option|reorder)-button/i.test($element.html());\n\n      if (isComplexItem) {\n        var innerElement = jqLite(isAnchor ? '<a></a>' : '<div></div>');\n        innerElement.addClass('item-content');\n\n        if (isDefined($attrs.href) || isDefined($attrs.ngHref)) {\n          innerElement.attr('ng-href', '{{$href()}}');\n          if (isDefined($attrs.target)) {\n            innerElement.attr('target', '{{$target()}}');\n          }\n        }\n\n        innerElement.append($element.contents());\n\n        $element.addClass('item item-complex')\n                .append(innerElement);\n      } else {\n        $element.addClass('item');\n      }\n\n      return function link($scope, $element, $attrs) {\n        $scope.$href = function() {\n          return $attrs.href || $attrs.ngHref;\n        };\n        $scope.$target = function() {\n          return $attrs.target;\n        };\n\n        var content = $element[0].querySelector('.item-content');\n        if (content) {\n          $scope.$on('$collectionRepeatLeave', function() {\n            if (content && content.$$ionicOptionsOpen) {\n              content.style[ionic.CSS.TRANSFORM] = '';\n              content.style[ionic.CSS.TRANSITION] = 'none';\n              $$rAF(function() {\n                content.style[ionic.CSS.TRANSITION] = '';\n              });\n              content.$$ionicOptionsOpen = false;\n            }\n          });\n        }\n      };\n\n    }\n  };\n}]);\n\nvar ITEM_TPL_DELETE_BUTTON =\n  '<div class=\"item-left-edit item-delete enable-pointer-events\">' +\n  '</div>';\n/**\n* @ngdoc directive\n* @name ionDeleteButton\n* @parent ionic.directive:ionItem\n* @module ionic\n* @restrict E\n* Creates a delete button inside a list item, that is visible when the\n* {@link ionic.directive:ionList ionList parent's} `show-delete` evaluates to true or\n* `$ionicListDelegate.showDelete(true)` is called.\n*\n* Takes any ionicon as a class.\n*\n* See {@link ionic.directive:ionList} for a complete example & explanation.\n*\n* @usage\n*\n* ```html\n* <ion-list show-delete=\"shouldShowDelete\">\n*   <ion-item>\n*     <ion-delete-button class=\"ion-minus-circled\"></ion-delete-button>\n*     Hello, list item!\n*   </ion-item>\n* </ion-list>\n* <ion-toggle ng-model=\"shouldShowDelete\">\n*   Show Delete?\n* </ion-toggle>\n* ```\n*/\nIonicModule\n.directive('ionDeleteButton', function() {\n\n  function stopPropagation(ev) {\n    ev.stopPropagation();\n  }\n\n  return {\n    restrict: 'E',\n    require: ['^^ionItem', '^?ionList'],\n    //Run before anything else, so we can move it before other directives process\n    //its location (eg ngIf relies on the location of the directive in the dom)\n    priority: Number.MAX_VALUE,\n    compile: function($element, $attr) {\n      //Add the classes we need during the compile phase, so that they stay\n      //even if something else like ngIf removes the element and re-addss it\n      $attr.$set('class', ($attr['class'] || '') + ' button icon button-icon', true);\n      return function($scope, $element, $attr, ctrls) {\n        var itemCtrl = ctrls[0];\n        var listCtrl = ctrls[1];\n        var container = jqLite(ITEM_TPL_DELETE_BUTTON);\n        container.append($element);\n        itemCtrl.$element.append(container).addClass('item-left-editable');\n\n        //Don't bubble click up to main .item\n        $element.on('click', stopPropagation);\n\n        init();\n        $scope.$on('$ionic.reconnectScope', init);\n        function init() {\n          listCtrl = listCtrl || $element.controller('ionList');\n          if (listCtrl && listCtrl.showDelete()) {\n            container.addClass('visible active');\n          }\n        }\n      };\n    }\n  };\n});\n\n\nIonicModule\n.directive('itemFloatingLabel', function() {\n  return {\n    restrict: 'C',\n    link: function(scope, element) {\n      var el = element[0];\n      var input = el.querySelector('input, textarea');\n      var inputLabel = el.querySelector('.input-label');\n\n      if (!input || !inputLabel) return;\n\n      var onInput = function() {\n        if (input.value) {\n          inputLabel.classList.add('has-input');\n        } else {\n          inputLabel.classList.remove('has-input');\n        }\n      };\n\n      input.addEventListener('input', onInput);\n\n      var ngModelCtrl = jqLite(input).controller('ngModel');\n      if (ngModelCtrl) {\n        ngModelCtrl.$render = function() {\n          input.value = ngModelCtrl.$viewValue || '';\n          onInput();\n        };\n      }\n\n      scope.$on('$destroy', function() {\n        input.removeEventListener('input', onInput);\n      });\n    }\n  };\n});\n\nvar ITEM_TPL_OPTION_BUTTONS =\n  '<div class=\"item-options invisible\">' +\n  '</div>';\n/**\n* @ngdoc directive\n* @name ionOptionButton\n* @parent ionic.directive:ionItem\n* @module ionic\n* @restrict E\n* @description\n* Creates an option button inside a list item, that is visible when the item is swiped\n* to the left by the user.  Swiped open option buttons can be hidden with\n* {@link ionic.service:$ionicListDelegate#closeOptionButtons $ionicListDelegate.closeOptionButtons}.\n*\n* Can be assigned any button class.\n*\n* See {@link ionic.directive:ionList} for a complete example & explanation.\n*\n* @usage\n*\n* ```html\n* <ion-list>\n*   <ion-item>\n*     I love kittens!\n*     <ion-option-button class=\"button-positive\">Share</ion-option-button>\n*     <ion-option-button class=\"button-assertive\">Edit</ion-option-button>\n*   </ion-item>\n* </ion-list>\n* ```\n*/\nIonicModule.directive('ionOptionButton', [function() {\n  function stopPropagation(e) {\n    e.stopPropagation();\n  }\n  return {\n    restrict: 'E',\n    require: '^ionItem',\n    priority: Number.MAX_VALUE,\n    compile: function($element, $attr) {\n      $attr.$set('class', ($attr['class'] || '') + ' button', true);\n      return function($scope, $element, $attr, itemCtrl) {\n        if (!itemCtrl.optionsContainer) {\n          itemCtrl.optionsContainer = jqLite(ITEM_TPL_OPTION_BUTTONS);\n          itemCtrl.$element.prepend(itemCtrl.optionsContainer);\n        }\n        itemCtrl.optionsContainer.prepend($element);\n\n        itemCtrl.$element.addClass('item-right-editable');\n\n        //Don't bubble click up to main .item\n        $element.on('click', stopPropagation);\n      };\n    }\n  };\n}]);\n\nvar ITEM_TPL_REORDER_BUTTON =\n  '<div data-prevent-scroll=\"true\" class=\"item-right-edit item-reorder enable-pointer-events\">' +\n  '</div>';\n\n/**\n* @ngdoc directive\n* @name ionReorderButton\n* @parent ionic.directive:ionItem\n* @module ionic\n* @restrict E\n* Creates a reorder button inside a list item, that is visible when the\n* {@link ionic.directive:ionList ionList parent's} `show-reorder` evaluates to true or\n* `$ionicListDelegate.showReorder(true)` is called.\n*\n* Can be dragged to reorder items in the list. Takes any ionicon class.\n*\n* Note: Reordering works best when used with `ng-repeat`.  Be sure that all `ion-item` children of an `ion-list` are part of the same `ng-repeat` expression.\n*\n* When an item reorder is complete, the expression given in the `on-reorder` attribute is called. The `on-reorder` expression is given two locals that can be used: `$fromIndex` and `$toIndex`.  See below for an example.\n*\n* Look at {@link ionic.directive:ionList} for more examples.\n*\n* @usage\n*\n* ```html\n* <ion-list ng-controller=\"MyCtrl\" show-reorder=\"true\">\n*   <ion-item ng-repeat=\"item in items\">\n*     Item {{item}}\n*     <ion-reorder-button class=\"ion-navicon\"\n*                         on-reorder=\"moveItem(item, $fromIndex, $toIndex)\">\n*     </ion-reorder-button>\n*   </ion-item>\n* </ion-list>\n* ```\n* ```js\n* function MyCtrl($scope) {\n*   $scope.items = [1, 2, 3, 4];\n*   $scope.moveItem = function(item, fromIndex, toIndex) {\n*     //Move the item in the array\n*     $scope.items.splice(fromIndex, 1);\n*     $scope.items.splice(toIndex, 0, item);\n*   };\n* }\n* ```\n*\n* @param {expression=} on-reorder Expression to call when an item is reordered.\n* Parameters given: $fromIndex, $toIndex.\n*/\nIonicModule\n.directive('ionReorderButton', ['$parse', function($parse) {\n  return {\n    restrict: 'E',\n    require: ['^ionItem', '^?ionList'],\n    priority: Number.MAX_VALUE,\n    compile: function($element, $attr) {\n      $attr.$set('class', ($attr['class'] || '') + ' button icon button-icon', true);\n      $element[0].setAttribute('data-prevent-scroll', true);\n      return function($scope, $element, $attr, ctrls) {\n        var itemCtrl = ctrls[0];\n        var listCtrl = ctrls[1];\n        var onReorderFn = $parse($attr.onReorder);\n\n        $scope.$onReorder = function(oldIndex, newIndex) {\n          onReorderFn($scope, {\n            $fromIndex: oldIndex,\n            $toIndex: newIndex\n          });\n        };\n\n        // prevent clicks from bubbling up to the item\n        if (!$attr.ngClick && !$attr.onClick && !$attr.onclick) {\n          $element[0].onclick = function(e) {\n            e.stopPropagation();\n            return false;\n          };\n        }\n\n        var container = jqLite(ITEM_TPL_REORDER_BUTTON);\n        container.append($element);\n        itemCtrl.$element.append(container).addClass('item-right-editable');\n\n        if (listCtrl && listCtrl.showReorder()) {\n          container.addClass('visible active');\n        }\n      };\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name keyboardAttach\n * @module ionic\n * @restrict A\n *\n * @description\n * keyboard-attach is an attribute directive which will cause an element to float above\n * the keyboard when the keyboard shows. Currently only supports the\n * [ion-footer-bar]({{ page.versionHref }}/api/directive/ionFooterBar/) directive.\n *\n * ### Notes\n * - This directive requires the\n * [Ionic Keyboard Plugin](https://github.com/ionic-team/ionic-plugins-keyboard).\n * - On Android not in fullscreen mode, i.e. you have\n *   `<preference name=\"Fullscreen\" value=\"false\" />` or no preference in your `config.xml` file,\n *   this directive is unnecessary since it is the default behavior.\n * - On iOS, if there is an input in your footer, you will need to set\n *   `cordova.plugins.Keyboard.disableScroll(true)`.\n *\n * @usage\n *\n * ```html\n *  <ion-footer-bar align-title=\"left\" keyboard-attach class=\"bar-assertive\">\n *    <h1 class=\"title\">Title!</h1>\n *  </ion-footer-bar>\n * ```\n */\n\nIonicModule\n.directive('keyboardAttach', function() {\n  return function(scope, element) {\n    ionic.on('native.keyboardshow', onShow, window);\n    ionic.on('native.keyboardhide', onHide, window);\n\n    //deprecated\n    ionic.on('native.showkeyboard', onShow, window);\n    ionic.on('native.hidekeyboard', onHide, window);\n\n\n    var scrollCtrl;\n\n    function onShow(e) {\n      if (ionic.Platform.isAndroid() && !ionic.Platform.isFullScreen) {\n        return;\n      }\n\n      //for testing\n      var keyboardHeight = e.keyboardHeight || (e.detail && e.detail.keyboardHeight);\n      element.css('bottom', keyboardHeight + \"px\");\n      scrollCtrl = element.controller('$ionicScroll');\n      if (scrollCtrl) {\n        scrollCtrl.scrollView.__container.style.bottom = keyboardHeight + keyboardAttachGetClientHeight(element[0]) + \"px\";\n      }\n    }\n\n    function onHide() {\n      if (ionic.Platform.isAndroid() && !ionic.Platform.isFullScreen) {\n        return;\n      }\n\n      element.css('bottom', '');\n      if (scrollCtrl) {\n        scrollCtrl.scrollView.__container.style.bottom = '';\n      }\n    }\n\n    scope.$on('$destroy', function() {\n      ionic.off('native.keyboardshow', onShow, window);\n      ionic.off('native.keyboardhide', onHide, window);\n\n      //deprecated\n      ionic.off('native.showkeyboard', onShow, window);\n      ionic.off('native.hidekeyboard', onHide, window);\n    });\n  };\n});\n\nfunction keyboardAttachGetClientHeight(element) {\n  return element.clientHeight;\n}\n\n/**\n* @ngdoc directive\n* @name ionList\n* @module ionic\n* @delegate ionic.service:$ionicListDelegate\n* @codepen JsHjf\n* @restrict E\n* @description\n* The List is a widely used interface element in almost any mobile app, and can include\n* content ranging from basic text all the way to buttons, toggles, icons, and thumbnails.\n*\n* Both the list, which contains items, and the list items themselves can be any HTML\n* element. The containing element requires the `list` class and each list item requires\n* the `item` class.\n*\n* However, using the ionList and ionItem directives make it easy to support various\n* interaction modes such as swipe to edit, drag to reorder, and removing items.\n*\n* Related: {@link ionic.directive:ionItem}, {@link ionic.directive:ionOptionButton}\n* {@link ionic.directive:ionReorderButton}, {@link ionic.directive:ionDeleteButton}, [`list CSS documentation`](/docs/components/#list).\n*\n* @usage\n*\n* Basic Usage:\n*\n* ```html\n* <ion-list>\n*   <ion-item ng-repeat=\"item in items\">\n*     {% raw %}Hello, {{item}}!{% endraw %}\n*   </ion-item>\n* </ion-list>\n* ```\n*\n* Advanced Usage: Thumbnails, Delete buttons, Reordering, Swiping\n*\n* ```html\n* <ion-list ng-controller=\"MyCtrl\"\n*           show-delete=\"shouldShowDelete\"\n*           show-reorder=\"shouldShowReorder\"\n*           can-swipe=\"listCanSwipe\">\n*   <ion-item ng-repeat=\"item in items\"\n*             class=\"item-thumbnail-left\">\n*\n*     {% raw %}<img ng-src=\"{{item.img}}\">\n*     <h2>{{item.title}}</h2>\n*     <p>{{item.description}}</p>{% endraw %}\n*     <ion-option-button class=\"button-positive\"\n*                        ng-click=\"share(item)\">\n*       Share\n*     </ion-option-button>\n*     <ion-option-button class=\"button-info\"\n*                        ng-click=\"edit(item)\">\n*       Edit\n*     </ion-option-button>\n*     <ion-delete-button class=\"ion-minus-circled\"\n*                        ng-click=\"items.splice($index, 1)\">\n*     </ion-delete-button>\n*     <ion-reorder-button class=\"ion-navicon\"\n*                         on-reorder=\"reorderItem(item, $fromIndex, $toIndex)\">\n*     </ion-reorder-button>\n*\n*   </ion-item>\n* </ion-list>\n* ```\n*\n*```javascript\n* app.controller('MyCtrl', function($scope) {\n*  $scope.shouldShowDelete = false;\n*  $scope.shouldShowReorder = false;\n*  $scope.listCanSwipe = true\n* });\n*```\n*\n* @param {string=} delegate-handle The handle used to identify this list with\n* {@link ionic.service:$ionicListDelegate}.\n* @param type {string=} The type of list to use (list-inset or card)\n* @param show-delete {boolean=} Whether the delete buttons for the items in the list are\n* currently shown or hidden.\n* @param show-reorder {boolean=} Whether the reorder buttons for the items in the list are\n* currently shown or hidden.\n* @param can-swipe {boolean=} Whether the items in the list are allowed to be swiped to reveal\n* option buttons. Default: true.\n*/\nIonicModule\n.directive('ionList', [\n  '$timeout',\nfunction($timeout) {\n  return {\n    restrict: 'E',\n    require: ['ionList', '^?$ionicScroll'],\n    controller: '$ionicList',\n    compile: function($element, $attr) {\n      var listEl = jqLite('<div class=\"list\">')\n        .append($element.contents())\n        .addClass($attr.type);\n\n      $element.append(listEl);\n\n      return function($scope, $element, $attrs, ctrls) {\n        var listCtrl = ctrls[0];\n        var scrollCtrl = ctrls[1];\n\n        // Wait for child elements to render...\n        $timeout(init);\n\n        function init() {\n          var listView = listCtrl.listView = new ionic.views.ListView({\n            el: $element[0],\n            listEl: $element.children()[0],\n            scrollEl: scrollCtrl && scrollCtrl.element,\n            scrollView: scrollCtrl && scrollCtrl.scrollView,\n            onReorder: function(el, oldIndex, newIndex) {\n              var itemScope = jqLite(el).scope();\n              if (itemScope && itemScope.$onReorder) {\n                // Make sure onReorder is called in apply cycle,\n                // but also make sure it has no conflicts by doing\n                // $evalAsync\n                $timeout(function() {\n                  itemScope.$onReorder(oldIndex, newIndex);\n                });\n              }\n            },\n            canSwipe: function() {\n              return listCtrl.canSwipeItems();\n            }\n          });\n\n          $scope.$on('$destroy', function() {\n            if (listView) {\n              listView.deregister && listView.deregister();\n              listView = null;\n            }\n          });\n\n          if (isDefined($attr.canSwipe)) {\n            $scope.$watch('!!(' + $attr.canSwipe + ')', function(value) {\n              listCtrl.canSwipeItems(value);\n            });\n          }\n          if (isDefined($attr.showDelete)) {\n            $scope.$watch('!!(' + $attr.showDelete + ')', function(value) {\n              listCtrl.showDelete(value);\n            });\n          }\n          if (isDefined($attr.showReorder)) {\n            $scope.$watch('!!(' + $attr.showReorder + ')', function(value) {\n              listCtrl.showReorder(value);\n            });\n          }\n\n          $scope.$watch(function() {\n            return listCtrl.showDelete();\n          }, function(isShown, wasShown) {\n            //Only use isShown=false if it was already shown\n            if (!isShown && !wasShown) { return; }\n\n            if (isShown) listCtrl.closeOptionButtons();\n            listCtrl.canSwipeItems(!isShown);\n\n            $element.children().toggleClass('list-left-editing', isShown);\n            $element.toggleClass('disable-pointer-events', isShown);\n\n            var deleteButton = jqLite($element[0].getElementsByClassName('item-delete'));\n            setButtonShown(deleteButton, listCtrl.showDelete);\n          });\n\n          $scope.$watch(function() {\n            return listCtrl.showReorder();\n          }, function(isShown, wasShown) {\n            //Only use isShown=false if it was already shown\n            if (!isShown && !wasShown) { return; }\n\n            if (isShown) listCtrl.closeOptionButtons();\n            listCtrl.canSwipeItems(!isShown);\n\n            $element.children().toggleClass('list-right-editing', isShown);\n            $element.toggleClass('disable-pointer-events', isShown);\n\n            var reorderButton = jqLite($element[0].getElementsByClassName('item-reorder'));\n            setButtonShown(reorderButton, listCtrl.showReorder);\n          });\n\n          function setButtonShown(el, shown) {\n            shown() && el.addClass('visible') || el.removeClass('active');\n            ionic.requestAnimationFrame(function() {\n              shown() && el.addClass('active') || el.removeClass('visible');\n            });\n          }\n        }\n\n      };\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name menuClose\n * @module ionic\n * @restrict AC\n *\n * @description\n * `menu-close` is an attribute directive that closes a currently opened side menu.\n * Note that by default, navigation transitions will not animate between views when\n * the menu is open. Additionally, this directive will reset the entering view's\n * history stack, making the new page the root of the history stack. This is done\n * to replicate the user experience seen in most side menu implementations, which is\n * to not show the back button at the root of the stack and show only the\n * menu button. We recommend that you also use the `enable-menu-with-back-views=\"false\"`\n * {@link ionic.directive:ionSideMenus} attribute when using the menuClose directive.\n *\n * @usage\n * Below is an example of a link within a side menu. Tapping this link would\n * automatically close the currently opened menu.\n *\n * ```html\n * <a menu-close href=\"#/home\" class=\"item\">Home</a>\n * ```\n *\n * Note that if your destination state uses a resolve and that resolve asynchronously\n * takes longer than a standard transition (300ms), you'll need to set the\n * `nextViewOptions` manually as your resolve completes.\n *\n * ```js\n * $ionicHistory.nextViewOptions({\n *  historyRoot: true,\n *  disableAnimate: true,\n *  expire: 300\n * });\n * ```\n */\nIonicModule\n.directive('menuClose', ['$ionicHistory', '$timeout', function($ionicHistory, $timeout) {\n  return {\n    restrict: 'AC',\n    link: function($scope, $element) {\n      $element.bind('click', function() {\n        var sideMenuCtrl = $element.inheritedData('$ionSideMenusController');\n        if (sideMenuCtrl) {\n          $ionicHistory.nextViewOptions({\n            historyRoot: true,\n            disableAnimate: true,\n            expire: 300\n          });\n          // if no transition in 300ms, reset nextViewOptions\n          // the expire should take care of it, but will be cancelled in some\n          // cases. This directive is an exception to the rules of history.js\n          $timeout( function() {\n            $ionicHistory.nextViewOptions({\n              historyRoot: false,\n              disableAnimate: false\n            });\n          }, 300);\n          sideMenuCtrl.close();\n        }\n      });\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name menuToggle\n * @module ionic\n * @restrict AC\n *\n * @description\n * Toggle a side menu on the given side.\n *\n * @usage\n * Below is an example of a link within a nav bar. Tapping this button\n * would open the given side menu, and tapping it again would close it.\n *\n * ```html\n * <ion-nav-bar>\n *   <ion-nav-buttons side=\"left\">\n *    <!-- Toggle left side menu -->\n *    <button menu-toggle=\"left\" class=\"button button-icon icon ion-navicon\"></button>\n *   </ion-nav-buttons>\n *   <ion-nav-buttons side=\"right\">\n *    <!-- Toggle right side menu -->\n *    <button menu-toggle=\"right\" class=\"button button-icon icon ion-navicon\"></button>\n *   </ion-nav-buttons>\n * </ion-nav-bar>\n * ```\n *\n * ### Button Hidden On Child Views\n * By default, the menu toggle button will only appear on a root\n * level side-menu page. Navigating in to child views will hide the menu-\n * toggle button. They can be made visible on child pages by setting the\n * enable-menu-with-back-views attribute of the {@link ionic.directive:ionSideMenus}\n * directive to true.\n *\n * ```html\n * <ion-side-menus enable-menu-with-back-views=\"true\">\n * ```\n */\nIonicModule\n.directive('menuToggle', function() {\n  return {\n    restrict: 'AC',\n    link: function($scope, $element, $attr) {\n      $scope.$on('$ionicView.beforeEnter', function(ev, viewData) {\n        if (viewData.enableBack) {\n          var sideMenuCtrl = $element.inheritedData('$ionSideMenusController');\n          if (!sideMenuCtrl.enableMenuWithBackViews()) {\n            $element.addClass('hide');\n          }\n        } else {\n          $element.removeClass('hide');\n        }\n      });\n\n      $element.bind('click', function() {\n        var sideMenuCtrl = $element.inheritedData('$ionSideMenusController');\n        sideMenuCtrl && sideMenuCtrl.toggle($attr.menuToggle);\n      });\n    }\n  };\n});\n\n/*\n * We don't document the ionModal directive, we instead document\n * the $ionicModal service\n */\nIonicModule\n.directive('ionModal', [function() {\n  return {\n    restrict: 'E',\n    transclude: true,\n    replace: true,\n    controller: [function() {}],\n    template: '<div class=\"modal-backdrop\">' +\n                '<div class=\"modal-backdrop-bg\"></div>' +\n                '<div class=\"modal-wrapper\" ng-transclude></div>' +\n              '</div>'\n  };\n}]);\n\nIonicModule\n.directive('ionModalView', function() {\n  return {\n    restrict: 'E',\n    compile: function(element) {\n      element.addClass('modal');\n    }\n  };\n});\n\n/**\n * @ngdoc directive\n * @name ionNavBackButton\n * @module ionic\n * @restrict E\n * @parent ionNavBar\n * @description\n * Creates a back button inside an {@link ionic.directive:ionNavBar}.\n *\n * The back button will appear when the user is able to go back in the current navigation stack. By\n * default, the markup of the back button is automatically built using platform-appropriate defaults\n * (iOS back button icon on iOS and Android icon on Android).\n *\n * Additionally, the button is automatically set to `$ionicGoBack()` on click/tap. By default, the\n * app will navigate back one view when the back button is clicked.  More advanced behavior is also\n * possible, as outlined below.\n *\n * @usage\n *\n * Recommended markup for default settings:\n *\n * ```html\n * <ion-nav-bar>\n *   <ion-nav-back-button>\n *   </ion-nav-back-button>\n * </ion-nav-bar>\n * ```\n *\n * With custom inner markup, and automatically adds a default click action:\n *\n * ```html\n * <ion-nav-bar>\n *   <ion-nav-back-button class=\"button-clear\">\n *     <i class=\"ion-arrow-left-c\"></i> Back\n *   </ion-nav-back-button>\n * </ion-nav-bar>\n * ```\n *\n * With custom inner markup and custom click action, using {@link ionic.service:$ionicHistory}:\n *\n * ```html\n * <ion-nav-bar ng-controller=\"MyCtrl\">\n *   <ion-nav-back-button class=\"button-clear\"\n *     ng-click=\"myGoBack()\">\n *     <i class=\"ion-arrow-left-c\"></i> Back\n *   </ion-nav-back-button>\n * </ion-nav-bar>\n * ```\n * ```js\n * function MyCtrl($scope, $ionicHistory) {\n *   $scope.myGoBack = function() {\n *     $ionicHistory.goBack();\n *   };\n * }\n * ```\n */\nIonicModule\n.directive('ionNavBackButton', ['$ionicConfig', '$document', function($ionicConfig, $document) {\n  return {\n    restrict: 'E',\n    require: '^ionNavBar',\n    compile: function(tElement, tAttrs) {\n\n      // clone the back button, but as a <div>\n      var buttonEle = $document[0].createElement('button');\n      for (var n in tAttrs.$attr) {\n        buttonEle.setAttribute(tAttrs.$attr[n], tAttrs[n]);\n      }\n\n      if (!tAttrs.ngClick) {\n        buttonEle.setAttribute('ng-click', '$ionicGoBack()');\n      }\n\n      buttonEle.className = 'button back-button hide buttons ' + (tElement.attr('class') || '');\n      buttonEle.innerHTML = tElement.html() || '';\n\n      var childNode;\n      var hasIcon = hasIconClass(tElement[0]);\n      var hasInnerText;\n      var hasButtonText;\n      var hasPreviousTitle;\n\n      for (var x = 0; x < tElement[0].childNodes.length; x++) {\n        childNode = tElement[0].childNodes[x];\n        if (childNode.nodeType === 1) {\n          if (hasIconClass(childNode)) {\n            hasIcon = true;\n          } else if (childNode.classList.contains('default-title')) {\n            hasButtonText = true;\n          } else if (childNode.classList.contains('previous-title')) {\n            hasPreviousTitle = true;\n          }\n        } else if (!hasInnerText && childNode.nodeType === 3) {\n          hasInnerText = !!childNode.nodeValue.trim();\n        }\n      }\n\n      function hasIconClass(ele) {\n        return /ion-|icon/.test(ele.className);\n      }\n\n      var defaultIcon = $ionicConfig.backButton.icon();\n      if (!hasIcon && defaultIcon && defaultIcon !== 'none') {\n        buttonEle.innerHTML = '<i class=\"icon ' + defaultIcon + '\"></i> ' + buttonEle.innerHTML;\n        buttonEle.className += ' button-clear';\n      }\n\n      if (!hasInnerText) {\n        var buttonTextEle = $document[0].createElement('span');\n        buttonTextEle.className = 'back-text';\n\n        if (!hasButtonText && $ionicConfig.backButton.text()) {\n          buttonTextEle.innerHTML += '<span class=\"default-title\">' + $ionicConfig.backButton.text() + '</span>';\n        }\n        if (!hasPreviousTitle && $ionicConfig.backButton.previousTitleText()) {\n          buttonTextEle.innerHTML += '<span class=\"previous-title\"></span>';\n        }\n        buttonEle.appendChild(buttonTextEle);\n\n      }\n\n      tElement.attr('class', 'hide');\n      tElement.empty();\n\n      return {\n        pre: function($scope, $element, $attr, navBarCtrl) {\n          // only register the plain HTML, the navBarCtrl takes care of scope/compile/link\n          navBarCtrl.navElement('backButton', buttonEle.outerHTML);\n          buttonEle = null;\n        }\n      };\n    }\n  };\n}]);\n\n\n/**\n * @ngdoc directive\n * @name ionNavBar\n * @module ionic\n * @delegate ionic.service:$ionicNavBarDelegate\n * @restrict E\n *\n * @description\n * If we have an {@link ionic.directive:ionNavView} directive, we can also create an\n * `<ion-nav-bar>`, which will create a topbar that updates as the application state changes.\n *\n * We can add a back button by putting an {@link ionic.directive:ionNavBackButton} inside.\n *\n * We can add buttons depending on the currently visible view using\n * {@link ionic.directive:ionNavButtons}.\n *\n * Note that the ion-nav-bar element will only work correctly if your content has an\n * ionView around it.\n *\n * @usage\n *\n * ```html\n * <body ng-app=\"starter\">\n *   <!-- The nav bar that will be updated as we navigate -->\n *   <ion-nav-bar class=\"bar-positive\">\n *   </ion-nav-bar>\n *\n *   <!-- where the initial view template will be rendered -->\n *   <ion-nav-view>\n *     <ion-view>\n *       <ion-content>Hello!</ion-content>\n *     </ion-view>\n *   </ion-nav-view>\n * </body>\n * ```\n *\n * @param {string=} delegate-handle The handle used to identify this navBar\n * with {@link ionic.service:$ionicNavBarDelegate}.\n * @param align-title {string=} Where to align the title of the navbar.\n * Available: 'left', 'right', 'center'. Defaults to 'center'.\n * @param {boolean=} no-tap-scroll By default, the navbar will scroll the content\n * to the top when tapped.  Set no-tap-scroll to true to disable this behavior.\n *\n */\nIonicModule\n.directive('ionNavBar', function() {\n  return {\n    restrict: 'E',\n    controller: '$ionicNavBar',\n    scope: true,\n    link: function($scope, $element, $attr, ctrl) {\n      ctrl.init();\n    }\n  };\n});\n\n\n/**\n * @ngdoc directive\n * @name ionNavButtons\n * @module ionic\n * @restrict E\n * @parent ionNavView\n *\n * @description\n * Use nav buttons to set the buttons on your {@link ionic.directive:ionNavBar}\n * from within an {@link ionic.directive:ionView}. This gives each\n * view template the ability to specify which buttons should show in the nav bar,\n * overriding any default buttons already placed in the nav bar.\n *\n * Any buttons you declare will be positioned on the navbar's corresponding side. Primary\n * buttons generally map to the left side of the header, and secondary buttons are\n * generally on the right side. However, their exact locations are platform-specific.\n * For example, in iOS, the primary buttons are on the far left of the header, and\n * secondary buttons are on the far right, with the header title centered between them.\n * For Android, however, both groups of buttons are on the far right of the header,\n * with the header title aligned left.\n *\n * We recommend always using `primary` and `secondary`, so the buttons correctly map\n * to the side familiar to users of each platform. However, in cases where buttons should\n * always be on an exact side, both `left` and `right` sides are still available. For\n * example, a toggle button for a left side menu should be on the left side; in this case,\n * we'd recommend using `side=\"left\"`, so it's always on the left, no matter the platform.\n *\n * ***Note*** that `ion-nav-buttons` must be immediate descendants of the `ion-view` or\n * `ion-nav-bar` element (basically, don't wrap it in another div).\n *\n * @usage\n * ```html\n * <ion-nav-bar>\n * </ion-nav-bar>\n * <ion-nav-view>\n *   <ion-view>\n *     <ion-nav-buttons side=\"primary\">\n *       <button class=\"button\" ng-click=\"doSomething()\">\n *         I'm a button on the primary of the navbar!\n *       </button>\n *     </ion-nav-buttons>\n *     <ion-content>\n *       Some super content here!\n *     </ion-content>\n *   </ion-view>\n * </ion-nav-view>\n * ```\n *\n * @param {string} side The side to place the buttons in the\n * {@link ionic.directive:ionNavBar}. Available sides: `primary`, `secondary`, `left`, and `right`.\n */\nIonicModule\n.directive('ionNavButtons', ['$document', function($document) {\n  return {\n    require: '^ionNavBar',\n    restrict: 'E',\n    compile: function(tElement, tAttrs) {\n      var side = 'left';\n\n      if (/^primary|secondary|right$/i.test(tAttrs.side || '')) {\n        side = tAttrs.side.toLowerCase();\n      }\n\n      var spanEle = $document[0].createElement('span');\n      spanEle.className = side + '-buttons';\n      spanEle.innerHTML = tElement.html();\n\n      var navElementType = side + 'Buttons';\n\n      tElement.attr('class', 'hide');\n      tElement.empty();\n\n      return {\n        pre: function($scope, $element, $attrs, navBarCtrl) {\n          // only register the plain HTML, the navBarCtrl takes care of scope/compile/link\n\n          var parentViewCtrl = $element.parent().data('$ionViewController');\n          if (parentViewCtrl) {\n            // if the parent is an ion-view, then these are ion-nav-buttons for JUST this ion-view\n            parentViewCtrl.navElement(navElementType, spanEle.outerHTML);\n\n          } else {\n            // these are buttons for all views that do not have their own ion-nav-buttons\n            navBarCtrl.navElement(navElementType, spanEle.outerHTML);\n          }\n\n          spanEle = null;\n        }\n      };\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name navDirection\n * @module ionic\n * @restrict A\n *\n * @description\n * The direction which the nav view transition should animate. Available options\n * are: `forward`, `back`, `enter`, `exit`, `swap`.\n *\n * @usage\n *\n * ```html\n * <a nav-direction=\"forward\" href=\"#/home\">Home</a>\n * ```\n */\nIonicModule\n.directive('navDirection', ['$ionicViewSwitcher', function($ionicViewSwitcher) {\n  return {\n    restrict: 'A',\n    priority: 1000,\n    link: function($scope, $element, $attr) {\n      $element.bind('click', function() {\n        $ionicViewSwitcher.nextDirection($attr.navDirection);\n      });\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name ionNavTitle\n * @module ionic\n * @restrict E\n * @parent ionNavView\n *\n * @description\n *\n * The nav title directive replaces an {@link ionic.directive:ionNavBar} title text with\n * custom HTML from within an {@link ionic.directive:ionView} template. This gives each\n * view the ability to specify its own custom title element, such as an image or any HTML,\n * rather than being text-only. Alternatively, text-only titles can be updated using the\n * `view-title` {@link ionic.directive:ionView} attribute.\n *\n * Note that `ion-nav-title` must be an immediate descendant of the `ion-view` or\n * `ion-nav-bar` element (basically don't wrap it in another div).\n *\n * @usage\n * ```html\n * <ion-nav-bar>\n * </ion-nav-bar>\n * <ion-nav-view>\n *   <ion-view>\n *     <ion-nav-title>\n *       <img src=\"logo.svg\">\n *     </ion-nav-title>\n *     <ion-content>\n *       Some super content here!\n *     </ion-content>\n *   </ion-view>\n * </ion-nav-view>\n * ```\n *\n */\nIonicModule\n.directive('ionNavTitle', ['$document', function($document) {\n  return {\n    require: '^ionNavBar',\n    restrict: 'E',\n    compile: function(tElement, tAttrs) {\n      var navElementType = 'title';\n      var spanEle = $document[0].createElement('span');\n      for (var n in tAttrs.$attr) {\n        spanEle.setAttribute(tAttrs.$attr[n], tAttrs[n]);\n      }\n      spanEle.classList.add('nav-bar-title');\n      spanEle.innerHTML = tElement.html();\n\n      tElement.attr('class', 'hide');\n      tElement.empty();\n\n      return {\n        pre: function($scope, $element, $attrs, navBarCtrl) {\n          // only register the plain HTML, the navBarCtrl takes care of scope/compile/link\n\n          var parentViewCtrl = $element.parent().data('$ionViewController');\n          if (parentViewCtrl) {\n            // if the parent is an ion-view, then these are ion-nav-buttons for JUST this ion-view\n            parentViewCtrl.navElement(navElementType, spanEle.outerHTML);\n\n          } else {\n            // these are buttons for all views that do not have their own ion-nav-buttons\n            navBarCtrl.navElement(navElementType, spanEle.outerHTML);\n          }\n\n          spanEle = null;\n        }\n      };\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name navTransition\n * @module ionic\n * @restrict A\n *\n * @description\n * The transition type which the nav view transition should use when it animates.\n * Current, options are `ios`, `android`, and `none`. More options coming soon.\n *\n * @usage\n *\n * ```html\n * <a nav-transition=\"none\" href=\"#/home\">Home</a>\n * ```\n */\nIonicModule\n.directive('navTransition', ['$ionicViewSwitcher', function($ionicViewSwitcher) {\n  return {\n    restrict: 'A',\n    priority: 1000,\n    link: function($scope, $element, $attr) {\n      $element.bind('click', function() {\n        $ionicViewSwitcher.nextTransition($attr.navTransition);\n      });\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name ionNavView\n * @module ionic\n * @restrict E\n * @codepen odqCz\n *\n * @description\n * As a user navigates throughout your app, Ionic is able to keep track of their\n * navigation history. By knowing their history, transitions between views\n * correctly enter and exit using the platform's transition style. An additional\n * benefit to Ionic's navigation system is its ability to manage multiple\n * histories. For example, each tab can have it's own navigation history stack.\n *\n * Ionic uses the AngularUI Router module so app interfaces can be organized\n * into various \"states\". Like Angular's core $route service, URLs can be used\n * to control the views. However, the AngularUI Router provides a more powerful\n * state manager in that states are bound to named, nested, and parallel views,\n * allowing more than one template to be rendered on the same page.\n * Additionally, each state is not required to be bound to a URL, and data can\n * be pushed to each state which allows much flexibility.\n *\n * The ionNavView directive is used to render templates in your application. Each template\n * is part of a state. States are usually mapped to a url, and are defined programatically\n * using angular-ui-router (see [their docs](https://github.com/angular-ui/ui-router/wiki),\n * and remember to replace ui-view with ion-nav-view in examples).\n *\n * @usage\n * In this example, we will create a navigation view that contains our different states for the app.\n *\n * To do this, in our markup we use ionNavView top level directive. To display a header bar we use\n * the {@link ionic.directive:ionNavBar} directive that updates as we navigate through the\n * navigation stack.\n *\n * Next, we need to setup our states that will be rendered.\n *\n * ```js\n * var app = angular.module('myApp', ['ionic']);\n * app.config(function($stateProvider) {\n *   $stateProvider\n *   .state('index', {\n *     url: '/',\n *     templateUrl: 'home.html'\n *   })\n *   .state('music', {\n *     url: '/music',\n *     templateUrl: 'music.html'\n *   });\n * });\n * ```\n * Then on app start, $stateProvider will look at the url, see if it matches the index state,\n * and then try to load home.html into the `<ion-nav-view>`.\n *\n * Pages are loaded by the URLs given. One simple way to create templates in Angular is to put\n * them directly into your HTML file and use the `<script type=\"text/ng-template\">` syntax.\n * So here is one way to put home.html into our app:\n *\n * ```html\n * <script id=\"home\" type=\"text/ng-template\">\n *   <!-- The title of the ion-view will be shown on the navbar -->\n *   <ion-view view-title=\"Home\">\n *     <ion-content ng-controller=\"HomeCtrl\">\n *       <!-- The content of the page -->\n *       <a href=\"#/music\">Go to music page!</a>\n *     </ion-content>\n *   </ion-view>\n * </script>\n * ```\n *\n * This is good to do because the template will be cached for very fast loading, instead of\n * having to fetch them from the network.\n *\n * ## Caching\n *\n * By default, views are cached to improve performance. When a view is navigated away from, its\n * element is left in the DOM, and its scope is disconnected from the `$watch` cycle. When\n * navigating to a view that is already cached, its scope is then reconnected, and the existing\n * element that was left in the DOM becomes the active view. This also allows for the scroll\n * position of previous views to be maintained.\n *\n * Caching can be disabled and enabled in multiple ways. By default, Ionic will cache a maximum of\n * 10 views, and not only can this be configured, but apps can also explicitly state which views\n * should and should not be cached.\n *\n * Note that because we are caching these views, *we aren’t destroying scopes*. Instead, scopes\n * are being disconnected from the watch cycle. Because scopes are not being destroyed and\n * recreated, controllers are not loading again on a subsequent viewing. If the app/controller\n * needs to know when a view has entered or has left, then view events emitted from the\n * {@link ionic.directive:ionView} scope, such as `$ionicView.enter`, may be useful.\n *\n * By default, when navigating back in the history, the \"forward\" views are removed from the cache.\n * If you navigate forward to the same view again, it'll create a new DOM element and controller\n * instance. Basically, any forward views are reset each time. This can be configured using the\n * {@link ionic.provider:$ionicConfigProvider}:\n *\n * ```js\n * $ionicConfigProvider.views.forwardCache(true);\n * ```\n *\n * #### Disable cache globally\n *\n * The {@link ionic.provider:$ionicConfigProvider} can be used to set the maximum allowable views\n * which can be cached, but this can also be use to disable all caching by setting it to 0.\n *\n * ```js\n * $ionicConfigProvider.views.maxCache(0);\n * ```\n *\n * #### Disable cache within state provider\n *\n * ```js\n * $stateProvider.state('myState', {\n *    cache: false,\n *    url : '/myUrl',\n *    templateUrl : 'my-template.html'\n * })\n * ```\n *\n * #### Disable cache with an attribute\n *\n * ```html\n * <ion-view cache-view=\"false\" view-title=\"My Title!\">\n *   ...\n * </ion-view>\n * ```\n *\n *\n * ## AngularUI Router\n *\n * Please visit [AngularUI Router's docs](https://github.com/angular-ui/ui-router/wiki) for\n * more info. Below is a great video by the AngularUI Router team that may help to explain\n * how it all works:\n *\n * <iframe width=\"560\" height=\"315\" src=\"//www.youtube.com/embed/dqJRoh8MnBo\"\n * frameborder=\"0\" allowfullscreen></iframe>\n *\n * Note: We do not recommend using [resolve](https://github.com/angular-ui/ui-router/wiki#resolve)\n * of AngularUI Router. The recommended approach is to execute any logic needed before beginning the state transition.\n *\n * @param {string=} name A view name. The name should be unique amongst the other views in the\n * same state. You can have views of the same name that live in different states. For more\n * information, see ui-router's\n * [ui-view documentation](http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.directive:ui-view).\n */\nIonicModule\n.directive('ionNavView', [\n  '$state',\n  '$ionicConfig',\nfunction($state, $ionicConfig) {\n  // IONIC's fork of Angular UI Router, v0.2.10\n  // the navView handles registering views in the history and how to transition between them\n  return {\n    restrict: 'E',\n    terminal: true,\n    priority: 2000,\n    transclude: true,\n    controller: '$ionicNavView',\n    compile: function(tElement, tAttrs, transclude) {\n\n      // a nav view element is a container for numerous views\n      tElement.addClass('view-container');\n      ionic.DomUtil.cachedAttr(tElement, 'nav-view-transition', $ionicConfig.views.transition());\n\n      return function($scope, $element, $attr, navViewCtrl) {\n        var latestLocals;\n\n        // Put in the compiled initial view\n        transclude($scope, function(clone) {\n          $element.append(clone);\n        });\n\n        var viewData = navViewCtrl.init();\n\n        // listen for $stateChangeSuccess\n        $scope.$on('$stateChangeSuccess', function() {\n          updateView(false);\n        });\n        $scope.$on('$viewContentLoading', function() {\n          updateView(false);\n        });\n\n        // initial load, ready go\n        updateView(true);\n\n\n        function updateView(firstTime) {\n          // get the current local according to the $state\n          var viewLocals = $state.$current && $state.$current.locals[viewData.name];\n\n          // do not update THIS nav-view if its is not the container for the given state\n          // if the viewLocals are the same as THIS latestLocals, then nothing to do\n          if (!viewLocals || (!firstTime && viewLocals === latestLocals)) return;\n\n          // update the latestLocals\n          latestLocals = viewLocals;\n          viewData.state = viewLocals.$$state;\n\n          // register, update and transition to the new view\n          navViewCtrl.register(viewLocals);\n        }\n\n      };\n    }\n  };\n}]);\n\nIonicModule\n\n.config(['$provide', function($provide) {\n  $provide.decorator('ngClickDirective', ['$delegate', function($delegate) {\n    // drop the default ngClick directive\n    $delegate.shift();\n    return $delegate;\n  }]);\n}])\n\n/**\n * @private\n */\n.factory('$ionicNgClick', ['$parse', function($parse) {\n  return function(scope, element, clickExpr) {\n    var clickHandler = angular.isFunction(clickExpr) ?\n      clickExpr :\n      $parse(clickExpr);\n\n    element.on('click', function(event) {\n      scope.$apply(function() {\n        clickHandler(scope, {$event: (event)});\n      });\n    });\n\n    // Hack for iOS Safari's benefit. It goes searching for onclick handlers and is liable to click\n    // something else nearby.\n    element.onclick = noop;\n  };\n}])\n\n.directive('ngClick', ['$ionicNgClick', function($ionicNgClick) {\n  return function(scope, element, attr) {\n    $ionicNgClick(scope, element, attr.ngClick);\n  };\n}])\n\n.directive('ionStopEvent', function() {\n  return {\n    restrict: 'A',\n    link: function(scope, element, attr) {\n      element.bind(attr.ionStopEvent, eventStopPropagation);\n    }\n  };\n});\nfunction eventStopPropagation(e) {\n  e.stopPropagation();\n}\n\n\n/**\n * @ngdoc directive\n * @name ionPane\n * @module ionic\n * @restrict E\n *\n * @description A simple container that fits content, with no side effects.  Adds the 'pane' class to the element.\n */\nIonicModule\n.directive('ionPane', function() {\n  return {\n    restrict: 'E',\n    link: function(scope, element) {\n      element.addClass('pane');\n    }\n  };\n});\n\n/*\n * We don't document the ionPopover directive, we instead document\n * the $ionicPopover service\n */\nIonicModule\n.directive('ionPopover', [function() {\n  return {\n    restrict: 'E',\n    transclude: true,\n    replace: true,\n    controller: [function() {}],\n    template: '<div class=\"popover-backdrop\">' +\n                '<div class=\"popover-wrapper\" ng-transclude></div>' +\n              '</div>'\n  };\n}]);\n\nIonicModule\n.directive('ionPopoverView', function() {\n  return {\n    restrict: 'E',\n    compile: function(element) {\n      element.append(jqLite('<div class=\"popover-arrow\">'));\n      element.addClass('popover');\n    }\n  };\n});\n\n/**\n * @ngdoc directive\n * @name ionRadio\n * @module ionic\n * @restrict E\n * @codepen saoBG\n * @description\n * The radio directive is no different than the HTML radio input, except it's styled differently.\n *\n * Radio behaves like [AngularJS radio](http://docs.angularjs.org/api/ng/input/input[radio]).\n *\n * @usage\n * ```html\n * <ion-radio ng-model=\"choice\" ng-value=\"'A'\">Choose A</ion-radio>\n * <ion-radio ng-model=\"choice\" ng-value=\"'B'\">Choose B</ion-radio>\n * <ion-radio ng-model=\"choice\" ng-value=\"'C'\">Choose C</ion-radio>\n * ```\n *\n * @param {string=} name The name of the radio input.\n * @param {expression=} value The value of the radio input.\n * @param {boolean=} disabled The state of the radio input.\n * @param {string=} icon The icon to use when the radio input is selected.\n * @param {expression=} ng-value Angular equivalent of the value attribute.\n * @param {expression=} ng-model The angular model for the radio input.\n * @param {boolean=} ng-disabled Angular equivalent of the disabled attribute.\n * @param {expression=} ng-change Triggers given expression when radio input's model changes\n */\nIonicModule\n.directive('ionRadio', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '?ngModel',\n    transclude: true,\n    template:\n      '<label class=\"item item-radio\">' +\n        '<input type=\"radio\" name=\"radio-group\">' +\n        '<div class=\"radio-content\">' +\n          '<div class=\"item-content disable-pointer-events\" ng-transclude></div>' +\n          '<i class=\"radio-icon disable-pointer-events icon ion-checkmark\"></i>' +\n        '</div>' +\n      '</label>',\n\n    compile: function(element, attr) {\n      if (attr.icon) {\n        var iconElm = element.find('i');\n        iconElm.removeClass('ion-checkmark').addClass(attr.icon);\n      }\n\n      var input = element.find('input');\n      forEach({\n          'name': attr.name,\n          'value': attr.value,\n          'disabled': attr.disabled,\n          'ng-value': attr.ngValue,\n          'ng-model': attr.ngModel,\n          'ng-disabled': attr.ngDisabled,\n          'ng-change': attr.ngChange,\n          'ng-required': attr.ngRequired,\n          'required': attr.required\n      }, function(value, name) {\n        if (isDefined(value)) {\n            input.attr(name, value);\n          }\n      });\n\n      return function(scope, element, attr) {\n        scope.getValue = function() {\n          return scope.ngValue || attr.value;\n        };\n      };\n    }\n  };\n});\n\n\n/**\n * @ngdoc directive\n * @name ionRefresher\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionContent, ionic.directive:ionScroll\n * @description\n * Allows you to add pull-to-refresh to a scrollView.\n *\n * Place it as the first child of your {@link ionic.directive:ionContent} or\n * {@link ionic.directive:ionScroll} element.\n *\n * When refreshing is complete, $broadcast the 'scroll.refreshComplete' event\n * from your controller.\n *\n * @usage\n *\n * ```html\n * <ion-content ng-controller=\"MyController\">\n *   <ion-refresher\n *     pulling-text=\"Pull to refresh...\"\n *     on-refresh=\"doRefresh()\">\n *   </ion-refresher>\n *   <ion-list>\n *     <ion-item ng-repeat=\"item in items\"></ion-item>\n *   </ion-list>\n * </ion-content>\n * ```\n * ```js\n * angular.module('testApp', ['ionic'])\n * .controller('MyController', function($scope, $http) {\n *   $scope.items = [1,2,3];\n *   $scope.doRefresh = function() {\n *     $http.get('/new-items')\n *      .success(function(newItems) {\n *        $scope.items = newItems;\n *      })\n *      .finally(function() {\n *        // Stop the ion-refresher from spinning\n *        $scope.$broadcast('scroll.refreshComplete');\n *      });\n *   };\n * });\n * ```\n *\n * @param {expression=} on-refresh Called when the user pulls down enough and lets go\n * of the refresher.\n * @param {expression=} on-pulling Called when the user starts to pull down\n * on the refresher.\n * @param {string=} pulling-text The text to display while the user is pulling down.\n * @param {string=} pulling-icon The icon to display while the user is pulling down.\n * Default: 'ion-android-arrow-down'.\n * @param {string=} spinner The {@link ionic.directive:ionSpinner} icon to display\n * after user lets go of the refresher. The SVG {@link ionic.directive:ionSpinner}\n * is now the default, replacing rotating font icons. Set to `none` to disable both the\n * spinner and the icon.\n * @param {string=} refreshing-icon The font icon to display after user lets go of the\n * refresher. This is deprecated in favor of the SVG {@link ionic.directive:ionSpinner}.\n * @param {boolean=} disable-pulling-rotation Disables the rotation animation of the pulling\n * icon when it reaches its activated threshold. To be used with a custom `pulling-icon`.\n *\n */\nIonicModule\n.directive('ionRefresher', [function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: ['?^$ionicScroll', 'ionRefresher'],\n    controller: '$ionicRefresher',\n    template:\n    '<div class=\"scroll-refresher invisible\" collection-repeat-ignore>' +\n      '<div class=\"ionic-refresher-content\" ' +\n      'ng-class=\"{\\'ionic-refresher-with-text\\': pullingText || refreshingText}\">' +\n        '<div class=\"icon-pulling\" ng-class=\"{\\'pulling-rotation-disabled\\':disablePullingRotation}\">' +\n          '<i class=\"icon {{pullingIcon}}\"></i>' +\n        '</div>' +\n        '<div class=\"text-pulling\" ng-bind-html=\"pullingText\"></div>' +\n        '<div class=\"icon-refreshing\">' +\n          '<ion-spinner ng-if=\"showSpinner\" icon=\"{{spinner}}\"></ion-spinner>' +\n          '<i ng-if=\"showIcon\" class=\"icon {{refreshingIcon}}\"></i>' +\n        '</div>' +\n        '<div class=\"text-refreshing\" ng-bind-html=\"refreshingText\"></div>' +\n      '</div>' +\n    '</div>',\n    link: function($scope, $element, $attrs, ctrls) {\n\n      // JS Scrolling uses the scroll controller\n      var scrollCtrl = ctrls[0],\n          refresherCtrl = ctrls[1];\n      if (!scrollCtrl || scrollCtrl.isNative()) {\n        // Kick off native scrolling\n        refresherCtrl.init();\n      } else {\n        $element[0].classList.add('js-scrolling');\n        scrollCtrl._setRefresher(\n          $scope,\n          $element[0],\n          refresherCtrl.getRefresherDomMethods()\n        );\n\n        $scope.$on('scroll.refreshComplete', function() {\n          $scope.$evalAsync(function() {\n            if(scrollCtrl.scrollView){\n              scrollCtrl.scrollView.finishPullToRefresh();\n            }\n          });\n        });\n      }\n\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name ionScroll\n * @module ionic\n * @delegate ionic.service:$ionicScrollDelegate\n * @codepen mwFuh\n * @restrict E\n *\n * @description\n * Creates a scrollable container for all content inside.\n *\n * @usage\n *\n * Basic usage:\n *\n * ```html\n * <ion-scroll zooming=\"true\" direction=\"xy\" style=\"width: 500px; height: 500px\">\n *   <div style=\"width: 5000px; height: 5000px; background: url('https://upload.wikimedia.org/wikipedia/commons/a/ad/Europe_geological_map-en.jpg') repeat\"></div>\n *  </ion-scroll>\n * ```\n *\n * Note that it's important to set the height of the scroll box as well as the height of the inner\n * content to enable scrolling. This makes it possible to have full control over scrollable areas.\n *\n * If you'd just like to have a center content scrolling area, use {@link ionic.directive:ionContent} instead.\n *\n * @param {string=} delegate-handle The handle used to identify this scrollView\n * with {@link ionic.service:$ionicScrollDelegate}.\n * @param {string=} direction Which way to scroll. 'x' or 'y' or 'xy'. Default 'y'.\n * @param {boolean=} locking Whether to lock scrolling in one direction at a time. Useful to set to false when zoomed in or scrolling in two directions. Default true.\n * @param {boolean=} paging Whether to scroll with paging.\n * @param {expression=} on-refresh Called on pull-to-refresh, triggered by an {@link ionic.directive:ionRefresher}.\n * @param {expression=} on-scroll Called whenever the user scrolls.\n * @param {expression=} on-scroll-complete Called whenever the scrolling paging is completed.\n * @param {boolean=} scrollbar-x Whether to show the horizontal scrollbar. Default true.\n * @param {boolean=} scrollbar-y Whether to show the vertical scrollbar. Default true.\n * @param {boolean=} zooming Whether to support pinch-to-zoom\n * @param {integer=} min-zoom The smallest zoom amount allowed (default is 0.5)\n * @param {integer=} max-zoom The largest zoom amount allowed (default is 3)\n * @param {boolean=} has-bouncing Whether to allow scrolling to bounce past the edges\n * of the content.  Defaults to true on iOS, false on Android.\n */\nIonicModule\n.directive('ionScroll', [\n  '$timeout',\n  '$controller',\n  '$ionicBind',\n  '$ionicConfig',\nfunction($timeout, $controller, $ionicBind, $ionicConfig) {\n  return {\n    restrict: 'E',\n    scope: true,\n    controller: function() {},\n    compile: function(element, attr) {\n      element.addClass('scroll-view ionic-scroll');\n\n      //We cannot transclude here because it breaks element.data() inheritance on compile\n      var innerElement = jqLite('<div class=\"scroll\"></div>');\n      innerElement.append(element.contents());\n      element.append(innerElement);\n\n      var nativeScrolling = attr.overflowScroll !== \"false\" && (attr.overflowScroll === \"true\" || !$ionicConfig.scrolling.jsScrolling());\n\n      return { pre: prelink };\n      function prelink($scope, $element, $attr) {\n        $ionicBind($scope, $attr, {\n          direction: '@',\n          paging: '@',\n          $onScroll: '&onScroll',\n          $onScrollComplete: '&onScrollComplete',\n          scroll: '@',\n          scrollbarX: '@',\n          scrollbarY: '@',\n          zooming: '@',\n          minZoom: '@',\n          maxZoom: '@'\n        });\n        $scope.direction = $scope.direction || 'y';\n\n        if (isDefined($attr.padding)) {\n          $scope.$watch($attr.padding, function(newVal) {\n            innerElement.toggleClass('padding', !!newVal);\n          });\n        }\n        if ($scope.$eval($scope.paging) === true) {\n          innerElement.addClass('scroll-paging');\n        }\n\n        if (!$scope.direction) { $scope.direction = 'y'; }\n        var isPaging = $scope.$eval($scope.paging) === true;\n\n        if (nativeScrolling) {\n          $element.addClass('overflow-scroll');\n        }\n\n        $element.addClass('scroll-' + $scope.direction);\n\n        var scrollViewOptions = {\n          el: $element[0],\n          delegateHandle: $attr.delegateHandle,\n          locking: ($attr.locking || 'true') === 'true',\n          bouncing: $scope.$eval($attr.hasBouncing),\n          paging: isPaging,\n          scrollbarX: $scope.$eval($scope.scrollbarX) !== false,\n          scrollbarY: $scope.$eval($scope.scrollbarY) !== false,\n          scrollingX: $scope.direction.indexOf('x') >= 0,\n          scrollingY: $scope.direction.indexOf('y') >= 0,\n          zooming: $scope.$eval($scope.zooming) === true,\n          maxZoom: $scope.$eval($scope.maxZoom) || 3,\n          minZoom: $scope.$eval($scope.minZoom) || 0.5,\n          preventDefault: true,\n          nativeScrolling: nativeScrolling,\n          scrollingComplete: onScrollComplete\n        };\n\n        if (isPaging) {\n          scrollViewOptions.speedMultiplier = 0.8;\n          scrollViewOptions.bouncing = false;\n        }\n\n        var scrollCtrl = $controller('$ionicScroll', {\n          $scope: $scope,\n          scrollViewOptions: scrollViewOptions\n        });\n\n        function onScrollComplete() {\n          $scope.$onScrollComplete && $scope.$onScrollComplete({\n            scrollTop: scrollCtrl.scrollView.__scrollTop,\n            scrollLeft: scrollCtrl.scrollView.__scrollLeft\n          });\n        }\n      }\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name ionSideMenu\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionSideMenus\n *\n * @description\n * A container for a side menu, sibling to an {@link ionic.directive:ionSideMenuContent} directive.\n *\n * @usage\n * ```html\n * <ion-side-menu\n *   side=\"left\"\n *   width=\"myWidthValue + 20\"\n *   is-enabled=\"shouldLeftSideMenuBeEnabled()\">\n * </ion-side-menu>\n * ```\n * For a complete side menu example, see the\n * {@link ionic.directive:ionSideMenus} documentation.\n *\n * @param {string} side Which side the side menu is currently on.  Allowed values: 'left' or 'right'.\n * @param {boolean=} is-enabled Whether this side menu is enabled.\n * @param {number=} width How many pixels wide the side menu should be.  Defaults to 275.\n */\nIonicModule\n.directive('ionSideMenu', function() {\n  return {\n    restrict: 'E',\n    require: '^ionSideMenus',\n    scope: true,\n    compile: function(element, attr) {\n      angular.isUndefined(attr.isEnabled) && attr.$set('isEnabled', 'true');\n      angular.isUndefined(attr.width) && attr.$set('width', '275');\n\n      element.addClass('menu menu-' + attr.side);\n\n      return function($scope, $element, $attr, sideMenuCtrl) {\n        $scope.side = $attr.side || 'left';\n\n        var sideMenu = sideMenuCtrl[$scope.side] = new ionic.views.SideMenu({\n          width: attr.width,\n          el: $element[0],\n          isEnabled: true\n        });\n\n        $scope.$watch($attr.width, function(val) {\n          var numberVal = +val;\n          if (numberVal && numberVal == val) {\n            sideMenu.setWidth(+val);\n          }\n        });\n        $scope.$watch($attr.isEnabled, function(val) {\n          sideMenu.setIsEnabled(!!val);\n        });\n      };\n    }\n  };\n});\n\n\n/**\n * @ngdoc directive\n * @name ionSideMenuContent\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionSideMenus\n *\n * @description\n * A container for the main visible content, sibling to one or more\n * {@link ionic.directive:ionSideMenu} directives.\n *\n * @usage\n * ```html\n * <ion-side-menu-content\n *   edge-drag-threshold=\"true\"\n *   drag-content=\"true\">\n * </ion-side-menu-content>\n * ```\n * For a complete side menu example, see the\n * {@link ionic.directive:ionSideMenus} documentation.\n *\n * @param {boolean=} drag-content Whether the content can be dragged. Default true.\n * @param {boolean|number=} edge-drag-threshold Whether the content drag can only start if it is below a certain threshold distance from the edge of the screen.  Default false. Accepts three types of values:\n   *  - If a non-zero number is given, that many pixels is used as the maximum allowed distance from the edge that starts dragging the side menu.\n   *  - If true is given, the default number of pixels (25) is used as the maximum allowed distance.\n   *  - If false or 0 is given, the edge drag threshold is disabled, and dragging from anywhere on the content is allowed.\n *\n */\nIonicModule\n.directive('ionSideMenuContent', [\n  '$timeout',\n  '$ionicGesture',\n  '$window',\nfunction($timeout, $ionicGesture, $window) {\n\n  return {\n    restrict: 'EA', //DEPRECATED 'A'\n    require: '^ionSideMenus',\n    scope: true,\n    compile: function(element, attr) {\n      element.addClass('menu-content pane');\n\n      return { pre: prelink };\n      function prelink($scope, $element, $attr, sideMenuCtrl) {\n        var startCoord = null;\n        var primaryScrollAxis = null;\n\n        if (isDefined(attr.dragContent)) {\n          $scope.$watch(attr.dragContent, function(value) {\n            sideMenuCtrl.canDragContent(value);\n          });\n        } else {\n          sideMenuCtrl.canDragContent(true);\n        }\n\n        if (isDefined(attr.edgeDragThreshold)) {\n          $scope.$watch(attr.edgeDragThreshold, function(value) {\n            sideMenuCtrl.edgeDragThreshold(value);\n          });\n        }\n\n        // Listen for taps on the content to close the menu\n        function onContentTap(gestureEvt) {\n          if (sideMenuCtrl.getOpenAmount() !== 0) {\n            sideMenuCtrl.close();\n            gestureEvt.gesture.srcEvent.preventDefault();\n            startCoord = null;\n            primaryScrollAxis = null;\n          } else if (!startCoord) {\n            startCoord = ionic.tap.pointerCoord(gestureEvt.gesture.srcEvent);\n          }\n        }\n\n        function onDragX(e) {\n          if (!sideMenuCtrl.isDraggableTarget(e)) return;\n\n          if (getPrimaryScrollAxis(e) == 'x') {\n            sideMenuCtrl._handleDrag(e);\n            e.gesture.srcEvent.preventDefault();\n          }\n        }\n\n        function onDragY(e) {\n          if (getPrimaryScrollAxis(e) == 'x') {\n            e.gesture.srcEvent.preventDefault();\n          }\n        }\n\n        function onDragRelease(e) {\n          sideMenuCtrl._endDrag(e);\n          startCoord = null;\n          primaryScrollAxis = null;\n        }\n\n        function getPrimaryScrollAxis(gestureEvt) {\n          // gets whether the user is primarily scrolling on the X or Y\n          // If a majority of the drag has been on the Y since the start of\n          // the drag, but the X has moved a little bit, it's still a Y drag\n\n          if (primaryScrollAxis) {\n            // we already figured out which way they're scrolling\n            return primaryScrollAxis;\n          }\n\n          if (gestureEvt && gestureEvt.gesture) {\n\n            if (!startCoord) {\n              // get the starting point\n              startCoord = ionic.tap.pointerCoord(gestureEvt.gesture.srcEvent);\n\n            } else {\n              // we already have a starting point, figure out which direction they're going\n              var endCoord = ionic.tap.pointerCoord(gestureEvt.gesture.srcEvent);\n\n              var xDistance = Math.abs(endCoord.x - startCoord.x);\n              var yDistance = Math.abs(endCoord.y - startCoord.y);\n\n              var scrollAxis = (xDistance < yDistance ? 'y' : 'x');\n\n              if (Math.max(xDistance, yDistance) > 30) {\n                // ok, we pretty much know which way they're going\n                // let's lock it in\n                primaryScrollAxis = scrollAxis;\n              }\n\n              return scrollAxis;\n            }\n          }\n          return 'y';\n        }\n\n        var content = {\n          element: element[0],\n          onDrag: function() {},\n          endDrag: function() {},\n          setCanScroll: function(canScroll) {\n            var c = $element[0].querySelector('.scroll');\n\n            if (!c) {\n              return;\n            }\n\n            var content = angular.element(c.parentElement);\n            if (!content) {\n              return;\n            }\n\n            // freeze our scroll container if we have one\n            var scrollScope = content.scope();\n            scrollScope.scrollCtrl && scrollScope.scrollCtrl.freezeScrollShut(!canScroll);\n          },\n          getTranslateX: function() {\n            return $scope.sideMenuContentTranslateX || 0;\n          },\n          setTranslateX: ionic.animationFrameThrottle(function(amount) {\n            var xTransform = content.offsetX + amount;\n            $element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(' + xTransform + 'px,0,0)';\n            $timeout(function() {\n              $scope.sideMenuContentTranslateX = amount;\n            });\n          }),\n          setMarginLeft: ionic.animationFrameThrottle(function(amount) {\n            if (amount) {\n              amount = parseInt(amount, 10);\n              $element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(' + amount + 'px,0,0)';\n              $element[0].style.width = ($window.innerWidth - amount) + 'px';\n              content.offsetX = amount;\n            } else {\n              $element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(0,0,0)';\n              $element[0].style.width = '';\n              content.offsetX = 0;\n            }\n          }),\n          setMarginRight: ionic.animationFrameThrottle(function(amount) {\n            if (amount) {\n              amount = parseInt(amount, 10);\n              $element[0].style.width = ($window.innerWidth - amount) + 'px';\n              content.offsetX = amount;\n            } else {\n              $element[0].style.width = '';\n              content.offsetX = 0;\n            }\n            // reset incase left gets grabby\n            $element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(0,0,0)';\n          }),\n          setMarginLeftAndRight: ionic.animationFrameThrottle(function(amountLeft, amountRight) {\n            amountLeft = amountLeft && parseInt(amountLeft, 10) || 0;\n            amountRight = amountRight && parseInt(amountRight, 10) || 0;\n\n            var amount = amountLeft + amountRight;\n\n            if (amount > 0) {\n              $element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(' + amountLeft + 'px,0,0)';\n              $element[0].style.width = ($window.innerWidth - amount) + 'px';\n              content.offsetX = amountLeft;\n            } else {\n              $element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(0,0,0)';\n              $element[0].style.width = '';\n              content.offsetX = 0;\n            }\n            // reset incase left gets grabby\n            //$element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(0,0,0)';\n          }),\n          enableAnimation: function() {\n            $scope.animationEnabled = true;\n            $element[0].classList.add('menu-animated');\n          },\n          disableAnimation: function() {\n            $scope.animationEnabled = false;\n            $element[0].classList.remove('menu-animated');\n          },\n          offsetX: 0\n        };\n\n        sideMenuCtrl.setContent(content);\n\n        // add gesture handlers\n        var gestureOpts = { stop_browser_behavior: false };\n        gestureOpts.prevent_default_directions = ['left', 'right'];\n        var contentTapGesture = $ionicGesture.on('tap', onContentTap, $element, gestureOpts);\n        var dragRightGesture = $ionicGesture.on('dragright', onDragX, $element, gestureOpts);\n        var dragLeftGesture = $ionicGesture.on('dragleft', onDragX, $element, gestureOpts);\n        var dragUpGesture = $ionicGesture.on('dragup', onDragY, $element, gestureOpts);\n        var dragDownGesture = $ionicGesture.on('dragdown', onDragY, $element, gestureOpts);\n        var releaseGesture = $ionicGesture.on('release', onDragRelease, $element, gestureOpts);\n\n        // Cleanup\n        $scope.$on('$destroy', function() {\n          if (content) {\n            content.element = null;\n            content = null;\n          }\n          $ionicGesture.off(dragLeftGesture, 'dragleft', onDragX);\n          $ionicGesture.off(dragRightGesture, 'dragright', onDragX);\n          $ionicGesture.off(dragUpGesture, 'dragup', onDragY);\n          $ionicGesture.off(dragDownGesture, 'dragdown', onDragY);\n          $ionicGesture.off(releaseGesture, 'release', onDragRelease);\n          $ionicGesture.off(contentTapGesture, 'tap', onContentTap);\n        });\n      }\n    }\n  };\n}]);\n\nIonicModule\n\n/**\n * @ngdoc directive\n * @name ionSideMenus\n * @module ionic\n * @delegate ionic.service:$ionicSideMenuDelegate\n * @restrict E\n *\n * @description\n * A container element for side menu(s) and the main content. Allows the left and/or right side menu\n * to be toggled by dragging the main content area side to side.\n *\n * To automatically close an opened menu, you can add the {@link ionic.directive:menuClose} attribute\n * directive. The `menu-close` attribute is usually added to links and buttons within\n * `ion-side-menu-content`, so that when the element is clicked, the opened side menu will\n * automatically close.\n *\n * \"Burger Icon\" toggles can be added to the header with the {@link ionic.directive:menuToggle}\n * attribute directive. Clicking the toggle will open and close the side menu like the `menu-close`\n * directive. The side menu will automatically hide on child pages, but can be overridden with the\n * enable-menu-with-back-views attribute mentioned below.\n *\n * By default, side menus are hidden underneath their side menu content and can be opened by swiping\n * the content left or right or by toggling a button to show the side menu. Additionally, by adding the\n * {@link ionic.directive:exposeAsideWhen} attribute directive to an\n * {@link ionic.directive:ionSideMenu} element directive, a side menu can be given instructions about\n * \"when\" the menu should be exposed (always viewable).\n *\n * ![Side Menu](http://ionicframework.com.s3.amazonaws.com/docs/controllers/sidemenu.gif)\n *\n * For more information on side menus, check out:\n *\n * - {@link ionic.directive:ionSideMenuContent}\n * - {@link ionic.directive:ionSideMenu}\n * - {@link ionic.directive:menuToggle}\n * - {@link ionic.directive:menuClose}\n * - {@link ionic.directive:exposeAsideWhen}\n *\n * @usage\n * To use side menus, add an `<ion-side-menus>` parent element. This will encompass all pages that have a\n * side menu, and have at least 2 child elements: 1 `<ion-side-menu-content>` for the center content,\n * and one or more `<ion-side-menu>` directives for each side menu(left/right) that you wish to place.\n *\n * ```html\n * <ion-side-menus>\n *   <!-- Left menu -->\n *   <ion-side-menu side=\"left\">\n *   </ion-side-menu>\n *\n *   <ion-side-menu-content>\n *   <!-- Main content, usually <ion-nav-view> -->\n *   </ion-side-menu-content>\n *\n *   <!-- Right menu -->\n *   <ion-side-menu side=\"right\">\n *   </ion-side-menu>\n *\n * </ion-side-menus>\n * ```\n * ```js\n * function ContentController($scope, $ionicSideMenuDelegate) {\n *   $scope.toggleLeft = function() {\n *     $ionicSideMenuDelegate.toggleLeft();\n *   };\n * }\n * ```\n *\n * @param {bool=} enable-menu-with-back-views Determines whether the side menu is enabled when the\n * back button is showing. When set to `false`, any {@link ionic.directive:menuToggle} will be hidden,\n * and the user cannot swipe to open the menu. When going back to the root page of the side menu (the\n * page without a back button visible), then any menuToggle buttons will show again, and menus will be\n * enabled again.\n * @param {string=} delegate-handle The handle used to identify this side menu\n * with {@link ionic.service:$ionicSideMenuDelegate}.\n *\n */\n.directive('ionSideMenus', ['$ionicBody', function($ionicBody) {\n  return {\n    restrict: 'ECA',\n    controller: '$ionicSideMenus',\n    compile: function(element, attr) {\n      attr.$set('class', (attr['class'] || '') + ' view');\n\n      return { pre: prelink };\n      function prelink($scope, $element, $attrs, ctrl) {\n\n        ctrl.enableMenuWithBackViews($scope.$eval($attrs.enableMenuWithBackViews));\n\n        $scope.$on('$ionicExposeAside', function(evt, isAsideExposed) {\n          if (!$scope.$exposeAside) $scope.$exposeAside = {};\n          $scope.$exposeAside.active = isAsideExposed;\n          $ionicBody.enableClass(isAsideExposed, 'aside-open');\n        });\n\n        $scope.$on('$ionicView.beforeEnter', function(ev, d) {\n          if (d.historyId) {\n            $scope.$activeHistoryId = d.historyId;\n          }\n        });\n\n        $scope.$on('$destroy', function() {\n          $ionicBody.removeClass('menu-open', 'aside-open');\n        });\n\n      }\n    }\n  };\n}]);\n\n\n/**\n * @ngdoc directive\n * @name ionSlideBox\n * @module ionic\n * @codepen AjgEB\n * @deprecated will be removed in the next Ionic release in favor of the new ion-slides component.\n * Don't depend on the internal behavior of this widget.\n * @delegate ionic.service:$ionicSlideBoxDelegate\n * @restrict E\n * @description\n * The Slide Box is a multi-page container where each page can be swiped or dragged between:\n *\n *\n * @usage\n * ```html\n * <ion-slide-box on-slide-changed=\"slideHasChanged($index)\">\n *   <ion-slide>\n *     <div class=\"box blue\"><h1>BLUE</h1></div>\n *   </ion-slide>\n *   <ion-slide>\n *     <div class=\"box yellow\"><h1>YELLOW</h1></div>\n *   </ion-slide>\n *   <ion-slide>\n *     <div class=\"box pink\"><h1>PINK</h1></div>\n *   </ion-slide>\n * </ion-slide-box>\n * ```\n *\n * @param {string=} delegate-handle The handle used to identify this slideBox\n * with {@link ionic.service:$ionicSlideBoxDelegate}.\n * @param {boolean=} does-continue Whether the slide box should loop.\n * @param {boolean=} auto-play Whether the slide box should automatically slide. Default true if does-continue is true.\n * @param {number=} slide-interval How many milliseconds to wait to change slides (if does-continue is true). Defaults to 4000.\n * @param {boolean=} show-pager Whether a pager should be shown for this slide box. Accepts expressions via `show-pager=\"{{shouldShow()}}\"`. Defaults to true.\n * @param {expression=} pager-click Expression to call when a pager is clicked (if show-pager is true). Is passed the 'index' variable.\n * @param {expression=} on-slide-changed Expression called whenever the slide is changed.  Is passed an '$index' variable.\n * @param {expression=} active-slide Model to bind the current slide index to.\n */\nIonicModule\n.directive('ionSlideBox', [\n  '$animate',\n  '$timeout',\n  '$compile',\n  '$ionicSlideBoxDelegate',\n  '$ionicHistory',\n  '$ionicScrollDelegate',\nfunction($animate, $timeout, $compile, $ionicSlideBoxDelegate, $ionicHistory, $ionicScrollDelegate) {\n  return {\n    restrict: 'E',\n    replace: true,\n    transclude: true,\n    scope: {\n      autoPlay: '=',\n      doesContinue: '@',\n      slideInterval: '@',\n      showPager: '@',\n      pagerClick: '&',\n      disableScroll: '@',\n      onSlideChanged: '&',\n      activeSlide: '=?',\n      bounce: '@'\n    },\n    controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {\n      var _this = this;\n\n      var continuous = $scope.$eval($scope.doesContinue) === true;\n      var bouncing = ($scope.$eval($scope.bounce) !== false); //Default to true\n      var shouldAutoPlay = isDefined($attrs.autoPlay) ? !!$scope.autoPlay : false;\n      var slideInterval = shouldAutoPlay ? $scope.$eval($scope.slideInterval) || 4000 : 0;\n\n      var slider = new ionic.views.Slider({\n        el: $element[0],\n        auto: slideInterval,\n        continuous: continuous,\n        startSlide: $scope.activeSlide,\n        bouncing: bouncing,\n        slidesChanged: function() {\n          $scope.currentSlide = slider.currentIndex();\n\n          // Try to trigger a digest\n          $timeout(function() {});\n        },\n        callback: function(slideIndex) {\n          $scope.currentSlide = slideIndex;\n          $scope.onSlideChanged({ index: $scope.currentSlide, $index: $scope.currentSlide});\n          $scope.$parent.$broadcast('slideBox.slideChanged', slideIndex);\n          $scope.activeSlide = slideIndex;\n          // Try to trigger a digest\n          $timeout(function() {});\n        },\n        onDrag: function() {\n          freezeAllScrolls(true);\n        },\n        onDragEnd: function() {\n          freezeAllScrolls(false);\n        }\n      });\n\n      function freezeAllScrolls(shouldFreeze) {\n        if (shouldFreeze && !_this.isScrollFreeze) {\n          $ionicScrollDelegate.freezeAllScrolls(shouldFreeze);\n\n        } else if (!shouldFreeze && _this.isScrollFreeze) {\n          $ionicScrollDelegate.freezeAllScrolls(false);\n        }\n        _this.isScrollFreeze = shouldFreeze;\n      }\n\n      slider.enableSlide($scope.$eval($attrs.disableScroll) !== true);\n\n      $scope.$watch('activeSlide', function(nv) {\n        if (isDefined(nv)) {\n          slider.slide(nv);\n        }\n      });\n\n      $scope.$on('slideBox.nextSlide', function() {\n        slider.next();\n      });\n\n      $scope.$on('slideBox.prevSlide', function() {\n        slider.prev();\n      });\n\n      $scope.$on('slideBox.setSlide', function(e, index) {\n        slider.slide(index);\n      });\n\n      //Exposed for testing\n      this.__slider = slider;\n\n      var deregisterInstance = $ionicSlideBoxDelegate._registerInstance(\n        slider, $attrs.delegateHandle, function() {\n          return $ionicHistory.isActiveScope($scope);\n        }\n      );\n      $scope.$on('$destroy', function() {\n        deregisterInstance();\n        slider.kill();\n      });\n\n      this.slidesCount = function() {\n        return slider.slidesCount();\n      };\n\n      this.onPagerClick = function(index) {\n        $scope.pagerClick({index: index});\n      };\n\n      $timeout(function() {\n        slider.load();\n      });\n    }],\n    template: '<div class=\"slider\">' +\n      '<div class=\"slider-slides\" ng-transclude>' +\n      '</div>' +\n    '</div>',\n\n    link: function($scope, $element, $attr) {\n      // Disable ngAnimate for slidebox and its children\n      $animate.enabled($element, false);\n\n      // if showPager is undefined, show the pager\n      if (!isDefined($attr.showPager)) {\n        $scope.showPager = true;\n        getPager().toggleClass('hide', !true);\n      }\n\n      $attr.$observe('showPager', function(show) {\n        if (show === undefined) return;\n        show = $scope.$eval(show);\n        getPager().toggleClass('hide', !show);\n      });\n\n      var pager;\n      function getPager() {\n        if (!pager) {\n          var childScope = $scope.$new();\n          pager = jqLite('<ion-pager></ion-pager>');\n          $element.append(pager);\n          pager = $compile(pager)(childScope);\n        }\n        return pager;\n      }\n    }\n  };\n}])\n.directive('ionSlide', function() {\n  return {\n    restrict: 'E',\n    require: '?^ionSlideBox',\n    compile: function(element) {\n      element.addClass('slider-slide');\n    }\n  };\n})\n\n.directive('ionPager', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '^ionSlideBox',\n    template: '<div class=\"slider-pager\"><span class=\"slider-pager-page\" ng-repeat=\"slide in numSlides() track by $index\" ng-class=\"{active: $index == currentSlide}\" ng-click=\"pagerClick($index)\"><i class=\"icon ion-record\"></i></span></div>',\n    link: function($scope, $element, $attr, slideBox) {\n      var selectPage = function(index) {\n        var children = $element[0].children;\n        var length = children.length;\n        for (var i = 0; i < length; i++) {\n          if (i == index) {\n            children[i].classList.add('active');\n          } else {\n            children[i].classList.remove('active');\n          }\n        }\n      };\n\n      $scope.pagerClick = function(index) {\n        slideBox.onPagerClick(index);\n      };\n\n      $scope.numSlides = function() {\n        return new Array(slideBox.slidesCount());\n      };\n\n      $scope.$watch('currentSlide', function(v) {\n        selectPage(v);\n      });\n    }\n  };\n\n});\n\n\n/**\n * @ngdoc directive\n * @name ionSlides\n * @module ionic\n * @restrict E\n * @description\n * The Slides component is a powerful multi-page container where each page can be swiped or dragged between.\n *\n * Note: this is a new version of the Ionic Slide Box based on the [Swiper](http://www.idangero.us/swiper/#.Vmc1J-ODFBc) widget from\n * [idangerous](http://www.idangero.us/).\n *\n * ![SlideBox](http://ionicframework.com.s3.amazonaws.com/docs/controllers/slideBox.gif)\n *\n * @usage\n * ```html\n * <ion-content scroll=\"false\">\n *   <ion-slides  options=\"options\" slider=\"data.slider\">\n *     <ion-slide-page>\n *       <div class=\"box blue\"><h1>BLUE</h1></div>\n *     </ion-slide-page>\n *     <ion-slide-page>\n *       <div class=\"box yellow\"><h1>YELLOW</h1></div>\n *     </ion-slide-page>\n *     <ion-slide-page>\n *       <div class=\"box pink\"><h1>PINK</h1></div>\n *     </ion-slide-page>\n *   </ion-slides>\n * </ion-content>\n * ```\n *\n * ```js\n * $scope.options = {\n *   loop: false,\n *   effect: 'fade',\n *   speed: 500,\n * }\n *\n * $scope.$on(\"$ionicSlides.sliderInitialized\", function(event, data){\n *   // data.slider is the instance of Swiper\n *   $scope.slider = data.slider;\n * });\n *\n * $scope.$on(\"$ionicSlides.slideChangeStart\", function(event, data){\n *   console.log('Slide change is beginning');\n * });\n *\n * $scope.$on(\"$ionicSlides.slideChangeEnd\", function(event, data){\n *   // note: the indexes are 0-based\n *   $scope.activeIndex = data.slider.activeIndex;\n *   $scope.previousIndex = data.slider.previousIndex;\n * });\n *\n * ```\n *\n * ## Slide Events\n *\n * The slides component dispatches events when the active slide changes\n *\n * <table class=\"table\">\n *   <tr>\n *     <td><code>$ionicSlides.slideChangeStart</code></td>\n *     <td>This event is emitted when a slide change begins</td>\n *   </tr>\n *   <tr>\n *     <td><code>$ionicSlides.slideChangeEnd</code></td>\n *     <td>This event is emitted when a slide change completes</td>\n *   </tr>\n *   <tr>\n *     <td><code>$ionicSlides.sliderInitialized</code></td>\n *     <td>This event is emitted when the slider is initialized. It provides access to an instance of the slider.</td>\n *   </tr>\n * </table>\n *\n *\n * ## Updating Slides Dynamically\n * When applying data to the slider at runtime, typically everything will work as expected.\n *\n * In the event that the slides are looped, use the `updateLoop` method on the slider to ensure the slides update correctly.\n *\n * ```\n * $scope.$on(\"$ionicSlides.sliderInitialized\", function(event, data){\n *   // grab an instance of the slider\n *   $scope.slider = data.slider;\n * });\n *\n * function dataChangeHandler(){\n *   // call this function when data changes, such as an HTTP request, etc\n *   if ( $scope.slider ){\n *     $scope.slider.updateLoop();\n *   }\n * }\n * ```\n *\n */\nIonicModule\n.directive('ionSlides', [\n  '$animate',\n  '$timeout',\n  '$compile',\nfunction($animate, $timeout, $compile) {\n  return {\n    restrict: 'E',\n    transclude: true,\n    scope: {\n      options: '=',\n      slider: '='\n    },\n    template: '<div class=\"swiper-container\">' +\n      '<div class=\"swiper-wrapper\" ng-transclude>' +\n      '</div>' +\n        '<div ng-hide=\"!showPager\" class=\"swiper-pagination\"></div>' +\n      '</div>',\n    controller: ['$scope', '$element', function($scope, $element) {\n      var _this = this;\n\n      this.update = function() {\n        $timeout(function() {\n          if (!_this.__slider) {\n            return;\n          }\n\n          _this.__slider.update();\n          if (_this._options.loop) {\n            _this.__slider.createLoop();\n          }\n\n          var slidesLength = _this.__slider.slides.length;\n\n          // Don't allow pager to show with > 10 slides\n          if (slidesLength > 10) {\n            $scope.showPager = false;\n          }\n\n          // When slide index is greater than total then slide to last index\n          if (_this.__slider.activeIndex > slidesLength - 1) {\n            _this.__slider.slideTo(slidesLength - 1);\n          }\n        });\n      };\n\n      this.rapidUpdate = ionic.debounce(function() {\n        _this.update();\n      }, 50);\n\n      this.getSlider = function() {\n        return _this.__slider;\n      };\n\n      var options = $scope.options || {};\n\n      var newOptions = angular.extend({\n        pagination: $element.children().children()[1],\n        paginationClickable: true,\n        lazyLoading: true,\n        preloadImages: false\n      }, options);\n\n      this._options = newOptions;\n\n      $timeout(function() {\n        var slider = new ionic.views.Swiper($element.children()[0], newOptions, $scope, $compile);\n\n        $scope.$emit(\"$ionicSlides.sliderInitialized\", { slider: slider });\n\n        _this.__slider = slider;\n        $scope.slider = _this.__slider;\n\n        $scope.$on('$destroy', function() {\n          slider.destroy();\n          _this.__slider = null;\n        });\n      });\n\n      $timeout(function() {\n        // if it's a loop, render the slides again just incase\n        _this.rapidUpdate();\n      }, 200);\n\n    }],\n\n    link: function($scope) {\n      $scope.showPager = true;\n      // Disable ngAnimate for slidebox and its children\n      //$animate.enabled(false, $element);\n    }\n  };\n}])\n.directive('ionSlidePage', [function() {\n  return {\n    restrict: 'E',\n    require: '?^ionSlides',\n    transclude: true,\n    replace: true,\n    template: '<div class=\"swiper-slide\" ng-transclude></div>',\n    link: function($scope, $element, $attr, ionSlidesCtrl) {\n      ionSlidesCtrl.rapidUpdate();\n\n      $scope.$on('$destroy', function() {\n        ionSlidesCtrl.rapidUpdate();\n      });\n    }\n  };\n}]);\n\n/**\n* @ngdoc directive\n* @name ionSpinner\n* @module ionic\n* @restrict E\n *\n * @description\n * The `ionSpinner` directive provides a variety of animated spinners.\n * Spinners enables you to give your users feedback that the app is\n * processing/thinking/waiting/chillin' out, or whatever you'd like it to indicate.\n * By default, the {@link ionic.directive:ionRefresher} feature uses this spinner, rather\n * than rotating font icons (previously included in [ionicons](http://ionicons.com/)).\n * While font icons are great for simple or stationary graphics, they're not suited to\n * provide great animations, which is why Ionic uses SVG instead.\n *\n * Ionic offers ten spinners out of the box, and by default, it will use the appropriate spinner\n * for the platform on which it's running. Under the hood, the `ionSpinner` directive dynamically\n * builds the required SVG element, which allows Ionic to provide all ten of the animated SVGs\n * within 3KB.\n *\n * <style>\n * .spinner-table {\n *   max-width: 280px;\n * }\n * .spinner-table tbody > tr > th, .spinner-table tbody > tr > td {\n *   vertical-align: middle;\n *   width: 42px;\n *   height: 42px;\n * }\n * .spinner {\n *   stroke: #444;\n *   fill: #444; }\n *   .spinner svg {\n *     width: 28px;\n *     height: 28px; }\n *   .spinner.spinner-inverse {\n *     stroke: #fff;\n *     fill: #fff; }\n *\n * .spinner-android {\n *   stroke: #4b8bf4; }\n *\n * .spinner-ios, .spinner-ios-small {\n *   stroke: #69717d; }\n *\n * .spinner-spiral .stop1 {\n *   stop-color: #fff;\n *   stop-opacity: 0; }\n * .spinner-spiral.spinner-inverse .stop1 {\n *   stop-color: #000; }\n * .spinner-spiral.spinner-inverse .stop2 {\n *   stop-color: #fff; }\n * </style>\n *\n * <script src=\"http://code.ionicframework.com/nightly/js/ionic.bundle.min.js\"></script>\n * <table class=\"table spinner-table\" ng-app=\"ionic\">\n *  <tr>\n *    <th>\n *      <code>android</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"android\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>ios</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"ios\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>ios-small</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"ios-small\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>bubbles</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"bubbles\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>circles</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"circles\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>crescent</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"crescent\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>dots</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"dots\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>lines</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"lines\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>ripple</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"ripple\"></ion-spinner>\n *    </td>\n *  </tr>\n *  <tr>\n *    <th>\n *      <code>spiral</code>\n *    </th>\n *    <td>\n *      <ion-spinner icon=\"spiral\"></ion-spinner>\n *    </td>\n *  </tr>\n * </table>\n *\n * Each spinner uses SVG with SMIL animations, however, the Android spinner also uses JavaScript\n * so it also works on Android 4.0-4.3. Additionally, each spinner can be styled with CSS,\n * and scaled to any size.\n *\n *\n * @usage\n * The following code would use the default spinner for the platform it's running from. If it's neither\n * iOS or Android, it'll default to use `ios`.\n *\n * ```html\n * <ion-spinner></ion-spinner>\n * ```\n *\n * By setting the `icon` attribute, you can specify which spinner to use, no matter what\n * the platform is.\n *\n * ```html\n * <ion-spinner icon=\"spiral\"></ion-spinner>\n * ```\n *\n * ## Spinner Colors\n * Like with most of Ionic's other components, spinners can also be styled using\n * Ionic's standard color naming convention. For example:\n *\n * ```html\n * <ion-spinner class=\"spinner-energized\"></ion-spinner>\n * ```\n *\n *\n * ## Styling SVG with CSS\n * One cool thing about SVG is its ability to be styled with CSS! Some of the properties\n * have different names, for example, SVG uses the term `stroke` instead of `border`, and\n * `fill` instead of `background-color`.\n *\n * ```css\n * .spinner svg {\n *   width: 28px;\n *   height: 28px;\n *   stroke: #444;\n *   fill: #444;\n * }\n * ```\n *\n*/\nIonicModule\n.directive('ionSpinner', function() {\n  return {\n    restrict: 'E',\n    controller: '$ionicSpinner',\n    link: function($scope, $element, $attrs, ctrl) {\n      var spinnerName = ctrl.init();\n      $element.addClass('spinner spinner-' + spinnerName);\n\n      $element.on('$destroy', function onDestroy() {\n        ctrl.stop();\n      });\n    }\n  };\n});\n\n/**\n * @ngdoc directive\n * @name ionTab\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionTabs\n *\n * @description\n * Contains a tab's content.  The content only exists while the given tab is selected.\n *\n * Each ionTab has its own view history.\n *\n * @usage\n * ```html\n * <ion-tab\n *   title=\"Tab!\"\n *   icon=\"my-icon\"\n *   href=\"#/tab/tab-link\"\n *   on-select=\"onTabSelected()\"\n *   on-deselect=\"onTabDeselected()\">\n * </ion-tab>\n * ```\n * For a complete, working tab bar example, see the {@link ionic.directive:ionTabs} documentation.\n *\n * @param {string} title The title of the tab.\n * @param {string=} href The link that this tab will navigate to when tapped.\n * @param {string=} icon The icon of the tab. If given, this will become the default for icon-on and icon-off.\n * @param {string=} icon-on The icon of the tab while it is selected.\n * @param {string=} icon-off The icon of the tab while it is not selected.\n * @param {expression=} badge The badge to put on this tab (usually a number).\n * @param {expression=} badge-style The style of badge to put on this tab (eg: badge-positive).\n * @param {expression=} on-select Called when this tab is selected.\n * @param {expression=} on-deselect Called when this tab is deselected.\n * @param {expression=} ng-click By default, the tab will be selected on click. If ngClick is set, it will not.  You can explicitly switch tabs using {@link ionic.service:$ionicTabsDelegate#select $ionicTabsDelegate.select()}.\n * @param {expression=} hidden Whether the tab is to be hidden or not.\n * @param {expression=} disabled Whether the tab is to be disabled or not.\n */\nIonicModule\n.directive('ionTab', [\n  '$compile',\n  '$ionicConfig',\n  '$ionicBind',\n  '$ionicViewSwitcher',\nfunction($compile, $ionicConfig, $ionicBind, $ionicViewSwitcher) {\n\n  //Returns ' key=\"value\"' if value exists\n  function attrStr(k, v) {\n    return isDefined(v) ? ' ' + k + '=\"' + v + '\"' : '';\n  }\n  return {\n    restrict: 'E',\n    require: ['^ionTabs', 'ionTab'],\n    controller: '$ionicTab',\n    scope: true,\n    compile: function(element, attr) {\n\n      //We create the tabNavTemplate in the compile phase so that the\n      //attributes we pass down won't be interpolated yet - we want\n      //to pass down the 'raw' versions of the attributes\n      var tabNavTemplate = '<ion-tab-nav' +\n        attrStr('ng-click', attr.ngClick) +\n        attrStr('title', attr.title) +\n        attrStr('icon', attr.icon) +\n        attrStr('icon-on', attr.iconOn) +\n        attrStr('icon-off', attr.iconOff) +\n        attrStr('badge', attr.badge) +\n        attrStr('badge-style', attr.badgeStyle) +\n        attrStr('hidden', attr.hidden) +\n        attrStr('disabled', attr.disabled) +\n        attrStr('class', attr['class']) +\n        '></ion-tab-nav>';\n\n      //Remove the contents of the element so we can compile them later, if tab is selected\n      var tabContentEle = document.createElement('div');\n      for (var x = 0; x < element[0].children.length; x++) {\n        tabContentEle.appendChild(element[0].children[x].cloneNode(true));\n      }\n      var childElementCount = tabContentEle.childElementCount;\n      element.empty();\n\n      var navViewName, isNavView;\n      if (childElementCount) {\n        if (tabContentEle.children[0].tagName === 'ION-NAV-VIEW') {\n          // get the name if it's a nav-view\n          navViewName = tabContentEle.children[0].getAttribute('name');\n          tabContentEle.children[0].classList.add('view-container');\n          isNavView = true;\n        }\n        if (childElementCount === 1) {\n          // make the 1 child element the primary tab content container\n          tabContentEle = tabContentEle.children[0];\n        }\n        if (!isNavView) tabContentEle.classList.add('pane');\n        tabContentEle.classList.add('tab-content');\n      }\n\n      return function link($scope, $element, $attr, ctrls) {\n        var childScope;\n        var childElement;\n        var tabsCtrl = ctrls[0];\n        var tabCtrl = ctrls[1];\n        var isTabContentAttached = false;\n        $scope.$tabSelected = false;\n\n        $ionicBind($scope, $attr, {\n          onSelect: '&',\n          onDeselect: '&',\n          title: '@',\n          uiSref: '@',\n          href: '@'\n        });\n\n        tabsCtrl.add($scope);\n        $scope.$on('$destroy', function() {\n          if (!$scope.$tabsDestroy) {\n            // if the containing ionTabs directive is being destroyed\n            // then don't bother going through the controllers remove\n            // method, since remove will reset the active tab as each tab\n            // is being destroyed, causing unnecessary view loads and transitions\n            tabsCtrl.remove($scope);\n          }\n          tabNavElement.isolateScope().$destroy();\n          tabNavElement.remove();\n          tabNavElement = tabContentEle = childElement = null;\n        });\n\n        //Remove title attribute so browser-tooltip does not apear\n        $element[0].removeAttribute('title');\n\n        if (navViewName) {\n          tabCtrl.navViewName = $scope.navViewName = navViewName;\n        }\n        $scope.$on('$stateChangeSuccess', selectIfMatchesState);\n        selectIfMatchesState();\n        function selectIfMatchesState() {\n          if (tabCtrl.tabMatchesState()) {\n            tabsCtrl.select($scope, false);\n          }\n        }\n\n        var tabNavElement = jqLite(tabNavTemplate);\n        tabNavElement.data('$ionTabsController', tabsCtrl);\n        tabNavElement.data('$ionTabController', tabCtrl);\n        tabsCtrl.$tabsElement.append($compile(tabNavElement)($scope));\n\n\n        function tabSelected(isSelected) {\n          if (isSelected && childElementCount) {\n            // this tab is being selected\n\n            // check if the tab is already in the DOM\n            // only do this if the tab has child elements\n            if (!isTabContentAttached) {\n              // tab should be selected and is NOT in the DOM\n              // create a new scope and append it\n              childScope = $scope.$new();\n              childElement = jqLite(tabContentEle);\n              $ionicViewSwitcher.viewEleIsActive(childElement, true);\n              tabsCtrl.$element.append(childElement);\n              $compile(childElement)(childScope);\n              isTabContentAttached = true;\n            }\n\n            // remove the hide class so the tabs content shows up\n            $ionicViewSwitcher.viewEleIsActive(childElement, true);\n\n          } else if (isTabContentAttached && childElement) {\n            // this tab should NOT be selected, and it is already in the DOM\n\n            if ($ionicConfig.views.maxCache() > 0) {\n              // keep the tabs in the DOM, only css hide it\n              $ionicViewSwitcher.viewEleIsActive(childElement, false);\n\n            } else {\n              // do not keep tabs in the DOM\n              destroyTab();\n            }\n\n          }\n        }\n\n        function destroyTab() {\n          childScope && childScope.$destroy();\n          isTabContentAttached && childElement && childElement.remove();\n          tabContentEle.innerHTML = '';\n          isTabContentAttached = childScope = childElement = null;\n        }\n\n        $scope.$watch('$tabSelected', tabSelected);\n\n        $scope.$on('$ionicView.afterEnter', function() {\n          $ionicViewSwitcher.viewEleIsActive(childElement, $scope.$tabSelected);\n        });\n\n        $scope.$on('$ionicView.clearCache', function() {\n          if (!$scope.$tabSelected) {\n            destroyTab();\n          }\n        });\n\n      };\n    }\n  };\n}]);\n\nIonicModule\n.directive('ionTabNav', [function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: ['^ionTabs', '^ionTab'],\n    template:\n    '<a ng-class=\"{\\'has-badge\\':badge, \\'tab-hidden\\':isHidden(), \\'tab-item-active\\': isTabActive()}\" ' +\n      ' ng-disabled=\"disabled()\" class=\"tab-item\">' +\n      '<span class=\"badge {{badgeStyle}}\" ng-if=\"badge\">{{badge}}</span>' +\n      '<i class=\"icon {{getIcon()}}\" ng-if=\"getIcon()\"></i>' +\n      '<span class=\"tab-title\" ng-bind-html=\"title\"></span>' +\n    '</a>',\n    scope: {\n      title: '@',\n      icon: '@',\n      iconOn: '@',\n      iconOff: '@',\n      badge: '=',\n      hidden: '@',\n      disabled: '&',\n      badgeStyle: '@',\n      'class': '@'\n    },\n    link: function($scope, $element, $attrs, ctrls) {\n      var tabsCtrl = ctrls[0],\n        tabCtrl = ctrls[1];\n\n      //Remove title attribute so browser-tooltip does not apear\n      $element[0].removeAttribute('title');\n\n      $scope.selectTab = function(e) {\n        e.preventDefault();\n        tabsCtrl.select(tabCtrl.$scope, true);\n      };\n      if (!$attrs.ngClick) {\n        $element.on('click', function(event) {\n          $scope.$apply(function() {\n            $scope.selectTab(event);\n          });\n        });\n      }\n\n      $scope.isHidden = function() {\n        if ($attrs.hidden === 'true' || $attrs.hidden === true) return true;\n        return false;\n      };\n\n      $scope.getIconOn = function() {\n        return $scope.iconOn || $scope.icon;\n      };\n      $scope.getIconOff = function() {\n        return $scope.iconOff || $scope.icon;\n      };\n\n      $scope.isTabActive = function() {\n        return tabsCtrl.selectedTab() === tabCtrl.$scope;\n      };\n\n      $scope.getIcon = function() {\n        if ( tabsCtrl.selectedTab() === tabCtrl.$scope ) {\n          // active\n          return $scope.iconOn || $scope.icon;\n        }\n        else {\n          // inactive\n          return $scope.iconOff || $scope.icon;\n        }\n      };\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name ionTabs\n * @module ionic\n * @delegate ionic.service:$ionicTabsDelegate\n * @restrict E\n * @codepen odqCz\n *\n * @description\n * Powers a multi-tabbed interface with a Tab Bar and a set of \"pages\" that can be tabbed\n * through.\n *\n * Assign any [tabs class](/docs/components#tabs) to the element to define\n * its look and feel.\n *\n * For iOS, tabs will appear at the bottom of the screen. For Android, tabs will be at the top\n * of the screen, below the nav-bar. This follows each OS's design specification, but can be\n * configured with the {@link ionic.provider:$ionicConfigProvider}.\n *\n * See the {@link ionic.directive:ionTab} directive's documentation for more details on\n * individual tabs.\n *\n * Note: do not place ion-tabs inside of an ion-content element; it has been known to cause a\n * certain CSS bug.\n *\n * @usage\n * ```html\n * <ion-tabs class=\"tabs-positive tabs-icon-top\">\n *\n *   <ion-tab title=\"Home\" icon-on=\"ion-ios-filing\" icon-off=\"ion-ios-filing-outline\">\n *     <!-- Tab 1 content -->\n *   </ion-tab>\n *\n *   <ion-tab title=\"About\" icon-on=\"ion-ios-clock\" icon-off=\"ion-ios-clock-outline\">\n *     <!-- Tab 2 content -->\n *   </ion-tab>\n *\n *   <ion-tab title=\"Settings\" icon-on=\"ion-ios-gear\" icon-off=\"ion-ios-gear-outline\">\n *     <!-- Tab 3 content -->\n *   </ion-tab>\n *\n * </ion-tabs>\n * ```\n *\n * @param {string=} delegate-handle The handle used to identify these tabs\n * with {@link ionic.service:$ionicTabsDelegate}.\n */\n\nIonicModule\n.directive('ionTabs', [\n  '$ionicTabsDelegate',\n  '$ionicConfig',\nfunction($ionicTabsDelegate, $ionicConfig) {\n  return {\n    restrict: 'E',\n    scope: true,\n    controller: '$ionicTabs',\n    compile: function(tElement) {\n      //We cannot use regular transclude here because it breaks element.data()\n      //inheritance on compile\n      var innerElement = jqLite('<div class=\"tab-nav tabs\">');\n      innerElement.append(tElement.contents());\n\n      tElement.append(innerElement)\n              .addClass('tabs-' + $ionicConfig.tabs.position() + ' tabs-' + $ionicConfig.tabs.style());\n\n      return { pre: prelink, post: postLink };\n      function prelink($scope, $element, $attr, tabsCtrl) {\n        var deregisterInstance = $ionicTabsDelegate._registerInstance(\n          tabsCtrl, $attr.delegateHandle, tabsCtrl.hasActiveScope\n        );\n\n        tabsCtrl.$scope = $scope;\n        tabsCtrl.$element = $element;\n        tabsCtrl.$tabsElement = jqLite($element[0].querySelector('.tabs'));\n\n        $scope.$watch(function() { return $element[0].className; }, function(value) {\n          var isTabsTop = value.indexOf('tabs-top') !== -1;\n          var isHidden = value.indexOf('tabs-item-hide') !== -1;\n          $scope.$hasTabs = !isTabsTop && !isHidden;\n          $scope.$hasTabsTop = isTabsTop && !isHidden;\n          $scope.$emit('$ionicTabs.top', $scope.$hasTabsTop);\n        });\n\n        function emitLifecycleEvent(ev, data) {\n          ev.stopPropagation();\n          var previousSelectedTab = tabsCtrl.previousSelectedTab();\n          if (previousSelectedTab) {\n            previousSelectedTab.$broadcast(ev.name.replace('NavView', 'Tabs'), data);\n          }\n        }\n\n        $scope.$on('$ionicNavView.beforeLeave', emitLifecycleEvent);\n        $scope.$on('$ionicNavView.afterLeave', emitLifecycleEvent);\n        $scope.$on('$ionicNavView.leave', emitLifecycleEvent);\n\n        $scope.$on('$destroy', function() {\n          // variable to inform child tabs that they're all being blown away\n          // used so that while destorying an individual tab, each one\n          // doesn't select the next tab as the active one, which causes unnecessary\n          // loading of tab views when each will eventually all go away anyway\n          $scope.$tabsDestroy = true;\n          deregisterInstance();\n          tabsCtrl.$tabsElement = tabsCtrl.$element = tabsCtrl.$scope = innerElement = null;\n          delete $scope.$hasTabs;\n          delete $scope.$hasTabsTop;\n        });\n      }\n\n      function postLink($scope, $element, $attr, tabsCtrl) {\n        if (!tabsCtrl.selectedTab()) {\n          // all the tabs have been added\n          // but one hasn't been selected yet\n          tabsCtrl.select(0);\n        }\n      }\n    }\n  };\n}]);\n\n/**\n* @ngdoc directive\n* @name ionTitle\n* @module ionic\n* @restrict E\n*\n* Used for titles in header and nav bars. New in 1.2\n*\n* Identical to <div class=\"title\"> but with future compatibility for Ionic 2\n*\n* @usage\n*\n* ```html\n* <ion-nav-bar>\n*   <ion-title>Hello</ion-title>\n* <ion-nav-bar>\n* ```\n*/\nIonicModule\n.directive('ionTitle', [function() {\n  return {\n    restrict: 'E',\n    compile: function(element) {\n      element.addClass('title');\n    }\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name ionToggle\n * @module ionic\n * @codepen tfAzj\n * @restrict E\n *\n * @description\n * A toggle is an animated switch which binds a given model to a boolean.\n *\n * Allows dragging of the switch's nub.\n *\n * The toggle behaves like any [AngularJS checkbox](http://docs.angularjs.org/api/ng/input/input[checkbox]) otherwise.\n *\n * @param toggle-class {string=} Sets the CSS class on the inner `label.toggle` element created by the directive.\n *\n * @usage\n * Below is an example of a toggle directive which is wired up to the `airplaneMode` model\n * and has the `toggle-calm` CSS class assigned to the inner element.\n *\n * ```html\n * <ion-toggle ng-model=\"airplaneMode\" toggle-class=\"toggle-calm\">Airplane Mode</ion-toggle>\n * ```\n */\nIonicModule\n.directive('ionToggle', [\n  '$timeout',\n  '$ionicConfig',\nfunction($timeout, $ionicConfig) {\n\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '?ngModel',\n    transclude: true,\n    template:\n      '<div class=\"item item-toggle\">' +\n        '<div ng-transclude></div>' +\n        '<label class=\"toggle\">' +\n          '<input type=\"checkbox\">' +\n          '<div class=\"track\">' +\n            '<div class=\"handle\"></div>' +\n          '</div>' +\n        '</label>' +\n      '</div>',\n\n    compile: function(element, attr) {\n      var input = element.find('input');\n      forEach({\n        'name': attr.name,\n        'ng-value': attr.ngValue,\n        'ng-model': attr.ngModel,\n        'ng-checked': attr.ngChecked,\n        'ng-disabled': attr.ngDisabled,\n        'ng-true-value': attr.ngTrueValue,\n        'ng-false-value': attr.ngFalseValue,\n        'ng-change': attr.ngChange,\n        'ng-required': attr.ngRequired,\n        'required': attr.required\n      }, function(value, name) {\n        if (isDefined(value)) {\n          input.attr(name, value);\n        }\n      });\n\n      if (attr.toggleClass) {\n        element[0].getElementsByTagName('label')[0].classList.add(attr.toggleClass);\n      }\n\n      element.addClass('toggle-' + $ionicConfig.form.toggle());\n\n      return function($scope, $element) {\n        var el = $element[0].getElementsByTagName('label')[0];\n        var checkbox = el.children[0];\n        var track = el.children[1];\n        var handle = track.children[0];\n\n        var ngModelController = jqLite(checkbox).controller('ngModel');\n\n        $scope.toggle = new ionic.views.Toggle({\n          el: el,\n          track: track,\n          checkbox: checkbox,\n          handle: handle,\n          onChange: function() {\n            if (ngModelController) {\n              ngModelController.$setViewValue(checkbox.checked);\n              $scope.$apply();\n            }\n          }\n        });\n\n        $scope.$on('$destroy', function() {\n          $scope.toggle.destroy();\n        });\n      };\n    }\n\n  };\n}]);\n\n/**\n * @ngdoc directive\n * @name ionView\n * @module ionic\n * @restrict E\n * @parent ionNavView\n *\n * @description\n * A container for view content and any navigational and header bar information. When a view\n * enters and exits its parent {@link ionic.directive:ionNavView}, the view also emits view\n * information, such as its title, whether the back button should be displayed or not, whether the\n * corresponding {@link ionic.directive:ionNavBar} should be displayed or not, which transition the view\n * should use to animate, and which direction to animate.\n *\n * *Views are cached to improve performance.* When a view is navigated away from, its element is\n * left in the DOM, and its scope is disconnected from the `$watch` cycle. When navigating to a\n * view that is already cached, its scope is reconnected, and the existing element, which was\n * left in the DOM, becomes active again. This can be disabled, or the maximum number of cached\n * views changed in {@link ionic.provider:$ionicConfigProvider}, in the view's `$state` configuration, or\n * as an attribute on the view itself (see below).\n *\n * @usage\n * Below is an example where our page will load with a {@link ionic.directive:ionNavBar} containing\n * \"My Page\" as the title.\n *\n * ```html\n * <ion-nav-bar></ion-nav-bar>\n * <ion-nav-view>\n *   <ion-view view-title=\"My Page\">\n *     <ion-content>\n *       Hello!\n *     </ion-content>\n *   </ion-view>\n * </ion-nav-view>\n * ```\n *\n * ## View LifeCycle and Events\n *\n * Views can be cached, which means ***controllers normally only load once***, which may\n * affect your controller logic. To know when a view has entered or left, events\n * have been added that are emitted from the view's scope. These events also\n * contain data about the view, such as the title and whether the back button should\n * show. Also contained is transition data, such as the transition type and\n * direction that will be or was used.\n *\n * Life cycle events are emitted upwards from the transitioning view's scope. In some cases, it is\n * desirable for a child/nested view to be notified of the event.\n * For this use case, `$ionicParentView` life cycle events are broadcast downwards.\n *\n * <table class=\"table\">\n *  <tr>\n *   <td><code>$ionicView.loaded</code></td>\n *   <td>The view has loaded. This event only happens once per\n * view being created and added to the DOM. If a view leaves but is cached,\n * then this event will not fire again on a subsequent viewing. The loaded event\n * is good place to put your setup code for the view; however, it is not the\n * recommended event to listen to when a view becomes active.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicView.enter</code></td>\n *   <td>The view has fully entered and is now the active view.\n * This event will fire, whether it was the first load or a cached view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicView.leave</code></td>\n *   <td>The view has finished leaving and is no longer the\n * active view. This event will fire, whether it is cached or destroyed.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicView.beforeEnter</code></td>\n *   <td>The view is about to enter and become the active view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicView.beforeLeave</code></td>\n *   <td>The view is about to leave and no longer be the active view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicView.afterEnter</code></td>\n *   <td>The view has fully entered and is now the active view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicView.afterLeave</code></td>\n *   <td>The view has finished leaving and is no longer the active view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicView.unloaded</code></td>\n *   <td>The view's controller has been destroyed and its element has been\n * removed from the DOM.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicParentView.enter</code></td>\n *   <td>The parent view has fully entered and is now the active view.\n * This event will fire, whether it was the first load or a cached view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicParentView.leave</code></td>\n *   <td>The parent view has finished leaving and is no longer the\n * active view. This event will fire, whether it is cached or destroyed.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicParentView.beforeEnter</code></td>\n *   <td>The parent view is about to enter and become the active view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicParentView.beforeLeave</code></td>\n *   <td>The parent view is about to leave and no longer be the active view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicParentView.afterEnter</code></td>\n *   <td>The parent view has fully entered and is now the active view.</td>\n *  </tr>\n *  <tr>\n *   <td><code>$ionicParentView.afterLeave</code></td>\n *   <td>The parent view has finished leaving and is no longer the active view.</td>\n *  </tr>\n * </table>\n *\n * ## LifeCycle Event Usage\n *\n * Below is an example of how to listen to life cycle events and\n * access state parameter data\n *\n * ```js\n * $scope.$on(\"$ionicView.beforeEnter\", function(event, data){\n *    // handle event\n *    console.log(\"State Params: \", data.stateParams);\n * });\n *\n * $scope.$on(\"$ionicView.enter\", function(event, data){\n *    // handle event\n *    console.log(\"State Params: \", data.stateParams);\n * });\n *\n * $scope.$on(\"$ionicView.afterEnter\", function(event, data){\n *    // handle event\n *    console.log(\"State Params: \", data.stateParams);\n * });\n * ```\n *\n * ## Caching\n *\n * Caching can be disabled and enabled in multiple ways. By default, Ionic will\n * cache a maximum of 10 views. You can optionally choose to disable caching at\n * either an individual view basis, or by global configuration. Please see the\n * _Caching_ section in {@link ionic.directive:ionNavView} for more info.\n *\n * @param {string=} view-title A text-only title to display on the parent {@link ionic.directive:ionNavBar}.\n * For an HTML title, such as an image, see {@link ionic.directive:ionNavTitle} instead.\n * @param {boolean=} cache-view If this view should be allowed to be cached or not.\n * Please see the _Caching_ section in {@link ionic.directive:ionNavView} for\n * more info. Default `true`\n * @param {boolean=} can-swipe-back If this view should be allowed to use the swipe to go back gesture or not.\n * This does not enable the swipe to go back feature if it is not available for the platform it's running\n * from, or there isn't a previous view. Default `true`\n * @param {boolean=} hide-back-button Whether to hide the back button on the parent\n * {@link ionic.directive:ionNavBar} by default.\n * @param {boolean=} hide-nav-bar Whether to hide the parent\n * {@link ionic.directive:ionNavBar} by default.\n */\nIonicModule\n.directive('ionView', function() {\n  return {\n    restrict: 'EA',\n    priority: 1000,\n    controller: '$ionicView',\n    compile: function(tElement) {\n      tElement.addClass('pane');\n      tElement[0].removeAttribute('title');\n      return function link($scope, $element, $attrs, viewCtrl) {\n        viewCtrl.init();\n      };\n    }\n  };\n});\n\n})();"
  },
  {
    "path": "ionic1/base/www/lib/ionic/js/ionic.js",
    "content": "/*!\n * Copyright 2015 Drifty Co.\n * http://drifty.com/\n *\n * Ionic, v1.3.4\n * A powerful HTML5 mobile app framework.\n * http://ionicframework.com/\n *\n * By @maxlynch, @benjsperry, @adamdbradley <3\n *\n * Licensed under the MIT license. Please see LICENSE for more information.\n *\n */\n\n(function() {\n\n// Create global ionic obj and its namespaces\n// build processes may have already created an ionic obj\nwindow.ionic = window.ionic || {};\nwindow.ionic.views = {};\nwindow.ionic.version = '1.3.4';\n\n(function (ionic) {\n\n  ionic.DelegateService = function(methodNames) {\n\n    if (methodNames.indexOf('$getByHandle') > -1) {\n      throw new Error(\"Method '$getByHandle' is implicitly added to each delegate service. Do not list it as a method.\");\n    }\n\n    function trueFn() { return true; }\n\n    return ['$log', function($log) {\n\n      /*\n       * Creates a new object that will have all the methodNames given,\n       * and call them on the given the controller instance matching given\n       * handle.\n       * The reason we don't just let $getByHandle return the controller instance\n       * itself is that the controller instance might not exist yet.\n       *\n       * We want people to be able to do\n       * `var instance = $ionicScrollDelegate.$getByHandle('foo')` on controller\n       * instantiation, but on controller instantiation a child directive\n       * may not have been compiled yet!\n       *\n       * So this is our way of solving this problem: we create an object\n       * that will only try to fetch the controller with given handle\n       * once the methods are actually called.\n       */\n      function DelegateInstance(instances, handle) {\n        this._instances = instances;\n        this.handle = handle;\n      }\n      methodNames.forEach(function(methodName) {\n        DelegateInstance.prototype[methodName] = instanceMethodCaller(methodName);\n      });\n\n\n      /**\n       * The delegate service (eg $ionicNavBarDelegate) is just an instance\n       * with a non-defined handle, a couple extra methods for registering\n       * and narrowing down to a specific handle.\n       */\n      function DelegateService() {\n        this._instances = [];\n      }\n      DelegateService.prototype = DelegateInstance.prototype;\n      DelegateService.prototype._registerInstance = function(instance, handle, filterFn) {\n        var instances = this._instances;\n        instance.$$delegateHandle = handle;\n        instance.$$filterFn = filterFn || trueFn;\n        instances.push(instance);\n\n        return function deregister() {\n          var index = instances.indexOf(instance);\n          if (index !== -1) {\n            instances.splice(index, 1);\n          }\n        };\n      };\n      DelegateService.prototype.$getByHandle = function(handle) {\n        return new DelegateInstance(this._instances, handle);\n      };\n\n      return new DelegateService();\n\n      function instanceMethodCaller(methodName) {\n        return function caller() {\n          var handle = this.handle;\n          var args = arguments;\n          var foundInstancesCount = 0;\n          var returnValue;\n\n          this._instances.forEach(function(instance) {\n            if ((!handle || handle == instance.$$delegateHandle) && instance.$$filterFn(instance)) {\n              foundInstancesCount++;\n              var ret = instance[methodName].apply(instance, args);\n              //Only return the value from the first call\n              if (foundInstancesCount === 1) {\n                returnValue = ret;\n              }\n            }\n          });\n\n          if (!foundInstancesCount && handle) {\n            return $log.warn(\n              'Delegate for handle \"' + handle + '\" could not find a ' +\n              'corresponding element with delegate-handle=\"' + handle + '\"! ' +\n              methodName + '() was not called!\\n' +\n              'Possible cause: If you are calling ' + methodName + '() immediately, and ' +\n              'your element with delegate-handle=\"' + handle + '\" is a child of your ' +\n              'controller, then your element may not be compiled yet. Put a $timeout ' +\n              'around your call to ' + methodName + '() and try again.'\n            );\n          }\n          return returnValue;\n        };\n      }\n\n    }];\n  };\n\n})(window.ionic);\n\n(function(window, document, ionic) {\n\n  var readyCallbacks = [];\n  var isDomReady = document.readyState === 'complete' || document.readyState === 'interactive';\n\n  function domReady() {\n    isDomReady = true;\n    for (var x = 0; x < readyCallbacks.length; x++) {\n      ionic.requestAnimationFrame(readyCallbacks[x]);\n    }\n    readyCallbacks = [];\n    document.removeEventListener('DOMContentLoaded', domReady);\n  }\n  if (!isDomReady) {\n    document.addEventListener('DOMContentLoaded', domReady);\n  }\n\n\n  // From the man himself, Mr. Paul Irish.\n  // The requestAnimationFrame polyfill\n  // Put it on window just to preserve its context\n  // without having to use .call\n  window._rAF = (function() {\n    return window.requestAnimationFrame ||\n           window.webkitRequestAnimationFrame ||\n           window.mozRequestAnimationFrame ||\n           function(callback) {\n             window.setTimeout(callback, 16);\n           };\n  })();\n\n  var cancelAnimationFrame = window.cancelAnimationFrame ||\n    window.webkitCancelAnimationFrame ||\n    window.mozCancelAnimationFrame ||\n    window.webkitCancelRequestAnimationFrame;\n\n  /**\n  * @ngdoc utility\n  * @name ionic.DomUtil\n  * @module ionic\n  */\n  ionic.DomUtil = {\n    //Call with proper context\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#requestAnimationFrame\n     * @alias ionic.requestAnimationFrame\n     * @description Calls [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window.requestAnimationFrame), or a polyfill if not available.\n     * @param {function} callback The function to call when the next frame\n     * happens.\n     */\n    requestAnimationFrame: function(cb) {\n      return window._rAF(cb);\n    },\n\n    cancelAnimationFrame: function(requestId) {\n      cancelAnimationFrame(requestId);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#animationFrameThrottle\n     * @alias ionic.animationFrameThrottle\n     * @description\n     * When given a callback, if that callback is called 100 times between\n     * animation frames, adding Throttle will make it only run the last of\n     * the 100 calls.\n     *\n     * @param {function} callback a function which will be throttled to\n     * requestAnimationFrame\n     * @returns {function} A function which will then call the passed in callback.\n     * The passed in callback will receive the context the returned function is\n     * called with.\n     */\n    animationFrameThrottle: function(cb) {\n      var args, isQueued, context;\n      return function() {\n        args = arguments;\n        context = this;\n        if (!isQueued) {\n          isQueued = true;\n          ionic.requestAnimationFrame(function() {\n            cb.apply(context, args);\n            isQueued = false;\n          });\n        }\n      };\n    },\n\n    contains: function(parentNode, otherNode) {\n      var current = otherNode;\n      while (current) {\n        if (current === parentNode) return true;\n        current = current.parentNode;\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getPositionInParent\n     * @description\n     * Find an element's scroll offset within its container.\n     * @param {DOMElement} element The element to find the offset of.\n     * @returns {object} A position object with the following properties:\n     *   - `{number}` `left` The left offset of the element.\n     *   - `{number}` `top` The top offset of the element.\n     */\n    getPositionInParent: function(el) {\n      return {\n        left: el.offsetLeft,\n        top: el.offsetTop\n      };\n    },\n\n    getOffsetTop: function(el) {\n      var curtop = 0;\n      if (el.offsetParent) {\n        do {\n          curtop += el.offsetTop;\n          el = el.offsetParent;\n        } while (el)\n        return curtop;\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#ready\n     * @description\n     * Call a function when the DOM is ready, or if it is already ready\n     * call the function immediately.\n     * @param {function} callback The function to be called.\n     */\n    ready: function(cb) {\n      if (isDomReady) {\n        ionic.requestAnimationFrame(cb);\n      } else {\n        readyCallbacks.push(cb);\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getTextBounds\n     * @description\n     * Get a rect representing the bounds of the given textNode.\n     * @param {DOMElement} textNode The textNode to find the bounds of.\n     * @returns {object} An object representing the bounds of the node. Properties:\n     *   - `{number}` `left` The left position of the textNode.\n     *   - `{number}` `right` The right position of the textNode.\n     *   - `{number}` `top` The top position of the textNode.\n     *   - `{number}` `bottom` The bottom position of the textNode.\n     *   - `{number}` `width` The width of the textNode.\n     *   - `{number}` `height` The height of the textNode.\n     */\n    getTextBounds: function(textNode) {\n      if (document.createRange) {\n        var range = document.createRange();\n        range.selectNodeContents(textNode);\n        if (range.getBoundingClientRect) {\n          var rect = range.getBoundingClientRect();\n          if (rect) {\n            var sx = window.scrollX;\n            var sy = window.scrollY;\n\n            return {\n              top: rect.top + sy,\n              left: rect.left + sx,\n              right: rect.left + sx + rect.width,\n              bottom: rect.top + sy + rect.height,\n              width: rect.width,\n              height: rect.height\n            };\n          }\n        }\n      }\n      return null;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getChildIndex\n     * @description\n     * Get the first index of a child node within the given element of the\n     * specified type.\n     * @param {DOMElement} element The element to find the index of.\n     * @param {string} type The nodeName to match children of element against.\n     * @returns {number} The index, or -1, of a child with nodeName matching type.\n     */\n    getChildIndex: function(element, type) {\n      if (type) {\n        var ch = element.parentNode.children;\n        var c;\n        for (var i = 0, k = 0, j = ch.length; i < j; i++) {\n          c = ch[i];\n          if (c.nodeName && c.nodeName.toLowerCase() == type) {\n            if (c == element) {\n              return k;\n            }\n            k++;\n          }\n        }\n      }\n      return Array.prototype.slice.call(element.parentNode.children).indexOf(element);\n    },\n\n    /**\n     * @private\n     */\n    swapNodes: function(src, dest) {\n      dest.parentNode.insertBefore(src, dest);\n    },\n\n    elementIsDescendant: function(el, parent, stopAt) {\n      var current = el;\n      do {\n        if (current === parent) return true;\n        current = current.parentNode;\n      } while (current && current !== stopAt);\n      return false;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getParentWithClass\n     * @param {DOMElement} element\n     * @param {string} className\n     * @returns {DOMElement} The closest parent of element matching the\n     * className, or null.\n     */\n    getParentWithClass: function(e, className, depth) {\n      depth = depth || 10;\n      while (e.parentNode && depth--) {\n        if (e.parentNode.classList && e.parentNode.classList.contains(className)) {\n          return e.parentNode;\n        }\n        e = e.parentNode;\n      }\n      return null;\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getParentOrSelfWithClass\n     * @param {DOMElement} element\n     * @param {string} className\n     * @returns {DOMElement} The closest parent or self matching the\n     * className, or null.\n     */\n    getParentOrSelfWithClass: function(e, className, depth) {\n      depth = depth || 10;\n      while (e && depth--) {\n        if (e.classList && e.classList.contains(className)) {\n          return e;\n        }\n        e = e.parentNode;\n      }\n      return null;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#rectContains\n     * @param {number} x\n     * @param {number} y\n     * @param {number} x1\n     * @param {number} y1\n     * @param {number} x2\n     * @param {number} y2\n     * @returns {boolean} Whether {x,y} fits within the rectangle defined by\n     * {x1,y1,x2,y2}.\n     */\n    rectContains: function(x, y, x1, y1, x2, y2) {\n      if (x < x1 || x > x2) return false;\n      if (y < y1 || y > y2) return false;\n      return true;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#blurAll\n     * @description\n     * Blurs any currently focused input element\n     * @returns {DOMElement} The element blurred or null\n     */\n    blurAll: function() {\n      if (document.activeElement && document.activeElement != document.body) {\n        document.activeElement.blur();\n        return document.activeElement;\n      }\n      return null;\n    },\n\n    cachedAttr: function(ele, key, value) {\n      ele = ele && ele.length && ele[0] || ele;\n      if (ele && ele.setAttribute) {\n        var dataKey = '$attr-' + key;\n        if (arguments.length > 2) {\n          if (ele[dataKey] !== value) {\n            ele.setAttribute(key, value);\n            ele[dataKey] = value;\n          }\n        } else if (typeof ele[dataKey] == 'undefined') {\n          ele[dataKey] = ele.getAttribute(key);\n        }\n        return ele[dataKey];\n      }\n    },\n\n    cachedStyles: function(ele, styles) {\n      ele = ele && ele.length && ele[0] || ele;\n      if (ele && ele.style) {\n        for (var prop in styles) {\n          if (ele['$style-' + prop] !== styles[prop]) {\n            ele.style[prop] = ele['$style-' + prop] = styles[prop];\n          }\n        }\n      }\n    }\n\n  };\n\n  //Shortcuts\n  ionic.requestAnimationFrame = ionic.DomUtil.requestAnimationFrame;\n  ionic.cancelAnimationFrame = ionic.DomUtil.cancelAnimationFrame;\n  ionic.animationFrameThrottle = ionic.DomUtil.animationFrameThrottle;\n\n})(window, document, ionic);\n\n/**\n * ion-events.js\n *\n * Author: Max Lynch <max@drifty.com>\n *\n * Framework events handles various mobile browser events, and\n * detects special events like tap/swipe/etc. and emits them\n * as custom events that can be used in an app.\n *\n * Portions lovingly adapted from github.com/maker/ratchet and github.com/alexgibson/tap.js - thanks guys!\n */\n\n(function(ionic) {\n\n  // Custom event polyfill\n  ionic.CustomEvent = (function() {\n    if( typeof window.CustomEvent === 'function' ) return CustomEvent;\n\n    var customEvent = function(event, params) {\n      var evt;\n      params = params || {\n        bubbles: false,\n        cancelable: false,\n        detail: undefined\n      };\n      try {\n        evt = document.createEvent(\"CustomEvent\");\n        evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n      } catch (error) {\n        // fallback for browsers that don't support createEvent('CustomEvent')\n        evt = document.createEvent(\"Event\");\n        for (var param in params) {\n          evt[param] = params[param];\n        }\n        evt.initEvent(event, params.bubbles, params.cancelable);\n      }\n      return evt;\n    };\n    customEvent.prototype = window.Event.prototype;\n    return customEvent;\n  })();\n\n\n  /**\n   * @ngdoc utility\n   * @name ionic.EventController\n   * @module ionic\n   */\n  ionic.EventController = {\n    VIRTUALIZED_EVENTS: ['tap', 'swipe', 'swiperight', 'swipeleft', 'drag', 'hold', 'release'],\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#trigger\n     * @alias ionic.trigger\n     * @param {string} eventType The event to trigger.\n     * @param {object} data The data for the event. Hint: pass in\n     * `{target: targetElement}`\n     * @param {boolean=} bubbles Whether the event should bubble up the DOM.\n     * @param {boolean=} cancelable Whether the event should be cancelable.\n     */\n    // Trigger a new event\n    trigger: function(eventType, data, bubbles, cancelable) {\n      var event = new ionic.CustomEvent(eventType, {\n        detail: data,\n        bubbles: !!bubbles,\n        cancelable: !!cancelable\n      });\n\n      // Make sure to trigger the event on the given target, or dispatch it from\n      // the window if we don't have an event target\n      data && data.target && data.target.dispatchEvent && data.target.dispatchEvent(event) || window.dispatchEvent(event);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#on\n     * @alias ionic.on\n     * @description Listen to an event on an element.\n     * @param {string} type The event to listen for.\n     * @param {function} callback The listener to be called.\n     * @param {DOMElement} element The element to listen for the event on.\n     */\n    on: function(type, callback, element) {\n      var e = element || window;\n\n      // Bind a gesture if it's a virtual event\n      for(var i = 0, j = this.VIRTUALIZED_EVENTS.length; i < j; i++) {\n        if(type == this.VIRTUALIZED_EVENTS[i]) {\n          var gesture = new ionic.Gesture(element);\n          gesture.on(type, callback);\n          return gesture;\n        }\n      }\n\n      // Otherwise bind a normal event\n      e.addEventListener(type, callback);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#off\n     * @alias ionic.off\n     * @description Remove an event listener.\n     * @param {string} type\n     * @param {function} callback\n     * @param {DOMElement} element\n     */\n    off: function(type, callback, element) {\n      element.removeEventListener(type, callback);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#onGesture\n     * @alias ionic.onGesture\n     * @description Add an event listener for a gesture on an element.\n     *\n     * Available eventTypes (from [hammer.js](http://eightmedia.github.io/hammer.js/)):\n     *\n     * `hold`, `tap`, `doubletap`, `drag`, `dragstart`, `dragend`, `dragup`, `dragdown`, <br/>\n     * `dragleft`, `dragright`, `swipe`, `swipeup`, `swipedown`, `swipeleft`, `swiperight`, <br/>\n     * `transform`, `transformstart`, `transformend`, `rotate`, `pinch`, `pinchin`, `pinchout`, <br/>\n     * `touch`, `release`\n     *\n     * @param {string} eventType The gesture event to listen for.\n     * @param {function(e)} callback The function to call when the gesture\n     * happens.\n     * @param {DOMElement} element The angular element to listen for the event on.\n     * @param {object} options object.\n     * @returns {ionic.Gesture} The gesture object (use this to remove the gesture later on).\n     */\n    onGesture: function(type, callback, element, options) {\n      var gesture = new ionic.Gesture(element, options);\n      gesture.on(type, callback);\n      return gesture;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#offGesture\n     * @alias ionic.offGesture\n     * @description Remove an event listener for a gesture created on an element.\n     * @param {ionic.Gesture} gesture The gesture that should be removed.\n     * @param {string} eventType The gesture event to remove the listener for.\n     * @param {function(e)} callback The listener to remove.\n\n     */\n    offGesture: function(gesture, type, callback) {\n      gesture && gesture.off(type, callback);\n    },\n\n    handlePopState: function() {}\n  };\n\n\n  // Map some convenient top-level functions for event handling\n  ionic.on = function() { ionic.EventController.on.apply(ionic.EventController, arguments); };\n  ionic.off = function() { ionic.EventController.off.apply(ionic.EventController, arguments); };\n  ionic.trigger = ionic.EventController.trigger;//function() { ionic.EventController.trigger.apply(ionic.EventController.trigger, arguments); };\n  ionic.onGesture = function() { return ionic.EventController.onGesture.apply(ionic.EventController.onGesture, arguments); };\n  ionic.offGesture = function() { return ionic.EventController.offGesture.apply(ionic.EventController.offGesture, arguments); };\n\n})(window.ionic);\n\n/* eslint camelcase:0 */\n/**\n  * Simple gesture controllers with some common gestures that emit\n  * gesture events.\n  *\n  * Ported from github.com/EightMedia/hammer.js Gestures - thanks!\n  */\n(function(ionic) {\n\n  /**\n   * ionic.Gestures\n   * use this to create instances\n   * @param   {HTMLElement}   element\n   * @param   {Object}        options\n   * @returns {ionic.Gestures.Instance}\n   * @constructor\n   */\n  ionic.Gesture = function(element, options) {\n    return new ionic.Gestures.Instance(element, options || {});\n  };\n\n  ionic.Gestures = {};\n\n  // default settings\n  ionic.Gestures.defaults = {\n    // add css to the element to prevent the browser from doing\n    // its native behavior. this doesnt prevent the scrolling,\n    // but cancels the contextmenu, tap highlighting etc\n    // set to false to disable this\n    stop_browser_behavior: 'disable-user-behavior'\n  };\n\n  // detect touchevents\n  ionic.Gestures.HAS_POINTEREVENTS = window.navigator.pointerEnabled || window.navigator.msPointerEnabled;\n  ionic.Gestures.HAS_TOUCHEVENTS = ('ontouchstart' in window);\n\n  // dont use mouseevents on mobile devices\n  ionic.Gestures.MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android|silk/i;\n  ionic.Gestures.NO_MOUSEEVENTS = ionic.Gestures.HAS_TOUCHEVENTS && window.navigator.userAgent.match(ionic.Gestures.MOBILE_REGEX);\n\n  // eventtypes per touchevent (start, move, end)\n  // are filled by ionic.Gestures.event.determineEventTypes on setup\n  ionic.Gestures.EVENT_TYPES = {};\n\n  // direction defines\n  ionic.Gestures.DIRECTION_DOWN = 'down';\n  ionic.Gestures.DIRECTION_LEFT = 'left';\n  ionic.Gestures.DIRECTION_UP = 'up';\n  ionic.Gestures.DIRECTION_RIGHT = 'right';\n\n  // pointer type\n  ionic.Gestures.POINTER_MOUSE = 'mouse';\n  ionic.Gestures.POINTER_TOUCH = 'touch';\n  ionic.Gestures.POINTER_PEN = 'pen';\n\n  // touch event defines\n  ionic.Gestures.EVENT_START = 'start';\n  ionic.Gestures.EVENT_MOVE = 'move';\n  ionic.Gestures.EVENT_END = 'end';\n\n  // hammer document where the base events are added at\n  ionic.Gestures.DOCUMENT = window.document;\n\n  // plugins namespace\n  ionic.Gestures.plugins = {};\n\n  // if the window events are set...\n  ionic.Gestures.READY = false;\n\n  /**\n   * setup events to detect gestures on the document\n   */\n  function setup() {\n    if(ionic.Gestures.READY) {\n      return;\n    }\n\n    // find what eventtypes we add listeners to\n    ionic.Gestures.event.determineEventTypes();\n\n    // Register all gestures inside ionic.Gestures.gestures\n    for(var name in ionic.Gestures.gestures) {\n      if(ionic.Gestures.gestures.hasOwnProperty(name)) {\n        ionic.Gestures.detection.register(ionic.Gestures.gestures[name]);\n      }\n    }\n\n    // Add touch events on the document\n    ionic.Gestures.event.onTouch(ionic.Gestures.DOCUMENT, ionic.Gestures.EVENT_MOVE, ionic.Gestures.detection.detect);\n    ionic.Gestures.event.onTouch(ionic.Gestures.DOCUMENT, ionic.Gestures.EVENT_END, ionic.Gestures.detection.detect);\n\n    // ionic.Gestures is ready...!\n    ionic.Gestures.READY = true;\n  }\n\n  /**\n   * create new hammer instance\n   * all methods should return the instance itself, so it is chainable.\n   * @param   {HTMLElement}       element\n   * @param   {Object}            [options={}]\n   * @returns {ionic.Gestures.Instance}\n   * @name Gesture.Instance\n   * @constructor\n   */\n  ionic.Gestures.Instance = function(element, options) {\n    var self = this;\n\n    // A null element was passed into the instance, which means\n    // whatever lookup was done to find this element failed to find it\n    // so we can't listen for events on it.\n    if(element === null) {\n      void 0;\n      return this;\n    }\n\n    // setup ionic.GesturesJS window events and register all gestures\n    // this also sets up the default options\n    setup();\n\n    this.element = element;\n\n    // start/stop detection option\n    this.enabled = true;\n\n    // merge options\n    this.options = ionic.Gestures.utils.extend(\n        ionic.Gestures.utils.extend({}, ionic.Gestures.defaults),\n        options || {});\n\n    // add some css to the element to prevent the browser from doing its native behavoir\n    if(this.options.stop_browser_behavior) {\n      ionic.Gestures.utils.stopDefaultBrowserBehavior(this.element, this.options.stop_browser_behavior);\n    }\n\n    // start detection on touchstart\n    ionic.Gestures.event.onTouch(element, ionic.Gestures.EVENT_START, function(ev) {\n      if(self.enabled) {\n        ionic.Gestures.detection.startDetect(self, ev);\n      }\n    });\n\n    // return instance\n    return this;\n  };\n\n\n  ionic.Gestures.Instance.prototype = {\n    /**\n     * bind events to the instance\n     * @param   {String}      gesture\n     * @param   {Function}    handler\n     * @returns {ionic.Gestures.Instance}\n     */\n    on: function onEvent(gesture, handler){\n      var gestures = gesture.split(' ');\n      for(var t = 0; t < gestures.length; t++) {\n        this.element.addEventListener(gestures[t], handler, false);\n      }\n      return this;\n    },\n\n\n    /**\n     * unbind events to the instance\n     * @param   {String}      gesture\n     * @param   {Function}    handler\n     * @returns {ionic.Gestures.Instance}\n     */\n    off: function offEvent(gesture, handler){\n      var gestures = gesture.split(' ');\n      for(var t = 0; t < gestures.length; t++) {\n        this.element.removeEventListener(gestures[t], handler, false);\n      }\n      return this;\n    },\n\n\n    /**\n     * trigger gesture event\n     * @param   {String}      gesture\n     * @param   {Object}      eventData\n     * @returns {ionic.Gestures.Instance}\n     */\n    trigger: function triggerEvent(gesture, eventData){\n      // create DOM event\n      var event = ionic.Gestures.DOCUMENT.createEvent('Event');\n      event.initEvent(gesture, true, true);\n      event.gesture = eventData;\n\n      // trigger on the target if it is in the instance element,\n      // this is for event delegation tricks\n      var element = this.element;\n      if(ionic.Gestures.utils.hasParent(eventData.target, element)) {\n        element = eventData.target;\n      }\n\n      element.dispatchEvent(event);\n      return this;\n    },\n\n\n    /**\n     * enable of disable hammer.js detection\n     * @param   {Boolean}   state\n     * @returns {ionic.Gestures.Instance}\n     */\n    enable: function enable(state) {\n      this.enabled = state;\n      return this;\n    }\n  };\n\n  /**\n   * this holds the last move event,\n   * used to fix empty touchend issue\n   * see the onTouch event for an explanation\n   * type {Object}\n   */\n  var last_move_event = null;\n\n\n  /**\n   * when the mouse is hold down, this is true\n   * type {Boolean}\n   */\n  var enable_detect = false;\n\n\n  /**\n   * when touch events have been fired, this is true\n   * type {Boolean}\n   */\n  var touch_triggered = false;\n\n\n  ionic.Gestures.event = {\n    /**\n     * simple addEventListener\n     * @param   {HTMLElement}   element\n     * @param   {String}        type\n     * @param   {Function}      handler\n     */\n    bindDom: function(element, type, handler) {\n      var types = type.split(' ');\n      for(var t = 0; t < types.length; t++) {\n        element.addEventListener(types[t], handler, false);\n      }\n    },\n\n\n    /**\n     * touch events with mouse fallback\n     * @param   {HTMLElement}   element\n     * @param   {String}        eventType        like ionic.Gestures.EVENT_MOVE\n     * @param   {Function}      handler\n     */\n    onTouch: function onTouch(element, eventType, handler) {\n      var self = this;\n\n      this.bindDom(element, ionic.Gestures.EVENT_TYPES[eventType], function bindDomOnTouch(ev) {\n        var sourceEventType = ev.type.toLowerCase();\n\n        // onmouseup, but when touchend has been fired we do nothing.\n        // this is for touchdevices which also fire a mouseup on touchend\n        if(sourceEventType.match(/mouse/) && touch_triggered) {\n          return;\n        }\n\n        // mousebutton must be down or a touch event\n        else if( sourceEventType.match(/touch/) ||   // touch events are always on screen\n          sourceEventType.match(/pointerdown/) || // pointerevents touch\n          (sourceEventType.match(/mouse/) && ev.which === 1)   // mouse is pressed\n          ){\n            enable_detect = true;\n          }\n\n        // mouse isn't pressed\n        else if(sourceEventType.match(/mouse/) && ev.which !== 1) {\n          enable_detect = false;\n        }\n\n\n        // we are in a touch event, set the touch triggered bool to true,\n        // this for the conflicts that may occur on ios and android\n        if(sourceEventType.match(/touch|pointer/)) {\n          touch_triggered = true;\n        }\n\n        // count the total touches on the screen\n        var count_touches = 0;\n\n        // when touch has been triggered in this detection session\n        // and we are now handling a mouse event, we stop that to prevent conflicts\n        if(enable_detect) {\n          // update pointerevent\n          if(ionic.Gestures.HAS_POINTEREVENTS && eventType != ionic.Gestures.EVENT_END) {\n            count_touches = ionic.Gestures.PointerEvent.updatePointer(eventType, ev);\n          }\n          // touch\n          else if(sourceEventType.match(/touch/)) {\n            count_touches = ev.touches.length;\n          }\n          // mouse\n          else if(!touch_triggered) {\n            count_touches = sourceEventType.match(/up/) ? 0 : 1;\n          }\n\n          // if we are in a end event, but when we remove one touch and\n          // we still have enough, set eventType to move\n          if(count_touches > 0 && eventType == ionic.Gestures.EVENT_END) {\n            eventType = ionic.Gestures.EVENT_MOVE;\n          }\n          // no touches, force the end event\n          else if(!count_touches) {\n            eventType = ionic.Gestures.EVENT_END;\n          }\n\n          // store the last move event\n          if(count_touches || last_move_event === null) {\n            last_move_event = ev;\n          }\n\n          // trigger the handler\n          handler.call(ionic.Gestures.detection, self.collectEventData(element, eventType, self.getTouchList(last_move_event, eventType), ev));\n\n          // remove pointerevent from list\n          if(ionic.Gestures.HAS_POINTEREVENTS && eventType == ionic.Gestures.EVENT_END) {\n            count_touches = ionic.Gestures.PointerEvent.updatePointer(eventType, ev);\n          }\n        }\n\n        //debug(sourceEventType +\" \"+ eventType);\n\n        // on the end we reset everything\n        if(!count_touches) {\n          last_move_event = null;\n          enable_detect = false;\n          touch_triggered = false;\n          ionic.Gestures.PointerEvent.reset();\n        }\n      });\n    },\n\n\n    /**\n     * we have different events for each device/browser\n     * determine what we need and set them in the ionic.Gestures.EVENT_TYPES constant\n     */\n    determineEventTypes: function determineEventTypes() {\n      // determine the eventtype we want to set\n      var types;\n\n      // pointerEvents magic\n      if(ionic.Gestures.HAS_POINTEREVENTS) {\n        types = ionic.Gestures.PointerEvent.getEvents();\n      }\n      // on Android, iOS, blackberry, windows mobile we dont want any mouseevents\n      else if(ionic.Gestures.NO_MOUSEEVENTS) {\n        types = [\n          'touchstart',\n          'touchmove',\n          'touchend touchcancel'];\n      }\n      // for non pointer events browsers and mixed browsers,\n      // like chrome on windows8 touch laptop\n      else {\n        types = [\n          'touchstart mousedown',\n          'touchmove mousemove',\n          'touchend touchcancel mouseup'];\n      }\n\n      ionic.Gestures.EVENT_TYPES[ionic.Gestures.EVENT_START] = types[0];\n      ionic.Gestures.EVENT_TYPES[ionic.Gestures.EVENT_MOVE] = types[1];\n      ionic.Gestures.EVENT_TYPES[ionic.Gestures.EVENT_END] = types[2];\n    },\n\n\n    /**\n     * create touchlist depending on the event\n     * @param   {Object}    ev\n     * @param   {String}    eventType   used by the fakemultitouch plugin\n     */\n    getTouchList: function getTouchList(ev/*, eventType*/) {\n      // get the fake pointerEvent touchlist\n      if(ionic.Gestures.HAS_POINTEREVENTS) {\n        return ionic.Gestures.PointerEvent.getTouchList();\n      }\n      // get the touchlist\n      else if(ev.touches) {\n        return ev.touches;\n      }\n      // make fake touchlist from mouse position\n      else {\n        ev.identifier = 1;\n        return [ev];\n      }\n    },\n\n\n    /**\n     * collect event data for ionic.Gestures js\n     * @param   {HTMLElement}   element\n     * @param   {String}        eventType        like ionic.Gestures.EVENT_MOVE\n     * @param   {Object}        eventData\n     */\n    collectEventData: function collectEventData(element, eventType, touches, ev) {\n\n      // find out pointerType\n      var pointerType = ionic.Gestures.POINTER_TOUCH;\n      if(ev.type.match(/mouse/) || ionic.Gestures.PointerEvent.matchType(ionic.Gestures.POINTER_MOUSE, ev)) {\n        pointerType = ionic.Gestures.POINTER_MOUSE;\n      }\n\n      return {\n        center: ionic.Gestures.utils.getCenter(touches),\n        timeStamp: new Date().getTime(),\n        target: ev.target,\n        touches: touches,\n        eventType: eventType,\n        pointerType: pointerType,\n        srcEvent: ev,\n\n        /**\n         * prevent the browser default actions\n         * mostly used to disable scrolling of the browser\n         */\n        preventDefault: function() {\n          if(this.srcEvent.preventManipulation) {\n            this.srcEvent.preventManipulation();\n          }\n\n          if(this.srcEvent.preventDefault) {\n            // this.srcEvent.preventDefault();\n          }\n        },\n\n        /**\n         * stop bubbling the event up to its parents\n         */\n        stopPropagation: function() {\n          this.srcEvent.stopPropagation();\n        },\n\n        /**\n         * immediately stop gesture detection\n         * might be useful after a swipe was detected\n         * @return {*}\n         */\n        stopDetect: function() {\n          return ionic.Gestures.detection.stopDetect();\n        }\n      };\n    }\n  };\n\n  ionic.Gestures.PointerEvent = {\n    /**\n     * holds all pointers\n     * type {Object}\n     */\n    pointers: {},\n\n    /**\n     * get a list of pointers\n     * @returns {Array}     touchlist\n     */\n    getTouchList: function() {\n      var self = this;\n      var touchlist = [];\n\n      // we can use forEach since pointerEvents only is in IE10\n      Object.keys(self.pointers).sort().forEach(function(id) {\n        touchlist.push(self.pointers[id]);\n      });\n      return touchlist;\n    },\n\n    /**\n     * update the position of a pointer\n     * @param   {String}   type             ionic.Gestures.EVENT_END\n     * @param   {Object}   pointerEvent\n     */\n    updatePointer: function(type, pointerEvent) {\n      if(type == ionic.Gestures.EVENT_END) {\n        this.pointers = {};\n      }\n      else {\n        pointerEvent.identifier = pointerEvent.pointerId;\n        this.pointers[pointerEvent.pointerId] = pointerEvent;\n      }\n\n      return Object.keys(this.pointers).length;\n    },\n\n    /**\n     * check if ev matches pointertype\n     * @param   {String}        pointerType     ionic.Gestures.POINTER_MOUSE\n     * @param   {PointerEvent}  ev\n     */\n    matchType: function(pointerType, ev) {\n      if(!ev.pointerType) {\n        return false;\n      }\n\n      var types = {};\n      types[ionic.Gestures.POINTER_MOUSE] = (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE || ev.pointerType == ionic.Gestures.POINTER_MOUSE);\n      types[ionic.Gestures.POINTER_TOUCH] = (ev.pointerType == ev.MSPOINTER_TYPE_TOUCH || ev.pointerType == ionic.Gestures.POINTER_TOUCH);\n      types[ionic.Gestures.POINTER_PEN] = (ev.pointerType == ev.MSPOINTER_TYPE_PEN || ev.pointerType == ionic.Gestures.POINTER_PEN);\n      return types[pointerType];\n    },\n\n\n    /**\n     * get events\n     */\n    getEvents: function() {\n      return [\n        'pointerdown MSPointerDown',\n      'pointermove MSPointerMove',\n      'pointerup pointercancel MSPointerUp MSPointerCancel'\n        ];\n    },\n\n    /**\n     * reset the list\n     */\n    reset: function() {\n      this.pointers = {};\n    }\n  };\n\n\n  ionic.Gestures.utils = {\n    /**\n     * extend method,\n     * also used for cloning when dest is an empty object\n     * @param   {Object}    dest\n     * @param   {Object}    src\n     * @param\t{Boolean}\tmerge\t\tdo a merge\n     * @returns {Object}    dest\n     */\n    extend: function extend(dest, src, merge) {\n      for (var key in src) {\n        if(dest[key] !== undefined && merge) {\n          continue;\n        }\n        dest[key] = src[key];\n      }\n      return dest;\n    },\n\n\n    /**\n     * find if a node is in the given parent\n     * used for event delegation tricks\n     * @param   {HTMLElement}   node\n     * @param   {HTMLElement}   parent\n     * @returns {boolean}       has_parent\n     */\n    hasParent: function(node, parent) {\n      while(node){\n        if(node == parent) {\n          return true;\n        }\n        node = node.parentNode;\n      }\n      return false;\n    },\n\n\n    /**\n     * get the center of all the touches\n     * @param   {Array}     touches\n     * @returns {Object}    center\n     */\n    getCenter: function getCenter(touches) {\n      var valuesX = [], valuesY = [];\n\n      for(var t = 0, len = touches.length; t < len; t++) {\n        valuesX.push(touches[t].pageX);\n        valuesY.push(touches[t].pageY);\n      }\n\n      return {\n        pageX: ((Math.min.apply(Math, valuesX) + Math.max.apply(Math, valuesX)) / 2),\n          pageY: ((Math.min.apply(Math, valuesY) + Math.max.apply(Math, valuesY)) / 2)\n      };\n    },\n\n\n    /**\n     * calculate the velocity between two points\n     * @param   {Number}    delta_time\n     * @param   {Number}    delta_x\n     * @param   {Number}    delta_y\n     * @returns {Object}    velocity\n     */\n    getVelocity: function getVelocity(delta_time, delta_x, delta_y) {\n      return {\n        x: Math.abs(delta_x / delta_time) || 0,\n        y: Math.abs(delta_y / delta_time) || 0\n      };\n    },\n\n\n    /**\n     * calculate the angle between two coordinates\n     * @param   {Touch}     touch1\n     * @param   {Touch}     touch2\n     * @returns {Number}    angle\n     */\n    getAngle: function getAngle(touch1, touch2) {\n      var y = touch2.pageY - touch1.pageY,\n      x = touch2.pageX - touch1.pageX;\n      return Math.atan2(y, x) * 180 / Math.PI;\n    },\n\n\n    /**\n     * angle to direction define\n     * @param   {Touch}     touch1\n     * @param   {Touch}     touch2\n     * @returns {String}    direction constant, like ionic.Gestures.DIRECTION_LEFT\n     */\n    getDirection: function getDirection(touch1, touch2) {\n      var x = Math.abs(touch1.pageX - touch2.pageX),\n      y = Math.abs(touch1.pageY - touch2.pageY);\n\n      if(x >= y) {\n        return touch1.pageX - touch2.pageX > 0 ? ionic.Gestures.DIRECTION_LEFT : ionic.Gestures.DIRECTION_RIGHT;\n      }\n      else {\n        return touch1.pageY - touch2.pageY > 0 ? ionic.Gestures.DIRECTION_UP : ionic.Gestures.DIRECTION_DOWN;\n      }\n    },\n\n\n    /**\n     * calculate the distance between two touches\n     * @param   {Touch}     touch1\n     * @param   {Touch}     touch2\n     * @returns {Number}    distance\n     */\n    getDistance: function getDistance(touch1, touch2) {\n      var x = touch2.pageX - touch1.pageX,\n      y = touch2.pageY - touch1.pageY;\n      return Math.sqrt((x * x) + (y * y));\n    },\n\n\n    /**\n     * calculate the scale factor between two touchLists (fingers)\n     * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n     * @param   {Array}     start\n     * @param   {Array}     end\n     * @returns {Number}    scale\n     */\n    getScale: function getScale(start, end) {\n      // need two fingers...\n      if(start.length >= 2 && end.length >= 2) {\n        return this.getDistance(end[0], end[1]) /\n          this.getDistance(start[0], start[1]);\n      }\n      return 1;\n    },\n\n\n    /**\n     * calculate the rotation degrees between two touchLists (fingers)\n     * @param   {Array}     start\n     * @param   {Array}     end\n     * @returns {Number}    rotation\n     */\n    getRotation: function getRotation(start, end) {\n      // need two fingers\n      if(start.length >= 2 && end.length >= 2) {\n        return this.getAngle(end[1], end[0]) -\n          this.getAngle(start[1], start[0]);\n      }\n      return 0;\n    },\n\n\n    /**\n     * boolean if the direction is vertical\n     * @param    {String}    direction\n     * @returns  {Boolean}   is_vertical\n     */\n    isVertical: function isVertical(direction) {\n      return (direction == ionic.Gestures.DIRECTION_UP || direction == ionic.Gestures.DIRECTION_DOWN);\n    },\n\n\n    /**\n     * stop browser default behavior with css class\n     * @param   {HtmlElement}   element\n     * @param   {Object}        css_class\n     */\n    stopDefaultBrowserBehavior: function stopDefaultBrowserBehavior(element, css_class) {\n      // changed from making many style changes to just adding a preset classname\n      // less DOM manipulations, less code, and easier to control in the CSS side of things\n      // hammer.js doesn't come with CSS, but ionic does, which is why we prefer this method\n      if(element && element.classList) {\n        element.classList.add(css_class);\n        element.onselectstart = function() {\n          return false;\n        };\n      }\n    }\n  };\n\n\n  ionic.Gestures.detection = {\n    // contains all registred ionic.Gestures.gestures in the correct order\n    gestures: [],\n\n    // data of the current ionic.Gestures.gesture detection session\n    current: null,\n\n    // the previous ionic.Gestures.gesture session data\n    // is a full clone of the previous gesture.current object\n    previous: null,\n\n    // when this becomes true, no gestures are fired\n    stopped: false,\n\n\n    /**\n     * start ionic.Gestures.gesture detection\n     * @param   {ionic.Gestures.Instance}   inst\n     * @param   {Object}            eventData\n     */\n    startDetect: function startDetect(inst, eventData) {\n      // already busy with a ionic.Gestures.gesture detection on an element\n      if(this.current) {\n        return;\n      }\n\n      this.stopped = false;\n\n      this.current = {\n        inst: inst, // reference to ionic.GesturesInstance we're working for\n        startEvent: ionic.Gestures.utils.extend({}, eventData), // start eventData for distances, timing etc\n        lastEvent: false, // last eventData\n        name: '' // current gesture we're in/detected, can be 'tap', 'hold' etc\n      };\n\n      this.detect(eventData);\n    },\n\n\n    /**\n     * ionic.Gestures.gesture detection\n     * @param   {Object}    eventData\n     */\n    detect: function detect(eventData) {\n      if(!this.current || this.stopped) {\n        return null;\n      }\n\n      // extend event data with calculations about scale, distance etc\n      eventData = this.extendEventData(eventData);\n\n      // instance options\n      var inst_options = this.current.inst.options;\n\n      // call ionic.Gestures.gesture handlers\n      for(var g = 0, len = this.gestures.length; g < len; g++) {\n        var gesture = this.gestures[g];\n\n        // only when the instance options have enabled this gesture\n        if(!this.stopped && inst_options[gesture.name] !== false) {\n          // if a handler returns false, we stop with the detection\n          if(gesture.handler.call(gesture, eventData, this.current.inst) === false) {\n            this.stopDetect();\n            break;\n          }\n        }\n      }\n\n      // store as previous event event\n      if(this.current) {\n        this.current.lastEvent = eventData;\n      }\n\n      // endevent, but not the last touch, so dont stop\n      if(eventData.eventType == ionic.Gestures.EVENT_END && !eventData.touches.length - 1) {\n        this.stopDetect();\n      }\n\n      return eventData;\n    },\n\n\n    /**\n     * clear the ionic.Gestures.gesture vars\n     * this is called on endDetect, but can also be used when a final ionic.Gestures.gesture has been detected\n     * to stop other ionic.Gestures.gestures from being fired\n     */\n    stopDetect: function stopDetect() {\n      // clone current data to the store as the previous gesture\n      // used for the double tap gesture, since this is an other gesture detect session\n      this.previous = ionic.Gestures.utils.extend({}, this.current);\n\n      // reset the current\n      this.current = null;\n\n      // stopped!\n      this.stopped = true;\n    },\n\n\n    /**\n     * extend eventData for ionic.Gestures.gestures\n     * @param   {Object}   ev\n     * @returns {Object}   ev\n     */\n    extendEventData: function extendEventData(ev) {\n      var startEv = this.current.startEvent;\n\n      // if the touches change, set the new touches over the startEvent touches\n      // this because touchevents don't have all the touches on touchstart, or the\n      // user must place his fingers at the EXACT same time on the screen, which is not realistic\n      // but, sometimes it happens that both fingers are touching at the EXACT same time\n      if(startEv && (ev.touches.length != startEv.touches.length || ev.touches === startEv.touches)) {\n        // extend 1 level deep to get the touchlist with the touch objects\n        startEv.touches = [];\n        for(var i = 0, len = ev.touches.length; i < len; i++) {\n          startEv.touches.push(ionic.Gestures.utils.extend({}, ev.touches[i]));\n        }\n      }\n\n      var delta_time = ev.timeStamp - startEv.timeStamp,\n          delta_x = ev.center.pageX - startEv.center.pageX,\n          delta_y = ev.center.pageY - startEv.center.pageY,\n          velocity = ionic.Gestures.utils.getVelocity(delta_time, delta_x, delta_y);\n\n      ionic.Gestures.utils.extend(ev, {\n        deltaTime: delta_time,\n        deltaX: delta_x,\n        deltaY: delta_y,\n\n        velocityX: velocity.x,\n        velocityY: velocity.y,\n\n        distance: ionic.Gestures.utils.getDistance(startEv.center, ev.center),\n        angle: ionic.Gestures.utils.getAngle(startEv.center, ev.center),\n        direction: ionic.Gestures.utils.getDirection(startEv.center, ev.center),\n\n        scale: ionic.Gestures.utils.getScale(startEv.touches, ev.touches),\n        rotation: ionic.Gestures.utils.getRotation(startEv.touches, ev.touches),\n\n        startEvent: startEv\n      });\n\n      return ev;\n    },\n\n\n    /**\n     * register new gesture\n     * @param   {Object}    gesture object, see gestures.js for documentation\n     * @returns {Array}     gestures\n     */\n    register: function register(gesture) {\n      // add an enable gesture options if there is no given\n      var options = gesture.defaults || {};\n      if(options[gesture.name] === undefined) {\n        options[gesture.name] = true;\n      }\n\n      // extend ionic.Gestures default options with the ionic.Gestures.gesture options\n      ionic.Gestures.utils.extend(ionic.Gestures.defaults, options, true);\n\n      // set its index\n      gesture.index = gesture.index || 1000;\n\n      // add ionic.Gestures.gesture to the list\n      this.gestures.push(gesture);\n\n      // sort the list by index\n      this.gestures.sort(function(a, b) {\n        if (a.index < b.index) {\n          return -1;\n        }\n        if (a.index > b.index) {\n          return 1;\n        }\n        return 0;\n      });\n\n      return this.gestures;\n    }\n  };\n\n\n  ionic.Gestures.gestures = ionic.Gestures.gestures || {};\n\n  /**\n   * Custom gestures\n   * ==============================\n   *\n   * Gesture object\n   * --------------------\n   * The object structure of a gesture:\n   *\n   * { name: 'mygesture',\n   *   index: 1337,\n   *   defaults: {\n   *     mygesture_option: true\n   *   }\n   *   handler: function(type, ev, inst) {\n   *     // trigger gesture event\n   *     inst.trigger(this.name, ev);\n   *   }\n   * }\n\n   * @param   {String}    name\n   * this should be the name of the gesture, lowercase\n   * it is also being used to disable/enable the gesture per instance config.\n   *\n   * @param   {Number}    [index=1000]\n   * the index of the gesture, where it is going to be in the stack of gestures detection\n   * like when you build an gesture that depends on the drag gesture, it is a good\n   * idea to place it after the index of the drag gesture.\n   *\n   * @param   {Object}    [defaults={}]\n   * the default settings of the gesture. these are added to the instance settings,\n   * and can be overruled per instance. you can also add the name of the gesture,\n   * but this is also added by default (and set to true).\n   *\n   * @param   {Function}  handler\n   * this handles the gesture detection of your custom gesture and receives the\n   * following arguments:\n   *\n   *      @param  {Object}    eventData\n   *      event data containing the following properties:\n   *          timeStamp   {Number}        time the event occurred\n   *          target      {HTMLElement}   target element\n   *          touches     {Array}         touches (fingers, pointers, mouse) on the screen\n   *          pointerType {String}        kind of pointer that was used. matches ionic.Gestures.POINTER_MOUSE|TOUCH\n   *          center      {Object}        center position of the touches. contains pageX and pageY\n   *          deltaTime   {Number}        the total time of the touches in the screen\n   *          deltaX      {Number}        the delta on x axis we haved moved\n   *          deltaY      {Number}        the delta on y axis we haved moved\n   *          velocityX   {Number}        the velocity on the x\n   *          velocityY   {Number}        the velocity on y\n   *          angle       {Number}        the angle we are moving\n   *          direction   {String}        the direction we are moving. matches ionic.Gestures.DIRECTION_UP|DOWN|LEFT|RIGHT\n   *          distance    {Number}        the distance we haved moved\n   *          scale       {Number}        scaling of the touches, needs 2 touches\n   *          rotation    {Number}        rotation of the touches, needs 2 touches *\n   *          eventType   {String}        matches ionic.Gestures.EVENT_START|MOVE|END\n   *          srcEvent    {Object}        the source event, like TouchStart or MouseDown *\n   *          startEvent  {Object}        contains the same properties as above,\n   *                                      but from the first touch. this is used to calculate\n   *                                      distances, deltaTime, scaling etc\n   *\n   *      @param  {ionic.Gestures.Instance}    inst\n   *      the instance we are doing the detection for. you can get the options from\n   *      the inst.options object and trigger the gesture event by calling inst.trigger\n   *\n   *\n   * Handle gestures\n   * --------------------\n   * inside the handler you can get/set ionic.Gestures.detectionic.current. This is the current\n   * detection sessionic. It has the following properties\n   *      @param  {String}    name\n   *      contains the name of the gesture we have detected. it has not a real function,\n   *      only to check in other gestures if something is detected.\n   *      like in the drag gesture we set it to 'drag' and in the swipe gesture we can\n   *      check if the current gesture is 'drag' by accessing ionic.Gestures.detectionic.current.name\n   *\n   *      readonly\n   *      @param  {ionic.Gestures.Instance}    inst\n   *      the instance we do the detection for\n   *\n   *      readonly\n   *      @param  {Object}    startEvent\n   *      contains the properties of the first gesture detection in this sessionic.\n   *      Used for calculations about timing, distance, etc.\n   *\n   *      readonly\n   *      @param  {Object}    lastEvent\n   *      contains all the properties of the last gesture detect in this sessionic.\n   *\n   * after the gesture detection session has been completed (user has released the screen)\n   * the ionic.Gestures.detectionic.current object is copied into ionic.Gestures.detectionic.previous,\n   * this is usefull for gestures like doubletap, where you need to know if the\n   * previous gesture was a tap\n   *\n   * options that have been set by the instance can be received by calling inst.options\n   *\n   * You can trigger a gesture event by calling inst.trigger(\"mygesture\", event).\n   * The first param is the name of your gesture, the second the event argument\n   *\n   *\n   * Register gestures\n   * --------------------\n   * When an gesture is added to the ionic.Gestures.gestures object, it is auto registered\n   * at the setup of the first ionic.Gestures instance. You can also call ionic.Gestures.detectionic.register\n   * manually and pass your gesture object as a param\n   *\n   */\n\n  /**\n   * Hold\n   * Touch stays at the same place for x time\n   * events  hold\n   */\n  ionic.Gestures.gestures.Hold = {\n    name: 'hold',\n    index: 10,\n    defaults: {\n      hold_timeout: 500,\n      hold_threshold: 9\n    },\n    timer: null,\n    handler: function holdGesture(ev, inst) {\n      switch(ev.eventType) {\n        case ionic.Gestures.EVENT_START:\n          // clear any running timers\n          clearTimeout(this.timer);\n\n          // set the gesture so we can check in the timeout if it still is\n          ionic.Gestures.detection.current.name = this.name;\n\n          // set timer and if after the timeout it still is hold,\n          // we trigger the hold event\n          this.timer = setTimeout(function() {\n            if(ionic.Gestures.detection.current.name == 'hold') {\n              ionic.tap.cancelClick();\n              inst.trigger('hold', ev);\n            }\n          }, inst.options.hold_timeout);\n          break;\n\n          // when you move or end we clear the timer\n        case ionic.Gestures.EVENT_MOVE:\n          if(ev.distance > inst.options.hold_threshold) {\n            clearTimeout(this.timer);\n          }\n          break;\n\n        case ionic.Gestures.EVENT_END:\n          clearTimeout(this.timer);\n          break;\n      }\n    }\n  };\n\n\n  /**\n   * Tap/DoubleTap\n   * Quick touch at a place or double at the same place\n   * events  tap, doubletap\n   */\n  ionic.Gestures.gestures.Tap = {\n    name: 'tap',\n    index: 100,\n    defaults: {\n      tap_max_touchtime: 250,\n      tap_max_distance: 10,\n      tap_always: true,\n      doubletap_distance: 20,\n      doubletap_interval: 300\n    },\n    handler: function tapGesture(ev, inst) {\n      if(ev.eventType == ionic.Gestures.EVENT_END && ev.srcEvent.type != 'touchcancel') {\n        // previous gesture, for the double tap since these are two different gesture detections\n        var prev = ionic.Gestures.detection.previous,\n        did_doubletap = false;\n\n        // when the touchtime is higher then the max touch time\n        // or when the moving distance is too much\n        if(ev.deltaTime > inst.options.tap_max_touchtime ||\n            ev.distance > inst.options.tap_max_distance) {\n              return;\n            }\n\n        // check if double tap\n        if(prev && prev.name == 'tap' &&\n            (ev.timeStamp - prev.lastEvent.timeStamp) < inst.options.doubletap_interval &&\n            ev.distance < inst.options.doubletap_distance) {\n              inst.trigger('doubletap', ev);\n              did_doubletap = true;\n            }\n\n        // do a single tap\n        if(!did_doubletap || inst.options.tap_always) {\n          ionic.Gestures.detection.current.name = 'tap';\n          inst.trigger('tap', ev);\n        }\n      }\n    }\n  };\n\n\n  /**\n   * Swipe\n   * triggers swipe events when the end velocity is above the threshold\n   * events  swipe, swipeleft, swiperight, swipeup, swipedown\n   */\n  ionic.Gestures.gestures.Swipe = {\n    name: 'swipe',\n    index: 40,\n    defaults: {\n      // set 0 for unlimited, but this can conflict with transform\n      swipe_max_touches: 1,\n      swipe_velocity: 0.4\n    },\n    handler: function swipeGesture(ev, inst) {\n      if(ev.eventType == ionic.Gestures.EVENT_END) {\n        // max touches\n        if(inst.options.swipe_max_touches > 0 &&\n            ev.touches.length > inst.options.swipe_max_touches) {\n              return;\n            }\n\n        // when the distance we moved is too small we skip this gesture\n        // or we can be already in dragging\n        if(ev.velocityX > inst.options.swipe_velocity ||\n            ev.velocityY > inst.options.swipe_velocity) {\n              // trigger swipe events\n              inst.trigger(this.name, ev);\n              inst.trigger(this.name + ev.direction, ev);\n            }\n      }\n    }\n  };\n\n\n  /**\n   * Drag\n   * Move with x fingers (default 1) around on the page. Blocking the scrolling when\n   * moving left and right is a good practice. When all the drag events are blocking\n   * you disable scrolling on that area.\n   * events  drag, drapleft, dragright, dragup, dragdown\n   */\n  ionic.Gestures.gestures.Drag = {\n    name: 'drag',\n    index: 50,\n    defaults: {\n      drag_min_distance: 10,\n      // Set correct_for_drag_min_distance to true to make the starting point of the drag\n      // be calculated from where the drag was triggered, not from where the touch started.\n      // Useful to avoid a jerk-starting drag, which can make fine-adjustments\n      // through dragging difficult, and be visually unappealing.\n      correct_for_drag_min_distance: true,\n      // set 0 for unlimited, but this can conflict with transform\n      drag_max_touches: 1,\n      // prevent default browser behavior when dragging occurs\n      // be careful with it, it makes the element a blocking element\n      // when you are using the drag gesture, it is a good practice to set this true\n      drag_block_horizontal: true,\n      drag_block_vertical: true,\n      // drag_lock_to_axis keeps the drag gesture on the axis that it started on,\n      // It disallows vertical directions if the initial direction was horizontal, and vice versa.\n      drag_lock_to_axis: false,\n      // drag lock only kicks in when distance > drag_lock_min_distance\n      // This way, locking occurs only when the distance has become large enough to reliably determine the direction\n      drag_lock_min_distance: 25,\n      // prevent default if the gesture is going the given direction\n      prevent_default_directions: []\n    },\n    triggered: false,\n    handler: function dragGesture(ev, inst) {\n      if (ev.srcEvent.type == 'touchstart' || ev.srcEvent.type == 'touchend') {\n        this.preventedFirstMove = false;\n\n      } else if (!this.preventedFirstMove && ev.srcEvent.type == 'touchmove') {\n        // Prevent gestures that are not intended for this event handler from firing subsequent times\n        if (inst.options.prevent_default_directions.length > 0\n            && inst.options.prevent_default_directions.indexOf(ev.direction) != -1) {\n          ev.srcEvent.preventDefault();\n        }\n        this.preventedFirstMove = true;\n      }\n\n      // current gesture isnt drag, but dragged is true\n      // this means an other gesture is busy. now call dragend\n      if(ionic.Gestures.detection.current.name != this.name && this.triggered) {\n        inst.trigger(this.name + 'end', ev);\n        this.triggered = false;\n        return;\n      }\n\n      // max touches\n      if(inst.options.drag_max_touches > 0 &&\n          ev.touches.length > inst.options.drag_max_touches) {\n            return;\n          }\n\n      switch(ev.eventType) {\n        case ionic.Gestures.EVENT_START:\n          this.triggered = false;\n          break;\n\n        case ionic.Gestures.EVENT_MOVE:\n          // when the distance we moved is too small we skip this gesture\n          // or we can be already in dragging\n          if(ev.distance < inst.options.drag_min_distance &&\n              ionic.Gestures.detection.current.name != this.name) {\n                return;\n              }\n\n          // we are dragging!\n          if(ionic.Gestures.detection.current.name != this.name) {\n            ionic.Gestures.detection.current.name = this.name;\n            if (inst.options.correct_for_drag_min_distance) {\n              // When a drag is triggered, set the event center to drag_min_distance pixels from the original event center.\n              // Without this correction, the dragged distance would jumpstart at drag_min_distance pixels instead of at 0.\n              // It might be useful to save the original start point somewhere\n              var factor = Math.abs(inst.options.drag_min_distance / ev.distance);\n              ionic.Gestures.detection.current.startEvent.center.pageX += ev.deltaX * factor;\n              ionic.Gestures.detection.current.startEvent.center.pageY += ev.deltaY * factor;\n\n              // recalculate event data using new start point\n              ev = ionic.Gestures.detection.extendEventData(ev);\n            }\n          }\n\n          // lock drag to axis?\n          if(ionic.Gestures.detection.current.lastEvent.drag_locked_to_axis || (inst.options.drag_lock_to_axis && inst.options.drag_lock_min_distance <= ev.distance)) {\n            ev.drag_locked_to_axis = true;\n          }\n          var last_direction = ionic.Gestures.detection.current.lastEvent.direction;\n          if(ev.drag_locked_to_axis && last_direction !== ev.direction) {\n            // keep direction on the axis that the drag gesture started on\n            if(ionic.Gestures.utils.isVertical(last_direction)) {\n              ev.direction = (ev.deltaY < 0) ? ionic.Gestures.DIRECTION_UP : ionic.Gestures.DIRECTION_DOWN;\n            }\n            else {\n              ev.direction = (ev.deltaX < 0) ? ionic.Gestures.DIRECTION_LEFT : ionic.Gestures.DIRECTION_RIGHT;\n            }\n          }\n\n          // first time, trigger dragstart event\n          if(!this.triggered) {\n            inst.trigger(this.name + 'start', ev);\n            this.triggered = true;\n          }\n\n          // trigger normal event\n          inst.trigger(this.name, ev);\n\n          // direction event, like dragdown\n          inst.trigger(this.name + ev.direction, ev);\n\n          // block the browser events\n          if( (inst.options.drag_block_vertical && ionic.Gestures.utils.isVertical(ev.direction)) ||\n              (inst.options.drag_block_horizontal && !ionic.Gestures.utils.isVertical(ev.direction))) {\n                ev.preventDefault();\n              }\n          break;\n\n        case ionic.Gestures.EVENT_END:\n          // trigger dragend\n          if(this.triggered) {\n            inst.trigger(this.name + 'end', ev);\n          }\n\n          this.triggered = false;\n          break;\n      }\n    }\n  };\n\n\n  /**\n   * Transform\n   * User want to scale or rotate with 2 fingers\n   * events  transform, pinch, pinchin, pinchout, rotate\n   */\n  ionic.Gestures.gestures.Transform = {\n    name: 'transform',\n    index: 45,\n    defaults: {\n      // factor, no scale is 1, zoomin is to 0 and zoomout until higher then 1\n      transform_min_scale: 0.01,\n      // rotation in degrees\n      transform_min_rotation: 1,\n      // prevent default browser behavior when two touches are on the screen\n      // but it makes the element a blocking element\n      // when you are using the transform gesture, it is a good practice to set this true\n      transform_always_block: false\n    },\n    triggered: false,\n    handler: function transformGesture(ev, inst) {\n      // current gesture isnt drag, but dragged is true\n      // this means an other gesture is busy. now call dragend\n      if(ionic.Gestures.detection.current.name != this.name && this.triggered) {\n        inst.trigger(this.name + 'end', ev);\n        this.triggered = false;\n        return;\n      }\n\n      // atleast multitouch\n      if(ev.touches.length < 2) {\n        return;\n      }\n\n      // prevent default when two fingers are on the screen\n      if(inst.options.transform_always_block) {\n        ev.preventDefault();\n      }\n\n      switch(ev.eventType) {\n        case ionic.Gestures.EVENT_START:\n          this.triggered = false;\n          break;\n\n        case ionic.Gestures.EVENT_MOVE:\n          var scale_threshold = Math.abs(1 - ev.scale);\n          var rotation_threshold = Math.abs(ev.rotation);\n\n          // when the distance we moved is too small we skip this gesture\n          // or we can be already in dragging\n          if(scale_threshold < inst.options.transform_min_scale &&\n              rotation_threshold < inst.options.transform_min_rotation) {\n                return;\n              }\n\n          // we are transforming!\n          ionic.Gestures.detection.current.name = this.name;\n\n          // first time, trigger dragstart event\n          if(!this.triggered) {\n            inst.trigger(this.name + 'start', ev);\n            this.triggered = true;\n          }\n\n          inst.trigger(this.name, ev); // basic transform event\n\n          // trigger rotate event\n          if(rotation_threshold > inst.options.transform_min_rotation) {\n            inst.trigger('rotate', ev);\n          }\n\n          // trigger pinch event\n          if(scale_threshold > inst.options.transform_min_scale) {\n            inst.trigger('pinch', ev);\n            inst.trigger('pinch' + ((ev.scale < 1) ? 'in' : 'out'), ev);\n          }\n          break;\n\n        case ionic.Gestures.EVENT_END:\n          // trigger dragend\n          if(this.triggered) {\n            inst.trigger(this.name + 'end', ev);\n          }\n\n          this.triggered = false;\n          break;\n      }\n    }\n  };\n\n\n  /**\n   * Touch\n   * Called as first, tells the user has touched the screen\n   * events  touch\n   */\n  ionic.Gestures.gestures.Touch = {\n    name: 'touch',\n    index: -Infinity,\n    defaults: {\n      // call preventDefault at touchstart, and makes the element blocking by\n      // disabling the scrolling of the page, but it improves gestures like\n      // transforming and dragging.\n      // be careful with using this, it can be very annoying for users to be stuck\n      // on the page\n      prevent_default: false,\n\n      // disable mouse events, so only touch (or pen!) input triggers events\n      prevent_mouseevents: false\n    },\n    handler: function touchGesture(ev, inst) {\n      if(inst.options.prevent_mouseevents && ev.pointerType == ionic.Gestures.POINTER_MOUSE) {\n        ev.stopDetect();\n        return;\n      }\n\n      if(inst.options.prevent_default) {\n        ev.preventDefault();\n      }\n\n      if(ev.eventType == ionic.Gestures.EVENT_START) {\n        inst.trigger(this.name, ev);\n      }\n    }\n  };\n\n\n  /**\n   * Release\n   * Called as last, tells the user has released the screen\n   * events  release\n   */\n  ionic.Gestures.gestures.Release = {\n    name: 'release',\n    index: Infinity,\n    handler: function releaseGesture(ev, inst) {\n      if(ev.eventType == ionic.Gestures.EVENT_END) {\n        inst.trigger(this.name, ev);\n      }\n    }\n  };\n})(window.ionic);\n\n(function(window, document, ionic) {\n\n  function getParameterByName(name) {\n    name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n    var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\"),\n    results = regex.exec(location.search);\n    return results === null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n  }\n\n  var IOS = 'ios';\n  var ANDROID = 'android';\n  var WINDOWS_PHONE = 'windowsphone';\n  var EDGE = 'edge';\n  var CROSSWALK = 'crosswalk';\n  var requestAnimationFrame = ionic.requestAnimationFrame;\n\n  /**\n   * @ngdoc utility\n   * @name ionic.Platform\n   * @module ionic\n   * @description\n   * A set of utility methods that can be used to retrieve the device ready state and\n   * various other information such as what kind of platform the app is currently installed on.\n   *\n   * @usage\n   * ```js\n   * angular.module('PlatformApp', ['ionic'])\n   * .controller('PlatformCtrl', function($scope) {\n   *\n   *   ionic.Platform.ready(function(){\n   *     // will execute when device is ready, or immediately if the device is already ready.\n   *   });\n   *\n   *   var deviceInformation = ionic.Platform.device();\n   *\n   *   var isWebView = ionic.Platform.isWebView();\n   *   var isIPad = ionic.Platform.isIPad();\n   *   var isIOS = ionic.Platform.isIOS();\n   *   var isAndroid = ionic.Platform.isAndroid();\n   *   var isWindowsPhone = ionic.Platform.isWindowsPhone();\n   *\n   *   var currentPlatform = ionic.Platform.platform();\n   *   var currentPlatformVersion = ionic.Platform.version();\n   *\n   *   ionic.Platform.exitApp(); // stops the app\n   * });\n   * ```\n   */\n  var self = ionic.Platform = {\n\n    // Put navigator on platform so it can be mocked and set\n    // the browser does not allow window.navigator to be set\n    navigator: window.navigator,\n\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#isReady\n     * @returns {boolean} Whether the device is ready.\n     */\n    isReady: false,\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#isFullScreen\n     * @returns {boolean} Whether the device is fullscreen.\n     */\n    isFullScreen: false,\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#platforms\n     * @returns {Array(string)} An array of all platforms found.\n     */\n    platforms: null,\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#grade\n     * @returns {string} What grade the current platform is.\n     */\n    grade: null,\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#ua\n     * @returns {string} What User Agent is.\n     */\n    ua: navigator.userAgent,\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#ready\n     * @description\n     * Trigger a callback once the device is ready, or immediately\n     * if the device is already ready. This method can be run from\n     * anywhere and does not need to be wrapped by any additonal methods.\n     * When the app is within a WebView (Cordova), it'll fire\n     * the callback once the device is ready. If the app is within\n     * a web browser, it'll fire the callback after `window.load`.\n     * Please remember that Cordova features (Camera, FileSystem, etc) still\n     * will not work in a web browser.\n     * @param {function} callback The function to call.\n     */\n    ready: function(cb) {\n      // run through tasks to complete now that the device is ready\n      if (self.isReady) {\n        cb();\n      } else {\n        // the platform isn't ready yet, add it to this array\n        // which will be called once the platform is ready\n        readyCallbacks.push(cb);\n      }\n    },\n\n    /**\n     * @private\n     */\n    detect: function() {\n      self._checkPlatforms();\n\n      requestAnimationFrame(function() {\n        // only add to the body class if we got platform info\n        for (var i = 0; i < self.platforms.length; i++) {\n          document.body.classList.add('platform-' + self.platforms[i]);\n        }\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#setGrade\n     * @description Set the grade of the device: 'a', 'b', or 'c'. 'a' is the best\n     * (most css features enabled), 'c' is the worst.  By default, sets the grade\n     * depending on the current device.\n     * @param {string} grade The new grade to set.\n     */\n    setGrade: function(grade) {\n      var oldGrade = self.grade;\n      self.grade = grade;\n      requestAnimationFrame(function() {\n        if (oldGrade) {\n          document.body.classList.remove('grade-' + oldGrade);\n        }\n        document.body.classList.add('grade-' + grade);\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#device\n     * @description Return the current device (given by cordova).\n     * @returns {object} The device object.\n     */\n    device: function() {\n      return window.device || {};\n    },\n\n    _checkPlatforms: function() {\n      self.platforms = [];\n      var grade = 'a';\n\n      if (self.isWebView()) {\n        self.platforms.push('webview');\n        if (!(!window.cordova && !window.PhoneGap && !window.phonegap)) {\n          self.platforms.push('cordova');\n        } else if (typeof window.forge === 'object') {\n          self.platforms.push('trigger');\n        }\n      } else {\n        self.platforms.push('browser');\n      }\n      if (self.isIPad()) self.platforms.push('ipad');\n\n      var platform = self.platform();\n      if (platform) {\n        self.platforms.push(platform);\n\n        var version = self.version();\n        if (version) {\n          var v = version.toString();\n          if (v.indexOf('.') > 0) {\n            v = v.replace('.', '_');\n          } else {\n            v += '_0';\n          }\n          self.platforms.push(platform + v.split('_')[0]);\n          self.platforms.push(platform + v);\n\n          if (self.isAndroid() && version < 4.4) {\n            grade = (version < 4 ? 'c' : 'b');\n          } else if (self.isWindowsPhone()) {\n            grade = 'b';\n          }\n        }\n      }\n\n      self.setGrade(grade);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isWebView\n     * @returns {boolean} Check if we are running within a WebView (such as Cordova).\n     */\n    isWebView: function() {\n      return !(!window.cordova && !window.PhoneGap && !window.phonegap && window.forge !== 'object');\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isIPad\n     * @returns {boolean} Whether we are running on iPad.\n     */\n    isIPad: function() {\n      if (/iPad/i.test(self.navigator.platform)) {\n        return true;\n      }\n      return /iPad/i.test(self.ua);\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isIOS\n     * @returns {boolean} Whether we are running on iOS.\n     */\n    isIOS: function() {\n      return self.is(IOS);\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isAndroid\n     * @returns {boolean} Whether we are running on Android.\n     */\n    isAndroid: function() {\n      return self.is(ANDROID);\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isWindowsPhone\n     * @returns {boolean} Whether we are running on Windows Phone.\n     */\n    isWindowsPhone: function() {\n      return self.is(WINDOWS_PHONE);\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isEdge\n     * @returns {boolean} Whether we are running on MS Edge/Windows 10 (inc. Phone)\n     */\n    isEdge: function() {\n      return self.is(EDGE);\n    },\n\n    isCrosswalk: function() {\n      return self.is(CROSSWALK);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#platform\n     * @returns {string} The name of the current platform.\n     */\n    platform: function() {\n      // singleton to get the platform name\n      if (platformName === null) self.setPlatform(self.device().platform);\n      return platformName;\n    },\n\n    /**\n     * @private\n     */\n    setPlatform: function(n) {\n      if (typeof n != 'undefined' && n !== null && n.length) {\n        platformName = n.toLowerCase();\n      } else if (getParameterByName('ionicplatform')) {\n        platformName = getParameterByName('ionicplatform');\n      } else if (self.ua.indexOf('Edge') > -1) {\n        platformName = EDGE;\n      } else if (self.ua.indexOf('Windows Phone') > -1) {\n        platformName = WINDOWS_PHONE;\n      } else if (self.ua.indexOf('Android') > 0) {\n        platformName = ANDROID;\n      } else if (/iPhone|iPad|iPod/.test(self.ua)) {\n        platformName = IOS;\n      } else {\n        platformName = self.navigator.platform && navigator.platform.toLowerCase().split(' ')[0] || '';\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#version\n     * @returns {number} The version of the current device platform.\n     */\n    version: function() {\n      // singleton to get the platform version\n      if (platformVersion === null) self.setVersion(self.device().version);\n      return platformVersion;\n    },\n\n    /**\n     * @private\n     */\n    setVersion: function(v) {\n      if (typeof v != 'undefined' && v !== null) {\n        v = v.split('.');\n        v = parseFloat(v[0] + '.' + (v.length > 1 ? v[1] : 0));\n        if (!isNaN(v)) {\n          platformVersion = v;\n          return;\n        }\n      }\n\n      platformVersion = 0;\n\n      // fallback to user-agent checking\n      var pName = self.platform();\n      var versionMatch = {\n        'android': /Android (\\d+).(\\d+)?/,\n        'ios': /OS (\\d+)_(\\d+)?/,\n        'windowsphone': /Windows Phone (\\d+).(\\d+)?/\n      };\n      if (versionMatch[pName]) {\n        v = self.ua.match(versionMatch[pName]);\n        if (v && v.length > 2) {\n          platformVersion = parseFloat(v[1] + '.' + v[2]);\n        }\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#is\n     * @param {string} Platform name.\n     * @returns {boolean} Whether the platform name provided is detected.\n     */\n    is: function(type) {\n      type = type.toLowerCase();\n      // check if it has an array of platforms\n      if (self.platforms) {\n        for (var x = 0; x < self.platforms.length; x++) {\n          if (self.platforms[x] === type) return true;\n        }\n      }\n      // exact match\n      var pName = self.platform();\n      if (pName) {\n        return pName === type.toLowerCase();\n      }\n\n      // A quick hack for to check userAgent\n      return self.ua.toLowerCase().indexOf(type) >= 0;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#exitApp\n     * @description Exit the app.\n     */\n    exitApp: function() {\n      self.ready(function() {\n        navigator.app && navigator.app.exitApp && navigator.app.exitApp();\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#showStatusBar\n     * @description Shows or hides the device status bar (in Cordova). Requires `ionic plugin add cordova-plugin-statusbar`\n     * @param {boolean} shouldShow Whether or not to show the status bar.\n     */\n    showStatusBar: function(val) {\n      // Only useful when run within cordova\n      self._showStatusBar = val;\n      self.ready(function() {\n        // run this only when or if the platform (cordova) is ready\n        requestAnimationFrame(function() {\n          if (self._showStatusBar) {\n            // they do not want it to be full screen\n            window.StatusBar && window.StatusBar.show();\n            document.body.classList.remove('status-bar-hide');\n          } else {\n            // it should be full screen\n            window.StatusBar && window.StatusBar.hide();\n            document.body.classList.add('status-bar-hide');\n          }\n        });\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#fullScreen\n     * @description\n     * Sets whether the app is fullscreen or not (in Cordova).\n     * @param {boolean=} showFullScreen Whether or not to set the app to fullscreen. Defaults to true. Requires `ionic plugin add cordova-plugin-statusbar`\n     * @param {boolean=} showStatusBar Whether or not to show the device's status bar. Defaults to false.\n     */\n    fullScreen: function(showFullScreen, showStatusBar) {\n      // showFullScreen: default is true if no param provided\n      self.isFullScreen = (showFullScreen !== false);\n\n      // add/remove the fullscreen classname to the body\n      ionic.DomUtil.ready(function() {\n        // run this only when or if the DOM is ready\n        requestAnimationFrame(function() {\n          if (self.isFullScreen) {\n            document.body.classList.add('fullscreen');\n          } else {\n            document.body.classList.remove('fullscreen');\n          }\n        });\n        // showStatusBar: default is false if no param provided\n        self.showStatusBar((showStatusBar === true));\n      });\n    }\n\n  };\n\n  var platformName = null, // just the name, like iOS or Android\n  platformVersion = null, // a float of the major and minor, like 7.1\n  readyCallbacks = [],\n  windowLoadListenderAttached,\n  platformReadyTimer = 2000; // How long to wait for platform ready before emitting a warning\n\n  verifyPlatformReady();\n\n  // Warn the user if deviceready did not fire in a reasonable amount of time, and how to fix it.\n  function verifyPlatformReady() {\n    setTimeout(function() {\n      if(!self.isReady && self.isWebView()) {\n        void 0;\n      }\n    }, platformReadyTimer);\n  }\n\n  // setup listeners to know when the device is ready to go\n  function onWindowLoad() {\n    if (self.isWebView()) {\n      // the window and scripts are fully loaded, and a cordova/phonegap\n      // object exists then let's listen for the deviceready\n      document.addEventListener(\"deviceready\", onPlatformReady, false);\n    } else {\n      // the window and scripts are fully loaded, but the window object doesn't have the\n      // cordova/phonegap object, so its just a browser, not a webview wrapped w/ cordova\n      onPlatformReady();\n    }\n    if (windowLoadListenderAttached) {\n      window.removeEventListener(\"load\", onWindowLoad, false);\n    }\n  }\n  if (document.readyState === 'complete') {\n    onWindowLoad();\n  } else {\n    windowLoadListenderAttached = true;\n    window.addEventListener(\"load\", onWindowLoad, false);\n  }\n\n  function onPlatformReady() {\n    // the device is all set to go, init our own stuff then fire off our event\n    self.isReady = true;\n    self.detect();\n    for (var x = 0; x < readyCallbacks.length; x++) {\n      // fire off all the callbacks that were added before the platform was ready\n      readyCallbacks[x]();\n    }\n    readyCallbacks = [];\n    ionic.trigger('platformready', { target: document });\n\n    requestAnimationFrame(function() {\n      document.body.classList.add('platform-ready');\n    });\n  }\n\n})(window, document, ionic);\n\n(function(document, ionic) {\n  'use strict';\n\n  // Ionic CSS polyfills\n  ionic.CSS = {};\n  ionic.CSS.TRANSITION = [];\n  ionic.CSS.TRANSFORM = [];\n\n  ionic.EVENTS = {};\n\n  (function() {\n\n    // transform\n    var i, keys = ['webkitTransform', 'transform', '-webkit-transform', 'webkit-transform',\n                   '-moz-transform', 'moz-transform', 'MozTransform', 'mozTransform', 'msTransform'];\n\n    for (i = 0; i < keys.length; i++) {\n      if (document.documentElement.style[keys[i]] !== undefined) {\n        ionic.CSS.TRANSFORM = keys[i];\n        break;\n      }\n    }\n\n    // transition\n    keys = ['webkitTransition', 'mozTransition', 'msTransition', 'transition'];\n    for (i = 0; i < keys.length; i++) {\n      if (document.documentElement.style[keys[i]] !== undefined) {\n        ionic.CSS.TRANSITION = keys[i];\n        break;\n      }\n    }\n\n    // Fallback in case the keys don't exist at all\n    ionic.CSS.TRANSITION = ionic.CSS.TRANSITION || 'transition';\n\n    // The only prefix we care about is webkit for transitions.\n    var isWebkit = ionic.CSS.TRANSITION.indexOf('webkit') > -1;\n\n    // transition duration\n    ionic.CSS.TRANSITION_DURATION = (isWebkit ? '-webkit-' : '') + 'transition-duration';\n\n    // To be sure transitionend works everywhere, include *both* the webkit and non-webkit events\n    ionic.CSS.TRANSITIONEND = (isWebkit ? 'webkitTransitionEnd ' : '') + 'transitionend';\n  })();\n\n  (function() {\n      var touchStartEvent = 'touchstart';\n      var touchMoveEvent = 'touchmove';\n      var touchEndEvent = 'touchend';\n      var touchCancelEvent = 'touchcancel';\n\n      if (window.navigator.pointerEnabled) {\n        touchStartEvent = 'pointerdown';\n        touchMoveEvent = 'pointermove';\n        touchEndEvent = 'pointerup';\n        touchCancelEvent = 'pointercancel';\n      } else if (window.navigator.msPointerEnabled) {\n        touchStartEvent = 'MSPointerDown';\n        touchMoveEvent = 'MSPointerMove';\n        touchEndEvent = 'MSPointerUp';\n        touchCancelEvent = 'MSPointerCancel';\n      }\n\n      ionic.EVENTS.touchstart = touchStartEvent;\n      ionic.EVENTS.touchmove = touchMoveEvent;\n      ionic.EVENTS.touchend = touchEndEvent;\n      ionic.EVENTS.touchcancel = touchCancelEvent;\n  })();\n\n  // classList polyfill for them older Androids\n  // https://gist.github.com/devongovett/1381839\n  if (!(\"classList\" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== 'undefined') {\n    Object.defineProperty(HTMLElement.prototype, 'classList', {\n      get: function() {\n        var self = this;\n        function update(fn) {\n          return function() {\n            var x, classes = self.className.split(/\\s+/);\n\n            for (x = 0; x < arguments.length; x++) {\n              fn(classes, classes.indexOf(arguments[x]), arguments[x]);\n            }\n\n            self.className = classes.join(\" \");\n          };\n        }\n\n        return {\n          add: update(function(classes, index, value) {\n            ~index || classes.push(value);\n          }),\n\n          remove: update(function(classes, index) {\n            ~index && classes.splice(index, 1);\n          }),\n\n          toggle: update(function(classes, index, value) {\n            ~index ? classes.splice(index, 1) : classes.push(value);\n          }),\n\n          contains: function(value) {\n            return !!~self.className.split(/\\s+/).indexOf(value);\n          },\n\n          item: function(i) {\n            return self.className.split(/\\s+/)[i] || null;\n          }\n        };\n\n      }\n    });\n  }\n\n})(document, ionic);\n\n\n/**\n * @ngdoc page\n * @name tap\n * @module ionic\n * @description\n * On touch devices such as a phone or tablet, some browsers implement a 300ms delay between\n * the time the user stops touching the display and the moment the browser executes the\n * click. This delay was initially introduced so the browser can know whether the user wants to\n * double-tap to zoom in on the webpage.  Basically, the browser waits roughly 300ms to see if\n * the user is double-tapping, or just tapping on the display once.\n *\n * Out of the box, Ionic automatically removes the 300ms delay in order to make Ionic apps\n * feel more \"native\" like. Resultingly, other solutions such as\n * [fastclick](https://github.com/ftlabs/fastclick) and Angular's\n * [ngTouch](https://docs.angularjs.org/api/ngTouch) should not be included, to avoid conflicts.\n *\n * Some browsers already remove the delay with certain settings, such as the CSS property\n * `touch-events: none` or with specific meta tag viewport values. However, each of these\n * browsers still handle clicks differently, such as when to fire off or cancel the event\n * (like scrolling when the target is a button, or holding a button down).\n * For browsers that already remove the 300ms delay, consider Ionic's tap system as a way to\n * normalize how clicks are handled across the various devices so there's an expected response\n * no matter what the device, platform or version. Additionally, Ionic will prevent\n * ghostclicks which even browsers that remove the delay still experience.\n *\n * In some cases, third-party libraries may also be working with touch events which can interfere\n * with the tap system. For example, mapping libraries like Google or Leaflet Maps often implement\n * a touch detection system which conflicts with Ionic's tap system.\n *\n * ### Disabling the tap system\n *\n * To disable the tap for an element and all of its children elements,\n * add the attribute `data-tap-disabled=\"true\"`.\n *\n * ```html\n * <div data-tap-disabled=\"true\">\n *     <div id=\"google-map\"></div>\n * </div>\n * ```\n *\n * ### Additional Notes:\n *\n * - Ionic tap  works with Ionic's JavaScript scrolling\n * - Elements can come and go from the DOM and Ionic tap doesn't keep adding and removing\n *   listeners\n * - No \"tap delay\" after the first \"tap\" (you can tap as fast as you want, they all click)\n * - Minimal events listeners, only being added to document\n * - Correct focus in/out on each input type (select, textearea, range) on each platform/device\n * - Shows and hides virtual keyboard correctly for each platform/device\n * - Works with labels surrounding inputs\n * - Does not fire off a click if the user moves the pointer too far\n * - Adds and removes an 'activated' css class\n * - Multiple [unit tests](https://github.com/ionic-team/ionic/blob/1.x/test/unit/utils/tap.unit.js) for each scenario\n *\n */\n/*\n\n IONIC TAP\n ---------------\n - Both touch and mouse events are added to the document.body on DOM ready\n - If a touch event happens, it does not use mouse event listeners\n - On touchend, if the distance between start and end was small, trigger a click\n - In the triggered click event, add a 'isIonicTap' property\n - The triggered click receives the same x,y coordinates as as the end event\n - On document.body click listener (with useCapture=true), only allow clicks with 'isIonicTap'\n - Triggering clicks with mouse events work the same as touch, except with mousedown/mouseup\n - Tapping inputs is disabled during scrolling\n*/\n\nvar tapDoc; // the element which the listeners are on (document.body)\nvar tapActiveEle; // the element which is active (probably has focus)\nvar tapEnabledTouchEvents;\nvar tapMouseResetTimer;\nvar tapPointerMoved;\nvar tapPointerStart;\nvar tapTouchFocusedInput;\nvar tapLastTouchTarget;\nvar tapTouchMoveListener = 'touchmove';\n\n// how much the coordinates can be off between start/end, but still a click\nvar TAP_RELEASE_TOLERANCE = 12; // default tolerance\nvar TAP_RELEASE_BUTTON_TOLERANCE = 50; // button elements should have a larger tolerance\n\nvar tapEventListeners = {\n  'click': tapClickGateKeeper,\n\n  'mousedown': tapMouseDown,\n  'mouseup': tapMouseUp,\n  'mousemove': tapMouseMove,\n\n  'touchstart': tapTouchStart,\n  'touchend': tapTouchEnd,\n  'touchcancel': tapTouchCancel,\n  'touchmove': tapTouchMove,\n\n  'pointerdown': tapTouchStart,\n  'pointerup': tapTouchEnd,\n  'pointercancel': tapTouchCancel,\n  'pointermove': tapTouchMove,\n\n  'MSPointerDown': tapTouchStart,\n  'MSPointerUp': tapTouchEnd,\n  'MSPointerCancel': tapTouchCancel,\n  'MSPointerMove': tapTouchMove,\n\n  'focusin': tapFocusIn,\n  'focusout': tapFocusOut\n};\n\nionic.tap = {\n\n  register: function(ele) {\n    tapDoc = ele;\n\n    tapEventListener('click', true, true);\n    tapEventListener('mouseup');\n    tapEventListener('mousedown');\n\n    if (window.navigator.pointerEnabled) {\n      tapEventListener('pointerdown');\n      tapEventListener('pointerup');\n      tapEventListener('pointercancel');\n      tapTouchMoveListener = 'pointermove';\n\n    } else if (window.navigator.msPointerEnabled) {\n      tapEventListener('MSPointerDown');\n      tapEventListener('MSPointerUp');\n      tapEventListener('MSPointerCancel');\n      tapTouchMoveListener = 'MSPointerMove';\n\n    } else {\n      tapEventListener('touchstart');\n      tapEventListener('touchend');\n      tapEventListener('touchcancel');\n    }\n\n    tapEventListener('focusin');\n    tapEventListener('focusout');\n\n    return function() {\n      for (var type in tapEventListeners) {\n        tapEventListener(type, false);\n      }\n      tapDoc = null;\n      tapActiveEle = null;\n      tapEnabledTouchEvents = false;\n      tapPointerMoved = false;\n      tapPointerStart = null;\n    };\n  },\n\n  ignoreScrollStart: function(e) {\n    return (e.defaultPrevented) ||  // defaultPrevented has been assigned by another component handling the event\n           (/^(file|range)$/i).test(e.target.type) ||\n           (e.target.dataset ? e.target.dataset.preventScroll : e.target.getAttribute('data-prevent-scroll')) == 'true' || // manually set within an elements attributes\n           (!!(/^(object|embed)$/i).test(e.target.tagName)) ||  // flash/movie/object touches should not try to scroll\n           ionic.tap.isElementTapDisabled(e.target); // check if this element, or an ancestor, has `data-tap-disabled` attribute\n  },\n\n  isTextInput: function(ele) {\n    return !!ele &&\n           (ele.tagName == 'TEXTAREA' ||\n            ele.contentEditable === 'true' ||\n            (ele.tagName == 'INPUT' && !(/^(radio|checkbox|range|file|submit|reset|color|image|button)$/i).test(ele.type)));\n  },\n\n  isDateInput: function(ele) {\n    return !!ele &&\n            (ele.tagName == 'INPUT' && (/^(date|time|datetime-local|month|week)$/i).test(ele.type));\n  },\n\n  isVideo: function(ele) {\n    return !!ele &&\n            (ele.tagName == 'VIDEO');\n  },\n\n  isKeyboardElement: function(ele) {\n    if ( !ionic.Platform.isIOS() || ionic.Platform.isIPad() ) {\n      return ionic.tap.isTextInput(ele) && !ionic.tap.isDateInput(ele);\n    } else {\n      return ionic.tap.isTextInput(ele) || ( !!ele && ele.tagName == \"SELECT\");\n    }\n  },\n\n  isLabelWithTextInput: function(ele) {\n    var container = tapContainingElement(ele, false);\n\n    return !!container &&\n           ionic.tap.isTextInput(tapTargetElement(container));\n  },\n\n  containsOrIsTextInput: function(ele) {\n    return ionic.tap.isTextInput(ele) || ionic.tap.isLabelWithTextInput(ele);\n  },\n\n  cloneFocusedInput: function(container) {\n    if (ionic.tap.hasCheckedClone) return;\n    ionic.tap.hasCheckedClone = true;\n\n    ionic.requestAnimationFrame(function() {\n      var focusInput = container.querySelector(':focus');\n      if (ionic.tap.isTextInput(focusInput) && !ionic.tap.isDateInput(focusInput)) {\n        var clonedInput = focusInput.cloneNode(true);\n\n        clonedInput.value = focusInput.value;\n        clonedInput.classList.add('cloned-text-input');\n        clonedInput.readOnly = true;\n        if (focusInput.isContentEditable) {\n          clonedInput.contentEditable = focusInput.contentEditable;\n          clonedInput.innerHTML = focusInput.innerHTML;\n        }\n        focusInput.parentElement.insertBefore(clonedInput, focusInput);\n        focusInput.classList.add('previous-input-focus');\n\n        clonedInput.scrollTop = focusInput.scrollTop;\n      }\n    });\n  },\n\n  hasCheckedClone: false,\n\n  removeClonedInputs: function(container) {\n    ionic.tap.hasCheckedClone = false;\n\n    ionic.requestAnimationFrame(function() {\n      var clonedInputs = container.querySelectorAll('.cloned-text-input');\n      var previousInputFocus = container.querySelectorAll('.previous-input-focus');\n      var x;\n\n      for (x = 0; x < clonedInputs.length; x++) {\n        clonedInputs[x].parentElement.removeChild(clonedInputs[x]);\n      }\n\n      for (x = 0; x < previousInputFocus.length; x++) {\n        previousInputFocus[x].classList.remove('previous-input-focus');\n        previousInputFocus[x].style.top = '';\n        if ( ionic.keyboard.isOpen && !ionic.keyboard.isClosing ) previousInputFocus[x].focus();\n      }\n    });\n  },\n\n  requiresNativeClick: function(ele) {\n    if (ionic.Platform.isWindowsPhone() && (ele.tagName == 'A' || ele.tagName == 'BUTTON' || ele.hasAttribute('ng-click') || (ele.tagName == 'INPUT' && (ele.type == 'button' || ele.type == 'submit')))) {\n      return true; //Windows Phone edge case, prevent ng-click (and similar) events from firing twice on this platform\n    }\n    if (!ele || ele.disabled || (/^(file|range)$/i).test(ele.type) || (/^(object|video)$/i).test(ele.tagName) || ionic.tap.isLabelContainingFileInput(ele)) {\n      return true;\n    }\n    return ionic.tap.isElementTapDisabled(ele);\n  },\n\n  isLabelContainingFileInput: function(ele) {\n    var lbl = tapContainingElement(ele);\n    if (lbl.tagName !== 'LABEL') return false;\n    var fileInput = lbl.querySelector('input[type=file]');\n    if (fileInput && fileInput.disabled === false) return true;\n    return false;\n  },\n\n  isElementTapDisabled: function(ele) {\n    if (ele && ele.nodeType === 1) {\n      var element = ele;\n      while (element) {\n        if (element.getAttribute && element.getAttribute('data-tap-disabled') == 'true') {\n          return true;\n        }\n        element = element.parentElement;\n      }\n    }\n    return false;\n  },\n\n  setTolerance: function(releaseTolerance, releaseButtonTolerance) {\n    TAP_RELEASE_TOLERANCE = releaseTolerance;\n    TAP_RELEASE_BUTTON_TOLERANCE = releaseButtonTolerance;\n  },\n\n  cancelClick: function() {\n    // used to cancel any simulated clicks which may happen on a touchend/mouseup\n    // gestures uses this method within its tap and hold events\n    tapPointerMoved = true;\n  },\n\n  pointerCoord: function(event) {\n    // This method can get coordinates for both a mouse click\n    // or a touch depending on the given event\n    var c = { x: 0, y: 0 };\n    if (event) {\n      var touches = event.touches && event.touches.length ? event.touches : [event];\n      var e = (event.changedTouches && event.changedTouches[0]) || touches[0];\n      if (e) {\n        c.x = e.clientX || e.pageX || 0;\n        c.y = e.clientY || e.pageY || 0;\n      }\n    }\n    return c;\n  }\n\n};\n\nfunction tapEventListener(type, enable, useCapture) {\n  if (enable !== false) {\n    tapDoc.addEventListener(type, tapEventListeners[type], useCapture);\n  } else {\n    tapDoc.removeEventListener(type, tapEventListeners[type]);\n  }\n}\n\nfunction tapClick(e) {\n  // simulate a normal click by running the element's click method then focus on it\n  var container = tapContainingElement(e.target);\n  var ele = tapTargetElement(container);\n\n  if (ionic.tap.requiresNativeClick(ele) || tapPointerMoved) return false;\n\n  var c = ionic.tap.pointerCoord(e);\n\n  //console.log('tapClick', e.type, ele.tagName, '('+c.x+','+c.y+')');\n  triggerMouseEvent('click', ele, c.x, c.y);\n\n  // if it's an input, focus in on the target, otherwise blur\n  tapHandleFocus(ele);\n}\n\nfunction triggerMouseEvent(type, ele, x, y) {\n  // using initMouseEvent instead of MouseEvent for our Android friends\n  var clickEvent = document.createEvent(\"MouseEvents\");\n  clickEvent.initMouseEvent(type, true, true, window, 1, 0, 0, x, y, false, false, false, false, 0, null);\n  clickEvent.isIonicTap = true;\n  ele.dispatchEvent(clickEvent);\n}\n\nfunction tapClickGateKeeper(e) {\n  //console.log('click ' + Date.now() + ' isIonicTap: ' + (e.isIonicTap ? true : false));\n  if (e.target.type == 'submit' && e.detail === 0) {\n    // do not prevent click if it came from an \"Enter\" or \"Go\" keypress submit\n    return null;\n  }\n\n  // do not allow through any click events that were not created by ionic.tap\n  if ((ionic.scroll.isScrolling && ionic.tap.containsOrIsTextInput(e.target)) ||\n      (!e.isIonicTap && !ionic.tap.requiresNativeClick(e.target))) {\n    //console.log('clickPrevent', e.target.tagName);\n    e.stopPropagation();\n\n    if (!ionic.tap.isLabelWithTextInput(e.target)) {\n      // labels clicks from native should not preventDefault othersize keyboard will not show on input focus\n      e.preventDefault();\n    }\n    return false;\n  }\n}\n\n// MOUSE\nfunction tapMouseDown(e) {\n  //console.log('mousedown ' + Date.now());\n  if (e.isIonicTap || tapIgnoreEvent(e)) return null;\n\n  if (tapEnabledTouchEvents) {\n    //console.log('mousedown', 'stop event');\n    e.stopPropagation();\n\n    if (!ionic.Platform.isEdge() && (!ionic.tap.isTextInput(e.target) || tapLastTouchTarget !== e.target) &&\n      !isSelectOrOption(e.target.tagName) && !e.target.isContentEditable && !ionic.tap.isVideo(e.target)) {\n      // If you preventDefault on a text input then you cannot move its text caret/cursor.\n      // Allow through only the text input default. However, without preventDefault on an\n      // input the 300ms delay can change focus on inputs after the keyboard shows up.\n      // The focusin event handles the chance of focus changing after the keyboard shows.\n      // Windows Phone - if you preventDefault on a video element then you cannot operate\n      // its native controls.\n      e.preventDefault();\n    }\n\n    return false;\n  }\n\n  tapPointerMoved = false;\n  tapPointerStart = ionic.tap.pointerCoord(e);\n\n  tapEventListener('mousemove');\n  ionic.activator.start(e);\n}\n\nfunction tapMouseUp(e) {\n  //console.log(\"mouseup \" + Date.now());\n  if (tapEnabledTouchEvents) {\n    e.stopPropagation();\n    e.preventDefault();\n    return false;\n  }\n\n  if (tapIgnoreEvent(e) || isSelectOrOption(e.target.tagName)) return false;\n\n  if (!tapHasPointerMoved(e)) {\n    tapClick(e);\n  }\n  tapEventListener('mousemove', false);\n  ionic.activator.end();\n  tapPointerMoved = false;\n}\n\nfunction tapMouseMove(e) {\n  if (tapHasPointerMoved(e)) {\n    tapEventListener('mousemove', false);\n    ionic.activator.end();\n    tapPointerMoved = true;\n    return false;\n  }\n}\n\n\n// TOUCH\nfunction tapTouchStart(e) {\n  //console.log(\"touchstart \" + Date.now());\n  if (tapIgnoreEvent(e)) return;\n\n  tapPointerMoved = false;\n\n  tapEnableTouchEvents();\n  tapPointerStart = ionic.tap.pointerCoord(e);\n\n  tapEventListener(tapTouchMoveListener);\n  ionic.activator.start(e);\n\n  if (ionic.Platform.isIOS() && ionic.tap.isLabelWithTextInput(e.target)) {\n    // if the tapped element is a label, which has a child input\n    // then preventDefault so iOS doesn't ugly auto scroll to the input\n    // but do not prevent default on Android or else you cannot move the text caret\n    // and do not prevent default on Android or else no virtual keyboard shows up\n\n    var textInput = tapTargetElement(tapContainingElement(e.target));\n    if (textInput !== tapActiveEle) {\n      // don't preventDefault on an already focused input or else iOS's text caret isn't usable\n      //console.log('Would prevent default here');\n      e.preventDefault();\n    }\n  }\n}\n\nfunction tapTouchEnd(e) {\n  //console.log('touchend ' + Date.now());\n  if (tapIgnoreEvent(e)) return;\n\n  tapEnableTouchEvents();\n  if (!tapHasPointerMoved(e)) {\n    tapClick(e);\n\n    if (isSelectOrOption(e.target.tagName)) {\n      e.preventDefault();\n    }\n  }\n\n  tapLastTouchTarget = e.target;\n  tapTouchCancel();\n}\n\nfunction tapTouchMove(e) {\n  if (tapHasPointerMoved(e)) {\n    tapPointerMoved = true;\n    tapEventListener(tapTouchMoveListener, false);\n    ionic.activator.end();\n    return false;\n  }\n}\n\nfunction tapTouchCancel() {\n  tapEventListener(tapTouchMoveListener, false);\n  ionic.activator.end();\n  tapPointerMoved = false;\n}\n\nfunction tapEnableTouchEvents() {\n  tapEnabledTouchEvents = true;\n  clearTimeout(tapMouseResetTimer);\n  tapMouseResetTimer = setTimeout(function() {\n    tapEnabledTouchEvents = false;\n  }, 600);\n}\n\nfunction tapIgnoreEvent(e) {\n  if (e.isTapHandled) return true;\n  e.isTapHandled = true;\n\n  if(ionic.tap.isElementTapDisabled(e.target)) {\n    return true;\n  }\n\n  if(e.target.tagName == 'SELECT') {\n    return true;\n  }\n\n  if (ionic.scroll.isScrolling && ionic.tap.containsOrIsTextInput(e.target)) {\n    e.preventDefault();\n    return true;\n  }\n}\n\nfunction tapHandleFocus(ele) {\n  tapTouchFocusedInput = null;\n\n  var triggerFocusIn = false;\n\n  if (ele.tagName == 'SELECT') {\n    // trick to force Android options to show up\n    triggerMouseEvent('mousedown', ele, 0, 0);\n    ele.focus && ele.focus();\n    triggerFocusIn = true;\n\n  } else if (tapActiveElement() === ele) {\n    // already is the active element and has focus\n    triggerFocusIn = true;\n\n  } else if ((/^(input|textarea|ion-label)$/i).test(ele.tagName) || ele.isContentEditable) {\n    triggerFocusIn = true;\n    ele.focus && ele.focus();\n    ele.value = ele.value;\n    if (tapEnabledTouchEvents) {\n      tapTouchFocusedInput = ele;\n    }\n\n  } else {\n    tapFocusOutActive();\n  }\n\n  if (triggerFocusIn) {\n    tapActiveElement(ele);\n    ionic.trigger('ionic.focusin', {\n      target: ele\n    }, true);\n  }\n}\n\nfunction tapFocusOutActive() {\n  var ele = tapActiveElement();\n  if (ele && ((/^(input|textarea|select)$/i).test(ele.tagName) || ele.isContentEditable)) {\n    //console.log('tapFocusOutActive', ele.tagName);\n    ele.blur();\n  }\n  tapActiveElement(null);\n}\n\nfunction tapFocusIn(e) {\n  //console.log('focusin ' + Date.now());\n  // Because a text input doesn't preventDefault (so the caret still works) there's a chance\n  // that its mousedown event 300ms later will change the focus to another element after\n  // the keyboard shows up.\n\n  if (tapEnabledTouchEvents &&\n      ionic.tap.isTextInput(tapActiveElement()) &&\n      ionic.tap.isTextInput(tapTouchFocusedInput) &&\n      tapTouchFocusedInput !== e.target) {\n\n    // 1) The pointer is from touch events\n    // 2) There is an active element which is a text input\n    // 3) A text input was just set to be focused on by a touch event\n    // 4) A new focus has been set, however the target isn't the one the touch event wanted\n    //console.log('focusin', 'tapTouchFocusedInput');\n    tapTouchFocusedInput.focus();\n    tapTouchFocusedInput = null;\n  }\n  ionic.scroll.isScrolling = false;\n}\n\nfunction tapFocusOut() {\n  //console.log(\"focusout\");\n  tapActiveElement(null);\n}\n\nfunction tapActiveElement(ele) {\n  if (arguments.length) {\n    tapActiveEle = ele;\n  }\n  return tapActiveEle || document.activeElement;\n}\n\nfunction tapHasPointerMoved(endEvent) {\n  if (!endEvent || endEvent.target.nodeType !== 1 || !tapPointerStart || (tapPointerStart.x === 0 && tapPointerStart.y === 0)) {\n    return false;\n  }\n  var endCoordinates = ionic.tap.pointerCoord(endEvent);\n\n  var hasClassList = !!(endEvent.target.classList && endEvent.target.classList.contains &&\n    typeof endEvent.target.classList.contains === 'function');\n  var releaseTolerance = hasClassList && endEvent.target.classList.contains('button') ?\n    TAP_RELEASE_BUTTON_TOLERANCE :\n    TAP_RELEASE_TOLERANCE;\n\n  return Math.abs(tapPointerStart.x - endCoordinates.x) > releaseTolerance ||\n         Math.abs(tapPointerStart.y - endCoordinates.y) > releaseTolerance;\n}\n\nfunction tapContainingElement(ele, allowSelf) {\n  var climbEle = ele;\n  for (var x = 0; x < 6; x++) {\n    if (!climbEle) break;\n    if (climbEle.tagName === 'LABEL') return climbEle;\n    climbEle = climbEle.parentElement;\n  }\n  if (allowSelf !== false) return ele;\n}\n\nfunction tapTargetElement(ele) {\n  if (ele && ele.tagName === 'LABEL') {\n    if (ele.control) return ele.control;\n\n    // older devices do not support the \"control\" property\n    if (ele.querySelector) {\n      var control = ele.querySelector('input,textarea,select');\n      if (control) return control;\n    }\n  }\n  return ele;\n}\n\nfunction isSelectOrOption(tagName){\n  return (/^(select|option)$/i).test(tagName);\n}\n\nionic.DomUtil.ready(function() {\n  var ng = typeof angular !== 'undefined' ? angular : null;\n  //do nothing for e2e tests\n  if (!ng || (ng && !ng.scenario)) {\n    ionic.tap.register(document);\n  }\n});\n\n(function(document, ionic) {\n  'use strict';\n\n  var queueElements = {};   // elements that should get an active state in XX milliseconds\n  var activeElements = {};  // elements that are currently active\n  var keyId = 0;            // a counter for unique keys for the above ojects\n  var ACTIVATED_CLASS = 'activated';\n\n  ionic.activator = {\n\n    start: function(e) {\n      var hitX = ionic.tap.pointerCoord(e).x;\n      if (hitX > 0 && hitX < 30) {\n        return;\n      }\n\n      // when an element is touched/clicked, it climbs up a few\n      // parents to see if it is an .item or .button element\n      ionic.requestAnimationFrame(function() {\n        if ((ionic.scroll && ionic.scroll.isScrolling) || ionic.tap.requiresNativeClick(e.target)) return;\n        var ele = e.target;\n        var eleToActivate;\n\n        for (var x = 0; x < 6; x++) {\n          if (!ele || ele.nodeType !== 1) break;\n          if (eleToActivate && ele.classList && ele.classList.contains('item')) {\n            eleToActivate = ele;\n            break;\n          }\n          if (ele.tagName == 'A' || ele.tagName == 'BUTTON' || ele.hasAttribute('ng-click')) {\n            eleToActivate = ele;\n            break;\n          }\n          if (ele.classList && ele.classList.contains('button')) {\n            eleToActivate = ele;\n            break;\n          }\n          // no sense climbing past these\n          if (ele.tagName == 'ION-CONTENT' || (ele.classList && ele.classList.contains('pane')) || ele.tagName == 'BODY') {\n            break;\n          }\n          ele = ele.parentElement;\n        }\n\n        if (eleToActivate) {\n          // queue that this element should be set to active\n          queueElements[keyId] = eleToActivate;\n\n          // on the next frame, set the queued elements to active\n          ionic.requestAnimationFrame(activateElements);\n\n          keyId = (keyId > 29 ? 0 : keyId + 1);\n        }\n\n      });\n    },\n\n    end: function() {\n      // clear out any active/queued elements after XX milliseconds\n      setTimeout(clear, 200);\n    }\n\n  };\n\n  function clear() {\n    // clear out any elements that are queued to be set to active\n    queueElements = {};\n\n    // in the next frame, remove the active class from all active elements\n    ionic.requestAnimationFrame(deactivateElements);\n  }\n\n  function activateElements() {\n    // activate all elements in the queue\n    for (var key in queueElements) {\n      if (queueElements[key]) {\n        queueElements[key].classList.add(ACTIVATED_CLASS);\n        activeElements[key] = queueElements[key];\n      }\n    }\n    queueElements = {};\n  }\n\n  function deactivateElements() {\n    if (ionic.transition && ionic.transition.isActive) {\n      setTimeout(deactivateElements, 400);\n      return;\n    }\n\n    for (var key in activeElements) {\n      if (activeElements[key]) {\n        activeElements[key].classList.remove(ACTIVATED_CLASS);\n        delete activeElements[key];\n      }\n    }\n  }\n\n})(document, ionic);\n\n(function(ionic) {\n  /* for nextUid function below */\n  var nextId = 0;\n\n  /**\n   * Various utilities used throughout Ionic\n   *\n   * Some of these are adopted from underscore.js and backbone.js, both also MIT licensed.\n   */\n  ionic.Utils = {\n\n    arrayMove: function(arr, oldIndex, newIndex) {\n      if (newIndex >= arr.length) {\n        var k = newIndex - arr.length;\n        while ((k--) + 1) {\n          arr.push(undefined);\n        }\n      }\n      arr.splice(newIndex, 0, arr.splice(oldIndex, 1)[0]);\n      return arr;\n    },\n\n    /**\n     * Return a function that will be called with the given context\n     */\n    proxy: function(func, context) {\n      var args = Array.prototype.slice.call(arguments, 2);\n      return function() {\n        return func.apply(context, args.concat(Array.prototype.slice.call(arguments)));\n      };\n    },\n\n    /**\n     * Only call a function once in the given interval.\n     *\n     * @param func {Function} the function to call\n     * @param wait {int} how long to wait before/after to allow function calls\n     * @param immediate {boolean} whether to call immediately or after the wait interval\n     */\n     debounce: function(func, wait, immediate) {\n      var timeout, args, context, timestamp, result;\n      return function() {\n        context = this;\n        args = arguments;\n        timestamp = new Date();\n        var later = function() {\n          var last = (new Date()) - timestamp;\n          if (last < wait) {\n            timeout = setTimeout(later, wait - last);\n          } else {\n            timeout = null;\n            if (!immediate) result = func.apply(context, args);\n          }\n        };\n        var callNow = immediate && !timeout;\n        if (!timeout) {\n          timeout = setTimeout(later, wait);\n        }\n        if (callNow) result = func.apply(context, args);\n        return result;\n      };\n    },\n\n    /**\n     * Throttle the given fun, only allowing it to be\n     * called at most every `wait` ms.\n     */\n    throttle: function(func, wait, options) {\n      var context, args, result;\n      var timeout = null;\n      var previous = 0;\n      options || (options = {});\n      var later = function() {\n        previous = options.leading === false ? 0 : Date.now();\n        timeout = null;\n        result = func.apply(context, args);\n      };\n      return function() {\n        var now = Date.now();\n        if (!previous && options.leading === false) previous = now;\n        var remaining = wait - (now - previous);\n        context = this;\n        args = arguments;\n        if (remaining <= 0) {\n          clearTimeout(timeout);\n          timeout = null;\n          previous = now;\n          result = func.apply(context, args);\n        } else if (!timeout && options.trailing !== false) {\n          timeout = setTimeout(later, remaining);\n        }\n        return result;\n      };\n    },\n     // Borrowed from Backbone.js's extend\n     // Helper function to correctly set up the prototype chain, for subclasses.\n     // Similar to `goog.inherits`, but uses a hash of prototype properties and\n     // class properties to be extended.\n    inherit: function(protoProps, staticProps) {\n      var parent = this;\n      var child;\n\n      // The constructor function for the new subclass is either defined by you\n      // (the \"constructor\" property in your `extend` definition), or defaulted\n      // by us to simply call the parent's constructor.\n      if (protoProps && protoProps.hasOwnProperty('constructor')) {\n        child = protoProps.constructor;\n      } else {\n        child = function() { return parent.apply(this, arguments); };\n      }\n\n      // Add static properties to the constructor function, if supplied.\n      ionic.extend(child, parent, staticProps);\n\n      // Set the prototype chain to inherit from `parent`, without calling\n      // `parent`'s constructor function.\n      var Surrogate = function() { this.constructor = child; };\n      Surrogate.prototype = parent.prototype;\n      child.prototype = new Surrogate();\n\n      // Add prototype properties (instance properties) to the subclass,\n      // if supplied.\n      if (protoProps) ionic.extend(child.prototype, protoProps);\n\n      // Set a convenience property in case the parent's prototype is needed\n      // later.\n      child.__super__ = parent.prototype;\n\n      return child;\n    },\n\n    // Extend adapted from Underscore.js\n    extend: function(obj) {\n       var args = Array.prototype.slice.call(arguments, 1);\n       for (var i = 0; i < args.length; i++) {\n         var source = args[i];\n         if (source) {\n           for (var prop in source) {\n             obj[prop] = source[prop];\n           }\n         }\n       }\n       return obj;\n    },\n\n    nextUid: function() {\n      return 'ion' + (nextId++);\n    },\n\n    disconnectScope: function disconnectScope(scope) {\n      if (!scope) return;\n\n      if (scope.$root === scope) {\n        return; // we can't disconnect the root node;\n      }\n      var parent = scope.$parent;\n      scope.$$disconnected = true;\n      scope.$broadcast('$ionic.disconnectScope', scope);\n\n      // See Scope.$destroy\n      if (parent.$$childHead === scope) {\n        parent.$$childHead = scope.$$nextSibling;\n      }\n      if (parent.$$childTail === scope) {\n        parent.$$childTail = scope.$$prevSibling;\n      }\n      if (scope.$$prevSibling) {\n        scope.$$prevSibling.$$nextSibling = scope.$$nextSibling;\n      }\n      if (scope.$$nextSibling) {\n        scope.$$nextSibling.$$prevSibling = scope.$$prevSibling;\n      }\n      scope.$$nextSibling = scope.$$prevSibling = null;\n    },\n\n    reconnectScope: function reconnectScope(scope) {\n      if (!scope) return;\n\n      if (scope.$root === scope) {\n        return; // we can't disconnect the root node;\n      }\n      if (!scope.$$disconnected) {\n        return;\n      }\n      var parent = scope.$parent;\n      scope.$$disconnected = false;\n      scope.$broadcast('$ionic.reconnectScope', scope);\n      // See Scope.$new for this logic...\n      scope.$$prevSibling = parent.$$childTail;\n      if (parent.$$childHead) {\n        parent.$$childTail.$$nextSibling = scope;\n        parent.$$childTail = scope;\n      } else {\n        parent.$$childHead = parent.$$childTail = scope;\n      }\n    },\n\n    isScopeDisconnected: function(scope) {\n      var climbScope = scope;\n      while (climbScope) {\n        if (climbScope.$$disconnected) return true;\n        climbScope = climbScope.$parent;\n      }\n      return false;\n    }\n  };\n\n  // Bind a few of the most useful functions to the ionic scope\n  ionic.inherit = ionic.Utils.inherit;\n  ionic.extend = ionic.Utils.extend;\n  ionic.throttle = ionic.Utils.throttle;\n  ionic.proxy = ionic.Utils.proxy;\n  ionic.debounce = ionic.Utils.debounce;\n\n})(window.ionic);\n\n/**\n * @ngdoc page\n * @name keyboard\n * @module ionic\n * @description\n * On both Android and iOS, Ionic will attempt to prevent the keyboard from\n * obscuring inputs and focusable elements when it appears by scrolling them\n * into view.  In order for this to work, any focusable elements must be within\n * a [Scroll View](http://ionicframework.com/docs/api/directive/ionScroll/)\n * or a directive such as [Content](http://ionicframework.com/docs/api/directive/ionContent/)\n * that has a Scroll View.\n *\n * It will also attempt to prevent the native overflow scrolling on focus,\n * which can cause layout issues such as pushing headers up and out of view.\n *\n * The keyboard fixes work best in conjunction with the\n * [Ionic Keyboard Plugin](https://github.com/ionic-team/ionic-plugins-keyboard),\n * although it will perform reasonably well without.  However, if you are using\n * Cordova there is no reason not to use the plugin.\n *\n * ### Hide when keyboard shows\n *\n * To hide an element when the keyboard is open, add the class `hide-on-keyboard-open`.\n *\n * ```html\n * <div class=\"hide-on-keyboard-open\">\n *   <div id=\"google-map\"></div>\n * </div>\n * ```\n *\n * Note: For performance reasons, elements will not be hidden for 400ms after the start of the `native.keyboardshow` event\n * from the Ionic Keyboard plugin. If you would like them to disappear immediately, you could do something\n * like:\n *\n * ```js\n *   window.addEventListener('native.keyboardshow', function(){\n *     document.body.classList.add('keyboard-open');\n *   });\n * ```\n * This adds the same `keyboard-open` class that is normally added by Ionic 400ms after the keyboard\n * opens. However, bear in mind that adding this class to the body immediately may cause jank in any\n * animations on Android that occur when the keyboard opens (for example, scrolling any obscured inputs into view).\n *\n * ----------\n *\n * ### Plugin Usage\n * Information on using the plugin can be found at\n * [https://github.com/ionic-team/ionic-plugins-keyboard](https://github.com/ionic-team/ionic-plugins-keyboard).\n *\n * ----------\n *\n * ### Android Notes\n * - If your app is running in fullscreen, i.e. you have\n *   `<preference name=\"Fullscreen\" value=\"true\" />` in your `config.xml` file\n *   you will need to set `ionic.Platform.isFullScreen = true` manually.\n *\n * - You can configure the behavior of the web view when the keyboard shows by setting\n *   [android:windowSoftInputMode](http://developer.android.com/reference/android/R.attr.html#windowSoftInputMode)\n *   to either `adjustPan`, `adjustResize` or `adjustNothing` in your app's\n *   activity in `AndroidManifest.xml`. `adjustResize` is the recommended setting\n *   for Ionic, but if for some reason you do use `adjustPan` you will need to\n *   set `ionic.Platform.isFullScreen = true`.\n *\n *   ```xml\n *   <activity android:windowSoftInputMode=\"adjustResize\">\n *\n *   ```\n *\n * ### iOS Notes\n * - If the content of your app (including the header) is being pushed up and\n *   out of view on input focus, try setting `cordova.plugins.Keyboard.disableScroll(true)`.\n *   This does **not** disable scrolling in the Ionic scroll view, rather it\n *   disables the native overflow scrolling that happens automatically as a\n *   result of focusing on inputs below the keyboard.\n *\n */\n\n/**\n * The current viewport height.\n */\nvar keyboardCurrentViewportHeight = 0;\n\n/**\n * The viewport height when in portrait orientation.\n */\nvar keyboardPortraitViewportHeight = 0;\n\n/**\n * The viewport height when in landscape orientation.\n */\nvar keyboardLandscapeViewportHeight = 0;\n\n/**\n * The currently focused input.\n */\nvar keyboardActiveElement;\n\n/**\n * The previously focused input used to reset keyboard after focusing on a\n * new non-keyboard element\n */\nvar lastKeyboardActiveElement;\n\n/**\n * The scroll view containing the currently focused input.\n */\nvar scrollView;\n\n/**\n * Timer for the setInterval that polls window.innerHeight to determine whether\n * the layout has updated for the keyboard showing/hiding.\n */\nvar waitForResizeTimer;\n\n/**\n * Sometimes when switching inputs or orientations, focusout will fire before\n * focusin, so this timer is for the small setTimeout to determine if we should\n * really focusout/hide the keyboard.\n */\nvar keyboardFocusOutTimer;\n\n/**\n * on Android, orientationchange will fire before the keyboard plugin notifies\n * the browser that the keyboard will show/is showing, so this flag indicates\n * to nativeShow that there was an orientationChange and we should update\n * the viewport height with an accurate keyboard height value\n */\nvar wasOrientationChange = false;\n\n/**\n * CSS class added to the body indicating the keyboard is open.\n */\nvar KEYBOARD_OPEN_CSS = 'keyboard-open';\n\n/**\n * CSS class that indicates a scroll container.\n */\nvar SCROLL_CONTAINER_CSS = 'scroll-content';\n\n/**\n * Debounced keyboardFocusIn function\n */\nvar debouncedKeyboardFocusIn = ionic.debounce(keyboardFocusIn, 200, true);\n\n/**\n * Debounced keyboardNativeShow function\n */\nvar debouncedKeyboardNativeShow = ionic.debounce(keyboardNativeShow, 100, true);\n\n/**\n * Ionic keyboard namespace.\n * @namespace keyboard\n */\nionic.keyboard = {\n\n  /**\n   * Whether the keyboard is open or not.\n   */\n  isOpen: false,\n\n  /**\n   * Whether the keyboard is closing or not.\n   */\n  isClosing: false,\n\n  /**\n   * Whether the keyboard is opening or not.\n   */\n  isOpening: false,\n\n  /**\n   * The height of the keyboard in pixels, as reported by the keyboard plugin.\n   * If the plugin is not available, calculated as the difference in\n   * window.innerHeight after the keyboard has shown.\n   */\n  height: 0,\n\n  /**\n   * Whether the device is in landscape orientation or not.\n   */\n  isLandscape: false,\n\n  /**\n   * Whether the keyboard event listeners have been added or not\n   */\n  isInitialized: false,\n\n  /**\n   * Hide the keyboard, if it is open.\n   */\n  hide: function() {\n    if (keyboardHasPlugin()) {\n      cordova.plugins.Keyboard.close();\n    }\n    keyboardActiveElement && keyboardActiveElement.blur();\n  },\n\n  /**\n   * An alias for cordova.plugins.Keyboard.show(). If the keyboard plugin\n   * is installed, show the keyboard.\n   */\n  show: function() {\n    if (keyboardHasPlugin()) {\n      cordova.plugins.Keyboard.show();\n    }\n  },\n\n  /**\n   * Remove all keyboard related event listeners, effectively disabling Ionic's\n   * keyboard adjustments.\n   */\n  disable: function() {\n    if (keyboardHasPlugin()) {\n      window.removeEventListener('native.keyboardshow', debouncedKeyboardNativeShow );\n      window.removeEventListener('native.keyboardhide', keyboardFocusOut);\n    } else {\n      document.body.removeEventListener('focusout', keyboardFocusOut);\n    }\n\n    document.body.removeEventListener('ionic.focusin', debouncedKeyboardFocusIn);\n    document.body.removeEventListener('focusin', debouncedKeyboardFocusIn);\n\n    window.removeEventListener('orientationchange', keyboardOrientationChange);\n\n    if ( window.navigator.msPointerEnabled ) {\n      document.removeEventListener(\"MSPointerDown\", keyboardInit);\n    } else {\n      document.removeEventListener('touchstart', keyboardInit);\n    }\n    ionic.keyboard.isInitialized = false;\n  },\n\n  /**\n   * Alias for keyboardInit, initialize all keyboard related event listeners.\n   */\n  enable: function() {\n    keyboardInit();\n  }\n};\n\n// Initialize the viewport height (after ionic.keyboard.height has been\n// defined).\nkeyboardCurrentViewportHeight = getViewportHeight();\n\n\n                             /* Event handlers */\n/* ------------------------------------------------------------------------- */\n\n/**\n * Event handler for first touch event, initializes all event listeners\n * for keyboard related events. Also aliased by ionic.keyboard.enable.\n */\nfunction keyboardInit() {\n\n  if (ionic.keyboard.isInitialized) return;\n\n  if (keyboardHasPlugin()) {\n    window.addEventListener('native.keyboardshow', debouncedKeyboardNativeShow);\n    window.addEventListener('native.keyboardhide', keyboardFocusOut);\n  } else {\n    document.body.addEventListener('focusout', keyboardFocusOut);\n  }\n\n  document.body.addEventListener('ionic.focusin', debouncedKeyboardFocusIn);\n  document.body.addEventListener('focusin', debouncedKeyboardFocusIn);\n\n  if (window.navigator.msPointerEnabled) {\n    document.removeEventListener(\"MSPointerDown\", keyboardInit);\n  } else {\n    document.removeEventListener('touchstart', keyboardInit);\n  }\n\n  ionic.keyboard.isInitialized = true;\n}\n\n/**\n * Event handler for 'native.keyboardshow' event, sets keyboard.height to the\n * reported height and keyboard.isOpening to true. Then calls\n * keyboardWaitForResize with keyboardShow or keyboardUpdateViewportHeight as\n * the callback depending on whether the event was triggered by a focusin or\n * an orientationchange.\n */\nfunction keyboardNativeShow(e) {\n  clearTimeout(keyboardFocusOutTimer);\n  //console.log(\"keyboardNativeShow fired at: \" + Date.now());\n  //console.log(\"keyboardNativeshow window.innerHeight: \" + window.innerHeight);\n\n  if (!ionic.keyboard.isOpen || ionic.keyboard.isClosing) {\n    ionic.keyboard.isOpening = true;\n    ionic.keyboard.isClosing = false;\n  }\n\n  ionic.keyboard.height = e.keyboardHeight;\n  //console.log('nativeshow keyboard height:' + e.keyboardHeight);\n\n  if (wasOrientationChange) {\n    keyboardWaitForResize(keyboardUpdateViewportHeight, true);\n  } else {\n    keyboardWaitForResize(keyboardShow, true);\n  }\n}\n\n/**\n * Event handler for 'focusin' and 'ionic.focusin' events. Initializes\n * keyboard state (keyboardActiveElement and keyboard.isOpening) for the\n * appropriate adjustments once the window has resized.  If not using the\n * keyboard plugin, calls keyboardWaitForResize with keyboardShow as the\n * callback or keyboardShow right away if the keyboard is already open.  If\n * using the keyboard plugin does nothing and lets keyboardNativeShow handle\n * adjustments with a more accurate keyboard height.\n */\nfunction keyboardFocusIn(e) {\n  clearTimeout(keyboardFocusOutTimer);\n  //console.log(\"keyboardFocusIn from: \" + e.type + \" at: \" + Date.now());\n\n  if (!e.target ||\n      e.target.readOnly ||\n      !ionic.tap.isKeyboardElement(e.target) ||\n      !(scrollView = ionic.DomUtil.getParentWithClass(e.target, SCROLL_CONTAINER_CSS))) {\n    if (keyboardActiveElement) {\n        lastKeyboardActiveElement = keyboardActiveElement;\n    }\n    keyboardActiveElement = null;\n    return;\n  }\n\n  keyboardActiveElement = e.target;\n\n  // if using JS scrolling, undo the effects of native overflow scroll so the\n  // scroll view is positioned correctly\n  if (!scrollView.classList.contains(\"overflow-scroll\")) {\n    document.body.scrollTop = 0;\n    scrollView.scrollTop = 0;\n    ionic.requestAnimationFrame(function(){\n      document.body.scrollTop = 0;\n      scrollView.scrollTop = 0;\n    });\n\n    // any showing part of the document that isn't within the scroll the user\n    // could touchmove and cause some ugly changes to the app, so disable\n    // any touchmove events while the keyboard is open using e.preventDefault()\n    if (window.navigator.msPointerEnabled) {\n      document.addEventListener(\"MSPointerMove\", keyboardPreventDefault, false);\n    } else {\n      document.addEventListener('touchmove', keyboardPreventDefault, false);\n    }\n  }\n\n  if (!ionic.keyboard.isOpen || ionic.keyboard.isClosing) {\n    ionic.keyboard.isOpening = true;\n    ionic.keyboard.isClosing = false;\n  }\n\n  // attempt to prevent browser from natively scrolling input into view while\n  // we are trying to do the same (while we are scrolling) if the user taps the\n  // keyboard\n  document.addEventListener('keydown', keyboardOnKeyDown, false);\n\n\n\n  // if we aren't using the plugin and the keyboard isn't open yet, wait for the\n  // window to resize so we can get an accurate estimate of the keyboard size,\n  // otherwise we do nothing and let nativeShow call keyboardShow once we have\n  // an exact keyboard height\n  // if the keyboard is already open, go ahead and scroll the input into view\n  // if necessary\n  if (!ionic.keyboard.isOpen && !keyboardHasPlugin()) {\n    keyboardWaitForResize(keyboardShow, true);\n\n  } else if (ionic.keyboard.isOpen) {\n    keyboardShow();\n  }\n}\n\n/**\n * Event handler for 'focusout' events. Sets keyboard.isClosing to true and\n * calls keyboardWaitForResize with keyboardHide as the callback after a small\n * timeout.\n */\nfunction keyboardFocusOut() {\n  clearTimeout(keyboardFocusOutTimer);\n  //console.log(\"keyboardFocusOut fired at: \" + Date.now());\n  //console.log(\"keyboardFocusOut event type: \" + e.type);\n\n  if (ionic.keyboard.isOpen || ionic.keyboard.isOpening) {\n    ionic.keyboard.isClosing = true;\n    ionic.keyboard.isOpening = false;\n  }\n\n  // Call keyboardHide with a slight delay because sometimes on focus or\n  // orientation change focusin is called immediately after, so we give it time\n  // to cancel keyboardHide\n  keyboardFocusOutTimer = setTimeout(function() {\n    ionic.requestAnimationFrame(function() {\n      // focusOut during or right after an orientationchange, so we didn't get\n      // a chance to update the viewport height yet, do it and keyboardHide\n      //console.log(\"focusOut, wasOrientationChange: \" + wasOrientationChange);\n      if (wasOrientationChange) {\n        keyboardWaitForResize(function(){\n          keyboardUpdateViewportHeight();\n          keyboardHide();\n        }, false);\n      } else {\n        keyboardWaitForResize(keyboardHide, false);\n      }\n    });\n  }, 50);\n}\n\n/**\n * Event handler for 'orientationchange' events. If using the keyboard plugin\n * and the keyboard is open on Android, sets wasOrientationChange to true so\n * nativeShow can update the viewport height with an accurate keyboard height.\n * If the keyboard isn't open or keyboard plugin isn't being used,\n * waits for the window to resize before updating the viewport height.\n *\n * On iOS, where orientationchange fires after the keyboard has already shown,\n * updates the viewport immediately, regardless of if the keyboard is already\n * open.\n */\nfunction keyboardOrientationChange() {\n  //console.log(\"orientationchange fired at: \" + Date.now());\n  //console.log(\"orientation was: \" + (ionic.keyboard.isLandscape ? \"landscape\" : \"portrait\"));\n\n  // toggle orientation\n  ionic.keyboard.isLandscape = !ionic.keyboard.isLandscape;\n  // //console.log(\"now orientation is: \" + (ionic.keyboard.isLandscape ? \"landscape\" : \"portrait\"));\n\n  // no need to wait for resizing on iOS, and orientationchange always fires\n  // after the keyboard has opened, so it doesn't matter if it's open or not\n  if (ionic.Platform.isIOS()) {\n    keyboardUpdateViewportHeight();\n  }\n\n  // On Android, if the keyboard isn't open or we aren't using the keyboard\n  // plugin, update the viewport height once everything has resized. If the\n  // keyboard is open and we are using the keyboard plugin do nothing and let\n  // nativeShow handle it using an accurate keyboard height.\n  if ( ionic.Platform.isAndroid()) {\n    if (!ionic.keyboard.isOpen || !keyboardHasPlugin()) {\n      keyboardWaitForResize(keyboardUpdateViewportHeight, false);\n    } else {\n      wasOrientationChange = true;\n    }\n  }\n}\n\n/**\n * Event handler for 'keydown' event. Tries to prevent browser from natively\n * scrolling an input into view when a user taps the keyboard while we are\n * scrolling the input into view ourselves with JS.\n */\nfunction keyboardOnKeyDown(e) {\n  if (ionic.scroll.isScrolling) {\n    keyboardPreventDefault(e);\n  }\n}\n\n/**\n * Event for 'touchmove' or 'MSPointerMove'. Prevents native scrolling on\n * elements outside the scroll view while the keyboard is open.\n */\nfunction keyboardPreventDefault(e) {\n  if (e.target.tagName !== 'TEXTAREA') {\n    e.preventDefault();\n  }\n}\n\n                              /* Private API */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Polls window.innerHeight until it has updated to an expected value (or\n * sufficient time has passed) before calling the specified callback function.\n * Only necessary for non-fullscreen Android which sometimes reports multiple\n * window.innerHeight values during interim layouts while it is resizing.\n *\n * On iOS, the window.innerHeight will already be updated, but we use the 50ms\n * delay as essentially a timeout so that scroll view adjustments happen after\n * the keyboard has shown so there isn't a white flash from us resizing too\n * quickly.\n *\n * @param {Function} callback the function to call once the window has resized\n * @param {boolean} isOpening whether the resize is from the keyboard opening\n * or not\n */\nfunction keyboardWaitForResize(callback, isOpening) {\n  clearInterval(waitForResizeTimer);\n  var count = 0;\n  var maxCount;\n  var initialHeight = getViewportHeight();\n  var viewportHeight = initialHeight;\n\n  //console.log(\"waitForResize initial viewport height: \" + viewportHeight);\n  //var start = Date.now();\n  //console.log(\"start: \" + start);\n\n  // want to fail relatively quickly on modern android devices, since it's much\n  // more likely we just have a bad keyboard height\n  if (ionic.Platform.isAndroid() && ionic.Platform.version() < 4.4) {\n    maxCount = 30;\n  } else if (ionic.Platform.isAndroid()) {\n    maxCount = 10;\n  } else {\n    maxCount = 1;\n  }\n\n  // poll timer\n  waitForResizeTimer = setInterval(function(){\n    viewportHeight = getViewportHeight();\n\n    // height hasn't updated yet, try again in 50ms\n    // if not using plugin, wait for maxCount to ensure we have waited long enough\n    // to get an accurate keyboard height\n    if (++count < maxCount &&\n        ((!isPortraitViewportHeight(viewportHeight) &&\n         !isLandscapeViewportHeight(viewportHeight)) ||\n         !ionic.keyboard.height)) {\n      return;\n    }\n\n    // infer the keyboard height from the resize if not using the keyboard plugin\n    if (!keyboardHasPlugin()) {\n      ionic.keyboard.height = Math.abs(initialHeight - window.innerHeight);\n    }\n\n    // set to true if we were waiting for the keyboard to open\n    ionic.keyboard.isOpen = isOpening;\n\n    clearInterval(waitForResizeTimer);\n    //var end = Date.now();\n    //console.log(\"waitForResize count: \" + count);\n    //console.log(\"end: \" + end);\n    //console.log(\"difference: \" + ( end - start ) + \"ms\");\n\n    //console.log(\"callback: \" + callback.name);\n    callback();\n\n  }, 50);\n\n  return maxCount; //for tests\n}\n\n/**\n * On keyboard close sets keyboard state to closed, resets the scroll view,\n * removes CSS from body indicating keyboard was open, removes any event\n * listeners for when the keyboard is open and on Android blurs the active\n * element (which in some cases will still have focus even if the keyboard\n * is closed and can cause it to reappear on subsequent taps).\n */\nfunction keyboardHide() {\n  clearTimeout(keyboardFocusOutTimer);\n  //console.log(\"keyboardHide\");\n\n  ionic.keyboard.isOpen = false;\n  ionic.keyboard.isClosing = false;\n\n  if (keyboardActiveElement || lastKeyboardActiveElement) {\n    ionic.trigger('resetScrollView', {\n      target: keyboardActiveElement || lastKeyboardActiveElement\n    }, true);\n  }\n\n  ionic.requestAnimationFrame(function(){\n    document.body.classList.remove(KEYBOARD_OPEN_CSS);\n  });\n\n  // the keyboard is gone now, remove the touchmove that disables native scroll\n  if (window.navigator.msPointerEnabled) {\n    document.removeEventListener(\"MSPointerMove\", keyboardPreventDefault);\n  } else {\n    document.removeEventListener('touchmove', keyboardPreventDefault);\n  }\n  document.removeEventListener('keydown', keyboardOnKeyDown);\n\n  if (ionic.Platform.isAndroid()) {\n    // on android closing the keyboard with the back/dismiss button won't remove\n    // focus and keyboard can re-appear on subsequent taps (like scrolling)\n    if (keyboardHasPlugin()) cordova.plugins.Keyboard.close();\n    keyboardActiveElement && keyboardActiveElement.blur();\n  }\n\n  keyboardActiveElement = null;\n  lastKeyboardActiveElement = null;\n}\n\n/**\n * On keyboard open sets keyboard state to open, adds CSS to the body\n * indicating the keyboard is open and tells the scroll view to resize and\n * the currently focused input into view if necessary.\n */\nfunction keyboardShow() {\n\n  ionic.keyboard.isOpen = true;\n  ionic.keyboard.isOpening = false;\n\n  var details = {\n    keyboardHeight: keyboardGetHeight(),\n    viewportHeight: keyboardCurrentViewportHeight\n  };\n\n  if (keyboardActiveElement) {\n    details.target = keyboardActiveElement;\n\n    var elementBounds = keyboardActiveElement.getBoundingClientRect();\n\n    details.elementTop = Math.round(elementBounds.top);\n    details.elementBottom = Math.round(elementBounds.bottom);\n\n    details.windowHeight = details.viewportHeight - details.keyboardHeight;\n    //console.log(\"keyboardShow viewportHeight: \" + details.viewportHeight +\n    //\", windowHeight: \" + details.windowHeight +\n    //\", keyboardHeight: \" + details.keyboardHeight);\n\n    // figure out if the element is under the keyboard\n    details.isElementUnderKeyboard = (details.elementBottom > details.windowHeight);\n    //console.log(\"isUnderKeyboard: \" + details.isElementUnderKeyboard);\n    //console.log(\"elementBottom: \" + details.elementBottom);\n\n    // send event so the scroll view adjusts\n    ionic.trigger('scrollChildIntoView', details, true);\n  }\n\n  setTimeout(function(){\n    document.body.classList.add(KEYBOARD_OPEN_CSS);\n  }, 400);\n\n  return details; //for testing\n}\n\n/* eslint no-unused-vars:0 */\nfunction keyboardGetHeight() {\n  // check if we already have a keyboard height from the plugin or resize calculations\n  if (ionic.keyboard.height) {\n    return ionic.keyboard.height;\n  }\n\n  if (ionic.Platform.isAndroid()) {\n    // should be using the plugin, no way to know how big the keyboard is, so guess\n    if ( ionic.Platform.isFullScreen ) {\n      return 275;\n    }\n    // otherwise just calculate it\n    var contentHeight = window.innerHeight;\n    if (contentHeight < keyboardCurrentViewportHeight) {\n      return keyboardCurrentViewportHeight - contentHeight;\n    } else {\n      return 0;\n    }\n  }\n\n  // fallback for when it's the webview without the plugin\n  // or for just the standard web browser\n  // TODO: have these be based on device\n  if (ionic.Platform.isIOS()) {\n    if (ionic.keyboard.isLandscape) {\n      return 206;\n    }\n\n    if (!ionic.Platform.isWebView()) {\n      return 216;\n    }\n\n    return 260;\n  }\n\n  // safe guess\n  return 275;\n}\n\nfunction isPortraitViewportHeight(viewportHeight) {\n  return !!(!ionic.keyboard.isLandscape &&\n         keyboardPortraitViewportHeight &&\n         (Math.abs(keyboardPortraitViewportHeight - viewportHeight) < 2));\n}\n\nfunction isLandscapeViewportHeight(viewportHeight) {\n  return !!(ionic.keyboard.isLandscape &&\n         keyboardLandscapeViewportHeight &&\n         (Math.abs(keyboardLandscapeViewportHeight - viewportHeight) < 2));\n}\n\nfunction keyboardUpdateViewportHeight() {\n  wasOrientationChange = false;\n  keyboardCurrentViewportHeight = getViewportHeight();\n\n  if (ionic.keyboard.isLandscape && !keyboardLandscapeViewportHeight) {\n    //console.log(\"saved landscape: \" + keyboardCurrentViewportHeight);\n    keyboardLandscapeViewportHeight = keyboardCurrentViewportHeight;\n\n  } else if (!ionic.keyboard.isLandscape && !keyboardPortraitViewportHeight) {\n    //console.log(\"saved portrait: \" + keyboardCurrentViewportHeight);\n    keyboardPortraitViewportHeight = keyboardCurrentViewportHeight;\n  }\n\n  if (keyboardActiveElement) {\n    ionic.trigger('resetScrollView', {\n      target: keyboardActiveElement\n    }, true);\n  }\n\n  if (ionic.keyboard.isOpen && ionic.tap.isTextInput(keyboardActiveElement)) {\n    keyboardShow();\n  }\n}\n\nfunction keyboardInitViewportHeight() {\n  var viewportHeight = getViewportHeight();\n  //console.log(\"Keyboard init VP: \" + viewportHeight + \" \" + window.innerWidth);\n  // can't just use window.innerHeight in case the keyboard is opened immediately\n  if ((viewportHeight / window.innerWidth) < 1) {\n    ionic.keyboard.isLandscape = true;\n  }\n  //console.log(\"ionic.keyboard.isLandscape is: \" + ionic.keyboard.isLandscape);\n\n  // initialize or update the current viewport height values\n  keyboardCurrentViewportHeight = viewportHeight;\n  if (ionic.keyboard.isLandscape && !keyboardLandscapeViewportHeight) {\n    keyboardLandscapeViewportHeight = keyboardCurrentViewportHeight;\n  } else if (!ionic.keyboard.isLandscape && !keyboardPortraitViewportHeight) {\n    keyboardPortraitViewportHeight = keyboardCurrentViewportHeight;\n  }\n}\n\nfunction getViewportHeight() {\n  var windowHeight = window.innerHeight;\n  //console.log('window.innerHeight is: ' + windowHeight);\n  //console.log('kb height is: ' + ionic.keyboard.height);\n  //console.log('kb isOpen: ' + ionic.keyboard.isOpen);\n\n  //TODO: add iPad undocked/split kb once kb plugin supports it\n  // the keyboard overlays the window on Android fullscreen\n  if (!(ionic.Platform.isAndroid() && ionic.Platform.isFullScreen) &&\n      (ionic.keyboard.isOpen || ionic.keyboard.isOpening) &&\n      !ionic.keyboard.isClosing) {\n\n     return windowHeight + keyboardGetHeight();\n  }\n  return windowHeight;\n}\n\nfunction keyboardHasPlugin() {\n  return !!(window.cordova && cordova.plugins && cordova.plugins.Keyboard);\n}\n\nionic.Platform.ready(function() {\n  keyboardInitViewportHeight();\n\n  window.addEventListener('orientationchange', keyboardOrientationChange);\n\n  // if orientation changes while app is in background, update on resuming\n  /*\n  if ( ionic.Platform.isWebView() ) {\n    document.addEventListener('resume', keyboardInitViewportHeight);\n\n    if (ionic.Platform.isAndroid()) {\n      //TODO: onbackpressed to detect keyboard close without focusout or plugin\n    }\n  }\n  */\n\n  // if orientation changes while app is in background, update on resuming\n/*  if ( ionic.Platform.isWebView() ) {\n    document.addEventListener('pause', function() {\n      window.removeEventListener('orientationchange', keyboardOrientationChange);\n    })\n    document.addEventListener('resume', function() {\n      keyboardInitViewportHeight();\n      window.addEventListener('orientationchange', keyboardOrientationChange)\n    });\n  }*/\n\n  // Android sometimes reports bad innerHeight on window.load\n  // try it again in a lil bit to play it safe\n  setTimeout(keyboardInitViewportHeight, 999);\n\n  // only initialize the adjustments for the virtual keyboard\n  // if a touchstart event happens\n  if (window.navigator.msPointerEnabled) {\n    document.addEventListener(\"MSPointerDown\", keyboardInit, false);\n  } else {\n    document.addEventListener('touchstart', keyboardInit, false);\n  }\n});\n\n\n\nvar viewportTag;\nvar viewportProperties = {};\n\nionic.viewport = {\n  orientation: function() {\n    // 0 = Portrait\n    // 90 = Landscape\n    // not using window.orientation because each device has a different implementation\n    return (window.innerWidth > window.innerHeight ? 90 : 0);\n  }\n};\n\nfunction viewportLoadTag() {\n  var x;\n\n  for (x = 0; x < document.head.children.length; x++) {\n    if (document.head.children[x].name == 'viewport') {\n      viewportTag = document.head.children[x];\n      break;\n    }\n  }\n\n  if (viewportTag) {\n    var props = viewportTag.content.toLowerCase().replace(/\\s+/g, '').split(',');\n    var keyValue;\n    for (x = 0; x < props.length; x++) {\n      if (props[x]) {\n        keyValue = props[x].split('=');\n        viewportProperties[ keyValue[0] ] = (keyValue.length > 1 ? keyValue[1] : '_');\n      }\n    }\n    viewportUpdate();\n  }\n}\n\nfunction viewportUpdate() {\n  // unit tests in viewport.unit.js\n\n  var initWidth = viewportProperties.width;\n  var initHeight = viewportProperties.height;\n  var p = ionic.Platform;\n  var version = p.version();\n  var DEVICE_WIDTH = 'device-width';\n  var DEVICE_HEIGHT = 'device-height';\n  var orientation = ionic.viewport.orientation();\n\n  // Most times we're removing the height and adding the width\n  // So this is the default to start with, then modify per platform/version/oreintation\n  delete viewportProperties.height;\n  viewportProperties.width = DEVICE_WIDTH;\n\n  if (p.isIPad()) {\n    // iPad\n\n    if (version > 7) {\n      // iPad >= 7.1\n      // https://issues.apache.org/jira/browse/CB-4323\n      delete viewportProperties.width;\n\n    } else {\n      // iPad <= 7.0\n\n      if (p.isWebView()) {\n        // iPad <= 7.0 WebView\n\n        if (orientation == 90) {\n          // iPad <= 7.0 WebView Landscape\n          viewportProperties.height = '0';\n\n        } else if (version == 7) {\n          // iPad <= 7.0 WebView Portait\n          viewportProperties.height = DEVICE_HEIGHT;\n        }\n      } else {\n        // iPad <= 6.1 Browser\n        if (version < 7) {\n          viewportProperties.height = '0';\n        }\n      }\n    }\n\n  } else if (p.isIOS()) {\n    // iPhone\n\n    if (p.isWebView()) {\n      // iPhone WebView\n\n      if (version > 7) {\n        // iPhone >= 7.1 WebView\n        delete viewportProperties.width;\n\n      } else if (version < 7) {\n        // iPhone <= 6.1 WebView\n        // if height was set it needs to get removed with this hack for <= 6.1\n        if (initHeight) viewportProperties.height = '0';\n\n      } else if (version == 7) {\n        //iPhone == 7.0 WebView\n        viewportProperties.height = DEVICE_HEIGHT;\n      }\n\n    } else {\n      // iPhone Browser\n\n      if (version < 7) {\n        // iPhone <= 6.1 Browser\n        // if height was set it needs to get removed with this hack for <= 6.1\n        if (initHeight) viewportProperties.height = '0';\n      }\n    }\n\n  }\n\n  // only update the viewport tag if there was a change\n  if (initWidth !== viewportProperties.width || initHeight !== viewportProperties.height) {\n    viewportTagUpdate();\n  }\n}\n\nfunction viewportTagUpdate() {\n  var key, props = [];\n  for (key in viewportProperties) {\n    if (viewportProperties[key]) {\n      props.push(key + (viewportProperties[key] == '_' ? '' : '=' + viewportProperties[key]));\n    }\n  }\n\n  viewportTag.content = props.join(', ');\n}\n\nionic.Platform.ready(function() {\n  viewportLoadTag();\n\n  window.addEventListener(\"orientationchange\", function() {\n    setTimeout(viewportUpdate, 1000);\n  }, false);\n});\n\n(function(ionic) {\n'use strict';\n  ionic.views.View = function() {\n    this.initialize.apply(this, arguments);\n  };\n\n  ionic.views.View.inherit = ionic.inherit;\n\n  ionic.extend(ionic.views.View.prototype, {\n    initialize: function() {}\n  });\n\n})(window.ionic);\n\n/*\n * Scroller\n * http://github.com/zynga/scroller\n *\n * Copyright 2011, Zynga Inc.\n * Licensed under the MIT License.\n * https://raw.github.com/zynga/scroller/master/MIT-LICENSE.txt\n *\n * Based on the work of: Unify Project (unify-project.org)\n * http://unify-project.org\n * Copyright 2011, Deutsche Telekom AG\n * License: MIT + Apache (V2)\n */\n\n/* jshint eqnull: true */\n\n/**\n * Generic animation class with support for dropped frames both optional easing and duration.\n *\n * Optional duration is useful when the lifetime is defined by another condition than time\n * e.g. speed of an animating object, etc.\n *\n * Dropped frame logic allows to keep using the same updater logic independent from the actual\n * rendering. This eases a lot of cases where it might be pretty complex to break down a state\n * based on the pure time difference.\n */\nvar zyngaCore = { effect: {} };\n(function(global) {\n  var time = Date.now || function() {\n    return +new Date();\n  };\n  var desiredFrames = 60;\n  var millisecondsPerSecond = 1000;\n  var running = {};\n  var counter = 1;\n\n  zyngaCore.effect.Animate = {\n\n    /**\n     * A requestAnimationFrame wrapper / polyfill.\n     *\n     * @param callback {Function} The callback to be invoked before the next repaint.\n     * @param root {HTMLElement} The root element for the repaint\n     */\n    requestAnimationFrame: (function() {\n\n      // Check for request animation Frame support\n      var requestFrame = global.requestAnimationFrame || global.webkitRequestAnimationFrame || global.mozRequestAnimationFrame || global.oRequestAnimationFrame;\n      var isNative = !!requestFrame;\n\n      if (requestFrame && !/requestAnimationFrame\\(\\)\\s*\\{\\s*\\[native code\\]\\s*\\}/i.test(requestFrame.toString())) {\n        isNative = false;\n      }\n\n      if (isNative) {\n        return function(callback, root) {\n          requestFrame(callback, root);\n        };\n      }\n\n      var TARGET_FPS = 60;\n      var requests = {};\n      var requestCount = 0;\n      var rafHandle = 1;\n      var intervalHandle = null;\n      var lastActive = +new Date();\n\n      return function(callback) {\n        var callbackHandle = rafHandle++;\n\n        // Store callback\n        requests[callbackHandle] = callback;\n        requestCount++;\n\n        // Create timeout at first request\n        if (intervalHandle === null) {\n\n          intervalHandle = setInterval(function() {\n\n            var time = +new Date();\n            var currentRequests = requests;\n\n            // Reset data structure before executing callbacks\n            requests = {};\n            requestCount = 0;\n\n            for(var key in currentRequests) {\n              if (currentRequests.hasOwnProperty(key)) {\n                currentRequests[key](time);\n                lastActive = time;\n              }\n            }\n\n            // Disable the timeout when nothing happens for a certain\n            // period of time\n            if (time - lastActive > 2500) {\n              clearInterval(intervalHandle);\n              intervalHandle = null;\n            }\n\n          }, 1000 / TARGET_FPS);\n        }\n\n        return callbackHandle;\n      };\n\n    })(),\n\n\n    /**\n     * Stops the given animation.\n     *\n     * @param id {Integer} Unique animation ID\n     * @return {Boolean} Whether the animation was stopped (aka, was running before)\n     */\n    stop: function(id) {\n      var cleared = running[id] != null;\n      if (cleared) {\n        running[id] = null;\n      }\n\n      return cleared;\n    },\n\n\n    /**\n     * Whether the given animation is still running.\n     *\n     * @param id {Integer} Unique animation ID\n     * @return {Boolean} Whether the animation is still running\n     */\n    isRunning: function(id) {\n      return running[id] != null;\n    },\n\n\n    /**\n     * Start the animation.\n     *\n     * @param stepCallback {Function} Pointer to function which is executed on every step.\n     *   Signature of the method should be `function(percent, now, virtual) { return continueWithAnimation; }`\n     * @param verifyCallback {Function} Executed before every animation step.\n     *   Signature of the method should be `function() { return continueWithAnimation; }`\n     * @param completedCallback {Function}\n     *   Signature of the method should be `function(droppedFrames, finishedAnimation) {}`\n     * @param duration {Integer} Milliseconds to run the animation\n     * @param easingMethod {Function} Pointer to easing function\n     *   Signature of the method should be `function(percent) { return modifiedValue; }`\n     * @param root {Element} Render root, when available. Used for internal\n     *   usage of requestAnimationFrame.\n     * @return {Integer} Identifier of animation. Can be used to stop it any time.\n     */\n    start: function(stepCallback, verifyCallback, completedCallback, duration, easingMethod, root) {\n\n      var start = time();\n      var lastFrame = start;\n      var percent = 0;\n      var dropCounter = 0;\n      var id = counter++;\n\n      if (!root) {\n        root = document.body;\n      }\n\n      // Compacting running db automatically every few new animations\n      if (id % 20 === 0) {\n        var newRunning = {};\n        for (var usedId in running) {\n          newRunning[usedId] = true;\n        }\n        running = newRunning;\n      }\n\n      // This is the internal step method which is called every few milliseconds\n      var step = function(virtual) {\n\n        // Normalize virtual value\n        var render = virtual !== true;\n\n        // Get current time\n        var now = time();\n\n        // Verification is executed before next animation step\n        if (!running[id] || (verifyCallback && !verifyCallback(id))) {\n\n          running[id] = null;\n          completedCallback && completedCallback(desiredFrames - (dropCounter / ((now - start) / millisecondsPerSecond)), id, false);\n          return;\n\n        }\n\n        // For the current rendering to apply let's update omitted steps in memory.\n        // This is important to bring internal state variables up-to-date with progress in time.\n        if (render) {\n\n          var droppedFrames = Math.round((now - lastFrame) / (millisecondsPerSecond / desiredFrames)) - 1;\n          for (var j = 0; j < Math.min(droppedFrames, 4); j++) {\n            step(true);\n            dropCounter++;\n          }\n\n        }\n\n        // Compute percent value\n        if (duration) {\n          percent = (now - start) / duration;\n          if (percent > 1) {\n            percent = 1;\n          }\n        }\n\n        // Execute step callback, then...\n        var value = easingMethod ? easingMethod(percent) : percent;\n        if ((stepCallback(value, now, render) === false || percent === 1) && render) {\n          running[id] = null;\n          completedCallback && completedCallback(desiredFrames - (dropCounter / ((now - start) / millisecondsPerSecond)), id, percent === 1 || duration == null);\n        } else if (render) {\n          lastFrame = now;\n          zyngaCore.effect.Animate.requestAnimationFrame(step, root);\n        }\n      };\n\n      // Mark as running\n      running[id] = true;\n\n      // Init first step\n      zyngaCore.effect.Animate.requestAnimationFrame(step, root);\n\n      // Return unique animation ID\n      return id;\n    }\n  };\n})(window);\n\n/*\n * Scroller\n * http://github.com/zynga/scroller\n *\n * Copyright 2011, Zynga Inc.\n * Licensed under the MIT License.\n * https://raw.github.com/zynga/scroller/master/MIT-LICENSE.txt\n *\n * Based on the work of: Unify Project (unify-project.org)\n * http://unify-project.org\n * Copyright 2011, Deutsche Telekom AG\n * License: MIT + Apache (V2)\n */\n\n(function(ionic) {\n  var NOOP = function(){};\n\n  // Easing Equations (c) 2003 Robert Penner, all rights reserved.\n  // Open source under the BSD License.\n\n  /**\n   * @param pos {Number} position between 0 (start of effect) and 1 (end of effect)\n  **/\n  var easeOutCubic = function(pos) {\n    return (Math.pow((pos - 1), 3) + 1);\n  };\n\n  /**\n   * @param pos {Number} position between 0 (start of effect) and 1 (end of effect)\n  **/\n  var easeInOutCubic = function(pos) {\n    if ((pos /= 0.5) < 1) {\n      return 0.5 * Math.pow(pos, 3);\n    }\n\n    return 0.5 * (Math.pow((pos - 2), 3) + 2);\n  };\n\n\n/**\n * ionic.views.Scroll\n * A powerful scroll view with support for bouncing, pull to refresh, and paging.\n * @param   {Object}        options options for the scroll view\n * @class A scroll view system\n * @memberof ionic.views\n */\nionic.views.Scroll = ionic.views.View.inherit({\n  initialize: function(options) {\n    var self = this;\n\n    self.__container = options.el;\n    self.__content = options.el.firstElementChild;\n\n    //Remove any scrollTop attached to these elements; they are virtual scroll now\n    //This also stops on-load-scroll-to-window.location.hash that the browser does\n    setTimeout(function() {\n      if (self.__container && self.__content) {\n        self.__container.scrollTop = 0;\n        self.__content.scrollTop = 0;\n      }\n    });\n\n    self.options = {\n\n      /** Disable scrolling on x-axis by default */\n      scrollingX: false,\n      scrollbarX: true,\n\n      /** Enable scrolling on y-axis */\n      scrollingY: true,\n      scrollbarY: true,\n\n      startX: 0,\n      startY: 0,\n\n      /** The amount to dampen mousewheel events */\n      wheelDampen: 6,\n\n      /** The minimum size the scrollbars scale to while scrolling */\n      minScrollbarSizeX: 5,\n      minScrollbarSizeY: 5,\n\n      /** Scrollbar fading after scrolling */\n      scrollbarsFade: true,\n      scrollbarFadeDelay: 300,\n      /** The initial fade delay when the pane is resized or initialized */\n      scrollbarResizeFadeDelay: 1000,\n\n      /** Enable animations for deceleration, snap back, zooming and scrolling */\n      animating: true,\n\n      /** duration for animations triggered by scrollTo/zoomTo */\n      animationDuration: 250,\n\n      /** The velocity required to make the scroll view \"slide\" after touchend */\n      decelVelocityThreshold: 4,\n\n      /** The velocity required to make the scroll view \"slide\" after touchend when using paging */\n      decelVelocityThresholdPaging: 4,\n\n      /** Enable bouncing (content can be slowly moved outside and jumps back after releasing) */\n      bouncing: true,\n\n      /** Enable locking to the main axis if user moves only slightly on one of them at start */\n      locking: true,\n\n      /** Enable pagination mode (switching between full page content panes) */\n      paging: false,\n\n      /** Enable snapping of content to a configured pixel grid */\n      snapping: false,\n\n      /** Enable zooming of content via API, fingers and mouse wheel */\n      zooming: false,\n\n      /** Minimum zoom level */\n      minZoom: 0.5,\n\n      /** Maximum zoom level */\n      maxZoom: 3,\n\n      /** Multiply or decrease scrolling speed **/\n      speedMultiplier: 1,\n\n      deceleration: 0.97,\n\n      /** Whether to prevent default on a scroll operation to capture drag events **/\n      preventDefault: false,\n\n      /** Callback that is fired on the later of touch end or deceleration end,\n        provided that another scrolling action has not begun. Used to know\n        when to fade out a scrollbar. */\n      scrollingComplete: NOOP,\n\n      /** This configures the amount of change applied to deceleration when reaching boundaries  **/\n      penetrationDeceleration: 0.03,\n\n      /** This configures the amount of change applied to acceleration when reaching boundaries  **/\n      penetrationAcceleration: 0.08,\n\n      // The ms interval for triggering scroll events\n      scrollEventInterval: 10,\n\n      freeze: false,\n\n      getContentWidth: function() {\n        return Math.max(self.__content.scrollWidth, self.__content.offsetWidth);\n      },\n      getContentHeight: function() {\n        return Math.max(self.__content.scrollHeight, self.__content.offsetHeight + (self.__content.offsetTop * 2));\n      }\n    };\n\n    for (var key in options) {\n      self.options[key] = options[key];\n    }\n\n    self.hintResize = ionic.debounce(function() {\n      self.resize();\n    }, 1000, true);\n\n    self.onScroll = function() {\n\n      if (!ionic.scroll.isScrolling) {\n        setTimeout(self.setScrollStart, 50);\n      } else {\n        clearTimeout(self.scrollTimer);\n        self.scrollTimer = setTimeout(self.setScrollStop, 80);\n      }\n\n    };\n\n    self.freeze = function(shouldFreeze) {\n      if (arguments.length) {\n        self.options.freeze = shouldFreeze;\n      }\n      return self.options.freeze;\n    };\n\n    // We can just use the standard freeze pop in our mouth\n    self.freezeShut = self.freeze;\n\n    self.setScrollStart = function() {\n      ionic.scroll.isScrolling = Math.abs(ionic.scroll.lastTop - self.__scrollTop) > 1;\n      clearTimeout(self.scrollTimer);\n      self.scrollTimer = setTimeout(self.setScrollStop, 80);\n    };\n\n    self.setScrollStop = function() {\n      ionic.scroll.isScrolling = false;\n      ionic.scroll.lastTop = self.__scrollTop;\n    };\n\n    self.triggerScrollEvent = ionic.throttle(function() {\n      self.onScroll();\n      ionic.trigger('scroll', {\n        scrollTop: self.__scrollTop,\n        scrollLeft: self.__scrollLeft,\n        target: self.__container\n      });\n    }, self.options.scrollEventInterval);\n\n    self.triggerScrollEndEvent = function() {\n      ionic.trigger('scrollend', {\n        scrollTop: self.__scrollTop,\n        scrollLeft: self.__scrollLeft,\n        target: self.__container\n      });\n    };\n\n    self.__scrollLeft = self.options.startX;\n    self.__scrollTop = self.options.startY;\n\n    // Get the render update function, initialize event handlers,\n    // and calculate the size of the scroll container\n    self.__callback = self.getRenderFn();\n    self.__initEventHandlers();\n    self.__createScrollbars();\n\n  },\n\n  run: function() {\n    this.resize();\n\n    // Fade them out\n    this.__fadeScrollbars('out', this.options.scrollbarResizeFadeDelay);\n  },\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: STATUS\n  ---------------------------------------------------------------------------\n  */\n\n  /** Whether only a single finger is used in touch handling */\n  __isSingleTouch: false,\n\n  /** Whether a touch event sequence is in progress */\n  __isTracking: false,\n\n  /** Whether a deceleration animation went to completion. */\n  __didDecelerationComplete: false,\n\n  /**\n   * Whether a gesture zoom/rotate event is in progress. Activates when\n   * a gesturestart event happens. This has higher priority than dragging.\n   */\n  __isGesturing: false,\n\n  /**\n   * Whether the user has moved by such a distance that we have enabled\n   * dragging mode. Hint: It's only enabled after some pixels of movement to\n   * not interrupt with clicks etc.\n   */\n  __isDragging: false,\n\n  /**\n   * Not touching and dragging anymore, and smoothly animating the\n   * touch sequence using deceleration.\n   */\n  __isDecelerating: false,\n\n  /**\n   * Smoothly animating the currently configured change\n   */\n  __isAnimating: false,\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: DIMENSIONS\n  ---------------------------------------------------------------------------\n  */\n\n  /** Available outer left position (from document perspective) */\n  __clientLeft: 0,\n\n  /** Available outer top position (from document perspective) */\n  __clientTop: 0,\n\n  /** Available outer width */\n  __clientWidth: 0,\n\n  /** Available outer height */\n  __clientHeight: 0,\n\n  /** Outer width of content */\n  __contentWidth: 0,\n\n  /** Outer height of content */\n  __contentHeight: 0,\n\n  /** Snapping width for content */\n  __snapWidth: 100,\n\n  /** Snapping height for content */\n  __snapHeight: 100,\n\n  /** Height to assign to refresh area */\n  __refreshHeight: null,\n\n  /** Whether the refresh process is enabled when the event is released now */\n  __refreshActive: false,\n\n  /** Callback to execute on activation. This is for signalling the user about a refresh is about to happen when he release */\n  __refreshActivate: null,\n\n  /** Callback to execute on deactivation. This is for signalling the user about the refresh being cancelled */\n  __refreshDeactivate: null,\n\n  /** Callback to execute to start the actual refresh. Call {@link #refreshFinish} when done */\n  __refreshStart: null,\n\n  /** Zoom level */\n  __zoomLevel: 1,\n\n  /** Scroll position on x-axis */\n  __scrollLeft: 0,\n\n  /** Scroll position on y-axis */\n  __scrollTop: 0,\n\n  /** Maximum allowed scroll position on x-axis */\n  __maxScrollLeft: 0,\n\n  /** Maximum allowed scroll position on y-axis */\n  __maxScrollTop: 0,\n\n  /* Scheduled left position (final position when animating) */\n  __scheduledLeft: 0,\n\n  /* Scheduled top position (final position when animating) */\n  __scheduledTop: 0,\n\n  /* Scheduled zoom level (final scale when animating) */\n  __scheduledZoom: 0,\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: LAST POSITIONS\n  ---------------------------------------------------------------------------\n  */\n\n  /** Left position of finger at start */\n  __lastTouchLeft: null,\n\n  /** Top position of finger at start */\n  __lastTouchTop: null,\n\n  /** Timestamp of last move of finger. Used to limit tracking range for deceleration speed. */\n  __lastTouchMove: null,\n\n  /** List of positions, uses three indexes for each state: left, top, timestamp */\n  __positions: null,\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: DECELERATION SUPPORT\n  ---------------------------------------------------------------------------\n  */\n\n  /** Minimum left scroll position during deceleration */\n  __minDecelerationScrollLeft: null,\n\n  /** Minimum top scroll position during deceleration */\n  __minDecelerationScrollTop: null,\n\n  /** Maximum left scroll position during deceleration */\n  __maxDecelerationScrollLeft: null,\n\n  /** Maximum top scroll position during deceleration */\n  __maxDecelerationScrollTop: null,\n\n  /** Current factor to modify horizontal scroll position with on every step */\n  __decelerationVelocityX: null,\n\n  /** Current factor to modify vertical scroll position with on every step */\n  __decelerationVelocityY: null,\n\n\n  /** the browser-specific property to use for transforms */\n  __transformProperty: null,\n  __perspectiveProperty: null,\n\n  /** scrollbar indicators */\n  __indicatorX: null,\n  __indicatorY: null,\n\n  /** Timeout for scrollbar fading */\n  __scrollbarFadeTimeout: null,\n\n  /** whether we've tried to wait for size already */\n  __didWaitForSize: null,\n  __sizerTimeout: null,\n\n  __initEventHandlers: function() {\n    var self = this;\n\n    // Event Handler\n    var container = self.__container;\n\n    // save height when scroll view is shrunk so we don't need to reflow\n    var scrollViewOffsetHeight;\n\n    /**\n     * Shrink the scroll view when the keyboard is up if necessary and if the\n     * focused input is below the bottom of the shrunk scroll view, scroll it\n     * into view.\n     */\n    self.scrollChildIntoView = function(e) {\n      //console.log(\"scrollChildIntoView at: \" + Date.now());\n\n      // D\n      var scrollBottomOffsetToTop = container.getBoundingClientRect().bottom;\n      // D - A\n      scrollViewOffsetHeight = container.offsetHeight;\n      var alreadyShrunk = self.isShrunkForKeyboard;\n\n      var isModal = container.parentNode.classList.contains('modal');\n      // 680px is when the media query for 60% modal width kicks in\n      var isInsetModal = isModal && window.innerWidth >= 680;\n\n     /*\n      *  _______\n      * |---A---| <- top of scroll view\n      * |       |\n      * |---B---| <- keyboard\n      * |   C   | <- input\n      * |---D---| <- initial bottom of scroll view\n      * |___E___| <- bottom of viewport\n      *\n      *  All commented calculations relative to the top of the viewport (ie E\n      *  is the viewport height, not 0)\n      */\n      if (!alreadyShrunk) {\n        // shrink scrollview so we can actually scroll if the input is hidden\n        // if it isn't shrink so we can scroll to inputs under the keyboard\n        // inset modals won't shrink on Android on their own when the keyboard appears\n        if ( ionic.Platform.isIOS() || ionic.Platform.isFullScreen || isInsetModal ) {\n          // if there are things below the scroll view account for them and\n          // subtract them from the keyboard height when resizing\n          // E - D                         E                         D\n          var scrollBottomOffsetToBottom = e.detail.viewportHeight - scrollBottomOffsetToTop;\n\n          // 0 or D - B if D > B           E - B                     E - D\n          var keyboardOffset = Math.max(0, e.detail.keyboardHeight - scrollBottomOffsetToBottom);\n\n          ionic.requestAnimationFrame(function(){\n            // D - A or B - A if D > B       D - A             max(0, D - B)\n            scrollViewOffsetHeight = scrollViewOffsetHeight - keyboardOffset;\n            container.style.height = scrollViewOffsetHeight + \"px\";\n            container.style.overflow = \"visible\";\n\n            //update scroll view\n            self.resize();\n          });\n        }\n\n        self.isShrunkForKeyboard = true;\n      }\n\n      /*\n       *  _______\n       * |---A---| <- top of scroll view\n       * |   *   | <- where we want to scroll to\n       * |--B-D--| <- keyboard, bottom of scroll view\n       * |   C   | <- input\n       * |       |\n       * |___E___| <- bottom of viewport\n       *\n       *  All commented calculations relative to the top of the viewport (ie E\n       *  is the viewport height, not 0)\n       */\n      // if the element is positioned under the keyboard scroll it into view\n      if (e.detail.isElementUnderKeyboard) {\n\n        ionic.requestAnimationFrame(function(){\n          container.scrollTop = 0;\n          // update D if we shrunk\n          if (self.isShrunkForKeyboard && !alreadyShrunk) {\n            scrollBottomOffsetToTop = container.getBoundingClientRect().bottom;\n          }\n\n          // middle of the scrollview, this is where we want to scroll to\n          // (D - A) / 2\n          var scrollMidpointOffset = scrollViewOffsetHeight * 0.5;\n          //console.log(\"container.offsetHeight: \" + scrollViewOffsetHeight);\n\n          // middle of the input we want to scroll into view\n          // C\n          var inputMidpoint = ((e.detail.elementBottom + e.detail.elementTop) / 2);\n\n          // distance from middle of input to the bottom of the scroll view\n          // C - D                                C               D\n          var inputMidpointOffsetToScrollBottom = inputMidpoint - scrollBottomOffsetToTop;\n\n          //C - D + (D - A)/2          C - D                     (D - A)/ 2\n          var scrollTop = inputMidpointOffsetToScrollBottom + scrollMidpointOffset;\n\n          if ( scrollTop > 0) {\n            if (ionic.Platform.isIOS()) ionic.tap.cloneFocusedInput(container, self);\n            self.scrollBy(0, scrollTop, true);\n            self.onScroll();\n          }\n        });\n      }\n\n      // Only the first scrollView parent of the element that broadcasted this event\n      // (the active element that needs to be shown) should receive this event\n      e.stopPropagation();\n    };\n\n    self.resetScrollView = function() {\n      //return scrollview to original height once keyboard has hidden\n      if ( self.isShrunkForKeyboard ) {\n        self.isShrunkForKeyboard = false;\n        container.style.height = \"\";\n        container.style.overflow = \"\";\n      }\n      self.resize();\n    };\n\n    //Broadcasted when keyboard is shown on some platforms.\n    //See js/utils/keyboard.js\n    container.addEventListener('scrollChildIntoView', self.scrollChildIntoView);\n\n    // Listen on document because container may not have had the last\n    // keyboardActiveElement, for example after closing a modal with a focused\n    // input and returning to a previously resized scroll view in an ion-content.\n    // Since we can only resize scroll views that are currently visible, just resize\n    // the current scroll view when the keyboard is closed.\n    document.addEventListener('resetScrollView', self.resetScrollView);\n\n    function getEventTouches(e) {\n      return e.touches && e.touches.length ? e.touches : [{\n        pageX: e.pageX,\n        pageY: e.pageY\n      }];\n    }\n\n    self.touchStart = function(e) {\n      self.startCoordinates = ionic.tap.pointerCoord(e);\n\n      if ( ionic.tap.ignoreScrollStart(e) ) {\n        return;\n      }\n\n      self.__isDown = true;\n\n      if ( ionic.tap.containsOrIsTextInput(e.target) || e.target.tagName === 'SELECT' ) {\n        // do not start if the target is a text input\n        // if there is a touchmove on this input, then we can start the scroll\n        self.__hasStarted = false;\n        return;\n      }\n\n      self.__isSelectable = true;\n      self.__enableScrollY = true;\n      self.__hasStarted = true;\n      self.doTouchStart(getEventTouches(e), e.timeStamp);\n      e.preventDefault();\n    };\n\n    self.touchMove = function(e) {\n      if (self.options.freeze || !self.__isDown ||\n        (!self.__isDown && e.defaultPrevented) ||\n        (e.target.tagName === 'TEXTAREA' && e.target.parentElement.querySelector(':focus')) ) {\n        return;\n      }\n\n      if ( !self.__hasStarted && ( ionic.tap.containsOrIsTextInput(e.target) || e.target.tagName === 'SELECT' ) ) {\n        // the target is a text input and scroll has started\n        // since the text input doesn't start on touchStart, do it here\n        self.__hasStarted = true;\n        self.doTouchStart(getEventTouches(e), e.timeStamp);\n        e.preventDefault();\n        return;\n      }\n\n      if (self.startCoordinates) {\n        // we have start coordinates, so get this touch move's current coordinates\n        var currentCoordinates = ionic.tap.pointerCoord(e);\n\n        if ( self.__isSelectable &&\n            ionic.tap.isTextInput(e.target) &&\n            Math.abs(self.startCoordinates.x - currentCoordinates.x) > 20 ) {\n          // user slid the text input's caret on its x axis, disable any future y scrolling\n          self.__enableScrollY = false;\n          self.__isSelectable = true;\n        }\n\n        if ( self.__enableScrollY && Math.abs(self.startCoordinates.y - currentCoordinates.y) > 10 ) {\n          // user scrolled the entire view on the y axis\n          // disabled being able to select text on an input\n          // hide the input which has focus, and show a cloned one that doesn't have focus\n          self.__isSelectable = false;\n          ionic.tap.cloneFocusedInput(container, self);\n        }\n      }\n\n      self.doTouchMove(getEventTouches(e), e.timeStamp, e.scale);\n      self.__isDown = true;\n    };\n\n    self.touchMoveBubble = function(e) {\n      if(self.__isDown && self.options.preventDefault) {\n        e.preventDefault();\n      }\n    };\n\n    self.touchEnd = function(e) {\n      if (!self.__isDown) return;\n\n      self.doTouchEnd(e, e.timeStamp);\n      self.__isDown = false;\n      self.__hasStarted = false;\n      self.__isSelectable = true;\n      self.__enableScrollY = true;\n\n      if ( !self.__isDragging && !self.__isDecelerating && !self.__isAnimating ) {\n        ionic.tap.removeClonedInputs(container, self);\n      }\n    };\n\n    self.mouseWheel = ionic.animationFrameThrottle(function(e) {\n      var scrollParent = ionic.DomUtil.getParentOrSelfWithClass(e.target, 'ionic-scroll');\n      if (!self.options.freeze && scrollParent === self.__container) {\n\n        self.hintResize();\n        self.scrollBy(\n          (e.wheelDeltaX || e.deltaX || 0) / self.options.wheelDampen,\n          (-e.wheelDeltaY || e.deltaY || 0) / self.options.wheelDampen\n        );\n\n        self.__fadeScrollbars('in');\n        clearTimeout(self.__wheelHideBarTimeout);\n        self.__wheelHideBarTimeout = setTimeout(function() {\n          self.__fadeScrollbars('out');\n        }, 100);\n      }\n    });\n\n    if ('ontouchstart' in window) {\n      // Touch Events\n      container.addEventListener(\"touchstart\", self.touchStart, false);\n      if(self.options.preventDefault) container.addEventListener(\"touchmove\", self.touchMoveBubble, false);\n      document.addEventListener(\"touchmove\", self.touchMove, false);\n      document.addEventListener(\"touchend\", self.touchEnd, false);\n      document.addEventListener(\"touchcancel\", self.touchEnd, false);\n      document.addEventListener(\"wheel\", self.mouseWheel, false);\n\n    } else if (window.navigator.pointerEnabled) {\n      // Pointer Events\n      container.addEventListener(\"pointerdown\", self.touchStart, false);\n      if(self.options.preventDefault) container.addEventListener(\"pointermove\", self.touchMoveBubble, false);\n      document.addEventListener(\"pointermove\", self.touchMove, false);\n      document.addEventListener(\"pointerup\", self.touchEnd, false);\n      document.addEventListener(\"pointercancel\", self.touchEnd, false);\n      document.addEventListener(\"wheel\", self.mouseWheel, false);\n\n    } else if (window.navigator.msPointerEnabled) {\n      // IE10, WP8 (Pointer Events)\n      container.addEventListener(\"MSPointerDown\", self.touchStart, false);\n      if(self.options.preventDefault) container.addEventListener(\"MSPointerMove\", self.touchMoveBubble, false);\n      document.addEventListener(\"MSPointerMove\", self.touchMove, false);\n      document.addEventListener(\"MSPointerUp\", self.touchEnd, false);\n      document.addEventListener(\"MSPointerCancel\", self.touchEnd, false);\n      document.addEventListener(\"wheel\", self.mouseWheel, false);\n\n    } else {\n      // Mouse Events\n      var mousedown = false;\n\n      self.mouseDown = function(e) {\n        if ( ionic.tap.ignoreScrollStart(e) || e.target.tagName === 'SELECT' ) {\n          return;\n        }\n        self.doTouchStart(getEventTouches(e), e.timeStamp);\n\n        if ( !ionic.tap.isTextInput(e.target) ) {\n          e.preventDefault();\n        }\n        mousedown = true;\n      };\n\n      self.mouseMove = function(e) {\n        if (self.options.freeze || !mousedown || (!mousedown && e.defaultPrevented)) {\n          return;\n        }\n\n        self.doTouchMove(getEventTouches(e), e.timeStamp);\n\n        mousedown = true;\n      };\n\n      self.mouseMoveBubble = function(e) {\n        if (mousedown && self.options.preventDefault) {\n          e.preventDefault();\n        }\n      };\n\n      self.mouseUp = function(e) {\n        if (!mousedown) {\n          return;\n        }\n\n        self.doTouchEnd(e, e.timeStamp);\n\n        mousedown = false;\n      };\n\n      container.addEventListener(\"mousedown\", self.mouseDown, false);\n      if(self.options.preventDefault) container.addEventListener(\"mousemove\", self.mouseMoveBubble, false);\n      document.addEventListener(\"mousemove\", self.mouseMove, false);\n      document.addEventListener(\"mouseup\", self.mouseUp, false);\n      document.addEventListener('mousewheel', self.mouseWheel, false);\n      document.addEventListener('wheel', self.mouseWheel, false);\n    }\n  },\n\n  __cleanup: function() {\n    var self = this;\n    var container = self.__container;\n\n    container.removeEventListener('touchstart', self.touchStart);\n    container.removeEventListener('touchmove', self.touchMoveBubble);\n    document.removeEventListener('touchmove', self.touchMove);\n    document.removeEventListener('touchend', self.touchEnd);\n    document.removeEventListener('touchcancel', self.touchEnd);\n\n    container.removeEventListener(\"pointerdown\", self.touchStart);\n    container.removeEventListener(\"pointermove\", self.touchMoveBubble);\n    document.removeEventListener(\"pointermove\", self.touchMove);\n    document.removeEventListener(\"pointerup\", self.touchEnd);\n    document.removeEventListener(\"pointercancel\", self.touchEnd);\n\n    container.removeEventListener(\"MSPointerDown\", self.touchStart);\n    container.removeEventListener(\"MSPointerMove\", self.touchMoveBubble);\n    document.removeEventListener(\"MSPointerMove\", self.touchMove);\n    document.removeEventListener(\"MSPointerUp\", self.touchEnd);\n    document.removeEventListener(\"MSPointerCancel\", self.touchEnd);\n\n    container.removeEventListener(\"mousedown\", self.mouseDown);\n    container.removeEventListener(\"mousemove\", self.mouseMoveBubble);\n    document.removeEventListener(\"mousemove\", self.mouseMove);\n    document.removeEventListener(\"mouseup\", self.mouseUp);\n    document.removeEventListener('mousewheel', self.mouseWheel);\n    document.removeEventListener('wheel', self.mouseWheel);\n\n    container.removeEventListener('scrollChildIntoView', self.scrollChildIntoView);\n    document.removeEventListener('resetScrollView', self.resetScrollView);\n\n    ionic.tap.removeClonedInputs(container, self);\n\n    delete self.__container;\n    delete self.__content;\n    delete self.__indicatorX;\n    delete self.__indicatorY;\n    delete self.options.el;\n\n    self.__callback = self.scrollChildIntoView = self.resetScrollView = NOOP;\n\n    self.mouseMove = self.mouseDown = self.mouseUp = self.mouseWheel =\n      self.touchStart = self.touchMove = self.touchEnd = self.touchCancel = NOOP;\n\n    self.resize = self.scrollTo = self.zoomTo =\n      self.__scrollingComplete = NOOP;\n    container = null;\n  },\n\n  /** Create a scroll bar div with the given direction **/\n  __createScrollbar: function(direction) {\n    var bar = document.createElement('div'),\n      indicator = document.createElement('div');\n\n    indicator.className = 'scroll-bar-indicator scroll-bar-fade-out';\n\n    if (direction == 'h') {\n      bar.className = 'scroll-bar scroll-bar-h';\n    } else {\n      bar.className = 'scroll-bar scroll-bar-v';\n    }\n\n    bar.appendChild(indicator);\n    return bar;\n  },\n\n  __createScrollbars: function() {\n    var self = this;\n    var indicatorX, indicatorY;\n\n    if (self.options.scrollingX) {\n      indicatorX = {\n        el: self.__createScrollbar('h'),\n        sizeRatio: 1\n      };\n      indicatorX.indicator = indicatorX.el.children[0];\n\n      if (self.options.scrollbarX) {\n        self.__container.appendChild(indicatorX.el);\n      }\n      self.__indicatorX = indicatorX;\n    }\n\n    if (self.options.scrollingY) {\n      indicatorY = {\n        el: self.__createScrollbar('v'),\n        sizeRatio: 1\n      };\n      indicatorY.indicator = indicatorY.el.children[0];\n\n      if (self.options.scrollbarY) {\n        self.__container.appendChild(indicatorY.el);\n      }\n      self.__indicatorY = indicatorY;\n    }\n  },\n\n  __resizeScrollbars: function() {\n    var self = this;\n\n    // Update horiz bar\n    if (self.__indicatorX) {\n      var width = Math.max(Math.round(self.__clientWidth * self.__clientWidth / (self.__contentWidth)), 20);\n      if (width > self.__contentWidth) {\n        width = 0;\n      }\n      if (width !== self.__indicatorX.size) {\n        ionic.requestAnimationFrame(function(){\n          self.__indicatorX.indicator.style.width = width + 'px';\n        });\n      }\n      self.__indicatorX.size = width;\n      self.__indicatorX.minScale = self.options.minScrollbarSizeX / width;\n      self.__indicatorX.maxPos = self.__clientWidth - width;\n      self.__indicatorX.sizeRatio = self.__maxScrollLeft ? self.__indicatorX.maxPos / self.__maxScrollLeft : 1;\n    }\n\n    // Update vert bar\n    if (self.__indicatorY) {\n      var height = Math.max(Math.round(self.__clientHeight * self.__clientHeight / (self.__contentHeight)), 20);\n      if (height > self.__contentHeight) {\n        height = 0;\n      }\n      if (height !== self.__indicatorY.size) {\n        ionic.requestAnimationFrame(function(){\n          self.__indicatorY && (self.__indicatorY.indicator.style.height = height + 'px');\n        });\n      }\n      self.__indicatorY.size = height;\n      self.__indicatorY.minScale = self.options.minScrollbarSizeY / height;\n      self.__indicatorY.maxPos = self.__clientHeight - height;\n      self.__indicatorY.sizeRatio = self.__maxScrollTop ? self.__indicatorY.maxPos / self.__maxScrollTop : 1;\n    }\n  },\n\n  /**\n   * Move and scale the scrollbars as the page scrolls.\n   */\n  __repositionScrollbars: function() {\n    var self = this,\n        heightScale, widthScale,\n        widthDiff, heightDiff,\n        x, y,\n        xstop = 0, ystop = 0;\n\n    if (self.__indicatorX) {\n      // Handle the X scrollbar\n\n      // Don't go all the way to the right if we have a vertical scrollbar as well\n      if (self.__indicatorY) xstop = 10;\n\n      x = Math.round(self.__indicatorX.sizeRatio * self.__scrollLeft) || 0;\n\n      // The the difference between the last content X position, and our overscrolled one\n      widthDiff = self.__scrollLeft - (self.__maxScrollLeft - xstop);\n\n      if (self.__scrollLeft < 0) {\n\n        widthScale = Math.max(self.__indicatorX.minScale,\n            (self.__indicatorX.size - Math.abs(self.__scrollLeft)) / self.__indicatorX.size);\n\n        // Stay at left\n        x = 0;\n\n        // Make sure scale is transformed from the left/center origin point\n        self.__indicatorX.indicator.style[self.__transformOriginProperty] = 'left center';\n      } else if (widthDiff > 0) {\n\n        widthScale = Math.max(self.__indicatorX.minScale,\n            (self.__indicatorX.size - widthDiff) / self.__indicatorX.size);\n\n        // Stay at the furthest x for the scrollable viewport\n        x = self.__indicatorX.maxPos - xstop;\n\n        // Make sure scale is transformed from the right/center origin point\n        self.__indicatorX.indicator.style[self.__transformOriginProperty] = 'right center';\n\n      } else {\n\n        // Normal motion\n        x = Math.min(self.__maxScrollLeft, Math.max(0, x));\n        widthScale = 1;\n\n      }\n\n      var translate3dX = 'translate3d(' + x + 'px, 0, 0) scaleX(' + widthScale + ')';\n      if (self.__indicatorX.transformProp !== translate3dX) {\n        self.__indicatorX.indicator.style[self.__transformProperty] = translate3dX;\n        self.__indicatorX.transformProp = translate3dX;\n      }\n    }\n\n    if (self.__indicatorY) {\n\n      y = Math.round(self.__indicatorY.sizeRatio * self.__scrollTop) || 0;\n\n      // Don't go all the way to the right if we have a vertical scrollbar as well\n      if (self.__indicatorX) ystop = 10;\n\n      heightDiff = self.__scrollTop - (self.__maxScrollTop - ystop);\n\n      if (self.__scrollTop < 0) {\n\n        heightScale = Math.max(self.__indicatorY.minScale, (self.__indicatorY.size - Math.abs(self.__scrollTop)) / self.__indicatorY.size);\n\n        // Stay at top\n        y = 0;\n\n        // Make sure scale is transformed from the center/top origin point\n        if (self.__indicatorY.originProp !== 'center top') {\n          self.__indicatorY.indicator.style[self.__transformOriginProperty] = 'center top';\n          self.__indicatorY.originProp = 'center top';\n        }\n\n      } else if (heightDiff > 0) {\n\n        heightScale = Math.max(self.__indicatorY.minScale, (self.__indicatorY.size - heightDiff) / self.__indicatorY.size);\n\n        // Stay at bottom of scrollable viewport\n        y = self.__indicatorY.maxPos - ystop;\n\n        // Make sure scale is transformed from the center/bottom origin point\n        if (self.__indicatorY.originProp !== 'center bottom') {\n          self.__indicatorY.indicator.style[self.__transformOriginProperty] = 'center bottom';\n          self.__indicatorY.originProp = 'center bottom';\n        }\n\n      } else {\n\n        // Normal motion\n        y = Math.min(self.__maxScrollTop, Math.max(0, y));\n        heightScale = 1;\n\n      }\n\n      var translate3dY = 'translate3d(0,' + y + 'px, 0) scaleY(' + heightScale + ')';\n      if (self.__indicatorY.transformProp !== translate3dY) {\n        self.__indicatorY.indicator.style[self.__transformProperty] = translate3dY;\n        self.__indicatorY.transformProp = translate3dY;\n      }\n    }\n  },\n\n  __fadeScrollbars: function(direction, delay) {\n    var self = this;\n\n    if (!self.options.scrollbarsFade) {\n      return;\n    }\n\n    var className = 'scroll-bar-fade-out';\n\n    if (self.options.scrollbarsFade === true) {\n      clearTimeout(self.__scrollbarFadeTimeout);\n\n      if (direction == 'in') {\n        if (self.__indicatorX) { self.__indicatorX.indicator.classList.remove(className); }\n        if (self.__indicatorY) { self.__indicatorY.indicator.classList.remove(className); }\n      } else {\n        self.__scrollbarFadeTimeout = setTimeout(function() {\n          if (self.__indicatorX) { self.__indicatorX.indicator.classList.add(className); }\n          if (self.__indicatorY) { self.__indicatorY.indicator.classList.add(className); }\n        }, delay || self.options.scrollbarFadeDelay);\n      }\n    }\n  },\n\n  __scrollingComplete: function() {\n    this.options.scrollingComplete();\n    ionic.tap.removeClonedInputs(this.__container, this);\n    this.__fadeScrollbars('out');\n  },\n\n  resize: function(continueScrolling) {\n    var self = this;\n    if (!self.__container || !self.options) return;\n\n    // Update Scroller dimensions for changed content\n    // Add padding to bottom of content\n    self.setDimensions(\n      self.__container.clientWidth,\n      self.__container.clientHeight,\n      self.options.getContentWidth(),\n      self.options.getContentHeight(),\n      continueScrolling\n    );\n  },\n  /*\n  ---------------------------------------------------------------------------\n    PUBLIC API\n  ---------------------------------------------------------------------------\n  */\n\n  getRenderFn: function() {\n    var self = this;\n\n    var content = self.__content;\n\n    var docStyle = document.documentElement.style;\n\n    var engine;\n    if ('MozAppearance' in docStyle) {\n      engine = 'gecko';\n    } else if ('WebkitAppearance' in docStyle) {\n      engine = 'webkit';\n    } else if (typeof navigator.cpuClass === 'string') {\n      engine = 'trident';\n    }\n\n    var vendorPrefix = {\n      trident: 'ms',\n      gecko: 'Moz',\n      webkit: 'Webkit',\n      presto: 'O'\n    }[engine];\n\n    var helperElem = document.createElement(\"div\");\n    var undef;\n\n    var perspectiveProperty = vendorPrefix + \"Perspective\";\n    var transformProperty = vendorPrefix + \"Transform\";\n    var transformOriginProperty = vendorPrefix + 'TransformOrigin';\n\n    self.__perspectiveProperty = transformProperty;\n    self.__transformProperty = transformProperty;\n    self.__transformOriginProperty = transformOriginProperty;\n\n    if (helperElem.style[perspectiveProperty] !== undef) {\n\n      return function(left, top, zoom, wasResize) {\n        var translate3d = 'translate3d(' + (-left) + 'px,' + (-top) + 'px,0) scale(' + zoom + ')';\n        if (translate3d !== self.contentTransform) {\n          content.style[transformProperty] = translate3d;\n          self.contentTransform = translate3d;\n        }\n        self.__repositionScrollbars();\n        if (!wasResize) {\n          self.triggerScrollEvent();\n        }\n      };\n\n    } else if (helperElem.style[transformProperty] !== undef) {\n\n      return function(left, top, zoom, wasResize) {\n        content.style[transformProperty] = 'translate(' + (-left) + 'px,' + (-top) + 'px) scale(' + zoom + ')';\n        self.__repositionScrollbars();\n        if (!wasResize) {\n          self.triggerScrollEvent();\n        }\n      };\n\n    } else {\n\n      return function(left, top, zoom, wasResize) {\n        content.style.marginLeft = left ? (-left / zoom) + 'px' : '';\n        content.style.marginTop = top ? (-top / zoom) + 'px' : '';\n        content.style.zoom = zoom || '';\n        self.__repositionScrollbars();\n        if (!wasResize) {\n          self.triggerScrollEvent();\n        }\n      };\n\n    }\n  },\n\n\n  /**\n   * Configures the dimensions of the client (outer) and content (inner) elements.\n   * Requires the available space for the outer element and the outer size of the inner element.\n   * All values which are falsy (null or zero etc.) are ignored and the old value is kept.\n   *\n   * @param clientWidth {Integer} Inner width of outer element\n   * @param clientHeight {Integer} Inner height of outer element\n   * @param contentWidth {Integer} Outer width of inner element\n   * @param contentHeight {Integer} Outer height of inner element\n   */\n  setDimensions: function(clientWidth, clientHeight, contentWidth, contentHeight, continueScrolling) {\n    var self = this;\n\n    if (!clientWidth && !clientHeight && !contentWidth && !contentHeight) {\n      // this scrollview isn't rendered, don't bother\n      return;\n    }\n\n    // Only update values which are defined\n    if (clientWidth === +clientWidth) {\n      self.__clientWidth = clientWidth;\n    }\n\n    if (clientHeight === +clientHeight) {\n      self.__clientHeight = clientHeight;\n    }\n\n    if (contentWidth === +contentWidth) {\n      self.__contentWidth = contentWidth;\n    }\n\n    if (contentHeight === +contentHeight) {\n      self.__contentHeight = contentHeight;\n    }\n\n    // Refresh maximums\n    self.__computeScrollMax();\n    self.__resizeScrollbars();\n\n    // Refresh scroll position\n    if (!continueScrolling) {\n      self.scrollTo(self.__scrollLeft, self.__scrollTop, true, null, true);\n    }\n\n  },\n\n\n  /**\n   * Sets the client coordinates in relation to the document.\n   *\n   * @param left {Integer} Left position of outer element\n   * @param top {Integer} Top position of outer element\n   */\n  setPosition: function(left, top) {\n    this.__clientLeft = left || 0;\n    this.__clientTop = top || 0;\n  },\n\n\n  /**\n   * Configures the snapping (when snapping is active)\n   *\n   * @param width {Integer} Snapping width\n   * @param height {Integer} Snapping height\n   */\n  setSnapSize: function(width, height) {\n    this.__snapWidth = width;\n    this.__snapHeight = height;\n  },\n\n\n  /**\n   * Activates pull-to-refresh. A special zone on the top of the list to start a list refresh whenever\n   * the user event is released during visibility of this zone. This was introduced by some apps on iOS like\n   * the official Twitter client.\n   *\n   * @param height {Integer} Height of pull-to-refresh zone on top of rendered list\n   * @param activateCallback {Function} Callback to execute on activation. This is for signalling the user about a refresh is about to happen when he release.\n   * @param deactivateCallback {Function} Callback to execute on deactivation. This is for signalling the user about the refresh being cancelled.\n   * @param startCallback {Function} Callback to execute to start the real async refresh action. Call {@link #finishPullToRefresh} after finish of refresh.\n   * @param showCallback {Function} Callback to execute when the refresher should be shown. This is for showing the refresher during a negative scrollTop.\n   * @param hideCallback {Function} Callback to execute when the refresher should be hidden. This is for hiding the refresher when it's behind the nav bar.\n   * @param tailCallback {Function} Callback to execute just before the refresher returns to it's original state. This is for zooming out the refresher.\n   * @param pullProgressCallback Callback to state the progress while pulling to refresh\n   */\n  activatePullToRefresh: function(height, refresherMethods) {\n    var self = this;\n\n    self.__refreshHeight = height;\n    self.__refreshActivate = function() { ionic.requestAnimationFrame(refresherMethods.activate); };\n    self.__refreshDeactivate = function() { ionic.requestAnimationFrame(refresherMethods.deactivate); };\n    self.__refreshStart = function() { ionic.requestAnimationFrame(refresherMethods.start); };\n    self.__refreshShow = function() { ionic.requestAnimationFrame(refresherMethods.show); };\n    self.__refreshHide = function() { ionic.requestAnimationFrame(refresherMethods.hide); };\n    self.__refreshTail = function() { ionic.requestAnimationFrame(refresherMethods.tail); };\n    self.__refreshTailTime = 100;\n    self.__minSpinTime = 600;\n  },\n\n\n  /**\n   * Starts pull-to-refresh manually.\n   */\n  triggerPullToRefresh: function() {\n    // Use publish instead of scrollTo to allow scrolling to out of boundary position\n    // We don't need to normalize scrollLeft, zoomLevel, etc. here because we only y-scrolling when pull-to-refresh is enabled\n    this.__publish(this.__scrollLeft, -this.__refreshHeight, this.__zoomLevel, true);\n\n    var d = new Date();\n    this.refreshStartTime = d.getTime();\n\n    if (this.__refreshStart) {\n      this.__refreshStart();\n    }\n  },\n\n\n  /**\n   * Signalizes that pull-to-refresh is finished.\n   */\n  finishPullToRefresh: function() {\n    var self = this;\n    // delay to make sure the spinner has a chance to spin for a split second before it's dismissed\n    var d = new Date();\n    var delay = 0;\n    if (self.refreshStartTime + self.__minSpinTime > d.getTime()) {\n      delay = self.refreshStartTime + self.__minSpinTime - d.getTime();\n    }\n    setTimeout(function() {\n      if (self.__refreshTail) {\n        self.__refreshTail();\n      }\n      setTimeout(function() {\n        self.__refreshActive = false;\n        if (self.__refreshDeactivate) {\n          self.__refreshDeactivate();\n        }\n        if (self.__refreshHide) {\n          self.__refreshHide();\n        }\n\n        self.scrollTo(self.__scrollLeft, self.__scrollTop, true);\n      }, self.__refreshTailTime);\n    }, delay);\n  },\n\n\n  /**\n   * Returns the scroll position and zooming values\n   *\n   * @return {Map} `left` and `top` scroll position and `zoom` level\n   */\n  getValues: function() {\n    return {\n      left: this.__scrollLeft,\n      top: this.__scrollTop,\n      zoom: this.__zoomLevel\n    };\n  },\n\n\n  /**\n   * Returns the maximum scroll values\n   *\n   * @return {Map} `left` and `top` maximum scroll values\n   */\n  getScrollMax: function() {\n    return {\n      left: this.__maxScrollLeft,\n      top: this.__maxScrollTop\n    };\n  },\n\n\n  /**\n   * Zooms to the given level. Supports optional animation. Zooms\n   * the center when no coordinates are given.\n   *\n   * @param level {Number} Level to zoom to\n   * @param animate {Boolean} Whether to use animation\n   * @param originLeft {Number} Zoom in at given left coordinate\n   * @param originTop {Number} Zoom in at given top coordinate\n   */\n  zoomTo: function(level, animate, originLeft, originTop) {\n    var self = this;\n\n    if (!self.options.zooming) {\n      throw new Error(\"Zooming is not enabled!\");\n    }\n\n    // Stop deceleration\n    if (self.__isDecelerating) {\n      zyngaCore.effect.Animate.stop(self.__isDecelerating);\n      self.__isDecelerating = false;\n    }\n\n    var oldLevel = self.__zoomLevel;\n\n    // Normalize input origin to center of viewport if not defined\n    if (originLeft == null) {\n      originLeft = self.__clientWidth / 2;\n    }\n\n    if (originTop == null) {\n      originTop = self.__clientHeight / 2;\n    }\n\n    // Limit level according to configuration\n    level = Math.max(Math.min(level, self.options.maxZoom), self.options.minZoom);\n\n    // Recompute maximum values while temporary tweaking maximum scroll ranges\n    self.__computeScrollMax(level);\n\n    // Recompute left and top coordinates based on new zoom level\n    var left = ((originLeft + self.__scrollLeft) * level / oldLevel) - originLeft;\n    var top = ((originTop + self.__scrollTop) * level / oldLevel) - originTop;\n\n    // Limit x-axis\n    if (left > self.__maxScrollLeft) {\n      left = self.__maxScrollLeft;\n    } else if (left < 0) {\n      left = 0;\n    }\n\n    // Limit y-axis\n    if (top > self.__maxScrollTop) {\n      top = self.__maxScrollTop;\n    } else if (top < 0) {\n      top = 0;\n    }\n\n    // Push values out\n    self.__publish(left, top, level, animate);\n\n  },\n\n\n  /**\n   * Zooms the content by the given factor.\n   *\n   * @param factor {Number} Zoom by given factor\n   * @param animate {Boolean} Whether to use animation\n   * @param originLeft {Number} Zoom in at given left coordinate\n   * @param originTop {Number} Zoom in at given top coordinate\n   */\n  zoomBy: function(factor, animate, originLeft, originTop) {\n    this.zoomTo(this.__zoomLevel * factor, animate, originLeft, originTop);\n  },\n\n\n  /**\n   * Scrolls to the given position. Respect limitations and snapping automatically.\n   *\n   * @param left {Number} Horizontal scroll position, keeps current if value is <code>null</code>\n   * @param top {Number} Vertical scroll position, keeps current if value is <code>null</code>\n   * @param animate {Boolean} Whether the scrolling should happen using an animation\n   * @param zoom {Number} Zoom level to go to\n   */\n  scrollTo: function(left, top, animate, zoom, wasResize) {\n    var self = this;\n\n    // Stop deceleration\n    if (self.__isDecelerating) {\n      zyngaCore.effect.Animate.stop(self.__isDecelerating);\n      self.__isDecelerating = false;\n    }\n\n    // Correct coordinates based on new zoom level\n    if (zoom != null && zoom !== self.__zoomLevel) {\n\n      if (!self.options.zooming) {\n        throw new Error(\"Zooming is not enabled!\");\n      }\n\n      left *= zoom;\n      top *= zoom;\n\n      // Recompute maximum values while temporary tweaking maximum scroll ranges\n      self.__computeScrollMax(zoom);\n\n    } else {\n\n      // Keep zoom when not defined\n      zoom = self.__zoomLevel;\n\n    }\n\n    if (!self.options.scrollingX) {\n\n      left = self.__scrollLeft;\n\n    } else {\n\n      if (self.options.paging) {\n        left = Math.round(left / self.__clientWidth) * self.__clientWidth;\n      } else if (self.options.snapping) {\n        left = Math.round(left / self.__snapWidth) * self.__snapWidth;\n      }\n\n    }\n\n    if (!self.options.scrollingY) {\n\n      top = self.__scrollTop;\n\n    } else {\n\n      if (self.options.paging) {\n        top = Math.round(top / self.__clientHeight) * self.__clientHeight;\n      } else if (self.options.snapping) {\n        top = Math.round(top / self.__snapHeight) * self.__snapHeight;\n      }\n\n    }\n\n    // Limit for allowed ranges\n    left = Math.max(Math.min(self.__maxScrollLeft, left), 0);\n    top = Math.max(Math.min(self.__maxScrollTop, top), 0);\n\n    // Don't animate when no change detected, still call publish to make sure\n    // that rendered position is really in-sync with internal data\n    if (left === self.__scrollLeft && top === self.__scrollTop) {\n      animate = false;\n    }\n\n    // Publish new values\n    self.__publish(left, top, zoom, animate, wasResize);\n\n  },\n\n\n  /**\n   * Scroll by the given offset\n   *\n   * @param left {Number} Scroll x-axis by given offset\n   * @param top {Number} Scroll y-axis by given offset\n   * @param animate {Boolean} Whether to animate the given change\n   */\n  scrollBy: function(left, top, animate) {\n    var self = this;\n\n    var startLeft = self.__isAnimating ? self.__scheduledLeft : self.__scrollLeft;\n    var startTop = self.__isAnimating ? self.__scheduledTop : self.__scrollTop;\n\n    self.scrollTo(startLeft + (left || 0), startTop + (top || 0), animate);\n  },\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    EVENT CALLBACKS\n  ---------------------------------------------------------------------------\n  */\n\n  /**\n   * Mouse wheel handler for zooming support\n   */\n  doMouseZoom: function(wheelDelta, timeStamp, pageX, pageY) {\n    var change = wheelDelta > 0 ? 0.97 : 1.03;\n    return this.zoomTo(this.__zoomLevel * change, false, pageX - this.__clientLeft, pageY - this.__clientTop);\n  },\n\n  /**\n   * Touch start handler for scrolling support\n   */\n  doTouchStart: function(touches, timeStamp) {\n    var self = this;\n\n    // remember if the deceleration was just stopped\n    self.__decStopped = !!(self.__isDecelerating || self.__isAnimating);\n\n    self.hintResize();\n\n    if (timeStamp instanceof Date) {\n      timeStamp = timeStamp.valueOf();\n    }\n    if (typeof timeStamp !== \"number\") {\n      timeStamp = Date.now();\n    }\n\n    // Reset interruptedAnimation flag\n    self.__interruptedAnimation = true;\n\n    // Stop deceleration\n    if (self.__isDecelerating) {\n      zyngaCore.effect.Animate.stop(self.__isDecelerating);\n      self.__isDecelerating = false;\n      self.__interruptedAnimation = true;\n    }\n\n    // Stop animation\n    if (self.__isAnimating) {\n      zyngaCore.effect.Animate.stop(self.__isAnimating);\n      self.__isAnimating = false;\n      self.__interruptedAnimation = true;\n    }\n\n    // Use center point when dealing with two fingers\n    var currentTouchLeft, currentTouchTop;\n    var isSingleTouch = touches.length === 1;\n    if (isSingleTouch) {\n      currentTouchLeft = touches[0].pageX;\n      currentTouchTop = touches[0].pageY;\n    } else {\n      currentTouchLeft = Math.abs(touches[0].pageX + touches[1].pageX) / 2;\n      currentTouchTop = Math.abs(touches[0].pageY + touches[1].pageY) / 2;\n    }\n\n    // Store initial positions\n    self.__initialTouchLeft = currentTouchLeft;\n    self.__initialTouchTop = currentTouchTop;\n\n    // Store initial touchList for scale calculation\n    self.__initialTouches = touches;\n\n    // Store current zoom level\n    self.__zoomLevelStart = self.__zoomLevel;\n\n    // Store initial touch positions\n    self.__lastTouchLeft = currentTouchLeft;\n    self.__lastTouchTop = currentTouchTop;\n\n    // Store initial move time stamp\n    self.__lastTouchMove = timeStamp;\n\n    // Reset initial scale\n    self.__lastScale = 1;\n\n    // Reset locking flags\n    self.__enableScrollX = !isSingleTouch && self.options.scrollingX;\n    self.__enableScrollY = !isSingleTouch && self.options.scrollingY;\n\n    // Reset tracking flag\n    self.__isTracking = true;\n\n    // Reset deceleration complete flag\n    self.__didDecelerationComplete = false;\n\n    // Dragging starts directly with two fingers, otherwise lazy with an offset\n    self.__isDragging = !isSingleTouch;\n\n    // Some features are disabled in multi touch scenarios\n    self.__isSingleTouch = isSingleTouch;\n\n    // Clearing data structure\n    self.__positions = [];\n\n  },\n\n\n  /**\n   * Touch move handler for scrolling support\n   */\n  doTouchMove: function(touches, timeStamp, scale) {\n    if (timeStamp instanceof Date) {\n      timeStamp = timeStamp.valueOf();\n    }\n    if (typeof timeStamp !== \"number\") {\n      timeStamp = Date.now();\n    }\n\n    var self = this;\n\n    // Ignore event when tracking is not enabled (event might be outside of element)\n    if (!self.__isTracking) {\n      return;\n    }\n\n    var currentTouchLeft, currentTouchTop;\n\n    // Compute move based around of center of fingers\n    if (touches.length === 2) {\n      currentTouchLeft = Math.abs(touches[0].pageX + touches[1].pageX) / 2;\n      currentTouchTop = Math.abs(touches[0].pageY + touches[1].pageY) / 2;\n\n      // Calculate scale when not present and only when touches are used\n      if (!scale && self.options.zooming) {\n        scale = self.__getScale(self.__initialTouches, touches);\n      }\n    } else {\n      currentTouchLeft = touches[0].pageX;\n      currentTouchTop = touches[0].pageY;\n    }\n\n    var positions = self.__positions;\n\n    // Are we already is dragging mode?\n    if (self.__isDragging) {\n        self.__decStopped = false;\n\n      // Compute move distance\n      var moveX = currentTouchLeft - self.__lastTouchLeft;\n      var moveY = currentTouchTop - self.__lastTouchTop;\n\n      // Read previous scroll position and zooming\n      var scrollLeft = self.__scrollLeft;\n      var scrollTop = self.__scrollTop;\n      var level = self.__zoomLevel;\n\n      // Work with scaling\n      if (scale != null && self.options.zooming) {\n\n        var oldLevel = level;\n\n        // Recompute level based on previous scale and new scale\n        level = level / self.__lastScale * scale;\n\n        // Limit level according to configuration\n        level = Math.max(Math.min(level, self.options.maxZoom), self.options.minZoom);\n\n        // Only do further compution when change happened\n        if (oldLevel !== level) {\n\n          // Compute relative event position to container\n          var currentTouchLeftRel = currentTouchLeft - self.__clientLeft;\n          var currentTouchTopRel = currentTouchTop - self.__clientTop;\n\n          // Recompute left and top coordinates based on new zoom level\n          scrollLeft = ((currentTouchLeftRel + scrollLeft) * level / oldLevel) - currentTouchLeftRel;\n          scrollTop = ((currentTouchTopRel + scrollTop) * level / oldLevel) - currentTouchTopRel;\n\n          // Recompute max scroll values\n          self.__computeScrollMax(level);\n\n        }\n      }\n\n      if (self.__enableScrollX) {\n\n        scrollLeft -= moveX * self.options.speedMultiplier;\n        var maxScrollLeft = self.__maxScrollLeft;\n\n        if (scrollLeft > maxScrollLeft || scrollLeft < 0) {\n\n          // Slow down on the edges\n          if (self.options.bouncing) {\n\n            scrollLeft += (moveX / 2 * self.options.speedMultiplier);\n\n          } else if (scrollLeft > maxScrollLeft) {\n\n            scrollLeft = maxScrollLeft;\n\n          } else {\n\n            scrollLeft = 0;\n\n          }\n        }\n      }\n\n      // Compute new vertical scroll position\n      if (self.__enableScrollY) {\n\n        scrollTop -= moveY * self.options.speedMultiplier;\n        var maxScrollTop = self.__maxScrollTop;\n\n        if (scrollTop > maxScrollTop || scrollTop < 0) {\n\n          // Slow down on the edges\n          if (self.options.bouncing || (self.__refreshHeight && scrollTop < 0)) {\n\n            scrollTop += (moveY / 2 * self.options.speedMultiplier);\n\n            // Support pull-to-refresh (only when only y is scrollable)\n            if (!self.__enableScrollX && self.__refreshHeight != null) {\n\n              // hide the refresher when it's behind the header bar in case of header transparency\n              if (scrollTop < 0) {\n                self.__refreshHidden = false;\n                self.__refreshShow();\n              } else {\n                self.__refreshHide();\n                self.__refreshHidden = true;\n              }\n\n              if (!self.__refreshActive && scrollTop <= -self.__refreshHeight) {\n\n                self.__refreshActive = true;\n                if (self.__refreshActivate) {\n                  self.__refreshActivate();\n                }\n\n              } else if (self.__refreshActive && scrollTop > -self.__refreshHeight) {\n\n                self.__refreshActive = false;\n                if (self.__refreshDeactivate) {\n                  self.__refreshDeactivate();\n                }\n\n              }\n            }\n\n          } else if (scrollTop > maxScrollTop) {\n\n            scrollTop = maxScrollTop;\n\n          } else {\n\n            scrollTop = 0;\n\n          }\n        } else if (self.__refreshHeight && !self.__refreshHidden) {\n          // if a positive scroll value and the refresher is still not hidden, hide it\n          self.__refreshHide();\n          self.__refreshHidden = true;\n        }\n      }\n\n      // Keep list from growing infinitely (holding min 10, max 20 measure points)\n      if (positions.length > 60) {\n        positions.splice(0, 30);\n      }\n\n      // Track scroll movement for decleration\n      positions.push(scrollLeft, scrollTop, timeStamp);\n\n      // Sync scroll position\n      self.__publish(scrollLeft, scrollTop, level);\n\n    // Otherwise figure out whether we are switching into dragging mode now.\n    } else {\n\n      var minimumTrackingForScroll = self.options.locking ? 3 : 0;\n      var minimumTrackingForDrag = 5;\n\n      var distanceX = Math.abs(currentTouchLeft - self.__initialTouchLeft);\n      var distanceY = Math.abs(currentTouchTop - self.__initialTouchTop);\n\n      self.__enableScrollX = self.options.scrollingX && distanceX >= minimumTrackingForScroll;\n      self.__enableScrollY = self.options.scrollingY && distanceY >= minimumTrackingForScroll;\n\n      positions.push(self.__scrollLeft, self.__scrollTop, timeStamp);\n\n      self.__isDragging = (self.__enableScrollX || self.__enableScrollY) && (distanceX >= minimumTrackingForDrag || distanceY >= minimumTrackingForDrag);\n      if (self.__isDragging) {\n        self.__interruptedAnimation = false;\n        self.__fadeScrollbars('in');\n      }\n\n    }\n\n    // Update last touch positions and time stamp for next event\n    self.__lastTouchLeft = currentTouchLeft;\n    self.__lastTouchTop = currentTouchTop;\n    self.__lastTouchMove = timeStamp;\n    self.__lastScale = scale;\n\n  },\n\n\n  /**\n   * Touch end handler for scrolling support\n   */\n  doTouchEnd: function(e, timeStamp) {\n    if (timeStamp instanceof Date) {\n      timeStamp = timeStamp.valueOf();\n    }\n    if (typeof timeStamp !== \"number\") {\n      timeStamp = Date.now();\n    }\n\n    var self = this;\n\n    // Ignore event when tracking is not enabled (no touchstart event on element)\n    // This is required as this listener ('touchmove') sits on the document and not on the element itself.\n    if (!self.__isTracking) {\n      return;\n    }\n\n    // Not touching anymore (when two finger hit the screen there are two touch end events)\n    self.__isTracking = false;\n\n    // Be sure to reset the dragging flag now. Here we also detect whether\n    // the finger has moved fast enough to switch into a deceleration animation.\n    if (self.__isDragging) {\n\n      // Reset dragging flag\n      self.__isDragging = false;\n\n      // Start deceleration\n      // Verify that the last move detected was in some relevant time frame\n      if (self.__isSingleTouch && self.options.animating && (timeStamp - self.__lastTouchMove) <= 100) {\n\n        // Then figure out what the scroll position was about 100ms ago\n        var positions = self.__positions;\n        var endPos = positions.length - 1;\n        var startPos = endPos;\n\n        // Move pointer to position measured 100ms ago\n        for (var i = endPos; i > 0 && positions[i] > (self.__lastTouchMove - 100); i -= 3) {\n          startPos = i;\n        }\n\n        // If start and stop position is identical in a 100ms timeframe,\n        // we cannot compute any useful deceleration.\n        if (startPos !== endPos) {\n\n          // Compute relative movement between these two points\n          var timeOffset = positions[endPos] - positions[startPos];\n          var movedLeft = self.__scrollLeft - positions[startPos - 2];\n          var movedTop = self.__scrollTop - positions[startPos - 1];\n\n          // Based on 50ms compute the movement to apply for each render step\n          self.__decelerationVelocityX = movedLeft / timeOffset * (1000 / 60);\n          self.__decelerationVelocityY = movedTop / timeOffset * (1000 / 60);\n\n          // How much velocity is required to start the deceleration\n          var minVelocityToStartDeceleration = self.options.paging || self.options.snapping ? self.options.decelVelocityThresholdPaging : self.options.decelVelocityThreshold;\n\n          // Verify that we have enough velocity to start deceleration\n          if (Math.abs(self.__decelerationVelocityX) > minVelocityToStartDeceleration || Math.abs(self.__decelerationVelocityY) > minVelocityToStartDeceleration) {\n\n            // Deactivate pull-to-refresh when decelerating\n            if (!self.__refreshActive) {\n              self.__startDeceleration(timeStamp);\n            }\n          }\n        } else {\n          self.__scrollingComplete();\n        }\n      } else if ((timeStamp - self.__lastTouchMove) > 100) {\n        self.__scrollingComplete();\n      }\n\n    } else if (self.__decStopped) {\n      // the deceleration was stopped\n      // user flicked the scroll fast, and stop dragging, then did a touchstart to stop the srolling\n      // tell the touchend event code to do nothing, we don't want to actually send a click\n      e.isTapHandled = true;\n      self.__decStopped = false;\n    }\n\n    // If this was a slower move it is per default non decelerated, but this\n    // still means that we want snap back to the bounds which is done here.\n    // This is placed outside the condition above to improve edge case stability\n    // e.g. touchend fired without enabled dragging. This should normally do not\n    // have modified the scroll positions or even showed the scrollbars though.\n    if (!self.__isDecelerating) {\n\n      if (self.__refreshActive && self.__refreshStart) {\n\n        // Use publish instead of scrollTo to allow scrolling to out of boundary position\n        // We don't need to normalize scrollLeft, zoomLevel, etc. here because we only y-scrolling when pull-to-refresh is enabled\n        self.__publish(self.__scrollLeft, -self.__refreshHeight, self.__zoomLevel, true);\n\n        var d = new Date();\n        self.refreshStartTime = d.getTime();\n\n        if (self.__refreshStart) {\n          self.__refreshStart();\n        }\n        // for iOS-ey style scrolling\n        if (!ionic.Platform.isAndroid())self.__startDeceleration();\n      } else {\n\n        if (self.__interruptedAnimation || self.__isDragging) {\n          self.__scrollingComplete();\n        }\n        self.scrollTo(self.__scrollLeft, self.__scrollTop, true, self.__zoomLevel);\n\n        // Directly signalize deactivation (nothing todo on refresh?)\n        if (self.__refreshActive) {\n\n          self.__refreshActive = false;\n          if (self.__refreshDeactivate) {\n            self.__refreshDeactivate();\n          }\n\n        }\n      }\n    }\n\n    // Fully cleanup list\n    self.__positions.length = 0;\n\n  },\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    PRIVATE API\n  ---------------------------------------------------------------------------\n  */\n\n  /**\n   * Applies the scroll position to the content element\n   *\n   * @param left {Number} Left scroll position\n   * @param top {Number} Top scroll position\n   * @param animate {Boolean} Whether animation should be used to move to the new coordinates\n   */\n  __publish: function(left, top, zoom, animate, wasResize) {\n\n    var self = this;\n\n    // Remember whether we had an animation, then we try to continue based on the current \"drive\" of the animation\n    var wasAnimating = self.__isAnimating;\n    if (wasAnimating) {\n      zyngaCore.effect.Animate.stop(wasAnimating);\n      self.__isAnimating = false;\n    }\n\n    if (animate && self.options.animating) {\n\n      // Keep scheduled positions for scrollBy/zoomBy functionality\n      self.__scheduledLeft = left;\n      self.__scheduledTop = top;\n      self.__scheduledZoom = zoom;\n\n      var oldLeft = self.__scrollLeft;\n      var oldTop = self.__scrollTop;\n      var oldZoom = self.__zoomLevel;\n\n      var diffLeft = left - oldLeft;\n      var diffTop = top - oldTop;\n      var diffZoom = zoom - oldZoom;\n\n      var step = function(percent, now, render) {\n\n        if (render) {\n\n          self.__scrollLeft = oldLeft + (diffLeft * percent);\n          self.__scrollTop = oldTop + (diffTop * percent);\n          self.__zoomLevel = oldZoom + (diffZoom * percent);\n\n          // Push values out\n          if (self.__callback) {\n            self.__callback(self.__scrollLeft, self.__scrollTop, self.__zoomLevel, wasResize);\n          }\n\n        }\n      };\n\n      var verify = function(id) {\n        return self.__isAnimating === id;\n      };\n\n      var completed = function(renderedFramesPerSecond, animationId, wasFinished) {\n        if (animationId === self.__isAnimating) {\n          self.__isAnimating = false;\n        }\n        if (self.__didDecelerationComplete || wasFinished) {\n          self.__scrollingComplete();\n        }\n\n        if (self.options.zooming) {\n          self.__computeScrollMax();\n        }\n      };\n\n      // When continuing based on previous animation we choose an ease-out animation instead of ease-in-out\n      self.__isAnimating = zyngaCore.effect.Animate.start(step, verify, completed, self.options.animationDuration, wasAnimating ? easeOutCubic : easeInOutCubic);\n\n    } else {\n\n      self.__scheduledLeft = self.__scrollLeft = left;\n      self.__scheduledTop = self.__scrollTop = top;\n      self.__scheduledZoom = self.__zoomLevel = zoom;\n\n      // Push values out\n      if (self.__callback) {\n        self.__callback(left, top, zoom, wasResize);\n      }\n\n      // Fix max scroll ranges\n      if (self.options.zooming) {\n        self.__computeScrollMax();\n      }\n    }\n  },\n\n\n  /**\n   * Recomputes scroll minimum values based on client dimensions and content dimensions.\n   */\n  __computeScrollMax: function(zoomLevel) {\n    var self = this;\n\n    if (zoomLevel == null) {\n      zoomLevel = self.__zoomLevel;\n    }\n\n    self.__maxScrollLeft = Math.max((self.__contentWidth * zoomLevel) - self.__clientWidth, 0);\n    self.__maxScrollTop = Math.max((self.__contentHeight * zoomLevel) - self.__clientHeight, 0);\n\n    if (!self.__didWaitForSize && !self.__maxScrollLeft && !self.__maxScrollTop) {\n      self.__didWaitForSize = true;\n      self.__waitForSize();\n    }\n  },\n\n\n  /**\n   * If the scroll view isn't sized correctly on start, wait until we have at least some size\n   */\n  __waitForSize: function() {\n    var self = this;\n\n    clearTimeout(self.__sizerTimeout);\n\n    var sizer = function() {\n      self.resize(true);\n    };\n\n    sizer();\n    self.__sizerTimeout = setTimeout(sizer, 500);\n  },\n\n  /*\n  ---------------------------------------------------------------------------\n    ANIMATION (DECELERATION) SUPPORT\n  ---------------------------------------------------------------------------\n  */\n\n  /**\n   * Called when a touch sequence end and the speed of the finger was high enough\n   * to switch into deceleration mode.\n   */\n  __startDeceleration: function() {\n    var self = this;\n\n    if (self.options.paging) {\n\n      var scrollLeft = Math.max(Math.min(self.__scrollLeft, self.__maxScrollLeft), 0);\n      var scrollTop = Math.max(Math.min(self.__scrollTop, self.__maxScrollTop), 0);\n      var clientWidth = self.__clientWidth;\n      var clientHeight = self.__clientHeight;\n\n      // We limit deceleration not to the min/max values of the allowed range, but to the size of the visible client area.\n      // Each page should have exactly the size of the client area.\n      self.__minDecelerationScrollLeft = Math.floor(scrollLeft / clientWidth) * clientWidth;\n      self.__minDecelerationScrollTop = Math.floor(scrollTop / clientHeight) * clientHeight;\n      self.__maxDecelerationScrollLeft = Math.ceil(scrollLeft / clientWidth) * clientWidth;\n      self.__maxDecelerationScrollTop = Math.ceil(scrollTop / clientHeight) * clientHeight;\n\n    } else {\n\n      self.__minDecelerationScrollLeft = 0;\n      self.__minDecelerationScrollTop = 0;\n      self.__maxDecelerationScrollLeft = self.__maxScrollLeft;\n      self.__maxDecelerationScrollTop = self.__maxScrollTop;\n      if (self.__refreshActive) self.__minDecelerationScrollTop = self.__refreshHeight * -1;\n    }\n\n    // Wrap class method\n    var step = function(percent, now, render) {\n      self.__stepThroughDeceleration(render);\n    };\n\n    // How much velocity is required to keep the deceleration running\n    self.__minVelocityToKeepDecelerating = self.options.snapping ? 4 : 0.1;\n\n    // Detect whether it's still worth to continue animating steps\n    // If we are already slow enough to not being user perceivable anymore, we stop the whole process here.\n    var verify = function() {\n      var shouldContinue = Math.abs(self.__decelerationVelocityX) >= self.__minVelocityToKeepDecelerating ||\n        Math.abs(self.__decelerationVelocityY) >= self.__minVelocityToKeepDecelerating;\n      if (!shouldContinue) {\n        self.__didDecelerationComplete = true;\n\n        //Make sure the scroll values are within the boundaries after a bounce,\n        //not below 0 or above maximum\n        if (self.options.bouncing && !self.__refreshActive) {\n          self.scrollTo(\n            Math.min( Math.max(self.__scrollLeft, 0), self.__maxScrollLeft ),\n            Math.min( Math.max(self.__scrollTop, 0), self.__maxScrollTop ),\n            self.__refreshActive\n          );\n        }\n      }\n      return shouldContinue;\n    };\n\n    var completed = function() {\n      self.__isDecelerating = false;\n      if (self.__didDecelerationComplete) {\n        self.__scrollingComplete();\n      }\n\n      // Animate to grid when snapping is active, otherwise just fix out-of-boundary positions\n      if (self.options.paging) {\n        self.scrollTo(self.__scrollLeft, self.__scrollTop, self.options.snapping);\n      }\n    };\n\n    // Start animation and switch on flag\n    self.__isDecelerating = zyngaCore.effect.Animate.start(step, verify, completed);\n\n  },\n\n\n  /**\n   * Called on every step of the animation\n   *\n   * @param inMemory {Boolean} Whether to not render the current step, but keep it in memory only. Used internally only!\n   */\n  __stepThroughDeceleration: function(render) {\n    var self = this;\n\n\n    //\n    // COMPUTE NEXT SCROLL POSITION\n    //\n\n    // Add deceleration to scroll position\n    var scrollLeft = self.__scrollLeft + self.__decelerationVelocityX;// * self.options.deceleration);\n    var scrollTop = self.__scrollTop + self.__decelerationVelocityY;// * self.options.deceleration);\n\n\n    //\n    // HARD LIMIT SCROLL POSITION FOR NON BOUNCING MODE\n    //\n\n    if (!self.options.bouncing) {\n\n      var scrollLeftFixed = Math.max(Math.min(self.__maxDecelerationScrollLeft, scrollLeft), self.__minDecelerationScrollLeft);\n      if (scrollLeftFixed !== scrollLeft) {\n        scrollLeft = scrollLeftFixed;\n        self.__decelerationVelocityX = 0;\n      }\n\n      var scrollTopFixed = Math.max(Math.min(self.__maxDecelerationScrollTop, scrollTop), self.__minDecelerationScrollTop);\n      if (scrollTopFixed !== scrollTop) {\n        scrollTop = scrollTopFixed;\n        self.__decelerationVelocityY = 0;\n      }\n\n    }\n\n\n    //\n    // UPDATE SCROLL POSITION\n    //\n\n    if (render) {\n\n      self.__publish(scrollLeft, scrollTop, self.__zoomLevel);\n\n    } else {\n\n      self.__scrollLeft = scrollLeft;\n      self.__scrollTop = scrollTop;\n\n    }\n\n\n    //\n    // SLOW DOWN\n    //\n\n    // Slow down velocity on every iteration\n    if (!self.options.paging) {\n\n      // This is the factor applied to every iteration of the animation\n      // to slow down the process. This should emulate natural behavior where\n      // objects slow down when the initiator of the movement is removed\n      var frictionFactor = self.options.deceleration;\n\n      self.__decelerationVelocityX *= frictionFactor;\n      self.__decelerationVelocityY *= frictionFactor;\n\n    }\n\n\n    //\n    // BOUNCING SUPPORT\n    //\n\n    if (self.options.bouncing) {\n\n      var scrollOutsideX = 0;\n      var scrollOutsideY = 0;\n\n      // This configures the amount of change applied to deceleration/acceleration when reaching boundaries\n      var penetrationDeceleration = self.options.penetrationDeceleration;\n      var penetrationAcceleration = self.options.penetrationAcceleration;\n\n      // Check limits\n      if (scrollLeft < self.__minDecelerationScrollLeft) {\n        scrollOutsideX = self.__minDecelerationScrollLeft - scrollLeft;\n      } else if (scrollLeft > self.__maxDecelerationScrollLeft) {\n        scrollOutsideX = self.__maxDecelerationScrollLeft - scrollLeft;\n      }\n\n      if (scrollTop < self.__minDecelerationScrollTop) {\n        scrollOutsideY = self.__minDecelerationScrollTop - scrollTop;\n      } else if (scrollTop > self.__maxDecelerationScrollTop) {\n        scrollOutsideY = self.__maxDecelerationScrollTop - scrollTop;\n      }\n\n      // Slow down until slow enough, then flip back to snap position\n      if (scrollOutsideX !== 0) {\n        var isHeadingOutwardsX = scrollOutsideX * self.__decelerationVelocityX <= self.__minDecelerationScrollLeft;\n        if (isHeadingOutwardsX) {\n          self.__decelerationVelocityX += scrollOutsideX * penetrationDeceleration;\n        }\n        var isStoppedX = Math.abs(self.__decelerationVelocityX) <= self.__minVelocityToKeepDecelerating;\n        //If we're not heading outwards, or if the above statement got us below minDeceleration, go back towards bounds\n        if (!isHeadingOutwardsX || isStoppedX) {\n          self.__decelerationVelocityX = scrollOutsideX * penetrationAcceleration;\n        }\n      }\n\n      if (scrollOutsideY !== 0) {\n        var isHeadingOutwardsY = scrollOutsideY * self.__decelerationVelocityY <= self.__minDecelerationScrollTop;\n        if (isHeadingOutwardsY) {\n          self.__decelerationVelocityY += scrollOutsideY * penetrationDeceleration;\n        }\n        var isStoppedY = Math.abs(self.__decelerationVelocityY) <= self.__minVelocityToKeepDecelerating;\n        //If we're not heading outwards, or if the above statement got us below minDeceleration, go back towards bounds\n        if (!isHeadingOutwardsY || isStoppedY) {\n          self.__decelerationVelocityY = scrollOutsideY * penetrationAcceleration;\n        }\n      }\n    }\n  },\n\n\n  /**\n   * calculate the distance between two touches\n   * @param   {Touch}     touch1\n   * @param   {Touch}     touch2\n   * @returns {Number}    distance\n   */\n  __getDistance: function getDistance(touch1, touch2) {\n    var x = touch2.pageX - touch1.pageX,\n    y = touch2.pageY - touch1.pageY;\n    return Math.sqrt((x * x) + (y * y));\n  },\n\n\n  /**\n   * calculate the scale factor between two touchLists (fingers)\n   * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n   * @param   {Array}     start\n   * @param   {Array}     end\n   * @returns {Number}    scale\n   */\n  __getScale: function getScale(start, end) {\n    // need two fingers...\n    if (start.length >= 2 && end.length >= 2) {\n      return this.__getDistance(end[0], end[1]) /\n        this.__getDistance(start[0], start[1]);\n    }\n    return 1;\n  }\n});\n\nionic.scroll = {\n  isScrolling: false,\n  lastTop: 0\n};\n\n})(ionic);\n\n(function(ionic) {\n  var NOOP = function() {};\n  var deprecated = function(name) {\n    void 0;\n  };\n  ionic.views.ScrollNative = ionic.views.View.inherit({\n\n    initialize: function(options) {\n      var self = this;\n      self.__container = self.el = options.el;\n      self.__content = options.el.firstElementChild;\n      // Whether scrolling is frozen or not\n      self.__frozen = false;\n      self.isNative = true;\n\n      self.__scrollTop = self.el.scrollTop;\n      self.__scrollLeft = self.el.scrollLeft;\n      self.__clientHeight = self.__content.clientHeight;\n      self.__clientWidth = self.__content.clientWidth;\n      self.__maxScrollTop = Math.max((self.__contentHeight) - self.__clientHeight, 0);\n      self.__maxScrollLeft = Math.max((self.__contentWidth) - self.__clientWidth, 0);\n\n      if(options.startY >= 0 || options.startX >= 0) {\n        ionic.requestAnimationFrame(function() {\n          self.__originalContainerHeight = self.el.getBoundingClientRect().height;\n\n          self.el.scrollTop = options.startY || 0;\n          self.el.scrollLeft = options.startX || 0;\n\n          self.__scrollTop = self.el.scrollTop;\n          self.__scrollLeft = self.el.scrollLeft;\n        });\n      }\n\n      self.options = {\n\n        freeze: false,\n\n        getContentWidth: function() {\n          return Math.max(self.__content.scrollWidth, self.__content.offsetWidth);\n        },\n\n        getContentHeight: function() {\n          return Math.max(self.__content.scrollHeight, self.__content.offsetHeight + (self.__content.offsetTop * 2));\n        }\n\n      };\n\n      for (var key in options) {\n        self.options[key] = options[key];\n      }\n\n      /**\n       * Sets isScrolling to true, and automatically deactivates if not called again in 80ms.\n       */\n      self.onScroll = function() {\n        if (!ionic.scroll.isScrolling) {\n          ionic.scroll.isScrolling = true;\n        }\n\n        clearTimeout(self.scrollTimer);\n        self.scrollTimer = setTimeout(function() {\n          ionic.scroll.isScrolling = false;\n        }, 80);\n      };\n\n      self.freeze = function(shouldFreeze) {\n        self.__frozen = shouldFreeze;\n      };\n      // A more powerful freeze pop that dominates all other freeze pops\n      self.freezeShut = function(shouldFreezeShut) {\n        self.__frozenShut = shouldFreezeShut;\n      };\n\n      self.__initEventHandlers();\n    },\n\n    /**  Methods not used in native scrolling */\n    __callback: function() { deprecated('__callback'); },\n    zoomTo: function() { deprecated('zoomTo'); },\n    zoomBy: function() { deprecated('zoomBy'); },\n    activatePullToRefresh: function() { deprecated('activatePullToRefresh'); },\n\n    /**\n     * Returns the scroll position and zooming values\n     *\n     * @return {Map} `left` and `top` scroll position and `zoom` level\n     */\n    resize: function(continueScrolling) {\n      var self = this;\n      if (!self.__container || !self.options) return;\n\n      // Update Scroller dimensions for changed content\n      // Add padding to bottom of content\n      self.setDimensions(\n        self.__container.clientWidth,\n        self.__container.clientHeight,\n        self.options.getContentWidth(),\n        self.options.getContentHeight(),\n        continueScrolling\n      );\n    },\n\n    /**\n     * Initialize the scrollview\n     * In native scrolling, this only means we need to gather size information\n     */\n    run: function() {\n      this.resize();\n    },\n\n    /**\n     * Returns the scroll position and zooming values\n     *\n     * @return {Map} `left` and `top` scroll position and `zoom` level\n     */\n    getValues: function() {\n      var self = this;\n      self.update();\n      return {\n        left: self.__scrollLeft,\n        top: self.__scrollTop,\n        zoom: 1\n      };\n    },\n\n    /**\n     * Updates the __scrollLeft and __scrollTop values to el's current value\n     */\n    update: function() {\n      var self = this;\n      self.__scrollLeft = self.el.scrollLeft;\n      self.__scrollTop = self.el.scrollTop;\n    },\n\n    /**\n     * Configures the dimensions of the client (outer) and content (inner) elements.\n     * Requires the available space for the outer element and the outer size of the inner element.\n     * All values which are falsy (null or zero etc.) are ignored and the old value is kept.\n     *\n     * @param clientWidth {Integer} Inner width of outer element\n     * @param clientHeight {Integer} Inner height of outer element\n     * @param contentWidth {Integer} Outer width of inner element\n     * @param contentHeight {Integer} Outer height of inner element\n     */\n    setDimensions: function(clientWidth, clientHeight, contentWidth, contentHeight) {\n      var self = this;\n\n      if (!clientWidth && !clientHeight && !contentWidth && !contentHeight) {\n        // this scrollview isn't rendered, don't bother\n        return;\n      }\n\n      // Only update values which are defined\n      if (clientWidth === +clientWidth) {\n        self.__clientWidth = clientWidth;\n      }\n\n      if (clientHeight === +clientHeight) {\n        self.__clientHeight = clientHeight;\n      }\n\n      if (contentWidth === +contentWidth) {\n        self.__contentWidth = contentWidth;\n      }\n\n      if (contentHeight === +contentHeight) {\n        self.__contentHeight = contentHeight;\n      }\n\n      // Refresh maximums\n      self.__computeScrollMax();\n    },\n\n    /**\n     * Returns the maximum scroll values\n     *\n     * @return {Map} `left` and `top` maximum scroll values\n     */\n    getScrollMax: function() {\n      return {\n        left: this.__maxScrollLeft,\n        top: this.__maxScrollTop\n      };\n    },\n\n    /**\n     * Scrolls by the given amount in px.\n     *\n     * @param left {Number} Horizontal scroll position, keeps current if value is <code>null</code>\n     * @param top {Number} Vertical scroll position, keeps current if value is <code>null</code>\n     * @param animate {Boolean} Whether the scrolling should happen using an animation\n     */\n\n    scrollBy: function(left, top, animate) {\n      var self = this;\n\n      // update scroll vars before refferencing them\n      self.update();\n\n      var startLeft = self.__isAnimating ? self.__scheduledLeft : self.__scrollLeft;\n      var startTop = self.__isAnimating ? self.__scheduledTop : self.__scrollTop;\n\n      self.scrollTo(startLeft + (left || 0), startTop + (top || 0), animate);\n    },\n\n    /**\n     * Scrolls to the given position in px.\n     *\n     * @param left {Number} Horizontal scroll position, keeps current if value is <code>null</code>\n     * @param top {Number} Vertical scroll position, keeps current if value is <code>null</code>\n     * @param animate {Boolean} Whether the scrolling should happen using an animation\n     */\n    scrollTo: function(left, top, animate) {\n      var self = this;\n      if (!animate) {\n        self.el.scrollTop = top;\n        self.el.scrollLeft = left;\n        self.resize();\n        return;\n      }\n\n      var oldOverflowX = self.el.style.overflowX;\n      var oldOverflowY = self.el.style.overflowY;\n\n      clearTimeout(self.__scrollToCleanupTimeout);\n      self.__scrollToCleanupTimeout = setTimeout(function() {\n        self.el.style.overflowX = oldOverflowX;\n        self.el.style.overflowY = oldOverflowY;\n      }, 500);\n\n      self.el.style.overflowY = 'hidden';\n      self.el.style.overflowX = 'hidden';\n\n      animateScroll(top, left);\n\n      function animateScroll(Y, X) {\n        // scroll animation loop w/ easing\n        // credit https://gist.github.com/dezinezync/5487119\n        var start = Date.now(),\n          duration = 250, //milliseconds\n          fromY = self.el.scrollTop,\n          fromX = self.el.scrollLeft;\n\n        if (fromY === Y && fromX === X) {\n          self.el.style.overflowX = oldOverflowX;\n          self.el.style.overflowY = oldOverflowY;\n          self.resize();\n          return; /* Prevent scrolling to the Y point if already there */\n        }\n\n        // decelerating to zero velocity\n        function easeOutCubic(t) {\n          return (--t) * t * t + 1;\n        }\n\n        // scroll loop\n        function animateScrollStep() {\n          var currentTime = Date.now(),\n            time = Math.min(1, ((currentTime - start) / duration)),\n          // where .5 would be 50% of time on a linear scale easedT gives a\n          // fraction based on the easing method\n            easedT = easeOutCubic(time);\n\n          if (fromY != Y) {\n            self.el.scrollTop = parseInt((easedT * (Y - fromY)) + fromY, 10);\n          }\n          if (fromX != X) {\n            self.el.scrollLeft = parseInt((easedT * (X - fromX)) + fromX, 10);\n          }\n\n          if (time < 1) {\n            ionic.requestAnimationFrame(animateScrollStep);\n\n          } else {\n            // done\n            ionic.tap.removeClonedInputs(self.__container, self);\n            self.el.style.overflowX = oldOverflowX;\n            self.el.style.overflowY = oldOverflowY;\n            self.resize();\n          }\n        }\n\n        // start scroll loop\n        ionic.requestAnimationFrame(animateScrollStep);\n      }\n    },\n\n\n\n    /*\n     ---------------------------------------------------------------------------\n     PRIVATE API\n     ---------------------------------------------------------------------------\n     */\n\n    /**\n     * If the scroll view isn't sized correctly on start, wait until we have at least some size\n     */\n    __waitForSize: function() {\n      var self = this;\n\n      clearTimeout(self.__sizerTimeout);\n\n      var sizer = function() {\n        self.resize(true);\n      };\n\n      sizer();\n      self.__sizerTimeout = setTimeout(sizer, 500);\n    },\n\n\n    /**\n     * Recomputes scroll minimum values based on client dimensions and content dimensions.\n     */\n    __computeScrollMax: function() {\n      var self = this;\n\n      self.__maxScrollLeft = Math.max((self.__contentWidth) - self.__clientWidth, 0);\n      self.__maxScrollTop = Math.max((self.__contentHeight) - self.__clientHeight, 0);\n\n      if (!self.__didWaitForSize && !self.__maxScrollLeft && !self.__maxScrollTop) {\n        self.__didWaitForSize = true;\n        self.__waitForSize();\n      }\n    },\n\n    __initEventHandlers: function() {\n      var self = this;\n\n      // Event Handler\n      var container = self.__container;\n      // save height when scroll view is shrunk so we don't need to reflow\n      var scrollViewOffsetHeight;\n\n      var lastKeyboardHeight;\n\n      /**\n       * Shrink the scroll view when the keyboard is up if necessary and if the\n       * focused input is below the bottom of the shrunk scroll view, scroll it\n       * into view.\n       */\n      self.scrollChildIntoView = function(e) {\n        var rect = container.getBoundingClientRect();\n        if(!self.__originalContainerHeight) {\n          self.__originalContainerHeight = rect.height;\n        }\n\n        // D\n        //var scrollBottomOffsetToTop = rect.bottom;\n        // D - A\n        scrollViewOffsetHeight = self.__originalContainerHeight;\n        //console.log('Scroll view offset height', scrollViewOffsetHeight);\n        //console.dir(container);\n        var alreadyShrunk = self.isShrunkForKeyboard;\n\n        var isModal = container.parentNode.classList.contains('modal');\n        var isPopover = container.parentNode.classList.contains('popover');\n        // 680px is when the media query for 60% modal width kicks in\n        var isInsetModal = isModal && window.innerWidth >= 680;\n\n       /*\n        *  _______\n        * |---A---| <- top of scroll view\n        * |       |\n        * |---B---| <- keyboard\n        * |   C   | <- input\n        * |---D---| <- initial bottom of scroll view\n        * |___E___| <- bottom of viewport\n        *\n        *  All commented calculations relative to the top of the viewport (ie E\n        *  is the viewport height, not 0)\n        */\n\n\n        var changedKeyboardHeight = lastKeyboardHeight && (lastKeyboardHeight !== e.detail.keyboardHeight);\n\n        if (!alreadyShrunk || changedKeyboardHeight) {\n          // shrink scrollview so we can actually scroll if the input is hidden\n          // if it isn't shrink so we can scroll to inputs under the keyboard\n          // inset modals won't shrink on Android on their own when the keyboard appears\n          if ( !isPopover && (ionic.Platform.isIOS() || ionic.Platform.isFullScreen || isInsetModal) ) {\n            // if there are things below the scroll view account for them and\n            // subtract them from the keyboard height when resizing\n            // E - D                         E                         D\n            //var scrollBottomOffsetToBottom = e.detail.viewportHeight - scrollBottomOffsetToTop;\n\n            // 0 or D - B if D > B           E - B                     E - D\n            //var keyboardOffset = e.detail.keyboardHeight - scrollBottomOffsetToBottom;\n\n            ionic.requestAnimationFrame(function(){\n              // D - A or B - A if D > B       D - A             max(0, D - B)\n              scrollViewOffsetHeight = Math.max(0, Math.min(self.__originalContainerHeight, self.__originalContainerHeight - (e.detail.keyboardHeight - 43)));//keyboardOffset >= 0 ? scrollViewOffsetHeight - keyboardOffset : scrollViewOffsetHeight + keyboardOffset;\n\n              //console.log('Old container height', self.__originalContainerHeight, 'New container height', scrollViewOffsetHeight, 'Keyboard height', e.detail.keyboardHeight);\n\n              container.style.height = scrollViewOffsetHeight + \"px\";\n\n              /*\n              if (ionic.Platform.isIOS()) {\n                // Force redraw to avoid disappearing content\n                var disp = container.style.display;\n                container.style.display = 'none';\n                var trick = container.offsetHeight;\n                container.style.display = disp;\n              }\n              */\n              container.classList.add('keyboard-up');\n              //update scroll view\n              self.resize();\n            });\n          }\n\n          self.isShrunkForKeyboard = true;\n        }\n\n        lastKeyboardHeight = e.detail.keyboardHeight;\n\n        /*\n         *  _______\n         * |---A---| <- top of scroll view\n         * |   *   | <- where we want to scroll to\n         * |--B-D--| <- keyboard, bottom of scroll view\n         * |   C   | <- input\n         * |       |\n         * |___E___| <- bottom of viewport\n         *\n         *  All commented calculations relative to the top of the viewport (ie E\n         *  is the viewport height, not 0)\n         */\n        // if the element is positioned under the keyboard scroll it into view\n        if (e.detail.isElementUnderKeyboard) {\n\n          ionic.requestAnimationFrame(function(){\n            var pos = ionic.DomUtil.getOffsetTop(e.detail.target);\n            setTimeout(function() {\n              if (ionic.Platform.isIOS()) {\n                ionic.tap.cloneFocusedInput(container, self);\n              }\n              // Scroll the input into view, with a 100px buffer\n              self.scrollTo(0, pos - (rect.top + 100), true);\n              self.onScroll();\n            }, 32);\n\n            /*\n            // update D if we shrunk\n            if (self.isShrunkForKeyboard && !alreadyShrunk) {\n              scrollBottomOffsetToTop = container.getBoundingClientRect().bottom;\n              console.log('Scroll bottom', scrollBottomOffsetToTop);\n            }\n\n            // middle of the scrollview, this is where we want to scroll to\n            // (D - A) / 2\n            var scrollMidpointOffset = scrollViewOffsetHeight * 0.5;\n            console.log('Midpoint', scrollMidpointOffset);\n            //console.log(\"container.offsetHeight: \" + scrollViewOffsetHeight);\n\n            // middle of the input we want to scroll into view\n            // C\n            var inputMidpoint = ((e.detail.elementBottom + e.detail.elementTop) / 2);\n            console.log('Input midpoint');\n\n            // distance from middle of input to the bottom of the scroll view\n            // C - D                                C               D\n            var inputMidpointOffsetToScrollBottom = inputMidpoint - scrollBottomOffsetToTop;\n            console.log('Input midpoint offset', inputMidpointOffsetToScrollBottom);\n\n            //C - D + (D - A)/2          C - D                     (D - A)/ 2\n            var scrollTop = inputMidpointOffsetToScrollBottom + scrollMidpointOffset;\n            console.log('Scroll top', scrollTop);\n\n            if ( scrollTop > 0) {\n              if (ionic.Platform.isIOS()) {\n                //just shrank scroll view, give it some breathing room before scrolling\n                setTimeout(function(){\n                  ionic.tap.cloneFocusedInput(container, self);\n                  self.scrollBy(0, scrollTop, true);\n                  self.onScroll();\n                }, 32);\n              } else {\n                self.scrollBy(0, scrollTop, true);\n                self.onScroll();\n              }\n            }\n            */\n          });\n        }\n\n        // Only the first scrollView parent of the element that broadcasted this event\n        // (the active element that needs to be shown) should receive this event\n        e.stopPropagation();\n      };\n\n      self.resetScrollView = function() {\n        //return scrollview to original height once keyboard has hidden\n        if (self.isShrunkForKeyboard) {\n          self.isShrunkForKeyboard = false;\n          container.style.height = \"\";\n\n          /*\n          if (ionic.Platform.isIOS()) {\n            // Force redraw to avoid disappearing content\n            var disp = container.style.display;\n            container.style.display = 'none';\n            var trick = container.offsetHeight;\n            container.style.display = disp;\n          }\n          */\n\n          self.__originalContainerHeight = container.getBoundingClientRect().height;\n\n          if (ionic.Platform.isIOS()) {\n            ionic.requestAnimationFrame(function() {\n              container.classList.remove('keyboard-up');\n            });\n          }\n\n        }\n        self.resize();\n      };\n\n      self.handleTouchMove = function(e) {\n        if (self.__frozenShut) {\n          e.preventDefault();\n          e.stopPropagation();\n          return false;\n\n        } else if ( self.__frozen ){\n          e.preventDefault();\n          // let it propagate so other events such as drag events can happen,\n          // but don't let it actually scroll\n          return false;\n        }\n        return true;\n      };\n\n      container.addEventListener('scroll', self.onScroll);\n\n      //Broadcasted when keyboard is shown on some platforms.\n      //See js/utils/keyboard.js\n      container.addEventListener('scrollChildIntoView', self.scrollChildIntoView);\n\n      container.addEventListener(ionic.EVENTS.touchstart, self.handleTouchMove);\n      container.addEventListener(ionic.EVENTS.touchmove, self.handleTouchMove);\n\n      // Listen on document because container may not have had the last\n      // keyboardActiveElement, for example after closing a modal with a focused\n      // input and returning to a previously resized scroll view in an ion-content.\n      // Since we can only resize scroll views that are currently visible, just resize\n      // the current scroll view when the keyboard is closed.\n      document.addEventListener('resetScrollView', self.resetScrollView);\n    },\n\n    __cleanup: function() {\n      var self = this;\n      var container = self.__container;\n\n      container.removeEventListener('scroll', self.onScroll);\n      container.removeEventListener('scrollChildIntoView', self.scrollChildIntoView);\n\n      container.removeEventListener(ionic.EVENTS.touchstart, self.handleTouchMove);\n      container.removeEventListener(ionic.EVENTS.touchmove, self.handleTouchMove);\n\n      document.removeEventListener('resetScrollView', self.resetScrollView);\n\n      ionic.tap.removeClonedInputs(container, self);\n\n      delete self.__container;\n      delete self.__content;\n      delete self.__indicatorX;\n      delete self.__indicatorY;\n      delete self.options.el;\n\n      self.resize = self.scrollTo = self.onScroll = self.resetScrollView = NOOP;\n      self.scrollChildIntoView = NOOP;\n      container = null;\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  var ITEM_CLASS = 'item';\n  var ITEM_CONTENT_CLASS = 'item-content';\n  var ITEM_SLIDING_CLASS = 'item-sliding';\n  var ITEM_OPTIONS_CLASS = 'item-options';\n  var ITEM_PLACEHOLDER_CLASS = 'item-placeholder';\n  var ITEM_REORDERING_CLASS = 'item-reordering';\n  var ITEM_REORDER_BTN_CLASS = 'item-reorder';\n\n  var DragOp = function() {};\n  DragOp.prototype = {\n    start: function(){},\n    drag: function(){},\n    end: function(){},\n    isSameItem: function() {\n      return false;\n    }\n  };\n\n  var SlideDrag = function(opts) {\n    this.dragThresholdX = opts.dragThresholdX || 10;\n    this.el = opts.el;\n    this.item = opts.item;\n    this.canSwipe = opts.canSwipe;\n  };\n\n  SlideDrag.prototype = new DragOp();\n\n  SlideDrag.prototype.start = function(e) {\n    var content, buttons, offsetX, buttonsWidth;\n\n    if (!this.canSwipe()) {\n      return;\n    }\n\n    if (e.target.classList.contains(ITEM_CONTENT_CLASS)) {\n      content = e.target;\n    } else if (e.target.classList.contains(ITEM_CLASS)) {\n      content = e.target.querySelector('.' + ITEM_CONTENT_CLASS);\n    } else {\n      content = ionic.DomUtil.getParentWithClass(e.target, ITEM_CONTENT_CLASS);\n    }\n\n    // If we don't have a content area as one of our children (or ourselves), skip\n    if (!content) {\n      return;\n    }\n\n    // Make sure we aren't animating as we slide\n    content.classList.remove(ITEM_SLIDING_CLASS);\n\n    // Grab the starting X point for the item (for example, so we can tell whether it is open or closed to start)\n    offsetX = parseFloat(content.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]) || 0;\n\n    // Grab the buttons\n    buttons = content.parentNode.querySelector('.' + ITEM_OPTIONS_CLASS);\n    if (!buttons) {\n      return;\n    }\n    buttons.classList.remove('invisible');\n\n    buttonsWidth = buttons.offsetWidth;\n\n    this._currentDrag = {\n      buttons: buttons,\n      buttonsWidth: buttonsWidth,\n      content: content,\n      startOffsetX: offsetX\n    };\n  };\n\n  /**\n   * Check if this is the same item that was previously dragged.\n   */\n  SlideDrag.prototype.isSameItem = function(op) {\n    if (op._lastDrag && this._currentDrag) {\n      return this._currentDrag.content == op._lastDrag.content;\n    }\n    return false;\n  };\n\n  SlideDrag.prototype.clean = function(isInstant) {\n    var lastDrag = this._lastDrag;\n\n    if (!lastDrag || !lastDrag.content) return;\n\n    lastDrag.content.style[ionic.CSS.TRANSITION] = '';\n    lastDrag.content.style[ionic.CSS.TRANSFORM] = '';\n    if (isInstant) {\n      lastDrag.content.style[ionic.CSS.TRANSITION] = 'none';\n      makeInvisible();\n      ionic.requestAnimationFrame(function() {\n        lastDrag.content.style[ionic.CSS.TRANSITION] = '';\n      });\n    } else {\n      ionic.requestAnimationFrame(function() {\n        setTimeout(makeInvisible, 250);\n      });\n    }\n    function makeInvisible() {\n      lastDrag.buttons && lastDrag.buttons.classList.add('invisible');\n    }\n  };\n\n  SlideDrag.prototype.drag = ionic.animationFrameThrottle(function(e) {\n    var buttonsWidth;\n\n    // We really aren't dragging\n    if (!this._currentDrag) {\n      return;\n    }\n\n    // Check if we should start dragging. Check if we've dragged past the threshold,\n    // or we are starting from the open state.\n    if (!this._isDragging &&\n        ((Math.abs(e.gesture.deltaX) > this.dragThresholdX) ||\n        (Math.abs(this._currentDrag.startOffsetX) > 0))) {\n      this._isDragging = true;\n    }\n\n    if (this._isDragging) {\n      buttonsWidth = this._currentDrag.buttonsWidth;\n\n      // Grab the new X point, capping it at zero\n      var newX = Math.min(0, this._currentDrag.startOffsetX + e.gesture.deltaX);\n\n      // If the new X position is past the buttons, we need to slow down the drag (rubber band style)\n      if (newX < -buttonsWidth) {\n        // Calculate the new X position, capped at the top of the buttons\n        newX = Math.min(-buttonsWidth, -buttonsWidth + (((e.gesture.deltaX + buttonsWidth) * 0.4)));\n      }\n\n      this._currentDrag.content.$$ionicOptionsOpen = newX !== 0;\n\n      this._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + newX + 'px, 0, 0)';\n      this._currentDrag.content.style[ionic.CSS.TRANSITION] = 'none';\n    }\n  });\n\n  SlideDrag.prototype.end = function(e, doneCallback) {\n    var self = this;\n\n    // There is no drag, just end immediately\n    if (!self._currentDrag) {\n      doneCallback && doneCallback();\n      return;\n    }\n\n    // If we are currently dragging, we want to snap back into place\n    // The final resting point X will be the width of the exposed buttons\n    var restingPoint = -self._currentDrag.buttonsWidth;\n\n    // Check if the drag didn't clear the buttons mid-point\n    // and we aren't moving fast enough to swipe open\n    if (e.gesture.deltaX > -(self._currentDrag.buttonsWidth / 2)) {\n\n      // If we are going left but too slow, or going right, go back to resting\n      if (e.gesture.direction == \"left\" && Math.abs(e.gesture.velocityX) < 0.3) {\n        restingPoint = 0;\n\n      } else if (e.gesture.direction == \"right\") {\n        restingPoint = 0;\n      }\n\n    }\n\n    ionic.requestAnimationFrame(function() {\n      if (restingPoint === 0) {\n        self._currentDrag.content.style[ionic.CSS.TRANSFORM] = '';\n        var buttons = self._currentDrag.buttons;\n        setTimeout(function() {\n          buttons && buttons.classList.add('invisible');\n        }, 250);\n      } else {\n        self._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + restingPoint + 'px,0,0)';\n      }\n      self._currentDrag.content.style[ionic.CSS.TRANSITION] = '';\n\n\n      // Kill the current drag\n      if (!self._lastDrag) {\n        self._lastDrag = {};\n      }\n      ionic.extend(self._lastDrag, self._currentDrag);\n      if (self._currentDrag) {\n        self._currentDrag.buttons = null;\n        self._currentDrag.content = null;\n      }\n      self._currentDrag = null;\n\n      // We are done, notify caller\n      doneCallback && doneCallback();\n    });\n  };\n\n  var ReorderDrag = function(opts) {\n    var self = this;\n\n    self.dragThresholdY = opts.dragThresholdY || 0;\n    self.onReorder = opts.onReorder;\n    self.listEl = opts.listEl;\n    self.el = self.item = opts.el;\n    self.scrollEl = opts.scrollEl;\n    self.scrollView = opts.scrollView;\n    // Get the True Top of the list el http://www.quirksmode.org/js/findpos.html\n    self.listElTrueTop = 0;\n    if (self.listEl.offsetParent) {\n      var obj = self.listEl;\n      do {\n        self.listElTrueTop += obj.offsetTop;\n        obj = obj.offsetParent;\n      } while (obj);\n    }\n  };\n\n  ReorderDrag.prototype = new DragOp();\n\n  ReorderDrag.prototype._moveElement = function(e) {\n    var y = e.gesture.center.pageY +\n      this.scrollView.getValues().top -\n      (this._currentDrag.elementHeight / 2) -\n      this.listElTrueTop;\n    this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(0, ' + y + 'px, 0)';\n  };\n\n  ReorderDrag.prototype.deregister = function() {\n    this.listEl = this.el = this.scrollEl = this.scrollView = null;\n  };\n\n  ReorderDrag.prototype.start = function(e) {\n\n    var startIndex = ionic.DomUtil.getChildIndex(this.el, this.el.nodeName.toLowerCase());\n    var elementHeight = this.el.scrollHeight;\n    var placeholder = this.el.cloneNode(true);\n\n    placeholder.classList.add(ITEM_PLACEHOLDER_CLASS);\n\n    this.el.parentNode.insertBefore(placeholder, this.el);\n    this.el.classList.add(ITEM_REORDERING_CLASS);\n\n    this._currentDrag = {\n      elementHeight: elementHeight,\n      startIndex: startIndex,\n      placeholder: placeholder,\n      scrollHeight: scroll,\n      list: placeholder.parentNode\n    };\n\n    this._moveElement(e);\n  };\n\n  ReorderDrag.prototype.drag = ionic.animationFrameThrottle(function(e) {\n    // We really aren't dragging\n    var self = this;\n    if (!this._currentDrag) {\n      return;\n    }\n\n    var scrollY = 0;\n    var pageY = e.gesture.center.pageY;\n    var offset = this.listElTrueTop;\n\n    //If we have a scrollView, check scroll boundaries for dragged element and scroll if necessary\n    if (this.scrollView) {\n\n      var container = this.scrollView.__container;\n      scrollY = this.scrollView.getValues().top;\n\n      var containerTop = container.offsetTop;\n      var pixelsPastTop = containerTop - pageY + this._currentDrag.elementHeight / 2;\n      var pixelsPastBottom = pageY + this._currentDrag.elementHeight / 2 - containerTop - container.offsetHeight;\n\n      if (e.gesture.deltaY < 0 && pixelsPastTop > 0 && scrollY > 0) {\n        this.scrollView.scrollBy(null, -pixelsPastTop);\n        //Trigger another drag so the scrolling keeps going\n        ionic.requestAnimationFrame(function() {\n          self.drag(e);\n        });\n      }\n      if (e.gesture.deltaY > 0 && pixelsPastBottom > 0) {\n        if (scrollY < this.scrollView.getScrollMax().top) {\n          this.scrollView.scrollBy(null, pixelsPastBottom);\n          //Trigger another drag so the scrolling keeps going\n          ionic.requestAnimationFrame(function() {\n            self.drag(e);\n          });\n        }\n      }\n    }\n\n    // Check if we should start dragging. Check if we've dragged past the threshold,\n    // or we are starting from the open state.\n    if (!this._isDragging && Math.abs(e.gesture.deltaY) > this.dragThresholdY) {\n      this._isDragging = true;\n    }\n\n    if (this._isDragging) {\n      this._moveElement(e);\n\n      this._currentDrag.currentY = scrollY + pageY - offset;\n\n      // this._reorderItems();\n    }\n  });\n\n  // When an item is dragged, we need to reorder any items for sorting purposes\n  ReorderDrag.prototype._getReorderIndex = function() {\n    var self = this;\n\n    var siblings = Array.prototype.slice.call(self._currentDrag.placeholder.parentNode.children)\n      .filter(function(el) {\n        return el.nodeName === self.el.nodeName && el !== self.el;\n      });\n\n    var dragOffsetTop = self._currentDrag.currentY;\n    var el;\n    for (var i = 0, len = siblings.length; i < len; i++) {\n      el = siblings[i];\n      if (i === len - 1) {\n        if (dragOffsetTop > el.offsetTop) {\n          return i;\n        }\n      } else if (i === 0) {\n        if (dragOffsetTop < el.offsetTop + el.offsetHeight) {\n          return i;\n        }\n      } else if (dragOffsetTop > el.offsetTop - el.offsetHeight / 2 &&\n                 dragOffsetTop < el.offsetTop + el.offsetHeight) {\n        return i;\n      }\n    }\n    return self._currentDrag.startIndex;\n  };\n\n  ReorderDrag.prototype.end = function(e, doneCallback) {\n    if (!this._currentDrag) {\n      doneCallback && doneCallback();\n      return;\n    }\n\n    var placeholder = this._currentDrag.placeholder;\n    var finalIndex = this._getReorderIndex();\n\n    // Reposition the element\n    this.el.classList.remove(ITEM_REORDERING_CLASS);\n    this.el.style[ionic.CSS.TRANSFORM] = '';\n\n    placeholder.parentNode.insertBefore(this.el, placeholder);\n    placeholder.parentNode.removeChild(placeholder);\n\n    this.onReorder && this.onReorder(this.el, this._currentDrag.startIndex, finalIndex);\n\n    this._currentDrag = {\n      placeholder: null,\n      content: null\n    };\n    this._currentDrag = null;\n    doneCallback && doneCallback();\n  };\n\n\n\n  /**\n   * The ListView handles a list of items. It will process drag animations, edit mode,\n   * and other operations that are common on mobile lists or table views.\n   */\n  ionic.views.ListView = ionic.views.View.inherit({\n    initialize: function(opts) {\n      var self = this;\n\n      opts = ionic.extend({\n        onReorder: function() {},\n        virtualRemoveThreshold: -200,\n        virtualAddThreshold: 200,\n        canSwipe: function() {\n          return true;\n        }\n      }, opts);\n\n      ionic.extend(self, opts);\n\n      if (!self.itemHeight && self.listEl) {\n        self.itemHeight = self.listEl.children[0] && parseInt(self.listEl.children[0].style.height, 10);\n      }\n\n      self.onRefresh = opts.onRefresh || function() {};\n      self.onRefreshOpening = opts.onRefreshOpening || function() {};\n      self.onRefreshHolding = opts.onRefreshHolding || function() {};\n\n      var gestureOpts = {};\n      // don't prevent native scrolling\n      if (ionic.DomUtil.getParentOrSelfWithClass(self.el, 'overflow-scroll')) {\n        gestureOpts.prevent_default_directions = ['left', 'right'];\n      }\n\n      window.ionic.onGesture('release', function(e) {\n        self._handleEndDrag(e);\n      }, self.el, gestureOpts);\n\n      window.ionic.onGesture('drag', function(e) {\n        self._handleDrag(e);\n      }, self.el, gestureOpts);\n      // Start the drag states\n      self._initDrag();\n    },\n\n    /**\n     * Be sure to cleanup references.\n     */\n    deregister: function() {\n      this.el = this.listEl = this.scrollEl = this.scrollView = null;\n\n      // ensure no scrolls have been left frozen\n      if (this.isScrollFreeze) {\n        self.scrollView.freeze(false);\n      }\n    },\n\n    /**\n     * Called to tell the list to stop refreshing. This is useful\n     * if you are refreshing the list and are done with refreshing.\n     */\n    stopRefreshing: function() {\n      var refresher = this.el.querySelector('.list-refresher');\n      refresher.style.height = '0';\n    },\n\n    /**\n     * If we scrolled and have virtual mode enabled, compute the window\n     * of active elements in order to figure out the viewport to render.\n     */\n    didScroll: function(e) {\n      var self = this;\n\n      if (self.isVirtual) {\n        var itemHeight = self.itemHeight;\n\n        // Grab the total height of the list\n        var scrollHeight = e.target.scrollHeight;\n\n        // Get the viewport height\n        var viewportHeight = self.el.parentNode.offsetHeight;\n\n        // High water is the pixel position of the first element to include (everything before\n        // that will be removed)\n        var highWater = Math.max(0, e.scrollTop + self.virtualRemoveThreshold);\n\n        // Low water is the pixel position of the last element to include (everything after\n        // that will be removed)\n        var lowWater = Math.min(scrollHeight, Math.abs(e.scrollTop) + viewportHeight + self.virtualAddThreshold);\n\n        // Get the first and last elements in the list based on how many can fit\n        // between the pixel range of lowWater and highWater\n        var first = parseInt(Math.abs(highWater / itemHeight), 10);\n        var last = parseInt(Math.abs(lowWater / itemHeight), 10);\n\n        // Get the items we need to remove\n        self._virtualItemsToRemove = Array.prototype.slice.call(self.listEl.children, 0, first);\n\n        self.renderViewport && self.renderViewport(highWater, lowWater, first, last);\n      }\n    },\n\n    didStopScrolling: function() {\n      if (this.isVirtual) {\n        for (var i = 0; i < this._virtualItemsToRemove.length; i++) {\n          //el.parentNode.removeChild(el);\n          this.didHideItem && this.didHideItem(i);\n        }\n        // Once scrolling stops, check if we need to remove old items\n\n      }\n    },\n\n    /**\n     * Clear any active drag effects on the list.\n     */\n    clearDragEffects: function(isInstant) {\n      if (this._lastDragOp) {\n        this._lastDragOp.clean && this._lastDragOp.clean(isInstant);\n        this._lastDragOp.deregister && this._lastDragOp.deregister();\n        this._lastDragOp = null;\n      }\n    },\n\n    _initDrag: function() {\n      // Store the last one\n      if (this._lastDragOp) {\n        this._lastDragOp.deregister && this._lastDragOp.deregister();\n      }\n      this._lastDragOp = this._dragOp;\n\n      this._dragOp = null;\n    },\n\n    // Return the list item from the given target\n    _getItem: function(target) {\n      while (target) {\n        if (target.classList && target.classList.contains(ITEM_CLASS)) {\n          return target;\n        }\n        target = target.parentNode;\n      }\n      return null;\n    },\n\n\n    _startDrag: function(e) {\n      var self = this;\n\n      self._isDragging = false;\n\n      var lastDragOp = self._lastDragOp;\n      var item;\n\n      // If we have an open SlideDrag and we're scrolling the list. Clear it.\n      if (self._didDragUpOrDown && lastDragOp instanceof SlideDrag) {\n          lastDragOp.clean && lastDragOp.clean();\n      }\n\n      // Check if this is a reorder drag\n      if (ionic.DomUtil.getParentOrSelfWithClass(e.target, ITEM_REORDER_BTN_CLASS) && (e.gesture.direction == 'up' || e.gesture.direction == 'down')) {\n        item = self._getItem(e.target);\n\n        if (item) {\n          self._dragOp = new ReorderDrag({\n            listEl: self.el,\n            el: item,\n            scrollEl: self.scrollEl,\n            scrollView: self.scrollView,\n            onReorder: function(el, start, end) {\n              self.onReorder && self.onReorder(el, start, end);\n            }\n          });\n          self._dragOp.start(e);\n          e.preventDefault();\n        }\n      }\n\n      // Or check if this is a swipe to the side drag\n      else if (!self._didDragUpOrDown && (e.gesture.direction == 'left' || e.gesture.direction == 'right') && Math.abs(e.gesture.deltaX) > 5) {\n\n        // Make sure this is an item with buttons\n        item = self._getItem(e.target);\n        if (item && item.querySelector('.item-options')) {\n          self._dragOp = new SlideDrag({\n            el: self.el,\n            item: item,\n            canSwipe: self.canSwipe\n          });\n          self._dragOp.start(e);\n          e.preventDefault();\n          self.isScrollFreeze = self.scrollView.freeze(true);\n        }\n      }\n\n      // If we had a last drag operation and this is a new one on a different item, clean that last one\n      if (lastDragOp && self._dragOp && !self._dragOp.isSameItem(lastDragOp) && e.defaultPrevented) {\n        lastDragOp.clean && lastDragOp.clean();\n      }\n    },\n\n\n    _handleEndDrag: function(e) {\n      var self = this;\n\n      if (self.scrollView) {\n        self.isScrollFreeze = self.scrollView.freeze(false);\n      }\n\n      self._didDragUpOrDown = false;\n\n      if (!self._dragOp) {\n        return;\n      }\n\n      self._dragOp.end(e, function() {\n        self._initDrag();\n      });\n    },\n\n    /**\n     * Process the drag event to move the item to the left or right.\n     */\n    _handleDrag: function(e) {\n      var self = this;\n\n      if (Math.abs(e.gesture.deltaY) > 5) {\n        self._didDragUpOrDown = true;\n      }\n\n      // If we get a drag event, make sure we aren't in another drag, then check if we should\n      // start one\n      if (!self.isDragging && !self._dragOp) {\n        self._startDrag(e);\n      }\n\n      // No drag still, pass it up\n      if (!self._dragOp) {\n        return;\n      }\n\n      e.gesture.srcEvent.preventDefault();\n      self._dragOp.drag(e);\n    }\n\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  ionic.views.Modal = ionic.views.View.inherit({\n    initialize: function(opts) {\n      opts = ionic.extend({\n        focusFirstInput: false,\n        unfocusOnHide: true,\n        focusFirstDelay: 600,\n        backdropClickToClose: true,\n        hardwareBackButtonClose: true,\n      }, opts);\n\n      ionic.extend(this, opts);\n\n      this.el = opts.el;\n    },\n    show: function() {\n      var self = this;\n\n      if(self.focusFirstInput) {\n        // Let any animations run first\n        window.setTimeout(function() {\n          var input = self.el.querySelector('input, textarea');\n          input && input.focus && input.focus();\n        }, self.focusFirstDelay);\n      }\n    },\n    hide: function() {\n      // Unfocus all elements\n      if(this.unfocusOnHide) {\n        var inputs = this.el.querySelectorAll('input, textarea');\n        // Let any animations run first\n        window.setTimeout(function() {\n          for(var i = 0; i < inputs.length; i++) {\n            inputs[i].blur && inputs[i].blur();\n          }\n        });\n      }\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  /**\n   * The side menu view handles one of the side menu's in a Side Menu Controller\n   * configuration.\n   * It takes a DOM reference to that side menu element.\n   */\n  ionic.views.SideMenu = ionic.views.View.inherit({\n    initialize: function(opts) {\n      this.el = opts.el;\n      this.isEnabled = (typeof opts.isEnabled === 'undefined') ? true : opts.isEnabled;\n      this.setWidth(opts.width);\n    },\n    getFullWidth: function() {\n      return this.width;\n    },\n    setWidth: function(width) {\n      this.width = width;\n      this.el.style.width = width + 'px';\n    },\n    setIsEnabled: function(isEnabled) {\n      this.isEnabled = isEnabled;\n    },\n    bringUp: function() {\n      if(this.el.style.zIndex !== '0') {\n        this.el.style.zIndex = '0';\n      }\n    },\n    pushDown: function() {\n      if(this.el.style.zIndex !== '-1') {\n        this.el.style.zIndex = '-1';\n      }\n    }\n  });\n\n  ionic.views.SideMenuContent = ionic.views.View.inherit({\n    initialize: function(opts) {\n      ionic.extend(this, {\n        animationClass: 'menu-animated',\n        onDrag: function() {},\n        onEndDrag: function() {}\n      }, opts);\n\n      ionic.onGesture('drag', ionic.proxy(this._onDrag, this), this.el);\n      ionic.onGesture('release', ionic.proxy(this._onEndDrag, this), this.el);\n    },\n    _onDrag: function(e) {\n      this.onDrag && this.onDrag(e);\n    },\n    _onEndDrag: function(e) {\n      this.onEndDrag && this.onEndDrag(e);\n    },\n    disableAnimation: function() {\n      this.el.classList.remove(this.animationClass);\n    },\n    enableAnimation: function() {\n      this.el.classList.add(this.animationClass);\n    },\n    getTranslateX: function() {\n      return parseFloat(this.el.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]);\n    },\n    setTranslateX: ionic.animationFrameThrottle(function(x) {\n      this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(' + x + 'px, 0, 0)';\n    })\n  });\n\n})(ionic);\n\n/*\n * Adapted from Swipe.js 2.0\n *\n * Brad Birdsall\n * Copyright 2013, MIT License\n *\n*/\n\n(function(ionic) {\n'use strict';\n\nionic.views.Slider = ionic.views.View.inherit({\n  initialize: function (options) {\n    var slider = this;\n\n    var touchStartEvent, touchMoveEvent, touchEndEvent;\n    if (window.navigator.pointerEnabled) {\n      touchStartEvent = 'pointerdown';\n      touchMoveEvent = 'pointermove';\n      touchEndEvent = 'pointerup';\n    } else if (window.navigator.msPointerEnabled) {\n      touchStartEvent = 'MSPointerDown';\n      touchMoveEvent = 'MSPointerMove';\n      touchEndEvent = 'MSPointerUp';\n    } else {\n      touchStartEvent = 'touchstart';\n      touchMoveEvent = 'touchmove';\n      touchEndEvent = 'touchend';\n    }\n\n    var mouseStartEvent = 'mousedown';\n    var mouseMoveEvent = 'mousemove';\n    var mouseEndEvent = 'mouseup';\n\n    // utilities\n    var noop = function() {}; // simple no operation function\n    var offloadFn = function(fn) { setTimeout(fn || noop, 0); }; // offload a functions execution\n\n    // check browser capabilities\n    var browser = {\n      addEventListener: !!window.addEventListener,\n      transitions: (function(temp) {\n        var props = ['transitionProperty', 'WebkitTransition', 'MozTransition', 'OTransition', 'msTransition'];\n        for ( var i in props ) if (temp.style[ props[i] ] !== undefined) return true;\n        return false;\n      })(document.createElement('swipe'))\n    };\n\n\n    var container = options.el;\n\n    // quit if no root element\n    if (!container) return;\n    var element = container.children[0];\n    var slides, slidePos, width, length;\n    options = options || {};\n    var index = parseInt(options.startSlide, 10) || 0;\n    var speed = options.speed || 300;\n    options.continuous = options.continuous !== undefined ? options.continuous : true;\n\n    function setup() {\n\n      // do not setup if the container has no width\n      if (!container.offsetWidth) {\n        return;\n      }\n\n      // cache slides\n      slides = element.children;\n      length = slides.length;\n\n      // set continuous to false if only one slide\n      if (slides.length < 2) options.continuous = false;\n\n      //special case if two slides\n      if (browser.transitions && options.continuous && slides.length < 3) {\n        element.appendChild(slides[0].cloneNode(true));\n        element.appendChild(element.children[1].cloneNode(true));\n        slides = element.children;\n      }\n\n      // create an array to store current positions of each slide\n      slidePos = new Array(slides.length);\n\n      // determine width of each slide\n      width = container.offsetWidth || container.getBoundingClientRect().width;\n\n      element.style.width = (slides.length * width) + 'px';\n\n      // stack elements\n      var pos = slides.length;\n      while(pos--) {\n\n        var slide = slides[pos];\n\n        slide.style.width = width + 'px';\n        slide.setAttribute('data-index', pos);\n\n        if (browser.transitions) {\n          slide.style.left = (pos * -width) + 'px';\n          move(pos, index > pos ? -width : (index < pos ? width : 0), 0);\n        }\n\n      }\n\n      // reposition elements before and after index\n      if (options.continuous && browser.transitions) {\n        move(circle(index - 1), -width, 0);\n        move(circle(index + 1), width, 0);\n      }\n\n      if (!browser.transitions) element.style.left = (index * -width) + 'px';\n\n      container.style.visibility = 'visible';\n\n      options.slidesChanged && options.slidesChanged();\n    }\n\n    function prev(slideSpeed) {\n\n      if (options.continuous) slide(index - 1, slideSpeed);\n      else if (index) slide(index - 1, slideSpeed);\n\n    }\n\n    function next(slideSpeed) {\n\n      if (options.continuous) slide(index + 1, slideSpeed);\n      else if (index < slides.length - 1) slide(index + 1, slideSpeed);\n\n    }\n\n    function circle(index) {\n\n      // a simple positive modulo using slides.length\n      return (slides.length + (index % slides.length)) % slides.length;\n\n    }\n\n    function slide(to, slideSpeed) {\n\n      // do nothing if already on requested slide\n      if (index == to) return;\n\n      if (!slides) {\n        index = to;\n        return;\n      }\n\n      if (browser.transitions) {\n\n        var direction = Math.abs(index - to) / (index - to); // 1: backward, -1: forward\n\n        // get the actual position of the slide\n        if (options.continuous) {\n          var naturalDirection = direction;\n          direction = -slidePos[circle(to)] / width;\n\n          // if going forward but to < index, use to = slides.length + to\n          // if going backward but to > index, use to = -slides.length + to\n          if (direction !== naturalDirection) to = -direction * slides.length + to;\n\n        }\n\n        var diff = Math.abs(index - to) - 1;\n\n        // move all the slides between index and to in the right direction\n        while (diff--) move( circle((to > index ? to : index) - diff - 1), width * direction, 0);\n\n        to = circle(to);\n\n        move(index, width * direction, slideSpeed || speed);\n        move(to, 0, slideSpeed || speed);\n\n        if (options.continuous) move(circle(to - direction), -(width * direction), 0); // we need to get the next in place\n\n      } else {\n\n        to = circle(to);\n        animate(index * -width, to * -width, slideSpeed || speed);\n        //no fallback for a circular continuous if the browser does not accept transitions\n      }\n\n      index = to;\n      offloadFn(options.callback && options.callback(index, slides[index]));\n    }\n\n    function move(index, dist, speed) {\n\n      translate(index, dist, speed);\n      slidePos[index] = dist;\n\n    }\n\n    function translate(index, dist, speed) {\n\n      var slide = slides[index];\n      var style = slide && slide.style;\n\n      if (!style) return;\n\n      style.webkitTransitionDuration =\n      style.MozTransitionDuration =\n      style.msTransitionDuration =\n      style.OTransitionDuration =\n      style.transitionDuration = speed + 'ms';\n\n      style.webkitTransform = 'translate(' + dist + 'px,0)' + 'translateZ(0)';\n      style.msTransform =\n      style.MozTransform =\n      style.OTransform = 'translateX(' + dist + 'px)';\n\n    }\n\n    function animate(from, to, speed) {\n\n      // if not an animation, just reposition\n      if (!speed) {\n\n        element.style.left = to + 'px';\n        return;\n\n      }\n\n      var start = +new Date();\n\n      var timer = setInterval(function() {\n\n        var timeElap = +new Date() - start;\n\n        if (timeElap > speed) {\n\n          element.style.left = to + 'px';\n\n          if (delay) begin();\n\n          options.transitionEnd && options.transitionEnd.call(event, index, slides[index]);\n\n          clearInterval(timer);\n          return;\n\n        }\n\n        element.style.left = (( (to - from) * (Math.floor((timeElap / speed) * 100) / 100) ) + from) + 'px';\n\n      }, 4);\n\n    }\n\n    // setup auto slideshow\n    var delay = options.auto || 0;\n    var interval;\n\n    function begin() {\n\n      interval = setTimeout(next, delay);\n\n    }\n\n    function stop() {\n\n      delay = options.auto || 0;\n      clearTimeout(interval);\n\n    }\n\n\n    // setup initial vars\n    var start = {};\n    var delta = {};\n    var isScrolling;\n\n    // setup event capturing\n    var events = {\n\n      handleEvent: function(event) {\n        if(!event.touches && event.pageX && event.pageY) {\n          event.touches = [{\n            pageX: event.pageX,\n            pageY: event.pageY\n          }];\n        }\n\n        switch (event.type) {\n          case touchStartEvent: this.start(event); break;\n          case mouseStartEvent: this.start(event); break;\n          case touchMoveEvent: this.touchmove(event); break;\n          case mouseMoveEvent: this.touchmove(event); break;\n          case touchEndEvent: offloadFn(this.end(event)); break;\n          case mouseEndEvent: offloadFn(this.end(event)); break;\n          case 'webkitTransitionEnd':\n          case 'msTransitionEnd':\n          case 'oTransitionEnd':\n          case 'otransitionend':\n          case 'transitionend': offloadFn(this.transitionEnd(event)); break;\n          case 'resize': offloadFn(setup); break;\n        }\n\n        if (options.stopPropagation) event.stopPropagation();\n\n      },\n      start: function(event) {\n\n        // prevent to start if there is no valid event\n        if (!event.touches) {\n          return;\n        }\n\n        var touches = event.touches[0];\n\n        // measure start values\n        start = {\n\n          // get initial touch coords\n          x: touches.pageX,\n          y: touches.pageY,\n\n          // store time to determine touch duration\n          time: +new Date()\n\n        };\n\n        // used for testing first move event\n        isScrolling = undefined;\n\n        // reset delta and end measurements\n        delta = {};\n\n        // attach touchmove and touchend listeners\n        element.addEventListener(touchMoveEvent, this, false);\n        element.addEventListener(mouseMoveEvent, this, false);\n\n        element.addEventListener(touchEndEvent, this, false);\n        element.addEventListener(mouseEndEvent, this, false);\n\n        document.addEventListener(touchEndEvent, this, false);\n        document.addEventListener(mouseEndEvent, this, false);\n      },\n      touchmove: function(event) {\n\n        // ensure there is a valid event\n        // ensure swiping with one touch and not pinching\n        // ensure sliding is enabled\n        if (!event.touches ||\n            event.touches.length > 1 ||\n            event.scale && event.scale !== 1 ||\n            slider.slideIsDisabled) {\n          return;\n        }\n\n        if (options.disableScroll) event.preventDefault();\n\n        var touches = event.touches[0];\n\n        // measure change in x and y\n        delta = {\n          x: touches.pageX - start.x,\n          y: touches.pageY - start.y\n        };\n\n        // determine if scrolling test has run - one time test\n        if ( typeof isScrolling == 'undefined') {\n          isScrolling = !!( isScrolling || Math.abs(delta.x) < Math.abs(delta.y) );\n        }\n\n        // if user is not trying to scroll vertically\n        if (!isScrolling) {\n\n          // prevent native scrolling\n          event.preventDefault();\n\n          // stop slideshow\n          stop();\n\n          // increase resistance if first or last slide\n          if (options.continuous) { // we don't add resistance at the end\n\n            translate(circle(index - 1), delta.x + slidePos[circle(index - 1)], 0);\n            translate(index, delta.x + slidePos[index], 0);\n            translate(circle(index + 1), delta.x + slidePos[circle(index + 1)], 0);\n\n          } else {\n            // If the slider bounces, do the bounce!\n            if(options.bouncing) {\n              delta.x =\n               delta.x /\n                 ( (!index && delta.x > 0 ||         // if first slide and sliding left\n                   index == slides.length - 1 &&     // or if last slide and sliding right\n                   delta.x < 0                       // and if sliding at all\n                 ) ?\n                 ( Math.abs(delta.x) / width + 1 )      // determine resistance level\n                 : 1 );                                 // no resistance if false\n             } else {\n               if(width * index - delta.x < 0) {               //We are trying scroll past left boundary\n                 delta.x = Math.min(delta.x, width * index);  //Set delta.x so we don't go past left screen\n               }\n               if(Math.abs(delta.x) > width * (slides.length - index - 1)){         //We are trying to scroll past right bondary\n                 delta.x = Math.max( -width * (slides.length - index - 1), delta.x);  //Set delta.x so we don't go past right screen\n               }\n             }\n\n            // translate 1:1\n            translate(index - 1, delta.x + slidePos[index - 1], 0);\n            translate(index, delta.x + slidePos[index], 0);\n            translate(index + 1, delta.x + slidePos[index + 1], 0);\n          }\n\n          options.onDrag && options.onDrag();\n        }\n\n      },\n      end: function() {\n\n        // measure duration\n        var duration = +new Date() - start.time;\n\n        // determine if slide attempt triggers next/prev slide\n        var isValidSlide =\n              Number(duration) < 250 &&         // if slide duration is less than 250ms\n              Math.abs(delta.x) > 20 ||         // and if slide amt is greater than 20px\n              Math.abs(delta.x) > width / 2;      // or if slide amt is greater than half the width\n\n        // determine if slide attempt is past start and end\n        var isPastBounds = (!index && delta.x > 0) ||      // if first slide and slide amt is greater than 0\n              (index == slides.length - 1 && delta.x < 0); // or if last slide and slide amt is less than 0\n\n        if (options.continuous) isPastBounds = false;\n\n        // determine direction of swipe (true:right, false:left)\n        var direction = delta.x < 0;\n\n        // if not scrolling vertically\n        if (!isScrolling) {\n\n          if (isValidSlide && !isPastBounds) {\n\n            if (direction) {\n\n              if (options.continuous) { // we need to get the next in this direction in place\n\n                move(circle(index - 1), -width, 0);\n                move(circle(index + 2), width, 0);\n\n              } else {\n                move(index - 1, -width, 0);\n              }\n\n              move(index, slidePos[index] - width, speed);\n              move(circle(index + 1), slidePos[circle(index + 1)] - width, speed);\n              index = circle(index + 1);\n\n            } else {\n              if (options.continuous) { // we need to get the next in this direction in place\n\n                move(circle(index + 1), width, 0);\n                move(circle(index - 2), -width, 0);\n\n              } else {\n                move(index + 1, width, 0);\n              }\n\n              move(index, slidePos[index] + width, speed);\n              move(circle(index - 1), slidePos[circle(index - 1)] + width, speed);\n              index = circle(index - 1);\n\n            }\n\n            options.callback && options.callback(index, slides[index]);\n\n          } else {\n\n            if (options.continuous) {\n\n              move(circle(index - 1), -width, speed);\n              move(index, 0, speed);\n              move(circle(index + 1), width, speed);\n\n            } else {\n\n              move(index - 1, -width, speed);\n              move(index, 0, speed);\n              move(index + 1, width, speed);\n            }\n\n          }\n\n        }\n\n        // kill touchmove and touchend event listeners until touchstart called again\n        element.removeEventListener(touchMoveEvent, events, false);\n        element.removeEventListener(mouseMoveEvent, events, false);\n\n        element.removeEventListener(touchEndEvent, events, false);\n        element.removeEventListener(mouseEndEvent, events, false);\n\n        document.removeEventListener(touchEndEvent, events, false);\n        document.removeEventListener(mouseEndEvent, events, false);\n\n        options.onDragEnd && options.onDragEnd();\n      },\n      transitionEnd: function(event) {\n\n        if (parseInt(event.target.getAttribute('data-index'), 10) == index) {\n\n          if (delay) begin();\n\n          options.transitionEnd && options.transitionEnd.call(event, index, slides[index]);\n\n        }\n\n      }\n\n    };\n\n    // Public API\n    this.update = function() {\n      setTimeout(setup);\n    };\n    this.setup = function() {\n      setup();\n    };\n\n    this.loop = function(value) {\n      if (arguments.length) options.continuous = !!value;\n      return options.continuous;\n    };\n\n    this.enableSlide = function(shouldEnable) {\n      if (arguments.length) {\n        this.slideIsDisabled = !shouldEnable;\n      }\n      return !this.slideIsDisabled;\n    };\n\n    this.slide = this.select = function(to, speed) {\n      // cancel slideshow\n      stop();\n\n      slide(to, speed);\n    };\n\n    this.prev = this.previous = function() {\n      // cancel slideshow\n      stop();\n\n      prev();\n    };\n\n    this.next = function() {\n      // cancel slideshow\n      stop();\n\n      next();\n    };\n\n    this.stop = function() {\n      // cancel slideshow\n      stop();\n    };\n\n    this.start = function() {\n      begin();\n    };\n\n    this.autoPlay = function(newDelay) {\n      if (!delay || delay < 0) {\n        stop();\n      } else {\n        delay = newDelay;\n        begin();\n      }\n    };\n\n    this.currentIndex = this.selected = function() {\n      // return current index position\n      return index;\n    };\n\n    this.slidesCount = this.count = function() {\n      // return total number of slides\n      return length;\n    };\n\n    this.kill = function() {\n      // cancel slideshow\n      stop();\n\n      // reset element\n      element.style.width = '';\n      element.style.left = '';\n\n      // reset slides so no refs are held on to\n      slides && (slides = []);\n\n      // removed event listeners\n      if (browser.addEventListener) {\n\n        // remove current event listeners\n        element.removeEventListener(touchStartEvent, events, false);\n        element.removeEventListener(mouseStartEvent, events, false);\n        element.removeEventListener('webkitTransitionEnd', events, false);\n        element.removeEventListener('msTransitionEnd', events, false);\n        element.removeEventListener('oTransitionEnd', events, false);\n        element.removeEventListener('otransitionend', events, false);\n        element.removeEventListener('transitionend', events, false);\n        window.removeEventListener('resize', events, false);\n\n      }\n      else {\n\n        window.onresize = null;\n\n      }\n    };\n\n    this.load = function() {\n      // trigger setup\n      setup();\n\n      // start auto slideshow if applicable\n      if (delay) begin();\n\n\n      // add event listeners\n      if (browser.addEventListener) {\n\n        // set touchstart event on element\n        element.addEventListener(touchStartEvent, events, false);\n        element.addEventListener(mouseStartEvent, events, false);\n\n        if (browser.transitions) {\n          element.addEventListener('webkitTransitionEnd', events, false);\n          element.addEventListener('msTransitionEnd', events, false);\n          element.addEventListener('oTransitionEnd', events, false);\n          element.addEventListener('otransitionend', events, false);\n          element.addEventListener('transitionend', events, false);\n        }\n\n        // set resize event on window\n        window.addEventListener('resize', events, false);\n\n      } else {\n\n        window.onresize = function () { setup(); }; // to play nice with old IE\n\n      }\n    };\n\n  }\n});\n\n})(ionic);\n\n/*eslint space-after-keywords: 0*/\n\n/**\n * Swiper 3.2.7\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n *\n * http://www.idangero.us/swiper/\n *\n * Copyright 2015, Vladimir Kharlampidi\n * The iDangero.us\n * http://www.idangero.us/\n *\n * Licensed under MIT\n *\n * Released on: December 7, 2015\n */\n(function () {\n    'use strict';\n    var $;\n    /*===========================\n    Swiper\n    ===========================*/\n    var Swiper = function (container, params, _scope, $compile) {\n\n        if (!(this instanceof Swiper)) return new Swiper(container, params);\n\n        var defaults = {\n            direction: 'horizontal',\n            touchEventsTarget: 'container',\n            initialSlide: 0,\n            speed: 300,\n            // autoplay\n            autoplay: false,\n            autoplayDisableOnInteraction: true,\n            // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).\n            iOSEdgeSwipeDetection: false,\n            iOSEdgeSwipeThreshold: 20,\n            // Free mode\n            freeMode: false,\n            freeModeMomentum: true,\n            freeModeMomentumRatio: 1,\n            freeModeMomentumBounce: true,\n            freeModeMomentumBounceRatio: 1,\n            freeModeSticky: false,\n            freeModeMinimumVelocity: 0.02,\n            // Autoheight\n            autoHeight: false,\n            // Set wrapper width\n            setWrapperSize: false,\n            // Virtual Translate\n            virtualTranslate: false,\n            // Effects\n            effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow'\n            coverflow: {\n                rotate: 50,\n                stretch: 0,\n                depth: 100,\n                modifier: 1,\n                slideShadows : true\n            },\n            cube: {\n                slideShadows: true,\n                shadow: true,\n                shadowOffset: 20,\n                shadowScale: 0.94\n            },\n            fade: {\n                crossFade: false\n            },\n            // Parallax\n            parallax: false,\n            // Scrollbar\n            scrollbar: null,\n            scrollbarHide: true,\n            scrollbarDraggable: false,\n            scrollbarSnapOnRelease: false,\n            // Keyboard Mousewheel\n            keyboardControl: false,\n            mousewheelControl: false,\n            mousewheelReleaseOnEdges: false,\n            mousewheelInvert: false,\n            mousewheelForceToAxis: false,\n            mousewheelSensitivity: 1,\n            // Hash Navigation\n            hashnav: false,\n            // Breakpoints\n            breakpoints: undefined,\n            // Slides grid\n            spaceBetween: 0,\n            slidesPerView: 1,\n            slidesPerColumn: 1,\n            slidesPerColumnFill: 'column',\n            slidesPerGroup: 1,\n            centeredSlides: false,\n            slidesOffsetBefore: 0, // in px\n            slidesOffsetAfter: 0, // in px\n            // Round length\n            roundLengths: false,\n            // Touches\n            touchRatio: 1,\n            touchAngle: 45,\n            simulateTouch: true,\n            shortSwipes: true,\n            longSwipes: true,\n            longSwipesRatio: 0.5,\n            longSwipesMs: 300,\n            followFinger: true,\n            onlyExternal: false,\n            threshold: 0,\n            touchMoveStopPropagation: true,\n            // Pagination\n            pagination: null,\n            paginationElement: 'span',\n            paginationClickable: false,\n            paginationHide: false,\n            paginationBulletRender: null,\n            // Resistance\n            resistance: true,\n            resistanceRatio: 0.85,\n            // Next/prev buttons\n            nextButton: null,\n            prevButton: null,\n            // Progress\n            watchSlidesProgress: false,\n            watchSlidesVisibility: false,\n            // Cursor\n            grabCursor: false,\n            // Clicks\n            preventClicks: true,\n            preventClicksPropagation: true,\n            slideToClickedSlide: false,\n            // Lazy Loading\n            lazyLoading: false,\n            lazyLoadingInPrevNext: false,\n            lazyLoadingOnTransitionStart: false,\n            // Images\n            preloadImages: true,\n            updateOnImagesReady: true,\n            // loop\n            loop: false,\n            loopAdditionalSlides: 0,\n            loopedSlides: null,\n            // Control\n            control: undefined,\n            controlInverse: false,\n            controlBy: 'slide', //or 'container'\n            // Swiping/no swiping\n            allowSwipeToPrev: true,\n            allowSwipeToNext: true,\n            swipeHandler: null, //'.swipe-handler',\n            noSwiping: true,\n            noSwipingClass: 'swiper-no-swiping',\n            // NS\n            slideClass: 'swiper-slide',\n            slideActiveClass: 'swiper-slide-active',\n            slideVisibleClass: 'swiper-slide-visible',\n            slideDuplicateClass: 'swiper-slide-duplicate',\n            slideNextClass: 'swiper-slide-next',\n            slidePrevClass: 'swiper-slide-prev',\n            wrapperClass: 'swiper-wrapper',\n            bulletClass: 'swiper-pagination-bullet',\n            bulletActiveClass: 'swiper-pagination-bullet-active',\n            buttonDisabledClass: 'swiper-button-disabled',\n            paginationHiddenClass: 'swiper-pagination-hidden',\n            // Observer\n            observer: false,\n            observeParents: false,\n            // Accessibility\n            a11y: false,\n            prevSlideMessage: 'Previous slide',\n            nextSlideMessage: 'Next slide',\n            firstSlideMessage: 'This is the first slide',\n            lastSlideMessage: 'This is the last slide',\n            paginationBulletMessage: 'Go to slide {{index}}',\n            // Callbacks\n            runCallbacksOnInit: true\n            /*\n            Callbacks:\n            onInit: function (swiper)\n            onDestroy: function (swiper)\n            onClick: function (swiper, e)\n            onTap: function (swiper, e)\n            onDoubleTap: function (swiper, e)\n            onSliderMove: function (swiper, e)\n            onSlideChangeStart: function (swiper)\n            onSlideChangeEnd: function (swiper)\n            onTransitionStart: function (swiper)\n            onTransitionEnd: function (swiper)\n            onImagesReady: function (swiper)\n            onProgress: function (swiper, progress)\n            onTouchStart: function (swiper, e)\n            onTouchMove: function (swiper, e)\n            onTouchMoveOpposite: function (swiper, e)\n            onTouchEnd: function (swiper, e)\n            onReachBeginning: function (swiper)\n            onReachEnd: function (swiper)\n            onSetTransition: function (swiper, duration)\n            onSetTranslate: function (swiper, translate)\n            onAutoplayStart: function (swiper)\n            onAutoplayStop: function (swiper),\n            onLazyImageLoad: function (swiper, slide, image)\n            onLazyImageReady: function (swiper, slide, image)\n            */\n\n        };\n        var initialVirtualTranslate = params && params.virtualTranslate;\n\n        params = params || {};\n        var originalParams = {};\n        for (var param in params) {\n            if (typeof params[param] === 'object' && !(params[param].nodeType || params[param] === window || params[param] === document || (typeof Dom7 !== 'undefined' && params[param] instanceof Dom7) || (typeof jQuery !== 'undefined' && params[param] instanceof jQuery))) {\n                originalParams[param] = {};\n                for (var deepParam in params[param]) {\n                    originalParams[param][deepParam] = params[param][deepParam];\n                }\n            }\n            else {\n                originalParams[param] = params[param];\n            }\n        }\n        for (var def in defaults) {\n            if (typeof params[def] === 'undefined') {\n                params[def] = defaults[def];\n            }\n            else if (typeof params[def] === 'object') {\n                for (var deepDef in defaults[def]) {\n                    if (typeof params[def][deepDef] === 'undefined') {\n                        params[def][deepDef] = defaults[def][deepDef];\n                    }\n                }\n            }\n        }\n\n        // Swiper\n        var s = this;\n\n        // Params\n        s.params = params;\n        s.originalParams = originalParams;\n\n        // Classname\n        s.classNames = [];\n        /*=========================\n          Dom Library and plugins\n          ===========================*/\n        if (typeof $ !== 'undefined' && typeof Dom7 !== 'undefined'){\n            $ = Dom7;\n        }\n        if (typeof $ === 'undefined') {\n            if (typeof Dom7 === 'undefined') {\n                $ = window.Dom7 || window.Zepto || window.jQuery;\n            }\n            else {\n                $ = Dom7;\n            }\n            if (!$) return;\n        }\n        // Export it to Swiper instance\n        s.$ = $;\n\n        /*=========================\n          Breakpoints\n          ===========================*/\n        s.currentBreakpoint = undefined;\n        s.getActiveBreakpoint = function () {\n            //Get breakpoint for window width\n            if (!s.params.breakpoints) return false;\n            var breakpoint = false;\n            var points = [], point;\n            for ( point in s.params.breakpoints ) {\n                if (s.params.breakpoints.hasOwnProperty(point)) {\n                    points.push(point);\n                }\n            }\n            points.sort(function (a, b) {\n                return parseInt(a, 10) > parseInt(b, 10);\n            });\n            for (var i = 0; i < points.length; i++) {\n                point = points[i];\n                if (point >= window.innerWidth && !breakpoint) {\n                    breakpoint = point;\n                }\n            }\n            return breakpoint || 'max';\n        };\n        s.setBreakpoint = function () {\n            //Set breakpoint for window width and update parameters\n            var breakpoint = s.getActiveBreakpoint();\n            if (breakpoint && s.currentBreakpoint !== breakpoint) {\n                var breakPointsParams = breakpoint in s.params.breakpoints ? s.params.breakpoints[breakpoint] : s.originalParams;\n                for ( var param in breakPointsParams ) {\n                    s.params[param] = breakPointsParams[param];\n                }\n                s.currentBreakpoint = breakpoint;\n            }\n        };\n        // Set breakpoint on load\n        if (s.params.breakpoints) {\n            s.setBreakpoint();\n        }\n\n        /*=========================\n          Preparation - Define Container, Wrapper and Pagination\n          ===========================*/\n        s.container = $(container);\n        if (s.container.length === 0) return;\n        if (s.container.length > 1) {\n            s.container.each(function () {\n                new Swiper(this, params);\n            });\n            return;\n        }\n\n        // Save instance in container HTML Element and in data\n        s.container[0].swiper = s;\n        s.container.data('swiper', s);\n\n        s.classNames.push('swiper-container-' + s.params.direction);\n\n        if (s.params.freeMode) {\n            s.classNames.push('swiper-container-free-mode');\n        }\n        if (!s.support.flexbox) {\n            s.classNames.push('swiper-container-no-flexbox');\n            s.params.slidesPerColumn = 1;\n        }\n        if (s.params.autoHeight) {\n            s.classNames.push('swiper-container-autoheight');\n        }\n        // Enable slides progress when required\n        if (s.params.parallax || s.params.watchSlidesVisibility) {\n            s.params.watchSlidesProgress = true;\n        }\n        // Coverflow / 3D\n        if (['cube', 'coverflow'].indexOf(s.params.effect) >= 0) {\n            if (s.support.transforms3d) {\n                s.params.watchSlidesProgress = true;\n                s.classNames.push('swiper-container-3d');\n            }\n            else {\n                s.params.effect = 'slide';\n            }\n        }\n        if (s.params.effect !== 'slide') {\n            s.classNames.push('swiper-container-' + s.params.effect);\n        }\n        if (s.params.effect === 'cube') {\n            s.params.resistanceRatio = 0;\n            s.params.slidesPerView = 1;\n            s.params.slidesPerColumn = 1;\n            s.params.slidesPerGroup = 1;\n            s.params.centeredSlides = false;\n            s.params.spaceBetween = 0;\n            s.params.virtualTranslate = true;\n            s.params.setWrapperSize = false;\n        }\n        if (s.params.effect === 'fade') {\n            s.params.slidesPerView = 1;\n            s.params.slidesPerColumn = 1;\n            s.params.slidesPerGroup = 1;\n            s.params.watchSlidesProgress = true;\n            s.params.spaceBetween = 0;\n            if (typeof initialVirtualTranslate === 'undefined') {\n                s.params.virtualTranslate = true;\n            }\n        }\n\n        // Grab Cursor\n        if (s.params.grabCursor && s.support.touch) {\n            s.params.grabCursor = false;\n        }\n\n        // Wrapper\n        s.wrapper = s.container.children('.' + s.params.wrapperClass);\n\n        // Pagination\n        if (s.params.pagination) {\n            s.paginationContainer = $(s.params.pagination);\n            if (s.params.paginationClickable) {\n                s.paginationContainer.addClass('swiper-pagination-clickable');\n            }\n        }\n\n        // Is Horizontal\n        function isH() {\n            return s.params.direction === 'horizontal';\n        }\n\n        // RTL\n        s.rtl = isH() && (s.container[0].dir.toLowerCase() === 'rtl' || s.container.css('direction') === 'rtl');\n        if (s.rtl) {\n            s.classNames.push('swiper-container-rtl');\n        }\n\n        // Wrong RTL support\n        if (s.rtl) {\n            s.wrongRTL = s.wrapper.css('display') === '-webkit-box';\n        }\n\n        // Columns\n        if (s.params.slidesPerColumn > 1) {\n            s.classNames.push('swiper-container-multirow');\n        }\n\n        // Check for Android\n        if (s.device.android) {\n            s.classNames.push('swiper-container-android');\n        }\n\n        // Add classes\n        s.container.addClass(s.classNames.join(' '));\n\n        // Translate\n        s.translate = 0;\n\n        // Progress\n        s.progress = 0;\n\n        // Velocity\n        s.velocity = 0;\n\n        /*=========================\n          Locks, unlocks\n          ===========================*/\n        s.lockSwipeToNext = function () {\n            s.params.allowSwipeToNext = false;\n        };\n        s.lockSwipeToPrev = function () {\n            s.params.allowSwipeToPrev = false;\n        };\n        s.lockSwipes = function () {\n            s.params.allowSwipeToNext = s.params.allowSwipeToPrev = false;\n        };\n        s.unlockSwipeToNext = function () {\n            s.params.allowSwipeToNext = true;\n        };\n        s.unlockSwipeToPrev = function () {\n            s.params.allowSwipeToPrev = true;\n        };\n        s.unlockSwipes = function () {\n            s.params.allowSwipeToNext = s.params.allowSwipeToPrev = true;\n        };\n\n        /*=========================\n          Round helper\n          ===========================*/\n        function round(a) {\n            return Math.floor(a);\n        }\n        /*=========================\n          Set grab cursor\n          ===========================*/\n        if (s.params.grabCursor) {\n            s.container[0].style.cursor = 'move';\n            s.container[0].style.cursor = '-webkit-grab';\n            s.container[0].style.cursor = '-moz-grab';\n            s.container[0].style.cursor = 'grab';\n        }\n        /*=========================\n          Update on Images Ready\n          ===========================*/\n        s.imagesToLoad = [];\n        s.imagesLoaded = 0;\n\n        s.loadImage = function (imgElement, src, srcset, checkForComplete, callback) {\n            var image;\n            function onReady () {\n                if (callback) callback();\n            }\n            if (!imgElement.complete || !checkForComplete) {\n                if (src) {\n                    image = new window.Image();\n                    image.onload = onReady;\n                    image.onerror = onReady;\n                    if (srcset) {\n                        image.srcset = srcset;\n                    }\n                    if (src) {\n                        image.src = src;\n                    }\n                } else {\n                    onReady();\n                }\n\n            } else {//image already loaded...\n                onReady();\n            }\n        };\n        s.preloadImages = function () {\n            s.imagesToLoad = s.container.find('img');\n            function _onReady() {\n                if (typeof s === 'undefined' || s === null) return;\n                if (s.imagesLoaded !== undefined) s.imagesLoaded++;\n                if (s.imagesLoaded === s.imagesToLoad.length) {\n                    if (s.params.updateOnImagesReady) s.update();\n                    s.emit('onImagesReady', s);\n                }\n            }\n            for (var i = 0; i < s.imagesToLoad.length; i++) {\n                s.loadImage(s.imagesToLoad[i], (s.imagesToLoad[i].currentSrc || s.imagesToLoad[i].getAttribute('src')), (s.imagesToLoad[i].srcset || s.imagesToLoad[i].getAttribute('srcset')), true, _onReady);\n            }\n        };\n\n        /*=========================\n          Autoplay\n          ===========================*/\n        s.autoplayTimeoutId = undefined;\n        s.autoplaying = false;\n        s.autoplayPaused = false;\n        function autoplay() {\n            s.autoplayTimeoutId = setTimeout(function () {\n                if (s.params.loop) {\n                    s.fixLoop();\n                    s._slideNext();\n                }\n                else {\n                    if (!s.isEnd) {\n                        s._slideNext();\n                    }\n                    else {\n                        if (!params.autoplayStopOnLast) {\n                            s._slideTo(0);\n                        }\n                        else {\n                            s.stopAutoplay();\n                        }\n                    }\n                }\n            }, s.params.autoplay);\n        }\n        s.startAutoplay = function () {\n            if (typeof s.autoplayTimeoutId !== 'undefined') return false;\n            if (!s.params.autoplay) return false;\n            if (s.autoplaying) return false;\n            s.autoplaying = true;\n            s.emit('onAutoplayStart', s);\n            autoplay();\n        };\n        s.stopAutoplay = function (internal) {\n            if (!s.autoplayTimeoutId) return;\n            if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);\n            s.autoplaying = false;\n            s.autoplayTimeoutId = undefined;\n            s.emit('onAutoplayStop', s);\n        };\n        s.pauseAutoplay = function (speed) {\n            if (s.autoplayPaused) return;\n            if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);\n            s.autoplayPaused = true;\n            if (speed === 0) {\n                s.autoplayPaused = false;\n                autoplay();\n            }\n            else {\n                s.wrapper.transitionEnd(function () {\n                    if (!s) return;\n                    s.autoplayPaused = false;\n                    if (!s.autoplaying) {\n                        s.stopAutoplay();\n                    }\n                    else {\n                        autoplay();\n                    }\n                });\n            }\n        };\n        /*=========================\n          Min/Max Translate\n          ===========================*/\n        s.minTranslate = function () {\n            return (-s.snapGrid[0]);\n        };\n        s.maxTranslate = function () {\n            return (-s.snapGrid[s.snapGrid.length - 1]);\n        };\n        /*=========================\n          Slider/slides sizes\n          ===========================*/\n        s.updateAutoHeight = function () {\n            // Update Height\n            var newHeight = s.slides.eq(s.activeIndex)[0].offsetHeight;\n            if (newHeight) s.wrapper.css('height', s.slides.eq(s.activeIndex)[0].offsetHeight + 'px');\n        };\n        s.updateContainerSize = function () {\n            var width, height;\n            if (typeof s.params.width !== 'undefined') {\n                width = s.params.width;\n            }\n            else {\n                width = s.container[0].clientWidth;\n            }\n            if (typeof s.params.height !== 'undefined') {\n                height = s.params.height;\n            }\n            else {\n                height = s.container[0].clientHeight;\n            }\n            if (width === 0 && isH() || height === 0 && !isH()) {\n                return;\n            }\n\n            //Subtract paddings\n            width = width - parseInt(s.container.css('padding-left'), 10) - parseInt(s.container.css('padding-right'), 10);\n            height = height - parseInt(s.container.css('padding-top'), 10) - parseInt(s.container.css('padding-bottom'), 10);\n\n            // Store values\n            s.width = width;\n            s.height = height;\n            s.size = isH() ? s.width : s.height;\n        };\n\n        s.updateSlidesSize = function () {\n            s.slides = s.wrapper.children('.' + s.params.slideClass);\n            s.snapGrid = [];\n            s.slidesGrid = [];\n            s.slidesSizesGrid = [];\n\n            var spaceBetween = s.params.spaceBetween,\n                slidePosition = -s.params.slidesOffsetBefore,\n                i,\n                prevSlideSize = 0,\n                index = 0;\n            if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n                spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * s.size;\n            }\n\n            s.virtualSize = -spaceBetween;\n            // reset margins\n            if (s.rtl) s.slides.css({marginLeft: '', marginTop: ''});\n            else s.slides.css({marginRight: '', marginBottom: ''});\n\n            var slidesNumberEvenToRows;\n            if (s.params.slidesPerColumn > 1) {\n                if (Math.floor(s.slides.length / s.params.slidesPerColumn) === s.slides.length / s.params.slidesPerColumn) {\n                    slidesNumberEvenToRows = s.slides.length;\n                }\n                else {\n                    slidesNumberEvenToRows = Math.ceil(s.slides.length / s.params.slidesPerColumn) * s.params.slidesPerColumn;\n                }\n                if (s.params.slidesPerView !== 'auto' && s.params.slidesPerColumnFill === 'row') {\n                    slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, s.params.slidesPerView * s.params.slidesPerColumn);\n                }\n            }\n\n            // Calc slides\n            var slideSize;\n            var slidesPerColumn = s.params.slidesPerColumn;\n            var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;\n            var numFullColumns = slidesPerRow - (s.params.slidesPerColumn * slidesPerRow - s.slides.length);\n            for (i = 0; i < s.slides.length; i++) {\n                slideSize = 0;\n                var slide = s.slides.eq(i);\n                if (s.params.slidesPerColumn > 1) {\n                    // Set slides order\n                    var newSlideOrderIndex;\n                    var column, row;\n                    if (s.params.slidesPerColumnFill === 'column') {\n                        column = Math.floor(i / slidesPerColumn);\n                        row = i - column * slidesPerColumn;\n                        if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn-1)) {\n                            if (++row >= slidesPerColumn) {\n                                row = 0;\n                                column++;\n                            }\n                        }\n                        newSlideOrderIndex = column + row * slidesNumberEvenToRows / slidesPerColumn;\n                        slide\n                            .css({\n                                '-webkit-box-ordinal-group': newSlideOrderIndex,\n                                '-moz-box-ordinal-group': newSlideOrderIndex,\n                                '-ms-flex-order': newSlideOrderIndex,\n                                '-webkit-order': newSlideOrderIndex,\n                                'order': newSlideOrderIndex\n                            });\n                    }\n                    else {\n                        row = Math.floor(i / slidesPerRow);\n                        column = i - row * slidesPerRow;\n                    }\n                    slide\n                        .css({\n                            'margin-top': (row !== 0 && s.params.spaceBetween) && (s.params.spaceBetween + 'px')\n                        })\n                        .attr('data-swiper-column', column)\n                        .attr('data-swiper-row', row);\n\n                }\n                if (slide.css('display') === 'none') continue;\n                if (s.params.slidesPerView === 'auto') {\n                    slideSize = isH() ? slide.outerWidth(true) : slide.outerHeight(true);\n                    if (s.params.roundLengths) slideSize = round(slideSize);\n                }\n                else {\n                    slideSize = (s.size - (s.params.slidesPerView - 1) * spaceBetween) / s.params.slidesPerView;\n                    if (s.params.roundLengths) slideSize = round(slideSize);\n\n                    if (isH()) {\n                        s.slides[i].style.width = slideSize + 'px';\n                    }\n                    else {\n                        s.slides[i].style.height = slideSize + 'px';\n                    }\n                }\n                s.slides[i].swiperSlideSize = slideSize;\n                s.slidesSizesGrid.push(slideSize);\n\n\n                if (s.params.centeredSlides) {\n                    slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n                    if (i === 0) slidePosition = slidePosition - s.size / 2 - spaceBetween;\n                    if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n                    if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);\n                    s.slidesGrid.push(slidePosition);\n                }\n                else {\n                    if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);\n                    s.slidesGrid.push(slidePosition);\n                    slidePosition = slidePosition + slideSize + spaceBetween;\n                }\n\n                s.virtualSize += slideSize + spaceBetween;\n\n                prevSlideSize = slideSize;\n\n                index ++;\n            }\n            s.virtualSize = Math.max(s.virtualSize, s.size) + s.params.slidesOffsetAfter;\n            var newSlidesGrid;\n\n            if (\n                s.rtl && s.wrongRTL && (s.params.effect === 'slide' || s.params.effect === 'coverflow')) {\n                s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n            }\n            if (!s.support.flexbox || s.params.setWrapperSize) {\n                if (isH()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n                else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'});\n            }\n\n            if (s.params.slidesPerColumn > 1) {\n                s.virtualSize = (slideSize + s.params.spaceBetween) * slidesNumberEvenToRows;\n                s.virtualSize = Math.ceil(s.virtualSize / s.params.slidesPerColumn) - s.params.spaceBetween;\n                s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n                if (s.params.centeredSlides) {\n                    newSlidesGrid = [];\n                    for (i = 0; i < s.snapGrid.length; i++) {\n                        if (s.snapGrid[i] < s.virtualSize + s.snapGrid[0]) newSlidesGrid.push(s.snapGrid[i]);\n                    }\n                    s.snapGrid = newSlidesGrid;\n                }\n            }\n\n            // Remove last grid elements depending on width\n            if (!s.params.centeredSlides) {\n                newSlidesGrid = [];\n                for (i = 0; i < s.snapGrid.length; i++) {\n                    if (s.snapGrid[i] <= s.virtualSize - s.size) {\n                        newSlidesGrid.push(s.snapGrid[i]);\n                    }\n                }\n                s.snapGrid = newSlidesGrid;\n                if (Math.floor(s.virtualSize - s.size) > Math.floor(s.snapGrid[s.snapGrid.length - 1])) {\n                    s.snapGrid.push(s.virtualSize - s.size);\n                }\n            }\n            if (s.snapGrid.length === 0) s.snapGrid = [0];\n\n            if (s.params.spaceBetween !== 0) {\n                if (isH()) {\n                    if (s.rtl) s.slides.css({marginLeft: spaceBetween + 'px'});\n                    else s.slides.css({marginRight: spaceBetween + 'px'});\n                }\n                else s.slides.css({marginBottom: spaceBetween + 'px'});\n            }\n            if (s.params.watchSlidesProgress) {\n                s.updateSlidesOffset();\n            }\n        };\n        s.updateSlidesOffset = function () {\n            for (var i = 0; i < s.slides.length; i++) {\n                s.slides[i].swiperSlideOffset = isH() ? s.slides[i].offsetLeft : s.slides[i].offsetTop;\n            }\n        };\n\n        /*=========================\n          Slider/slides progress\n          ===========================*/\n        s.updateSlidesProgress = function (translate) {\n            if (typeof translate === 'undefined') {\n                translate = s.translate || 0;\n            }\n            if (s.slides.length === 0) return;\n            if (typeof s.slides[0].swiperSlideOffset === 'undefined') s.updateSlidesOffset();\n\n            var offsetCenter = -translate;\n            if (s.rtl) offsetCenter = translate;\n\n            // Visible Slides\n            s.slides.removeClass(s.params.slideVisibleClass);\n            for (var i = 0; i < s.slides.length; i++) {\n                var slide = s.slides[i];\n                var slideProgress = (offsetCenter - slide.swiperSlideOffset) / (slide.swiperSlideSize + s.params.spaceBetween);\n                if (s.params.watchSlidesVisibility) {\n                    var slideBefore = -(offsetCenter - slide.swiperSlideOffset);\n                    var slideAfter = slideBefore + s.slidesSizesGrid[i];\n                    var isVisible =\n                        (slideBefore >= 0 && slideBefore < s.size) ||\n                        (slideAfter > 0 && slideAfter <= s.size) ||\n                        (slideBefore <= 0 && slideAfter >= s.size);\n                    if (isVisible) {\n                        s.slides.eq(i).addClass(s.params.slideVisibleClass);\n                    }\n                }\n                slide.progress = s.rtl ? -slideProgress : slideProgress;\n            }\n        };\n        s.updateProgress = function (translate) {\n            if (typeof translate === 'undefined') {\n                translate = s.translate || 0;\n            }\n            var translatesDiff = s.maxTranslate() - s.minTranslate();\n            var wasBeginning = s.isBeginning;\n            var wasEnd = s.isEnd;\n            if (translatesDiff === 0) {\n                s.progress = 0;\n                s.isBeginning = s.isEnd = true;\n            }\n            else {\n                s.progress = (translate - s.minTranslate()) / (translatesDiff);\n                s.isBeginning = s.progress <= 0;\n                s.isEnd = s.progress >= 1;\n            }\n            if (s.isBeginning && !wasBeginning) s.emit('onReachBeginning', s);\n            if (s.isEnd && !wasEnd) s.emit('onReachEnd', s);\n\n            if (s.params.watchSlidesProgress) s.updateSlidesProgress(translate);\n            s.emit('onProgress', s, s.progress);\n        };\n        s.updateActiveIndex = function () {\n            var translate = s.rtl ? s.translate : -s.translate;\n            var newActiveIndex, i, snapIndex;\n            for (i = 0; i < s.slidesGrid.length; i ++) {\n                if (typeof s.slidesGrid[i + 1] !== 'undefined') {\n                    if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1] - (s.slidesGrid[i + 1] - s.slidesGrid[i]) / 2) {\n                        newActiveIndex = i;\n                    }\n                    else if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1]) {\n                        newActiveIndex = i + 1;\n                    }\n                }\n                else {\n                    if (translate >= s.slidesGrid[i]) {\n                        newActiveIndex = i;\n                    }\n                }\n            }\n            // Normalize slideIndex\n            if (newActiveIndex < 0 || typeof newActiveIndex === 'undefined') newActiveIndex = 0;\n            // for (i = 0; i < s.slidesGrid.length; i++) {\n                // if (- translate >= s.slidesGrid[i]) {\n                    // newActiveIndex = i;\n                // }\n            // }\n            snapIndex = Math.floor(newActiveIndex / s.params.slidesPerGroup);\n            if (snapIndex >= s.snapGrid.length) snapIndex = s.snapGrid.length - 1;\n\n            if (newActiveIndex === s.activeIndex) {\n                return;\n            }\n            s.snapIndex = snapIndex;\n            s.previousIndex = s.activeIndex;\n            s.activeIndex = newActiveIndex;\n            s.updateClasses();\n        };\n\n        /*=========================\n          Classes\n          ===========================*/\n        s.updateClasses = function () {\n            s.slides.removeClass(s.params.slideActiveClass + ' ' + s.params.slideNextClass + ' ' + s.params.slidePrevClass);\n            var activeSlide = s.slides.eq(s.activeIndex);\n            // Active classes\n            activeSlide.addClass(s.params.slideActiveClass);\n            activeSlide.next('.' + s.params.slideClass).addClass(s.params.slideNextClass);\n            activeSlide.prev('.' + s.params.slideClass).addClass(s.params.slidePrevClass);\n\n            // Pagination\n            if (s.bullets && s.bullets.length > 0) {\n                s.bullets.removeClass(s.params.bulletActiveClass);\n                var bulletIndex;\n                if (s.params.loop) {\n                    bulletIndex = Math.ceil(s.activeIndex - s.loopedSlides)/s.params.slidesPerGroup;\n                    if (bulletIndex > s.slides.length - 1 - s.loopedSlides * 2) {\n                        bulletIndex = bulletIndex - (s.slides.length - s.loopedSlides * 2);\n                    }\n                    if (bulletIndex > s.bullets.length - 1) bulletIndex = bulletIndex - s.bullets.length;\n                }\n                else {\n                    if (typeof s.snapIndex !== 'undefined') {\n                        bulletIndex = s.snapIndex;\n                    }\n                    else {\n                        bulletIndex = s.activeIndex || 0;\n                    }\n                }\n                if (s.paginationContainer.length > 1) {\n                    s.bullets.each(function () {\n                        if ($(this).index() === bulletIndex) $(this).addClass(s.params.bulletActiveClass);\n                    });\n                }\n                else {\n                    s.bullets.eq(bulletIndex).addClass(s.params.bulletActiveClass);\n                }\n            }\n\n            // Next/active buttons\n            if (!s.params.loop) {\n                if (s.params.prevButton) {\n                    if (s.isBeginning) {\n                        $(s.params.prevButton).addClass(s.params.buttonDisabledClass);\n                        if (s.params.a11y && s.a11y) s.a11y.disable($(s.params.prevButton));\n                    }\n                    else {\n                        $(s.params.prevButton).removeClass(s.params.buttonDisabledClass);\n                        if (s.params.a11y && s.a11y) s.a11y.enable($(s.params.prevButton));\n                    }\n                }\n                if (s.params.nextButton) {\n                    if (s.isEnd) {\n                        $(s.params.nextButton).addClass(s.params.buttonDisabledClass);\n                        if (s.params.a11y && s.a11y) s.a11y.disable($(s.params.nextButton));\n                    }\n                    else {\n                        $(s.params.nextButton).removeClass(s.params.buttonDisabledClass);\n                        if (s.params.a11y && s.a11y) s.a11y.enable($(s.params.nextButton));\n                    }\n                }\n            }\n        };\n\n        /*=========================\n          Pagination\n          ===========================*/\n        s.updatePagination = function () {\n            if (!s.params.pagination) return;\n            if (s.paginationContainer && s.paginationContainer.length > 0) {\n                var bulletsHTML = '';\n                var numberOfBullets = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;\n                for (var i = 0; i < numberOfBullets; i++) {\n                    if (s.params.paginationBulletRender) {\n                        bulletsHTML += s.params.paginationBulletRender(i, s.params.bulletClass);\n                    }\n                    else {\n                        bulletsHTML += '<' + s.params.paginationElement+' class=\"' + s.params.bulletClass + '\"></' + s.params.paginationElement + '>';\n                    }\n                }\n                s.paginationContainer.html(bulletsHTML);\n                s.bullets = s.paginationContainer.find('.' + s.params.bulletClass);\n                if (s.params.paginationClickable && s.params.a11y && s.a11y) {\n                    s.a11y.initPagination();\n                }\n            }\n        };\n        /*=========================\n          Common update method\n          ===========================*/\n        s.update = function (updateTranslate) {\n            s.updateContainerSize();\n            s.updateSlidesSize();\n            s.updateProgress();\n            s.updatePagination();\n            s.updateClasses();\n            if (s.params.scrollbar && s.scrollbar) {\n                s.scrollbar.set();\n            }\n            function forceSetTranslate() {\n                newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());\n                s.setWrapperTranslate(newTranslate);\n                s.updateActiveIndex();\n                s.updateClasses();\n            }\n            if (updateTranslate) {\n                var translated, newTranslate;\n                if (s.controller && s.controller.spline) {\n                    s.controller.spline = undefined;\n                }\n                if (s.params.freeMode) {\n                    forceSetTranslate();\n                    if (s.params.autoHeight) {\n                        s.updateAutoHeight();\n                    }\n                }\n                else {\n                    if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {\n                        translated = s.slideTo(s.slides.length - 1, 0, false, true);\n                    }\n                    else {\n                        translated = s.slideTo(s.activeIndex, 0, false, true);\n                    }\n                    if (!translated) {\n                        forceSetTranslate();\n                    }\n                }\n            }\n            else if (s.params.autoHeight) {\n                s.updateAutoHeight();\n            }\n        };\n\n        /*=========================\n          Resize Handler\n          ===========================*/\n        s.onResize = function (forceUpdatePagination) {\n            //Breakpoints\n            if (s.params.breakpoints) {\n                s.setBreakpoint();\n            }\n\n            // Disable locks on resize\n            var allowSwipeToPrev = s.params.allowSwipeToPrev;\n            var allowSwipeToNext = s.params.allowSwipeToNext;\n            s.params.allowSwipeToPrev = s.params.allowSwipeToNext = true;\n\n            s.updateContainerSize();\n            s.updateSlidesSize();\n            if (s.params.slidesPerView === 'auto' || s.params.freeMode || forceUpdatePagination) s.updatePagination();\n            if (s.params.scrollbar && s.scrollbar) {\n                s.scrollbar.set();\n            }\n            if (s.controller && s.controller.spline) {\n                s.controller.spline = undefined;\n            }\n            if (s.params.freeMode) {\n                var newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());\n                s.setWrapperTranslate(newTranslate);\n                s.updateActiveIndex();\n                s.updateClasses();\n\n                if (s.params.autoHeight) {\n                    s.updateAutoHeight();\n                }\n            }\n            else {\n                s.updateClasses();\n                if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {\n                    s.slideTo(s.slides.length - 1, 0, false, true);\n                }\n                else {\n                    s.slideTo(s.activeIndex, 0, false, true);\n                }\n            }\n            // Return locks after resize\n            s.params.allowSwipeToPrev = allowSwipeToPrev;\n            s.params.allowSwipeToNext = allowSwipeToNext;\n        };\n\n        /*=========================\n          Events\n          ===========================*/\n\n        //Define Touch Events\n        var desktopEvents = ['mousedown', 'mousemove', 'mouseup'];\n        if (window.navigator.pointerEnabled) desktopEvents = ['pointerdown', 'pointermove', 'pointerup'];\n        else if (window.navigator.msPointerEnabled) desktopEvents = ['MSPointerDown', 'MSPointerMove', 'MSPointerUp'];\n        s.touchEvents = {\n            start : s.support.touch || !s.params.simulateTouch  ? 'touchstart' : desktopEvents[0],\n            move : s.support.touch || !s.params.simulateTouch ? 'touchmove' : desktopEvents[1],\n            end : s.support.touch || !s.params.simulateTouch ? 'touchend' : desktopEvents[2]\n        };\n\n\n        // WP8 Touch Events Fix\n        if (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) {\n            (s.params.touchEventsTarget === 'container' ? s.container : s.wrapper).addClass('swiper-wp8-' + s.params.direction);\n        }\n\n        // Attach/detach events\n        s.initEvents = function (detach) {\n            var actionDom = detach ? 'off' : 'on';\n            var action = detach ? 'removeEventListener' : 'addEventListener';\n            var touchEventsTarget = s.params.touchEventsTarget === 'container' ? s.container[0] : s.wrapper[0];\n            var target = s.support.touch ? touchEventsTarget : document;\n\n            var moveCapture = s.params.nested ? true : false;\n\n            //Touch Events\n            if (s.browser.ie) {\n                touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, false);\n                target[action](s.touchEvents.move, s.onTouchMove, moveCapture);\n                target[action](s.touchEvents.end, s.onTouchEnd, false);\n            }\n            else {\n                if (s.support.touch) {\n                    touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, false);\n                    touchEventsTarget[action](s.touchEvents.move, s.onTouchMove, moveCapture);\n                    touchEventsTarget[action](s.touchEvents.end, s.onTouchEnd, false);\n                }\n                if (params.simulateTouch && !s.device.ios && !s.device.android) {\n                    touchEventsTarget[action]('mousedown', s.onTouchStart, false);\n                    document[action]('mousemove', s.onTouchMove, moveCapture);\n                    document[action]('mouseup', s.onTouchEnd, false);\n                }\n            }\n            window[action]('resize', s.onResize);\n\n            // Next, Prev, Index\n            if (s.params.nextButton) {\n                $(s.params.nextButton)[actionDom]('click', s.onClickNext);\n                if (s.params.a11y && s.a11y) $(s.params.nextButton)[actionDom]('keydown', s.a11y.onEnterKey);\n            }\n            if (s.params.prevButton) {\n                $(s.params.prevButton)[actionDom]('click', s.onClickPrev);\n                if (s.params.a11y && s.a11y) $(s.params.prevButton)[actionDom]('keydown', s.a11y.onEnterKey);\n            }\n            if (s.params.pagination && s.params.paginationClickable) {\n                $(s.paginationContainer)[actionDom]('click', '.' + s.params.bulletClass, s.onClickIndex);\n                if (s.params.a11y && s.a11y) $(s.paginationContainer)[actionDom]('keydown', '.' + s.params.bulletClass, s.a11y.onEnterKey);\n            }\n\n            // Prevent Links Clicks\n            if (s.params.preventClicks || s.params.preventClicksPropagation) touchEventsTarget[action]('click', s.preventClicks, true);\n        };\n        s.attachEvents = function (detach) {\n            s.initEvents();\n        };\n        s.detachEvents = function () {\n            s.initEvents(true);\n        };\n\n        /*=========================\n          Handle Clicks\n          ===========================*/\n        // Prevent Clicks\n        s.allowClick = true;\n        s.preventClicks = function (e) {\n            if (!s.allowClick) {\n                if (s.params.preventClicks) e.preventDefault();\n                if (s.params.preventClicksPropagation && s.animating) {\n                    e.stopPropagation();\n                    e.stopImmediatePropagation();\n                }\n            }\n        };\n        // Clicks\n        s.onClickNext = function (e) {\n            e.preventDefault();\n            if (s.isEnd && !s.params.loop) return;\n            s.slideNext();\n        };\n        s.onClickPrev = function (e) {\n            e.preventDefault();\n            if (s.isBeginning && !s.params.loop) return;\n            s.slidePrev();\n        };\n        s.onClickIndex = function (e) {\n            e.preventDefault();\n            var index = $(this).index() * s.params.slidesPerGroup;\n            if (s.params.loop) index = index + s.loopedSlides;\n            s.slideTo(index);\n        };\n\n        /*=========================\n          Handle Touches\n          ===========================*/\n        function findElementInEvent(e, selector) {\n            var el = $(e.target);\n            if (!el.is(selector)) {\n                if (typeof selector === 'string') {\n                    el = el.parents(selector);\n                }\n                else if (selector.nodeType) {\n                    var found;\n                    el.parents().each(function (index, _el) {\n                        if (_el === selector) found = selector;\n                    });\n                    if (!found) return undefined;\n                    else return selector;\n                }\n            }\n            if (el.length === 0) {\n                return undefined;\n            }\n            return el[0];\n        }\n        s.updateClickedSlide = function (e) {\n            var slide = findElementInEvent(e, '.' + s.params.slideClass);\n            var slideFound = false;\n            if (slide) {\n                for (var i = 0; i < s.slides.length; i++) {\n                    if (s.slides[i] === slide) slideFound = true;\n                }\n            }\n\n            if (slide && slideFound) {\n                s.clickedSlide = slide;\n                s.clickedIndex = $(slide).index();\n            }\n            else {\n                s.clickedSlide = undefined;\n                s.clickedIndex = undefined;\n                return;\n            }\n            if (s.params.slideToClickedSlide && s.clickedIndex !== undefined && s.clickedIndex !== s.activeIndex) {\n                var slideToIndex = s.clickedIndex,\n                    realIndex,\n                    duplicatedSlides;\n                if (s.params.loop) {\n                    if (s.animating) return;\n                    realIndex = $(s.clickedSlide).attr('data-swiper-slide-index');\n                    if (s.params.centeredSlides) {\n                        if ((slideToIndex < s.loopedSlides - s.params.slidesPerView/2) || (slideToIndex > s.slides.length - s.loopedSlides + s.params.slidesPerView/2)) {\n                            s.fixLoop();\n                            slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index=\"' + realIndex + '\"]:not(.swiper-slide-duplicate)').eq(0).index();\n                            setTimeout(function () {\n                                s.slideTo(slideToIndex);\n                            }, 0);\n                        }\n                        else {\n                            s.slideTo(slideToIndex);\n                        }\n                    }\n                    else {\n                        if (slideToIndex > s.slides.length - s.params.slidesPerView) {\n                            s.fixLoop();\n                            slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index=\"' + realIndex + '\"]:not(.swiper-slide-duplicate)').eq(0).index();\n                            setTimeout(function () {\n                                s.slideTo(slideToIndex);\n                            }, 0);\n                        }\n                        else {\n                            s.slideTo(slideToIndex);\n                        }\n                    }\n                }\n                else {\n                    s.slideTo(slideToIndex);\n                }\n            }\n        };\n\n        var isTouched,\n            isMoved,\n            allowTouchCallbacks,\n            touchStartTime,\n            isScrolling,\n            currentTranslate,\n            startTranslate,\n            allowThresholdMove,\n            // Form elements to match\n            formElements = 'input, select, textarea, button',\n            // Last click time\n            lastClickTime = Date.now(), clickTimeout,\n            //Velocities\n            velocities = [],\n            allowMomentumBounce;\n\n        // Animating Flag\n        s.animating = false;\n\n        // Touches information\n        s.touches = {\n            startX: 0,\n            startY: 0,\n            currentX: 0,\n            currentY: 0,\n            diff: 0\n        };\n\n        // Touch handlers\n        var isTouchEvent, startMoving;\n        s.onTouchStart = function (e) {\n            if (e.originalEvent) e = e.originalEvent;\n            isTouchEvent = e.type === 'touchstart';\n            if (!isTouchEvent && 'which' in e && e.which === 3) return;\n            if (s.params.noSwiping && findElementInEvent(e, '.' + s.params.noSwipingClass)) {\n                s.allowClick = true;\n                return;\n            }\n            if (s.params.swipeHandler) {\n                if (!findElementInEvent(e, s.params.swipeHandler)) return;\n            }\n\n            var startX = s.touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n            var startY = s.touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n\n            // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore\n            if(s.device.ios && s.params.iOSEdgeSwipeDetection && startX <= s.params.iOSEdgeSwipeThreshold) {\n                return;\n            }\n\n            isTouched = true;\n            isMoved = false;\n            allowTouchCallbacks = true;\n            isScrolling = undefined;\n            startMoving = undefined;\n            s.touches.startX = startX;\n            s.touches.startY = startY;\n            touchStartTime = Date.now();\n            s.allowClick = true;\n            s.updateContainerSize();\n            s.swipeDirection = undefined;\n            if (s.params.threshold > 0) allowThresholdMove = false;\n            if (e.type !== 'touchstart') {\n                var preventDefault = true;\n                if ($(e.target).is(formElements)) preventDefault = false;\n                if (document.activeElement && $(document.activeElement).is(formElements)) {\n                    document.activeElement.blur();\n                }\n                if (preventDefault) {\n                    e.preventDefault();\n                }\n            }\n            s.emit('onTouchStart', s, e);\n        };\n\n        s.onTouchMove = function (e) {\n            if (e.originalEvent) e = e.originalEvent;\n            if (isTouchEvent && e.type === 'mousemove') return;\n            if (e.preventedByNestedSwiper) return;\n            if (s.params.onlyExternal) {\n                // isMoved = true;\n                s.allowClick = false;\n                if (isTouched) {\n                    s.touches.startX = s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n                    s.touches.startY = s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n                    touchStartTime = Date.now();\n                }\n                return;\n            }\n            if (isTouchEvent && document.activeElement) {\n                if (e.target === document.activeElement && $(e.target).is(formElements)) {\n                    isMoved = true;\n                    s.allowClick = false;\n                    return;\n                }\n            }\n            if (allowTouchCallbacks) {\n                s.emit('onTouchMove', s, e);\n            }\n            if (e.targetTouches && e.targetTouches.length > 1) return;\n\n            s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n            s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n\n            if (typeof isScrolling === 'undefined') {\n                var touchAngle = Math.atan2(Math.abs(s.touches.currentY - s.touches.startY), Math.abs(s.touches.currentX - s.touches.startX)) * 180 / Math.PI;\n                isScrolling = isH() ? touchAngle > s.params.touchAngle : (90 - touchAngle > s.params.touchAngle);\n            }\n            if (isScrolling) {\n                s.emit('onTouchMoveOpposite', s, e);\n            }\n            if (typeof startMoving === 'undefined' && s.browser.ieTouch) {\n                if (s.touches.currentX !== s.touches.startX || s.touches.currentY !== s.touches.startY) {\n                    startMoving = true;\n                }\n            }\n            if (!isTouched) return;\n            if (isScrolling)  {\n                isTouched = false;\n                return;\n            }\n            if (!startMoving && s.browser.ieTouch) {\n                return;\n            }\n            s.allowClick = false;\n            s.emit('onSliderMove', s, e);\n            e.preventDefault();\n            if (s.params.touchMoveStopPropagation && !s.params.nested) {\n                e.stopPropagation();\n            }\n\n            if (!isMoved) {\n                if (params.loop) {\n                    s.fixLoop();\n                }\n                startTranslate = s.getWrapperTranslate();\n                s.setWrapperTransition(0);\n                if (s.animating) {\n                    s.wrapper.trigger('webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd');\n                }\n                if (s.params.autoplay && s.autoplaying) {\n                    if (s.params.autoplayDisableOnInteraction) {\n                        s.stopAutoplay();\n                    }\n                    else {\n                        s.pauseAutoplay();\n                    }\n                }\n                allowMomentumBounce = false;\n                //Grab Cursor\n                if (s.params.grabCursor) {\n                    s.container[0].style.cursor = 'move';\n                    s.container[0].style.cursor = '-webkit-grabbing';\n                    s.container[0].style.cursor = '-moz-grabbin';\n                    s.container[0].style.cursor = 'grabbing';\n                }\n            }\n            isMoved = true;\n\n            var diff = s.touches.diff = isH() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;\n\n            diff = diff * s.params.touchRatio;\n            if (s.rtl) diff = -diff;\n\n            s.swipeDirection = diff > 0 ? 'prev' : 'next';\n            currentTranslate = diff + startTranslate;\n\n            var disableParentSwiper = true;\n            if ((diff > 0 && currentTranslate > s.minTranslate())) {\n                disableParentSwiper = false;\n                if (s.params.resistance) currentTranslate = s.minTranslate() - 1 + Math.pow(-s.minTranslate() + startTranslate + diff, s.params.resistanceRatio);\n            }\n            else if (diff < 0 && currentTranslate < s.maxTranslate()) {\n                disableParentSwiper = false;\n                if (s.params.resistance) currentTranslate = s.maxTranslate() + 1 - Math.pow(s.maxTranslate() - startTranslate - diff, s.params.resistanceRatio);\n            }\n\n            if (disableParentSwiper) {\n                e.preventedByNestedSwiper = true;\n            }\n\n            // Directions locks\n            if (!s.params.allowSwipeToNext && s.swipeDirection === 'next' && currentTranslate < startTranslate) {\n                currentTranslate = startTranslate;\n            }\n            if (!s.params.allowSwipeToPrev && s.swipeDirection === 'prev' && currentTranslate > startTranslate) {\n                currentTranslate = startTranslate;\n            }\n\n            if (!s.params.followFinger) return;\n\n            // Threshold\n            if (s.params.threshold > 0) {\n                if (Math.abs(diff) > s.params.threshold || allowThresholdMove) {\n                    if (!allowThresholdMove) {\n                        allowThresholdMove = true;\n                        s.touches.startX = s.touches.currentX;\n                        s.touches.startY = s.touches.currentY;\n                        currentTranslate = startTranslate;\n                        s.touches.diff = isH() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;\n                        return;\n                    }\n                }\n                else {\n                    currentTranslate = startTranslate;\n                    return;\n                }\n            }\n            // Update active index in free mode\n            if (s.params.freeMode || s.params.watchSlidesProgress) {\n                s.updateActiveIndex();\n            }\n            if (s.params.freeMode) {\n                //Velocity\n                if (velocities.length === 0) {\n                    velocities.push({\n                        position: s.touches[isH() ? 'startX' : 'startY'],\n                        time: touchStartTime\n                    });\n                }\n                velocities.push({\n                    position: s.touches[isH() ? 'currentX' : 'currentY'],\n                    time: (new window.Date()).getTime()\n                });\n            }\n            // Update progress\n            s.updateProgress(currentTranslate);\n            // Update translate\n            s.setWrapperTranslate(currentTranslate);\n        };\n        s.onTouchEnd = function (e) {\n            if (e.originalEvent) e = e.originalEvent;\n            if (allowTouchCallbacks) {\n                s.emit('onTouchEnd', s, e);\n            }\n            allowTouchCallbacks = false;\n            if (!isTouched) return;\n            //Return Grab Cursor\n            if (s.params.grabCursor && isMoved && isTouched) {\n                s.container[0].style.cursor = 'move';\n                s.container[0].style.cursor = '-webkit-grab';\n                s.container[0].style.cursor = '-moz-grab';\n                s.container[0].style.cursor = 'grab';\n            }\n\n            // Time diff\n            var touchEndTime = Date.now();\n            var timeDiff = touchEndTime - touchStartTime;\n\n            // Tap, doubleTap, Click\n            if (s.allowClick) {\n                s.updateClickedSlide(e);\n                s.emit('onTap', s, e);\n                if (timeDiff < 300 && (touchEndTime - lastClickTime) > 300) {\n                    if (clickTimeout) clearTimeout(clickTimeout);\n                    clickTimeout = setTimeout(function () {\n                        if (!s) return;\n                        if (s.params.paginationHide && s.paginationContainer.length > 0 && !$(e.target).hasClass(s.params.bulletClass)) {\n                            s.paginationContainer.toggleClass(s.params.paginationHiddenClass);\n                        }\n                        s.emit('onClick', s, e);\n                    }, 300);\n\n                }\n                if (timeDiff < 300 && (touchEndTime - lastClickTime) < 300) {\n                    if (clickTimeout) clearTimeout(clickTimeout);\n                    s.emit('onDoubleTap', s, e);\n                }\n            }\n\n            lastClickTime = Date.now();\n            setTimeout(function () {\n                if (s) s.allowClick = true;\n            }, 0);\n\n            if (!isTouched || !isMoved || !s.swipeDirection || s.touches.diff === 0 || currentTranslate === startTranslate) {\n                isTouched = isMoved = false;\n                return;\n            }\n            isTouched = isMoved = false;\n\n            var currentPos;\n            if (s.params.followFinger) {\n                currentPos = s.rtl ? s.translate : -s.translate;\n            }\n            else {\n                currentPos = -currentTranslate;\n            }\n            if (s.params.freeMode) {\n                if (currentPos < -s.minTranslate()) {\n                    s.slideTo(s.activeIndex);\n                    return;\n                }\n                else if (currentPos > -s.maxTranslate()) {\n                    if (s.slides.length < s.snapGrid.length) {\n                        s.slideTo(s.snapGrid.length - 1);\n                    }\n                    else {\n                        s.slideTo(s.slides.length - 1);\n                    }\n                    return;\n                }\n\n                if (s.params.freeModeMomentum) {\n                    if (velocities.length > 1) {\n                        var lastMoveEvent = velocities.pop(), velocityEvent = velocities.pop();\n\n                        var distance = lastMoveEvent.position - velocityEvent.position;\n                        var time = lastMoveEvent.time - velocityEvent.time;\n                        s.velocity = distance / time;\n                        s.velocity = s.velocity / 2;\n                        if (Math.abs(s.velocity) < s.params.freeModeMinimumVelocity) {\n                            s.velocity = 0;\n                        }\n                        // this implies that the user stopped moving a finger then released.\n                        // There would be no events with distance zero, so the last event is stale.\n                        if (time > 150 || (new window.Date().getTime() - lastMoveEvent.time) > 300) {\n                            s.velocity = 0;\n                        }\n                    } else {\n                        s.velocity = 0;\n                    }\n\n                    velocities.length = 0;\n                    var momentumDuration = 1000 * s.params.freeModeMomentumRatio;\n                    var momentumDistance = s.velocity * momentumDuration;\n\n                    var newPosition = s.translate + momentumDistance;\n                    if (s.rtl) newPosition = - newPosition;\n                    var doBounce = false;\n                    var afterBouncePosition;\n                    var bounceAmount = Math.abs(s.velocity) * 20 * s.params.freeModeMomentumBounceRatio;\n                    if (newPosition < s.maxTranslate()) {\n                        if (s.params.freeModeMomentumBounce) {\n                            if (newPosition + s.maxTranslate() < -bounceAmount) {\n                                newPosition = s.maxTranslate() - bounceAmount;\n                            }\n                            afterBouncePosition = s.maxTranslate();\n                            doBounce = true;\n                            allowMomentumBounce = true;\n                        }\n                        else {\n                            newPosition = s.maxTranslate();\n                        }\n                    }\n                    else if (newPosition > s.minTranslate()) {\n                        if (s.params.freeModeMomentumBounce) {\n                            if (newPosition - s.minTranslate() > bounceAmount) {\n                                newPosition = s.minTranslate() + bounceAmount;\n                            }\n                            afterBouncePosition = s.minTranslate();\n                            doBounce = true;\n                            allowMomentumBounce = true;\n                        }\n                        else {\n                            newPosition = s.minTranslate();\n                        }\n                    }\n                    else if (s.params.freeModeSticky) {\n                        var j = 0,\n                            nextSlide;\n                        for (j = 0; j < s.snapGrid.length; j += 1) {\n                            if (s.snapGrid[j] > -newPosition) {\n                                nextSlide = j;\n                                break;\n                            }\n\n                        }\n                        if (Math.abs(s.snapGrid[nextSlide] - newPosition) < Math.abs(s.snapGrid[nextSlide - 1] - newPosition) || s.swipeDirection === 'next') {\n                            newPosition = s.snapGrid[nextSlide];\n                        } else {\n                            newPosition = s.snapGrid[nextSlide - 1];\n                        }\n                        if (!s.rtl) newPosition = - newPosition;\n                    }\n                    //Fix duration\n                    if (s.velocity !== 0) {\n                        if (s.rtl) {\n                            momentumDuration = Math.abs((-newPosition - s.translate) / s.velocity);\n                        }\n                        else {\n                            momentumDuration = Math.abs((newPosition - s.translate) / s.velocity);\n                        }\n                    }\n                    else if (s.params.freeModeSticky) {\n                        s.slideReset();\n                        return;\n                    }\n\n                    if (s.params.freeModeMomentumBounce && doBounce) {\n                        s.updateProgress(afterBouncePosition);\n                        s.setWrapperTransition(momentumDuration);\n                        s.setWrapperTranslate(newPosition);\n                        s.onTransitionStart();\n                        s.animating = true;\n                        s.wrapper.transitionEnd(function () {\n                            if (!s || !allowMomentumBounce) return;\n                            s.emit('onMomentumBounce', s);\n\n                            s.setWrapperTransition(s.params.speed);\n                            s.setWrapperTranslate(afterBouncePosition);\n                            s.wrapper.transitionEnd(function () {\n                                if (!s) return;\n                                s.onTransitionEnd();\n                            });\n                        });\n                    } else if (s.velocity) {\n                        s.updateProgress(newPosition);\n                        s.setWrapperTransition(momentumDuration);\n                        s.setWrapperTranslate(newPosition);\n                        s.onTransitionStart();\n                        if (!s.animating) {\n                            s.animating = true;\n                            s.wrapper.transitionEnd(function () {\n                                if (!s) return;\n                                s.onTransitionEnd();\n                            });\n                        }\n\n                    } else {\n                        s.updateProgress(newPosition);\n                    }\n\n                    s.updateActiveIndex();\n                }\n                if (!s.params.freeModeMomentum || timeDiff >= s.params.longSwipesMs) {\n                    s.updateProgress();\n                    s.updateActiveIndex();\n                }\n                return;\n            }\n\n            // Find current slide\n            var i, stopIndex = 0, groupSize = s.slidesSizesGrid[0];\n            for (i = 0; i < s.slidesGrid.length; i += s.params.slidesPerGroup) {\n                if (typeof s.slidesGrid[i + s.params.slidesPerGroup] !== 'undefined') {\n                    if (currentPos >= s.slidesGrid[i] && currentPos < s.slidesGrid[i + s.params.slidesPerGroup]) {\n                        stopIndex = i;\n                        groupSize = s.slidesGrid[i + s.params.slidesPerGroup] - s.slidesGrid[i];\n                    }\n                }\n                else {\n                    if (currentPos >= s.slidesGrid[i]) {\n                        stopIndex = i;\n                        groupSize = s.slidesGrid[s.slidesGrid.length - 1] - s.slidesGrid[s.slidesGrid.length - 2];\n                    }\n                }\n            }\n\n            // Find current slide size\n            var ratio = (currentPos - s.slidesGrid[stopIndex]) / groupSize;\n\n            if (timeDiff > s.params.longSwipesMs) {\n                // Long touches\n                if (!s.params.longSwipes) {\n                    s.slideTo(s.activeIndex);\n                    return;\n                }\n                if (s.swipeDirection === 'next') {\n                    if (ratio >= s.params.longSwipesRatio) s.slideTo(stopIndex + s.params.slidesPerGroup);\n                    else s.slideTo(stopIndex);\n\n                }\n                if (s.swipeDirection === 'prev') {\n                    if (ratio > (1 - s.params.longSwipesRatio)) s.slideTo(stopIndex + s.params.slidesPerGroup);\n                    else s.slideTo(stopIndex);\n                }\n            }\n            else {\n                // Short swipes\n                if (!s.params.shortSwipes) {\n                    s.slideTo(s.activeIndex);\n                    return;\n                }\n                if (s.swipeDirection === 'next') {\n                    s.slideTo(stopIndex + s.params.slidesPerGroup);\n\n                }\n                if (s.swipeDirection === 'prev') {\n                    s.slideTo(stopIndex);\n                }\n            }\n        };\n        /*=========================\n          Transitions\n          ===========================*/\n        s._slideTo = function (slideIndex, speed) {\n            return s.slideTo(slideIndex, speed, true, true);\n        };\n        s.slideTo = function (slideIndex, speed, runCallbacks, internal) {\n            if (typeof runCallbacks === 'undefined') runCallbacks = true;\n            if (typeof slideIndex === 'undefined') slideIndex = 0;\n            if (slideIndex < 0) slideIndex = 0;\n            s.snapIndex = Math.floor(slideIndex / s.params.slidesPerGroup);\n            if (s.snapIndex >= s.snapGrid.length) s.snapIndex = s.snapGrid.length - 1;\n\n            var translate = - s.snapGrid[s.snapIndex];\n            // Stop autoplay\n            if (s.params.autoplay && s.autoplaying) {\n                if (internal || !s.params.autoplayDisableOnInteraction) {\n                    s.pauseAutoplay(speed);\n                }\n                else {\n                    s.stopAutoplay();\n                }\n            }\n            // Update progress\n            s.updateProgress(translate);\n\n            // Normalize slideIndex\n            for (var i = 0; i < s.slidesGrid.length; i++) {\n                if (- Math.floor(translate * 100) >= Math.floor(s.slidesGrid[i] * 100)) {\n                    slideIndex = i;\n                }\n            }\n\n            // Directions locks\n            if (!s.params.allowSwipeToNext && translate < s.translate && translate < s.minTranslate()) {\n                return false;\n            }\n            if (!s.params.allowSwipeToPrev && translate > s.translate && translate > s.maxTranslate()) {\n                if ((s.activeIndex || 0) !== slideIndex ) return false;\n            }\n\n            // Update Index\n            if (typeof speed === 'undefined') speed = s.params.speed;\n            s.previousIndex = s.activeIndex || 0;\n            s.activeIndex = slideIndex;\n\n            if ((s.rtl && -translate === s.translate) || (!s.rtl && translate === s.translate)) {\n                // Update Height\n                if (s.params.autoHeight) {\n                    s.updateAutoHeight();\n                }\n                s.updateClasses();\n                if (s.params.effect !== 'slide') {\n                    s.setWrapperTranslate(translate);\n                }\n                return false;\n            }\n            s.updateClasses();\n            s.onTransitionStart(runCallbacks);\n\n            if (speed === 0) {\n                s.setWrapperTranslate(translate);\n                s.setWrapperTransition(0);\n                s.onTransitionEnd(runCallbacks);\n            }\n            else {\n                s.setWrapperTranslate(translate);\n                s.setWrapperTransition(speed);\n                if (!s.animating) {\n                    s.animating = true;\n                    s.wrapper.transitionEnd(function () {\n                        if (!s) return;\n                        s.onTransitionEnd(runCallbacks);\n                    });\n                }\n\n            }\n\n            return true;\n        };\n\n        s.onTransitionStart = function (runCallbacks) {\n            if (typeof runCallbacks === 'undefined') runCallbacks = true;\n            if (s.params.autoHeight) {\n                s.updateAutoHeight();\n            }\n            if (s.lazy) s.lazy.onTransitionStart();\n            if (runCallbacks) {\n                s.emit('onTransitionStart', s);\n                if (s.activeIndex !== s.previousIndex) {\n                    s.emit('onSlideChangeStart', s);\n                    _scope.$emit(\"$ionicSlides.slideChangeStart\", {\n                      slider: s,\n                      activeIndex: s.getSlideDataIndex(s.activeIndex),\n                      previousIndex: s.getSlideDataIndex(s.previousIndex)\n                    });\n                    if (s.activeIndex > s.previousIndex) {\n                        s.emit('onSlideNextStart', s);\n                    }\n                    else {\n                        s.emit('onSlidePrevStart', s);\n                    }\n                }\n\n            }\n        };\n        s.onTransitionEnd = function (runCallbacks) {\n            s.animating = false;\n            s.setWrapperTransition(0);\n            if (typeof runCallbacks === 'undefined') runCallbacks = true;\n            if (s.lazy) s.lazy.onTransitionEnd();\n            if (runCallbacks) {\n                s.emit('onTransitionEnd', s);\n                if (s.activeIndex !== s.previousIndex) {\n                    s.emit('onSlideChangeEnd', s);\n                    _scope.$emit(\"$ionicSlides.slideChangeEnd\", {\n                      slider: s,\n                      activeIndex: s.getSlideDataIndex(s.activeIndex),\n                      previousIndex: s.getSlideDataIndex(s.previousIndex)\n                    });\n                    if (s.activeIndex > s.previousIndex) {\n                        s.emit('onSlideNextEnd', s);\n                    }\n                    else {\n                        s.emit('onSlidePrevEnd', s);\n                    }\n                }\n            }\n            if (s.params.hashnav && s.hashnav) {\n                s.hashnav.setHash();\n            }\n\n        };\n        s.slideNext = function (runCallbacks, speed, internal) {\n            if (s.params.loop) {\n                if (s.animating) return false;\n                s.fixLoop();\n                var clientLeft = s.container[0].clientLeft;\n                return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);\n            }\n            else return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);\n        };\n        s._slideNext = function (speed) {\n            return s.slideNext(true, speed, true);\n        };\n        s.slidePrev = function (runCallbacks, speed, internal) {\n            if (s.params.loop) {\n                if (s.animating) return false;\n                s.fixLoop();\n                var clientLeft = s.container[0].clientLeft;\n                return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);\n            }\n            else return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);\n        };\n        s._slidePrev = function (speed) {\n            return s.slidePrev(true, speed, true);\n        };\n        s.slideReset = function (runCallbacks, speed, internal) {\n            return s.slideTo(s.activeIndex, speed, runCallbacks);\n        };\n\n        /*=========================\n          Translate/transition helpers\n          ===========================*/\n        s.setWrapperTransition = function (duration, byController) {\n            s.wrapper.transition(duration);\n            if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n                s.effects[s.params.effect].setTransition(duration);\n            }\n            if (s.params.parallax && s.parallax) {\n                s.parallax.setTransition(duration);\n            }\n            if (s.params.scrollbar && s.scrollbar) {\n                s.scrollbar.setTransition(duration);\n            }\n            if (s.params.control && s.controller) {\n                s.controller.setTransition(duration, byController);\n            }\n            s.emit('onSetTransition', s, duration);\n        };\n        s.setWrapperTranslate = function (translate, updateActiveIndex, byController) {\n            var x = 0, y = 0, z = 0;\n            if (isH()) {\n                x = s.rtl ? -translate : translate;\n            }\n            else {\n                y = translate;\n            }\n\n            if (s.params.roundLengths) {\n                x = round(x);\n                y = round(y);\n            }\n\n            if (!s.params.virtualTranslate) {\n                if (s.support.transforms3d) s.wrapper.transform('translate3d(' + x + 'px, ' + y + 'px, ' + z + 'px)');\n                else s.wrapper.transform('translate(' + x + 'px, ' + y + 'px)');\n            }\n\n            s.translate = isH() ? x : y;\n\n            // Check if we need to update progress\n            var progress;\n            var translatesDiff = s.maxTranslate() - s.minTranslate();\n            if (translatesDiff === 0) {\n                progress = 0;\n            }\n            else {\n                progress = (translate - s.minTranslate()) / (translatesDiff);\n            }\n            if (progress !== s.progress) {\n                s.updateProgress(translate);\n            }\n\n            if (updateActiveIndex) s.updateActiveIndex();\n            if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n                s.effects[s.params.effect].setTranslate(s.translate);\n            }\n            if (s.params.parallax && s.parallax) {\n                s.parallax.setTranslate(s.translate);\n            }\n            if (s.params.scrollbar && s.scrollbar) {\n                s.scrollbar.setTranslate(s.translate);\n            }\n            if (s.params.control && s.controller) {\n                s.controller.setTranslate(s.translate, byController);\n            }\n            s.emit('onSetTranslate', s, s.translate);\n        };\n\n        s.getTranslate = function (el, axis) {\n            var matrix, curTransform, curStyle, transformMatrix;\n\n            // automatic axis detection\n            if (typeof axis === 'undefined') {\n                axis = 'x';\n            }\n\n            if (s.params.virtualTranslate) {\n                return s.rtl ? -s.translate : s.translate;\n            }\n\n            curStyle = window.getComputedStyle(el, null);\n            if (window.WebKitCSSMatrix) {\n                curTransform = curStyle.transform || curStyle.webkitTransform;\n                if (curTransform.split(',').length > 6) {\n                    curTransform = curTransform.split(', ').map(function(a){\n                        return a.replace(',','.');\n                    }).join(', ');\n                }\n                // Some old versions of Webkit choke when 'none' is passed; pass\n                // empty string instead in this case\n                transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n            }\n            else {\n                transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform  || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n                matrix = transformMatrix.toString().split(',');\n            }\n\n            if (axis === 'x') {\n                //Latest Chrome and webkits Fix\n                if (window.WebKitCSSMatrix)\n                    curTransform = transformMatrix.m41;\n                //Crazy IE10 Matrix\n                else if (matrix.length === 16)\n                    curTransform = parseFloat(matrix[12]);\n                //Normal Browsers\n                else\n                    curTransform = parseFloat(matrix[4]);\n            }\n            if (axis === 'y') {\n                //Latest Chrome and webkits Fix\n                if (window.WebKitCSSMatrix)\n                    curTransform = transformMatrix.m42;\n                //Crazy IE10 Matrix\n                else if (matrix.length === 16)\n                    curTransform = parseFloat(matrix[13]);\n                //Normal Browsers\n                else\n                    curTransform = parseFloat(matrix[5]);\n            }\n            if (s.rtl && curTransform) curTransform = -curTransform;\n            return curTransform || 0;\n        };\n        s.getWrapperTranslate = function (axis) {\n            if (typeof axis === 'undefined') {\n                axis = isH() ? 'x' : 'y';\n            }\n            return s.getTranslate(s.wrapper[0], axis);\n        };\n\n        /*=========================\n          Observer\n          ===========================*/\n        s.observers = [];\n        function initObserver(target, options) {\n            options = options || {};\n            // create an observer instance\n            var ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n            var observer = new ObserverFunc(function (mutations) {\n                mutations.forEach(function (mutation) {\n                    s.onResize(true);\n                    s.emit('onObserverUpdate', s, mutation);\n                });\n            });\n\n            observer.observe(target, {\n                attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n                childList: typeof options.childList === 'undefined' ? true : options.childList,\n                characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n            });\n\n            s.observers.push(observer);\n        }\n        s.initObservers = function () {\n            if (s.params.observeParents) {\n                var containerParents = s.container.parents();\n                for (var i = 0; i < containerParents.length; i++) {\n                    initObserver(containerParents[i]);\n                }\n            }\n\n            // Observe container\n            initObserver(s.container[0], {childList: false});\n\n            // Observe wrapper\n            initObserver(s.wrapper[0], {attributes: false});\n        };\n        s.disconnectObservers = function () {\n            for (var i = 0; i < s.observers.length; i++) {\n                s.observers[i].disconnect();\n            }\n            s.observers = [];\n        };\n\n        s.updateLoop = function(){\n          var currentSlide = s.slides.eq(s.activeIndex);\n          if ( angular.element(currentSlide).hasClass(s.params.slideDuplicateClass) ){\n            // we're on a duplicate, so slide to the non-duplicate\n            var swiperSlideIndex = angular.element(currentSlide).attr(\"data-swiper-slide-index\");\n            var slides = s.wrapper.children('.' + s.params.slideClass);\n            for ( var i = 0; i < slides.length; i++ ){\n              if ( !angular.element(slides[i]).hasClass(s.params.slideDuplicateClass) && angular.element(slides[i]).attr(\"data-swiper-slide-index\") === swiperSlideIndex ){\n                s.slideTo(i, 0, false, true);\n                break;\n              }\n            }\n            // if we needed to switch slides, we did that.  So, now call the createLoop function internally\n            setTimeout(function(){\n              s.createLoop();\n            }, 50);\n          }\n        }\n\n        s.getSlideDataIndex = function(slideIndex){\n          // this is an Ionic custom function\n          // Swiper loops utilize duplicate DOM elements for slides when in a loop\n          // which means that we cannot rely on the actual slide index for our events\n          // because index 0 does not necessarily point to index 0\n          // and index n+1 does not necessarily point to the expected piece of data\n          // therefore, rather than using the actual slide index we should\n          // use the data index that swiper includes as an attribute on the dom elements\n          // because this is what will be meaningful to the consumer of our events\n          var slide = s.slides.eq(slideIndex);\n          var attributeIndex = angular.element(slide).attr(\"data-swiper-slide-index\");\n          return parseInt(attributeIndex);\n        }\n\n        /*=========================\n          Loop\n          ===========================*/\n        // Create looped slides\n        s.createLoop = function () {\n          //console.log(\"Slider create loop method\");\n            //var toRemove = s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass);\n            //angular.element(toRemove).remove();\n            s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();\n\n            var slides = s.wrapper.children('.' + s.params.slideClass);\n\n            if(s.params.slidesPerView === 'auto' && !s.params.loopedSlides) s.params.loopedSlides = slides.length;\n\n            s.loopedSlides = parseInt(s.params.loopedSlides || s.params.slidesPerView, 10);\n            s.loopedSlides = s.loopedSlides + s.params.loopAdditionalSlides;\n            if (s.loopedSlides > slides.length) {\n                s.loopedSlides = slides.length;\n            }\n\n            var prependSlides = [], appendSlides = [], i, scope, newNode;\n            slides.each(function (index, el) {\n                var slide = $(this);\n                if (index < s.loopedSlides) appendSlides.push(el);\n                if (index < slides.length && index >= slides.length - s.loopedSlides) prependSlides.push(el);\n                slide.attr('data-swiper-slide-index', index);\n            });\n            for (i = 0; i < appendSlides.length; i++) {\n\n              newNode = angular.element(appendSlides[i]).clone().addClass(s.params.slideDuplicateClass);\n              newNode.removeAttr('ng-transclude');\n              newNode.removeAttr('ng-repeat');\n              scope = angular.element(appendSlides[i]).scope();\n              newNode = $compile(newNode)(scope);\n              angular.element(s.wrapper).append(newNode);\n              //s.wrapper.append($(appendSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));\n            }\n            for (i = prependSlides.length - 1; i >= 0; i--) {\n              //s.wrapper.prepend($(prependSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));\n\n              newNode = angular.element(prependSlides[i]).clone().addClass(s.params.slideDuplicateClass);\n              newNode.removeAttr('ng-transclude');\n              newNode.removeAttr('ng-repeat');\n\n              scope = angular.element(prependSlides[i]).scope();\n              newNode = $compile(newNode)(scope);\n              angular.element(s.wrapper).prepend(newNode);\n            }\n        };\n        s.destroyLoop = function () {\n            s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();\n            s.slides.removeAttr('data-swiper-slide-index');\n        };\n        s.fixLoop = function () {\n            var newIndex;\n            //Fix For Negative Oversliding\n            if (s.activeIndex < s.loopedSlides) {\n                newIndex = s.slides.length - s.loopedSlides * 3 + s.activeIndex;\n                newIndex = newIndex + s.loopedSlides;\n                s.slideTo(newIndex, 0, false, true);\n            }\n            //Fix For Positive Oversliding\n            else if ((s.params.slidesPerView === 'auto' && s.activeIndex >= s.loopedSlides * 2) || (s.activeIndex > s.slides.length - s.params.slidesPerView * 2)) {\n                newIndex = -s.slides.length + s.activeIndex + s.loopedSlides;\n                newIndex = newIndex + s.loopedSlides;\n                s.slideTo(newIndex, 0, false, true);\n            }\n        };\n        /*=========================\n          Append/Prepend/Remove Slides\n          ===========================*/\n        s.appendSlide = function (slides) {\n            if (s.params.loop) {\n                s.destroyLoop();\n            }\n            if (typeof slides === 'object' && slides.length) {\n                for (var i = 0; i < slides.length; i++) {\n                    if (slides[i]) s.wrapper.append(slides[i]);\n                }\n            }\n            else {\n                s.wrapper.append(slides);\n            }\n            if (s.params.loop) {\n                s.createLoop();\n            }\n            if (!(s.params.observer && s.support.observer)) {\n                s.update(true);\n            }\n        };\n        s.prependSlide = function (slides) {\n            if (s.params.loop) {\n                s.destroyLoop();\n            }\n            var newActiveIndex = s.activeIndex + 1;\n            if (typeof slides === 'object' && slides.length) {\n                for (var i = 0; i < slides.length; i++) {\n                    if (slides[i]) s.wrapper.prepend(slides[i]);\n                }\n                newActiveIndex = s.activeIndex + slides.length;\n            }\n            else {\n                s.wrapper.prepend(slides);\n            }\n            if (s.params.loop) {\n                s.createLoop();\n            }\n            if (!(s.params.observer && s.support.observer)) {\n                s.update(true);\n            }\n            s.slideTo(newActiveIndex, 0, false);\n        };\n        s.removeSlide = function (slidesIndexes) {\n            if (s.params.loop) {\n                s.destroyLoop();\n                s.slides = s.wrapper.children('.' + s.params.slideClass);\n            }\n            var newActiveIndex = s.activeIndex,\n                indexToRemove;\n            if (typeof slidesIndexes === 'object' && slidesIndexes.length) {\n                for (var i = 0; i < slidesIndexes.length; i++) {\n                    indexToRemove = slidesIndexes[i];\n                    if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();\n                    if (indexToRemove < newActiveIndex) newActiveIndex--;\n                }\n                newActiveIndex = Math.max(newActiveIndex, 0);\n            }\n            else {\n                indexToRemove = slidesIndexes;\n                if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();\n                if (indexToRemove < newActiveIndex) newActiveIndex--;\n                newActiveIndex = Math.max(newActiveIndex, 0);\n            }\n\n            if (s.params.loop) {\n                s.createLoop();\n            }\n\n            if (!(s.params.observer && s.support.observer)) {\n                s.update(true);\n            }\n            if (s.params.loop) {\n                s.slideTo(newActiveIndex + s.loopedSlides, 0, false);\n            }\n            else {\n                s.slideTo(newActiveIndex, 0, false);\n            }\n\n        };\n        s.removeAllSlides = function () {\n            var slidesIndexes = [];\n            for (var i = 0; i < s.slides.length; i++) {\n                slidesIndexes.push(i);\n            }\n            s.removeSlide(slidesIndexes);\n        };\n\n\n        /*=========================\n          Effects\n          ===========================*/\n        s.effects = {\n            fade: {\n                setTranslate: function () {\n                    for (var i = 0; i < s.slides.length; i++) {\n                        var slide = s.slides.eq(i);\n                        var offset = slide[0].swiperSlideOffset;\n                        var tx = -offset;\n                        if (!s.params.virtualTranslate) tx = tx - s.translate;\n                        var ty = 0;\n                        if (!isH()) {\n                            ty = tx;\n                            tx = 0;\n                        }\n                        var slideOpacity = s.params.fade.crossFade ?\n                                Math.max(1 - Math.abs(slide[0].progress), 0) :\n                                1 + Math.min(Math.max(slide[0].progress, -1), 0);\n                        slide\n                            .css({\n                                opacity: slideOpacity\n                            })\n                            .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px)');\n\n                    }\n\n                },\n                setTransition: function (duration) {\n                    s.slides.transition(duration);\n                    if (s.params.virtualTranslate && duration !== 0) {\n                        var eventTriggered = false;\n                        s.slides.transitionEnd(function () {\n                            if (eventTriggered) return;\n                            if (!s) return;\n                            eventTriggered = true;\n                            s.animating = false;\n                            var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];\n                            for (var i = 0; i < triggerEvents.length; i++) {\n                                s.wrapper.trigger(triggerEvents[i]);\n                            }\n                        });\n                    }\n                }\n            },\n            cube: {\n                setTranslate: function () {\n                    var wrapperRotate = 0, cubeShadow;\n                    if (s.params.cube.shadow) {\n                        if (isH()) {\n                            cubeShadow = s.wrapper.find('.swiper-cube-shadow');\n                            if (cubeShadow.length === 0) {\n                                cubeShadow = $('<div class=\"swiper-cube-shadow\"></div>');\n                                s.wrapper.append(cubeShadow);\n                            }\n                            cubeShadow.css({height: s.width + 'px'});\n                        }\n                        else {\n                            cubeShadow = s.container.find('.swiper-cube-shadow');\n                            if (cubeShadow.length === 0) {\n                                cubeShadow = $('<div class=\"swiper-cube-shadow\"></div>');\n                                s.container.append(cubeShadow);\n                            }\n                        }\n                    }\n                    for (var i = 0; i < s.slides.length; i++) {\n                        var slide = s.slides.eq(i);\n                        var slideAngle = i * 90;\n                        var round = Math.floor(slideAngle / 360);\n                        if (s.rtl) {\n                            slideAngle = -slideAngle;\n                            round = Math.floor(-slideAngle / 360);\n                        }\n                        var progress = Math.max(Math.min(slide[0].progress, 1), -1);\n                        var tx = 0, ty = 0, tz = 0;\n                        if (i % 4 === 0) {\n                            tx = - round * 4 * s.size;\n                            tz = 0;\n                        }\n                        else if ((i - 1) % 4 === 0) {\n                            tx = 0;\n                            tz = - round * 4 * s.size;\n                        }\n                        else if ((i - 2) % 4 === 0) {\n                            tx = s.size + round * 4 * s.size;\n                            tz = s.size;\n                        }\n                        else if ((i - 3) % 4 === 0) {\n                            tx = - s.size;\n                            tz = 3 * s.size + s.size * 4 * round;\n                        }\n                        if (s.rtl) {\n                            tx = -tx;\n                        }\n\n                        if (!isH()) {\n                            ty = tx;\n                            tx = 0;\n                        }\n\n                        var transform = 'rotateX(' + (isH() ? 0 : -slideAngle) + 'deg) rotateY(' + (isH() ? slideAngle : 0) + 'deg) translate3d(' + tx + 'px, ' + ty + 'px, ' + tz + 'px)';\n                        if (progress <= 1 && progress > -1) {\n                            wrapperRotate = i * 90 + progress * 90;\n                            if (s.rtl) wrapperRotate = -i * 90 - progress * 90;\n                        }\n                        slide.transform(transform);\n                        if (s.params.cube.slideShadows) {\n                            //Set shadows\n                            var shadowBefore = isH() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');\n                            var shadowAfter = isH() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');\n                            if (shadowBefore.length === 0) {\n                                shadowBefore = $('<div class=\"swiper-slide-shadow-' + (isH() ? 'left' : 'top') + '\"></div>');\n                                slide.append(shadowBefore);\n                            }\n                            if (shadowAfter.length === 0) {\n                                shadowAfter = $('<div class=\"swiper-slide-shadow-' + (isH() ? 'right' : 'bottom') + '\"></div>');\n                                slide.append(shadowAfter);\n                            }\n                            var shadowOpacity = slide[0].progress;\n                            if (shadowBefore.length) shadowBefore[0].style.opacity = -slide[0].progress;\n                            if (shadowAfter.length) shadowAfter[0].style.opacity = slide[0].progress;\n                        }\n                    }\n                    s.wrapper.css({\n                        '-webkit-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n                        '-moz-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n                        '-ms-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n                        'transform-origin': '50% 50% -' + (s.size / 2) + 'px'\n                    });\n\n                    if (s.params.cube.shadow) {\n                        if (isH()) {\n                            cubeShadow.transform('translate3d(0px, ' + (s.width / 2 + s.params.cube.shadowOffset) + 'px, ' + (-s.width / 2) + 'px) rotateX(90deg) rotateZ(0deg) scale(' + (s.params.cube.shadowScale) + ')');\n                        }\n                        else {\n                            var shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;\n                            var multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);\n                            var scale1 = s.params.cube.shadowScale,\n                                scale2 = s.params.cube.shadowScale / multiplier,\n                                offset = s.params.cube.shadowOffset;\n                            cubeShadow.transform('scale3d(' + scale1 + ', 1, ' + scale2 + ') translate3d(0px, ' + (s.height / 2 + offset) + 'px, ' + (-s.height / 2 / scale2) + 'px) rotateX(-90deg)');\n                        }\n                    }\n                    var zFactor = (s.isSafari || s.isUiWebView) ? (-s.size / 2) : 0;\n                    s.wrapper.transform('translate3d(0px,0,' + zFactor + 'px) rotateX(' + (isH() ? 0 : wrapperRotate) + 'deg) rotateY(' + (isH() ? -wrapperRotate : 0) + 'deg)');\n                },\n                setTransition: function (duration) {\n                    s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n                    if (s.params.cube.shadow && !isH()) {\n                        s.container.find('.swiper-cube-shadow').transition(duration);\n                    }\n                }\n            },\n            coverflow: {\n                setTranslate: function () {\n                    var transform = s.translate;\n                    var center = isH() ? -transform + s.width / 2 : -transform + s.height / 2;\n                    var rotate = isH() ? s.params.coverflow.rotate: -s.params.coverflow.rotate;\n                    var translate = s.params.coverflow.depth;\n                    //Each slide offset from center\n                    for (var i = 0, length = s.slides.length; i < length; i++) {\n                        var slide = s.slides.eq(i);\n                        var slideSize = s.slidesSizesGrid[i];\n                        var slideOffset = slide[0].swiperSlideOffset;\n                        var offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * s.params.coverflow.modifier;\n\n                        var rotateY = isH() ? rotate * offsetMultiplier : 0;\n                        var rotateX = isH() ? 0 : rotate * offsetMultiplier;\n                        // var rotateZ = 0\n                        var translateZ = -translate * Math.abs(offsetMultiplier);\n\n                        var translateY = isH() ? 0 : s.params.coverflow.stretch * (offsetMultiplier);\n                        var translateX = isH() ? s.params.coverflow.stretch * (offsetMultiplier) : 0;\n\n                        //Fix for ultra small values\n                        if (Math.abs(translateX) < 0.001) translateX = 0;\n                        if (Math.abs(translateY) < 0.001) translateY = 0;\n                        if (Math.abs(translateZ) < 0.001) translateZ = 0;\n                        if (Math.abs(rotateY) < 0.001) rotateY = 0;\n                        if (Math.abs(rotateX) < 0.001) rotateX = 0;\n\n                        var slideTransform = 'translate3d(' + translateX + 'px,' + translateY + 'px,' + translateZ + 'px)  rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)';\n\n                        slide.transform(slideTransform);\n                        slide[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;\n                        if (s.params.coverflow.slideShadows) {\n                            //Set shadows\n                            var shadowBefore = isH() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');\n                            var shadowAfter = isH() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');\n                            if (shadowBefore.length === 0) {\n                                shadowBefore = $('<div class=\"swiper-slide-shadow-' + (isH() ? 'left' : 'top') + '\"></div>');\n                                slide.append(shadowBefore);\n                            }\n                            if (shadowAfter.length === 0) {\n                                shadowAfter = $('<div class=\"swiper-slide-shadow-' + (isH() ? 'right' : 'bottom') + '\"></div>');\n                                slide.append(shadowAfter);\n                            }\n                            if (shadowBefore.length) shadowBefore[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;\n                            if (shadowAfter.length) shadowAfter[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;\n                        }\n                    }\n\n                    //Set correct perspective for IE10\n                    if (s.browser.ie) {\n                        var ws = s.wrapper[0].style;\n                        ws.perspectiveOrigin = center + 'px 50%';\n                    }\n                },\n                setTransition: function (duration) {\n                    s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n                }\n            }\n        };\n\n        /*=========================\n          Images Lazy Loading\n          ===========================*/\n        s.lazy = {\n            initialImageLoaded: false,\n            loadImageInSlide: function (index, loadInDuplicate) {\n                if (typeof index === 'undefined') return;\n                if (typeof loadInDuplicate === 'undefined') loadInDuplicate = true;\n                if (s.slides.length === 0) return;\n\n                var slide = s.slides.eq(index);\n                var img = slide.find('.swiper-lazy:not(.swiper-lazy-loaded):not(.swiper-lazy-loading)');\n                if (slide.hasClass('swiper-lazy') && !slide.hasClass('swiper-lazy-loaded') && !slide.hasClass('swiper-lazy-loading')) {\n                    img = img.add(slide[0]);\n                }\n                if (img.length === 0) return;\n\n                img.each(function () {\n                    var _img = $(this);\n                    _img.addClass('swiper-lazy-loading');\n                    var background = _img.attr('data-background');\n                    var src = _img.attr('data-src'),\n                        srcset = _img.attr('data-srcset');\n                    s.loadImage(_img[0], (src || background), srcset, false, function () {\n                        if (background) {\n                            _img.css('background-image', 'url(' + background + ')');\n                            _img.removeAttr('data-background');\n                        }\n                        else {\n                            if (srcset) {\n                                _img.attr('srcset', srcset);\n                                _img.removeAttr('data-srcset');\n                            }\n                            if (src) {\n                                _img.attr('src', src);\n                                _img.removeAttr('data-src');\n                            }\n\n                        }\n\n                        _img.addClass('swiper-lazy-loaded').removeClass('swiper-lazy-loading');\n                        slide.find('.swiper-lazy-preloader, .preloader').remove();\n                        if (s.params.loop && loadInDuplicate) {\n                            var slideOriginalIndex = slide.attr('data-swiper-slide-index');\n                            if (slide.hasClass(s.params.slideDuplicateClass)) {\n                                var originalSlide = s.wrapper.children('[data-swiper-slide-index=\"' + slideOriginalIndex + '\"]:not(.' + s.params.slideDuplicateClass + ')');\n                                s.lazy.loadImageInSlide(originalSlide.index(), false);\n                            }\n                            else {\n                                var duplicatedSlide = s.wrapper.children('.' + s.params.slideDuplicateClass + '[data-swiper-slide-index=\"' + slideOriginalIndex + '\"]');\n                                s.lazy.loadImageInSlide(duplicatedSlide.index(), false);\n                            }\n                        }\n                        s.emit('onLazyImageReady', s, slide[0], _img[0]);\n                    });\n\n                    s.emit('onLazyImageLoad', s, slide[0], _img[0]);\n                });\n\n            },\n            load: function () {\n                var i;\n                if (s.params.watchSlidesVisibility) {\n                    s.wrapper.children('.' + s.params.slideVisibleClass).each(function () {\n                        s.lazy.loadImageInSlide($(this).index());\n                    });\n                }\n                else {\n                    if (s.params.slidesPerView > 1) {\n                        for (i = s.activeIndex; i < s.activeIndex + s.params.slidesPerView ; i++) {\n                            if (s.slides[i]) s.lazy.loadImageInSlide(i);\n                        }\n                    }\n                    else {\n                        s.lazy.loadImageInSlide(s.activeIndex);\n                    }\n                }\n                if (s.params.lazyLoadingInPrevNext) {\n                    if (s.params.slidesPerView > 1) {\n                        // Next Slides\n                        for (i = s.activeIndex + s.params.slidesPerView; i < s.activeIndex + s.params.slidesPerView + s.params.slidesPerView; i++) {\n                            if (s.slides[i]) s.lazy.loadImageInSlide(i);\n                        }\n                        // Prev Slides\n                        for (i = s.activeIndex - s.params.slidesPerView; i < s.activeIndex ; i++) {\n                            if (s.slides[i]) s.lazy.loadImageInSlide(i);\n                        }\n                    }\n                    else {\n                        var nextSlide = s.wrapper.children('.' + s.params.slideNextClass);\n                        if (nextSlide.length > 0) s.lazy.loadImageInSlide(nextSlide.index());\n\n                        var prevSlide = s.wrapper.children('.' + s.params.slidePrevClass);\n                        if (prevSlide.length > 0) s.lazy.loadImageInSlide(prevSlide.index());\n                    }\n                }\n            },\n            onTransitionStart: function () {\n                if (s.params.lazyLoading) {\n                    if (s.params.lazyLoadingOnTransitionStart || (!s.params.lazyLoadingOnTransitionStart && !s.lazy.initialImageLoaded)) {\n                        s.lazy.load();\n                    }\n                }\n            },\n            onTransitionEnd: function () {\n                if (s.params.lazyLoading && !s.params.lazyLoadingOnTransitionStart) {\n                    s.lazy.load();\n                }\n            }\n        };\n\n\n        /*=========================\n          Scrollbar\n          ===========================*/\n        s.scrollbar = {\n            isTouched: false,\n            setDragPosition: function (e) {\n                var sb = s.scrollbar;\n                var x = 0, y = 0;\n                var translate;\n                var pointerPosition = isH() ?\n                    ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX) :\n                    ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY) ;\n                var position = (pointerPosition) - sb.track.offset()[isH() ? 'left' : 'top'] - sb.dragSize / 2;\n                var positionMin = -s.minTranslate() * sb.moveDivider;\n                var positionMax = -s.maxTranslate() * sb.moveDivider;\n                if (position < positionMin) {\n                    position = positionMin;\n                }\n                else if (position > positionMax) {\n                    position = positionMax;\n                }\n                position = -position / sb.moveDivider;\n                s.updateProgress(position);\n                s.setWrapperTranslate(position, true);\n            },\n            dragStart: function (e) {\n                var sb = s.scrollbar;\n                sb.isTouched = true;\n                e.preventDefault();\n                e.stopPropagation();\n\n                sb.setDragPosition(e);\n                clearTimeout(sb.dragTimeout);\n\n                sb.track.transition(0);\n                if (s.params.scrollbarHide) {\n                    sb.track.css('opacity', 1);\n                }\n                s.wrapper.transition(100);\n                sb.drag.transition(100);\n                s.emit('onScrollbarDragStart', s);\n            },\n            dragMove: function (e) {\n                var sb = s.scrollbar;\n                if (!sb.isTouched) return;\n                if (e.preventDefault) e.preventDefault();\n                else e.returnValue = false;\n                sb.setDragPosition(e);\n                s.wrapper.transition(0);\n                sb.track.transition(0);\n                sb.drag.transition(0);\n                s.emit('onScrollbarDragMove', s);\n            },\n            dragEnd: function (e) {\n                var sb = s.scrollbar;\n                if (!sb.isTouched) return;\n                sb.isTouched = false;\n                if (s.params.scrollbarHide) {\n                    clearTimeout(sb.dragTimeout);\n                    sb.dragTimeout = setTimeout(function () {\n                        sb.track.css('opacity', 0);\n                        sb.track.transition(400);\n                    }, 1000);\n\n                }\n                s.emit('onScrollbarDragEnd', s);\n                if (s.params.scrollbarSnapOnRelease) {\n                    s.slideReset();\n                }\n            },\n            enableDraggable: function () {\n                var sb = s.scrollbar;\n                var target = s.support.touch ? sb.track : document;\n                $(sb.track).on(s.touchEvents.start, sb.dragStart);\n                $(target).on(s.touchEvents.move, sb.dragMove);\n                $(target).on(s.touchEvents.end, sb.dragEnd);\n            },\n            disableDraggable: function () {\n                var sb = s.scrollbar;\n                var target = s.support.touch ? sb.track : document;\n                $(sb.track).off(s.touchEvents.start, sb.dragStart);\n                $(target).off(s.touchEvents.move, sb.dragMove);\n                $(target).off(s.touchEvents.end, sb.dragEnd);\n            },\n            set: function () {\n                if (!s.params.scrollbar) return;\n                var sb = s.scrollbar;\n                sb.track = $(s.params.scrollbar);\n                sb.drag = sb.track.find('.swiper-scrollbar-drag');\n                if (sb.drag.length === 0) {\n                    sb.drag = $('<div class=\"swiper-scrollbar-drag\"></div>');\n                    sb.track.append(sb.drag);\n                }\n                sb.drag[0].style.width = '';\n                sb.drag[0].style.height = '';\n                sb.trackSize = isH() ? sb.track[0].offsetWidth : sb.track[0].offsetHeight;\n\n                sb.divider = s.size / s.virtualSize;\n                sb.moveDivider = sb.divider * (sb.trackSize / s.size);\n                sb.dragSize = sb.trackSize * sb.divider;\n\n                if (isH()) {\n                    sb.drag[0].style.width = sb.dragSize + 'px';\n                }\n                else {\n                    sb.drag[0].style.height = sb.dragSize + 'px';\n                }\n\n                if (sb.divider >= 1) {\n                    sb.track[0].style.display = 'none';\n                }\n                else {\n                    sb.track[0].style.display = '';\n                }\n                if (s.params.scrollbarHide) {\n                    sb.track[0].style.opacity = 0;\n                }\n            },\n            setTranslate: function () {\n                if (!s.params.scrollbar) return;\n                var diff;\n                var sb = s.scrollbar;\n                var translate = s.translate || 0;\n                var newPos;\n\n                var newSize = sb.dragSize;\n                newPos = (sb.trackSize - sb.dragSize) * s.progress;\n                if (s.rtl && isH()) {\n                    newPos = -newPos;\n                    if (newPos > 0) {\n                        newSize = sb.dragSize - newPos;\n                        newPos = 0;\n                    }\n                    else if (-newPos + sb.dragSize > sb.trackSize) {\n                        newSize = sb.trackSize + newPos;\n                    }\n                }\n                else {\n                    if (newPos < 0) {\n                        newSize = sb.dragSize + newPos;\n                        newPos = 0;\n                    }\n                    else if (newPos + sb.dragSize > sb.trackSize) {\n                        newSize = sb.trackSize - newPos;\n                    }\n                }\n                if (isH()) {\n                    if (s.support.transforms3d) {\n                        sb.drag.transform('translate3d(' + (newPos) + 'px, 0, 0)');\n                    }\n                    else {\n                        sb.drag.transform('translateX(' + (newPos) + 'px)');\n                    }\n                    sb.drag[0].style.width = newSize + 'px';\n                }\n                else {\n                    if (s.support.transforms3d) {\n                        sb.drag.transform('translate3d(0px, ' + (newPos) + 'px, 0)');\n                    }\n                    else {\n                        sb.drag.transform('translateY(' + (newPos) + 'px)');\n                    }\n                    sb.drag[0].style.height = newSize + 'px';\n                }\n                if (s.params.scrollbarHide) {\n                    clearTimeout(sb.timeout);\n                    sb.track[0].style.opacity = 1;\n                    sb.timeout = setTimeout(function () {\n                        sb.track[0].style.opacity = 0;\n                        sb.track.transition(400);\n                    }, 1000);\n                }\n            },\n            setTransition: function (duration) {\n                if (!s.params.scrollbar) return;\n                s.scrollbar.drag.transition(duration);\n            }\n        };\n\n        /*=========================\n          Controller\n          ===========================*/\n        s.controller = {\n            LinearSpline: function (x, y) {\n                this.x = x;\n                this.y = y;\n                this.lastIndex = x.length - 1;\n                // Given an x value (x2), return the expected y2 value:\n                // (x1,y1) is the known point before given value,\n                // (x3,y3) is the known point after given value.\n                var i1, i3;\n                var l = this.x.length;\n\n                this.interpolate = function (x2) {\n                    if (!x2) return 0;\n\n                    // Get the indexes of x1 and x3 (the array indexes before and after given x2):\n                    i3 = binarySearch(this.x, x2);\n                    i1 = i3 - 1;\n\n                    // We have our indexes i1 & i3, so we can calculate already:\n                    // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1\n                    return ((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1]) + this.y[i1];\n                };\n\n                var binarySearch = (function() {\n                    var maxIndex, minIndex, guess;\n                    return function(array, val) {\n                        minIndex = -1;\n                        maxIndex = array.length;\n                        while (maxIndex - minIndex > 1)\n                            if (array[guess = maxIndex + minIndex >> 1] <= val) {\n                                minIndex = guess;\n                            } else {\n                                maxIndex = guess;\n                            }\n                        return maxIndex;\n                    };\n                })();\n            },\n            //xxx: for now i will just save one spline function to to\n            getInterpolateFunction: function(c){\n                if(!s.controller.spline) s.controller.spline = s.params.loop ?\n                    new s.controller.LinearSpline(s.slidesGrid, c.slidesGrid) :\n                    new s.controller.LinearSpline(s.snapGrid, c.snapGrid);\n            },\n            setTranslate: function (translate, byController) {\n               var controlled = s.params.control;\n               var multiplier, controlledTranslate;\n               function setControlledTranslate(c) {\n                    // this will create an Interpolate function based on the snapGrids\n                    // x is the Grid of the scrolled scroller and y will be the controlled scroller\n                    // it makes sense to create this only once and recall it for the interpolation\n                    // the function does a lot of value caching for performance\n                    translate = c.rtl && c.params.direction === 'horizontal' ? -s.translate : s.translate;\n                    if (s.params.controlBy === 'slide') {\n                        s.controller.getInterpolateFunction(c);\n                        // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid\n                        // but it did not work out\n                        controlledTranslate = -s.controller.spline.interpolate(-translate);\n                    }\n\n                    if(!controlledTranslate || s.params.controlBy === 'container'){\n                        multiplier = (c.maxTranslate() - c.minTranslate()) / (s.maxTranslate() - s.minTranslate());\n                        controlledTranslate = (translate - s.minTranslate()) * multiplier + c.minTranslate();\n                    }\n\n                    if (s.params.controlInverse) {\n                        controlledTranslate = c.maxTranslate() - controlledTranslate;\n                    }\n                    c.updateProgress(controlledTranslate);\n                    c.setWrapperTranslate(controlledTranslate, false, s);\n                    c.updateActiveIndex();\n               }\n               if (s.isArray(controlled)) {\n                   for (var i = 0; i < controlled.length; i++) {\n                       if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n                           setControlledTranslate(controlled[i]);\n                       }\n                   }\n               }\n               else if (controlled instanceof Swiper && byController !== controlled) {\n\n                   setControlledTranslate(controlled);\n               }\n            },\n            setTransition: function (duration, byController) {\n                var controlled = s.params.control;\n                var i;\n                function setControlledTransition(c) {\n                    c.setWrapperTransition(duration, s);\n                    if (duration !== 0) {\n                        c.onTransitionStart();\n                        c.wrapper.transitionEnd(function(){\n                            if (!controlled) return;\n                            if (c.params.loop && s.params.controlBy === 'slide') {\n                                c.fixLoop();\n                            }\n                            c.onTransitionEnd();\n\n                        });\n                    }\n                }\n                if (s.isArray(controlled)) {\n                    for (i = 0; i < controlled.length; i++) {\n                        if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n                            setControlledTransition(controlled[i]);\n                        }\n                    }\n                }\n                else if (controlled instanceof Swiper && byController !== controlled) {\n                    setControlledTransition(controlled);\n                }\n            }\n        };\n\n        /*=========================\n          Hash Navigation\n          ===========================*/\n        s.hashnav = {\n            init: function () {\n                if (!s.params.hashnav) return;\n                s.hashnav.initialized = true;\n                var hash = document.location.hash.replace('#', '');\n                if (!hash) return;\n                var speed = 0;\n                for (var i = 0, length = s.slides.length; i < length; i++) {\n                    var slide = s.slides.eq(i);\n                    var slideHash = slide.attr('data-hash');\n                    if (slideHash === hash && !slide.hasClass(s.params.slideDuplicateClass)) {\n                        var index = slide.index();\n                        s.slideTo(index, speed, s.params.runCallbacksOnInit, true);\n                    }\n                }\n            },\n            setHash: function () {\n                if (!s.hashnav.initialized || !s.params.hashnav) return;\n                document.location.hash = s.slides.eq(s.activeIndex).attr('data-hash') || '';\n            }\n        };\n\n        /*=========================\n          Keyboard Control\n          ===========================*/\n        function handleKeyboard(e) {\n            if (e.originalEvent) e = e.originalEvent; //jquery fix\n            var kc = e.keyCode || e.charCode;\n            // Directions locks\n            if (!s.params.allowSwipeToNext && (isH() && kc === 39 || !isH() && kc === 40)) {\n                return false;\n            }\n            if (!s.params.allowSwipeToPrev && (isH() && kc === 37 || !isH() && kc === 38)) {\n                return false;\n            }\n            if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {\n                return;\n            }\n            if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {\n                return;\n            }\n            if (kc === 37 || kc === 39 || kc === 38 || kc === 40) {\n                var inView = false;\n                //Check that swiper should be inside of visible area of window\n                if (s.container.parents('.swiper-slide').length > 0 && s.container.parents('.swiper-slide-active').length === 0) {\n                    return;\n                }\n                var windowScroll = {\n                    left: window.pageXOffset,\n                    top: window.pageYOffset\n                };\n                var windowWidth = window.innerWidth;\n                var windowHeight = window.innerHeight;\n                var swiperOffset = s.container.offset();\n                if (s.rtl) swiperOffset.left = swiperOffset.left - s.container[0].scrollLeft;\n                var swiperCoord = [\n                    [swiperOffset.left, swiperOffset.top],\n                    [swiperOffset.left + s.width, swiperOffset.top],\n                    [swiperOffset.left, swiperOffset.top + s.height],\n                    [swiperOffset.left + s.width, swiperOffset.top + s.height]\n                ];\n                for (var i = 0; i < swiperCoord.length; i++) {\n                    var point = swiperCoord[i];\n                    if (\n                        point[0] >= windowScroll.left && point[0] <= windowScroll.left + windowWidth &&\n                        point[1] >= windowScroll.top && point[1] <= windowScroll.top + windowHeight\n                    ) {\n                        inView = true;\n                    }\n\n                }\n                if (!inView) return;\n            }\n            if (isH()) {\n                if (kc === 37 || kc === 39) {\n                    if (e.preventDefault) e.preventDefault();\n                    else e.returnValue = false;\n                }\n                if ((kc === 39 && !s.rtl) || (kc === 37 && s.rtl)) s.slideNext();\n                if ((kc === 37 && !s.rtl) || (kc === 39 && s.rtl)) s.slidePrev();\n            }\n            else {\n                if (kc === 38 || kc === 40) {\n                    if (e.preventDefault) e.preventDefault();\n                    else e.returnValue = false;\n                }\n                if (kc === 40) s.slideNext();\n                if (kc === 38) s.slidePrev();\n            }\n        }\n        s.disableKeyboardControl = function () {\n            s.params.keyboardControl = false;\n            $(document).off('keydown', handleKeyboard);\n        };\n        s.enableKeyboardControl = function () {\n            s.params.keyboardControl = true;\n            $(document).on('keydown', handleKeyboard);\n        };\n\n\n        /*=========================\n          Mousewheel Control\n          ===========================*/\n        s.mousewheel = {\n            event: false,\n            lastScrollTime: (new window.Date()).getTime()\n        };\n        if (s.params.mousewheelControl) {\n            try {\n                new window.WheelEvent('wheel');\n                s.mousewheel.event = 'wheel';\n            } catch (e) {}\n\n            if (!s.mousewheel.event && document.onmousewheel !== undefined) {\n                s.mousewheel.event = 'mousewheel';\n            }\n            if (!s.mousewheel.event) {\n                s.mousewheel.event = 'DOMMouseScroll';\n            }\n        }\n        function handleMousewheel(e) {\n            if (e.originalEvent) e = e.originalEvent; //jquery fix\n            var we = s.mousewheel.event;\n            var delta = 0;\n            var rtlFactor = s.rtl ? -1 : 1;\n            //Opera & IE\n            if (e.detail) delta = -e.detail;\n            //WebKits\n            else if (we === 'mousewheel') {\n                if (s.params.mousewheelForceToAxis) {\n                    if (isH()) {\n                        if (Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY)) delta = e.wheelDeltaX * rtlFactor;\n                        else return;\n                    }\n                    else {\n                        if (Math.abs(e.wheelDeltaY) > Math.abs(e.wheelDeltaX)) delta = e.wheelDeltaY;\n                        else return;\n                    }\n                }\n                else {\n                    delta = Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY) ? - e.wheelDeltaX * rtlFactor : - e.wheelDeltaY;\n                }\n            }\n            //Old FireFox\n            else if (we === 'DOMMouseScroll') delta = -e.detail;\n            //New FireFox\n            else if (we === 'wheel') {\n                if (s.params.mousewheelForceToAxis) {\n                    if (isH()) {\n                        if (Math.abs(e.deltaX) > Math.abs(e.deltaY)) delta = -e.deltaX * rtlFactor;\n                        else return;\n                    }\n                    else {\n                        if (Math.abs(e.deltaY) > Math.abs(e.deltaX)) delta = -e.deltaY;\n                        else return;\n                    }\n                }\n                else {\n                    delta = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? - e.deltaX * rtlFactor : - e.deltaY;\n                }\n            }\n            if (delta === 0) return;\n\n            if (s.params.mousewheelInvert) delta = -delta;\n\n            if (!s.params.freeMode) {\n                if ((new window.Date()).getTime() - s.mousewheel.lastScrollTime > 60) {\n                    if (delta < 0) {\n                        if ((!s.isEnd || s.params.loop) && !s.animating) s.slideNext();\n                        else if (s.params.mousewheelReleaseOnEdges) return true;\n                    }\n                    else {\n                        if ((!s.isBeginning || s.params.loop) && !s.animating) s.slidePrev();\n                        else if (s.params.mousewheelReleaseOnEdges) return true;\n                    }\n                }\n                s.mousewheel.lastScrollTime = (new window.Date()).getTime();\n\n            }\n            else {\n                //Freemode or scrollContainer:\n                var position = s.getWrapperTranslate() + delta * s.params.mousewheelSensitivity;\n                var wasBeginning = s.isBeginning,\n                    wasEnd = s.isEnd;\n\n                if (position >= s.minTranslate()) position = s.minTranslate();\n                if (position <= s.maxTranslate()) position = s.maxTranslate();\n\n                s.setWrapperTransition(0);\n                s.setWrapperTranslate(position);\n                s.updateProgress();\n                s.updateActiveIndex();\n\n                if (!wasBeginning && s.isBeginning || !wasEnd && s.isEnd) {\n                    s.updateClasses();\n                }\n\n                if (s.params.freeModeSticky) {\n                    clearTimeout(s.mousewheel.timeout);\n                    s.mousewheel.timeout = setTimeout(function () {\n                        s.slideReset();\n                    }, 300);\n                }\n\n                // Return page scroll on edge positions\n                if (position === 0 || position === s.maxTranslate()) return;\n            }\n            if (s.params.autoplay) s.stopAutoplay();\n\n            if (e.preventDefault) e.preventDefault();\n            else e.returnValue = false;\n            return false;\n        }\n        s.disableMousewheelControl = function () {\n            if (!s.mousewheel.event) return false;\n            s.container.off(s.mousewheel.event, handleMousewheel);\n            return true;\n        };\n\n        s.enableMousewheelControl = function () {\n            if (!s.mousewheel.event) return false;\n            s.container.on(s.mousewheel.event, handleMousewheel);\n            return true;\n        };\n\n\n        /*=========================\n          Parallax\n          ===========================*/\n        function setParallaxTransform(el, progress) {\n            el = $(el);\n            var p, pX, pY;\n            var rtlFactor = s.rtl ? -1 : 1;\n\n            p = el.attr('data-swiper-parallax') || '0';\n            pX = el.attr('data-swiper-parallax-x');\n            pY = el.attr('data-swiper-parallax-y');\n            if (pX || pY) {\n                pX = pX || '0';\n                pY = pY || '0';\n            }\n            else {\n                if (isH()) {\n                    pX = p;\n                    pY = '0';\n                }\n                else {\n                    pY = p;\n                    pX = '0';\n                }\n            }\n\n            if ((pX).indexOf('%') >= 0) {\n                pX = parseInt(pX, 10) * progress * rtlFactor + '%';\n            }\n            else {\n                pX = pX * progress * rtlFactor + 'px' ;\n            }\n            if ((pY).indexOf('%') >= 0) {\n                pY = parseInt(pY, 10) * progress + '%';\n            }\n            else {\n                pY = pY * progress + 'px' ;\n            }\n\n            el.transform('translate3d(' + pX + ', ' + pY + ',0px)');\n        }\n        s.parallax = {\n            setTranslate: function () {\n                s.container.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){\n                    setParallaxTransform(this, s.progress);\n\n                });\n                s.slides.each(function () {\n                    var slide = $(this);\n                    slide.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function () {\n                        var progress = Math.min(Math.max(slide[0].progress, -1), 1);\n                        setParallaxTransform(this, progress);\n                    });\n                });\n            },\n            setTransition: function (duration) {\n                if (typeof duration === 'undefined') duration = s.params.speed;\n                s.container.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){\n                    var el = $(this);\n                    var parallaxDuration = parseInt(el.attr('data-swiper-parallax-duration'), 10) || duration;\n                    if (duration === 0) parallaxDuration = 0;\n                    el.transition(parallaxDuration);\n                });\n            }\n        };\n\n\n        /*=========================\n          Plugins API. Collect all and init all plugins\n          ===========================*/\n        s._plugins = [];\n        for (var plugin in s.plugins) {\n            var p = s.plugins[plugin](s, s.params[plugin]);\n            if (p) s._plugins.push(p);\n        }\n        // Method to call all plugins event/method\n        s.callPlugins = function (eventName) {\n            for (var i = 0; i < s._plugins.length; i++) {\n                if (eventName in s._plugins[i]) {\n                    s._plugins[i][eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n                }\n            }\n        };\n\n        /*=========================\n          Events/Callbacks/Plugins Emitter\n          ===========================*/\n        function normalizeEventName (eventName) {\n            if (eventName.indexOf('on') !== 0) {\n                if (eventName[0] !== eventName[0].toUpperCase()) {\n                    eventName = 'on' + eventName[0].toUpperCase() + eventName.substring(1);\n                }\n                else {\n                    eventName = 'on' + eventName;\n                }\n            }\n            return eventName;\n        }\n        s.emitterEventListeners = {\n\n        };\n        s.emit = function (eventName) {\n            // Trigger callbacks\n            if (s.params[eventName]) {\n                s.params[eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n            }\n            var i;\n            // Trigger events\n            if (s.emitterEventListeners[eventName]) {\n                for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {\n                    s.emitterEventListeners[eventName][i](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n                }\n            }\n            // Trigger plugins\n            if (s.callPlugins) s.callPlugins(eventName, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n        };\n        s.on = function (eventName, handler) {\n            eventName = normalizeEventName(eventName);\n            if (!s.emitterEventListeners[eventName]) s.emitterEventListeners[eventName] = [];\n            s.emitterEventListeners[eventName].push(handler);\n            return s;\n        };\n        s.off = function (eventName, handler) {\n            var i;\n            eventName = normalizeEventName(eventName);\n            if (typeof handler === 'undefined') {\n                // Remove all handlers for such event\n                s.emitterEventListeners[eventName] = [];\n                return s;\n            }\n            if (!s.emitterEventListeners[eventName] || s.emitterEventListeners[eventName].length === 0) return;\n            for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {\n                if(s.emitterEventListeners[eventName][i] === handler) s.emitterEventListeners[eventName].splice(i, 1);\n            }\n            return s;\n        };\n        s.once = function (eventName, handler) {\n            eventName = normalizeEventName(eventName);\n            var _handler = function () {\n                handler(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);\n                s.off(eventName, _handler);\n            };\n            s.on(eventName, _handler);\n            return s;\n        };\n\n        // Accessibility tools\n        s.a11y = {\n            makeFocusable: function ($el) {\n                $el.attr('tabIndex', '0');\n                return $el;\n            },\n            addRole: function ($el, role) {\n                $el.attr('role', role);\n                return $el;\n            },\n\n            addLabel: function ($el, label) {\n                $el.attr('aria-label', label);\n                return $el;\n            },\n\n            disable: function ($el) {\n                $el.attr('aria-disabled', true);\n                return $el;\n            },\n\n            enable: function ($el) {\n                $el.attr('aria-disabled', false);\n                return $el;\n            },\n\n            onEnterKey: function (event) {\n                if (event.keyCode !== 13) return;\n                if ($(event.target).is(s.params.nextButton)) {\n                    s.onClickNext(event);\n                    if (s.isEnd) {\n                        s.a11y.notify(s.params.lastSlideMessage);\n                    }\n                    else {\n                        s.a11y.notify(s.params.nextSlideMessage);\n                    }\n                }\n                else if ($(event.target).is(s.params.prevButton)) {\n                    s.onClickPrev(event);\n                    if (s.isBeginning) {\n                        s.a11y.notify(s.params.firstSlideMessage);\n                    }\n                    else {\n                        s.a11y.notify(s.params.prevSlideMessage);\n                    }\n                }\n                if ($(event.target).is('.' + s.params.bulletClass)) {\n                    $(event.target)[0].click();\n                }\n            },\n\n            liveRegion: $('<span class=\"swiper-notification\" aria-live=\"assertive\" aria-atomic=\"true\"></span>'),\n\n            notify: function (message) {\n                var notification = s.a11y.liveRegion;\n                if (notification.length === 0) return;\n                notification.html('');\n                notification.html(message);\n            },\n            init: function () {\n                // Setup accessibility\n                if (s.params.nextButton) {\n                    var nextButton = $(s.params.nextButton);\n                    s.a11y.makeFocusable(nextButton);\n                    s.a11y.addRole(nextButton, 'button');\n                    s.a11y.addLabel(nextButton, s.params.nextSlideMessage);\n                }\n                if (s.params.prevButton) {\n                    var prevButton = $(s.params.prevButton);\n                    s.a11y.makeFocusable(prevButton);\n                    s.a11y.addRole(prevButton, 'button');\n                    s.a11y.addLabel(prevButton, s.params.prevSlideMessage);\n                }\n\n                $(s.container).append(s.a11y.liveRegion);\n            },\n            initPagination: function () {\n                if (s.params.pagination && s.params.paginationClickable && s.bullets && s.bullets.length) {\n                    s.bullets.each(function () {\n                        var bullet = $(this);\n                        s.a11y.makeFocusable(bullet);\n                        s.a11y.addRole(bullet, 'button');\n                        s.a11y.addLabel(bullet, s.params.paginationBulletMessage.replace(/{{index}}/, bullet.index() + 1));\n                    });\n                }\n            },\n            destroy: function () {\n                if (s.a11y.liveRegion && s.a11y.liveRegion.length > 0) s.a11y.liveRegion.remove();\n            }\n        };\n\n\n        /*=========================\n          Init/Destroy\n          ===========================*/\n        s.init = function () {\n            if (s.params.loop) s.createLoop();\n            s.updateContainerSize();\n            s.updateSlidesSize();\n            s.updatePagination();\n            if (s.params.scrollbar && s.scrollbar) {\n                s.scrollbar.set();\n                if (s.params.scrollbarDraggable) {\n                    s.scrollbar.enableDraggable();\n                }\n            }\n            if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n                if (!s.params.loop) s.updateProgress();\n                s.effects[s.params.effect].setTranslate();\n            }\n            if (s.params.loop) {\n                s.slideTo(s.params.initialSlide + s.loopedSlides, 0, s.params.runCallbacksOnInit);\n            }\n            else {\n                s.slideTo(s.params.initialSlide, 0, s.params.runCallbacksOnInit);\n                if (s.params.initialSlide === 0) {\n                    if (s.parallax && s.params.parallax) s.parallax.setTranslate();\n                    if (s.lazy && s.params.lazyLoading) {\n                        s.lazy.load();\n                        s.lazy.initialImageLoaded = true;\n                    }\n                }\n            }\n            s.attachEvents();\n            if (s.params.observer && s.support.observer) {\n                s.initObservers();\n            }\n            if (s.params.preloadImages && !s.params.lazyLoading) {\n                s.preloadImages();\n            }\n            if (s.params.autoplay) {\n                s.startAutoplay();\n            }\n            if (s.params.keyboardControl) {\n                if (s.enableKeyboardControl) s.enableKeyboardControl();\n            }\n            if (s.params.mousewheelControl) {\n                if (s.enableMousewheelControl) s.enableMousewheelControl();\n            }\n            if (s.params.hashnav) {\n                if (s.hashnav) s.hashnav.init();\n            }\n            if (s.params.a11y && s.a11y) s.a11y.init();\n            s.emit('onInit', s);\n        };\n\n        // Cleanup dynamic styles\n        s.cleanupStyles = function () {\n            // Container\n            s.container.removeClass(s.classNames.join(' ')).removeAttr('style');\n\n            // Wrapper\n            s.wrapper.removeAttr('style');\n\n            // Slides\n            if (s.slides && s.slides.length) {\n                s.slides\n                    .removeClass([\n                      s.params.slideVisibleClass,\n                      s.params.slideActiveClass,\n                      s.params.slideNextClass,\n                      s.params.slidePrevClass\n                    ].join(' '))\n                    .removeAttr('style')\n                    .removeAttr('data-swiper-column')\n                    .removeAttr('data-swiper-row');\n            }\n\n            // Pagination/Bullets\n            if (s.paginationContainer && s.paginationContainer.length) {\n                s.paginationContainer.removeClass(s.params.paginationHiddenClass);\n            }\n            if (s.bullets && s.bullets.length) {\n                s.bullets.removeClass(s.params.bulletActiveClass);\n            }\n\n            // Buttons\n            if (s.params.prevButton) $(s.params.prevButton).removeClass(s.params.buttonDisabledClass);\n            if (s.params.nextButton) $(s.params.nextButton).removeClass(s.params.buttonDisabledClass);\n\n            // Scrollbar\n            if (s.params.scrollbar && s.scrollbar) {\n                if (s.scrollbar.track && s.scrollbar.track.length) s.scrollbar.track.removeAttr('style');\n                if (s.scrollbar.drag && s.scrollbar.drag.length) s.scrollbar.drag.removeAttr('style');\n            }\n        };\n\n        // Destroy\n        s.destroy = function (deleteInstance, cleanupStyles) {\n            // Detach evebts\n            s.detachEvents();\n            // Stop autoplay\n            s.stopAutoplay();\n            // Disable draggable\n            if (s.params.scrollbar && s.scrollbar) {\n                if (s.params.scrollbarDraggable) {\n                    s.scrollbar.disableDraggable();\n                }\n            }\n            // Destroy loop\n            if (s.params.loop) {\n                s.destroyLoop();\n            }\n            // Cleanup styles\n            if (cleanupStyles) {\n                s.cleanupStyles();\n            }\n            // Disconnect observer\n            s.disconnectObservers();\n            // Disable keyboard/mousewheel\n            if (s.params.keyboardControl) {\n                if (s.disableKeyboardControl) s.disableKeyboardControl();\n            }\n            if (s.params.mousewheelControl) {\n                if (s.disableMousewheelControl) s.disableMousewheelControl();\n            }\n            // Disable a11y\n            if (s.params.a11y && s.a11y) s.a11y.destroy();\n            // Destroy callback\n            s.emit('onDestroy');\n            // Delete instance\n            if (deleteInstance !== false) s = null;\n        };\n\n        s.init();\n\n\n\n        // Return swiper instance\n        return s;\n    };\n\n\n    /*==================================================\n        Prototype\n    ====================================================*/\n    Swiper.prototype = {\n        isSafari: (function () {\n            var ua = navigator.userAgent.toLowerCase();\n            return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);\n        })(),\n        isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent),\n        isArray: function (arr) {\n            return Object.prototype.toString.apply(arr) === '[object Array]';\n        },\n        /*==================================================\n        Browser\n        ====================================================*/\n        browser: {\n            ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled,\n            ieTouch: (window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1) || (window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1)\n        },\n        /*==================================================\n        Devices\n        ====================================================*/\n        device: (function () {\n            var ua = navigator.userAgent;\n            var android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/);\n            var ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n            var ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n            var iphone = !ipad && ua.match(/(iPhone\\sOS)\\s([\\d_]+)/);\n            return {\n                ios: ipad || iphone || ipod,\n                android: android\n            };\n        })(),\n        /*==================================================\n        Feature Detection\n        ====================================================*/\n        support: {\n            touch : (window.Modernizr && Modernizr.touch === true) || (function () {\n                return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch);\n            })(),\n\n            transforms3d : (window.Modernizr && Modernizr.csstransforms3d === true) || (function () {\n                var div = document.createElement('div').style;\n                return ('webkitPerspective' in div || 'MozPerspective' in div || 'OPerspective' in div || 'MsPerspective' in div || 'perspective' in div);\n            })(),\n\n            flexbox: (function () {\n                var div = document.createElement('div').style;\n                var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');\n                for (var i = 0; i < styles.length; i++) {\n                    if (styles[i] in div) return true;\n                }\n            })(),\n\n            observer: (function () {\n                return ('MutationObserver' in window || 'WebkitMutationObserver' in window);\n            })()\n        },\n        /*==================================================\n        Plugins\n        ====================================================*/\n        plugins: {}\n    };\n\n\n    /*===========================\n    Dom7 Library\n    ===========================*/\n    var Dom7 = (function () {\n        var Dom7 = function (arr) {\n            var _this = this, i = 0;\n            // Create array-like object\n            for (i = 0; i < arr.length; i++) {\n                _this[i] = arr[i];\n            }\n            _this.length = arr.length;\n            // Return collection with methods\n            return this;\n        };\n        var $ = function (selector, context) {\n            var arr = [], i = 0;\n            if (selector && !context) {\n                if (selector instanceof Dom7) {\n                    return selector;\n                }\n            }\n            if (selector) {\n                // String\n                if (typeof selector === 'string') {\n                    var els, tempParent, html = selector.trim();\n                    if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {\n                        var toCreate = 'div';\n                        if (html.indexOf('<li') === 0) toCreate = 'ul';\n                        if (html.indexOf('<tr') === 0) toCreate = 'tbody';\n                        if (html.indexOf('<td') === 0 || html.indexOf('<th') === 0) toCreate = 'tr';\n                        if (html.indexOf('<tbody') === 0) toCreate = 'table';\n                        if (html.indexOf('<option') === 0) toCreate = 'select';\n                        tempParent = document.createElement(toCreate);\n                        tempParent.innerHTML = selector;\n                        for (i = 0; i < tempParent.childNodes.length; i++) {\n                            arr.push(tempParent.childNodes[i]);\n                        }\n                    }\n                    else {\n                        if (!context && selector[0] === '#' && !selector.match(/[ .<>:~]/)) {\n                            // Pure ID selector\n                            els = [document.getElementById(selector.split('#')[1])];\n                        }\n                        else {\n                            // Other selectors\n                            els = (context || document).querySelectorAll(selector);\n                        }\n                        for (i = 0; i < els.length; i++) {\n                            if (els[i]) arr.push(els[i]);\n                        }\n                    }\n                }\n                // Node/element\n                else if (selector.nodeType || selector === window || selector === document) {\n                    arr.push(selector);\n                }\n                //Array of elements or instance of Dom\n                else if (selector.length > 0 && selector[0].nodeType) {\n                    for (i = 0; i < selector.length; i++) {\n                        arr.push(selector[i]);\n                    }\n                }\n            }\n            return new Dom7(arr);\n        };\n        Dom7.prototype = {\n            // Classes and attriutes\n            addClass: function (className) {\n                if (typeof className === 'undefined') {\n                    return this;\n                }\n                var classes = className.split(' ');\n                for (var i = 0; i < classes.length; i++) {\n                    for (var j = 0; j < this.length; j++) {\n                        this[j].classList.add(classes[i]);\n                    }\n                }\n                return this;\n            },\n            removeClass: function (className) {\n                var classes = className.split(' ');\n                for (var i = 0; i < classes.length; i++) {\n                    for (var j = 0; j < this.length; j++) {\n                        this[j].classList.remove(classes[i]);\n                    }\n                }\n                return this;\n            },\n            hasClass: function (className) {\n                if (!this[0]) return false;\n                else return this[0].classList.contains(className);\n            },\n            toggleClass: function (className) {\n                var classes = className.split(' ');\n                for (var i = 0; i < classes.length; i++) {\n                    for (var j = 0; j < this.length; j++) {\n                        this[j].classList.toggle(classes[i]);\n                    }\n                }\n                return this;\n            },\n            attr: function (attrs, value) {\n                if (arguments.length === 1 && typeof attrs === 'string') {\n                    // Get attr\n                    if (this[0]) return this[0].getAttribute(attrs);\n                    else return undefined;\n                }\n                else {\n                    // Set attrs\n                    for (var i = 0; i < this.length; i++) {\n                        if (arguments.length === 2) {\n                            // String\n                            this[i].setAttribute(attrs, value);\n                        }\n                        else {\n                            // Object\n                            for (var attrName in attrs) {\n                                this[i][attrName] = attrs[attrName];\n                                this[i].setAttribute(attrName, attrs[attrName]);\n                            }\n                        }\n                    }\n                    return this;\n                }\n            },\n            removeAttr: function (attr) {\n                for (var i = 0; i < this.length; i++) {\n                    this[i].removeAttribute(attr);\n                }\n                return this;\n            },\n            data: function (key, value) {\n                if (typeof value === 'undefined') {\n                    // Get value\n                    if (this[0]) {\n                        var dataKey = this[0].getAttribute('data-' + key);\n                        if (dataKey) return dataKey;\n                        else if (this[0].dom7ElementDataStorage && (key in this[0].dom7ElementDataStorage)) return this[0].dom7ElementDataStorage[key];\n                        else return undefined;\n                    }\n                    else return undefined;\n                }\n                else {\n                    // Set value\n                    for (var i = 0; i < this.length; i++) {\n                        var el = this[i];\n                        if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};\n                        el.dom7ElementDataStorage[key] = value;\n                    }\n                    return this;\n                }\n            },\n            // Transforms\n            transform : function (transform) {\n                for (var i = 0; i < this.length; i++) {\n                    var elStyle = this[i].style;\n                    elStyle.webkitTransform = elStyle.MsTransform = elStyle.msTransform = elStyle.MozTransform = elStyle.OTransform = elStyle.transform = transform;\n                }\n                return this;\n            },\n            transition: function (duration) {\n                if (typeof duration !== 'string') {\n                    duration = duration + 'ms';\n                }\n                for (var i = 0; i < this.length; i++) {\n                    var elStyle = this[i].style;\n                    elStyle.webkitTransitionDuration = elStyle.MsTransitionDuration = elStyle.msTransitionDuration = elStyle.MozTransitionDuration = elStyle.OTransitionDuration = elStyle.transitionDuration = duration;\n                }\n                return this;\n            },\n            //Events\n            on: function (eventName, targetSelector, listener, capture) {\n                function handleLiveEvent(e) {\n                    var target = e.target;\n                    if ($(target).is(targetSelector)) listener.call(target, e);\n                    else {\n                        var parents = $(target).parents();\n                        for (var k = 0; k < parents.length; k++) {\n                            if ($(parents[k]).is(targetSelector)) listener.call(parents[k], e);\n                        }\n                    }\n                }\n                var events = eventName.split(' ');\n                var i, j;\n                for (i = 0; i < this.length; i++) {\n                    if (typeof targetSelector === 'function' || targetSelector === false) {\n                        // Usual events\n                        if (typeof targetSelector === 'function') {\n                            listener = arguments[1];\n                            capture = arguments[2] || false;\n                        }\n                        for (j = 0; j < events.length; j++) {\n                            this[i].addEventListener(events[j], listener, capture);\n                        }\n                    }\n                    else {\n                        //Live events\n                        for (j = 0; j < events.length; j++) {\n                            if (!this[i].dom7LiveListeners) this[i].dom7LiveListeners = [];\n                            this[i].dom7LiveListeners.push({listener: listener, liveListener: handleLiveEvent});\n                            this[i].addEventListener(events[j], handleLiveEvent, capture);\n                        }\n                    }\n                }\n\n                return this;\n            },\n            off: function (eventName, targetSelector, listener, capture) {\n                var events = eventName.split(' ');\n                for (var i = 0; i < events.length; i++) {\n                    for (var j = 0; j < this.length; j++) {\n                        if (typeof targetSelector === 'function' || targetSelector === false) {\n                            // Usual events\n                            if (typeof targetSelector === 'function') {\n                                listener = arguments[1];\n                                capture = arguments[2] || false;\n                            }\n                            this[j].removeEventListener(events[i], listener, capture);\n                        }\n                        else {\n                            // Live event\n                            if (this[j].dom7LiveListeners) {\n                                for (var k = 0; k < this[j].dom7LiveListeners.length; k++) {\n                                    if (this[j].dom7LiveListeners[k].listener === listener) {\n                                        this[j].removeEventListener(events[i], this[j].dom7LiveListeners[k].liveListener, capture);\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n                return this;\n            },\n            once: function (eventName, targetSelector, listener, capture) {\n                var dom = this;\n                if (typeof targetSelector === 'function') {\n                    targetSelector = false;\n                    listener = arguments[1];\n                    capture = arguments[2];\n                }\n                function proxy(e) {\n                    listener(e);\n                    dom.off(eventName, targetSelector, proxy, capture);\n                }\n                dom.on(eventName, targetSelector, proxy, capture);\n            },\n            trigger: function (eventName, eventData) {\n                for (var i = 0; i < this.length; i++) {\n                    var evt;\n                    try {\n                        evt = new window.CustomEvent(eventName, {detail: eventData, bubbles: true, cancelable: true});\n                    }\n                    catch (e) {\n                        evt = document.createEvent('Event');\n                        evt.initEvent(eventName, true, true);\n                        evt.detail = eventData;\n                    }\n                    this[i].dispatchEvent(evt);\n                }\n                return this;\n            },\n            transitionEnd: function (callback) {\n                var events = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'],\n                    i, j, dom = this;\n                function fireCallBack(e) {\n                    /*jshint validthis:true */\n                    if (e.target !== this) return;\n                    callback.call(this, e);\n                    for (i = 0; i < events.length; i++) {\n                        dom.off(events[i], fireCallBack);\n                    }\n                }\n                if (callback) {\n                    for (i = 0; i < events.length; i++) {\n                        dom.on(events[i], fireCallBack);\n                    }\n                }\n                return this;\n            },\n            // Sizing/Styles\n            width: function () {\n                if (this[0] === window) {\n                    return window.innerWidth;\n                }\n                else {\n                    if (this.length > 0) {\n                        return parseFloat(this.css('width'));\n                    }\n                    else {\n                        return null;\n                    }\n                }\n            },\n            outerWidth: function (includeMargins) {\n                if (this.length > 0) {\n                    if (includeMargins)\n                        return this[0].offsetWidth + parseFloat(this.css('margin-right')) + parseFloat(this.css('margin-left'));\n                    else\n                        return this[0].offsetWidth;\n                }\n                else return null;\n            },\n            height: function () {\n                if (this[0] === window) {\n                    return window.innerHeight;\n                }\n                else {\n                    if (this.length > 0) {\n                        return parseFloat(this.css('height'));\n                    }\n                    else {\n                        return null;\n                    }\n                }\n            },\n            outerHeight: function (includeMargins) {\n                if (this.length > 0) {\n                    if (includeMargins)\n                        return this[0].offsetHeight + parseFloat(this.css('margin-top')) + parseFloat(this.css('margin-bottom'));\n                    else\n                        return this[0].offsetHeight;\n                }\n                else return null;\n            },\n            offset: function () {\n                if (this.length > 0) {\n                    var el = this[0];\n                    var box = el.getBoundingClientRect();\n                    var body = document.body;\n                    var clientTop  = el.clientTop  || body.clientTop  || 0;\n                    var clientLeft = el.clientLeft || body.clientLeft || 0;\n                    var scrollTop  = window.pageYOffset || el.scrollTop;\n                    var scrollLeft = window.pageXOffset || el.scrollLeft;\n                    return {\n                        top: box.top  + scrollTop  - clientTop,\n                        left: box.left + scrollLeft - clientLeft\n                    };\n                }\n                else {\n                    return null;\n                }\n            },\n            css: function (props, value) {\n                var i;\n                if (arguments.length === 1) {\n                    if (typeof props === 'string') {\n                        if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props);\n                    }\n                    else {\n                        for (i = 0; i < this.length; i++) {\n                            for (var prop in props) {\n                                this[i].style[prop] = props[prop];\n                            }\n                        }\n                        return this;\n                    }\n                }\n                if (arguments.length === 2 && typeof props === 'string') {\n                    for (i = 0; i < this.length; i++) {\n                        this[i].style[props] = value;\n                    }\n                    return this;\n                }\n                return this;\n            },\n\n            //Dom manipulation\n            each: function (callback) {\n                for (var i = 0; i < this.length; i++) {\n                    callback.call(this[i], i, this[i]);\n                }\n                return this;\n            },\n            html: function (html) {\n                if (typeof html === 'undefined') {\n                    return this[0] ? this[0].innerHTML : undefined;\n                }\n                else {\n                    for (var i = 0; i < this.length; i++) {\n                        this[i].innerHTML = html;\n                    }\n                    return this;\n                }\n            },\n            is: function (selector) {\n                if (!this[0]) return false;\n                var compareWith, i;\n                if (typeof selector === 'string') {\n                    var el = this[0];\n                    if (el === document) return selector === document;\n                    if (el === window) return selector === window;\n\n                    if (el.matches) return el.matches(selector);\n                    else if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);\n                    else if (el.mozMatchesSelector) return el.mozMatchesSelector(selector);\n                    else if (el.msMatchesSelector) return el.msMatchesSelector(selector);\n                    else {\n                        compareWith = $(selector);\n                        for (i = 0; i < compareWith.length; i++) {\n                            if (compareWith[i] === this[0]) return true;\n                        }\n                        return false;\n                    }\n                }\n                else if (selector === document) return this[0] === document;\n                else if (selector === window) return this[0] === window;\n                else {\n                    if (selector.nodeType || selector instanceof Dom7) {\n                        compareWith = selector.nodeType ? [selector] : selector;\n                        for (i = 0; i < compareWith.length; i++) {\n                            if (compareWith[i] === this[0]) return true;\n                        }\n                        return false;\n                    }\n                    return false;\n                }\n\n            },\n            index: function () {\n                if (this[0]) {\n                    var child = this[0];\n                    var i = 0;\n                    while ((child = child.previousSibling) !== null) {\n                        if (child.nodeType === 1) i++;\n                    }\n                    return i;\n                }\n                else return undefined;\n            },\n            eq: function (index) {\n                if (typeof index === 'undefined') return this;\n                var length = this.length;\n                var returnIndex;\n                if (index > length - 1) {\n                    return new Dom7([]);\n                }\n                if (index < 0) {\n                    returnIndex = length + index;\n                    if (returnIndex < 0) return new Dom7([]);\n                    else return new Dom7([this[returnIndex]]);\n                }\n                return new Dom7([this[index]]);\n            },\n            append: function (newChild) {\n                var i, j;\n                for (i = 0; i < this.length; i++) {\n                    if (typeof newChild === 'string') {\n                        var tempDiv = document.createElement('div');\n                        tempDiv.innerHTML = newChild;\n                        while (tempDiv.firstChild) {\n                            this[i].appendChild(tempDiv.firstChild);\n                        }\n                    }\n                    else if (newChild instanceof Dom7) {\n                        for (j = 0; j < newChild.length; j++) {\n                            this[i].appendChild(newChild[j]);\n                        }\n                    }\n                    else {\n                        this[i].appendChild(newChild);\n                    }\n                }\n                return this;\n            },\n            prepend: function (newChild) {\n                var i, j;\n                for (i = 0; i < this.length; i++) {\n                    if (typeof newChild === 'string') {\n                        var tempDiv = document.createElement('div');\n                        tempDiv.innerHTML = newChild;\n                        for (j = tempDiv.childNodes.length - 1; j >= 0; j--) {\n                            this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]);\n                        }\n                        // this[i].insertAdjacentHTML('afterbegin', newChild);\n                    }\n                    else if (newChild instanceof Dom7) {\n                        for (j = 0; j < newChild.length; j++) {\n                            this[i].insertBefore(newChild[j], this[i].childNodes[0]);\n                        }\n                    }\n                    else {\n                        this[i].insertBefore(newChild, this[i].childNodes[0]);\n                    }\n                }\n                return this;\n            },\n            insertBefore: function (selector) {\n                var before = $(selector);\n                for (var i = 0; i < this.length; i++) {\n                    if (before.length === 1) {\n                        before[0].parentNode.insertBefore(this[i], before[0]);\n                    }\n                    else if (before.length > 1) {\n                        for (var j = 0; j < before.length; j++) {\n                            before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]);\n                        }\n                    }\n                }\n            },\n            insertAfter: function (selector) {\n                var after = $(selector);\n                for (var i = 0; i < this.length; i++) {\n                    if (after.length === 1) {\n                        after[0].parentNode.insertBefore(this[i], after[0].nextSibling);\n                    }\n                    else if (after.length > 1) {\n                        for (var j = 0; j < after.length; j++) {\n                            after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling);\n                        }\n                    }\n                }\n            },\n            next: function (selector) {\n                if (this.length > 0) {\n                    if (selector) {\n                        if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) return new Dom7([this[0].nextElementSibling]);\n                        else return new Dom7([]);\n                    }\n                    else {\n                        if (this[0].nextElementSibling) return new Dom7([this[0].nextElementSibling]);\n                        else return new Dom7([]);\n                    }\n                }\n                else return new Dom7([]);\n            },\n            nextAll: function (selector) {\n                var nextEls = [];\n                var el = this[0];\n                if (!el) return new Dom7([]);\n                while (el.nextElementSibling) {\n                    var next = el.nextElementSibling;\n                    if (selector) {\n                        if($(next).is(selector)) nextEls.push(next);\n                    }\n                    else nextEls.push(next);\n                    el = next;\n                }\n                return new Dom7(nextEls);\n            },\n            prev: function (selector) {\n                if (this.length > 0) {\n                    if (selector) {\n                        if (this[0].previousElementSibling && $(this[0].previousElementSibling).is(selector)) return new Dom7([this[0].previousElementSibling]);\n                        else return new Dom7([]);\n                    }\n                    else {\n                        if (this[0].previousElementSibling) return new Dom7([this[0].previousElementSibling]);\n                        else return new Dom7([]);\n                    }\n                }\n                else return new Dom7([]);\n            },\n            prevAll: function (selector) {\n                var prevEls = [];\n                var el = this[0];\n                if (!el) return new Dom7([]);\n                while (el.previousElementSibling) {\n                    var prev = el.previousElementSibling;\n                    if (selector) {\n                        if($(prev).is(selector)) prevEls.push(prev);\n                    }\n                    else prevEls.push(prev);\n                    el = prev;\n                }\n                return new Dom7(prevEls);\n            },\n            parent: function (selector) {\n                var parents = [];\n                for (var i = 0; i < this.length; i++) {\n                    if (selector) {\n                        if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode);\n                    }\n                    else {\n                        parents.push(this[i].parentNode);\n                    }\n                }\n                return $($.unique(parents));\n            },\n            parents: function (selector) {\n                var parents = [];\n                for (var i = 0; i < this.length; i++) {\n                    var parent = this[i].parentNode;\n                    while (parent) {\n                        if (selector) {\n                            if ($(parent).is(selector)) parents.push(parent);\n                        }\n                        else {\n                            parents.push(parent);\n                        }\n                        parent = parent.parentNode;\n                    }\n                }\n                return $($.unique(parents));\n            },\n            find : function (selector) {\n                var foundElements = [];\n                for (var i = 0; i < this.length; i++) {\n                    var found = this[i].querySelectorAll(selector);\n                    for (var j = 0; j < found.length; j++) {\n                        foundElements.push(found[j]);\n                    }\n                }\n                return new Dom7(foundElements);\n            },\n            children: function (selector) {\n                var children = [];\n                for (var i = 0; i < this.length; i++) {\n                    var childNodes = this[i].childNodes;\n\n                    for (var j = 0; j < childNodes.length; j++) {\n                        if (!selector) {\n                            if (childNodes[j].nodeType === 1) children.push(childNodes[j]);\n                        }\n                        else {\n                            if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) children.push(childNodes[j]);\n                        }\n                    }\n                }\n                return new Dom7($.unique(children));\n            },\n            remove: function () {\n                for (var i = 0; i < this.length; i++) {\n                    if (this[i].parentNode) this[i].parentNode.removeChild(this[i]);\n                }\n                return this;\n            },\n            add: function () {\n                var dom = this;\n                var i, j;\n                for (i = 0; i < arguments.length; i++) {\n                    var toAdd = $(arguments[i]);\n                    for (j = 0; j < toAdd.length; j++) {\n                        dom[dom.length] = toAdd[j];\n                        dom.length++;\n                    }\n                }\n                return dom;\n            }\n        };\n        $.fn = Dom7.prototype;\n        $.unique = function (arr) {\n            var unique = [];\n            for (var i = 0; i < arr.length; i++) {\n                if (unique.indexOf(arr[i]) === -1) unique.push(arr[i]);\n            }\n            return unique;\n        };\n\n        return $;\n    })();\n\n\n    /*===========================\n     Get Dom libraries\n     ===========================*/\n    var swiperDomPlugins = ['jQuery', 'Zepto', 'Dom7'];\n    for (var i = 0; i < swiperDomPlugins.length; i++) {\n    \tif (window[swiperDomPlugins[i]]) {\n    \t\taddLibraryPlugin(window[swiperDomPlugins[i]]);\n    \t}\n    }\n    // Required DOM Plugins\n    var domLib;\n    if (typeof Dom7 === 'undefined') {\n    \tdomLib = window.Dom7 || window.Zepto || window.jQuery;\n    }\n    else {\n    \tdomLib = Dom7;\n    }\n\n    /*===========================\n    Add .swiper plugin from Dom libraries\n    ===========================*/\n    function addLibraryPlugin(lib) {\n        lib.fn.swiper = function (params) {\n            var firstInstance;\n            lib(this).each(function () {\n                var s = new Swiper(this, params);\n                if (!firstInstance) firstInstance = s;\n            });\n            return firstInstance;\n        };\n    }\n\n    if (domLib) {\n        if (!('transitionEnd' in domLib.fn)) {\n            domLib.fn.transitionEnd = function (callback) {\n                var events = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'],\n                    i, j, dom = this;\n                function fireCallBack(e) {\n                    /*jshint validthis:true */\n                    if (e.target !== this) return;\n                    callback.call(this, e);\n                    for (i = 0; i < events.length; i++) {\n                        dom.off(events[i], fireCallBack);\n                    }\n                }\n                if (callback) {\n                    for (i = 0; i < events.length; i++) {\n                        dom.on(events[i], fireCallBack);\n                    }\n                }\n                return this;\n            };\n        }\n        if (!('transform' in domLib.fn)) {\n            domLib.fn.transform = function (transform) {\n                for (var i = 0; i < this.length; i++) {\n                    var elStyle = this[i].style;\n                    elStyle.webkitTransform = elStyle.MsTransform = elStyle.msTransform = elStyle.MozTransform = elStyle.OTransform = elStyle.transform = transform;\n                }\n                return this;\n            };\n        }\n        if (!('transition' in domLib.fn)) {\n            domLib.fn.transition = function (duration) {\n                if (typeof duration !== 'string') {\n                    duration = duration + 'ms';\n                }\n                for (var i = 0; i < this.length; i++) {\n                    var elStyle = this[i].style;\n                    elStyle.webkitTransitionDuration = elStyle.MsTransitionDuration = elStyle.msTransitionDuration = elStyle.MozTransitionDuration = elStyle.OTransitionDuration = elStyle.transitionDuration = duration;\n                }\n                return this;\n            };\n        }\n    }\n\n    ionic.views.Swiper = Swiper;\n})();\n\n(function(ionic) {\n'use strict';\n\n  ionic.views.Toggle = ionic.views.View.inherit({\n    initialize: function(opts) {\n      var self = this;\n\n      this.el = opts.el;\n      this.checkbox = opts.checkbox;\n      this.track = opts.track;\n      this.handle = opts.handle;\n      this.openPercent = -1;\n      this.onChange = opts.onChange || function() {};\n\n      this.triggerThreshold = opts.triggerThreshold || 20;\n\n      this.dragStartHandler = function(e) {\n        self.dragStart(e);\n      };\n      this.dragHandler = function(e) {\n        self.drag(e);\n      };\n      this.holdHandler = function(e) {\n        self.hold(e);\n      };\n      this.releaseHandler = function(e) {\n        self.release(e);\n      };\n\n      this.dragStartGesture = ionic.onGesture('dragstart', this.dragStartHandler, this.el);\n      this.dragGesture = ionic.onGesture('drag', this.dragHandler, this.el);\n      this.dragHoldGesture = ionic.onGesture('hold', this.holdHandler, this.el);\n      this.dragReleaseGesture = ionic.onGesture('release', this.releaseHandler, this.el);\n    },\n\n    destroy: function() {\n      ionic.offGesture(this.dragStartGesture, 'dragstart', this.dragStartGesture);\n      ionic.offGesture(this.dragGesture, 'drag', this.dragGesture);\n      ionic.offGesture(this.dragHoldGesture, 'hold', this.holdHandler);\n      ionic.offGesture(this.dragReleaseGesture, 'release', this.releaseHandler);\n    },\n\n    tap: function() {\n      if(this.el.getAttribute('disabled') !== 'disabled') {\n        this.val( !this.checkbox.checked );\n      }\n    },\n\n    dragStart: function(e) {\n      if(this.checkbox.disabled) return;\n\n      this._dragInfo = {\n        width: this.el.offsetWidth,\n        left: this.el.offsetLeft,\n        right: this.el.offsetLeft + this.el.offsetWidth,\n        triggerX: this.el.offsetWidth / 2,\n        initialState: this.checkbox.checked\n      };\n\n      // Stop any parent dragging\n      e.gesture.srcEvent.preventDefault();\n\n      // Trigger hold styles\n      this.hold(e);\n    },\n\n    drag: function(e) {\n      var self = this;\n      if(!this._dragInfo) { return; }\n\n      // Stop any parent dragging\n      e.gesture.srcEvent.preventDefault();\n\n      ionic.requestAnimationFrame(function () {\n        if (!self._dragInfo) { return; }\n\n        var px = e.gesture.touches[0].pageX - self._dragInfo.left;\n        var mx = self._dragInfo.width - self.triggerThreshold;\n\n        // The initial state was on, so \"tend towards\" on\n        if(self._dragInfo.initialState) {\n          if(px < self.triggerThreshold) {\n            self.setOpenPercent(0);\n          } else if(px > self._dragInfo.triggerX) {\n            self.setOpenPercent(100);\n          }\n        } else {\n          // The initial state was off, so \"tend towards\" off\n          if(px < self._dragInfo.triggerX) {\n            self.setOpenPercent(0);\n          } else if(px > mx) {\n            self.setOpenPercent(100);\n          }\n        }\n      });\n    },\n\n    endDrag: function() {\n      this._dragInfo = null;\n    },\n\n    hold: function() {\n      this.el.classList.add('dragging');\n    },\n    release: function(e) {\n      this.el.classList.remove('dragging');\n      this.endDrag(e);\n    },\n\n\n    setOpenPercent: function(openPercent) {\n      // only make a change if the new open percent has changed\n      if(this.openPercent < 0 || (openPercent < (this.openPercent - 3) || openPercent > (this.openPercent + 3) ) ) {\n        this.openPercent = openPercent;\n\n        if(openPercent === 0) {\n          this.val(false);\n        } else if(openPercent === 100) {\n          this.val(true);\n        } else {\n          var openPixel = Math.round( (openPercent / 100) * this.track.offsetWidth - (this.handle.offsetWidth) );\n          openPixel = (openPixel < 1 ? 0 : openPixel);\n          this.handle.style[ionic.CSS.TRANSFORM] = 'translate3d(' + openPixel + 'px,0,0)';\n        }\n      }\n    },\n\n    val: function(value) {\n      if(value === true || value === false) {\n        if(this.handle.style[ionic.CSS.TRANSFORM] !== \"\") {\n          this.handle.style[ionic.CSS.TRANSFORM] = \"\";\n        }\n        this.checkbox.checked = value;\n        this.openPercent = (value ? 100 : 0);\n        this.onChange && this.onChange();\n      }\n      return this.checkbox.checked;\n    }\n\n  });\n\n})(ionic);\n\n})();"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_action-sheet.scss",
    "content": "/**\n * Action Sheets\n * --------------------------------------------------\n */\n\n.action-sheet-backdrop {\n  @include transition(background-color 150ms ease-in-out);\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: $z-index-action-sheet;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(0,0,0,0);\n\n  &.active {\n    background-color: rgba(0,0,0,0.4);\n  }\n}\n\n.action-sheet-wrapper {\n  @include translate3d(0, 100%, 0);\n  @include transition(all cubic-bezier(.36, .66, .04, 1) 500ms);\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  width: 100%;\n  max-width: 500px;\n  margin: auto;\n}\n\n.action-sheet-up {\n  @include translate3d(0, 0, 0);\n}\n\n.action-sheet {\n  margin-left: $sheet-margin;\n  margin-right: $sheet-margin;\n  width: auto;\n  z-index: $z-index-action-sheet;\n  overflow: hidden;\n\n  .button {\n    display: block;\n    padding: 1px;\n    width: 100%;\n    border-radius: 0;\n    border-color: $sheet-options-border-color;\n    background-color: transparent;\n\n    color: $sheet-options-text-color;\n    font-size: 21px;\n\n    &:hover {\n      color: $sheet-options-text-color;\n    }\n    &.destructive {\n      color: #ff3b30;\n      &:hover {\n        color: #ff3b30;\n      }\n    }\n  }\n\n  .button.active, .button.activated {\n    box-shadow: none;\n    border-color: $sheet-options-border-color;\n    color: $sheet-options-text-color;\n    background: $sheet-options-bg-active-color;\n  }\n}\n\n.action-sheet-has-icons .icon {\n  position: absolute;\n  left: 16px;\n}\n\n.action-sheet-title {\n  padding: $sheet-margin * 2;\n  color: #8f8f8f;\n  text-align: center;\n  font-size: 13px;\n}\n\n.action-sheet-group {\n  margin-bottom: $sheet-margin;\n  border-radius: $sheet-border-radius;\n  background-color: #fff;\n  overflow: hidden;\n\n  .button {\n    border-width: 1px 0px 0px 0px;\n  }\n  .button:first-child:last-child {\n    border-width: 0;\n  }\n}\n\n.action-sheet-options {\n  background: $sheet-options-bg-color;\n}\n\n.action-sheet-cancel {\n  .button {\n    font-weight: 500;\n  }\n}\n\n.action-sheet-open {\n  pointer-events: none;\n\n  &.modal-open .modal {\n    pointer-events: none;\n  }\n\n  .action-sheet-backdrop {\n    pointer-events: auto;\n  }\n}\n\n\n.platform-android {\n\n  .action-sheet-backdrop.active {\n    background-color: rgba(0,0,0,0.2);\n  }\n\n  .action-sheet {\n    margin: 0;\n\n    .action-sheet-title,\n    .button {\n      text-align: left;\n      border-color: transparent;\n      font-size: 16px;\n      color: inherit;\n    }\n\n    .action-sheet-title {\n      font-size: 14px;\n      padding: 16px;\n      color: #666;\n    }\n\n    .button.active,\n    .button.activated {\n      background: #e8e8e8;\n    }\n  }\n\n  .action-sheet-group {\n    margin: 0;\n    border-radius: 0;\n    background-color: #fafafa;\n  }\n\n  .action-sheet-cancel {\n    display: none;\n  }\n\n  .action-sheet-has-icons {\n\n    .button {\n      padding-left: 56px;\n    }\n\n  }\n\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_animations.scss",
    "content": "\n// Slide up from the bottom, used for modals\n// -------------------------------\n\n.slide-in-up {\n  @include translate3d(0, 100%, 0);\n}\n.slide-in-up.ng-enter,\n.slide-in-up > .ng-enter {\n  @include transition(all cubic-bezier(.1, .7, .1, 1) 400ms);\n}\n.slide-in-up.ng-enter-active,\n.slide-in-up > .ng-enter-active {\n  @include translate3d(0, 0, 0);\n}\n\n.slide-in-up.ng-leave,\n.slide-in-up > .ng-leave {\n  @include transition(all ease-in-out 250ms);\n}\n\n\n// Scale Out\n// Scale from hero (1 in this case) to zero\n// -------------------------------\n\n@-webkit-keyframes scaleOut {\n  from { -webkit-transform: scale(1); opacity: 1; }\n  to { -webkit-transform: scale(0.8); opacity: 0; }\n}\n@keyframes scaleOut {\n  from { transform: scale(1); opacity: 1; }\n  to { transform: scale(0.8); opacity: 0; }\n}\n\n\n// Super Scale In\n// Scale from super (1.x) to duper (1 in this case)\n// -------------------------------\n\n@-webkit-keyframes superScaleIn {\n  from { -webkit-transform: scale(1.2); opacity: 0; }\n  to { -webkit-transform: scale(1); opacity: 1 }\n}\n@keyframes superScaleIn {\n  from { transform: scale(1.2); opacity: 0; }\n  to { transform: scale(1); opacity: 1; }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_backdrop.scss",
    "content": "\n.backdrop {\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: $z-index-backdrop;\n\n  width: 100%;\n  height: 100%;\n\n  background-color: $loading-backdrop-bg-color;\n\n  visibility: hidden;\n  opacity: 0;\n\n  &.visible {\n    visibility: visible;\n  }\n  &.active {\n    opacity: 1;\n  }\n\n  @include transition($loading-backdrop-fadein-duration opacity linear);\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_badge.scss",
    "content": "\n/**\n * Badges\n * --------------------------------------------------\n */\n\n.badge {\n  @include badge-style($badge-default-bg, $badge-default-text);\n  z-index: $z-index-badge;\n  display: inline-block;\n  padding: 3px 8px;\n  min-width: 10px;\n  border-radius: $badge-border-radius;\n  vertical-align: baseline;\n  text-align: center;\n  white-space: nowrap;\n  font-weight: $badge-font-weight;\n  font-size: $badge-font-size;\n  line-height: $badge-line-height;\n\n  &:empty {\n    display: none;\n  }\n}\n\n//Be sure to override specificity of rule that 'badge color matches tab color by default'\n.tabs .tab-item .badge,\n.badge {\n  &.badge-light {\n    @include badge-style($badge-light-bg, $badge-light-text);\n  }\n  &.badge-stable {\n    @include badge-style($badge-stable-bg, $badge-stable-text);\n  }\n  &.badge-positive {\n    @include badge-style($badge-positive-bg, $badge-positive-text);\n  }\n  &.badge-calm {\n    @include badge-style($badge-calm-bg, $badge-calm-text);\n  }\n  &.badge-assertive {\n    @include badge-style($badge-assertive-bg, $badge-assertive-text);\n  }\n  &.badge-balanced {\n    @include badge-style($badge-balanced-bg, $badge-balanced-text);\n  }\n  &.badge-energized {\n    @include badge-style($badge-energized-bg, $badge-energized-text);\n  }\n  &.badge-royal {\n    @include badge-style($badge-royal-bg, $badge-royal-text);\n  }\n  &.badge-dark {\n    @include badge-style($badge-dark-bg, $badge-dark-text);\n  }\n}\n\n// Quick fix for labels/badges in buttons\n.button .badge {\n  position: relative;\n  top: -1px;\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_bar.scss",
    "content": "\n/**\n * Bar (Headers and Footers)\n * --------------------------------------------------\n */\n\n.bar {\n  @include display-flex();\n  @include translate3d(0,0,0);\n  @include user-select(none);\n  position: absolute;\n  right: 0;\n  left: 0;\n  z-index: $z-index-bar;\n\n  @include box-sizing(border-box);\n  padding: $bar-padding-portrait;\n\n  width: 100%;\n  height: $bar-height;\n  border-width: 0;\n  border-style: solid;\n  border-top: 1px solid transparent;\n  border-bottom: 1px solid $bar-default-border;\n\n  background-color: $bar-default-bg;\n\n  /* border-width: 1px will actually create 2 device pixels on retina */\n  /* this nifty trick sets an actual 1px border on hi-res displays */\n  background-size: 0;\n  @media (min--moz-device-pixel-ratio: 1.5),\n         (-webkit-min-device-pixel-ratio: 1.5),\n         (min-device-pixel-ratio: 1.5),\n         (min-resolution: 144dpi),\n         (min-resolution: 1.5dppx) {\n    border: none;\n    background-image: linear-gradient(0deg, $bar-default-border, $bar-default-border 50%, transparent 50%);\n    background-position: bottom;\n    background-size: 100% 1px;\n    background-repeat: no-repeat;\n  }\n\n  &.bar-clear {\n    border: none;\n    background: none;\n    color: #fff;\n\n    .button {\n      color: #fff;\n    }\n    .title {\n      color: #fff;\n    }\n  }\n\n  &.item-input-inset {\n    .item-input-wrapper {\n      margin-top: -1px;\n\n      input {\n        padding-left: 8px;\n        width: 94%;\n        height: 28px;\n        background: transparent;\n      }\n    }\n  }\n\n  &.bar-light {\n    @include bar-style($bar-light-bg, $bar-light-border, $bar-light-text);\n    &.bar-footer{\n      background-image: linear-gradient(180deg, $bar-light-border, $bar-light-border 50%, transparent 50%);\n    }\n  }\n  &.bar-stable {\n    @include bar-style($bar-stable-bg, $bar-stable-border, $bar-stable-text);\n    &.bar-footer{\n      background-image: linear-gradient(180deg, $bar-stable-border, $bar-stable-border 50%, transparent 50%);\n    }\n  }\n  &.bar-positive {\n    @include bar-style($bar-positive-bg, $bar-positive-border, $bar-positive-text);\n    &.bar-footer{\n      background-image: linear-gradient(180deg, $bar-positive-border, $bar-positive-border 50%, transparent 50%);\n    }\n  }\n  &.bar-calm {\n    @include bar-style($bar-calm-bg, $bar-calm-border, $bar-calm-text);\n    &.bar-footer{\n      background-image: linear-gradient(180deg, $bar-calm-border, $bar-calm-border 50%, transparent 50%);\n    }\n  }\n  &.bar-assertive {\n    @include bar-style($bar-assertive-bg, $bar-assertive-border, $bar-assertive-text);\n    &.bar-footer{\n      background-image: linear-gradient(180deg, $bar-assertive-border, $bar-assertive-border 50%, transparent 50%);\n    }\n  }\n  &.bar-balanced {\n    @include bar-style($bar-balanced-bg, $bar-balanced-border, $bar-balanced-text);\n    &.bar-footer{\n      background-image: linear-gradient(180deg, $bar-balanced-border, $bar-balanced-border 50%, transparent 50%);\n    }\n  }\n  &.bar-energized {\n    @include bar-style($bar-energized-bg, $bar-energized-border, $bar-energized-text);\n    &.bar-footer{\n      background-image: linear-gradient(180deg, $bar-energized-border, $bar-energized-border 50%, transparent 50%);\n    }\n  }\n  &.bar-royal {\n    @include bar-style($bar-royal-bg, $bar-royal-border, $bar-royal-text);\n    &.bar-footer{\n      background-image: linear-gradient(180deg, $bar-royal-border, $bar-royal-border 50%, transparent 50%);\n    }\n  }\n  &.bar-dark {\n    @include bar-style($bar-dark-bg, $bar-dark-border, $bar-dark-text);\n    &.bar-footer{\n      background-image: linear-gradient(180deg, $bar-dark-border, $bar-dark-border 50%, transparent 50%);\n    }\n  }\n\n  // Title inside of a bar is centered\n  .title {\n    display: block;\n    position: absolute;\n\n    top: 0;\n    right: 0;\n    left: 0;\n    z-index: $z-index-bar-title;\n    overflow: hidden;\n\n    margin: 0 10px;\n\n    min-width: 30px;\n    height: $bar-height - 1;\n\n    text-align: center;\n\n    // Go into ellipsis if too small\n    text-overflow: ellipsis;\n    white-space: nowrap;\n\n    font-size: $bar-title-font-size;\n    font-weight: $headings-font-weight;\n\n    line-height: $bar-height;\n\n    &.title-left {\n      text-align: left;\n    }\n    &.title-right {\n      text-align: right;\n    }\n  }\n\n  .title a {\n    color: inherit;\n  }\n\n  .button, button {\n    z-index: $z-index-bar-button;\n    padding: 0 $button-bar-button-padding;\n    min-width: initial;\n    min-height: $button-bar-button-height - 1;\n    font-weight: 400;\n    font-size: $button-bar-button-font-size;\n    line-height: $button-bar-button-height;\n\n    &.button-icon:before,\n    .icon:before,\n    &.icon:before,\n    &.icon-left:before,\n    &.icon-right:before {\n      padding-right: 2px;\n      padding-left: 2px;\n      font-size: $button-bar-button-icon-size;\n      line-height: $button-bar-button-height;\n    }\n\n    &.button-icon {\n      font-size: $bar-title-font-size;\n      .icon:before,\n      &:before,\n      &.icon-left:before,\n      &.icon-right:before {\n        vertical-align: top;\n        font-size: $button-large-icon-size;\n        line-height: $button-bar-button-height;\n      }\n    }\n    &.button-clear {\n      padding-right: 2px;\n      padding-left: 2px;\n      font-weight: 300;\n      font-size: $bar-title-font-size;\n\n      .icon:before,\n      &.icon:before,\n      &.icon-left:before,\n      &.icon-right:before {\n        font-size: $button-large-icon-size;\n        line-height: $button-bar-button-height;\n      }\n    }\n\n    &.back-button {\n      display: block;\n      margin-right: 5px;\n      padding: 0;\n      white-space: nowrap;\n      font-weight: 400;\n    }\n\n    &.back-button.active,\n    &.back-button.activated {\n      opacity: 0.2;\n    }\n  }\n\n  .button-bar > .button,\n  .buttons > .button {\n    min-height: $button-bar-button-height - 1;\n    line-height: $button-bar-button-height;\n  }\n\n  .button-bar + .button,\n  .button + .button-bar {\n    margin-left: 5px;\n  }\n\n  // Android 4.4 messes with the display property\n  .buttons,\n  .buttons.primary-buttons,\n  .buttons.secondary-buttons {\n    display: inherit;\n  }\n  .buttons span {\n    display: inline-block;\n  }\n  .buttons-left span {\n    margin-right: 5px;\n    display: inherit;\n  }\n  .buttons-right span {\n    margin-left: 5px;\n    display: inherit;\n  }\n\n  // Place the last button in a bar on the right of the bar\n  .title + .button:last-child,\n  > .button + .button:last-child,\n  > .button.pull-right,\n  .buttons.pull-right,\n  .title + .buttons {\n    position: absolute;\n    top: 5px;\n    right: 5px;\n    bottom: 5px;\n  }\n\n}\n\n.platform-android {\n\n  .nav-bar-has-subheader .bar {\n    background-image: none;\n  }\n\n  .bar {\n\n    .back-button .icon:before {\n      font-size: 24px;\n    }\n\n    .title {\n      font-size: 19px;\n      line-height: $bar-height;\n    }\n  }\n\n}\n\n// Default styles for buttons inside of styled bars\n.bar-light {\n  .button {\n    @include button-style($bar-light-bg, $bar-light-border, $bar-light-active-bg, $bar-light-active-border, $bar-light-text);\n    @include button-clear($bar-light-text, $bar-title-font-size);\n  }\n}\n.bar-stable {\n  .button {\n    @include button-style($bar-stable-bg, $bar-stable-border, $bar-stable-active-bg, $bar-stable-active-border, $bar-stable-text);\n    @include button-clear($bar-stable-text, $bar-title-font-size);\n  }\n}\n.bar-positive {\n  .button {\n    @include button-style($bar-positive-bg, $bar-positive-border, $bar-positive-active-bg, $bar-positive-active-border, $bar-positive-text);\n    @include button-clear(#fff, $bar-title-font-size);\n  }\n}\n.bar-calm {\n  .button {\n    @include button-style($bar-calm-bg, $bar-calm-border, $bar-calm-active-bg, $bar-calm-active-border, $bar-calm-text);\n    @include button-clear(#fff, $bar-title-font-size);\n  }\n}\n.bar-assertive {\n  .button {\n    @include button-style($bar-assertive-bg, $bar-assertive-border, $bar-assertive-active-bg, $bar-assertive-active-border, $bar-assertive-text);\n    @include button-clear(#fff, $bar-title-font-size);\n  }\n}\n.bar-balanced {\n  .button {\n    @include button-style($bar-balanced-bg, $bar-balanced-border, $bar-balanced-active-bg, $bar-balanced-active-border, $bar-balanced-text);\n    @include button-clear(#fff, $bar-title-font-size);\n  }\n}\n.bar-energized {\n  .button {\n    @include button-style($bar-energized-bg, $bar-energized-border, $bar-energized-active-bg, $bar-energized-active-border, $bar-energized-text);\n    @include button-clear(#fff, $bar-title-font-size);\n  }\n}\n.bar-royal {\n  .button {\n    @include button-style($bar-royal-bg, $bar-royal-border, $bar-royal-active-bg, $bar-royal-active-border, $bar-royal-text);\n    @include button-clear(#fff, $bar-title-font-size);\n  }\n}\n.bar-dark {\n  .button {\n    @include button-style($bar-dark-bg, $bar-dark-border, $bar-dark-active-bg, $bar-dark-active-border, $bar-dark-text);\n    @include button-clear(#fff, $bar-title-font-size);\n  }\n}\n\n// Header at top\n.bar-header {\n  top: 0;\n  border-top-width: 0;\n  border-bottom-width: 1px;\n  &.has-tabs-top{\n    border-bottom-width: 0px;\n    background-image: none;\n  }\n}\n.tabs-top .bar-header{\n  border-bottom-width: 0px;\n  background-image: none;\n}\n\n// Footer at bottom\n.bar-footer {\n  bottom: 0;\n  border-top-width: 1px;\n  border-bottom-width: 0;\n  background-position: top;\n\n  height: $bar-footer-height;\n\n  &.item-input-inset {\n    position: absolute;\n  }\n\n  .title {\n    height: $bar-footer-height - 1;\n    line-height: $bar-footer-height;\n  }\n}\n\n// Don't render padding if the bar is just for tabs\n.bar-tabs {\n  padding: 0;\n}\n\n.bar-subheader {\n  top: $bar-height;\n\n  height: $bar-subheader-height;\n\n  .title {\n    height: $bar-subheader-height - 1;\n    line-height: $bar-subheader-height;\n  }\n}\n.bar-subfooter {\n  bottom: $bar-footer-height;\n\n  height: $bar-subfooter-height;\n\n  .title {\n    height: $bar-subfooter-height - 1;\n    line-height: $bar-subfooter-height;\n  }\n}\n\n.nav-bar-block {\n  position: absolute;\n  top: 0;\n  right: 0;\n  left: 0;\n  z-index: $z-index-bar;\n}\n\n.bar .back-button.hide,\n.bar .buttons .hide {\n  display: none;\n}\n\n.nav-bar-tabs-top .bar {\n  background-image: none;\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_button-bar.scss",
    "content": "\n/**\n * Button Bar\n * --------------------------------------------------\n */\n\n.button-bar {\n  @include display-flex();\n  @include flex(1);\n  width: 100%;\n\n  &.button-bar-inline {\n    display: block;\n    width: auto;\n\n    @include clearfix();\n\n    > .button {\n      width: auto;\n      display: inline-block;\n      float: left;\n    }\n  }\n\n  &.bar-light > .button {\n    border-color: $button-light-border;\n  }\n  &.bar-stable > .button {\n    border-color: $button-stable-border;\n  }\n  &.bar-positive > .button {\n    border-color: $button-positive-border;\n  }\n  &.bar-calm > .button {\n    border-color: $button-calm-border;\n  }\n  &.bar-assertive > .button {\n    border-color: $button-assertive-border;\n  }\n  &.bar-balanced > .button {\n    border-color: $button-balanced-border;\n  }\n  &.bar-energized > .button {\n    border-color: $button-energized-border;\n  }\n  &.bar-royal > .button {\n    border-color: $button-royal-border;\n  }\n  &.bar-dark > .button {\n    border-color: $button-dark-border;\n  }\n}\n\n.button-bar > .button {\n  @include flex(1);\n  display: block;\n\n  overflow: hidden;\n\n  padding: 0 16px;\n\n  width: 0;\n\n  border-width: 1px 0px 1px 1px;\n  border-radius: 0;\n  text-align: center;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n\n  &:before,\n  .icon:before {\n    line-height: 44px;\n  }\n\n  &:first-child {\n    border-radius: $button-border-radius 0px 0px $button-border-radius;\n  }\n  &:last-child {\n    border-right-width: 1px;\n    border-radius: 0px $button-border-radius $button-border-radius 0px;\n  }\n  &:only-child {\n    border-radius: $button-border-radius;\n  }\n}\n\n.button-bar > .button-small {\n  &:before,\n  .icon:before {\n    line-height: 28px;\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_button.scss",
    "content": "\n/**\n * Buttons\n * --------------------------------------------------\n */\n\n.button {\n  // set the color defaults\n  @include button-style($button-default-bg, $button-default-border, $button-default-active-bg, $button-default-active-border, $button-default-text);\n\n  position: relative;\n  display: inline-block;\n  margin: 0;\n  padding: 0 $button-padding;\n\n  min-width: ($button-padding * 3) + $button-font-size;\n  min-height: $button-height + 5px;\n\n  border-width: $button-border-width;\n  border-style: solid;\n  border-radius: $button-border-radius;\n\n  vertical-align: top;\n  text-align: center;\n\n  text-overflow: ellipsis;\n  font-size: $button-font-size;\n  line-height: $button-height - $button-border-width + 1px;\n\n  cursor: pointer;\n\n  &:after {\n    // used to create a larger button \"hit\" area\n    position: absolute;\n    top: -6px;\n    right: -6px;\n    bottom: -6px;\n    left: -6px;\n    content: ' ';\n  }\n\n  .icon {\n    vertical-align: top;\n    pointer-events: none;\n  }\n\n  .icon:before,\n  &.icon:before,\n  &.icon-left:before,\n  &.icon-right:before {\n    display: inline-block;\n    padding: 0 0 $button-border-width 0;\n    vertical-align: inherit;\n    font-size: $button-icon-size;\n    line-height: $button-height - $button-border-width;\n    pointer-events: none;\n  }\n  &.icon-left:before {\n    float: left;\n    padding-right: .2em;\n    padding-left: 0;\n  }\n  &.icon-right:before {\n    float: right;\n    padding-right: 0;\n    padding-left: .2em;\n  }\n\n  &.button-block, &.button-full {\n    margin-top: $button-block-margin;\n    margin-bottom: $button-block-margin;\n  }\n\n  &.button-light {\n    @include button-style($button-light-bg, $button-default-border, $button-light-active-bg, $button-default-active-border, $button-light-text);\n    @include button-clear($button-light-border);\n    @include button-outline($button-light-border);\n  }\n\n  &.button-stable {\n    @include button-style($button-stable-bg, $button-default-border, $button-stable-active-bg, $button-default-active-border, $button-stable-text);\n    @include button-clear($button-stable-border);\n    @include button-outline($button-stable-border);\n  }\n\n  &.button-positive {\n    @include button-style($button-positive-bg, $button-default-border, $button-positive-active-bg, $button-default-active-border, $button-positive-text);\n    @include button-clear($button-positive-bg);\n    @include button-outline($button-positive-bg);\n  }\n\n  &.button-calm {\n    @include button-style($button-calm-bg, $button-default-border, $button-calm-active-bg, $button-default-active-border, $button-calm-text);\n    @include button-clear($button-calm-bg);\n    @include button-outline($button-calm-bg);\n  }\n\n  &.button-assertive {\n    @include button-style($button-assertive-bg, $button-default-border, $button-assertive-active-bg, $button-default-active-border, $button-assertive-text);\n    @include button-clear($button-assertive-bg);\n    @include button-outline($button-assertive-bg);\n  }\n\n  &.button-balanced {\n    @include button-style($button-balanced-bg, $button-default-border, $button-balanced-active-bg, $button-default-active-border, $button-balanced-text);\n    @include button-clear($button-balanced-bg);\n    @include button-outline($button-balanced-bg);\n  }\n\n  &.button-energized {\n    @include button-style($button-energized-bg, $button-default-border, $button-energized-active-bg, $button-default-active-border, $button-energized-text);\n    @include button-clear($button-energized-bg);\n    @include button-outline($button-energized-bg);\n  }\n\n  &.button-royal {\n    @include button-style($button-royal-bg, $button-default-border, $button-royal-active-bg, $button-default-active-border, $button-royal-text);\n    @include button-clear($button-royal-bg);\n    @include button-outline($button-royal-bg);\n  }\n\n  &.button-dark {\n    @include button-style($button-dark-bg, $button-default-border, $button-dark-active-bg, $button-default-active-border, $button-dark-text);\n    @include button-clear($button-dark-bg);\n    @include button-outline($button-dark-bg);\n  }\n}\n\n.button-small {\n  padding: 2px $button-small-padding 1px;\n  min-width: $button-small-height;\n  min-height: $button-small-height + 2;\n  font-size: $button-small-font-size;\n  line-height: $button-small-height - $button-border-width - 1;\n\n  .icon:before,\n  &.icon:before,\n  &.icon-left:before,\n  &.icon-right:before {\n    font-size: $button-small-icon-size;\n    line-height: $button-small-icon-size + 3;\n    margin-top: 3px;\n  }\n}\n\n.button-large {\n  padding: 0 $button-large-padding;\n  min-width: ($button-large-padding * 3) + $button-large-font-size;\n  min-height: $button-large-height + 5;\n  font-size: $button-large-font-size;\n  line-height: $button-large-height - $button-border-width;\n\n  .icon:before,\n  &.icon:before,\n  &.icon-left:before,\n  &.icon-right:before {\n    padding-bottom: ($button-border-width * 2);\n    font-size: $button-large-icon-size;\n    line-height: $button-large-height - ($button-border-width * 2) - 1;\n  }\n}\n\n.button-icon {\n  @include transition(opacity .1s);\n  padding: 0 6px;\n  min-width: initial;\n  border-color: transparent;\n  background: none;\n\n  &.button.active,\n  &.button.activated {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    opacity: 0.3;\n  }\n\n  .icon:before,\n  &.icon:before {\n    font-size: $button-large-icon-size;\n  }\n}\n\n.button-clear {\n  @include button-clear($button-default-border);\n  @include transition(opacity .1s);\n  padding: 0 $button-clear-padding;\n  max-height: $button-height;\n  border-color: transparent;\n  background: none;\n  box-shadow: none;\n\n  &.active,\n  &.activated {\n    opacity: 0.3;\n  }\n}\n\n.button-outline {\n  @include button-outline($button-default-border);\n  @include transition(opacity .1s);\n  background: none;\n  box-shadow: none;\n}\n\n.padding > .button.button-block:first-child {\n  margin-top: 0;\n}\n\n.button-block {\n  display: block;\n  clear: both;\n\n  &:after {\n    clear: both;\n  }\n}\n\n.button-full,\n.button-full > .button {\n  display: block;\n  margin-right: 0;\n  margin-left: 0;\n  border-right-width: 0;\n  border-left-width: 0;\n  border-radius: 0;\n}\n\nbutton.button-block,\nbutton.button-full,\n.button-full > button.button,\ninput.button.button-block  {\n  width: 100%;\n}\n\na.button {\n  text-decoration: none;\n\n  .icon:before,\n  &.icon:before,\n  &.icon-left:before,\n  &.icon-right:before {\n    margin-top: 2px;\n  }\n}\n\n.button.disabled,\n.button[disabled] {\n  opacity: .4;\n  cursor: default !important;\n  pointer-events: none;\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_checkbox.scss",
    "content": "\n/**\n * Checkbox\n * --------------------------------------------------\n */\n\n.checkbox {\n  // set the color defaults\n  @include checkbox-style($checkbox-off-border-default, $checkbox-on-bg-default, $checkbox-on-border-default);\n\n  position: relative;\n  display: inline-block;\n  padding: ($checkbox-height / 4) ($checkbox-width / 4);\n  cursor: pointer;\n}\n.checkbox-light  {\n  @include checkbox-style($checkbox-off-border-light, $checkbox-on-bg-light, $checkbox-off-border-light);\n}\n.checkbox-stable  {\n  @include checkbox-style($checkbox-off-border-stable, $checkbox-on-bg-stable, $checkbox-off-border-stable);\n}\n.checkbox-positive  {\n  @include checkbox-style($checkbox-off-border-positive, $checkbox-on-bg-positive, $checkbox-off-border-positive);\n}\n.checkbox-calm  {\n  @include checkbox-style($checkbox-off-border-calm, $checkbox-on-bg-calm, $checkbox-off-border-calm);\n}\n.checkbox-assertive  {\n  @include checkbox-style($checkbox-off-border-assertive, $checkbox-on-bg-assertive, $checkbox-off-border-assertive);\n}\n.checkbox-balanced  {\n  @include checkbox-style($checkbox-off-border-balanced, $checkbox-on-bg-balanced, $checkbox-off-border-balanced);\n}\n.checkbox-energized{\n  @include checkbox-style($checkbox-off-border-energized, $checkbox-on-bg-energized, $checkbox-off-border-energized);\n}\n.checkbox-royal  {\n  @include checkbox-style($checkbox-off-border-royal, $checkbox-on-bg-royal, $checkbox-off-border-royal);\n}\n.checkbox-dark  {\n  @include checkbox-style($checkbox-off-border-dark, $checkbox-on-bg-dark, $checkbox-off-border-dark);\n}\n\n.checkbox input:disabled:before,\n.checkbox input:disabled + .checkbox-icon:before {\n  border-color: $checkbox-off-border-light;\n}\n\n.checkbox input:disabled:checked:before,\n.checkbox input:disabled:checked + .checkbox-icon:before {\n  background: $checkbox-on-bg-light;\n}\n\n\n.checkbox.checkbox-input-hidden input {\n  display: none !important;\n}\n\n.checkbox input,\n.checkbox-icon {\n  position: relative;\n  width: $checkbox-width;\n  height: $checkbox-height;\n  display: block;\n  border: 0;\n  background: transparent;\n  cursor: pointer;\n  -webkit-appearance: none;\n\n  &:before {\n    // what the checkbox looks like when its not checked\n    display: table;\n    width: 100%;\n    height: 100%;\n    border-width: $checkbox-border-width;\n    border-style: solid;\n    border-radius: $checkbox-border-radius;\n    background: $checkbox-off-bg-color;\n    content: ' ';\n    @include transition(background-color 20ms ease-in-out);\n  }\n}\n\n.checkbox input:checked:before,\ninput:checked + .checkbox-icon:before {\n  border-width: $checkbox-border-width + 1;\n}\n\n// the checkmark within the box\n.checkbox input:after,\n.checkbox-icon:after {\n  @include transition(opacity .05s ease-in-out);\n  @include rotate(-45deg);\n  position: absolute;\n  top: 33%;\n  left: 25%;\n  display: table;\n  width: ($checkbox-width / 2);\n  height: ($checkbox-width / 4) - 1;\n  border: $checkbox-check-width solid $checkbox-check-color;\n  border-top: 0;\n  border-right: 0;\n  content: ' ';\n  opacity: 0;\n}\n\n.platform-android .checkbox-platform input:before,\n.platform-android .checkbox-platform .checkbox-icon:before,\n.checkbox-square input:before,\n.checkbox-square .checkbox-icon:before {\n  border-radius: 2px;\n  width: 72%;\n  height: 72%;\n  margin-top: 14%;\n  margin-left: 14%;\n  border-width: 2px;\n}\n\n.platform-android .checkbox-platform input:after,\n.platform-android .checkbox-platform .checkbox-icon:after,\n.checkbox-square input:after,\n.checkbox-square .checkbox-icon:after {\n  border-width: 2px;\n  top: 19%;\n  left: 25%;\n  width: ($checkbox-width / 2) - 1;\n  height: 7px;\n}\n\n.platform-android .item-checkbox-right .checkbox-square .checkbox-icon::after {\n  top: 31%;\n}\n\n.grade-c .checkbox input:after,\n.grade-c .checkbox-icon:after {\n  @include rotate(0);\n  top: 3px;\n  left: 4px;\n  border: none;\n  color: $checkbox-check-color;\n  content: '\\2713';\n  font-weight: bold;\n  font-size: 20px;\n}\n\n// what the checkmark looks like when its checked\n.checkbox input:checked:after,\ninput:checked + .checkbox-icon:after {\n  opacity: 1;\n}\n\n// make sure item content have enough padding on left to fit the checkbox\n.item-checkbox {\n  padding-left: ($item-padding * 2) + $checkbox-width;\n\n  &.active {\n    box-shadow: none;\n  }\n}\n\n// position the checkbox to the left within an item\n.item-checkbox .checkbox {\n  position: absolute;\n  top: 50%;\n  right: $item-padding / 2;\n  left: $item-padding / 2;\n  z-index: $z-index-item-checkbox;\n  margin-top: (($checkbox-height + ($checkbox-height / 2)) / 2) * -1;\n}\n\n\n.item-checkbox.item-checkbox-right {\n  padding-right: ($item-padding * 2) + $checkbox-width;\n  padding-left: $item-padding;\n}\n\n.item-checkbox-right .checkbox input,\n.item-checkbox-right .checkbox-icon {\n  float: right;\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_form.scss",
    "content": "/**\n * Forms\n * --------------------------------------------------\n */\n\n// Make all forms have space below them\nform {\n  margin: 0 0 $line-height-base;\n}\n\n// Groups of fields with labels on top (legends)\nlegend {\n  display: block;\n  margin-bottom: $line-height-base;\n  padding: 0;\n  width: 100%;\n  border: $input-border-width solid $input-border;\n  color: $dark;\n  font-size: $font-size-base * 1.5;\n  line-height: $line-height-base * 2;\n\n  small {\n    color: $stable;\n    font-size: $line-height-base * .75;\n  }\n}\n\n// Set font for forms\nlabel,\ninput,\nbutton,\nselect,\ntextarea {\n  @include font-shorthand($font-size-base, normal, $line-height-base); // Set size, weight, line-height here\n}\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: $font-family-base; // And only set font-family here for those that need it (note the missing label element)\n}\n\n\n// Input List\n// -------------------------------\n\n.item-input {\n  @include display-flex();\n  @include align-items(center);\n  position: relative;\n  overflow: hidden;\n  padding: 6px 0 5px 16px;\n\n  input {\n    @include border-radius(0);\n    @include flex(1, 220px);\n    @include appearance(none);\n    margin: 0;\n    padding-right: 24px;\n    background-color: transparent;\n  }\n\n  .button .icon {\n    @include flex(0, 0, 24px);\n    position: static;\n    display: inline-block;\n    height: auto;\n    text-align: center;\n    font-size: 16px;\n  }\n\n  .button-bar {\n    @include border-radius(0);\n    @include flex(1, 0, 220px);\n    @include appearance(none);\n  }\n\n  .icon {\n    min-width: 14px;\n  }\n}\n// prevent flex-shrink on WP\n.platform-windowsphone .item-input input{\n  flex-shrink: 1;\n}\n\n.item-input-inset {\n  @include display-flex();\n  @include align-items(center);\n  position: relative;\n  overflow: hidden;\n  padding: ($item-padding / 3) * 2;\n}\n\n.item-input-wrapper {\n  @include display-flex();\n  @include flex(1, 0);\n  @include align-items(center);\n  @include border-radius(4px);\n  padding-right: 8px;\n  padding-left: 8px;\n  background: #eee;\n}\n\n.item-input-inset .item-input-wrapper input {\n  padding-left: 4px;\n  height: 29px;\n  background: transparent;\n  line-height: 18px;\n}\n\n.item-input-wrapper ~ .button {\n  margin-left: ($item-padding / 3) * 2;\n}\n\n.input-label {\n  display: table;\n  padding: 7px 10px 7px 0px;\n  max-width: 200px;\n  width: 35%;\n  color: $input-label-color;\n  font-size: 16px;\n}\n\n.placeholder-icon {\n  color: #aaa;\n  &:first-child {\n    padding-right: 6px;\n  }\n  &:last-child {\n    padding-left: 6px;\n  }\n}\n\n.item-stacked-label {\n  display: block;\n  background-color: transparent;\n  box-shadow: none;\n\n  .input-label, .icon {\n    display: inline-block;\n    padding: 4px 0 0 0px;\n    vertical-align: middle;\n  }\n}\n\n.item-stacked-label input,\n.item-stacked-label textarea {\n  @include border-radius(2px);\n  padding: 4px 8px 3px 0;\n  border: none;\n  background-color: $input-bg;\n}\n.item-stacked-label input {\n  overflow: hidden;\n  height: $line-height-computed + $font-size-base + 12px;\n}\n\n.item-select.item-stacked-label select {\n  position: relative;\n  padding: 0px;\n  max-width: 90%;\n  direction:ltr;\n  white-space: pre-wrap;\n  margin: -3px;\n}\n\n.item-floating-label {\n  display: block;\n  background-color: transparent;\n  box-shadow: none;\n\n  .input-label {\n    position: relative;\n    padding: 5px 0 0 0;\n    opacity: 0;\n    top: 10px;\n    @include transition(opacity .15s ease-in, top .2s linear);\n\n    &.has-input {\n      opacity: 1;\n      top: 0;\n      @include transition(opacity .15s ease-in, top .2s linear);\n    }\n  }\n}\n\n\n// Form Controls\n// -------------------------------\n\n// Shared size and type resets\ntextarea,\ninput[type=\"text\"],\ninput[type=\"password\"],\ninput[type=\"datetime\"],\ninput[type=\"datetime-local\"],\ninput[type=\"date\"],\ninput[type=\"month\"],\ninput[type=\"time\"],\ninput[type=\"week\"],\ninput[type=\"number\"],\ninput[type=\"email\"],\ninput[type=\"url\"],\ninput[type=\"search\"],\ninput[type=\"tel\"],\ninput[type=\"color\"] {\n  display: block;\n  padding-top: 2px;\n  padding-left: 0;\n  height: $line-height-computed + $font-size-base;\n  color: $input-color;\n  vertical-align: middle;\n  font-size: $font-size-base;\n  line-height: $font-size-base + 2;\n}\n\n.platform-ios,\n.platform-android {\n  input[type=\"datetime-local\"],\n  input[type=\"date\"],\n  input[type=\"month\"],\n  input[type=\"time\"],\n  input[type=\"week\"] {\n    padding-top: 8px;\n  }\n}\n\n.item-input {\n  input,\n  textarea {\n    width: 100%;\n  }\n}\n\ntextarea {\n  padding-left: 0;\n  @include placeholder($input-color-placeholder, -3px);\n}\n\n// Reset height since textareas have rows\ntextarea {\n  height: auto;\n}\n\n// Everything else\ntextarea,\ninput[type=\"text\"],\ninput[type=\"password\"],\ninput[type=\"datetime\"],\ninput[type=\"datetime-local\"],\ninput[type=\"date\"],\ninput[type=\"month\"],\ninput[type=\"time\"],\ninput[type=\"week\"],\ninput[type=\"number\"],\ninput[type=\"email\"],\ninput[type=\"url\"],\ninput[type=\"search\"],\ninput[type=\"tel\"],\ninput[type=\"color\"] {\n  border: 0;\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  margin: 0;\n  line-height: normal;\n}\n\n// Reset width of input images, buttons, radios, checkboxes\n.item-input {\n  input[type=\"file\"],\n  input[type=\"image\"],\n  input[type=\"submit\"],\n  input[type=\"reset\"],\n  input[type=\"button\"],\n  input[type=\"radio\"],\n  input[type=\"checkbox\"] {\n    width: auto; // Override of generic input selector\n  }\n}\n\n// Set the height of file to match text inputs\ninput[type=\"file\"] {\n  line-height: $input-height-base;\n}\n\n// Text input classes to hide text caret during scroll\n.previous-input-focus,\n.cloned-text-input + input,\n.cloned-text-input + textarea {\n  position: absolute !important;\n  left: -9999px;\n  width: 200px;\n}\n\n\n// Placeholder\n// -------------------------------\ninput,\ntextarea {\n  @include placeholder();\n}\n\n\n// DISABLED STATE\n// -------------------------------\n\n// Disabled and read-only inputs\ninput[disabled],\nselect[disabled],\ntextarea[disabled],\ninput[readonly]:not(.cloned-text-input),\ntextarea[readonly]:not(.cloned-text-input),\nselect[readonly] {\n  background-color: $input-bg-disabled;\n  cursor: not-allowed;\n}\n// Explicitly reset the colors here\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"][readonly],\ninput[type=\"checkbox\"][readonly] {\n  background-color: transparent;\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_grid.scss",
    "content": "/**\n * Grid\n * --------------------------------------------------\n * Using flexbox for the grid, inspired by Philip Walton:\n * http://philipwalton.github.io/solved-by-flexbox/demos/grids/\n * By default each .col within a .row will evenly take up\n * available width, and the height of each .col with take\n * up the height of the tallest .col in the same .row.\n */\n\n.row {\n  @include display-flex();\n  padding: ($grid-padding-width / 2);\n  width: 100%;\n}\n\n.row-wrap {\n  @include flex-wrap(wrap);\n}\n\n.row-no-padding {\n  padding: 0;\n\n  > .col {\n    padding: 0;\n  }\n}\n\n.row + .row {\n  margin-top: ($grid-padding-width / 2) * -1;\n  padding-top: 0;\n}\n\n.col {\n  @include flex(1);\n  display: block;\n  padding: ($grid-padding-width / 2);\n  width: 100%;\n}\n\n\n/* Vertically Align Columns */\n/* .row-* vertically aligns every .col in the .row */\n.row-top {\n  @include align-items(flex-start);\n}\n.row-bottom {\n  @include align-items(flex-end);\n}\n.row-center {\n  @include align-items(center);\n}\n.row-stretch {\n  @include align-items(stretch);\n}\n.row-baseline {\n  @include align-items(baseline);\n}\n\n/* .col-* vertically aligns an individual .col */\n.col-top {\n  @include align-self(flex-start);\n}\n.col-bottom {\n  @include align-self(flex-end);\n}\n.col-center {\n  @include align-self(center);\n}\n\n/* Column Offsets */\n.col-offset-10 {\n  margin-left: 10%;\n}\n.col-offset-20 {\n  margin-left: 20%;\n}\n.col-offset-25 {\n  margin-left: 25%;\n}\n.col-offset-33, .col-offset-34 {\n  margin-left: 33.3333%;\n}\n.col-offset-50 {\n  margin-left: 50%;\n}\n.col-offset-66, .col-offset-67 {\n  margin-left: 66.6666%;\n}\n.col-offset-75 {\n  margin-left: 75%;\n}\n.col-offset-80 {\n  margin-left: 80%;\n}\n.col-offset-90 {\n  margin-left: 90%;\n}\n\n\n/* Explicit Column Percent Sizes */\n/* By default each grid column will evenly distribute */\n/* across the grid. However, you can specify individual */\n/* columns to take up a certain size of the available area */\n.col-10 {\n  @include flex(0, 0, 10%);\n  max-width: 10%;\n}\n.col-20 {\n  @include flex(0, 0, 20%);\n  max-width: 20%;\n}\n.col-25 {\n  @include flex(0, 0, 25%);\n  max-width: 25%;\n}\n.col-33, .col-34 {\n  @include flex(0, 0, 33.3333%);\n  max-width: 33.3333%;\n}\n.col-40 {\n  @include flex(0, 0, 40%);\n  max-width: 40%;\n}\n.col-50 {\n  @include flex(0, 0, 50%);\n  max-width: 50%;\n}\n.col-60 {\n  @include flex(0, 0, 60%);\n  max-width: 60%;\n}\n.col-66, .col-67 {\n  @include flex(0, 0, 66.6666%);\n  max-width: 66.6666%;\n}\n.col-75 {\n  @include flex(0, 0, 75%);\n  max-width: 75%;\n}\n.col-80 {\n  @include flex(0, 0, 80%);\n  max-width: 80%;\n}\n.col-90 {\n  @include flex(0, 0, 90%);\n  max-width: 90%;\n}\n\n\n/* Responsive Grid Classes */\n/* Adding a class of responsive-X to a row */\n/* will trigger the flex-direction to */\n/* change to column and add some margin */\n/* to any columns in the row for clearity */\n\n@include responsive-grid-break('.responsive-sm', $grid-responsive-sm-break);\n@include responsive-grid-break('.responsive-md', $grid-responsive-md-break);\n@include responsive-grid-break('.responsive-lg', $grid-responsive-lg-break);\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_items.scss",
    "content": "/**\n * Items\n * --------------------------------------------------\n */\n\n.item {\n  @include item-style($item-default-bg, $item-default-border, $item-default-text);\n\n  position: relative;\n  z-index: $z-index-item; // Make sure the borders and stuff don't get hidden by children\n  display: block;\n\n  margin: $item-border-width * -1;\n  padding: $item-padding;\n\n  border-width: $item-border-width;\n  border-style: solid;\n  font-size: $item-font-size;\n\n  h2 {\n    margin: 0 0 2px 0;\n    font-size: 16px;\n    font-weight: normal;\n  }\n  h3 {\n    margin: 0 0 4px 0;\n    font-size: 14px;\n  }\n  h4 {\n    margin: 0 0 4px 0;\n    font-size: 12px;\n  }\n  h5, h6 {\n    margin: 0 0 3px 0;\n    font-size: 10px;\n  }\n  p {\n    color: #666;\n    font-size: 14px;\n    margin-bottom: 2px;\n  }\n\n  h1:last-child,\n  h2:last-child,\n  h3:last-child,\n  h4:last-child,\n  h5:last-child,\n  h6:last-child,\n  p:last-child {\n    margin-bottom: 0;\n  }\n\n  // Align badges within items\n  .badge {\n    @include display-flex();\n    position: absolute;\n    top: $item-padding;\n    right: ($item-padding * 2);\n  }\n  &.item-button-right .badge {\n    right: ($item-padding * 2) + 35;\n  }\n  &.item-divider .badge {\n    top: ceil($item-padding / 2);\n  }\n  .badge + .badge {\n    margin-right: 5px;\n  }\n\n  // Different themes for items\n  &.item-light {\n    @include item-style($item-light-bg, $item-light-border, $item-light-text);\n  }\n  &.item-stable {\n    @include item-style($item-stable-bg, $item-stable-border, $item-stable-text);\n  }\n  &.item-positive {\n    @include item-style($item-positive-bg, $item-positive-border, $item-positive-text);\n  }\n  &.item-calm {\n    @include item-style($item-calm-bg, $item-calm-border, $item-calm-text);\n  }\n  &.item-assertive {\n    @include item-style($item-assertive-bg, $item-assertive-border, $item-assertive-text);\n  }\n  &.item-balanced {\n    @include item-style($item-balanced-bg, $item-balanced-border, $item-balanced-text);\n  }\n  &.item-energized {\n    @include item-style($item-energized-bg, $item-energized-border, $item-energized-text);\n  }\n  &.item-royal {\n    @include item-style($item-royal-bg, $item-royal-border, $item-royal-text);\n  }\n  &.item-dark {\n    @include item-style($item-dark-bg, $item-dark-border, $item-dark-text);\n  }\n\n  &[ng-click]:hover {\n    cursor: pointer;\n  }\n\n}\n\n.list-borderless .item,\n.item-borderless {\n  border-width: 0;\n}\n\n// Link and Button Active States\n.item.active,\n.item.activated,\n.item-complex.active .item-content,\n.item-complex.activated .item-content,\n.item .item-content.active,\n.item .item-content.activated {\n  @include item-active-style($item-default-active-bg, $item-default-active-border);\n\n  // Different active themes for <a> and <button> items\n  &.item-light {\n    @include item-active-style($item-light-active-bg, $item-light-active-border);\n  }\n  &.item-stable {\n    @include item-active-style($item-stable-active-bg, $item-stable-active-border);\n  }\n  &.item-positive {\n    @include item-active-style($item-positive-active-bg, $item-positive-active-border);\n  }\n  &.item-calm {\n    @include item-active-style($item-calm-active-bg, $item-calm-active-border);\n  }\n  &.item-assertive {\n    @include item-active-style($item-assertive-active-bg, $item-assertive-active-border);\n  }\n  &.item-balanced {\n    @include item-active-style($item-balanced-active-bg, $item-balanced-active-border);\n  }\n  &.item-energized {\n    @include item-active-style($item-energized-active-bg, $item-energized-active-border);\n  }\n  &.item-royal {\n    @include item-active-style($item-royal-active-bg, $item-royal-active-border);\n  }\n  &.item-dark {\n    @include item-active-style($item-dark-active-bg, $item-dark-active-border);\n  }\n}\n\n// Handle text overflow\n.item,\n.item h1,\n.item h2,\n.item h3,\n.item h4,\n.item h5,\n.item h6,\n.item p,\n.item-content,\n.item-content h1,\n.item-content h2,\n.item-content h3,\n.item-content h4,\n.item-content h5,\n.item-content h6,\n.item-content p {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n// Linked list items\na.item {\n  color: inherit;\n  text-decoration: none;\n\n  &:hover,\n  &:focus {\n    text-decoration: none;\n  }\n}\n\n\n/**\n * Complex Items\n * --------------------------------------------------\n * Adding .item-complex allows the .item to be slidable and\n * have options underneath the button, but also requires an\n * additional .item-content element inside .item.\n * Basically .item-complex removes any default settings which\n * .item added, so that .item-content looks them as just .item.\n */\n\n.item-complex,\na.item.item-complex,\nbutton.item.item-complex {\n  padding: 0;\n}\n.item-complex .item-content,\n.item-radio .item-content {\n  position: relative;\n  z-index: $z-index-item;\n  padding: $item-padding (ceil( ($item-padding * 3) + ($item-padding / 3) ) - 5) $item-padding $item-padding;\n  border: none;\n  background-color: $item-default-bg;\n}\n\na.item-content {\n  display: block;\n  color: inherit;\n  text-decoration: none;\n}\n\n.item-text-wrap .item,\n.item-text-wrap .item-content,\n.item-text-wrap,\n.item-text-wrap h1,\n.item-text-wrap h2,\n.item-text-wrap h3,\n.item-text-wrap h4,\n.item-text-wrap h5,\n.item-text-wrap h6,\n.item-text-wrap p,\n.item-complex.item-text-wrap .item-content,\n.item-body h1,\n.item-body h2,\n.item-body h3,\n.item-body h4,\n.item-body h5,\n.item-body h6,\n.item-body p {\n  overflow: visible;\n  white-space: normal;\n}\n.item-complex.item-text-wrap,\n.item-complex.item-text-wrap h1,\n.item-complex.item-text-wrap h2,\n.item-complex.item-text-wrap h3,\n.item-complex.item-text-wrap h4,\n.item-complex.item-text-wrap h5,\n.item-complex.item-text-wrap h6,\n.item-complex.item-text-wrap p {\n  overflow: visible;\n  white-space: normal;\n}\n\n// Link and Button Active States\n\n.item-complex{\n  // Stylized items\n  &.item-light > .item-content{\n    @include item-style($item-light-bg, $item-light-border, $item-light-text);\n    &.active, &:active {\n      @include item-active-style($item-light-active-bg, $item-light-active-border);\n    }\n  }\n  &.item-stable > .item-content{\n    @include item-style($item-stable-bg, $item-stable-border, $item-stable-text);\n    &.active, &:active {\n      @include item-active-style($item-stable-active-bg, $item-stable-active-border);\n    }\n  }\n  &.item-positive > .item-content{\n    @include item-style($item-positive-bg, $item-positive-border, $item-positive-text);\n    &.active, &:active {\n      @include item-active-style($item-positive-active-bg, $item-positive-active-border);\n    }\n  }\n  &.item-calm > .item-content{\n    @include item-style($item-calm-bg, $item-calm-border, $item-calm-text);\n    &.active, &:active {\n      @include item-active-style($item-calm-active-bg, $item-calm-active-border);\n    }\n  }\n  &.item-assertive > .item-content{\n    @include item-style($item-assertive-bg, $item-assertive-border, $item-assertive-text);\n    &.active, &:active {\n      @include item-active-style($item-assertive-active-bg, $item-assertive-active-border);\n    }\n  }\n  &.item-balanced > .item-content{\n    @include item-style($item-balanced-bg, $item-balanced-border, $item-balanced-text);\n    &.active, &:active {\n      @include item-active-style($item-balanced-active-bg, $item-balanced-active-border);\n    }\n  }\n  &.item-energized > .item-content{\n    @include item-style($item-energized-bg, $item-energized-border, $item-energized-text);\n    &.active, &:active {\n      @include item-active-style($item-energized-active-bg, $item-energized-active-border);\n    }\n  }\n  &.item-royal > .item-content{\n    @include item-style($item-royal-bg, $item-royal-border, $item-royal-text);\n    &.active, &:active {\n      @include item-active-style($item-royal-active-bg, $item-royal-active-border);\n    }\n  }\n  &.item-dark > .item-content{\n    @include item-style($item-dark-bg, $item-dark-border, $item-dark-text);\n    &.active, &:active {\n      @include item-active-style($item-dark-active-bg, $item-dark-active-border);\n    }\n  }\n}\n\n\n/**\n * Item Icons\n * --------------------------------------------------\n */\n\n.item-icon-left .icon,\n.item-icon-right .icon {\n  @include display-flex();\n  @include align-items(center);\n  position: absolute;\n  top: 0;\n  height: 100%;\n  font-size: $item-icon-font-size;\n\n  &:before {\n    display: block;\n    width: $item-icon-font-size;\n    text-align: center;\n  }\n}\n\n.item .fill-icon {\n  min-width: $item-icon-fill-font-size + 2;\n  min-height: $item-icon-fill-font-size + 2;\n  font-size: $item-icon-fill-font-size;\n}\n\n.item-icon-left {\n  padding-left: ceil( ($item-padding * 3) + ($item-padding / 3) );\n\n  .icon {\n    left: ceil( ($item-padding / 3) * 2);\n  }\n}\n.item-complex.item-icon-left {\n  padding-left: 0;\n\n  .item-content {\n    padding-left: ceil( ($item-padding * 3) + ($item-padding / 3) );\n  }\n}\n\n.item-icon-right {\n  padding-right: ceil( ($item-padding * 3) + ($item-padding / 3) );\n\n  .icon {\n    right: ceil( ($item-padding / 3) * 2);\n  }\n}\n.item-complex.item-icon-right {\n  padding-right: 0;\n\n  .item-content {\n    padding-right: ceil( ($item-padding * 3) + ($item-padding / 3) );\n  }\n}\n\n.item-icon-left.item-icon-right .icon:first-child {\n  right: auto;\n}\n.item-icon-left.item-icon-right .icon:last-child,\n.item-icon-left .item-delete .icon {\n  left: auto;\n}\n\n.item-icon-left .icon-accessory,\n.item-icon-right .icon-accessory {\n  color: $item-icon-accessory-color;\n  font-size: $item-icon-accessory-font-size;\n}\n.item-icon-left .icon-accessory {\n  left: floor($item-padding / 5);\n}\n.item-icon-right .icon-accessory {\n  right: floor($item-padding / 5);\n}\n\n\n/**\n * Item Button\n * --------------------------------------------------\n * An item button is a child button inside an .item (not the entire .item)\n */\n\n.item-button-left {\n  padding-left: ceil($item-padding * 4.5);\n}\n\n.item-button-left > .button,\n.item-button-left .item-content > .button {\n  @include display-flex();\n  @include align-items(center);\n  position: absolute;\n  top: ceil($item-padding / 2);\n  left: ceil( ($item-padding / 3) * 2);\n  min-width: $item-icon-font-size + ($button-border-width * 2);\n  min-height: $item-icon-font-size + ($button-border-width * 2);\n  font-size: $item-button-font-size;\n  line-height: $item-button-line-height;\n\n  .icon:before {\n    position: relative;\n    left: auto;\n    width: auto;\n    line-height: $item-icon-font-size - 1;\n  }\n\n  > .button {\n    margin: 0px 2px;\n    min-height: $item-icon-font-size + ($button-border-width * 2);\n    font-size: $item-button-font-size;\n    line-height: $item-button-line-height;\n  }\n}\n\n.item-button-right,\na.item.item-button-right,\nbutton.item.item-button-right {\n  padding-right: $item-padding * 5;\n}\n\n.item-button-right > .button,\n.item-button-right .item-content > .button,\n.item-button-right > .buttons,\n.item-button-right .item-content > .buttons {\n  @include display-flex();\n  @include align-items(center);\n  position: absolute;\n  top: ceil($item-padding / 2);\n  right: $item-padding;\n  min-width: $item-icon-font-size + ($button-border-width * 2);\n  min-height: $item-icon-font-size + ($button-border-width * 2);\n  font-size: $item-button-font-size;\n  line-height: $item-button-line-height;\n\n  .icon:before {\n    position: relative;\n    left: auto;\n    width: auto;\n    line-height: $item-icon-font-size - 1;\n  }\n\n  > .button {\n    margin: 0px 2px;\n    min-width: $item-icon-font-size + ($button-border-width * 2);\n    min-height: $item-icon-font-size + ($button-border-width * 2);\n    font-size: $item-button-font-size;\n    line-height: $item-button-line-height;\n  }\n}\n\n.item-button-left.item-button-right{\n   .button{\n     &:first-child {\n      right: auto;\n    }\n     &:last-child {\n      left: auto;\n    }\n   }\n}\n\n// Item Avatar\n// -------------------------------\n\n.item-avatar,\n.item-avatar .item-content,\n.item-avatar-left,\n.item-avatar-left .item-content {\n  padding-left: $item-avatar-width + ($item-padding * 2);\n  min-height: $item-avatar-width + ($item-padding * 2);\n\n  > img:first-child,\n  .item-image {\n    position: absolute;\n    top: $item-padding;\n    left: $item-padding;\n    max-width: $item-avatar-width;\n    max-height: $item-avatar-height;\n    width: 100%;\n    height: 100%;\n    border-radius: $item-avatar-border-radius;\n  }\n}\n\n.item-avatar-right,\n.item-avatar-right .item-content {\n  padding-right: $item-avatar-width + ($item-padding * 2);\n  min-height: $item-avatar-width + ($item-padding * 2);\n\n  > img:first-child,\n  .item-image {\n    position: absolute;\n    top: $item-padding;\n    right: $item-padding;\n    max-width: $item-avatar-width;\n    max-height: $item-avatar-height;\n    width: 100%;\n    height: 100%;\n    border-radius: $item-avatar-border-radius;\n  }\n}\n\n\n// Item Thumbnails\n// -------------------------------\n\n.item-thumbnail-left,\n.item-thumbnail-left .item-content {\n  padding-top: $item-padding / 2;\n  padding-left: $item-thumbnail-width + $item-thumbnail-margin + $item-padding;\n  min-height: $item-thumbnail-height + ($item-thumbnail-margin * 2);\n\n  > img:first-child,\n  .item-image {\n    position: absolute;\n    top: $item-thumbnail-margin;\n    left: $item-thumbnail-margin;\n    max-width: $item-thumbnail-width;\n    max-height: $item-thumbnail-height;\n    width: 100%;\n    height: 100%;\n  }\n}\n.item-avatar.item-complex,\n.item-avatar-left.item-complex,\n.item-thumbnail-left.item-complex {\n  padding-top: 0;\n  padding-left: 0;\n}\n\n.item-thumbnail-right,\n.item-thumbnail-right .item-content {\n  padding-top: $item-padding / 2;\n  padding-right: $item-thumbnail-width + $item-thumbnail-margin + $item-padding;\n  min-height: $item-thumbnail-height + ($item-thumbnail-margin * 2);\n\n  > img:first-child,\n  .item-image {\n    position: absolute;\n    top: $item-thumbnail-margin;\n    right: $item-thumbnail-margin;\n    max-width: $item-thumbnail-width;\n    max-height: $item-thumbnail-height;\n    width: 100%;\n    height: 100%;\n  }\n}\n.item-avatar-right.item-complex,\n.item-thumbnail-right.item-complex {\n  padding-top: 0;\n  padding-right: 0;\n}\n\n\n// Item Image\n// -------------------------------\n\n.item-image {\n  padding: 0;\n  text-align: center;\n\n  img:first-child, .list-img {\n    width: 100%;\n    vertical-align: middle;\n  }\n}\n\n\n// Item Body\n// -------------------------------\n\n.item-body {\n  overflow: auto;\n  padding: $item-padding;\n  text-overflow: inherit;\n  white-space: normal;\n\n  h1, h2, h3, h4, h5, h6, p {\n    margin-top: $item-padding;\n    margin-bottom: $item-padding;\n  }\n}\n\n\n// Item Divider\n// -------------------------------\n\n.item-divider {\n  padding-top: ceil($item-padding / 2);\n  padding-bottom: ceil($item-padding / 2);\n  min-height: 30px;\n  background-color: $item-divider-bg;\n  color: $item-divider-color;\n  font-weight: 500;\n}\n\n.platform-ios .item-divider-platform,\n.item-divider-ios {\n  padding-top: 26px;\n  text-transform: uppercase;\n  font-weight: 300;\n  font-size: 13px;\n  background-color: #efeff4;\n  color: #555;\n}\n\n.platform-android .item-divider-platform,\n.item-divider-android {\n  font-weight: 300;\n  font-size: 13px;\n}\n\n\n// Item Note\n// -------------------------------\n\n.item-note {\n  float: right;\n  color: #aaa;\n  font-size: 14px;\n}\n\n\n// Item Editing\n// -------------------------------\n\n.item-left-editable .item-content,\n.item-right-editable .item-content {\n  // setup standard transition settings\n  @include transition-duration( $item-edit-transition-duration );\n  @include transition-timing-function( $item-edit-transition-function );\n  -webkit-transition-property: -webkit-transform;\n     -moz-transition-property: -moz-transform;\n          transition-property: transform;\n}\n\n.list-left-editing .item-left-editable .item-content,\n.item-left-editing.item-left-editable .item-content {\n  // actively editing the left side of the item\n  @include translate3d($item-left-edit-open-width, 0, 0);\n}\n\n.item-remove-animate {\n  &.ng-leave {\n    @include transition-duration( $item-remove-transition-duration );\n  }\n  &.ng-leave .item-content,\n  &.ng-leave:last-of-type {\n    @include transition-duration( $item-remove-transition-duration );\n    @include transition-timing-function( $item-remove-transition-function );\n    @include transition-property( all );\n  }\n\n  &.ng-leave.ng-leave-active .item-content {\n    opacity:0;\n    -webkit-transform: translate3d(-100%, 0, 0) !important;\n    transform: translate3d(-100%, 0, 0) !important;\n  }\n  &.ng-leave.ng-leave-active:last-of-type {\n    opacity: 0;\n  }\n\n  &.ng-leave.ng-leave-active ~ ion-item:not(.ng-leave) {\n    -webkit-transform: translate3d(0, unquote('-webkit-calc(-100% + 1px)'), 0);\n    transform: translate3d(0, calc(-100% + 1px), 0);\n    @include transition-duration( $item-remove-transition-duration );\n    @include transition-timing-function( $item-remove-descendents-transition-function );\n    @include transition-property( all );\n  }\n}\n\n\n\n// Item Left Edit Button\n// -------------------------------\n\n.item-left-edit {\n  @include transition(all $item-edit-transition-function $item-edit-transition-duration / 2);\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: $z-index-item-edit;\n  width: $item-left-edit-open-width;\n  height: 100%;\n  line-height: 100%;\n\n  .button {\n    height: 100%;\n\n    &.icon {\n      @include display-flex();\n      @include align-items(center);\n      position: absolute;\n      top: 0;\n      height: 100%;\n    }\n  }\n\n  display: none;\n  opacity: 0;\n  @include translate3d( ($item-left-edit-left - $item-left-edit-open-width) / 2, 0, 0);\n  &.visible {\n    display: block;\n    &.active {\n      opacity: 1;\n      @include translate3d($item-left-edit-left, 0, 0);\n    }\n  }\n}\n.list-left-editing .item-left-edit {\n  @include transition-delay($item-edit-transition-duration / 2);\n}\n\n// Item Delete (Left side edit button)\n// -------------------------------\n\n.item-delete .button.icon {\n  color: $item-delete-icon-color;\n  font-size: $item-delete-icon-size;\n\n  &:hover {\n    opacity: .7;\n  }\n}\n\n\n// Item Right Edit Button\n// -------------------------------\n\n.item-right-edit {\n  @include transition(all $item-edit-transition-function $item-edit-transition-duration);\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: $z-index-item-reorder;\n  width: $item-right-edit-open-width *  1.5;\n  height: 100%;\n  background: inherit;\n  padding-left: 20px;\n\n  .button {\n    min-width: $item-right-edit-open-width;\n    height: 100%;\n\n    &.icon {\n      @include display-flex();\n      @include align-items(center);\n      position: absolute;\n      top: 0;\n      height: 100%;\n      font-size: $item-reorder-icon-size;\n    }\n  }\n\n  display: block;\n  opacity: 0;\n  @include translate3d($item-right-edit-open-width *  1.5, 0, 0);\n  &.visible {\n    display: block;\n    &.active {\n      opacity: 1;\n      @include translate3d(0, 0, 0);\n    }\n  }\n}\n\n\n// Item Reordering (Right side edit button)\n// -------------------------------\n\n.item-reorder .button.icon {\n  color: $item-reorder-icon-color;\n  font-size: $item-reorder-icon-size;\n}\n\n.item-reordering {\n  // item is actively being reordered\n  position: absolute;\n  left: 0;\n  top: 0;\n  z-index: $z-index-item-reordering;\n  width: 100%;\n  box-shadow: 0px 0px 10px 0px #aaa;\n\n  .item-reorder {\n    z-index: $z-index-item-reordering;\n  }\n}\n\n.item-placeholder {\n  // placeholder for the item that's being reordered\n  opacity: 0.7;\n}\n\n\n/**\n * The hidden right-side buttons that can be exposed under a list item\n * with dragging.\n */\n.item-options {\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: $z-index-item-options;\n  height: 100%;\n\n  .button {\n    height: 100%;\n    border: none;\n    border-radius: 0;\n    @include display-inline-flex();\n    @include align-items(center);\n\n    &:before{\n      margin: 0 auto;\n    }\n  }\n\n  ion-option-button:last-child {\n    padding-right: calc(constant(safe-area-inset-right) + #{$button-padding});\n    padding-right: calc(env(safe-area-inset-right) + #{$button-padding});\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_list.scss",
    "content": "\n/**\n * Lists\n * --------------------------------------------------\n */\n\n.list {\n  position: relative;\n  padding-top: $item-border-width;\n  padding-bottom: $item-border-width;\n  padding-left: 0; // reset padding because ul and ol\n  margin-bottom: 20px;\n}\n.list:last-child {\n  margin-bottom: 0px;\n  &.card{\n    margin-bottom:40px;\n  }\n}\n\n\n/**\n * List Header\n * --------------------------------------------------\n */\n\n.list-header {\n  margin-top: $list-header-margin-top;\n  padding: $list-header-padding;\n  background-color: $list-header-bg;\n  color: $list-header-color;\n  font-weight: bold;\n}\n\n// when its a card make sure it doesn't duplicate top and bottom borders\n.card.list .list-item {\n  padding-right: 1px;\n  padding-left: 1px;\n}\n\n\n/**\n * Cards and Inset Lists\n * --------------------------------------------------\n * A card and list-inset are close to the same thing, except a card as a box shadow.\n */\n\n.card,\n.list-inset {\n  overflow: hidden;\n  margin: ($content-padding * 2) $content-padding;\n  border-radius: $card-border-radius;\n  background-color: $card-body-bg;\n}\n\n.card {\n  padding-top: $item-border-width;\n  padding-bottom: $item-border-width;\n  box-shadow: $card-box-shadow;\n\n  .item {\n    border-left: 0;\n    border-right: 0;\n  }\n  .item:first-child {\n    border-top: 0;\n  }\n  .item:last-child {\n    border-bottom: 0;\n  }\n}\n\n.padding {\n  .card, .list-inset {\n    margin-left: 0;\n    margin-right: 0;\n  }\n}\n\n.card .item,\n.list-inset .item,\n.padding > .list .item\n{\n  &:first-child {\n    border-top-left-radius: $card-border-radius;\n    border-top-right-radius: $card-border-radius;\n\n    .item-content {\n      border-top-left-radius: $card-border-radius;\n      border-top-right-radius: $card-border-radius;\n    }\n  }\n  &:last-child {\n    border-bottom-right-radius: $card-border-radius;\n    border-bottom-left-radius: $card-border-radius;\n\n    .item-content {\n      border-bottom-right-radius: $card-border-radius;\n      border-bottom-left-radius: $card-border-radius;\n    }\n  }\n}\n\n.card .item:last-child,\n.list-inset .item:last-child {\n  margin-bottom: $item-border-width * -1;\n}\n\n.card .item,\n.list-inset .item,\n.padding > .list .item,\n.padding-horizontal > .list .item {\n  margin-right: 0;\n  margin-left: 0;\n\n  &.item-input input {\n    padding-right: 44px;\n  }\n}\n.padding-left > .list .item {\n  margin-left: 0;\n}\n.padding-right > .list .item {\n  margin-right: 0;\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_loading.scss",
    "content": "\n/**\n * Loading\n * --------------------------------------------------\n */\n\n.loading-container {\n  position: absolute;\n  left: 0;\n  top: 0;\n  right: 0;\n  bottom: 0;\n\n  z-index: $z-index-loading;\n\n  @include display-flex();\n  @include justify-content(center);\n  @include align-items(center);\n\n  @include transition(0.2s opacity linear);\n  visibility: hidden;\n  opacity: 0;\n\n  &:not(.visible) .icon,\n  &:not(.visible) .spinner{\n    display: none;\n  }\n  &.visible {\n    visibility: visible;\n  }\n  &.active {\n    opacity: 1;\n  }\n\n  .loading {\n    padding: $loading-padding;\n\n    border-radius: $loading-border-radius;\n    background-color: $loading-bg-color;\n\n    color: $loading-text-color;\n\n    text-align: center;\n    text-overflow: ellipsis;\n    font-size: $loading-font-size;\n\n    h1, h2, h3, h4, h5, h6 {\n      color: $loading-text-color;\n    }\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_menu.scss",
    "content": "\n/**\n * Menus\n * --------------------------------------------------\n * Side panel structure\n */\n\n.menu {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  z-index: $z-index-menu;\n  overflow: hidden;\n\n  min-height: 100%;\n  max-height: 100%;\n  width: $menu-width;\n\n  background-color: $menu-bg;\n\n  .scroll-content {\n    z-index: $z-index-menu-scroll-content;\n  }\n\n  .bar-header {\n    z-index: $z-index-menu-bar-header;\n  }\n}\n\n.menu-content {\n  @include transform(none);\n  box-shadow: $menu-side-shadow;\n}\n\n.menu-open .menu-content .pane,\n.menu-open .menu-content .scroll-content {\n  pointer-events: none;\n}\n.menu-open .menu-content .scroll-content .scroll {\n  pointer-events: none;\n}\n.menu-open .menu-content .scroll-content:not(.overflow-scroll) {\n  overflow: hidden;\n}\n\n.grade-b .menu-content,\n.grade-c .menu-content {\n  @include box-sizing(content-box);\n  right: -1px;\n  left: -1px;\n  border-right: 1px solid #ccc;\n  border-left: 1px solid #ccc;\n  box-shadow: none;\n}\n\n.menu-left {\n  left: 0;\n}\n\n.menu-right {\n  right: 0;\n}\n\n.aside-open.aside-resizing .menu-right {\n  display: none;\n}\n\n.menu-animated {\n  @include transition-transform($menu-animation-speed ease);\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_mixins.scss",
    "content": "\n// Button Mixins\n// --------------------------------------------------\n\n@mixin button-style($bg-color, $border-color, $active-bg-color, $active-border-color, $color) {\n  border-color: $border-color;\n  background-color: $bg-color;\n  color: $color;\n\n  // Give desktop users something to play with\n  &:hover {\n    color: $color;\n    text-decoration: none;\n  }\n  &.active,\n  &.activated {\n    @if $active-border-color != \"\"{\n      border-color: $active-border-color;\n    }\n    background-color: $active-bg-color;\n    //box-shadow: inset 0 1px 4px rgba(0,0,0,0.1);\n  }\n}\n\n@mixin button-clear($color, $font-size:\"\") {\n  &.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: $color;\n\n    @if $font-size != \"\" {\n      font-size: $font-size;\n    }\n  }\n  &.button-icon {\n    border-color: transparent;\n    background: none;\n  }\n}\n\n@mixin button-outline($color, $text-color:\"\") {\n  &.button-outline {\n    border-color: $color;\n    background: transparent;\n    @if $text-color == \"\" {\n      $text-color: $color;\n    }\n    color: $text-color;\n    &.active,\n    &.activated {\n      background-color: $color;\n      box-shadow: none;\n      color: #fff;\n    }\n  }\n}\n\n\n// Bar Mixins\n// --------------------------------------------------\n\n@mixin bar-style($bg-color, $border-color, $color) {\n  border-color: $border-color;\n  background-color: $bg-color;\n  background-image: linear-gradient(0deg, $border-color, $border-color 50%, transparent 50%);\n  color: $color;\n\n  .title {\n    color: $color;\n  }\n}\n\n\n// Tab Mixins\n// --------------------------------------------------\n\n@mixin tab-style($bg-color, $border-color, $color) {\n  border-color: $border-color;\n  background-color: $bg-color;\n  background-image: linear-gradient(0deg, $border-color, $border-color 50%, transparent 50%);\n  color: $color;\n}\n\n@mixin tab-badge-style($bg-color, $color) {\n  .tab-item .badge {\n    background-color: $bg-color;\n    color: $color;\n  }\n}\n\n\n// Item Mixins\n// --------------------------------------------------\n\n@mixin item-style($bg-color, $border-color, $color) {\n  border-color: $border-color;\n  background-color: $bg-color;\n  color: $color;\n}\n\n@mixin item-active-style($active-bg-color, $active-border-color) {\n  border-color: $active-border-color;\n  background-color: $active-bg-color;\n  &.item-complex > .item-content {\n    border-color: $active-border-color;\n    background-color: $active-bg-color;\n  }\n}\n\n\n// Badge Mixins\n// --------------------------------------------------\n\n@mixin badge-style($bg-color, $color) {\n  background-color: $bg-color;\n  color: $color;\n}\n\n\n// Range Mixins\n// --------------------------------------------------\n\n@mixin range-style($track-bg-color) {\n  &::-webkit-slider-thumb:before {\n    background: $track-bg-color;\n  }\n  &::-ms-fill-lower{\n    background: $track-bg-color;\n  }\n}\n\n\n// Checkbox Mixins\n// --------------------------------------------------\n\n@mixin checkbox-style($off-border-color, $on-bg-color, $on-border-color) {\n  & input:before,\n  & .checkbox-icon:before {\n    border-color: $off-border-color;\n  }\n\n  // what the background looks like when its checked\n  & input:checked:before,\n  & input:checked + .checkbox-icon:before {\n    background: $on-bg-color;\n    border-color: $on-border-color;\n  }\n}\n\n\n// Toggle Mixins\n// --------------------------------------------------\n\n@mixin toggle-style($on-border-color, $on-bg-color) {\n  // the track when the toggle is \"on\"\n  & input:checked + .track {\n    border-color: $on-border-color;\n    background-color: $on-bg-color;\n  }\n}\n@mixin toggle-small-style($on-bg-color) {\n  // the track when the toggle is \"on\"\n  & input:checked + .track {\n    background-color: rgba($on-bg-color, .5);\n  }\n  & input:checked + .track .handle {\n    background-color: $on-bg-color;\n  }\n}\n\n\n// Clearfix\n// --------------------------------------------------\n\n@mixin clearfix {\n  *zoom: 1;\n  &:before,\n  &:after {\n    display: table;\n    content: \"\";\n    line-height: 0;\n  }\n  &:after {\n    clear: both;\n  }\n}\n\n\n// Placeholder text\n// --------------------------------------------------\n\n@mixin placeholder($color: $input-color-placeholder, $text-indent: 0) {\n  &::-moz-placeholder { // Firefox 19+\n    color: $color;\n  }\n  &:-ms-input-placeholder {\n    color: $color;\n  }\n  &::-webkit-input-placeholder {\n    color: $color;\n    // Safari placeholder margin issue\n    text-indent: $text-indent;\n  }\n}\n\n\n// Text Mixins\n// --------------------------------------------------\n\n@mixin text-size-adjust($value: none) {\n  -webkit-text-size-adjust: $value;\n     -moz-text-size-adjust: $value;\n          text-size-adjust: $value;\n}\n@mixin tap-highlight-transparent() {\n  -webkit-tap-highlight-color: rgba(0,0,0,0);\n  -webkit-tap-highlight-color: transparent; // For some Androids\n}\n@mixin touch-callout($value: none) {\n  -webkit-touch-callout: $value;\n}\n\n\n// Font Mixins\n// --------------------------------------------------\n\n@mixin font-family-serif() {\n  font-family: $serif-font-family;\n}\n@mixin font-family-sans-serif() {\n  font-family: $sans-font-family;\n}\n@mixin font-family-monospace() {\n  font-family: $mono-font-family;\n}\n@mixin font-shorthand($size: $base-font-size, $weight: normal, $line-height: $base-line-height) {\n  font-weight: $weight;\n  font-size: $size;\n  line-height: $line-height;\n}\n@mixin font-serif($size: $base-font-size, $weight: normal, $line-height: $base-line-height) {\n  @include font-family-serif();\n  @include font-shorthand($size, $weight, $line-height);\n}\n@mixin font-sans-serif($size: $base-font-size, $weight: normal, $line-height: $base-line-height) {\n  @include font-family-sans-serif();\n  @include font-shorthand($size, $weight, $line-height);\n}\n@mixin font-monospace($size: $base-font-size, $weight: normal, $line-height: $base-line-height) {\n  @include font-family-monospace();\n  @include font-shorthand($size, $weight, $line-height);\n}\n@mixin font-smoothing($font-smoothing) {\n  -webkit-font-smoothing: $font-smoothing;\n          font-smoothing: $font-smoothing;\n}\n\n\n// Appearance\n// --------------------------------------------------\n\n@mixin appearance($val) {\n  -webkit-appearance: $val;\n     -moz-appearance: $val;\n          appearance: $val;\n}\n\n\n// Border Radius Mixins\n// --------------------------------------------------\n\n@mixin border-radius($radius) {\n  -webkit-border-radius: $radius;\n          border-radius: $radius;\n}\n\n// Single Corner Border Radius\n@mixin border-top-left-radius($radius) {\n  -webkit-border-top-left-radius: $radius;\n          border-top-left-radius: $radius;\n}\n@mixin border-top-right-radius($radius) {\n  -webkit-border-top-right-radius: $radius;\n          border-top-right-radius: $radius;\n}\n@mixin border-bottom-right-radius($radius) {\n  -webkit-border-bottom-right-radius: $radius;\n          border-bottom-right-radius: $radius;\n}\n@mixin border-bottom-left-radius($radius) {\n  -webkit-border-bottom-left-radius: $radius;\n          border-bottom-left-radius: $radius;\n}\n\n// Single Side Border Radius\n@mixin border-top-radius($radius) {\n  @include border-top-right-radius($radius);\n  @include border-top-left-radius($radius);\n}\n@mixin border-right-radius($radius) {\n  @include border-top-right-radius($radius);\n  @include border-bottom-right-radius($radius);\n}\n@mixin border-bottom-radius($radius) {\n  @include border-bottom-right-radius($radius);\n  @include border-bottom-left-radius($radius);\n}\n@mixin border-left-radius($radius) {\n  @include border-top-left-radius($radius);\n  @include border-bottom-left-radius($radius);\n}\n\n\n// Box shadows\n// --------------------------------------------------\n\n@mixin box-shadow($shadow...) {\n  -webkit-box-shadow: $shadow;\n          box-shadow: $shadow;\n}\n\n\n// Transition Mixins\n// --------------------------------------------------\n\n@mixin transition($transition...) {\n  -webkit-transition: $transition;\n          transition: $transition;\n}\n@mixin transition-delay($transition-delay) {\n  -webkit-transition-delay: $transition-delay;\n          transition-delay: $transition-delay;\n}\n@mixin transition-duration($transition-duration) {\n  -webkit-transition-duration: $transition-duration;\n          transition-duration: $transition-duration;\n}\n@mixin transition-timing-function($transition-timing) {\n   -webkit-transition-timing-function: $transition-timing;\n           transition-timing-function: $transition-timing;\n }\n @mixin transition-property($property) {\n  -webkit-transition-property: $property;\n          transition-property: $property;\n}\n@mixin transition-transform($properties...) {\n  // special case cuz of transform vendor prefixes\n  -webkit-transition: -webkit-transform $properties;\n          transition: transform $properties;\n}\n\n\n// Animation Mixins\n// --------------------------------------------------\n\n@mixin animation($animation) {\n -webkit-animation: $animation;\n         animation: $animation;\n}\n@mixin animation-duration($duration) {\n -webkit-animation-duration: $duration;\n         animation-duration: $duration;\n}\n@mixin animation-direction($direction) {\n -webkit-animation-direction: $direction;\n         animation-direction: $direction;\n}\n@mixin animation-timing-function($animation-timing) {\n -webkit-animation-timing-function: $animation-timing;\n         animation-timing-function: $animation-timing;\n}\n@mixin animation-fill-mode($fill-mode) {\n -webkit-animation-fill-mode: $fill-mode;\n         animation-fill-mode: $fill-mode;\n}\n@mixin animation-name($name...) {\n -webkit-animation-name: $name;\n         animation-name: $name;\n}\n@mixin animation-iteration-count($count) {\n -webkit-animation-iteration-count: $count;\n         animation-iteration-count: $count;\n}\n\n\n// Transformation Mixins\n// --------------------------------------------------\n\n@mixin rotate($degrees) {\n  @include transform( rotate($degrees) );\n}\n@mixin scale($ratio) {\n  @include transform( scale($ratio) );\n}\n@mixin translate($x, $y) {\n  @include transform( translate($x, $y) );\n}\n@mixin skew($x, $y) {\n  @include transform( skew($x, $y) );\n  -webkit-backface-visibility: hidden;\n}\n@mixin translate3d($x, $y, $z) {\n  @include transform( translate3d($x, $y, $z) );\n}\n@mixin translateZ($z) {\n  @include transform( translateZ($z) );\n}\n@mixin transform($val) {\n  -webkit-transform: $val;\n          transform: $val;\n}\n\n@mixin transform-origin($left, $top) {\n  -webkit-transform-origin: $left $top;\n          transform-origin: $left $top;\n}\n\n\n// Backface visibility\n// --------------------------------------------------\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden\n\n@mixin backface-visibility($visibility){\n  -webkit-backface-visibility: $visibility;\n          backface-visibility: $visibility;\n}\n\n\n// Background clipping\n// --------------------------------------------------\n\n@mixin background-clip($clip) {\n  -webkit-background-clip: $clip;\n          background-clip: $clip;\n}\n\n\n// Background sizing\n// --------------------------------------------------\n\n@mixin background-size($size) {\n  -webkit-background-size: $size;\n          background-size: $size;\n}\n\n\n// Box sizing\n// --------------------------------------------------\n\n@mixin box-sizing($boxmodel) {\n  -webkit-box-sizing: $boxmodel;\n     -moz-box-sizing: $boxmodel;\n          box-sizing: $boxmodel;\n}\n\n\n// User select\n// --------------------------------------------------\n\n@mixin user-select($select) {\n  -webkit-user-select: $select;\n     -moz-user-select: $select;\n      -ms-user-select: $select;\n          user-select: $select;\n}\n\n\n// Content Columns\n// --------------------------------------------------\n\n@mixin content-columns($columnCount, $columnGap: $grid-gutter-width) {\n  -webkit-column-count: $columnCount;\n     -moz-column-count: $columnCount;\n          column-count: $columnCount;\n  -webkit-column-gap: $columnGap;\n     -moz-column-gap: $columnGap;\n          column-gap: $columnGap;\n}\n\n\n// Flexbox Mixins\n// --------------------------------------------------\n// http://philipwalton.github.io/solved-by-flexbox/\n// https://github.com/philipwalton/solved-by-flexbox\n\n@mixin display-flex {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n}\n\n@mixin display-inline-flex {\n  display: -webkit-inline-box;\n  display: -webkit-inline-flex;\n  display: -moz-inline-flex;\n  display: -ms-inline-flexbox;\n  display: inline-flex;\n}\n\n@mixin flex-direction($value: row) {\n  @if $value == row-reverse {\n    -webkit-box-direction: reverse;\n    -webkit-box-orient: horizontal;\n  } @else if $value == column {\n    -webkit-box-direction: normal;\n    -webkit-box-orient: vertical;\n  } @else if $value == column-reverse {\n    -webkit-box-direction: reverse;\n    -webkit-box-orient: vertical;\n  } @else {\n    -webkit-box-direction: normal;\n    -webkit-box-orient: horizontal;\n  }\n  -webkit-flex-direction: $value;\n  -moz-flex-direction: $value;\n  -ms-flex-direction: $value;\n  flex-direction: $value;\n}\n\n@mixin flex-wrap($value: nowrap) {\n  // No Webkit Box fallback.\n  -webkit-flex-wrap: $value;\n  -moz-flex-wrap: $value;\n  @if $value == nowrap {\n      -ms-flex-wrap: none;\n  } @else {\n      -ms-flex-wrap: $value;\n  }\n  flex-wrap: $value;\n}\n\n@mixin flex($fg: 1, $fs: null, $fb: null) {\n  -webkit-box-flex: $fg;\n  -webkit-flex: $fg $fs $fb;\n  -moz-box-flex: $fg;\n  -moz-flex: $fg $fs $fb;\n  -ms-flex: $fg $fs $fb;\n  flex: $fg $fs $fb;\n}\n\n@mixin flex-flow($values: (row nowrap)) {\n  // No Webkit Box fallback.\n  -webkit-flex-flow: $values;\n  -moz-flex-flow: $values;\n  -ms-flex-flow: $values;\n  flex-flow: $values;\n}\n\n@mixin align-items($value: stretch) {\n  @if $value == flex-start {\n    -webkit-box-align: start;\n    -ms-flex-align: start;\n  } @else if $value == flex-end {\n    -webkit-box-align: end;\n    -ms-flex-align: end;\n  } @else {\n    -webkit-box-align: $value;\n    -ms-flex-align: $value;\n  }\n  -webkit-align-items: $value;\n  -moz-align-items: $value;\n  align-items: $value;\n}\n\n@mixin align-self($value: auto) {\n  -webkit-align-self: $value;\n  -moz-align-self: $value;\n  @if $value == flex-start {\n    -ms-flex-item-align: start;\n  } @else if $value == flex-end {\n    -ms-flex-item-align: end;\n  } @else {\n    -ms-flex-item-align: $value;\n  }\n  align-self: $value;\n}\n\n@mixin align-content($value: stretch) {\n  -webkit-align-content: $value;\n  -moz-align-content: $value;\n  @if $value == flex-start {\n    -ms-flex-line-pack: start;\n  } @else if $value == flex-end {\n    -ms-flex-line-pack: end;\n  } @else {\n    -ms-flex-line-pack: $value;\n  }\n  align-content: $value;\n}\n\n@mixin justify-content($value: stretch) {\n  @if $value == flex-start {\n    -webkit-box-pack: start;\n    -ms-flex-pack: start;\n  } @else if $value == flex-end {\n    -webkit-box-pack: end;\n    -ms-flex-pack: end;\n  } @else if $value == space-between {\n    -webkit-box-pack: justify;\n    -ms-flex-pack: justify;\n  } @else {\n    -webkit-box-pack: $value;\n    -ms-flex-pack: $value;\n  }\n  -webkit-justify-content: $value;\n  -moz-justify-content: $value;\n  justify-content: $value;\n}\n\n@mixin flex-order($n) {\n  -webkit-order: $n;\n  -ms-flex-order: $n;\n  order: $n;\n  -webkit-box-ordinal-group: $n;\n}\n\n@mixin responsive-grid-break($selector, $max-width) {\n  @media (max-width: $max-width) {\n    #{$selector} {\n      -webkit-box-direction: normal;\n      -moz-box-direction: normal;\n      -webkit-box-orient: vertical;\n      -moz-box-orient: vertical;\n      -webkit-flex-direction: column;\n      -ms-flex-direction: column;\n      flex-direction: column;\n\n      .col, .col-10, .col-20, .col-25, .col-33, .col-34, .col-50, .col-66, .col-67, .col-75, .col-80, .col-90 {\n        @include flex(1);\n        margin-bottom: ($grid-padding-width * 3) / 2;\n        margin-left: 0;\n        max-width: 100%;\n        width: 100%;\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_modal.scss",
    "content": "\n/**\n * Modals\n * --------------------------------------------------\n * Modals are independent windows that slide in from off-screen.\n */\n\n.modal-backdrop,\n.modal-backdrop-bg {\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: $z-index-modal;\n  width: 100%;\n  height: 100%;\n}\n\n.modal-backdrop-bg {\n  pointer-events: none;\n}\n\n.modal {\n  display: block;\n  position: absolute;\n  top: 0;\n  z-index: $z-index-modal;\n  overflow: hidden;\n  min-height: 100%;\n  width: 100%;\n  background-color: $modal-bg-color;\n}\n\n@media (min-width: $modal-inset-mode-break-point) {\n  // inset mode is when the modal doesn't fill the entire\n  // display but instead is centered within a large display\n  .modal {\n    top: $modal-inset-mode-top;\n    right: $modal-inset-mode-right;\n    bottom: $modal-inset-mode-bottom;\n    left: $modal-inset-mode-left;\n    min-height: $modal-inset-mode-min-height;\n    width: (100% - $modal-inset-mode-left - $modal-inset-mode-right);\n  }\n\n  .modal.ng-leave-active {\n    bottom: 0;\n  }\n\n  // remove ios header padding from inset header\n  .platform-ios.platform-cordova .modal-wrapper .modal {\n    .bar-header:not(.bar-subheader) {\n      height: $bar-height;\n      > * {\n        margin-top: 0;\n      }\n    }\n    .tabs-top > .tabs,\n    .tabs.tabs-top {\n      top: $bar-height;\n    }\n    .has-header,\n    .bar-subheader {\n      top: $bar-height;\n    }\n    .has-subheader {\n      top: $bar-height + $bar-subheader-height;\n    }\n    .has-header.has-tabs-top {\n      top: $bar-height + $tabs-height;\n    }\n    .has-header.has-subheader.has-tabs-top {\n      top: $bar-height + $bar-subheader-height + $tabs-height;\n    }\n  }\n\n  .modal-backdrop-bg {\n    @include transition(opacity 300ms ease-in-out);\n    background-color: $modal-backdrop-bg-active;\n    opacity: 0;\n  }\n\n  .active .modal-backdrop-bg {\n    opacity: 0.5;\n  }\n}\n\n// disable clicks on all but the modal\n.modal-open {\n  pointer-events: none;\n\n  .modal,\n  .modal-backdrop {\n    pointer-events: auto;\n  }\n  // prevent clicks on modal when loading overlay is active though\n  &.loading-active {\n    .modal,\n    .modal-backdrop {\n      pointer-events: none;\n    }\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_platform.scss",
    "content": "/**\n * Platform\n * --------------------------------------------------\n * Platform specific tweaks\n */\n\n.platform-ios.platform-cordova {\n  // iOS has a status bar which sits on top of the header.\n  // Bump down everything to make room for it. However, if\n  // if its in Cordova, and set to fullscreen, then disregard the bump.\n  &:not(.fullscreen) {\n    .bar-header:not(.bar-subheader) {\n      height: $bar-height + $ios-statusbar-height;\n      height: calc(constant(safe-area-inset-top) + #{$bar-height});\n      height: calc(env(safe-area-inset-top) + #{$bar-height});\n\n      &.item-input-inset .item-input-wrapper {\n        margin-top: 19px !important;\n      }\n\n      > * {\n        margin-top: $ios-statusbar-height;\n        margin-top: constant(safe-area-inset-top);\n        margin-top: env(safe-area-inset-top);\n      }\n    }\n    .bar-header {\n      padding-left: calc(\n        constant(safe-area-inset-left) + #{$bar-padding-portrait}\n      );\n      padding-left: calc(env(safe-area-inset-left) + #{$bar-padding-portrait});\n      padding-right: calc(\n        constant(safe-area-inset-right) + #{$bar-padding-portrait}\n      );\n      padding-right: calc(\n        env(safe-area-inset-right) + #{$bar-padding-portrait}\n      );\n\n      .buttons:last-child {\n        right: calc(constant(safe-area-inset-right) + #{$bar-padding-portrait});\n        right: calc(env(safe-area-inset-right) + #{$bar-padding-portrait});\n      }\n    }\n\n    .has-tabs, .bar-footer.has-tabs {\n      bottom : calc(constant(safe-area-inset-bottom) + #{$tabs-height});\n      bottom : calc(env(safe-area-inset-bottom) + #{$tabs-height});\n    }\n\n    .tabs-top > .tabs, .tabs.tabs-top {\n      top: $bar-height + $ios-statusbar-height;\n    }\n\n    .tabs {\n      padding-bottom: constant(safe-area-inset-bottom);\n      padding-bottom: env(safe-area-inset-bottom);\n      height: calc(constant(safe-area-inset-bottom) + 49px);\n      height: calc(env(safe-area-inset-bottom) + 49px);\n    }\n    .has-header, .bar-subheader {\n      top: $bar-height + $ios-statusbar-height;\n      top: calc(constant(safe-area-inset-top) + #{$bar-height});\n      top: calc(env(safe-area-inset-top) + #{$bar-height});\n    }\n    .has-subheader {\n      top: $bar-height + $bar-subheader-height + $ios-statusbar-height;\n\n      top: calc(constant(safe-area-inset-top) + #{$bar-height + $bar-subheader-height});\n      top: calc(env(safe-area-inset-top) + #{$bar-height + $bar-subheader-height});\n    }\n    .has-header.has-tabs-top {\n      top: $bar-height + $tabs-height + $ios-statusbar-height;\n\n      top: calc(#{$bar-height + $tabs-height} + constant(safe-area-inset-top));\n      top: calc(#{$bar-height + $tabs-height} + env(safe-area-inset-top));\n    }\n    .has-header.has-subheader.has-tabs-top {\n      top: $bar-height + $bar-subheader-height + $tabs-height + $ios-statusbar-height;\n\n      top: calc(#{$bar-height + $bar-subheader-height + $tabs-height} + constant(safe-area-inset-right);\n      top: calc(#{$bar-height + $bar-subheader-height + $tabs-height} + env(safe-area-inset-right);\n    }\n  }\n  .popover {\n    .bar-header:not(.bar-subheader) {\n      height: $bar-height;\n      &.item-input-inset .item-input-wrapper {\n        margin-top: -1px;\n      }\n      > * {\n        margin-top: 0;\n      }\n    }\n    .has-header, .bar-subheader {\n      top: $bar-height;\n    }\n    .has-subheader {\n      top: $bar-height + $bar-subheader-height;\n    }\n  }\n  &.status-bar-hide {\n    // Cordova doesn't adjust the body height correctly, this makes up for it\n    margin-bottom: 20px;\n  }\n}\n\n@media (orientation: landscape) {\n  .item {\n    padding: $item-padding calc(constant(safe-area-inset-right) + #{$item-padding});\n\n    .badge {\n      right: calc(constant(safe-area-inset-right) + 32px)\n    }\n  }\n  .item-icon-left {\n    padding-left: calc(constant(safe-area-inset-left) + 54px);\n\n    .icon {\n      left: calc(constant(safe-area-inset-left) + 11px);\n    }\n  }\n  .item-icon-right {\n    padding-right: calc(constant(safe-area-inset-right) + 54px);\n    .icon {\n      right: calc(constant(safe-area-inset-right) + 11px);\n    }\n  }\n\n  .item-complex, a.item.item-complex, button.item.item-complex {\n    padding: 0;\n\n    .item-content {\n      padding: $item-padding\n        calc(constant(safe-area-inset-right) + #{(ceil( ($item-padding * 3) + ($item-padding / 3)) - 5)})\n        $item-padding\n        calc(constant(safe-area-inset-left) + #{$item-padding});\n    }\n  }\n\n  .item-left-edit.visible.active {\n    @include translate3d(calc(constant(safe-area-inset-left) + 8px), 0, 0);\n  }\n  .list-left-editing .item-left-editable .item-content,\n  .item-left-editing.item-left-editable .item-content {\n    @include translate3d(calc(constant(safe-area-inset-left) + 50px), 0, 0);\n  }\n\n  .item-right-edit{\n    right: constant(safe-area-inset-right);\n    right: env(safe-area-inset-right)\n  }\n\n\n  .platform-ios.platform-browser.platform-ipad {\n    position: fixed; // required for iPad 7 Safari\n  }\n}\n\n.platform-c:not(.enable-transitions) * {\n  // disable transitions on grade-c devices (Android 2)\n  -webkit-transition: none !important;\n  transition: none !important;\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_popover.scss",
    "content": "\n/**\n * Popovers\n * --------------------------------------------------\n * Popovers are independent views which float over content\n */\n\n.popover-backdrop {\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: $z-index-popover;\n  width: 100%;\n  height: 100%;\n  background-color: $popover-backdrop-bg-inactive;\n\n  &.active {\n    background-color: $popover-backdrop-bg-active;\n  }\n}\n\n.popover {\n  position: absolute;\n  top: 25%;\n  left: 50%;\n  z-index: $z-index-popover;\n  display: block;\n  margin-top: 12px;\n  margin-left: -$popover-width / 2;\n  height: $popover-height;\n  width: $popover-width;\n  background-color: $popover-bg-color;\n  box-shadow: $popover-box-shadow;\n  opacity: 0;\n\n  .item:first-child {\n    border-top: 0;\n  }\n\n  .item:last-child {\n    border-bottom: 0;\n  }\n\n  &.popover-bottom {\n    margin-top: -12px;\n  }\n}\n\n\n// Set popover border-radius\n.popover,\n.popover .bar-header {\n  border-radius: $popover-border-radius;\n}\n.popover .scroll-content {\n  z-index: 1;\n  margin: 2px 0;\n}\n.popover .bar-header {\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.popover .has-header {\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n.popover-arrow {\n  display: none;\n}\n\n\n// iOS Popover\n.platform-ios {\n\n  .popover {\n    box-shadow: $popover-box-shadow-ios;\n    border-radius: $popover-border-radius-ios;\n  }\n  .popover .bar-header {\n    @include border-top-radius($popover-border-radius-ios);\n  }\n  .popover .scroll-content {\n    margin: 8px 0;\n    border-radius: $popover-border-radius-ios;\n  }\n  .popover .scroll-content.has-header {\n    margin-top: 0;\n  }\n  .popover-arrow {\n    position: absolute;\n    display: block;\n    top: -17px;\n    width: 30px;\n    height: 19px;\n    overflow: hidden;\n\n    &:after {\n      position: absolute;\n      top: 12px;\n      left: 5px;\n      width: 20px;\n      height: 20px;\n      background-color: $popover-bg-color;\n      border-radius: 3px;\n      content: '';\n      @include rotate(-45deg);\n    }\n  }\n  .popover-bottom .popover-arrow {\n    top: auto;\n    bottom: -10px;\n    &:after {\n      top: -6px;\n    }\n  }\n}\n\n\n// Android Popover\n.platform-android {\n\n  .popover {\n    margin-top: -32px;\n    background-color: $popover-bg-color-android;\n    box-shadow: $popover-box-shadow-android;\n\n    .item {\n      border-color: $popover-bg-color-android;\n      background-color: $popover-bg-color-android;\n      color: #4d4d4d;\n    }\n    &.popover-bottom {\n      margin-top: 32px;\n    }\n  }\n\n  .popover-backdrop,\n  .popover-backdrop.active {\n    background-color: transparent;\n  }\n}\n\n\n// disable clicks on all but the popover\n.popover-open {\n  pointer-events: none;\n\n  .popover,\n  .popover-backdrop {\n    pointer-events: auto;\n  }\n  // prevent clicks on popover when loading overlay is active though\n  &.loading-active {\n    .popover,\n    .popover-backdrop {\n      pointer-events: none;\n    }\n  }\n}\n\n\n// wider popover on larger viewports\n@media (min-width: $popover-large-break-point) {\n  .popover {\n    width: $popover-large-width;\n    margin-left: -$popover-large-width / 2;\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_popup.scss",
    "content": "\n/**\n * Popups\n * --------------------------------------------------\n */\n\n.popup-container {\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n  background: rgba(0,0,0,0);\n\n  @include display-flex();\n  @include justify-content(center);\n  @include align-items(center);\n\n  z-index: $z-index-popup;\n\n  // Start hidden\n  visibility: hidden;\n  &.popup-showing {\n    visibility: visible;\n  }\n\n  &.popup-hidden .popup {\n    @include animation-name(scaleOut);\n    @include animation-duration($popup-leave-animation-duration);\n    @include animation-timing-function(ease-in-out);\n    @include animation-fill-mode(both);\n  }\n\n  &.active .popup {\n    @include animation-name(superScaleIn);\n    @include animation-duration($popup-enter-animation-duration);\n    @include animation-timing-function(ease-in-out);\n    @include animation-fill-mode(both);\n  }\n\n  .popup {\n    width: $popup-width;\n    max-width: 100%;\n    max-height: 90%;\n\n    border-radius: $popup-border-radius;\n    background-color: $popup-background-color;\n\n    @include display-flex();\n    @include flex-direction(column);\n  }\n\n  input,\n  textarea {\n    width: 100%;\n  }\n}\n\n.popup-head {\n  padding: 15px 10px;\n  border-bottom: 1px solid #eee;\n  text-align: center;\n}\n.popup-title {\n  margin: 0;\n  padding: 0;\n  font-size: 15px;\n}\n.popup-sub-title {\n  margin: 5px 0 0 0;\n  padding: 0;\n  font-weight: normal;\n  font-size: 11px;\n}\n.popup-body {\n  padding: 10px;\n  overflow: auto;\n}\n\n.popup-buttons {\n  @include display-flex();\n  @include flex-direction(row);\n  padding: 10px;\n  min-height: $popup-button-min-height + 20;\n\n  .button {\n    @include flex(1);\n    display: block;\n    min-height: $popup-button-min-height;\n    border-radius: $popup-button-border-radius;\n    line-height: $popup-button-line-height;\n\n    margin-right: 5px;\n    &:last-child {\n      margin-right: 0px;\n    }\n  }\n}\n\n.popup-open {\n  pointer-events: none;\n\n  &.modal-open .modal {\n    pointer-events: none;\n  }\n\n  .popup-backdrop, .popup {\n    pointer-events: auto;\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_progress.scss",
    "content": "\n/**\n * Progress\n * --------------------------------------------------\n */\n\nprogress {\n  display: block;\n  margin: $progress-margin;\n  width: $progress-width;\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_radio.scss",
    "content": "\n/**\n * Radio Button Inputs\n * --------------------------------------------------\n */\n\n.item-radio {\n  padding: 0;\n\n  &:hover {\n    cursor: pointer;\n  }\n}\n\n.item-radio .item-content {\n  /* give some room to the right for the checkmark icon */\n  padding-right: $item-padding * 4;\n}\n\n.item-radio .radio-icon {\n  /* checkmark icon will be hidden by default */\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: $z-index-item-radio;\n  visibility: hidden;\n  padding: $item-padding - 2;\n  height: 100%;\n  font-size: 24px;\n}\n\n.item-radio input {\n  /* hide any radio button inputs elements (the ugly circles) */\n  position: absolute;\n  left: -9999px;\n\n  &:checked + .radio-content .item-content {\n    /* style the item content when its checked */\n    background: #f7f7f7;\n  }\n\n  &:checked + .radio-content .radio-icon {\n    /* show the checkmark icon when its checked */\n    visibility: visible;\n  }\n}\n\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_range.scss",
    "content": "\n/**\n * Range\n * --------------------------------------------------\n */\n\n .range input{\n  display: inline-block;\n  overflow: hidden;\n  margin-top: 5px;\n  margin-bottom: 5px;\n  padding-right: 2px;\n  padding-left: 1px;\n  width: auto;\n  height: $range-slider-height + 15;\n  outline: none;\n  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, $range-default-track-bg), color-stop(100%, $range-default-track-bg));\n  background: linear-gradient(to right, $range-default-track-bg 0%, $range-default-track-bg 100%);\n  background-position: center;\n  background-size: 99% $range-track-height;\n  background-repeat: no-repeat;\n  -webkit-appearance: none;\n\n  &::-moz-focus-outer {\n    /* hide the focus outline in Firefox */\n    border: 0;\n  }\n\n  &::-webkit-slider-thumb {\n    position: relative;\n    width: $range-slider-width;\n    height: $range-slider-height;\n    border-radius: $range-slider-border-radius;\n    background-color: $toggle-handle-off-bg-color;\n    box-shadow: $range-slider-box-shadow;\n    cursor: pointer;\n    -webkit-appearance: none;\n    border: 0;\n  }\n\n  &::-webkit-slider-thumb:before{\n    /* what creates the colorful line on the left side of the slider */\n    position: absolute;\n    top: ($range-slider-height / 2) - ($range-track-height / 2);\n    left: -2001px;\n    width: 2000px;\n    height: $range-track-height;\n    background: $dark;\n    content: ' ';\n  }\n\n  &::-webkit-slider-thumb:after {\n    /* create a larger (but hidden) hit area */\n    position: absolute;\n    top: -15px;\n    left: -15px;\n    padding: 30px;\n    content: ' ';\n    //background: red;\n    //opacity: .5;\n  }\n   &::-ms-fill-lower{\n     height: $range-track-height;\n     background:$dark;\n   }\n  /*\n   &::-ms-track{\n     background: transparent;\n     border-color: transparent;\n     border-width: 11px 0 16px;\n     color:transparent;\n     margin-top:20px;\n   }\n   &::-ms-thumb {\n     width: $range-slider-width;\n     height: $range-slider-height;\n     border-radius: $range-slider-border-radius;\n     background-color: $toggle-handle-off-bg-color;\n     border-color:$toggle-handle-off-bg-color;\n     box-shadow: $range-slider-box-shadow;\n     margin-left:1px;\n     margin-right:1px;\n     outline:none;\n   }\n   &::-ms-fill-upper {\n     height: $range-track-height;\n     background:$range-default-track-bg;\n   }\n   */\n}\n\n.range {\n  @include display-flex();\n  @include align-items(center);\n  padding: 2px 11px;\n\n  &.range-light {\n    input { @include range-style($range-light-track-bg); }\n  }\n  &.range-stable {\n    input { @include range-style($range-stable-track-bg); }\n  }\n  &.range-positive {\n    input { @include range-style($range-positive-track-bg); }\n  }\n  &.range-calm {\n    input { @include range-style($range-calm-track-bg); }\n  }\n  &.range-balanced {\n    input { @include range-style($range-balanced-track-bg); }\n  }\n  &.range-assertive {\n    input { @include range-style($range-assertive-track-bg); }\n  }\n  &.range-energized {\n    input { @include range-style($range-energized-track-bg); }\n  }\n  &.range-royal {\n    input { @include range-style($range-royal-track-bg); }\n  }\n  &.range-dark {\n    input { @include range-style($range-dark-track-bg); }\n  }\n}\n\n.range .icon {\n  @include flex(0);\n  display: block;\n  min-width: $range-icon-size;\n  text-align: center;\n  font-size: $range-icon-size;\n}\n\n.range input {\n  @include flex(1);\n  display: block;\n  margin-right: 10px;\n  margin-left: 10px;\n}\n\n.range-label {\n  @include flex(0, 0, auto);\n  display: block;\n  white-space: nowrap;\n}\n\n.range-label:first-child {\n  padding-left: 5px;\n}\n.range input + .range-label {\n  padding-right: 5px;\n  padding-left: 0;\n}\n\n// WP range height must be auto\n.platform-windowsphone{\n  .range input{\n    height:auto;\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_refresher.scss",
    "content": "\n// Scroll refresher (for pull to refresh)\n.scroll-refresher {\n  position: absolute;\n  top: -60px;\n  right: 0;\n  left: 0;\n  overflow: hidden;\n  margin: auto;\n  height: 60px;\n  .ionic-refresher-content {\n    position: absolute;\n    bottom: 15px;\n    left: 0;\n    width: 100%;\n    color: $scroll-refresh-icon-color;\n    text-align: center;\n\n    font-size: 30px;\n\n    .text-refreshing,\n    .text-pulling {\n      font-size: 16px;\n      line-height: 16px;\n    }\n    &.ionic-refresher-with-text {\n      bottom: 10px;\n    }\n  }\n\n  .icon-refreshing,\n  .icon-pulling {\n    width: 100%;\n    -webkit-backface-visibility: hidden;\n    backface-visibility: hidden;\n    -webkit-transform-style: preserve-3d;\n    transform-style: preserve-3d;\n  }\n  .icon-pulling {\n    @include animation-name(refresh-spin-back);\n    @include animation-duration(200ms);\n    @include animation-timing-function(linear);\n    @include animation-fill-mode(none);\n    -webkit-transform: translate3d(0,0,0) rotate(0deg);\n    transform: translate3d(0,0,0) rotate(0deg);\n  }\n  .icon-refreshing,\n  .text-refreshing {\n    display: none;\n  }\n  .icon-refreshing {\n    @include animation-duration(1.5s);\n  }\n\n  &.active {\n    .icon-pulling:not(.pulling-rotation-disabled) {\n      @include animation-name(refresh-spin);\n      -webkit-transform: translate3d(0,0,0) rotate(-180deg);\n      transform: translate3d(0,0,0) rotate(-180deg);\n    }\n    &.refreshing {\n      @include transition(-webkit-transform .2s);\n      @include transition(transform .2s);\n      -webkit-transform: scale(1,1);\n      transform: scale(1,1);\n\n      .icon-pulling,\n      .text-pulling {\n        display: none;\n      }\n      .icon-refreshing,\n      .text-refreshing {\n        display: block;\n      }\n      &.refreshing-tail {\n        -webkit-transform: scale(0,0);\n        transform: scale(0,0);\n      }\n    }\n  }\n}\n.overflow-scroll > .scroll{\n  &.overscroll{\n    position:fixed;\n    right: 0;\n    left: 0;\n  }\n  -webkit-overflow-scrolling:touch;\n  width:100%;\n}\n\n.overflow-scroll.padding > .scroll.overscroll{\n    padding: 10px;\n}\n@-webkit-keyframes refresh-spin {\n  0%   { -webkit-transform: translate3d(0,0,0) rotate(0); }\n  100% { -webkit-transform: translate3d(0,0,0) rotate(180deg); }\n}\n\n@keyframes refresh-spin {\n  0%   { transform: translate3d(0,0,0) rotate(0); }\n  100% { transform: translate3d(0,0,0) rotate(180deg); }\n}\n\n@-webkit-keyframes refresh-spin-back {\n  0%   { -webkit-transform: translate3d(0,0,0) rotate(180deg); }\n  100% { -webkit-transform: translate3d(0,0,0) rotate(0); }\n}\n\n@keyframes refresh-spin-back {\n  0%   { transform: translate3d(0,0,0) rotate(180deg); }\n  100% { transform: translate3d(0,0,0) rotate(0); }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_reset.scss",
    "content": "\n/**\n * Resets\n * --------------------------------------------------\n * Adapted from normalize.css and some reset.css. We don't care even one\n * bit about old IE, so we don't need any hacks for that in here.\n *\n * There are probably other things we could remove here, as well.\n *\n * normalize.css v2.1.2 | MIT License | git.io/normalize\n\n * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)\n * http://cssreset.com\n */\n\nhtml, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, img, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\nb, i, u, center,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td,\narticle, aside, canvas, details, embed, fieldset,\nfigure, figcaption, footer, header, hgroup,\nmenu, nav, output, ruby, section, summary,\ntime, mark, audio, video {\n  margin: 0;\n  padding: 0;\n  border: 0;\n  vertical-align: baseline;\n  font: inherit;\n  font-size: 100%;\n}\n\nol, ul {\n  list-style: none;\n}\nblockquote, q {\n  quotes: none;\n}\nblockquote:before, blockquote:after,\nq:before, q:after {\n  content: '';\n  content: none;\n}\n\n/**\n * Prevent modern browsers from displaying `audio` without controls.\n * Remove excess height in iOS 5 devices.\n */\n\naudio:not([controls]) {\n  display: none;\n  height: 0;\n}\n\n/**\n * Hide the `template` element in IE, Safari, and Firefox < 22.\n */\n\n[hidden],\ntemplate {\n  display: none;\n}\n\nscript {\n  display: none !important;\n}\n\n/* ==========================================================================\n   Base\n   ========================================================================== */\n\n/**\n * 1. Set default font family to sans-serif.\n * 2. Prevent iOS text size adjust after orientation change, without disabling\n *  user zoom.\n */\n\nhtml {\n  @include user-select(none);\n  font-family: sans-serif; /* 1 */\n  -webkit-text-size-adjust: 100%;\n  -ms-text-size-adjust: 100%; /* 2 */\n  -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/**\n * Remove default margin.\n */\n\nbody {\n  margin: 0;\n  line-height: 1;\n}\n\n\n/**\n * Remove default outlines.\n */\na,\nbutton,\n:focus,\na:focus,\nbutton:focus,\na:active,\na:hover {\n  outline: 0;\n}\n\n/* *\n * Remove tap highlight color\n */\n\na {\n  -webkit-user-drag: none;\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n  -webkit-tap-highlight-color: transparent;\n\n  &[href]:hover {\n    cursor: pointer;\n  }\n}\n\n/* ==========================================================================\n   Typography\n   ========================================================================== */\n\n\n/**\n * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.\n */\n\nb,\nstrong {\n  font-weight: bold;\n}\n\n/**\n * Address styling not present in Safari 5 and Chrome.\n */\n\ndfn {\n  font-style: italic;\n}\n\n/**\n * Address differences between Firefox and other browsers.\n */\n\nhr {\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  height: 0;\n}\n\n\n/**\n * Correct font family set oddly in Safari 5 and Chrome.\n */\n\ncode,\nkbd,\npre,\nsamp {\n  font-size: 1em;\n  font-family: monospace, serif;\n}\n\n/**\n * Improve readability of pre-formatted text in all browsers.\n */\n\npre {\n  white-space: pre-wrap;\n}\n\n/**\n * Set consistent quote types.\n */\n\nq {\n  quotes: \"\\201C\" \"\\201D\" \"\\2018\" \"\\2019\";\n}\n\n/**\n * Address inconsistent and variable font size in all browsers.\n */\n\nsmall {\n  font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` affecting `line-height` in all browsers.\n */\n\nsub,\nsup {\n  position: relative;\n  vertical-align: baseline;\n  font-size: 75%;\n  line-height: 0;\n}\n\nsup {\n  top: -0.5em;\n}\n\nsub {\n  bottom: -0.25em;\n}\n\n/**\n * Define consistent border, margin, and padding.\n */\n\nfieldset {\n  margin: 0 2px;\n  padding: 0.35em 0.625em 0.75em;\n  border: 1px solid #c0c0c0;\n}\n\n/**\n * 1. Correct `color` not being inherited in IE 8/9.\n * 2. Remove padding so people aren't caught out if they zero out fieldsets.\n */\n\nlegend {\n  padding: 0; /* 2 */\n  border: 0; /* 1 */\n}\n\n/**\n * 1. Correct font family not being inherited in all browsers.\n * 2. Correct font size not being inherited in all browsers.\n * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.\n * 4. Remove any default :focus styles\n * 5. Make sure webkit font smoothing is being inherited\n * 6. Remove default gradient in Android Firefox / FirefoxOS\n */\n\nbutton,\ninput,\nselect,\ntextarea {\n  margin: 0; /* 3 */\n  font-size: 100%; /* 2 */\n  font-family: inherit; /* 1 */\n  outline-offset: 0; /* 4 */\n  outline-style: none; /* 4 */\n  outline-width: 0; /* 4 */\n  -webkit-font-smoothing: inherit; /* 5 */\n  background-image: none; /* 6 */\n}\n\n/**\n * Address Firefox 4+ setting `line-height` on `input` using `importnt` in\n * the UA stylesheet.\n */\n\nbutton,\ninput {\n  line-height: normal;\n}\n\n/**\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\n * All other form control elements do not inherit `text-transform` values.\n * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.\n * Correct `select` style inheritance in Firefox 4+ and Opera.\n */\n\nbutton,\nselect {\n  text-transform: none;\n}\n\n/**\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n *  and `video` controls.\n * 2. Correct inability to style clickable `input` types in iOS.\n * 3. Improve usability and consistency of cursor style between image-type\n *  `input` and others.\n */\n\nbutton,\nhtml input[type=\"button\"], /* 1 */\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  cursor: pointer; /* 3 */\n  -webkit-appearance: button; /* 2 */\n}\n\n/**\n * Re-set default cursor for disabled elements.\n */\n\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default;\n}\n\n/**\n * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.\n * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome\n *  (include `-moz` to future-proof).\n */\n\ninput[type=\"search\"] {\n  -webkit-box-sizing: content-box; /* 2 */\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  -webkit-appearance: textfield; /* 1 */\n}\n\n/**\n * Remove inner padding and search cancel button in Safari 5 and Chrome\n * on OS X.\n */\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\n\n/**\n * Remove inner padding and border in Firefox 4+.\n */\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  padding: 0;\n  border: 0;\n}\n\n/**\n * 1. Remove default vertical scrollbar in IE 8/9.\n * 2. Improve readability and alignment in all browsers.\n */\n\ntextarea {\n  overflow: auto; /* 1 */\n  vertical-align: top; /* 2 */\n}\n\n\nimg {\n  -webkit-user-drag: none;\n}\n\n/* ==========================================================================\n   Tables\n   ========================================================================== */\n\n/**\n * Remove most spacing between table cells.\n */\n\ntable {\n  border-spacing: 0;\n  border-collapse: collapse;\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_scaffolding.scss",
    "content": "\n/**\n * Scaffolding\n * --------------------------------------------------\n */\n\n*,\n*:before,\n*:after {\n  @include box-sizing(border-box);\n}\n\nhtml {\n  overflow: hidden;\n  -ms-touch-action: pan-y;\n  touch-action: pan-y;\n}\n\nbody,\n.ionic-body {\n  @include touch-callout(none);\n  @include font-smoothing(antialiased);\n  @include text-size-adjust(none);\n  @include tap-highlight-transparent();\n  @include user-select(none);\n\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  overflow: hidden;\n\n  margin: 0;\n  padding: 0;\n\n  color: $base-color;\n  word-wrap: break-word;\n  font-size: $font-size-base;\n  font-family: -apple-system;\n  font-family: $font-family-base;\n  line-height: $line-height-computed;\n  text-rendering: optimizeLegibility;\n  -webkit-backface-visibility: hidden;\n  -webkit-user-drag: none;\n  -ms-content-zooming: none;\n}\n\nbody.grade-b,\nbody.grade-c {\n  // disable optimizeLegibility for low end devices\n  text-rendering: auto;\n}\n\n.content {\n  // used for content areas not using the content directive\n  position: relative;\n}\n\n.scroll-content {\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  overflow: hidden;\n\n  // Hide the top border if any\n  margin-top: -1px;\n\n  // Prevents any distortion of lines\n  padding-top: 1px;\n  margin-bottom: -1px;\n\n  width: auto;\n  height: auto;\n}\n\n.menu .scroll-content.scroll-content-false{\n  z-index: $z-index-scroll-content-false;\n}\n\n.scroll-view {\n  position: relative;\n  display: block;\n  overflow: hidden;\n\n  &.overflow-scroll {\n    position: relative;\n  }\n\n  &.scroll-x { overflow-x: scroll; overflow-y: hidden; }\n  &.scroll-y { overflow-x: hidden; overflow-y: scroll; }\n  &.scroll-xy { overflow-x: scroll; overflow-y: scroll; }\n\n  // Hide the top border if any\n  margin-top: -1px;\n}\n\n/**\n * Scroll is the scroll view component available for complex and custom\n * scroll view functionality.\n */\n.scroll {\n  @include user-select(none);\n  @include touch-callout(none);\n  @include text-size-adjust(none);\n  @include transform-origin(left, top);\n}\n/**\n * Set ms-viewport to prevent MS \"page squish\" and allow fluid scrolling\n * https://msdn.microsoft.com/en-us/library/ie/hh869615(v=vs.85).aspx\n */\n@-ms-viewport { width: device-width; }\n\n// Scroll bar styles\n.scroll-bar {\n  position: absolute;\n  z-index: $z-index-scroll-bar;\n}\n// hide the scroll-bar during animations\n.ng-animate .scroll-bar {\n  visibility: hidden;\n}\n.scroll-bar-h {\n  right: 2px;\n  bottom: 3px;\n  left: 2px;\n  height: 3px;\n\n  .scroll-bar-indicator {\n    height: 100%;\n  }\n}\n\n.scroll-bar-v {\n  top: 2px;\n  right: 3px;\n  bottom: 2px;\n  width: 3px;\n\n  .scroll-bar-indicator {\n    width: 100%;\n  }\n}\n.scroll-bar-indicator {\n  position: absolute;\n  border-radius: 4px;\n  background: rgba(0,0,0,0.3);\n  opacity: 1;\n  @include transition(opacity .3s linear);\n\n  &.scroll-bar-fade-out {\n    opacity: 0;\n  }\n}\n.platform-android .scroll-bar-indicator {\n  // android doesn't have rounded ends on scrollbar\n  border-radius: 0;\n}\n.grade-b .scroll-bar-indicator,\n.grade-c .scroll-bar-indicator {\n  // disable rgba background and border radius for low end devices\n  background: #aaa;\n\n  &.scroll-bar-fade-out {\n    @include transition(none);\n  }\n}\n\nion-infinite-scroll {\n  height: 60px;\n  width: 100%;\n  display: block;\n\n  @include display-flex();\n  @include flex-direction(row);\n  @include justify-content(center);\n  @include align-items(center);\n\n  .icon {\n    color: #666666;\n    font-size: 30px;\n    color: $scroll-refresh-icon-color;\n  }\n  &:not(.active){\n    .spinner,\n    .icon:before{\n      display:none;\n    }\n  }\n}\n\n.overflow-scroll {\n  overflow-x: hidden;\n  overflow-y: scroll;\n  -webkit-overflow-scrolling: touch;\n\n  // Make sure the scrollbar doesn't take up layout space on edge\n  -ms-overflow-style: -ms-autohiding-scrollbar;\n\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  position: absolute;\n\n  &.pane {\n    overflow-x: hidden;\n    overflow-y: scroll;\n  }\n\n  .scroll {\n    position: static;\n    height: 100%;\n    -webkit-transform: translate3d(0, 0, 0);   // fix iOS bug where relative children of scroller disapear while scrolling.  see: http://stackoverflow.com/questions/9807620/ipad-safari-scrolling-causes-html-elements-to-disappear-and-reappear-with-a-dela\n  }\n}\n\n\n// Pad top/bottom of content so it doesn't hide behind .bar-title and .bar-tab.\n// Note: For these to work, content must come after both bars in the markup\n/* If you change these, change platform.scss as well */\n.has-header {\n  top: $bar-height;\n}\n// Force no header\n.no-header {\n  top: 0;\n}\n\n.has-subheader {\n  top: $bar-height + $bar-subheader-height;\n}\n.has-tabs-top {\n  top: $bar-height + $tabs-height;\n}\n.has-header.has-subheader.has-tabs-top {\n  top: $bar-height + $bar-subheader-height + $tabs-height;\n}\n\n.has-footer {\n  bottom: $bar-footer-height;\n}\n.has-subfooter {\n  bottom: $bar-footer-height + $bar-subfooter-height;\n}\n\n.has-tabs,\n.bar-footer.has-tabs {\n  bottom: $tabs-height;\n  &.pane{\n    bottom: $tabs-height;\n    height:auto;\n  }\n}\n\n.bar-subfooter.has-tabs {\n  bottom: $tabs-height + $bar-footer-height;\n}\n\n.has-footer.has-tabs {\n  bottom: $tabs-height + $bar-footer-height;\n}\n\n// A full screen section with a solid background\n.pane {\n  @include translate3d(0,0,0);\n  @include transition-duration(0);\n  z-index: $z-index-pane;\n}\n.view {\n  z-index: $z-index-view;\n}\n.pane,\n.view {\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: $base-background-color;\n  overflow: hidden;\n}\n.view-container {\n  position: absolute;\n  display: block;\n  width: 100%;\n  height: 100%;\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_select.scss",
    "content": "\n/**\n * Select\n * --------------------------------------------------\n */\n\n.item-select {\n  position: relative;\n\n  select {\n    @include appearance(none);\n    position: absolute;\n    top: 0;\n    bottom: 0;\n    right: 0;\n    padding: 0 ($item-padding * 3) 0 $item-padding;\n    max-width: 65%;\n\n    border: none;\n    background: $item-default-bg;\n    color: #333;\n\n    // hack to hide default dropdown arrow in FF\n    text-indent: .01px;\n    text-overflow: '';\n\n    white-space: nowrap;\n    font-size: $font-size-base;\n\n    cursor: pointer;\n    direction: rtl; // right align the select text\n  }\n\n  select::-ms-expand {\n    // hide default dropdown arrow in IE\n    display: none;\n  }\n\n  option {\n    direction: ltr;\n  }\n\n  &:after {\n    position: absolute;\n    top: 50%;\n    right: $item-padding;\n    margin-top: -3px;\n    width: 0;\n    height: 0;\n    border-top: 5px solid;\n    border-right: 5px solid rgba(0, 0, 0, 0);\n    border-left: 5px solid rgba(0, 0, 0, 0);\n    color: #999;\n    content: \"\";\n    pointer-events: none;\n  }\n  &.item-light {\n    select{\n      background:$item-light-bg;\n      color:$item-light-text;\n    }\n  }\n  &.item-stable {\n    select{\n      background:$item-stable-bg;\n      color:$item-stable-text;\n    }\n    &:after, .input-label{\n      color:darken($item-stable-border,30%);\n    }\n  }\n  &.item-positive {\n    select{\n      background:$item-positive-bg;\n      color:$item-positive-text;\n    }\n    &:after, .input-label{\n      color:$item-positive-text;\n    }\n  }\n  &.item-calm {\n    select{\n      background:$item-calm-bg;\n      color:$item-calm-text;\n    }\n    &:after, .input-label{\n      color:$item-calm-text;\n    }\n  }\n  &.item-assertive {\n    select{\n      background:$item-assertive-bg;\n      color:$item-assertive-text;\n    }\n    &:after, .input-label{\n      color:$item-assertive-text;\n    }\n  }\n  &.item-balanced {\n    select{\n      background:$item-balanced-bg;\n      color:$item-balanced-text;\n    }\n    &:after, .input-label{\n      color:$item-balanced-text;\n    }\n  }\n  &.item-energized  {\n    select{\n      background:$item-energized-bg;\n      color:$item-energized-text;\n    }\n    &:after, .input-label{\n      color:$item-energized-text;\n    }\n  }\n  &.item-royal {\n    select{\n      background:$item-royal-bg;\n      color:$item-royal-text;\n    }\n    &:after, .input-label{\n      color:$item-royal-text;\n    }\n  }\n  &.item-dark  {\n    select{\n      background:$item-dark-bg;\n      color:$item-dark-text;\n    }\n    &:after, .input-label{\n      color:$item-dark-text;\n    }\n  }\n}\n\nselect {\n  &[multiple],\n  &[size] {\n    height: auto;\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_slide-box.scss",
    "content": "\n/**\n * Slide Box\n * --------------------------------------------------\n */\n\n.slider {\n  position: relative;\n  visibility: hidden;\n  // Make sure items don't scroll over ever\n  overflow: hidden;\n}\n\n.slider-slides {\n  position: relative;\n  height: 100%;\n}\n\n.slider-slide {\n  position: relative;\n  display: block;\n  float: left;\n  width: 100%;\n  height: 100%;\n  vertical-align: top;\n}\n\n.slider-slide-image {\n  > img {\n    width: 100%;\n  }\n}\n\n.slider-pager {\n  position: absolute;\n  bottom: 20px;\n  z-index: $z-index-slider-pager;\n  width: 100%;\n  height: 15px;\n  text-align: center;\n\n  .slider-pager-page {\n    display: inline-block;\n    margin: 0px 3px;\n    width: 15px;\n    color: #000;\n    text-decoration: none;\n\n    opacity: 0.3;\n\n    &.active {\n      @include transition(opacity 0.4s ease-in);\n      opacity: 1;\n    }\n  }\n}\n\n//Disable animate service animations\n.slider-slide,\n.slider-pager-page {\n  &.ng-enter,\n  &.ng-leave,\n  &.ng-animate {\n    -webkit-transition: none !important;\n    transition: none !important;\n  }\n  &.ng-animate {\n    -webkit-animation: none 0s;\n    animation: none 0s;\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_slides.scss",
    "content": "/**\n * Swiper 3.2.7\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n *\n * http://www.idangero.us/swiper/\n *\n * Copyright 2015, Vladimir Kharlampidi\n * The iDangero.us\n * http://www.idangero.us/\n *\n * Licensed under MIT\n *\n * Released on: December 7, 2015\n */\n.swiper-container {\n  margin: 0 auto;\n  position: relative;\n  overflow: hidden;\n  /* Fix of Webkit flickering */\n  z-index: 1;\n}\n.swiper-container-no-flexbox .swiper-slide {\n  float: left;\n}\n.swiper-container-vertical > .swiper-wrapper {\n  -webkit-box-orient: vertical;\n  -moz-box-orient: vertical;\n  -ms-flex-direction: column;\n  -webkit-flex-direction: column;\n  flex-direction: column;\n}\n.swiper-wrapper {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  z-index: 1;\n  display: -webkit-box;\n  display: -moz-box;\n  display: -ms-flexbox;\n  display: -webkit-flex;\n  display: flex;\n  -webkit-transition-property: -webkit-transform;\n  -moz-transition-property: -moz-transform;\n  -o-transition-property: -o-transform;\n  -ms-transition-property: -ms-transform;\n  transition-property: transform;\n  -webkit-box-sizing: content-box;\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n}\n.swiper-container-android .swiper-slide,\n.swiper-wrapper {\n  -webkit-transform: translate3d(0px, 0, 0);\n  -moz-transform: translate3d(0px, 0, 0);\n  -o-transform: translate(0px, 0px);\n  -ms-transform: translate3d(0px, 0, 0);\n  transform: translate3d(0px, 0, 0);\n}\n.swiper-container-multirow > .swiper-wrapper {\n  -webkit-box-lines: multiple;\n  -moz-box-lines: multiple;\n  -ms-flex-wrap: wrap;\n  -webkit-flex-wrap: wrap;\n  flex-wrap: wrap;\n}\n.swiper-container-free-mode > .swiper-wrapper {\n  -webkit-transition-timing-function: ease-out;\n  -moz-transition-timing-function: ease-out;\n  -ms-transition-timing-function: ease-out;\n  -o-transition-timing-function: ease-out;\n  transition-timing-function: ease-out;\n  margin: 0 auto;\n}\n.swiper-slide {\n  display: block;\n  -webkit-flex-shrink: 0;\n  -ms-flex: 0 0 auto;\n  flex-shrink: 0;\n  width: 100%;\n  height: 100%;\n  position: relative;\n}\n/* Auto Height */\n.swiper-container-autoheight,\n.swiper-container-autoheight .swiper-slide {\n  height: auto;\n}\n.swiper-container-autoheight .swiper-wrapper {\n  -webkit-box-align: start;\n  -ms-flex-align: start;\n  -webkit-align-items: flex-start;\n  align-items: flex-start;\n  -webkit-transition-property: -webkit-transform, height;\n  -moz-transition-property: -moz-transform;\n  -o-transition-property: -o-transform;\n  -ms-transition-property: -ms-transform;\n  transition-property: transform, height;\n}\n/* a11y */\n.swiper-container .swiper-notification {\n  position: absolute;\n  left: 0;\n  top: 0;\n  pointer-events: none;\n  opacity: 0;\n  z-index: -1000;\n}\n/* IE10 Windows Phone 8 Fixes */\n.swiper-wp8-horizontal {\n  -ms-touch-action: pan-y;\n  touch-action: pan-y;\n}\n.swiper-wp8-vertical {\n  -ms-touch-action: pan-x;\n  touch-action: pan-x;\n}\n/* Arrows */\n.swiper-button-prev,\n.swiper-button-next {\n  position: absolute;\n  top: 50%;\n  width: 27px;\n  height: 44px;\n  margin-top: -22px;\n  z-index: 10;\n  cursor: pointer;\n  -moz-background-size: 27px 44px;\n  -webkit-background-size: 27px 44px;\n  background-size: 27px 44px;\n  background-position: center;\n  background-repeat: no-repeat;\n}\n.swiper-button-prev.swiper-button-disabled,\n.swiper-button-next.swiper-button-disabled {\n  opacity: 0.35;\n  cursor: auto;\n  pointer-events: none;\n}\n.swiper-button-prev,\n.swiper-container-rtl .swiper-button-next {\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E\");\n  left: 10px;\n  right: auto;\n}\n.swiper-button-prev.swiper-button-black,\n.swiper-container-rtl .swiper-button-next.swiper-button-black {\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E\");\n}\n.swiper-button-prev.swiper-button-white,\n.swiper-container-rtl .swiper-button-next.swiper-button-white {\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E\");\n}\n.swiper-button-next,\n.swiper-container-rtl .swiper-button-prev {\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E\");\n  right: 10px;\n  left: auto;\n}\n.swiper-button-next.swiper-button-black,\n.swiper-container-rtl .swiper-button-prev.swiper-button-black {\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E\");\n}\n.swiper-button-next.swiper-button-white,\n.swiper-container-rtl .swiper-button-prev.swiper-button-white {\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E\");\n}\n/* Pagination Styles */\n.swiper-pagination {\n  position: absolute;\n  text-align: center;\n  -webkit-transition: 300ms;\n  -moz-transition: 300ms;\n  -o-transition: 300ms;\n  transition: 300ms;\n  -webkit-transform: translate3d(0, 0, 0);\n  -ms-transform: translate3d(0, 0, 0);\n  -o-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n  z-index: 10;\n}\n.swiper-pagination.swiper-pagination-hidden {\n  opacity: 0;\n}\n.swiper-pagination-bullet {\n  width: 8px;\n  height: 8px;\n  display: inline-block;\n  border-radius: 100%;\n  background: #000;\n  opacity: 0.2;\n}\nbutton.swiper-pagination-bullet {\n  border: none;\n  margin: 0;\n  padding: 0;\n  box-shadow: none;\n  -moz-appearance: none;\n  -ms-appearance: none;\n  -webkit-appearance: none;\n  appearance: none;\n}\n.swiper-pagination-clickable .swiper-pagination-bullet {\n  cursor: pointer;\n}\n.swiper-pagination-white .swiper-pagination-bullet {\n  background: #fff;\n}\n.swiper-pagination-bullet-active {\n  opacity: 1;\n}\n.swiper-pagination-white .swiper-pagination-bullet-active {\n  background: #fff;\n}\n.swiper-pagination-black .swiper-pagination-bullet-active {\n  background: #000;\n}\n.swiper-container-vertical > .swiper-pagination {\n  right: 10px;\n  top: 50%;\n  -webkit-transform: translate3d(0px, -50%, 0);\n  -moz-transform: translate3d(0px, -50%, 0);\n  -o-transform: translate(0px, -50%);\n  -ms-transform: translate3d(0px, -50%, 0);\n  transform: translate3d(0px, -50%, 0);\n}\n.swiper-container-vertical > .swiper-pagination .swiper-pagination-bullet {\n  margin: 5px 0;\n  display: block;\n}\n.swiper-container-horizontal > .swiper-pagination {\n  bottom: 10px;\n  left: 0;\n  width: 100%;\n}\n.swiper-container-horizontal > .swiper-pagination .swiper-pagination-bullet {\n  margin: 0 5px;\n}\n/* 3D Container */\n.swiper-container-3d {\n  -webkit-perspective: 1200px;\n  -moz-perspective: 1200px;\n  -o-perspective: 1200px;\n  perspective: 1200px;\n}\n.swiper-container-3d .swiper-wrapper,\n.swiper-container-3d .swiper-slide,\n.swiper-container-3d .swiper-slide-shadow-left,\n.swiper-container-3d .swiper-slide-shadow-right,\n.swiper-container-3d .swiper-slide-shadow-top,\n.swiper-container-3d .swiper-slide-shadow-bottom,\n.swiper-container-3d .swiper-cube-shadow {\n  -webkit-transform-style: preserve-3d;\n  -moz-transform-style: preserve-3d;\n  -ms-transform-style: preserve-3d;\n  transform-style: preserve-3d;\n}\n.swiper-container-3d .swiper-slide-shadow-left,\n.swiper-container-3d .swiper-slide-shadow-right,\n.swiper-container-3d .swiper-slide-shadow-top,\n.swiper-container-3d .swiper-slide-shadow-bottom {\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 100%;\n  height: 100%;\n  pointer-events: none;\n  z-index: 10;\n}\n.swiper-container-3d .swiper-slide-shadow-left {\n  background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));\n  /* Safari 4+, Chrome */\n  background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Chrome 10+, Safari 5.1+, iOS 5+ */\n  background-image: -moz-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Firefox 3.6-15 */\n  background-image: -o-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Opera 11.10-12.00 */\n  background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Firefox 16+, IE10, Opera 12.50+ */\n}\n.swiper-container-3d .swiper-slide-shadow-right {\n  background-image: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));\n  /* Safari 4+, Chrome */\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Chrome 10+, Safari 5.1+, iOS 5+ */\n  background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Firefox 3.6-15 */\n  background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Opera 11.10-12.00 */\n  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Firefox 16+, IE10, Opera 12.50+ */\n}\n.swiper-container-3d .swiper-slide-shadow-top {\n  background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));\n  /* Safari 4+, Chrome */\n  background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Chrome 10+, Safari 5.1+, iOS 5+ */\n  background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Firefox 3.6-15 */\n  background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Opera 11.10-12.00 */\n  background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Firefox 16+, IE10, Opera 12.50+ */\n}\n.swiper-container-3d .swiper-slide-shadow-bottom {\n  background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));\n  /* Safari 4+, Chrome */\n  background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Chrome 10+, Safari 5.1+, iOS 5+ */\n  background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Firefox 3.6-15 */\n  background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Opera 11.10-12.00 */\n  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n  /* Firefox 16+, IE10, Opera 12.50+ */\n}\n/* Coverflow */\n.swiper-container-coverflow .swiper-wrapper {\n  /* Windows 8 IE 10 fix */\n  -ms-perspective: 1200px;\n}\n/* Fade */\n.swiper-container-fade.swiper-container-free-mode .swiper-slide {\n  -webkit-transition-timing-function: ease-out;\n  -moz-transition-timing-function: ease-out;\n  -ms-transition-timing-function: ease-out;\n  -o-transition-timing-function: ease-out;\n  transition-timing-function: ease-out;\n}\n.swiper-container-fade .swiper-slide {\n  pointer-events: none;\n}\n.swiper-container-fade .swiper-slide .swiper-slide {\n  pointer-events: none;\n}\n.swiper-container-fade .swiper-slide-active,\n.swiper-container-fade .swiper-slide-active .swiper-slide-active {\n  pointer-events: auto;\n}\n/* Cube */\n.swiper-container-cube {\n  overflow: visible;\n}\n.swiper-container-cube .swiper-slide {\n  pointer-events: none;\n  visibility: hidden;\n  -webkit-transform-origin: 0 0;\n  -moz-transform-origin: 0 0;\n  -ms-transform-origin: 0 0;\n  transform-origin: 0 0;\n  -webkit-backface-visibility: hidden;\n  -moz-backface-visibility: hidden;\n  -ms-backface-visibility: hidden;\n  backface-visibility: hidden;\n  width: 100%;\n  height: 100%;\n  z-index: 1;\n}\n.swiper-container-cube.swiper-container-rtl .swiper-slide {\n  -webkit-transform-origin: 100% 0;\n  -moz-transform-origin: 100% 0;\n  -ms-transform-origin: 100% 0;\n  transform-origin: 100% 0;\n}\n.swiper-container-cube .swiper-slide-active,\n.swiper-container-cube .swiper-slide-next,\n.swiper-container-cube .swiper-slide-prev,\n.swiper-container-cube .swiper-slide-next + .swiper-slide {\n  pointer-events: auto;\n  visibility: visible;\n}\n.swiper-container-cube .swiper-slide-shadow-top,\n.swiper-container-cube .swiper-slide-shadow-bottom,\n.swiper-container-cube .swiper-slide-shadow-left,\n.swiper-container-cube .swiper-slide-shadow-right {\n  z-index: 0;\n  -webkit-backface-visibility: hidden;\n  -moz-backface-visibility: hidden;\n  -ms-backface-visibility: hidden;\n  backface-visibility: hidden;\n}\n.swiper-container-cube .swiper-cube-shadow {\n  position: absolute;\n  left: 0;\n  bottom: 0px;\n  width: 100%;\n  height: 100%;\n  background: #000;\n  opacity: 0.6;\n  -webkit-filter: blur(50px);\n  filter: blur(50px);\n  z-index: 0;\n}\n/* Scrollbar */\n.swiper-scrollbar {\n  border-radius: 10px;\n  position: relative;\n  -ms-touch-action: none;\n  background: rgba(0, 0, 0, 0.1);\n}\n.swiper-container-horizontal > .swiper-scrollbar {\n  position: absolute;\n  left: 1%;\n  bottom: 3px;\n  z-index: 50;\n  height: 5px;\n  width: 98%;\n}\n.swiper-container-vertical > .swiper-scrollbar {\n  position: absolute;\n  right: 3px;\n  top: 1%;\n  z-index: 50;\n  width: 5px;\n  height: 98%;\n}\n.swiper-scrollbar-drag {\n  height: 100%;\n  width: 100%;\n  position: relative;\n  background: rgba(0, 0, 0, 0.5);\n  border-radius: 10px;\n  left: 0;\n  top: 0;\n}\n.swiper-scrollbar-cursor-drag {\n  cursor: move;\n}\n/* Preloader */\n.swiper-lazy-preloader {\n  width: 42px;\n  height: 42px;\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  margin-left: -21px;\n  margin-top: -21px;\n  z-index: 10;\n  -webkit-transform-origin: 50%;\n  -moz-transform-origin: 50%;\n  transform-origin: 50%;\n  -webkit-animation: swiper-preloader-spin 1s steps(12, end) infinite;\n  -moz-animation: swiper-preloader-spin 1s steps(12, end) infinite;\n  animation: swiper-preloader-spin 1s steps(12, end) infinite;\n}\n.swiper-lazy-preloader:after {\n  display: block;\n  content: \"\";\n  width: 100%;\n  height: 100%;\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n  background-position: 50%;\n  -webkit-background-size: 100%;\n  background-size: 100%;\n  background-repeat: no-repeat;\n}\n.swiper-lazy-preloader-white:after {\n  background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n}\n@-webkit-keyframes swiper-preloader-spin {\n  100% {\n    -webkit-transform: rotate(360deg);\n  }\n}\n@keyframes swiper-preloader-spin {\n  100% {\n    transform: rotate(360deg);\n  }\n}\n\n\nion-slides {\n  width: 100%;\n  height: 100%;\n  display: block;\n}\n.slide-zoom {\n  display: block;\n  width: 100%;\n  text-align: center;\n}\n\n.swiper-container {\n  //position: absolute;\n  //left: 0;\n  //top: 0;\n  width: 100%;\n  height: 100%;\n  padding: 0;\n  //display: flex;\n  overflow: hidden;\n}\n\n.swiper-wrapper {\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 100%;\n  height: 100%;\n  padding: 0;\n  //display: flex;\n}\n\n.swiper-container {\n  //width: 100%;\n  //height: 100%;\n}\n\n.swiper-slide {\n  width: 100%;\n  height: 100%;\n\n  box-sizing: border-box;\n\n  //text-align: center;\n  //font-size: 18px;\n  //background: #fff;\n  /* Center slide text vertically */\n  //display: flex;\n  //justify-content: center;\n  //align-items: center;\n\n  img {\n    width: auto;\n    height: auto;\n    max-width: 100%;\n    max-height: 100%;\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_spinner.scss",
    "content": "/**\n * Spinners\n * --------------------------------------------------\n */\n\n.spinner {\n  svg {\n    width: $spinner-width;\n    height: $spinner-height;\n  }\n\n  stroke: $spinner-default-stroke;\n  fill: $spinner-default-fill;\n\n  &.spinner-light {\n    stroke: $spinner-light-stroke;\n    fill: $spinner-light-fill;\n  }\n  &.spinner-stable {\n    stroke: $spinner-stable-stroke;\n    fill: $spinner-stable-fill;\n  }\n  &.spinner-positive {\n    stroke: $spinner-positive-stroke;\n    fill: $spinner-positive-fill;\n  }\n  &.spinner-calm {\n    stroke: $spinner-calm-stroke;\n    fill: $spinner-calm-fill;\n  }\n  &.spinner-balanced {\n    stroke: $spinner-balanced-stroke;\n    fill: $spinner-balanced-fill;\n  }\n  &.spinner-assertive {\n    stroke: $spinner-assertive-stroke;\n    fill: $spinner-assertive-fill;\n  }\n  &.spinner-energized {\n    stroke: $spinner-energized-stroke;\n    fill: $spinner-energized-fill;\n  }\n  &.spinner-royal {\n    stroke: $spinner-royal-stroke;\n    fill: $spinner-royal-fill;\n  }\n  &.spinner-dark {\n    stroke: $spinner-dark-stroke;\n    fill: $spinner-dark-fill;\n  }\n}\n\n.spinner-android {\n  stroke: #4b8bf4;\n}\n\n.spinner-ios,\n.spinner-ios-small {\n  stroke: #69717d;\n}\n\n.spinner-spiral {\n  .stop1 {\n    stop-color: $spinner-light-fill;\n    stop-opacity: 0;\n  }\n\n  &.spinner-light {\n    .stop1 {\n      stop-color: $spinner-default-fill;\n    }\n    .stop2 {\n      stop-color: $spinner-light-fill;\n    }\n  }\n  &.spinner-stable .stop2 {\n    stop-color: $spinner-stable-fill;\n  }\n  &.spinner-positive .stop2 {\n    stop-color: $spinner-positive-fill;\n  }\n  &.spinner-calm .stop2 {\n    stop-color: $spinner-calm-fill;\n  }\n  &.spinner-balanced .stop2 {\n    stop-color: $spinner-balanced-fill;\n  }\n  &.spinner-assertive .stop2 {\n    stop-color: $spinner-assertive-fill;\n  }\n  &.spinner-energized .stop2 {\n    stop-color: $spinner-energized-fill;\n  }\n  &.spinner-royal .stop2 {\n    stop-color: $spinner-royal-fill;\n  }\n  &.spinner-dark .stop2 {\n    stop-color: $spinner-dark-fill;\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_tabs.scss",
    "content": "/**\n * Tabs\n * --------------------------------------------------\n * A navigation bar with any number of tab items supported.\n */\n\n.tabs {\n  @include display-flex();\n  @include flex-direction(horizontal);\n  @include justify-content(center);\n  @include translate3d(0,0,0);\n\n  @include tab-style($tabs-default-bg, $tabs-default-border, $tabs-default-text);\n  @include tab-badge-style($tabs-default-text, $tabs-default-bg);\n\n  position: absolute;\n  bottom: 0;\n\n  z-index: $z-index-tabs;\n\n  width: 100%;\n  height: $tabs-height;\n\n  border-style: solid;\n  border-top-width: 1px;\n\n  background-size: 0;\n  line-height: $tabs-height;\n\n  @media (min--moz-device-pixel-ratio: 1.5),\n         (-webkit-min-device-pixel-ratio: 1.5),\n         (min-device-pixel-ratio: 1.5),\n         (min-resolution: 144dpi),\n         (min-resolution: 1.5dppx) {\n    padding-top: 2px;\n    border-top: none !important;\n    border-bottom: none;\n    background-position: top;\n    background-size: 100% 1px;\n    background-repeat: no-repeat;\n  }\n\n}\n/* Allow parent element of tabs to define color, or just the tab itself */\n.tabs-light > .tabs,\n.tabs.tabs-light {\n  @include tab-style($tabs-light-bg, $tabs-light-border, $tabs-light-text);\n  @include tab-badge-style($tabs-light-text, $tabs-light-bg);\n}\n.tabs-stable > .tabs,\n.tabs.tabs-stable {\n  @include tab-style($tabs-stable-bg, $tabs-stable-border, $tabs-stable-text);\n  @include tab-badge-style($tabs-stable-text, $tabs-stable-bg);\n}\n.tabs-positive > .tabs,\n.tabs.tabs-positive {\n  @include tab-style($tabs-positive-bg, $tabs-positive-border, $tabs-positive-text);\n  @include tab-badge-style($tabs-positive-text, $tabs-positive-bg);\n}\n.tabs-calm > .tabs,\n.tabs.tabs-calm {\n  @include tab-style($tabs-calm-bg, $tabs-calm-border, $tabs-calm-text);\n  @include tab-badge-style($tabs-calm-text, $tabs-calm-bg);\n}\n.tabs-assertive > .tabs,\n.tabs.tabs-assertive {\n  @include tab-style($tabs-assertive-bg, $tabs-assertive-border, $tabs-assertive-text);\n  @include tab-badge-style($tabs-assertive-text, $tabs-assertive-bg);\n}\n.tabs-balanced > .tabs,\n.tabs.tabs-balanced {\n  @include tab-style($tabs-balanced-bg, $tabs-balanced-border, $tabs-balanced-text);\n  @include tab-badge-style($tabs-balanced-text, $tabs-balanced-bg);\n}\n.tabs-energized > .tabs,\n.tabs.tabs-energized {\n  @include tab-style($tabs-energized-bg, $tabs-energized-border, $tabs-energized-text);\n  @include tab-badge-style($tabs-energized-text, $tabs-energized-bg);\n}\n.tabs-royal > .tabs,\n.tabs.tabs-royal {\n  @include tab-style($tabs-royal-bg, $tabs-royal-border, $tabs-royal-text);\n  @include tab-badge-style($tabs-royal-text, $tabs-royal-bg);\n}\n.tabs-dark > .tabs,\n.tabs.tabs-dark {\n  @include tab-style($tabs-dark-bg, $tabs-dark-border, $tabs-dark-text);\n  @include tab-badge-style($tabs-dark-text, $tabs-dark-bg);\n}\n\n@mixin tabs-striped($style, $color, $background) {\n  &.#{$style} {\n    .tabs{\n      background-color: $background;\n    }\n    .tab-item {\n      color: rgba($color, $tabs-striped-off-opacity);\n      opacity: 1;\n      .badge{\n        opacity:$tabs-striped-off-opacity;\n      }\n      &.tab-item-active,\n      &.active,\n      &.activated {\n        margin-top: -$tabs-striped-border-width;\n        color: $color;\n        border-style: solid;\n        border-width: $tabs-striped-border-width 0 0 0;\n        border-color: $color;\n      }\n    }\n  }\n  &.tabs-top{\n    .tab-item {\n      &.tab-item-active,\n      &.active,\n      &.activated {\n        .badge {\n          top: 4%;\n        }\n      }\n    }\n  }\n}\n\n@mixin tabs-background($style, $color, $border-color) {\n  .#{$style} {\n    .tabs,\n    &> .tabs{\n      background-color: $color;\n      background-image: linear-gradient(0deg, $border-color, $border-color 50%, transparent 50%);\n      border-color: $border-color;\n    }\n  }\n}\n\n@mixin tabs-striped-background($style, $color) {\n  &.#{$style} {\n    .tabs {\n      background-color: $color;\n      background-image:none;\n    }\n  }\n}\n\n@mixin tabs-color($style, $color) {\n  .#{$style} {\n    .tab-item {\n      color: rgba($color, $tabs-off-opacity);\n      opacity: 1;\n      .badge{\n        opacity:$tabs-off-opacity;\n      }\n      &.tab-item-active,\n      &.active,\n      &.activated {\n        color: $color;\n        border: 0 solid $color;\n        .badge{\n          opacity: 1;\n        }\n      }\n    }\n  }\n}\n\n@mixin tabs-striped-color($style, $color) {\n  &.#{$style} {\n    .tab-item {\n      color: rgba($color, $tabs-striped-off-opacity);\n      opacity: 1;\n      .badge{\n        opacity:$tabs-striped-off-opacity;\n      }\n      &.tab-item-active,\n      &.active,\n      &.activated {\n        margin-top: -$tabs-striped-border-width;\n        color: $color;\n        border: 0 solid $color;\n        border-top-width: $tabs-striped-border-width;\n        .badge{\n          top:$tabs-striped-border-width;\n          opacity: 1;\n        }\n      }\n    }\n  }\n}\n\n.tabs-striped {\n  .tabs {\n    background-color: white;\n    background-image: none;\n    border: none;\n    border-bottom: 1px solid #ddd;\n    padding-top: $tabs-striped-border-width;\n  }\n  .tab-item {\n    // default android tab style\n    &.tab-item-active,\n    &.active,\n    &.activated {\n      margin-top: -$tabs-striped-border-width;\n      border-style: solid;\n      border-width: $tabs-striped-border-width 0 0 0;\n      border-color: $dark;\n      .badge{\n        top:$tabs-striped-border-width;\n        opacity: 1;\n      }\n    }\n  }\n  @include tabs-striped('tabs-light', $dark, $light);\n  @include tabs-striped('tabs-stable', $dark, $stable);\n  @include tabs-striped('tabs-positive', $light, $positive);\n  @include tabs-striped('tabs-calm', $light, $calm);\n  @include tabs-striped('tabs-assertive', $light, $assertive);\n  @include tabs-striped('tabs-balanced', $light, $balanced);\n  @include tabs-striped('tabs-energized', $light, $energized);\n  @include tabs-striped('tabs-royal', $light, $royal);\n  @include tabs-striped('tabs-dark', $light, $dark);\n\n  // doing this twice so striped tabs styles don't override specific bg and color vals\n  @include tabs-striped-background('tabs-background-light', $light);\n  @include tabs-striped-background('tabs-background-stable', $stable);\n  @include tabs-striped-background('tabs-background-positive', $positive);\n  @include tabs-striped-background('tabs-background-calm', $calm);\n  @include tabs-striped-background('tabs-background-assertive', $assertive);\n  @include tabs-striped-background('tabs-background-balanced', $balanced);\n  @include tabs-striped-background('tabs-background-energized',$energized);\n  @include tabs-striped-background('tabs-background-royal', $royal);\n  @include tabs-striped-background('tabs-background-dark', $dark);\n\n  @include tabs-striped-color('tabs-color-light', $light);\n  @include tabs-striped-color('tabs-color-stable', $stable);\n  @include tabs-striped-color('tabs-color-positive', $positive);\n  @include tabs-striped-color('tabs-color-calm', $calm);\n  @include tabs-striped-color('tabs-color-assertive', $assertive);\n  @include tabs-striped-color('tabs-color-balanced', $balanced);\n  @include tabs-striped-color('tabs-color-energized',$energized);\n  @include tabs-striped-color('tabs-color-royal', $royal);\n  @include tabs-striped-color('tabs-color-dark', $dark);\n\n}\n\n@include tabs-background('tabs-background-light', $light, $bar-light-border);\n@include tabs-background('tabs-background-stable', $stable, $bar-stable-border);\n@include tabs-background('tabs-background-positive', $positive, $bar-positive-border);\n@include tabs-background('tabs-background-calm', $calm, $bar-calm-border);\n@include tabs-background('tabs-background-assertive', $assertive, $bar-assertive-border);\n@include tabs-background('tabs-background-balanced', $balanced, $bar-balanced-border);\n@include tabs-background('tabs-background-energized',$energized, $bar-energized-border);\n@include tabs-background('tabs-background-royal', $royal, $bar-royal-border);\n@include tabs-background('tabs-background-dark', $dark, $bar-dark-border);\n\n@include tabs-color('tabs-color-light', $light);\n@include tabs-color('tabs-color-stable', $stable);\n@include tabs-color('tabs-color-positive', $positive);\n@include tabs-color('tabs-color-calm', $calm);\n@include tabs-color('tabs-color-assertive', $assertive);\n@include tabs-color('tabs-color-balanced', $balanced);\n@include tabs-color('tabs-color-energized',$energized);\n@include tabs-color('tabs-color-royal', $royal);\n@include tabs-color('tabs-color-dark', $dark);\n\n@mixin tabs-standard-color($style, $color, $off-color:$dark) {\n  &.#{$style} {\n    .tab-item {\n      color: $off-color;\n      &.tab-item-active,\n      &.active,\n      &.activated {\n        color: $color;\n      }\n    }\n\n  }\n\n  &.tabs-striped.#{$style} {\n    .tab-item {\n      &.tab-item-active,\n      &.active,\n      &.activated {\n        border-color: $color;\n        color: $color;\n      }\n    }\n\n  }\n\n}\n\nion-tabs {\n  @include tabs-standard-color('tabs-color-active-light', $light, $dark);\n  @include tabs-standard-color('tabs-color-active-stable', $stable, $dark);\n  @include tabs-standard-color('tabs-color-active-positive', $positive, $dark);\n  @include tabs-standard-color('tabs-color-active-calm', $calm, $dark);\n  @include tabs-standard-color('tabs-color-active-assertive', $assertive, $dark);\n  @include tabs-standard-color('tabs-color-active-balanced', $balanced, $dark);\n  @include tabs-standard-color('tabs-color-active-energized',$energized, $dark);\n  @include tabs-standard-color('tabs-color-active-royal', $royal, $dark);\n  @include tabs-standard-color('tabs-color-active-dark', $dark, $light);\n}\n\n.tabs-top {\n  &.tabs-striped {\n    padding-bottom:0;\n    .tab-item{\n      background: transparent;\n      // animate the top bar, leave bottom for platform consistency\n      -webkit-transition: color .1s ease;\n      -moz-transition: color .1s ease;\n      -ms-transition: color .1s ease;\n      -o-transition: color .1s ease;\n      transition: color .1s ease;\n      &.tab-item-active,\n      &.active,\n      &.activated {\n        margin-top: $tabs-striped-border-width - 1px;\n        border-width: 0px 0px $tabs-striped-border-width 0px !important;\n        border-style: solid;\n        > .badge, > i{\n          margin-top: -$tabs-striped-border-width + 1px;\n        }\n      }\n      .badge{\n        -webkit-transition: color .2s ease;\n        -moz-transition: color .2s ease;\n        -ms-transition: color .2s ease;\n        -o-transition: color .2s ease;\n        transition: color .2s ease;\n      }\n    }\n   &:not(.tabs-icon-left):not(.tabs-icon-top){\n       .tab-item{\n          &.tab-item-active,\n          &.active,\n          &.activated {\n             .tab-title, i{\n            display:block;\n            margin-top: -$tabs-striped-border-width + 1px;\n          }\n        }\n      }\n    }\n    &.tabs-icon-left{\n       .tab-item{\n          margin-top: 1px;\n          &.tab-item-active,\n          &.active,\n          &.activated {\n            .tab-title, i {\n              margin-top: -0.1em;\n          }\n        }\n      }\n    }\n  }\n}\n\n/* Allow parent element to have tabs-top */\n/* If you change this, change platform.scss as well */\n.tabs-top > .tabs,\n.tabs.tabs-top {\n  top: $bar-height;\n  padding-top: 0;\n  background-position: bottom;\n  border-top-width: 0;\n  border-bottom-width: 1px;\n  .tab-item {\n    &.tab-item-active,\n    &.active,\n    &.activated {\n      .badge {\n        top: 4%;\n      }\n    }\n  }\n}\n.tabs-top ~ .bar-header {\n  border-bottom-width: 0;\n}\n\n.tab-item {\n  @include flex(1);\n  display: block;\n  overflow: hidden;\n\n  max-width: $tab-item-max-width;\n  height: 100%;\n\n  color: inherit;\n  text-align: center;\n  text-decoration: none;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n\n  font-weight: 400;\n  font-size: $tabs-text-font-size;\n  font-family: $font-family-sans-serif;\n\n  opacity: 0.7;\n\n  &:hover {\n    cursor: pointer;\n  }\n  &.tab-hidden{\n    display:none;\n  }\n}\n\n.tabs-item-hide > .tabs,\n.tabs.tabs-item-hide {\n  display: none;\n}\n\n.tabs-icon-top > .tabs .tab-item,\n.tabs-icon-top.tabs .tab-item,\n.tabs-icon-bottom > .tabs .tab-item,\n.tabs-icon-bottom.tabs .tab-item {\n  font-size: $tabs-text-font-size-side-icon;\n  line-height: $tabs-text-font-size;\n}\n\n.tab-item .icon {\n  display: block;\n  margin: 0 auto;\n  height: $tabs-icon-size;\n  font-size: $tabs-icon-size;\n}\n\n.tabs-icon-left.tabs .tab-item,\n.tabs-icon-left > .tabs .tab-item,\n.tabs-icon-right.tabs .tab-item,\n.tabs-icon-right > .tabs .tab-item {\n  font-size: $tabs-text-font-size-side-icon;\n\n  .icon, .tab-title {\n    display: inline-block;\n    vertical-align: top;\n    margin-top: -.1em;\n\n    &:before {\n    font-size: $tabs-icon-size - 8;\n    line-height: $tabs-height;\n    }\n  }\n}\n\n.tabs-icon-left > .tabs .tab-item .icon,\n.tabs-icon-left.tabs .tab-item .icon {\n  padding-right: 3px;\n}\n\n.tabs-icon-right > .tabs .tab-item .icon,\n.tabs-icon-right.tabs .tab-item .icon {\n  padding-left: 3px;\n}\n\n.tabs-icon-only > .tabs .icon,\n.tabs-icon-only.tabs .icon {\n  line-height: inherit;\n}\n\n\n.tab-item.has-badge {\n  position: relative;\n}\n\n.tab-item .badge {\n  position: absolute;\n  top: 4%;\n  right: 33%; // fallback\n  right: calc(50% - 26px);\n  padding: $tabs-badge-padding;\n  height: auto;\n  font-size: $tabs-badge-font-size;\n  line-height: $tabs-badge-font-size + 4;\n}\n\n\n/* Navigational tab */\n\n/* Active state for tab */\n.tab-item.tab-item-active,\n.tab-item.active,\n.tab-item.activated {\n  opacity: 1;\n\n  &.tab-item-light {\n    color: $light;\n  }\n  &.tab-item-stable {\n    color: $stable;\n  }\n  &.tab-item-positive {\n    color: $positive;\n  }\n  &.tab-item-calm {\n    color: $calm;\n  }\n  &.tab-item-assertive {\n    color: $assertive;\n  }\n  &.tab-item-balanced {\n    color: $balanced;\n  }\n  &.tab-item-energized {\n    color: $energized;\n  }\n  &.tab-item-royal {\n    color: $royal;\n  }\n  &.tab-item-dark {\n    color: $dark;\n  }\n}\n\n.item.tabs {\n  @include display-flex();\n  padding: 0;\n\n  .icon:before {\n    position: relative;\n  }\n}\n\n.tab-item.disabled,\n.tab-item[disabled] {\n  opacity: .4;\n  cursor: default;\n  pointer-events: none;\n}\n\n.nav-bar-tabs-top.hide ~ .view-container .tabs-top .tabs{\n  top: 0\n}\n.pane[hide-nav-bar=\"true\"] .has-tabs-top{\n  top:$tabs-height\n}\n\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_toggle.scss",
    "content": "\n/**\n * Toggle\n * --------------------------------------------------\n */\n\n.item-toggle {\n  pointer-events: none;\n}\n\n.toggle {\n  // set the color defaults\n  @include toggle-style($toggle-on-default-border, $toggle-on-default-bg);\n\n  position: relative;\n  display: inline-block;\n  pointer-events: auto;\n  margin: -$toggle-hit-area-expansion;\n  padding: $toggle-hit-area-expansion;\n\n  &.dragging {\n    .handle {\n      background-color: $toggle-handle-dragging-bg-color !important;\n    }\n  }\n\n}\n\n.toggle {\n  &.toggle-light  {\n    @include toggle-style($toggle-on-light-border, $toggle-on-light-bg);\n  }\n  &.toggle-stable  {\n    @include toggle-style($toggle-on-stable-border, $toggle-on-stable-bg);\n  }\n  &.toggle-positive  {\n    @include toggle-style($toggle-on-positive-border, $toggle-on-positive-bg);\n  }\n  &.toggle-calm  {\n    @include toggle-style($toggle-on-calm-border, $toggle-on-calm-bg);\n  }\n  &.toggle-assertive  {\n    @include toggle-style($toggle-on-assertive-border, $toggle-on-assertive-bg);\n  }\n  &.toggle-balanced  {\n    @include toggle-style($toggle-on-balanced-border, $toggle-on-balanced-bg);\n  }\n  &.toggle-energized  {\n    @include toggle-style($toggle-on-energized-border, $toggle-on-energized-bg);\n  }\n  &.toggle-royal  {\n    @include toggle-style($toggle-on-royal-border, $toggle-on-royal-bg);\n  }\n  &.toggle-dark  {\n    @include toggle-style($toggle-on-dark-border, $toggle-on-dark-bg);\n  }\n}\n\n.toggle input {\n  // hide the actual input checkbox\n  display: none;\n}\n\n/* the track appearance when the toggle is \"off\" */\n.toggle .track {\n  @include transition-timing-function(ease-in-out);\n  @include transition-duration($toggle-transition-duration);\n  @include transition-property((background-color, border));\n\n  display: inline-block;\n  box-sizing: border-box;\n  width: $toggle-width;\n  height: $toggle-height;\n  border: solid $toggle-border-width $toggle-off-border-color;\n  border-radius: $toggle-border-radius;\n  background-color: $toggle-off-bg-color;\n  content: ' ';\n  cursor: pointer;\n  pointer-events: none;\n}\n\n/* Fix to avoid background color bleeding */\n/* (occurred on (at least) Android 4.2, Asus MeMO Pad HD7 ME173X) */\n.platform-android4_2 .toggle .track {\n  -webkit-background-clip: padding-box;\n}\n\n/* the handle (circle) thats inside the toggle's track area */\n/* also the handle's appearance when it is \"off\" */\n.toggle .handle {\n  @include transition($toggle-transition-duration cubic-bezier(0, 1.1, 1, 1.1));\n  @include transition-property((background-color, transform));\n  position: absolute;\n  display: block;\n  width: $toggle-handle-width;\n  height: $toggle-handle-height;\n  border-radius: $toggle-handle-radius;\n  background-color: $toggle-handle-off-bg-color;\n  top: $toggle-border-width + $toggle-hit-area-expansion;\n  left: $toggle-border-width + $toggle-hit-area-expansion;\n  box-shadow: 0 2px 7px rgba(0,0,0,.35), 0 1px 1px rgba(0,0,0,.15);\n\n  &:before {\n    // used to create a larger (but hidden) hit area to slide the handle\n    position: absolute;\n    top: -4px;\n    left: ( ($toggle-handle-width / 2) * -1) - 8;\n    padding: ($toggle-handle-height / 2) + 5 ($toggle-handle-width + 7);\n    content: \" \";\n  }\n}\n\n.toggle input:checked + .track .handle {\n  // the handle when the toggle is \"on\"\n  @include translate3d($toggle-width - $toggle-handle-width - ($toggle-border-width * 2), 0, 0);\n  background-color: $toggle-handle-on-bg-color;\n}\n\n.item-toggle.active {\n  box-shadow: none;\n}\n\n.item-toggle,\n.item-toggle.item-complex .item-content {\n  // make sure list item content have enough padding on right to fit the toggle\n  padding-right: ($item-padding * 3) + $toggle-width;\n}\n\n.item-toggle.item-complex {\n  padding-right: 0;\n}\n\n.item-toggle .toggle {\n  // position the toggle to the right within a list item\n  position: absolute;\n  top: ($item-padding / 2) + 2;\n  right: $item-padding;\n  z-index: $z-index-item-toggle;\n}\n\n.toggle input:disabled + .track {\n  opacity: .6;\n}\n\n.toggle-small {\n\n  .track {\n    border: 0;\n    width: 34px;\n    height: 15px;\n    background: #9e9e9e;\n  }\n  input:checked + .track {\n    background: rgba(0,150,137,.5);\n  }\n  .handle {\n    top: 2px;\n    left: 4px;\n    width: 21px;\n    height: 21px;\n    box-shadow: 0 2px 5px rgba(0,0,0,.25);\n  }\n  input:checked + .track .handle {\n    @include translate3d(16px, 0, 0);\n    background: rgb(0,150,137);\n  }\n  &.item-toggle .toggle {\n    top: 19px;\n  }\n\n  .toggle-light  {\n    @include toggle-small-style($toggle-on-light-bg);\n  }\n  .toggle-stable  {\n    @include toggle-small-style($toggle-on-stable-bg);\n  }\n  .toggle-positive  {\n    @include toggle-small-style($toggle-on-positive-bg);\n  }\n  .toggle-calm  {\n    @include toggle-small-style($toggle-on-calm-bg);\n  }\n  .toggle-assertive  {\n    @include toggle-small-style($toggle-on-assertive-bg);\n  }\n  .toggle-balanced  {\n    @include toggle-small-style($toggle-on-balanced-bg);\n  }\n  .toggle-energized  {\n    @include toggle-small-style($toggle-on-energized-bg);\n  }\n  .toggle-royal  {\n    @include toggle-small-style($toggle-on-royal-bg);\n  }\n  .toggle-dark  {\n    @include toggle-small-style($toggle-on-dark-bg);\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_transitions.scss",
    "content": "\n// iOS View Transitions\n// -------------------------------\n\n$ios-transition-duration:              500ms !default;\n$ios-transition-timing-function:       cubic-bezier(.36, .66, .04, 1) !default;\n$ios-transition-container-bg-color:    #000 !default;\n\n\n[nav-view-transition=\"ios\"] {\n\n  [nav-view=\"entering\"],\n  [nav-view=\"leaving\"] {\n    @include transition-duration( $ios-transition-duration );\n    @include transition-timing-function( $ios-transition-timing-function );\n    -webkit-transition-property: opacity, -webkit-transform, box-shadow;\n            transition-property: opacity, transform, box-shadow;\n  }\n\n  &[nav-view-direction=\"forward\"],\n  &[nav-view-direction=\"back\"] {\n    background-color: $ios-transition-container-bg-color;\n  }\n\n  [nav-view=\"active\"],\n  &[nav-view-direction=\"forward\"] [nav-view=\"entering\"],\n  &[nav-view-direction=\"back\"] [nav-view=\"leaving\"] {\n    z-index: $z-index-view-above;\n  }\n\n  &[nav-view-direction=\"back\"] [nav-view=\"entering\"],\n  &[nav-view-direction=\"forward\"] [nav-view=\"leaving\"] {\n    z-index: $z-index-view-below;\n  }\n\n}\n\n\n\n// iOS Nav Bar Transitions\n// -------------------------------\n\n[nav-bar-transition=\"ios\"] {\n\n  .title,\n  .buttons,\n  .back-text {\n    @include transition-duration( $ios-transition-duration );\n    @include transition-timing-function( $ios-transition-timing-function );\n    -webkit-transition-property: opacity, -webkit-transform;\n            transition-property: opacity, transform;\n  }\n\n  [nav-bar=\"active\"],\n  [nav-bar=\"entering\"] {\n    z-index: $z-index-bar-above;\n\n   .bar {\n      background: transparent;\n    }\n  }\n\n  [nav-bar=\"cached\"] {\n    display: block;\n\n    .header-item {\n      display: none;\n    }\n  }\n\n}\n\n\n\n// Android View Transitions\n// -------------------------------\n\n$android-transition-duration:             200ms !default;\n$android-transition-timing-function:      cubic-bezier(0.4, 0.6, 0.2, 1) !default;\n\n\n[nav-view-transition=\"android\"] {\n\n  [nav-view=\"entering\"],\n  [nav-view=\"leaving\"] {\n    @include transition-duration( $android-transition-duration );\n    @include transition-timing-function( $android-transition-timing-function );\n    -webkit-transition-property: -webkit-transform;\n            transition-property: transform;\n  }\n\n  [nav-view=\"active\"],\n  &[nav-view-direction=\"forward\"] [nav-view=\"entering\"],\n  &[nav-view-direction=\"back\"] [nav-view=\"leaving\"] {\n    z-index: $z-index-view-above;\n  }\n\n  &[nav-view-direction=\"back\"] [nav-view=\"entering\"],\n  &[nav-view-direction=\"forward\"] [nav-view=\"leaving\"] {\n    z-index: $z-index-view-below;\n  }\n\n}\n\n\n\n// Android Nav Bar Transitions\n// -------------------------------\n\n[nav-bar-transition=\"android\"] {\n\n  .title,\n  .buttons {\n    @include transition-duration( $android-transition-duration );\n    @include transition-timing-function( $android-transition-timing-function );\n    -webkit-transition-property: opacity;\n            transition-property: opacity;\n  }\n\n  [nav-bar=\"active\"],\n  [nav-bar=\"entering\"] {\n    z-index: $z-index-bar-above;\n\n   .bar {\n      background: transparent;\n    }\n  }\n\n  [nav-bar=\"cached\"] {\n    display: block;\n\n    .header-item {\n      display: none;\n    }\n  }\n\n}\n\n\n\n// Nav Swipe\n// -------------------------------\n\n[nav-swipe=\"fast\"] {\n  [nav-view],\n  .title,\n  .buttons,\n  .back-text {\n    @include transition-duration(50ms);\n    @include transition-timing-function(linear);\n  }\n}\n\n[nav-swipe=\"slow\"] {\n  [nav-view],\n  .title,\n  .buttons,\n  .back-text {\n    @include transition-duration(160ms);\n    @include transition-timing-function(linear);\n  }\n}\n\n\n\n// Transition Settings\n// -------------------------------\n\n[nav-view=\"cached\"],\n[nav-bar=\"cached\"] {\n  display: none;\n}\n\n[nav-view=\"stage\"] {\n  opacity: 0;\n  @include transition-duration( 0 );\n}\n\n[nav-bar=\"stage\"] {\n  .title,\n  .buttons,\n  .back-text {\n    position: absolute;\n    opacity: 0;\n    @include transition-duration(0s);\n  }\n}\n\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_type.scss",
    "content": "\n/**\n * Typography\n * --------------------------------------------------\n */\n\n\n// Body text\n// -------------------------\n\np {\n  margin: 0 0 ($line-height-computed / 2);\n}\n\n\n// Emphasis & misc\n// -------------------------\n\nsmall   { font-size: 85%; }\ncite    { font-style: normal; }\n\n\n// Alignment\n// -------------------------\n\n.text-left           { text-align: left; }\n.text-right          { text-align: right; }\n.text-center         { text-align: center; }\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n  color: $base-color;\n  font-weight: $headings-font-weight;\n  font-family: $headings-font-family;\n  line-height: $headings-line-height;\n\n  small {\n    font-weight: normal;\n    line-height: 1;\n  }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n  margin-top: $line-height-computed;\n  margin-bottom: ($line-height-computed / 2);\n\n  &:first-child {\n    margin-top: 0;\n  }\n\n  + h1, + .h1,\n  + h2, + .h2,\n  + h3, + .h3 {\n    margin-top: ($line-height-computed / 2);\n  }\n}\n\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n  margin-top: ($line-height-computed / 2);\n  margin-bottom: ($line-height-computed / 2);\n}\n\nh1, .h1 { font-size: floor($font-size-base * 2.60); } // ~36px\nh2, .h2 { font-size: floor($font-size-base * 2.15); } // ~30px\nh3, .h3 { font-size: ceil($font-size-base * 1.70); } // ~24px\nh4, .h4 { font-size: ceil($font-size-base * 1.25); } // ~18px\nh5, .h5 { font-size:  $font-size-base; }\nh6, .h6 { font-size: ceil($font-size-base * 0.85); } // ~12px\n\nh1 small, .h1 small { font-size: ceil($font-size-base * 1.70); } // ~24px\nh2 small, .h2 small { font-size: ceil($font-size-base * 1.25); } // ~18px\nh3 small, .h3 small,\nh4 small, .h4 small { font-size: $font-size-base; }\n\n\n// Description Lists\n// -------------------------\n\ndl {\n  margin-bottom: $line-height-computed;\n}\ndt,\ndd {\n  line-height: $line-height-base;\n}\ndt {\n  font-weight: bold;\n}\n\n\n// Blockquotes\n// -------------------------\n\nblockquote {\n  margin: 0 0 $line-height-computed;\n  padding: ($line-height-computed / 2) $line-height-computed;\n  border-left: 5px solid gray;\n\n  p {\n    font-weight: 300;\n    font-size: ($font-size-base * 1.25);\n    line-height: 1.25;\n  }\n\n  p:last-child {\n    margin-bottom: 0;\n  }\n\n  small {\n    display: block;\n    line-height: $line-height-base;\n    &:before {\n      content: '\\2014 \\00A0';// EM DASH, NBSP;\n    }\n  }\n}\n\n\n// Quotes\n// -------------------------\n\nq:before,\nq:after,\nblockquote:before,\nblockquote:after {\n  content: \"\";\n}\n\n\n// Addresses\n// -------------------------\n\naddress {\n  display: block;\n  margin-bottom: $line-height-computed;\n  font-style: normal;\n  line-height: $line-height-base;\n}\n\n\n// Links\n// -------------------------\na {\n  color: $link-color;\n}\n\na.subdued {\n  padding-right: 10px;\n  color: #888;\n  text-decoration: none;\n\n  &:hover {\n    text-decoration: none;\n  }\n  &:last-child {\n    padding-right: 0;\n  }\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_util.scss",
    "content": "\n/**\n * Utility Classes\n * --------------------------------------------------\n */\n\n.hide {\n  display: none;\n}\n.opacity-hide {\n  opacity: 0;\n}\n.grade-b .opacity-hide,\n.grade-c .opacity-hide {\n  opacity: 1;\n  display: none;\n}\n.show {\n  display: block;\n}\n.opacity-show {\n  opacity: 1;\n}\n.invisible {\n  visibility: hidden;\n}\n\n.keyboard-open .hide-on-keyboard-open {\n  display: none;\n}\n\n.keyboard-open .tabs.hide-on-keyboard-open + .pane .has-tabs,\n.keyboard-open .bar-footer.hide-on-keyboard-open + .pane .has-footer {\n  bottom: 0;\n}\n\n.inline {\n  display: inline-block;\n}\n\n.disable-pointer-events {\n  pointer-events: none;\n}\n\n.enable-pointer-events {\n  pointer-events: auto;\n}\n\n.disable-user-behavior {\n  // used to prevent the browser from doing its native behavior. this doesnt\n  // prevent the scrolling, but cancels the contextmenu, tap highlighting, etc\n\n  @include user-select(none);\n  @include touch-callout(none);\n  @include tap-highlight-transparent();\n\n  -webkit-user-drag: none;\n\n  -ms-touch-action: none;\n  -ms-content-zooming: none;\n}\n\n// Fill the screen to block clicks (a better pointer-events: none) for the body\n// to avoid full-page reflows and paints which can cause flickers\n.click-block {\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  opacity: 0;\n  z-index: $z-index-click-block;\n  @include translate3d(0, 0, 0);\n  overflow: hidden;\n}\n.click-block-hide {\n  @include translate3d(-9999px, 0, 0);\n}\n\n.no-resize {\n  resize: none;\n}\n\n.block {\n  display: block;\n  clear: both;\n  &:after {\n    display: block;\n    visibility: hidden;\n    clear: both;\n    height: 0;\n    content: \".\";\n  }\n}\n\n.full-image {\n  width: 100%;\n}\n\n.clearfix {\n  *zoom: 1;\n  &:before,\n  &:after {\n    display: table;\n    content: \"\";\n    // Fixes Opera/contenteditable bug:\n    // http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952\n    line-height: 0;\n  }\n  &:after {\n    clear: both;\n  }\n}\n\n/**\n * Content Padding\n * --------------------------------------------------\n */\n\n.padding {\n  padding: $content-padding;\n}\n\n.padding-top,\n.padding-vertical {\n  padding-top: $content-padding;\n}\n\n.padding-right,\n.padding-horizontal {\n  padding-right: $content-padding;\n}\n\n.padding-bottom,\n.padding-vertical {\n  padding-bottom: $content-padding;\n}\n\n.padding-left,\n.padding-horizontal {\n  padding-left: $content-padding;\n}\n\n\n/**\n * Scrollable iFrames\n * --------------------------------------------------\n */\n\n.iframe-wrapper {\n  position: fixed;\n  -webkit-overflow-scrolling: touch;\n  overflow: scroll;\n\n  iframe {\n    height: 100%;\n    width: 100%;\n  }\n}\n\n\n/**\n * Rounded\n * --------------------------------------------------\n */\n\n.rounded {\n  border-radius: $border-radius-base;\n}\n\n\n/**\n * Utility Colors\n * --------------------------------------------------\n * Utility colors are added to help set a naming convention. You'll\n * notice we purposely do not use words like \"red\" or \"blue\", but\n * instead have colors which represent an emotion or generic theme.\n */\n\n.light, a.light {\n  color: $light;\n}\n.light-bg {\n  background-color: $light;\n}\n.light-border {\n  border-color: $button-light-border;\n}\n\n.stable, a.stable {\n  color: $stable;\n}\n.stable-bg {\n  background-color: $stable;\n}\n.stable-border {\n  border-color: $button-stable-border;\n}\n\n.positive, a.positive {\n  color: $positive;\n}\n.positive-bg {\n  background-color: $positive;\n}\n.positive-border {\n  border-color: $button-positive-border;\n}\n\n.calm, a.calm {\n  color: $calm;\n}\n.calm-bg {\n  background-color: $calm;\n}\n.calm-border {\n  border-color: $button-calm-border;\n}\n\n.assertive, a.assertive {\n  color: $assertive;\n}\n.assertive-bg {\n  background-color: $assertive;\n}\n.assertive-border {\n  border-color: $button-assertive-border;\n}\n\n.balanced, a.balanced {\n  color: $balanced;\n}\n.balanced-bg {\n  background-color: $balanced;\n}\n.balanced-border {\n  border-color: $button-balanced-border;\n}\n\n.energized, a.energized {\n  color: $energized;\n}\n.energized-bg {\n  background-color: $energized;\n}\n.energized-border {\n  border-color: $button-energized-border;\n}\n\n.royal, a.royal {\n  color: $royal;\n}\n.royal-bg {\n  background-color: $royal;\n}\n.royal-border {\n  border-color: $button-royal-border;\n}\n\n.dark, a.dark {\n  color: $dark;\n}\n.dark-bg {\n  background-color: $dark;\n}\n.dark-border {\n  border-color: $button-dark-border;\n}\n\n[collection-repeat] {\n  /* Position is set by transforms */\n  left: 0 !important;\n  top: 0 !important;\n  position: absolute !important;\n  z-index: 1;\n}\n.collection-repeat-container {\n  position: relative;\n  z-index: 1; //make sure it's above the after-container\n}\n.collection-repeat-after-container {\n  z-index: 0;\n  display: block;\n\n  /* when scrolling horizontally, make sure the after container doesn't take up 100% width */\n  &.horizontal {\n    display: inline-block;\n  }\n}\n\n// ng-show fix for windows phone\n// https://www.hoessl.eu/2014/12/on-using-the-ionic-framework-for-windows-phone-8-1-apps/\n[ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak,\n.x-ng-cloak, .ng-hide:not(.ng-hide-animate) {\n  display: none !important;\n}"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/_variables.scss",
    "content": "\n// Colors\n// -------------------------------\n\n$light:                           #fff !default;\n$stable:                          #f8f8f8 !default;\n$positive:                        #387ef5 !default;\n$calm:                            #11c1f3 !default;\n$balanced:                        #33cd5f !default;\n$energized:                       #ffc900 !default;\n$assertive:                       #ef473a !default;\n$royal:                           #886aea !default;\n$dark:                            #444 !default;\n\n\n// Base\n// -------------------------------\n\n$font-family-sans-serif:           '-apple-system', \"Helvetica Neue\", \"Roboto\", \"Segoe UI\", sans-serif !default;\n\n$font-family-light-sans-serif:    '-apple-system', \"HelveticaNeue-Light\", \"Roboto-Light\", \"Segoe UI-Light\", sans-serif-light !default;\n$font-family-serif:               serif !default;\n$font-family-monospace:           monospace !default;\n\n$font-family-base:                $font-family-sans-serif !default;\n$font-size-base:                  14px !default;\n$font-size-large:                 18px !default;\n$font-size-small:                 11px !default;\n\n$line-height-base:                1.428571429 !default; // 20/14\n$line-height-computed:            floor($font-size-base * $line-height-base) !default; // ~20px\n$line-height-large:               1.33 !default;\n$line-height-small:               1.5 !default;\n\n$headings-font-family:            $font-family-base !default;\n$headings-font-weight:            500 !default;\n$headings-line-height:            1.2 !default;\n\n$base-background-color:           #fff !default;\n$base-color:                      #000 !default;\n\n$link-color:                      $positive !default;\n$link-hover-color:                darken($link-color, 15%) !default;\n\n$content-padding:                 10px !default;\n\n$padding-base-vertical:           6px !default;\n$padding-base-horizontal:         12px !default;\n\n$padding-large-vertical:          10px !default;\n$padding-large-horizontal:        16px !default;\n\n$padding-small-vertical:          5px !default;\n$padding-small-horizontal:        10px !default;\n\n$border-radius-base:              4px !default;\n$border-radius-large:             6px !default;\n$border-radius-small:             3px !default;\n\n\n// Content\n// -------------------------------\n\n$scroll-refresh-icon-color:       #666666 !default;\n\n\n// Buttons\n// -------------------------------\n\n$button-color:                    #222 !default;\n$button-block-margin:             10px !default;\n$button-clear-padding:            6px !default;\n$button-border-radius:            4px !default;\n$button-border-width:             1px !default;\n\n$button-font-size:                16px !default;\n$button-height:                   42px !default;\n$button-padding:                  12px !default;\n$button-icon-size:                24px !default;\n\n$button-large-font-size:          20px !default;\n$button-large-height:             54px !default;\n$button-large-padding:            16px !default;\n$button-large-icon-size:          32px !default;\n\n$button-small-font-size:          12px !default;\n$button-small-height:             28px !default;\n$button-small-padding:            4px !default;\n$button-small-icon-size:          16px !default;\n\n$button-bar-button-font-size:     13px !default;\n$button-bar-button-height:        32px !default;\n$button-bar-button-padding:       8px !default;\n$button-bar-button-icon-size:     20px !default;\n\n$button-default-border:           transparent !default;\n$button-default-active-border:    null !default;\n\n$button-light-bg:                 $light !default;\n$button-light-text:               #444 !default;\n$button-light-border:             #ddd !default;\n$button-light-active-bg:          #fafafa !default;\n$button-light-active-border:      #ccc !default;\n\n$button-stable-bg:                $stable !default;\n$button-stable-text:              #444 !default;\n$button-stable-border:            #b2b2b2 !default;\n$button-stable-active-bg:         #e5e5e5 !default;\n$button-stable-active-border:     #a2a2a2 !default;\n\n$button-positive-bg:              $positive !default;\n$button-positive-text:            #fff !default;\n$button-positive-border:          darken($positive, 10%) !default;\n$button-positive-active-bg:       darken($positive, 10%) !default;\n$button-positive-active-border:   darken($positive, 10%) !default;\n\n$button-calm-bg:                  $calm !default;\n$button-calm-text:                #fff !default;\n$button-calm-border:              darken($calm, 10%) !default;\n$button-calm-active-bg:           darken($calm, 10%) !default;\n$button-calm-active-border:       darken($calm, 10%) !default;\n\n$button-assertive-bg:             $assertive !default;\n$button-assertive-text:           #fff !default;\n$button-assertive-border:         darken($assertive, 10%) !default;\n$button-assertive-active-bg:      darken($assertive, 10%) !default;\n$button-assertive-active-border:  darken($assertive, 10%) !default;\n\n$button-balanced-bg:              $balanced !default;\n$button-balanced-text:            #fff !default;\n$button-balanced-border:          darken($balanced, 10%) !default;\n$button-balanced-active-bg:       darken($balanced, 10%) !default;\n$button-balanced-active-border:   darken($balanced, 10%) !default;\n\n$button-energized-bg:             $energized !default;\n$button-energized-text:           #fff !default;\n$button-energized-border:         darken($energized, 5%) !default;\n$button-energized-active-bg:      darken($energized, 5%) !default;\n$button-energized-active-border:  darken($energized, 5%) !default;\n\n$button-royal-bg:                 $royal !default;\n$button-royal-text:               #fff !default;\n$button-royal-border:             darken($royal, 8%) !default;\n$button-royal-active-bg:          darken($royal, 8%) !default;\n$button-royal-active-border:      darken($royal, 8%) !default;\n\n$button-dark-bg:                  $dark !default;\n$button-dark-text:                #fff !default;\n$button-dark-border:              #111 !default;\n$button-dark-active-bg:           #262626 !default;\n$button-dark-active-border:       #000 !default;\n\n$button-default-bg:               $button-stable-bg !default;\n$button-default-text:             $button-stable-text !default;\n$button-default-border:           $button-stable-border !default;\n$button-default-active-bg:        $button-stable-active-bg !default;\n$button-default-active-border:    $button-stable-active-border !default;\n\n\n// Bars\n// -------------------------------\n\n$bar-height:                      44px !default;\n$bar-title-font-size:             17px !default;\n$bar-padding-portrait:            5px !default;\n$bar-padding-landscape:           5px !default;\n$bar-transparency:                1 !default;\n\n$bar-footer-height:               $bar-height !default;\n$bar-subheader-height:            $bar-height !default;\n$bar-subfooter-height:            $bar-height !default;\n\n$bar-light-bg:                    rgba($button-light-bg, $bar-transparency) !default;\n$bar-light-text:                  $button-light-text !default;\n$bar-light-border:                $button-light-border !default;\n$bar-light-active-bg:             $button-light-active-bg !default;\n$bar-light-active-border:         $button-light-active-border !default;\n\n$bar-stable-bg:                   rgba($button-stable-bg, $bar-transparency) !default;\n$bar-stable-text:                 $button-stable-text !default;\n$bar-stable-border:               $button-stable-border !default;\n$bar-stable-active-bg:            $button-stable-active-bg !default;\n$bar-stable-active-border:        $button-stable-active-border !default;\n\n$bar-positive-bg:                 rgba($button-positive-bg, $bar-transparency) !default;\n$bar-positive-text:               $button-positive-text !default;\n$bar-positive-border:             $button-positive-border !default;\n$bar-positive-active-bg:          $button-positive-active-bg !default;\n$bar-positive-active-border:      $button-positive-active-border !default;\n\n$bar-calm-bg:                     rgba($button-calm-bg, $bar-transparency) !default;\n$bar-calm-text:                   $button-calm-text !default;\n$bar-calm-border:                 $button-calm-border !default;\n$bar-calm-active-bg:              $button-calm-active-bg !default;\n$bar-calm-active-border:          $button-calm-active-border !default;\n\n$bar-assertive-bg:                rgba($button-assertive-bg, $bar-transparency) !default;\n$bar-assertive-text:              $button-assertive-text !default;\n$bar-assertive-border:            $button-assertive-border !default;\n$bar-assertive-active-bg:         $button-assertive-active-bg !default;\n$bar-assertive-active-border:     $button-assertive-active-border !default;\n\n$bar-balanced-bg:                 rgba($button-balanced-bg, $bar-transparency) !default;\n$bar-balanced-text:               $button-balanced-text !default;\n$bar-balanced-border:             $button-balanced-border !default;\n$bar-balanced-active-bg:          $button-balanced-active-bg !default;\n$bar-balanced-active-border:      $button-balanced-active-border !default;\n\n$bar-energized-bg:                rgba($button-energized-bg, $bar-transparency) !default;\n$bar-energized-text:              $button-energized-text !default;\n$bar-energized-border:            $button-energized-border !default;\n$bar-energized-active-bg:         $button-energized-active-bg !default;\n$bar-energized-active-border:     $button-energized-active-border !default;\n\n$bar-royal-bg:                    rgba($button-royal-bg, $bar-transparency) !default;\n$bar-royal-text:                  $button-royal-text !default;\n$bar-royal-border:                $button-royal-border !default;\n$bar-royal-active-bg:             $button-royal-active-bg !default;\n$bar-royal-active-border:         $button-royal-active-border !default;\n\n$bar-dark-bg:                     rgba($button-dark-bg, $bar-transparency) !default;\n$bar-dark-text:                   $button-dark-text !default;\n$bar-dark-border:                 $button-dark-border !default;\n$bar-dark-active-bg:              $button-dark-active-bg !default;\n$bar-dark-active-border:          $button-dark-active-border !default;\n\n$bar-default-bg:                  $bar-light-bg !default;\n$bar-default-text:                $bar-light-text !default;\n$bar-default-border:              $bar-light-border !default;\n$bar-default-active-bg:           $bar-light-active-bg !default;\n$bar-default-active-border:       $bar-light-active-border !default;\n\n\n// Tabs\n// -------------------------------\n\n$tabs-height:                     49px !default;\n$tabs-text-font-size:             14px !default;\n$tabs-text-font-size-side-icon:   10px !default;\n$tabs-icon-size:                  32px !default;\n$tabs-badge-padding:              1px 6px !default;\n$tabs-badge-font-size:            12px !default;\n\n$tabs-light-bg:                   $button-light-bg !default;\n$tabs-light-border:               $button-light-border !default;\n$tabs-light-text:                 $button-light-text !default;\n\n$tabs-stable-bg:                  $button-stable-bg !default;\n$tabs-stable-border:              $button-stable-border !default;\n$tabs-stable-text:                $button-stable-text !default;\n\n$tabs-positive-bg:                $button-positive-bg !default;\n$tabs-positive-border:            $button-positive-border !default;\n$tabs-positive-text:              $button-positive-text !default;\n\n$tabs-calm-bg:                    $button-calm-bg !default;\n$tabs-calm-border:                $button-calm-border !default;\n$tabs-calm-text:                  $button-calm-text !default;\n\n$tabs-assertive-bg:               $button-assertive-bg !default;\n$tabs-assertive-border:           $button-assertive-border !default;\n$tabs-assertive-text:             $button-assertive-text !default;\n\n$tabs-balanced-bg:                $button-balanced-bg !default;\n$tabs-balanced-border:            $button-balanced-border !default;\n$tabs-balanced-text:              $button-balanced-text !default;\n\n$tabs-energized-bg:               $button-energized-bg !default;\n$tabs-energized-border:           $button-energized-border !default;\n$tabs-energized-text:             $button-energized-text !default;\n\n$tabs-royal-bg:                   $button-royal-bg !default;\n$tabs-royal-border:               $button-royal-border !default;\n$tabs-royal-text:                 $button-royal-text !default;\n\n$tabs-dark-bg:                    $button-dark-bg !default;\n$tabs-dark-border:                $button-dark-border !default;\n$tabs-dark-text:                  $button-dark-text !default;\n\n$tabs-default-bg:                 $tabs-stable-bg !default;\n$tabs-default-border:             $tabs-stable-border !default;\n$tabs-default-text:               $tabs-stable-text !default;\n\n$tab-item-max-width:              150px !default;\n\n$tabs-off-opacity:                0.4 !default;\n$tabs-striped-off-opacity:        $tabs-off-opacity !default;\n$tabs-striped-off-color:          #000 !default;\n$tabs-striped-border-width:       2px !default;\n\n\n// Items\n// -------------------------------\n\n$item-font-size:                  16px !default;\n$item-border-width:               1px !default;\n$item-padding:                    16px !default;\n\n$item-button-font-size:           18px !default;\n$item-button-line-height:         32px !default;\n$item-icon-font-size:             32px !default;\n$item-icon-fill-font-size:        28px !default;\n\n$item-icon-accessory-color:       #ccc !default;\n$item-icon-accessory-font-size:   16px !default;\n\n$item-avatar-width:               40px !default;\n$item-avatar-height:              40px !default;\n$item-avatar-border-radius:       50% !default;\n\n$item-thumbnail-width:            80px !default;\n$item-thumbnail-height:           80px !default;\n$item-thumbnail-margin:           10px !default;\n\n$item-divider-bg:                 #f5f5f5 !default;\n$item-divider-color:              #222 !default;\n$item-divider-padding:            5px 15px !default;\n\n$item-light-bg:                   $button-light-bg !default;\n$item-light-border:               $button-light-border !default;\n$item-light-text:                 $button-light-text !default;\n$item-light-active-bg:            $button-light-active-bg !default;\n$item-light-active-border:        $button-light-active-border !default;\n\n$item-stable-bg:                  $button-stable-bg !default;\n$item-stable-border:              $button-stable-border !default;\n$item-stable-text:                $button-stable-text !default;\n$item-stable-active-bg:           $button-stable-active-bg !default;\n$item-stable-active-border:       $button-stable-active-border !default;\n\n$item-positive-bg:                $button-positive-bg !default;\n$item-positive-border:            $button-positive-border !default;\n$item-positive-text:              $button-positive-text !default;\n$item-positive-active-bg:         $button-positive-active-bg !default;\n$item-positive-active-border:     $button-positive-active-border !default;\n\n$item-calm-bg:                    $button-calm-bg !default;\n$item-calm-border:                $button-calm-border !default;\n$item-calm-text:                  $button-calm-text !default;\n$item-calm-active-bg:             $button-calm-active-bg !default;\n$item-calm-active-border:         $button-calm-active-border !default;\n\n$item-assertive-bg:               $button-assertive-bg !default;\n$item-assertive-border:           $button-assertive-border !default;\n$item-assertive-text:             $button-assertive-text !default;\n$item-assertive-active-bg:        $button-assertive-active-bg !default;\n$item-assertive-active-border:    $button-assertive-active-border !default;\n\n$item-balanced-bg:                $button-balanced-bg !default;\n$item-balanced-border:            $button-balanced-border !default;\n$item-balanced-text:              $button-balanced-text !default;\n$item-balanced-active-bg:         $button-balanced-active-bg !default;\n$item-balanced-active-border:     $button-balanced-active-border !default;\n\n$item-energized-bg:               $button-energized-bg !default;\n$item-energized-border:           $button-energized-border !default;\n$item-energized-text:             $button-energized-text !default;\n$item-energized-active-bg:        $button-energized-active-bg !default;\n$item-energized-active-border:    $button-energized-active-border !default;\n\n$item-royal-bg:                   $button-royal-bg !default;\n$item-royal-border:               $button-royal-border !default;\n$item-royal-text:                 $button-royal-text !default;\n$item-royal-active-bg:            $button-royal-active-bg !default;\n$item-royal-active-border:        $button-royal-active-border !default;\n\n$item-dark-bg:                    $button-dark-bg !default;\n$item-dark-border:                $button-dark-border !default;\n$item-dark-text:                  $button-dark-text !default;\n$item-dark-active-bg:             $button-dark-active-bg !default;\n$item-dark-active-border:         $button-dark-active-border !default;\n\n$item-default-bg:                 $item-light-bg !default;\n$item-default-border:             $item-light-border !default;\n$item-default-text:               $item-light-text !default;\n$item-default-active-bg:          #D9D9D9 !default;\n$item-default-active-border:      $item-light-active-border !default;\n\n\n// Item Editing\n// -------------------------------\n\n$item-edit-transition-duration:   250ms !default;\n$item-edit-transition-function:   ease-in-out !default;\n\n$item-remove-transition-duration:   300ms !default;\n$item-remove-transition-function:   ease-in !default;\n$item-remove-descendents-transition-function:  cubic-bezier(.25,.81,.24,1) !default;\n\n$item-left-edit-left:             8px !default;  // item's left side edit's \"left\" property\n\n$item-right-edit-open-width:      50px !default;\n$item-left-edit-open-width:       50px !default;\n\n$item-delete-icon-size:           24px !default;\n$item-delete-icon-color:          $assertive !default;\n\n$item-reorder-icon-size:          32px !default;\n$item-reorder-icon-color:         $dark !default;\n\n\n// Lists\n// -------------------------------\n\n$list-header-bg:                  transparent !default;\n$list-header-color:               #222 !default;\n$list-header-padding:             5px 15px !default;\n$list-header-margin-top:          20px !default;\n\n\n// Cards\n// -------------------------------\n\n$card-header-bg:                  #F5F5F5 !default;\n$card-body-bg:                    #fff !default;\n$card-footer-bg:                  #F5F5F5 !default;\n\n$card-padding:                    10px !default;\n$card-border-width:               1px !default;\n\n$card-border-color:               #ccc !default;\n$card-border-radius:              2px !default;\n$card-box-shadow:                 0 1px 3px rgba(0, 0, 0, .3) !default;\n\n\n// Forms\n// -------------------------------\n\n$input-height-base:               ($line-height-computed + ($padding-base-vertical * 2) + 2) !default;\n$input-height-large:              (floor($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2) !default;\n$input-height-small:              (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default;\n\n$input-bg:                        $light !default;\n$input-bg-disabled:               $stable !default;\n\n$input-color:                     #111 !default;\n$input-border:                    $item-default-border !default;\n$input-border-width:              $item-border-width !default;\n$input-label-color:               $dark !default;\n$input-color-placeholder:         lighten($dark, 40%) !default;\n\n\n// Progress\n// -------------------------------\n\n$progress-width:                  100% !default;\n$progress-margin:                 15px auto !default;\n\n\n// Toggle\n// -------------------------------\n\n$toggle-width:                    51px !default;\n$toggle-height:                   31px !default;\n$toggle-border-width:             2px !default;\n$toggle-border-radius:            20px !default;\n\n$toggle-handle-width:             $toggle-height - ($toggle-border-width * 2) !default;\n$toggle-handle-height:            $toggle-handle-width !default;\n$toggle-handle-radius:            $toggle-handle-width !default;\n$toggle-handle-dragging-bg-color: darken(#fff, 5%) !default;\n\n$toggle-off-bg-color:             #fff !default;\n$toggle-off-border-color:         #e6e6e6 !default;\n\n$toggle-on-light-bg:              $button-light-border !default;\n$toggle-on-light-border:          $toggle-on-light-bg !default;\n$toggle-on-stable-bg:             $button-stable-border !default;\n$toggle-on-stable-border:         $toggle-on-stable-bg !default;\n$toggle-on-positive-bg:           $positive !default;\n$toggle-on-positive-border:       $toggle-on-positive-bg !default;\n$toggle-on-calm-bg:               $calm !default;\n$toggle-on-calm-border:           $toggle-on-calm-bg !default;\n$toggle-on-assertive-bg:          $assertive !default;\n$toggle-on-assertive-border:      $toggle-on-assertive-bg !default;\n$toggle-on-balanced-bg:           $balanced !default;\n$toggle-on-balanced-border:       $toggle-on-balanced-bg !default;\n$toggle-on-energized-bg:          $energized !default;\n$toggle-on-energized-border:      $toggle-on-energized-bg !default;\n$toggle-on-royal-bg:              $royal !default;\n$toggle-on-royal-border:          $toggle-on-royal-bg !default;\n$toggle-on-dark-bg:               $dark !default;\n$toggle-on-dark-border:           $toggle-on-dark-bg !default;\n$toggle-on-default-bg:            #4cd964 !default;\n$toggle-on-default-border:        $toggle-on-default-bg !default;\n\n$toggle-handle-off-bg-color:      $light !default;\n$toggle-handle-on-bg-color:       $toggle-handle-off-bg-color !default;\n\n$toggle-transition-duration:      .3s !default;\n\n$toggle-hit-area-expansion:   5px;\n\n\n// Checkbox\n// -------------------------------\n\n$checkbox-width:                  28px !default;\n$checkbox-height:                 28px !default;\n$checkbox-border-radius:          $checkbox-width !default;\n$checkbox-border-width:           1px !default;\n\n$checkbox-off-bg-color:           #fff !default;\n$checkbox-off-border-light:       $button-light-border !default;\n$checkbox-on-bg-light:            $button-light-border !default;\n$checkbox-off-border-stable:      $button-stable-border !default;\n$checkbox-on-bg-stable:           $button-stable-border !default;\n$checkbox-off-border-positive:    $positive !default;\n$checkbox-on-bg-positive:         $positive !default;\n$checkbox-off-border-calm:        $calm !default;\n$checkbox-on-bg-calm:             $calm !default;\n$checkbox-off-border-assertive:   $assertive !default;\n$checkbox-on-bg-assertive:        $assertive !default;\n$checkbox-off-border-balanced:    $balanced !default;\n$checkbox-on-bg-balanced:         $balanced !default;\n$checkbox-off-border-energized:   $energized !default;\n$checkbox-on-bg-energized:        $energized !default;\n$checkbox-off-border-royal:       $royal !default;\n$checkbox-on-bg-royal:            $royal !default;\n$checkbox-off-border-dark:        $dark !default;\n$checkbox-on-bg-dark:             $dark !default;\n$checkbox-off-border-default:     $button-light-border !default;\n$checkbox-on-bg-default:          $positive !default;\n$checkbox-on-border-default:      $positive !default;\n\n$checkbox-check-width:            1px !default;\n$checkbox-check-color:            #fff !default;\n\n\n// Range\n// -------------------------------\n\n$range-track-height:              2px !default;\n$range-slider-width:              28px !default;\n$range-slider-height:             28px !default;\n$range-slider-border-radius:      50% !default;\n$range-icon-size:                 24px !default;\n$range-slider-box-shadow:         0 0 2px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,0.2) !default;\n\n$range-light-track-bg:            $button-light-border !default;\n$range-stable-track-bg:           $button-stable-border !default;\n$range-positive-track-bg:         $button-positive-bg !default;\n$range-calm-track-bg:             $button-calm-bg !default;\n$range-balanced-track-bg:         $button-balanced-bg !default;\n$range-assertive-track-bg:        $button-assertive-bg !default;\n$range-energized-track-bg:        $button-energized-bg !default;\n$range-royal-track-bg:            $button-royal-bg !default;\n$range-dark-track-bg:             $button-dark-bg !default;\n$range-default-track-bg:          #ccc !default;\n\n\n// Menus\n// -------------------------------\n\n$menu-bg:                         #fff !default;\n$menu-width:                      275px !default;\n$menu-animation-speed:            200ms !default;\n\n$menu-side-shadow:                -1px 0px 2px rgba(0, 0, 0, 0.2), 1px 0px 2px rgba(0,0,0,0.2) !default;\n\n\n// Modals\n// -------------------------------\n\n$modal-bg-color:                  #fff !default;\n$modal-backdrop-bg-active:        #000 !default;\n$modal-backdrop-bg-inactive:      rgba(0,0,0,0) !default;\n\n$modal-inset-mode-break-point:    680px !default;  // @media min-width\n$modal-inset-mode-top:            20% !default;\n$modal-inset-mode-right:          20% !default;\n$modal-inset-mode-bottom:         20% !default;\n$modal-inset-mode-left:           20% !default;\n$modal-inset-mode-min-height:     240px !default;\n\n\n// Popovers\n// -------------------------------\n\n$popover-bg-color:                $light !default;\n$popover-backdrop-bg-active:      rgba(0,0,0,0.1) !default;\n$popover-backdrop-bg-inactive:    rgba(0,0,0,0) !default;\n$popover-width:                   220px !default;\n$popover-height:                  280px !default;\n$popover-large-break-point:       680px !default;\n$popover-large-width:             360px !default;\n\n$popover-box-shadow:              0 1px 3px rgba(0,0,0,0.4) !default;\n$popover-border-radius:           2px !default;\n\n$popover-box-shadow-ios:          0 0 40px rgba(0,0,0,0.08) !default;\n$popover-border-radius-ios:       10px !default;\n\n$popover-bg-color-android:        #fafafa !default;\n$popover-box-shadow-android:      0 2px 6px rgba(0,0,0,0.35) !default;\n\n\n// Grids\n// -------------------------------\n\n$grid-padding-width:              10px !default;\n$grid-responsive-sm-break:        567px !default;  // smaller than landscape phone\n$grid-responsive-md-break:        767px !default;  // smaller than portrait tablet\n$grid-responsive-lg-break:        1023px !default; // smaller than landscape tablet\n\n\n// Action Sheets\n// -------------------------------\n\n$sheet-margin:                    8px !default;\n$sheet-border-radius:             4px !default;\n\n$sheet-options-bg-color:          #f1f2f3 !default;\n$sheet-options-bg-active-color:   #e4e5e7 !default;\n$sheet-options-text-color:        #007aff !default;\n$sheet-options-border-color:      #d1d3d6 !default;\n\n\n// Popups\n// -------------------------------\n\n$popup-width:                     250px !default;\n$popup-enter-animation:           superScaleIn !default;\n$popup-enter-animation-duration:  0.2s !default;\n$popup-leave-animation-duration:  0.1s !default;\n\n$popup-border-radius:             0px !default;\n$popup-background-color:          rgba(255,255,255,0.9) !default;\n\n$popup-button-border-radius:      2px !default;\n$popup-button-line-height:        20px !default;\n$popup-button-min-height:         45px !default;\n\n\n// Loading\n// -------------------------------\n\n$loading-text-color:              #fff !default;\n$loading-bg-color:                rgba(0,0,0,0.7) !default;\n$loading-padding:                 20px !default;\n$loading-border-radius:           5px !default;\n$loading-font-size:               15px !default;\n\n$loading-backdrop-fadein-duration:0.1s !default;\n$loading-backdrop-bg-color:       rgba(0,0,0,0.4) !default;\n\n\n// Badges\n// -------------------------------\n\n$badge-font-size:                 14px !default;\n$badge-line-height:               16px !default;\n$badge-font-weight:               bold !default;\n$badge-border-radius:             10px !default;\n\n$badge-light-bg:                  $button-light-bg !default;\n$badge-light-text:                $button-light-text !default;\n\n$badge-stable-bg:                 $button-stable-bg !default;\n$badge-stable-text:               $button-stable-text !default;\n\n$badge-positive-bg:               $button-positive-bg !default;\n$badge-positive-text:             $button-positive-text !default;\n\n$badge-calm-bg:                   $button-calm-bg !default;\n$badge-calm-text:                 $button-calm-text !default;\n\n$badge-balanced-bg:               $button-balanced-bg !default;\n$badge-balanced-text:             $button-balanced-text !default;\n\n$badge-assertive-bg:              $button-assertive-bg !default;\n$badge-assertive-text:            $button-assertive-text !default;\n\n$badge-energized-bg:              $button-energized-bg !default;\n$badge-energized-text:            $button-energized-text !default;\n\n$badge-royal-bg:                  $button-royal-bg !default;\n$badge-royal-text:                $button-royal-text !default;\n\n$badge-dark-bg:                   $button-dark-bg !default;\n$badge-dark-text:                 $button-dark-text !default;\n\n$badge-default-bg:                transparent !default;\n$badge-default-text:              #AAAAAA !default;\n\n\n// Spinners\n// -------------------------------\n\n$spinner-width:                   28px !default;\n$spinner-height:                  28px !default;\n\n$spinner-light-stroke:            $light !default;\n$spinner-light-fill:              $light !default;\n\n$spinner-stable-stroke:           $stable !default;\n$spinner-stable-fill:             $stable !default;\n\n$spinner-positive-stroke:         $positive !default;\n$spinner-positive-fill:           $positive !default;\n\n$spinner-calm-stroke:             $calm !default;\n$spinner-calm-fill:               $calm !default;\n\n$spinner-balanced-stroke:         $balanced !default;\n$spinner-balanced-fill:           $balanced !default;\n\n$spinner-assertive-stroke:        $assertive !default;\n$spinner-assertive-fill:          $assertive !default;\n\n$spinner-energized-stroke:        $energized !default;\n$spinner-energized-fill:          $energized !default;\n\n$spinner-royal-stroke:            $royal !default;\n$spinner-royal-fill:              $royal !default;\n\n$spinner-dark-stroke:             $dark !default;\n$spinner-dark-fill:               $dark !default;\n\n$spinner-default-stroke:          $dark !default;\n$spinner-default-fill:            $dark !default;\n\n\n// Z-Indexes\n// -------------------------------\n\n$z-index-bar-title:               0 !default;\n$z-index-item-drag:               0 !default;\n$z-index-item-edit:               0 !default;\n$z-index-menu:                    0 !default;\n$z-index-badge:                   1 !default;\n$z-index-bar-button:              1 !default;\n$z-index-item-options:            1 !default;\n$z-index-pane:                    1 !default;\n$z-index-slider-pager:            1 !default;\n$z-index-view:                    1 !default;\n$z-index-view-below:              2 !default;\n$z-index-item:                    2 !default;\n$z-index-item-checkbox:           3 !default;\n$z-index-item-radio:              3 !default;\n$z-index-item-reorder:            3 !default;\n$z-index-item-toggle:             3 !default;\n$z-index-view-above:              3 !default;\n$z-index-tabs:                    5 !default;\n$z-index-item-reordering:         9 !default;\n$z-index-bar:                     9 !default;\n$z-index-bar-above:               10 !default;\n$z-index-menu-scroll-content:     10 !default;\n$z-index-modal:                   10 !default;\n$z-index-popover:                 10 !default;\n$z-index-action-sheet:            11 !default;\n$z-index-backdrop:                11 !default;\n$z-index-menu-bar-header:         11 !default;\n$z-index-scroll-content-false:    11 !default;\n$z-index-popup:                   12 !default;\n$z-index-loading:                 13 !default;\n$z-index-scroll-bar:              9999 !default;\n$z-index-click-block:             99999 !default;\n\n\n// Platform\n// -------------------------------\n\n$ios-statusbar-height:           20px !default;\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/ionic.scss",
    "content": "@charset \"UTF-8\";\n\n@import\n  // Ionicons\n  \"ionicons/ionicons.scss\",\n\n  // Variables\n  \"mixins\",\n  \"variables\",\n\n  // Base\n  \"reset\",\n  \"scaffolding\",\n  \"type\",\n\n  // Components\n  \"action-sheet\",\n  \"backdrop\",\n  \"bar\",\n  \"tabs\",\n  \"menu\",\n  \"modal\",\n  \"popover\",\n  \"popup\",\n  \"loading\",\n  \"items\",\n  \"list\",\n  \"badge\",\n  \"slide-box\",\n  \"slides\",\n  \"refresher\",\n  \"spinner\",\n\n  // Forms\n  \"form\",\n  \"checkbox\",\n  \"toggle\",\n  \"radio\",\n  \"range\",\n  \"select\",\n  \"progress\",\n\n  // Buttons\n  \"button\",\n  \"button-bar\",\n\n  // Util\n  \"grid\",\n  \"util\",\n  \"platform\",\n\n  // Animations\n  \"animations\",\n  \"transitions\";\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/ionicons/_ionicons-font.scss",
    "content": "// Ionicons Font Path\n// --------------------------\n\n@font-face {\n font-family: $ionicons-font-family;\n src:url(\"#{$ionicons-font-path}/ionicons.eot?v=#{$ionicons-version}\");\n src:url(\"#{$ionicons-font-path}/ionicons.eot?v=#{$ionicons-version}#iefix\") format(\"embedded-opentype\"),\n  url(\"#{$ionicons-font-path}/ionicons.ttf?v=#{$ionicons-version}\") format(\"truetype\"),\n  url(\"#{$ionicons-font-path}/ionicons.woff?v=#{$ionicons-version}\") format(\"woff\"),\n  url(\"#{$ionicons-font-path}/ionicons.woff\") format(\"woff\"), /* for WP8 */\n  url(\"#{$ionicons-font-path}/ionicons.svg?v=#{$ionicons-version}#Ionicons\") format(\"svg\");\n font-weight: normal;\n font-style: normal;\n}\n\n.ion {\n  display: inline-block;\n  font-family: $ionicons-font-family;\n  speak: none;\n  font-style: normal;\n  font-weight: normal;\n  font-variant: normal;\n  text-transform: none;\n  text-rendering: auto;\n  line-height: 1;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/ionicons/_ionicons-icons.scss",
    "content": "// Ionicons Icons\n// --------------------------\n\n.ionicons,\n.#{$ionicons-prefix}alert:before,\n.#{$ionicons-prefix}alert-circled:before,\n.#{$ionicons-prefix}android-add:before,\n.#{$ionicons-prefix}android-add-circle:before,\n.#{$ionicons-prefix}android-alarm-clock:before,\n.#{$ionicons-prefix}android-alert:before,\n.#{$ionicons-prefix}android-apps:before,\n.#{$ionicons-prefix}android-archive:before,\n.#{$ionicons-prefix}android-arrow-back:before,\n.#{$ionicons-prefix}android-arrow-down:before,\n.#{$ionicons-prefix}android-arrow-dropdown:before,\n.#{$ionicons-prefix}android-arrow-dropdown-circle:before,\n.#{$ionicons-prefix}android-arrow-dropleft:before,\n.#{$ionicons-prefix}android-arrow-dropleft-circle:before,\n.#{$ionicons-prefix}android-arrow-dropright:before,\n.#{$ionicons-prefix}android-arrow-dropright-circle:before,\n.#{$ionicons-prefix}android-arrow-dropup:before,\n.#{$ionicons-prefix}android-arrow-dropup-circle:before,\n.#{$ionicons-prefix}android-arrow-forward:before,\n.#{$ionicons-prefix}android-arrow-up:before,\n.#{$ionicons-prefix}android-attach:before,\n.#{$ionicons-prefix}android-bar:before,\n.#{$ionicons-prefix}android-bicycle:before,\n.#{$ionicons-prefix}android-boat:before,\n.#{$ionicons-prefix}android-bookmark:before,\n.#{$ionicons-prefix}android-bulb:before,\n.#{$ionicons-prefix}android-bus:before,\n.#{$ionicons-prefix}android-calendar:before,\n.#{$ionicons-prefix}android-call:before,\n.#{$ionicons-prefix}android-camera:before,\n.#{$ionicons-prefix}android-cancel:before,\n.#{$ionicons-prefix}android-car:before,\n.#{$ionicons-prefix}android-cart:before,\n.#{$ionicons-prefix}android-chat:before,\n.#{$ionicons-prefix}android-checkbox:before,\n.#{$ionicons-prefix}android-checkbox-blank:before,\n.#{$ionicons-prefix}android-checkbox-outline:before,\n.#{$ionicons-prefix}android-checkbox-outline-blank:before,\n.#{$ionicons-prefix}android-checkmark-circle:before,\n.#{$ionicons-prefix}android-clipboard:before,\n.#{$ionicons-prefix}android-close:before,\n.#{$ionicons-prefix}android-cloud:before,\n.#{$ionicons-prefix}android-cloud-circle:before,\n.#{$ionicons-prefix}android-cloud-done:before,\n.#{$ionicons-prefix}android-cloud-outline:before,\n.#{$ionicons-prefix}android-color-palette:before,\n.#{$ionicons-prefix}android-compass:before,\n.#{$ionicons-prefix}android-contact:before,\n.#{$ionicons-prefix}android-contacts:before,\n.#{$ionicons-prefix}android-contract:before,\n.#{$ionicons-prefix}android-create:before,\n.#{$ionicons-prefix}android-delete:before,\n.#{$ionicons-prefix}android-desktop:before,\n.#{$ionicons-prefix}android-document:before,\n.#{$ionicons-prefix}android-done:before,\n.#{$ionicons-prefix}android-done-all:before,\n.#{$ionicons-prefix}android-download:before,\n.#{$ionicons-prefix}android-drafts:before,\n.#{$ionicons-prefix}android-exit:before,\n.#{$ionicons-prefix}android-expand:before,\n.#{$ionicons-prefix}android-favorite:before,\n.#{$ionicons-prefix}android-favorite-outline:before,\n.#{$ionicons-prefix}android-film:before,\n.#{$ionicons-prefix}android-folder:before,\n.#{$ionicons-prefix}android-folder-open:before,\n.#{$ionicons-prefix}android-funnel:before,\n.#{$ionicons-prefix}android-globe:before,\n.#{$ionicons-prefix}android-hand:before,\n.#{$ionicons-prefix}android-hangout:before,\n.#{$ionicons-prefix}android-happy:before,\n.#{$ionicons-prefix}android-home:before,\n.#{$ionicons-prefix}android-image:before,\n.#{$ionicons-prefix}android-laptop:before,\n.#{$ionicons-prefix}android-list:before,\n.#{$ionicons-prefix}android-locate:before,\n.#{$ionicons-prefix}android-lock:before,\n.#{$ionicons-prefix}android-mail:before,\n.#{$ionicons-prefix}android-map:before,\n.#{$ionicons-prefix}android-menu:before,\n.#{$ionicons-prefix}android-microphone:before,\n.#{$ionicons-prefix}android-microphone-off:before,\n.#{$ionicons-prefix}android-more-horizontal:before,\n.#{$ionicons-prefix}android-more-vertical:before,\n.#{$ionicons-prefix}android-navigate:before,\n.#{$ionicons-prefix}android-notifications:before,\n.#{$ionicons-prefix}android-notifications-none:before,\n.#{$ionicons-prefix}android-notifications-off:before,\n.#{$ionicons-prefix}android-open:before,\n.#{$ionicons-prefix}android-options:before,\n.#{$ionicons-prefix}android-people:before,\n.#{$ionicons-prefix}android-person:before,\n.#{$ionicons-prefix}android-person-add:before,\n.#{$ionicons-prefix}android-phone-landscape:before,\n.#{$ionicons-prefix}android-phone-portrait:before,\n.#{$ionicons-prefix}android-pin:before,\n.#{$ionicons-prefix}android-plane:before,\n.#{$ionicons-prefix}android-playstore:before,\n.#{$ionicons-prefix}android-print:before,\n.#{$ionicons-prefix}android-radio-button-off:before,\n.#{$ionicons-prefix}android-radio-button-on:before,\n.#{$ionicons-prefix}android-refresh:before,\n.#{$ionicons-prefix}android-remove:before,\n.#{$ionicons-prefix}android-remove-circle:before,\n.#{$ionicons-prefix}android-restaurant:before,\n.#{$ionicons-prefix}android-sad:before,\n.#{$ionicons-prefix}android-search:before,\n.#{$ionicons-prefix}android-send:before,\n.#{$ionicons-prefix}android-settings:before,\n.#{$ionicons-prefix}android-share:before,\n.#{$ionicons-prefix}android-share-alt:before,\n.#{$ionicons-prefix}android-star:before,\n.#{$ionicons-prefix}android-star-half:before,\n.#{$ionicons-prefix}android-star-outline:before,\n.#{$ionicons-prefix}android-stopwatch:before,\n.#{$ionicons-prefix}android-subway:before,\n.#{$ionicons-prefix}android-sunny:before,\n.#{$ionicons-prefix}android-sync:before,\n.#{$ionicons-prefix}android-textsms:before,\n.#{$ionicons-prefix}android-time:before,\n.#{$ionicons-prefix}android-train:before,\n.#{$ionicons-prefix}android-unlock:before,\n.#{$ionicons-prefix}android-upload:before,\n.#{$ionicons-prefix}android-volume-down:before,\n.#{$ionicons-prefix}android-volume-mute:before,\n.#{$ionicons-prefix}android-volume-off:before,\n.#{$ionicons-prefix}android-volume-up:before,\n.#{$ionicons-prefix}android-walk:before,\n.#{$ionicons-prefix}android-warning:before,\n.#{$ionicons-prefix}android-watch:before,\n.#{$ionicons-prefix}android-wifi:before,\n.#{$ionicons-prefix}aperture:before,\n.#{$ionicons-prefix}archive:before,\n.#{$ionicons-prefix}arrow-down-a:before,\n.#{$ionicons-prefix}arrow-down-b:before,\n.#{$ionicons-prefix}arrow-down-c:before,\n.#{$ionicons-prefix}arrow-expand:before,\n.#{$ionicons-prefix}arrow-graph-down-left:before,\n.#{$ionicons-prefix}arrow-graph-down-right:before,\n.#{$ionicons-prefix}arrow-graph-up-left:before,\n.#{$ionicons-prefix}arrow-graph-up-right:before,\n.#{$ionicons-prefix}arrow-left-a:before,\n.#{$ionicons-prefix}arrow-left-b:before,\n.#{$ionicons-prefix}arrow-left-c:before,\n.#{$ionicons-prefix}arrow-move:before,\n.#{$ionicons-prefix}arrow-resize:before,\n.#{$ionicons-prefix}arrow-return-left:before,\n.#{$ionicons-prefix}arrow-return-right:before,\n.#{$ionicons-prefix}arrow-right-a:before,\n.#{$ionicons-prefix}arrow-right-b:before,\n.#{$ionicons-prefix}arrow-right-c:before,\n.#{$ionicons-prefix}arrow-shrink:before,\n.#{$ionicons-prefix}arrow-swap:before,\n.#{$ionicons-prefix}arrow-up-a:before,\n.#{$ionicons-prefix}arrow-up-b:before,\n.#{$ionicons-prefix}arrow-up-c:before,\n.#{$ionicons-prefix}asterisk:before,\n.#{$ionicons-prefix}at:before,\n.#{$ionicons-prefix}backspace:before,\n.#{$ionicons-prefix}backspace-outline:before,\n.#{$ionicons-prefix}bag:before,\n.#{$ionicons-prefix}battery-charging:before,\n.#{$ionicons-prefix}battery-empty:before,\n.#{$ionicons-prefix}battery-full:before,\n.#{$ionicons-prefix}battery-half:before,\n.#{$ionicons-prefix}battery-low:before,\n.#{$ionicons-prefix}beaker:before,\n.#{$ionicons-prefix}beer:before,\n.#{$ionicons-prefix}bluetooth:before,\n.#{$ionicons-prefix}bonfire:before,\n.#{$ionicons-prefix}bookmark:before,\n.#{$ionicons-prefix}bowtie:before,\n.#{$ionicons-prefix}briefcase:before,\n.#{$ionicons-prefix}bug:before,\n.#{$ionicons-prefix}calculator:before,\n.#{$ionicons-prefix}calendar:before,\n.#{$ionicons-prefix}camera:before,\n.#{$ionicons-prefix}card:before,\n.#{$ionicons-prefix}cash:before,\n.#{$ionicons-prefix}chatbox:before,\n.#{$ionicons-prefix}chatbox-working:before,\n.#{$ionicons-prefix}chatboxes:before,\n.#{$ionicons-prefix}chatbubble:before,\n.#{$ionicons-prefix}chatbubble-working:before,\n.#{$ionicons-prefix}chatbubbles:before,\n.#{$ionicons-prefix}checkmark:before,\n.#{$ionicons-prefix}checkmark-circled:before,\n.#{$ionicons-prefix}checkmark-round:before,\n.#{$ionicons-prefix}chevron-down:before,\n.#{$ionicons-prefix}chevron-left:before,\n.#{$ionicons-prefix}chevron-right:before,\n.#{$ionicons-prefix}chevron-up:before,\n.#{$ionicons-prefix}clipboard:before,\n.#{$ionicons-prefix}clock:before,\n.#{$ionicons-prefix}close:before,\n.#{$ionicons-prefix}close-circled:before,\n.#{$ionicons-prefix}close-round:before,\n.#{$ionicons-prefix}closed-captioning:before,\n.#{$ionicons-prefix}cloud:before,\n.#{$ionicons-prefix}code:before,\n.#{$ionicons-prefix}code-download:before,\n.#{$ionicons-prefix}code-working:before,\n.#{$ionicons-prefix}coffee:before,\n.#{$ionicons-prefix}compass:before,\n.#{$ionicons-prefix}compose:before,\n.#{$ionicons-prefix}connection-bars:before,\n.#{$ionicons-prefix}contrast:before,\n.#{$ionicons-prefix}crop:before,\n.#{$ionicons-prefix}cube:before,\n.#{$ionicons-prefix}disc:before,\n.#{$ionicons-prefix}document:before,\n.#{$ionicons-prefix}document-text:before,\n.#{$ionicons-prefix}drag:before,\n.#{$ionicons-prefix}earth:before,\n.#{$ionicons-prefix}easel:before,\n.#{$ionicons-prefix}edit:before,\n.#{$ionicons-prefix}egg:before,\n.#{$ionicons-prefix}eject:before,\n.#{$ionicons-prefix}email:before,\n.#{$ionicons-prefix}email-unread:before,\n.#{$ionicons-prefix}erlenmeyer-flask:before,\n.#{$ionicons-prefix}erlenmeyer-flask-bubbles:before,\n.#{$ionicons-prefix}eye:before,\n.#{$ionicons-prefix}eye-disabled:before,\n.#{$ionicons-prefix}female:before,\n.#{$ionicons-prefix}filing:before,\n.#{$ionicons-prefix}film-marker:before,\n.#{$ionicons-prefix}fireball:before,\n.#{$ionicons-prefix}flag:before,\n.#{$ionicons-prefix}flame:before,\n.#{$ionicons-prefix}flash:before,\n.#{$ionicons-prefix}flash-off:before,\n.#{$ionicons-prefix}folder:before,\n.#{$ionicons-prefix}fork:before,\n.#{$ionicons-prefix}fork-repo:before,\n.#{$ionicons-prefix}forward:before,\n.#{$ionicons-prefix}funnel:before,\n.#{$ionicons-prefix}gear-a:before,\n.#{$ionicons-prefix}gear-b:before,\n.#{$ionicons-prefix}grid:before,\n.#{$ionicons-prefix}hammer:before,\n.#{$ionicons-prefix}happy:before,\n.#{$ionicons-prefix}happy-outline:before,\n.#{$ionicons-prefix}headphone:before,\n.#{$ionicons-prefix}heart:before,\n.#{$ionicons-prefix}heart-broken:before,\n.#{$ionicons-prefix}help:before,\n.#{$ionicons-prefix}help-buoy:before,\n.#{$ionicons-prefix}help-circled:before,\n.#{$ionicons-prefix}home:before,\n.#{$ionicons-prefix}icecream:before,\n.#{$ionicons-prefix}image:before,\n.#{$ionicons-prefix}images:before,\n.#{$ionicons-prefix}information:before,\n.#{$ionicons-prefix}information-circled:before,\n.#{$ionicons-prefix}ionic:before,\n.#{$ionicons-prefix}ios-alarm:before,\n.#{$ionicons-prefix}ios-alarm-outline:before,\n.#{$ionicons-prefix}ios-albums:before,\n.#{$ionicons-prefix}ios-albums-outline:before,\n.#{$ionicons-prefix}ios-americanfootball:before,\n.#{$ionicons-prefix}ios-americanfootball-outline:before,\n.#{$ionicons-prefix}ios-analytics:before,\n.#{$ionicons-prefix}ios-analytics-outline:before,\n.#{$ionicons-prefix}ios-arrow-back:before,\n.#{$ionicons-prefix}ios-arrow-down:before,\n.#{$ionicons-prefix}ios-arrow-forward:before,\n.#{$ionicons-prefix}ios-arrow-left:before,\n.#{$ionicons-prefix}ios-arrow-right:before,\n.#{$ionicons-prefix}ios-arrow-thin-down:before,\n.#{$ionicons-prefix}ios-arrow-thin-left:before,\n.#{$ionicons-prefix}ios-arrow-thin-right:before,\n.#{$ionicons-prefix}ios-arrow-thin-up:before,\n.#{$ionicons-prefix}ios-arrow-up:before,\n.#{$ionicons-prefix}ios-at:before,\n.#{$ionicons-prefix}ios-at-outline:before,\n.#{$ionicons-prefix}ios-barcode:before,\n.#{$ionicons-prefix}ios-barcode-outline:before,\n.#{$ionicons-prefix}ios-baseball:before,\n.#{$ionicons-prefix}ios-baseball-outline:before,\n.#{$ionicons-prefix}ios-basketball:before,\n.#{$ionicons-prefix}ios-basketball-outline:before,\n.#{$ionicons-prefix}ios-bell:before,\n.#{$ionicons-prefix}ios-bell-outline:before,\n.#{$ionicons-prefix}ios-body:before,\n.#{$ionicons-prefix}ios-body-outline:before,\n.#{$ionicons-prefix}ios-bolt:before,\n.#{$ionicons-prefix}ios-bolt-outline:before,\n.#{$ionicons-prefix}ios-book:before,\n.#{$ionicons-prefix}ios-book-outline:before,\n.#{$ionicons-prefix}ios-bookmarks:before,\n.#{$ionicons-prefix}ios-bookmarks-outline:before,\n.#{$ionicons-prefix}ios-box:before,\n.#{$ionicons-prefix}ios-box-outline:before,\n.#{$ionicons-prefix}ios-briefcase:before,\n.#{$ionicons-prefix}ios-briefcase-outline:before,\n.#{$ionicons-prefix}ios-browsers:before,\n.#{$ionicons-prefix}ios-browsers-outline:before,\n.#{$ionicons-prefix}ios-calculator:before,\n.#{$ionicons-prefix}ios-calculator-outline:before,\n.#{$ionicons-prefix}ios-calendar:before,\n.#{$ionicons-prefix}ios-calendar-outline:before,\n.#{$ionicons-prefix}ios-camera:before,\n.#{$ionicons-prefix}ios-camera-outline:before,\n.#{$ionicons-prefix}ios-cart:before,\n.#{$ionicons-prefix}ios-cart-outline:before,\n.#{$ionicons-prefix}ios-chatboxes:before,\n.#{$ionicons-prefix}ios-chatboxes-outline:before,\n.#{$ionicons-prefix}ios-chatbubble:before,\n.#{$ionicons-prefix}ios-chatbubble-outline:before,\n.#{$ionicons-prefix}ios-checkmark:before,\n.#{$ionicons-prefix}ios-checkmark-empty:before,\n.#{$ionicons-prefix}ios-checkmark-outline:before,\n.#{$ionicons-prefix}ios-circle-filled:before,\n.#{$ionicons-prefix}ios-circle-outline:before,\n.#{$ionicons-prefix}ios-clock:before,\n.#{$ionicons-prefix}ios-clock-outline:before,\n.#{$ionicons-prefix}ios-close:before,\n.#{$ionicons-prefix}ios-close-empty:before,\n.#{$ionicons-prefix}ios-close-outline:before,\n.#{$ionicons-prefix}ios-cloud:before,\n.#{$ionicons-prefix}ios-cloud-download:before,\n.#{$ionicons-prefix}ios-cloud-download-outline:before,\n.#{$ionicons-prefix}ios-cloud-outline:before,\n.#{$ionicons-prefix}ios-cloud-upload:before,\n.#{$ionicons-prefix}ios-cloud-upload-outline:before,\n.#{$ionicons-prefix}ios-cloudy:before,\n.#{$ionicons-prefix}ios-cloudy-night:before,\n.#{$ionicons-prefix}ios-cloudy-night-outline:before,\n.#{$ionicons-prefix}ios-cloudy-outline:before,\n.#{$ionicons-prefix}ios-cog:before,\n.#{$ionicons-prefix}ios-cog-outline:before,\n.#{$ionicons-prefix}ios-color-filter:before,\n.#{$ionicons-prefix}ios-color-filter-outline:before,\n.#{$ionicons-prefix}ios-color-wand:before,\n.#{$ionicons-prefix}ios-color-wand-outline:before,\n.#{$ionicons-prefix}ios-compose:before,\n.#{$ionicons-prefix}ios-compose-outline:before,\n.#{$ionicons-prefix}ios-contact:before,\n.#{$ionicons-prefix}ios-contact-outline:before,\n.#{$ionicons-prefix}ios-copy:before,\n.#{$ionicons-prefix}ios-copy-outline:before,\n.#{$ionicons-prefix}ios-crop:before,\n.#{$ionicons-prefix}ios-crop-strong:before,\n.#{$ionicons-prefix}ios-download:before,\n.#{$ionicons-prefix}ios-download-outline:before,\n.#{$ionicons-prefix}ios-drag:before,\n.#{$ionicons-prefix}ios-email:before,\n.#{$ionicons-prefix}ios-email-outline:before,\n.#{$ionicons-prefix}ios-eye:before,\n.#{$ionicons-prefix}ios-eye-outline:before,\n.#{$ionicons-prefix}ios-fastforward:before,\n.#{$ionicons-prefix}ios-fastforward-outline:before,\n.#{$ionicons-prefix}ios-filing:before,\n.#{$ionicons-prefix}ios-filing-outline:before,\n.#{$ionicons-prefix}ios-film:before,\n.#{$ionicons-prefix}ios-film-outline:before,\n.#{$ionicons-prefix}ios-flag:before,\n.#{$ionicons-prefix}ios-flag-outline:before,\n.#{$ionicons-prefix}ios-flame:before,\n.#{$ionicons-prefix}ios-flame-outline:before,\n.#{$ionicons-prefix}ios-flask:before,\n.#{$ionicons-prefix}ios-flask-outline:before,\n.#{$ionicons-prefix}ios-flower:before,\n.#{$ionicons-prefix}ios-flower-outline:before,\n.#{$ionicons-prefix}ios-folder:before,\n.#{$ionicons-prefix}ios-folder-outline:before,\n.#{$ionicons-prefix}ios-football:before,\n.#{$ionicons-prefix}ios-football-outline:before,\n.#{$ionicons-prefix}ios-game-controller-a:before,\n.#{$ionicons-prefix}ios-game-controller-a-outline:before,\n.#{$ionicons-prefix}ios-game-controller-b:before,\n.#{$ionicons-prefix}ios-game-controller-b-outline:before,\n.#{$ionicons-prefix}ios-gear:before,\n.#{$ionicons-prefix}ios-gear-outline:before,\n.#{$ionicons-prefix}ios-glasses:before,\n.#{$ionicons-prefix}ios-glasses-outline:before,\n.#{$ionicons-prefix}ios-grid-view:before,\n.#{$ionicons-prefix}ios-grid-view-outline:before,\n.#{$ionicons-prefix}ios-heart:before,\n.#{$ionicons-prefix}ios-heart-outline:before,\n.#{$ionicons-prefix}ios-help:before,\n.#{$ionicons-prefix}ios-help-empty:before,\n.#{$ionicons-prefix}ios-help-outline:before,\n.#{$ionicons-prefix}ios-home:before,\n.#{$ionicons-prefix}ios-home-outline:before,\n.#{$ionicons-prefix}ios-infinite:before,\n.#{$ionicons-prefix}ios-infinite-outline:before,\n.#{$ionicons-prefix}ios-information:before,\n.#{$ionicons-prefix}ios-information-empty:before,\n.#{$ionicons-prefix}ios-information-outline:before,\n.#{$ionicons-prefix}ios-ionic-outline:before,\n.#{$ionicons-prefix}ios-keypad:before,\n.#{$ionicons-prefix}ios-keypad-outline:before,\n.#{$ionicons-prefix}ios-lightbulb:before,\n.#{$ionicons-prefix}ios-lightbulb-outline:before,\n.#{$ionicons-prefix}ios-list:before,\n.#{$ionicons-prefix}ios-list-outline:before,\n.#{$ionicons-prefix}ios-location:before,\n.#{$ionicons-prefix}ios-location-outline:before,\n.#{$ionicons-prefix}ios-locked:before,\n.#{$ionicons-prefix}ios-locked-outline:before,\n.#{$ionicons-prefix}ios-loop:before,\n.#{$ionicons-prefix}ios-loop-strong:before,\n.#{$ionicons-prefix}ios-medical:before,\n.#{$ionicons-prefix}ios-medical-outline:before,\n.#{$ionicons-prefix}ios-medkit:before,\n.#{$ionicons-prefix}ios-medkit-outline:before,\n.#{$ionicons-prefix}ios-mic:before,\n.#{$ionicons-prefix}ios-mic-off:before,\n.#{$ionicons-prefix}ios-mic-outline:before,\n.#{$ionicons-prefix}ios-minus:before,\n.#{$ionicons-prefix}ios-minus-empty:before,\n.#{$ionicons-prefix}ios-minus-outline:before,\n.#{$ionicons-prefix}ios-monitor:before,\n.#{$ionicons-prefix}ios-monitor-outline:before,\n.#{$ionicons-prefix}ios-moon:before,\n.#{$ionicons-prefix}ios-moon-outline:before,\n.#{$ionicons-prefix}ios-more:before,\n.#{$ionicons-prefix}ios-more-outline:before,\n.#{$ionicons-prefix}ios-musical-note:before,\n.#{$ionicons-prefix}ios-musical-notes:before,\n.#{$ionicons-prefix}ios-navigate:before,\n.#{$ionicons-prefix}ios-navigate-outline:before,\n.#{$ionicons-prefix}ios-nutrition:before,\n.#{$ionicons-prefix}ios-nutrition-outline:before,\n.#{$ionicons-prefix}ios-paper:before,\n.#{$ionicons-prefix}ios-paper-outline:before,\n.#{$ionicons-prefix}ios-paperplane:before,\n.#{$ionicons-prefix}ios-paperplane-outline:before,\n.#{$ionicons-prefix}ios-partlysunny:before,\n.#{$ionicons-prefix}ios-partlysunny-outline:before,\n.#{$ionicons-prefix}ios-pause:before,\n.#{$ionicons-prefix}ios-pause-outline:before,\n.#{$ionicons-prefix}ios-paw:before,\n.#{$ionicons-prefix}ios-paw-outline:before,\n.#{$ionicons-prefix}ios-people:before,\n.#{$ionicons-prefix}ios-people-outline:before,\n.#{$ionicons-prefix}ios-person:before,\n.#{$ionicons-prefix}ios-person-outline:before,\n.#{$ionicons-prefix}ios-personadd:before,\n.#{$ionicons-prefix}ios-personadd-outline:before,\n.#{$ionicons-prefix}ios-photos:before,\n.#{$ionicons-prefix}ios-photos-outline:before,\n.#{$ionicons-prefix}ios-pie:before,\n.#{$ionicons-prefix}ios-pie-outline:before,\n.#{$ionicons-prefix}ios-pint:before,\n.#{$ionicons-prefix}ios-pint-outline:before,\n.#{$ionicons-prefix}ios-play:before,\n.#{$ionicons-prefix}ios-play-outline:before,\n.#{$ionicons-prefix}ios-plus:before,\n.#{$ionicons-prefix}ios-plus-empty:before,\n.#{$ionicons-prefix}ios-plus-outline:before,\n.#{$ionicons-prefix}ios-pricetag:before,\n.#{$ionicons-prefix}ios-pricetag-outline:before,\n.#{$ionicons-prefix}ios-pricetags:before,\n.#{$ionicons-prefix}ios-pricetags-outline:before,\n.#{$ionicons-prefix}ios-printer:before,\n.#{$ionicons-prefix}ios-printer-outline:before,\n.#{$ionicons-prefix}ios-pulse:before,\n.#{$ionicons-prefix}ios-pulse-strong:before,\n.#{$ionicons-prefix}ios-rainy:before,\n.#{$ionicons-prefix}ios-rainy-outline:before,\n.#{$ionicons-prefix}ios-recording:before,\n.#{$ionicons-prefix}ios-recording-outline:before,\n.#{$ionicons-prefix}ios-redo:before,\n.#{$ionicons-prefix}ios-redo-outline:before,\n.#{$ionicons-prefix}ios-refresh:before,\n.#{$ionicons-prefix}ios-refresh-empty:before,\n.#{$ionicons-prefix}ios-refresh-outline:before,\n.#{$ionicons-prefix}ios-reload:before,\n.#{$ionicons-prefix}ios-reverse-camera:before,\n.#{$ionicons-prefix}ios-reverse-camera-outline:before,\n.#{$ionicons-prefix}ios-rewind:before,\n.#{$ionicons-prefix}ios-rewind-outline:before,\n.#{$ionicons-prefix}ios-rose:before,\n.#{$ionicons-prefix}ios-rose-outline:before,\n.#{$ionicons-prefix}ios-search:before,\n.#{$ionicons-prefix}ios-search-strong:before,\n.#{$ionicons-prefix}ios-settings:before,\n.#{$ionicons-prefix}ios-settings-strong:before,\n.#{$ionicons-prefix}ios-shuffle:before,\n.#{$ionicons-prefix}ios-shuffle-strong:before,\n.#{$ionicons-prefix}ios-skipbackward:before,\n.#{$ionicons-prefix}ios-skipbackward-outline:before,\n.#{$ionicons-prefix}ios-skipforward:before,\n.#{$ionicons-prefix}ios-skipforward-outline:before,\n.#{$ionicons-prefix}ios-snowy:before,\n.#{$ionicons-prefix}ios-speedometer:before,\n.#{$ionicons-prefix}ios-speedometer-outline:before,\n.#{$ionicons-prefix}ios-star:before,\n.#{$ionicons-prefix}ios-star-half:before,\n.#{$ionicons-prefix}ios-star-outline:before,\n.#{$ionicons-prefix}ios-stopwatch:before,\n.#{$ionicons-prefix}ios-stopwatch-outline:before,\n.#{$ionicons-prefix}ios-sunny:before,\n.#{$ionicons-prefix}ios-sunny-outline:before,\n.#{$ionicons-prefix}ios-telephone:before,\n.#{$ionicons-prefix}ios-telephone-outline:before,\n.#{$ionicons-prefix}ios-tennisball:before,\n.#{$ionicons-prefix}ios-tennisball-outline:before,\n.#{$ionicons-prefix}ios-thunderstorm:before,\n.#{$ionicons-prefix}ios-thunderstorm-outline:before,\n.#{$ionicons-prefix}ios-time:before,\n.#{$ionicons-prefix}ios-time-outline:before,\n.#{$ionicons-prefix}ios-timer:before,\n.#{$ionicons-prefix}ios-timer-outline:before,\n.#{$ionicons-prefix}ios-toggle:before,\n.#{$ionicons-prefix}ios-toggle-outline:before,\n.#{$ionicons-prefix}ios-trash:before,\n.#{$ionicons-prefix}ios-trash-outline:before,\n.#{$ionicons-prefix}ios-undo:before,\n.#{$ionicons-prefix}ios-undo-outline:before,\n.#{$ionicons-prefix}ios-unlocked:before,\n.#{$ionicons-prefix}ios-unlocked-outline:before,\n.#{$ionicons-prefix}ios-upload:before,\n.#{$ionicons-prefix}ios-upload-outline:before,\n.#{$ionicons-prefix}ios-videocam:before,\n.#{$ionicons-prefix}ios-videocam-outline:before,\n.#{$ionicons-prefix}ios-volume-high:before,\n.#{$ionicons-prefix}ios-volume-low:before,\n.#{$ionicons-prefix}ios-wineglass:before,\n.#{$ionicons-prefix}ios-wineglass-outline:before,\n.#{$ionicons-prefix}ios-world:before,\n.#{$ionicons-prefix}ios-world-outline:before,\n.#{$ionicons-prefix}ipad:before,\n.#{$ionicons-prefix}iphone:before,\n.#{$ionicons-prefix}ipod:before,\n.#{$ionicons-prefix}jet:before,\n.#{$ionicons-prefix}key:before,\n.#{$ionicons-prefix}knife:before,\n.#{$ionicons-prefix}laptop:before,\n.#{$ionicons-prefix}leaf:before,\n.#{$ionicons-prefix}levels:before,\n.#{$ionicons-prefix}lightbulb:before,\n.#{$ionicons-prefix}link:before,\n.#{$ionicons-prefix}load-a:before,\n.#{$ionicons-prefix}load-b:before,\n.#{$ionicons-prefix}load-c:before,\n.#{$ionicons-prefix}load-d:before,\n.#{$ionicons-prefix}location:before,\n.#{$ionicons-prefix}lock-combination:before,\n.#{$ionicons-prefix}locked:before,\n.#{$ionicons-prefix}log-in:before,\n.#{$ionicons-prefix}log-out:before,\n.#{$ionicons-prefix}loop:before,\n.#{$ionicons-prefix}magnet:before,\n.#{$ionicons-prefix}male:before,\n.#{$ionicons-prefix}man:before,\n.#{$ionicons-prefix}map:before,\n.#{$ionicons-prefix}medkit:before,\n.#{$ionicons-prefix}merge:before,\n.#{$ionicons-prefix}mic-a:before,\n.#{$ionicons-prefix}mic-b:before,\n.#{$ionicons-prefix}mic-c:before,\n.#{$ionicons-prefix}minus:before,\n.#{$ionicons-prefix}minus-circled:before,\n.#{$ionicons-prefix}minus-round:before,\n.#{$ionicons-prefix}model-s:before,\n.#{$ionicons-prefix}monitor:before,\n.#{$ionicons-prefix}more:before,\n.#{$ionicons-prefix}mouse:before,\n.#{$ionicons-prefix}music-note:before,\n.#{$ionicons-prefix}navicon:before,\n.#{$ionicons-prefix}navicon-round:before,\n.#{$ionicons-prefix}navigate:before,\n.#{$ionicons-prefix}network:before,\n.#{$ionicons-prefix}no-smoking:before,\n.#{$ionicons-prefix}nuclear:before,\n.#{$ionicons-prefix}outlet:before,\n.#{$ionicons-prefix}paintbrush:before,\n.#{$ionicons-prefix}paintbucket:before,\n.#{$ionicons-prefix}paper-airplane:before,\n.#{$ionicons-prefix}paperclip:before,\n.#{$ionicons-prefix}pause:before,\n.#{$ionicons-prefix}person:before,\n.#{$ionicons-prefix}person-add:before,\n.#{$ionicons-prefix}person-stalker:before,\n.#{$ionicons-prefix}pie-graph:before,\n.#{$ionicons-prefix}pin:before,\n.#{$ionicons-prefix}pinpoint:before,\n.#{$ionicons-prefix}pizza:before,\n.#{$ionicons-prefix}plane:before,\n.#{$ionicons-prefix}planet:before,\n.#{$ionicons-prefix}play:before,\n.#{$ionicons-prefix}playstation:before,\n.#{$ionicons-prefix}plus:before,\n.#{$ionicons-prefix}plus-circled:before,\n.#{$ionicons-prefix}plus-round:before,\n.#{$ionicons-prefix}podium:before,\n.#{$ionicons-prefix}pound:before,\n.#{$ionicons-prefix}power:before,\n.#{$ionicons-prefix}pricetag:before,\n.#{$ionicons-prefix}pricetags:before,\n.#{$ionicons-prefix}printer:before,\n.#{$ionicons-prefix}pull-request:before,\n.#{$ionicons-prefix}qr-scanner:before,\n.#{$ionicons-prefix}quote:before,\n.#{$ionicons-prefix}radio-waves:before,\n.#{$ionicons-prefix}record:before,\n.#{$ionicons-prefix}refresh:before,\n.#{$ionicons-prefix}reply:before,\n.#{$ionicons-prefix}reply-all:before,\n.#{$ionicons-prefix}ribbon-a:before,\n.#{$ionicons-prefix}ribbon-b:before,\n.#{$ionicons-prefix}sad:before,\n.#{$ionicons-prefix}sad-outline:before,\n.#{$ionicons-prefix}scissors:before,\n.#{$ionicons-prefix}search:before,\n.#{$ionicons-prefix}settings:before,\n.#{$ionicons-prefix}share:before,\n.#{$ionicons-prefix}shuffle:before,\n.#{$ionicons-prefix}skip-backward:before,\n.#{$ionicons-prefix}skip-forward:before,\n.#{$ionicons-prefix}social-android:before,\n.#{$ionicons-prefix}social-android-outline:before,\n.#{$ionicons-prefix}social-angular:before,\n.#{$ionicons-prefix}social-angular-outline:before,\n.#{$ionicons-prefix}social-apple:before,\n.#{$ionicons-prefix}social-apple-outline:before,\n.#{$ionicons-prefix}social-bitcoin:before,\n.#{$ionicons-prefix}social-bitcoin-outline:before,\n.#{$ionicons-prefix}social-buffer:before,\n.#{$ionicons-prefix}social-buffer-outline:before,\n.#{$ionicons-prefix}social-chrome:before,\n.#{$ionicons-prefix}social-chrome-outline:before,\n.#{$ionicons-prefix}social-codepen:before,\n.#{$ionicons-prefix}social-codepen-outline:before,\n.#{$ionicons-prefix}social-css3:before,\n.#{$ionicons-prefix}social-css3-outline:before,\n.#{$ionicons-prefix}social-designernews:before,\n.#{$ionicons-prefix}social-designernews-outline:before,\n.#{$ionicons-prefix}social-dribbble:before,\n.#{$ionicons-prefix}social-dribbble-outline:before,\n.#{$ionicons-prefix}social-dropbox:before,\n.#{$ionicons-prefix}social-dropbox-outline:before,\n.#{$ionicons-prefix}social-euro:before,\n.#{$ionicons-prefix}social-euro-outline:before,\n.#{$ionicons-prefix}social-facebook:before,\n.#{$ionicons-prefix}social-facebook-outline:before,\n.#{$ionicons-prefix}social-foursquare:before,\n.#{$ionicons-prefix}social-foursquare-outline:before,\n.#{$ionicons-prefix}social-freebsd-devil:before,\n.#{$ionicons-prefix}social-github:before,\n.#{$ionicons-prefix}social-github-outline:before,\n.#{$ionicons-prefix}social-google:before,\n.#{$ionicons-prefix}social-google-outline:before,\n.#{$ionicons-prefix}social-googleplus:before,\n.#{$ionicons-prefix}social-googleplus-outline:before,\n.#{$ionicons-prefix}social-hackernews:before,\n.#{$ionicons-prefix}social-hackernews-outline:before,\n.#{$ionicons-prefix}social-html5:before,\n.#{$ionicons-prefix}social-html5-outline:before,\n.#{$ionicons-prefix}social-instagram:before,\n.#{$ionicons-prefix}social-instagram-outline:before,\n.#{$ionicons-prefix}social-javascript:before,\n.#{$ionicons-prefix}social-javascript-outline:before,\n.#{$ionicons-prefix}social-linkedin:before,\n.#{$ionicons-prefix}social-linkedin-outline:before,\n.#{$ionicons-prefix}social-markdown:before,\n.#{$ionicons-prefix}social-nodejs:before,\n.#{$ionicons-prefix}social-octocat:before,\n.#{$ionicons-prefix}social-pinterest:before,\n.#{$ionicons-prefix}social-pinterest-outline:before,\n.#{$ionicons-prefix}social-python:before,\n.#{$ionicons-prefix}social-reddit:before,\n.#{$ionicons-prefix}social-reddit-outline:before,\n.#{$ionicons-prefix}social-rss:before,\n.#{$ionicons-prefix}social-rss-outline:before,\n.#{$ionicons-prefix}social-sass:before,\n.#{$ionicons-prefix}social-skype:before,\n.#{$ionicons-prefix}social-skype-outline:before,\n.#{$ionicons-prefix}social-snapchat:before,\n.#{$ionicons-prefix}social-snapchat-outline:before,\n.#{$ionicons-prefix}social-tumblr:before,\n.#{$ionicons-prefix}social-tumblr-outline:before,\n.#{$ionicons-prefix}social-tux:before,\n.#{$ionicons-prefix}social-twitch:before,\n.#{$ionicons-prefix}social-twitch-outline:before,\n.#{$ionicons-prefix}social-twitter:before,\n.#{$ionicons-prefix}social-twitter-outline:before,\n.#{$ionicons-prefix}social-usd:before,\n.#{$ionicons-prefix}social-usd-outline:before,\n.#{$ionicons-prefix}social-vimeo:before,\n.#{$ionicons-prefix}social-vimeo-outline:before,\n.#{$ionicons-prefix}social-whatsapp:before,\n.#{$ionicons-prefix}social-whatsapp-outline:before,\n.#{$ionicons-prefix}social-windows:before,\n.#{$ionicons-prefix}social-windows-outline:before,\n.#{$ionicons-prefix}social-wordpress:before,\n.#{$ionicons-prefix}social-wordpress-outline:before,\n.#{$ionicons-prefix}social-yahoo:before,\n.#{$ionicons-prefix}social-yahoo-outline:before,\n.#{$ionicons-prefix}social-yen:before,\n.#{$ionicons-prefix}social-yen-outline:before,\n.#{$ionicons-prefix}social-youtube:before,\n.#{$ionicons-prefix}social-youtube-outline:before,\n.#{$ionicons-prefix}soup-can:before,\n.#{$ionicons-prefix}soup-can-outline:before,\n.#{$ionicons-prefix}speakerphone:before,\n.#{$ionicons-prefix}speedometer:before,\n.#{$ionicons-prefix}spoon:before,\n.#{$ionicons-prefix}star:before,\n.#{$ionicons-prefix}stats-bars:before,\n.#{$ionicons-prefix}steam:before,\n.#{$ionicons-prefix}stop:before,\n.#{$ionicons-prefix}thermometer:before,\n.#{$ionicons-prefix}thumbsdown:before,\n.#{$ionicons-prefix}thumbsup:before,\n.#{$ionicons-prefix}toggle:before,\n.#{$ionicons-prefix}toggle-filled:before,\n.#{$ionicons-prefix}transgender:before,\n.#{$ionicons-prefix}trash-a:before,\n.#{$ionicons-prefix}trash-b:before,\n.#{$ionicons-prefix}trophy:before,\n.#{$ionicons-prefix}tshirt:before,\n.#{$ionicons-prefix}tshirt-outline:before,\n.#{$ionicons-prefix}umbrella:before,\n.#{$ionicons-prefix}university:before,\n.#{$ionicons-prefix}unlocked:before,\n.#{$ionicons-prefix}upload:before,\n.#{$ionicons-prefix}usb:before,\n.#{$ionicons-prefix}videocamera:before,\n.#{$ionicons-prefix}volume-high:before,\n.#{$ionicons-prefix}volume-low:before,\n.#{$ionicons-prefix}volume-medium:before,\n.#{$ionicons-prefix}volume-mute:before,\n.#{$ionicons-prefix}wand:before,\n.#{$ionicons-prefix}waterdrop:before,\n.#{$ionicons-prefix}wifi:before,\n.#{$ionicons-prefix}wineglass:before,\n.#{$ionicons-prefix}woman:before,\n.#{$ionicons-prefix}wrench:before,\n.#{$ionicons-prefix}xbox:before\n{\n  @extend .ion;\n}\n.#{$ionicons-prefix}alert:before { content: $ionicon-var-alert; }\n.#{$ionicons-prefix}alert-circled:before { content: $ionicon-var-alert-circled; }\n.#{$ionicons-prefix}android-add:before { content: $ionicon-var-android-add; }\n.#{$ionicons-prefix}android-add-circle:before { content: $ionicon-var-android-add-circle; }\n.#{$ionicons-prefix}android-alarm-clock:before { content: $ionicon-var-android-alarm-clock; }\n.#{$ionicons-prefix}android-alert:before { content: $ionicon-var-android-alert; }\n.#{$ionicons-prefix}android-apps:before { content: $ionicon-var-android-apps; }\n.#{$ionicons-prefix}android-archive:before { content: $ionicon-var-android-archive; }\n.#{$ionicons-prefix}android-arrow-back:before { content: $ionicon-var-android-arrow-back; }\n.#{$ionicons-prefix}android-arrow-down:before { content: $ionicon-var-android-arrow-down; }\n.#{$ionicons-prefix}android-arrow-dropdown:before { content: $ionicon-var-android-arrow-dropdown; }\n.#{$ionicons-prefix}android-arrow-dropdown-circle:before { content: $ionicon-var-android-arrow-dropdown-circle; }\n.#{$ionicons-prefix}android-arrow-dropleft:before { content: $ionicon-var-android-arrow-dropleft; }\n.#{$ionicons-prefix}android-arrow-dropleft-circle:before { content: $ionicon-var-android-arrow-dropleft-circle; }\n.#{$ionicons-prefix}android-arrow-dropright:before { content: $ionicon-var-android-arrow-dropright; }\n.#{$ionicons-prefix}android-arrow-dropright-circle:before { content: $ionicon-var-android-arrow-dropright-circle; }\n.#{$ionicons-prefix}android-arrow-dropup:before { content: $ionicon-var-android-arrow-dropup; }\n.#{$ionicons-prefix}android-arrow-dropup-circle:before { content: $ionicon-var-android-arrow-dropup-circle; }\n.#{$ionicons-prefix}android-arrow-forward:before { content: $ionicon-var-android-arrow-forward; }\n.#{$ionicons-prefix}android-arrow-up:before { content: $ionicon-var-android-arrow-up; }\n.#{$ionicons-prefix}android-attach:before { content: $ionicon-var-android-attach; }\n.#{$ionicons-prefix}android-bar:before { content: $ionicon-var-android-bar; }\n.#{$ionicons-prefix}android-bicycle:before { content: $ionicon-var-android-bicycle; }\n.#{$ionicons-prefix}android-boat:before { content: $ionicon-var-android-boat; }\n.#{$ionicons-prefix}android-bookmark:before { content: $ionicon-var-android-bookmark; }\n.#{$ionicons-prefix}android-bulb:before { content: $ionicon-var-android-bulb; }\n.#{$ionicons-prefix}android-bus:before { content: $ionicon-var-android-bus; }\n.#{$ionicons-prefix}android-calendar:before { content: $ionicon-var-android-calendar; }\n.#{$ionicons-prefix}android-call:before { content: $ionicon-var-android-call; }\n.#{$ionicons-prefix}android-camera:before { content: $ionicon-var-android-camera; }\n.#{$ionicons-prefix}android-cancel:before { content: $ionicon-var-android-cancel; }\n.#{$ionicons-prefix}android-car:before { content: $ionicon-var-android-car; }\n.#{$ionicons-prefix}android-cart:before { content: $ionicon-var-android-cart; }\n.#{$ionicons-prefix}android-chat:before { content: $ionicon-var-android-chat; }\n.#{$ionicons-prefix}android-checkbox:before { content: $ionicon-var-android-checkbox; }\n.#{$ionicons-prefix}android-checkbox-blank:before { content: $ionicon-var-android-checkbox-blank; }\n.#{$ionicons-prefix}android-checkbox-outline:before { content: $ionicon-var-android-checkbox-outline; }\n.#{$ionicons-prefix}android-checkbox-outline-blank:before { content: $ionicon-var-android-checkbox-outline-blank; }\n.#{$ionicons-prefix}android-checkmark-circle:before { content: $ionicon-var-android-checkmark-circle; }\n.#{$ionicons-prefix}android-clipboard:before { content: $ionicon-var-android-clipboard; }\n.#{$ionicons-prefix}android-close:before { content: $ionicon-var-android-close; }\n.#{$ionicons-prefix}android-cloud:before { content: $ionicon-var-android-cloud; }\n.#{$ionicons-prefix}android-cloud-circle:before { content: $ionicon-var-android-cloud-circle; }\n.#{$ionicons-prefix}android-cloud-done:before { content: $ionicon-var-android-cloud-done; }\n.#{$ionicons-prefix}android-cloud-outline:before { content: $ionicon-var-android-cloud-outline; }\n.#{$ionicons-prefix}android-color-palette:before { content: $ionicon-var-android-color-palette; }\n.#{$ionicons-prefix}android-compass:before { content: $ionicon-var-android-compass; }\n.#{$ionicons-prefix}android-contact:before { content: $ionicon-var-android-contact; }\n.#{$ionicons-prefix}android-contacts:before { content: $ionicon-var-android-contacts; }\n.#{$ionicons-prefix}android-contract:before { content: $ionicon-var-android-contract; }\n.#{$ionicons-prefix}android-create:before { content: $ionicon-var-android-create; }\n.#{$ionicons-prefix}android-delete:before { content: $ionicon-var-android-delete; }\n.#{$ionicons-prefix}android-desktop:before { content: $ionicon-var-android-desktop; }\n.#{$ionicons-prefix}android-document:before { content: $ionicon-var-android-document; }\n.#{$ionicons-prefix}android-done:before { content: $ionicon-var-android-done; }\n.#{$ionicons-prefix}android-done-all:before { content: $ionicon-var-android-done-all; }\n.#{$ionicons-prefix}android-download:before { content: $ionicon-var-android-download; }\n.#{$ionicons-prefix}android-drafts:before { content: $ionicon-var-android-drafts; }\n.#{$ionicons-prefix}android-exit:before { content: $ionicon-var-android-exit; }\n.#{$ionicons-prefix}android-expand:before { content: $ionicon-var-android-expand; }\n.#{$ionicons-prefix}android-favorite:before { content: $ionicon-var-android-favorite; }\n.#{$ionicons-prefix}android-favorite-outline:before { content: $ionicon-var-android-favorite-outline; }\n.#{$ionicons-prefix}android-film:before { content: $ionicon-var-android-film; }\n.#{$ionicons-prefix}android-folder:before { content: $ionicon-var-android-folder; }\n.#{$ionicons-prefix}android-folder-open:before { content: $ionicon-var-android-folder-open; }\n.#{$ionicons-prefix}android-funnel:before { content: $ionicon-var-android-funnel; }\n.#{$ionicons-prefix}android-globe:before { content: $ionicon-var-android-globe; }\n.#{$ionicons-prefix}android-hand:before { content: $ionicon-var-android-hand; }\n.#{$ionicons-prefix}android-hangout:before { content: $ionicon-var-android-hangout; }\n.#{$ionicons-prefix}android-happy:before { content: $ionicon-var-android-happy; }\n.#{$ionicons-prefix}android-home:before { content: $ionicon-var-android-home; }\n.#{$ionicons-prefix}android-image:before { content: $ionicon-var-android-image; }\n.#{$ionicons-prefix}android-laptop:before { content: $ionicon-var-android-laptop; }\n.#{$ionicons-prefix}android-list:before { content: $ionicon-var-android-list; }\n.#{$ionicons-prefix}android-locate:before { content: $ionicon-var-android-locate; }\n.#{$ionicons-prefix}android-lock:before { content: $ionicon-var-android-lock; }\n.#{$ionicons-prefix}android-mail:before { content: $ionicon-var-android-mail; }\n.#{$ionicons-prefix}android-map:before { content: $ionicon-var-android-map; }\n.#{$ionicons-prefix}android-menu:before { content: $ionicon-var-android-menu; }\n.#{$ionicons-prefix}android-microphone:before { content: $ionicon-var-android-microphone; }\n.#{$ionicons-prefix}android-microphone-off:before { content: $ionicon-var-android-microphone-off; }\n.#{$ionicons-prefix}android-more-horizontal:before { content: $ionicon-var-android-more-horizontal; }\n.#{$ionicons-prefix}android-more-vertical:before { content: $ionicon-var-android-more-vertical; }\n.#{$ionicons-prefix}android-navigate:before { content: $ionicon-var-android-navigate; }\n.#{$ionicons-prefix}android-notifications:before { content: $ionicon-var-android-notifications; }\n.#{$ionicons-prefix}android-notifications-none:before { content: $ionicon-var-android-notifications-none; }\n.#{$ionicons-prefix}android-notifications-off:before { content: $ionicon-var-android-notifications-off; }\n.#{$ionicons-prefix}android-open:before { content: $ionicon-var-android-open; }\n.#{$ionicons-prefix}android-options:before { content: $ionicon-var-android-options; }\n.#{$ionicons-prefix}android-people:before { content: $ionicon-var-android-people; }\n.#{$ionicons-prefix}android-person:before { content: $ionicon-var-android-person; }\n.#{$ionicons-prefix}android-person-add:before { content: $ionicon-var-android-person-add; }\n.#{$ionicons-prefix}android-phone-landscape:before { content: $ionicon-var-android-phone-landscape; }\n.#{$ionicons-prefix}android-phone-portrait:before { content: $ionicon-var-android-phone-portrait; }\n.#{$ionicons-prefix}android-pin:before { content: $ionicon-var-android-pin; }\n.#{$ionicons-prefix}android-plane:before { content: $ionicon-var-android-plane; }\n.#{$ionicons-prefix}android-playstore:before { content: $ionicon-var-android-playstore; }\n.#{$ionicons-prefix}android-print:before { content: $ionicon-var-android-print; }\n.#{$ionicons-prefix}android-radio-button-off:before { content: $ionicon-var-android-radio-button-off; }\n.#{$ionicons-prefix}android-radio-button-on:before { content: $ionicon-var-android-radio-button-on; }\n.#{$ionicons-prefix}android-refresh:before { content: $ionicon-var-android-refresh; }\n.#{$ionicons-prefix}android-remove:before { content: $ionicon-var-android-remove; }\n.#{$ionicons-prefix}android-remove-circle:before { content: $ionicon-var-android-remove-circle; }\n.#{$ionicons-prefix}android-restaurant:before { content: $ionicon-var-android-restaurant; }\n.#{$ionicons-prefix}android-sad:before { content: $ionicon-var-android-sad; }\n.#{$ionicons-prefix}android-search:before { content: $ionicon-var-android-search; }\n.#{$ionicons-prefix}android-send:before { content: $ionicon-var-android-send; }\n.#{$ionicons-prefix}android-settings:before { content: $ionicon-var-android-settings; }\n.#{$ionicons-prefix}android-share:before { content: $ionicon-var-android-share; }\n.#{$ionicons-prefix}android-share-alt:before { content: $ionicon-var-android-share-alt; }\n.#{$ionicons-prefix}android-star:before { content: $ionicon-var-android-star; }\n.#{$ionicons-prefix}android-star-half:before { content: $ionicon-var-android-star-half; }\n.#{$ionicons-prefix}android-star-outline:before { content: $ionicon-var-android-star-outline; }\n.#{$ionicons-prefix}android-stopwatch:before { content: $ionicon-var-android-stopwatch; }\n.#{$ionicons-prefix}android-subway:before { content: $ionicon-var-android-subway; }\n.#{$ionicons-prefix}android-sunny:before { content: $ionicon-var-android-sunny; }\n.#{$ionicons-prefix}android-sync:before { content: $ionicon-var-android-sync; }\n.#{$ionicons-prefix}android-textsms:before { content: $ionicon-var-android-textsms; }\n.#{$ionicons-prefix}android-time:before { content: $ionicon-var-android-time; }\n.#{$ionicons-prefix}android-train:before { content: $ionicon-var-android-train; }\n.#{$ionicons-prefix}android-unlock:before { content: $ionicon-var-android-unlock; }\n.#{$ionicons-prefix}android-upload:before { content: $ionicon-var-android-upload; }\n.#{$ionicons-prefix}android-volume-down:before { content: $ionicon-var-android-volume-down; }\n.#{$ionicons-prefix}android-volume-mute:before { content: $ionicon-var-android-volume-mute; }\n.#{$ionicons-prefix}android-volume-off:before { content: $ionicon-var-android-volume-off; }\n.#{$ionicons-prefix}android-volume-up:before { content: $ionicon-var-android-volume-up; }\n.#{$ionicons-prefix}android-walk:before { content: $ionicon-var-android-walk; }\n.#{$ionicons-prefix}android-warning:before { content: $ionicon-var-android-warning; }\n.#{$ionicons-prefix}android-watch:before { content: $ionicon-var-android-watch; }\n.#{$ionicons-prefix}android-wifi:before { content: $ionicon-var-android-wifi; }\n.#{$ionicons-prefix}aperture:before { content: $ionicon-var-aperture; }\n.#{$ionicons-prefix}archive:before { content: $ionicon-var-archive; }\n.#{$ionicons-prefix}arrow-down-a:before { content: $ionicon-var-arrow-down-a; }\n.#{$ionicons-prefix}arrow-down-b:before { content: $ionicon-var-arrow-down-b; }\n.#{$ionicons-prefix}arrow-down-c:before { content: $ionicon-var-arrow-down-c; }\n.#{$ionicons-prefix}arrow-expand:before { content: $ionicon-var-arrow-expand; }\n.#{$ionicons-prefix}arrow-graph-down-left:before { content: $ionicon-var-arrow-graph-down-left; }\n.#{$ionicons-prefix}arrow-graph-down-right:before { content: $ionicon-var-arrow-graph-down-right; }\n.#{$ionicons-prefix}arrow-graph-up-left:before { content: $ionicon-var-arrow-graph-up-left; }\n.#{$ionicons-prefix}arrow-graph-up-right:before { content: $ionicon-var-arrow-graph-up-right; }\n.#{$ionicons-prefix}arrow-left-a:before { content: $ionicon-var-arrow-left-a; }\n.#{$ionicons-prefix}arrow-left-b:before { content: $ionicon-var-arrow-left-b; }\n.#{$ionicons-prefix}arrow-left-c:before { content: $ionicon-var-arrow-left-c; }\n.#{$ionicons-prefix}arrow-move:before { content: $ionicon-var-arrow-move; }\n.#{$ionicons-prefix}arrow-resize:before { content: $ionicon-var-arrow-resize; }\n.#{$ionicons-prefix}arrow-return-left:before { content: $ionicon-var-arrow-return-left; }\n.#{$ionicons-prefix}arrow-return-right:before { content: $ionicon-var-arrow-return-right; }\n.#{$ionicons-prefix}arrow-right-a:before { content: $ionicon-var-arrow-right-a; }\n.#{$ionicons-prefix}arrow-right-b:before { content: $ionicon-var-arrow-right-b; }\n.#{$ionicons-prefix}arrow-right-c:before { content: $ionicon-var-arrow-right-c; }\n.#{$ionicons-prefix}arrow-shrink:before { content: $ionicon-var-arrow-shrink; }\n.#{$ionicons-prefix}arrow-swap:before { content: $ionicon-var-arrow-swap; }\n.#{$ionicons-prefix}arrow-up-a:before { content: $ionicon-var-arrow-up-a; }\n.#{$ionicons-prefix}arrow-up-b:before { content: $ionicon-var-arrow-up-b; }\n.#{$ionicons-prefix}arrow-up-c:before { content: $ionicon-var-arrow-up-c; }\n.#{$ionicons-prefix}asterisk:before { content: $ionicon-var-asterisk; }\n.#{$ionicons-prefix}at:before { content: $ionicon-var-at; }\n.#{$ionicons-prefix}backspace:before { content: $ionicon-var-backspace; }\n.#{$ionicons-prefix}backspace-outline:before { content: $ionicon-var-backspace-outline; }\n.#{$ionicons-prefix}bag:before { content: $ionicon-var-bag; }\n.#{$ionicons-prefix}battery-charging:before { content: $ionicon-var-battery-charging; }\n.#{$ionicons-prefix}battery-empty:before { content: $ionicon-var-battery-empty; }\n.#{$ionicons-prefix}battery-full:before { content: $ionicon-var-battery-full; }\n.#{$ionicons-prefix}battery-half:before { content: $ionicon-var-battery-half; }\n.#{$ionicons-prefix}battery-low:before { content: $ionicon-var-battery-low; }\n.#{$ionicons-prefix}beaker:before { content: $ionicon-var-beaker; }\n.#{$ionicons-prefix}beer:before { content: $ionicon-var-beer; }\n.#{$ionicons-prefix}bluetooth:before { content: $ionicon-var-bluetooth; }\n.#{$ionicons-prefix}bonfire:before { content: $ionicon-var-bonfire; }\n.#{$ionicons-prefix}bookmark:before { content: $ionicon-var-bookmark; }\n.#{$ionicons-prefix}bowtie:before { content: $ionicon-var-bowtie; }\n.#{$ionicons-prefix}briefcase:before { content: $ionicon-var-briefcase; }\n.#{$ionicons-prefix}bug:before { content: $ionicon-var-bug; }\n.#{$ionicons-prefix}calculator:before { content: $ionicon-var-calculator; }\n.#{$ionicons-prefix}calendar:before { content: $ionicon-var-calendar; }\n.#{$ionicons-prefix}camera:before { content: $ionicon-var-camera; }\n.#{$ionicons-prefix}card:before { content: $ionicon-var-card; }\n.#{$ionicons-prefix}cash:before { content: $ionicon-var-cash; }\n.#{$ionicons-prefix}chatbox:before { content: $ionicon-var-chatbox; }\n.#{$ionicons-prefix}chatbox-working:before { content: $ionicon-var-chatbox-working; }\n.#{$ionicons-prefix}chatboxes:before { content: $ionicon-var-chatboxes; }\n.#{$ionicons-prefix}chatbubble:before { content: $ionicon-var-chatbubble; }\n.#{$ionicons-prefix}chatbubble-working:before { content: $ionicon-var-chatbubble-working; }\n.#{$ionicons-prefix}chatbubbles:before { content: $ionicon-var-chatbubbles; }\n.#{$ionicons-prefix}checkmark:before { content: $ionicon-var-checkmark; }\n.#{$ionicons-prefix}checkmark-circled:before { content: $ionicon-var-checkmark-circled; }\n.#{$ionicons-prefix}checkmark-round:before { content: $ionicon-var-checkmark-round; }\n.#{$ionicons-prefix}chevron-down:before { content: $ionicon-var-chevron-down; }\n.#{$ionicons-prefix}chevron-left:before { content: $ionicon-var-chevron-left; }\n.#{$ionicons-prefix}chevron-right:before { content: $ionicon-var-chevron-right; }\n.#{$ionicons-prefix}chevron-up:before { content: $ionicon-var-chevron-up; }\n.#{$ionicons-prefix}clipboard:before { content: $ionicon-var-clipboard; }\n.#{$ionicons-prefix}clock:before { content: $ionicon-var-clock; }\n.#{$ionicons-prefix}close:before { content: $ionicon-var-close; }\n.#{$ionicons-prefix}close-circled:before { content: $ionicon-var-close-circled; }\n.#{$ionicons-prefix}close-round:before { content: $ionicon-var-close-round; }\n.#{$ionicons-prefix}closed-captioning:before { content: $ionicon-var-closed-captioning; }\n.#{$ionicons-prefix}cloud:before { content: $ionicon-var-cloud; }\n.#{$ionicons-prefix}code:before { content: $ionicon-var-code; }\n.#{$ionicons-prefix}code-download:before { content: $ionicon-var-code-download; }\n.#{$ionicons-prefix}code-working:before { content: $ionicon-var-code-working; }\n.#{$ionicons-prefix}coffee:before { content: $ionicon-var-coffee; }\n.#{$ionicons-prefix}compass:before { content: $ionicon-var-compass; }\n.#{$ionicons-prefix}compose:before { content: $ionicon-var-compose; }\n.#{$ionicons-prefix}connection-bars:before { content: $ionicon-var-connection-bars; }\n.#{$ionicons-prefix}contrast:before { content: $ionicon-var-contrast; }\n.#{$ionicons-prefix}crop:before { content: $ionicon-var-crop; }\n.#{$ionicons-prefix}cube:before { content: $ionicon-var-cube; }\n.#{$ionicons-prefix}disc:before { content: $ionicon-var-disc; }\n.#{$ionicons-prefix}document:before { content: $ionicon-var-document; }\n.#{$ionicons-prefix}document-text:before { content: $ionicon-var-document-text; }\n.#{$ionicons-prefix}drag:before { content: $ionicon-var-drag; }\n.#{$ionicons-prefix}earth:before { content: $ionicon-var-earth; }\n.#{$ionicons-prefix}easel:before { content: $ionicon-var-easel; }\n.#{$ionicons-prefix}edit:before { content: $ionicon-var-edit; }\n.#{$ionicons-prefix}egg:before { content: $ionicon-var-egg; }\n.#{$ionicons-prefix}eject:before { content: $ionicon-var-eject; }\n.#{$ionicons-prefix}email:before { content: $ionicon-var-email; }\n.#{$ionicons-prefix}email-unread:before { content: $ionicon-var-email-unread; }\n.#{$ionicons-prefix}erlenmeyer-flask:before { content: $ionicon-var-erlenmeyer-flask; }\n.#{$ionicons-prefix}erlenmeyer-flask-bubbles:before { content: $ionicon-var-erlenmeyer-flask-bubbles; }\n.#{$ionicons-prefix}eye:before { content: $ionicon-var-eye; }\n.#{$ionicons-prefix}eye-disabled:before { content: $ionicon-var-eye-disabled; }\n.#{$ionicons-prefix}female:before { content: $ionicon-var-female; }\n.#{$ionicons-prefix}filing:before { content: $ionicon-var-filing; }\n.#{$ionicons-prefix}film-marker:before { content: $ionicon-var-film-marker; }\n.#{$ionicons-prefix}fireball:before { content: $ionicon-var-fireball; }\n.#{$ionicons-prefix}flag:before { content: $ionicon-var-flag; }\n.#{$ionicons-prefix}flame:before { content: $ionicon-var-flame; }\n.#{$ionicons-prefix}flash:before { content: $ionicon-var-flash; }\n.#{$ionicons-prefix}flash-off:before { content: $ionicon-var-flash-off; }\n.#{$ionicons-prefix}folder:before { content: $ionicon-var-folder; }\n.#{$ionicons-prefix}fork:before { content: $ionicon-var-fork; }\n.#{$ionicons-prefix}fork-repo:before { content: $ionicon-var-fork-repo; }\n.#{$ionicons-prefix}forward:before { content: $ionicon-var-forward; }\n.#{$ionicons-prefix}funnel:before { content: $ionicon-var-funnel; }\n.#{$ionicons-prefix}gear-a:before { content: $ionicon-var-gear-a; }\n.#{$ionicons-prefix}gear-b:before { content: $ionicon-var-gear-b; }\n.#{$ionicons-prefix}grid:before { content: $ionicon-var-grid; }\n.#{$ionicons-prefix}hammer:before { content: $ionicon-var-hammer; }\n.#{$ionicons-prefix}happy:before { content: $ionicon-var-happy; }\n.#{$ionicons-prefix}happy-outline:before { content: $ionicon-var-happy-outline; }\n.#{$ionicons-prefix}headphone:before { content: $ionicon-var-headphone; }\n.#{$ionicons-prefix}heart:before { content: $ionicon-var-heart; }\n.#{$ionicons-prefix}heart-broken:before { content: $ionicon-var-heart-broken; }\n.#{$ionicons-prefix}help:before { content: $ionicon-var-help; }\n.#{$ionicons-prefix}help-buoy:before { content: $ionicon-var-help-buoy; }\n.#{$ionicons-prefix}help-circled:before { content: $ionicon-var-help-circled; }\n.#{$ionicons-prefix}home:before { content: $ionicon-var-home; }\n.#{$ionicons-prefix}icecream:before { content: $ionicon-var-icecream; }\n.#{$ionicons-prefix}image:before { content: $ionicon-var-image; }\n.#{$ionicons-prefix}images:before { content: $ionicon-var-images; }\n.#{$ionicons-prefix}information:before { content: $ionicon-var-information; }\n.#{$ionicons-prefix}information-circled:before { content: $ionicon-var-information-circled; }\n.#{$ionicons-prefix}ionic:before { content: $ionicon-var-ionic; }\n.#{$ionicons-prefix}ios-alarm:before { content: $ionicon-var-ios-alarm; }\n.#{$ionicons-prefix}ios-alarm-outline:before { content: $ionicon-var-ios-alarm-outline; }\n.#{$ionicons-prefix}ios-albums:before { content: $ionicon-var-ios-albums; }\n.#{$ionicons-prefix}ios-albums-outline:before { content: $ionicon-var-ios-albums-outline; }\n.#{$ionicons-prefix}ios-americanfootball:before { content: $ionicon-var-ios-americanfootball; }\n.#{$ionicons-prefix}ios-americanfootball-outline:before { content: $ionicon-var-ios-americanfootball-outline; }\n.#{$ionicons-prefix}ios-analytics:before { content: $ionicon-var-ios-analytics; }\n.#{$ionicons-prefix}ios-analytics-outline:before { content: $ionicon-var-ios-analytics-outline; }\n.#{$ionicons-prefix}ios-arrow-back:before { content: $ionicon-var-ios-arrow-back; }\n.#{$ionicons-prefix}ios-arrow-down:before { content: $ionicon-var-ios-arrow-down; }\n.#{$ionicons-prefix}ios-arrow-forward:before { content: $ionicon-var-ios-arrow-forward; }\n.#{$ionicons-prefix}ios-arrow-left:before { content: $ionicon-var-ios-arrow-left; }\n.#{$ionicons-prefix}ios-arrow-right:before { content: $ionicon-var-ios-arrow-right; }\n.#{$ionicons-prefix}ios-arrow-thin-down:before { content: $ionicon-var-ios-arrow-thin-down; }\n.#{$ionicons-prefix}ios-arrow-thin-left:before { content: $ionicon-var-ios-arrow-thin-left; }\n.#{$ionicons-prefix}ios-arrow-thin-right:before { content: $ionicon-var-ios-arrow-thin-right; }\n.#{$ionicons-prefix}ios-arrow-thin-up:before { content: $ionicon-var-ios-arrow-thin-up; }\n.#{$ionicons-prefix}ios-arrow-up:before { content: $ionicon-var-ios-arrow-up; }\n.#{$ionicons-prefix}ios-at:before { content: $ionicon-var-ios-at; }\n.#{$ionicons-prefix}ios-at-outline:before { content: $ionicon-var-ios-at-outline; }\n.#{$ionicons-prefix}ios-barcode:before { content: $ionicon-var-ios-barcode; }\n.#{$ionicons-prefix}ios-barcode-outline:before { content: $ionicon-var-ios-barcode-outline; }\n.#{$ionicons-prefix}ios-baseball:before { content: $ionicon-var-ios-baseball; }\n.#{$ionicons-prefix}ios-baseball-outline:before { content: $ionicon-var-ios-baseball-outline; }\n.#{$ionicons-prefix}ios-basketball:before { content: $ionicon-var-ios-basketball; }\n.#{$ionicons-prefix}ios-basketball-outline:before { content: $ionicon-var-ios-basketball-outline; }\n.#{$ionicons-prefix}ios-bell:before { content: $ionicon-var-ios-bell; }\n.#{$ionicons-prefix}ios-bell-outline:before { content: $ionicon-var-ios-bell-outline; }\n.#{$ionicons-prefix}ios-body:before { content: $ionicon-var-ios-body; }\n.#{$ionicons-prefix}ios-body-outline:before { content: $ionicon-var-ios-body-outline; }\n.#{$ionicons-prefix}ios-bolt:before { content: $ionicon-var-ios-bolt; }\n.#{$ionicons-prefix}ios-bolt-outline:before { content: $ionicon-var-ios-bolt-outline; }\n.#{$ionicons-prefix}ios-book:before { content: $ionicon-var-ios-book; }\n.#{$ionicons-prefix}ios-book-outline:before { content: $ionicon-var-ios-book-outline; }\n.#{$ionicons-prefix}ios-bookmarks:before { content: $ionicon-var-ios-bookmarks; }\n.#{$ionicons-prefix}ios-bookmarks-outline:before { content: $ionicon-var-ios-bookmarks-outline; }\n.#{$ionicons-prefix}ios-box:before { content: $ionicon-var-ios-box; }\n.#{$ionicons-prefix}ios-box-outline:before { content: $ionicon-var-ios-box-outline; }\n.#{$ionicons-prefix}ios-briefcase:before { content: $ionicon-var-ios-briefcase; }\n.#{$ionicons-prefix}ios-briefcase-outline:before { content: $ionicon-var-ios-briefcase-outline; }\n.#{$ionicons-prefix}ios-browsers:before { content: $ionicon-var-ios-browsers; }\n.#{$ionicons-prefix}ios-browsers-outline:before { content: $ionicon-var-ios-browsers-outline; }\n.#{$ionicons-prefix}ios-calculator:before { content: $ionicon-var-ios-calculator; }\n.#{$ionicons-prefix}ios-calculator-outline:before { content: $ionicon-var-ios-calculator-outline; }\n.#{$ionicons-prefix}ios-calendar:before { content: $ionicon-var-ios-calendar; }\n.#{$ionicons-prefix}ios-calendar-outline:before { content: $ionicon-var-ios-calendar-outline; }\n.#{$ionicons-prefix}ios-camera:before { content: $ionicon-var-ios-camera; }\n.#{$ionicons-prefix}ios-camera-outline:before { content: $ionicon-var-ios-camera-outline; }\n.#{$ionicons-prefix}ios-cart:before { content: $ionicon-var-ios-cart; }\n.#{$ionicons-prefix}ios-cart-outline:before { content: $ionicon-var-ios-cart-outline; }\n.#{$ionicons-prefix}ios-chatboxes:before { content: $ionicon-var-ios-chatboxes; }\n.#{$ionicons-prefix}ios-chatboxes-outline:before { content: $ionicon-var-ios-chatboxes-outline; }\n.#{$ionicons-prefix}ios-chatbubble:before { content: $ionicon-var-ios-chatbubble; }\n.#{$ionicons-prefix}ios-chatbubble-outline:before { content: $ionicon-var-ios-chatbubble-outline; }\n.#{$ionicons-prefix}ios-checkmark:before { content: $ionicon-var-ios-checkmark; }\n.#{$ionicons-prefix}ios-checkmark-empty:before { content: $ionicon-var-ios-checkmark-empty; }\n.#{$ionicons-prefix}ios-checkmark-outline:before { content: $ionicon-var-ios-checkmark-outline; }\n.#{$ionicons-prefix}ios-circle-filled:before { content: $ionicon-var-ios-circle-filled; }\n.#{$ionicons-prefix}ios-circle-outline:before { content: $ionicon-var-ios-circle-outline; }\n.#{$ionicons-prefix}ios-clock:before { content: $ionicon-var-ios-clock; }\n.#{$ionicons-prefix}ios-clock-outline:before { content: $ionicon-var-ios-clock-outline; }\n.#{$ionicons-prefix}ios-close:before { content: $ionicon-var-ios-close; }\n.#{$ionicons-prefix}ios-close-empty:before { content: $ionicon-var-ios-close-empty; }\n.#{$ionicons-prefix}ios-close-outline:before { content: $ionicon-var-ios-close-outline; }\n.#{$ionicons-prefix}ios-cloud:before { content: $ionicon-var-ios-cloud; }\n.#{$ionicons-prefix}ios-cloud-download:before { content: $ionicon-var-ios-cloud-download; }\n.#{$ionicons-prefix}ios-cloud-download-outline:before { content: $ionicon-var-ios-cloud-download-outline; }\n.#{$ionicons-prefix}ios-cloud-outline:before { content: $ionicon-var-ios-cloud-outline; }\n.#{$ionicons-prefix}ios-cloud-upload:before { content: $ionicon-var-ios-cloud-upload; }\n.#{$ionicons-prefix}ios-cloud-upload-outline:before { content: $ionicon-var-ios-cloud-upload-outline; }\n.#{$ionicons-prefix}ios-cloudy:before { content: $ionicon-var-ios-cloudy; }\n.#{$ionicons-prefix}ios-cloudy-night:before { content: $ionicon-var-ios-cloudy-night; }\n.#{$ionicons-prefix}ios-cloudy-night-outline:before { content: $ionicon-var-ios-cloudy-night-outline; }\n.#{$ionicons-prefix}ios-cloudy-outline:before { content: $ionicon-var-ios-cloudy-outline; }\n.#{$ionicons-prefix}ios-cog:before { content: $ionicon-var-ios-cog; }\n.#{$ionicons-prefix}ios-cog-outline:before { content: $ionicon-var-ios-cog-outline; }\n.#{$ionicons-prefix}ios-color-filter:before { content: $ionicon-var-ios-color-filter; }\n.#{$ionicons-prefix}ios-color-filter-outline:before { content: $ionicon-var-ios-color-filter-outline; }\n.#{$ionicons-prefix}ios-color-wand:before { content: $ionicon-var-ios-color-wand; }\n.#{$ionicons-prefix}ios-color-wand-outline:before { content: $ionicon-var-ios-color-wand-outline; }\n.#{$ionicons-prefix}ios-compose:before { content: $ionicon-var-ios-compose; }\n.#{$ionicons-prefix}ios-compose-outline:before { content: $ionicon-var-ios-compose-outline; }\n.#{$ionicons-prefix}ios-contact:before { content: $ionicon-var-ios-contact; }\n.#{$ionicons-prefix}ios-contact-outline:before { content: $ionicon-var-ios-contact-outline; }\n.#{$ionicons-prefix}ios-copy:before { content: $ionicon-var-ios-copy; }\n.#{$ionicons-prefix}ios-copy-outline:before { content: $ionicon-var-ios-copy-outline; }\n.#{$ionicons-prefix}ios-crop:before { content: $ionicon-var-ios-crop; }\n.#{$ionicons-prefix}ios-crop-strong:before { content: $ionicon-var-ios-crop-strong; }\n.#{$ionicons-prefix}ios-download:before { content: $ionicon-var-ios-download; }\n.#{$ionicons-prefix}ios-download-outline:before { content: $ionicon-var-ios-download-outline; }\n.#{$ionicons-prefix}ios-drag:before { content: $ionicon-var-ios-drag; }\n.#{$ionicons-prefix}ios-email:before { content: $ionicon-var-ios-email; }\n.#{$ionicons-prefix}ios-email-outline:before { content: $ionicon-var-ios-email-outline; }\n.#{$ionicons-prefix}ios-eye:before { content: $ionicon-var-ios-eye; }\n.#{$ionicons-prefix}ios-eye-outline:before { content: $ionicon-var-ios-eye-outline; }\n.#{$ionicons-prefix}ios-fastforward:before { content: $ionicon-var-ios-fastforward; }\n.#{$ionicons-prefix}ios-fastforward-outline:before { content: $ionicon-var-ios-fastforward-outline; }\n.#{$ionicons-prefix}ios-filing:before { content: $ionicon-var-ios-filing; }\n.#{$ionicons-prefix}ios-filing-outline:before { content: $ionicon-var-ios-filing-outline; }\n.#{$ionicons-prefix}ios-film:before { content: $ionicon-var-ios-film; }\n.#{$ionicons-prefix}ios-film-outline:before { content: $ionicon-var-ios-film-outline; }\n.#{$ionicons-prefix}ios-flag:before { content: $ionicon-var-ios-flag; }\n.#{$ionicons-prefix}ios-flag-outline:before { content: $ionicon-var-ios-flag-outline; }\n.#{$ionicons-prefix}ios-flame:before { content: $ionicon-var-ios-flame; }\n.#{$ionicons-prefix}ios-flame-outline:before { content: $ionicon-var-ios-flame-outline; }\n.#{$ionicons-prefix}ios-flask:before { content: $ionicon-var-ios-flask; }\n.#{$ionicons-prefix}ios-flask-outline:before { content: $ionicon-var-ios-flask-outline; }\n.#{$ionicons-prefix}ios-flower:before { content: $ionicon-var-ios-flower; }\n.#{$ionicons-prefix}ios-flower-outline:before { content: $ionicon-var-ios-flower-outline; }\n.#{$ionicons-prefix}ios-folder:before { content: $ionicon-var-ios-folder; }\n.#{$ionicons-prefix}ios-folder-outline:before { content: $ionicon-var-ios-folder-outline; }\n.#{$ionicons-prefix}ios-football:before { content: $ionicon-var-ios-football; }\n.#{$ionicons-prefix}ios-football-outline:before { content: $ionicon-var-ios-football-outline; }\n.#{$ionicons-prefix}ios-game-controller-a:before { content: $ionicon-var-ios-game-controller-a; }\n.#{$ionicons-prefix}ios-game-controller-a-outline:before { content: $ionicon-var-ios-game-controller-a-outline; }\n.#{$ionicons-prefix}ios-game-controller-b:before { content: $ionicon-var-ios-game-controller-b; }\n.#{$ionicons-prefix}ios-game-controller-b-outline:before { content: $ionicon-var-ios-game-controller-b-outline; }\n.#{$ionicons-prefix}ios-gear:before { content: $ionicon-var-ios-gear; }\n.#{$ionicons-prefix}ios-gear-outline:before { content: $ionicon-var-ios-gear-outline; }\n.#{$ionicons-prefix}ios-glasses:before { content: $ionicon-var-ios-glasses; }\n.#{$ionicons-prefix}ios-glasses-outline:before { content: $ionicon-var-ios-glasses-outline; }\n.#{$ionicons-prefix}ios-grid-view:before { content: $ionicon-var-ios-grid-view; }\n.#{$ionicons-prefix}ios-grid-view-outline:before { content: $ionicon-var-ios-grid-view-outline; }\n.#{$ionicons-prefix}ios-heart:before { content: $ionicon-var-ios-heart; }\n.#{$ionicons-prefix}ios-heart-outline:before { content: $ionicon-var-ios-heart-outline; }\n.#{$ionicons-prefix}ios-help:before { content: $ionicon-var-ios-help; }\n.#{$ionicons-prefix}ios-help-empty:before { content: $ionicon-var-ios-help-empty; }\n.#{$ionicons-prefix}ios-help-outline:before { content: $ionicon-var-ios-help-outline; }\n.#{$ionicons-prefix}ios-home:before { content: $ionicon-var-ios-home; }\n.#{$ionicons-prefix}ios-home-outline:before { content: $ionicon-var-ios-home-outline; }\n.#{$ionicons-prefix}ios-infinite:before { content: $ionicon-var-ios-infinite; }\n.#{$ionicons-prefix}ios-infinite-outline:before { content: $ionicon-var-ios-infinite-outline; }\n.#{$ionicons-prefix}ios-information:before { content: $ionicon-var-ios-information; }\n.#{$ionicons-prefix}ios-information-empty:before { content: $ionicon-var-ios-information-empty; }\n.#{$ionicons-prefix}ios-information-outline:before { content: $ionicon-var-ios-information-outline; }\n.#{$ionicons-prefix}ios-ionic-outline:before { content: $ionicon-var-ios-ionic-outline; }\n.#{$ionicons-prefix}ios-keypad:before { content: $ionicon-var-ios-keypad; }\n.#{$ionicons-prefix}ios-keypad-outline:before { content: $ionicon-var-ios-keypad-outline; }\n.#{$ionicons-prefix}ios-lightbulb:before { content: $ionicon-var-ios-lightbulb; }\n.#{$ionicons-prefix}ios-lightbulb-outline:before { content: $ionicon-var-ios-lightbulb-outline; }\n.#{$ionicons-prefix}ios-list:before { content: $ionicon-var-ios-list; }\n.#{$ionicons-prefix}ios-list-outline:before { content: $ionicon-var-ios-list-outline; }\n.#{$ionicons-prefix}ios-location:before { content: $ionicon-var-ios-location; }\n.#{$ionicons-prefix}ios-location-outline:before { content: $ionicon-var-ios-location-outline; }\n.#{$ionicons-prefix}ios-locked:before { content: $ionicon-var-ios-locked; }\n.#{$ionicons-prefix}ios-locked-outline:before { content: $ionicon-var-ios-locked-outline; }\n.#{$ionicons-prefix}ios-loop:before { content: $ionicon-var-ios-loop; }\n.#{$ionicons-prefix}ios-loop-strong:before { content: $ionicon-var-ios-loop-strong; }\n.#{$ionicons-prefix}ios-medical:before { content: $ionicon-var-ios-medical; }\n.#{$ionicons-prefix}ios-medical-outline:before { content: $ionicon-var-ios-medical-outline; }\n.#{$ionicons-prefix}ios-medkit:before { content: $ionicon-var-ios-medkit; }\n.#{$ionicons-prefix}ios-medkit-outline:before { content: $ionicon-var-ios-medkit-outline; }\n.#{$ionicons-prefix}ios-mic:before { content: $ionicon-var-ios-mic; }\n.#{$ionicons-prefix}ios-mic-off:before { content: $ionicon-var-ios-mic-off; }\n.#{$ionicons-prefix}ios-mic-outline:before { content: $ionicon-var-ios-mic-outline; }\n.#{$ionicons-prefix}ios-minus:before { content: $ionicon-var-ios-minus; }\n.#{$ionicons-prefix}ios-minus-empty:before { content: $ionicon-var-ios-minus-empty; }\n.#{$ionicons-prefix}ios-minus-outline:before { content: $ionicon-var-ios-minus-outline; }\n.#{$ionicons-prefix}ios-monitor:before { content: $ionicon-var-ios-monitor; }\n.#{$ionicons-prefix}ios-monitor-outline:before { content: $ionicon-var-ios-monitor-outline; }\n.#{$ionicons-prefix}ios-moon:before { content: $ionicon-var-ios-moon; }\n.#{$ionicons-prefix}ios-moon-outline:before { content: $ionicon-var-ios-moon-outline; }\n.#{$ionicons-prefix}ios-more:before { content: $ionicon-var-ios-more; }\n.#{$ionicons-prefix}ios-more-outline:before { content: $ionicon-var-ios-more-outline; }\n.#{$ionicons-prefix}ios-musical-note:before { content: $ionicon-var-ios-musical-note; }\n.#{$ionicons-prefix}ios-musical-notes:before { content: $ionicon-var-ios-musical-notes; }\n.#{$ionicons-prefix}ios-navigate:before { content: $ionicon-var-ios-navigate; }\n.#{$ionicons-prefix}ios-navigate-outline:before { content: $ionicon-var-ios-navigate-outline; }\n.#{$ionicons-prefix}ios-nutrition:before { content: $ionicon-var-ios-nutrition; }\n.#{$ionicons-prefix}ios-nutrition-outline:before { content: $ionicon-var-ios-nutrition-outline; }\n.#{$ionicons-prefix}ios-paper:before { content: $ionicon-var-ios-paper; }\n.#{$ionicons-prefix}ios-paper-outline:before { content: $ionicon-var-ios-paper-outline; }\n.#{$ionicons-prefix}ios-paperplane:before { content: $ionicon-var-ios-paperplane; }\n.#{$ionicons-prefix}ios-paperplane-outline:before { content: $ionicon-var-ios-paperplane-outline; }\n.#{$ionicons-prefix}ios-partlysunny:before { content: $ionicon-var-ios-partlysunny; }\n.#{$ionicons-prefix}ios-partlysunny-outline:before { content: $ionicon-var-ios-partlysunny-outline; }\n.#{$ionicons-prefix}ios-pause:before { content: $ionicon-var-ios-pause; }\n.#{$ionicons-prefix}ios-pause-outline:before { content: $ionicon-var-ios-pause-outline; }\n.#{$ionicons-prefix}ios-paw:before { content: $ionicon-var-ios-paw; }\n.#{$ionicons-prefix}ios-paw-outline:before { content: $ionicon-var-ios-paw-outline; }\n.#{$ionicons-prefix}ios-people:before { content: $ionicon-var-ios-people; }\n.#{$ionicons-prefix}ios-people-outline:before { content: $ionicon-var-ios-people-outline; }\n.#{$ionicons-prefix}ios-person:before { content: $ionicon-var-ios-person; }\n.#{$ionicons-prefix}ios-person-outline:before { content: $ionicon-var-ios-person-outline; }\n.#{$ionicons-prefix}ios-personadd:before { content: $ionicon-var-ios-personadd; }\n.#{$ionicons-prefix}ios-personadd-outline:before { content: $ionicon-var-ios-personadd-outline; }\n.#{$ionicons-prefix}ios-photos:before { content: $ionicon-var-ios-photos; }\n.#{$ionicons-prefix}ios-photos-outline:before { content: $ionicon-var-ios-photos-outline; }\n.#{$ionicons-prefix}ios-pie:before { content: $ionicon-var-ios-pie; }\n.#{$ionicons-prefix}ios-pie-outline:before { content: $ionicon-var-ios-pie-outline; }\n.#{$ionicons-prefix}ios-pint:before { content: $ionicon-var-ios-pint; }\n.#{$ionicons-prefix}ios-pint-outline:before { content: $ionicon-var-ios-pint-outline; }\n.#{$ionicons-prefix}ios-play:before { content: $ionicon-var-ios-play; }\n.#{$ionicons-prefix}ios-play-outline:before { content: $ionicon-var-ios-play-outline; }\n.#{$ionicons-prefix}ios-plus:before { content: $ionicon-var-ios-plus; }\n.#{$ionicons-prefix}ios-plus-empty:before { content: $ionicon-var-ios-plus-empty; }\n.#{$ionicons-prefix}ios-plus-outline:before { content: $ionicon-var-ios-plus-outline; }\n.#{$ionicons-prefix}ios-pricetag:before { content: $ionicon-var-ios-pricetag; }\n.#{$ionicons-prefix}ios-pricetag-outline:before { content: $ionicon-var-ios-pricetag-outline; }\n.#{$ionicons-prefix}ios-pricetags:before { content: $ionicon-var-ios-pricetags; }\n.#{$ionicons-prefix}ios-pricetags-outline:before { content: $ionicon-var-ios-pricetags-outline; }\n.#{$ionicons-prefix}ios-printer:before { content: $ionicon-var-ios-printer; }\n.#{$ionicons-prefix}ios-printer-outline:before { content: $ionicon-var-ios-printer-outline; }\n.#{$ionicons-prefix}ios-pulse:before { content: $ionicon-var-ios-pulse; }\n.#{$ionicons-prefix}ios-pulse-strong:before { content: $ionicon-var-ios-pulse-strong; }\n.#{$ionicons-prefix}ios-rainy:before { content: $ionicon-var-ios-rainy; }\n.#{$ionicons-prefix}ios-rainy-outline:before { content: $ionicon-var-ios-rainy-outline; }\n.#{$ionicons-prefix}ios-recording:before { content: $ionicon-var-ios-recording; }\n.#{$ionicons-prefix}ios-recording-outline:before { content: $ionicon-var-ios-recording-outline; }\n.#{$ionicons-prefix}ios-redo:before { content: $ionicon-var-ios-redo; }\n.#{$ionicons-prefix}ios-redo-outline:before { content: $ionicon-var-ios-redo-outline; }\n.#{$ionicons-prefix}ios-refresh:before { content: $ionicon-var-ios-refresh; }\n.#{$ionicons-prefix}ios-refresh-empty:before { content: $ionicon-var-ios-refresh-empty; }\n.#{$ionicons-prefix}ios-refresh-outline:before { content: $ionicon-var-ios-refresh-outline; }\n.#{$ionicons-prefix}ios-reload:before { content: $ionicon-var-ios-reload; }\n.#{$ionicons-prefix}ios-reverse-camera:before { content: $ionicon-var-ios-reverse-camera; }\n.#{$ionicons-prefix}ios-reverse-camera-outline:before { content: $ionicon-var-ios-reverse-camera-outline; }\n.#{$ionicons-prefix}ios-rewind:before { content: $ionicon-var-ios-rewind; }\n.#{$ionicons-prefix}ios-rewind-outline:before { content: $ionicon-var-ios-rewind-outline; }\n.#{$ionicons-prefix}ios-rose:before { content: $ionicon-var-ios-rose; }\n.#{$ionicons-prefix}ios-rose-outline:before { content: $ionicon-var-ios-rose-outline; }\n.#{$ionicons-prefix}ios-search:before { content: $ionicon-var-ios-search; }\n.#{$ionicons-prefix}ios-search-strong:before { content: $ionicon-var-ios-search-strong; }\n.#{$ionicons-prefix}ios-settings:before { content: $ionicon-var-ios-settings; }\n.#{$ionicons-prefix}ios-settings-strong:before { content: $ionicon-var-ios-settings-strong; }\n.#{$ionicons-prefix}ios-shuffle:before { content: $ionicon-var-ios-shuffle; }\n.#{$ionicons-prefix}ios-shuffle-strong:before { content: $ionicon-var-ios-shuffle-strong; }\n.#{$ionicons-prefix}ios-skipbackward:before { content: $ionicon-var-ios-skipbackward; }\n.#{$ionicons-prefix}ios-skipbackward-outline:before { content: $ionicon-var-ios-skipbackward-outline; }\n.#{$ionicons-prefix}ios-skipforward:before { content: $ionicon-var-ios-skipforward; }\n.#{$ionicons-prefix}ios-skipforward-outline:before { content: $ionicon-var-ios-skipforward-outline; }\n.#{$ionicons-prefix}ios-snowy:before { content: $ionicon-var-ios-snowy; }\n.#{$ionicons-prefix}ios-speedometer:before { content: $ionicon-var-ios-speedometer; }\n.#{$ionicons-prefix}ios-speedometer-outline:before { content: $ionicon-var-ios-speedometer-outline; }\n.#{$ionicons-prefix}ios-star:before { content: $ionicon-var-ios-star; }\n.#{$ionicons-prefix}ios-star-half:before { content: $ionicon-var-ios-star-half; }\n.#{$ionicons-prefix}ios-star-outline:before { content: $ionicon-var-ios-star-outline; }\n.#{$ionicons-prefix}ios-stopwatch:before { content: $ionicon-var-ios-stopwatch; }\n.#{$ionicons-prefix}ios-stopwatch-outline:before { content: $ionicon-var-ios-stopwatch-outline; }\n.#{$ionicons-prefix}ios-sunny:before { content: $ionicon-var-ios-sunny; }\n.#{$ionicons-prefix}ios-sunny-outline:before { content: $ionicon-var-ios-sunny-outline; }\n.#{$ionicons-prefix}ios-telephone:before { content: $ionicon-var-ios-telephone; }\n.#{$ionicons-prefix}ios-telephone-outline:before { content: $ionicon-var-ios-telephone-outline; }\n.#{$ionicons-prefix}ios-tennisball:before { content: $ionicon-var-ios-tennisball; }\n.#{$ionicons-prefix}ios-tennisball-outline:before { content: $ionicon-var-ios-tennisball-outline; }\n.#{$ionicons-prefix}ios-thunderstorm:before { content: $ionicon-var-ios-thunderstorm; }\n.#{$ionicons-prefix}ios-thunderstorm-outline:before { content: $ionicon-var-ios-thunderstorm-outline; }\n.#{$ionicons-prefix}ios-time:before { content: $ionicon-var-ios-time; }\n.#{$ionicons-prefix}ios-time-outline:before { content: $ionicon-var-ios-time-outline; }\n.#{$ionicons-prefix}ios-timer:before { content: $ionicon-var-ios-timer; }\n.#{$ionicons-prefix}ios-timer-outline:before { content: $ionicon-var-ios-timer-outline; }\n.#{$ionicons-prefix}ios-toggle:before { content: $ionicon-var-ios-toggle; }\n.#{$ionicons-prefix}ios-toggle-outline:before { content: $ionicon-var-ios-toggle-outline; }\n.#{$ionicons-prefix}ios-trash:before { content: $ionicon-var-ios-trash; }\n.#{$ionicons-prefix}ios-trash-outline:before { content: $ionicon-var-ios-trash-outline; }\n.#{$ionicons-prefix}ios-undo:before { content: $ionicon-var-ios-undo; }\n.#{$ionicons-prefix}ios-undo-outline:before { content: $ionicon-var-ios-undo-outline; }\n.#{$ionicons-prefix}ios-unlocked:before { content: $ionicon-var-ios-unlocked; }\n.#{$ionicons-prefix}ios-unlocked-outline:before { content: $ionicon-var-ios-unlocked-outline; }\n.#{$ionicons-prefix}ios-upload:before { content: $ionicon-var-ios-upload; }\n.#{$ionicons-prefix}ios-upload-outline:before { content: $ionicon-var-ios-upload-outline; }\n.#{$ionicons-prefix}ios-videocam:before { content: $ionicon-var-ios-videocam; }\n.#{$ionicons-prefix}ios-videocam-outline:before { content: $ionicon-var-ios-videocam-outline; }\n.#{$ionicons-prefix}ios-volume-high:before { content: $ionicon-var-ios-volume-high; }\n.#{$ionicons-prefix}ios-volume-low:before { content: $ionicon-var-ios-volume-low; }\n.#{$ionicons-prefix}ios-wineglass:before { content: $ionicon-var-ios-wineglass; }\n.#{$ionicons-prefix}ios-wineglass-outline:before { content: $ionicon-var-ios-wineglass-outline; }\n.#{$ionicons-prefix}ios-world:before { content: $ionicon-var-ios-world; }\n.#{$ionicons-prefix}ios-world-outline:before { content: $ionicon-var-ios-world-outline; }\n.#{$ionicons-prefix}ipad:before { content: $ionicon-var-ipad; }\n.#{$ionicons-prefix}iphone:before { content: $ionicon-var-iphone; }\n.#{$ionicons-prefix}ipod:before { content: $ionicon-var-ipod; }\n.#{$ionicons-prefix}jet:before { content: $ionicon-var-jet; }\n.#{$ionicons-prefix}key:before { content: $ionicon-var-key; }\n.#{$ionicons-prefix}knife:before { content: $ionicon-var-knife; }\n.#{$ionicons-prefix}laptop:before { content: $ionicon-var-laptop; }\n.#{$ionicons-prefix}leaf:before { content: $ionicon-var-leaf; }\n.#{$ionicons-prefix}levels:before { content: $ionicon-var-levels; }\n.#{$ionicons-prefix}lightbulb:before { content: $ionicon-var-lightbulb; }\n.#{$ionicons-prefix}link:before { content: $ionicon-var-link; }\n.#{$ionicons-prefix}load-a:before { content: $ionicon-var-load-a; }\n.#{$ionicons-prefix}load-b:before { content: $ionicon-var-load-b; }\n.#{$ionicons-prefix}load-c:before { content: $ionicon-var-load-c; }\n.#{$ionicons-prefix}load-d:before { content: $ionicon-var-load-d; }\n.#{$ionicons-prefix}location:before { content: $ionicon-var-location; }\n.#{$ionicons-prefix}lock-combination:before { content: $ionicon-var-lock-combination; }\n.#{$ionicons-prefix}locked:before { content: $ionicon-var-locked; }\n.#{$ionicons-prefix}log-in:before { content: $ionicon-var-log-in; }\n.#{$ionicons-prefix}log-out:before { content: $ionicon-var-log-out; }\n.#{$ionicons-prefix}loop:before { content: $ionicon-var-loop; }\n.#{$ionicons-prefix}magnet:before { content: $ionicon-var-magnet; }\n.#{$ionicons-prefix}male:before { content: $ionicon-var-male; }\n.#{$ionicons-prefix}man:before { content: $ionicon-var-man; }\n.#{$ionicons-prefix}map:before { content: $ionicon-var-map; }\n.#{$ionicons-prefix}medkit:before { content: $ionicon-var-medkit; }\n.#{$ionicons-prefix}merge:before { content: $ionicon-var-merge; }\n.#{$ionicons-prefix}mic-a:before { content: $ionicon-var-mic-a; }\n.#{$ionicons-prefix}mic-b:before { content: $ionicon-var-mic-b; }\n.#{$ionicons-prefix}mic-c:before { content: $ionicon-var-mic-c; }\n.#{$ionicons-prefix}minus:before { content: $ionicon-var-minus; }\n.#{$ionicons-prefix}minus-circled:before { content: $ionicon-var-minus-circled; }\n.#{$ionicons-prefix}minus-round:before { content: $ionicon-var-minus-round; }\n.#{$ionicons-prefix}model-s:before { content: $ionicon-var-model-s; }\n.#{$ionicons-prefix}monitor:before { content: $ionicon-var-monitor; }\n.#{$ionicons-prefix}more:before { content: $ionicon-var-more; }\n.#{$ionicons-prefix}mouse:before { content: $ionicon-var-mouse; }\n.#{$ionicons-prefix}music-note:before { content: $ionicon-var-music-note; }\n.#{$ionicons-prefix}navicon:before { content: $ionicon-var-navicon; }\n.#{$ionicons-prefix}navicon-round:before { content: $ionicon-var-navicon-round; }\n.#{$ionicons-prefix}navigate:before { content: $ionicon-var-navigate; }\n.#{$ionicons-prefix}network:before { content: $ionicon-var-network; }\n.#{$ionicons-prefix}no-smoking:before { content: $ionicon-var-no-smoking; }\n.#{$ionicons-prefix}nuclear:before { content: $ionicon-var-nuclear; }\n.#{$ionicons-prefix}outlet:before { content: $ionicon-var-outlet; }\n.#{$ionicons-prefix}paintbrush:before { content: $ionicon-var-paintbrush; }\n.#{$ionicons-prefix}paintbucket:before { content: $ionicon-var-paintbucket; }\n.#{$ionicons-prefix}paper-airplane:before { content: $ionicon-var-paper-airplane; }\n.#{$ionicons-prefix}paperclip:before { content: $ionicon-var-paperclip; }\n.#{$ionicons-prefix}pause:before { content: $ionicon-var-pause; }\n.#{$ionicons-prefix}person:before { content: $ionicon-var-person; }\n.#{$ionicons-prefix}person-add:before { content: $ionicon-var-person-add; }\n.#{$ionicons-prefix}person-stalker:before { content: $ionicon-var-person-stalker; }\n.#{$ionicons-prefix}pie-graph:before { content: $ionicon-var-pie-graph; }\n.#{$ionicons-prefix}pin:before { content: $ionicon-var-pin; }\n.#{$ionicons-prefix}pinpoint:before { content: $ionicon-var-pinpoint; }\n.#{$ionicons-prefix}pizza:before { content: $ionicon-var-pizza; }\n.#{$ionicons-prefix}plane:before { content: $ionicon-var-plane; }\n.#{$ionicons-prefix}planet:before { content: $ionicon-var-planet; }\n.#{$ionicons-prefix}play:before { content: $ionicon-var-play; }\n.#{$ionicons-prefix}playstation:before { content: $ionicon-var-playstation; }\n.#{$ionicons-prefix}plus:before { content: $ionicon-var-plus; }\n.#{$ionicons-prefix}plus-circled:before { content: $ionicon-var-plus-circled; }\n.#{$ionicons-prefix}plus-round:before { content: $ionicon-var-plus-round; }\n.#{$ionicons-prefix}podium:before { content: $ionicon-var-podium; }\n.#{$ionicons-prefix}pound:before { content: $ionicon-var-pound; }\n.#{$ionicons-prefix}power:before { content: $ionicon-var-power; }\n.#{$ionicons-prefix}pricetag:before { content: $ionicon-var-pricetag; }\n.#{$ionicons-prefix}pricetags:before { content: $ionicon-var-pricetags; }\n.#{$ionicons-prefix}printer:before { content: $ionicon-var-printer; }\n.#{$ionicons-prefix}pull-request:before { content: $ionicon-var-pull-request; }\n.#{$ionicons-prefix}qr-scanner:before { content: $ionicon-var-qr-scanner; }\n.#{$ionicons-prefix}quote:before { content: $ionicon-var-quote; }\n.#{$ionicons-prefix}radio-waves:before { content: $ionicon-var-radio-waves; }\n.#{$ionicons-prefix}record:before { content: $ionicon-var-record; }\n.#{$ionicons-prefix}refresh:before { content: $ionicon-var-refresh; }\n.#{$ionicons-prefix}reply:before { content: $ionicon-var-reply; }\n.#{$ionicons-prefix}reply-all:before { content: $ionicon-var-reply-all; }\n.#{$ionicons-prefix}ribbon-a:before { content: $ionicon-var-ribbon-a; }\n.#{$ionicons-prefix}ribbon-b:before { content: $ionicon-var-ribbon-b; }\n.#{$ionicons-prefix}sad:before { content: $ionicon-var-sad; }\n.#{$ionicons-prefix}sad-outline:before { content: $ionicon-var-sad-outline; }\n.#{$ionicons-prefix}scissors:before { content: $ionicon-var-scissors; }\n.#{$ionicons-prefix}search:before { content: $ionicon-var-search; }\n.#{$ionicons-prefix}settings:before { content: $ionicon-var-settings; }\n.#{$ionicons-prefix}share:before { content: $ionicon-var-share; }\n.#{$ionicons-prefix}shuffle:before { content: $ionicon-var-shuffle; }\n.#{$ionicons-prefix}skip-backward:before { content: $ionicon-var-skip-backward; }\n.#{$ionicons-prefix}skip-forward:before { content: $ionicon-var-skip-forward; }\n.#{$ionicons-prefix}social-android:before { content: $ionicon-var-social-android; }\n.#{$ionicons-prefix}social-android-outline:before { content: $ionicon-var-social-android-outline; }\n.#{$ionicons-prefix}social-angular:before { content: $ionicon-var-social-angular; }\n.#{$ionicons-prefix}social-angular-outline:before { content: $ionicon-var-social-angular-outline; }\n.#{$ionicons-prefix}social-apple:before { content: $ionicon-var-social-apple; }\n.#{$ionicons-prefix}social-apple-outline:before { content: $ionicon-var-social-apple-outline; }\n.#{$ionicons-prefix}social-bitcoin:before { content: $ionicon-var-social-bitcoin; }\n.#{$ionicons-prefix}social-bitcoin-outline:before { content: $ionicon-var-social-bitcoin-outline; }\n.#{$ionicons-prefix}social-buffer:before { content: $ionicon-var-social-buffer; }\n.#{$ionicons-prefix}social-buffer-outline:before { content: $ionicon-var-social-buffer-outline; }\n.#{$ionicons-prefix}social-chrome:before { content: $ionicon-var-social-chrome; }\n.#{$ionicons-prefix}social-chrome-outline:before { content: $ionicon-var-social-chrome-outline; }\n.#{$ionicons-prefix}social-codepen:before { content: $ionicon-var-social-codepen; }\n.#{$ionicons-prefix}social-codepen-outline:before { content: $ionicon-var-social-codepen-outline; }\n.#{$ionicons-prefix}social-css3:before { content: $ionicon-var-social-css3; }\n.#{$ionicons-prefix}social-css3-outline:before { content: $ionicon-var-social-css3-outline; }\n.#{$ionicons-prefix}social-designernews:before { content: $ionicon-var-social-designernews; }\n.#{$ionicons-prefix}social-designernews-outline:before { content: $ionicon-var-social-designernews-outline; }\n.#{$ionicons-prefix}social-dribbble:before { content: $ionicon-var-social-dribbble; }\n.#{$ionicons-prefix}social-dribbble-outline:before { content: $ionicon-var-social-dribbble-outline; }\n.#{$ionicons-prefix}social-dropbox:before { content: $ionicon-var-social-dropbox; }\n.#{$ionicons-prefix}social-dropbox-outline:before { content: $ionicon-var-social-dropbox-outline; }\n.#{$ionicons-prefix}social-euro:before { content: $ionicon-var-social-euro; }\n.#{$ionicons-prefix}social-euro-outline:before { content: $ionicon-var-social-euro-outline; }\n.#{$ionicons-prefix}social-facebook:before { content: $ionicon-var-social-facebook; }\n.#{$ionicons-prefix}social-facebook-outline:before { content: $ionicon-var-social-facebook-outline; }\n.#{$ionicons-prefix}social-foursquare:before { content: $ionicon-var-social-foursquare; }\n.#{$ionicons-prefix}social-foursquare-outline:before { content: $ionicon-var-social-foursquare-outline; }\n.#{$ionicons-prefix}social-freebsd-devil:before { content: $ionicon-var-social-freebsd-devil; }\n.#{$ionicons-prefix}social-github:before { content: $ionicon-var-social-github; }\n.#{$ionicons-prefix}social-github-outline:before { content: $ionicon-var-social-github-outline; }\n.#{$ionicons-prefix}social-google:before { content: $ionicon-var-social-google; }\n.#{$ionicons-prefix}social-google-outline:before { content: $ionicon-var-social-google-outline; }\n.#{$ionicons-prefix}social-googleplus:before { content: $ionicon-var-social-googleplus; }\n.#{$ionicons-prefix}social-googleplus-outline:before { content: $ionicon-var-social-googleplus-outline; }\n.#{$ionicons-prefix}social-hackernews:before { content: $ionicon-var-social-hackernews; }\n.#{$ionicons-prefix}social-hackernews-outline:before { content: $ionicon-var-social-hackernews-outline; }\n.#{$ionicons-prefix}social-html5:before { content: $ionicon-var-social-html5; }\n.#{$ionicons-prefix}social-html5-outline:before { content: $ionicon-var-social-html5-outline; }\n.#{$ionicons-prefix}social-instagram:before { content: $ionicon-var-social-instagram; }\n.#{$ionicons-prefix}social-instagram-outline:before { content: $ionicon-var-social-instagram-outline; }\n.#{$ionicons-prefix}social-javascript:before { content: $ionicon-var-social-javascript; }\n.#{$ionicons-prefix}social-javascript-outline:before { content: $ionicon-var-social-javascript-outline; }\n.#{$ionicons-prefix}social-linkedin:before { content: $ionicon-var-social-linkedin; }\n.#{$ionicons-prefix}social-linkedin-outline:before { content: $ionicon-var-social-linkedin-outline; }\n.#{$ionicons-prefix}social-markdown:before { content: $ionicon-var-social-markdown; }\n.#{$ionicons-prefix}social-nodejs:before { content: $ionicon-var-social-nodejs; }\n.#{$ionicons-prefix}social-octocat:before { content: $ionicon-var-social-octocat; }\n.#{$ionicons-prefix}social-pinterest:before { content: $ionicon-var-social-pinterest; }\n.#{$ionicons-prefix}social-pinterest-outline:before { content: $ionicon-var-social-pinterest-outline; }\n.#{$ionicons-prefix}social-python:before { content: $ionicon-var-social-python; }\n.#{$ionicons-prefix}social-reddit:before { content: $ionicon-var-social-reddit; }\n.#{$ionicons-prefix}social-reddit-outline:before { content: $ionicon-var-social-reddit-outline; }\n.#{$ionicons-prefix}social-rss:before { content: $ionicon-var-social-rss; }\n.#{$ionicons-prefix}social-rss-outline:before { content: $ionicon-var-social-rss-outline; }\n.#{$ionicons-prefix}social-sass:before { content: $ionicon-var-social-sass; }\n.#{$ionicons-prefix}social-skype:before { content: $ionicon-var-social-skype; }\n.#{$ionicons-prefix}social-skype-outline:before { content: $ionicon-var-social-skype-outline; }\n.#{$ionicons-prefix}social-snapchat:before { content: $ionicon-var-social-snapchat; }\n.#{$ionicons-prefix}social-snapchat-outline:before { content: $ionicon-var-social-snapchat-outline; }\n.#{$ionicons-prefix}social-tumblr:before { content: $ionicon-var-social-tumblr; }\n.#{$ionicons-prefix}social-tumblr-outline:before { content: $ionicon-var-social-tumblr-outline; }\n.#{$ionicons-prefix}social-tux:before { content: $ionicon-var-social-tux; }\n.#{$ionicons-prefix}social-twitch:before { content: $ionicon-var-social-twitch; }\n.#{$ionicons-prefix}social-twitch-outline:before { content: $ionicon-var-social-twitch-outline; }\n.#{$ionicons-prefix}social-twitter:before { content: $ionicon-var-social-twitter; }\n.#{$ionicons-prefix}social-twitter-outline:before { content: $ionicon-var-social-twitter-outline; }\n.#{$ionicons-prefix}social-usd:before { content: $ionicon-var-social-usd; }\n.#{$ionicons-prefix}social-usd-outline:before { content: $ionicon-var-social-usd-outline; }\n.#{$ionicons-prefix}social-vimeo:before { content: $ionicon-var-social-vimeo; }\n.#{$ionicons-prefix}social-vimeo-outline:before { content: $ionicon-var-social-vimeo-outline; }\n.#{$ionicons-prefix}social-whatsapp:before { content: $ionicon-var-social-whatsapp; }\n.#{$ionicons-prefix}social-whatsapp-outline:before { content: $ionicon-var-social-whatsapp-outline; }\n.#{$ionicons-prefix}social-windows:before { content: $ionicon-var-social-windows; }\n.#{$ionicons-prefix}social-windows-outline:before { content: $ionicon-var-social-windows-outline; }\n.#{$ionicons-prefix}social-wordpress:before { content: $ionicon-var-social-wordpress; }\n.#{$ionicons-prefix}social-wordpress-outline:before { content: $ionicon-var-social-wordpress-outline; }\n.#{$ionicons-prefix}social-yahoo:before { content: $ionicon-var-social-yahoo; }\n.#{$ionicons-prefix}social-yahoo-outline:before { content: $ionicon-var-social-yahoo-outline; }\n.#{$ionicons-prefix}social-yen:before { content: $ionicon-var-social-yen; }\n.#{$ionicons-prefix}social-yen-outline:before { content: $ionicon-var-social-yen-outline; }\n.#{$ionicons-prefix}social-youtube:before { content: $ionicon-var-social-youtube; }\n.#{$ionicons-prefix}social-youtube-outline:before { content: $ionicon-var-social-youtube-outline; }\n.#{$ionicons-prefix}soup-can:before { content: $ionicon-var-soup-can; }\n.#{$ionicons-prefix}soup-can-outline:before { content: $ionicon-var-soup-can-outline; }\n.#{$ionicons-prefix}speakerphone:before { content: $ionicon-var-speakerphone; }\n.#{$ionicons-prefix}speedometer:before { content: $ionicon-var-speedometer; }\n.#{$ionicons-prefix}spoon:before { content: $ionicon-var-spoon; }\n.#{$ionicons-prefix}star:before { content: $ionicon-var-star; }\n.#{$ionicons-prefix}stats-bars:before { content: $ionicon-var-stats-bars; }\n.#{$ionicons-prefix}steam:before { content: $ionicon-var-steam; }\n.#{$ionicons-prefix}stop:before { content: $ionicon-var-stop; }\n.#{$ionicons-prefix}thermometer:before { content: $ionicon-var-thermometer; }\n.#{$ionicons-prefix}thumbsdown:before { content: $ionicon-var-thumbsdown; }\n.#{$ionicons-prefix}thumbsup:before { content: $ionicon-var-thumbsup; }\n.#{$ionicons-prefix}toggle:before { content: $ionicon-var-toggle; }\n.#{$ionicons-prefix}toggle-filled:before { content: $ionicon-var-toggle-filled; }\n.#{$ionicons-prefix}transgender:before { content: $ionicon-var-transgender; }\n.#{$ionicons-prefix}trash-a:before { content: $ionicon-var-trash-a; }\n.#{$ionicons-prefix}trash-b:before { content: $ionicon-var-trash-b; }\n.#{$ionicons-prefix}trophy:before { content: $ionicon-var-trophy; }\n.#{$ionicons-prefix}tshirt:before { content: $ionicon-var-tshirt; }\n.#{$ionicons-prefix}tshirt-outline:before { content: $ionicon-var-tshirt-outline; }\n.#{$ionicons-prefix}umbrella:before { content: $ionicon-var-umbrella; }\n.#{$ionicons-prefix}university:before { content: $ionicon-var-university; }\n.#{$ionicons-prefix}unlocked:before { content: $ionicon-var-unlocked; }\n.#{$ionicons-prefix}upload:before { content: $ionicon-var-upload; }\n.#{$ionicons-prefix}usb:before { content: $ionicon-var-usb; }\n.#{$ionicons-prefix}videocamera:before { content: $ionicon-var-videocamera; }\n.#{$ionicons-prefix}volume-high:before { content: $ionicon-var-volume-high; }\n.#{$ionicons-prefix}volume-low:before { content: $ionicon-var-volume-low; }\n.#{$ionicons-prefix}volume-medium:before { content: $ionicon-var-volume-medium; }\n.#{$ionicons-prefix}volume-mute:before { content: $ionicon-var-volume-mute; }\n.#{$ionicons-prefix}wand:before { content: $ionicon-var-wand; }\n.#{$ionicons-prefix}waterdrop:before { content: $ionicon-var-waterdrop; }\n.#{$ionicons-prefix}wifi:before { content: $ionicon-var-wifi; }\n.#{$ionicons-prefix}wineglass:before { content: $ionicon-var-wineglass; }\n.#{$ionicons-prefix}woman:before { content: $ionicon-var-woman; }\n.#{$ionicons-prefix}wrench:before { content: $ionicon-var-wrench; }\n.#{$ionicons-prefix}xbox:before { content: $ionicon-var-xbox; }"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/ionicons/_ionicons-variables.scss",
    "content": "// Ionicons Variables\n// --------------------------\n\n$ionicons-font-path: \"../fonts\" !default;\n$ionicons-font-family: \"Ionicons\" !default;\n$ionicons-version: \"2.0.1\" !default;\n$ionicons-prefix: ion- !default;\n\n$ionicon-var-alert: \"\\f101\";\n$ionicon-var-alert-circled: \"\\f100\";\n$ionicon-var-android-add: \"\\f2c7\";\n$ionicon-var-android-add-circle: \"\\f359\";\n$ionicon-var-android-alarm-clock: \"\\f35a\";\n$ionicon-var-android-alert: \"\\f35b\";\n$ionicon-var-android-apps: \"\\f35c\";\n$ionicon-var-android-archive: \"\\f2c9\";\n$ionicon-var-android-arrow-back: \"\\f2ca\";\n$ionicon-var-android-arrow-down: \"\\f35d\";\n$ionicon-var-android-arrow-dropdown: \"\\f35f\";\n$ionicon-var-android-arrow-dropdown-circle: \"\\f35e\";\n$ionicon-var-android-arrow-dropleft: \"\\f361\";\n$ionicon-var-android-arrow-dropleft-circle: \"\\f360\";\n$ionicon-var-android-arrow-dropright: \"\\f363\";\n$ionicon-var-android-arrow-dropright-circle: \"\\f362\";\n$ionicon-var-android-arrow-dropup: \"\\f365\";\n$ionicon-var-android-arrow-dropup-circle: \"\\f364\";\n$ionicon-var-android-arrow-forward: \"\\f30f\";\n$ionicon-var-android-arrow-up: \"\\f366\";\n$ionicon-var-android-attach: \"\\f367\";\n$ionicon-var-android-bar: \"\\f368\";\n$ionicon-var-android-bicycle: \"\\f369\";\n$ionicon-var-android-boat: \"\\f36a\";\n$ionicon-var-android-bookmark: \"\\f36b\";\n$ionicon-var-android-bulb: \"\\f36c\";\n$ionicon-var-android-bus: \"\\f36d\";\n$ionicon-var-android-calendar: \"\\f2d1\";\n$ionicon-var-android-call: \"\\f2d2\";\n$ionicon-var-android-camera: \"\\f2d3\";\n$ionicon-var-android-cancel: \"\\f36e\";\n$ionicon-var-android-car: \"\\f36f\";\n$ionicon-var-android-cart: \"\\f370\";\n$ionicon-var-android-chat: \"\\f2d4\";\n$ionicon-var-android-checkbox: \"\\f374\";\n$ionicon-var-android-checkbox-blank: \"\\f371\";\n$ionicon-var-android-checkbox-outline: \"\\f373\";\n$ionicon-var-android-checkbox-outline-blank: \"\\f372\";\n$ionicon-var-android-checkmark-circle: \"\\f375\";\n$ionicon-var-android-clipboard: \"\\f376\";\n$ionicon-var-android-close: \"\\f2d7\";\n$ionicon-var-android-cloud: \"\\f37a\";\n$ionicon-var-android-cloud-circle: \"\\f377\";\n$ionicon-var-android-cloud-done: \"\\f378\";\n$ionicon-var-android-cloud-outline: \"\\f379\";\n$ionicon-var-android-color-palette: \"\\f37b\";\n$ionicon-var-android-compass: \"\\f37c\";\n$ionicon-var-android-contact: \"\\f2d8\";\n$ionicon-var-android-contacts: \"\\f2d9\";\n$ionicon-var-android-contract: \"\\f37d\";\n$ionicon-var-android-create: \"\\f37e\";\n$ionicon-var-android-delete: \"\\f37f\";\n$ionicon-var-android-desktop: \"\\f380\";\n$ionicon-var-android-document: \"\\f381\";\n$ionicon-var-android-done: \"\\f383\";\n$ionicon-var-android-done-all: \"\\f382\";\n$ionicon-var-android-download: \"\\f2dd\";\n$ionicon-var-android-drafts: \"\\f384\";\n$ionicon-var-android-exit: \"\\f385\";\n$ionicon-var-android-expand: \"\\f386\";\n$ionicon-var-android-favorite: \"\\f388\";\n$ionicon-var-android-favorite-outline: \"\\f387\";\n$ionicon-var-android-film: \"\\f389\";\n$ionicon-var-android-folder: \"\\f2e0\";\n$ionicon-var-android-folder-open: \"\\f38a\";\n$ionicon-var-android-funnel: \"\\f38b\";\n$ionicon-var-android-globe: \"\\f38c\";\n$ionicon-var-android-hand: \"\\f2e3\";\n$ionicon-var-android-hangout: \"\\f38d\";\n$ionicon-var-android-happy: \"\\f38e\";\n$ionicon-var-android-home: \"\\f38f\";\n$ionicon-var-android-image: \"\\f2e4\";\n$ionicon-var-android-laptop: \"\\f390\";\n$ionicon-var-android-list: \"\\f391\";\n$ionicon-var-android-locate: \"\\f2e9\";\n$ionicon-var-android-lock: \"\\f392\";\n$ionicon-var-android-mail: \"\\f2eb\";\n$ionicon-var-android-map: \"\\f393\";\n$ionicon-var-android-menu: \"\\f394\";\n$ionicon-var-android-microphone: \"\\f2ec\";\n$ionicon-var-android-microphone-off: \"\\f395\";\n$ionicon-var-android-more-horizontal: \"\\f396\";\n$ionicon-var-android-more-vertical: \"\\f397\";\n$ionicon-var-android-navigate: \"\\f398\";\n$ionicon-var-android-notifications: \"\\f39b\";\n$ionicon-var-android-notifications-none: \"\\f399\";\n$ionicon-var-android-notifications-off: \"\\f39a\";\n$ionicon-var-android-open: \"\\f39c\";\n$ionicon-var-android-options: \"\\f39d\";\n$ionicon-var-android-people: \"\\f39e\";\n$ionicon-var-android-person: \"\\f3a0\";\n$ionicon-var-android-person-add: \"\\f39f\";\n$ionicon-var-android-phone-landscape: \"\\f3a1\";\n$ionicon-var-android-phone-portrait: \"\\f3a2\";\n$ionicon-var-android-pin: \"\\f3a3\";\n$ionicon-var-android-plane: \"\\f3a4\";\n$ionicon-var-android-playstore: \"\\f2f0\";\n$ionicon-var-android-print: \"\\f3a5\";\n$ionicon-var-android-radio-button-off: \"\\f3a6\";\n$ionicon-var-android-radio-button-on: \"\\f3a7\";\n$ionicon-var-android-refresh: \"\\f3a8\";\n$ionicon-var-android-remove: \"\\f2f4\";\n$ionicon-var-android-remove-circle: \"\\f3a9\";\n$ionicon-var-android-restaurant: \"\\f3aa\";\n$ionicon-var-android-sad: \"\\f3ab\";\n$ionicon-var-android-search: \"\\f2f5\";\n$ionicon-var-android-send: \"\\f2f6\";\n$ionicon-var-android-settings: \"\\f2f7\";\n$ionicon-var-android-share: \"\\f2f8\";\n$ionicon-var-android-share-alt: \"\\f3ac\";\n$ionicon-var-android-star: \"\\f2fc\";\n$ionicon-var-android-star-half: \"\\f3ad\";\n$ionicon-var-android-star-outline: \"\\f3ae\";\n$ionicon-var-android-stopwatch: \"\\f2fd\";\n$ionicon-var-android-subway: \"\\f3af\";\n$ionicon-var-android-sunny: \"\\f3b0\";\n$ionicon-var-android-sync: \"\\f3b1\";\n$ionicon-var-android-textsms: \"\\f3b2\";\n$ionicon-var-android-time: \"\\f3b3\";\n$ionicon-var-android-train: \"\\f3b4\";\n$ionicon-var-android-unlock: \"\\f3b5\";\n$ionicon-var-android-upload: \"\\f3b6\";\n$ionicon-var-android-volume-down: \"\\f3b7\";\n$ionicon-var-android-volume-mute: \"\\f3b8\";\n$ionicon-var-android-volume-off: \"\\f3b9\";\n$ionicon-var-android-volume-up: \"\\f3ba\";\n$ionicon-var-android-walk: \"\\f3bb\";\n$ionicon-var-android-warning: \"\\f3bc\";\n$ionicon-var-android-watch: \"\\f3bd\";\n$ionicon-var-android-wifi: \"\\f305\";\n$ionicon-var-aperture: \"\\f313\";\n$ionicon-var-archive: \"\\f102\";\n$ionicon-var-arrow-down-a: \"\\f103\";\n$ionicon-var-arrow-down-b: \"\\f104\";\n$ionicon-var-arrow-down-c: \"\\f105\";\n$ionicon-var-arrow-expand: \"\\f25e\";\n$ionicon-var-arrow-graph-down-left: \"\\f25f\";\n$ionicon-var-arrow-graph-down-right: \"\\f260\";\n$ionicon-var-arrow-graph-up-left: \"\\f261\";\n$ionicon-var-arrow-graph-up-right: \"\\f262\";\n$ionicon-var-arrow-left-a: \"\\f106\";\n$ionicon-var-arrow-left-b: \"\\f107\";\n$ionicon-var-arrow-left-c: \"\\f108\";\n$ionicon-var-arrow-move: \"\\f263\";\n$ionicon-var-arrow-resize: \"\\f264\";\n$ionicon-var-arrow-return-left: \"\\f265\";\n$ionicon-var-arrow-return-right: \"\\f266\";\n$ionicon-var-arrow-right-a: \"\\f109\";\n$ionicon-var-arrow-right-b: \"\\f10a\";\n$ionicon-var-arrow-right-c: \"\\f10b\";\n$ionicon-var-arrow-shrink: \"\\f267\";\n$ionicon-var-arrow-swap: \"\\f268\";\n$ionicon-var-arrow-up-a: \"\\f10c\";\n$ionicon-var-arrow-up-b: \"\\f10d\";\n$ionicon-var-arrow-up-c: \"\\f10e\";\n$ionicon-var-asterisk: \"\\f314\";\n$ionicon-var-at: \"\\f10f\";\n$ionicon-var-backspace: \"\\f3bf\";\n$ionicon-var-backspace-outline: \"\\f3be\";\n$ionicon-var-bag: \"\\f110\";\n$ionicon-var-battery-charging: \"\\f111\";\n$ionicon-var-battery-empty: \"\\f112\";\n$ionicon-var-battery-full: \"\\f113\";\n$ionicon-var-battery-half: \"\\f114\";\n$ionicon-var-battery-low: \"\\f115\";\n$ionicon-var-beaker: \"\\f269\";\n$ionicon-var-beer: \"\\f26a\";\n$ionicon-var-bluetooth: \"\\f116\";\n$ionicon-var-bonfire: \"\\f315\";\n$ionicon-var-bookmark: \"\\f26b\";\n$ionicon-var-bowtie: \"\\f3c0\";\n$ionicon-var-briefcase: \"\\f26c\";\n$ionicon-var-bug: \"\\f2be\";\n$ionicon-var-calculator: \"\\f26d\";\n$ionicon-var-calendar: \"\\f117\";\n$ionicon-var-camera: \"\\f118\";\n$ionicon-var-card: \"\\f119\";\n$ionicon-var-cash: \"\\f316\";\n$ionicon-var-chatbox: \"\\f11b\";\n$ionicon-var-chatbox-working: \"\\f11a\";\n$ionicon-var-chatboxes: \"\\f11c\";\n$ionicon-var-chatbubble: \"\\f11e\";\n$ionicon-var-chatbubble-working: \"\\f11d\";\n$ionicon-var-chatbubbles: \"\\f11f\";\n$ionicon-var-checkmark: \"\\f122\";\n$ionicon-var-checkmark-circled: \"\\f120\";\n$ionicon-var-checkmark-round: \"\\f121\";\n$ionicon-var-chevron-down: \"\\f123\";\n$ionicon-var-chevron-left: \"\\f124\";\n$ionicon-var-chevron-right: \"\\f125\";\n$ionicon-var-chevron-up: \"\\f126\";\n$ionicon-var-clipboard: \"\\f127\";\n$ionicon-var-clock: \"\\f26e\";\n$ionicon-var-close: \"\\f12a\";\n$ionicon-var-close-circled: \"\\f128\";\n$ionicon-var-close-round: \"\\f129\";\n$ionicon-var-closed-captioning: \"\\f317\";\n$ionicon-var-cloud: \"\\f12b\";\n$ionicon-var-code: \"\\f271\";\n$ionicon-var-code-download: \"\\f26f\";\n$ionicon-var-code-working: \"\\f270\";\n$ionicon-var-coffee: \"\\f272\";\n$ionicon-var-compass: \"\\f273\";\n$ionicon-var-compose: \"\\f12c\";\n$ionicon-var-connection-bars: \"\\f274\";\n$ionicon-var-contrast: \"\\f275\";\n$ionicon-var-crop: \"\\f3c1\";\n$ionicon-var-cube: \"\\f318\";\n$ionicon-var-disc: \"\\f12d\";\n$ionicon-var-document: \"\\f12f\";\n$ionicon-var-document-text: \"\\f12e\";\n$ionicon-var-drag: \"\\f130\";\n$ionicon-var-earth: \"\\f276\";\n$ionicon-var-easel: \"\\f3c2\";\n$ionicon-var-edit: \"\\f2bf\";\n$ionicon-var-egg: \"\\f277\";\n$ionicon-var-eject: \"\\f131\";\n$ionicon-var-email: \"\\f132\";\n$ionicon-var-email-unread: \"\\f3c3\";\n$ionicon-var-erlenmeyer-flask: \"\\f3c5\";\n$ionicon-var-erlenmeyer-flask-bubbles: \"\\f3c4\";\n$ionicon-var-eye: \"\\f133\";\n$ionicon-var-eye-disabled: \"\\f306\";\n$ionicon-var-female: \"\\f278\";\n$ionicon-var-filing: \"\\f134\";\n$ionicon-var-film-marker: \"\\f135\";\n$ionicon-var-fireball: \"\\f319\";\n$ionicon-var-flag: \"\\f279\";\n$ionicon-var-flame: \"\\f31a\";\n$ionicon-var-flash: \"\\f137\";\n$ionicon-var-flash-off: \"\\f136\";\n$ionicon-var-folder: \"\\f139\";\n$ionicon-var-fork: \"\\f27a\";\n$ionicon-var-fork-repo: \"\\f2c0\";\n$ionicon-var-forward: \"\\f13a\";\n$ionicon-var-funnel: \"\\f31b\";\n$ionicon-var-gear-a: \"\\f13d\";\n$ionicon-var-gear-b: \"\\f13e\";\n$ionicon-var-grid: \"\\f13f\";\n$ionicon-var-hammer: \"\\f27b\";\n$ionicon-var-happy: \"\\f31c\";\n$ionicon-var-happy-outline: \"\\f3c6\";\n$ionicon-var-headphone: \"\\f140\";\n$ionicon-var-heart: \"\\f141\";\n$ionicon-var-heart-broken: \"\\f31d\";\n$ionicon-var-help: \"\\f143\";\n$ionicon-var-help-buoy: \"\\f27c\";\n$ionicon-var-help-circled: \"\\f142\";\n$ionicon-var-home: \"\\f144\";\n$ionicon-var-icecream: \"\\f27d\";\n$ionicon-var-image: \"\\f147\";\n$ionicon-var-images: \"\\f148\";\n$ionicon-var-information: \"\\f14a\";\n$ionicon-var-information-circled: \"\\f149\";\n$ionicon-var-ionic: \"\\f14b\";\n$ionicon-var-ios-alarm: \"\\f3c8\";\n$ionicon-var-ios-alarm-outline: \"\\f3c7\";\n$ionicon-var-ios-albums: \"\\f3ca\";\n$ionicon-var-ios-albums-outline: \"\\f3c9\";\n$ionicon-var-ios-americanfootball: \"\\f3cc\";\n$ionicon-var-ios-americanfootball-outline: \"\\f3cb\";\n$ionicon-var-ios-analytics: \"\\f3ce\";\n$ionicon-var-ios-analytics-outline: \"\\f3cd\";\n$ionicon-var-ios-arrow-back: \"\\f3cf\";\n$ionicon-var-ios-arrow-down: \"\\f3d0\";\n$ionicon-var-ios-arrow-forward: \"\\f3d1\";\n$ionicon-var-ios-arrow-left: \"\\f3d2\";\n$ionicon-var-ios-arrow-right: \"\\f3d3\";\n$ionicon-var-ios-arrow-thin-down: \"\\f3d4\";\n$ionicon-var-ios-arrow-thin-left: \"\\f3d5\";\n$ionicon-var-ios-arrow-thin-right: \"\\f3d6\";\n$ionicon-var-ios-arrow-thin-up: \"\\f3d7\";\n$ionicon-var-ios-arrow-up: \"\\f3d8\";\n$ionicon-var-ios-at: \"\\f3da\";\n$ionicon-var-ios-at-outline: \"\\f3d9\";\n$ionicon-var-ios-barcode: \"\\f3dc\";\n$ionicon-var-ios-barcode-outline: \"\\f3db\";\n$ionicon-var-ios-baseball: \"\\f3de\";\n$ionicon-var-ios-baseball-outline: \"\\f3dd\";\n$ionicon-var-ios-basketball: \"\\f3e0\";\n$ionicon-var-ios-basketball-outline: \"\\f3df\";\n$ionicon-var-ios-bell: \"\\f3e2\";\n$ionicon-var-ios-bell-outline: \"\\f3e1\";\n$ionicon-var-ios-body: \"\\f3e4\";\n$ionicon-var-ios-body-outline: \"\\f3e3\";\n$ionicon-var-ios-bolt: \"\\f3e6\";\n$ionicon-var-ios-bolt-outline: \"\\f3e5\";\n$ionicon-var-ios-book: \"\\f3e8\";\n$ionicon-var-ios-book-outline: \"\\f3e7\";\n$ionicon-var-ios-bookmarks: \"\\f3ea\";\n$ionicon-var-ios-bookmarks-outline: \"\\f3e9\";\n$ionicon-var-ios-box: \"\\f3ec\";\n$ionicon-var-ios-box-outline: \"\\f3eb\";\n$ionicon-var-ios-briefcase: \"\\f3ee\";\n$ionicon-var-ios-briefcase-outline: \"\\f3ed\";\n$ionicon-var-ios-browsers: \"\\f3f0\";\n$ionicon-var-ios-browsers-outline: \"\\f3ef\";\n$ionicon-var-ios-calculator: \"\\f3f2\";\n$ionicon-var-ios-calculator-outline: \"\\f3f1\";\n$ionicon-var-ios-calendar: \"\\f3f4\";\n$ionicon-var-ios-calendar-outline: \"\\f3f3\";\n$ionicon-var-ios-camera: \"\\f3f6\";\n$ionicon-var-ios-camera-outline: \"\\f3f5\";\n$ionicon-var-ios-cart: \"\\f3f8\";\n$ionicon-var-ios-cart-outline: \"\\f3f7\";\n$ionicon-var-ios-chatboxes: \"\\f3fa\";\n$ionicon-var-ios-chatboxes-outline: \"\\f3f9\";\n$ionicon-var-ios-chatbubble: \"\\f3fc\";\n$ionicon-var-ios-chatbubble-outline: \"\\f3fb\";\n$ionicon-var-ios-checkmark: \"\\f3ff\";\n$ionicon-var-ios-checkmark-empty: \"\\f3fd\";\n$ionicon-var-ios-checkmark-outline: \"\\f3fe\";\n$ionicon-var-ios-circle-filled: \"\\f400\";\n$ionicon-var-ios-circle-outline: \"\\f401\";\n$ionicon-var-ios-clock: \"\\f403\";\n$ionicon-var-ios-clock-outline: \"\\f402\";\n$ionicon-var-ios-close: \"\\f406\";\n$ionicon-var-ios-close-empty: \"\\f404\";\n$ionicon-var-ios-close-outline: \"\\f405\";\n$ionicon-var-ios-cloud: \"\\f40c\";\n$ionicon-var-ios-cloud-download: \"\\f408\";\n$ionicon-var-ios-cloud-download-outline: \"\\f407\";\n$ionicon-var-ios-cloud-outline: \"\\f409\";\n$ionicon-var-ios-cloud-upload: \"\\f40b\";\n$ionicon-var-ios-cloud-upload-outline: \"\\f40a\";\n$ionicon-var-ios-cloudy: \"\\f410\";\n$ionicon-var-ios-cloudy-night: \"\\f40e\";\n$ionicon-var-ios-cloudy-night-outline: \"\\f40d\";\n$ionicon-var-ios-cloudy-outline: \"\\f40f\";\n$ionicon-var-ios-cog: \"\\f412\";\n$ionicon-var-ios-cog-outline: \"\\f411\";\n$ionicon-var-ios-color-filter: \"\\f414\";\n$ionicon-var-ios-color-filter-outline: \"\\f413\";\n$ionicon-var-ios-color-wand: \"\\f416\";\n$ionicon-var-ios-color-wand-outline: \"\\f415\";\n$ionicon-var-ios-compose: \"\\f418\";\n$ionicon-var-ios-compose-outline: \"\\f417\";\n$ionicon-var-ios-contact: \"\\f41a\";\n$ionicon-var-ios-contact-outline: \"\\f419\";\n$ionicon-var-ios-copy: \"\\f41c\";\n$ionicon-var-ios-copy-outline: \"\\f41b\";\n$ionicon-var-ios-crop: \"\\f41e\";\n$ionicon-var-ios-crop-strong: \"\\f41d\";\n$ionicon-var-ios-download: \"\\f420\";\n$ionicon-var-ios-download-outline: \"\\f41f\";\n$ionicon-var-ios-drag: \"\\f421\";\n$ionicon-var-ios-email: \"\\f423\";\n$ionicon-var-ios-email-outline: \"\\f422\";\n$ionicon-var-ios-eye: \"\\f425\";\n$ionicon-var-ios-eye-outline: \"\\f424\";\n$ionicon-var-ios-fastforward: \"\\f427\";\n$ionicon-var-ios-fastforward-outline: \"\\f426\";\n$ionicon-var-ios-filing: \"\\f429\";\n$ionicon-var-ios-filing-outline: \"\\f428\";\n$ionicon-var-ios-film: \"\\f42b\";\n$ionicon-var-ios-film-outline: \"\\f42a\";\n$ionicon-var-ios-flag: \"\\f42d\";\n$ionicon-var-ios-flag-outline: \"\\f42c\";\n$ionicon-var-ios-flame: \"\\f42f\";\n$ionicon-var-ios-flame-outline: \"\\f42e\";\n$ionicon-var-ios-flask: \"\\f431\";\n$ionicon-var-ios-flask-outline: \"\\f430\";\n$ionicon-var-ios-flower: \"\\f433\";\n$ionicon-var-ios-flower-outline: \"\\f432\";\n$ionicon-var-ios-folder: \"\\f435\";\n$ionicon-var-ios-folder-outline: \"\\f434\";\n$ionicon-var-ios-football: \"\\f437\";\n$ionicon-var-ios-football-outline: \"\\f436\";\n$ionicon-var-ios-game-controller-a: \"\\f439\";\n$ionicon-var-ios-game-controller-a-outline: \"\\f438\";\n$ionicon-var-ios-game-controller-b: \"\\f43b\";\n$ionicon-var-ios-game-controller-b-outline: \"\\f43a\";\n$ionicon-var-ios-gear: \"\\f43d\";\n$ionicon-var-ios-gear-outline: \"\\f43c\";\n$ionicon-var-ios-glasses: \"\\f43f\";\n$ionicon-var-ios-glasses-outline: \"\\f43e\";\n$ionicon-var-ios-grid-view: \"\\f441\";\n$ionicon-var-ios-grid-view-outline: \"\\f440\";\n$ionicon-var-ios-heart: \"\\f443\";\n$ionicon-var-ios-heart-outline: \"\\f442\";\n$ionicon-var-ios-help: \"\\f446\";\n$ionicon-var-ios-help-empty: \"\\f444\";\n$ionicon-var-ios-help-outline: \"\\f445\";\n$ionicon-var-ios-home: \"\\f448\";\n$ionicon-var-ios-home-outline: \"\\f447\";\n$ionicon-var-ios-infinite: \"\\f44a\";\n$ionicon-var-ios-infinite-outline: \"\\f449\";\n$ionicon-var-ios-information: \"\\f44d\";\n$ionicon-var-ios-information-empty: \"\\f44b\";\n$ionicon-var-ios-information-outline: \"\\f44c\";\n$ionicon-var-ios-ionic-outline: \"\\f44e\";\n$ionicon-var-ios-keypad: \"\\f450\";\n$ionicon-var-ios-keypad-outline: \"\\f44f\";\n$ionicon-var-ios-lightbulb: \"\\f452\";\n$ionicon-var-ios-lightbulb-outline: \"\\f451\";\n$ionicon-var-ios-list: \"\\f454\";\n$ionicon-var-ios-list-outline: \"\\f453\";\n$ionicon-var-ios-location: \"\\f456\";\n$ionicon-var-ios-location-outline: \"\\f455\";\n$ionicon-var-ios-locked: \"\\f458\";\n$ionicon-var-ios-locked-outline: \"\\f457\";\n$ionicon-var-ios-loop: \"\\f45a\";\n$ionicon-var-ios-loop-strong: \"\\f459\";\n$ionicon-var-ios-medical: \"\\f45c\";\n$ionicon-var-ios-medical-outline: \"\\f45b\";\n$ionicon-var-ios-medkit: \"\\f45e\";\n$ionicon-var-ios-medkit-outline: \"\\f45d\";\n$ionicon-var-ios-mic: \"\\f461\";\n$ionicon-var-ios-mic-off: \"\\f45f\";\n$ionicon-var-ios-mic-outline: \"\\f460\";\n$ionicon-var-ios-minus: \"\\f464\";\n$ionicon-var-ios-minus-empty: \"\\f462\";\n$ionicon-var-ios-minus-outline: \"\\f463\";\n$ionicon-var-ios-monitor: \"\\f466\";\n$ionicon-var-ios-monitor-outline: \"\\f465\";\n$ionicon-var-ios-moon: \"\\f468\";\n$ionicon-var-ios-moon-outline: \"\\f467\";\n$ionicon-var-ios-more: \"\\f46a\";\n$ionicon-var-ios-more-outline: \"\\f469\";\n$ionicon-var-ios-musical-note: \"\\f46b\";\n$ionicon-var-ios-musical-notes: \"\\f46c\";\n$ionicon-var-ios-navigate: \"\\f46e\";\n$ionicon-var-ios-navigate-outline: \"\\f46d\";\n$ionicon-var-ios-nutrition: \"\\f470\";\n$ionicon-var-ios-nutrition-outline: \"\\f46f\";\n$ionicon-var-ios-paper: \"\\f472\";\n$ionicon-var-ios-paper-outline: \"\\f471\";\n$ionicon-var-ios-paperplane: \"\\f474\";\n$ionicon-var-ios-paperplane-outline: \"\\f473\";\n$ionicon-var-ios-partlysunny: \"\\f476\";\n$ionicon-var-ios-partlysunny-outline: \"\\f475\";\n$ionicon-var-ios-pause: \"\\f478\";\n$ionicon-var-ios-pause-outline: \"\\f477\";\n$ionicon-var-ios-paw: \"\\f47a\";\n$ionicon-var-ios-paw-outline: \"\\f479\";\n$ionicon-var-ios-people: \"\\f47c\";\n$ionicon-var-ios-people-outline: \"\\f47b\";\n$ionicon-var-ios-person: \"\\f47e\";\n$ionicon-var-ios-person-outline: \"\\f47d\";\n$ionicon-var-ios-personadd: \"\\f480\";\n$ionicon-var-ios-personadd-outline: \"\\f47f\";\n$ionicon-var-ios-photos: \"\\f482\";\n$ionicon-var-ios-photos-outline: \"\\f481\";\n$ionicon-var-ios-pie: \"\\f484\";\n$ionicon-var-ios-pie-outline: \"\\f483\";\n$ionicon-var-ios-pint: \"\\f486\";\n$ionicon-var-ios-pint-outline: \"\\f485\";\n$ionicon-var-ios-play: \"\\f488\";\n$ionicon-var-ios-play-outline: \"\\f487\";\n$ionicon-var-ios-plus: \"\\f48b\";\n$ionicon-var-ios-plus-empty: \"\\f489\";\n$ionicon-var-ios-plus-outline: \"\\f48a\";\n$ionicon-var-ios-pricetag: \"\\f48d\";\n$ionicon-var-ios-pricetag-outline: \"\\f48c\";\n$ionicon-var-ios-pricetags: \"\\f48f\";\n$ionicon-var-ios-pricetags-outline: \"\\f48e\";\n$ionicon-var-ios-printer: \"\\f491\";\n$ionicon-var-ios-printer-outline: \"\\f490\";\n$ionicon-var-ios-pulse: \"\\f493\";\n$ionicon-var-ios-pulse-strong: \"\\f492\";\n$ionicon-var-ios-rainy: \"\\f495\";\n$ionicon-var-ios-rainy-outline: \"\\f494\";\n$ionicon-var-ios-recording: \"\\f497\";\n$ionicon-var-ios-recording-outline: \"\\f496\";\n$ionicon-var-ios-redo: \"\\f499\";\n$ionicon-var-ios-redo-outline: \"\\f498\";\n$ionicon-var-ios-refresh: \"\\f49c\";\n$ionicon-var-ios-refresh-empty: \"\\f49a\";\n$ionicon-var-ios-refresh-outline: \"\\f49b\";\n$ionicon-var-ios-reload: \"\\f49d\";\n$ionicon-var-ios-reverse-camera: \"\\f49f\";\n$ionicon-var-ios-reverse-camera-outline: \"\\f49e\";\n$ionicon-var-ios-rewind: \"\\f4a1\";\n$ionicon-var-ios-rewind-outline: \"\\f4a0\";\n$ionicon-var-ios-rose: \"\\f4a3\";\n$ionicon-var-ios-rose-outline: \"\\f4a2\";\n$ionicon-var-ios-search: \"\\f4a5\";\n$ionicon-var-ios-search-strong: \"\\f4a4\";\n$ionicon-var-ios-settings: \"\\f4a7\";\n$ionicon-var-ios-settings-strong: \"\\f4a6\";\n$ionicon-var-ios-shuffle: \"\\f4a9\";\n$ionicon-var-ios-shuffle-strong: \"\\f4a8\";\n$ionicon-var-ios-skipbackward: \"\\f4ab\";\n$ionicon-var-ios-skipbackward-outline: \"\\f4aa\";\n$ionicon-var-ios-skipforward: \"\\f4ad\";\n$ionicon-var-ios-skipforward-outline: \"\\f4ac\";\n$ionicon-var-ios-snowy: \"\\f4ae\";\n$ionicon-var-ios-speedometer: \"\\f4b0\";\n$ionicon-var-ios-speedometer-outline: \"\\f4af\";\n$ionicon-var-ios-star: \"\\f4b3\";\n$ionicon-var-ios-star-half: \"\\f4b1\";\n$ionicon-var-ios-star-outline: \"\\f4b2\";\n$ionicon-var-ios-stopwatch: \"\\f4b5\";\n$ionicon-var-ios-stopwatch-outline: \"\\f4b4\";\n$ionicon-var-ios-sunny: \"\\f4b7\";\n$ionicon-var-ios-sunny-outline: \"\\f4b6\";\n$ionicon-var-ios-telephone: \"\\f4b9\";\n$ionicon-var-ios-telephone-outline: \"\\f4b8\";\n$ionicon-var-ios-tennisball: \"\\f4bb\";\n$ionicon-var-ios-tennisball-outline: \"\\f4ba\";\n$ionicon-var-ios-thunderstorm: \"\\f4bd\";\n$ionicon-var-ios-thunderstorm-outline: \"\\f4bc\";\n$ionicon-var-ios-time: \"\\f4bf\";\n$ionicon-var-ios-time-outline: \"\\f4be\";\n$ionicon-var-ios-timer: \"\\f4c1\";\n$ionicon-var-ios-timer-outline: \"\\f4c0\";\n$ionicon-var-ios-toggle: \"\\f4c3\";\n$ionicon-var-ios-toggle-outline: \"\\f4c2\";\n$ionicon-var-ios-trash: \"\\f4c5\";\n$ionicon-var-ios-trash-outline: \"\\f4c4\";\n$ionicon-var-ios-undo: \"\\f4c7\";\n$ionicon-var-ios-undo-outline: \"\\f4c6\";\n$ionicon-var-ios-unlocked: \"\\f4c9\";\n$ionicon-var-ios-unlocked-outline: \"\\f4c8\";\n$ionicon-var-ios-upload: \"\\f4cb\";\n$ionicon-var-ios-upload-outline: \"\\f4ca\";\n$ionicon-var-ios-videocam: \"\\f4cd\";\n$ionicon-var-ios-videocam-outline: \"\\f4cc\";\n$ionicon-var-ios-volume-high: \"\\f4ce\";\n$ionicon-var-ios-volume-low: \"\\f4cf\";\n$ionicon-var-ios-wineglass: \"\\f4d1\";\n$ionicon-var-ios-wineglass-outline: \"\\f4d0\";\n$ionicon-var-ios-world: \"\\f4d3\";\n$ionicon-var-ios-world-outline: \"\\f4d2\";\n$ionicon-var-ipad: \"\\f1f9\";\n$ionicon-var-iphone: \"\\f1fa\";\n$ionicon-var-ipod: \"\\f1fb\";\n$ionicon-var-jet: \"\\f295\";\n$ionicon-var-key: \"\\f296\";\n$ionicon-var-knife: \"\\f297\";\n$ionicon-var-laptop: \"\\f1fc\";\n$ionicon-var-leaf: \"\\f1fd\";\n$ionicon-var-levels: \"\\f298\";\n$ionicon-var-lightbulb: \"\\f299\";\n$ionicon-var-link: \"\\f1fe\";\n$ionicon-var-load-a: \"\\f29a\";\n$ionicon-var-load-b: \"\\f29b\";\n$ionicon-var-load-c: \"\\f29c\";\n$ionicon-var-load-d: \"\\f29d\";\n$ionicon-var-location: \"\\f1ff\";\n$ionicon-var-lock-combination: \"\\f4d4\";\n$ionicon-var-locked: \"\\f200\";\n$ionicon-var-log-in: \"\\f29e\";\n$ionicon-var-log-out: \"\\f29f\";\n$ionicon-var-loop: \"\\f201\";\n$ionicon-var-magnet: \"\\f2a0\";\n$ionicon-var-male: \"\\f2a1\";\n$ionicon-var-man: \"\\f202\";\n$ionicon-var-map: \"\\f203\";\n$ionicon-var-medkit: \"\\f2a2\";\n$ionicon-var-merge: \"\\f33f\";\n$ionicon-var-mic-a: \"\\f204\";\n$ionicon-var-mic-b: \"\\f205\";\n$ionicon-var-mic-c: \"\\f206\";\n$ionicon-var-minus: \"\\f209\";\n$ionicon-var-minus-circled: \"\\f207\";\n$ionicon-var-minus-round: \"\\f208\";\n$ionicon-var-model-s: \"\\f2c1\";\n$ionicon-var-monitor: \"\\f20a\";\n$ionicon-var-more: \"\\f20b\";\n$ionicon-var-mouse: \"\\f340\";\n$ionicon-var-music-note: \"\\f20c\";\n$ionicon-var-navicon: \"\\f20e\";\n$ionicon-var-navicon-round: \"\\f20d\";\n$ionicon-var-navigate: \"\\f2a3\";\n$ionicon-var-network: \"\\f341\";\n$ionicon-var-no-smoking: \"\\f2c2\";\n$ionicon-var-nuclear: \"\\f2a4\";\n$ionicon-var-outlet: \"\\f342\";\n$ionicon-var-paintbrush: \"\\f4d5\";\n$ionicon-var-paintbucket: \"\\f4d6\";\n$ionicon-var-paper-airplane: \"\\f2c3\";\n$ionicon-var-paperclip: \"\\f20f\";\n$ionicon-var-pause: \"\\f210\";\n$ionicon-var-person: \"\\f213\";\n$ionicon-var-person-add: \"\\f211\";\n$ionicon-var-person-stalker: \"\\f212\";\n$ionicon-var-pie-graph: \"\\f2a5\";\n$ionicon-var-pin: \"\\f2a6\";\n$ionicon-var-pinpoint: \"\\f2a7\";\n$ionicon-var-pizza: \"\\f2a8\";\n$ionicon-var-plane: \"\\f214\";\n$ionicon-var-planet: \"\\f343\";\n$ionicon-var-play: \"\\f215\";\n$ionicon-var-playstation: \"\\f30a\";\n$ionicon-var-plus: \"\\f218\";\n$ionicon-var-plus-circled: \"\\f216\";\n$ionicon-var-plus-round: \"\\f217\";\n$ionicon-var-podium: \"\\f344\";\n$ionicon-var-pound: \"\\f219\";\n$ionicon-var-power: \"\\f2a9\";\n$ionicon-var-pricetag: \"\\f2aa\";\n$ionicon-var-pricetags: \"\\f2ab\";\n$ionicon-var-printer: \"\\f21a\";\n$ionicon-var-pull-request: \"\\f345\";\n$ionicon-var-qr-scanner: \"\\f346\";\n$ionicon-var-quote: \"\\f347\";\n$ionicon-var-radio-waves: \"\\f2ac\";\n$ionicon-var-record: \"\\f21b\";\n$ionicon-var-refresh: \"\\f21c\";\n$ionicon-var-reply: \"\\f21e\";\n$ionicon-var-reply-all: \"\\f21d\";\n$ionicon-var-ribbon-a: \"\\f348\";\n$ionicon-var-ribbon-b: \"\\f349\";\n$ionicon-var-sad: \"\\f34a\";\n$ionicon-var-sad-outline: \"\\f4d7\";\n$ionicon-var-scissors: \"\\f34b\";\n$ionicon-var-search: \"\\f21f\";\n$ionicon-var-settings: \"\\f2ad\";\n$ionicon-var-share: \"\\f220\";\n$ionicon-var-shuffle: \"\\f221\";\n$ionicon-var-skip-backward: \"\\f222\";\n$ionicon-var-skip-forward: \"\\f223\";\n$ionicon-var-social-android: \"\\f225\";\n$ionicon-var-social-android-outline: \"\\f224\";\n$ionicon-var-social-angular: \"\\f4d9\";\n$ionicon-var-social-angular-outline: \"\\f4d8\";\n$ionicon-var-social-apple: \"\\f227\";\n$ionicon-var-social-apple-outline: \"\\f226\";\n$ionicon-var-social-bitcoin: \"\\f2af\";\n$ionicon-var-social-bitcoin-outline: \"\\f2ae\";\n$ionicon-var-social-buffer: \"\\f229\";\n$ionicon-var-social-buffer-outline: \"\\f228\";\n$ionicon-var-social-chrome: \"\\f4db\";\n$ionicon-var-social-chrome-outline: \"\\f4da\";\n$ionicon-var-social-codepen: \"\\f4dd\";\n$ionicon-var-social-codepen-outline: \"\\f4dc\";\n$ionicon-var-social-css3: \"\\f4df\";\n$ionicon-var-social-css3-outline: \"\\f4de\";\n$ionicon-var-social-designernews: \"\\f22b\";\n$ionicon-var-social-designernews-outline: \"\\f22a\";\n$ionicon-var-social-dribbble: \"\\f22d\";\n$ionicon-var-social-dribbble-outline: \"\\f22c\";\n$ionicon-var-social-dropbox: \"\\f22f\";\n$ionicon-var-social-dropbox-outline: \"\\f22e\";\n$ionicon-var-social-euro: \"\\f4e1\";\n$ionicon-var-social-euro-outline: \"\\f4e0\";\n$ionicon-var-social-facebook: \"\\f231\";\n$ionicon-var-social-facebook-outline: \"\\f230\";\n$ionicon-var-social-foursquare: \"\\f34d\";\n$ionicon-var-social-foursquare-outline: \"\\f34c\";\n$ionicon-var-social-freebsd-devil: \"\\f2c4\";\n$ionicon-var-social-github: \"\\f233\";\n$ionicon-var-social-github-outline: \"\\f232\";\n$ionicon-var-social-google: \"\\f34f\";\n$ionicon-var-social-google-outline: \"\\f34e\";\n$ionicon-var-social-googleplus: \"\\f235\";\n$ionicon-var-social-googleplus-outline: \"\\f234\";\n$ionicon-var-social-hackernews: \"\\f237\";\n$ionicon-var-social-hackernews-outline: \"\\f236\";\n$ionicon-var-social-html5: \"\\f4e3\";\n$ionicon-var-social-html5-outline: \"\\f4e2\";\n$ionicon-var-social-instagram: \"\\f351\";\n$ionicon-var-social-instagram-outline: \"\\f350\";\n$ionicon-var-social-javascript: \"\\f4e5\";\n$ionicon-var-social-javascript-outline: \"\\f4e4\";\n$ionicon-var-social-linkedin: \"\\f239\";\n$ionicon-var-social-linkedin-outline: \"\\f238\";\n$ionicon-var-social-markdown: \"\\f4e6\";\n$ionicon-var-social-nodejs: \"\\f4e7\";\n$ionicon-var-social-octocat: \"\\f4e8\";\n$ionicon-var-social-pinterest: \"\\f2b1\";\n$ionicon-var-social-pinterest-outline: \"\\f2b0\";\n$ionicon-var-social-python: \"\\f4e9\";\n$ionicon-var-social-reddit: \"\\f23b\";\n$ionicon-var-social-reddit-outline: \"\\f23a\";\n$ionicon-var-social-rss: \"\\f23d\";\n$ionicon-var-social-rss-outline: \"\\f23c\";\n$ionicon-var-social-sass: \"\\f4ea\";\n$ionicon-var-social-skype: \"\\f23f\";\n$ionicon-var-social-skype-outline: \"\\f23e\";\n$ionicon-var-social-snapchat: \"\\f4ec\";\n$ionicon-var-social-snapchat-outline: \"\\f4eb\";\n$ionicon-var-social-tumblr: \"\\f241\";\n$ionicon-var-social-tumblr-outline: \"\\f240\";\n$ionicon-var-social-tux: \"\\f2c5\";\n$ionicon-var-social-twitch: \"\\f4ee\";\n$ionicon-var-social-twitch-outline: \"\\f4ed\";\n$ionicon-var-social-twitter: \"\\f243\";\n$ionicon-var-social-twitter-outline: \"\\f242\";\n$ionicon-var-social-usd: \"\\f353\";\n$ionicon-var-social-usd-outline: \"\\f352\";\n$ionicon-var-social-vimeo: \"\\f245\";\n$ionicon-var-social-vimeo-outline: \"\\f244\";\n$ionicon-var-social-whatsapp: \"\\f4f0\";\n$ionicon-var-social-whatsapp-outline: \"\\f4ef\";\n$ionicon-var-social-windows: \"\\f247\";\n$ionicon-var-social-windows-outline: \"\\f246\";\n$ionicon-var-social-wordpress: \"\\f249\";\n$ionicon-var-social-wordpress-outline: \"\\f248\";\n$ionicon-var-social-yahoo: \"\\f24b\";\n$ionicon-var-social-yahoo-outline: \"\\f24a\";\n$ionicon-var-social-yen: \"\\f4f2\";\n$ionicon-var-social-yen-outline: \"\\f4f1\";\n$ionicon-var-social-youtube: \"\\f24d\";\n$ionicon-var-social-youtube-outline: \"\\f24c\";\n$ionicon-var-soup-can: \"\\f4f4\";\n$ionicon-var-soup-can-outline: \"\\f4f3\";\n$ionicon-var-speakerphone: \"\\f2b2\";\n$ionicon-var-speedometer: \"\\f2b3\";\n$ionicon-var-spoon: \"\\f2b4\";\n$ionicon-var-star: \"\\f24e\";\n$ionicon-var-stats-bars: \"\\f2b5\";\n$ionicon-var-steam: \"\\f30b\";\n$ionicon-var-stop: \"\\f24f\";\n$ionicon-var-thermometer: \"\\f2b6\";\n$ionicon-var-thumbsdown: \"\\f250\";\n$ionicon-var-thumbsup: \"\\f251\";\n$ionicon-var-toggle: \"\\f355\";\n$ionicon-var-toggle-filled: \"\\f354\";\n$ionicon-var-transgender: \"\\f4f5\";\n$ionicon-var-trash-a: \"\\f252\";\n$ionicon-var-trash-b: \"\\f253\";\n$ionicon-var-trophy: \"\\f356\";\n$ionicon-var-tshirt: \"\\f4f7\";\n$ionicon-var-tshirt-outline: \"\\f4f6\";\n$ionicon-var-umbrella: \"\\f2b7\";\n$ionicon-var-university: \"\\f357\";\n$ionicon-var-unlocked: \"\\f254\";\n$ionicon-var-upload: \"\\f255\";\n$ionicon-var-usb: \"\\f2b8\";\n$ionicon-var-videocamera: \"\\f256\";\n$ionicon-var-volume-high: \"\\f257\";\n$ionicon-var-volume-low: \"\\f258\";\n$ionicon-var-volume-medium: \"\\f259\";\n$ionicon-var-volume-mute: \"\\f25a\";\n$ionicon-var-wand: \"\\f358\";\n$ionicon-var-waterdrop: \"\\f25b\";\n$ionicon-var-wifi: \"\\f25c\";\n$ionicon-var-wineglass: \"\\f2b9\";\n$ionicon-var-woman: \"\\f25d\";\n$ionicon-var-wrench: \"\\f2ba\";\n$ionicon-var-xbox: \"\\f30c\";"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/ionicons/ionicons.scss",
    "content": "@charset \"UTF-8\";\n@import \"ionicons-variables\";\n/*!\n  Ionicons, v2.0.1\n  Created by Ben Sperry for the Ionic Framework, http://ionicons.com/\n  https://twitter.com/benjsperry  https://twitter.com/ionicframework\n  MIT License: https://github.com/ionic-team/ionicons\n\n  Android-style icons originally built by Google’s\n  Material Design Icons: https://github.com/google/material-design-icons\n  used under CC BY http://creativecommons.org/licenses/by/4.0/\n  Modified icons to fit ionicon’s grid from original.\n*/\n\n@import \"ionicons-font\";\n@import \"ionicons-icons\";\n"
  },
  {
    "path": "ionic1/base/www/lib/ionic/scss/tsconfig.json",
    "content": "{\n    \"version\": \"1.5.0-alpha\",\n    \"compilerOptions\": {\n        \"target\": \"es5\",\n        \"module\": \"commonjs\",\n        \"declaration\": false,\n        \"noImplicitAny\": false,\n        \"removeComments\": true,\n        \"noLib\": false,\n        \"preserveConstEnums\": true,\n        \"suppressImplicitAnyIndexErrors\": true\n    },\n    \"filesGlob\": [\n        \"./**/*.ts\",\n        \"!./node_modules/**/*.ts\"\n    ],\n    \"files\": []\n}\n"
  },
  {
    "path": "ionic1/base/www/manifest.json",
    "content": "{\n  \"name\": \"My Ionic App\",\n  \"short_name\": \"My Ionic App\",\n  \"start_url\": \"index.html\",\n  \"display\": \"standalone\",\n  \"icons\": [{\n    \"src\": \"icon.png\",\n    \"sizes\": \"512x512\",\n    \"type\": \"image/png\"\n  }]\n}"
  },
  {
    "path": "ionic1/base/www/service-worker.js",
    "content": "self.addEventListener('activate', function (event) {\n\n});\n\nself.addEventListener('fetch', function (event) {\n\n});\n\nself.addEventListener('push', function (event) {\n\n});"
  },
  {
    "path": "ionic1/community/.gitkeep",
    "content": ""
  },
  {
    "path": "ionic1/official/blank/ionic.starter.json",
    "content": "{\n  \"name\": \"Blank Starter\",\n  \"baseref\": \"main\"\n}\n"
  },
  {
    "path": "ionic1/official/blank/www/css/style.css",
    "content": "/* Empty. Add your own CSS if you like */\n"
  },
  {
    "path": "ionic1/official/blank/www/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\">\n    <meta name=\"viewport\" content=\"initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width\">\n    <title></title>\n\n    <link rel=\"manifest\" href=\"manifest.json\">\n\n    <!-- un-comment this code to enable service worker\n    <script>\n      if ('serviceWorker' in navigator) {\n        navigator.serviceWorker.register('service-worker.js')\n          .then(() => console.log('service worker installed'))\n          .catch(err => console.log('Error', err));\n      }\n    </script>-->\n\n    <link href=\"lib/ionic/css/ionic.css\" rel=\"stylesheet\">\n    <link href=\"css/style.css\" rel=\"stylesheet\">\n\n    <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above\n    <link href=\"css/ionic.app.css\" rel=\"stylesheet\">\n    -->\n\n    <!-- ionic/angularjs js -->\n    <script src=\"lib/ionic/js/ionic.bundle.js\"></script>\n\n    <!-- cordova script (this will be a 404 during development) -->\n    <script src=\"cordova.js\"></script>\n\n    <!-- your app's js -->\n    <script src=\"js/app.js\"></script>\n  </head>\n  <body ng-app=\"starter\">\n\n    <ion-pane>\n      <ion-header-bar class=\"bar-stable\">\n        <h1 class=\"title\">Ionic Blank Starter</h1>\n      </ion-header-bar>\n      <ion-content>\n      </ion-content>\n    </ion-pane>\n  </body>\n</html>\n"
  },
  {
    "path": "ionic1/official/blank/www/js/app.js",
    "content": "// Ionic Starter App\n\n// angular.module is a global place for creating, registering and retrieving Angular modules\n// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)\n// the 2nd parameter is an array of 'requires'\nangular.module('starter', ['ionic'])\n\n.run(function($ionicPlatform) {\n  $ionicPlatform.ready(function() {\n    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard\n    // for form inputs).\n    // The reason we default this to hidden is that native apps don't usually show an accessory bar, at\n    // least on iOS. It's a dead giveaway that an app is using a Web View. However, it's sometimes\n    // useful especially with forms, though we would prefer giving the user a little more room\n    // to interact with the app.\n    if (window.cordova && window.Keyboard) {\n      window.Keyboard.hideKeyboardAccessoryBar(true);\n    }\n\n    if (window.StatusBar) {\n      // Set the statusbar to use the default style, tweak this to\n      // remove the status bar on iOS or change it to use white instead of dark colors.\n      StatusBar.styleDefault();\n    }\n  });\n})\n"
  },
  {
    "path": "ionic1/official/maps/ionic.starter.json",
    "content": "{\n  \"name\": \"Google Maps Starter\",\n  \"baseref\": \"main\"\n}\n"
  },
  {
    "path": "ionic1/official/maps/www/css/style.css",
    "content": "/* Empty. Add your own CSS if you like */\n\nmap {\n  display: block;\n  width: 100%;\n  height: 100%;\n}\n.scroll {\n  height: 100%;\n}\n"
  },
  {
    "path": "ionic1/official/maps/www/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\">\n    <meta name=\"viewport\" content=\"initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width\">\n    <title></title>\n\n    <link href=\"lib/ionic/css/ionic.css\" rel=\"stylesheet\">\n    <link href=\"css/style.css\" rel=\"stylesheet\">\n\n    <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above\n    <link href=\"css/ionic.app.css\" rel=\"stylesheet\">\n    -->\n\n    <!-- ionic/angularjs js -->\n    <script src=\"lib/ionic/js/ionic.bundle.js\"></script>\n\n    <script src=\"https://maps.googleapis.com/maps/api/js?key=AIzaSyB16sGmIekuGIvYOfNoW9T44377IU2d2Es&sensor=true\"></script>\n\n    <!-- cordova script (this will be a 404 during development) -->\n    <script src=\"cordova.js\"></script>\n\n    <!-- your app's js -->\n    <script src=\"js/app.js\"></script>\n    <script src=\"js/controllers.js\"></script>\n    <script src=\"js/directives.js\"></script>\n  </head>\n\n  <body ng-app=\"starter\" ng-controller=\"MapCtrl\">\n    <ion-header-bar class=\"bar-stable\">\n      <h1 class=\"title\">Map</h1>\n    </ion-header-bar>\n\n    <ion-content scroll=\"false\">\n      <map on-create=\"mapCreated(map)\"></map>\n    </ion-content>\n\n    <ion-footer-bar class=\"bar-stable\">\n      <a ng-click=\"centerOnMe()\" class=\"button button-icon icon ion-navigate\"></a>\n    </ion-footer-bar>\n  </body>\n</html>\n"
  },
  {
    "path": "ionic1/official/maps/www/js/app.js",
    "content": "angular.module('starter', ['ionic', 'starter.controllers', 'starter.directives'])\n\n.run(function($ionicPlatform) {\n  $ionicPlatform.ready(function() {\n    if(window.StatusBar) {\n      StatusBar.styleDefault();\n    }\n  });\n})\n"
  },
  {
    "path": "ionic1/official/maps/www/js/controllers.js",
    "content": "angular.module('starter.controllers', [])\n\n.controller('MapCtrl', function($scope, $ionicLoading) {\n  $scope.mapCreated = function(map) {\n    $scope.map = map;\n  };\n\n  $scope.centerOnMe = function () {\n    console.log(\"Centering\");\n    if (!$scope.map) {\n      return;\n    }\n\n    $scope.loading = $ionicLoading.show({\n      content: 'Getting current location...',\n      showBackdrop: false\n    });\n\n    navigator.geolocation.getCurrentPosition(function (pos) {\n      console.log('Got pos', pos);\n      $scope.map.setCenter(new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude));\n      $scope.loading.hide();\n    }, function (error) {\n      alert('Unable to get location: ' + error.message);\n    });\n  };\n});\n"
  },
  {
    "path": "ionic1/official/maps/www/js/directives.js",
    "content": "angular.module('starter.directives', [])\n\n.directive('map', function() {\n  return {\n    restrict: 'E',\n    scope: {\n      onCreate: '&'\n    },\n    link: function ($scope, $element, $attr) {\n      function initialize() {\n        var mapOptions = {\n          center: new google.maps.LatLng(43.07493, -89.381388),\n          zoom: 16,\n          mapTypeId: google.maps.MapTypeId.ROADMAP\n        };\n        var map = new google.maps.Map($element[0], mapOptions);\n  \n        $scope.onCreate({map: map});\n\n        // Stop the side bar from dragging when mousedown/tapdown on the map\n        google.maps.event.addDomListener($element[0], 'mousedown', function (e) {\n          e.preventDefault();\n          return false;\n        });\n      }\n\n      if (document.readyState === \"complete\") {\n        initialize();\n      } else {\n        google.maps.event.addDomListener(window, 'load', initialize);\n      }\n    }\n  }\n});\n"
  },
  {
    "path": "ionic1/official/maps/www/lib/ionic/css/ionic.css",
    "content": "/*!\n * Copyright 2014 Drifty Co.\n * http://drifty.com/\n *\n * Ionic, v0.9.27\n * A powerful HTML5 mobile app framework.\n * http://ionicframework.com/\n *\n * By @maxlynch, @benjsperry, @adamdbradley <3\n *\n * Licensed under the MIT license. Please see LICENSE for more information.\n *\n */\n\n/*!\n * Copyright 2014 Drifty Co.\n * http://drifty.com/\n *\n * Ionic, v0.9.27\n * A powerful HTML5 mobile app framework.\n * http://ionicframework.com/\n *\n * By @maxlynch, @benjsperry, @adamdbradley <3\n *\n * Licensed under the MIT license. Please see LICENSE for more information.\n *\n */\n/*!\n  Ionicons, v#{$ionicons-version}\n  Created by Ben Sperry for the Ionic Framework, http://ionicons.com/\n  https://twitter.com/benjsperry  https://twitter.com/ionicframework\n  MIT License: https://github.com/driftyco/ionicons\n*/\n@font-face {\n  font-family: \"Ionicons\";\n  src: url(\"../fonts/ionicons.eot?v=1.4.1\");\n  src: url(\"../fonts/ionicons.eot?v=1.4.1#iefix\") format(\"embedded-opentype\"), url(\"../fonts/ionicons.ttf?v=1.4.1\") format(\"truetype\"), url(\"../fonts/ionicons.woff?v=1.4.1\") format(\"woff\"), url(\"../fonts/ionicons.svg?v=1.4.1#Ionicons\") format(\"svg\");\n  font-weight: normal;\n  font-style: normal; }\n\n.ion, .ion-loading-a, .ion-loading-b, .ion-loading-c, .ion-loading-d, .ion-looping, .ion-refreshing, .ion-ios7-reloading, .ionicons, .ion-alert, .ion-alert-circled, .ion-android-add, .ion-android-add-contact, .ion-android-alarm, .ion-android-archive, .ion-android-arrow-back, .ion-android-arrow-down-left, .ion-android-arrow-down-right, .ion-android-arrow-up-left, .ion-android-arrow-up-right, .ion-android-battery, .ion-android-book, .ion-android-calendar, .ion-android-call, .ion-android-camera, .ion-android-chat, .ion-android-checkmark, .ion-android-clock, .ion-android-close, .ion-android-contact, .ion-android-contacts, .ion-android-data, .ion-android-developer, .ion-android-display, .ion-android-download, .ion-android-dropdown, .ion-android-earth, .ion-android-folder, .ion-android-forums, .ion-android-friends, .ion-android-hand, .ion-android-image, .ion-android-inbox, .ion-android-information, .ion-android-keypad, .ion-android-lightbulb, .ion-android-locate, .ion-android-location, .ion-android-mail, .ion-android-microphone, .ion-android-mixer, .ion-android-more, .ion-android-note, .ion-android-playstore, .ion-android-printer, .ion-android-promotion, .ion-android-reminder, .ion-android-remove, .ion-android-search, .ion-android-send, .ion-android-settings, .ion-android-share, .ion-android-social, .ion-android-social-user, .ion-android-sort, .ion-android-star, .ion-android-stopwatch, .ion-android-storage, .ion-android-system-back, .ion-android-system-home, .ion-android-system-windows, .ion-android-timer, .ion-android-trash, .ion-android-volume, .ion-android-wifi, .ion-archive, .ion-arrow-down-a, .ion-arrow-down-b, .ion-arrow-down-c, .ion-arrow-expand, .ion-arrow-graph-down-left, .ion-arrow-graph-down-right, .ion-arrow-graph-up-left, .ion-arrow-graph-up-right, .ion-arrow-left-a, .ion-arrow-left-b, .ion-arrow-left-c, .ion-arrow-move, .ion-arrow-resize, .ion-arrow-return-left, .ion-arrow-return-right, .ion-arrow-right-a, .ion-arrow-right-b, .ion-arrow-right-c, .ion-arrow-shrink, .ion-arrow-swap, .ion-arrow-up-a, .ion-arrow-up-b, .ion-arrow-up-c, .ion-at, .ion-bag, .ion-battery-charging, .ion-battery-empty, .ion-battery-full, .ion-battery-half, .ion-battery-low, .ion-beaker, .ion-beer, .ion-bluetooth, .ion-bookmark, .ion-briefcase, .ion-bug, .ion-calculator, .ion-calendar, .ion-camera, .ion-card, .ion-chatbox, .ion-chatbox-working, .ion-chatboxes, .ion-chatbubble, .ion-chatbubble-working, .ion-chatbubbles, .ion-checkmark, .ion-checkmark-circled, .ion-checkmark-round, .ion-chevron-down, .ion-chevron-left, .ion-chevron-right, .ion-chevron-up, .ion-clipboard, .ion-clock, .ion-close, .ion-close-circled, .ion-close-round, .ion-cloud, .ion-code, .ion-code-download, .ion-code-working, .ion-coffee, .ion-compass, .ion-compose, .ion-connection-bars, .ion-contrast, .ion-disc, .ion-document, .ion-document-text, .ion-drag, .ion-earth, .ion-edit, .ion-egg, .ion-eject, .ion-email, .ion-eye, .ion-eye-disabled, .ion-female, .ion-filing, .ion-film-marker, .ion-flag, .ion-flash, .ion-flash-off, .ion-flask, .ion-folder, .ion-fork, .ion-fork-repo, .ion-forward, .ion-game-controller-a, .ion-game-controller-b, .ion-gear-a, .ion-gear-b, .ion-grid, .ion-hammer, .ion-headphone, .ion-heart, .ion-help, .ion-help-buoy, .ion-help-circled, .ion-home, .ion-icecream, .ion-icon-social-google-plus, .ion-icon-social-google-plus-outline, .ion-image, .ion-images, .ion-information, .ion-information-circled, .ion-ionic, .ion-ios7-alarm, .ion-ios7-alarm-outline, .ion-ios7-albums, .ion-ios7-albums-outline, .ion-ios7-arrow-back, .ion-ios7-arrow-down, .ion-ios7-arrow-forward, .ion-ios7-arrow-left, .ion-ios7-arrow-right, .ion-ios7-arrow-thin-down, .ion-ios7-arrow-thin-left, .ion-ios7-arrow-thin-right, .ion-ios7-arrow-thin-up, .ion-ios7-arrow-up, .ion-ios7-at, .ion-ios7-at-outline, .ion-ios7-bell, .ion-ios7-bell-outline, .ion-ios7-bolt, .ion-ios7-bolt-outline, .ion-ios7-bookmarks, .ion-ios7-bookmarks-outline, .ion-ios7-box, .ion-ios7-box-outline, .ion-ios7-briefcase, .ion-ios7-briefcase-outline, .ion-ios7-browsers, .ion-ios7-browsers-outline, .ion-ios7-calculator, .ion-ios7-calculator-outline, .ion-ios7-calendar, .ion-ios7-calendar-outline, .ion-ios7-camera, .ion-ios7-camera-outline, .ion-ios7-cart, .ion-ios7-cart-outline, .ion-ios7-chatboxes, .ion-ios7-chatboxes-outline, .ion-ios7-chatbubble, .ion-ios7-chatbubble-outline, .ion-ios7-checkmark, .ion-ios7-checkmark-empty, .ion-ios7-checkmark-outline, .ion-ios7-circle-filled, .ion-ios7-circle-outline, .ion-ios7-clock, .ion-ios7-clock-outline, .ion-ios7-close, .ion-ios7-close-empty, .ion-ios7-close-outline, .ion-ios7-cloud, .ion-ios7-cloud-download, .ion-ios7-cloud-download-outline, .ion-ios7-cloud-outline, .ion-ios7-cloud-upload, .ion-ios7-cloud-upload-outline, .ion-ios7-cloudy, .ion-ios7-cloudy-night, .ion-ios7-cloudy-night-outline, .ion-ios7-cloudy-outline, .ion-ios7-cog, .ion-ios7-cog-outline, .ion-ios7-compose, .ion-ios7-compose-outline, .ion-ios7-contact, .ion-ios7-contact-outline, .ion-ios7-copy, .ion-ios7-copy-outline, .ion-ios7-download, .ion-ios7-download-outline, .ion-ios7-drag, .ion-ios7-email, .ion-ios7-email-outline, .ion-ios7-eye, .ion-ios7-eye-outline, .ion-ios7-fastforward, .ion-ios7-fastforward-outline, .ion-ios7-filing, .ion-ios7-filing-outline, .ion-ios7-film, .ion-ios7-film-outline, .ion-ios7-flag, .ion-ios7-flag-outline, .ion-ios7-folder, .ion-ios7-folder-outline, .ion-ios7-gear, .ion-ios7-gear-outline, .ion-ios7-glasses, .ion-ios7-glasses-outline, .ion-ios7-heart, .ion-ios7-heart-outline, .ion-ios7-help, .ion-ios7-help-empty, .ion-ios7-help-outline, .ion-ios7-infinite, .ion-ios7-infinite-outline, .ion-ios7-information, .ion-ios7-information-empty, .ion-ios7-information-outline, .ion-ios7-ionic-outline, .ion-ios7-keypad, .ion-ios7-keypad-outline, .ion-ios7-lightbulb, .ion-ios7-lightbulb-outline, .ion-ios7-location, .ion-ios7-location-outline, .ion-ios7-locked, .ion-ios7-locked-outline, .ion-ios7-medkit, .ion-ios7-medkit-outline, .ion-ios7-mic, .ion-ios7-mic-off, .ion-ios7-mic-outline, .ion-ios7-minus, .ion-ios7-minus-empty, .ion-ios7-minus-outline, .ion-ios7-monitor, .ion-ios7-monitor-outline, .ion-ios7-moon, .ion-ios7-moon-outline, .ion-ios7-more, .ion-ios7-more-outline, .ion-ios7-musical-note, .ion-ios7-musical-notes, .ion-ios7-navigate, .ion-ios7-navigate-outline, .ion-ios7-paperplane, .ion-ios7-paperplane-outline, .ion-ios7-partlysunny, .ion-ios7-partlysunny-outline, .ion-ios7-pause, .ion-ios7-pause-outline, .ion-ios7-people, .ion-ios7-people-outline, .ion-ios7-person, .ion-ios7-person-outline, .ion-ios7-personadd, .ion-ios7-personadd-outline, .ion-ios7-photos, .ion-ios7-photos-outline, .ion-ios7-pie, .ion-ios7-pie-outline, .ion-ios7-play, .ion-ios7-play-outline, .ion-ios7-plus, .ion-ios7-plus-empty, .ion-ios7-plus-outline, .ion-ios7-pricetag, .ion-ios7-pricetag-outline, .ion-ios7-printer, .ion-ios7-printer-outline, .ion-ios7-rainy, .ion-ios7-rainy-outline, .ion-ios7-recording, .ion-ios7-recording-outline, .ion-ios7-redo, .ion-ios7-redo-outline, .ion-ios7-refresh, .ion-ios7-refresh-empty, .ion-ios7-refresh-outline, .ion-ios7-reload, .ion-ios7-rewind, .ion-ios7-rewind-outline, .ion-ios7-search, .ion-ios7-search-strong, .ion-ios7-skipbackward, .ion-ios7-skipbackward-outline, .ion-ios7-skipforward, .ion-ios7-skipforward-outline, .ion-ios7-snowy, .ion-ios7-speedometer, .ion-ios7-speedometer-outline, .ion-ios7-star, .ion-ios7-star-outline, .ion-ios7-stopwatch, .ion-ios7-stopwatch-outline, .ion-ios7-sunny, .ion-ios7-sunny-outline, .ion-ios7-telephone, .ion-ios7-telephone-outline, .ion-ios7-thunderstorm, .ion-ios7-thunderstorm-outline, .ion-ios7-time, .ion-ios7-time-outline, .ion-ios7-timer, .ion-ios7-timer-outline, .ion-ios7-trash, .ion-ios7-trash-outline, .ion-ios7-undo, .ion-ios7-undo-outline, .ion-ios7-unlocked, .ion-ios7-unlocked-outline, .ion-ios7-upload, .ion-ios7-upload-outline, .ion-ios7-videocam, .ion-ios7-videocam-outline, .ion-ios7-volume-high, .ion-ios7-volume-low, .ion-ios7-wineglass, .ion-ios7-wineglass-outline, .ion-ios7-world, .ion-ios7-world-outline, .ion-ipad, .ion-iphone, .ion-ipod, .ion-jet, .ion-key, .ion-knife, .ion-laptop, .ion-leaf, .ion-levels, .ion-lightbulb, .ion-link, .ion-load-a, .ion-load-b, .ion-load-c, .ion-load-d, .ion-location, .ion-locked, .ion-log-in, .ion-log-out, .ion-loop, .ion-magnet, .ion-male, .ion-man, .ion-map, .ion-medkit, .ion-mic-a, .ion-mic-b, .ion-mic-c, .ion-minus, .ion-minus-circled, .ion-minus-round, .ion-model-s, .ion-monitor, .ion-more, .ion-music-note, .ion-navicon, .ion-navicon-round, .ion-navigate, .ion-no-smoking, .ion-nuclear, .ion-paper-airplane, .ion-paperclip, .ion-pause, .ion-person, .ion-person-add, .ion-person-stalker, .ion-pie-graph, .ion-pin, .ion-pinpoint, .ion-pizza, .ion-plane, .ion-play, .ion-playstation, .ion-plus, .ion-plus-circled, .ion-plus-round, .ion-pound, .ion-power, .ion-pricetag, .ion-pricetags, .ion-printer, .ion-radio-waves, .ion-record, .ion-refresh, .ion-reply, .ion-reply-all, .ion-search, .ion-settings, .ion-share, .ion-shuffle, .ion-skip-backward, .ion-skip-forward, .ion-social-android, .ion-social-android-outline, .ion-social-apple, .ion-social-apple-outline, .ion-social-bitcoin, .ion-social-bitcoin-outline, .ion-social-buffer, .ion-social-buffer-outline, .ion-social-designernews, .ion-social-designernews-outline, .ion-social-dribbble, .ion-social-dribbble-outline, .ion-social-dropbox, .ion-social-dropbox-outline, .ion-social-facebook, .ion-social-facebook-outline, .ion-social-freebsd-devil, .ion-social-github, .ion-social-github-outline, .ion-social-googleplus, .ion-social-googleplus-outline, .ion-social-hackernews, .ion-social-hackernews-outline, .ion-social-linkedin, .ion-social-linkedin-outline, .ion-social-pinterest, .ion-social-pinterest-outline, .ion-social-reddit, .ion-social-reddit-outline, .ion-social-rss, .ion-social-rss-outline, .ion-social-skype, .ion-social-skype-outline, .ion-social-tumblr, .ion-social-tumblr-outline, .ion-social-tux, .ion-social-twitter, .ion-social-twitter-outline, .ion-social-vimeo, .ion-social-vimeo-outline, .ion-social-windows, .ion-social-windows-outline, .ion-social-wordpress, .ion-social-wordpress-outline, .ion-social-yahoo, .ion-social-yahoo-outline, .ion-social-youtube, .ion-social-youtube-outline, .ion-speakerphone, .ion-speedometer, .ion-spoon, .ion-star, .ion-stats-bars, .ion-steam, .ion-stop, .ion-thermometer, .ion-thumbsdown, .ion-thumbsup, .ion-trash-a, .ion-trash-b, .ion-umbrella, .ion-unlocked, .ion-upload, .ion-usb, .ion-videocamera, .ion-volume-high, .ion-volume-low, .ion-volume-medium, .ion-volume-mute, .ion-waterdrop, .ion-wifi, .ion-wineglass, .ion-woman, .ion-wrench, .ion-xbox {\n  display: inline-block;\n  font-family: \"Ionicons\";\n  speak: none;\n  font-style: normal;\n  font-weight: normal;\n  font-variant: normal;\n  text-transform: none;\n  text-rendering: auto;\n  line-height: 1;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale; }\n\n.ion-spin, .ion-loading-a, .ion-loading-b, .ion-loading-c, .ion-loading-d, .ion-looping, .ion-refreshing, .ion-ios7-reloading {\n  -webkit-animation: spin 1s infinite linear;\n  -moz-animation: spin 1s infinite linear;\n  -o-animation: spin 1s infinite linear;\n  animation: spin 1s infinite linear; }\n\n@-moz-keyframes spin {\n  0% {\n    -moz-transform: rotate(0deg); }\n\n  100% {\n    -moz-transform: rotate(359deg); } }\n\n@-webkit-keyframes spin {\n  0% {\n    -webkit-transform: rotate(0deg); }\n\n  100% {\n    -webkit-transform: rotate(359deg); } }\n\n@-o-keyframes spin {\n  0% {\n    -o-transform: rotate(0deg); }\n\n  100% {\n    -o-transform: rotate(359deg); } }\n\n@-ms-keyframes spin {\n  0% {\n    -ms-transform: rotate(0deg); }\n\n  100% {\n    -ms-transform: rotate(359deg); } }\n\n@keyframes spin {\n  0% {\n    transform: rotate(0deg); }\n\n  100% {\n    transform: rotate(359deg); } }\n\n\n.ion-loading-a {\n  -webkit-animation-timing-function: steps(8, start);\n  -moz-animation-timing-function: steps(8, start);\n  animation-timing-function: steps(8, start); }\n\n\n\n\n\n\n\n\n\n.ion-alert:before {\n  content: \"\\f101\"; }\n\n.ion-alert-circled:before {\n  content: \"\\f100\"; }\n\n.ion-android-add:before {\n  content: \"\\f2c7\"; }\n\n.ion-android-add-contact:before {\n  content: \"\\f2c6\"; }\n\n.ion-android-alarm:before {\n  content: \"\\f2c8\"; }\n\n.ion-android-archive:before {\n  content: \"\\f2c9\"; }\n\n.ion-android-arrow-back:before {\n  content: \"\\f2ca\"; }\n\n.ion-android-arrow-down-left:before {\n  content: \"\\f2cb\"; }\n\n.ion-android-arrow-down-right:before {\n  content: \"\\f2cc\"; }\n\n.ion-android-arrow-up-left:before {\n  content: \"\\f2cd\"; }\n\n.ion-android-arrow-up-right:before {\n  content: \"\\f2ce\"; }\n\n.ion-android-battery:before {\n  content: \"\\f2cf\"; }\n\n.ion-android-book:before {\n  content: \"\\f2d0\"; }\n\n.ion-android-calendar:before {\n  content: \"\\f2d1\"; }\n\n.ion-android-call:before {\n  content: \"\\f2d2\"; }\n\n.ion-android-camera:before {\n  content: \"\\f2d3\"; }\n\n.ion-android-chat:before {\n  content: \"\\f2d4\"; }\n\n.ion-android-checkmark:before {\n  content: \"\\f2d5\"; }\n\n.ion-android-clock:before {\n  content: \"\\f2d6\"; }\n\n.ion-android-close:before {\n  content: \"\\f2d7\"; }\n\n.ion-android-contact:before {\n  content: \"\\f2d8\"; }\n\n.ion-android-contacts:before {\n  content: \"\\f2d9\"; }\n\n.ion-android-data:before {\n  content: \"\\f2da\"; }\n\n.ion-android-developer:before {\n  content: \"\\f2db\"; }\n\n.ion-android-display:before {\n  content: \"\\f2dc\"; }\n\n.ion-android-download:before {\n  content: \"\\f2dd\"; }\n\n.ion-android-dropdown:before {\n  content: \"\\f2de\"; }\n\n.ion-android-earth:before {\n  content: \"\\f2df\"; }\n\n.ion-android-folder:before {\n  content: \"\\f2e0\"; }\n\n.ion-android-forums:before {\n  content: \"\\f2e1\"; }\n\n.ion-android-friends:before {\n  content: \"\\f2e2\"; }\n\n.ion-android-hand:before {\n  content: \"\\f2e3\"; }\n\n.ion-android-image:before {\n  content: \"\\f2e4\"; }\n\n.ion-android-inbox:before {\n  content: \"\\f2e5\"; }\n\n.ion-android-information:before {\n  content: \"\\f2e6\"; }\n\n.ion-android-keypad:before {\n  content: \"\\f2e7\"; }\n\n.ion-android-lightbulb:before {\n  content: \"\\f2e8\"; }\n\n.ion-android-locate:before {\n  content: \"\\f2e9\"; }\n\n.ion-android-location:before {\n  content: \"\\f2ea\"; }\n\n.ion-android-mail:before {\n  content: \"\\f2eb\"; }\n\n.ion-android-microphone:before {\n  content: \"\\f2ec\"; }\n\n.ion-android-mixer:before {\n  content: \"\\f2ed\"; }\n\n.ion-android-more:before {\n  content: \"\\f2ee\"; }\n\n.ion-android-note:before {\n  content: \"\\f2ef\"; }\n\n.ion-android-playstore:before {\n  content: \"\\f2f0\"; }\n\n.ion-android-printer:before {\n  content: \"\\f2f1\"; }\n\n.ion-android-promotion:before {\n  content: \"\\f2f2\"; }\n\n.ion-android-reminder:before {\n  content: \"\\f2f3\"; }\n\n.ion-android-remove:before {\n  content: \"\\f2f4\"; }\n\n.ion-android-search:before {\n  content: \"\\f2f5\"; }\n\n.ion-android-send:before {\n  content: \"\\f2f6\"; }\n\n.ion-android-settings:before {\n  content: \"\\f2f7\"; }\n\n.ion-android-share:before {\n  content: \"\\f2f8\"; }\n\n.ion-android-social:before {\n  content: \"\\f2fa\"; }\n\n.ion-android-social-user:before {\n  content: \"\\f2f9\"; }\n\n.ion-android-sort:before {\n  content: \"\\f2fb\"; }\n\n.ion-android-star:before {\n  content: \"\\f2fc\"; }\n\n.ion-android-stopwatch:before {\n  content: \"\\f2fd\"; }\n\n.ion-android-storage:before {\n  content: \"\\f2fe\"; }\n\n.ion-android-system-back:before {\n  content: \"\\f2ff\"; }\n\n.ion-android-system-home:before {\n  content: \"\\f300\"; }\n\n.ion-android-system-windows:before {\n  content: \"\\f301\"; }\n\n.ion-android-timer:before {\n  content: \"\\f302\"; }\n\n.ion-android-trash:before {\n  content: \"\\f303\"; }\n\n.ion-android-volume:before {\n  content: \"\\f304\"; }\n\n.ion-android-wifi:before {\n  content: \"\\f305\"; }\n\n.ion-archive:before {\n  content: \"\\f102\"; }\n\n.ion-arrow-down-a:before {\n  content: \"\\f103\"; }\n\n.ion-arrow-down-b:before {\n  content: \"\\f104\"; }\n\n.ion-arrow-down-c:before {\n  content: \"\\f105\"; }\n\n.ion-arrow-expand:before {\n  content: \"\\f25e\"; }\n\n.ion-arrow-graph-down-left:before {\n  content: \"\\f25f\"; }\n\n.ion-arrow-graph-down-right:before {\n  content: \"\\f260\"; }\n\n.ion-arrow-graph-up-left:before {\n  content: \"\\f261\"; }\n\n.ion-arrow-graph-up-right:before {\n  content: \"\\f262\"; }\n\n.ion-arrow-left-a:before {\n  content: \"\\f106\"; }\n\n.ion-arrow-left-b:before {\n  content: \"\\f107\"; }\n\n.ion-arrow-left-c:before {\n  content: \"\\f108\"; }\n\n.ion-arrow-move:before {\n  content: \"\\f263\"; }\n\n.ion-arrow-resize:before {\n  content: \"\\f264\"; }\n\n.ion-arrow-return-left:before {\n  content: \"\\f265\"; }\n\n.ion-arrow-return-right:before {\n  content: \"\\f266\"; }\n\n.ion-arrow-right-a:before {\n  content: \"\\f109\"; }\n\n.ion-arrow-right-b:before {\n  content: \"\\f10a\"; }\n\n.ion-arrow-right-c:before {\n  content: \"\\f10b\"; }\n\n.ion-arrow-shrink:before {\n  content: \"\\f267\"; }\n\n.ion-arrow-swap:before {\n  content: \"\\f268\"; }\n\n.ion-arrow-up-a:before {\n  content: \"\\f10c\"; }\n\n.ion-arrow-up-b:before {\n  content: \"\\f10d\"; }\n\n.ion-arrow-up-c:before {\n  content: \"\\f10e\"; }\n\n.ion-at:before {\n  content: \"\\f10f\"; }\n\n.ion-bag:before {\n  content: \"\\f110\"; }\n\n.ion-battery-charging:before {\n  content: \"\\f111\"; }\n\n.ion-battery-empty:before {\n  content: \"\\f112\"; }\n\n.ion-battery-full:before {\n  content: \"\\f113\"; }\n\n.ion-battery-half:before {\n  content: \"\\f114\"; }\n\n.ion-battery-low:before {\n  content: \"\\f115\"; }\n\n.ion-beaker:before {\n  content: \"\\f269\"; }\n\n.ion-beer:before {\n  content: \"\\f26a\"; }\n\n.ion-bluetooth:before {\n  content: \"\\f116\"; }\n\n.ion-bookmark:before {\n  content: \"\\f26b\"; }\n\n.ion-briefcase:before {\n  content: \"\\f26c\"; }\n\n.ion-bug:before {\n  content: \"\\f2be\"; }\n\n.ion-calculator:before {\n  content: \"\\f26d\"; }\n\n.ion-calendar:before {\n  content: \"\\f117\"; }\n\n.ion-camera:before {\n  content: \"\\f118\"; }\n\n.ion-card:before {\n  content: \"\\f119\"; }\n\n.ion-chatbox:before {\n  content: \"\\f11b\"; }\n\n.ion-chatbox-working:before {\n  content: \"\\f11a\"; }\n\n.ion-chatboxes:before {\n  content: \"\\f11c\"; }\n\n.ion-chatbubble:before {\n  content: \"\\f11e\"; }\n\n.ion-chatbubble-working:before {\n  content: \"\\f11d\"; }\n\n.ion-chatbubbles:before {\n  content: \"\\f11f\"; }\n\n.ion-checkmark:before {\n  content: \"\\f122\"; }\n\n.ion-checkmark-circled:before {\n  content: \"\\f120\"; }\n\n.ion-checkmark-round:before {\n  content: \"\\f121\"; }\n\n.ion-chevron-down:before {\n  content: \"\\f123\"; }\n\n.ion-chevron-left:before {\n  content: \"\\f124\"; }\n\n.ion-chevron-right:before {\n  content: \"\\f125\"; }\n\n.ion-chevron-up:before {\n  content: \"\\f126\"; }\n\n.ion-clipboard:before {\n  content: \"\\f127\"; }\n\n.ion-clock:before {\n  content: \"\\f26e\"; }\n\n.ion-close:before {\n  content: \"\\f12a\"; }\n\n.ion-close-circled:before {\n  content: \"\\f128\"; }\n\n.ion-close-round:before {\n  content: \"\\f129\"; }\n\n.ion-cloud:before {\n  content: \"\\f12b\"; }\n\n.ion-code:before {\n  content: \"\\f271\"; }\n\n.ion-code-download:before {\n  content: \"\\f26f\"; }\n\n.ion-code-working:before {\n  content: \"\\f270\"; }\n\n.ion-coffee:before {\n  content: \"\\f272\"; }\n\n.ion-compass:before {\n  content: \"\\f273\"; }\n\n.ion-compose:before {\n  content: \"\\f12c\"; }\n\n.ion-connection-bars:before {\n  content: \"\\f274\"; }\n\n.ion-contrast:before {\n  content: \"\\f275\"; }\n\n.ion-disc:before {\n  content: \"\\f12d\"; }\n\n.ion-document:before {\n  content: \"\\f12f\"; }\n\n.ion-document-text:before {\n  content: \"\\f12e\"; }\n\n.ion-drag:before {\n  content: \"\\f130\"; }\n\n.ion-earth:before {\n  content: \"\\f276\"; }\n\n.ion-edit:before {\n  content: \"\\f2bf\"; }\n\n.ion-egg:before {\n  content: \"\\f277\"; }\n\n.ion-eject:before {\n  content: \"\\f131\"; }\n\n.ion-email:before {\n  content: \"\\f132\"; }\n\n.ion-eye:before {\n  content: \"\\f133\"; }\n\n.ion-eye-disabled:before {\n  content: \"\\f306\"; }\n\n.ion-female:before {\n  content: \"\\f278\"; }\n\n.ion-filing:before {\n  content: \"\\f134\"; }\n\n.ion-film-marker:before {\n  content: \"\\f135\"; }\n\n.ion-flag:before {\n  content: \"\\f279\"; }\n\n.ion-flash:before {\n  content: \"\\f137\"; }\n\n.ion-flash-off:before {\n  content: \"\\f136\"; }\n\n.ion-flask:before {\n  content: \"\\f138\"; }\n\n.ion-folder:before {\n  content: \"\\f139\"; }\n\n.ion-fork:before {\n  content: \"\\f27a\"; }\n\n.ion-fork-repo:before {\n  content: \"\\f2c0\"; }\n\n.ion-forward:before {\n  content: \"\\f13a\"; }\n\n.ion-game-controller-a:before {\n  content: \"\\f13b\"; }\n\n.ion-game-controller-b:before {\n  content: \"\\f13c\"; }\n\n.ion-gear-a:before {\n  content: \"\\f13d\"; }\n\n.ion-gear-b:before {\n  content: \"\\f13e\"; }\n\n.ion-grid:before {\n  content: \"\\f13f\"; }\n\n.ion-hammer:before {\n  content: \"\\f27b\"; }\n\n.ion-headphone:before {\n  content: \"\\f140\"; }\n\n.ion-heart:before {\n  content: \"\\f141\"; }\n\n.ion-help:before {\n  content: \"\\f143\"; }\n\n.ion-help-buoy:before {\n  content: \"\\f27c\"; }\n\n.ion-help-circled:before {\n  content: \"\\f142\"; }\n\n.ion-home:before {\n  content: \"\\f144\"; }\n\n.ion-icecream:before {\n  content: \"\\f27d\"; }\n\n.ion-icon-social-google-plus:before {\n  content: \"\\f146\"; }\n\n.ion-icon-social-google-plus-outline:before {\n  content: \"\\f145\"; }\n\n.ion-image:before {\n  content: \"\\f147\"; }\n\n.ion-images:before {\n  content: \"\\f148\"; }\n\n.ion-information:before {\n  content: \"\\f14a\"; }\n\n.ion-information-circled:before {\n  content: \"\\f149\"; }\n\n.ion-ionic:before {\n  content: \"\\f14b\"; }\n\n.ion-ios7-alarm:before {\n  content: \"\\f14d\"; }\n\n.ion-ios7-alarm-outline:before {\n  content: \"\\f14c\"; }\n\n.ion-ios7-albums:before {\n  content: \"\\f14f\"; }\n\n.ion-ios7-albums-outline:before {\n  content: \"\\f14e\"; }\n\n.ion-ios7-arrow-back:before {\n  content: \"\\f150\"; }\n\n.ion-ios7-arrow-down:before {\n  content: \"\\f151\"; }\n\n.ion-ios7-arrow-forward:before {\n  content: \"\\f152\"; }\n\n.ion-ios7-arrow-left:before {\n  content: \"\\f153\"; }\n\n.ion-ios7-arrow-right:before {\n  content: \"\\f154\"; }\n\n.ion-ios7-arrow-thin-down:before {\n  content: \"\\f27e\"; }\n\n.ion-ios7-arrow-thin-left:before {\n  content: \"\\f27f\"; }\n\n.ion-ios7-arrow-thin-right:before {\n  content: \"\\f280\"; }\n\n.ion-ios7-arrow-thin-up:before {\n  content: \"\\f281\"; }\n\n.ion-ios7-arrow-up:before {\n  content: \"\\f155\"; }\n\n.ion-ios7-at:before {\n  content: \"\\f157\"; }\n\n.ion-ios7-at-outline:before {\n  content: \"\\f156\"; }\n\n.ion-ios7-bell:before {\n  content: \"\\f159\"; }\n\n.ion-ios7-bell-outline:before {\n  content: \"\\f158\"; }\n\n.ion-ios7-bolt:before {\n  content: \"\\f15b\"; }\n\n.ion-ios7-bolt-outline:before {\n  content: \"\\f15a\"; }\n\n.ion-ios7-bookmarks:before {\n  content: \"\\f15d\"; }\n\n.ion-ios7-bookmarks-outline:before {\n  content: \"\\f15c\"; }\n\n.ion-ios7-box:before {\n  content: \"\\f15f\"; }\n\n.ion-ios7-box-outline:before {\n  content: \"\\f15e\"; }\n\n.ion-ios7-briefcase:before {\n  content: \"\\f283\"; }\n\n.ion-ios7-briefcase-outline:before {\n  content: \"\\f282\"; }\n\n.ion-ios7-browsers:before {\n  content: \"\\f161\"; }\n\n.ion-ios7-browsers-outline:before {\n  content: \"\\f160\"; }\n\n.ion-ios7-calculator:before {\n  content: \"\\f285\"; }\n\n.ion-ios7-calculator-outline:before {\n  content: \"\\f284\"; }\n\n.ion-ios7-calendar:before {\n  content: \"\\f163\"; }\n\n.ion-ios7-calendar-outline:before {\n  content: \"\\f162\"; }\n\n.ion-ios7-camera:before {\n  content: \"\\f165\"; }\n\n.ion-ios7-camera-outline:before {\n  content: \"\\f164\"; }\n\n.ion-ios7-cart:before {\n  content: \"\\f167\"; }\n\n.ion-ios7-cart-outline:before {\n  content: \"\\f166\"; }\n\n.ion-ios7-chatboxes:before {\n  content: \"\\f169\"; }\n\n.ion-ios7-chatboxes-outline:before {\n  content: \"\\f168\"; }\n\n.ion-ios7-chatbubble:before {\n  content: \"\\f16b\"; }\n\n.ion-ios7-chatbubble-outline:before {\n  content: \"\\f16a\"; }\n\n.ion-ios7-checkmark:before {\n  content: \"\\f16e\"; }\n\n.ion-ios7-checkmark-empty:before {\n  content: \"\\f16c\"; }\n\n.ion-ios7-checkmark-outline:before {\n  content: \"\\f16d\"; }\n\n.ion-ios7-circle-filled:before {\n  content: \"\\f16f\"; }\n\n.ion-ios7-circle-outline:before {\n  content: \"\\f170\"; }\n\n.ion-ios7-clock:before {\n  content: \"\\f172\"; }\n\n.ion-ios7-clock-outline:before {\n  content: \"\\f171\"; }\n\n.ion-ios7-close:before {\n  content: \"\\f2bc\"; }\n\n.ion-ios7-close-empty:before {\n  content: \"\\f2bd\"; }\n\n.ion-ios7-close-outline:before {\n  content: \"\\f2bb\"; }\n\n.ion-ios7-cloud:before {\n  content: \"\\f178\"; }\n\n.ion-ios7-cloud-download:before {\n  content: \"\\f174\"; }\n\n.ion-ios7-cloud-download-outline:before {\n  content: \"\\f173\"; }\n\n.ion-ios7-cloud-outline:before {\n  content: \"\\f175\"; }\n\n.ion-ios7-cloud-upload:before {\n  content: \"\\f177\"; }\n\n.ion-ios7-cloud-upload-outline:before {\n  content: \"\\f176\"; }\n\n.ion-ios7-cloudy:before {\n  content: \"\\f17a\"; }\n\n.ion-ios7-cloudy-night:before {\n  content: \"\\f308\"; }\n\n.ion-ios7-cloudy-night-outline:before {\n  content: \"\\f307\"; }\n\n.ion-ios7-cloudy-outline:before {\n  content: \"\\f179\"; }\n\n.ion-ios7-cog:before {\n  content: \"\\f17c\"; }\n\n.ion-ios7-cog-outline:before {\n  content: \"\\f17b\"; }\n\n.ion-ios7-compose:before {\n  content: \"\\f17e\"; }\n\n.ion-ios7-compose-outline:before {\n  content: \"\\f17d\"; }\n\n.ion-ios7-contact:before {\n  content: \"\\f180\"; }\n\n.ion-ios7-contact-outline:before {\n  content: \"\\f17f\"; }\n\n.ion-ios7-copy:before {\n  content: \"\\f182\"; }\n\n.ion-ios7-copy-outline:before {\n  content: \"\\f181\"; }\n\n.ion-ios7-download:before {\n  content: \"\\f184\"; }\n\n.ion-ios7-download-outline:before {\n  content: \"\\f183\"; }\n\n.ion-ios7-drag:before {\n  content: \"\\f185\"; }\n\n.ion-ios7-email:before {\n  content: \"\\f187\"; }\n\n.ion-ios7-email-outline:before {\n  content: \"\\f186\"; }\n\n.ion-ios7-eye:before {\n  content: \"\\f189\"; }\n\n.ion-ios7-eye-outline:before {\n  content: \"\\f188\"; }\n\n.ion-ios7-fastforward:before {\n  content: \"\\f18b\"; }\n\n.ion-ios7-fastforward-outline:before {\n  content: \"\\f18a\"; }\n\n.ion-ios7-filing:before {\n  content: \"\\f18d\"; }\n\n.ion-ios7-filing-outline:before {\n  content: \"\\f18c\"; }\n\n.ion-ios7-film:before {\n  content: \"\\f18f\"; }\n\n.ion-ios7-film-outline:before {\n  content: \"\\f18e\"; }\n\n.ion-ios7-flag:before {\n  content: \"\\f191\"; }\n\n.ion-ios7-flag-outline:before {\n  content: \"\\f190\"; }\n\n.ion-ios7-folder:before {\n  content: \"\\f193\"; }\n\n.ion-ios7-folder-outline:before {\n  content: \"\\f192\"; }\n\n.ion-ios7-gear:before {\n  content: \"\\f195\"; }\n\n.ion-ios7-gear-outline:before {\n  content: \"\\f194\"; }\n\n.ion-ios7-glasses:before {\n  content: \"\\f197\"; }\n\n.ion-ios7-glasses-outline:before {\n  content: \"\\f196\"; }\n\n.ion-ios7-heart:before {\n  content: \"\\f199\"; }\n\n.ion-ios7-heart-outline:before {\n  content: \"\\f198\"; }\n\n.ion-ios7-help:before {\n  content: \"\\f19c\"; }\n\n.ion-ios7-help-empty:before {\n  content: \"\\f19a\"; }\n\n.ion-ios7-help-outline:before {\n  content: \"\\f19b\"; }\n\n.ion-ios7-infinite:before {\n  content: \"\\f19e\"; }\n\n.ion-ios7-infinite-outline:before {\n  content: \"\\f19d\"; }\n\n.ion-ios7-information:before {\n  content: \"\\f1a1\"; }\n\n.ion-ios7-information-empty:before {\n  content: \"\\f19f\"; }\n\n.ion-ios7-information-outline:before {\n  content: \"\\f1a0\"; }\n\n.ion-ios7-ionic-outline:before {\n  content: \"\\f1a2\"; }\n\n.ion-ios7-keypad:before {\n  content: \"\\f1a4\"; }\n\n.ion-ios7-keypad-outline:before {\n  content: \"\\f1a3\"; }\n\n.ion-ios7-lightbulb:before {\n  content: \"\\f287\"; }\n\n.ion-ios7-lightbulb-outline:before {\n  content: \"\\f286\"; }\n\n.ion-ios7-location:before {\n  content: \"\\f1a6\"; }\n\n.ion-ios7-location-outline:before {\n  content: \"\\f1a5\"; }\n\n.ion-ios7-locked:before {\n  content: \"\\f1a8\"; }\n\n.ion-ios7-locked-outline:before {\n  content: \"\\f1a7\"; }\n\n.ion-ios7-medkit:before {\n  content: \"\\f289\"; }\n\n.ion-ios7-medkit-outline:before {\n  content: \"\\f288\"; }\n\n.ion-ios7-mic:before {\n  content: \"\\f1ab\"; }\n\n.ion-ios7-mic-off:before {\n  content: \"\\f1a9\"; }\n\n.ion-ios7-mic-outline:before {\n  content: \"\\f1aa\"; }\n\n.ion-ios7-minus:before {\n  content: \"\\f1ae\"; }\n\n.ion-ios7-minus-empty:before {\n  content: \"\\f1ac\"; }\n\n.ion-ios7-minus-outline:before {\n  content: \"\\f1ad\"; }\n\n.ion-ios7-monitor:before {\n  content: \"\\f1b0\"; }\n\n.ion-ios7-monitor-outline:before {\n  content: \"\\f1af\"; }\n\n.ion-ios7-moon:before {\n  content: \"\\f1b2\"; }\n\n.ion-ios7-moon-outline:before {\n  content: \"\\f1b1\"; }\n\n.ion-ios7-more:before {\n  content: \"\\f1b4\"; }\n\n.ion-ios7-more-outline:before {\n  content: \"\\f1b3\"; }\n\n.ion-ios7-musical-note:before {\n  content: \"\\f1b5\"; }\n\n.ion-ios7-musical-notes:before {\n  content: \"\\f1b6\"; }\n\n.ion-ios7-navigate:before {\n  content: \"\\f1b8\"; }\n\n.ion-ios7-navigate-outline:before {\n  content: \"\\f1b7\"; }\n\n.ion-ios7-paperplane:before {\n  content: \"\\f1ba\"; }\n\n.ion-ios7-paperplane-outline:before {\n  content: \"\\f1b9\"; }\n\n.ion-ios7-partlysunny:before {\n  content: \"\\f1bc\"; }\n\n.ion-ios7-partlysunny-outline:before {\n  content: \"\\f1bb\"; }\n\n.ion-ios7-pause:before {\n  content: \"\\f1be\"; }\n\n.ion-ios7-pause-outline:before {\n  content: \"\\f1bd\"; }\n\n.ion-ios7-people:before {\n  content: \"\\f1c0\"; }\n\n.ion-ios7-people-outline:before {\n  content: \"\\f1bf\"; }\n\n.ion-ios7-person:before {\n  content: \"\\f1c2\"; }\n\n.ion-ios7-person-outline:before {\n  content: \"\\f1c1\"; }\n\n.ion-ios7-personadd:before {\n  content: \"\\f1c4\"; }\n\n.ion-ios7-personadd-outline:before {\n  content: \"\\f1c3\"; }\n\n.ion-ios7-photos:before {\n  content: \"\\f1c6\"; }\n\n.ion-ios7-photos-outline:before {\n  content: \"\\f1c5\"; }\n\n.ion-ios7-pie:before {\n  content: \"\\f28b\"; }\n\n.ion-ios7-pie-outline:before {\n  content: \"\\f28a\"; }\n\n.ion-ios7-play:before {\n  content: \"\\f1c8\"; }\n\n.ion-ios7-play-outline:before {\n  content: \"\\f1c7\"; }\n\n.ion-ios7-plus:before {\n  content: \"\\f1cb\"; }\n\n.ion-ios7-plus-empty:before {\n  content: \"\\f1c9\"; }\n\n.ion-ios7-plus-outline:before {\n  content: \"\\f1ca\"; }\n\n.ion-ios7-pricetag:before {\n  content: \"\\f28d\"; }\n\n.ion-ios7-pricetag-outline:before {\n  content: \"\\f28c\"; }\n\n.ion-ios7-printer:before {\n  content: \"\\f1cd\"; }\n\n.ion-ios7-printer-outline:before {\n  content: \"\\f1cc\"; }\n\n.ion-ios7-rainy:before {\n  content: \"\\f1cf\"; }\n\n.ion-ios7-rainy-outline:before {\n  content: \"\\f1ce\"; }\n\n.ion-ios7-recording:before {\n  content: \"\\f1d1\"; }\n\n.ion-ios7-recording-outline:before {\n  content: \"\\f1d0\"; }\n\n.ion-ios7-redo:before {\n  content: \"\\f1d3\"; }\n\n.ion-ios7-redo-outline:before {\n  content: \"\\f1d2\"; }\n\n.ion-ios7-refresh:before {\n  content: \"\\f1d6\"; }\n\n.ion-ios7-refresh-empty:before {\n  content: \"\\f1d4\"; }\n\n.ion-ios7-refresh-outline:before {\n  content: \"\\f1d5\"; }\n\n.ion-ios7-reload:before, .ion-ios7-reloading:before {\n  content: \"\\f28e\"; }\n\n.ion-ios7-rewind:before {\n  content: \"\\f1d8\"; }\n\n.ion-ios7-rewind-outline:before {\n  content: \"\\f1d7\"; }\n\n.ion-ios7-search:before {\n  content: \"\\f1da\"; }\n\n.ion-ios7-search-strong:before {\n  content: \"\\f1d9\"; }\n\n.ion-ios7-skipbackward:before {\n  content: \"\\f1dc\"; }\n\n.ion-ios7-skipbackward-outline:before {\n  content: \"\\f1db\"; }\n\n.ion-ios7-skipforward:before {\n  content: \"\\f1de\"; }\n\n.ion-ios7-skipforward-outline:before {\n  content: \"\\f1dd\"; }\n\n.ion-ios7-snowy:before {\n  content: \"\\f309\"; }\n\n.ion-ios7-speedometer:before {\n  content: \"\\f290\"; }\n\n.ion-ios7-speedometer-outline:before {\n  content: \"\\f28f\"; }\n\n.ion-ios7-star:before {\n  content: \"\\f1e0\"; }\n\n.ion-ios7-star-outline:before {\n  content: \"\\f1df\"; }\n\n.ion-ios7-stopwatch:before {\n  content: \"\\f1e2\"; }\n\n.ion-ios7-stopwatch-outline:before {\n  content: \"\\f1e1\"; }\n\n.ion-ios7-sunny:before {\n  content: \"\\f1e4\"; }\n\n.ion-ios7-sunny-outline:before {\n  content: \"\\f1e3\"; }\n\n.ion-ios7-telephone:before {\n  content: \"\\f1e6\"; }\n\n.ion-ios7-telephone-outline:before {\n  content: \"\\f1e5\"; }\n\n.ion-ios7-thunderstorm:before {\n  content: \"\\f1e8\"; }\n\n.ion-ios7-thunderstorm-outline:before {\n  content: \"\\f1e7\"; }\n\n.ion-ios7-time:before {\n  content: \"\\f292\"; }\n\n.ion-ios7-time-outline:before {\n  content: \"\\f291\"; }\n\n.ion-ios7-timer:before {\n  content: \"\\f1ea\"; }\n\n.ion-ios7-timer-outline:before {\n  content: \"\\f1e9\"; }\n\n.ion-ios7-trash:before {\n  content: \"\\f1ec\"; }\n\n.ion-ios7-trash-outline:before {\n  content: \"\\f1eb\"; }\n\n.ion-ios7-undo:before {\n  content: \"\\f1ee\"; }\n\n.ion-ios7-undo-outline:before {\n  content: \"\\f1ed\"; }\n\n.ion-ios7-unlocked:before {\n  content: \"\\f1f0\"; }\n\n.ion-ios7-unlocked-outline:before {\n  content: \"\\f1ef\"; }\n\n.ion-ios7-upload:before {\n  content: \"\\f1f2\"; }\n\n.ion-ios7-upload-outline:before {\n  content: \"\\f1f1\"; }\n\n.ion-ios7-videocam:before {\n  content: \"\\f1f4\"; }\n\n.ion-ios7-videocam-outline:before {\n  content: \"\\f1f3\"; }\n\n.ion-ios7-volume-high:before {\n  content: \"\\f1f5\"; }\n\n.ion-ios7-volume-low:before {\n  content: \"\\f1f6\"; }\n\n.ion-ios7-wineglass:before {\n  content: \"\\f294\"; }\n\n.ion-ios7-wineglass-outline:before {\n  content: \"\\f293\"; }\n\n.ion-ios7-world:before {\n  content: \"\\f1f8\"; }\n\n.ion-ios7-world-outline:before {\n  content: \"\\f1f7\"; }\n\n.ion-ipad:before {\n  content: \"\\f1f9\"; }\n\n.ion-iphone:before {\n  content: \"\\f1fa\"; }\n\n.ion-ipod:before {\n  content: \"\\f1fb\"; }\n\n.ion-jet:before {\n  content: \"\\f295\"; }\n\n.ion-key:before {\n  content: \"\\f296\"; }\n\n.ion-knife:before {\n  content: \"\\f297\"; }\n\n.ion-laptop:before {\n  content: \"\\f1fc\"; }\n\n.ion-leaf:before {\n  content: \"\\f1fd\"; }\n\n.ion-levels:before {\n  content: \"\\f298\"; }\n\n.ion-lightbulb:before {\n  content: \"\\f299\"; }\n\n.ion-link:before {\n  content: \"\\f1fe\"; }\n\n.ion-load-a:before, .ion-loading-a:before {\n  content: \"\\f29a\"; }\n\n.ion-load-b:before, .ion-loading-b:before {\n  content: \"\\f29b\"; }\n\n.ion-load-c:before, .ion-loading-c:before {\n  content: \"\\f29c\"; }\n\n.ion-load-d:before, .ion-loading-d:before {\n  content: \"\\f29d\"; }\n\n.ion-location:before {\n  content: \"\\f1ff\"; }\n\n.ion-locked:before {\n  content: \"\\f200\"; }\n\n.ion-log-in:before {\n  content: \"\\f29e\"; }\n\n.ion-log-out:before {\n  content: \"\\f29f\"; }\n\n.ion-loop:before, .ion-looping:before {\n  content: \"\\f201\"; }\n\n.ion-magnet:before {\n  content: \"\\f2a0\"; }\n\n.ion-male:before {\n  content: \"\\f2a1\"; }\n\n.ion-man:before {\n  content: \"\\f202\"; }\n\n.ion-map:before {\n  content: \"\\f203\"; }\n\n.ion-medkit:before {\n  content: \"\\f2a2\"; }\n\n.ion-mic-a:before {\n  content: \"\\f204\"; }\n\n.ion-mic-b:before {\n  content: \"\\f205\"; }\n\n.ion-mic-c:before {\n  content: \"\\f206\"; }\n\n.ion-minus:before {\n  content: \"\\f209\"; }\n\n.ion-minus-circled:before {\n  content: \"\\f207\"; }\n\n.ion-minus-round:before {\n  content: \"\\f208\"; }\n\n.ion-model-s:before {\n  content: \"\\f2c1\"; }\n\n.ion-monitor:before {\n  content: \"\\f20a\"; }\n\n.ion-more:before {\n  content: \"\\f20b\"; }\n\n.ion-music-note:before {\n  content: \"\\f20c\"; }\n\n.ion-navicon:before {\n  content: \"\\f20e\"; }\n\n.ion-navicon-round:before {\n  content: \"\\f20d\"; }\n\n.ion-navigate:before {\n  content: \"\\f2a3\"; }\n\n.ion-no-smoking:before {\n  content: \"\\f2c2\"; }\n\n.ion-nuclear:before {\n  content: \"\\f2a4\"; }\n\n.ion-paper-airplane:before {\n  content: \"\\f2c3\"; }\n\n.ion-paperclip:before {\n  content: \"\\f20f\"; }\n\n.ion-pause:before {\n  content: \"\\f210\"; }\n\n.ion-person:before {\n  content: \"\\f213\"; }\n\n.ion-person-add:before {\n  content: \"\\f211\"; }\n\n.ion-person-stalker:before {\n  content: \"\\f212\"; }\n\n.ion-pie-graph:before {\n  content: \"\\f2a5\"; }\n\n.ion-pin:before {\n  content: \"\\f2a6\"; }\n\n.ion-pinpoint:before {\n  content: \"\\f2a7\"; }\n\n.ion-pizza:before {\n  content: \"\\f2a8\"; }\n\n.ion-plane:before {\n  content: \"\\f214\"; }\n\n.ion-play:before {\n  content: \"\\f215\"; }\n\n.ion-playstation:before {\n  content: \"\\f30a\"; }\n\n.ion-plus:before {\n  content: \"\\f218\"; }\n\n.ion-plus-circled:before {\n  content: \"\\f216\"; }\n\n.ion-plus-round:before {\n  content: \"\\f217\"; }\n\n.ion-pound:before {\n  content: \"\\f219\"; }\n\n.ion-power:before {\n  content: \"\\f2a9\"; }\n\n.ion-pricetag:before {\n  content: \"\\f2aa\"; }\n\n.ion-pricetags:before {\n  content: \"\\f2ab\"; }\n\n.ion-printer:before {\n  content: \"\\f21a\"; }\n\n.ion-radio-waves:before {\n  content: \"\\f2ac\"; }\n\n.ion-record:before {\n  content: \"\\f21b\"; }\n\n.ion-refresh:before, .ion-refreshing:before {\n  content: \"\\f21c\"; }\n\n.ion-reply:before {\n  content: \"\\f21e\"; }\n\n.ion-reply-all:before {\n  content: \"\\f21d\"; }\n\n.ion-search:before {\n  content: \"\\f21f\"; }\n\n.ion-settings:before {\n  content: \"\\f2ad\"; }\n\n.ion-share:before {\n  content: \"\\f220\"; }\n\n.ion-shuffle:before {\n  content: \"\\f221\"; }\n\n.ion-skip-backward:before {\n  content: \"\\f222\"; }\n\n.ion-skip-forward:before {\n  content: \"\\f223\"; }\n\n.ion-social-android:before {\n  content: \"\\f225\"; }\n\n.ion-social-android-outline:before {\n  content: \"\\f224\"; }\n\n.ion-social-apple:before {\n  content: \"\\f227\"; }\n\n.ion-social-apple-outline:before {\n  content: \"\\f226\"; }\n\n.ion-social-bitcoin:before {\n  content: \"\\f2af\"; }\n\n.ion-social-bitcoin-outline:before {\n  content: \"\\f2ae\"; }\n\n.ion-social-buffer:before {\n  content: \"\\f229\"; }\n\n.ion-social-buffer-outline:before {\n  content: \"\\f228\"; }\n\n.ion-social-designernews:before {\n  content: \"\\f22b\"; }\n\n.ion-social-designernews-outline:before {\n  content: \"\\f22a\"; }\n\n.ion-social-dribbble:before {\n  content: \"\\f22d\"; }\n\n.ion-social-dribbble-outline:before {\n  content: \"\\f22c\"; }\n\n.ion-social-dropbox:before {\n  content: \"\\f22f\"; }\n\n.ion-social-dropbox-outline:before {\n  content: \"\\f22e\"; }\n\n.ion-social-facebook:before {\n  content: \"\\f231\"; }\n\n.ion-social-facebook-outline:before {\n  content: \"\\f230\"; }\n\n.ion-social-freebsd-devil:before {\n  content: \"\\f2c4\"; }\n\n.ion-social-github:before {\n  content: \"\\f233\"; }\n\n.ion-social-github-outline:before {\n  content: \"\\f232\"; }\n\n.ion-social-googleplus:before {\n  content: \"\\f235\"; }\n\n.ion-social-googleplus-outline:before {\n  content: \"\\f234\"; }\n\n.ion-social-hackernews:before {\n  content: \"\\f237\"; }\n\n.ion-social-hackernews-outline:before {\n  content: \"\\f236\"; }\n\n.ion-social-linkedin:before {\n  content: \"\\f239\"; }\n\n.ion-social-linkedin-outline:before {\n  content: \"\\f238\"; }\n\n.ion-social-pinterest:before {\n  content: \"\\f2b1\"; }\n\n.ion-social-pinterest-outline:before {\n  content: \"\\f2b0\"; }\n\n.ion-social-reddit:before {\n  content: \"\\f23b\"; }\n\n.ion-social-reddit-outline:before {\n  content: \"\\f23a\"; }\n\n.ion-social-rss:before {\n  content: \"\\f23d\"; }\n\n.ion-social-rss-outline:before {\n  content: \"\\f23c\"; }\n\n.ion-social-skype:before {\n  content: \"\\f23f\"; }\n\n.ion-social-skype-outline:before {\n  content: \"\\f23e\"; }\n\n.ion-social-tumblr:before {\n  content: \"\\f241\"; }\n\n.ion-social-tumblr-outline:before {\n  content: \"\\f240\"; }\n\n.ion-social-tux:before {\n  content: \"\\f2c5\"; }\n\n.ion-social-twitter:before {\n  content: \"\\f243\"; }\n\n.ion-social-twitter-outline:before {\n  content: \"\\f242\"; }\n\n.ion-social-vimeo:before {\n  content: \"\\f245\"; }\n\n.ion-social-vimeo-outline:before {\n  content: \"\\f244\"; }\n\n.ion-social-windows:before {\n  content: \"\\f247\"; }\n\n.ion-social-windows-outline:before {\n  content: \"\\f246\"; }\n\n.ion-social-wordpress:before {\n  content: \"\\f249\"; }\n\n.ion-social-wordpress-outline:before {\n  content: \"\\f248\"; }\n\n.ion-social-yahoo:before {\n  content: \"\\f24b\"; }\n\n.ion-social-yahoo-outline:before {\n  content: \"\\f24a\"; }\n\n.ion-social-youtube:before {\n  content: \"\\f24d\"; }\n\n.ion-social-youtube-outline:before {\n  content: \"\\f24c\"; }\n\n.ion-speakerphone:before {\n  content: \"\\f2b2\"; }\n\n.ion-speedometer:before {\n  content: \"\\f2b3\"; }\n\n.ion-spoon:before {\n  content: \"\\f2b4\"; }\n\n.ion-star:before {\n  content: \"\\f24e\"; }\n\n.ion-stats-bars:before {\n  content: \"\\f2b5\"; }\n\n.ion-steam:before {\n  content: \"\\f30b\"; }\n\n.ion-stop:before {\n  content: \"\\f24f\"; }\n\n.ion-thermometer:before {\n  content: \"\\f2b6\"; }\n\n.ion-thumbsdown:before {\n  content: \"\\f250\"; }\n\n.ion-thumbsup:before {\n  content: \"\\f251\"; }\n\n.ion-trash-a:before {\n  content: \"\\f252\"; }\n\n.ion-trash-b:before {\n  content: \"\\f253\"; }\n\n.ion-umbrella:before {\n  content: \"\\f2b7\"; }\n\n.ion-unlocked:before {\n  content: \"\\f254\"; }\n\n.ion-upload:before {\n  content: \"\\f255\"; }\n\n.ion-usb:before {\n  content: \"\\f2b8\"; }\n\n.ion-videocamera:before {\n  content: \"\\f256\"; }\n\n.ion-volume-high:before {\n  content: \"\\f257\"; }\n\n.ion-volume-low:before {\n  content: \"\\f258\"; }\n\n.ion-volume-medium:before {\n  content: \"\\f259\"; }\n\n.ion-volume-mute:before {\n  content: \"\\f25a\"; }\n\n.ion-waterdrop:before {\n  content: \"\\f25b\"; }\n\n.ion-wifi:before {\n  content: \"\\f25c\"; }\n\n.ion-wineglass:before {\n  content: \"\\f2b9\"; }\n\n.ion-woman:before {\n  content: \"\\f25d\"; }\n\n.ion-wrench:before {\n  content: \"\\f2ba\"; }\n\n.ion-xbox:before {\n  content: \"\\f30c\"; }\n\n/**\n * Resets\n * --------------------------------------------------\n * Adapted from normalize.css and some reset.css. We don't care even one\n * bit about old IE, so we don't need any hacks for that in here.\n *\n * There are probably other things we could remove here, as well.\n *\n * normalize.css v2.1.2 | MIT License | git.io/normalize\n\n * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)\n * http://cssreset.com\n */\nhtml, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, i, u, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, fieldset, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {\n  margin: 0;\n  padding: 0;\n  border: 0;\n  vertical-align: baseline;\n  font: inherit;\n  font-size: 100%; }\n\nol, ul {\n  list-style: none; }\n\nblockquote, q {\n  quotes: none; }\n\nblockquote:before, blockquote:after, q:before, q:after {\n  content: '';\n  content: none; }\n\n/**\n * Prevent modern browsers from displaying `audio` without controls.\n * Remove excess height in iOS 5 devices.\n */\naudio:not([controls]) {\n  display: none;\n  height: 0; }\n\n/**\n * Hide the `template` element in IE, Safari, and Firefox < 22.\n */\n[hidden], template {\n  display: none; }\n\nscript {\n  display: none !important; }\n\n/* ==========================================================================\n   Base\n   ========================================================================== */\n/**\n * 1. Set default font family to sans-serif.\n * 2. Prevent iOS text size adjust after orientation change, without disabling\n *  user zoom.\n */\nhtml {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  font-family: sans-serif;\n  /* 1 */\n  -webkit-text-size-adjust: 100%;\n  -ms-text-size-adjust: 100%;\n  /* 2 */\n  -webkit-text-size-adjust: 100%;\n  /* 2 */ }\n\n/**\n * Remove default margin.\n */\nbody {\n  margin: 0;\n  line-height: 1; }\n\n/**\n * Remove default outlines.\n */\na, button, :focus, a:focus, button:focus, a:active, a:hover {\n  outline: 0; }\n\n/* *\n * Remove tap highlight color\n */\na {\n  -webkit-user-drag: none;\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n  -webkit-tap-highlight-color: transparent; }\n  a[href]:hover {\n    cursor: pointer; }\n\n/* ==========================================================================\n   Typography\n   ========================================================================== */\n/**\n * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.\n */\nb, strong {\n  font-weight: bold; }\n\n/**\n * Address styling not present in Safari 5 and Chrome.\n */\ndfn {\n  font-style: italic; }\n\n/**\n * Address differences between Firefox and other browsers.\n */\nhr {\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  height: 0; }\n\n/**\n * Correct font family set oddly in Safari 5 and Chrome.\n */\ncode, kbd, pre, samp {\n  font-size: 1em;\n  font-family: monospace, serif; }\n\n/**\n * Improve readability of pre-formatted text in all browsers.\n */\npre {\n  white-space: pre-wrap; }\n\n/**\n * Set consistent quote types.\n */\nq {\n  quotes: \"\\201C\" \"\\201D\" \"\\2018\" \"\\2019\"; }\n\n/**\n * Address inconsistent and variable font size in all browsers.\n */\nsmall {\n  font-size: 80%; }\n\n/**\n * Prevent `sub` and `sup` affecting `line-height` in all browsers.\n */\nsub, sup {\n  position: relative;\n  vertical-align: baseline;\n  font-size: 75%;\n  line-height: 0; }\n\nsup {\n  top: -0.5em; }\n\nsub {\n  bottom: -0.25em; }\n\n/**\n * Define consistent border, margin, and padding.\n */\nfieldset {\n  margin: 0 2px;\n  padding: 0.35em 0.625em 0.75em;\n  border: 1px solid #c0c0c0; }\n\n/**\n * 1. Correct `color` not being inherited in IE 8/9.\n * 2. Remove padding so people aren't caught out if they zero out fieldsets.\n */\nlegend {\n  padding: 0;\n  /* 2 */\n  border: 0;\n  /* 1 */ }\n\n/**\n * 1. Correct font family not being inherited in all browsers.\n * 2. Correct font size not being inherited in all browsers.\n * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.\n * 4. Remove any default :focus styles\n * 5. Make sure webkit font smoothing is being inherited\n */\nbutton, input, select, textarea {\n  margin: 0;\n  /* 3 */\n  font-size: 100%;\n  /* 2 */\n  font-family: inherit;\n  /* 1 */\n  outline-offset: 0;\n  /* 4 */\n  outline-style: none;\n  /* 4 */\n  outline-width: 0;\n  /* 4 */\n  -webkit-font-smoothing: inherit;\n  /* 5 */ }\n\n/**\n * Address Firefox 4+ setting `line-height` on `input` using `importnt` in\n * the UA stylesheet.\n */\nbutton, input {\n  line-height: normal; }\n\n/**\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\n * All other form control elements do not inherit `text-transform` values.\n * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.\n * Correct `select` style inheritance in Firefox 4+ and Opera.\n */\nbutton, select {\n  text-transform: none; }\n\n/**\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n *  and `video` controls.\n * 2. Correct inability to style clickable `input` types in iOS.\n * 3. Improve usability and consistency of cursor style between image-type\n *  `input` and others.\n */\nbutton, html input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n  cursor: pointer;\n  /* 3 */\n  -webkit-appearance: button;\n  /* 2 */ }\n\n/**\n * Re-set default cursor for disabled elements.\n */\nbutton[disabled], html input[disabled] {\n  cursor: default; }\n\n/**\n * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.\n * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome\n *  (include `-moz` to future-proof).\n */\ninput[type=\"search\"] {\n  -webkit-box-sizing: content-box;\n  /* 2 */\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  -webkit-appearance: textfield;\n  /* 1 */ }\n\n/**\n * Remove inner padding and search cancel button in Safari 5 and Chrome\n * on OS X.\n */\ninput[type=\"search\"]::-webkit-search-cancel-button, input[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none; }\n\n/**\n * Remove inner padding and border in Firefox 4+.\n */\nbutton::-moz-focus-inner, input::-moz-focus-inner {\n  padding: 0;\n  border: 0; }\n\n/**\n * 1. Remove default vertical scrollbar in IE 8/9.\n * 2. Improve readability and alignment in all browsers.\n */\ntextarea {\n  overflow: auto;\n  /* 1 */\n  vertical-align: top;\n  /* 2 */ }\n\nimg {\n  -webkit-user-drag: none; }\n\n/* ==========================================================================\n   Tables\n   ========================================================================== */\n/**\n * Remove most spacing between table cells.\n */\ntable {\n  border-spacing: 0;\n  border-collapse: collapse; }\n\n/**\n * Scaffolding\n * --------------------------------------------------\n */\n*, *:before, *:after {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box; }\n\nbody, .ionic-body {\n  -webkit-touch-callout: none;\n  -webkit-font-smoothing: antialiased;\n  font-smoothing: antialiased;\n  -webkit-text-size-adjust: none;\n  -moz-text-size-adjust: none;\n  text-size-adjust: none;\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n  -webkit-tap-highlight-color: transparent;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  overflow: hidden;\n  margin: 0;\n  padding: 0;\n  color: #000;\n  word-wrap: break-word;\n  font-size: 14px;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;\n  line-height: 20px;\n  text-rendering: optimizeLegibility;\n  -webkit-backface-visibility: hidden;\n  -webkit-user-drag: none; }\n\nbody.grade-b, body.grade-c {\n  text-rendering: auto; }\n\n.content {\n  position: relative; }\n\n.scroll-content {\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  overflow: hidden;\n  margin-top: -1px;\n  width: auto;\n  height: auto; }\n\n.scroll-view {\n  position: relative;\n  overflow: hidden;\n  margin-top: -1px;\n  height: 100%; }\n\n/**\n * Scroll is the scroll view component available for complex and custom\n * scroll view functionality.\n */\n.scroll {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  -webkit-touch-callout: none;\n  -webkit-text-size-adjust: none;\n  -moz-text-size-adjust: none;\n  text-size-adjust: none;\n  -webkit-transform-origin: left top;\n  -moz-transform-origin: left top;\n  transform-origin: left top;\n  -webkit-backface-visibility: hidden; }\n\n.scroll-bar {\n  position: absolute;\n  z-index: 9999; }\n\n.ng-animate .scroll-bar {\n  visibility: hidden; }\n\n.scroll-bar-h {\n  right: 2px;\n  bottom: 3px;\n  left: 2px;\n  height: 3px; }\n  .scroll-bar-h .scroll-bar-indicator {\n    height: 100%; }\n\n.scroll-bar-v {\n  top: 2px;\n  right: 3px;\n  bottom: 2px;\n  width: 3px; }\n  .scroll-bar-v .scroll-bar-indicator {\n    width: 100%; }\n\n.scroll-bar-indicator {\n  position: absolute;\n  border-radius: 4px;\n  background: rgba(0, 0, 0, 0.3);\n  opacity: 1; }\n  .scroll-bar-indicator.scroll-bar-fade-out {\n    -webkit-transition: opacity 0.3s linear;\n    -moz-transition: opacity 0.3s linear;\n    transition: opacity 0.3s linear;\n    opacity: 0; }\n\n.grade-b .scroll-bar-indicator, .grade-c .scroll-bar-indicator {\n  border-radius: 0;\n  background: #aaa; }\n  .grade-b .scroll-bar-indicator.scroll-bar-fade-out, .grade-c .scroll-bar-indicator.scroll-bar-fade-out {\n    -webkit-transition: none;\n    -moz-transition: none;\n    transition: none; }\n\n.scroll-refresher {\n  position: absolute;\n  top: -60px;\n  right: 0;\n  left: 0;\n  overflow: hidden;\n  margin: auto;\n  height: 60px; }\n  .scroll-refresher .icon-refreshing {\n    -webkit-animation-duration: 1.5s;\n    -moz-animation-duration: 1.5s;\n    animation-duration: 1.5s;\n    display: none; }\n\n.scroll-refresher-content {\n  position: absolute;\n  bottom: 15px;\n  left: 0;\n  width: 100%;\n  color: #666666;\n  text-align: center;\n  font-size: 30px; }\n\n.ionic-refresher-content {\n  position: absolute;\n  bottom: 15px;\n  left: 0;\n  width: 100%;\n  color: #666666;\n  text-align: center;\n  font-size: 30px; }\n  .ionic-refresher-content .icon-pulling {\n    -webkit-animation-name: refresh-spin-back;\n    -moz-animation-name: refresh-spin-back;\n    animation-name: refresh-spin-back;\n    -webkit-animation-duration: 200ms;\n    -moz-animation-duration: 200ms;\n    animation-duration: 200ms;\n    -webkit-animation-timing-function: linear;\n    -moz-animation-timing-function: linear;\n    animation-timing-function: linear;\n    -webkit-animation-fill-mode: both;\n    -moz-animation-fill-mode: both;\n    animation-fill-mode: both; }\n\n@keyframes refresh-spin {\n  0% {\n    transform: rotate(0); }\n\n  100% {\n    transform: rotate(-180deg); } }\n\n@-webkit-keyframes refresh-spin {\n  0% {\n    -webkit-transform: rotate(0); }\n\n  100% {\n    -webkit-transform: rotate(-180deg); } }\n\n@keyframes refresh-spin-back {\n  0% {\n    transform: rotate(-180deg); }\n\n  100% {\n    transform: rotate(0); } }\n\n@-webkit-keyframes refresh-spin-back {\n  0% {\n    -webkit-transform: rotate(-180deg); }\n\n  100% {\n    -webkit-transform: rotate(0); } }\n\n.scroll-refresher.active .icon-pulling {\n  display: block; }\n.scroll-refresher.active .icon-refreshing {\n  display: none; }\n.scroll-refresher.active.refreshing .icon-pulling {\n  display: none; }\n.scroll-refresher.active.refreshing .icon-refreshing {\n  display: block; }\n.scroll-refresher.active .ionic-refresher-content i.icon.icon-pulling {\n  -webkit-animation-name: refresh-spin;\n  -moz-animation-name: refresh-spin;\n  animation-name: refresh-spin; }\n\nion-infinite-scroll .scroll-infinite {\n  position: relative;\n  overflow: hidden;\n  margin-top: -70px;\n  height: 60px; }\n\n.scroll-infinite-content {\n  position: absolute;\n  bottom: 15px;\n  left: 0;\n  width: 100%;\n  color: #666666;\n  text-align: center;\n  font-size: 30px; }\n\nion-infinite-scroll.active .scroll-infinite {\n  margin-top: -30px; }\n\n.overflow-scroll {\n  overflow-x: hidden;\n  overflow-y: scroll;\n  -webkit-overflow-scrolling: touch; }\n  .overflow-scroll .scroll {\n    position: static;\n    height: 100%; }\n\n.overflow-scroll {\n  overflow-x: hidden;\n  overflow-y: scroll;\n  -webkit-overflow-scrolling: touch; }\n  .overflow-scroll .scroll {\n    position: static;\n    height: 100%; }\n\n.has-header {\n  top: 44px; }\n\n.has-subheader {\n  top: 88px; }\n\n.has-tabs-top {\n  top: 93px; }\n\n.has-header.has-subheader.has-tabs-top {\n  top: 137px; }\n\n.has-footer {\n  bottom: 44px; }\n\n.has-tabs, .bar-footer.has-tabs {\n  bottom: 49px; }\n\n.has-footer.has-tabs {\n  bottom: 93px; }\n\n.pane {\n  -webkit-transform: translate3d(0, 0, 0);\n  -moz-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n  z-index: 1; }\n\n.view {\n  z-index: 1; }\n\n.pane, .view {\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: #fff; }\n\n/**\n * Typography\n * --------------------------------------------------\n */\np {\n  margin: 0 0 10px; }\n\nsmall {\n  font-size: 85%; }\n\ncite {\n  font-style: normal; }\n\n.text-left {\n  text-align: left; }\n\n.text-right {\n  text-align: right; }\n\n.text-center {\n  text-align: center; }\n\nh1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {\n  color: #000;\n  font-weight: 500;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;\n  line-height: 1.2; }\n  h1 small, h2 small, h3 small, h4 small, h5 small, h6 small, .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small {\n    font-weight: normal;\n    line-height: 1; }\n\nh1, .h1, h2, .h2, h3, .h3 {\n  margin-top: 20px;\n  margin-bottom: 10px; }\n  h1:first-child, .h1:first-child, h2:first-child, .h2:first-child, h3:first-child, .h3:first-child {\n    margin-top: 0; }\n  h1 + h1, h1 + .h1, h1 + h2, h1 + .h2, h1 + h3, h1 + .h3, .h1 + h1, .h1 + .h1, .h1 + h2, .h1 + .h2, .h1 + h3, .h1 + .h3, h2 + h1, h2 + .h1, h2 + h2, h2 + .h2, h2 + h3, h2 + .h3, .h2 + h1, .h2 + .h1, .h2 + h2, .h2 + .h2, .h2 + h3, .h2 + .h3, h3 + h1, h3 + .h1, h3 + h2, h3 + .h2, h3 + h3, h3 + .h3, .h3 + h1, .h3 + .h1, .h3 + h2, .h3 + .h2, .h3 + h3, .h3 + .h3 {\n    margin-top: 10px; }\n\nh4, .h4, h5, .h5, h6, .h6 {\n  margin-top: 10px;\n  margin-bottom: 10px; }\n\nh1, .h1 {\n  font-size: 36px; }\n\nh2, .h2 {\n  font-size: 30px; }\n\nh3, .h3 {\n  font-size: 24px; }\n\nh4, .h4 {\n  font-size: 18px; }\n\nh5, .h5 {\n  font-size: 14px; }\n\nh6, .h6 {\n  font-size: 12px; }\n\nh1 small, .h1 small {\n  font-size: 24px; }\n\nh2 small, .h2 small {\n  font-size: 18px; }\n\nh3 small, .h3 small, h4 small, .h4 small {\n  font-size: 14px; }\n\ndl {\n  margin-bottom: 20px; }\n\ndt, dd {\n  line-height: 1.42857; }\n\ndt {\n  font-weight: bold; }\n\nblockquote {\n  margin: 0 0 20px;\n  padding: 10px 20px;\n  border-left: 5px solid gray; }\n  blockquote p {\n    font-weight: 300;\n    font-size: 17.5px;\n    line-height: 1.25; }\n  blockquote p:last-child {\n    margin-bottom: 0; }\n  blockquote small {\n    display: block;\n    line-height: 1.42857; }\n    blockquote small:before {\n      content: '\\2014 \\00A0'; }\n\nq:before, q:after, blockquote:before, blockquote:after {\n  content: \"\"; }\n\naddress {\n  display: block;\n  margin-bottom: 20px;\n  font-style: normal;\n  line-height: 1.42857; }\n\na.subdued {\n  padding-right: 10px;\n  color: #888;\n  text-decoration: none; }\n  a.subdued:hover {\n    text-decoration: none; }\n  a.subdued:last-child {\n    padding-right: 0; }\n\n/**\n * Action Sheets\n * --------------------------------------------------\n */\n.action-sheet-backdrop {\n  -webkit-transition: background-color 300ms ease-in-out;\n  -moz-transition: background-color 300ms ease-in-out;\n  transition: background-color 300ms ease-in-out;\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: 11;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0); }\n  .action-sheet-backdrop.active {\n    background-color: rgba(0, 0, 0, 0.5); }\n\n.action-sheet-wrapper {\n  -webkit-transform: translate3d(0, 100%, 0);\n  -moz-transform: translate3d(0, 100%, 0);\n  transform: translate3d(0, 100%, 0);\n  -webkit-transition: all ease-in-out 300ms;\n  -moz-transition: all ease-in-out 300ms;\n  transition: all ease-in-out 300ms;\n  position: absolute;\n  bottom: 0;\n  width: 100%; }\n\n.action-sheet-up {\n  -webkit-transform: translate3d(0, 0, 0);\n  -moz-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0); }\n\n.action-sheet {\n  margin-left: 15px;\n  margin-right: 15px;\n  width: auto;\n  z-index: 11;\n  overflow: hidden; }\n  .action-sheet .button {\n    display: block;\n    padding: 1px;\n    width: 100%;\n    border-radius: 0;\n    background-color: transparent;\n    color: #4a87ee;\n    font-size: 18px; }\n    .action-sheet .button.destructive {\n      color: #ef4e3a; }\n\n.action-sheet-title {\n  padding: 10px;\n  color: #666666;\n  text-align: center;\n  font-size: 12px; }\n\n.action-sheet-group {\n  margin-bottom: 5px;\n  border-radius: 3px 3px 3px 3px;\n  background-color: #fff; }\n  .action-sheet-group .button {\n    border-width: 1px 0px 0px 0px;\n    border-radius: 0; }\n    .action-sheet-group .button.active {\n      background-color: transparent;\n      color: inherit; }\n  .action-sheet-group .button:first-child:last-child {\n    border-width: 0; }\n\n.action-sheet-open {\n  pointer-events: none; }\n  .action-sheet-open.modal-open .modal {\n    pointer-events: none; }\n  .action-sheet-open .action-sheet-backdrop {\n    pointer-events: auto; }\n\n/**\n * Bar (Headers and Footers)\n * --------------------------------------------------\n */\n.bar {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-transform: translate3d(0, 0, 0);\n  -moz-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  position: absolute;\n  right: 0;\n  left: 0;\n  z-index: 10;\n  box-sizing: border-box;\n  padding: 5px;\n  width: 100%;\n  height: 44px;\n  border-width: 0;\n  border-style: solid;\n  border-top: 1px solid transparent;\n  border-bottom: 1px solid #ddd;\n  background-color: white;\n  /* border-width: 1px will actually create 2 device pixels on retina */\n  /* this nifty trick sets an actual 1px border on hi-res displays */\n  background-size: 0; }\n  @media (min--moz-device-pixel-ratio: 1.5), (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi), (min-resolution: 1.5dppx) {\n    .bar {\n      border: none;\n      background-image: linear-gradient(0deg, #ddd, #ddd 50%, transparent 50%);\n      background-position: bottom;\n      background-size: 100% 1px;\n      background-repeat: no-repeat; } }\n  .bar.bar-clear {\n    border: none;\n    background: none;\n    color: #fff; }\n    .bar.bar-clear .button {\n      color: #fff; }\n    .bar.bar-clear .title {\n      color: #fff; }\n  .bar.item-input-inset .item-input-wrapper {\n    margin-top: -1px; }\n    .bar.item-input-inset .item-input-wrapper input {\n      padding-left: 8px;\n      height: 28px; }\n  .bar.bar-light {\n    border-color: #ddd;\n    background-color: white;\n    background-image: linear-gradient(0deg, #ddd, #ddd 50%, transparent 50%);\n    color: #444; }\n    .bar.bar-light .title {\n      color: #444; }\n  .bar.bar-stable {\n    border-color: #b2b2b2;\n    background-color: #f8f8f8;\n    background-image: linear-gradient(0deg, #b2b2b2, #b2b2b2 50%, transparent 50%);\n    color: #444; }\n    .bar.bar-stable .title {\n      color: #444; }\n  .bar.bar-positive {\n    border-color: #145fd7;\n    background-color: #4a87ee;\n    background-image: linear-gradient(0deg, #145fd7, #145fd7 50%, transparent 50%);\n    color: #fff; }\n    .bar.bar-positive .title {\n      color: #fff; }\n  .bar.bar-calm {\n    border-color: #1aacc3;\n    background-color: #43cee6;\n    background-image: linear-gradient(0deg, #1aacc3, #1aacc3 50%, transparent 50%);\n    color: #fff; }\n    .bar.bar-calm .title {\n      color: #fff; }\n  .bar.bar-assertive {\n    border-color: #cc2311;\n    background-color: #ef4e3a;\n    background-image: linear-gradient(0deg, #cc2311, #cc2311 50%, transparent 50%);\n    color: #fff; }\n    .bar.bar-assertive .title {\n      color: #fff; }\n  .bar.bar-balanced {\n    border-color: #498f24;\n    background-color: #66cc33;\n    background-image: linear-gradient(0deg, #498f24, #498f24 50%, transparent 50%);\n    color: #fff; }\n    .bar.bar-balanced .title {\n      color: #fff; }\n  .bar.bar-energized {\n    border-color: #d39211;\n    background-color: #f0b840;\n    background-image: linear-gradient(0deg, #d39211, #d39211 50%, transparent 50%);\n    color: #fff; }\n    .bar.bar-energized .title {\n      color: #fff; }\n  .bar.bar-royal {\n    border-color: #552bdf;\n    background-color: #8a6de9;\n    background-image: linear-gradient(0deg, #552bdf, #552bdf 50%, transparent 50%);\n    color: #fff; }\n    .bar.bar-royal .title {\n      color: #fff; }\n  .bar.bar-dark {\n    border-color: #111;\n    background-color: #444444;\n    background-image: linear-gradient(0deg, #111, #111 50%, transparent 50%);\n    color: #fff; }\n    .bar.bar-dark .title {\n      color: #fff; }\n  .bar .title {\n    position: absolute;\n    top: 0;\n    right: 0;\n    left: 0;\n    z-index: 0;\n    overflow: hidden;\n    margin: 0 10px;\n    min-width: 30px;\n    text-align: center;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    font-size: 17px;\n    line-height: 44px; }\n    .bar .title.title-left {\n      text-align: left; }\n    .bar .title.title-right {\n      text-align: right; }\n  .bar .title a {\n    color: inherit; }\n  .bar .button {\n    z-index: 1;\n    padding: 0 8px;\n    min-width: initial;\n    min-height: 31px;\n    font-size: 13px;\n    font-weight: 400;\n    line-height: 32px; }\n    .bar .button.button-icon:before, .bar .button .icon:before, .bar .button.icon:before, .bar .button.icon-left:before, .bar .button.icon-right:before {\n      padding-right: 2px;\n      padding-left: 2px;\n      font-size: 20px;\n      line-height: 32px; }\n    .bar .button.button-icon .icon:before, .bar .button.button-icon:before, .bar .button.button-icon.icon-left:before, .bar .button.button-icon.icon-right:before {\n      vertical-align: top;\n      font-size: 32px;\n      line-height: 32px; }\n    .bar .button.button-clear {\n      font-size: 17px;\n      font-weight: 300;\n      padding-right: 2px;\n      padding-left: 2px; }\n      .bar .button.button-clear .icon:before, .bar .button.button-clear.icon:before, .bar .button.button-clear.icon-left:before, .bar .button.button-clear.icon-right:before {\n        font-size: 32px;\n        line-height: 32px; }\n    .bar .button.back-button.active {\n      opacity: 1; }\n  .bar .button-bar > .button, .bar .buttons > .button {\n    min-height: 31px;\n    line-height: 32px; }\n  .bar .button-bar + .button, .bar .button + .button-bar {\n    margin-left: 5px; }\n  .bar .title + .button:last-child, .bar > .button + .button:last-child, .bar > .button.pull-right, .bar .buttons.pull-right, .bar .title + .buttons {\n    position: absolute;\n    top: 5px;\n    right: 5px;\n    bottom: 5px; }\n\n.bar-light .button {\n  border-color: #ddd;\n  background-color: white;\n  color: #444; }\n  .bar-light .button:hover {\n    color: #444;\n    text-decoration: none; }\n  .bar-light .button.active {\n    border-color: #ccc;\n    background-color: #fafafa;\n    box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n  .bar-light .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #444;\n    font-size: 17px; }\n  .bar-light .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-stable .button {\n  border-color: #b2b2b2;\n  background-color: #f8f8f8;\n  color: #444; }\n  .bar-stable .button:hover {\n    color: #444;\n    text-decoration: none; }\n  .bar-stable .button.active {\n    border-color: #a2a2a2;\n    background-color: #e5e5e5;\n    box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n  .bar-stable .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #444;\n    font-size: 17px; }\n  .bar-stable .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-positive .button {\n  border-color: #145fd7;\n  background-color: #4a87ee;\n  color: #fff; }\n  .bar-positive .button:hover {\n    color: #fff;\n    text-decoration: none; }\n  .bar-positive .button.active {\n    border-color: #145fd7;\n    background-color: #145fd7;\n    box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n  .bar-positive .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #fff;\n    font-size: 17px; }\n  .bar-positive .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-calm .button {\n  border-color: #1aacc3;\n  background-color: #43cee6;\n  color: #fff; }\n  .bar-calm .button:hover {\n    color: #fff;\n    text-decoration: none; }\n  .bar-calm .button.active {\n    border-color: #1aacc3;\n    background-color: #1aacc3;\n    box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n  .bar-calm .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #fff;\n    font-size: 17px; }\n  .bar-calm .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-assertive .button {\n  border-color: #cc2311;\n  background-color: #ef4e3a;\n  color: #fff; }\n  .bar-assertive .button:hover {\n    color: #fff;\n    text-decoration: none; }\n  .bar-assertive .button.active {\n    border-color: #cc2311;\n    background-color: #cc2311;\n    box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n  .bar-assertive .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #fff;\n    font-size: 17px; }\n  .bar-assertive .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-balanced .button {\n  border-color: #498f24;\n  background-color: #66cc33;\n  color: #fff; }\n  .bar-balanced .button:hover {\n    color: #fff;\n    text-decoration: none; }\n  .bar-balanced .button.active {\n    border-color: #498f24;\n    background-color: #498f24;\n    box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n  .bar-balanced .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #fff;\n    font-size: 17px; }\n  .bar-balanced .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-energized .button {\n  border-color: #d39211;\n  background-color: #f0b840;\n  color: #fff; }\n  .bar-energized .button:hover {\n    color: #fff;\n    text-decoration: none; }\n  .bar-energized .button.active {\n    border-color: #d39211;\n    background-color: #d39211;\n    box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n  .bar-energized .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #fff;\n    font-size: 17px; }\n  .bar-energized .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-royal .button {\n  border-color: #552bdf;\n  background-color: #8a6de9;\n  color: #fff; }\n  .bar-royal .button:hover {\n    color: #fff;\n    text-decoration: none; }\n  .bar-royal .button.active {\n    border-color: #552bdf;\n    background-color: #552bdf;\n    box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n  .bar-royal .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #fff;\n    font-size: 17px; }\n  .bar-royal .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-dark .button {\n  border-color: #111;\n  background-color: #444444;\n  color: #fff; }\n  .bar-dark .button:hover {\n    color: #fff;\n    text-decoration: none; }\n  .bar-dark .button.active {\n    border-color: #000;\n    background-color: #262626;\n    box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n  .bar-dark .button.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #fff;\n    font-size: 17px; }\n  .bar-dark .button.button-icon {\n    border-color: transparent;\n    background: none; }\n\n.bar-header {\n  top: 0;\n  border-top-width: 0;\n  border-bottom-width: 1px; }\n\n.bar-footer {\n  bottom: 0;\n  border-top-width: 1px;\n  border-bottom-width: 0;\n  background-position: top; }\n\n.bar-tabs {\n  padding: 0; }\n\n.bar-subheader {\n  top: 44px;\n  display: block; }\n\n.bar-subfooter {\n  bottom: 44px;\n  display: block; }\n\n/**\n * Tabs\n * --------------------------------------------------\n * A navigation bar with any number of tab items supported.\n */\n.tabs {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-direction: normal;\n  -webkit-box-orient: horizontal;\n  -webkit-flex-direction: horizontal;\n  -moz-flex-direction: horizontal;\n  -ms-flex-direction: horizontal;\n  flex-direction: horizontal;\n  -webkit-box-pack: center;\n  -ms-flex-pack: center;\n  -webkit-justify-content: center;\n  -moz-justify-content: center;\n  justify-content: center;\n  -webkit-transform: translate3d(0, 0, 0);\n  -moz-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n  border-color: #b2b2b2;\n  background-color: #f8f8f8;\n  background-image: linear-gradient(0deg, #b2b2b2, #b2b2b2 50%, transparent 50%);\n  color: #444;\n  position: absolute;\n  bottom: 0;\n  z-index: 5;\n  width: 100%;\n  height: 49px;\n  border-style: solid;\n  border-top-width: 1px;\n  background-size: 0;\n  line-height: 49px; }\n  .tabs .tab-item .badge {\n    background-color: #444;\n    color: #f8f8f8; }\n  @media (min--moz-device-pixel-ratio: 1.5), (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi), (min-resolution: 1.5dppx) {\n    .tabs {\n      padding-top: 2px;\n      border-top: none !important;\n      border-bottom: none !important;\n      background-position: top;\n      background-size: 100% 1px;\n      background-repeat: no-repeat; } }\n\n/* Allow parent element of tabs to define color, or just the tab itself */\n.tabs-light > .tabs, .tabs.tabs-light {\n  border-color: #ddd;\n  background-color: #fff;\n  background-image: linear-gradient(0deg, #ddd, #ddd 50%, transparent 50%);\n  color: #444; }\n  .tabs-light > .tabs .tab-item .badge, .tabs.tabs-light .tab-item .badge {\n    background-color: #444;\n    color: #fff; }\n\n.tabs-stable > .tabs, .tabs.tabs-stable {\n  border-color: #b2b2b2;\n  background-color: #f8f8f8;\n  background-image: linear-gradient(0deg, #b2b2b2, #b2b2b2 50%, transparent 50%);\n  color: #444; }\n  .tabs-stable > .tabs .tab-item .badge, .tabs.tabs-stable .tab-item .badge {\n    background-color: #444;\n    color: #f8f8f8; }\n\n.tabs-positive > .tabs, .tabs.tabs-positive {\n  border-color: #145fd7;\n  background-color: #4a87ee;\n  background-image: linear-gradient(0deg, #145fd7, #145fd7 50%, transparent 50%);\n  color: #fff; }\n  .tabs-positive > .tabs .tab-item .badge, .tabs.tabs-positive .tab-item .badge {\n    background-color: #fff;\n    color: #4a87ee; }\n\n.tabs-calm > .tabs, .tabs.tabs-calm {\n  border-color: #1aacc3;\n  background-color: #43cee6;\n  background-image: linear-gradient(0deg, #1aacc3, #1aacc3 50%, transparent 50%);\n  color: #fff; }\n  .tabs-calm > .tabs .tab-item .badge, .tabs.tabs-calm .tab-item .badge {\n    background-color: #fff;\n    color: #43cee6; }\n\n.tabs-assertive > .tabs, .tabs.tabs-assertive {\n  border-color: #cc2311;\n  background-color: #ef4e3a;\n  background-image: linear-gradient(0deg, #cc2311, #cc2311 50%, transparent 50%);\n  color: #fff; }\n  .tabs-assertive > .tabs .tab-item .badge, .tabs.tabs-assertive .tab-item .badge {\n    background-color: #fff;\n    color: #ef4e3a; }\n\n.tabs-balanced > .tabs, .tabs.tabs-balanced {\n  border-color: #498f24;\n  background-color: #66cc33;\n  background-image: linear-gradient(0deg, #498f24, #498f24 50%, transparent 50%);\n  color: #fff; }\n  .tabs-balanced > .tabs .tab-item .badge, .tabs.tabs-balanced .tab-item .badge {\n    background-color: #fff;\n    color: #66cc33; }\n\n.tabs-energized > .tabs, .tabs.tabs-energized {\n  border-color: #d39211;\n  background-color: #f0b840;\n  background-image: linear-gradient(0deg, #d39211, #d39211 50%, transparent 50%);\n  color: #fff; }\n  .tabs-energized > .tabs .tab-item .badge, .tabs.tabs-energized .tab-item .badge {\n    background-color: #fff;\n    color: #f0b840; }\n\n.tabs-royal > .tabs, .tabs.tabs-royal {\n  border-color: #552bdf;\n  background-color: #8a6de9;\n  background-image: linear-gradient(0deg, #552bdf, #552bdf 50%, transparent 50%);\n  color: #fff; }\n  .tabs-royal > .tabs .tab-item .badge, .tabs.tabs-royal .tab-item .badge {\n    background-color: #fff;\n    color: #8a6de9; }\n\n.tabs-dark > .tabs, .tabs.tabs-dark {\n  border-color: #111;\n  background-color: #444;\n  background-image: linear-gradient(0deg, #111, #111 50%, transparent 50%);\n  color: #fff; }\n  .tabs-dark > .tabs .tab-item .badge, .tabs.tabs-dark .tab-item .badge {\n    background-color: #fff;\n    color: #444; }\n\n/* Allow parent element to have tabs-top */\n.tabs-top > .tabs, .tabs.tabs-top {\n  top: 44px;\n  padding-top: 0;\n  padding-bottom: 2px;\n  background-position: bottom; }\n\n.tab-item {\n  -webkit-box-flex: 1;\n  -webkit-flex: 1;\n  -moz-box-flex: 1;\n  -moz-flex: 1;\n  -ms-flex: 1;\n  flex: 1;\n  display: block;\n  overflow: hidden;\n  max-width: 150px;\n  height: 100%;\n  color: inherit;\n  text-align: center;\n  text-decoration: none;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  font-weight: 400;\n  font-size: 14px;\n  font-family: \"Helvetica Neue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;\n  opacity: 0.7; }\n  .tab-item:hover {\n    cursor: pointer; }\n\n.tabs-item-hide, .tabs-item-hide > .tabs {\n  display: none; }\n\n.tabs-icon-top .tab-item, .tabs-icon-bottom .tab-item {\n  font-size: 12px;\n  line-height: 14px; }\n\n.tab-item .icon {\n  display: block;\n  margin: 0 auto;\n  height: 32px;\n  font-size: 32px; }\n\n.tabs-icon-left .tab-item, .tabs-icon-right .tab-item {\n  font-size: 12px; }\n  .tabs-icon-left .tab-item .icon, .tabs-icon-right .tab-item .icon {\n    display: inline-block;\n    vertical-align: top; }\n    .tabs-icon-left .tab-item .icon:before, .tabs-icon-right .tab-item .icon:before {\n      font-size: 24px;\n      line-height: 49px; }\n\n.tabs-icon-left .tab-item .icon {\n  padding-right: 3px; }\n\n.tabs-icon-right .tab-item .icon {\n  padding-left: 3px; }\n\n.tabs-icon-only .icon {\n  line-height: inherit; }\n\n.tab-item.has-badge {\n  position: relative; }\n\n.tab-item .badge {\n  position: absolute;\n  padding: 1px 6px;\n  top: 4%;\n  right: 33%;\n  right: calc(50% - 26px);\n  font-size: 12px;\n  height: auto;\n  line-height: 16px; }\n\n/* Navigational tab */\n/* Active state for tab */\n.tab-item.tab-item-active {\n  opacity: 1; }\n  .tab-item.tab-item-active.tab-item-light {\n    color: #fff; }\n  .tab-item.tab-item-active.tab-item-stable {\n    color: #f8f8f8; }\n  .tab-item.tab-item-active.tab-item-positive {\n    color: #4a87ee; }\n  .tab-item.tab-item-active.tab-item-calm {\n    color: #43cee6; }\n  .tab-item.tab-item-active.tab-item-assertive {\n    color: #ef4e3a; }\n  .tab-item.tab-item-active.tab-item-balanced {\n    color: #66cc33; }\n  .tab-item.tab-item-active.tab-item-energized {\n    color: #f0b840; }\n  .tab-item.tab-item-active.tab-item-royal {\n    color: #8a6de9; }\n  .tab-item.tab-item-active.tab-item-dark {\n    color: #444; }\n\n.item.tabs {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  padding: 0; }\n  .item.tabs .icon:before {\n    position: relative; }\n\n/**\n * Menus\n * --------------------------------------------------\n * Side panel structure\n */\n.menu {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  z-index: 0;\n  overflow: hidden;\n  min-height: 100%;\n  max-height: 100%;\n  width: 275px;\n  background-color: #fff; }\n\n.menu-content {\n  -webkit-transform: none;\n  -moz-transform: none;\n  transform: none;\n  box-shadow: -1px 0px 2px rgba(0, 0, 0, 0.2), 1px 0px 2px rgba(0, 0, 0, 0.2); }\n\n.grade-b .menu-content, .grade-c .menu-content {\n  -webkit-box-sizing: content-box;\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  right: -1px;\n  left: -1px;\n  border-right: 1px solid #ccc;\n  border-left: 1px solid #ccc;\n  box-shadow: none; }\n\n.menu-left {\n  left: 0; }\n\n.menu-right {\n  right: 0; }\n\n.menu-animated {\n  -webkit-transition: -webkit-transform 200ms ease;\n  -moz-transition: -moz-transform 200ms ease;\n  transition: transform 200ms ease; }\n\n/**\n * Modals\n * --------------------------------------------------\n * Modals are independent windows that slide in from off-screen.\n */\n.modal-backdrop {\n  -webkit-transition: background-color 300ms ease-in-out;\n  -moz-transition: background-color 300ms ease-in-out;\n  transition: background-color 300ms ease-in-out;\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: 10;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0); }\n  .modal-backdrop.active {\n    background-color: rgba(0, 0, 0, 0.5); }\n\n.modal {\n  position: absolute;\n  top: 0;\n  z-index: 10;\n  overflow: hidden;\n  min-height: 100%;\n  width: 100%;\n  background-color: #fff; }\n\n@media (min-width: 680px) {\n  .modal {\n    top: 20%;\n    right: 20%;\n    bottom: 20%;\n    left: 20%;\n    overflow: visible;\n    min-height: 240px;\n    width: 60%; }\n  .modal.ng-leave-active {\n    bottom: 0; } }\n\n.modal-open {\n  pointer-events: none; }\n  .modal-open .modal {\n    pointer-events: auto; }\n\n/**\n * Popups\n * --------------------------------------------------\n */\n.popup {\n  position: fixed;\n  top: 50%;\n  left: 50%;\n  z-index: 11;\n  visibility: hidden;\n  width: 250px;\n  border-radius: 0px;\n  background-color: rgba(255, 255, 255, 0.9); }\n  .popup.popup-hidden {\n    -webkit-animation-name: scaleOut;\n    -moz-animation-name: scaleOut;\n    animation-name: scaleOut;\n    -webkit-animation-duration: 0.1s;\n    -moz-animation-duration: 0.1s;\n    animation-duration: 0.1s;\n    -webkit-animation-timing-function: ease-in-out;\n    -moz-animation-timing-function: ease-in-out;\n    animation-timing-function: ease-in-out;\n    -webkit-animation-fill-mode: both;\n    -moz-animation-fill-mode: both;\n    animation-fill-mode: both; }\n  .popup.popup-showing {\n    visibility: visible; }\n  .popup.active {\n    -webkit-animation-name: superScaleIn;\n    -moz-animation-name: superScaleIn;\n    animation-name: superScaleIn;\n    -webkit-animation-duration: 0.2s;\n    -moz-animation-duration: 0.2s;\n    animation-duration: 0.2s;\n    -webkit-animation-timing-function: ease-in-out;\n    -moz-animation-timing-function: ease-in-out;\n    animation-timing-function: ease-in-out;\n    -webkit-animation-fill-mode: both;\n    -moz-animation-fill-mode: both;\n    animation-fill-mode: both; }\n\n.popup-head {\n  padding: 15px 0px;\n  border-bottom: 1px solid #eee;\n  text-align: center; }\n\n.popup-title {\n  margin: 0;\n  padding: 0;\n  font-size: 15px; }\n\n.popup-sub-title {\n  margin: 5px 0 0 0;\n  padding: 0;\n  font-weight: normal;\n  font-size: 11px; }\n\n.popup-body {\n  padding: 10px; }\n\n.popup-buttons.row {\n  padding: 10px 10px; }\n.popup-buttons .button {\n  margin: 0px 5px;\n  min-height: 45px;\n  border-radius: 2px;\n  line-height: 20px; }\n  .popup-buttons .button:first-child {\n    margin-left: 0px; }\n  .popup-buttons .button:last-child {\n    margin-right: 0px; }\n\n.popup-open {\n  pointer-events: none; }\n  .popup-open.modal-open .modal {\n    pointer-events: none; }\n  .popup-open .popup-backdrop, .popup-open .popup {\n    pointer-events: auto; }\n\n.popup-backdrop {\n  -webkit-animation-name: fadeIn;\n  -moz-animation-name: fadeIn;\n  animation-name: fadeIn;\n  -webkit-animation-duration: 0.1s;\n  -moz-animation-duration: 0.1s;\n  animation-duration: 0.1s;\n  -webkit-animation-timing-function: linear;\n  -moz-animation-timing-function: linear;\n  animation-timing-function: linear;\n  -webkit-animation-fill-mode: both;\n  -moz-animation-fill-mode: both;\n  animation-fill-mode: both;\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: 10;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.4); }\n\n.loading-backdrop {\n  -webkit-transition: visibility 0s linear 0.3s;\n  -moz-transition: visibility 0s linear 0.3s;\n  transition: visibility 0s linear 0.3s;\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: 10;\n  visibility: hidden;\n  width: 100%;\n  height: 100%; }\n  .loading-backdrop.active {\n    -webkit-transition-delay: 0s;\n    -moz-transition-delay: 0s;\n    transition-delay: 0s;\n    visibility: visible; }\n    .loading-backdrop.active.show-backdrop {\n      background-color: rgba(0, 0, 0, 0.7); }\n\n.loading {\n  position: fixed;\n  top: 50%;\n  left: 50%;\n  padding: 20px;\n  border-radius: 5px;\n  background-color: rgba(0, 0, 0, 0.7);\n  color: #fff;\n  text-align: center;\n  text-overflow: ellipsis;\n  font-size: 15px; }\n  .loading h1, .loading h2, .loading h3, .loading h4, .loading h5, .loading h6 {\n    color: #fff; }\n\n/**\n * Items\n * --------------------------------------------------\n */\n.item {\n  border-color: #ddd;\n  background-color: #fff;\n  color: #444;\n  position: relative;\n  z-index: 2;\n  display: block;\n  margin: -1px;\n  padding: 15px;\n  border-width: 1px;\n  border-style: solid;\n  font-size: 16px; }\n  .item h2 {\n    margin: 0 0 4px 0;\n    font-size: 16px; }\n  .item h3 {\n    margin: 0 0 4px 0;\n    font-size: 14px; }\n  .item h4 {\n    margin: 0 0 4px 0;\n    font-size: 12px; }\n  .item h5, .item h6 {\n    margin: 0 0 3px 0;\n    font-size: 10px; }\n  .item p {\n    color: #666;\n    font-size: 14px; }\n  .item h1:last-child, .item h2:last-child, .item h3:last-child, .item h4:last-child, .item h5:last-child, .item h6:last-child, .item p:last-child {\n    margin-bottom: 0; }\n  .item .badge {\n    display: -webkit-box;\n    display: -webkit-flex;\n    display: -moz-box;\n    display: -moz-flex;\n    display: -ms-flexbox;\n    display: flex;\n    position: absolute;\n    top: 15px;\n    right: 35px; }\n  .item.item-button-right .badge {\n    right: 65px; }\n  .item.item-divider .badge {\n    top: 7.5px; }\n  .item .badge + .badge {\n    margin-right: 5px; }\n  .item.item-light {\n    border-color: #ddd;\n    background-color: #fff;\n    color: #444; }\n  .item.item-stable {\n    border-color: #b2b2b2;\n    background-color: #f8f8f8;\n    color: #444; }\n  .item.item-positive {\n    border-color: #145fd7;\n    background-color: #4a87ee;\n    color: #fff; }\n  .item.item-calm {\n    border-color: #1aacc3;\n    background-color: #43cee6;\n    color: #fff; }\n  .item.item-assertive {\n    border-color: #cc2311;\n    background-color: #ef4e3a;\n    color: #fff; }\n  .item.item-balanced {\n    border-color: #498f24;\n    background-color: #66cc33;\n    color: #fff; }\n  .item.item-energized {\n    border-color: #d39211;\n    background-color: #f0b840;\n    color: #fff; }\n  .item.item-royal {\n    border-color: #552bdf;\n    background-color: #8a6de9;\n    color: #fff; }\n  .item.item-dark {\n    border-color: #111;\n    background-color: #444;\n    color: #fff; }\n  .item[ng-click]:hover {\n    cursor: pointer; }\n\n.item.active:not(.item-divider):not(.item-input):not(.item-input-inset), .item-complex.active .item-content {\n  border-color: #ccc;\n  background-color: #D9D9D9; }\n  .item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-light, .item-complex.active .item-content.item-light {\n    border-color: #ccc;\n    background-color: #fafafa; }\n  .item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-stable, .item-complex.active .item-content.item-stable {\n    border-color: #a2a2a2;\n    background-color: #e5e5e5; }\n  .item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-positive, .item-complex.active .item-content.item-positive {\n    border-color: #145fd7;\n    background-color: #145fd7; }\n  .item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-calm, .item-complex.active .item-content.item-calm {\n    border-color: #1aacc3;\n    background-color: #1aacc3; }\n  .item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-assertive, .item-complex.active .item-content.item-assertive {\n    border-color: #cc2311;\n    background-color: #cc2311; }\n  .item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-balanced, .item-complex.active .item-content.item-balanced {\n    border-color: #498f24;\n    background-color: #498f24; }\n  .item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-energized, .item-complex.active .item-content.item-energized {\n    border-color: #d39211;\n    background-color: #d39211; }\n  .item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-royal, .item-complex.active .item-content.item-royal {\n    border-color: #552bdf;\n    background-color: #552bdf; }\n  .item.active:not(.item-divider):not(.item-input):not(.item-input-inset).item-dark, .item-complex.active .item-content.item-dark {\n    border-color: #000;\n    background-color: #262626; }\n\n.item, .item h1, .item h2, .item h3, .item h4, .item h5, .item h6, .item p, .item-content, .item-content h1, .item-content h2, .item-content h3, .item-content h4, .item-content h5, .item-content h6, .item-content p {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap; }\n\na.item {\n  color: inherit;\n  text-decoration: none; }\n  a.item:hover, a.item:focus {\n    text-decoration: none; }\n\n/**\n * Complex Items\n * --------------------------------------------------\n * Adding .item-complex allows the .item to be slidable and\n * have options underneath the button, but also requires an\n * additional .item-content element inside .item.\n * Basically .item-complex removes any default settings which\n * .item added, so that .item-content looks them as just .item.\n */\n.item-complex, a.item.item-complex, button.item.item-complex {\n  padding: 0; }\n\n.item-complex .item-content, .item-radio .item-content {\n  position: relative;\n  z-index: 2;\n  padding: 15px 40px 15px 15px;\n  border: none;\n  background-color: white; }\n\na.item-content {\n  display: block;\n  color: inherit;\n  text-decoration: none; }\n\n.item-text-wrap .item, .item-text-wrap, .item-text-wrap h1, .item-text-wrap h2, .item-text-wrap h3, .item-text-wrap h4, .item-text-wrap h5, .item-text-wrap h6, .item-text-wrap p, .item-complex.item-text-wrap .item-content, .item-body h1, .item-body h2, .item-body h3, .item-body h4, .item-body h5, .item-body h6, .item-body p {\n  overflow: hidden;\n  white-space: normal; }\n\n.item-complex.item-text-wrap, .item-complex.item-text-wrap h1, .item-complex.item-text-wrap h2, .item-complex.item-text-wrap h3, .item-complex.item-text-wrap h4, .item-complex.item-text-wrap h5, .item-complex.item-text-wrap h6, .item-complex.item-text-wrap p {\n  overflow: hidden;\n  white-space: nowrap; }\n\n/**\n * Item Icons\n * --------------------------------------------------\n */\n.item-icon-left .icon, .item-icon-right .icon {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  position: absolute;\n  top: 0;\n  height: 100%;\n  font-size: 32px; }\n  .item-icon-left .icon:before, .item-icon-right .icon:before {\n    display: block;\n    width: 32px;\n    text-align: center; }\n\n.item .fill-icon {\n  min-width: 30px;\n  min-height: 30px;\n  font-size: 28px; }\n\n.item-icon-left {\n  padding-left: 45px; }\n  .item-icon-left .icon {\n    left: 7.5px; }\n\n.item-complex.item-icon-left {\n  padding-left: 0; }\n  .item-complex.item-icon-left .item-content {\n    padding-left: 45px; }\n\n.item-icon-right {\n  padding-right: 45px; }\n  .item-icon-right .icon {\n    right: 7.5px; }\n\n.item-complex.item-icon-right {\n  padding-right: 0; }\n  .item-complex.item-icon-right .item-content {\n    padding-right: 45px; }\n\n.item-icon-left.item-icon-right .icon:first-child {\n  right: auto; }\n\n.item-icon-left.item-icon-right .icon:last-child {\n  left: auto; }\n\n/**\n * Item Button\n * --------------------------------------------------\n * An item button is a child button inside an .item (not the entire .item)\n */\n.item-button-left {\n  padding-left: 67.5px; }\n\n.item-button-left > .button, .item-button-left .item-content > .button {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  position: absolute;\n  top: 7.5px;\n  left: 7.5px;\n  min-width: 34px;\n  min-height: 34px;\n  font-size: 18px;\n  line-height: 32px; }\n  .item-button-left > .button .icon:before, .item-button-left .item-content > .button .icon:before {\n    position: relative;\n    left: auto;\n    width: auto;\n    line-height: 31px; }\n  .item-button-left > .button > .button, .item-button-left .item-content > .button > .button {\n    margin: 0px 2px;\n    min-height: 34px;\n    font-size: 18px;\n    line-height: 32px; }\n\n.item-button-right, a.item.item-button-right, button.item.item-button-right {\n  padding-right: 75px; }\n\n.item-button-right > .button, .item-button-right .item-content > .button, .item-button-right > .buttons, .item-button-right .item-content > .buttons {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  position: absolute;\n  top: 7.5px;\n  right: 15px;\n  min-width: 34px;\n  min-height: 34px;\n  font-size: 18px;\n  line-height: 32px; }\n  .item-button-right > .button .icon:before, .item-button-right .item-content > .button .icon:before, .item-button-right > .buttons .icon:before, .item-button-right .item-content > .buttons .icon:before {\n    position: relative;\n    left: auto;\n    width: auto;\n    line-height: 31px; }\n  .item-button-right > .button > .button, .item-button-right .item-content > .button > .button, .item-button-right > .buttons > .button, .item-button-right .item-content > .buttons > .button {\n    margin: 0px 2px;\n    min-width: 34px;\n    min-height: 34px;\n    font-size: 18px;\n    line-height: 32px; }\n\n/**\n * Auto Right Arrow Icon\n * --------------------------------------------------\n * By default, if an .item is created out of an <a> or <button>\n * then a arrow will be added to the right side of the item.\n */\na.item, button.item, .item[href] .item-content, .item[ng-click] .item-content {\n  padding-right: 40px; }\n  a.item:after, button.item:after, .item[href] .item-content:after, .item[ng-click] .item-content:after {\n    display: -webkit-box;\n    display: -webkit-flex;\n    display: -moz-box;\n    display: -moz-flex;\n    display: -ms-flexbox;\n    display: flex;\n    -webkit-box-align: center;\n    -ms-flex-align: center;\n    -webkit-align-items: center;\n    -moz-align-items: center;\n    align-items: center;\n    -webkit-font-smoothing: antialiased;\n    font-smoothing: antialiased;\n    position: absolute;\n    top: 0;\n    right: 11px;\n    height: 100%;\n    color: #ccc;\n    content: \"\\f125\";\n    text-transform: none;\n    font-weight: normal;\n    font-style: normal;\n    font-variant: normal;\n    font-size: 16px;\n    font-family: 'Ionicons';\n    line-height: 1;\n    speak: none; }\n\n.grade-b a.item:after, .grade-b button.item:after, .grade-b .item[href] .item-content:after, .grade-b .item[ng-click] .item-content:after, .grade-c a.item:after, .grade-c button.item:after, .grade-c .item[href] .item-content:after, .grade-c .item[ng-click] .item-content:after {\n  -webkit-font-smoothing: none;\n  font-smoothing: none;\n  content: '>';\n  font-family: 'monospace'; }\n\na.item-icon-right:after, button.item-icon-right:after, a.item-button-right:after, button.item-button-right:after, .item a.item-content:after {\n  display: none; }\n\n.item-avatar, .item-avatar .item-content {\n  padding-left: 70px;\n  min-height: 70px; }\n  .item-avatar > img:first-child, .item-avatar .item-image, .item-avatar .item-content > img:first-child, .item-avatar .item-content .item-image {\n    position: absolute;\n    top: 15px;\n    left: 15px;\n    max-width: 40px;\n    max-height: 40px;\n    width: 100%;\n    border-radius: 4px; }\n\n.item-thumbnail-left, .item-thumbnail-left .item-content {\n  padding-left: 105px;\n  min-height: 100px; }\n  .item-thumbnail-left > img:first-child, .item-thumbnail-left .item-image, .item-thumbnail-left .item-content > img:first-child, .item-thumbnail-left .item-content .item-image {\n    position: absolute;\n    top: 10px;\n    left: 10px;\n    max-width: 80px;\n    max-height: 80px;\n    width: 100%; }\n\n.item-avatar.item-complex, .item-thumbnail-left.item-complex {\n  padding-left: 0; }\n\n.item-thumbnail-right, .item-thumbnail-right .item-content {\n  padding-right: 105px;\n  min-height: 100px; }\n  .item-thumbnail-right > img:first-child, .item-thumbnail-right .item-image, .item-thumbnail-right .item-content > img:first-child, .item-thumbnail-right .item-content .item-image {\n    position: absolute;\n    top: 10px;\n    right: 10px;\n    max-width: 80px;\n    max-height: 80px;\n    width: 100%; }\n\n.item-thumbnail-right.item-complex {\n  padding-right: 0; }\n\n.item-image {\n  padding: 0;\n  text-align: center; }\n  .item-image img:first-child, .item-image .list-img {\n    width: 100%;\n    vertical-align: middle; }\n\n.item-body {\n  overflow: auto;\n  padding: 15px;\n  text-overflow: inherit;\n  white-space: normal; }\n  .item-body h1, .item-body h2, .item-body h3, .item-body h4, .item-body h5, .item-body h6, .item-body p {\n    margin-top: 15px;\n    margin-bottom: 15px; }\n\n.item-divider {\n  padding-top: 7.5px;\n  padding-bottom: 7.5px;\n  min-height: 30px;\n  background-color: #f5f5f5;\n  color: #222;\n  font-weight: bold; }\n\n.item-note {\n  float: right;\n  color: #aaa;\n  font-size: 14px; }\n\n.item-left-editable .item-content, .item-right-editable .item-content {\n  -webkit-transition-duration: 250ms;\n  -moz-transition-duration: 250ms;\n  transition-duration: 250ms;\n  -webkit-transition-timing-function: ease-in-out;\n  -moz-transition-timing-function: ease-in-out;\n  transition-timing-function: ease-in-out;\n  -webkit-transition-property: none;\n  -moz-transition-property: none;\n  transition-property: none; }\n\n.item-left-editable .item-content {\n  -webkit-transition-property: -webkit-transform;\n  -moz-transition-property: -moz-transform;\n  transition-property: transform; }\n\n.item-right-editable .item-content {\n  -webkit-transition-property: margin-right;\n  -moz-transition-property: margin-right;\n  transition-property: margin-right; }\n\n.item-left-editable.item-right-editable .item-content {\n  -webkit-transition-property: -webkit-transform, margin-right;\n  -moz-transition-property: -moz-transform, margin-right;\n  transition-property: transform, margin-right; }\n\n.list-left-editing .item-left-editable .item-content, .item-left-editing.item-left-editable .item-content {\n  -webkit-transform: translate3d(50px, 0, 0);\n  -moz-transform: translate3d(50px, 0, 0);\n  transform: translate3d(50px, 0, 0); }\n\n.list-right-editing .item-right-editable .item-content, .item-right-editing.item-right-editable .item-content {\n  margin-right: 50px; }\n\n.item-left-edit {\n  -webkit-transition: all ease-in-out 250ms;\n  -moz-transition: all ease-in-out 250ms;\n  transition: all ease-in-out 250ms;\n  -webkit-transform: translate3d(-42px, 0, 0);\n  -moz-transform: translate3d(-42px, 0, 0);\n  transform: translate3d(-42px, 0, 0);\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 0;\n  width: 50px;\n  height: 100%;\n  line-height: 100%;\n  opacity: 0; }\n  .item-left-edit .button {\n    height: 100%; }\n    .item-left-edit .button.icon {\n      display: -webkit-box;\n      display: -webkit-flex;\n      display: -moz-box;\n      display: -moz-flex;\n      display: -ms-flexbox;\n      display: flex;\n      -webkit-box-align: center;\n      -ms-flex-align: center;\n      -webkit-align-items: center;\n      -moz-align-items: center;\n      align-items: center;\n      position: absolute;\n      top: 0;\n      height: 100%; }\n\n.list-left-editing .item-left-edit, .item-left-editing .item-left-edit {\n  -webkit-transform: translate3d(8px, 0, 0);\n  -moz-transform: translate3d(8px, 0, 0);\n  transform: translate3d(8px, 0, 0);\n  opacity: 1; }\n\n.item-delete .button.icon {\n  color: #ef4e3a;\n  font-size: 24px; }\n  .item-delete .button.icon:hover {\n    opacity: 0.7; }\n\n.item-right-edit {\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 0;\n  width: 50px;\n  height: 100%;\n  background: inherit; }\n  .item-right-edit .button {\n    min-width: 50px;\n    height: 100%; }\n    .item-right-edit .button.icon {\n      display: -webkit-box;\n      display: -webkit-flex;\n      display: -moz-box;\n      display: -moz-flex;\n      display: -ms-flexbox;\n      display: flex;\n      -webkit-box-align: center;\n      -ms-flex-align: center;\n      -webkit-align-items: center;\n      -moz-align-items: center;\n      align-items: center;\n      position: absolute;\n      top: 0;\n      height: 100%;\n      font-size: 32px; }\n\n.item-reorder .button.icon {\n  color: #444;\n  font-size: 32px; }\n\n.item-reordering {\n  position: absolute;\n  z-index: 9;\n  width: 100%;\n  box-shadow: 0px 0px 10px 0px #aaa; }\n  .item-reordering .item-reorder {\n    z-index: 1; }\n\n.item-placeholder {\n  opacity: 0.7; }\n\n/**\n * The hidden right-side buttons that can be exposed under a list item\n * with dragging.\n */\n.item-options {\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 1;\n  height: 100%; }\n  .item-options .button {\n    height: 100%;\n    border: none;\n    border-radius: 0; }\n\n.item-options-hide .item-options {\n  display: none; }\n\n/**\n * Lists\n * --------------------------------------------------\n */\n.list {\n  position: relative;\n  padding-top: 1px;\n  padding-bottom: 1px;\n  padding-left: 0;\n  margin-bottom: 20px; }\n\n.list:last-child {\n  margin-bottom: 0px; }\n\n/**\n * List Header\n * --------------------------------------------------\n */\n.list-header {\n  margin-top: 20px;\n  padding: 5px 15px;\n  background-color: transparent;\n  color: #222;\n  font-weight: bold; }\n\n.card.list .list-item {\n  padding-right: 1px;\n  padding-left: 1px; }\n\n/**\n * Cards and Inset Lists\n * --------------------------------------------------\n * A card and list-inset are close to the same thing, except a card as a box shadow.\n */\n.card, .list-inset {\n  overflow: hidden;\n  margin: 20px 10px;\n  border-radius: 2px;\n  background-color: #fff; }\n\n.card {\n  padding-top: 1px;\n  padding-bottom: 1px;\n  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); }\n\n.card .item:first-child, .list-inset .item:first-child, .padding > .list .item:first-child {\n  border-top-left-radius: 2px;\n  border-top-right-radius: 2px; }\n  .card .item:first-child .item-content, .list-inset .item:first-child .item-content, .padding > .list .item:first-child .item-content {\n    border-top-left-radius: 2px;\n    border-top-right-radius: 2px; }\n.card .item:last-child, .list-inset .item:last-child, .padding > .list .item:last-child {\n  border-bottom-right-radius: 2px;\n  border-bottom-left-radius: 2px; }\n  .card .item:last-child .item-content, .list-inset .item:last-child .item-content, .padding > .list .item:last-child .item-content {\n    border-bottom-right-radius: 2px;\n    border-bottom-left-radius: 2px; }\n\n.card .item:last-child, .list-inset .item:last-child {\n  margin-bottom: -1px; }\n\n.card .item, .list-inset .item, .padding > .list .item, .padding-horizontal > .list .item {\n  margin-right: 0;\n  margin-left: 0; }\n\n.padding-left > .list .item {\n  margin-left: 0; }\n\n.padding-right > .list .item {\n  margin-right: 0; }\n\n/**\n * Badges\n * --------------------------------------------------\n */\n.badge {\n  background-color: transparent;\n  color: #AAAAAA;\n  z-index: 1;\n  display: inline-block;\n  padding: 3px 8px;\n  min-width: 10px;\n  border-radius: 10px;\n  vertical-align: baseline;\n  text-align: center;\n  white-space: nowrap;\n  font-weight: bold;\n  font-size: 14px;\n  line-height: 16px; }\n  .badge:empty {\n    display: none; }\n\n.tabs .tab-item .badge.badge-light, .badge.badge-light {\n  background-color: #fff;\n  color: #444; }\n.tabs .tab-item .badge.badge-stable, .badge.badge-stable {\n  background-color: #f8f8f8;\n  color: #444; }\n.tabs .tab-item .badge.badge-positive, .badge.badge-positive {\n  background-color: #4a87ee;\n  color: #fff; }\n.tabs .tab-item .badge.badge-calm, .badge.badge-calm {\n  background-color: #43cee6;\n  color: #fff; }\n.tabs .tab-item .badge.badge-assertive, .badge.badge-assertive {\n  background-color: #ef4e3a;\n  color: #fff; }\n.tabs .tab-item .badge.badge-balanced, .badge.badge-balanced {\n  background-color: #66cc33;\n  color: #fff; }\n.tabs .tab-item .badge.badge-energized, .badge.badge-energized {\n  background-color: #f0b840;\n  color: #fff; }\n.tabs .tab-item .badge.badge-royal, .badge.badge-royal {\n  background-color: #8a6de9;\n  color: #fff; }\n.tabs .tab-item .badge.badge-dark, .badge.badge-dark {\n  background-color: #444;\n  color: #fff; }\n\n.button .badge {\n  position: relative;\n  top: -1px; }\n\n/**\n * Slide Box\n * --------------------------------------------------\n */\n.slider {\n  position: relative;\n  visibility: hidden;\n  overflow: hidden; }\n\n.slider-slides {\n  position: relative;\n  height: 100%; }\n\n.slider-slide {\n  position: relative;\n  display: block;\n  float: left;\n  width: 100%;\n  height: 100%;\n  vertical-align: top; }\n\n.slider-slide-image > img {\n  width: 100%; }\n\n.slider-pager {\n  position: absolute;\n  bottom: 20px;\n  z-index: 1;\n  width: 100%;\n  height: 15px;\n  text-align: center; }\n  .slider-pager .slider-pager-page {\n    display: inline-block;\n    margin: 0px 3px;\n    width: 15px;\n    color: #000;\n    text-decoration: none;\n    opacity: 0.3; }\n    .slider-pager .slider-pager-page.active {\n      -webkit-transition: opacity 0.4s ease-in;\n      -moz-transition: opacity 0.4s ease-in;\n      transition: opacity 0.4s ease-in;\n      opacity: 1; }\n\n/**\n * Split Pane\n * --------------------------------------------------\n */\n.split-pane {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-align: stretch;\n  -ms-flex-align: stretch;\n  -webkit-align-items: stretch;\n  -moz-align-items: stretch;\n  align-items: stretch;\n  width: 100%;\n  height: 100%; }\n\n.split-pane-menu {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 320px;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 320px;\n  -ms-flex: 0 0 320px;\n  flex: 0 0 320px;\n  overflow-y: auto;\n  width: 320px;\n  height: 100%;\n  border-right: 1px solid #eee; }\n  @media all and (max-width: 568px) {\n    .split-pane-menu {\n      border-right: none; } }\n\n.split-pane-content {\n  -webkit-box-flex: 1;\n  -webkit-flex: 1 0 auto;\n  -moz-box-flex: 1;\n  -moz-flex: 1 0 auto;\n  -ms-flex: 1 0 auto;\n  flex: 1 0 auto; }\n\n/**\n * Forms\n * --------------------------------------------------\n */\nform {\n  margin: 0 0 1.42857; }\n\nlegend {\n  display: block;\n  margin-bottom: 1.42857;\n  padding: 0;\n  width: 100%;\n  border: 1px solid #ddd;\n  color: #444;\n  font-size: 21px;\n  line-height: 2.85714; }\n  legend small {\n    color: #f8f8f8;\n    font-size: 1.07143; }\n\nlabel, input, button, select, textarea {\n  font-weight: normal;\n  font-size: 14px;\n  line-height: 1.42857; }\n\ninput, button, select, textarea {\n  font-family: \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif; }\n\n.item-input {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  position: relative;\n  overflow: hidden;\n  padding: 6px 0 5px 8px; }\n  .item-input input {\n    -webkit-border-radius: 0;\n    -moz-border-radius: 0;\n    border-radius: 0;\n    -webkit-box-flex: 1;\n    -webkit-flex: 1 0 220px;\n    -moz-box-flex: 1;\n    -moz-flex: 1 0 220px;\n    -ms-flex: 1 0 220px;\n    flex: 1 0 220px;\n    -webkit-appearance: none;\n    -moz-appearance: none;\n    appearance: none;\n    margin: 0;\n    padding-right: 24px;\n    background-color: transparent; }\n  .item-input .button .icon {\n    -webkit-box-flex: 0;\n    -webkit-flex: 0 0 24px;\n    -moz-box-flex: 0;\n    -moz-flex: 0 0 24px;\n    -ms-flex: 0 0 24px;\n    flex: 0 0 24px;\n    position: static;\n    display: inline-block;\n    height: auto;\n    text-align: center;\n    font-size: 16px; }\n  .item-input .button-bar {\n    -webkit-border-radius: 0;\n    -moz-border-radius: 0;\n    border-radius: 0;\n    -webkit-box-flex: 1;\n    -webkit-flex: 1 0 220px;\n    -moz-box-flex: 1;\n    -moz-flex: 1 0 220px;\n    -ms-flex: 1 0 220px;\n    flex: 1 0 220px;\n    -webkit-appearance: none;\n    -moz-appearance: none;\n    appearance: none; }\n  .item-input .icon {\n    min-width: 14px; }\n\n.item-input-inset {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  position: relative;\n  overflow: hidden;\n  padding: 10px; }\n\n.item-input-wrapper {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-flex: 1;\n  -webkit-flex: 1 0;\n  -moz-box-flex: 1;\n  -moz-flex: 1 0;\n  -ms-flex: 1 0;\n  flex: 1 0;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  border-radius: 4px;\n  padding-right: 8px;\n  padding-left: 8px;\n  background: #eee; }\n\n.item-input-inset .item-input-wrapper input {\n  padding-left: 4px;\n  height: 29px;\n  background: inherit;\n  line-height: 18px; }\n\n.item-input-wrapper ~ .button {\n  margin-left: 10px; }\n\n.input-label {\n  -webkit-box-flex: 1;\n  -webkit-flex: 1 0 100px;\n  -moz-box-flex: 1;\n  -moz-flex: 1 0 100px;\n  -ms-flex: 1 0 100px;\n  flex: 1 0 100px;\n  padding: 7px 10px 7px 3px;\n  max-width: 200px;\n  color: #444;\n  font-weight: bold;\n  font-size: 14px; }\n\n.placeholder-icon {\n  color: #aaa; }\n  .placeholder-icon:first-child {\n    padding-right: 6px; }\n  .placeholder-icon:last-child {\n    padding-left: 6px; }\n\n.item-stacked-label {\n  display: block;\n  background-color: transparent;\n  box-shadow: none; }\n  .item-stacked-label .input-label, .item-stacked-label .icon {\n    display: inline-block;\n    padding: 4px 0;\n    vertical-align: middle; }\n\n.item-stacked-label input, .item-stacked-label textarea {\n  -webkit-border-radius: 2px;\n  -moz-border-radius: 2px;\n  border-radius: 2px;\n  overflow: hidden;\n  padding: 4px 8px 3px;\n  border: none;\n  background-color: #fff; }\n\n.item-stacked-label input {\n  height: 46px; }\n\nselect, textarea, input[type=\"text\"], input[type=\"password\"], input[type=\"datetime\"], input[type=\"datetime-local\"], input[type=\"date\"], input[type=\"month\"], input[type=\"time\"], input[type=\"week\"], input[type=\"number\"], input[type=\"email\"], input[type=\"url\"], input[type=\"search\"], input[type=\"tel\"], input[type=\"color\"] {\n  display: block;\n  padding-top: 2px;\n  height: 34px;\n  color: #111;\n  vertical-align: middle;\n  font-size: 14px;\n  line-height: 16px; }\n\ninput, textarea {\n  width: 100%; }\n\ntextarea {\n  height: auto; }\n\ntextarea, input[type=\"text\"], input[type=\"password\"], input[type=\"datetime\"], input[type=\"datetime-local\"], input[type=\"date\"], input[type=\"month\"], input[type=\"time\"], input[type=\"week\"], input[type=\"number\"], input[type=\"email\"], input[type=\"url\"], input[type=\"search\"], input[type=\"tel\"], input[type=\"color\"] {\n  border: 0; }\n\ninput[type=\"radio\"], input[type=\"checkbox\"] {\n  margin: 0;\n  line-height: normal; }\n\ninput[type=\"file\"], input[type=\"image\"], input[type=\"submit\"], input[type=\"reset\"], input[type=\"button\"], input[type=\"radio\"], input[type=\"checkbox\"] {\n  width: auto; }\n\nselect[multiple], select[size] {\n  height: auto; }\n\nselect, input[type=\"file\"] {\n  line-height: 34px; }\n\nselect {\n  border: 1px solid #ddd;\n  background-color: #fff; }\n\ninput:-moz-placeholder, textarea:-moz-placeholder {\n  color: #aaaaaa; }\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n  color: #aaaaaa; }\ninput::-webkit-input-placeholder, textarea::-webkit-input-placeholder {\n  color: #aaaaaa; }\n\ninput[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {\n  background-color: #f8f8f8;\n  cursor: not-allowed; }\n\ninput[type=\"radio\"][disabled], input[type=\"checkbox\"][disabled], input[type=\"radio\"][readonly], input[type=\"checkbox\"][readonly] {\n  background-color: transparent; }\n\n/**\n * Checkbox\n * --------------------------------------------------\n */\n.checkbox {\n  position: relative;\n  display: inline-block;\n  padding: 7px 7px;\n  cursor: pointer; }\n  .checkbox input:before {\n    border: 1px solid #4a87ee; }\n  .checkbox input:checked:before {\n    background: #4a87ee; }\n  .checkbox.checkbox-light input:before {\n    border: 1px solid #ddd; }\n  .checkbox.checkbox-light input:checked:before {\n    background: #ddd; }\n  .checkbox.checkbox-stable input:before {\n    border: 1px solid #b2b2b2; }\n  .checkbox.checkbox-stable input:checked:before {\n    background: #b2b2b2; }\n  .checkbox.checkbox-positive input:before {\n    border: 1px solid #4a87ee; }\n  .checkbox.checkbox-positive input:checked:before {\n    background: #4a87ee; }\n  .checkbox.checkbox-calm input:before {\n    border: 1px solid #43cee6; }\n  .checkbox.checkbox-calm input:checked:before {\n    background: #43cee6; }\n  .checkbox.checkbox-assertive input:before {\n    border: 1px solid #ef4e3a; }\n  .checkbox.checkbox-assertive input:checked:before {\n    background: #ef4e3a; }\n  .checkbox.checkbox-balanced input:before {\n    border: 1px solid #66cc33; }\n  .checkbox.checkbox-balanced input:checked:before {\n    background: #66cc33; }\n  .checkbox.checkbox-energized input:before {\n    border: 1px solid #f0b840; }\n  .checkbox.checkbox-energized input:checked:before {\n    background: #f0b840; }\n  .checkbox.checkbox-royal input:before {\n    border: 1px solid #8a6de9; }\n  .checkbox.checkbox-royal input:checked:before {\n    background: #8a6de9; }\n  .checkbox.checkbox-dark input:before {\n    border: 1px solid #444; }\n  .checkbox.checkbox-dark input:checked:before {\n    background: #444; }\n\n.checkbox input {\n  position: relative;\n  width: 28px;\n  height: 28px;\n  border: 0;\n  background: transparent;\n  cursor: pointer;\n  -webkit-appearance: none; }\n  .checkbox input:before {\n    /* what the checkbox looks like when its not checked */\n    display: table;\n    width: 100%;\n    height: 100%;\n    border-radius: 28px;\n    background: #fff;\n    content: ' ';\n    transition: background-color 0.1s ease-in-out; }\n\n/* the checkmark within the box */\n.checkbox input:after {\n  -webkit-transition: opacity 0.05s ease-in-out;\n  -moz-transition: opacity 0.05s ease-in-out;\n  transition: opacity 0.05s ease-in-out;\n  -webkit-transform: rotate(-45deg);\n  -moz-transform: rotate(-45deg);\n  transform: rotate(-45deg);\n  position: absolute;\n  top: 30%;\n  left: 26%;\n  display: table;\n  width: 15px;\n  height: 10.33333px;\n  border: 3px solid #fff;\n  border-top: 0;\n  border-right: 0;\n  content: ' ';\n  opacity: 0; }\n\n.grade-c .checkbox input:after {\n  -webkit-transform: rotate(0);\n  -moz-transform: rotate(0);\n  transform: rotate(0);\n  top: 3px;\n  left: 4px;\n  border: none;\n  color: #fff;\n  font-weight: bold;\n  font-size: 20px;\n  content: '\\2713'; }\n\n/* what the checkmark looks like when its checked */\n.checkbox input:checked:after {\n  opacity: 1; }\n\n/* make sure item content have enough padding on left to fit the checkbox */\n.item-checkbox {\n  padding-left: 58px; }\n  .item-checkbox.active {\n    box-shadow: none; }\n\n/* position the checkbox to the left within an item */\n.item-checkbox .checkbox {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  position: absolute;\n  top: 0;\n  left: 7.5px;\n  z-index: 3;\n  height: 100%; }\n\n/**\n * Toggle\n * --------------------------------------------------\n */\n/* the overall container of the toggle */\n.toggle {\n  position: relative;\n  display: inline-block;\n  margin: -5px;\n  padding: 5px; }\n  .toggle input:checked + .track {\n    border-color: #4a87ee;\n    background-color: #4a87ee; }\n  .toggle.dragging .handle {\n    background-color: #f2f2f2 !important; }\n  .toggle.toggle-light input:checked + .track {\n    border-color: #ddd;\n    background-color: #ddd; }\n  .toggle.toggle-stable input:checked + .track {\n    border-color: #b2b2b2;\n    background-color: #b2b2b2; }\n  .toggle.toggle-positive input:checked + .track {\n    border-color: #4a87ee;\n    background-color: #4a87ee; }\n  .toggle.toggle-calm input:checked + .track {\n    border-color: #43cee6;\n    background-color: #43cee6; }\n  .toggle.toggle-assertive input:checked + .track {\n    border-color: #ef4e3a;\n    background-color: #ef4e3a; }\n  .toggle.toggle-balanced input:checked + .track {\n    border-color: #66cc33;\n    background-color: #66cc33; }\n  .toggle.toggle-energized input:checked + .track {\n    border-color: #f0b840;\n    background-color: #f0b840; }\n  .toggle.toggle-royal input:checked + .track {\n    border-color: #8a6de9;\n    background-color: #8a6de9; }\n  .toggle.toggle-dark input:checked + .track {\n    border-color: #444;\n    background-color: #444; }\n\n/* hide the actual input checkbox */\n.toggle input {\n  display: none; }\n\n/* the track appearance when the toggle is \"off\" */\n.toggle .track {\n  -webkit-transition-timing-function: ease-in-out;\n  -moz-transition-timing-function: ease-in-out;\n  transition-timing-function: ease-in-out;\n  -webkit-transition-duration: 0.2s;\n  -moz-transition-duration: 0.2s;\n  transition-duration: 0.2s;\n  -webkit-transition-property: background-color, border;\n  -moz-transition-property: background-color, border;\n  transition-property: background-color, border;\n  display: inline-block;\n  box-sizing: border-box;\n  width: 54px;\n  height: 32px;\n  border: solid 2px #E5E5E5;\n  border-radius: 20px;\n  background-color: #E5E5E5;\n  content: ' ';\n  cursor: pointer; }\n\n/* the handle (circle) thats inside the toggle's track area */\n/* also the handle's appearance when it is \"off\" */\n.toggle .handle {\n  -webkit-transition: 0.2s ease-in-out;\n  -moz-transition: 0.2s ease-in-out;\n  transition: 0.2s ease-in-out;\n  position: absolute;\n  top: 7px;\n  left: 7px;\n  display: block;\n  width: 28px;\n  height: 28px;\n  border-radius: 28px;\n  background-color: #fff;\n  /* used to create a larger (but hidden) hit area to slide the handle */ }\n  .toggle .handle:before {\n    position: absolute;\n    top: -4px;\n    left: -22px;\n    padding: 19px 35px;\n    content: \" \"; }\n\n/* the handle when the toggle is \"on\" */\n.toggle input:checked + .track .handle {\n  -webkit-transform: translate3d(22px, 0, 0);\n  -moz-transform: translate3d(22px, 0, 0);\n  transform: translate3d(22px, 0, 0);\n  background-color: #fff; }\n\n/* make sure list item content have enough padding on right to fit the toggle */\n.item-toggle {\n  padding-right: 99px; }\n  .item-toggle.active {\n    box-shadow: none; }\n\n/* position the toggle to the right within a list item */\n.item-toggle .toggle {\n  position: absolute;\n  top: 7.5px;\n  right: 15px;\n  z-index: 3; }\n\n.toggle input:disabled + .track {\n  opacity: 0.6; }\n\n/**\n * Radio Button Inputs\n * --------------------------------------------------\n */\n.item-radio {\n  padding: 0; }\n  .item-radio:hover {\n    cursor: pointer; }\n\n.item-radio .item-content {\n  /* give some room to the right for the checkmark icon */\n  padding-right: 60px; }\n\n.item-radio .radio-icon {\n  /* checkmark icon will be hidden by default */\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 3;\n  visibility: hidden;\n  padding: 13px;\n  height: 100%;\n  font-size: 24px; }\n\n.item-radio input {\n  /* hide any radio button inputs elements (the ugly circles) */\n  position: absolute;\n  left: -9999px; }\n  .item-radio input:checked ~ .item-content {\n    /* style the item content when its checked */\n    background: #f7f7f7; }\n  .item-radio input:checked ~ .radio-icon {\n    /* show the checkmark icon when its checked */\n    visibility: visible; }\n\n.item-radio {\n  -webkit-animation: androidCheckedbugfix infinite 1s; }\n\n@-webkit-keyframes androidCheckedbugfix {\n  from {\n    padding: 0; }\n\n  to {\n    padding: 0; } }\n\n/**\n * Range\n * --------------------------------------------------\n */\ninput[type=\"range\"] {\n  display: inline-block;\n  overflow: hidden;\n  margin-top: 5px;\n  margin-bottom: 5px;\n  padding-right: 2px;\n  padding-left: 1px;\n  width: auto;\n  height: 35px;\n  outline: none;\n  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ccc), color-stop(100%, #ccc));\n  background: linear-gradient(to right, #ccc 0%, #ccc 100%);\n  background-position: center;\n  background-size: 99% 4px;\n  background-repeat: no-repeat;\n  -webkit-appearance: none; }\n  input[type=\"range\"]::-webkit-slider-thumb {\n    position: relative;\n    width: 20px;\n    height: 20px;\n    border-radius: 10px;\n    background-color: #fff;\n    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5), 1px 3px 5px rgba(0, 0, 0, 0.25);\n    cursor: pointer;\n    -webkit-appearance: none; }\n  input[type=\"range\"]::-webkit-slider-thumb:before {\n    /* what creates the colorful line on the left side of the slider */\n    position: absolute;\n    top: 8px;\n    left: -2001px;\n    width: 2000px;\n    height: 4px;\n    background: #444;\n    content: ' '; }\n  input[type=\"range\"]::-webkit-slider-thumb:after {\n    /* create a larger (but hidden) hit area */\n    position: absolute;\n    top: -20px;\n    left: -20px;\n    padding: 30px;\n    content: ' '; }\n\n.range {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center;\n  padding: 2px 4px; }\n  .range.range-light input::-webkit-slider-thumb:before {\n    background: #ddd; }\n  .range.range-stable input::-webkit-slider-thumb:before {\n    background: #b2b2b2; }\n  .range.range-positive input::-webkit-slider-thumb:before {\n    background: #4a87ee; }\n  .range.range-calm input::-webkit-slider-thumb:before {\n    background: #43cee6; }\n  .range.range-balanced input::-webkit-slider-thumb:before {\n    background: #66cc33; }\n  .range.range-assertive input::-webkit-slider-thumb:before {\n    background: #ef4e3a; }\n  .range.range-energized input::-webkit-slider-thumb:before {\n    background: #f0b840; }\n  .range.range-royal input::-webkit-slider-thumb:before {\n    background: #8a6de9; }\n  .range.range-dark input::-webkit-slider-thumb:before {\n    background: #444; }\n\n.range .icon {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0;\n  -moz-box-flex: 0;\n  -moz-flex: 0;\n  -ms-flex: 0;\n  flex: 0;\n  display: block;\n  min-width: 24px;\n  text-align: center;\n  font-size: 24px; }\n\n.range input {\n  -webkit-box-flex: 1;\n  -webkit-flex: 1;\n  -moz-box-flex: 1;\n  -moz-flex: 1;\n  -ms-flex: 1;\n  flex: 1;\n  display: block;\n  margin-right: 10px;\n  margin-left: 10px; }\n\n.range-label {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 auto;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 auto;\n  -ms-flex: 0 0 auto;\n  flex: 0 0 auto;\n  display: block;\n  white-space: nowrap; }\n\n.range-label:first-child {\n  padding-left: 5px; }\n\n.range input + .range-label {\n  padding-right: 5px;\n  padding-left: 0; }\n\n/**\n * Progress\n * --------------------------------------------------\n */\nprogress {\n  display: block;\n  margin: 15px auto;\n  width: 100%; }\n\n/**\n * Buttons\n * --------------------------------------------------\n */\n.button {\n  border-color: #b2b2b2;\n  background-color: #f8f8f8;\n  color: #444;\n  position: relative;\n  display: inline-block;\n  margin: 0;\n  padding: 1px 12px 0 12px;\n  min-width: 52px;\n  min-height: 47px;\n  border-width: 1px;\n  border-style: solid;\n  border-radius: 2px;\n  vertical-align: top;\n  text-align: center;\n  text-overflow: ellipsis;\n  font-size: 16px;\n  line-height: 42px;\n  cursor: pointer; }\n  .button:hover {\n    color: #444;\n    text-decoration: none; }\n  .button.active {\n    border-color: #a2a2a2;\n    background-color: #e5e5e5;\n    box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n  .button:after {\n    position: absolute;\n    top: -6px;\n    right: -8px;\n    bottom: -6px;\n    left: -8px;\n    content: ' '; }\n  .button .icon {\n    vertical-align: top; }\n  .button .icon:before, .button.icon:before, .button.icon-left:before, .button.icon-right:before {\n    display: inline-block;\n    padding: 0 0 1px 0;\n    vertical-align: inherit;\n    font-size: 24px;\n    line-height: 42px; }\n  .button.icon-left:before {\n    float: left;\n    padding-right: 0.2em;\n    padding-left: 0; }\n  .button.icon-right:before {\n    float: right;\n    padding-right: 0;\n    padding-left: 0.2em; }\n  .button.button-block, .button.button-full {\n    margin-top: 10px;\n    margin-bottom: 10px; }\n  .button.button-light {\n    border-color: #ddd;\n    background-color: #fff;\n    color: #444; }\n    .button.button-light:hover {\n      color: #444;\n      text-decoration: none; }\n    .button.button-light.active {\n      border-color: #ccc;\n      background-color: #fafafa;\n      box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n    .button.button-light.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #ddd; }\n    .button.button-light.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-light.button-outline {\n      border-color: #ddd;\n      background: transparent;\n      color: #ddd; }\n      .button.button-light.button-outline.active {\n        background-color: #ddd;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-stable {\n    border-color: #b2b2b2;\n    background-color: #f8f8f8;\n    color: #444; }\n    .button.button-stable:hover {\n      color: #444;\n      text-decoration: none; }\n    .button.button-stable.active {\n      border-color: #a2a2a2;\n      background-color: #e5e5e5;\n      box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n    .button.button-stable.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #b2b2b2; }\n    .button.button-stable.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-stable.button-outline {\n      border-color: #b2b2b2;\n      background: transparent;\n      color: #b2b2b2; }\n      .button.button-stable.button-outline.active {\n        background-color: #b2b2b2;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-positive {\n    border-color: #145fd7;\n    background-color: #4a87ee;\n    color: #fff; }\n    .button.button-positive:hover {\n      color: #fff;\n      text-decoration: none; }\n    .button.button-positive.active {\n      border-color: #145fd7;\n      background-color: #145fd7;\n      box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n    .button.button-positive.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #4a87ee; }\n    .button.button-positive.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-positive.button-outline {\n      border-color: #4a87ee;\n      background: transparent;\n      color: #4a87ee; }\n      .button.button-positive.button-outline.active {\n        background-color: #4a87ee;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-calm {\n    border-color: #1aacc3;\n    background-color: #43cee6;\n    color: #fff; }\n    .button.button-calm:hover {\n      color: #fff;\n      text-decoration: none; }\n    .button.button-calm.active {\n      border-color: #1aacc3;\n      background-color: #1aacc3;\n      box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n    .button.button-calm.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #43cee6; }\n    .button.button-calm.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-calm.button-outline {\n      border-color: #43cee6;\n      background: transparent;\n      color: #43cee6; }\n      .button.button-calm.button-outline.active {\n        background-color: #43cee6;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-assertive {\n    border-color: #cc2311;\n    background-color: #ef4e3a;\n    color: #fff; }\n    .button.button-assertive:hover {\n      color: #fff;\n      text-decoration: none; }\n    .button.button-assertive.active {\n      border-color: #cc2311;\n      background-color: #cc2311;\n      box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n    .button.button-assertive.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #ef4e3a; }\n    .button.button-assertive.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-assertive.button-outline {\n      border-color: #ef4e3a;\n      background: transparent;\n      color: #ef4e3a; }\n      .button.button-assertive.button-outline.active {\n        background-color: #ef4e3a;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-balanced {\n    border-color: #498f24;\n    background-color: #66cc33;\n    color: #fff; }\n    .button.button-balanced:hover {\n      color: #fff;\n      text-decoration: none; }\n    .button.button-balanced.active {\n      border-color: #498f24;\n      background-color: #498f24;\n      box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n    .button.button-balanced.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #66cc33; }\n    .button.button-balanced.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-balanced.button-outline {\n      border-color: #66cc33;\n      background: transparent;\n      color: #66cc33; }\n      .button.button-balanced.button-outline.active {\n        background-color: #66cc33;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-energized {\n    border-color: #d39211;\n    background-color: #f0b840;\n    color: #fff; }\n    .button.button-energized:hover {\n      color: #fff;\n      text-decoration: none; }\n    .button.button-energized.active {\n      border-color: #d39211;\n      background-color: #d39211;\n      box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n    .button.button-energized.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #f0b840; }\n    .button.button-energized.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-energized.button-outline {\n      border-color: #f0b840;\n      background: transparent;\n      color: #f0b840; }\n      .button.button-energized.button-outline.active {\n        background-color: #f0b840;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-royal {\n    border-color: #552bdf;\n    background-color: #8a6de9;\n    color: #fff; }\n    .button.button-royal:hover {\n      color: #fff;\n      text-decoration: none; }\n    .button.button-royal.active {\n      border-color: #552bdf;\n      background-color: #552bdf;\n      box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n    .button.button-royal.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #8a6de9; }\n    .button.button-royal.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-royal.button-outline {\n      border-color: #8a6de9;\n      background: transparent;\n      color: #8a6de9; }\n      .button.button-royal.button-outline.active {\n        background-color: #8a6de9;\n        box-shadow: none;\n        color: #fff; }\n  .button.button-dark {\n    border-color: #111;\n    background-color: #444;\n    color: #fff; }\n    .button.button-dark:hover {\n      color: #fff;\n      text-decoration: none; }\n    .button.button-dark.active {\n      border-color: #000;\n      background-color: #262626;\n      box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }\n    .button.button-dark.button-clear {\n      border-color: transparent;\n      background: none;\n      box-shadow: none;\n      color: #444; }\n    .button.button-dark.button-icon {\n      border-color: transparent;\n      background: none; }\n    .button.button-dark.button-outline {\n      border-color: #444;\n      background: transparent;\n      color: #444; }\n      .button.button-dark.button-outline.active {\n        background-color: #444;\n        box-shadow: none;\n        color: #fff; }\n\n.button-small {\n  padding: 0 4px;\n  min-width: 28px;\n  min-height: 31px;\n  font-size: 12px;\n  line-height: 28px; }\n  .button-small .icon:before, .button-small.icon:before, .button-small.icon-left:before, .button-small.icon-right:before {\n    font-size: 16px;\n    line-height: 26px; }\n\n.button-large {\n  padding: 0 16px;\n  min-width: 68px;\n  min-height: 59px;\n  font-size: 20px;\n  line-height: 53px; }\n  .button-large .icon:before, .button-large.icon:before, .button-large.icon-left:before, .button-large.icon-right:before {\n    padding-bottom: 2px;\n    font-size: 32px;\n    line-height: 51px; }\n\n.button-icon {\n  -webkit-transition: opacity 0.1s;\n  -moz-transition: opacity 0.1s;\n  transition: opacity 0.1s;\n  padding: 0 6px;\n  min-width: initial;\n  border-color: transparent;\n  background: none; }\n  .button-icon.button.active {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    opacity: 0.3; }\n  .button-icon .icon:before, .button-icon.icon:before {\n    font-size: 32px; }\n\n.button-clear {\n  -webkit-transition: opacity 0.1s;\n  -moz-transition: opacity 0.1s;\n  transition: opacity 0.1s;\n  padding: 0 6px;\n  max-height: 42px;\n  border-color: transparent;\n  background: none;\n  box-shadow: none; }\n  .button-clear.button-clear {\n    border-color: transparent;\n    background: none;\n    box-shadow: none;\n    color: #b2b2b2; }\n  .button-clear.button-icon {\n    border-color: transparent;\n    background: none; }\n  .button-clear.active {\n    opacity: 0.3; }\n\n.button-outline {\n  -webkit-transition: opacity 0.1s;\n  -moz-transition: opacity 0.1s;\n  transition: opacity 0.1s;\n  background: none;\n  box-shadow: none; }\n  .button-outline.button-outline {\n    border-color: #b2b2b2;\n    background: transparent;\n    color: #b2b2b2; }\n    .button-outline.button-outline.active {\n      background-color: #b2b2b2;\n      box-shadow: none;\n      color: #fff; }\n\n.padding > .button.button-block:first-child {\n  margin-top: 0; }\n\n.button-block {\n  display: block;\n  clear: both; }\n  .button-block:after {\n    clear: both; }\n\n.button-full, .button-full > .button {\n  display: block;\n  margin-right: 0;\n  margin-left: 0;\n  border-right-width: 0;\n  border-left-width: 0;\n  border-radius: 0; }\n\nbutton.button-block, button.button-full, .button-full > button.button, input.button.button-block {\n  width: 100%; }\n\na.button {\n  text-decoration: none; }\n\n.button.disabled, .button[disabled] {\n  opacity: 0.4;\n  cursor: default !important;\n  pointer-events: none; }\n\n/**\n * Button Bar\n * --------------------------------------------------\n */\n.button-bar {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-flex: 1;\n  -webkit-flex: 1;\n  -moz-box-flex: 1;\n  -moz-flex: 1;\n  -ms-flex: 1;\n  flex: 1;\n  width: 100%; }\n  .button-bar.button-bar-inline {\n    display: block;\n    width: auto;\n    *zoom: 1; }\n    .button-bar.button-bar-inline:before, .button-bar.button-bar-inline:after {\n      display: table;\n      content: \"\";\n      line-height: 0; }\n    .button-bar.button-bar-inline:after {\n      clear: both; }\n    .button-bar.button-bar-inline > .button {\n      width: auto;\n      display: inline-block;\n      float: left; }\n\n.button-bar > .button {\n  -webkit-box-flex: 1;\n  -webkit-flex: 1;\n  -moz-box-flex: 1;\n  -moz-flex: 1;\n  -ms-flex: 1;\n  flex: 1;\n  display: block;\n  overflow: hidden;\n  padding: 0 16px;\n  width: 0;\n  border-width: 1px 0px 1px 1px;\n  border-radius: 0;\n  text-align: center;\n  text-overflow: ellipsis;\n  white-space: nowrap; }\n  .button-bar > .button:before, .button-bar > .button .icon:before {\n    line-height: 44px; }\n  .button-bar > .button:first-child {\n    border-radius: 2px 0px 0px 2px; }\n  .button-bar > .button:last-child {\n    border-right-width: 1px;\n    border-radius: 0px 2px 2px 0px; }\n\n/**\n * Animations\n * --------------------------------------------------\n * The animations in this file are \"simple\" - not too complex\n * and pretty easy on performance. They can be overidden\n * and enhanced easily.\n */\n/**\n * Keyframes\n * --------------------------------------------------\n */\n@-webkit-keyframes slideInUp {\n  0% {\n    -webkit-transform: translate3d(0, 100%, 0); }\n\n  100% {\n    -webkit-transform: translate3d(0, 0, 0); } }\n\n@-moz-keyframes slideInUp {\n  0% {\n    -moz-transform: translate3d(0, 100%, 0); }\n\n  100% {\n    -moz-transform: translate3d(0, 0, 0); } }\n\n@keyframes slideInUp {\n  0% {\n    transform: translate3d(0, 100%, 0); }\n\n  100% {\n    transform: translate3d(0, 0, 0); } }\n\n@-webkit-keyframes slideOutUp {\n  0% {\n    -webkit-transform: translate3d(0, 0, 0); }\n\n  100% {\n    -webkit-transform: translate3d(0, 100%, 0); } }\n\n@-moz-keyframes slideOutUp {\n  0% {\n    -moz-transform: translate3d(0, 0, 0); }\n\n  100% {\n    -moz-transform: translate3d(0, 100%, 0); } }\n\n@keyframes slideOutUp {\n  0% {\n    transform: translate3d(0, 0, 0); }\n\n  100% {\n    transform: translate3d(0, 100%, 0); } }\n\n@-webkit-keyframes slideInFromLeft {\n  from {\n    -webkit-transform: translate3d(-100%, 0, 0); }\n\n  to {\n    -webkit-transform: translate3d(0, 0, 0); } }\n\n@-moz-keyframes slideInFromLeft {\n  from {\n    -moz-transform: translateX(-100%); }\n\n  to {\n    -moz-transform: translateX(0); } }\n\n@keyframes slideInFromLeft {\n  from {\n    transform: translateX(-100%); }\n\n  to {\n    transform: translateX(0); } }\n\n@-webkit-keyframes slideInFromRight {\n  from {\n    -webkit-transform: translate3d(100%, 0, 0); }\n\n  to {\n    -webkit-transform: translate3d(0, 0, 0); } }\n\n@-moz-keyframes slideInFromRight {\n  from {\n    -moz-transform: translateX(100%); }\n\n  to {\n    -moz-transform: translateX(0); } }\n\n@keyframes slideInFromRight {\n  from {\n    transform: translateX(100%); }\n\n  to {\n    transform: translateX(0); } }\n\n@-webkit-keyframes slideOutToLeft {\n  from {\n    -webkit-transform: translate3d(0, 0, 0); }\n\n  to {\n    -webkit-transform: translate3d(-100%, 0, 0); } }\n\n@-moz-keyframes slideOutToLeft {\n  from {\n    -moz-transform: translateX(0); }\n\n  to {\n    -moz-transform: translateX(-100%); } }\n\n@keyframes slideOutToLeft {\n  from {\n    transform: translateX(0); }\n\n  to {\n    transform: translateX(-100%); } }\n\n@-webkit-keyframes slideOutToRight {\n  from {\n    -webkit-transform: translate3d(0, 0, 0); }\n\n  to {\n    -webkit-transform: translate3d(100%, 0, 0); } }\n\n@-moz-keyframes slideOutToRight {\n  from {\n    -moz-transform: translateX(0); }\n\n  to {\n    -moz-transform: translateX(100%); } }\n\n@keyframes slideOutToRight {\n  from {\n    transform: translateX(0); }\n\n  to {\n    transform: translateX(100%); } }\n\n@-webkit-keyframes fadeOut {\n  from {\n    opacity: 1; }\n\n  to {\n    opacity: 0; } }\n\n@-moz-keyframes fadeOut {\n  from {\n    opacity: 1; }\n\n  to {\n    opacity: 0; } }\n\n@keyframes fadeOut {\n  from {\n    opacity: 1; }\n\n  to {\n    opacity: 0; } }\n\n@-webkit-keyframes fadeIn {\n  from {\n    opacity: 0; }\n\n  to {\n    opacity: 1; } }\n\n@-moz-keyframes fadeIn {\n  from {\n    opacity: 0; }\n\n  to {\n    opacity: 1; } }\n\n@keyframes fadeIn {\n  from {\n    opacity: 0; }\n\n  to {\n    opacity: 1; } }\n\n@-webkit-keyframes fadeInHalf {\n  from {\n    background-color: rgba(0, 0, 0, 0); }\n\n  to {\n    background-color: rgba(0, 0, 0, 0.5); } }\n\n@-moz-keyframes fadeInHalf {\n  from {\n    background-color: rgba(0, 0, 0, 0); }\n\n  to {\n    background-color: rgba(0, 0, 0, 0.5); } }\n\n@keyframes fadeInHalf {\n  from {\n    background-color: rgba(0, 0, 0, 0); }\n\n  to {\n    background-color: rgba(0, 0, 0, 0.5); } }\n\n@-webkit-keyframes fadeOutHalf {\n  from {\n    background-color: rgba(0, 0, 0, 0.5); }\n\n  to {\n    background-color: rgba(0, 0, 0, 0); } }\n\n@-moz-keyframes fadeOutHalf {\n  from {\n    background-color: rgba(0, 0, 0, 0.5); }\n\n  to {\n    background-color: rgba(0, 0, 0, 0); } }\n\n@keyframes fadeOutHalf {\n  from {\n    background-color: rgba(0, 0, 0, 0.5); }\n\n  to {\n    background-color: rgba(0, 0, 0, 0); } }\n\n@-webkit-keyframes scaleOut {\n  from {\n    -webkit-transform: scale(1);\n    opacity: 1; }\n\n  to {\n    -webkit-transform: scale(0.8);\n    opacity: 0; } }\n\n@-moz-keyframes scaleOut {\n  from {\n    -moz-transform: scale(1);\n    opacity: 1; }\n\n  to {\n    -moz-transform: scale(0.8);\n    opacity: 0; } }\n\n@keyframes scaleOut {\n  from {\n    transform: scale(1);\n    opacity: 1; }\n\n  to {\n    transform: scale(0.8);\n    opacity: 0; } }\n\n@-webkit-keyframes scaleIn {\n  from {\n    -webkit-transform: scale(0); }\n\n  to {\n    -webkit-transform: scale(1); } }\n\n@-moz-keyframes scaleIn {\n  from {\n    -moz-transform: scale(0); }\n\n  to {\n    -moz-transform: scale(1); } }\n\n@keyframes scaleIn {\n  from {\n    transform: scale(0); }\n\n  to {\n    transform: scale(1); } }\n\n@-webkit-keyframes superScaleIn {\n  from {\n    -webkit-transform: scale(1.2);\n    opacity: 0; }\n\n  to {\n    -webkit-transform: scale(1);\n    opacity: 1; } }\n\n@-moz-keyframes superScaleIn {\n  from {\n    -moz-transform: scale(1.2);\n    opacity: 0; }\n\n  to {\n    -moz-transform: scale(1);\n    opacity: 1; } }\n\n@keyframes superScaleIn {\n  from {\n    transform: scale(1.2);\n    opacity: 0; }\n\n  to {\n    transform: scale(1);\n    opacity: 1; } }\n\n@-webkit-keyframes spin {\n  100% {\n    -webkit-transform: rotate(360deg); } }\n\n@-moz-keyframes spin {\n  100% {\n    -moz-transform: rotate(360deg); } }\n\n@keyframes spin {\n  100% {\n    transform: rotate(360deg); } }\n\n.no-animation > .ng-enter, .no-animation.ng-enter, .no-animation > .ng-leave, .no-animation.ng-leave {\n  -webkit-transition: none;\n  -moz-transition: none;\n  transition: none; }\n\n.noop-animation > .ng-enter, .noop-animation.ng-enter, .noop-animation > .ng-leave, .noop-animation.ng-leave {\n  -webkit-transition: all cubic-bezier(0.25, 0.46, 0.45, 0.94) 250ms;\n  -moz-transition: all cubic-bezier(0.25, 0.46, 0.45, 0.94) 250ms;\n  transition: all cubic-bezier(0.25, 0.46, 0.45, 0.94) 250ms;\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0; }\n\n.ng-animate .pane {\n  position: absolute; }\n\n/**\n * Slide Left-Right, and Right-Left, each with the reserve\n * --------------------------------------------------\n * NEW content slides IN from the RIGHT, OLD slides OUT to the LEFT\n * Reverse: NEW content slides IN from the LEFT, OLD slides OUT to the RIGHT\n */\n.slide-left-right > .ng-enter, .slide-left-right.ng-enter, .slide-left-right > .ng-leave, .slide-left-right.ng-leave, .slide-right-left.reverse > .ng-enter, .slide-right-left.reverse.ng-enter, .slide-right-left.reverse > .ng-leave, .slide-right-left.reverse.ng-leave {\n  -webkit-transition: all ease-in-out 250ms;\n  -moz-transition: all ease-in-out 250ms;\n  transition: all ease-in-out 250ms;\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0; }\n.slide-left-right > .ng-enter, .slide-left-right.ng-enter, .slide-right-left.reverse > .ng-enter, .slide-right-left.reverse.ng-enter {\n  /* NEW content placed far RIGHT BEFORE it slides IN from the RIGHT */\n  -webkit-transform: translate3d(100%, 0, 0);\n  -moz-transform: translate3d(100%, 0, 0);\n  transform: translate3d(100%, 0, 0); }\n.slide-left-right > .ng-enter.ng-enter-active, .slide-left-right.ng-enter.ng-enter-active, .slide-right-left.reverse > .ng-enter.ng-enter-active, .slide-right-left.reverse.ng-enter.ng-enter-active {\n  /* NEW content ACTIVELY sliding IN from the RIGHT */\n  -webkit-transform: translate3d(0, 0, 0);\n  -moz-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0); }\n.slide-left-right > .ng-leave.ng-leave-active, .slide-left-right.ng-leave.ng-leave-active, .slide-right-left.reverse > .ng-leave.ng-leave-active, .slide-right-left.reverse.ng-leave.ng-leave-active {\n  /* OLD content ACTIVELY sliding OUT to the LEFT */\n  -webkit-transform: translate3d(-100%, 0, 0);\n  -moz-transform: translate3d(-100%, 0, 0);\n  transform: translate3d(-100%, 0, 0); }\n\n.slide-left-right.reverse > .ng-enter, .slide-left-right.reverse.ng-enter, .slide-left-right.reverse > .ng-leave, .slide-left-right.reverse.ng-leave, .slide-right-left > .ng-enter, .slide-right-left.ng-enter, .slide-right-left > .ng-leave, .slide-right-left.ng-leave {\n  -webkit-transition: all ease-in-out 250ms;\n  -moz-transition: all ease-in-out 250ms;\n  transition: all ease-in-out 250ms;\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0; }\n.slide-left-right.reverse > .ng-enter, .slide-left-right.reverse.ng-enter, .slide-right-left > .ng-enter, .slide-right-left.ng-enter {\n  /* NEW content placed far LEFT BEFORE it slides IN from the LEFT */\n  -webkit-transform: translate3d(-100%, 0, 0);\n  -moz-transform: translate3d(-100%, 0, 0);\n  transform: translate3d(-100%, 0, 0); }\n.slide-left-right.reverse > .ng-enter.ng-enter-active, .slide-left-right.reverse.ng-enter.ng-enter-active, .slide-right-left > .ng-enter.ng-enter-active, .slide-right-left.ng-enter.ng-enter-active {\n  /* NEW content ACTIVELY sliding IN from the LEFT */\n  -webkit-transform: translate3d(0, 0, 0);\n  -moz-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0); }\n.slide-left-right.reverse > .ng-leave.ng-leave-active, .slide-left-right.reverse.ng-leave.ng-leave-active, .slide-right-left > .ng-leave.ng-leave-active, .slide-right-left.ng-leave.ng-leave-active {\n  /* OLD content ACTIVELY sliding OUT to the RIGHT */\n  -webkit-transform: translate3d(100%, 0, 0);\n  -moz-transform: translate3d(100%, 0, 0);\n  transform: translate3d(100%, 0, 0); }\n\n/**\n * iOS7 style slide left to right\n * --------------------------------------------------\n */\n.slide-left-right-ios7 > .ng-enter, .slide-left-right-ios7.ng-enter, .slide-left-right-ios7 > .ng-leave, .slide-left-right-ios7.ng-leave, .slide-right-left-ios7.reverse > .ng-enter, .slide-right-left-ios7.reverse.ng-enter, .slide-right-left-ios7.reverse > .ng-leave, .slide-right-left-ios7.reverse.ng-leave {\n  -webkit-transition: all ease-in-out 250ms;\n  -moz-transition: all ease-in-out 250ms;\n  transition: all ease-in-out 250ms;\n  position: absolute;\n  top: 0;\n  right: -1px;\n  bottom: 0;\n  left: -1px;\n  width: auto;\n  border-right: 1px solid #ddd;\n  border-left: 1px solid #ddd; }\n.slide-left-right-ios7 > .ng-enter, .slide-left-right-ios7.ng-enter, .slide-right-left-ios7.reverse > .ng-enter, .slide-right-left-ios7.reverse.ng-enter {\n  /* NEW content placed far RIGHT BEFORE it slides IN from the RIGHT */\n  -webkit-transform: translate3d(100%, 0, 0);\n  -moz-transform: translate3d(100%, 0, 0);\n  transform: translate3d(100%, 0, 0); }\n.slide-left-right-ios7 > .ng-enter.ng-enter-active, .slide-left-right-ios7.ng-enter.ng-enter-active, .slide-right-left-ios7.reverse > .ng-enter.ng-enter-active, .slide-right-left-ios7.reverse.ng-enter.ng-enter-active {\n  /* NEW content ACTIVELY sliding IN from the RIGHT */\n  -webkit-transform: translate3d(0, 0, 0);\n  -moz-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0); }\n.slide-left-right-ios7 > .ng-leave.ng-leave-active, .slide-left-right-ios7.ng-leave.ng-leave-active, .slide-right-left-ios7.reverse > .ng-leave.ng-leave-active, .slide-right-left-ios7.reverse.ng-leave.ng-leave-active {\n  /* OLD content ACTIVELY sliding OUT to the LEFT */\n  -webkit-transform: translate3d(-15%, 0, 0);\n  -moz-transform: translate3d(-15%, 0, 0);\n  transform: translate3d(-15%, 0, 0); }\n\n.slide-left-right-ios7.reverse > .ng-enter, .slide-left-right-ios7.reverse.ng-enter, .slide-left-right-ios7.reverse > .ng-leave, .slide-left-right-ios7.reverse.ng-leave, .slide-right-left-ios7 > .ng-enter, .slide-right-left-ios7.ng-enter, .slide-right-left-ios7 > .ng-leave, .slide-right-left-ios7.ng-leave {\n  -webkit-transition: all ease-in-out 250ms;\n  -moz-transition: all ease-in-out 250ms;\n  transition: all ease-in-out 250ms;\n  position: absolute;\n  top: 0;\n  right: -1px;\n  bottom: 0;\n  left: -1px;\n  width: auto;\n  border-right: 1px solid #ddd;\n  border-left: 1px solid #ddd; }\n.slide-left-right-ios7.reverse > .ng-enter, .slide-left-right-ios7.reverse.ng-enter, .slide-right-left-ios7 > .ng-enter, .slide-right-left-ios7.ng-enter {\n  /* NEW content placed far LEFT BEFORE it slides IN from the LEFT */\n  -webkit-transform: translate3d(-100%, 0, 0);\n  -moz-transform: translate3d(-100%, 0, 0);\n  transform: translate3d(-100%, 0, 0); }\n.slide-left-right-ios7.reverse > .ng-enter.ng-enter-active, .slide-left-right-ios7.reverse.ng-enter.ng-enter-active, .slide-right-left-ios7 > .ng-enter.ng-enter-active, .slide-right-left-ios7.ng-enter.ng-enter-active {\n  /* NEW content ACTIVELY sliding IN from the LEFT */\n  -webkit-transform: translate3d(0, 0, 0);\n  -moz-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0); }\n.slide-left-right-ios7.reverse > .ng-leave.ng-leave-active, .slide-left-right-ios7.reverse.ng-leave.ng-leave-active, .slide-right-left-ios7 > .ng-leave.ng-leave-active, .slide-right-left-ios7.ng-leave.ng-leave-active {\n  /* OLD content ACTIVELY sliding OUT to the RIGHT */\n  -webkit-transform: translate3d(15%, 0, 0);\n  -moz-transform: translate3d(15%, 0, 0);\n  transform: translate3d(15%, 0, 0); }\n\n.slide-in-left {\n  -webkit-transform: translate3d(0%, 0, 0);\n  -moz-transform: translate3d(0%, 0, 0);\n  transform: translate3d(0%, 0, 0); }\n  .slide-in-left.ng-enter, .slide-in-left > .ng-enter {\n    -webkit-animation-name: slideInFromLeft;\n    -moz-animation-name: slideInFromLeft;\n    animation-name: slideInFromLeft;\n    -webkit-animation-duration: 250ms;\n    -moz-animation-duration: 250ms;\n    animation-duration: 250ms;\n    -webkit-animation-timing-function: ease-in-out;\n    -moz-animation-timing-function: ease-in-out;\n    animation-timing-function: ease-in-out;\n    -webkit-animation-fill-mode: both;\n    -moz-animation-fill-mode: both;\n    animation-fill-mode: both; }\n  .slide-in-left.ng-leave, .slide-in-left > .ng-leave {\n    -webkit-animation-name: slideOutToLeft;\n    -moz-animation-name: slideOutToLeft;\n    animation-name: slideOutToLeft;\n    -webkit-animation-duration: 250ms;\n    -moz-animation-duration: 250ms;\n    animation-duration: 250ms;\n    -webkit-animation-timing-function: ease-in-out;\n    -moz-animation-timing-function: ease-in-out;\n    animation-timing-function: ease-in-out;\n    -webkit-animation-fill-mode: both;\n    -moz-animation-fill-mode: both;\n    animation-fill-mode: both; }\n\n.slide-in-left-add {\n  -webkit-transform: translate3d(100%, 0, 0);\n  -moz-transform: translate3d(100%, 0, 0);\n  transform: translate3d(100%, 0, 0);\n  -webkit-animation-duration: 250ms;\n  -moz-animation-duration: 250ms;\n  animation-duration: 250ms;\n  -webkit-animation-timing-function: ease-in-out;\n  -moz-animation-timing-function: ease-in-out;\n  animation-timing-function: ease-in-out;\n  -webkit-animation-fill-mode: both;\n  -moz-animation-fill-mode: both;\n  animation-fill-mode: both; }\n\n.slide-in-left-add-active {\n  -webkit-animation-name: slideInFromLeft;\n  -moz-animation-name: slideInFromLeft;\n  animation-name: slideInFromLeft; }\n\n.slide-out-left {\n  -webkit-transform: translate3d(-100%, 0, 0);\n  -moz-transform: translate3d(-100%, 0, 0);\n  transform: translate3d(-100%, 0, 0); }\n  .slide-out-left.ng-enter, .slide-out-left > .ng-enter {\n    -webkit-animation-name: slideOutToLeft;\n    -moz-animation-name: slideOutToLeft;\n    animation-name: slideOutToLeft;\n    -webkit-animation-duration: 250ms;\n    -moz-animation-duration: 250ms;\n    animation-duration: 250ms;\n    -webkit-animation-timing-function: ease-in-out;\n    -moz-animation-timing-function: ease-in-out;\n    animation-timing-function: ease-in-out;\n    -webkit-animation-fill-mode: both;\n    -moz-animation-fill-mode: both;\n    animation-fill-mode: both; }\n  .slide-out-left.ng-leave, .slide-out-left > .ng-leave {\n    -webkit-animation-name: slideOutToLeft;\n    -moz-animation-name: slideOutToLeft;\n    animation-name: slideOutToLeft;\n    -webkit-animation-duration: 250ms;\n    -moz-animation-duration: 250ms;\n    animation-duration: 250ms;\n    -webkit-animation-timing-function: ease-in-out;\n    -moz-animation-timing-function: ease-in-out;\n    animation-timing-function: ease-in-out;\n    -webkit-animation-fill-mode: both;\n    -moz-animation-fill-mode: both;\n    animation-fill-mode: both; }\n\n\n.slide-out-left-add {\n  -webkit-transform: translate3d(0, 0, 0);\n  -moz-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n  -webkit-animation-duration: 250ms;\n  -moz-animation-duration: 250ms;\n  animation-duration: 250ms;\n  -webkit-animation-timing-function: ease-in-out;\n  -moz-animation-timing-function: ease-in-out;\n  animation-timing-function: ease-in-out;\n  -webkit-animation-fill-mode: both;\n  -moz-animation-fill-mode: both;\n  animation-fill-mode: both; }\n\n.slide-out-left-add-active {\n  -webkit-animation-name: slideOutToLeft;\n  -moz-animation-name: slideOutToLeft;\n  animation-name: slideOutToLeft; }\n\n.slide-in-right {\n  -webkit-transform: translate3d(0%, 0, 0);\n  -moz-transform: translate3d(0%, 0, 0);\n  transform: translate3d(0%, 0, 0); }\n  .slide-in-right.ng-enter, .slide-in-right > .ng-enter {\n    -webkit-animation-name: slideInFromRight;\n    -moz-animation-name: slideInFromRight;\n    animation-name: slideInFromRight;\n    -webkit-animation-duration: 250ms;\n    -moz-animation-duration: 250ms;\n    animation-duration: 250ms;\n    -webkit-animation-timing-function: ease-in-out;\n    -moz-animation-timing-function: ease-in-out;\n    animation-timing-function: ease-in-out;\n    -webkit-animation-fill-mode: both;\n    -moz-animation-fill-mode: both;\n    animation-fill-mode: both; }\n  .slide-in-right.ng-leave, .slide-in-right > .ng-leave {\n    -webkit-animation-name: slideInFromRight;\n    -moz-animation-name: slideInFromRight;\n    animation-name: slideInFromRight;\n    -webkit-animation-duration: 250ms;\n    -moz-animation-duration: 250ms;\n    animation-duration: 250ms;\n    -webkit-animation-timing-function: ease-in-out;\n    -moz-animation-timing-function: ease-in-out;\n    animation-timing-function: ease-in-out;\n    -webkit-animation-fill-mode: both;\n    -moz-animation-fill-mode: both;\n    animation-fill-mode: both; }\n\n.slide-in-right-add {\n  -webkit-transform: translate3d(-100%, 0, 0);\n  -moz-transform: translate3d(-100%, 0, 0);\n  transform: translate3d(-100%, 0, 0);\n  -webkit-animation-duration: 250ms;\n  -moz-animation-duration: 250ms;\n  animation-duration: 250ms;\n  -webkit-animation-timing-function: ease-in-out;\n  -moz-animation-timing-function: ease-in-out;\n  animation-timing-function: ease-in-out;\n  -webkit-animation-fill-mode: both;\n  -moz-animation-fill-mode: both;\n  animation-fill-mode: both; }\n\n.slide-in-right-add-active {\n  -webkit-animation-name: slideInFromRight;\n  -moz-animation-name: slideInFromRight;\n  animation-name: slideInFromRight; }\n\n.slide-out-right {\n  -webkit-transform: translate3d(100%, 0, 0);\n  -moz-transform: translate3d(100%, 0, 0);\n  transform: translate3d(100%, 0, 0); }\n  .slide-out-right.ng-enter, .slide-out-right > .ng-enter {\n    -webkit-animation-name: slideOutToRight;\n    -moz-animation-name: slideOutToRight;\n    animation-name: slideOutToRight;\n    -webkit-animation-duration: 250ms;\n    -moz-animation-duration: 250ms;\n    animation-duration: 250ms;\n    -webkit-animation-timing-function: ease-in-out;\n    -moz-animation-timing-function: ease-in-out;\n    animation-timing-function: ease-in-out;\n    -webkit-animation-fill-mode: both;\n    -moz-animation-fill-mode: both;\n    animation-fill-mode: both; }\n  .slide-out-right.ng-leave, .slide-out-right > .ng-leave {\n    -webkit-animation-name: slideOutToRight;\n    -moz-animation-name: slideOutToRight;\n    animation-name: slideOutToRight;\n    -webkit-animation-duration: 250ms;\n    -moz-animation-duration: 250ms;\n    animation-duration: 250ms;\n    -webkit-animation-timing-function: ease-in-out;\n    -moz-animation-timing-function: ease-in-out;\n    animation-timing-function: ease-in-out;\n    -webkit-animation-fill-mode: both;\n    -moz-animation-fill-mode: both;\n    animation-fill-mode: both; }\n\n.slide-out-right-add {\n  -webkit-transform: translate3d(0, 0, 0);\n  -moz-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n  -webkit-animation-duration: 250ms;\n  -moz-animation-duration: 250ms;\n  animation-duration: 250ms;\n  -webkit-animation-timing-function: ease-in-out;\n  -moz-animation-timing-function: ease-in-out;\n  animation-timing-function: ease-in-out;\n  -webkit-animation-fill-mode: both;\n  -moz-animation-fill-mode: both;\n  animation-fill-mode: both; }\n\n.slide-out-right-add-active {\n  -webkit-animation-name: slideOutToRight;\n  -moz-animation-name: slideOutToRight;\n  animation-name: slideOutToRight; }\n\n/**\n * Slide up from the bottom, used for modals\n * --------------------------------------------------\n */\n.slide-in-up {\n  -webkit-transform: translate3d(0, 100%, 0);\n  -moz-transform: translate3d(0, 100%, 0);\n  transform: translate3d(0, 100%, 0); }\n\n.slide-in-up.ng-enter, .slide-in-up > .ng-enter {\n  -webkit-transition: all cubic-bezier(0.1, 0.7, 0.1, 1) 400ms;\n  -moz-transition: all cubic-bezier(0.1, 0.7, 0.1, 1) 400ms;\n  transition: all cubic-bezier(0.1, 0.7, 0.1, 1) 400ms; }\n\n.slide-in-up.ng-enter-active, .slide-in-up > .ng-enter-active {\n  -webkit-transform: translate3d(0, 0, 0);\n  -moz-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0); }\n\n.slide-in-up.ng-leave, .slide-in-up > .ng-leave {\n  -webkit-transition: all ease-in-out 250ms;\n  -moz-transition: all ease-in-out 250ms;\n  transition: all ease-in-out 250ms; }\n\n.fade-in {\n  -webkit-animation: fadeOut 0.3s;\n  -moz-animation: fadeOut 0.3s;\n  animation: fadeOut 0.3s; }\n  .fade-in.active {\n    -webkit-animation: fadeIn 0.3s;\n    -moz-animation: fadeIn 0.3s;\n    animation: fadeIn 0.3s; }\n\n.fade-in-not-out.ng-enter, .fade-in-not-out .ng-enter {\n  -webkit-animation: fadeIn 0.3s;\n  -moz-animation: fadeIn 0.3s;\n  animation: fadeIn 0.3s;\n  position: relative; }\n.fade-in-not-out.ng-leave, .fade-in-not-out .ng-leave {\n  display: none; }\n\n/**\n * Some component specific animations\n */\n.nav-title-slide-ios7 > .ng-enter, .nav-title-slide-ios7.ng-enter, .nav-title-slide-ios7 > .ng-leave, .nav-title-slide-ios7.ng-leave {\n  -webkit-transition: all 250ms;\n  -moz-transition: all 250ms;\n  transition: all 250ms;\n  -webkit-transition-timing-function: ease-in-out;\n  -moz-transition-timing-function: ease-in-out;\n  transition-timing-function: ease-in-out;\n  opacity: 1; }\n.nav-title-slide-ios7 > .ng-enter, .nav-title-slide-ios7.ng-enter {\n  -webkit-transform: translate3d(30%, 0, 0);\n  -moz-transform: translate3d(30%, 0, 0);\n  transform: translate3d(30%, 0, 0);\n  opacity: 0; }\n.nav-title-slide-ios7 > .ng-enter.ng-enter-active, .nav-title-slide-ios7.ng-enter.ng-enter-active {\n  -webkit-transform: translate3d(0, 0, 0);\n  -moz-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n  opacity: 1; }\n.nav-title-slide-ios7 > .ng-leave.ng-leave-active, .nav-title-slide-ios7.ng-leave.ng-leave-active {\n  -webkit-transform: translate3d(-30%, 0, 0);\n  -moz-transform: translate3d(-30%, 0, 0);\n  transform: translate3d(-30%, 0, 0);\n  opacity: 0; }\n.nav-title-slide-ios7.reverse > .ng-enter, .nav-title-slide-ios7.reverse.ng-enter, .nav-title-slide-ios7.reverse > .ng-leave, .nav-title-slide-ios7.reverse.ng-leave {\n  -webkit-transition: all ease-in-out 250ms;\n  -moz-transition: all ease-in-out 250ms;\n  transition: all ease-in-out 250ms;\n  opacity: 1; }\n.nav-title-slide-ios7.reverse > .ng-enter, .nav-title-slide-ios7.reverse.ng-enter {\n  -webkit-transform: translate3d(-30%, 0, 0);\n  -moz-transform: translate3d(-30%, 0, 0);\n  transform: translate3d(-30%, 0, 0);\n  opacity: 0; }\n.nav-title-slide-ios7.reverse > .ng-enter.ng-enter-active, .nav-title-slide-ios7.reverse.ng-enter.ng-enter-active {\n  -webkit-transform: translate3d(0, 0, 0);\n  -moz-transform: translate3d(0, 0, 0);\n  transform: translate3d(0, 0, 0);\n  opacity: 1; }\n.nav-title-slide-ios7.reverse > .ng-leave.ng-leave-active, .nav-title-slide-ios7.reverse.ng-leave.ng-leave-active {\n  -webkit-transform: translate3d(30%, 0, 0);\n  -moz-transform: translate3d(30%, 0, 0);\n  transform: translate3d(30%, 0, 0);\n  opacity: 0; }\n\n/**\n * Grid\n * --------------------------------------------------\n * Using flexbox for the grid, inspired by Philip Walton:\n * http://philipwalton.github.io/solved-by-flexbox/demos/grids/\n * By default each .col within a .row will evenly take up\n * available width, and the height of each .col with take\n * up the height of the tallest .col in the same .row.\n */\n.row {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  padding: 5px;\n  width: 100%; }\n\n.row + .row {\n  margin-top: -5px;\n  padding-top: 0; }\n\n.col {\n  -webkit-box-flex: 1;\n  -webkit-flex: 1;\n  -moz-box-flex: 1;\n  -moz-flex: 1;\n  -ms-flex: 1;\n  flex: 1;\n  display: block;\n  padding: 5px;\n  width: 100%; }\n\n/* Vertically Align Columns */\n/* .row-* vertically aligns every .col in the .row */\n.row-top {\n  -webkit-box-align: start;\n  -ms-flex-align: start;\n  -webkit-align-items: flex-start;\n  -moz-align-items: flex-start;\n  align-items: flex-start; }\n\n.row-bottom {\n  -webkit-box-align: end;\n  -ms-flex-align: end;\n  -webkit-align-items: flex-end;\n  -moz-align-items: flex-end;\n  align-items: flex-end; }\n\n.row-center {\n  -webkit-box-align: center;\n  -ms-flex-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  align-items: center; }\n\n/* .col-* vertically aligns an individual .col */\n.col-top {\n  -webkit-align-self: flex-start;\n  -moz-align-self: flex-start;\n  -ms-flex-item-align: start;\n  align-self: flex-start; }\n\n.col-bottom {\n  -webkit-align-self: flex-end;\n  -moz-align-self: flex-end;\n  -ms-flex-item-align: end;\n  align-self: flex-end; }\n\n.col-center {\n  -webkit-align-self: center;\n  -moz-align-self: center;\n  -ms-flex-item-align: center;\n  align-self: center; }\n\n/* Column Offsets */\n.col-offset-10 {\n  margin-left: 10%; }\n\n.col-offset-20 {\n  margin-left: 20%; }\n\n.col-offset-25 {\n  margin-left: 25%; }\n\n.col-offset-33, .col-offset-34 {\n  margin-left: 33.3333%; }\n\n.col-offset-50 {\n  margin-left: 50%; }\n\n.col-offset-66, .col-offset-67 {\n  margin-left: 66.6666%; }\n\n.col-offset-75 {\n  margin-left: 75%; }\n\n.col-offset-80 {\n  margin-left: 80%; }\n\n.col-offset-90 {\n  margin-left: 90%; }\n\n/* Explicit Column Percent Sizes */\n/* By default each grid column will evenly distribute */\n/* across the grid. However, you can specify individual */\n/* columns to take up a certain size of the available area */\n.col-10 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 10%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 10%;\n  -ms-flex: 0 0 10%;\n  flex: 0 0 10%;\n  max-width: 10%; }\n\n.col-20 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 20%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 20%;\n  -ms-flex: 0 0 20%;\n  flex: 0 0 20%;\n  max-width: 20%; }\n\n.col-25 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 25%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 25%;\n  -ms-flex: 0 0 25%;\n  flex: 0 0 25%;\n  max-width: 25%; }\n\n.col-33, .col-34 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 33.3333%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 33.3333%;\n  -ms-flex: 0 0 33.3333%;\n  flex: 0 0 33.3333%;\n  max-width: 33.3333%; }\n\n.col-50 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 50%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 50%;\n  -ms-flex: 0 0 50%;\n  flex: 0 0 50%;\n  max-width: 50%; }\n\n.col-66, .col-67 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 66.6666%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 66.6666%;\n  -ms-flex: 0 0 66.6666%;\n  flex: 0 0 66.6666%;\n  max-width: 66.6666%; }\n\n.col-75 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 75%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 75%;\n  -ms-flex: 0 0 75%;\n  flex: 0 0 75%;\n  max-width: 75%; }\n\n.col-80 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 80%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 80%;\n  -ms-flex: 0 0 80%;\n  flex: 0 0 80%;\n  max-width: 80%; }\n\n.col-90 {\n  -webkit-box-flex: 0;\n  -webkit-flex: 0 0 90%;\n  -moz-box-flex: 0;\n  -moz-flex: 0 0 90%;\n  -ms-flex: 0 0 90%;\n  flex: 0 0 90%;\n  max-width: 90%; }\n\n/* Responsive Grid Classes */\n/* Adding a class of responsive-X to a row */\n/* will trigger the flex-direction to */\n/* change to column and add some margin */\n/* to any columns in the row for clearity */\n@media (max-width: 567px) {\n  .responsive-sm {\n    -webkit-box-direction: normal;\n    -moz-box-direction: normal;\n    -webkit-box-orient: vertical;\n    -moz-box-orient: vertical;\n    -webkit-flex-direction: column;\n    -ms-flex-direction: column;\n    flex-direction: column; }\n    .responsive-sm .col, .responsive-sm .col-10, .responsive-sm .col-20, .responsive-sm .col-25, .responsive-sm .col-33, .responsive-sm .col-34, .responsive-sm .col-50, .responsive-sm .col-66, .responsive-sm .col-67, .responsive-sm .col-75, .responsive-sm .col-80, .responsive-sm .col-90 {\n      -webkit-box-flex: 1;\n      -webkit-flex: 1;\n      -moz-box-flex: 1;\n      -moz-flex: 1;\n      -ms-flex: 1;\n      flex: 1;\n      margin-bottom: 15px;\n      margin-left: 0;\n      max-width: 100%;\n      width: 100%; } }\n\n@media (max-width: 767px) {\n  .responsive-md {\n    -webkit-box-direction: normal;\n    -moz-box-direction: normal;\n    -webkit-box-orient: vertical;\n    -moz-box-orient: vertical;\n    -webkit-flex-direction: column;\n    -ms-flex-direction: column;\n    flex-direction: column; }\n    .responsive-md .col, .responsive-md .col-10, .responsive-md .col-20, .responsive-md .col-25, .responsive-md .col-33, .responsive-md .col-34, .responsive-md .col-50, .responsive-md .col-66, .responsive-md .col-67, .responsive-md .col-75, .responsive-md .col-80, .responsive-md .col-90 {\n      -webkit-box-flex: 1;\n      -webkit-flex: 1;\n      -moz-box-flex: 1;\n      -moz-flex: 1;\n      -ms-flex: 1;\n      flex: 1;\n      margin-bottom: 15px;\n      margin-left: 0;\n      max-width: 100%;\n      width: 100%; } }\n\n@media (max-width: 1023px) {\n  .responsive-lg {\n    -webkit-box-direction: normal;\n    -moz-box-direction: normal;\n    -webkit-box-orient: vertical;\n    -moz-box-orient: vertical;\n    -webkit-flex-direction: column;\n    -ms-flex-direction: column;\n    flex-direction: column; }\n    .responsive-lg .col, .responsive-lg .col-10, .responsive-lg .col-20, .responsive-lg .col-25, .responsive-lg .col-33, .responsive-lg .col-34, .responsive-lg .col-50, .responsive-lg .col-66, .responsive-lg .col-67, .responsive-lg .col-75, .responsive-lg .col-80, .responsive-lg .col-90 {\n      -webkit-box-flex: 1;\n      -webkit-flex: 1;\n      -moz-box-flex: 1;\n      -moz-flex: 1;\n      -ms-flex: 1;\n      flex: 1;\n      margin-bottom: 15px;\n      margin-left: 0;\n      max-width: 100%;\n      width: 100%; } }\n\n/**\n * Utility Classes\n * --------------------------------------------------\n */\n.hide {\n  display: none; }\n\n.opacity-hide {\n  opacity: 0; }\n\n.grade-b .opacity-hide, .grade-c .opacity-hide {\n  opacity: 1;\n  display: none; }\n\n.show {\n  display: block; }\n\n.opacity-show {\n  opacity: 1; }\n\n.invisible {\n  visibility: hidden; }\n\n.footer-hide .bar-footer, .footer-hide .tabs {\n  display: none; }\n.footer-hide .has-footer, .footer-hide .has-tabs {\n  bottom: 0; }\n\n.inline {\n  display: inline-block; }\n\n.disable-pointer-events {\n  pointer-events: none; }\n\n.enable-pointer-events {\n  pointer-events: auto; }\n\n.disable-user-behavior {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  -webkit-touch-callout: none;\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n  -webkit-tap-highlight-color: transparent;\n  -webkit-user-drag: none;\n  -ms-touch-action: none;\n  -ms-content-zooming: none; }\n\n.block {\n  display: block;\n  clear: both; }\n  .block:after {\n    display: block;\n    visibility: hidden;\n    clear: both;\n    height: 0;\n    content: \".\"; }\n\n.full-image {\n  width: 100%; }\n\n.clearfix {\n  *zoom: 1; }\n  .clearfix:before, .clearfix:after {\n    display: table;\n    content: \"\";\n    line-height: 0; }\n  .clearfix:after {\n    clear: both; }\n\n/**\n * Content Padding\n * --------------------------------------------------\n */\n.padding {\n  padding: 10px; }\n\n.padding-top, .padding-vertical {\n  padding-top: 10px; }\n\n.padding-right, .padding-horizontal {\n  padding-right: 10px; }\n\n.padding-bottom, .padding-vertical {\n  padding-bottom: 10px; }\n\n.padding-left, .padding-horizontal {\n  padding-left: 10px; }\n\n/**\n * Rounded\n * --------------------------------------------------\n */\n.rounded {\n  border-radius: 4px; }\n\n/**\n * Utility Colors\n * --------------------------------------------------\n * Utility colors are added to help set a naming convention. You'll\n * notice we purposely do not use words like \"red\" or \"blue\", but\n * instead have colors which represent an emotion or generic theme.\n */\n.light, a.light {\n  color: #fff; }\n\n.light-bg {\n  background-color: #fff; }\n\n.light-border {\n  border-color: #ddd; }\n\n.stable, a.stable {\n  color: #f8f8f8; }\n\n.stable-bg {\n  background-color: #f8f8f8; }\n\n.stable-border {\n  border-color: #b2b2b2; }\n\n.positive, a.positive {\n  color: #4a87ee; }\n\n.positive-bg {\n  background-color: #4a87ee; }\n\n.positive-border {\n  border-color: #145fd7; }\n\n.calm, a.calm {\n  color: #43cee6; }\n\n.calm-bg {\n  background-color: #43cee6; }\n\n.calm-border {\n  border-color: #1aacc3; }\n\n.assertive, a.assertive {\n  color: #ef4e3a; }\n\n.assertive-bg {\n  background-color: #ef4e3a; }\n\n.assertive-border {\n  border-color: #cc2311; }\n\n.balanced, a.balanced {\n  color: #66cc33; }\n\n.balanced-bg {\n  background-color: #66cc33; }\n\n.balanced-border {\n  border-color: #498f24; }\n\n.energized, a.energized {\n  color: #f0b840; }\n\n.energized-bg {\n  background-color: #f0b840; }\n\n.energized-border {\n  border-color: #d39211; }\n\n.royal, a.royal {\n  color: #8a6de9; }\n\n.royal-bg {\n  background-color: #8a6de9; }\n\n.royal-border {\n  border-color: #552bdf; }\n\n.dark, a.dark {\n  color: #444; }\n\n.dark-bg {\n  background-color: #444; }\n\n.dark-border {\n  border-color: #111; }\n\n/**\n * Platform\n * --------------------------------------------------\n * Platform specific tweaks when in Cordova.\n */\n.platform-ios7.platform-cordova:not(.fullscreen) .bar-header {\n  height: 64px; }\n  .platform-ios7.platform-cordova:not(.fullscreen) .bar-header.item-input-inset .item-input-wrapper {\n    margin-top: 19px !important; }\n  .platform-ios7.platform-cordova:not(.fullscreen) .bar-header > * {\n    margin-top: 20px; }\n.platform-ios7.platform-cordova:not(.fullscreen) .has-header, .platform-ios7.platform-cordova:not(.fullscreen) .bar-subheader {\n  top: 64px; }\n.platform-ios7.platform-cordova:not(.fullscreen) .has-subheader {\n  top: 108px; }\n\n.platform-ios7.status-bar-hide {\n  margin-bottom: 20px; }\n\n.platform-android.platform-cordova .bar-header {\n  height: 48px; }\n.platform-android.platform-cordova .has-header, .platform-android.platform-cordova .bar-subheader {\n  top: 48px; }\n.platform-android.platform-cordova .has-subheader {\n  top: 96px; }\n.platform-android.platform-cordova .title {\n  line-height: 48px; }\n"
  },
  {
    "path": "ionic1/official/maps/www/lib/ionic/js/angular/angular-animate.js",
    "content": "/**\n * @license AngularJS v1.2.12\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\n/* jshint maxlen: false */\n\n/**\n * @ngdoc overview\n * @name ngAnimate\n * @description\n *\n * # ngAnimate\n *\n * The `ngAnimate` module provides support for JavaScript, CSS3 transition and CSS3 keyframe animation hooks within existing core and custom directives.\n *\n * {@installModule animate}\n *\n * <div doc-module-components=\"ngAnimate\"></div>\n *\n * # Usage\n *\n * To see animations in action, all that is required is to define the appropriate CSS classes\n * or to register a JavaScript animation via the myModule.animation() function. The directives that support animation automatically are:\n * `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation\n * by using the `$animate` service.\n *\n * Below is a more detailed breakdown of the supported animation events provided by pre-existing ng directives:\n *\n * | Directive                                                 | Supported Animations                               |\n * |---------------------------------------------------------- |----------------------------------------------------|\n * | {@link ng.directive:ngRepeat#usage_animations ngRepeat}         | enter, leave and move                              |\n * | {@link ngRoute.directive:ngView#usage_animations ngView}        | enter and leave                                    |\n * | {@link ng.directive:ngInclude#usage_animations ngInclude}       | enter and leave                                    |\n * | {@link ng.directive:ngSwitch#usage_animations ngSwitch}         | enter and leave                                    |\n * | {@link ng.directive:ngIf#usage_animations ngIf}                 | enter and leave                                    |\n * | {@link ng.directive:ngClass#usage_animations ngClass}           | add and remove                                     |\n * | {@link ng.directive:ngShow#usage_animations ngShow & ngHide}    | add and remove (the ng-hide class value)           |\n *\n * You can find out more information about animations upon visiting each directive page.\n *\n * Below is an example of how to apply animations to a directive that supports animation hooks:\n *\n * <pre>\n * <style type=\"text/css\">\n * .slide.ng-enter, .slide.ng-leave {\n *   -webkit-transition:0.5s linear all;\n *   transition:0.5s linear all;\n * }\n *\n * .slide.ng-enter { }        /&#42; starting animations for enter &#42;/\n * .slide.ng-enter-active { } /&#42; terminal animations for enter &#42;/\n * .slide.ng-leave { }        /&#42; starting animations for leave &#42;/\n * .slide.ng-leave-active { } /&#42; terminal animations for leave &#42;/\n * </style>\n *\n * <!--\n * the animate service will automatically add .ng-enter and .ng-leave to the element\n * to trigger the CSS transition/animations\n * -->\n * <ANY class=\"slide\" ng-include=\"...\"></ANY>\n * </pre>\n *\n * Keep in mind that if an animation is running, any child elements cannot be animated until the parent element's\n * animation has completed.\n *\n * <h2>CSS-defined Animations</h2>\n * The animate service will automatically apply two CSS classes to the animated element and these two CSS classes\n * are designed to contain the start and end CSS styling. Both CSS transitions and keyframe animations are supported\n * and can be used to play along with this naming structure.\n *\n * The following code below demonstrates how to perform animations using **CSS transitions** with Angular:\n *\n * <pre>\n * <style type=\"text/css\">\n * /&#42;\n *  The animate class is apart of the element and the ng-enter class\n *  is attached to the element once the enter animation event is triggered\n * &#42;/\n * .reveal-animation.ng-enter {\n *  -webkit-transition: 1s linear all; /&#42; Safari/Chrome &#42;/\n *  transition: 1s linear all; /&#42; All other modern browsers and IE10+ &#42;/\n *\n *  /&#42; The animation preparation code &#42;/\n *  opacity: 0;\n * }\n *\n * /&#42;\n *  Keep in mind that you want to combine both CSS\n *  classes together to avoid any CSS-specificity\n *  conflicts\n * &#42;/\n * .reveal-animation.ng-enter.ng-enter-active {\n *  /&#42; The animation code itself &#42;/\n *  opacity: 1;\n * }\n * </style>\n *\n * <div class=\"view-container\">\n *   <div ng-view class=\"reveal-animation\"></div>\n * </div>\n * </pre>\n *\n * The following code below demonstrates how to perform animations using **CSS animations** with Angular:\n *\n * <pre>\n * <style type=\"text/css\">\n * .reveal-animation.ng-enter {\n *   -webkit-animation: enter_sequence 1s linear; /&#42; Safari/Chrome &#42;/\n *   animation: enter_sequence 1s linear; /&#42; IE10+ and Future Browsers &#42;/\n * }\n * &#64-webkit-keyframes enter_sequence {\n *   from { opacity:0; }\n *   to { opacity:1; }\n * }\n * &#64keyframes enter_sequence {\n *   from { opacity:0; }\n *   to { opacity:1; }\n * }\n * </style>\n *\n * <div class=\"view-container\">\n *   <div ng-view class=\"reveal-animation\"></div>\n * </div>\n * </pre>\n *\n * Both CSS3 animations and transitions can be used together and the animate service will figure out the correct duration and delay timing.\n *\n * Upon DOM mutation, the event class is added first (something like `ng-enter`), then the browser prepares itself to add\n * the active class (in this case `ng-enter-active`) which then triggers the animation. The animation module will automatically\n * detect the CSS code to determine when the animation ends. Once the animation is over then both CSS classes will be\n * removed from the DOM. If a browser does not support CSS transitions or CSS animations then the animation will start and end\n * immediately resulting in a DOM element that is at its final state. This final state is when the DOM element\n * has no CSS transition/animation classes applied to it.\n *\n * <h3>CSS Staggering Animations</h3>\n * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a\n * curtain-like effect. The ngAnimate module, as of 1.2.0, supports staggering animations and the stagger effect can be\n * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for\n * the animation. The style property expected within the stagger class can either be a **transition-delay** or an\n * **animation-delay** property (or both if your animation contains both transitions and keyframe animations).\n *\n * <pre>\n * .my-animation.ng-enter {\n *   /&#42; standard transition code &#42;/\n *   -webkit-transition: 1s linear all;\n *   transition: 1s linear all;\n *   opacity:0;\n * }\n * .my-animation.ng-enter-stagger {\n *   /&#42; this will have a 100ms delay between each successive leave animation &#42;/\n *   -webkit-transition-delay: 0.1s;\n *   transition-delay: 0.1s;\n *\n *   /&#42; in case the stagger doesn't work then these two values\n *    must be set to 0 to avoid an accidental CSS inheritance &#42;/\n *   -webkit-transition-duration: 0s;\n *   transition-duration: 0s;\n * }\n * .my-animation.ng-enter.ng-enter-active {\n *   /&#42; standard transition styles &#42;/\n *   opacity:1;\n * }\n * </pre>\n *\n * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations\n * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this\n * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation\n * will also be reset if more than 10ms has passed after the last animation has been fired.\n *\n * The following code will issue the **ng-leave-stagger** event on the element provided:\n *\n * <pre>\n * var kids = parent.children();\n *\n * $animate.leave(kids[0]); //stagger index=0\n * $animate.leave(kids[1]); //stagger index=1\n * $animate.leave(kids[2]); //stagger index=2\n * $animate.leave(kids[3]); //stagger index=3\n * $animate.leave(kids[4]); //stagger index=4\n *\n * $timeout(function() {\n *   //stagger has reset itself\n *   $animate.leave(kids[5]); //stagger index=0\n *   $animate.leave(kids[6]); //stagger index=1\n * }, 100, false);\n * </pre>\n *\n * Stagger animations are currently only supported within CSS-defined animations.\n *\n * <h2>JavaScript-defined Animations</h2>\n * In the event that you do not want to use CSS3 transitions or CSS3 animations or if you wish to offer animations on browsers that do not\n * yet support CSS transitions/animations, then you can make use of JavaScript animations defined inside of your AngularJS module.\n *\n * <pre>\n * //!annotate=\"YourApp\" Your AngularJS Module|Replace this or ngModule with the module that you used to define your application.\n * var ngModule = angular.module('YourApp', ['ngAnimate']);\n * ngModule.animation('.my-crazy-animation', function() {\n *   return {\n *     enter: function(element, done) {\n *       //run the animation here and call done when the animation is complete\n *       return function(cancelled) {\n *         //this (optional) function will be called when the animation\n *         //completes or when the animation is cancelled (the cancelled\n *         //flag will be set to true if cancelled).\n *       };\n *     },\n *     leave: function(element, done) { },\n *     move: function(element, done) { },\n *\n *     //animation that can be triggered before the class is added\n *     beforeAddClass: function(element, className, done) { },\n *\n *     //animation that can be triggered after the class is added\n *     addClass: function(element, className, done) { },\n *\n *     //animation that can be triggered before the class is removed\n *     beforeRemoveClass: function(element, className, done) { },\n *\n *     //animation that can be triggered after the class is removed\n *     removeClass: function(element, className, done) { }\n *   };\n * });\n * </pre>\n *\n * JavaScript-defined animations are created with a CSS-like class selector and a collection of events which are set to run\n * a javascript callback function. When an animation is triggered, $animate will look for a matching animation which fits\n * the element's CSS class attribute value and then run the matching animation event function (if found).\n * In other words, if the CSS classes present on the animated element match any of the JavaScript animations then the callback function will\n * be executed. It should be also noted that only simple, single class selectors are allowed (compound class selectors are not supported).\n *\n * Within a JavaScript animation, an object containing various event callback animation functions is expected to be returned.\n * As explained above, these callbacks are triggered based on the animation event. Therefore if an enter animation is run,\n * and the JavaScript animation is found, then the enter callback will handle that animation (in addition to the CSS keyframe animation\n * or transition code that is defined via a stylesheet).\n *\n */\n\nangular.module('ngAnimate', ['ng'])\n\n  /**\n   * @ngdoc object\n   * @name ngAnimate.$animateProvider\n   * @description\n   *\n   * The `$animateProvider` allows developers to register JavaScript animation event handlers directly inside of a module.\n   * When an animation is triggered, the $animate service will query the $animate service to find any animations that match\n   * the provided name value.\n   *\n   * Requires the {@link ngAnimate `ngAnimate`} module to be installed.\n   *\n   * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.\n   *\n   */\n  .factory('$$animateReflow', ['$window', '$timeout', function($window, $timeout) {\n    var requestAnimationFrame = $window.requestAnimationFrame       ||\n                                $window.webkitRequestAnimationFrame ||\n                                function(fn) {\n                                  return $timeout(fn, 10, false);\n                                };\n\n    var cancelAnimationFrame = $window.cancelAnimationFrame       ||\n                               $window.webkitCancelAnimationFrame ||\n                               function(timer) {\n                                 return $timeout.cancel(timer);\n                               };\n    return function(fn) {\n      var id = requestAnimationFrame(fn);\n      return function() {\n        cancelAnimationFrame(id);\n      };\n    };\n  }])\n\n  .config(['$provide', '$animateProvider', function($provide, $animateProvider) {\n    var noop = angular.noop;\n    var forEach = angular.forEach;\n    var selectors = $animateProvider.$$selectors;\n\n    var ELEMENT_NODE = 1;\n    var NG_ANIMATE_STATE = '$$ngAnimateState';\n    var NG_ANIMATE_CLASS_NAME = 'ng-animate';\n    var rootAnimateState = {running: true};\n\n    function extractElementNode(element) {\n      for(var i = 0; i < element.length; i++) {\n        var elm = element[i];\n        if(elm.nodeType == ELEMENT_NODE) {\n          return elm;\n        }\n      }\n    }\n\n    function isMatchingElement(elm1, elm2) {\n      return extractElementNode(elm1) == extractElementNode(elm2);\n    }\n\n    $provide.decorator('$animate', ['$delegate', '$injector', '$sniffer', '$rootElement', '$timeout', '$rootScope', '$document',\n                            function($delegate,   $injector,   $sniffer,   $rootElement,   $timeout,   $rootScope,   $document) {\n\n      $rootElement.data(NG_ANIMATE_STATE, rootAnimateState);\n\n      // disable animations during bootstrap, but once we bootstrapped, wait again\n      // for another digest until enabling animations. The reason why we digest twice\n      // is because all structural animations (enter, leave and move) all perform a\n      // post digest operation before animating. If we only wait for a single digest\n      // to pass then the structural animation would render its animation on page load.\n      // (which is what we're trying to avoid when the application first boots up.)\n      $rootScope.$$postDigest(function() {\n        $rootScope.$$postDigest(function() {\n          rootAnimateState.running = false;\n        });\n      });\n\n      var classNameFilter = $animateProvider.classNameFilter();\n      var isAnimatableClassName = !classNameFilter\n              ? function() { return true; }\n              : function(className) {\n                return classNameFilter.test(className);\n              };\n\n      function async(fn) {\n        return $timeout(fn, 0, false);\n      }\n\n      function lookup(name) {\n        if (name) {\n          var matches = [],\n              flagMap = {},\n              classes = name.substr(1).split('.');\n\n          //the empty string value is the default animation\n          //operation which performs CSS transition and keyframe\n          //animations sniffing. This is always included for each\n          //element animation procedure if the browser supports\n          //transitions and/or keyframe animations\n          if ($sniffer.transitions || $sniffer.animations) {\n            classes.push('');\n          }\n\n          for(var i=0; i < classes.length; i++) {\n            var klass = classes[i],\n                selectorFactoryName = selectors[klass];\n            if(selectorFactoryName && !flagMap[klass]) {\n              matches.push($injector.get(selectorFactoryName));\n              flagMap[klass] = true;\n            }\n          }\n          return matches;\n        }\n      }\n\n      /**\n       * @ngdoc object\n       * @name ngAnimate.$animate\n       * @function\n       *\n       * @description\n       * The `$animate` service provides animation detection support while performing DOM operations (enter, leave and move) as well as during addClass and removeClass operations.\n       * When any of these operations are run, the $animate service\n       * will examine any JavaScript-defined animations (which are defined by using the $animateProvider provider object)\n       * as well as any CSS-defined animations against the CSS classes present on the element once the DOM operation is run.\n       *\n       * The `$animate` service is used behind the scenes with pre-existing directives and animation with these directives\n       * will work out of the box without any extra configuration.\n       *\n       * Requires the {@link ngAnimate `ngAnimate`} module to be installed.\n       *\n       * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.\n       *\n       */\n      return {\n        /**\n         * @ngdoc function\n         * @name ngAnimate.$animate#enter\n         * @methodOf ngAnimate.$animate\n         * @function\n         *\n         * @description\n         * Appends the element to the parentElement element that resides in the document and then runs the enter animation. Once\n         * the animation is started, the following CSS classes will be present on the element for the duration of the animation:\n         *\n         * Below is a breakdown of each step that occurs during enter animation:\n         *\n         * | Animation Step                                                                               | What the element class attribute looks like |\n         * |----------------------------------------------------------------------------------------------|---------------------------------------------|\n         * | 1. $animate.enter(...) is called                                                             | class=\"my-animation\"                        |\n         * | 2. element is inserted into the parentElement element or beside the afterElement element     | class=\"my-animation\"                        |\n         * | 3. $animate runs any JavaScript-defined animations on the element                            | class=\"my-animation ng-animate\"             |\n         * | 4. the .ng-enter class is added to the element                                               | class=\"my-animation ng-animate ng-enter\"    |\n         * | 5. $animate scans the element styles to get the CSS transition/animation duration and delay  | class=\"my-animation ng-animate ng-enter\"    |\n         * | 6. $animate waits for 10ms (this performs a reflow)                                          | class=\"my-animation ng-animate ng-enter\"    |\n         * | 7. the .ng-enter-active and .ng-animate-active classes are added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-animate-active ng-enter ng-enter-active\" |\n         * | 8. $animate waits for X milliseconds for the animation to complete                           | class=\"my-animation ng-animate ng-animate-active ng-enter ng-enter-active\" |\n         * | 9. The animation ends and all generated CSS classes are removed from the element             | class=\"my-animation\"                        |\n         * | 10. The doneCallback() callback is fired (if provided)                                       | class=\"my-animation\"                        |\n         *\n         * @param {jQuery/jqLite element} element the element that will be the focus of the enter animation\n         * @param {jQuery/jqLite element} parentElement the parent element of the element that will be the focus of the enter animation\n         * @param {jQuery/jqLite element} afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation\n         * @param {function()=} doneCallback the callback function that will be called once the animation is complete\n        */\n        enter : function(element, parentElement, afterElement, doneCallback) {\n          this.enabled(false, element);\n          $delegate.enter(element, parentElement, afterElement);\n          $rootScope.$$postDigest(function() {\n            performAnimation('enter', 'ng-enter', element, parentElement, afterElement, noop, doneCallback);\n          });\n        },\n\n        /**\n         * @ngdoc function\n         * @name ngAnimate.$animate#leave\n         * @methodOf ngAnimate.$animate\n         * @function\n         *\n         * @description\n         * Runs the leave animation operation and, upon completion, removes the element from the DOM. Once\n         * the animation is started, the following CSS classes will be added for the duration of the animation:\n         *\n         * Below is a breakdown of each step that occurs during leave animation:\n         *\n         * | Animation Step                                                                               | What the element class attribute looks like |\n         * |----------------------------------------------------------------------------------------------|---------------------------------------------|\n         * | 1. $animate.leave(...) is called                                                             | class=\"my-animation\"                        |\n         * | 2. $animate runs any JavaScript-defined animations on the element                            | class=\"my-animation ng-animate\"             |\n         * | 3. the .ng-leave class is added to the element                                               | class=\"my-animation ng-animate ng-leave\"    |\n         * | 4. $animate scans the element styles to get the CSS transition/animation duration and delay  | class=\"my-animation ng-animate ng-leave\"    |\n         * | 5. $animate waits for 10ms (this performs a reflow)                                          | class=\"my-animation ng-animate ng-leave\"    |\n         * | 6. the .ng-leave-active and .ng-animate-active classes is added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-animate-active ng-leave ng-leave-active\" |\n         * | 7. $animate waits for X milliseconds for the animation to complete                           | class=\"my-animation ng-animate ng-animate-active ng-leave ng-leave-active\" |\n         * | 8. The animation ends and all generated CSS classes are removed from the element             | class=\"my-animation\"                        |\n         * | 9. The element is removed from the DOM                                                       | ...                                         |\n         * | 10. The doneCallback() callback is fired (if provided)                                       | ...                                         |\n         *\n         * @param {jQuery/jqLite element} element the element that will be the focus of the leave animation\n         * @param {function()=} doneCallback the callback function that will be called once the animation is complete\n        */\n        leave : function(element, doneCallback) {\n          cancelChildAnimations(element);\n          this.enabled(false, element);\n          $rootScope.$$postDigest(function() {\n            performAnimation('leave', 'ng-leave', element, null, null, function() {\n              $delegate.leave(element);\n            }, doneCallback);\n          });\n        },\n\n        /**\n         * @ngdoc function\n         * @name ngAnimate.$animate#move\n         * @methodOf ngAnimate.$animate\n         * @function\n         *\n         * @description\n         * Fires the move DOM operation. Just before the animation starts, the animate service will either append it into the parentElement container or\n         * add the element directly after the afterElement element if present. Then the move animation will be run. Once\n         * the animation is started, the following CSS classes will be added for the duration of the animation:\n         *\n         * Below is a breakdown of each step that occurs during move animation:\n         *\n         * | Animation Step                                                                               | What the element class attribute looks like |\n         * |----------------------------------------------------------------------------------------------|---------------------------------------------|\n         * | 1. $animate.move(...) is called                                                              | class=\"my-animation\"                        |\n         * | 2. element is moved into the parentElement element or beside the afterElement element        | class=\"my-animation\"                        |\n         * | 3. $animate runs any JavaScript-defined animations on the element                            | class=\"my-animation ng-animate\"             |\n         * | 4. the .ng-move class is added to the element                                                | class=\"my-animation ng-animate ng-move\"     |\n         * | 5. $animate scans the element styles to get the CSS transition/animation duration and delay  | class=\"my-animation ng-animate ng-move\"     |\n         * | 6. $animate waits for 10ms (this performs a reflow)                                          | class=\"my-animation ng-animate ng-move\"     |\n         * | 7. the .ng-move-active and .ng-animate-active classes is added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-animate-active ng-move ng-move-active\" |\n         * | 8. $animate waits for X milliseconds for the animation to complete                           | class=\"my-animation ng-animate ng-animate-active ng-move ng-move-active\" |\n         * | 9. The animation ends and all generated CSS classes are removed from the element             | class=\"my-animation\"                        |\n         * | 10. The doneCallback() callback is fired (if provided)                                       | class=\"my-animation\"                        |\n         *\n         * @param {jQuery/jqLite element} element the element that will be the focus of the move animation\n         * @param {jQuery/jqLite element} parentElement the parentElement element of the element that will be the focus of the move animation\n         * @param {jQuery/jqLite element} afterElement the sibling element (which is the previous element) of the element that will be the focus of the move animation\n         * @param {function()=} doneCallback the callback function that will be called once the animation is complete\n        */\n        move : function(element, parentElement, afterElement, doneCallback) {\n          cancelChildAnimations(element);\n          this.enabled(false, element);\n          $delegate.move(element, parentElement, afterElement);\n          $rootScope.$$postDigest(function() {\n            performAnimation('move', 'ng-move', element, parentElement, afterElement, noop, doneCallback);\n          });\n        },\n\n        /**\n         * @ngdoc function\n         * @name ngAnimate.$animate#addClass\n         * @methodOf ngAnimate.$animate\n         *\n         * @description\n         * Triggers a custom animation event based off the className variable and then attaches the className value to the element as a CSS class.\n         * Unlike the other animation methods, the animate service will suffix the className value with {@type -add} in order to provide\n         * the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if no CSS transitions\n         * or keyframes are defined on the -add or base CSS class).\n         *\n         * Below is a breakdown of each step that occurs during addClass animation:\n         *\n         * | Animation Step                                                                                 | What the element class attribute looks like |\n         * |------------------------------------------------------------------------------------------------|---------------------------------------------|\n         * | 1. $animate.addClass(element, 'super') is called                                               | class=\"my-animation\"                        |\n         * | 2. $animate runs any JavaScript-defined animations on the element                              | class=\"my-animation ng-animate\"             |\n         * | 3. the .super-add class are added to the element                                               | class=\"my-animation ng-animate super-add\"   |\n         * | 4. $animate scans the element styles to get the CSS transition/animation duration and delay    | class=\"my-animation ng-animate super-add\"   |\n         * | 5. $animate waits for 10ms (this performs a reflow)                                            | class=\"my-animation ng-animate super-add\"   |\n         * | 6. the .super, .super-add-active and .ng-animate-active classes are added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-animate-active super super-add super-add-active\"          |\n         * | 7. $animate waits for X milliseconds for the animation to complete                             | class=\"my-animation super-add super-add-active\"  |\n         * | 8. The animation ends and all generated CSS classes are removed from the element               | class=\"my-animation super\"                  |\n         * | 9. The super class is kept on the element                                                      | class=\"my-animation super\"                  |\n         * | 10. The doneCallback() callback is fired (if provided)                                         | class=\"my-animation super\"                  |\n         *\n         * @param {jQuery/jqLite element} element the element that will be animated\n         * @param {string} className the CSS class that will be added to the element and then animated\n         * @param {function()=} doneCallback the callback function that will be called once the animation is complete\n        */\n        addClass : function(element, className, doneCallback) {\n          performAnimation('addClass', className, element, null, null, function() {\n            $delegate.addClass(element, className);\n          }, doneCallback);\n        },\n\n        /**\n         * @ngdoc function\n         * @name ngAnimate.$animate#removeClass\n         * @methodOf ngAnimate.$animate\n         *\n         * @description\n         * Triggers a custom animation event based off the className variable and then removes the CSS class provided by the className value\n         * from the element. Unlike the other animation methods, the animate service will suffix the className value with {@type -remove} in\n         * order to provide the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if\n         * no CSS transitions or keyframes are defined on the -remove or base CSS classes).\n         *\n         * Below is a breakdown of each step that occurs during removeClass animation:\n         *\n         * | Animation Step                                                                                | What the element class attribute looks like     |\n         * |-----------------------------------------------------------------------------------------------|---------------------------------------------|\n         * | 1. $animate.removeClass(element, 'super') is called                                           | class=\"my-animation super\"                  |\n         * | 2. $animate runs any JavaScript-defined animations on the element                             | class=\"my-animation super ng-animate\"       |\n         * | 3. the .super-remove class are added to the element                                           | class=\"my-animation super ng-animate super-remove\"|\n         * | 4. $animate scans the element styles to get the CSS transition/animation duration and delay   | class=\"my-animation super ng-animate super-remove\"   |\n         * | 5. $animate waits for 10ms (this performs a reflow)                                           | class=\"my-animation super ng-animate super-remove\"   |\n         * | 6. the .super-remove-active and .ng-animate-active classes are added and .super is removed (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-animate-active super-remove super-remove-active\"          |\n         * | 7. $animate waits for X milliseconds for the animation to complete                            | class=\"my-animation ng-animate ng-animate-active super-remove super-remove-active\"   |\n         * | 8. The animation ends and all generated CSS classes are removed from the element              | class=\"my-animation\"                        |\n         * | 9. The doneCallback() callback is fired (if provided)                                         | class=\"my-animation\"                        |\n         *\n         *\n         * @param {jQuery/jqLite element} element the element that will be animated\n         * @param {string} className the CSS class that will be animated and then removed from the element\n         * @param {function()=} doneCallback the callback function that will be called once the animation is complete\n        */\n        removeClass : function(element, className, doneCallback) {\n          performAnimation('removeClass', className, element, null, null, function() {\n            $delegate.removeClass(element, className);\n          }, doneCallback);\n        },\n\n        /**\n         * @ngdoc function\n         * @name ngAnimate.$animate#enabled\n         * @methodOf ngAnimate.$animate\n         * @function\n         *\n         * @param {boolean=} value If provided then set the animation on or off.\n         * @param {jQuery/jqLite element=} element If provided then the element will be used to represent the enable/disable operation\n         * @return {boolean} Current animation state.\n         *\n         * @description\n         * Globally enables/disables animations.\n         *\n        */\n        enabled : function(value, element) {\n          switch(arguments.length) {\n            case 2:\n              if(value) {\n                cleanup(element);\n              } else {\n                var data = element.data(NG_ANIMATE_STATE) || {};\n                data.disabled = true;\n                element.data(NG_ANIMATE_STATE, data);\n              }\n            break;\n\n            case 1:\n              rootAnimateState.disabled = !value;\n            break;\n\n            default:\n              value = !rootAnimateState.disabled;\n            break;\n          }\n          return !!value;\n         }\n      };\n\n      /*\n        all animations call this shared animation triggering function internally.\n        The animationEvent variable refers to the JavaScript animation event that will be triggered\n        and the className value is the name of the animation that will be applied within the\n        CSS code. Element, parentElement and afterElement are provided DOM elements for the animation\n        and the onComplete callback will be fired once the animation is fully complete.\n      */\n      function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) {\n        var currentClassName, classes, node = extractElementNode(element);\n        if(node) {\n          currentClassName = node.className;\n          classes = currentClassName + ' ' + className;\n        }\n\n        //transcluded directives may sometimes fire an animation using only comment nodes\n        //best to catch this early on to prevent any animation operations from occurring\n        if(!node || !isAnimatableClassName(classes)) {\n          fireDOMOperation();\n          fireBeforeCallbackAsync();\n          fireAfterCallbackAsync();\n          closeAnimation();\n          return;\n        }\n\n        var animationLookup = (' ' + classes).replace(/\\s+/g,'.');\n        if (!parentElement) {\n          parentElement = afterElement ? afterElement.parent() : element.parent();\n        }\n\n        var matches = lookup(animationLookup);\n        var isClassBased = animationEvent == 'addClass' || animationEvent == 'removeClass';\n        var ngAnimateState = element.data(NG_ANIMATE_STATE) || {};\n\n        //skip the animation if animations are disabled, a parent is already being animated,\n        //the element is not currently attached to the document body or then completely close\n        //the animation if any matching animations are not found at all.\n        //NOTE: IE8 + IE9 should close properly (run closeAnimation()) in case a NO animation is not found.\n        if (animationsDisabled(element, parentElement) || matches.length === 0) {\n          fireDOMOperation();\n          fireBeforeCallbackAsync();\n          fireAfterCallbackAsync();\n          closeAnimation();\n          return;\n        }\n\n        var animations = [];\n\n        //only add animations if the currently running animation is not structural\n        //or if there is no animation running at all\n        var allowAnimations = isClassBased ?\n          !ngAnimateState.disabled && (!ngAnimateState.running || !ngAnimateState.structural) :\n          true;\n\n        if(allowAnimations) {\n          forEach(matches, function(animation) {\n            //add the animation to the queue to if it is allowed to be cancelled\n            if(!animation.allowCancel || animation.allowCancel(element, animationEvent, className)) {\n              var beforeFn, afterFn = animation[animationEvent];\n\n              //Special case for a leave animation since there is no point in performing an\n              //animation on a element node that has already been removed from the DOM\n              if(animationEvent == 'leave') {\n                beforeFn = afterFn;\n                afterFn = null; //this must be falsy so that the animation is skipped for leave\n              } else {\n                beforeFn = animation['before' + animationEvent.charAt(0).toUpperCase() + animationEvent.substr(1)];\n              }\n              animations.push({\n                before : beforeFn,\n                after : afterFn\n              });\n            }\n          });\n        }\n\n        //this would mean that an animation was not allowed so let the existing\n        //animation do it's thing and close this one early\n        if(animations.length === 0) {\n          fireDOMOperation();\n          fireBeforeCallbackAsync();\n          fireAfterCallbackAsync();\n          fireDoneCallbackAsync();\n          return;\n        }\n\n        var ONE_SPACE = ' ';\n        //this value will be searched for class-based CSS className lookup. Therefore,\n        //we prefix and suffix the current className value with spaces to avoid substring\n        //lookups of className tokens\n        var futureClassName = ONE_SPACE + currentClassName + ONE_SPACE;\n        if(ngAnimateState.running) {\n          //if an animation is currently running on the element then lets take the steps\n          //to cancel that animation and fire any required callbacks\n          $timeout.cancel(ngAnimateState.closeAnimationTimeout);\n          cleanup(element);\n          cancelAnimations(ngAnimateState.animations);\n\n          //in the event that the CSS is class is quickly added and removed back\n          //then we don't want to wait until after the reflow to add/remove the CSS\n          //class since both class animations may run into a race condition.\n          //The code below will check to see if that is occurring and will\n          //immediately remove the former class before the reflow so that the\n          //animation can snap back to the original animation smoothly\n          var isFullyClassBasedAnimation = isClassBased && !ngAnimateState.structural;\n          var isRevertingClassAnimation = isFullyClassBasedAnimation &&\n                                          ngAnimateState.className == className &&\n                                          animationEvent != ngAnimateState.event;\n\n          //if the class is removed during the reflow then it will revert the styles temporarily\n          //back to the base class CSS styling causing a jump-like effect to occur. This check\n          //here ensures that the domOperation is only performed after the reflow has commenced\n          if(ngAnimateState.beforeComplete || isRevertingClassAnimation) {\n            (ngAnimateState.done || noop)(true);\n          } else if(isFullyClassBasedAnimation) {\n            //class-based animations will compare element className values after cancelling the\n            //previous animation to see if the element properties already contain the final CSS\n            //class and if so then the animation will be skipped. Since the domOperation will\n            //be performed only after the reflow is complete then our element's className value\n            //will be invalid. Therefore the same string manipulation that would occur within the\n            //DOM operation will be performed below so that the class comparison is valid...\n            futureClassName = ngAnimateState.event == 'removeClass' ?\n              futureClassName.replace(ONE_SPACE + ngAnimateState.className + ONE_SPACE, ONE_SPACE) :\n              futureClassName + ngAnimateState.className + ONE_SPACE;\n          }\n        }\n\n        //There is no point in perform a class-based animation if the element already contains\n        //(on addClass) or doesn't contain (on removeClass) the className being animated.\n        //The reason why this is being called after the previous animations are cancelled\n        //is so that the CSS classes present on the element can be properly examined.\n        var classNameToken = ONE_SPACE + className + ONE_SPACE;\n        if((animationEvent == 'addClass'    && futureClassName.indexOf(classNameToken) >= 0) ||\n           (animationEvent == 'removeClass' && futureClassName.indexOf(classNameToken) == -1)) {\n          fireDOMOperation();\n          fireBeforeCallbackAsync();\n          fireAfterCallbackAsync();\n          fireDoneCallbackAsync();\n          return;\n        }\n\n        //the ng-animate class does nothing, but it's here to allow for\n        //parent animations to find and cancel child animations when needed\n        element.addClass(NG_ANIMATE_CLASS_NAME);\n\n        element.data(NG_ANIMATE_STATE, {\n          running:true,\n          event:animationEvent,\n          className:className,\n          structural:!isClassBased,\n          animations:animations,\n          done:onBeforeAnimationsComplete\n        });\n\n        //first we run the before animations and when all of those are complete\n        //then we perform the DOM operation and run the next set of animations\n        invokeRegisteredAnimationFns(animations, 'before', onBeforeAnimationsComplete);\n\n        function onBeforeAnimationsComplete(cancelled) {\n          fireDOMOperation();\n          if(cancelled === true) {\n            closeAnimation();\n            return;\n          }\n\n          //set the done function to the final done function\n          //so that the DOM event won't be executed twice by accident\n          //if the after animation is cancelled as well\n          var data = element.data(NG_ANIMATE_STATE);\n          if(data) {\n            data.done = closeAnimation;\n            element.data(NG_ANIMATE_STATE, data);\n          }\n          invokeRegisteredAnimationFns(animations, 'after', closeAnimation);\n        }\n\n        function invokeRegisteredAnimationFns(animations, phase, allAnimationFnsComplete) {\n          phase == 'after' ?\n            fireAfterCallbackAsync() :\n            fireBeforeCallbackAsync();\n\n          var endFnName = phase + 'End';\n          forEach(animations, function(animation, index) {\n            var animationPhaseCompleted = function() {\n              progress(index, phase);\n            };\n\n            //there are no before functions for enter + move since the DOM\n            //operations happen before the performAnimation method fires\n            if(phase == 'before' && (animationEvent == 'enter' || animationEvent == 'move')) {\n              animationPhaseCompleted();\n              return;\n            }\n\n            if(animation[phase]) {\n              animation[endFnName] = isClassBased ?\n                animation[phase](element, className, animationPhaseCompleted) :\n                animation[phase](element, animationPhaseCompleted);\n            } else {\n              animationPhaseCompleted();\n            }\n          });\n\n          function progress(index, phase) {\n            var phaseCompletionFlag = phase + 'Complete';\n            var currentAnimation = animations[index];\n            currentAnimation[phaseCompletionFlag] = true;\n            (currentAnimation[endFnName] || noop)();\n\n            for(var i=0;i<animations.length;i++) {\n              if(!animations[i][phaseCompletionFlag]) return;\n            }\n\n            allAnimationFnsComplete();\n          }\n        }\n\n        function fireDOMCallback(animationPhase) {\n          element.triggerHandler('$animate:' + animationPhase, {\n            event : animationEvent,\n            className : className\n          });\n        }\n\n        function fireBeforeCallbackAsync() {\n          async(function() {\n            fireDOMCallback('before');\n          });\n        }\n\n        function fireAfterCallbackAsync() {\n          async(function() {\n            fireDOMCallback('after');\n          });\n        }\n\n        function fireDoneCallbackAsync() {\n          async(function() {\n            fireDOMCallback('close');\n            doneCallback && doneCallback();\n          });\n        }\n\n        //it is less complicated to use a flag than managing and cancelling\n        //timeouts containing multiple callbacks.\n        function fireDOMOperation() {\n          if(!fireDOMOperation.hasBeenRun) {\n            fireDOMOperation.hasBeenRun = true;\n            domOperation();\n          }\n        }\n\n        function closeAnimation() {\n          if(!closeAnimation.hasBeenRun) {\n            closeAnimation.hasBeenRun = true;\n            var data = element.data(NG_ANIMATE_STATE);\n            if(data) {\n              /* only structural animations wait for reflow before removing an\n                 animation, but class-based animations don't. An example of this\n                 failing would be when a parent HTML tag has a ng-class attribute\n                 causing ALL directives below to skip animations during the digest */\n              if(isClassBased) {\n                cleanup(element);\n              } else {\n                data.closeAnimationTimeout = async(function() {\n                  cleanup(element);\n                });\n                element.data(NG_ANIMATE_STATE, data);\n              }\n            }\n            fireDoneCallbackAsync();\n          }\n        }\n      }\n\n      function cancelChildAnimations(element) {\n        var node = extractElementNode(element);\n        forEach(node.querySelectorAll('.' + NG_ANIMATE_CLASS_NAME), function(element) {\n          element = angular.element(element);\n          var data = element.data(NG_ANIMATE_STATE);\n          if(data) {\n            cancelAnimations(data.animations);\n            cleanup(element);\n          }\n        });\n      }\n\n      function cancelAnimations(animations) {\n        var isCancelledFlag = true;\n        forEach(animations, function(animation) {\n          if(!animation.beforeComplete) {\n            (animation.beforeEnd || noop)(isCancelledFlag);\n          }\n          if(!animation.afterComplete) {\n            (animation.afterEnd || noop)(isCancelledFlag);\n          }\n        });\n      }\n\n      function cleanup(element) {\n        if(isMatchingElement(element, $rootElement)) {\n          if(!rootAnimateState.disabled) {\n            rootAnimateState.running = false;\n            rootAnimateState.structural = false;\n          }\n        } else {\n          element.removeClass(NG_ANIMATE_CLASS_NAME);\n          element.removeData(NG_ANIMATE_STATE);\n        }\n      }\n\n      function animationsDisabled(element, parentElement) {\n        if (rootAnimateState.disabled) return true;\n\n        if(isMatchingElement(element, $rootElement)) {\n          return rootAnimateState.disabled || rootAnimateState.running;\n        }\n\n        do {\n          //the element did not reach the root element which means that it\n          //is not apart of the DOM. Therefore there is no reason to do\n          //any animations on it\n          if(parentElement.length === 0) break;\n\n          var isRoot = isMatchingElement(parentElement, $rootElement);\n          var state = isRoot ? rootAnimateState : parentElement.data(NG_ANIMATE_STATE);\n          var result = state && (!!state.disabled || !!state.running);\n          if(isRoot || result) {\n            return result;\n          }\n\n          if(isRoot) return true;\n        }\n        while(parentElement = parentElement.parent());\n\n        return true;\n      }\n    }]);\n\n    $animateProvider.register('', ['$window', '$sniffer', '$timeout', '$$animateReflow',\n                           function($window,   $sniffer,   $timeout,   $$animateReflow) {\n      // Detect proper transitionend/animationend event names.\n      var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;\n\n      // If unprefixed events are not supported but webkit-prefixed are, use the latter.\n      // Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.\n      // Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`\n      // but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.\n      // Register both events in case `window.onanimationend` is not supported because of that,\n      // do the same for `transitionend` as Safari is likely to exhibit similar behavior.\n      // Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit\n      // therefore there is no reason to test anymore for other vendor prefixes: http://caniuse.com/#search=transition\n      if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) {\n        CSS_PREFIX = '-webkit-';\n        TRANSITION_PROP = 'WebkitTransition';\n        TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';\n      } else {\n        TRANSITION_PROP = 'transition';\n        TRANSITIONEND_EVENT = 'transitionend';\n      }\n\n      if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) {\n        CSS_PREFIX = '-webkit-';\n        ANIMATION_PROP = 'WebkitAnimation';\n        ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';\n      } else {\n        ANIMATION_PROP = 'animation';\n        ANIMATIONEND_EVENT = 'animationend';\n      }\n\n      var DURATION_KEY = 'Duration';\n      var PROPERTY_KEY = 'Property';\n      var DELAY_KEY = 'Delay';\n      var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';\n      var NG_ANIMATE_PARENT_KEY = '$$ngAnimateKey';\n      var NG_ANIMATE_CSS_DATA_KEY = '$$ngAnimateCSS3Data';\n      var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;\n      var CLOSING_TIME_BUFFER = 1.5;\n      var ONE_SECOND = 1000;\n\n      var animationCounter = 0;\n      var lookupCache = {};\n      var parentCounter = 0;\n      var animationReflowQueue = [];\n      var animationElementQueue = [];\n      var cancelAnimationReflow;\n      var closingAnimationTime = 0;\n      var timeOut = false;\n      function afterReflow(element, callback) {\n        if(cancelAnimationReflow) {\n          cancelAnimationReflow();\n        }\n\n        animationReflowQueue.push(callback);\n\n        var node = extractElementNode(element);\n        element = angular.element(node);\n        animationElementQueue.push(element);\n\n        var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);\n\n        var stagger = elementData.stagger;\n        var staggerTime = elementData.itemIndex * (Math.max(stagger.animationDelay, stagger.transitionDelay) || 0);\n\n        var animationTime = (elementData.maxDelay + elementData.maxDuration) * CLOSING_TIME_BUFFER;\n        closingAnimationTime = Math.max(closingAnimationTime, (staggerTime + animationTime) * ONE_SECOND);\n\n        //by placing a counter we can avoid an accidental\n        //race condition which may close an animation when\n        //a follow-up animation is midway in its animation\n        elementData.animationCount = animationCounter;\n\n        cancelAnimationReflow = $$animateReflow(function() {\n          forEach(animationReflowQueue, function(fn) {\n            fn();\n          });\n\n          //copy the list of elements so that successive\n          //animations won't conflict if they're added before\n          //the closing animation timeout has run\n          var elementQueueSnapshot = [];\n          var animationCounterSnapshot = animationCounter;\n          forEach(animationElementQueue, function(elm) {\n            elementQueueSnapshot.push(elm);\n          });\n\n          $timeout(function() {\n            closeAllAnimations(elementQueueSnapshot, animationCounterSnapshot);\n            elementQueueSnapshot = null;\n          }, closingAnimationTime, false);\n\n          animationReflowQueue = [];\n          animationElementQueue = [];\n          cancelAnimationReflow = null;\n          lookupCache = {};\n          closingAnimationTime = 0;\n          animationCounter++;\n        });\n      }\n\n      function closeAllAnimations(elements, count) {\n        forEach(elements, function(element) {\n          var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);\n          if(elementData && elementData.animationCount == count) {\n            (elementData.closeAnimationFn || noop)();\n          }\n        });\n      }\n\n      function getElementAnimationDetails(element, cacheKey) {\n        var data = cacheKey ? lookupCache[cacheKey] : null;\n        if(!data) {\n          var transitionDuration = 0;\n          var transitionDelay = 0;\n          var animationDuration = 0;\n          var animationDelay = 0;\n          var transitionDelayStyle;\n          var animationDelayStyle;\n          var transitionDurationStyle;\n          var transitionPropertyStyle;\n\n          //we want all the styles defined before and after\n          forEach(element, function(element) {\n            if (element.nodeType == ELEMENT_NODE) {\n              var elementStyles = $window.getComputedStyle(element) || {};\n\n              transitionDurationStyle = elementStyles[TRANSITION_PROP + DURATION_KEY];\n\n              transitionDuration = Math.max(parseMaxTime(transitionDurationStyle), transitionDuration);\n\n              transitionPropertyStyle = elementStyles[TRANSITION_PROP + PROPERTY_KEY];\n\n              transitionDelayStyle = elementStyles[TRANSITION_PROP + DELAY_KEY];\n\n              transitionDelay  = Math.max(parseMaxTime(transitionDelayStyle), transitionDelay);\n\n              animationDelayStyle = elementStyles[ANIMATION_PROP + DELAY_KEY];\n\n              animationDelay   = Math.max(parseMaxTime(animationDelayStyle), animationDelay);\n\n              var aDuration  = parseMaxTime(elementStyles[ANIMATION_PROP + DURATION_KEY]);\n\n              if(aDuration > 0) {\n                aDuration *= parseInt(elementStyles[ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY], 10) || 1;\n              }\n\n              animationDuration = Math.max(aDuration, animationDuration);\n            }\n          });\n          data = {\n            total : 0,\n            transitionPropertyStyle: transitionPropertyStyle,\n            transitionDurationStyle: transitionDurationStyle,\n            transitionDelayStyle: transitionDelayStyle,\n            transitionDelay: transitionDelay,\n            transitionDuration: transitionDuration,\n            animationDelayStyle: animationDelayStyle,\n            animationDelay: animationDelay,\n            animationDuration: animationDuration\n          };\n          if(cacheKey) {\n            lookupCache[cacheKey] = data;\n          }\n        }\n        return data;\n      }\n\n      function parseMaxTime(str) {\n        var maxValue = 0;\n        var values = angular.isString(str) ?\n          str.split(/\\s*,\\s*/) :\n          [];\n        forEach(values, function(value) {\n          maxValue = Math.max(parseFloat(value) || 0, maxValue);\n        });\n        return maxValue;\n      }\n\n      function getCacheKey(element) {\n        var parentElement = element.parent();\n        var parentID = parentElement.data(NG_ANIMATE_PARENT_KEY);\n        if(!parentID) {\n          parentElement.data(NG_ANIMATE_PARENT_KEY, ++parentCounter);\n          parentID = parentCounter;\n        }\n        return parentID + '-' + extractElementNode(element).className;\n      }\n\n      function animateSetup(element, className, calculationDecorator) {\n        var cacheKey = getCacheKey(element);\n        var eventCacheKey = cacheKey + ' ' + className;\n        var stagger = {};\n        var itemIndex = lookupCache[eventCacheKey] ? ++lookupCache[eventCacheKey].total : 0;\n\n        if(itemIndex > 0) {\n          var staggerClassName = className + '-stagger';\n          var staggerCacheKey = cacheKey + ' ' + staggerClassName;\n          var applyClasses = !lookupCache[staggerCacheKey];\n\n          applyClasses && element.addClass(staggerClassName);\n\n          stagger = getElementAnimationDetails(element, staggerCacheKey);\n\n          applyClasses && element.removeClass(staggerClassName);\n        }\n\n        /* the animation itself may need to add/remove special CSS classes\n         * before calculating the anmation styles */\n        calculationDecorator = calculationDecorator ||\n                               function(fn) { return fn(); };\n\n        element.addClass(className);\n\n        var timings = calculationDecorator(function() {\n          return getElementAnimationDetails(element, eventCacheKey);\n        });\n\n        /* there is no point in performing a reflow if the animation\n           timeout is empty (this would cause a flicker bug normally\n           in the page. There is also no point in performing an animation\n           that only has a delay and no duration */\n        var maxDelay = Math.max(timings.transitionDelay, timings.animationDelay);\n        var maxDuration = Math.max(timings.transitionDuration, timings.animationDuration);\n        if(maxDuration === 0) {\n          element.removeClass(className);\n          return false;\n        }\n\n        //temporarily disable the transition so that the enter styles\n        //don't animate twice (this is here to avoid a bug in Chrome/FF).\n        var activeClassName = '';\n        timings.transitionDuration > 0 ?\n          blockTransitions(element) :\n          blockKeyframeAnimations(element);\n\n        forEach(className.split(' '), function(klass, i) {\n          activeClassName += (i > 0 ? ' ' : '') + klass + '-active';\n        });\n\n        element.data(NG_ANIMATE_CSS_DATA_KEY, {\n          className : className,\n          activeClassName : activeClassName,\n          maxDuration : maxDuration,\n          maxDelay : maxDelay,\n          classes : className + ' ' + activeClassName,\n          timings : timings,\n          stagger : stagger,\n          itemIndex : itemIndex\n        });\n\n        return true;\n      }\n\n      function blockTransitions(element) {\n        extractElementNode(element).style[TRANSITION_PROP + PROPERTY_KEY] = 'none';\n      }\n\n      function blockKeyframeAnimations(element) {\n        extractElementNode(element).style[ANIMATION_PROP] = 'none 0s';\n      }\n\n      function unblockTransitions(element) {\n        var prop = TRANSITION_PROP + PROPERTY_KEY;\n        var node = extractElementNode(element);\n        if(node.style[prop] && node.style[prop].length > 0) {\n          node.style[prop] = '';\n        }\n      }\n\n      function unblockKeyframeAnimations(element) {\n        var prop = ANIMATION_PROP;\n        var node = extractElementNode(element);\n        if(node.style[prop] && node.style[prop].length > 0) {\n          node.style[prop] = '';\n        }\n      }\n\n      function animateRun(element, className, activeAnimationComplete) {\n        var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);\n        var node = extractElementNode(element);\n        if(node.className.indexOf(className) == -1 || !elementData) {\n          activeAnimationComplete();\n          return;\n        }\n\n        var timings = elementData.timings;\n        var stagger = elementData.stagger;\n        var maxDuration = elementData.maxDuration;\n        var activeClassName = elementData.activeClassName;\n        var maxDelayTime = Math.max(timings.transitionDelay, timings.animationDelay) * ONE_SECOND;\n        var startTime = Date.now();\n        var css3AnimationEvents = ANIMATIONEND_EVENT + ' ' + TRANSITIONEND_EVENT;\n        var itemIndex = elementData.itemIndex;\n\n        var style = '', appliedStyles = [];\n        if(timings.transitionDuration > 0) {\n          var propertyStyle = timings.transitionPropertyStyle;\n          if(propertyStyle.indexOf('all') == -1) {\n            style += CSS_PREFIX + 'transition-property: ' + propertyStyle + ';';\n            style += CSS_PREFIX + 'transition-duration: ' + timings.transitionDurationStyle + ';';\n            appliedStyles.push(CSS_PREFIX + 'transition-property');\n            appliedStyles.push(CSS_PREFIX + 'transition-duration');\n          }\n        }\n\n        if(itemIndex > 0) {\n          if(stagger.transitionDelay > 0 && stagger.transitionDuration === 0) {\n            var delayStyle = timings.transitionDelayStyle;\n            style += CSS_PREFIX + 'transition-delay: ' +\n                     prepareStaggerDelay(delayStyle, stagger.transitionDelay, itemIndex) + '; ';\n            appliedStyles.push(CSS_PREFIX + 'transition-delay');\n          }\n\n          if(stagger.animationDelay > 0 && stagger.animationDuration === 0) {\n            style += CSS_PREFIX + 'animation-delay: ' +\n                     prepareStaggerDelay(timings.animationDelayStyle, stagger.animationDelay, itemIndex) + '; ';\n            appliedStyles.push(CSS_PREFIX + 'animation-delay');\n          }\n        }\n\n        if(appliedStyles.length > 0) {\n          //the element being animated may sometimes contain comment nodes in\n          //the jqLite object, so we're safe to use a single variable to house\n          //the styles since there is always only one element being animated\n          var oldStyle = node.getAttribute('style') || '';\n          node.setAttribute('style', oldStyle + ' ' + style);\n        }\n\n        element.on(css3AnimationEvents, onAnimationProgress);\n        element.addClass(activeClassName);\n        elementData.closeAnimationFn = function() {\n          onEnd();\n          activeAnimationComplete();\n        };\n        return onEnd;\n\n        // This will automatically be called by $animate so\n        // there is no need to attach this internally to the\n        // timeout done method.\n        function onEnd(cancelled) {\n          element.off(css3AnimationEvents, onAnimationProgress);\n          element.removeClass(activeClassName);\n          animateClose(element, className);\n          var node = extractElementNode(element);\n          for (var i in appliedStyles) {\n            node.style.removeProperty(appliedStyles[i]);\n          }\n        }\n\n        function onAnimationProgress(event) {\n          event.stopPropagation();\n          var ev = event.originalEvent || event;\n          var timeStamp = ev.$manualTimeStamp || ev.timeStamp || Date.now();\n          \n          /* Firefox (or possibly just Gecko) likes to not round values up\n           * when a ms measurement is used for the animation */\n          var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));\n\n          /* $manualTimeStamp is a mocked timeStamp value which is set\n           * within browserTrigger(). This is only here so that tests can\n           * mock animations properly. Real events fallback to event.timeStamp,\n           * or, if they don't, then a timeStamp is automatically created for them.\n           * We're checking to see if the timeStamp surpasses the expected delay,\n           * but we're using elapsedTime instead of the timeStamp on the 2nd\n           * pre-condition since animations sometimes close off early */\n          if(Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) {\n            activeAnimationComplete();\n          }\n        }\n      }\n\n      function prepareStaggerDelay(delayStyle, staggerDelay, index) {\n        var style = '';\n        forEach(delayStyle.split(','), function(val, i) {\n          style += (i > 0 ? ',' : '') +\n                   (index * staggerDelay + parseInt(val, 10)) + 's';\n        });\n        return style;\n      }\n\n      function animateBefore(element, className, calculationDecorator) {\n        if(animateSetup(element, className, calculationDecorator)) {\n          return function(cancelled) {\n            cancelled && animateClose(element, className);\n          };\n        }\n      }\n\n      function animateAfter(element, className, afterAnimationComplete) {\n        if(element.data(NG_ANIMATE_CSS_DATA_KEY)) {\n          return animateRun(element, className, afterAnimationComplete);\n        } else {\n          animateClose(element, className);\n          afterAnimationComplete();\n        }\n      }\n\n      function animate(element, className, animationComplete) {\n        //If the animateSetup function doesn't bother returning a\n        //cancellation function then it means that there is no animation\n        //to perform at all\n        var preReflowCancellation = animateBefore(element, className);\n        if(!preReflowCancellation) {\n          animationComplete();\n          return;\n        }\n\n        //There are two cancellation functions: one is before the first\n        //reflow animation and the second is during the active state\n        //animation. The first function will take care of removing the\n        //data from the element which will not make the 2nd animation\n        //happen in the first place\n        var cancel = preReflowCancellation;\n        afterReflow(element, function() {\n          unblockTransitions(element);\n          unblockKeyframeAnimations(element);\n          //once the reflow is complete then we point cancel to\n          //the new cancellation function which will remove all of the\n          //animation properties from the active animation\n          cancel = animateAfter(element, className, animationComplete);\n        });\n\n        return function(cancelled) {\n          (cancel || noop)(cancelled);\n        };\n      }\n\n      function animateClose(element, className) {\n        element.removeClass(className);\n        element.removeData(NG_ANIMATE_CSS_DATA_KEY);\n      }\n\n      return {\n        allowCancel : function(element, animationEvent, className) {\n          //always cancel the current animation if it is a\n          //structural animation\n          var oldClasses = (element.data(NG_ANIMATE_CSS_DATA_KEY) || {}).classes;\n          if(!oldClasses || ['enter','leave','move'].indexOf(animationEvent) >= 0) {\n            return true;\n          }\n\n          var parentElement = element.parent();\n          var clone = angular.element(extractElementNode(element).cloneNode());\n\n          //make the element super hidden and override any CSS style values\n          clone.attr('style','position:absolute; top:-9999px; left:-9999px');\n          clone.removeAttr('id');\n          clone.empty();\n\n          forEach(oldClasses.split(' '), function(klass) {\n            clone.removeClass(klass);\n          });\n\n          var suffix = animationEvent == 'addClass' ? '-add' : '-remove';\n          clone.addClass(suffixClasses(className, suffix));\n          parentElement.append(clone);\n\n          var timings = getElementAnimationDetails(clone);\n          clone.remove();\n\n          return Math.max(timings.transitionDuration, timings.animationDuration) > 0;\n        },\n\n        enter : function(element, animationCompleted) {\n          return animate(element, 'ng-enter', animationCompleted);\n        },\n\n        leave : function(element, animationCompleted) {\n          return animate(element, 'ng-leave', animationCompleted);\n        },\n\n        move : function(element, animationCompleted) {\n          return animate(element, 'ng-move', animationCompleted);\n        },\n\n        beforeAddClass : function(element, className, animationCompleted) {\n          var cancellationMethod = animateBefore(element, suffixClasses(className, '-add'), function(fn) {\n\n            /* when a CSS class is added to an element then the transition style that\n             * is applied is the transition defined on the element when the CSS class\n             * is added at the time of the animation. This is how CSS3 functions\n             * outside of ngAnimate. */\n            element.addClass(className);\n            var timings = fn();\n            element.removeClass(className);\n            return timings;\n          });\n\n          if(cancellationMethod) {\n            afterReflow(element, function() {\n              unblockTransitions(element);\n              unblockKeyframeAnimations(element);\n              animationCompleted();\n            });\n            return cancellationMethod;\n          }\n          animationCompleted();\n        },\n\n        addClass : function(element, className, animationCompleted) {\n          return animateAfter(element, suffixClasses(className, '-add'), animationCompleted);\n        },\n\n        beforeRemoveClass : function(element, className, animationCompleted) {\n          var cancellationMethod = animateBefore(element, suffixClasses(className, '-remove'), function(fn) {\n            /* when classes are removed from an element then the transition style\n             * that is applied is the transition defined on the element without the\n             * CSS class being there. This is how CSS3 functions outside of ngAnimate.\n             * http://plnkr.co/edit/j8OzgTNxHTb4n3zLyjGW?p=preview */\n            var klass = element.attr('class');\n            element.removeClass(className);\n            var timings = fn();\n            element.attr('class', klass);\n            return timings;\n          });\n\n          if(cancellationMethod) {\n            afterReflow(element, function() {\n              unblockTransitions(element);\n              unblockKeyframeAnimations(element);\n              animationCompleted();\n            });\n            return cancellationMethod;\n          }\n          animationCompleted();\n        },\n\n        removeClass : function(element, className, animationCompleted) {\n          return animateAfter(element, suffixClasses(className, '-remove'), animationCompleted);\n        }\n      };\n\n      function suffixClasses(classes, suffix) {\n        var className = '';\n        classes = angular.isArray(classes) ? classes : classes.split(/\\s+/);\n        forEach(classes, function(klass, i) {\n          if(klass && klass.length > 0) {\n            className += (i > 0 ? ' ' : '') + klass + suffix;\n          }\n        });\n        return className;\n      }\n    }]);\n  }]);\n\n\n})(window, window.angular);\n"
  },
  {
    "path": "ionic1/official/maps/www/lib/ionic/js/angular/angular-resource.js",
    "content": "/**\n * @license AngularJS v1.2.12\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'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 && obj !== undefined; 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 overview\n * @name ngResource\n * @description\n *\n * # ngResource\n *\n * The `ngResource` module provides interaction support with RESTful services\n * via the $resource service.\n *\n * {@installModule resource}\n *\n * <div doc-module-components=\"ngResource\"></div>\n *\n * See {@link ngResource.$resource `$resource`} for usage.\n */\n\n/**\n * @ngdoc object\n * @name ngResource.$resource\n * @requires $http\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 * @param {string} url A parametrized 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 any of the parameter value is a function, it will be executed every time\n *   when a param value needs to be obtained for a request (unless the param was overridden).\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 of that parameter is extracted from\n *   the data object (useful for non-GET operations).\n *\n * @param {Object.<Object>=} actions Hash with declaration of custom action that should extend the\n *   default set of resource actions. The declaration should be created in the format of {@link\n *   ng.$http#usage_parameters $http.config}:\n *\n *       {action1: {method:?, params:?, isArray:?, headers:?, ...},\n *        action2: {method:?, params:?, isArray:?, headers:?, ...},\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} – HTTP request method. Valid methods are: `GET`, `POST`, `PUT`,\n *     `DELETE`, and `JSONP`.\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 executed every time when a param value needs to\n *     be obtained for a request (unless the param was overridden).\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 *   - **`transformResponse`** –\n *     `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –\n *     transform function or an array of such functions. The transform function takes the http\n *     response body and headers and returns its transformed (typically deserialized) version.\n *   - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the\n *     GET request, otherwise if a cache instance built with\n *     {@link ng.$cacheFactory $cacheFactory}, this cache will be used for\n *     caching.\n *   - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that\n *     should abort the request when resolved.\n *   - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the\n *     XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5\n *     requests with credentials} for more information.\n *   - **`responseType`** - `{string}` - see {@link\n *     https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType requestType}.\n *   - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods -\n *     `response` and `responseError`. Both `response` and `responseError` interceptors get called\n *     with `http response` object. See {@link ng.$http $http interceptors}.\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 *\n *       { 'get':    {method:'GET'},\n *         'save':   {method:'POST'},\n *         'query':  {method:'GET', isArray:true},\n *         'remove': {method:'DELETE'},\n *         'delete': {method:'DELETE'} };\n *\n *   Calling these methods invoke an {@link ng.$http} with the specified http method,\n *   destination and parameters. When the data is returned from the server then the object is an\n *   instance of the resource class. The actions `save`, `remove` and `delete` are available on it\n *   as  methods with the `$` prefix. This allows you to easily perform CRUD operations (create,\n *   read, update, delete) on server-side data like this:\n *   <pre>\n        var User = $resource('/user/:userId', {userId:'@id'});\n        var user = User.get({userId:123}, function() {\n          user.abc = true;\n          user.$save();\n        });\n     </pre>\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 *   - HTTP GET \"class\" actions: `Resource.action([parameters], [success], [error])`\n *   - non-GET \"class\" actions: `Resource.action([parameters], postData, [success], [error])`\n *   - non-GET instance actions:  `instance.$action([parameters], [success], [error])`\n *\n *   Success callback is called with (value, responseHeaders) arguments. Error callback is called\n *   with (httpResponse) argument.\n *\n *   Class actions return empty instance (with additional properties below).\n *   Instance actions return promise of the action.\n *\n *   The Resource instances and collection 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\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 resolved with the {@link ng.$http http response} object, without\n *     the `resource` property.\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.\n *\n * @example\n *\n * # Credit card resource\n *\n * <pre>\n     // Define CreditCard class\n     var CreditCard = $resource('/user/:userId/card/: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(function() {\n       // GET: /user/123/card\n       // server returns: [ {id:456, number:'1234', name:'Smith'} ];\n\n       var card = cards[0];\n       // each item is an instance of CreditCard\n       expect(card instanceof CreditCard).toEqual(true);\n       card.name = \"J. Smith\";\n       // non GET methods are mapped onto the instances\n       card.$save();\n       // POST: /user/123/card/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.\n       card.$charge({amount:9.99});\n       // POST: /user/123/card/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     newCard.$save();\n     // POST: /user/123/card {number:'0123', name:'Mike Smith'}\n     // server returns: {id:789, number:'0123', name: 'Mike Smith'};\n     expect(newCard.id).toEqual(789);\n * </pre>\n *\n * The object returned from this function execution is a resource \"class\" which has \"static\" method\n * for each action in the definition.\n *\n * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and\n * `headers`.\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   <pre>\n     var User = $resource('/user/:userId', {userId:'@id'});\n     var user = User.get({userId:123}, function() {\n       user.abc = true;\n       user.$save();\n     });\n   </pre>\n *\n * It's worth noting that the success callback for `get`, `query` and other methods gets passed\n * in the response that came from the server as well as $http header getter function, so one\n * could rewrite the above example and get access to http headers as:\n *\n   <pre>\n     var User = $resource('/user/:userId', {userId:'@id'});\n     User.get({userId:123}, function(u, getResponseHeaders){\n       u.abc = true;\n       u.$save(function(u, putResponseHeaders) {\n         //u => saved user object\n         //putResponseHeaders => $http header getter\n       });\n     });\n   </pre>\n\n * # Creating a custom 'PUT' request\n * In this example we create a custom method on our resource to make a PUT request\n * <pre>\n *\t\tvar app = angular.module('app', ['ngResource', 'ngRoute']);\n *\n *\t\t// Some APIs expect a PUT request in the format URL/object/ID\n *\t\t// Here we are creating an 'update' method \n *\t\tapp.factory('Notes', ['$resource', function($resource) {\n *    return $resource('/notes/:id', null,\n *        {\n *            'update': { method:'PUT' }\n *        });\n *\t\t}]);\n *\n *\t\t// In our controller we get the ID from the URL using ngRoute and $routeParams\n *\t\t// We pass in $routeParams and our Notes factory along with $scope\n *\t\tapp.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes',\n                                      function($scope, $routeParams, Notes) {\n *    // First get a note object from the factory\n *    var note = Notes.get({ id:$routeParams.id });\n *    $id = note.id;\n *\n *    // Now call update passing in the ID first then the object you are updating\n *    Notes.update({ id:$id }, note);\n *\n *    // This will PUT /notes/ID with the note object in the request payload\n *\t\t}]);\n * </pre>\n */\nangular.module('ngResource', ['ng']).\n  factory('$resource', ['$http', '$q', function($http, $q) {\n\n    var DEFAULT_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    var noop = angular.noop,\n        forEach = angular.forEach,\n        extend = angular.extend,\n        copy = angular.copy,\n        isFunction = angular.isFunction;\n\n    /**\n     * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n     * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path\n     * segments:\n     *    segment       = *pchar\n     *    pchar         = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n     *    pct-encoded   = \"%\" HEXDIG HEXDIG\n     *    unreserved    = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n     *    sub-delims    = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n     *                     / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n     */\n    function encodeUriSegment(val) {\n      return encodeUriQuery(val, true).\n        replace(/%26/gi, '&').\n        replace(/%3D/gi, '=').\n        replace(/%2B/gi, '+');\n    }\n\n\n    /**\n     * This method is intended for encoding *key* or *value* parts of query component. We need a\n     * custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't\n     * have to be encoded per http://tools.ietf.org/html/rfc3986:\n     *    query       = *( pchar / \"/\" / \"?\" )\n     *    pchar         = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n     *    unreserved    = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n     *    pct-encoded   = \"%\" HEXDIG HEXDIG\n     *    sub-delims    = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n     *                     / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n     */\n    function encodeUriQuery(val, pctEncodeSpaces) {\n      return encodeURIComponent(val).\n        replace(/%40/gi, '@').\n        replace(/%3A/gi, ':').\n        replace(/%24/g, '$').\n        replace(/%2C/gi, ',').\n        replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n    }\n\n    function Route(template, defaults) {\n      this.template = template;\n      this.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\n        var urlParams = self.urlParams = {};\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] = true;\n          }\n        });\n        url = url.replace(/\\\\:/g, ':');\n\n        params = params || {};\n        forEach(self.urlParams, function(_, urlParam){\n          val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];\n          if (angular.isDefined(val) && val !== null) {\n            encodedVal = encodeUriSegment(val);\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\n        url = url.replace(/\\/+$/, '') || '/';\n        // then replace 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        config.url = url.replace(/\\/\\\\\\./, '/.');\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) {\n      var route = new Route(url);\n\n      actions = extend({}, DEFAULT_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(); }\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      forEach(actions, function(action, name) {\n        var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method);\n\n        Resource[name] = function(a1, a2, a3, a4) {\n          var params = {}, data, success, error;\n\n          /* jshint -W086 */ /* (purposefully fall through case statements) */\n          switch(arguments.length) {\n          case 4:\n            error = a4;\n            success = a3;\n            //fallthrough\n          case 3:\n          case 2:\n            if (isFunction(a2)) {\n              if (isFunction(a1)) {\n                success = a1;\n                error = a2;\n                break;\n              }\n\n              success = a2;\n              error = a3;\n              //fallthrough\n            } else {\n              params = a1;\n              data = a2;\n              success = a3;\n              break;\n            }\n          case 1:\n            if (isFunction(a1)) success = 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          /* jshint +W086 */ /* (purposefully fall through case statements) */\n\n          var isInstanceCall = this instanceof Resource;\n          var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data));\n          var httpConfig = {};\n          var responseInterceptor = action.interceptor && action.interceptor.response ||\n                                    defaultResponseInterceptor;\n          var responseErrorInterceptor = action.interceptor && action.interceptor.responseError ||\n                                    undefined;\n\n          forEach(action, function(value, key) {\n            if (key != 'params' && key != 'isArray' && key != 'interceptor') {\n              httpConfig[key] = copy(value);\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          var promise = $http(httpConfig).then(function(response) {\n            var data = response.data,\n                promise = value.$promise;\n\n            if (data) {\n              // Need to convert action.isArray to boolean in case it is undefined\n              // jshint -W018\n              if (angular.isArray(data) !== (!!action.isArray)) {\n                throw $resourceMinErr('badcfg', 'Error in resource configuration. Expected ' +\n                  'response to contain an {0} but got an {1}',\n                  action.isArray?'array':'object', angular.isArray(data)?'array':'object');\n              }\n              // jshint +W018\n              if (action.isArray) {\n                value.length = 0;\n                forEach(data, function(item) {\n                  value.push(new Resource(item));\n                });\n              } else {\n                shallowClearAndCopy(data, value);\n                value.$promise = promise;\n              }\n            }\n\n            value.$resolved = true;\n\n            response.resource = value;\n\n            return response;\n          }, function(response) {\n            value.$resolved = true;\n\n            (error||noop)(response);\n\n            return $q.reject(response);\n          });\n\n          promise = promise.then(\n              function(response) {\n                var value = responseInterceptor(response);\n                (success||noop)(value, response.headers);\n                return value;\n              },\n              responseErrorInterceptor);\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\n            return value;\n          }\n\n          // instance call\n          return promise;\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      Resource.bind = function(additionalParamDefaults){\n        return resourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions);\n      };\n\n      return Resource;\n    }\n\n    return resourceFactory;\n  }]);\n\n\n})(window, window.angular);\n"
  },
  {
    "path": "ionic1/official/maps/www/lib/ionic/js/angular/angular-sanitize.js",
    "content": "/**\n * @license AngularJS v1.2.12\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\nvar $sanitizeMinErr = angular.$$minErr('$sanitize');\n\n/**\n * @ngdoc overview\n * @name ngSanitize\n * @description\n *\n * # ngSanitize\n *\n * The `ngSanitize` module provides functionality to sanitize HTML.\n *\n * {@installModule sanitize}\n *\n * <div doc-module-components=\"ngSanitize\"></div>\n *\n * See {@link ngSanitize.$sanitize `$sanitize`} for usage.\n */\n\n/*\n * HTML Parser By Misko Hevery (misko@hevery.com)\n * based on:  HTML Parser By John Resig (ejohn.org)\n * Original code by Erik Arvidsson, Mozilla Public License\n * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js\n *\n * // Use like so:\n * htmlParser(htmlString, {\n *     start: function(tag, attrs, unary) {},\n *     end: function(tag) {},\n *     chars: function(text) {},\n *     comment: function(text) {}\n * });\n *\n */\n\n\n/**\n * @ngdoc service\n * @name ngSanitize.$sanitize\n * @function\n *\n * @description\n *   The input is sanitized by parsing the html into tokens. All safe tokens (from a whitelist) are\n *   then serialized back to properly escaped html string. This means that no unsafe input can make\n *   it into the returned string, however, since our parser is more strict than a typical browser\n *   parser, it's possible that some obscure input, which would be recognized as valid HTML by a\n *   browser, won't make it through the sanitizer.\n *   The whitelist is configured using the functions `aHrefSanitizationWhitelist` and\n *   `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider `$compileProvider`}.\n *\n * @param {string} html Html input.\n * @returns {string} Sanitized html.\n *\n * @example\n   <doc:example module=\"ngSanitize\">\n   <doc:source>\n     <script>\n       function Ctrl($scope, $sce) {\n         $scope.snippet =\n           '<p style=\"color:blue\">an html\\n' +\n           '<em onmouseover=\"this.textContent=\\'PWN3D!\\'\">click here</em>\\n' +\n           'snippet</p>';\n         $scope.deliberatelyTrustDangerousSnippet = function() {\n           return $sce.trustAsHtml($scope.snippet);\n         };\n       }\n     </script>\n     <div ng-controller=\"Ctrl\">\n        Snippet: <textarea ng-model=\"snippet\" cols=\"60\" rows=\"3\"></textarea>\n       <table>\n         <tr>\n           <td>Directive</td>\n           <td>How</td>\n           <td>Source</td>\n           <td>Rendered</td>\n         </tr>\n         <tr id=\"bind-html-with-sanitize\">\n           <td>ng-bind-html</td>\n           <td>Automatically uses $sanitize</td>\n           <td><pre>&lt;div ng-bind-html=\"snippet\"&gt;<br/>&lt;/div&gt;</pre></td>\n           <td><div ng-bind-html=\"snippet\"></div></td>\n         </tr>\n         <tr id=\"bind-html-with-trust\">\n           <td>ng-bind-html</td>\n           <td>Bypass $sanitize by explicitly trusting the dangerous value</td>\n           <td>\n           <pre>&lt;div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"&gt;\n&lt;/div&gt;</pre>\n           </td>\n           <td><div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"></div></td>\n         </tr>\n         <tr id=\"bind-default\">\n           <td>ng-bind</td>\n           <td>Automatically escapes</td>\n           <td><pre>&lt;div ng-bind=\"snippet\"&gt;<br/>&lt;/div&gt;</pre></td>\n           <td><div ng-bind=\"snippet\"></div></td>\n         </tr>\n       </table>\n       </div>\n   </doc:source>\n   <doc:protractor>\n     it('should sanitize the html snippet by default', function() {\n       expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).\n         toBe('<p>an html\\n<em>click here</em>\\nsnippet</p>');\n     });\n\n     it('should inline raw snippet if bound to a trusted value', function() {\n       expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).\n         toBe(\"<p style=\\\"color:blue\\\">an html\\n\" +\n              \"<em onmouseover=\\\"this.textContent='PWN3D!'\\\">click here</em>\\n\" +\n              \"snippet</p>\");\n     });\n\n     it('should escape snippet without any filter', function() {\n       expect(element(by.css('#bind-default div')).getInnerHtml()).\n         toBe(\"&lt;p style=\\\"color:blue\\\"&gt;an html\\n\" +\n              \"&lt;em onmouseover=\\\"this.textContent='PWN3D!'\\\"&gt;click here&lt;/em&gt;\\n\" +\n              \"snippet&lt;/p&gt;\");\n     });\n\n     it('should update', function() {\n       element(by.model('snippet')).clear();\n       element(by.model('snippet')).sendKeys('new <b onclick=\"alert(1)\">text</b>');\n       expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).\n         toBe('new <b>text</b>');\n       expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe(\n         'new <b onclick=\"alert(1)\">text</b>');\n       expect(element(by.css('#bind-default div')).getInnerHtml()).toBe(\n         \"new &lt;b onclick=\\\"alert(1)\\\"&gt;text&lt;/b&gt;\");\n     });\n   </doc:protractor>\n   </doc:example>\n */\nfunction $SanitizeProvider() {\n  this.$get = ['$$sanitizeUri', function($$sanitizeUri) {\n    return function(html) {\n      var buf = [];\n      htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) {\n        return !/^unsafe/.test($$sanitizeUri(uri, isImage));\n      }));\n      return buf.join('');\n    };\n  }];\n}\n\nfunction sanitizeText(chars) {\n  var buf = [];\n  var writer = htmlSanitizeWriter(buf, angular.noop);\n  writer.chars(chars);\n  return buf.join('');\n}\n\n\n// Regular Expressions for parsing tags and attributes\nvar START_TAG_REGEXP =\n       /^<\\s*([\\w:-]+)((?:\\s+[\\w:-]+(?:\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*)\\s*(\\/?)\\s*>/,\n  END_TAG_REGEXP = /^<\\s*\\/\\s*([\\w:-]+)[^>]*>/,\n  ATTR_REGEXP = /([\\w:-]+)(?:\\s*=\\s*(?:(?:\"((?:[^\"])*)\")|(?:'((?:[^'])*)')|([^>\\s]+)))?/g,\n  BEGIN_TAG_REGEXP = /^</,\n  BEGING_END_TAGE_REGEXP = /^<\\s*\\//,\n  COMMENT_REGEXP = /<!--(.*?)-->/g,\n  DOCTYPE_REGEXP = /<!DOCTYPE([^>]*?)>/i,\n  CDATA_REGEXP = /<!\\[CDATA\\[(.*?)]]>/g,\n  // Match everything outside of normal chars and \" (quote character)\n  NON_ALPHANUMERIC_REGEXP = /([^\\#-~| |!])/g;\n\n\n// Good source of info about elements and attributes\n// https://dev.w3.org/html5/spec/Overview.html#semantics\n// https://simon.html5.org/html-elements\n\n// Safe Void Elements - HTML5\n// https://dev.w3.org/html5/spec/Overview.html#void-elements\nvar voidElements = makeMap(\"area,br,col,hr,img,wbr\");\n\n// Elements that you can, intentionally, leave open (and which close themselves)\n// https://dev.w3.org/html5/spec/Overview.html#optional-tags\nvar optionalEndTagBlockElements = makeMap(\"colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr\"),\n    optionalEndTagInlineElements = makeMap(\"rp,rt\"),\n    optionalEndTagElements = angular.extend({},\n                                            optionalEndTagInlineElements,\n                                            optionalEndTagBlockElements);\n\n// Safe Block Elements - HTML5\nvar blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap(\"address,article,\" +\n        \"aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,\" +\n        \"h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul\"));\n\n// Inline Elements - HTML5\nvar inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap(\"a,abbr,acronym,b,\" +\n        \"bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,\" +\n        \"samp,small,span,strike,strong,sub,sup,time,tt,u,var\"));\n\n\n// Special Elements (can contain anything)\nvar specialElements = makeMap(\"script,style\");\n\nvar validElements = angular.extend({},\n                                   voidElements,\n                                   blockElements,\n                                   inlineElements,\n                                   optionalEndTagElements);\n\n//Attributes that have href and hence need to be sanitized\nvar uriAttrs = makeMap(\"background,cite,href,longdesc,src,usemap\");\nvar validAttrs = angular.extend({}, uriAttrs, makeMap(\n    'abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,'+\n    'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,'+\n    'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,'+\n    'scope,scrolling,shape,size,span,start,summary,target,title,type,'+\n    'valign,value,vspace,width'));\n\nfunction makeMap(str) {\n  var obj = {}, items = str.split(','), i;\n  for (i = 0; i < items.length; i++) obj[items[i]] = true;\n  return obj;\n}\n\n\n/**\n * @example\n * htmlParser(htmlString, {\n *     start: function(tag, attrs, unary) {},\n *     end: function(tag) {},\n *     chars: function(text) {},\n *     comment: function(text) {}\n * });\n *\n * @param {string} html string\n * @param {object} handler\n */\nfunction htmlParser( html, handler ) {\n  var index, chars, match, stack = [], last = html;\n  stack.last = function() { return stack[ stack.length - 1 ]; };\n\n  while ( html ) {\n    chars = true;\n\n    // Make sure we're not in a script or style element\n    if ( !stack.last() || !specialElements[ stack.last() ] ) {\n\n      // Comment\n      if ( html.indexOf(\"<!--\") === 0 ) {\n        // comments containing -- are not allowed unless they terminate the comment\n        index = html.indexOf(\"--\", 4);\n\n        if ( index >= 0 && html.lastIndexOf(\"-->\", index) === index) {\n          if (handler.comment) handler.comment( html.substring( 4, index ) );\n          html = html.substring( index + 3 );\n          chars = false;\n        }\n      // DOCTYPE\n      } else if ( DOCTYPE_REGEXP.test(html) ) {\n        match = html.match( DOCTYPE_REGEXP );\n\n        if ( match ) {\n          html = html.replace( match[0] , '');\n          chars = false;\n        }\n      // end tag\n      } else if ( BEGING_END_TAGE_REGEXP.test(html) ) {\n        match = html.match( END_TAG_REGEXP );\n\n        if ( match ) {\n          html = html.substring( match[0].length );\n          match[0].replace( END_TAG_REGEXP, parseEndTag );\n          chars = false;\n        }\n\n      // start tag\n      } else if ( BEGIN_TAG_REGEXP.test(html) ) {\n        match = html.match( START_TAG_REGEXP );\n\n        if ( match ) {\n          html = html.substring( match[0].length );\n          match[0].replace( START_TAG_REGEXP, parseStartTag );\n          chars = false;\n        }\n      }\n\n      if ( chars ) {\n        index = html.indexOf(\"<\");\n\n        var text = index < 0 ? html : html.substring( 0, index );\n        html = index < 0 ? \"\" : html.substring( index );\n\n        if (handler.chars) handler.chars( decodeEntities(text) );\n      }\n\n    } else {\n      html = html.replace(new RegExp(\"(.*)<\\\\s*\\\\/\\\\s*\" + stack.last() + \"[^>]*>\", 'i'),\n        function(all, text){\n          text = text.replace(COMMENT_REGEXP, \"$1\").replace(CDATA_REGEXP, \"$1\");\n\n          if (handler.chars) handler.chars( decodeEntities(text) );\n\n          return \"\";\n      });\n\n      parseEndTag( \"\", stack.last() );\n    }\n\n    if ( html == last ) {\n      throw $sanitizeMinErr('badparse', \"The sanitizer was unable to parse the following block \" +\n                                        \"of html: {0}\", html);\n    }\n    last = html;\n  }\n\n  // Clean up any remaining tags\n  parseEndTag();\n\n  function parseStartTag( tag, tagName, rest, unary ) {\n    tagName = angular.lowercase(tagName);\n    if ( blockElements[ tagName ] ) {\n      while ( stack.last() && inlineElements[ stack.last() ] ) {\n        parseEndTag( \"\", stack.last() );\n      }\n    }\n\n    if ( optionalEndTagElements[ tagName ] && stack.last() == tagName ) {\n      parseEndTag( \"\", tagName );\n    }\n\n    unary = voidElements[ tagName ] || !!unary;\n\n    if ( !unary )\n      stack.push( tagName );\n\n    var attrs = {};\n\n    rest.replace(ATTR_REGEXP,\n      function(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) {\n        var value = doubleQuotedValue\n          || singleQuotedValue\n          || unquotedValue\n          || '';\n\n        attrs[name] = decodeEntities(value);\n    });\n    if (handler.start) handler.start( tagName, attrs, unary );\n  }\n\n  function parseEndTag( tag, tagName ) {\n    var pos = 0, i;\n    tagName = angular.lowercase(tagName);\n    if ( tagName )\n      // Find the closest opened tag of the same type\n      for ( pos = stack.length - 1; pos >= 0; pos-- )\n        if ( stack[ pos ] == tagName )\n          break;\n\n    if ( pos >= 0 ) {\n      // Close all the open elements, up the stack\n      for ( i = stack.length - 1; i >= pos; i-- )\n        if (handler.end) handler.end( stack[ i ] );\n\n      // Remove the open elements from the stack\n      stack.length = pos;\n    }\n  }\n}\n\nvar hiddenPre=document.createElement(\"pre\");\nvar spaceRe = /^(\\s*)([\\s\\S]*?)(\\s*)$/;\n/**\n * decodes all entities into regular string\n * @param value\n * @returns {string} A string with decoded entities.\n */\nfunction decodeEntities(value) {\n  if (!value) { return ''; }\n\n  // Note: IE8 does not preserve spaces at the start/end of innerHTML\n  // so we must capture them and reattach them afterward\n  var parts = spaceRe.exec(value);\n  var spaceBefore = parts[1];\n  var spaceAfter = parts[3];\n  var content = parts[2];\n  if (content) {\n    hiddenPre.innerHTML=content.replace(/</g,\"&lt;\");\n    // innerText depends on styling as it doesn't display hidden elements.\n    // Therefore, it's better to use textContent not to cause unnecessary\n    // reflows. However, IE<9 don't support textContent so the innerText\n    // fallback is necessary.\n    content = 'textContent' in hiddenPre ?\n      hiddenPre.textContent : hiddenPre.innerText;\n  }\n  return spaceBefore + content + spaceAfter;\n}\n\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n * @returns escaped text\n */\nfunction encodeEntities(value) {\n  return value.\n    replace(/&/g, '&amp;').\n    replace(NON_ALPHANUMERIC_REGEXP, function(value){\n      return '&#' + value.charCodeAt(0) + ';';\n    }).\n    replace(/</g, '&lt;').\n    replace(/>/g, '&gt;');\n}\n\n/**\n * create an HTML/XML writer which writes to buffer\n * @param {Array} buf use buf.jain('') to get out sanitized html string\n * @returns {object} in the form of {\n *     start: function(tag, attrs, unary) {},\n *     end: function(tag) {},\n *     chars: function(text) {},\n *     comment: function(text) {}\n * }\n */\nfunction htmlSanitizeWriter(buf, uriValidator){\n  var ignore = false;\n  var out = angular.bind(buf, buf.push);\n  return {\n    start: function(tag, attrs, unary){\n      tag = angular.lowercase(tag);\n      if (!ignore && specialElements[tag]) {\n        ignore = tag;\n      }\n      if (!ignore && validElements[tag] === true) {\n        out('<');\n        out(tag);\n        angular.forEach(attrs, function(value, key){\n          var lkey=angular.lowercase(key);\n          var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background');\n          if (validAttrs[lkey] === true &&\n            (uriAttrs[lkey] !== true || uriValidator(value, isImage))) {\n            out(' ');\n            out(key);\n            out('=\"');\n            out(encodeEntities(value));\n            out('\"');\n          }\n        });\n        out(unary ? '/>' : '>');\n      }\n    },\n    end: function(tag){\n        tag = angular.lowercase(tag);\n        if (!ignore && validElements[tag] === true) {\n          out('</');\n          out(tag);\n          out('>');\n        }\n        if (tag == ignore) {\n          ignore = false;\n        }\n      },\n    chars: function(chars){\n        if (!ignore) {\n          out(encodeEntities(chars));\n        }\n      }\n  };\n}\n\n\n// define ngSanitize module and register $sanitize service\nangular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider);\n\n/* global sanitizeText: false */\n\n/**\n * @ngdoc filter\n * @name ngSanitize.filter:linky\n * @function\n *\n * @description\n * Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and\n * plain email address links.\n *\n * Requires the {@link ngSanitize `ngSanitize`} module to be installed.\n *\n * @param {string} text Input text.\n * @param {string} target Window (_blank|_self|_parent|_top) or named frame to open links in.\n * @returns {string} Html-linkified text.\n *\n * @usage\n   <span ng-bind-html=\"linky_expression | linky\"></span>\n *\n * @example\n   <doc:example module=\"ngSanitize\">\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.snippet =\n             'Pretty text with some links:\\n'+\n             'http://angularjs.org/,\\n'+\n             'mailto:us@somewhere.org,\\n'+\n             'another@somewhere.org,\\n'+\n             'and one more: ftp://127.0.0.1/.';\n           $scope.snippetWithTarget = 'http://angularjs.org/';\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n       Snippet: <textarea ng-model=\"snippet\" cols=\"60\" rows=\"3\"></textarea>\n       <table>\n         <tr>\n           <td>Filter</td>\n           <td>Source</td>\n           <td>Rendered</td>\n         </tr>\n         <tr id=\"linky-filter\">\n           <td>linky filter</td>\n           <td>\n             <pre>&lt;div ng-bind-html=\"snippet | linky\"&gt;<br>&lt;/div&gt;</pre>\n           </td>\n           <td>\n             <div ng-bind-html=\"snippet | linky\"></div>\n           </td>\n         </tr>\n         <tr id=\"linky-target\">\n          <td>linky target</td>\n          <td>\n            <pre>&lt;div ng-bind-html=\"snippetWithTarget | linky:'_blank'\"&gt;<br>&lt;/div&gt;</pre>\n          </td>\n          <td>\n            <div ng-bind-html=\"snippetWithTarget | linky:'_blank'\"></div>\n          </td>\n         </tr>\n         <tr id=\"escaped-html\">\n           <td>no filter</td>\n           <td><pre>&lt;div ng-bind=\"snippet\"&gt;<br>&lt;/div&gt;</pre></td>\n           <td><div ng-bind=\"snippet\"></div></td>\n         </tr>\n       </table>\n     </doc:source>\n     <doc:protractor>\n       it('should linkify the snippet with urls', function() {\n         expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).\n             toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' +\n                  'another@somewhere.org, and one more: ftp://127.0.0.1/.');\n         expect(element.all(by.css('#linky-filter a')).count()).toEqual(4);\n       });\n\n       it('should not linkify snippet without the linky filter', function() {\n         expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()).\n             toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' +\n                  'another@somewhere.org, and one more: ftp://127.0.0.1/.');\n         expect(element.all(by.css('#escaped-html a')).count()).toEqual(0);\n       });\n\n       it('should update', function() {\n         element(by.model('snippet')).clear();\n         element(by.model('snippet')).sendKeys('new http://link.');\n         expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).\n             toBe('new http://link.');\n         expect(element.all(by.css('#linky-filter a')).count()).toEqual(1);\n         expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText())\n             .toBe('new http://link.');\n       });\n\n       it('should work with the target property', function() {\n        expect(element(by.id('linky-target')).\n            element(by.binding(\"snippetWithTarget | linky:'_blank'\")).getText()).\n            toBe('http://angularjs.org/');\n        expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank');\n       });\n     </doc:protractor>\n   </doc:example>\n */\nangular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {\n  var LINKY_URL_REGEXP =\n        /((ftp|https?):\\/\\/|(mailto:)?[A-Za-z0-9._%+-]+@)\\S*[^\\s.;,(){}<>]/,\n      MAILTO_REGEXP = /^mailto:/;\n\n  return function(text, target) {\n    if (!text) return text;\n    var match;\n    var raw = text;\n    var html = [];\n    var url;\n    var i;\n    while ((match = raw.match(LINKY_URL_REGEXP))) {\n      // We can not end in these as they are sometimes found at the end of the sentence\n      url = match[0];\n      // if we did not match ftp/http/mailto then assume mailto\n      if (match[2] == match[3]) url = 'mailto:' + url;\n      i = match.index;\n      addText(raw.substr(0, i));\n      addLink(url, match[0].replace(MAILTO_REGEXP, ''));\n      raw = raw.substring(i + match[0].length);\n    }\n    addText(raw);\n    return $sanitize(html.join(''));\n\n    function addText(text) {\n      if (!text) {\n        return;\n      }\n      html.push(sanitizeText(text));\n    }\n\n    function addLink(url, text) {\n      html.push('<a ');\n      if (angular.isDefined(target)) {\n        html.push('target=\"');\n        html.push(target);\n        html.push('\" ');\n      }\n      html.push('href=\"');\n      html.push(url);\n      html.push('\">');\n      addText(text);\n      html.push('</a>');\n    }\n  };\n}]);\n\n\n})(window, window.angular);\n"
  },
  {
    "path": "ionic1/official/maps/www/lib/ionic/js/angular/angular.js",
    "content": "/**\n * @license AngularJS v1.2.12\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, document, undefined) {'use strict';\n\n/**\n * @description\n *\n * This object provides a utility for producing rich Error messages within\n * Angular. It can be called as follows:\n *\n * var exampleMinErr = minErr('example');\n * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);\n *\n * The above creates an instance of minErr in the example namespace. The\n * resulting error will have a namespaced error code of example.one.  The\n * resulting error will replace {0} with the value of foo, and {1} with the\n * value of bar. The object is not restricted in the number of arguments it can\n * take.\n *\n * If fewer arguments are specified than necessary for interpolation, the extra\n * interpolation markers will be preserved in the final string.\n *\n * Since data will be parsed statically during a build step, some restrictions\n * are applied with respect to how minErr instances are created and called.\n * Instances should have names of the form namespaceMinErr for a minErr created\n * using minErr('namespace') . Error codes, namespaces and template strings\n * should all be static strings, not variables or general expressions.\n *\n * @param {string} module The namespace to use for the new minErr instance.\n * @returns {function(string, string, ...): Error} instance\n */\n\nfunction minErr(module) {\n  return function () {\n    var code = arguments[0],\n      prefix = '[' + (module ? module + ':' : '') + code + '] ',\n      template = arguments[1],\n      templateArgs = arguments,\n      stringify = function (obj) {\n        if (typeof obj === 'function') {\n          return obj.toString().replace(/ \\{[\\s\\S]*$/, '');\n        } else if (typeof obj === 'undefined') {\n          return 'undefined';\n        } else if (typeof obj !== 'string') {\n          return JSON.stringify(obj);\n        }\n        return obj;\n      },\n      message, i;\n\n    message = prefix + template.replace(/\\{\\d+\\}/g, function (match) {\n      var index = +match.slice(1, -1), arg;\n\n      if (index + 2 < templateArgs.length) {\n        arg = templateArgs[index + 2];\n        if (typeof arg === 'function') {\n          return arg.toString().replace(/ ?\\{[\\s\\S]*$/, '');\n        } else if (typeof arg === 'undefined') {\n          return 'undefined';\n        } else if (typeof arg !== 'string') {\n          return toJson(arg);\n        }\n        return arg;\n      }\n      return match;\n    });\n\n    message = message + '\\nhttp://errors.angularjs.org/1.2.12/' +\n      (module ? module + '/' : '') + code;\n    for (i = 2; i < arguments.length; i++) {\n      message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +\n        encodeURIComponent(stringify(arguments[i]));\n    }\n\n    return new Error(message);\n  };\n}\n\n/* We need to tell jshint what variables are being exported */\n/* global\n    -angular,\n    -msie,\n    -jqLite,\n    -jQuery,\n    -slice,\n    -push,\n    -toString,\n    -ngMinErr,\n    -_angular,\n    -angularModule,\n    -nodeName_,\n    -uid,\n\n    -lowercase,\n    -uppercase,\n    -manualLowercase,\n    -manualUppercase,\n    -nodeName_,\n    -isArrayLike,\n    -forEach,\n    -sortedKeys,\n    -forEachSorted,\n    -reverseParams,\n    -nextUid,\n    -setHashKey,\n    -extend,\n    -int,\n    -inherit,\n    -noop,\n    -identity,\n    -valueFn,\n    -isUndefined,\n    -isDefined,\n    -isObject,\n    -isString,\n    -isNumber,\n    -isDate,\n    -isArray,\n    -isFunction,\n    -isRegExp,\n    -isWindow,\n    -isScope,\n    -isFile,\n    -isBoolean,\n    -trim,\n    -isElement,\n    -makeMap,\n    -map,\n    -size,\n    -includes,\n    -indexOf,\n    -arrayRemove,\n    -isLeafNode,\n    -copy,\n    -shallowCopy,\n    -equals,\n    -csp,\n    -concat,\n    -sliceArgs,\n    -bind,\n    -toJsonReplacer,\n    -toJson,\n    -fromJson,\n    -toBoolean,\n    -startingTag,\n    -tryDecodeURIComponent,\n    -parseKeyValue,\n    -toKeyValue,\n    -encodeUriSegment,\n    -encodeUriQuery,\n    -angularInit,\n    -bootstrap,\n    -snake_case,\n    -bindJQuery,\n    -assertArg,\n    -assertArgFn,\n    -assertNotHasOwnProperty,\n    -getter,\n    -getBlockElements,\n\n*/\n\n////////////////////////////////////\n\n/**\n * @ngdoc function\n * @name angular.lowercase\n * @function\n *\n * @description Converts the specified string to lowercase.\n * @param {string} string String to be converted to lowercase.\n * @returns {string} Lowercased string.\n */\nvar lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};\n\n\n/**\n * @ngdoc function\n * @name angular.uppercase\n * @function\n *\n * @description Converts the specified string to uppercase.\n * @param {string} string String to be converted to uppercase.\n * @returns {string} Uppercased string.\n */\nvar uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};\n\n\nvar manualLowercase = function(s) {\n  /* jshint bitwise: false */\n  return isString(s)\n      ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})\n      : s;\n};\nvar manualUppercase = function(s) {\n  /* jshint bitwise: false */\n  return isString(s)\n      ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})\n      : s;\n};\n\n\n// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish\n// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods\n// with correct but slower alternatives.\nif ('i' !== 'I'.toLowerCase()) {\n  lowercase = manualLowercase;\n  uppercase = manualUppercase;\n}\n\n\nvar /** holds major version number for IE or NaN for real browsers */\n    msie,\n    jqLite,           // delay binding since jQuery could be loaded after us.\n    jQuery,           // delay binding\n    slice             = [].slice,\n    push              = [].push,\n    toString          = Object.prototype.toString,\n    ngMinErr          = minErr('ng'),\n\n\n    _angular          = window.angular,\n    /** @name angular */\n    angular           = window.angular || (window.angular = {}),\n    angularModule,\n    nodeName_,\n    uid               = ['0', '0', '0'];\n\n/**\n * IE 11 changed the format of the UserAgent string.\n * See http://msdn.microsoft.com/en-us/library/ms537503.aspx\n */\nmsie = int((/msie (\\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);\nif (isNaN(msie)) {\n  msie = int((/trident\\/.*; rv:(\\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);\n}\n\n\n/**\n * @private\n * @param {*} obj\n * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,\n *                   String ...)\n */\nfunction isArrayLike(obj) {\n  if (obj == null || isWindow(obj)) {\n    return false;\n  }\n\n  var length = obj.length;\n\n  if (obj.nodeType === 1 && length) {\n    return true;\n  }\n\n  return isString(obj) || isArray(obj) || length === 0 ||\n         typeof length === 'number' && length > 0 && (length - 1) in obj;\n}\n\n/**\n * @ngdoc function\n * @name angular.forEach\n * @function\n *\n * @description\n * Invokes the `iterator` function once for each item in `obj` collection, which can be either an\n * object or an array. The `iterator` function is invoked with `iterator(value, key)`, where `value`\n * is the value of an object property or an array element and `key` is the object property key or\n * array element index. Specifying a `context` for the function is optional.\n *\n * It is worth noting that `.forEach` does not iterate over inherited properties because it filters\n * using the `hasOwnProperty` method.\n *\n   <pre>\n     var values = {name: 'misko', gender: 'male'};\n     var log = [];\n     angular.forEach(values, function(value, key){\n       this.push(key + ': ' + value);\n     }, log);\n     expect(log).toEqual(['name: misko', 'gender: male']);\n   </pre>\n *\n * @param {Object|Array} obj Object to iterate over.\n * @param {Function} iterator Iterator function.\n * @param {Object=} context Object to become context (`this`) for the iterator function.\n * @returns {Object|Array} Reference to `obj`.\n */\nfunction forEach(obj, iterator, context) {\n  var key;\n  if (obj) {\n    if (isFunction(obj)){\n      for (key in obj) {\n        // Need to check if hasOwnProperty exists,\n        // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function\n        if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {\n          iterator.call(context, obj[key], key);\n        }\n      }\n    } else if (obj.forEach && obj.forEach !== forEach) {\n      obj.forEach(iterator, context);\n    } else if (isArrayLike(obj)) {\n      for (key = 0; key < obj.length; key++)\n        iterator.call(context, obj[key], key);\n    } else {\n      for (key in obj) {\n        if (obj.hasOwnProperty(key)) {\n          iterator.call(context, obj[key], key);\n        }\n      }\n    }\n  }\n  return obj;\n}\n\nfunction sortedKeys(obj) {\n  var keys = [];\n  for (var key in obj) {\n    if (obj.hasOwnProperty(key)) {\n      keys.push(key);\n    }\n  }\n  return keys.sort();\n}\n\nfunction forEachSorted(obj, iterator, context) {\n  var keys = sortedKeys(obj);\n  for ( var i = 0; i < keys.length; i++) {\n    iterator.call(context, obj[keys[i]], keys[i]);\n  }\n  return keys;\n}\n\n\n/**\n * when using forEach the params are value, key, but it is often useful to have key, value.\n * @param {function(string, *)} iteratorFn\n * @returns {function(*, string)}\n */\nfunction reverseParams(iteratorFn) {\n  return function(value, key) { iteratorFn(key, value); };\n}\n\n/**\n * A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric\n * characters such as '012ABC'. The reason why we are not using simply a number counter is that\n * the number string gets longer over time, and it can also overflow, where as the nextId\n * will grow much slower, it is a string, and it will never overflow.\n *\n * @returns an unique alpha-numeric string\n */\nfunction nextUid() {\n  var index = uid.length;\n  var digit;\n\n  while(index) {\n    index--;\n    digit = uid[index].charCodeAt(0);\n    if (digit == 57 /*'9'*/) {\n      uid[index] = 'A';\n      return uid.join('');\n    }\n    if (digit == 90  /*'Z'*/) {\n      uid[index] = '0';\n    } else {\n      uid[index] = String.fromCharCode(digit + 1);\n      return uid.join('');\n    }\n  }\n  uid.unshift('0');\n  return uid.join('');\n}\n\n\n/**\n * Set or clear the hashkey for an object.\n * @param obj object\n * @param h the hashkey (!truthy to delete the hashkey)\n */\nfunction setHashKey(obj, h) {\n  if (h) {\n    obj.$$hashKey = h;\n  }\n  else {\n    delete obj.$$hashKey;\n  }\n}\n\n/**\n * @ngdoc function\n * @name angular.extend\n * @function\n *\n * @description\n * Extends the destination object `dst` by copying all of the properties from the `src` object(s)\n * to `dst`. You can specify multiple `src` objects.\n *\n * @param {Object} dst Destination object.\n * @param {...Object} src Source object(s).\n * @returns {Object} Reference to `dst`.\n */\nfunction extend(dst) {\n  var h = dst.$$hashKey;\n  forEach(arguments, function(obj){\n    if (obj !== dst) {\n      forEach(obj, function(value, key){\n        dst[key] = value;\n      });\n    }\n  });\n\n  setHashKey(dst,h);\n  return dst;\n}\n\nfunction int(str) {\n  return parseInt(str, 10);\n}\n\n\nfunction inherit(parent, extra) {\n  return extend(new (extend(function() {}, {prototype:parent}))(), extra);\n}\n\n/**\n * @ngdoc function\n * @name angular.noop\n * @function\n *\n * @description\n * A function that performs no operations. This function can be useful when writing code in the\n * functional style.\n   <pre>\n     function foo(callback) {\n       var result = calculateResult();\n       (callback || angular.noop)(result);\n     }\n   </pre>\n */\nfunction noop() {}\nnoop.$inject = [];\n\n\n/**\n * @ngdoc function\n * @name angular.identity\n * @function\n *\n * @description\n * A function that returns its first argument. This function is useful when writing code in the\n * functional style.\n *\n   <pre>\n     function transformer(transformationFn, value) {\n       return (transformationFn || angular.identity)(value);\n     };\n   </pre>\n */\nfunction identity($) {return $;}\nidentity.$inject = [];\n\n\nfunction valueFn(value) {return function() {return value;};}\n\n/**\n * @ngdoc function\n * @name angular.isUndefined\n * @function\n *\n * @description\n * Determines if a reference is undefined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is undefined.\n */\nfunction isUndefined(value){return typeof value === 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDefined\n * @function\n *\n * @description\n * Determines if a reference is defined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is defined.\n */\nfunction isDefined(value){return typeof value !== 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isObject\n * @function\n *\n * @description\n * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not\n * considered to be objects.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Object` but not `null`.\n */\nfunction isObject(value){return value != null && typeof value === 'object';}\n\n\n/**\n * @ngdoc function\n * @name angular.isString\n * @function\n *\n * @description\n * Determines if a reference is a `String`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `String`.\n */\nfunction isString(value){return typeof value === 'string';}\n\n\n/**\n * @ngdoc function\n * @name angular.isNumber\n * @function\n *\n * @description\n * Determines if a reference is a `Number`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Number`.\n */\nfunction isNumber(value){return typeof value === 'number';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDate\n * @function\n *\n * @description\n * Determines if a value is a date.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Date`.\n */\nfunction isDate(value){\n  return toString.call(value) === '[object Date]';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isArray\n * @function\n *\n * @description\n * Determines if a reference is an `Array`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Array`.\n */\nfunction isArray(value) {\n  return toString.call(value) === '[object Array]';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isFunction\n * @function\n *\n * @description\n * Determines if a reference is a `Function`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Function`.\n */\nfunction isFunction(value){return typeof value === 'function';}\n\n\n/**\n * Determines if a value is a regular expression object.\n *\n * @private\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `RegExp`.\n */\nfunction isRegExp(value) {\n  return toString.call(value) === '[object RegExp]';\n}\n\n\n/**\n * Checks if `obj` is a window object.\n *\n * @private\n * @param {*} obj Object to check\n * @returns {boolean} True if `obj` is a window obj.\n */\nfunction isWindow(obj) {\n  return obj && obj.document && obj.location && obj.alert && obj.setInterval;\n}\n\n\nfunction isScope(obj) {\n  return obj && obj.$evalAsync && obj.$watch;\n}\n\n\nfunction isFile(obj) {\n  return toString.call(obj) === '[object File]';\n}\n\n\nfunction isBoolean(value) {\n  return typeof value === 'boolean';\n}\n\n\nvar trim = (function() {\n  // native trim is way faster: http://jsperf.com/angular-trim-test\n  // but IE doesn't have it... :-(\n  // TODO: we should move this into IE/ES5 polyfill\n  if (!String.prototype.trim) {\n    return function(value) {\n      return isString(value) ? value.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '') : value;\n    };\n  }\n  return function(value) {\n    return isString(value) ? value.trim() : value;\n  };\n})();\n\n\n/**\n * @ngdoc function\n * @name angular.isElement\n * @function\n *\n * @description\n * Determines if a reference is a DOM element (or wrapped jQuery element).\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).\n */\nfunction isElement(node) {\n  return !!(node &&\n    (node.nodeName  // we are a direct element\n    || (node.on && node.find)));  // we have an on and find method part of jQuery API\n}\n\n/**\n * @param str 'key1,key2,...'\n * @returns {object} in the form of {key1:true, key2:true, ...}\n */\nfunction makeMap(str){\n  var obj = {}, items = str.split(\",\"), i;\n  for ( i = 0; i < items.length; i++ )\n    obj[ items[i] ] = true;\n  return obj;\n}\n\n\nif (msie < 9) {\n  nodeName_ = function(element) {\n    element = element.nodeName ? element : element[0];\n    return (element.scopeName && element.scopeName != 'HTML')\n      ? uppercase(element.scopeName + ':' + element.nodeName) : element.nodeName;\n  };\n} else {\n  nodeName_ = function(element) {\n    return element.nodeName ? element.nodeName : element[0].nodeName;\n  };\n}\n\n\nfunction map(obj, iterator, context) {\n  var results = [];\n  forEach(obj, function(value, index, list) {\n    results.push(iterator.call(context, value, index, list));\n  });\n  return results;\n}\n\n\n/**\n * @description\n * Determines the number of elements in an array, the number of properties an object has, or\n * the length of a string.\n *\n * Note: This function is used to augment the Object type in Angular expressions. See\n * {@link angular.Object} for more information about Angular arrays.\n *\n * @param {Object|Array|string} obj Object, array, or string to inspect.\n * @param {boolean} [ownPropsOnly=false] Count only \"own\" properties in an object\n * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.\n */\nfunction size(obj, ownPropsOnly) {\n  var count = 0, key;\n\n  if (isArray(obj) || isString(obj)) {\n    return obj.length;\n  } else if (isObject(obj)){\n    for (key in obj)\n      if (!ownPropsOnly || obj.hasOwnProperty(key))\n        count++;\n  }\n\n  return count;\n}\n\n\nfunction includes(array, obj) {\n  return indexOf(array, obj) != -1;\n}\n\nfunction indexOf(array, obj) {\n  if (array.indexOf) return array.indexOf(obj);\n\n  for (var i = 0; i < array.length; i++) {\n    if (obj === array[i]) return i;\n  }\n  return -1;\n}\n\nfunction arrayRemove(array, value) {\n  var index = indexOf(array, value);\n  if (index >=0)\n    array.splice(index, 1);\n  return value;\n}\n\nfunction isLeafNode (node) {\n  if (node) {\n    switch (node.nodeName) {\n    case \"OPTION\":\n    case \"PRE\":\n    case \"TITLE\":\n      return true;\n    }\n  }\n  return false;\n}\n\n/**\n * @ngdoc function\n * @name angular.copy\n * @function\n *\n * @description\n * Creates a deep copy of `source`, which should be an object or an array.\n *\n * * If no destination is supplied, a copy of the object or array is created.\n * * If a destination is provided, all of its elements (for array) or properties (for objects)\n *   are deleted and then all elements/properties from the source are copied to it.\n * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.\n * * If `source` is identical to 'destination' an exception will be thrown.\n *\n * @param {*} source The source that will be used to make a copy.\n *                   Can be any type, including primitives, `null`, and `undefined`.\n * @param {(Object|Array)=} destination Destination into which the source is copied. If\n *     provided, must be of the same type as `source`.\n * @returns {*} The copy or updated `destination`, if `destination` was specified.\n *\n * @example\n <doc:example>\n <doc:source>\n <div ng-controller=\"Controller\">\n <form novalidate class=\"simple-form\">\n Name: <input type=\"text\" ng-model=\"user.name\" /><br />\n E-mail: <input type=\"email\" ng-model=\"user.email\" /><br />\n Gender: <input type=\"radio\" ng-model=\"user.gender\" value=\"male\" />male\n <input type=\"radio\" ng-model=\"user.gender\" value=\"female\" />female<br />\n <button ng-click=\"reset()\">RESET</button>\n <button ng-click=\"update(user)\">SAVE</button>\n </form>\n <pre>form = {{user | json}}</pre>\n <pre>master = {{master | json}}</pre>\n </div>\n\n <script>\n function Controller($scope) {\n    $scope.master= {};\n\n    $scope.update = function(user) {\n      // Example with 1 argument\n      $scope.master= angular.copy(user);\n    };\n\n    $scope.reset = function() {\n      // Example with 2 arguments\n      angular.copy($scope.master, $scope.user);\n    };\n\n    $scope.reset();\n  }\n </script>\n </doc:source>\n </doc:example>\n */\nfunction copy(source, destination){\n  if (isWindow(source) || isScope(source)) {\n    throw ngMinErr('cpws',\n      \"Can't copy! Making copies of Window or Scope instances is not supported.\");\n  }\n\n  if (!destination) {\n    destination = source;\n    if (source) {\n      if (isArray(source)) {\n        destination = copy(source, []);\n      } else if (isDate(source)) {\n        destination = new Date(source.getTime());\n      } else if (isRegExp(source)) {\n        destination = new RegExp(source.source);\n      } else if (isObject(source)) {\n        destination = copy(source, {});\n      }\n    }\n  } else {\n    if (source === destination) throw ngMinErr('cpi',\n      \"Can't copy! Source and destination are identical.\");\n    if (isArray(source)) {\n      destination.length = 0;\n      for ( var i = 0; i < source.length; i++) {\n        destination.push(copy(source[i]));\n      }\n    } else {\n      var h = destination.$$hashKey;\n      forEach(destination, function(value, key){\n        delete destination[key];\n      });\n      for ( var key in source) {\n        destination[key] = copy(source[key]);\n      }\n      setHashKey(destination,h);\n    }\n  }\n  return destination;\n}\n\n/**\n * Create a shallow copy of an object\n */\nfunction shallowCopy(src, dst) {\n  dst = dst || {};\n\n  for(var key in src) {\n    // shallowCopy is only ever called by $compile nodeLinkFn, which has control over src\n    // so we don't need to worry about using our custom hasOwnProperty here\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/**\n * @ngdoc function\n * @name angular.equals\n * @function\n *\n * @description\n * Determines if two objects or two values are equivalent. Supports value types, regular\n * expressions, arrays and objects.\n *\n * Two objects or values are considered equivalent if at least one of the following is true:\n *\n * * Both objects or values pass `===` comparison.\n * * Both objects or values are of the same type and all of their properties are equal by\n *   comparing them with `angular.equals`.\n * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)\n * * Both values represent the same regular expression (In JavasScript,\n *   /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual\n *   representation matches).\n *\n * During a property comparison, properties of `function` type and properties with names\n * that begin with `$` are ignored.\n *\n * Scope and DOMWindow objects are being compared only by identify (`===`).\n *\n * @param {*} o1 Object or value to compare.\n * @param {*} o2 Object or value to compare.\n * @returns {boolean} True if arguments are equal.\n */\nfunction equals(o1, o2) {\n  if (o1 === o2) return true;\n  if (o1 === null || o2 === null) return false;\n  if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n  var t1 = typeof o1, t2 = typeof o2, length, key, keySet;\n  if (t1 == t2) {\n    if (t1 == 'object') {\n      if (isArray(o1)) {\n        if (!isArray(o2)) return false;\n        if ((length = o1.length) == o2.length) {\n          for(key=0; key<length; key++) {\n            if (!equals(o1[key], o2[key])) return false;\n          }\n          return true;\n        }\n      } else if (isDate(o1)) {\n        return isDate(o2) && o1.getTime() == o2.getTime();\n      } else if (isRegExp(o1) && isRegExp(o2)) {\n        return o1.toString() == o2.toString();\n      } else {\n        if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) || isArray(o2)) return false;\n        keySet = {};\n        for(key in o1) {\n          if (key.charAt(0) === '$' || isFunction(o1[key])) continue;\n          if (!equals(o1[key], o2[key])) return false;\n          keySet[key] = true;\n        }\n        for(key in o2) {\n          if (!keySet.hasOwnProperty(key) &&\n              key.charAt(0) !== '$' &&\n              o2[key] !== undefined &&\n              !isFunction(o2[key])) return false;\n        }\n        return true;\n      }\n    }\n  }\n  return false;\n}\n\n\nfunction csp() {\n  return (document.securityPolicy && document.securityPolicy.isActive) ||\n      (document.querySelector &&\n      !!(document.querySelector('[ng-csp]') || document.querySelector('[data-ng-csp]')));\n}\n\n\nfunction concat(array1, array2, index) {\n  return array1.concat(slice.call(array2, index));\n}\n\nfunction sliceArgs(args, startIndex) {\n  return slice.call(args, startIndex || 0);\n}\n\n\n/* jshint -W101 */\n/**\n * @ngdoc function\n * @name angular.bind\n * @function\n *\n * @description\n * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for\n * `fn`). You can supply optional `args` that are prebound to the function. This feature is also\n * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as\n * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).\n *\n * @param {Object} self Context which `fn` should be evaluated in.\n * @param {function()} fn Function to be bound.\n * @param {...*} args Optional arguments to be prebound to the `fn` function call.\n * @returns {function()} Function that wraps the `fn` with all the specified bindings.\n */\n/* jshint +W101 */\nfunction bind(self, fn) {\n  var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];\n  if (isFunction(fn) && !(fn instanceof RegExp)) {\n    return curryArgs.length\n      ? function() {\n          return arguments.length\n            ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))\n            : fn.apply(self, curryArgs);\n        }\n      : function() {\n          return arguments.length\n            ? fn.apply(self, arguments)\n            : fn.call(self);\n        };\n  } else {\n    // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)\n    return fn;\n  }\n}\n\n\nfunction toJsonReplacer(key, value) {\n  var val = value;\n\n  if (typeof key === 'string' && key.charAt(0) === '$') {\n    val = undefined;\n  } else if (isWindow(value)) {\n    val = '$WINDOW';\n  } else if (value &&  document === value) {\n    val = '$DOCUMENT';\n  } else if (isScope(value)) {\n    val = '$SCOPE';\n  }\n\n  return val;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.toJson\n * @function\n *\n * @description\n * Serializes input into a JSON-formatted string. Properties with leading $ characters will be\n * stripped since angular uses this notation internally.\n *\n * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.\n * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.\n * @returns {string|undefined} JSON-ified string representing `obj`.\n */\nfunction toJson(obj, pretty) {\n  if (typeof obj === 'undefined') return undefined;\n  return JSON.stringify(obj, toJsonReplacer, pretty ? '  ' : null);\n}\n\n\n/**\n * @ngdoc function\n * @name angular.fromJson\n * @function\n *\n * @description\n * Deserializes a JSON string.\n *\n * @param {string} json JSON string to deserialize.\n * @returns {Object|Array|Date|string|number} Deserialized thingy.\n */\nfunction fromJson(json) {\n  return isString(json)\n      ? JSON.parse(json)\n      : json;\n}\n\n\nfunction toBoolean(value) {\n  if (typeof value === 'function') {\n    value = true;\n  } else if (value && value.length !== 0) {\n    var v = lowercase(\"\" + value);\n    value = !(v == 'f' || v == '0' || v == 'false' || v == 'no' || v == 'n' || v == '[]');\n  } else {\n    value = false;\n  }\n  return value;\n}\n\n/**\n * @returns {string} Returns the string representation of the element.\n */\nfunction startingTag(element) {\n  element = jqLite(element).clone();\n  try {\n    // turns out IE does not let you set .html() on elements which\n    // are not allowed to have children. So we just ignore it.\n    element.empty();\n  } catch(e) {}\n  // As Per DOM Standards\n  var TEXT_NODE = 3;\n  var elemHtml = jqLite('<div>').append(element).html();\n  try {\n    return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :\n        elemHtml.\n          match(/^(<[^>]+>)/)[1].\n          replace(/^<([\\w\\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });\n  } catch(e) {\n    return lowercase(elemHtml);\n  }\n\n}\n\n\n/////////////////////////////////////////////////\n\n/**\n * Tries to decode the URI component without throwing an exception.\n *\n * @private\n * @param str value potential URI component to check.\n * @returns {boolean} True if `value` can be decoded\n * with the decodeURIComponent function.\n */\nfunction tryDecodeURIComponent(value) {\n  try {\n    return decodeURIComponent(value);\n  } catch(e) {\n    // Ignore any invalid uri component\n  }\n}\n\n\n/**\n * Parses an escaped url query string into key-value pairs.\n * @returns Object.<(string|boolean)>\n */\nfunction parseKeyValue(/**string*/keyValue) {\n  var obj = {}, key_value, key;\n  forEach((keyValue || \"\").split('&'), function(keyValue){\n    if ( keyValue ) {\n      key_value = keyValue.split('=');\n      key = tryDecodeURIComponent(key_value[0]);\n      if ( isDefined(key) ) {\n        var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;\n        if (!obj[key]) {\n          obj[key] = val;\n        } else if(isArray(obj[key])) {\n          obj[key].push(val);\n        } else {\n          obj[key] = [obj[key],val];\n        }\n      }\n    }\n  });\n  return obj;\n}\n\nfunction toKeyValue(obj) {\n  var parts = [];\n  forEach(obj, function(value, key) {\n    if (isArray(value)) {\n      forEach(value, function(arrayValue) {\n        parts.push(encodeUriQuery(key, true) +\n                   (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));\n      });\n    } else {\n    parts.push(encodeUriQuery(key, true) +\n               (value === true ? '' : '=' + encodeUriQuery(value, true)));\n    }\n  });\n  return parts.length ? parts.join('&') : '';\n}\n\n\n/**\n * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path\n * segments:\n *    segment       = *pchar\n *    pchar         = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n *    pct-encoded   = \"%\" HEXDIG HEXDIG\n *    unreserved    = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n *    sub-delims    = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n *                     / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriSegment(val) {\n  return encodeUriQuery(val, true).\n             replace(/%26/gi, '&').\n             replace(/%3D/gi, '=').\n             replace(/%2B/gi, '+');\n}\n\n\n/**\n * This method is intended for encoding *key* or *value* parts of query component. We need a custom\n * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be\n * encoded per http://tools.ietf.org/html/rfc3986:\n *    query       = *( pchar / \"/\" / \"?\" )\n *    pchar         = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n *    unreserved    = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n *    pct-encoded   = \"%\" HEXDIG HEXDIG\n *    sub-delims    = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n *                     / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriQuery(val, pctEncodeSpaces) {\n  return encodeURIComponent(val).\n             replace(/%40/gi, '@').\n             replace(/%3A/gi, ':').\n             replace(/%24/g, '$').\n             replace(/%2C/gi, ',').\n             replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n}\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngApp\n *\n * @element ANY\n * @param {angular.Module} ngApp an optional application\n *   {@link angular.module module} name to load.\n *\n * @description\n *\n * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive\n * designates the **root element** of the application and is typically placed near the root element\n * of the page - e.g. on the `<body>` or `<html>` tags.\n *\n * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`\n * found in the document will be used to define the root element to auto-bootstrap as an\n * application. To run multiple applications in an HTML document you must manually bootstrap them using\n * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.\n *\n * You can specify an **AngularJS module** to be used as the root module for the application.  This\n * module will be loaded into the {@link AUTO.$injector} when the application is bootstrapped and\n * should contain the application code needed or have dependencies on other modules that will\n * contain the code. See {@link angular.module} for more information.\n *\n * In the example below if the `ngApp` directive were not placed on the `html` element then the\n * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`\n * would not be resolved to `3`.\n *\n * `ngApp` is the easiest, and most common, way to bootstrap an application.\n *\n <example module=\"ngAppDemo\">\n   <file name=\"index.html\">\n   <div ng-controller=\"ngAppDemoController\">\n     I can add: {{a}} + {{b}} =  {{ a+b }}\n   </file>\n   <file name=\"script.js\">\n   angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {\n     $scope.a = 1;\n     $scope.b = 2;\n   });\n   </file>\n </example>\n *\n */\nfunction angularInit(element, bootstrap) {\n  var elements = [element],\n      appElement,\n      module,\n      names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],\n      NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/;\n\n  function append(element) {\n    element && elements.push(element);\n  }\n\n  forEach(names, function(name) {\n    names[name] = true;\n    append(document.getElementById(name));\n    name = name.replace(':', '\\\\:');\n    if (element.querySelectorAll) {\n      forEach(element.querySelectorAll('.' + name), append);\n      forEach(element.querySelectorAll('.' + name + '\\\\:'), append);\n      forEach(element.querySelectorAll('[' + name + ']'), append);\n    }\n  });\n\n  forEach(elements, function(element) {\n    if (!appElement) {\n      var className = ' ' + element.className + ' ';\n      var match = NG_APP_CLASS_REGEXP.exec(className);\n      if (match) {\n        appElement = element;\n        module = (match[2] || '').replace(/\\s+/g, ',');\n      } else {\n        forEach(element.attributes, function(attr) {\n          if (!appElement && names[attr.name]) {\n            appElement = element;\n            module = attr.value;\n          }\n        });\n      }\n    }\n  });\n  if (appElement) {\n    bootstrap(appElement, module ? [module] : []);\n  }\n}\n\n/**\n * @ngdoc function\n * @name angular.bootstrap\n * @description\n * Use this function to manually start up angular application.\n *\n * See: {@link guide/bootstrap Bootstrap}\n *\n * Note that ngScenario-based end-to-end tests cannot use this function to bootstrap manually.\n * They must use {@link api/ng.directive:ngApp ngApp}.\n *\n * @param {Element} element DOM element which is the root of angular application.\n * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.\n *     Each item in the array should be the name of a predefined module or a (DI annotated)\n *     function that will be invoked by the injector as a run block.\n *     See: {@link angular.module modules}\n * @returns {AUTO.$injector} Returns the newly created injector for this app.\n */\nfunction bootstrap(element, modules) {\n  var doBootstrap = function() {\n    element = jqLite(element);\n\n    if (element.injector()) {\n      var tag = (element[0] === document) ? 'document' : startingTag(element);\n      throw ngMinErr('btstrpd', \"App Already Bootstrapped with this Element '{0}'\", tag);\n    }\n\n    modules = modules || [];\n    modules.unshift(['$provide', function($provide) {\n      $provide.value('$rootElement', element);\n    }]);\n    modules.unshift('ng');\n    var injector = createInjector(modules);\n    injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector', '$animate',\n       function(scope, element, compile, injector, animate) {\n        scope.$apply(function() {\n          element.data('$injector', injector);\n          compile(element)(scope);\n        });\n      }]\n    );\n    return injector;\n  };\n\n  var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;\n\n  if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {\n    return doBootstrap();\n  }\n\n  window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');\n  angular.resumeBootstrap = function(extraModules) {\n    forEach(extraModules, function(module) {\n      modules.push(module);\n    });\n    doBootstrap();\n  };\n}\n\nvar SNAKE_CASE_REGEXP = /[A-Z]/g;\nfunction snake_case(name, separator){\n  separator = separator || '_';\n  return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {\n    return (pos ? separator : '') + letter.toLowerCase();\n  });\n}\n\nfunction bindJQuery() {\n  // bind to jQuery if present;\n  jQuery = window.jQuery;\n  // reset to jQuery or default to us.\n  if (jQuery) {\n    jqLite = jQuery;\n    extend(jQuery.fn, {\n      scope: JQLitePrototype.scope,\n      isolateScope: JQLitePrototype.isolateScope,\n      controller: JQLitePrototype.controller,\n      injector: JQLitePrototype.injector,\n      inheritedData: JQLitePrototype.inheritedData\n    });\n    // Method signature:\n    //     jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments)\n    jqLitePatchJQueryRemove('remove', true, true, false);\n    jqLitePatchJQueryRemove('empty', false, false, false);\n    jqLitePatchJQueryRemove('html', false, false, true);\n  } else {\n    jqLite = JQLite;\n  }\n  angular.element = jqLite;\n}\n\n/**\n * throw error if the argument is falsy.\n */\nfunction assertArg(arg, name, reason) {\n  if (!arg) {\n    throw ngMinErr('areq', \"Argument '{0}' is {1}\", (name || '?'), (reason || \"required\"));\n  }\n  return arg;\n}\n\nfunction assertArgFn(arg, name, acceptArrayAnnotation) {\n  if (acceptArrayAnnotation && isArray(arg)) {\n      arg = arg[arg.length - 1];\n  }\n\n  assertArg(isFunction(arg), name, 'not a function, got ' +\n      (arg && typeof arg == 'object' ? arg.constructor.name || 'Object' : typeof arg));\n  return arg;\n}\n\n/**\n * throw error if the name given is hasOwnProperty\n * @param  {String} name    the name to test\n * @param  {String} context the context in which the name is used, such as module or directive\n */\nfunction assertNotHasOwnProperty(name, context) {\n  if (name === 'hasOwnProperty') {\n    throw ngMinErr('badname', \"hasOwnProperty is not a valid {0} name\", context);\n  }\n}\n\n/**\n * Return the value accessible from the object by path. Any undefined traversals are ignored\n * @param {Object} obj starting object\n * @param {string} path path to traverse\n * @param {boolean=true} bindFnToScope\n * @returns value as accessible by path\n */\n//TODO(misko): this function needs to be removed\nfunction getter(obj, path, bindFnToScope) {\n  if (!path) return obj;\n  var keys = path.split('.');\n  var key;\n  var lastInstance = obj;\n  var len = keys.length;\n\n  for (var i = 0; i < len; i++) {\n    key = keys[i];\n    if (obj) {\n      obj = (lastInstance = obj)[key];\n    }\n  }\n  if (!bindFnToScope && isFunction(obj)) {\n    return bind(lastInstance, obj);\n  }\n  return obj;\n}\n\n/**\n * Return the DOM siblings between the first and last node in the given array.\n * @param {Array} array like object\n * @returns jQlite object containing the elements\n */\nfunction getBlockElements(nodes) {\n  var startNode = nodes[0],\n      endNode = nodes[nodes.length - 1];\n  if (startNode === endNode) {\n    return jqLite(startNode);\n  }\n\n  var element = startNode;\n  var elements = [element];\n\n  do {\n    element = element.nextSibling;\n    if (!element) break;\n    elements.push(element);\n  } while (element !== endNode);\n\n  return jqLite(elements);\n}\n\n/**\n * @ngdoc interface\n * @name angular.Module\n * @description\n *\n * Interface for configuring angular {@link angular.module modules}.\n */\n\nfunction setupModuleLoader(window) {\n\n  var $injectorMinErr = minErr('$injector');\n  var ngMinErr = minErr('ng');\n\n  function ensure(obj, name, factory) {\n    return obj[name] || (obj[name] = factory());\n  }\n\n  var angular = ensure(window, 'angular', Object);\n\n  // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap\n  angular.$$minErr = angular.$$minErr || minErr;\n\n  return ensure(angular, 'module', function() {\n    /** @type {Object.<string, angular.Module>} */\n    var modules = {};\n\n    /**\n     * @ngdoc function\n     * @name angular.module\n     * @description\n     *\n     * The `angular.module` is a global place for creating, registering and retrieving Angular\n     * modules.\n     * All modules (angular core or 3rd party) that should be available to an application must be\n     * registered using this mechanism.\n     *\n     * When passed two or more arguments, a new module is created.  If passed only one argument, an\n     * existing module (the name passed as the first argument to `module`) is retrieved.\n     *\n     *\n     * # Module\n     *\n     * A module is a collection of services, directives, filters, and configuration information.\n     * `angular.module` is used to configure the {@link AUTO.$injector $injector}.\n     *\n     * <pre>\n     * // Create a new module\n     * var myModule = angular.module('myModule', []);\n     *\n     * // register a new service\n     * myModule.value('appName', 'MyCoolApp');\n     *\n     * // configure existing services inside initialization blocks.\n     * myModule.config(function($locationProvider) {\n     *   // Configure existing providers\n     *   $locationProvider.hashPrefix('!');\n     * });\n     * </pre>\n     *\n     * Then you can create an injector and load your modules like this:\n     *\n     * <pre>\n     * var injector = angular.injector(['ng', 'MyModule'])\n     * </pre>\n     *\n     * However it's more likely that you'll just use\n     * {@link ng.directive:ngApp ngApp} or\n     * {@link angular.bootstrap} to simplify this process for you.\n     *\n     * @param {!string} name The name of the module to create or retrieve.\n     * @param {Array.<string>=} requires If specified then new module is being created. If\n     *        unspecified then the the module is being retrieved for further configuration.\n     * @param {Function} configFn Optional configuration function for the module. Same as\n     *        {@link angular.Module#methods_config Module#config()}.\n     * @returns {module} new module with the {@link angular.Module} api.\n     */\n    return function module(name, requires, configFn) {\n      var assertNotHasOwnProperty = function(name, context) {\n        if (name === 'hasOwnProperty') {\n          throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);\n        }\n      };\n\n      assertNotHasOwnProperty(name, 'module');\n      if (requires && modules.hasOwnProperty(name)) {\n        modules[name] = null;\n      }\n      return ensure(modules, name, function() {\n        if (!requires) {\n          throw $injectorMinErr('nomod', \"Module '{0}' is not available! You either misspelled \" +\n             \"the module name or forgot to load it. If registering a module ensure that you \" +\n             \"specify the dependencies as the second argument.\", name);\n        }\n\n        /** @type {!Array.<Array.<*>>} */\n        var invokeQueue = [];\n\n        /** @type {!Array.<Function>} */\n        var runBlocks = [];\n\n        var config = invokeLater('$injector', 'invoke');\n\n        /** @type {angular.Module} */\n        var moduleInstance = {\n          // Private state\n          _invokeQueue: invokeQueue,\n          _runBlocks: runBlocks,\n\n          /**\n           * @ngdoc property\n           * @name angular.Module#requires\n           * @propertyOf angular.Module\n           * @returns {Array.<string>} List of module names which must be loaded before this module.\n           * @description\n           * Holds the list of modules which the injector will load before the current module is\n           * loaded.\n           */\n          requires: requires,\n\n          /**\n           * @ngdoc property\n           * @name angular.Module#name\n           * @propertyOf angular.Module\n           * @returns {string} Name of the module.\n           * @description\n           */\n          name: name,\n\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#provider\n           * @methodOf angular.Module\n           * @param {string} name service name\n           * @param {Function} providerType Construction function for creating new instance of the\n           *                                service.\n           * @description\n           * See {@link AUTO.$provide#provider $provide.provider()}.\n           */\n          provider: invokeLater('$provide', 'provider'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#factory\n           * @methodOf angular.Module\n           * @param {string} name service name\n           * @param {Function} providerFunction Function for creating new instance of the service.\n           * @description\n           * See {@link AUTO.$provide#factory $provide.factory()}.\n           */\n          factory: invokeLater('$provide', 'factory'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#service\n           * @methodOf angular.Module\n           * @param {string} name service name\n           * @param {Function} constructor A constructor function that will be instantiated.\n           * @description\n           * See {@link AUTO.$provide#service $provide.service()}.\n           */\n          service: invokeLater('$provide', 'service'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#value\n           * @methodOf angular.Module\n           * @param {string} name service name\n           * @param {*} object Service instance object.\n           * @description\n           * See {@link AUTO.$provide#value $provide.value()}.\n           */\n          value: invokeLater('$provide', 'value'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#constant\n           * @methodOf angular.Module\n           * @param {string} name constant name\n           * @param {*} object Constant value.\n           * @description\n           * Because the constant are fixed, they get applied before other provide methods.\n           * See {@link AUTO.$provide#constant $provide.constant()}.\n           */\n          constant: invokeLater('$provide', 'constant', 'unshift'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#animation\n           * @methodOf angular.Module\n           * @param {string} name animation name\n           * @param {Function} animationFactory Factory function for creating new instance of an\n           *                                    animation.\n           * @description\n           *\n           * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.\n           *\n           *\n           * Defines an animation hook that can be later used with\n           * {@link ngAnimate.$animate $animate} service and directives that use this service.\n           *\n           * <pre>\n           * module.animation('.animation-name', function($inject1, $inject2) {\n           *   return {\n           *     eventName : function(element, done) {\n           *       //code to run the animation\n           *       //once complete, then run done()\n           *       return function cancellationFunction(element) {\n           *         //code to cancel the animation\n           *       }\n           *     }\n           *   }\n           * })\n           * </pre>\n           *\n           * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and\n           * {@link ngAnimate ngAnimate module} for more information.\n           */\n          animation: invokeLater('$animateProvider', 'register'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#filter\n           * @methodOf angular.Module\n           * @param {string} name Filter name.\n           * @param {Function} filterFactory Factory function for creating new instance of filter.\n           * @description\n           * See {@link ng.$filterProvider#register $filterProvider.register()}.\n           */\n          filter: invokeLater('$filterProvider', 'register'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#controller\n           * @methodOf angular.Module\n           * @param {string|Object} name Controller name, or an object map of controllers where the\n           *    keys are the names and the values are the constructors.\n           * @param {Function} constructor Controller constructor function.\n           * @description\n           * See {@link ng.$controllerProvider#register $controllerProvider.register()}.\n           */\n          controller: invokeLater('$controllerProvider', 'register'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#directive\n           * @methodOf angular.Module\n           * @param {string|Object} name Directive name, or an object map of directives where the\n           *    keys are the names and the values are the factories.\n           * @param {Function} directiveFactory Factory function for creating new instance of\n           * directives.\n           * @description\n           * See {@link ng.$compileProvider#methods_directive $compileProvider.directive()}.\n           */\n          directive: invokeLater('$compileProvider', 'directive'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#config\n           * @methodOf angular.Module\n           * @param {Function} configFn Execute this function on module load. Useful for service\n           *    configuration.\n           * @description\n           * Use this method to register work which needs to be performed on module loading.\n           */\n          config: config,\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#run\n           * @methodOf angular.Module\n           * @param {Function} initializationFn Execute this function after injector creation.\n           *    Useful for application initialization.\n           * @description\n           * Use this method to register work which should be performed when the injector is done\n           * loading all modules.\n           */\n          run: function(block) {\n            runBlocks.push(block);\n            return this;\n          }\n        };\n\n        if (configFn) {\n          config(configFn);\n        }\n\n        return  moduleInstance;\n\n        /**\n         * @param {string} provider\n         * @param {string} method\n         * @param {String=} insertMethod\n         * @returns {angular.Module}\n         */\n        function invokeLater(provider, method, insertMethod) {\n          return function() {\n            invokeQueue[insertMethod || 'push']([provider, method, arguments]);\n            return moduleInstance;\n          };\n        }\n      });\n    };\n  });\n\n}\n\n/* global\n    angularModule: true,\n    version: true,\n    \n    $LocaleProvider,\n    $CompileProvider,\n    \n    htmlAnchorDirective,\n    inputDirective,\n    inputDirective,\n    formDirective,\n    scriptDirective,\n    selectDirective,\n    styleDirective,\n    optionDirective,\n    ngBindDirective,\n    ngBindHtmlDirective,\n    ngBindTemplateDirective,\n    ngClassDirective,\n    ngClassEvenDirective,\n    ngClassOddDirective,\n    ngCspDirective,\n    ngCloakDirective,\n    ngControllerDirective,\n    ngFormDirective,\n    ngHideDirective,\n    ngIfDirective,\n    ngIncludeDirective,\n    ngIncludeFillContentDirective,\n    ngInitDirective,\n    ngNonBindableDirective,\n    ngPluralizeDirective,\n    ngRepeatDirective,\n    ngShowDirective,\n    ngStyleDirective,\n    ngSwitchDirective,\n    ngSwitchWhenDirective,\n    ngSwitchDefaultDirective,\n    ngOptionsDirective,\n    ngTranscludeDirective,\n    ngModelDirective,\n    ngListDirective,\n    ngChangeDirective,\n    requiredDirective,\n    requiredDirective,\n    ngValueDirective,\n    ngAttributeAliasDirectives,\n    ngEventDirectives,\n\n    $AnchorScrollProvider,\n    $AnimateProvider,\n    $BrowserProvider,\n    $CacheFactoryProvider,\n    $ControllerProvider,\n    $DocumentProvider,\n    $ExceptionHandlerProvider,\n    $FilterProvider,\n    $InterpolateProvider,\n    $IntervalProvider,\n    $HttpProvider,\n    $HttpBackendProvider,\n    $LocationProvider,\n    $LogProvider,\n    $ParseProvider,\n    $RootScopeProvider,\n    $QProvider,\n    $$SanitizeUriProvider,\n    $SceProvider,\n    $SceDelegateProvider,\n    $SnifferProvider,\n    $TemplateCacheProvider,\n    $TimeoutProvider,\n    $WindowProvider\n*/\n\n\n/**\n * @ngdoc property\n * @name angular.version\n * @description\n * An object that contains information about the current AngularJS version. This object has the\n * following properties:\n *\n * - `full` – `{string}` – Full version string, such as \"0.9.18\".\n * - `major` – `{number}` – Major version number, such as \"0\".\n * - `minor` – `{number}` – Minor version number, such as \"9\".\n * - `dot` – `{number}` – Dot version number, such as \"18\".\n * - `codeName` – `{string}` – Code name of the release, such as \"jiggling-armfat\".\n */\nvar version = {\n  full: '1.2.12',    // all of these placeholder strings will be replaced by grunt's\n  major: 1,    // package task\n  minor: 2,\n  dot: 12,\n  codeName: 'cauliflower-eradication'\n};\n\n\nfunction publishExternalAPI(angular){\n  extend(angular, {\n    'bootstrap': bootstrap,\n    'copy': copy,\n    'extend': extend,\n    'equals': equals,\n    'element': jqLite,\n    'forEach': forEach,\n    'injector': createInjector,\n    'noop':noop,\n    'bind':bind,\n    'toJson': toJson,\n    'fromJson': fromJson,\n    'identity':identity,\n    'isUndefined': isUndefined,\n    'isDefined': isDefined,\n    'isString': isString,\n    'isFunction': isFunction,\n    'isObject': isObject,\n    'isNumber': isNumber,\n    'isElement': isElement,\n    'isArray': isArray,\n    'version': version,\n    'isDate': isDate,\n    'lowercase': lowercase,\n    'uppercase': uppercase,\n    'callbacks': {counter: 0},\n    '$$minErr': minErr,\n    '$$csp': csp\n  });\n\n  angularModule = setupModuleLoader(window);\n  try {\n    angularModule('ngLocale');\n  } catch (e) {\n    angularModule('ngLocale', []).provider('$locale', $LocaleProvider);\n  }\n\n  angularModule('ng', ['ngLocale'], ['$provide',\n    function ngModule($provide) {\n      // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.\n      $provide.provider({\n        $$sanitizeUri: $$SanitizeUriProvider\n      });\n      $provide.provider('$compile', $CompileProvider).\n        directive({\n            a: htmlAnchorDirective,\n            input: inputDirective,\n            textarea: inputDirective,\n            form: formDirective,\n            script: scriptDirective,\n            select: selectDirective,\n            style: styleDirective,\n            option: optionDirective,\n            ngBind: ngBindDirective,\n            ngBindHtml: ngBindHtmlDirective,\n            ngBindTemplate: ngBindTemplateDirective,\n            ngClass: ngClassDirective,\n            ngClassEven: ngClassEvenDirective,\n            ngClassOdd: ngClassOddDirective,\n            ngCloak: ngCloakDirective,\n            ngController: ngControllerDirective,\n            ngForm: ngFormDirective,\n            ngHide: ngHideDirective,\n            ngIf: ngIfDirective,\n            ngInclude: ngIncludeDirective,\n            ngInit: ngInitDirective,\n            ngNonBindable: ngNonBindableDirective,\n            ngPluralize: ngPluralizeDirective,\n            ngRepeat: ngRepeatDirective,\n            ngShow: ngShowDirective,\n            ngStyle: ngStyleDirective,\n            ngSwitch: ngSwitchDirective,\n            ngSwitchWhen: ngSwitchWhenDirective,\n            ngSwitchDefault: ngSwitchDefaultDirective,\n            ngOptions: ngOptionsDirective,\n            ngTransclude: ngTranscludeDirective,\n            ngModel: ngModelDirective,\n            ngList: ngListDirective,\n            ngChange: ngChangeDirective,\n            required: requiredDirective,\n            ngRequired: requiredDirective,\n            ngValue: ngValueDirective\n        }).\n        directive({\n          ngInclude: ngIncludeFillContentDirective\n        }).\n        directive(ngAttributeAliasDirectives).\n        directive(ngEventDirectives);\n      $provide.provider({\n        $anchorScroll: $AnchorScrollProvider,\n        $animate: $AnimateProvider,\n        $browser: $BrowserProvider,\n        $cacheFactory: $CacheFactoryProvider,\n        $controller: $ControllerProvider,\n        $document: $DocumentProvider,\n        $exceptionHandler: $ExceptionHandlerProvider,\n        $filter: $FilterProvider,\n        $interpolate: $InterpolateProvider,\n        $interval: $IntervalProvider,\n        $http: $HttpProvider,\n        $httpBackend: $HttpBackendProvider,\n        $location: $LocationProvider,\n        $log: $LogProvider,\n        $parse: $ParseProvider,\n        $rootScope: $RootScopeProvider,\n        $q: $QProvider,\n        $sce: $SceProvider,\n        $sceDelegate: $SceDelegateProvider,\n        $sniffer: $SnifferProvider,\n        $templateCache: $TemplateCacheProvider,\n        $timeout: $TimeoutProvider,\n        $window: $WindowProvider\n      });\n    }\n  ]);\n}\n\n/* global\n\n  -JQLitePrototype,\n  -addEventListenerFn,\n  -removeEventListenerFn,\n  -BOOLEAN_ATTR\n*/\n\n//////////////////////////////////\n//JQLite\n//////////////////////////////////\n\n/**\n * @ngdoc function\n * @name angular.element\n * @function\n *\n * @description\n * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.\n *\n * If jQuery is available, `angular.element` is an alias for the\n * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`\n * delegates to Angular's built-in subset of jQuery, called \"jQuery lite\" or \"jqLite.\"\n *\n * <div class=\"alert alert-success\">jqLite is a tiny, API-compatible subset of jQuery that allows\n * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most\n * commonly needed functionality with the goal of having a very small footprint.</div>\n *\n * To use jQuery, simply load it before `DOMContentLoaded` event fired.\n *\n * <div class=\"alert\">**Note:** all element references in Angular are always wrapped with jQuery or\n * jqLite; they are never raw DOM references.</div>\n *\n * ## Angular's jqLite\n * jqLite provides only the following jQuery methods:\n *\n * - [`addClass()`](http://api.jquery.com/addClass/)\n * - [`after()`](http://api.jquery.com/after/)\n * - [`append()`](http://api.jquery.com/append/)\n * - [`attr()`](http://api.jquery.com/attr/)\n * - [`bind()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData\n * - [`children()`](http://api.jquery.com/children/) - Does not support selectors\n * - [`clone()`](http://api.jquery.com/clone/)\n * - [`contents()`](http://api.jquery.com/contents/)\n * - [`css()`](http://api.jquery.com/css/)\n * - [`data()`](http://api.jquery.com/data/)\n * - [`empty()`](http://api.jquery.com/empty/)\n * - [`eq()`](http://api.jquery.com/eq/)\n * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name\n * - [`hasClass()`](http://api.jquery.com/hasClass/)\n * - [`html()`](http://api.jquery.com/html/)\n * - [`next()`](http://api.jquery.com/next/) - Does not support selectors\n * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData\n * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces or selectors\n * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors\n * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors\n * - [`prepend()`](http://api.jquery.com/prepend/)\n * - [`prop()`](http://api.jquery.com/prop/)\n * - [`ready()`](http://api.jquery.com/ready/)\n * - [`remove()`](http://api.jquery.com/remove/)\n * - [`removeAttr()`](http://api.jquery.com/removeAttr/)\n * - [`removeClass()`](http://api.jquery.com/removeClass/)\n * - [`removeData()`](http://api.jquery.com/removeData/)\n * - [`replaceWith()`](http://api.jquery.com/replaceWith/)\n * - [`text()`](http://api.jquery.com/text/)\n * - [`toggleClass()`](http://api.jquery.com/toggleClass/)\n * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.\n * - [`unbind()`](http://api.jquery.com/off/) - Does not support namespaces\n * - [`val()`](http://api.jquery.com/val/)\n * - [`wrap()`](http://api.jquery.com/wrap/)\n *\n * ## jQuery/jqLite Extras\n * Angular also provides the following additional methods and events to both jQuery and jqLite:\n *\n * ### Events\n * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event\n *    on all DOM nodes being removed.  This can be used to clean up any 3rd party bindings to the DOM\n *    element before it is removed.\n *\n * ### Methods\n * - `controller(name)` - retrieves the controller of the current element or its parent. By default\n *   retrieves controller associated with the `ngController` directive. If `name` is provided as\n *   camelCase directive name, then the controller for this directive will be retrieved (e.g.\n *   `'ngModel'`).\n * - `injector()` - retrieves the injector of the current element or its parent.\n * - `scope()` - retrieves the {@link api/ng.$rootScope.Scope scope} of the current\n *   element or its parent.\n * - `isolateScope()` - retrieves an isolate {@link api/ng.$rootScope.Scope scope} if one is attached directly to the\n *   current element. This getter should be used only on elements that contain a directive which starts a new isolate\n *   scope. Calling `scope()` on this element always returns the original non-isolate scope.\n * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top\n *   parent element is reached.\n *\n * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.\n * @returns {Object} jQuery object.\n */\n\nvar jqCache = JQLite.cache = {},\n    jqName = JQLite.expando = 'ng-' + new Date().getTime(),\n    jqId = 1,\n    addEventListenerFn = (window.document.addEventListener\n      ? function(element, type, fn) {element.addEventListener(type, fn, false);}\n      : function(element, type, fn) {element.attachEvent('on' + type, fn);}),\n    removeEventListenerFn = (window.document.removeEventListener\n      ? function(element, type, fn) {element.removeEventListener(type, fn, false); }\n      : function(element, type, fn) {element.detachEvent('on' + type, fn); });\n\nfunction jqNextId() { return ++jqId; }\n\n\nvar SPECIAL_CHARS_REGEXP = /([\\:\\-\\_]+(.))/g;\nvar MOZ_HACK_REGEXP = /^moz([A-Z])/;\nvar jqLiteMinErr = minErr('jqLite');\n\n/**\n * Converts snake_case to camelCase.\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction camelCase(name) {\n  return name.\n    replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {\n      return offset ? letter.toUpperCase() : letter;\n    }).\n    replace(MOZ_HACK_REGEXP, 'Moz$1');\n}\n\n/////////////////////////////////////////////\n// jQuery mutation patch\n//\n// In conjunction with bindJQuery intercepts all jQuery's DOM destruction apis and fires a\n// $destroy event on all DOM nodes being removed.\n//\n/////////////////////////////////////////////\n\nfunction jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments) {\n  var originalJqFn = jQuery.fn[name];\n  originalJqFn = originalJqFn.$original || originalJqFn;\n  removePatch.$original = originalJqFn;\n  jQuery.fn[name] = removePatch;\n\n  function removePatch(param) {\n    // jshint -W040\n    var list = filterElems && param ? [this.filter(param)] : [this],\n        fireEvent = dispatchThis,\n        set, setIndex, setLength,\n        element, childIndex, childLength, children;\n\n    if (!getterIfNoArguments || param != null) {\n      while(list.length) {\n        set = list.shift();\n        for(setIndex = 0, setLength = set.length; setIndex < setLength; setIndex++) {\n          element = jqLite(set[setIndex]);\n          if (fireEvent) {\n            element.triggerHandler('$destroy');\n          } else {\n            fireEvent = !fireEvent;\n          }\n          for(childIndex = 0, childLength = (children = element.children()).length;\n              childIndex < childLength;\n              childIndex++) {\n            list.push(jQuery(children[childIndex]));\n          }\n        }\n      }\n    }\n    return originalJqFn.apply(this, arguments);\n  }\n}\n\n/////////////////////////////////////////////\nfunction JQLite(element) {\n  if (element instanceof JQLite) {\n    return element;\n  }\n  if (isString(element)) {\n    element = trim(element);\n  }\n  if (!(this instanceof JQLite)) {\n    if (isString(element) && element.charAt(0) != '<') {\n      throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');\n    }\n    return new JQLite(element);\n  }\n\n  if (isString(element)) {\n    var div = document.createElement('div');\n    // Read about the NoScope elements here:\n    // https://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx\n    div.innerHTML = '<div>&#160;</div>' + element; // IE insanity to make NoScope elements work!\n    div.removeChild(div.firstChild); // remove the superfluous div\n    jqLiteAddNodes(this, div.childNodes);\n    var fragment = jqLite(document.createDocumentFragment());\n    fragment.append(this); // detach the elements from the temporary DOM div.\n  } else {\n    jqLiteAddNodes(this, element);\n  }\n}\n\nfunction jqLiteClone(element) {\n  return element.cloneNode(true);\n}\n\nfunction jqLiteDealoc(element){\n  jqLiteRemoveData(element);\n  for ( var i = 0, children = element.childNodes || []; i < children.length; i++) {\n    jqLiteDealoc(children[i]);\n  }\n}\n\nfunction jqLiteOff(element, type, fn, unsupported) {\n  if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');\n\n  var events = jqLiteExpandoStore(element, 'events'),\n      handle = jqLiteExpandoStore(element, 'handle');\n\n  if (!handle) return; //no listeners registered\n\n  if (isUndefined(type)) {\n    forEach(events, function(eventHandler, type) {\n      removeEventListenerFn(element, type, eventHandler);\n      delete events[type];\n    });\n  } else {\n    forEach(type.split(' '), function(type) {\n      if (isUndefined(fn)) {\n        removeEventListenerFn(element, type, events[type]);\n        delete events[type];\n      } else {\n        arrayRemove(events[type] || [], fn);\n      }\n    });\n  }\n}\n\nfunction jqLiteRemoveData(element, name) {\n  var expandoId = element[jqName],\n      expandoStore = jqCache[expandoId];\n\n  if (expandoStore) {\n    if (name) {\n      delete jqCache[expandoId].data[name];\n      return;\n    }\n\n    if (expandoStore.handle) {\n      expandoStore.events.$destroy && expandoStore.handle({}, '$destroy');\n      jqLiteOff(element);\n    }\n    delete jqCache[expandoId];\n    element[jqName] = undefined; // ie does not allow deletion of attributes on elements.\n  }\n}\n\nfunction jqLiteExpandoStore(element, key, value) {\n  var expandoId = element[jqName],\n      expandoStore = jqCache[expandoId || -1];\n\n  if (isDefined(value)) {\n    if (!expandoStore) {\n      element[jqName] = expandoId = jqNextId();\n      expandoStore = jqCache[expandoId] = {};\n    }\n    expandoStore[key] = value;\n  } else {\n    return expandoStore && expandoStore[key];\n  }\n}\n\nfunction jqLiteData(element, key, value) {\n  var data = jqLiteExpandoStore(element, 'data'),\n      isSetter = isDefined(value),\n      keyDefined = !isSetter && isDefined(key),\n      isSimpleGetter = keyDefined && !isObject(key);\n\n  if (!data && !isSimpleGetter) {\n    jqLiteExpandoStore(element, 'data', data = {});\n  }\n\n  if (isSetter) {\n    data[key] = value;\n  } else {\n    if (keyDefined) {\n      if (isSimpleGetter) {\n        // don't create data in this case.\n        return data && data[key];\n      } else {\n        extend(data, key);\n      }\n    } else {\n      return data;\n    }\n  }\n}\n\nfunction jqLiteHasClass(element, selector) {\n  if (!element.getAttribute) return false;\n  return ((\" \" + (element.getAttribute('class') || '') + \" \").replace(/[\\n\\t]/g, \" \").\n      indexOf( \" \" + selector + \" \" ) > -1);\n}\n\nfunction jqLiteRemoveClass(element, cssClasses) {\n  if (cssClasses && element.setAttribute) {\n    forEach(cssClasses.split(' '), function(cssClass) {\n      element.setAttribute('class', trim(\n          (\" \" + (element.getAttribute('class') || '') + \" \")\n          .replace(/[\\n\\t]/g, \" \")\n          .replace(\" \" + trim(cssClass) + \" \", \" \"))\n      );\n    });\n  }\n}\n\nfunction jqLiteAddClass(element, cssClasses) {\n  if (cssClasses && element.setAttribute) {\n    var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')\n                            .replace(/[\\n\\t]/g, \" \");\n\n    forEach(cssClasses.split(' '), function(cssClass) {\n      cssClass = trim(cssClass);\n      if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {\n        existingClasses += cssClass + ' ';\n      }\n    });\n\n    element.setAttribute('class', trim(existingClasses));\n  }\n}\n\nfunction jqLiteAddNodes(root, elements) {\n  if (elements) {\n    elements = (!elements.nodeName && isDefined(elements.length) && !isWindow(elements))\n      ? elements\n      : [ elements ];\n    for(var i=0; i < elements.length; i++) {\n      root.push(elements[i]);\n    }\n  }\n}\n\nfunction jqLiteController(element, name) {\n  return jqLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');\n}\n\nfunction jqLiteInheritedData(element, name, value) {\n  element = jqLite(element);\n\n  // if element is the document object work with the html element instead\n  // this makes $(document).scope() possible\n  if(element[0].nodeType == 9) {\n    element = element.find('html');\n  }\n  var names = isArray(name) ? name : [name];\n\n  while (element.length) {\n\n    for (var i = 0, ii = names.length; i < ii; i++) {\n      if ((value = element.data(names[i])) !== undefined) return value;\n    }\n    element = element.parent();\n  }\n}\n\nfunction jqLiteEmpty(element) {\n  for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {\n    jqLiteDealoc(childNodes[i]);\n  }\n  while (element.firstChild) {\n    element.removeChild(element.firstChild);\n  }\n}\n\n//////////////////////////////////////////\n// Functions which are declared directly.\n//////////////////////////////////////////\nvar JQLitePrototype = JQLite.prototype = {\n  ready: function(fn) {\n    var fired = false;\n\n    function trigger() {\n      if (fired) return;\n      fired = true;\n      fn();\n    }\n\n    // check if document already is loaded\n    if (document.readyState === 'complete'){\n      setTimeout(trigger);\n    } else {\n      this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9\n      // we can not use jqLite since we are not done loading and jQuery could be loaded later.\n      // jshint -W064\n      JQLite(window).on('load', trigger); // fallback to window.onload for others\n      // jshint +W064\n    }\n  },\n  toString: function() {\n    var value = [];\n    forEach(this, function(e){ value.push('' + e);});\n    return '[' + value.join(', ') + ']';\n  },\n\n  eq: function(index) {\n      return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);\n  },\n\n  length: 0,\n  push: push,\n  sort: [].sort,\n  splice: [].splice\n};\n\n//////////////////////////////////////////\n// Functions iterating getter/setters.\n// these functions return self on setter and\n// value on get.\n//////////////////////////////////////////\nvar BOOLEAN_ATTR = {};\nforEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {\n  BOOLEAN_ATTR[lowercase(value)] = value;\n});\nvar BOOLEAN_ELEMENTS = {};\nforEach('input,select,option,textarea,button,form,details'.split(','), function(value) {\n  BOOLEAN_ELEMENTS[uppercase(value)] = true;\n});\n\nfunction getBooleanAttrName(element, name) {\n  // check dom last since we will most likely fail on name\n  var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];\n\n  // booleanAttr is here twice to minimize DOM access\n  return booleanAttr && BOOLEAN_ELEMENTS[element.nodeName] && booleanAttr;\n}\n\nforEach({\n  data: jqLiteData,\n  inheritedData: jqLiteInheritedData,\n\n  scope: function(element) {\n    // Can't use jqLiteData here directly so we stay compatible with jQuery!\n    return jqLite(element).data('$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);\n  },\n\n  isolateScope: function(element) {\n    // Can't use jqLiteData here directly so we stay compatible with jQuery!\n    return jqLite(element).data('$isolateScope') || jqLite(element).data('$isolateScopeNoTemplate');\n  },\n\n  controller: jqLiteController ,\n\n  injector: function(element) {\n    return jqLiteInheritedData(element, '$injector');\n  },\n\n  removeAttr: function(element,name) {\n    element.removeAttribute(name);\n  },\n\n  hasClass: jqLiteHasClass,\n\n  css: function(element, name, value) {\n    name = camelCase(name);\n\n    if (isDefined(value)) {\n      element.style[name] = value;\n    } else {\n      var val;\n\n      if (msie <= 8) {\n        // this is some IE specific weirdness that jQuery 1.6.4 does not sure why\n        val = element.currentStyle && element.currentStyle[name];\n        if (val === '') val = 'auto';\n      }\n\n      val = val || element.style[name];\n\n      if (msie <= 8) {\n        // jquery weirdness :-/\n        val = (val === '') ? undefined : val;\n      }\n\n      return  val;\n    }\n  },\n\n  attr: function(element, name, value){\n    var lowercasedName = lowercase(name);\n    if (BOOLEAN_ATTR[lowercasedName]) {\n      if (isDefined(value)) {\n        if (!!value) {\n          element[name] = true;\n          element.setAttribute(name, lowercasedName);\n        } else {\n          element[name] = false;\n          element.removeAttribute(lowercasedName);\n        }\n      } else {\n        return (element[name] ||\n                 (element.attributes.getNamedItem(name)|| noop).specified)\n               ? lowercasedName\n               : undefined;\n      }\n    } else if (isDefined(value)) {\n      element.setAttribute(name, value);\n    } else if (element.getAttribute) {\n      // the extra argument \"2\" is to get the right thing for a.href in IE, see jQuery code\n      // some elements (e.g. Document) don't have get attribute, so return undefined\n      var ret = element.getAttribute(name, 2);\n      // normalize non-existing attributes to undefined (as jQuery)\n      return ret === null ? undefined : ret;\n    }\n  },\n\n  prop: function(element, name, value) {\n    if (isDefined(value)) {\n      element[name] = value;\n    } else {\n      return element[name];\n    }\n  },\n\n  text: (function() {\n    var NODE_TYPE_TEXT_PROPERTY = [];\n    if (msie < 9) {\n      NODE_TYPE_TEXT_PROPERTY[1] = 'innerText';    /** Element **/\n      NODE_TYPE_TEXT_PROPERTY[3] = 'nodeValue';    /** Text **/\n    } else {\n      NODE_TYPE_TEXT_PROPERTY[1] =                 /** Element **/\n      NODE_TYPE_TEXT_PROPERTY[3] = 'textContent';  /** Text **/\n    }\n    getText.$dv = '';\n    return getText;\n\n    function getText(element, value) {\n      var textProp = NODE_TYPE_TEXT_PROPERTY[element.nodeType];\n      if (isUndefined(value)) {\n        return textProp ? element[textProp] : '';\n      }\n      element[textProp] = value;\n    }\n  })(),\n\n  val: function(element, value) {\n    if (isUndefined(value)) {\n      if (nodeName_(element) === 'SELECT' && element.multiple) {\n        var result = [];\n        forEach(element.options, function (option) {\n          if (option.selected) {\n            result.push(option.value || option.text);\n          }\n        });\n        return result.length === 0 ? null : result;\n      }\n      return element.value;\n    }\n    element.value = value;\n  },\n\n  html: function(element, value) {\n    if (isUndefined(value)) {\n      return element.innerHTML;\n    }\n    for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {\n      jqLiteDealoc(childNodes[i]);\n    }\n    element.innerHTML = value;\n  },\n\n  empty: jqLiteEmpty\n}, function(fn, name){\n  /**\n   * Properties: writes return selection, reads return first value\n   */\n  JQLite.prototype[name] = function(arg1, arg2) {\n    var i, key;\n\n    // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it\n    // in a way that survives minification.\n    // jqLiteEmpty takes no arguments but is a setter.\n    if (fn !== jqLiteEmpty &&\n        (((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2) === undefined)) {\n      if (isObject(arg1)) {\n\n        // we are a write, but the object properties are the key/values\n        for (i = 0; i < this.length; i++) {\n          if (fn === jqLiteData) {\n            // data() takes the whole object in jQuery\n            fn(this[i], arg1);\n          } else {\n            for (key in arg1) {\n              fn(this[i], key, arg1[key]);\n            }\n          }\n        }\n        // return self for chaining\n        return this;\n      } else {\n        // we are a read, so read the first child.\n        var value = fn.$dv;\n        // Only if we have $dv do we iterate over all, otherwise it is just the first element.\n        var jj = (value === undefined) ? Math.min(this.length, 1) : this.length;\n        for (var j = 0; j < jj; j++) {\n          var nodeValue = fn(this[j], arg1, arg2);\n          value = value ? value + nodeValue : nodeValue;\n        }\n        return value;\n      }\n    } else {\n      // we are a write, so apply to all children\n      for (i = 0; i < this.length; i++) {\n        fn(this[i], arg1, arg2);\n      }\n      // return self for chaining\n      return this;\n    }\n  };\n});\n\nfunction createEventHandler(element, events) {\n  var eventHandler = function (event, type) {\n    if (!event.preventDefault) {\n      event.preventDefault = function() {\n        event.returnValue = false; //ie\n      };\n    }\n\n    if (!event.stopPropagation) {\n      event.stopPropagation = function() {\n        event.cancelBubble = true; //ie\n      };\n    }\n\n    if (!event.target) {\n      event.target = event.srcElement || document;\n    }\n\n    if (isUndefined(event.defaultPrevented)) {\n      var prevent = event.preventDefault;\n      event.preventDefault = function() {\n        event.defaultPrevented = true;\n        prevent.call(event);\n      };\n      event.defaultPrevented = false;\n    }\n\n    event.isDefaultPrevented = function() {\n      return event.defaultPrevented || event.returnValue === false;\n    };\n\n    // Copy event handlers in case event handlers array is modified during execution.\n    var eventHandlersCopy = shallowCopy(events[type || event.type] || []);\n\n    forEach(eventHandlersCopy, function(fn) {\n      fn.call(element, event);\n    });\n\n    // Remove monkey-patched methods (IE),\n    // as they would cause memory leaks in IE8.\n    if (msie <= 8) {\n      // IE7/8 does not allow to delete property on native object\n      event.preventDefault = null;\n      event.stopPropagation = null;\n      event.isDefaultPrevented = null;\n    } else {\n      // It shouldn't affect normal browsers (native methods are defined on prototype).\n      delete event.preventDefault;\n      delete event.stopPropagation;\n      delete event.isDefaultPrevented;\n    }\n  };\n  eventHandler.elem = element;\n  return eventHandler;\n}\n\n//////////////////////////////////////////\n// Functions iterating traversal.\n// These functions chain results into a single\n// selector.\n//////////////////////////////////////////\nforEach({\n  removeData: jqLiteRemoveData,\n\n  dealoc: jqLiteDealoc,\n\n  on: function onFn(element, type, fn, unsupported){\n    if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');\n\n    var events = jqLiteExpandoStore(element, 'events'),\n        handle = jqLiteExpandoStore(element, 'handle');\n\n    if (!events) jqLiteExpandoStore(element, 'events', events = {});\n    if (!handle) jqLiteExpandoStore(element, 'handle', handle = createEventHandler(element, events));\n\n    forEach(type.split(' '), function(type){\n      var eventFns = events[type];\n\n      if (!eventFns) {\n        if (type == 'mouseenter' || type == 'mouseleave') {\n          var contains = document.body.contains || document.body.compareDocumentPosition ?\n          function( a, b ) {\n            // jshint bitwise: false\n            var adown = a.nodeType === 9 ? a.documentElement : a,\n            bup = b && b.parentNode;\n            return a === bup || !!( bup && bup.nodeType === 1 && (\n              adown.contains ?\n              adown.contains( bup ) :\n              a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n              ));\n            } :\n            function( a, b ) {\n              if ( b ) {\n                while ( (b = b.parentNode) ) {\n                  if ( b === a ) {\n                    return true;\n                  }\n                }\n              }\n              return false;\n            };\n\n          events[type] = [];\n\n          // Refer to jQuery's implementation of mouseenter & mouseleave\n          // Read about mouseenter and mouseleave:\n          // https://www.quirksmode.org/js/events_mouse.html#link8\n          var eventmap = { mouseleave : \"mouseout\", mouseenter : \"mouseover\"};\n\n          onFn(element, eventmap[type], function(event) {\n            var target = this, related = event.relatedTarget;\n            // For mousenter/leave call the handler if related is outside the target.\n            // NB: No relatedTarget if the mouse left/entered the browser window\n            if ( !related || (related !== target && !contains(target, related)) ){\n              handle(event, type);\n            }\n          });\n\n        } else {\n          addEventListenerFn(element, type, handle);\n          events[type] = [];\n        }\n        eventFns = events[type];\n      }\n      eventFns.push(fn);\n    });\n  },\n\n  off: jqLiteOff,\n\n  one: function(element, type, fn) {\n    element = jqLite(element);\n\n    //add the listener twice so that when it is called\n    //you can remove the original function and still be\n    //able to call element.off(ev, fn) normally\n    element.on(type, function onFn() {\n      element.off(type, fn);\n      element.off(type, onFn);\n    });\n    element.on(type, fn);\n  },\n\n  replaceWith: function(element, replaceNode) {\n    var index, parent = element.parentNode;\n    jqLiteDealoc(element);\n    forEach(new JQLite(replaceNode), function(node){\n      if (index) {\n        parent.insertBefore(node, index.nextSibling);\n      } else {\n        parent.replaceChild(node, element);\n      }\n      index = node;\n    });\n  },\n\n  children: function(element) {\n    var children = [];\n    forEach(element.childNodes, function(element){\n      if (element.nodeType === 1)\n        children.push(element);\n    });\n    return children;\n  },\n\n  contents: function(element) {\n    return element.childNodes || [];\n  },\n\n  append: function(element, node) {\n    forEach(new JQLite(node), function(child){\n      if (element.nodeType === 1 || element.nodeType === 11) {\n        element.appendChild(child);\n      }\n    });\n  },\n\n  prepend: function(element, node) {\n    if (element.nodeType === 1) {\n      var index = element.firstChild;\n      forEach(new JQLite(node), function(child){\n        element.insertBefore(child, index);\n      });\n    }\n  },\n\n  wrap: function(element, wrapNode) {\n    wrapNode = jqLite(wrapNode)[0];\n    var parent = element.parentNode;\n    if (parent) {\n      parent.replaceChild(wrapNode, element);\n    }\n    wrapNode.appendChild(element);\n  },\n\n  remove: function(element) {\n    jqLiteDealoc(element);\n    var parent = element.parentNode;\n    if (parent) parent.removeChild(element);\n  },\n\n  after: function(element, newElement) {\n    var index = element, parent = element.parentNode;\n    forEach(new JQLite(newElement), function(node){\n      parent.insertBefore(node, index.nextSibling);\n      index = node;\n    });\n  },\n\n  addClass: jqLiteAddClass,\n  removeClass: jqLiteRemoveClass,\n\n  toggleClass: function(element, selector, condition) {\n    if (isUndefined(condition)) {\n      condition = !jqLiteHasClass(element, selector);\n    }\n    (condition ? jqLiteAddClass : jqLiteRemoveClass)(element, selector);\n  },\n\n  parent: function(element) {\n    var parent = element.parentNode;\n    return parent && parent.nodeType !== 11 ? parent : null;\n  },\n\n  next: function(element) {\n    if (element.nextElementSibling) {\n      return element.nextElementSibling;\n    }\n\n    // IE8 doesn't have nextElementSibling\n    var elm = element.nextSibling;\n    while (elm != null && elm.nodeType !== 1) {\n      elm = elm.nextSibling;\n    }\n    return elm;\n  },\n\n  find: function(element, selector) {\n    if (element.getElementsByTagName) {\n      return element.getElementsByTagName(selector);\n    } else {\n      return [];\n    }\n  },\n\n  clone: jqLiteClone,\n\n  triggerHandler: function(element, eventName, eventData) {\n    var eventFns = (jqLiteExpandoStore(element, 'events') || {})[eventName];\n\n    eventData = eventData || [];\n\n    var event = [{\n      preventDefault: noop,\n      stopPropagation: noop\n    }];\n\n    forEach(eventFns, function(fn) {\n      fn.apply(element, event.concat(eventData));\n    });\n  }\n}, function(fn, name){\n  /**\n   * chaining functions\n   */\n  JQLite.prototype[name] = function(arg1, arg2, arg3) {\n    var value;\n    for(var i=0; i < this.length; i++) {\n      if (isUndefined(value)) {\n        value = fn(this[i], arg1, arg2, arg3);\n        if (isDefined(value)) {\n          // any function which returns a value needs to be wrapped\n          value = jqLite(value);\n        }\n      } else {\n        jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));\n      }\n    }\n    return isDefined(value) ? value : this;\n  };\n\n  // bind legacy bind/unbind to on/off\n  JQLite.prototype.bind = JQLite.prototype.on;\n  JQLite.prototype.unbind = JQLite.prototype.off;\n});\n\n/**\n * Computes a hash of an 'obj'.\n * Hash of a:\n *  string is string\n *  number is number as string\n *  object is either result of calling $$hashKey function on the object or uniquely generated id,\n *         that is also assigned to the $$hashKey property of the object.\n *\n * @param obj\n * @returns {string} hash string such that the same input will have the same hash string.\n *         The resulting string key is in 'type:hashKey' format.\n */\nfunction hashKey(obj) {\n  var objType = typeof obj,\n      key;\n\n  if (objType == 'object' && obj !== null) {\n    if (typeof (key = obj.$$hashKey) == 'function') {\n      // must invoke on object to keep the right this\n      key = obj.$$hashKey();\n    } else if (key === undefined) {\n      key = obj.$$hashKey = nextUid();\n    }\n  } else {\n    key = obj;\n  }\n\n  return objType + ':' + key;\n}\n\n/**\n * HashMap which can use objects as keys\n */\nfunction HashMap(array){\n  forEach(array, this.put, this);\n}\nHashMap.prototype = {\n  /**\n   * Store key value pair\n   * @param key key to store can be any type\n   * @param value value to store can be any type\n   */\n  put: function(key, value) {\n    this[hashKey(key)] = value;\n  },\n\n  /**\n   * @param key\n   * @returns the value for the key\n   */\n  get: function(key) {\n    return this[hashKey(key)];\n  },\n\n  /**\n   * Remove the key/value pair\n   * @param key\n   */\n  remove: function(key) {\n    var value = this[key = hashKey(key)];\n    delete this[key];\n    return value;\n  }\n};\n\n/**\n * @ngdoc function\n * @name angular.injector\n * @function\n *\n * @description\n * Creates an injector function that can be used for retrieving services as well as for\n * dependency injection (see {@link guide/di dependency injection}).\n *\n\n * @param {Array.<string|Function>} modules A list of module functions or their aliases. See\n *        {@link angular.module}. The `ng` module must be explicitly added.\n * @returns {function()} Injector function. See {@link AUTO.$injector $injector}.\n *\n * @example\n * Typical usage\n * <pre>\n *   // create an injector\n *   var $injector = angular.injector(['ng']);\n *\n *   // use the injector to kick off your application\n *   // use the type inference to auto inject arguments, or use implicit injection\n *   $injector.invoke(function($rootScope, $compile, $document){\n *     $compile($document)($rootScope);\n *     $rootScope.$digest();\n *   });\n * </pre>\n *\n * Sometimes you want to get access to the injector of a currently running Angular app\n * from outside Angular. Perhaps, you want to inject and compile some markup after the\n * application has been bootstrapped. You can do this using extra `injector()` added\n * to JQuery/jqLite elements. See {@link angular.element}.\n *\n * *This is fairly rare but could be the case if a third party library is injecting the\n * markup.*\n *\n * In the following example a new block of HTML containing a `ng-controller`\n * directive is added to the end of the document body by JQuery. We then compile and link\n * it into the current AngularJS scope.\n *\n * <pre>\n * var $div = $('<div ng-controller=\"MyCtrl\">{{content.label}}</div>');\n * $(document.body).append($div);\n *\n * angular.element(document).injector().invoke(function($compile) {\n *   var scope = angular.element($div).scope();\n *   $compile($div)(scope);\n * });\n * </pre>\n */\n\n\n/**\n * @ngdoc overview\n * @name AUTO\n * @description\n *\n * Implicit module which gets automatically added to each {@link AUTO.$injector $injector}.\n */\n\nvar FN_ARGS = /^function\\s*[^\\(]*\\(\\s*([^\\)]*)\\)/m;\nvar FN_ARG_SPLIT = /,/;\nvar FN_ARG = /^\\s*(_?)(\\S+?)\\1\\s*$/;\nvar STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nvar $injectorMinErr = minErr('$injector');\nfunction annotate(fn) {\n  var $inject,\n      fnText,\n      argDecl,\n      last;\n\n  if (typeof fn == 'function') {\n    if (!($inject = fn.$inject)) {\n      $inject = [];\n      if (fn.length) {\n        fnText = fn.toString().replace(STRIP_COMMENTS, '');\n        argDecl = fnText.match(FN_ARGS);\n        forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg){\n          arg.replace(FN_ARG, function(all, underscore, name){\n            $inject.push(name);\n          });\n        });\n      }\n      fn.$inject = $inject;\n    }\n  } else if (isArray(fn)) {\n    last = fn.length - 1;\n    assertArgFn(fn[last], 'fn');\n    $inject = fn.slice(0, last);\n  } else {\n    assertArgFn(fn, 'fn', true);\n  }\n  return $inject;\n}\n\n///////////////////////////////////////\n\n/**\n * @ngdoc object\n * @name AUTO.$injector\n * @function\n *\n * @description\n *\n * `$injector` is used to retrieve object instances as defined by\n * {@link AUTO.$provide provider}, instantiate types, invoke methods,\n * and load modules.\n *\n * The following always holds true:\n *\n * <pre>\n *   var $injector = angular.injector();\n *   expect($injector.get('$injector')).toBe($injector);\n *   expect($injector.invoke(function($injector){\n *     return $injector;\n *   }).toBe($injector);\n * </pre>\n *\n * # Injection Function Annotation\n *\n * JavaScript does not have annotations, and annotations are needed for dependency injection. The\n * following are all valid ways of annotating function with injection arguments and are equivalent.\n *\n * <pre>\n *   // inferred (only works if code not minified/obfuscated)\n *   $injector.invoke(function(serviceA){});\n *\n *   // annotated\n *   function explicit(serviceA) {};\n *   explicit.$inject = ['serviceA'];\n *   $injector.invoke(explicit);\n *\n *   // inline\n *   $injector.invoke(['serviceA', function(serviceA){}]);\n * </pre>\n *\n * ## Inference\n *\n * In JavaScript calling `toString()` on a function returns the function definition. The definition\n * can then be parsed and the function arguments can be extracted. *NOTE:* This does not work with\n * minification, and obfuscation tools since these tools change the argument names.\n *\n * ## `$inject` Annotation\n * By adding a `$inject` property onto a function the injection parameters can be specified.\n *\n * ## Inline\n * As an array of injection names, where the last item in the array is the function to call.\n */\n\n/**\n * @ngdoc method\n * @name AUTO.$injector#get\n * @methodOf AUTO.$injector\n *\n * @description\n * Return an instance of the service.\n *\n * @param {string} name The name of the instance to retrieve.\n * @return {*} The instance.\n */\n\n/**\n * @ngdoc method\n * @name AUTO.$injector#invoke\n * @methodOf AUTO.$injector\n *\n * @description\n * Invoke the method and supply the method arguments from the `$injector`.\n *\n * @param {!function} fn The function to invoke. Function parameters are injected according to the\n *   {@link guide/di $inject Annotation} rules.\n * @param {Object=} self The `this` for the invoked method.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n *                         object first, before the `$injector` is consulted.\n * @returns {*} the value returned by the invoked `fn` function.\n */\n\n/**\n * @ngdoc method\n * @name AUTO.$injector#has\n * @methodOf AUTO.$injector\n *\n * @description\n * Allows the user to query if the particular service exist.\n *\n * @param {string} Name of the service to query.\n * @returns {boolean} returns true if injector has given service.\n */\n\n/**\n * @ngdoc method\n * @name AUTO.$injector#instantiate\n * @methodOf AUTO.$injector\n * @description\n * Create a new instance of JS type. The method takes a constructor function invokes the new\n * operator and supplies all of the arguments to the constructor function as specified by the\n * constructor annotation.\n *\n * @param {function} Type Annotated constructor function.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {Object} new instance of `Type`.\n */\n\n/**\n * @ngdoc method\n * @name AUTO.$injector#annotate\n * @methodOf AUTO.$injector\n *\n * @description\n * Returns an array of service names which the function is requesting for injection. This API is\n * used by the injector to determine which services need to be injected into the function when the\n * function is invoked. There are three ways in which the function can be annotated with the needed\n * dependencies.\n *\n * # Argument names\n *\n * The simplest form is to extract the dependencies from the arguments of the function. This is done\n * by converting the function into a string using `toString()` method and extracting the argument\n * names.\n * <pre>\n *   // Given\n *   function MyController($scope, $route) {\n *     // ...\n *   }\n *\n *   // Then\n *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * </pre>\n *\n * This method does not work with code minification / obfuscation. For this reason the following\n * annotation strategies are supported.\n *\n * # The `$inject` property\n *\n * If a function has an `$inject` property and its value is an array of strings, then the strings\n * represent names of services to be injected into the function.\n * <pre>\n *   // Given\n *   var MyController = function(obfuscatedScope, obfuscatedRoute) {\n *     // ...\n *   }\n *   // Define function dependencies\n *   MyController['$inject'] = ['$scope', '$route'];\n *\n *   // Then\n *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * </pre>\n *\n * # The array notation\n *\n * It is often desirable to inline Injected functions and that's when setting the `$inject` property\n * is very inconvenient. In these situations using the array notation to specify the dependencies in\n * a way that survives minification is a better choice:\n *\n * <pre>\n *   // We wish to write this (not minification / obfuscation safe)\n *   injector.invoke(function($compile, $rootScope) {\n *     // ...\n *   });\n *\n *   // We are forced to write break inlining\n *   var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {\n *     // ...\n *   };\n *   tmpFn.$inject = ['$compile', '$rootScope'];\n *   injector.invoke(tmpFn);\n *\n *   // To better support inline function the inline annotation is supported\n *   injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {\n *     // ...\n *   }]);\n *\n *   // Therefore\n *   expect(injector.annotate(\n *      ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])\n *    ).toEqual(['$compile', '$rootScope']);\n * </pre>\n *\n * @param {function|Array.<string|Function>} fn Function for which dependent service names need to\n * be retrieved as described above.\n *\n * @returns {Array.<string>} The names of the services which the function requires.\n */\n\n\n\n\n/**\n * @ngdoc object\n * @name AUTO.$provide\n *\n * @description\n *\n * The {@link AUTO.$provide $provide} service has a number of methods for registering components\n * with the {@link AUTO.$injector $injector}. Many of these functions are also exposed on\n * {@link angular.Module}.\n *\n * An Angular **service** is a singleton object created by a **service factory**.  These **service\n * factories** are functions which, in turn, are created by a **service provider**.\n * The **service providers** are constructor functions. When instantiated they must contain a\n * property called `$get`, which holds the **service factory** function.\n *\n * When you request a service, the {@link AUTO.$injector $injector} is responsible for finding the\n * correct **service provider**, instantiating it and then calling its `$get` **service factory**\n * function to get the instance of the **service**.\n *\n * Often services have no configuration options and there is no need to add methods to the service\n * provider.  The provider will be no more than a constructor function with a `$get` property. For\n * these cases the {@link AUTO.$provide $provide} service has additional helper methods to register\n * services without specifying a provider.\n *\n * * {@link AUTO.$provide#methods_provider provider(provider)} - registers a **service provider** with the\n *     {@link AUTO.$injector $injector}\n * * {@link AUTO.$provide#methods_constant constant(obj)} - registers a value/object that can be accessed by\n *     providers and services.\n * * {@link AUTO.$provide#methods_value value(obj)} - registers a value/object that can only be accessed by\n *     services, not providers.\n * * {@link AUTO.$provide#methods_factory factory(fn)} - registers a service **factory function**, `fn`,\n *     that will be wrapped in a **service provider** object, whose `$get` property will contain the\n *     given factory function.\n * * {@link AUTO.$provide#methods_service service(class)} - registers a **constructor function**, `class` that\n *     that will be wrapped in a **service provider** object, whose `$get` property will instantiate\n *      a new object using the given constructor function.\n *\n * See the individual methods for more information and examples.\n */\n\n/**\n * @ngdoc method\n * @name AUTO.$provide#provider\n * @methodOf AUTO.$provide\n * @description\n *\n * Register a **provider function** with the {@link AUTO.$injector $injector}. Provider functions\n * are constructor functions, whose instances are responsible for \"providing\" a factory for a\n * service.\n *\n * Service provider names start with the name of the service they provide followed by `Provider`.\n * For example, the {@link ng.$log $log} service has a provider called\n * {@link ng.$logProvider $logProvider}.\n *\n * Service provider objects can have additional methods which allow configuration of the provider\n * and its service. Importantly, you can configure what kind of service is created by the `$get`\n * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a\n * method {@link ng.$logProvider#debugEnabled debugEnabled}\n * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the\n * console or not.\n *\n * @param {string} name The name of the instance. NOTE: the provider will be available under `name +\n                        'Provider'` key.\n * @param {(Object|function())} provider If the provider is:\n *\n *   - `Object`: then it should have a `$get` method. The `$get` method will be invoked using\n *     {@link AUTO.$injector#invoke $injector.invoke()} when an instance needs to be created.\n *   - `Constructor`: a new instance of the provider will be created using                     \n *     {@link AUTO.$injector#instantiate $injector.instantiate()}, then treated as `object`.\n *\n * @returns {Object} registered provider instance\n\n * @example\n *\n * The following example shows how to create a simple event tracking service and register it using\n * {@link AUTO.$provide#methods_provider $provide.provider()}.\n *\n * <pre>\n *  // Define the eventTracker provider\n *  function EventTrackerProvider() {\n *    var trackingUrl = '/track';\n *\n *    // A provider method for configuring where the tracked events should been saved\n *    this.setTrackingUrl = function(url) {\n *      trackingUrl = url;\n *    };\n *\n *    // The service factory function\n *    this.$get = ['$http', function($http) {\n *      var trackedEvents = {};\n *      return {\n *        // Call this to track an event\n *        event: function(event) {\n *          var count = trackedEvents[event] || 0;\n *          count += 1;\n *          trackedEvents[event] = count;\n *          return count;\n *        },\n *        // Call this to save the tracked events to the trackingUrl\n *        save: function() {\n *          $http.post(trackingUrl, trackedEvents);\n *        }\n *      };\n *    }];\n *  }\n *\n *  describe('eventTracker', function() {\n *    var postSpy;\n *\n *    beforeEach(module(function($provide) {\n *      // Register the eventTracker provider\n *      $provide.provider('eventTracker', EventTrackerProvider);\n *    }));\n *\n *    beforeEach(module(function(eventTrackerProvider) {\n *      // Configure eventTracker provider\n *      eventTrackerProvider.setTrackingUrl('/custom-track');\n *    }));\n *\n *    it('tracks events', inject(function(eventTracker) {\n *      expect(eventTracker.event('login')).toEqual(1);\n *      expect(eventTracker.event('login')).toEqual(2);\n *    }));\n *\n *    it('saves to the tracking url', inject(function(eventTracker, $http) {\n *      postSpy = spyOn($http, 'post');\n *      eventTracker.event('login');\n *      eventTracker.save();\n *      expect(postSpy).toHaveBeenCalled();\n *      expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');\n *      expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');\n *      expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });\n *    }));\n *  });\n * </pre>\n */\n\n/**\n * @ngdoc method\n * @name AUTO.$provide#factory\n * @methodOf AUTO.$provide\n * @description\n *\n * Register a **service factory**, which will be called to return the service instance.\n * This is short for registering a service where its provider consists of only a `$get` property,\n * which is the given service factory function.\n * You should use {@link AUTO.$provide#factory $provide.factory(getFn)} if you do not need to\n * configure your service in a provider.\n *\n * @param {string} name The name of the instance.\n * @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand\n *                            for `$provide.provider(name, {$get: $getFn})`.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service\n * <pre>\n *   $provide.factory('ping', ['$http', function($http) {\n *     return function ping() {\n *       return $http.send('/ping');\n *     };\n *   }]);\n * </pre>\n * You would then inject and use this service like this:\n * <pre>\n *   someModule.controller('Ctrl', ['ping', function(ping) {\n *     ping();\n *   }]);\n * </pre>\n */\n\n\n/**\n * @ngdoc method\n * @name AUTO.$provide#service\n * @methodOf AUTO.$provide\n * @description\n *\n * Register a **service constructor**, which will be invoked with `new` to create the service\n * instance.\n * This is short for registering a service where its provider's `$get` property is the service\n * constructor function that will be used to instantiate the service instance.\n *\n * You should use {@link AUTO.$provide#methods_service $provide.service(class)} if you define your service\n * as a type/class.\n *\n * @param {string} name The name of the instance.\n * @param {Function} constructor A class (constructor function) that will be instantiated.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service using\n * {@link AUTO.$provide#methods_service $provide.service(class)}.\n * <pre>\n *   var Ping = function($http) {\n *     this.$http = $http;\n *   };\n * \n *   Ping.$inject = ['$http'];\n *   \n *   Ping.prototype.send = function() {\n *     return this.$http.get('/ping');\n *   };\n *   $provide.service('ping', Ping);\n * </pre>\n * You would then inject and use this service like this:\n * <pre>\n *   someModule.controller('Ctrl', ['ping', function(ping) {\n *     ping.send();\n *   }]);\n * </pre>\n */\n\n\n/**\n * @ngdoc method\n * @name AUTO.$provide#value\n * @methodOf AUTO.$provide\n * @description\n *\n * Register a **value service** with the {@link AUTO.$injector $injector}, such as a string, a\n * number, an array, an object or a function.  This is short for registering a service where its\n * provider's `$get` property is a factory function that takes no arguments and returns the **value\n * service**.\n *\n * Value services are similar to constant services, except that they cannot be injected into a\n * module configuration function (see {@link angular.Module#config}) but they can be overridden by\n * an Angular\n * {@link AUTO.$provide#decorator decorator}.\n *\n * @param {string} name The name of the instance.\n * @param {*} value The value.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here are some examples of creating value services.\n * <pre>\n *   $provide.value('ADMIN_USER', 'admin');\n *\n *   $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });\n *\n *   $provide.value('halfOf', function(value) {\n *     return value / 2;\n *   });\n * </pre>\n */\n\n\n/**\n * @ngdoc method\n * @name AUTO.$provide#constant\n * @methodOf AUTO.$provide\n * @description\n *\n * Register a **constant service**, such as a string, a number, an array, an object or a function,\n * with the {@link AUTO.$injector $injector}. Unlike {@link AUTO.$provide#value value} it can be\n * injected into a module configuration function (see {@link angular.Module#config}) and it cannot\n * be overridden by an Angular {@link AUTO.$provide#decorator decorator}.\n *\n * @param {string} name The name of the constant.\n * @param {*} value The constant value.\n * @returns {Object} registered instance\n *\n * @example\n * Here a some examples of creating constants:\n * <pre>\n *   $provide.constant('SHARD_HEIGHT', 306);\n *\n *   $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);\n *\n *   $provide.constant('double', function(value) {\n *     return value * 2;\n *   });\n * </pre>\n */\n\n\n/**\n * @ngdoc method\n * @name AUTO.$provide#decorator\n * @methodOf AUTO.$provide\n * @description\n *\n * Register a **service decorator** with the {@link AUTO.$injector $injector}. A service decorator\n * intercepts the creation of a service, allowing it to override or modify the behaviour of the\n * service. The object returned by the decorator may be the original service, or a new service\n * object which replaces or wraps and delegates to the original service.\n *\n * @param {string} name The name of the service to decorate.\n * @param {function()} decorator This function will be invoked when the service needs to be\n *    instantiated and should return the decorated service instance. The function is called using\n *    the {@link AUTO.$injector#invoke injector.invoke} method and is therefore fully injectable.\n *    Local injection arguments:\n *\n *    * `$delegate` - The original service instance, which can be monkey patched, configured,\n *      decorated or delegated to.\n *\n * @example\n * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting\n * calls to {@link ng.$log#error $log.warn()}.\n * <pre>\n *   $provide.decorator('$log', ['$delegate', function($delegate) {\n *     $delegate.warn = $delegate.error;\n *     return $delegate;\n *   }]);\n * </pre>\n */\n\n\nfunction createInjector(modulesToLoad) {\n  var INSTANTIATING = {},\n      providerSuffix = 'Provider',\n      path = [],\n      loadedModules = new HashMap(),\n      providerCache = {\n        $provide: {\n            provider: supportObject(provider),\n            factory: supportObject(factory),\n            service: supportObject(service),\n            value: supportObject(value),\n            constant: supportObject(constant),\n            decorator: decorator\n          }\n      },\n      providerInjector = (providerCache.$injector =\n          createInternalInjector(providerCache, function() {\n            throw $injectorMinErr('unpr', \"Unknown provider: {0}\", path.join(' <- '));\n          })),\n      instanceCache = {},\n      instanceInjector = (instanceCache.$injector =\n          createInternalInjector(instanceCache, function(servicename) {\n            var provider = providerInjector.get(servicename + providerSuffix);\n            return instanceInjector.invoke(provider.$get, provider);\n          }));\n\n\n  forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); });\n\n  return instanceInjector;\n\n  ////////////////////////////////////\n  // $provider\n  ////////////////////////////////////\n\n  function supportObject(delegate) {\n    return function(key, value) {\n      if (isObject(key)) {\n        forEach(key, reverseParams(delegate));\n      } else {\n        return delegate(key, value);\n      }\n    };\n  }\n\n  function provider(name, provider_) {\n    assertNotHasOwnProperty(name, 'service');\n    if (isFunction(provider_) || isArray(provider_)) {\n      provider_ = providerInjector.instantiate(provider_);\n    }\n    if (!provider_.$get) {\n      throw $injectorMinErr('pget', \"Provider '{0}' must define $get factory method.\", name);\n    }\n    return providerCache[name + providerSuffix] = provider_;\n  }\n\n  function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }\n\n  function service(name, constructor) {\n    return factory(name, ['$injector', function($injector) {\n      return $injector.instantiate(constructor);\n    }]);\n  }\n\n  function value(name, val) { return factory(name, valueFn(val)); }\n\n  function constant(name, value) {\n    assertNotHasOwnProperty(name, 'constant');\n    providerCache[name] = value;\n    instanceCache[name] = value;\n  }\n\n  function decorator(serviceName, decorFn) {\n    var origProvider = providerInjector.get(serviceName + providerSuffix),\n        orig$get = origProvider.$get;\n\n    origProvider.$get = function() {\n      var origInstance = instanceInjector.invoke(orig$get, origProvider);\n      return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});\n    };\n  }\n\n  ////////////////////////////////////\n  // Module Loading\n  ////////////////////////////////////\n  function loadModules(modulesToLoad){\n    var runBlocks = [], moduleFn, invokeQueue, i, ii;\n    forEach(modulesToLoad, function(module) {\n      if (loadedModules.get(module)) return;\n      loadedModules.put(module, true);\n\n      try {\n        if (isString(module)) {\n          moduleFn = angularModule(module);\n          runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);\n\n          for(invokeQueue = moduleFn._invokeQueue, i = 0, ii = invokeQueue.length; i < ii; i++) {\n            var invokeArgs = invokeQueue[i],\n                provider = providerInjector.get(invokeArgs[0]);\n\n            provider[invokeArgs[1]].apply(provider, invokeArgs[2]);\n          }\n        } else if (isFunction(module)) {\n            runBlocks.push(providerInjector.invoke(module));\n        } else if (isArray(module)) {\n            runBlocks.push(providerInjector.invoke(module));\n        } else {\n          assertArgFn(module, 'module');\n        }\n      } catch (e) {\n        if (isArray(module)) {\n          module = module[module.length - 1];\n        }\n        if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {\n          // Safari & FF's stack traces don't contain error.message content\n          // unlike those of Chrome and IE\n          // So if stack doesn't contain message, we create a new string that contains both.\n          // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.\n          /* jshint -W022 */\n          e = e.message + '\\n' + e.stack;\n        }\n        throw $injectorMinErr('modulerr', \"Failed to instantiate module {0} due to:\\n{1}\",\n                  module, e.stack || e.message || e);\n      }\n    });\n    return runBlocks;\n  }\n\n  ////////////////////////////////////\n  // internal Injector\n  ////////////////////////////////////\n\n  function createInternalInjector(cache, factory) {\n\n    function getService(serviceName) {\n      if (cache.hasOwnProperty(serviceName)) {\n        if (cache[serviceName] === INSTANTIATING) {\n          throw $injectorMinErr('cdep', 'Circular dependency found: {0}', path.join(' <- '));\n        }\n        return cache[serviceName];\n      } else {\n        try {\n          path.unshift(serviceName);\n          cache[serviceName] = INSTANTIATING;\n          return cache[serviceName] = factory(serviceName);\n        } catch (err) {\n          if (cache[serviceName] === INSTANTIATING) {\n            delete cache[serviceName];\n          }\n          throw err;\n        } finally {\n          path.shift();\n        }\n      }\n    }\n\n    function invoke(fn, self, locals){\n      var args = [],\n          $inject = annotate(fn),\n          length, i,\n          key;\n\n      for(i = 0, length = $inject.length; i < length; i++) {\n        key = $inject[i];\n        if (typeof key !== 'string') {\n          throw $injectorMinErr('itkn',\n                  'Incorrect injection token! Expected service name as string, got {0}', key);\n        }\n        args.push(\n          locals && locals.hasOwnProperty(key)\n          ? locals[key]\n          : getService(key)\n        );\n      }\n      if (!fn.$inject) {\n        // this means that we must be an array.\n        fn = fn[length];\n      }\n\n      // https://jsperf.com/angularjs-invoke-apply-vs-switch\n      // #5388\n      return fn.apply(self, args);\n    }\n\n    function instantiate(Type, locals) {\n      var Constructor = function() {},\n          instance, returnedValue;\n\n      // Check if Type is annotated and use just the given function at n-1 as parameter\n      // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);\n      Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;\n      instance = new Constructor();\n      returnedValue = invoke(Type, instance, locals);\n\n      return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;\n    }\n\n    return {\n      invoke: invoke,\n      instantiate: instantiate,\n      get: getService,\n      annotate: annotate,\n      has: function(name) {\n        return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);\n      }\n    };\n  }\n}\n\n/**\n * @ngdoc function\n * @name ng.$anchorScroll\n * @requires $window\n * @requires $location\n * @requires $rootScope\n *\n * @description\n * When called, it checks current value of `$location.hash()` and scroll to related element,\n * according to rules specified in\n * {@link http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document Html5 spec}.\n *\n * It also watches the `$location.hash()` and scrolls whenever it changes to match any anchor.\n * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`.\n * \n * @example\n   <example>\n     <file name=\"index.html\">\n       <div id=\"scrollArea\" ng-controller=\"ScrollCtrl\">\n         <a ng-click=\"gotoBottom()\">Go to bottom</a>\n         <a id=\"bottom\"></a> You're at the bottom!\n       </div>\n     </file>\n     <file name=\"script.js\">\n       function ScrollCtrl($scope, $location, $anchorScroll) {\n         $scope.gotoBottom = function (){\n           // set the location.hash to the id of\n           // the element you wish to scroll to.\n           $location.hash('bottom');\n           \n           // call $anchorScroll()\n           $anchorScroll();\n         }\n       }\n     </file>\n     <file name=\"style.css\">\n       #scrollArea {\n         height: 350px;\n         overflow: auto;\n       }\n\n       #bottom {\n         display: block;\n         margin-top: 2000px;\n       }\n     </file>\n   </example>\n */\nfunction $AnchorScrollProvider() {\n\n  var autoScrollingEnabled = true;\n\n  this.disableAutoScrolling = function() {\n    autoScrollingEnabled = false;\n  };\n\n  this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {\n    var document = $window.document;\n\n    // helper function to get first anchor from a NodeList\n    // can't use filter.filter, as it accepts only instances of Array\n    // and IE can't convert NodeList to an array using [].slice\n    // TODO(vojta): use filter if we change it to accept lists as well\n    function getFirstAnchor(list) {\n      var result = null;\n      forEach(list, function(element) {\n        if (!result && lowercase(element.nodeName) === 'a') result = element;\n      });\n      return result;\n    }\n\n    function scroll() {\n      var hash = $location.hash(), elm;\n\n      // empty hash, scroll to the top of the page\n      if (!hash) $window.scrollTo(0, 0);\n\n      // element with given id\n      else if ((elm = document.getElementById(hash))) elm.scrollIntoView();\n\n      // first anchor with given name :-D\n      else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) elm.scrollIntoView();\n\n      // no element and hash == 'top', scroll to the top of the page\n      else if (hash === 'top') $window.scrollTo(0, 0);\n    }\n\n    // does not scroll when user clicks on anchor link that is currently on\n    // (no url change, no $location.hash() change), browser native does scroll\n    if (autoScrollingEnabled) {\n      $rootScope.$watch(function autoScrollWatch() {return $location.hash();},\n        function autoScrollWatchAction() {\n          $rootScope.$evalAsync(scroll);\n        });\n    }\n\n    return scroll;\n  }];\n}\n\nvar $animateMinErr = minErr('$animate');\n\n/**\n * @ngdoc object\n * @name ng.$animateProvider\n *\n * @description\n * Default implementation of $animate that doesn't perform any animations, instead just\n * synchronously performs DOM\n * updates and calls done() callbacks.\n *\n * In order to enable animations the ngAnimate module has to be loaded.\n *\n * To see the functional implementation check out src/ngAnimate/animate.js\n */\nvar $AnimateProvider = ['$provide', function($provide) {\n\n  \n  this.$$selectors = {};\n\n\n  /**\n   * @ngdoc function\n   * @name ng.$animateProvider#register\n   * @methodOf ng.$animateProvider\n   *\n   * @description\n   * Registers a new injectable animation factory function. The factory function produces the\n   * animation object which contains callback functions for each event that is expected to be\n   * animated.\n   *\n   *   * `eventFn`: `function(Element, doneFunction)` The element to animate, the `doneFunction`\n   *   must be called once the element animation is complete. If a function is returned then the\n   *   animation service will use this function to cancel the animation whenever a cancel event is\n   *   triggered.\n   *\n   *\n   *<pre>\n   *   return {\n     *     eventFn : function(element, done) {\n     *       //code to run the animation\n     *       //once complete, then run done()\n     *       return function cancellationFunction() {\n     *         //code to cancel the animation\n     *       }\n     *     }\n     *   }\n   *</pre>\n   *\n   * @param {string} name The name of the animation.\n   * @param {function} factory The factory function that will be executed to return the animation\n   *                           object.\n   */\n  this.register = function(name, factory) {\n    var key = name + '-animation';\n    if (name && name.charAt(0) != '.') throw $animateMinErr('notcsel',\n        \"Expecting class selector starting with '.' got '{0}'.\", name);\n    this.$$selectors[name.substr(1)] = key;\n    $provide.factory(key, factory);\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.$animateProvider#classNameFilter\n   * @methodOf ng.$animateProvider\n   *\n   * @description\n   * Sets and/or returns the CSS class regular expression that is checked when performing\n   * an animation. Upon bootstrap the classNameFilter value is not set at all and will\n   * therefore enable $animate to attempt to perform an animation on any element.\n   * When setting the classNameFilter value, animations will only be performed on elements\n   * that successfully match the filter expression. This in turn can boost performance\n   * for low-powered devices as well as applications containing a lot of structural operations.\n   * @param {RegExp=} expression The className expression which will be checked against all animations\n   * @return {RegExp} The current CSS className expression value. If null then there is no expression value\n   */\n  this.classNameFilter = function(expression) {\n    if(arguments.length === 1) {\n      this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;\n    }\n    return this.$$classNameFilter;\n  };\n\n  this.$get = ['$timeout', function($timeout) {\n\n    /**\n     *\n     * @ngdoc object\n     * @name ng.$animate\n     * @description The $animate service provides rudimentary DOM manipulation functions to\n     * insert, remove and move elements within the DOM, as well as adding and removing classes.\n     * This service is the core service used by the ngAnimate $animator service which provides\n     * high-level animation hooks for CSS and JavaScript.\n     *\n     * $animate is available in the AngularJS core, however, the ngAnimate module must be included\n     * to enable full out animation support. Otherwise, $animate will only perform simple DOM\n     * manipulation operations.\n     *\n     * To learn more about enabling animation support, click here to visit the {@link ngAnimate\n     * ngAnimate module page} as well as the {@link ngAnimate.$animate ngAnimate $animate service\n     * page}.\n     */\n    return {\n\n      /**\n       *\n       * @ngdoc function\n       * @name ng.$animate#enter\n       * @methodOf ng.$animate\n       * @function\n       * @description Inserts the element into the DOM either after the `after` element or within\n       *   the `parent` element. Once complete, the done() callback will be fired (if provided).\n       * @param {jQuery/jqLite element} element the element which will be inserted into the DOM\n       * @param {jQuery/jqLite element} parent the parent element which will append the element as\n       *   a child (if the after element is not present)\n       * @param {jQuery/jqLite element} after the sibling element which will append the element\n       *   after itself\n       * @param {function=} done callback function that will be called after the element has been\n       *   inserted into the DOM\n       */\n      enter : function(element, parent, after, done) {\n        if (after) {\n          after.after(element);\n        } else {\n          if (!parent || !parent[0]) {\n            parent = after.parent();\n          }\n          parent.append(element);\n        }\n        done && $timeout(done, 0, false);\n      },\n\n      /**\n       *\n       * @ngdoc function\n       * @name ng.$animate#leave\n       * @methodOf ng.$animate\n       * @function\n       * @description Removes the element from the DOM. Once complete, the done() callback will be\n       *   fired (if provided).\n       * @param {jQuery/jqLite element} element the element which will be removed from the DOM\n       * @param {function=} done callback function that will be called after the element has been\n       *   removed from the DOM\n       */\n      leave : function(element, done) {\n        element.remove();\n        done && $timeout(done, 0, false);\n      },\n\n      /**\n       *\n       * @ngdoc function\n       * @name ng.$animate#move\n       * @methodOf ng.$animate\n       * @function\n       * @description Moves the position of the provided element within the DOM to be placed\n       * either after the `after` element or inside of the `parent` element. Once complete, the\n       * done() callback will be fired (if provided).\n       * \n       * @param {jQuery/jqLite element} element the element which will be moved around within the\n       *   DOM\n       * @param {jQuery/jqLite element} parent the parent element where the element will be\n       *   inserted into (if the after element is not present)\n       * @param {jQuery/jqLite element} after the sibling element where the element will be\n       *   positioned next to\n       * @param {function=} done the callback function (if provided) that will be fired after the\n       *   element has been moved to its new position\n       */\n      move : function(element, parent, after, done) {\n        // Do not remove element before insert. Removing will cause data associated with the\n        // element to be dropped. Insert will implicitly do the remove.\n        this.enter(element, parent, after, done);\n      },\n\n      /**\n       *\n       * @ngdoc function\n       * @name ng.$animate#addClass\n       * @methodOf ng.$animate\n       * @function\n       * @description Adds the provided className CSS class value to the provided element. Once\n       * complete, the done() callback will be fired (if provided).\n       * @param {jQuery/jqLite element} element the element which will have the className value\n       *   added to it\n       * @param {string} className the CSS class which will be added to the element\n       * @param {function=} done the callback function (if provided) that will be fired after the\n       *   className value has been added to the element\n       */\n      addClass : function(element, className, done) {\n        className = isString(className) ?\n                      className :\n                      isArray(className) ? className.join(' ') : '';\n        forEach(element, function (element) {\n          jqLiteAddClass(element, className);\n        });\n        done && $timeout(done, 0, false);\n      },\n\n      /**\n       *\n       * @ngdoc function\n       * @name ng.$animate#removeClass\n       * @methodOf ng.$animate\n       * @function\n       * @description Removes the provided className CSS class value from the provided element.\n       * Once complete, the done() callback will be fired (if provided).\n       * @param {jQuery/jqLite element} element the element which will have the className value\n       *   removed from it\n       * @param {string} className the CSS class which will be removed from the element\n       * @param {function=} done the callback function (if provided) that will be fired after the\n       *   className value has been removed from the element\n       */\n      removeClass : function(element, className, done) {\n        className = isString(className) ?\n                      className :\n                      isArray(className) ? className.join(' ') : '';\n        forEach(element, function (element) {\n          jqLiteRemoveClass(element, className);\n        });\n        done && $timeout(done, 0, false);\n      },\n\n      enabled : noop\n    };\n  }];\n}];\n\n/**\n * ! This is a private undocumented service !\n *\n * @name ng.$browser\n * @requires $log\n * @description\n * This object has two goals:\n *\n * - hide all the global state in the browser caused by the window object\n * - abstract away all the browser specific features and inconsistencies\n *\n * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`\n * service, which can be used for convenient testing of the application without the interaction with\n * the real browser apis.\n */\n/**\n * @param {object} window The global window object.\n * @param {object} document jQuery wrapped document.\n * @param {function()} XHR XMLHttpRequest constructor.\n * @param {object} $log console.log or an object with the same interface.\n * @param {object} $sniffer $sniffer service\n */\nfunction Browser(window, document, $log, $sniffer) {\n  var self = this,\n      rawDocument = document[0],\n      location = window.location,\n      history = window.history,\n      setTimeout = window.setTimeout,\n      clearTimeout = window.clearTimeout,\n      pendingDeferIds = {};\n\n  self.isMock = false;\n\n  var outstandingRequestCount = 0;\n  var outstandingRequestCallbacks = [];\n\n  // TODO(vojta): remove this temporary api\n  self.$$completeOutstandingRequest = completeOutstandingRequest;\n  self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };\n\n  /**\n   * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`\n   * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.\n   */\n  function completeOutstandingRequest(fn) {\n    try {\n      fn.apply(null, sliceArgs(arguments, 1));\n    } finally {\n      outstandingRequestCount--;\n      if (outstandingRequestCount === 0) {\n        while(outstandingRequestCallbacks.length) {\n          try {\n            outstandingRequestCallbacks.pop()();\n          } catch (e) {\n            $log.error(e);\n          }\n        }\n      }\n    }\n  }\n\n  /**\n   * @private\n   * Note: this method is used only by scenario runner\n   * TODO(vojta): prefix this method with $$ ?\n   * @param {function()} callback Function that will be called when no outstanding request\n   */\n  self.notifyWhenNoOutstandingRequests = function(callback) {\n    // force browser to execute all pollFns - this is needed so that cookies and other pollers fire\n    // at some deterministic time in respect to the test runner's actions. Leaving things up to the\n    // regular poller would result in flaky tests.\n    forEach(pollFns, function(pollFn){ pollFn(); });\n\n    if (outstandingRequestCount === 0) {\n      callback();\n    } else {\n      outstandingRequestCallbacks.push(callback);\n    }\n  };\n\n  //////////////////////////////////////////////////////////////\n  // Poll Watcher API\n  //////////////////////////////////////////////////////////////\n  var pollFns = [],\n      pollTimeout;\n\n  /**\n   * @name ng.$browser#addPollFn\n   * @methodOf ng.$browser\n   *\n   * @param {function()} fn Poll function to add\n   *\n   * @description\n   * Adds a function to the list of functions that poller periodically executes,\n   * and starts polling if not started yet.\n   *\n   * @returns {function()} the added function\n   */\n  self.addPollFn = function(fn) {\n    if (isUndefined(pollTimeout)) startPoller(100, setTimeout);\n    pollFns.push(fn);\n    return fn;\n  };\n\n  /**\n   * @param {number} interval How often should browser call poll functions (ms)\n   * @param {function()} setTimeout Reference to a real or fake `setTimeout` function.\n   *\n   * @description\n   * Configures the poller to run in the specified intervals, using the specified\n   * setTimeout fn and kicks it off.\n   */\n  function startPoller(interval, setTimeout) {\n    (function check() {\n      forEach(pollFns, function(pollFn){ pollFn(); });\n      pollTimeout = setTimeout(check, interval);\n    })();\n  }\n\n  //////////////////////////////////////////////////////////////\n  // URL API\n  //////////////////////////////////////////////////////////////\n\n  var lastBrowserUrl = location.href,\n      baseElement = document.find('base'),\n      newLocation = null;\n\n  /**\n   * @name ng.$browser#url\n   * @methodOf ng.$browser\n   *\n   * @description\n   * GETTER:\n   * Without any argument, this method just returns current value of location.href.\n   *\n   * SETTER:\n   * With at least one argument, this method sets url to new value.\n   * If html5 history api supported, pushState/replaceState is used, otherwise\n   * location.href/location.replace is used.\n   * Returns its own instance to allow chaining\n   *\n   * NOTE: this api is intended for use only by the $location service. Please use the\n   * {@link ng.$location $location service} to change url.\n   *\n   * @param {string} url New url (when used as setter)\n   * @param {boolean=} replace Should new url replace current history record ?\n   */\n  self.url = function(url, replace) {\n    // Android Browser BFCache causes location, history reference to become stale.\n    if (location !== window.location) location = window.location;\n    if (history !== window.history) history = window.history;\n\n    // setter\n    if (url) {\n      if (lastBrowserUrl == url) return;\n      lastBrowserUrl = url;\n      if ($sniffer.history) {\n        if (replace) history.replaceState(null, '', url);\n        else {\n          history.pushState(null, '', url);\n          // Crazy Opera Bug: http://my.opera.com/community/forums/topic.dml?id=1185462\n          baseElement.attr('href', baseElement.attr('href'));\n        }\n      } else {\n        newLocation = url;\n        if (replace) {\n          location.replace(url);\n        } else {\n          location.href = url;\n        }\n      }\n      return self;\n    // getter\n    } else {\n      // - newLocation is a workaround for an IE7-9 issue with location.replace and location.href\n      //   methods not updating location.href synchronously.\n      // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172\n      return newLocation || location.href.replace(/%27/g,\"'\");\n    }\n  };\n\n  var urlChangeListeners = [],\n      urlChangeInit = false;\n\n  function fireUrlChange() {\n    newLocation = null;\n    if (lastBrowserUrl == self.url()) return;\n\n    lastBrowserUrl = self.url();\n    forEach(urlChangeListeners, function(listener) {\n      listener(self.url());\n    });\n  }\n\n  /**\n   * @name ng.$browser#onUrlChange\n   * @methodOf ng.$browser\n   * @TODO(vojta): refactor to use node's syntax for events\n   *\n   * @description\n   * Register callback function that will be called, when url changes.\n   *\n   * It's only called when the url is changed from outside of angular:\n   * - user types different url into address bar\n   * - user clicks on history (forward/back) button\n   * - user clicks on a link\n   *\n   * It's not called when url is changed by $browser.url() method\n   *\n   * The listener gets called with new url as parameter.\n   *\n   * NOTE: this api is intended for use only by the $location service. Please use the\n   * {@link ng.$location $location service} to monitor url changes in angular apps.\n   *\n   * @param {function(string)} listener Listener function to be called when url changes.\n   * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.\n   */\n  self.onUrlChange = function(callback) {\n    if (!urlChangeInit) {\n      // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)\n      // don't fire popstate when user change the address bar and don't fire hashchange when url\n      // changed by push/replaceState\n\n      // html5 history api - popstate event\n      if ($sniffer.history) jqLite(window).on('popstate', fireUrlChange);\n      // hashchange event\n      if ($sniffer.hashchange) jqLite(window).on('hashchange', fireUrlChange);\n      // polling\n      else self.addPollFn(fireUrlChange);\n\n      urlChangeInit = true;\n    }\n\n    urlChangeListeners.push(callback);\n    return callback;\n  };\n\n  //////////////////////////////////////////////////////////////\n  // Misc API\n  //////////////////////////////////////////////////////////////\n\n  /**\n   * @name ng.$browser#baseHref\n   * @methodOf ng.$browser\n   *\n   * @description\n   * Returns current <base href>\n   * (always relative - without domain)\n   *\n   * @returns {string=} current <base href>\n   */\n  self.baseHref = function() {\n    var href = baseElement.attr('href');\n    return href ? href.replace(/^(https?\\:)?\\/\\/[^\\/]*/, '') : '';\n  };\n\n  //////////////////////////////////////////////////////////////\n  // Cookies API\n  //////////////////////////////////////////////////////////////\n  var lastCookies = {};\n  var lastCookieString = '';\n  var cookiePath = self.baseHref();\n\n  /**\n   * @name ng.$browser#cookies\n   * @methodOf ng.$browser\n   *\n   * @param {string=} name Cookie name\n   * @param {string=} value Cookie value\n   *\n   * @description\n   * The cookies method provides a 'private' low level access to browser cookies.\n   * It is not meant to be used directly, use the $cookie service instead.\n   *\n   * The return values vary depending on the arguments that the method was called with as follows:\n   *\n   * - cookies() -> hash of all cookies, this is NOT a copy of the internal state, so do not modify\n   *   it\n   * - cookies(name, value) -> set name to value, if value is undefined delete the cookie\n   * - cookies(name) -> the same as (name, undefined) == DELETES (no one calls it right now that\n   *   way)\n   *\n   * @returns {Object} Hash of all cookies (if called without any parameter)\n   */\n  self.cookies = function(name, value) {\n    /* global escape: false, unescape: false */\n    var cookieLength, cookieArray, cookie, i, index;\n\n    if (name) {\n      if (value === undefined) {\n        rawDocument.cookie = escape(name) + \"=;path=\" + cookiePath +\n                                \";expires=Thu, 01 Jan 1970 00:00:00 GMT\";\n      } else {\n        if (isString(value)) {\n          cookieLength = (rawDocument.cookie = escape(name) + '=' + escape(value) +\n                                ';path=' + cookiePath).length + 1;\n\n          // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:\n          // - 300 cookies\n          // - 20 cookies per unique domain\n          // - 4096 bytes per cookie\n          if (cookieLength > 4096) {\n            $log.warn(\"Cookie '\"+ name +\n              \"' possibly not set or overflowed because it was too large (\"+\n              cookieLength + \" > 4096 bytes)!\");\n          }\n        }\n      }\n    } else {\n      if (rawDocument.cookie !== lastCookieString) {\n        lastCookieString = rawDocument.cookie;\n        cookieArray = lastCookieString.split(\"; \");\n        lastCookies = {};\n\n        for (i = 0; i < cookieArray.length; i++) {\n          cookie = cookieArray[i];\n          index = cookie.indexOf('=');\n          if (index > 0) { //ignore nameless cookies\n            name = unescape(cookie.substring(0, index));\n            // the first value that is seen for a cookie is the most\n            // specific one.  values for the same cookie name that\n            // follow are for less specific paths.\n            if (lastCookies[name] === undefined) {\n              lastCookies[name] = unescape(cookie.substring(index + 1));\n            }\n          }\n        }\n      }\n      return lastCookies;\n    }\n  };\n\n\n  /**\n   * @name ng.$browser#defer\n   * @methodOf ng.$browser\n   * @param {function()} fn A function, who's execution should be deferred.\n   * @param {number=} [delay=0] of milliseconds to defer the function execution.\n   * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.\n   *\n   * @description\n   * Executes a fn asynchronously via `setTimeout(fn, delay)`.\n   *\n   * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using\n   * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed\n   * via `$browser.defer.flush()`.\n   *\n   */\n  self.defer = function(fn, delay) {\n    var timeoutId;\n    outstandingRequestCount++;\n    timeoutId = setTimeout(function() {\n      delete pendingDeferIds[timeoutId];\n      completeOutstandingRequest(fn);\n    }, delay || 0);\n    pendingDeferIds[timeoutId] = true;\n    return timeoutId;\n  };\n\n\n  /**\n   * @name ng.$browser#defer.cancel\n   * @methodOf ng.$browser.defer\n   *\n   * @description\n   * Cancels a deferred task identified with `deferId`.\n   *\n   * @param {*} deferId Token returned by the `$browser.defer` function.\n   * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n   *                    canceled.\n   */\n  self.defer.cancel = function(deferId) {\n    if (pendingDeferIds[deferId]) {\n      delete pendingDeferIds[deferId];\n      clearTimeout(deferId);\n      completeOutstandingRequest(noop);\n      return true;\n    }\n    return false;\n  };\n\n}\n\nfunction $BrowserProvider(){\n  this.$get = ['$window', '$log', '$sniffer', '$document',\n      function( $window,   $log,   $sniffer,   $document){\n        return new Browser($window, $document, $log, $sniffer);\n      }];\n}\n\n/**\n * @ngdoc object\n * @name ng.$cacheFactory\n *\n * @description\n * Factory that constructs cache objects and gives access to them.\n * \n * <pre>\n * \n *  var cache = $cacheFactory('cacheId');\n *  expect($cacheFactory.get('cacheId')).toBe(cache);\n *  expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();\n *\n *  cache.put(\"key\", \"value\");\n *  cache.put(\"another key\", \"another value\");\n *\n *  // We've specified no options on creation\n *  expect(cache.info()).toEqual({id: 'cacheId', size: 2}); \n * \n * </pre>\n *\n *\n * @param {string} cacheId Name or id of the newly created cache.\n * @param {object=} options Options object that specifies the cache behavior. Properties:\n *\n *   - `{number=}` `capacity` — turns the cache into LRU cache.\n *\n * @returns {object} Newly created cache object with the following set of methods:\n *\n * - `{object}` `info()` — Returns id, size, and options of cache.\n * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns\n *   it.\n * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.\n * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.\n * - `{void}` `removeAll()` — Removes all cached values.\n * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.\n *\n */\nfunction $CacheFactoryProvider() {\n\n  this.$get = function() {\n    var caches = {};\n\n    function cacheFactory(cacheId, options) {\n      if (cacheId in caches) {\n        throw minErr('$cacheFactory')('iid', \"CacheId '{0}' is already taken!\", cacheId);\n      }\n\n      var size = 0,\n          stats = extend({}, options, {id: cacheId}),\n          data = {},\n          capacity = (options && options.capacity) || Number.MAX_VALUE,\n          lruHash = {},\n          freshEnd = null,\n          staleEnd = null;\n\n      return caches[cacheId] = {\n\n        put: function(key, value) {\n          var lruEntry = lruHash[key] || (lruHash[key] = {key: key});\n\n          refresh(lruEntry);\n\n          if (isUndefined(value)) return;\n          if (!(key in data)) size++;\n          data[key] = value;\n\n          if (size > capacity) {\n            this.remove(staleEnd.key);\n          }\n\n          return value;\n        },\n\n\n        get: function(key) {\n          var lruEntry = lruHash[key];\n\n          if (!lruEntry) return;\n\n          refresh(lruEntry);\n\n          return data[key];\n        },\n\n\n        remove: function(key) {\n          var lruEntry = lruHash[key];\n\n          if (!lruEntry) return;\n\n          if (lruEntry == freshEnd) freshEnd = lruEntry.p;\n          if (lruEntry == staleEnd) staleEnd = lruEntry.n;\n          link(lruEntry.n,lruEntry.p);\n\n          delete lruHash[key];\n          delete data[key];\n          size--;\n        },\n\n\n        removeAll: function() {\n          data = {};\n          size = 0;\n          lruHash = {};\n          freshEnd = staleEnd = null;\n        },\n\n\n        destroy: function() {\n          data = null;\n          stats = null;\n          lruHash = null;\n          delete caches[cacheId];\n        },\n\n\n        info: function() {\n          return extend({}, stats, {size: size});\n        }\n      };\n\n\n      /**\n       * makes the `entry` the freshEnd of the LRU linked list\n       */\n      function refresh(entry) {\n        if (entry != freshEnd) {\n          if (!staleEnd) {\n            staleEnd = entry;\n          } else if (staleEnd == entry) {\n            staleEnd = entry.n;\n          }\n\n          link(entry.n, entry.p);\n          link(entry, freshEnd);\n          freshEnd = entry;\n          freshEnd.n = null;\n        }\n      }\n\n\n      /**\n       * bidirectionally links two entries of the LRU linked list\n       */\n      function link(nextEntry, prevEntry) {\n        if (nextEntry != prevEntry) {\n          if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify\n          if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify\n        }\n      }\n    }\n\n\n  /**\n   * @ngdoc method\n   * @name ng.$cacheFactory#info\n   * @methodOf ng.$cacheFactory\n   *\n   * @description\n   * Get information about all the of the caches that have been created\n   *\n   * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`\n   */\n    cacheFactory.info = function() {\n      var info = {};\n      forEach(caches, function(cache, cacheId) {\n        info[cacheId] = cache.info();\n      });\n      return info;\n    };\n\n\n  /**\n   * @ngdoc method\n   * @name ng.$cacheFactory#get\n   * @methodOf ng.$cacheFactory\n   *\n   * @description\n   * Get access to a cache object by the `cacheId` used when it was created.\n   *\n   * @param {string} cacheId Name or id of a cache to access.\n   * @returns {object} Cache object identified by the cacheId or undefined if no such cache.\n   */\n    cacheFactory.get = function(cacheId) {\n      return caches[cacheId];\n    };\n\n\n    return cacheFactory;\n  };\n}\n\n/**\n * @ngdoc object\n * @name ng.$templateCache\n *\n * @description\n * The first time a template is used, it is loaded in the template cache for quick retrieval. You\n * can load templates directly into the cache in a `script` tag, or by consuming the\n * `$templateCache` service directly.\n * \n * Adding via the `script` tag:\n * <pre>\n * <html ng-app>\n * <head>\n * <script type=\"text/ng-template\" id=\"templateId.html\">\n *   This is the content of the template\n * </script>\n * </head>\n *   ...\n * </html>\n * </pre>\n * \n * **Note:** the `script` tag containing the template does not need to be included in the `head` of\n * the document, but it must be below the `ng-app` definition.\n * \n * Adding via the $templateCache service:\n * \n * <pre>\n * var myApp = angular.module('myApp', []);\n * myApp.run(function($templateCache) {\n *   $templateCache.put('templateId.html', 'This is the content of the template');\n * });\n * </pre>\n * \n * To retrieve the template later, simply use it in your HTML:\n * <pre>\n * <div ng-include=\" 'templateId.html' \"></div>\n * </pre>\n * \n * or get it via Javascript:\n * <pre>\n * $templateCache.get('templateId.html')\n * </pre>\n * \n * See {@link ng.$cacheFactory $cacheFactory}.\n *\n */\nfunction $TemplateCacheProvider() {\n  this.$get = ['$cacheFactory', function($cacheFactory) {\n    return $cacheFactory('templates');\n  }];\n}\n\n/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!\n *\n * DOM-related variables:\n *\n * - \"node\" - DOM Node\n * - \"element\" - DOM Element or Node\n * - \"$node\" or \"$element\" - jqLite-wrapped node or element\n *\n *\n * Compiler related stuff:\n *\n * - \"linkFn\" - linking fn of a single directive\n * - \"nodeLinkFn\" - function that aggregates all linking fns for a particular node\n * - \"childLinkFn\" -  function that aggregates all linking fns for child nodes of a particular node\n * - \"compositeLinkFn\" - function that aggregates all linking fns for a compilation root (nodeList)\n */\n\n\n/**\n * @ngdoc function\n * @name ng.$compile\n * @function\n *\n * @description\n * Compiles an HTML string or DOM into a template and produces a template function, which\n * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.\n *\n * The compilation is a process of walking the DOM tree and matching DOM elements to\n * {@link ng.$compileProvider#methods_directive directives}.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** This document is an in-depth reference of all directive options.\n * For a gentle introduction to directives with examples of common use cases,\n * see the {@link guide/directive directive guide}.\n * </div>\n *\n * ## Comprehensive Directive API\n *\n * There are many different options for a directive.\n *\n * The difference resides in the return value of the factory function.\n * You can either return a \"Directive Definition Object\" (see below) that defines the directive properties,\n * or just the `postLink` function (all other properties will have the default values).\n *\n * <div class=\"alert alert-success\">\n * **Best Practice:** It's recommended to use the \"directive definition object\" form.\n * </div>\n *\n * Here's an example directive declared with a Directive Definition Object:\n *\n * <pre>\n *   var myModule = angular.module(...);\n *\n *   myModule.directive('directiveName', function factory(injectables) {\n *     var directiveDefinitionObject = {\n *       priority: 0,\n *       template: '<div></div>', // or // function(tElement, tAttrs) { ... },\n *       // or\n *       // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },\n *       replace: false,\n *       transclude: false,\n *       restrict: 'A',\n *       scope: false,\n *       controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },\n *       require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],\n *       compile: function compile(tElement, tAttrs, transclude) {\n *         return {\n *           pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n *           post: function postLink(scope, iElement, iAttrs, controller) { ... }\n *         }\n *         // or\n *         // return function postLink( ... ) { ... }\n *       },\n *       // or\n *       // link: {\n *       //  pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n *       //  post: function postLink(scope, iElement, iAttrs, controller) { ... }\n *       // }\n *       // or\n *       // link: function postLink( ... ) { ... }\n *     };\n *     return directiveDefinitionObject;\n *   });\n * </pre>\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Any unspecified options will use the default value. You can see the default values below.\n * </div>\n *\n * Therefore the above can be simplified as:\n *\n * <pre>\n *   var myModule = angular.module(...);\n *\n *   myModule.directive('directiveName', function factory(injectables) {\n *     var directiveDefinitionObject = {\n *       link: function postLink(scope, iElement, iAttrs) { ... }\n *     };\n *     return directiveDefinitionObject;\n *     // or\n *     // return function postLink(scope, iElement, iAttrs) { ... }\n *   });\n * </pre>\n *\n *\n *\n * ### Directive Definition Object\n *\n * The directive definition object provides instructions to the {@link api/ng.$compile\n * compiler}. The attributes are:\n *\n * #### `priority`\n * When there are multiple directives defined on a single DOM element, sometimes it\n * is necessary to specify the order in which the directives are applied. The `priority` is used\n * to sort the directives before their `compile` functions get called. Priority is defined as a\n * number. Directives with greater numerical `priority` are compiled first. Pre-link functions\n * are also run in priority order, but post-link functions are run in reverse order. The order\n * of directives with the same priority is undefined. The default priority is `0`.\n *\n * #### `terminal`\n * If set to true then the current `priority` will be the last set of directives\n * which will execute (any directives at the current priority will still execute\n * as the order of execution on same `priority` is undefined).\n *\n * #### `scope`\n * **If set to `true`,** then a new scope will be created for this directive. If multiple directives on the\n * same element request a new scope, only one new scope is created. The new scope rule does not\n * apply for the root of the template since the root of the template always gets a new scope.\n *\n * **If set to `{}` (object hash),** then a new \"isolate\" scope is created. The 'isolate' scope differs from\n * normal scope in that it does not prototypically inherit from the parent scope. This is useful\n * when creating reusable components, which should not accidentally read or modify data in the\n * parent scope.\n *\n * The 'isolate' scope takes an object hash which defines a set of local scope properties\n * derived from the parent scope. These local properties are useful for aliasing values for\n * templates. Locals definition is a hash of local scope property to its source:\n *\n * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is\n *   always a string since DOM attributes are strings. If no `attr` name is specified  then the\n *   attribute name is assumed to be the same as the local name.\n *   Given `<widget my-attr=\"hello {{name}}\">` and widget definition\n *   of `scope: { localName:'@myAttr' }`, then widget scope property `localName` will reflect\n *   the interpolated value of `hello {{name}}`. As the `name` attribute changes so will the\n *   `localName` property on the widget scope. The `name` is read from the parent scope (not\n *   component scope).\n *\n * * `=` or `=attr` - set up bi-directional binding between a local scope property and the\n *   parent scope property of name defined via the value of the `attr` attribute. If no `attr`\n *   name is specified then the attribute name is assumed to be the same as the local name.\n *   Given `<widget my-attr=\"parentModel\">` and widget definition of\n *   `scope: { localModel:'=myAttr' }`, then widget scope property `localModel` will reflect the\n *   value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected\n *   in `localModel` and any changes in `localModel` will reflect in `parentModel`. If the parent\n *   scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You\n *   can avoid this behavior using `=?` or `=?attr` in order to flag the property as optional.\n *\n * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope.\n *   If no `attr` name is specified then the attribute name is assumed to be the same as the\n *   local name. Given `<widget my-attr=\"count = count + value\">` and widget definition of\n *   `scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to\n *   a function wrapper for the `count = count + value` expression. Often it's desirable to\n *   pass data from the isolated scope via an expression and to the parent scope, this can be\n *   done by passing a map of local variable names and values into the expression wrapper fn.\n *   For example, if the expression is `increment(amount)` then we can specify the amount value\n *   by calling the `localFn` as `localFn({amount: 22})`.\n *\n *\n *\n * #### `controller`\n * Controller constructor function. The controller is instantiated before the\n * pre-linking phase and it is shared with other directives (see\n * `require` attribute). This allows the directives to communicate with each other and augment\n * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:\n *\n * * `$scope` - Current scope associated with the element\n * * `$element` - Current element\n * * `$attrs` - Current attributes object for the element\n * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope.\n *    The scope can be overridden by an optional first argument.\n *   `function([scope], cloneLinkingFn)`.\n *\n *\n * #### `require`\n * Require another directive and inject its controller as the fourth argument to the linking function. The\n * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the\n * injected argument will be an array in corresponding order. If no such directive can be\n * found, or if the directive does not have a controller, then an error is raised. The name can be prefixed with:\n *\n * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.\n * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.\n * * `^` - Locate the required controller by searching the element's parents. Throw an error if not found.\n * * `?^` - Attempt to locate the required controller by searching the element's parents or pass `null` to the\n *   `link` fn if not found.\n *\n *\n * #### `controllerAs`\n * Controller alias at the directive scope. An alias for the controller so it\n * can be referenced at the directive template. The directive needs to define a scope for this\n * configuration to be used. Useful in the case when directive is used as component.\n *\n *\n * #### `restrict`\n * String of subset of `EACM` which restricts the directive to a specific directive\n * declaration style. If omitted, the default (attributes only) is used.\n *\n * * `E` - Element name: `<my-directive></my-directive>`\n * * `A` - Attribute (default): `<div my-directive=\"exp\"></div>`\n * * `C` - Class: `<div class=\"my-directive: exp;\"></div>`\n * * `M` - Comment: `<!-- directive: my-directive exp -->`\n *\n *\n * #### `template`\n * replace the current element with the contents of the HTML. The replacement process\n * migrates all of the attributes / classes from the old element to the new one. See the\n * {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive\n * Directives Guide} for an example.\n *\n * You can specify `template` as a string representing the template or as a function which takes\n * two arguments `tElement` and `tAttrs` (described in the `compile` function api below) and\n * returns a string value representing the template.\n *\n *\n * #### `templateUrl`\n * Same as `template` but the template is loaded from the specified URL. Because\n * the template loading is asynchronous the compilation/linking is suspended until the template\n * is loaded.\n *\n * You can specify `templateUrl` as a string representing the URL or as a function which takes two\n * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns\n * a string value representing the url.  In either case, the template URL is passed through {@link\n * api/ng.$sce#methods_getTrustedResourceUrl $sce.getTrustedResourceUrl}.\n *\n *\n * #### `replace`\n * specify where the template should be inserted. Defaults to `false`.\n *\n * * `true` - the template will replace the current element.\n * * `false` - the template will replace the contents of the current element.\n *\n *\n * #### `transclude`\n * compile the content of the element and make it available to the directive.\n * Typically used with {@link api/ng.directive:ngTransclude\n * ngTransclude}. The advantage of transclusion is that the linking function receives a\n * transclusion function which is pre-bound to the correct scope. In a typical setup the widget\n * creates an `isolate` scope, but the transclusion is not a child, but a sibling of the `isolate`\n * scope. This makes it possible for the widget to have private state, and the transclusion to\n * be bound to the parent (pre-`isolate`) scope.\n *\n * * `true` - transclude the content of the directive.\n * * `'element'` - transclude the whole element including any directives defined at lower priority.\n *\n *\n * #### `compile`\n *\n * <pre>\n *   function compile(tElement, tAttrs, transclude) { ... }\n * </pre>\n *\n * The compile function deals with transforming the template DOM. Since most directives do not do\n * template transformation, it is not used often. Examples that require compile functions are\n * directives that transform template DOM, such as {@link\n * api/ng.directive:ngRepeat ngRepeat}, or load the contents\n * asynchronously, such as {@link api/ngRoute.directive:ngView ngView}. The\n * compile function takes the following arguments.\n *\n *   * `tElement` - template element - The element where the directive has been declared. It is\n *     safe to do template transformation on the element and child elements only.\n *\n *   * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared\n *     between all directive compile functions.\n *\n *   * `transclude` -  [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`\n *\n * <div class=\"alert alert-warning\">\n * **Note:** The template instance and the link instance may be different objects if the template has\n * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that\n * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration\n * should be done in a linking function rather than in a compile function.\n * </div>\n *\n * <div class=\"alert alert-error\">\n * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it\n *   e.g. does not know about the right outer scope. Please use the transclude function that is passed\n *   to the link function instead.\n * </div>\n\n * A compile function can have a return value which can be either a function or an object.\n *\n * * returning a (post-link) function - is equivalent to registering the linking function via the\n *   `link` property of the config object when the compile function is empty.\n *\n * * returning an object with function(s) registered via `pre` and `post` properties - allows you to\n *   control when a linking function should be called during the linking phase. See info about\n *   pre-linking and post-linking functions below.\n *\n *\n * #### `link`\n * This property is used only if the `compile` property is not defined.\n *\n * <pre>\n *   function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }\n * </pre>\n *\n * The link function is responsible for registering DOM listeners as well as updating the DOM. It is\n * executed after the template has been cloned. This is where most of the directive logic will be\n * put.\n *\n *   * `scope` - {@link api/ng.$rootScope.Scope Scope} - The scope to be used by the\n *     directive for registering {@link api/ng.$rootScope.Scope#methods_$watch watches}.\n *\n *   * `iElement` - instance element - The element where the directive is to be used. It is safe to\n *     manipulate the children of the element only in `postLink` function since the children have\n *     already been linked.\n *\n *   * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared\n *     between all directive linking functions.\n *\n *   * `controller` - a controller instance - A controller instance if at least one directive on the\n *     element defines a controller. The controller is shared among all the directives, which allows\n *     the directives to use the controllers as a communication channel.\n *\n *   * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.\n *     The scope can be overridden by an optional first argument. This is the same as the `$transclude`\n *     parameter of directive controllers.\n *     `function([scope], cloneLinkingFn)`.\n *\n *\n * #### Pre-linking function\n *\n * Executed before the child elements are linked. Not safe to do DOM transformation since the\n * compiler linking function will fail to locate the correct elements for linking.\n *\n * #### Post-linking function\n *\n * Executed after the child elements are linked. It is safe to do DOM transformation in the post-linking function.\n *\n * <a name=\"Attributes\"></a>\n * ### Attributes\n *\n * The {@link api/ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the\n * `link()` or `compile()` functions. It has a variety of uses.\n *\n * accessing *Normalized attribute names:*\n * Directives like 'ngBind' can be expressed in many ways: 'ng:bind', `data-ng-bind`, or 'x-ng-bind'.\n * the attributes object allows for normalized access to\n *   the attributes.\n *\n * * *Directive inter-communication:* All directives share the same instance of the attributes\n *   object which allows the directives to use the attributes object as inter directive\n *   communication.\n *\n * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object\n *   allowing other directives to read the interpolated value.\n *\n * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes\n *   that contain interpolation (e.g. `src=\"{{bar}}\"`). Not only is this very efficient but it's also\n *   the only way to easily get the actual value because during the linking phase the interpolation\n *   hasn't been evaluated yet and so the value is at this time set to `undefined`.\n *\n * <pre>\n * function linkingFn(scope, elm, attrs, ctrl) {\n *   // get the attribute value\n *   console.log(attrs.ngModel);\n *\n *   // change the attribute\n *   attrs.$set('ngModel', 'new value');\n *\n *   // observe changes to interpolated attribute\n *   attrs.$observe('ngModel', function(value) {\n *     console.log('ngModel has changed value to ' + value);\n *   });\n * }\n * </pre>\n *\n * Below is an example using `$compileProvider`.\n *\n * <div class=\"alert alert-warning\">\n * **Note**: Typically directives are registered with `module.directive`. The example below is\n * to illustrate how `$compile` works.\n * </div>\n *\n <doc:example module=\"compile\">\n   <doc:source>\n    <script>\n      angular.module('compile', [], function($compileProvider) {\n        // configure new 'compile' directive by passing a directive\n        // factory function. The factory function injects the '$compile'\n        $compileProvider.directive('compile', function($compile) {\n          // directive factory creates a link function\n          return function(scope, element, attrs) {\n            scope.$watch(\n              function(scope) {\n                 // watch the 'compile' expression for changes\n                return scope.$eval(attrs.compile);\n              },\n              function(value) {\n                // when the 'compile' expression changes\n                // assign it into the current DOM\n                element.html(value);\n\n                // compile the new DOM and link it to the current\n                // scope.\n                // NOTE: we only compile .childNodes so that\n                // we don't get into infinite loop compiling ourselves\n                $compile(element.contents())(scope);\n              }\n            );\n          };\n        })\n      });\n\n      function Ctrl($scope) {\n        $scope.name = 'Angular';\n        $scope.html = 'Hello {{name}}';\n      }\n    </script>\n    <div ng-controller=\"Ctrl\">\n      <input ng-model=\"name\"> <br>\n      <textarea ng-model=\"html\"></textarea> <br>\n      <div compile=\"html\"></div>\n    </div>\n   </doc:source>\n   <doc:protractor>\n     it('should auto compile', function() {\n       var textarea = $('textarea');\n       var output = $('div[compile]');\n       // The initial state reads 'Hello Angular'.\n       expect(output.getText()).toBe('Hello Angular');\n       textarea.clear();\n       textarea.sendKeys('{{name}}!');\n       expect(output.getText()).toBe('Angular!');\n     });\n   </doc:protractor>\n </doc:example>\n\n *\n *\n * @param {string|DOMElement} element Element or HTML string to compile into a template function.\n * @param {function(angular.Scope[, cloneAttachFn]} transclude function available to directives.\n * @param {number} maxPriority only apply directives lower then given priority (Only effects the\n *                 root element(s), not their children)\n * @returns {function(scope[, cloneAttachFn])} a link function which is used to bind template\n * (a DOM element/tree) to a scope. Where:\n *\n *  * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.\n *  * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the\n *  `template` and call the `cloneAttachFn` function allowing the caller to attach the\n *  cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is\n *  called as: <br> `cloneAttachFn(clonedElement, scope)` where:\n *\n *      * `clonedElement` - is a clone of the original `element` passed into the compiler.\n *      * `scope` - is the current scope with which the linking function is working with.\n *\n * Calling the linking function returns the element of the template. It is either the original\n * element passed in, or the clone of the element if the `cloneAttachFn` is provided.\n *\n * After linking the view is not updated until after a call to $digest which typically is done by\n * Angular automatically.\n *\n * If you need access to the bound view, there are two ways to do it:\n *\n * - If you are not asking the linking function to clone the template, create the DOM element(s)\n *   before you send them to the compiler and keep this reference around.\n *   <pre>\n *     var element = $compile('<p>{{total}}</p>')(scope);\n *   </pre>\n *\n * - if on the other hand, you need the element to be cloned, the view reference from the original\n *   example would not point to the clone, but rather to the original template that was cloned. In\n *   this case, you can access the clone via the cloneAttachFn:\n *   <pre>\n *     var templateElement = angular.element('<p>{{total}}</p>'),\n *         scope = ....;\n *\n *     var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {\n *       //attach the clone to DOM document at the right place\n *     });\n *\n *     //now we have reference to the cloned DOM via `clonedElement`\n *   </pre>\n *\n *\n * For information on how the compiler works, see the\n * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.\n */\n\nvar $compileMinErr = minErr('$compile');\n\n/**\n * @ngdoc service\n * @name ng.$compileProvider\n * @function\n *\n * @description\n */\n$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];\nfunction $CompileProvider($provide, $$sanitizeUriProvider) {\n  var hasDirectives = {},\n      Suffix = 'Directive',\n      COMMENT_DIRECTIVE_REGEXP = /^\\s*directive\\:\\s*([\\d\\w\\-_]+)\\s+(.*)$/,\n      CLASS_DIRECTIVE_REGEXP = /(([\\d\\w\\-_]+)(?:\\:([^;]+))?;?)/;\n\n  // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes\n  // The assumption is that future DOM event attribute names will begin with\n  // 'on' and be composed of only English letters.\n  var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;\n\n  /**\n   * @ngdoc function\n   * @name ng.$compileProvider#directive\n   * @methodOf ng.$compileProvider\n   * @function\n   *\n   * @description\n   * Register a new directive with the compiler.\n   *\n   * @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which\n   *    will match as <code>ng-bind</code>), or an object map of directives where the keys are the\n   *    names and the values are the factories.\n   * @param {function|Array} directiveFactory An injectable directive factory function. See\n   *    {@link guide/directive} for more info.\n   * @returns {ng.$compileProvider} Self for chaining.\n   */\n   this.directive = function registerDirective(name, directiveFactory) {\n    assertNotHasOwnProperty(name, 'directive');\n    if (isString(name)) {\n      assertArg(directiveFactory, 'directiveFactory');\n      if (!hasDirectives.hasOwnProperty(name)) {\n        hasDirectives[name] = [];\n        $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',\n          function($injector, $exceptionHandler) {\n            var directives = [];\n            forEach(hasDirectives[name], function(directiveFactory, index) {\n              try {\n                var directive = $injector.invoke(directiveFactory);\n                if (isFunction(directive)) {\n                  directive = { compile: valueFn(directive) };\n                } else if (!directive.compile && directive.link) {\n                  directive.compile = valueFn(directive.link);\n                }\n                directive.priority = directive.priority || 0;\n                directive.index = index;\n                directive.name = directive.name || name;\n                directive.require = directive.require || (directive.controller && directive.name);\n                directive.restrict = directive.restrict || 'A';\n                directives.push(directive);\n              } catch (e) {\n                $exceptionHandler(e);\n              }\n            });\n            return directives;\n          }]);\n      }\n      hasDirectives[name].push(directiveFactory);\n    } else {\n      forEach(name, reverseParams(registerDirective));\n    }\n    return this;\n  };\n\n\n  /**\n   * @ngdoc function\n   * @name ng.$compileProvider#aHrefSanitizationWhitelist\n   * @methodOf ng.$compileProvider\n   * @function\n   *\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during a[href] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.aHrefSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);\n      return this;\n    } else {\n      return $$sanitizeUriProvider.aHrefSanitizationWhitelist();\n    }\n  };\n\n\n  /**\n   * @ngdoc function\n   * @name ng.$compileProvider#imgSrcSanitizationWhitelist\n   * @methodOf ng.$compileProvider\n   * @function\n   *\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during img[src] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.imgSrcSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);\n      return this;\n    } else {\n      return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();\n    }\n  };\n\n  this.$get = [\n            '$injector', '$interpolate', '$exceptionHandler', '$http', '$templateCache', '$parse',\n            '$controller', '$rootScope', '$document', '$sce', '$animate', '$$sanitizeUri',\n    function($injector,   $interpolate,   $exceptionHandler,   $http,   $templateCache,   $parse,\n             $controller,   $rootScope,   $document,   $sce,   $animate,   $$sanitizeUri) {\n\n    var Attributes = function(element, attr) {\n      this.$$element = element;\n      this.$attr = attr || {};\n    };\n\n    Attributes.prototype = {\n      $normalize: directiveNormalize,\n\n\n      /**\n       * @ngdoc function\n       * @name ng.$compile.directive.Attributes#$addClass\n       * @methodOf ng.$compile.directive.Attributes\n       * @function\n       *\n       * @description\n       * Adds the CSS class value specified by the classVal parameter to the element. If animations\n       * are enabled then an animation will be triggered for the class addition.\n       *\n       * @param {string} classVal The className value that will be added to the element\n       */\n      $addClass : function(classVal) {\n        if(classVal && classVal.length > 0) {\n          $animate.addClass(this.$$element, classVal);\n        }\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$compile.directive.Attributes#$removeClass\n       * @methodOf ng.$compile.directive.Attributes\n       * @function\n       *\n       * @description\n       * Removes the CSS class value specified by the classVal parameter from the element. If\n       * animations are enabled then an animation will be triggered for the class removal.\n       *\n       * @param {string} classVal The className value that will be removed from the element\n       */\n      $removeClass : function(classVal) {\n        if(classVal && classVal.length > 0) {\n          $animate.removeClass(this.$$element, classVal);\n        }\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$compile.directive.Attributes#$updateClass\n       * @methodOf ng.$compile.directive.Attributes\n       * @function\n       *\n       * @description\n       * Adds and removes the appropriate CSS class values to the element based on the difference\n       * between the new and old CSS class values (specified as newClasses and oldClasses).\n       *\n       * @param {string} newClasses The current CSS className value\n       * @param {string} oldClasses The former CSS className value\n       */\n      $updateClass : function(newClasses, oldClasses) {\n        this.$removeClass(tokenDifference(oldClasses, newClasses));\n        this.$addClass(tokenDifference(newClasses, oldClasses));\n      },\n\n      /**\n       * Set a normalized attribute on the element in a way such that all directives\n       * can share the attribute. This function properly handles boolean attributes.\n       * @param {string} key Normalized key. (ie ngAttribute)\n       * @param {string|boolean} value The value to set. If `null` attribute will be deleted.\n       * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.\n       *     Defaults to true.\n       * @param {string=} attrName Optional none normalized name. Defaults to key.\n       */\n      $set: function(key, value, writeAttr, attrName) {\n        // TODO: decide whether or not to throw an error if \"class\"\n        //is set through this function since it may cause $updateClass to\n        //become unstable.\n\n        var booleanKey = getBooleanAttrName(this.$$element[0], key),\n            normalizedVal,\n            nodeName;\n\n        if (booleanKey) {\n          this.$$element.prop(key, value);\n          attrName = booleanKey;\n        }\n\n        this[key] = value;\n\n        // translate normalized key to actual key\n        if (attrName) {\n          this.$attr[key] = attrName;\n        } else {\n          attrName = this.$attr[key];\n          if (!attrName) {\n            this.$attr[key] = attrName = snake_case(key, '-');\n          }\n        }\n\n        nodeName = nodeName_(this.$$element);\n\n        // sanitize a[href] and img[src] values\n        if ((nodeName === 'A' && key === 'href') ||\n            (nodeName === 'IMG' && key === 'src')) {\n          this[key] = value = $$sanitizeUri(value, key === 'src');\n        }\n\n        if (writeAttr !== false) {\n          if (value === null || value === undefined) {\n            this.$$element.removeAttr(attrName);\n          } else {\n            this.$$element.attr(attrName, value);\n          }\n        }\n\n        // fire observers\n        var $$observers = this.$$observers;\n        $$observers && forEach($$observers[key], function(fn) {\n          try {\n            fn(value);\n          } catch (e) {\n            $exceptionHandler(e);\n          }\n        });\n      },\n\n\n      /**\n       * @ngdoc function\n       * @name ng.$compile.directive.Attributes#$observe\n       * @methodOf ng.$compile.directive.Attributes\n       * @function\n       *\n       * @description\n       * Observes an interpolated attribute.\n       *\n       * The observer function will be invoked once during the next `$digest` following\n       * compilation. The observer is then invoked whenever the interpolated value\n       * changes.\n       *\n       * @param {string} key Normalized key. (ie ngAttribute) .\n       * @param {function(interpolatedValue)} fn Function that will be called whenever\n                the interpolated value of the attribute changes.\n       *        See the {@link guide/directive#Attributes Directives} guide for more info.\n       * @returns {function()} the `fn` parameter.\n       */\n      $observe: function(key, fn) {\n        var attrs = this,\n            $$observers = (attrs.$$observers || (attrs.$$observers = {})),\n            listeners = ($$observers[key] || ($$observers[key] = []));\n\n        listeners.push(fn);\n        $rootScope.$evalAsync(function() {\n          if (!listeners.$$inter) {\n            // no one registered attribute interpolation function, so lets call it manually\n            fn(attrs[key]);\n          }\n        });\n        return fn;\n      }\n    };\n\n    var startSymbol = $interpolate.startSymbol(),\n        endSymbol = $interpolate.endSymbol(),\n        denormalizeTemplate = (startSymbol == '{{' || endSymbol  == '}}')\n            ? identity\n            : function denormalizeTemplate(template) {\n              return template.replace(/\\{\\{/g, startSymbol).replace(/}}/g, endSymbol);\n        },\n        NG_ATTR_BINDING = /^ngAttr[A-Z]/;\n\n\n    return compile;\n\n    //================================\n\n    function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,\n                        previousCompileContext) {\n      if (!($compileNodes instanceof jqLite)) {\n        // jquery always rewraps, whereas we need to preserve the original selector so that we can\n        // modify it.\n        $compileNodes = jqLite($compileNodes);\n      }\n      // We can not compile top level text elements since text nodes can be merged and we will\n      // not be able to attach scope data to them, so we will wrap them in <span>\n      forEach($compileNodes, function(node, index){\n        if (node.nodeType == 3 /* text node */ && node.nodeValue.match(/\\S+/) /* non-empty */ ) {\n          $compileNodes[index] = node = jqLite(node).wrap('<span></span>').parent()[0];\n        }\n      });\n      var compositeLinkFn =\n              compileNodes($compileNodes, transcludeFn, $compileNodes,\n                           maxPriority, ignoreDirective, previousCompileContext);\n      safeAddClass($compileNodes, 'ng-scope');\n      return function publicLinkFn(scope, cloneConnectFn, transcludeControllers){\n        assertArg(scope, 'scope');\n        // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart\n        // and sometimes changes the structure of the DOM.\n        var $linkNode = cloneConnectFn\n          ? JQLitePrototype.clone.call($compileNodes) // IMPORTANT!!!\n          : $compileNodes;\n\n        forEach(transcludeControllers, function(instance, name) {\n          $linkNode.data('$' + name + 'Controller', instance);\n        });\n\n        // Attach scope only to non-text nodes.\n        for(var i = 0, ii = $linkNode.length; i<ii; i++) {\n          var node = $linkNode[i],\n              nodeType = node.nodeType;\n          if (nodeType === 1 /* element */ || nodeType === 9 /* document */) {\n            $linkNode.eq(i).data('$scope', scope);\n          }\n        }\n\n        if (cloneConnectFn) cloneConnectFn($linkNode, scope);\n        if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode);\n        return $linkNode;\n      };\n    }\n\n    function safeAddClass($element, className) {\n      try {\n        $element.addClass(className);\n      } catch(e) {\n        // ignore, since it means that we are trying to set class on\n        // SVG element, where class name is read-only.\n      }\n    }\n\n    /**\n     * Compile function matches each node in nodeList against the directives. Once all directives\n     * for a particular node are collected their compile functions are executed. The compile\n     * functions return values - the linking functions - are combined into a composite linking\n     * function, which is the a linking function for the node.\n     *\n     * @param {NodeList} nodeList an array of nodes or NodeList to compile\n     * @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the\n     *        scope argument is auto-generated to the new child of the transcluded parent scope.\n     * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then\n     *        the rootElement must be set the jqLite collection of the compile root. This is\n     *        needed so that the jqLite collection items can be replaced with widgets.\n     * @param {number=} maxPriority Max directive priority.\n     * @returns {?function} A composite linking function of all of the matched directives or null.\n     */\n    function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,\n                            previousCompileContext) {\n      var linkFns = [],\n          attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound;\n\n      for (var i = 0; i < nodeList.length; i++) {\n        attrs = new Attributes();\n\n        // we must always refer to nodeList[i] since the nodes can be replaced underneath us.\n        directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,\n                                        ignoreDirective);\n\n        nodeLinkFn = (directives.length)\n            ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,\n                                      null, [], [], previousCompileContext)\n            : null;\n\n        if (nodeLinkFn && nodeLinkFn.scope) {\n          safeAddClass(jqLite(nodeList[i]), 'ng-scope');\n        }\n\n        childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||\n                      !(childNodes = nodeList[i].childNodes) ||\n                      !childNodes.length)\n            ? null\n            : compileNodes(childNodes,\n                 nodeLinkFn ? nodeLinkFn.transclude : transcludeFn);\n\n        linkFns.push(nodeLinkFn, childLinkFn);\n        linkFnFound = linkFnFound || nodeLinkFn || childLinkFn;\n        //use the previous context only for the first element in the virtual group\n        previousCompileContext = null;\n      }\n\n      // return a linking function if we have found anything, null otherwise\n      return linkFnFound ? compositeLinkFn : null;\n\n      function compositeLinkFn(scope, nodeList, $rootElement, boundTranscludeFn) {\n        var nodeLinkFn, childLinkFn, node, $node, childScope, childTranscludeFn, i, ii, n;\n\n        // copy nodeList so that linking doesn't break due to live list updates.\n        var nodeListLength = nodeList.length,\n            stableNodeList = new Array(nodeListLength);\n        for (i = 0; i < nodeListLength; i++) {\n          stableNodeList[i] = nodeList[i];\n        }\n\n        for(i = 0, n = 0, ii = linkFns.length; i < ii; n++) {\n          node = stableNodeList[n];\n          nodeLinkFn = linkFns[i++];\n          childLinkFn = linkFns[i++];\n          $node = jqLite(node);\n\n          if (nodeLinkFn) {\n            if (nodeLinkFn.scope) {\n              childScope = scope.$new();\n              $node.data('$scope', childScope);\n            } else {\n              childScope = scope;\n            }\n            childTranscludeFn = nodeLinkFn.transclude;\n            if (childTranscludeFn || (!boundTranscludeFn && transcludeFn)) {\n              nodeLinkFn(childLinkFn, childScope, node, $rootElement,\n                createBoundTranscludeFn(scope, childTranscludeFn || transcludeFn)\n              );\n            } else {\n              nodeLinkFn(childLinkFn, childScope, node, $rootElement, boundTranscludeFn);\n            }\n          } else if (childLinkFn) {\n            childLinkFn(scope, node.childNodes, undefined, boundTranscludeFn);\n          }\n        }\n      }\n    }\n\n    function createBoundTranscludeFn(scope, transcludeFn) {\n      return function boundTranscludeFn(transcludedScope, cloneFn, controllers) {\n        var scopeCreated = false;\n\n        if (!transcludedScope) {\n          transcludedScope = scope.$new();\n          transcludedScope.$$transcluded = true;\n          scopeCreated = true;\n        }\n\n        var clone = transcludeFn(transcludedScope, cloneFn, controllers);\n        if (scopeCreated) {\n          clone.on('$destroy', bind(transcludedScope, transcludedScope.$destroy));\n        }\n        return clone;\n      };\n    }\n\n    /**\n     * Looks for directives on the given node and adds them to the directive collection which is\n     * sorted.\n     *\n     * @param node Node to search.\n     * @param directives An array to which the directives are added to. This array is sorted before\n     *        the function returns.\n     * @param attrs The shared attrs object which is used to populate the normalized attributes.\n     * @param {number=} maxPriority Max directive priority.\n     */\n    function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {\n      var nodeType = node.nodeType,\n          attrsMap = attrs.$attr,\n          match,\n          className;\n\n      switch(nodeType) {\n        case 1: /* Element */\n          // use the node name: <directive>\n          addDirective(directives,\n              directiveNormalize(nodeName_(node).toLowerCase()), 'E', maxPriority, ignoreDirective);\n\n          // iterate over the attributes\n          for (var attr, name, nName, ngAttrName, value, nAttrs = node.attributes,\n                   j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {\n            var attrStartName = false;\n            var attrEndName = false;\n\n            attr = nAttrs[j];\n            if (!msie || msie >= 8 || attr.specified) {\n              name = attr.name;\n              // support ngAttr attribute binding\n              ngAttrName = directiveNormalize(name);\n              if (NG_ATTR_BINDING.test(ngAttrName)) {\n                name = snake_case(ngAttrName.substr(6), '-');\n              }\n\n              var directiveNName = ngAttrName.replace(/(Start|End)$/, '');\n              if (ngAttrName === directiveNName + 'Start') {\n                attrStartName = name;\n                attrEndName = name.substr(0, name.length - 5) + 'end';\n                name = name.substr(0, name.length - 6);\n              }\n\n              nName = directiveNormalize(name.toLowerCase());\n              attrsMap[nName] = name;\n              attrs[nName] = value = trim(attr.value);\n              if (getBooleanAttrName(node, nName)) {\n                attrs[nName] = true; // presence means true\n              }\n              addAttrInterpolateDirective(node, directives, value, nName);\n              addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,\n                            attrEndName);\n            }\n          }\n\n          // use class as directive\n          className = node.className;\n          if (isString(className) && className !== '') {\n            while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {\n              nName = directiveNormalize(match[2]);\n              if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {\n                attrs[nName] = trim(match[3]);\n              }\n              className = className.substr(match.index + match[0].length);\n            }\n          }\n          break;\n        case 3: /* Text Node */\n          addTextInterpolateDirective(directives, node.nodeValue);\n          break;\n        case 8: /* Comment */\n          try {\n            match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);\n            if (match) {\n              nName = directiveNormalize(match[1]);\n              if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {\n                attrs[nName] = trim(match[2]);\n              }\n            }\n          } catch (e) {\n            // turns out that under some circumstances IE9 throws errors when one attempts to read\n            // comment's node value.\n            // Just ignore it and continue. (Can't seem to reproduce in test case.)\n          }\n          break;\n      }\n\n      directives.sort(byPriority);\n      return directives;\n    }\n\n    /**\n     * Given a node with an directive-start it collects all of the siblings until it finds\n     * directive-end.\n     * @param node\n     * @param attrStart\n     * @param attrEnd\n     * @returns {*}\n     */\n    function groupScan(node, attrStart, attrEnd) {\n      var nodes = [];\n      var depth = 0;\n      if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {\n        var startNode = node;\n        do {\n          if (!node) {\n            throw $compileMinErr('uterdir',\n                      \"Unterminated attribute, found '{0}' but no matching '{1}' found.\",\n                      attrStart, attrEnd);\n          }\n          if (node.nodeType == 1 /** Element **/) {\n            if (node.hasAttribute(attrStart)) depth++;\n            if (node.hasAttribute(attrEnd)) depth--;\n          }\n          nodes.push(node);\n          node = node.nextSibling;\n        } while (depth > 0);\n      } else {\n        nodes.push(node);\n      }\n\n      return jqLite(nodes);\n    }\n\n    /**\n     * Wrapper for linking function which converts normal linking function into a grouped\n     * linking function.\n     * @param linkFn\n     * @param attrStart\n     * @param attrEnd\n     * @returns {Function}\n     */\n    function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {\n      return function(scope, element, attrs, controllers, transcludeFn) {\n        element = groupScan(element[0], attrStart, attrEnd);\n        return linkFn(scope, element, attrs, controllers, transcludeFn);\n      };\n    }\n\n    /**\n     * Once the directives have been collected, their compile functions are executed. This method\n     * is responsible for inlining directive templates as well as terminating the application\n     * of the directives if the terminal directive has been reached.\n     *\n     * @param {Array} directives Array of collected directives to execute their compile function.\n     *        this needs to be pre-sorted by priority order.\n     * @param {Node} compileNode The raw DOM node to apply the compile functions to\n     * @param {Object} templateAttrs The shared attribute function\n     * @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the\n     *                                                  scope argument is auto-generated to the new\n     *                                                  child of the transcluded parent scope.\n     * @param {JQLite} jqCollection If we are working on the root of the compile tree then this\n     *                              argument has the root jqLite array so that we can replace nodes\n     *                              on it.\n     * @param {Object=} originalReplaceDirective An optional directive that will be ignored when\n     *                                           compiling the transclusion.\n     * @param {Array.<Function>} preLinkFns\n     * @param {Array.<Function>} postLinkFns\n     * @param {Object} previousCompileContext Context used for previous compilation of the current\n     *                                        node\n     * @returns linkFn\n     */\n    function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,\n                                   jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,\n                                   previousCompileContext) {\n      previousCompileContext = previousCompileContext || {};\n\n      var terminalPriority = -Number.MAX_VALUE,\n          newScopeDirective,\n          controllerDirectives = previousCompileContext.controllerDirectives,\n          newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,\n          templateDirective = previousCompileContext.templateDirective,\n          nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,\n          hasTranscludeDirective = false,\n          hasElementTranscludeDirective = false,\n          $compileNode = templateAttrs.$$element = jqLite(compileNode),\n          directive,\n          directiveName,\n          $template,\n          replaceDirective = originalReplaceDirective,\n          childTranscludeFn = transcludeFn,\n          linkFn,\n          directiveValue;\n\n      // executes all directives on the current element\n      for(var i = 0, ii = directives.length; i < ii; i++) {\n        directive = directives[i];\n        var attrStart = directive.$$start;\n        var attrEnd = directive.$$end;\n\n        // collect multiblock sections\n        if (attrStart) {\n          $compileNode = groupScan(compileNode, attrStart, attrEnd);\n        }\n        $template = undefined;\n\n        if (terminalPriority > directive.priority) {\n          break; // prevent further processing of directives\n        }\n\n        if (directiveValue = directive.scope) {\n          newScopeDirective = newScopeDirective || directive;\n\n          // skip the check for directives with async templates, we'll check the derived sync\n          // directive when the template arrives\n          if (!directive.templateUrl) {\n            assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,\n                              $compileNode);\n            if (isObject(directiveValue)) {\n              newIsolateScopeDirective = directive;\n            }\n          }\n        }\n\n        directiveName = directive.name;\n\n        if (!directive.templateUrl && directive.controller) {\n          directiveValue = directive.controller;\n          controllerDirectives = controllerDirectives || {};\n          assertNoDuplicate(\"'\" + directiveName + \"' controller\",\n              controllerDirectives[directiveName], directive, $compileNode);\n          controllerDirectives[directiveName] = directive;\n        }\n\n        if (directiveValue = directive.transclude) {\n          hasTranscludeDirective = true;\n\n          // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.\n          // This option should only be used by directives that know how to safely handle element transclusion,\n          // where the transcluded nodes are added or replaced after linking.\n          if (!directive.$$tlb) {\n            assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);\n            nonTlbTranscludeDirective = directive;\n          }\n\n          if (directiveValue == 'element') {\n            hasElementTranscludeDirective = true;\n            terminalPriority = directive.priority;\n            $template = groupScan(compileNode, attrStart, attrEnd);\n            $compileNode = templateAttrs.$$element =\n                jqLite(document.createComment(' ' + directiveName + ': ' +\n                                              templateAttrs[directiveName] + ' '));\n            compileNode = $compileNode[0];\n            replaceWith(jqCollection, jqLite(sliceArgs($template)), compileNode);\n\n            childTranscludeFn = compile($template, transcludeFn, terminalPriority,\n                                        replaceDirective && replaceDirective.name, {\n                                          // Don't pass in:\n                                          // - controllerDirectives - otherwise we'll create duplicates controllers\n                                          // - newIsolateScopeDirective or templateDirective - combining templates with\n                                          //   element transclusion doesn't make sense.\n                                          //\n                                          // We need only nonTlbTranscludeDirective so that we prevent putting transclusion\n                                          // on the same element more than once.\n                                          nonTlbTranscludeDirective: nonTlbTranscludeDirective\n                                        });\n          } else {\n            $template = jqLite(jqLiteClone(compileNode)).contents();\n            $compileNode.empty(); // clear contents\n            childTranscludeFn = compile($template, transcludeFn);\n          }\n        }\n\n        if (directive.template) {\n          assertNoDuplicate('template', templateDirective, directive, $compileNode);\n          templateDirective = directive;\n\n          directiveValue = (isFunction(directive.template))\n              ? directive.template($compileNode, templateAttrs)\n              : directive.template;\n\n          directiveValue = denormalizeTemplate(directiveValue);\n\n          if (directive.replace) {\n            replaceDirective = directive;\n            $template = jqLite('<div>' +\n                                 trim(directiveValue) +\n                               '</div>').contents();\n            compileNode = $template[0];\n\n            if ($template.length != 1 || compileNode.nodeType !== 1) {\n              throw $compileMinErr('tplrt',\n                  \"Template for directive '{0}' must have exactly one root element. {1}\",\n                  directiveName, '');\n            }\n\n            replaceWith(jqCollection, $compileNode, compileNode);\n\n            var newTemplateAttrs = {$attr: {}};\n\n            // combine directives from the original node and from the template:\n            // - take the array of directives for this element\n            // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)\n            // - collect directives from the template and sort them by priority\n            // - combine directives as: processed + template + unprocessed\n            var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);\n            var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));\n\n            if (newIsolateScopeDirective) {\n              markDirectivesAsIsolate(templateDirectives);\n            }\n            directives = directives.concat(templateDirectives).concat(unprocessedDirectives);\n            mergeTemplateAttributes(templateAttrs, newTemplateAttrs);\n\n            ii = directives.length;\n          } else {\n            $compileNode.html(directiveValue);\n          }\n        }\n\n        if (directive.templateUrl) {\n          assertNoDuplicate('template', templateDirective, directive, $compileNode);\n          templateDirective = directive;\n\n          if (directive.replace) {\n            replaceDirective = directive;\n          }\n\n          nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,\n              templateAttrs, jqCollection, childTranscludeFn, preLinkFns, postLinkFns, {\n                controllerDirectives: controllerDirectives,\n                newIsolateScopeDirective: newIsolateScopeDirective,\n                templateDirective: templateDirective,\n                nonTlbTranscludeDirective: nonTlbTranscludeDirective\n              });\n          ii = directives.length;\n        } else if (directive.compile) {\n          try {\n            linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);\n            if (isFunction(linkFn)) {\n              addLinkFns(null, linkFn, attrStart, attrEnd);\n            } else if (linkFn) {\n              addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd);\n            }\n          } catch (e) {\n            $exceptionHandler(e, startingTag($compileNode));\n          }\n        }\n\n        if (directive.terminal) {\n          nodeLinkFn.terminal = true;\n          terminalPriority = Math.max(terminalPriority, directive.priority);\n        }\n\n      }\n\n      nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;\n      nodeLinkFn.transclude = hasTranscludeDirective && childTranscludeFn;\n\n      // might be normal or delayed nodeLinkFn depending on if templateUrl is present\n      return nodeLinkFn;\n\n      ////////////////////\n\n      function addLinkFns(pre, post, attrStart, attrEnd) {\n        if (pre) {\n          if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);\n          pre.require = directive.require;\n          if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n            pre = cloneAndAnnotateFn(pre, {isolateScope: true});\n          }\n          preLinkFns.push(pre);\n        }\n        if (post) {\n          if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);\n          post.require = directive.require;\n          if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n            post = cloneAndAnnotateFn(post, {isolateScope: true});\n          }\n          postLinkFns.push(post);\n        }\n      }\n\n\n      function getControllers(require, $element, elementControllers) {\n        var value, retrievalMethod = 'data', optional = false;\n        if (isString(require)) {\n          while((value = require.charAt(0)) == '^' || value == '?') {\n            require = require.substr(1);\n            if (value == '^') {\n              retrievalMethod = 'inheritedData';\n            }\n            optional = optional || value == '?';\n          }\n          value = null;\n\n          if (elementControllers && retrievalMethod === 'data') {\n            value = elementControllers[require];\n          }\n          value = value || $element[retrievalMethod]('$' + require + 'Controller');\n\n          if (!value && !optional) {\n            throw $compileMinErr('ctreq',\n                \"Controller '{0}', required by directive '{1}', can't be found!\",\n                require, directiveName);\n          }\n          return value;\n        } else if (isArray(require)) {\n          value = [];\n          forEach(require, function(require) {\n            value.push(getControllers(require, $element, elementControllers));\n          });\n        }\n        return value;\n      }\n\n\n      function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {\n        var attrs, $element, i, ii, linkFn, controller, isolateScope, elementControllers = {}, transcludeFn;\n\n        if (compileNode === linkNode) {\n          attrs = templateAttrs;\n        } else {\n          attrs = shallowCopy(templateAttrs, new Attributes(jqLite(linkNode), templateAttrs.$attr));\n        }\n        $element = attrs.$$element;\n\n        if (newIsolateScopeDirective) {\n          var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n          var $linkNode = jqLite(linkNode);\n\n          isolateScope = scope.$new(true);\n\n          if (templateDirective && (templateDirective === newIsolateScopeDirective.$$originalDirective)) {\n            $linkNode.data('$isolateScope', isolateScope) ;\n          } else {\n            $linkNode.data('$isolateScopeNoTemplate', isolateScope);\n          }\n\n\n\n          safeAddClass($linkNode, 'ng-isolate-scope');\n\n          forEach(newIsolateScopeDirective.scope, function(definition, scopeName) {\n            var match = definition.match(LOCAL_REGEXP) || [],\n                attrName = match[3] || scopeName,\n                optional = (match[2] == '?'),\n                mode = match[1], // @, =, or &\n                lastValue,\n                parentGet, parentSet, compare;\n\n            isolateScope.$$isolateBindings[scopeName] = mode + attrName;\n\n            switch (mode) {\n\n              case '@':\n                attrs.$observe(attrName, function(value) {\n                  isolateScope[scopeName] = value;\n                });\n                attrs.$$observers[attrName].$$scope = scope;\n                if( attrs[attrName] ) {\n                  // If the attribute has been provided then we trigger an interpolation to ensure\n                  // the value is there for use in the link fn\n                  isolateScope[scopeName] = $interpolate(attrs[attrName])(scope);\n                }\n                break;\n\n              case '=':\n                if (optional && !attrs[attrName]) {\n                  return;\n                }\n                parentGet = $parse(attrs[attrName]);\n                if (parentGet.literal) {\n                  compare = equals;\n                } else {\n                  compare = function(a,b) { return a === b; };\n                }\n                parentSet = parentGet.assign || function() {\n                  // reset the change, or we will throw this exception on every $digest\n                  lastValue = isolateScope[scopeName] = parentGet(scope);\n                  throw $compileMinErr('nonassign',\n                      \"Expression '{0}' used with directive '{1}' is non-assignable!\",\n                      attrs[attrName], newIsolateScopeDirective.name);\n                };\n                lastValue = isolateScope[scopeName] = parentGet(scope);\n                isolateScope.$watch(function parentValueWatch() {\n                  var parentValue = parentGet(scope);\n                  if (!compare(parentValue, isolateScope[scopeName])) {\n                    // we are out of sync and need to copy\n                    if (!compare(parentValue, lastValue)) {\n                      // parent changed and it has precedence\n                      isolateScope[scopeName] = parentValue;\n                    } else {\n                      // if the parent can be assigned then do so\n                      parentSet(scope, parentValue = isolateScope[scopeName]);\n                    }\n                  }\n                  return lastValue = parentValue;\n                }, null, parentGet.literal);\n                break;\n\n              case '&':\n                parentGet = $parse(attrs[attrName]);\n                isolateScope[scopeName] = function(locals) {\n                  return parentGet(scope, locals);\n                };\n                break;\n\n              default:\n                throw $compileMinErr('iscp',\n                    \"Invalid isolate scope definition for directive '{0}'.\" +\n                    \" Definition: {... {1}: '{2}' ...}\",\n                    newIsolateScopeDirective.name, scopeName, definition);\n            }\n          });\n        }\n        transcludeFn = boundTranscludeFn && controllersBoundTransclude;\n        if (controllerDirectives) {\n          forEach(controllerDirectives, function(directive) {\n            var locals = {\n              $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,\n              $element: $element,\n              $attrs: attrs,\n              $transclude: transcludeFn\n            }, controllerInstance;\n\n            controller = directive.controller;\n            if (controller == '@') {\n              controller = attrs[directive.name];\n            }\n\n            controllerInstance = $controller(controller, locals);\n            // For directives with element transclusion the element is a comment,\n            // but jQuery .data doesn't support attaching data to comment nodes as it's hard to\n            // clean up (http://bugs.jquery.com/ticket/8335).\n            // Instead, we save the controllers for the element in a local hash and attach to .data\n            // later, once we have the actual element.\n            elementControllers[directive.name] = controllerInstance;\n            if (!hasElementTranscludeDirective) {\n              $element.data('$' + directive.name + 'Controller', controllerInstance);\n            }\n\n            if (directive.controllerAs) {\n              locals.$scope[directive.controllerAs] = controllerInstance;\n            }\n          });\n        }\n\n        // PRELINKING\n        for(i = 0, ii = preLinkFns.length; i < ii; i++) {\n          try {\n            linkFn = preLinkFns[i];\n            linkFn(linkFn.isolateScope ? isolateScope : scope, $element, attrs,\n                linkFn.require && getControllers(linkFn.require, $element, elementControllers), transcludeFn);\n          } catch (e) {\n            $exceptionHandler(e, startingTag($element));\n          }\n        }\n\n        // RECURSION\n        // We only pass the isolate scope, if the isolate directive has a template,\n        // otherwise the child elements do not belong to the isolate directive.\n        var scopeToChild = scope;\n        if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {\n          scopeToChild = isolateScope;\n        }\n        childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);\n\n        // POSTLINKING\n        for(i = postLinkFns.length - 1; i >= 0; i--) {\n          try {\n            linkFn = postLinkFns[i];\n            linkFn(linkFn.isolateScope ? isolateScope : scope, $element, attrs,\n                linkFn.require && getControllers(linkFn.require, $element, elementControllers), transcludeFn);\n          } catch (e) {\n            $exceptionHandler(e, startingTag($element));\n          }\n        }\n\n        // This is the function that is injected as `$transclude`.\n        function controllersBoundTransclude(scope, cloneAttachFn) {\n          var transcludeControllers;\n\n          // no scope passed\n          if (arguments.length < 2) {\n            cloneAttachFn = scope;\n            scope = undefined;\n          }\n\n          if (hasElementTranscludeDirective) {\n            transcludeControllers = elementControllers;\n          }\n\n          return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers);\n        }\n      }\n    }\n\n    function markDirectivesAsIsolate(directives) {\n      // mark all directives as needing isolate scope.\n      for (var j = 0, jj = directives.length; j < jj; j++) {\n        directives[j] = inherit(directives[j], {$$isolateScope: true});\n      }\n    }\n\n    /**\n     * looks up the directive and decorates it with exception handling and proper parameters. We\n     * call this the boundDirective.\n     *\n     * @param {string} name name of the directive to look up.\n     * @param {string} location The directive must be found in specific format.\n     *   String containing any of theses characters:\n     *\n     *   * `E`: element name\n     *   * `A': attribute\n     *   * `C`: class\n     *   * `M`: comment\n     * @returns true if directive was added.\n     */\n    function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,\n                          endAttrName) {\n      if (name === ignoreDirective) return null;\n      var match = null;\n      if (hasDirectives.hasOwnProperty(name)) {\n        for(var directive, directives = $injector.get(name + Suffix),\n            i = 0, ii = directives.length; i<ii; i++) {\n          try {\n            directive = directives[i];\n            if ( (maxPriority === undefined || maxPriority > directive.priority) &&\n                 directive.restrict.indexOf(location) != -1) {\n              if (startAttrName) {\n                directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});\n              }\n              tDirectives.push(directive);\n              match = directive;\n            }\n          } catch(e) { $exceptionHandler(e); }\n        }\n      }\n      return match;\n    }\n\n\n    /**\n     * When the element is replaced with HTML template then the new attributes\n     * on the template need to be merged with the existing attributes in the DOM.\n     * The desired effect is to have both of the attributes present.\n     *\n     * @param {object} dst destination attributes (original DOM)\n     * @param {object} src source attributes (from the directive template)\n     */\n    function mergeTemplateAttributes(dst, src) {\n      var srcAttr = src.$attr,\n          dstAttr = dst.$attr,\n          $element = dst.$$element;\n\n      // reapply the old attributes to the new element\n      forEach(dst, function(value, key) {\n        if (key.charAt(0) != '$') {\n          if (src[key]) {\n            value += (key === 'style' ? ';' : ' ') + src[key];\n          }\n          dst.$set(key, value, true, srcAttr[key]);\n        }\n      });\n\n      // copy the new attributes on the old attrs object\n      forEach(src, function(value, key) {\n        if (key == 'class') {\n          safeAddClass($element, value);\n          dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;\n        } else if (key == 'style') {\n          $element.attr('style', $element.attr('style') + ';' + value);\n          dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value;\n          // `dst` will never contain hasOwnProperty as DOM parser won't let it.\n          // You will get an \"InvalidCharacterError: DOM Exception 5\" error if you\n          // have an attribute like \"has-own-property\" or \"data-has-own-property\", etc.\n        } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {\n          dst[key] = value;\n          dstAttr[key] = srcAttr[key];\n        }\n      });\n    }\n\n\n    function compileTemplateUrl(directives, $compileNode, tAttrs,\n        $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {\n      var linkQueue = [],\n          afterTemplateNodeLinkFn,\n          afterTemplateChildLinkFn,\n          beforeTemplateCompileNode = $compileNode[0],\n          origAsyncDirective = directives.shift(),\n          // The fact that we have to copy and patch the directive seems wrong!\n          derivedSyncDirective = extend({}, origAsyncDirective, {\n            templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective\n          }),\n          templateUrl = (isFunction(origAsyncDirective.templateUrl))\n              ? origAsyncDirective.templateUrl($compileNode, tAttrs)\n              : origAsyncDirective.templateUrl;\n\n      $compileNode.empty();\n\n      $http.get($sce.getTrustedResourceUrl(templateUrl), {cache: $templateCache}).\n        success(function(content) {\n          var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn;\n\n          content = denormalizeTemplate(content);\n\n          if (origAsyncDirective.replace) {\n            $template = jqLite('<div>' + trim(content) + '</div>').contents();\n            compileNode = $template[0];\n\n            if ($template.length != 1 || compileNode.nodeType !== 1) {\n              throw $compileMinErr('tplrt',\n                  \"Template for directive '{0}' must have exactly one root element. {1}\",\n                  origAsyncDirective.name, templateUrl);\n            }\n\n            tempTemplateAttrs = {$attr: {}};\n            replaceWith($rootElement, $compileNode, compileNode);\n            var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs);\n\n            if (isObject(origAsyncDirective.scope)) {\n              markDirectivesAsIsolate(templateDirectives);\n            }\n            directives = templateDirectives.concat(directives);\n            mergeTemplateAttributes(tAttrs, tempTemplateAttrs);\n          } else {\n            compileNode = beforeTemplateCompileNode;\n            $compileNode.html(content);\n          }\n\n          directives.unshift(derivedSyncDirective);\n\n          afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs,\n              childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns,\n              previousCompileContext);\n          forEach($rootElement, function(node, i) {\n            if (node == compileNode) {\n              $rootElement[i] = $compileNode[0];\n            }\n          });\n          afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn);\n\n\n          while(linkQueue.length) {\n            var scope = linkQueue.shift(),\n                beforeTemplateLinkNode = linkQueue.shift(),\n                linkRootElement = linkQueue.shift(),\n                boundTranscludeFn = linkQueue.shift(),\n                linkNode = $compileNode[0];\n\n            if (beforeTemplateLinkNode !== beforeTemplateCompileNode) {\n              var oldClasses = beforeTemplateLinkNode.className;\n              // it was cloned therefore we have to clone as well.\n              linkNode = jqLiteClone(compileNode);\n              replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode);\n\n              // Copy in CSS classes from original node\n              safeAddClass(jqLite(linkNode), oldClasses);\n            }\n            if (afterTemplateNodeLinkFn.transclude) {\n              childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude);\n            } else {\n              childBoundTranscludeFn = boundTranscludeFn;\n            }\n            afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement,\n              childBoundTranscludeFn);\n          }\n          linkQueue = null;\n        }).\n        error(function(response, code, headers, config) {\n          throw $compileMinErr('tpload', 'Failed to load template: {0}', config.url);\n        });\n\n      return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) {\n        if (linkQueue) {\n          linkQueue.push(scope);\n          linkQueue.push(node);\n          linkQueue.push(rootElement);\n          linkQueue.push(boundTranscludeFn);\n        } else {\n          afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, boundTranscludeFn);\n        }\n      };\n    }\n\n\n    /**\n     * Sorting function for bound directives.\n     */\n    function byPriority(a, b) {\n      var diff = b.priority - a.priority;\n      if (diff !== 0) return diff;\n      if (a.name !== b.name) return (a.name < b.name) ? -1 : 1;\n      return a.index - b.index;\n    }\n\n\n    function assertNoDuplicate(what, previousDirective, directive, element) {\n      if (previousDirective) {\n        throw $compileMinErr('multidir', 'Multiple directives [{0}, {1}] asking for {2} on: {3}',\n            previousDirective.name, directive.name, what, startingTag(element));\n      }\n    }\n\n\n    function addTextInterpolateDirective(directives, text) {\n      var interpolateFn = $interpolate(text, true);\n      if (interpolateFn) {\n        directives.push({\n          priority: 0,\n          compile: valueFn(function textInterpolateLinkFn(scope, node) {\n            var parent = node.parent(),\n                bindings = parent.data('$binding') || [];\n            bindings.push(interpolateFn);\n            safeAddClass(parent.data('$binding', bindings), 'ng-binding');\n            scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {\n              node[0].nodeValue = value;\n            });\n          })\n        });\n      }\n    }\n\n\n    function getTrustedContext(node, attrNormalizedName) {\n      if (attrNormalizedName == \"srcdoc\") {\n        return $sce.HTML;\n      }\n      var tag = nodeName_(node);\n      // maction[xlink:href] can source SVG.  It's not limited to <maction>.\n      if (attrNormalizedName == \"xlinkHref\" ||\n          (tag == \"FORM\" && attrNormalizedName == \"action\") ||\n          (tag != \"IMG\" && (attrNormalizedName == \"src\" ||\n                            attrNormalizedName == \"ngSrc\"))) {\n        return $sce.RESOURCE_URL;\n      }\n    }\n\n\n    function addAttrInterpolateDirective(node, directives, value, name) {\n      var interpolateFn = $interpolate(value, true);\n\n      // no interpolation found -> ignore\n      if (!interpolateFn) return;\n\n\n      if (name === \"multiple\" && nodeName_(node) === \"SELECT\") {\n        throw $compileMinErr(\"selmulti\",\n            \"Binding to the 'multiple' attribute is not supported. Element: {0}\",\n            startingTag(node));\n      }\n\n      directives.push({\n        priority: 100,\n        compile: function() {\n            return {\n              pre: function attrInterpolatePreLinkFn(scope, element, attr) {\n                var $$observers = (attr.$$observers || (attr.$$observers = {}));\n\n                if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {\n                  throw $compileMinErr('nodomevents',\n                      \"Interpolations for HTML DOM event attributes are disallowed.  Please use the \" +\n                          \"ng- versions (such as ng-click instead of onclick) instead.\");\n                }\n\n                // we need to interpolate again, in case the attribute value has been updated\n                // (e.g. by another directive's compile function)\n                interpolateFn = $interpolate(attr[name], true, getTrustedContext(node, name));\n\n                // if attribute was updated so that there is no interpolation going on we don't want to\n                // register any observers\n                if (!interpolateFn) return;\n\n                // TODO(i): this should likely be attr.$set(name, iterpolateFn(scope) so that we reset the\n                // actual attr value\n                attr[name] = interpolateFn(scope);\n                ($$observers[name] || ($$observers[name] = [])).$$inter = true;\n                (attr.$$observers && attr.$$observers[name].$$scope || scope).\n                  $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {\n                    //special case for class attribute addition + removal\n                    //so that class changes can tap into the animation\n                    //hooks provided by the $animate service. Be sure to\n                    //skip animations when the first digest occurs (when\n                    //both the new and the old values are the same) since\n                    //the CSS classes are the non-interpolated values\n                    if(name === 'class' && newValue != oldValue) {\n                      attr.$updateClass(newValue, oldValue);\n                    } else {\n                      attr.$set(name, newValue);\n                    }\n                  });\n              }\n            };\n          }\n      });\n    }\n\n\n    /**\n     * This is a special jqLite.replaceWith, which can replace items which\n     * have no parents, provided that the containing jqLite collection is provided.\n     *\n     * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes\n     *                               in the root of the tree.\n     * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep\n     *                                  the shell, but replace its DOM node reference.\n     * @param {Node} newNode The new DOM node.\n     */\n    function replaceWith($rootElement, elementsToRemove, newNode) {\n      var firstElementToRemove = elementsToRemove[0],\n          removeCount = elementsToRemove.length,\n          parent = firstElementToRemove.parentNode,\n          i, ii;\n\n      if ($rootElement) {\n        for(i = 0, ii = $rootElement.length; i < ii; i++) {\n          if ($rootElement[i] == firstElementToRemove) {\n            $rootElement[i++] = newNode;\n            for (var j = i, j2 = j + removeCount - 1,\n                     jj = $rootElement.length;\n                 j < jj; j++, j2++) {\n              if (j2 < jj) {\n                $rootElement[j] = $rootElement[j2];\n              } else {\n                delete $rootElement[j];\n              }\n            }\n            $rootElement.length -= removeCount - 1;\n            break;\n          }\n        }\n      }\n\n      if (parent) {\n        parent.replaceChild(newNode, firstElementToRemove);\n      }\n      var fragment = document.createDocumentFragment();\n      fragment.appendChild(firstElementToRemove);\n      newNode[jqLite.expando] = firstElementToRemove[jqLite.expando];\n      for (var k = 1, kk = elementsToRemove.length; k < kk; k++) {\n        var element = elementsToRemove[k];\n        jqLite(element).remove(); // must do this way to clean up expando\n        fragment.appendChild(element);\n        delete elementsToRemove[k];\n      }\n\n      elementsToRemove[0] = newNode;\n      elementsToRemove.length = 1;\n    }\n\n\n    function cloneAndAnnotateFn(fn, annotation) {\n      return extend(function() { return fn.apply(null, arguments); }, fn, annotation);\n    }\n  }];\n}\n\nvar PREFIX_REGEXP = /^(x[\\:\\-_]|data[\\:\\-_])/i;\n/**\n * Converts all accepted directives format into proper directive name.\n * All of these will become 'myDirective':\n *   my:Directive\n *   my-directive\n *   x-my-directive\n *   data-my:directive\n *\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction directiveNormalize(name) {\n  return camelCase(name.replace(PREFIX_REGEXP, ''));\n}\n\n/**\n * @ngdoc object\n * @name ng.$compile.directive.Attributes\n *\n * @description\n * A shared object between directive compile / linking functions which contains normalized DOM\n * element attributes. The values reflect current binding state `{{ }}`. The normalization is\n * needed since all of these are treated as equivalent in Angular:\n *\n *    <span ng:bind=\"a\" ng-bind=\"a\" data-ng-bind=\"a\" x-ng-bind=\"a\">\n */\n\n/**\n * @ngdoc property\n * @name ng.$compile.directive.Attributes#$attr\n * @propertyOf ng.$compile.directive.Attributes\n * @returns {object} A map of DOM element attribute names to the normalized name. This is\n *                   needed to do reverse lookup from normalized name back to actual name.\n */\n\n\n/**\n * @ngdoc function\n * @name ng.$compile.directive.Attributes#$set\n * @methodOf ng.$compile.directive.Attributes\n * @function\n *\n * @description\n * Set DOM element attribute value.\n *\n *\n * @param {string} name Normalized element attribute name of the property to modify. The name is\n *          reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}\n *          property to the original name.\n * @param {string} value Value to set the attribute to. The value can be an interpolated string.\n */\n\n\n\n/**\n * Closure compiler type information\n */\n\nfunction nodesetLinkingFn(\n  /* angular.Scope */ scope,\n  /* NodeList */ nodeList,\n  /* Element */ rootElement,\n  /* function(Function) */ boundTranscludeFn\n){}\n\nfunction directiveLinkingFn(\n  /* nodesetLinkingFn */ nodesetLinkingFn,\n  /* angular.Scope */ scope,\n  /* Node */ node,\n  /* Element */ rootElement,\n  /* function(Function) */ boundTranscludeFn\n){}\n\nfunction tokenDifference(str1, str2) {\n  var values = '',\n      tokens1 = str1.split(/\\s+/),\n      tokens2 = str2.split(/\\s+/);\n\n  outer:\n  for(var i = 0; i < tokens1.length; i++) {\n    var token = tokens1[i];\n    for(var j = 0; j < tokens2.length; j++) {\n      if(token == tokens2[j]) continue outer;\n    }\n    values += (values.length > 0 ? ' ' : '') + token;\n  }\n  return values;\n}\n\n/**\n * @ngdoc object\n * @name ng.$controllerProvider\n * @description\n * The {@link ng.$controller $controller service} is used by Angular to create new\n * controllers.\n *\n * This provider allows controller registration via the\n * {@link ng.$controllerProvider#methods_register register} method.\n */\nfunction $ControllerProvider() {\n  var controllers = {},\n      CNTRL_REG = /^(\\S+)(\\s+as\\s+(\\w+))?$/;\n\n\n  /**\n   * @ngdoc function\n   * @name ng.$controllerProvider#register\n   * @methodOf ng.$controllerProvider\n   * @param {string|Object} name Controller name, or an object map of controllers where the keys are\n   *    the names and the values are the constructors.\n   * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI\n   *    annotations in the array notation).\n   */\n  this.register = function(name, constructor) {\n    assertNotHasOwnProperty(name, 'controller');\n    if (isObject(name)) {\n      extend(controllers, name);\n    } else {\n      controllers[name] = constructor;\n    }\n  };\n\n\n  this.$get = ['$injector', '$window', function($injector, $window) {\n\n    /**\n     * @ngdoc function\n     * @name ng.$controller\n     * @requires $injector\n     *\n     * @param {Function|string} constructor If called with a function then it's considered to be the\n     *    controller constructor function. Otherwise it's considered to be a string which is used\n     *    to retrieve the controller constructor using the following steps:\n     *\n     *    * check if a controller with given name is registered via `$controllerProvider`\n     *    * check if evaluating the string on the current scope returns a constructor\n     *    * check `window[constructor]` on the global `window` object\n     *\n     * @param {Object} locals Injection locals for Controller.\n     * @return {Object} Instance of given controller.\n     *\n     * @description\n     * `$controller` service is responsible for instantiating controllers.\n     *\n     * It's just a simple call to {@link AUTO.$injector $injector}, but extracted into\n     * a service, so that one can override this service with {@link https://gist.github.com/1649788\n     * BC version}.\n     */\n    return function(expression, locals) {\n      var instance, match, constructor, identifier;\n\n      if(isString(expression)) {\n        match = expression.match(CNTRL_REG),\n        constructor = match[1],\n        identifier = match[3];\n        expression = controllers.hasOwnProperty(constructor)\n            ? controllers[constructor]\n            : getter(locals.$scope, constructor, true) || getter($window, constructor, true);\n\n        assertArgFn(expression, constructor, true);\n      }\n\n      instance = $injector.instantiate(expression, locals);\n\n      if (identifier) {\n        if (!(locals && typeof locals.$scope == 'object')) {\n          throw minErr('$controller')('noscp',\n              \"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.\",\n              constructor || expression.name, identifier);\n        }\n\n        locals.$scope[identifier] = instance;\n      }\n\n      return instance;\n    };\n  }];\n}\n\n/**\n * @ngdoc object\n * @name ng.$document\n * @requires $window\n *\n * @description\n * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.\n */\nfunction $DocumentProvider(){\n  this.$get = ['$window', function(window){\n    return jqLite(window.document);\n  }];\n}\n\n/**\n * @ngdoc function\n * @name ng.$exceptionHandler\n * @requires $log\n *\n * @description\n * Any uncaught exception in angular expressions is delegated to this service.\n * The default implementation simply delegates to `$log.error` which logs it into\n * the browser console.\n * \n * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by\n * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.\n *\n * ## Example:\n * \n * <pre>\n *   angular.module('exceptionOverride', []).factory('$exceptionHandler', function () {\n *     return function (exception, cause) {\n *       exception.message += ' (caused by \"' + cause + '\")';\n *       throw exception;\n *     };\n *   });\n * </pre>\n * \n * This example will override the normal action of `$exceptionHandler`, to make angular\n * exceptions fail hard when they happen, instead of just logging to the console.\n *\n * @param {Error} exception Exception associated with the error.\n * @param {string=} cause optional information about the context in which\n *       the error was thrown.\n *\n */\nfunction $ExceptionHandlerProvider() {\n  this.$get = ['$log', function($log) {\n    return function(exception, cause) {\n      $log.error.apply($log, arguments);\n    };\n  }];\n}\n\n/**\n * Parse headers into key value object\n *\n * @param {string} headers Raw headers as a string\n * @returns {Object} Parsed headers as key value object\n */\nfunction parseHeaders(headers) {\n  var parsed = {}, key, val, i;\n\n  if (!headers) return parsed;\n\n  forEach(headers.split('\\n'), function(line) {\n    i = line.indexOf(':');\n    key = lowercase(trim(line.substr(0, i)));\n    val = trim(line.substr(i + 1));\n\n    if (key) {\n      if (parsed[key]) {\n        parsed[key] += ', ' + val;\n      } else {\n        parsed[key] = val;\n      }\n    }\n  });\n\n  return parsed;\n}\n\n\n/**\n * Returns a function that provides access to parsed headers.\n *\n * Headers are lazy parsed when first requested.\n * @see parseHeaders\n *\n * @param {(string|Object)} headers Headers to provide access to.\n * @returns {function(string=)} Returns a getter function which if called with:\n *\n *   - if called with single an argument returns a single header value or null\n *   - if called with no arguments returns an object containing all headers.\n */\nfunction headersGetter(headers) {\n  var headersObj = isObject(headers) ? headers : undefined;\n\n  return function(name) {\n    if (!headersObj) headersObj =  parseHeaders(headers);\n\n    if (name) {\n      return headersObj[lowercase(name)] || null;\n    }\n\n    return headersObj;\n  };\n}\n\n\n/**\n * Chain all given functions\n *\n * This function is used for both request and response transforming\n *\n * @param {*} data Data to transform.\n * @param {function(string=)} headers Http headers getter fn.\n * @param {(function|Array.<function>)} fns Function or an array of functions.\n * @returns {*} Transformed data.\n */\nfunction transformData(data, headers, fns) {\n  if (isFunction(fns))\n    return fns(data, headers);\n\n  forEach(fns, function(fn) {\n    data = fn(data, headers);\n  });\n\n  return data;\n}\n\n\nfunction isSuccess(status) {\n  return 200 <= status && status < 300;\n}\n\n\nfunction $HttpProvider() {\n  var JSON_START = /^\\s*(\\[|\\{[^\\{])/,\n      JSON_END = /[\\}\\]]\\s*$/,\n      PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/,\n      CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': 'application/json;charset=utf-8'};\n\n  var defaults = this.defaults = {\n    // transform incoming response data\n    transformResponse: [function(data) {\n      if (isString(data)) {\n        // strip json vulnerability protection prefix\n        data = data.replace(PROTECTION_PREFIX, '');\n        if (JSON_START.test(data) && JSON_END.test(data))\n          data = fromJson(data);\n      }\n      return data;\n    }],\n\n    // transform outgoing request data\n    transformRequest: [function(d) {\n      return isObject(d) && !isFile(d) ? toJson(d) : d;\n    }],\n\n    // default headers\n    headers: {\n      common: {\n        'Accept': 'application/json, text/plain, */*'\n      },\n      post:   copy(CONTENT_TYPE_APPLICATION_JSON),\n      put:    copy(CONTENT_TYPE_APPLICATION_JSON),\n      patch:  copy(CONTENT_TYPE_APPLICATION_JSON)\n    },\n\n    xsrfCookieName: 'XSRF-TOKEN',\n    xsrfHeaderName: 'X-XSRF-TOKEN'\n  };\n\n  /**\n   * Are ordered by request, i.e. they are applied in the same order as the\n   * array, on request, but reverse order, on response.\n   */\n  var interceptorFactories = this.interceptors = [];\n\n  /**\n   * For historical reasons, response interceptors are ordered by the order in which\n   * they are applied to the response. (This is the opposite of interceptorFactories)\n   */\n  var responseInterceptorFactories = this.responseInterceptors = [];\n\n  this.$get = ['$httpBackend', '$browser', '$cacheFactory', '$rootScope', '$q', '$injector',\n      function($httpBackend, $browser, $cacheFactory, $rootScope, $q, $injector) {\n\n    var defaultCache = $cacheFactory('$http');\n\n    /**\n     * Interceptors stored in reverse order. Inner interceptors before outer interceptors.\n     * The reversal is needed so that we can build up the interception chain around the\n     * server request.\n     */\n    var reversedInterceptors = [];\n\n    forEach(interceptorFactories, function(interceptorFactory) {\n      reversedInterceptors.unshift(isString(interceptorFactory)\n          ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));\n    });\n\n    forEach(responseInterceptorFactories, function(interceptorFactory, index) {\n      var responseFn = isString(interceptorFactory)\n          ? $injector.get(interceptorFactory)\n          : $injector.invoke(interceptorFactory);\n\n      /**\n       * Response interceptors go before \"around\" interceptors (no real reason, just\n       * had to pick one.) But they are already reversed, so we can't use unshift, hence\n       * the splice.\n       */\n      reversedInterceptors.splice(index, 0, {\n        response: function(response) {\n          return responseFn($q.when(response));\n        },\n        responseError: function(response) {\n          return responseFn($q.reject(response));\n        }\n      });\n    });\n\n\n    /**\n     * @ngdoc function\n     * @name ng.$http\n     * @requires $httpBackend\n     * @requires $browser\n     * @requires $cacheFactory\n     * @requires $rootScope\n     * @requires $q\n     * @requires $injector\n     *\n     * @description\n     * The `$http` service is a core Angular service that facilitates communication with the remote\n     * HTTP servers via the browser's {@link https://developer.mozilla.org/en/xmlhttprequest\n     * XMLHttpRequest} object or via {@link http://en.wikipedia.org/wiki/JSONP JSONP}.\n     *\n     * For unit testing applications that use `$http` service, see\n     * {@link ngMock.$httpBackend $httpBackend mock}.\n     *\n     * For a higher level of abstraction, please check out the {@link ngResource.$resource\n     * $resource} service.\n     *\n     * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by\n     * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage\n     * it is important to familiarize yourself with these APIs and the guarantees they provide.\n     *\n     *\n     * # General usage\n     * The `$http` service is a function which takes a single argument — a configuration object —\n     * that is used to generate an HTTP request and returns  a {@link ng.$q promise}\n     * with two $http specific methods: `success` and `error`.\n     *\n     * <pre>\n     *   $http({method: 'GET', url: '/someUrl'}).\n     *     success(function(data, status, headers, config) {\n     *       // this callback will be called asynchronously\n     *       // when the response is available\n     *     }).\n     *     error(function(data, status, headers, config) {\n     *       // called asynchronously if an error occurs\n     *       // or server returns response with an error status.\n     *     });\n     * </pre>\n     *\n     * Since the returned value of calling the $http function is a `promise`, you can also use\n     * the `then` method to register callbacks, and these callbacks will receive a single argument –\n     * an object representing the response. See the API signature and type info below for more\n     * details.\n     *\n     * A response status code between 200 and 299 is considered a success status and\n     * will result in the success callback being called. Note that if the response is a redirect,\n     * XMLHttpRequest will transparently follow it, meaning that the error callback will not be\n     * called for such responses.\n     *\n     * # Writing Unit Tests that use $http\n     * When unit testing (using {@link api/ngMock ngMock}), it is necessary to call\n     * {@link api/ngMock.$httpBackend#methods_flush $httpBackend.flush()} to flush each pending\n     * request using trained responses.\n     *\n     * ```\n     * $httpBackend.expectGET(...);\n     * $http.get(...);\n     * $httpBackend.flush();\n     * ```\n     *\n     * # Shortcut methods\n     *\n     * Since all invocations of the $http service require passing in an HTTP method and URL, and\n     * POST/PUT requests require request data to be provided as well, shortcut methods\n     * were created:\n     *\n     * <pre>\n     *   $http.get('/someUrl').success(successCallback);\n     *   $http.post('/someUrl', data).success(successCallback);\n     * </pre>\n     *\n     * Complete list of shortcut methods:\n     *\n     * - {@link ng.$http#methods_get $http.get}\n     * - {@link ng.$http#methods_head $http.head}\n     * - {@link ng.$http#methods_post $http.post}\n     * - {@link ng.$http#methods_put $http.put}\n     * - {@link ng.$http#methods_delete $http.delete}\n     * - {@link ng.$http#methods_jsonp $http.jsonp}\n     *\n     *\n     * # Setting HTTP Headers\n     *\n     * The $http service will automatically add certain HTTP headers to all requests. These defaults\n     * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration\n     * object, which currently contains this default configuration:\n     *\n     * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):\n     *   - `Accept: application/json, text/plain, * / *`\n     * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)\n     *   - `Content-Type: application/json`\n     * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)\n     *   - `Content-Type: application/json`\n     *\n     * To add or overwrite these defaults, simply add or remove a property from these configuration\n     * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object\n     * with the lowercased HTTP method name as the key, e.g.\n     * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }.\n     *\n     * The defaults can also be set at runtime via the `$http.defaults` object in the same\n     * fashion. For example:\n     *\n     * ```\n     * module.run(function($http) {\n     *   $http.defaults.headers.common.Authentication = 'Basic YmVlcDpib29w'\n     * });\n     * ```\n     *\n     * In addition, you can supply a `headers` property in the config object passed when\n     * calling `$http(config)`, which overrides the defaults without changing them globally.\n     *\n     *\n     * # Transforming Requests and Responses\n     *\n     * Both requests and responses can be transformed using transform functions. By default, Angular\n     * applies these transformations:\n     *\n     * Request transformations:\n     *\n     * - If the `data` property of the request configuration object contains an object, serialize it\n     *   into JSON format.\n     *\n     * Response transformations:\n     *\n     *  - If XSRF prefix is detected, strip it (see Security Considerations section below).\n     *  - If JSON response is detected, deserialize it using a JSON parser.\n     *\n     * To globally augment or override the default transforms, modify the\n     * `$httpProvider.defaults.transformRequest` and `$httpProvider.defaults.transformResponse`\n     * properties. These properties are by default an array of transform functions, which allows you\n     * to `push` or `unshift` a new transformation function into the transformation chain. You can\n     * also decide to completely override any default transformations by assigning your\n     * transformation functions to these properties directly without the array wrapper.  These defaults\n     * are again available on the $http factory at run-time, which may be useful if you have run-time\n     * services you wish to be involved in your transformations.\n     *\n     * Similarly, to locally override the request/response transforms, augment the\n     * `transformRequest` and/or `transformResponse` properties of the configuration object passed\n     * into `$http`.\n     *\n     *\n     * # Caching\n     *\n     * To enable caching, set the request configuration `cache` property to `true` (to use default\n     * cache) or to a custom cache object (built with {@link ng.$cacheFactory `$cacheFactory`}).\n     * When the cache is enabled, `$http` stores the response from the server in the specified\n     * cache. The next time the same request is made, the response is served from the cache without\n     * sending a request to the server.\n     *\n     * Note that even if the response is served from cache, delivery of the data is asynchronous in\n     * the same way that real requests are.\n     *\n     * If there are multiple GET requests for the same URL that should be cached using the same\n     * cache, but the cache is not populated yet, only one request to the server will be made and\n     * the remaining requests will be fulfilled using the response from the first request.\n     *\n     * You can change the default cache to a new object (built with\n     * {@link ng.$cacheFactory `$cacheFactory`}) by updating the\n     * {@link ng.$http#properties_defaults `$http.defaults.cache`} property. All requests who set\n     * their `cache` property to `true` will now use this cache object.\n     *\n     * If you set the default cache to `false` then only requests that specify their own custom\n     * cache object will be cached.\n     *\n     * # Interceptors\n     *\n     * Before you start creating interceptors, be sure to understand the\n     * {@link ng.$q $q and deferred/promise APIs}.\n     *\n     * For purposes of global error handling, authentication, or any kind of synchronous or\n     * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be\n     * able to intercept requests before they are handed to the server and\n     * responses before they are handed over to the application code that\n     * initiated these requests. The interceptors leverage the {@link ng.$q\n     * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.\n     *\n     * The interceptors are service factories that are registered with the `$httpProvider` by\n     * adding them to the `$httpProvider.interceptors` array. The factory is called and\n     * injected with dependencies (if specified) and returns the interceptor.\n     *\n     * There are two kinds of interceptors (and two kinds of rejection interceptors):\n     *\n     *   * `request`: interceptors get called with http `config` object. The function is free to\n     *     modify the `config` or create a new one. The function needs to return the `config`\n     *     directly or as a promise.\n     *   * `requestError`: interceptor gets called when a previous interceptor threw an error or\n     *     resolved with a rejection.\n     *   * `response`: interceptors get called with http `response` object. The function is free to\n     *     modify the `response` or create a new one. The function needs to return the `response`\n     *     directly or as a promise.\n     *   * `responseError`: interceptor gets called when a previous interceptor threw an error or\n     *     resolved with a rejection.\n     *\n     *\n     * <pre>\n     *   // register the interceptor as a service\n     *   $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n     *     return {\n     *       // optional method\n     *       'request': function(config) {\n     *         // do something on success\n     *         return config || $q.when(config);\n     *       },\n     *\n     *       // optional method\n     *      'requestError': function(rejection) {\n     *         // do something on error\n     *         if (canRecover(rejection)) {\n     *           return responseOrNewPromise\n     *         }\n     *         return $q.reject(rejection);\n     *       },\n     *\n     *\n     *\n     *       // optional method\n     *       'response': function(response) {\n     *         // do something on success\n     *         return response || $q.when(response);\n     *       },\n     *\n     *       // optional method\n     *      'responseError': function(rejection) {\n     *         // do something on error\n     *         if (canRecover(rejection)) {\n     *           return responseOrNewPromise\n     *         }\n     *         return $q.reject(rejection);\n     *       }\n     *     };\n     *   });\n     *\n     *   $httpProvider.interceptors.push('myHttpInterceptor');\n     *\n     *\n     *   // alternatively, register the interceptor via an anonymous factory\n     *   $httpProvider.interceptors.push(function($q, dependency1, dependency2) {\n     *     return {\n     *      'request': function(config) {\n     *          // same as above\n     *       },\n     *\n     *       'response': function(response) {\n     *          // same as above\n     *       }\n     *     };\n     *   });\n     * </pre>\n     *\n     * # Response interceptors (DEPRECATED)\n     *\n     * Before you start creating interceptors, be sure to understand the\n     * {@link ng.$q $q and deferred/promise APIs}.\n     *\n     * For purposes of global error handling, authentication or any kind of synchronous or\n     * asynchronous preprocessing of received responses, it is desirable to be able to intercept\n     * responses for http requests before they are handed over to the application code that\n     * initiated these requests. The response interceptors leverage the {@link ng.$q\n     * promise apis} to fulfil this need for both synchronous and asynchronous preprocessing.\n     *\n     * The interceptors are service factories that are registered with the $httpProvider by\n     * adding them to the `$httpProvider.responseInterceptors` array. The factory is called and\n     * injected with dependencies (if specified) and returns the interceptor  — a function that\n     * takes a {@link ng.$q promise} and returns the original or a new promise.\n     *\n     * <pre>\n     *   // register the interceptor as a service\n     *   $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n     *     return function(promise) {\n     *       return promise.then(function(response) {\n     *         // do something on success\n     *         return response;\n     *       }, function(response) {\n     *         // do something on error\n     *         if (canRecover(response)) {\n     *           return responseOrNewPromise\n     *         }\n     *         return $q.reject(response);\n     *       });\n     *     }\n     *   });\n     *\n     *   $httpProvider.responseInterceptors.push('myHttpInterceptor');\n     *\n     *\n     *   // register the interceptor via an anonymous factory\n     *   $httpProvider.responseInterceptors.push(function($q, dependency1, dependency2) {\n     *     return function(promise) {\n     *       // same as above\n     *     }\n     *   });\n     * </pre>\n     *\n     *\n     * # Security Considerations\n     *\n     * When designing web applications, consider security threats from:\n     *\n     * - {@link http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx\n     *   JSON vulnerability}\n     * - {@link http://en.wikipedia.org/wiki/Cross-site_request_forgery XSRF}\n     *\n     * Both server and the client must cooperate in order to eliminate these threats. Angular comes\n     * pre-configured with strategies that address these issues, but for this to work backend server\n     * cooperation is required.\n     *\n     * ## JSON Vulnerability Protection\n     *\n     * A {@link http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx\n     * JSON vulnerability} allows third party website to turn your JSON resource URL into\n     * {@link http://en.wikipedia.org/wiki/JSONP JSONP} request under some conditions. To\n     * counter this your server can prefix all JSON requests with following string `\")]}',\\n\"`.\n     * Angular will automatically strip the prefix before processing it as JSON.\n     *\n     * For example if your server needs to return:\n     * <pre>\n     * ['one','two']\n     * </pre>\n     *\n     * which is vulnerable to attack, your server can return:\n     * <pre>\n     * )]}',\n     * ['one','two']\n     * </pre>\n     *\n     * Angular will strip the prefix, before processing the JSON.\n     *\n     *\n     * ## Cross Site Request Forgery (XSRF) Protection\n     *\n     * {@link http://en.wikipedia.org/wiki/Cross-site_request_forgery XSRF} is a technique by which\n     * an unauthorized site can gain your user's private data. Angular provides a mechanism\n     * to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie\n     * (by default, `XSRF-TOKEN`) and sets it as an HTTP header (`X-XSRF-TOKEN`). Since only\n     * JavaScript that runs on your domain could read the cookie, your server can be assured that\n     * the XHR came from JavaScript running on your domain. The header will not be set for\n     * cross-domain requests.\n     *\n     * To take advantage of this, your server needs to set a token in a JavaScript readable session\n     * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the\n     * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure\n     * that only JavaScript running on your domain could have sent the request. The token must be\n     * unique for each user and must be verifiable by the server (to prevent the JavaScript from\n     * making up its own tokens). We recommend that the token is a digest of your site's\n     * authentication cookie with a {@link https://en.wikipedia.org/wiki/Salt_(cryptography) salt}\n     * for added security.\n     *\n     * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName\n     * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time,\n     * or the per-request config object.\n     *\n     *\n     * @param {object} config Object describing the request to be made and how it should be\n     *    processed. The object has following properties:\n     *\n     *    - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)\n     *    - **url** – `{string}` – Absolute or relative URL of the resource that is being requested.\n     *    - **params** – `{Object.<string|Object>}` – Map of strings or objects which will be turned\n     *      to `?key1=value1&key2=value2` after the url. If the value is not a string, it will be\n     *      JSONified.\n     *    - **data** – `{string|Object}` – Data to be sent as the request message data.\n     *    - **headers** – `{Object}` – Map of strings or functions which return strings representing\n     *      HTTP headers to send to the server. If the return value of a function is null, the\n     *      header will not be sent.\n     *    - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token.\n     *    - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token.\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     *    - **transformResponse** –\n     *      `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –\n     *      transform function or an array of such functions. The transform function takes the http\n     *      response body and headers and returns its transformed (typically deserialized) version.\n     *    - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the\n     *      GET request, otherwise if a cache instance built with\n     *      {@link ng.$cacheFactory $cacheFactory}, this cache will be used for\n     *      caching.\n     *    - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}\n     *      that should abort the request when resolved.\n     *    - **withCredentials** - `{boolean}` - whether to to set the `withCredentials` flag on the\n     *      XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5\n     *      requests with credentials} for more information.\n     *    - **responseType** - `{string}` - see {@link\n     *      https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType requestType}.\n     *\n     * @returns {HttpPromise} Returns a {@link ng.$q promise} object with the\n     *   standard `then` method and two http specific methods: `success` and `error`. The `then`\n     *   method takes two arguments a success and an error callback which will be called with a\n     *   response object. The `success` and `error` methods take a single argument - a function that\n     *   will be called when the request succeeds or fails respectively. The arguments passed into\n     *   these functions are destructured representation of the response object passed into the\n     *   `then` method. The response object has these properties:\n     *\n     *   - **data** – `{string|Object}` – The response body transformed with the transform\n     *     functions.\n     *   - **status** – `{number}` – HTTP status code of the response.\n     *   - **headers** – `{function([headerName])}` – Header getter function.\n     *   - **config** – `{Object}` – The configuration object that was used to generate the request.\n     *\n     * @property {Array.<Object>} pendingRequests Array of config objects for currently pending\n     *   requests. This is primarily meant to be used for debugging purposes.\n     *\n     *\n     * @example\n<example>\n<file name=\"index.html\">\n  <div ng-controller=\"FetchCtrl\">\n    <select ng-model=\"method\">\n      <option>GET</option>\n      <option>JSONP</option>\n    </select>\n    <input type=\"text\" ng-model=\"url\" size=\"80\"/>\n    <button id=\"fetchbtn\" ng-click=\"fetch()\">fetch</button><br>\n    <button id=\"samplegetbtn\" ng-click=\"updateModel('GET', 'http-hello.html')\">Sample GET</button>\n    <button id=\"samplejsonpbtn\"\n      ng-click=\"updateModel('JSONP',\n                    'http://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')\">\n      Sample JSONP\n    </button>\n    <button id=\"invalidjsonpbtn\"\n      ng-click=\"updateModel('JSONP', 'http://angularjs.org/doesntexist&callback=JSON_CALLBACK')\">\n        Invalid JSONP\n      </button>\n    <pre>http status code: {{status}}</pre>\n    <pre>http response data: {{data}}</pre>\n  </div>\n</file>\n<file name=\"script.js\">\n  function FetchCtrl($scope, $http, $templateCache) {\n    $scope.method = 'GET';\n    $scope.url = 'http-hello.html';\n\n    $scope.fetch = function() {\n      $scope.code = null;\n      $scope.response = null;\n\n      $http({method: $scope.method, url: $scope.url, cache: $templateCache}).\n        success(function(data, status) {\n          $scope.status = status;\n          $scope.data = data;\n        }).\n        error(function(data, status) {\n          $scope.data = data || \"Request failed\";\n          $scope.status = status;\n      });\n    };\n\n    $scope.updateModel = function(method, url) {\n      $scope.method = method;\n      $scope.url = url;\n    };\n  }\n</file>\n<file name=\"http-hello.html\">\n  Hello, $http!\n</file>\n<file name=\"protractorTest.js\">\n  var status = element(by.binding('status'));\n  var data = element(by.binding('data'));\n  var fetchBtn = element(by.id('fetchbtn'));\n  var sampleGetBtn = element(by.id('samplegetbtn'));\n  var sampleJsonpBtn = element(by.id('samplejsonpbtn'));\n  var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));\n\n  it('should make an xhr GET request', function() {\n    sampleGetBtn.click();\n    fetchBtn.click();\n    expect(status.getText()).toMatch('200');\n    expect(data.getText()).toMatch(/Hello, \\$http!/)\n  });\n\n  it('should make a JSONP request to angularjs.org', function() {\n    sampleJsonpBtn.click();\n    fetchBtn.click();\n    expect(status.getText()).toMatch('200');\n    expect(data.getText()).toMatch(/Super Hero!/);\n  });\n\n  it('should make JSONP request to invalid URL and invoke the error handler',\n      function() {\n    invalidJsonpBtn.click();\n    fetchBtn.click();\n    expect(status.getText()).toMatch('0');\n    expect(data.getText()).toMatch('Request failed');\n  });\n</file>\n</example>\n     */\n    function $http(requestConfig) {\n      var config = {\n        transformRequest: defaults.transformRequest,\n        transformResponse: defaults.transformResponse\n      };\n      var headers = mergeHeaders(requestConfig);\n\n      extend(config, requestConfig);\n      config.headers = headers;\n      config.method = uppercase(config.method);\n\n      var xsrfValue = urlIsSameOrigin(config.url)\n          ? $browser.cookies()[config.xsrfCookieName || defaults.xsrfCookieName]\n          : undefined;\n      if (xsrfValue) {\n        headers[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;\n      }\n\n\n      var serverRequest = function(config) {\n        headers = config.headers;\n        var reqData = transformData(config.data, headersGetter(headers), config.transformRequest);\n\n        // strip content-type if data is undefined\n        if (isUndefined(config.data)) {\n          forEach(headers, function(value, header) {\n            if (lowercase(header) === 'content-type') {\n                delete headers[header];\n            }\n          });\n        }\n\n        if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {\n          config.withCredentials = defaults.withCredentials;\n        }\n\n        // send request\n        return sendReq(config, reqData, headers).then(transformResponse, transformResponse);\n      };\n\n      var chain = [serverRequest, undefined];\n      var promise = $q.when(config);\n\n      // apply interceptors\n      forEach(reversedInterceptors, function(interceptor) {\n        if (interceptor.request || interceptor.requestError) {\n          chain.unshift(interceptor.request, interceptor.requestError);\n        }\n        if (interceptor.response || interceptor.responseError) {\n          chain.push(interceptor.response, interceptor.responseError);\n        }\n      });\n\n      while(chain.length) {\n        var thenFn = chain.shift();\n        var rejectFn = chain.shift();\n\n        promise = promise.then(thenFn, rejectFn);\n      }\n\n      promise.success = function(fn) {\n        promise.then(function(response) {\n          fn(response.data, response.status, response.headers, config);\n        });\n        return promise;\n      };\n\n      promise.error = function(fn) {\n        promise.then(null, function(response) {\n          fn(response.data, response.status, response.headers, config);\n        });\n        return promise;\n      };\n\n      return promise;\n\n      function transformResponse(response) {\n        // make a copy since the response must be cacheable\n        var resp = extend({}, response, {\n          data: transformData(response.data, response.headers, config.transformResponse)\n        });\n        return (isSuccess(response.status))\n          ? resp\n          : $q.reject(resp);\n      }\n\n      function mergeHeaders(config) {\n        var defHeaders = defaults.headers,\n            reqHeaders = extend({}, config.headers),\n            defHeaderName, lowercaseDefHeaderName, reqHeaderName;\n\n        defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);\n\n        // execute if header value is function\n        execHeaders(defHeaders);\n        execHeaders(reqHeaders);\n\n        // using for-in instead of forEach to avoid unecessary iteration after header has been found\n        defaultHeadersIteration:\n        for (defHeaderName in defHeaders) {\n          lowercaseDefHeaderName = lowercase(defHeaderName);\n\n          for (reqHeaderName in reqHeaders) {\n            if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {\n              continue defaultHeadersIteration;\n            }\n          }\n\n          reqHeaders[defHeaderName] = defHeaders[defHeaderName];\n        }\n\n        return reqHeaders;\n\n        function execHeaders(headers) {\n          var headerContent;\n\n          forEach(headers, function(headerFn, header) {\n            if (isFunction(headerFn)) {\n              headerContent = headerFn();\n              if (headerContent != null) {\n                headers[header] = headerContent;\n              } else {\n                delete headers[header];\n              }\n            }\n          });\n        }\n      }\n    }\n\n    $http.pendingRequests = [];\n\n    /**\n     * @ngdoc method\n     * @name ng.$http#get\n     * @methodOf ng.$http\n     *\n     * @description\n     * Shortcut method to perform `GET` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$http#delete\n     * @methodOf ng.$http\n     *\n     * @description\n     * Shortcut method to perform `DELETE` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$http#head\n     * @methodOf ng.$http\n     *\n     * @description\n     * Shortcut method to perform `HEAD` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$http#jsonp\n     * @methodOf ng.$http\n     *\n     * @description\n     * Shortcut method to perform `JSONP` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request.\n     *                     Should contain `JSON_CALLBACK` string.\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n    createShortMethods('get', 'delete', 'head', 'jsonp');\n\n    /**\n     * @ngdoc method\n     * @name ng.$http#post\n     * @methodOf ng.$http\n     *\n     * @description\n     * Shortcut method to perform `POST` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {*} data Request content\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$http#put\n     * @methodOf ng.$http\n     *\n     * @description\n     * Shortcut method to perform `PUT` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {*} data Request content\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n    createShortMethodsWithData('post', 'put');\n\n        /**\n         * @ngdoc property\n         * @name ng.$http#defaults\n         * @propertyOf ng.$http\n         *\n         * @description\n         * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of\n         * default headers, withCredentials as well as request and response transformations.\n         *\n         * See \"Setting HTTP Headers\" and \"Transforming Requests and Responses\" sections above.\n         */\n    $http.defaults = defaults;\n\n\n    return $http;\n\n\n    function createShortMethods(names) {\n      forEach(arguments, function(name) {\n        $http[name] = function(url, config) {\n          return $http(extend(config || {}, {\n            method: name,\n            url: url\n          }));\n        };\n      });\n    }\n\n\n    function createShortMethodsWithData(name) {\n      forEach(arguments, function(name) {\n        $http[name] = function(url, data, config) {\n          return $http(extend(config || {}, {\n            method: name,\n            url: url,\n            data: data\n          }));\n        };\n      });\n    }\n\n\n    /**\n     * Makes the request.\n     *\n     * !!! ACCESSES CLOSURE VARS:\n     * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests\n     */\n    function sendReq(config, reqData, reqHeaders) {\n      var deferred = $q.defer(),\n          promise = deferred.promise,\n          cache,\n          cachedResp,\n          url = buildUrl(config.url, config.params);\n\n      $http.pendingRequests.push(config);\n      promise.then(removePendingReq, removePendingReq);\n\n\n      if ((config.cache || defaults.cache) && config.cache !== false && config.method == 'GET') {\n        cache = isObject(config.cache) ? config.cache\n              : isObject(defaults.cache) ? defaults.cache\n              : defaultCache;\n      }\n\n      if (cache) {\n        cachedResp = cache.get(url);\n        if (isDefined(cachedResp)) {\n          if (cachedResp.then) {\n            // cached request has already been sent, but there is no response yet\n            cachedResp.then(removePendingReq, removePendingReq);\n            return cachedResp;\n          } else {\n            // serving from cache\n            if (isArray(cachedResp)) {\n              resolvePromise(cachedResp[1], cachedResp[0], copy(cachedResp[2]));\n            } else {\n              resolvePromise(cachedResp, 200, {});\n            }\n          }\n        } else {\n          // put the promise for the non-transformed response into cache as a placeholder\n          cache.put(url, promise);\n        }\n      }\n\n      // if we won't have the response in cache, send the request to the backend\n      if (isUndefined(cachedResp)) {\n        $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,\n            config.withCredentials, config.responseType);\n      }\n\n      return promise;\n\n\n      /**\n       * Callback registered to $httpBackend():\n       *  - caches the response if desired\n       *  - resolves the raw $http promise\n       *  - calls $apply\n       */\n      function done(status, response, headersString) {\n        if (cache) {\n          if (isSuccess(status)) {\n            cache.put(url, [status, response, parseHeaders(headersString)]);\n          } else {\n            // remove promise from the cache\n            cache.remove(url);\n          }\n        }\n\n        resolvePromise(response, status, headersString);\n        if (!$rootScope.$$phase) $rootScope.$apply();\n      }\n\n\n      /**\n       * Resolves the raw $http promise.\n       */\n      function resolvePromise(response, status, headers) {\n        // normalize internal statuses to 0\n        status = Math.max(status, 0);\n\n        (isSuccess(status) ? deferred.resolve : deferred.reject)({\n          data: response,\n          status: status,\n          headers: headersGetter(headers),\n          config: config\n        });\n      }\n\n\n      function removePendingReq() {\n        var idx = indexOf($http.pendingRequests, config);\n        if (idx !== -1) $http.pendingRequests.splice(idx, 1);\n      }\n    }\n\n\n    function buildUrl(url, params) {\n          if (!params) return url;\n          var parts = [];\n          forEachSorted(params, function(value, key) {\n            if (value === null || isUndefined(value)) return;\n            if (!isArray(value)) value = [value];\n\n            forEach(value, function(v) {\n              if (isObject(v)) {\n                v = toJson(v);\n              }\n              parts.push(encodeUriQuery(key) + '=' +\n                         encodeUriQuery(v));\n            });\n          });\n          return url + ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');\n        }\n\n\n  }];\n}\n\nfunction createXhr(method) {\n    //if IE and the method is not RFC2616 compliant, or if XMLHttpRequest\n    //is not available, try getting an ActiveXObject. Otherwise, use XMLHttpRequest\n    //if it is available\n    if (msie <= 8 && (!method.match(/^(get|post|head|put|delete|options)$/i) ||\n      !window.XMLHttpRequest)) {\n      return new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n    } else if (window.XMLHttpRequest) {\n      return new window.XMLHttpRequest();\n    }\n\n    throw minErr('$httpBackend')('noxhr', \"This browser does not support XMLHttpRequest.\");\n}\n\n/**\n * @ngdoc object\n * @name ng.$httpBackend\n * @requires $browser\n * @requires $window\n * @requires $document\n *\n * @description\n * HTTP backend used by the {@link ng.$http service} that delegates to\n * XMLHttpRequest object or JSONP and deals with browser incompatibilities.\n *\n * You should never need to use this service directly, instead use the higher-level abstractions:\n * {@link ng.$http $http} or {@link ngResource.$resource $resource}.\n *\n * During testing this implementation is swapped with {@link ngMock.$httpBackend mock\n * $httpBackend} which can be trained with responses.\n */\nfunction $HttpBackendProvider() {\n  this.$get = ['$browser', '$window', '$document', function($browser, $window, $document) {\n    return createHttpBackend($browser, createXhr, $browser.defer, $window.angular.callbacks, $document[0]);\n  }];\n}\n\nfunction createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {\n  var ABORTED = -1;\n\n  // TODO(vojta): fix the signature\n  return function(method, url, post, callback, headers, timeout, withCredentials, responseType) {\n    var status;\n    $browser.$$incOutstandingRequestCount();\n    url = url || $browser.url();\n\n    if (lowercase(method) == 'jsonp') {\n      var callbackId = '_' + (callbacks.counter++).toString(36);\n      callbacks[callbackId] = function(data) {\n        callbacks[callbackId].data = data;\n      };\n\n      var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),\n          function() {\n        if (callbacks[callbackId].data) {\n          completeRequest(callback, 200, callbacks[callbackId].data);\n        } else {\n          completeRequest(callback, status || -2);\n        }\n        callbacks[callbackId] = angular.noop;\n      });\n    } else {\n\n      var xhr = createXhr(method);\n\n      xhr.open(method, url, true);\n      forEach(headers, function(value, key) {\n        if (isDefined(value)) {\n            xhr.setRequestHeader(key, value);\n        }\n      });\n\n      // In IE6 and 7, this might be called synchronously when xhr.send below is called and the\n      // response is in the cache. the promise api will ensure that to the app code the api is\n      // always async\n      xhr.onreadystatechange = function() {\n        // onreadystatechange might get called multiple times with readyState === 4 on mobile webkit caused by\n        // xhrs that are resolved while the app is in the background (see #5426).\n        // since calling completeRequest sets the `xhr` variable to null, we just check if it's not null before\n        // continuing\n        //\n        // we can't set xhr.onreadystatechange to undefined or delete it because that breaks IE8 (method=PATCH) and\n        // Safari respectively.\n        if (xhr && xhr.readyState == 4) {\n          var responseHeaders = null,\n              response = null;\n\n          if(status !== ABORTED) {\n            responseHeaders = xhr.getAllResponseHeaders();\n\n            // responseText is the old-school way of retrieving response (supported by IE8 & 9)\n            // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)\n            response = ('response' in xhr) ? xhr.response : xhr.responseText;\n          }\n\n          completeRequest(callback,\n              status || xhr.status,\n              response,\n              responseHeaders);\n        }\n      };\n\n      if (withCredentials) {\n        xhr.withCredentials = true;\n      }\n\n      if (responseType) {\n        try {\n          xhr.responseType = responseType;\n        } catch (e) {\n          // WebKit added support for the json responseType value on 09/03/2013\n          // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are\n          // known to throw when setting the value \"json\" as the response type. Other older\n          // browsers implementing the responseType \n          //\n          // The json response type can be ignored if not supported, because JSON payloads are\n          // parsed on the client-side regardless.\n          if (responseType !== 'json') {\n            throw e;\n          }\n        }\n      }\n\n      xhr.send(post || null);\n    }\n\n    if (timeout > 0) {\n      var timeoutId = $browserDefer(timeoutRequest, timeout);\n    } else if (timeout && timeout.then) {\n      timeout.then(timeoutRequest);\n    }\n\n\n    function timeoutRequest() {\n      status = ABORTED;\n      jsonpDone && jsonpDone();\n      xhr && xhr.abort();\n    }\n\n    function completeRequest(callback, status, response, headersString) {\n      // cancel timeout and subsequent timeout promise resolution\n      timeoutId && $browserDefer.cancel(timeoutId);\n      jsonpDone = xhr = null;\n\n      // fix status code when it is 0 (0 status is undocumented).\n      // Occurs when accessing file resources.\n      // On Android 4.1 stock browser it occurs while retrieving files from application cache.\n      status = (status === 0) ? (response ? 200 : 404) : status;\n\n      // normalize IE bug (http://bugs.jquery.com/ticket/1450)\n      status = status == 1223 ? 204 : status;\n\n      callback(status, response, headersString);\n      $browser.$$completeOutstandingRequest(noop);\n    }\n  };\n\n  function jsonpReq(url, done) {\n    // we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.:\n    // - fetches local scripts via XHR and evals them\n    // - adds and immediately removes script elements from the document\n    var script = rawDocument.createElement('script'),\n        doneWrapper = function() {\n          script.onreadystatechange = script.onload = script.onerror = null;\n          rawDocument.body.removeChild(script);\n          if (done) done();\n        };\n\n    script.type = 'text/javascript';\n    script.src = url;\n\n    if (msie && msie <= 8) {\n      script.onreadystatechange = function() {\n        if (/loaded|complete/.test(script.readyState)) {\n          doneWrapper();\n        }\n      };\n    } else {\n      script.onload = script.onerror = function() {\n        doneWrapper();\n      };\n    }\n\n    rawDocument.body.appendChild(script);\n    return doneWrapper;\n  }\n}\n\nvar $interpolateMinErr = minErr('$interpolate');\n\n/**\n * @ngdoc object\n * @name ng.$interpolateProvider\n * @function\n *\n * @description\n *\n * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.\n *\n * @example\n<doc:example module=\"customInterpolationApp\">\n<doc:source>\n<script>\n  var customInterpolationApp = angular.module('customInterpolationApp', []);\n\n  customInterpolationApp.config(function($interpolateProvider) {\n    $interpolateProvider.startSymbol('//');\n    $interpolateProvider.endSymbol('//');\n  });\n\n\n  customInterpolationApp.controller('DemoController', function DemoController() {\n      this.label = \"This binding is brought you by // interpolation symbols.\";\n  });\n</script>\n<div ng-app=\"App\" ng-controller=\"DemoController as demo\">\n    //demo.label//\n</div>\n</doc:source>\n<doc:protractor>\n  it('should interpolate binding with custom symbols', function() {\n    expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');\n  });\n</doc:protractor>\n</doc:example>\n */\nfunction $InterpolateProvider() {\n  var startSymbol = '{{';\n  var endSymbol = '}}';\n\n  /**\n   * @ngdoc method\n   * @name ng.$interpolateProvider#startSymbol\n   * @methodOf ng.$interpolateProvider\n   * @description\n   * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.\n   *\n   * @param {string=} value new value to set the starting symbol to.\n   * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n   */\n  this.startSymbol = function(value){\n    if (value) {\n      startSymbol = value;\n      return this;\n    } else {\n      return startSymbol;\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name ng.$interpolateProvider#endSymbol\n   * @methodOf ng.$interpolateProvider\n   * @description\n   * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n   *\n   * @param {string=} value new value to set the ending symbol to.\n   * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n   */\n  this.endSymbol = function(value){\n    if (value) {\n      endSymbol = value;\n      return this;\n    } else {\n      return endSymbol;\n    }\n  };\n\n\n  this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {\n    var startSymbolLength = startSymbol.length,\n        endSymbolLength = endSymbol.length;\n\n    /**\n     * @ngdoc function\n     * @name ng.$interpolate\n     * @function\n     *\n     * @requires $parse\n     * @requires $sce\n     *\n     * @description\n     *\n     * Compiles a string with markup into an interpolation function. This service is used by the\n     * HTML {@link ng.$compile $compile} service for data binding. See\n     * {@link ng.$interpolateProvider $interpolateProvider} for configuring the\n     * interpolation markup.\n     *\n     *\n       <pre>\n         var $interpolate = ...; // injected\n         var exp = $interpolate('Hello {{name | uppercase}}!');\n         expect(exp({name:'Angular'}).toEqual('Hello ANGULAR!');\n       </pre>\n     *\n     *\n     * @param {string} text The text with markup to interpolate.\n     * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have\n     *    embedded expression in order to return an interpolation function. Strings with no\n     *    embedded expression will return null for the interpolation function.\n     * @param {string=} trustedContext when provided, the returned function passes the interpolated\n     *    result through {@link ng.$sce#methods_getTrusted $sce.getTrusted(interpolatedResult,\n     *    trustedContext)} before returning it.  Refer to the {@link ng.$sce $sce} service that\n     *    provides Strict Contextual Escaping for details.\n     * @returns {function(context)} an interpolation function which is used to compute the\n     *    interpolated string. The function has these parameters:\n     *\n     *    * `context`: an object against which any expressions embedded in the strings are evaluated\n     *      against.\n     *\n     */\n    function $interpolate(text, mustHaveExpression, trustedContext) {\n      var startIndex,\n          endIndex,\n          index = 0,\n          parts = [],\n          length = text.length,\n          hasInterpolation = false,\n          fn,\n          exp,\n          concat = [];\n\n      while(index < length) {\n        if ( ((startIndex = text.indexOf(startSymbol, index)) != -1) &&\n             ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1) ) {\n          (index != startIndex) && parts.push(text.substring(index, startIndex));\n          parts.push(fn = $parse(exp = text.substring(startIndex + startSymbolLength, endIndex)));\n          fn.exp = exp;\n          index = endIndex + endSymbolLength;\n          hasInterpolation = true;\n        } else {\n          // we did not find anything, so we have to add the remainder to the parts array\n          (index != length) && parts.push(text.substring(index));\n          index = length;\n        }\n      }\n\n      if (!(length = parts.length)) {\n        // we added, nothing, must have been an empty string.\n        parts.push('');\n        length = 1;\n      }\n\n      // Concatenating expressions makes it hard to reason about whether some combination of\n      // concatenated values are unsafe to use and could easily lead to XSS.  By requiring that a\n      // single expression be used for iframe[src], object[src], etc., we ensure that the value\n      // that's used is assigned or constructed by some JS code somewhere that is more testable or\n      // make it obvious that you bound the value to some user controlled value.  This helps reduce\n      // the load when auditing for XSS issues.\n      if (trustedContext && parts.length > 1) {\n          throw $interpolateMinErr('noconcat',\n              \"Error while interpolating: {0}\\nStrict Contextual Escaping disallows \" +\n              \"interpolations that concatenate multiple expressions when a trusted value is \" +\n              \"required.  See http://docs.angularjs.org/api/ng.$sce\", text);\n      }\n\n      if (!mustHaveExpression  || hasInterpolation) {\n        concat.length = length;\n        fn = function(context) {\n          try {\n            for(var i = 0, ii = length, part; i<ii; i++) {\n              if (typeof (part = parts[i]) == 'function') {\n                part = part(context);\n                if (trustedContext) {\n                  part = $sce.getTrusted(trustedContext, part);\n                } else {\n                  part = $sce.valueOf(part);\n                }\n                if (part === null || isUndefined(part)) {\n                  part = '';\n                } else if (typeof part != 'string') {\n                  part = toJson(part);\n                }\n              }\n              concat[i] = part;\n            }\n            return concat.join('');\n          }\n          catch(err) {\n            var newErr = $interpolateMinErr('interr', \"Can't interpolate: {0}\\n{1}\", text,\n                err.toString());\n            $exceptionHandler(newErr);\n          }\n        };\n        fn.exp = text;\n        fn.parts = parts;\n        return fn;\n      }\n    }\n\n\n    /**\n     * @ngdoc method\n     * @name ng.$interpolate#startSymbol\n     * @methodOf ng.$interpolate\n     * @description\n     * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.\n     *\n     * Use {@link ng.$interpolateProvider#startSymbol $interpolateProvider#startSymbol} to change\n     * the symbol.\n     *\n     * @returns {string} start symbol.\n     */\n    $interpolate.startSymbol = function() {\n      return startSymbol;\n    };\n\n\n    /**\n     * @ngdoc method\n     * @name ng.$interpolate#endSymbol\n     * @methodOf ng.$interpolate\n     * @description\n     * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n     *\n     * Use {@link ng.$interpolateProvider#endSymbol $interpolateProvider#endSymbol} to change\n     * the symbol.\n     *\n     * @returns {string} start symbol.\n     */\n    $interpolate.endSymbol = function() {\n      return endSymbol;\n    };\n\n    return $interpolate;\n  }];\n}\n\nfunction $IntervalProvider() {\n  this.$get = ['$rootScope', '$window', '$q',\n       function($rootScope,   $window,   $q) {\n    var intervals = {};\n\n\n     /**\n      * @ngdoc function\n      * @name ng.$interval\n      *\n      * @description\n      * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay`\n      * milliseconds.\n      *\n      * The return value of registering an interval function is a promise. This promise will be\n      * notified upon each tick of the interval, and will be resolved after `count` iterations, or\n      * run indefinitely if `count` is not defined. The value of the notification will be the\n      * number of iterations that have run.\n      * To cancel an interval, call `$interval.cancel(promise)`.\n      *\n      * In tests you can use {@link ngMock.$interval#methods_flush `$interval.flush(millis)`} to\n      * move forward by `millis` milliseconds and trigger any functions scheduled to run in that\n      * time.\n      *\n      * <div class=\"alert alert-warning\">\n      * **Note**: Intervals created by this service must be explicitly destroyed when you are finished\n      * with them.  In particular they are not automatically destroyed when a controller's scope or a\n      * directive's element are destroyed.\n      * You should take this into consideration and make sure to always cancel the interval at the\n      * appropriate moment.  See the example below for more details on how and when to do this.\n      * </div>\n      *\n      * @param {function()} fn A function that should be called repeatedly.\n      * @param {number} delay Number of milliseconds between each function call.\n      * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat\n      *   indefinitely.\n      * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n      *   will invoke `fn` within the {@link ng.$rootScope.Scope#methods_$apply $apply} block.\n      * @returns {promise} A promise which will be notified on each iteration.\n      *\n      * @example\n      <doc:example module=\"time\">\n        <doc:source>\n          <script>\n            function Ctrl2($scope,$interval) {\n              $scope.format = 'M/d/yy h:mm:ss a';\n              $scope.blood_1 = 100;\n              $scope.blood_2 = 120;\n\n              var stop;\n              $scope.fight = function() {\n                // Don't start a new fight if we are already fighting\n                if ( angular.isDefined(stop) ) return;\n\n                stop = $interval(function() {\n                  if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {\n                      $scope.blood_1 = $scope.blood_1 - 3;\n                      $scope.blood_2 = $scope.blood_2 - 4;\n                  } else {\n                      $scope.stopFight();\n                  }\n                }, 100);\n              };\n\n              $scope.stopFight = function() {\n                if (angular.isDefined(stop)) {\n                  $interval.cancel(stop);\n                  stop = undefined;\n                }\n              };\n\n              $scope.resetFight = function() {\n                $scope.blood_1 = 100;\n                $scope.blood_2 = 120;\n              }\n\n              $scope.$on('$destroy', function() {\n                // Make sure that the interval is destroyed too\n                $scope.stopFight();\n              });\n            }\n\n            angular.module('time', [])\n              // Register the 'myCurrentTime' directive factory method.\n              // We inject $interval and dateFilter service since the factory method is DI.\n              .directive('myCurrentTime', function($interval, dateFilter) {\n                // return the directive link function. (compile function not needed)\n                return function(scope, element, attrs) {\n                  var format,  // date format\n                  stopTime; // so that we can cancel the time updates\n\n                  // used to update the UI\n                  function updateTime() {\n                    element.text(dateFilter(new Date(), format));\n                  }\n\n                  // watch the expression, and update the UI on change.\n                  scope.$watch(attrs.myCurrentTime, function(value) {\n                    format = value;\n                    updateTime();\n                  });\n\n                  stopTime = $interval(updateTime, 1000);\n\n                  // listen on DOM destroy (removal) event, and cancel the next UI update\n                  // to prevent updating time ofter the DOM element was removed.\n                  element.bind('$destroy', function() {\n                    $interval.cancel(stopTime);\n                  });\n                }\n              });\n          </script>\n\n          <div>\n            <div ng-controller=\"Ctrl2\">\n              Date format: <input ng-model=\"format\"> <hr/>\n              Current time is: <span my-current-time=\"format\"></span>\n              <hr/>\n              Blood 1 : <font color='red'>{{blood_1}}</font>\n              Blood 2 : <font color='red'>{{blood_2}}</font>\n              <button type=\"button\" data-ng-click=\"fight()\">Fight</button>\n              <button type=\"button\" data-ng-click=\"stopFight()\">StopFight</button>\n              <button type=\"button\" data-ng-click=\"resetFight()\">resetFight</button>\n            </div>\n          </div>\n\n        </doc:source>\n      </doc:example>\n      */\n    function interval(fn, delay, count, invokeApply) {\n      var setInterval = $window.setInterval,\n          clearInterval = $window.clearInterval,\n          deferred = $q.defer(),\n          promise = deferred.promise,\n          iteration = 0,\n          skipApply = (isDefined(invokeApply) && !invokeApply);\n\n      count = isDefined(count) ? count : 0;\n\n      promise.then(null, null, fn);\n\n      promise.$$intervalId = setInterval(function tick() {\n        deferred.notify(iteration++);\n\n        if (count > 0 && iteration >= count) {\n          deferred.resolve(iteration);\n          clearInterval(promise.$$intervalId);\n          delete intervals[promise.$$intervalId];\n        }\n\n        if (!skipApply) $rootScope.$apply();\n\n      }, delay);\n\n      intervals[promise.$$intervalId] = deferred;\n\n      return promise;\n    }\n\n\n     /**\n      * @ngdoc function\n      * @name ng.$interval#cancel\n      * @methodOf ng.$interval\n      *\n      * @description\n      * Cancels a task associated with the `promise`.\n      *\n      * @param {number} promise Promise returned by the `$interval` function.\n      * @returns {boolean} Returns `true` if the task was successfully canceled.\n      */\n    interval.cancel = function(promise) {\n      if (promise && promise.$$intervalId in intervals) {\n        intervals[promise.$$intervalId].reject('canceled');\n        clearInterval(promise.$$intervalId);\n        delete intervals[promise.$$intervalId];\n        return true;\n      }\n      return false;\n    };\n\n    return interval;\n  }];\n}\n\n/**\n * @ngdoc object\n * @name ng.$locale\n *\n * @description\n * $locale service provides localization rules for various Angular components. As of right now the\n * only public api is:\n *\n * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)\n */\nfunction $LocaleProvider(){\n  this.$get = function() {\n    return {\n      id: 'en-us',\n\n      NUMBER_FORMATS: {\n        DECIMAL_SEP: '.',\n        GROUP_SEP: ',',\n        PATTERNS: [\n          { // Decimal Pattern\n            minInt: 1,\n            minFrac: 0,\n            maxFrac: 3,\n            posPre: '',\n            posSuf: '',\n            negPre: '-',\n            negSuf: '',\n            gSize: 3,\n            lgSize: 3\n          },{ //Currency Pattern\n            minInt: 1,\n            minFrac: 2,\n            maxFrac: 2,\n            posPre: '\\u00A4',\n            posSuf: '',\n            negPre: '(\\u00A4',\n            negSuf: ')',\n            gSize: 3,\n            lgSize: 3\n          }\n        ],\n        CURRENCY_SYM: '$'\n      },\n\n      DATETIME_FORMATS: {\n        MONTH:\n            'January,February,March,April,May,June,July,August,September,October,November,December'\n            .split(','),\n        SHORTMONTH:  'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),\n        DAY: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),\n        SHORTDAY: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','),\n        AMPMS: ['AM','PM'],\n        medium: 'MMM d, y h:mm:ss a',\n        short: 'M/d/yy h:mm a',\n        fullDate: 'EEEE, MMMM d, y',\n        longDate: 'MMMM d, y',\n        mediumDate: 'MMM d, y',\n        shortDate: 'M/d/yy',\n        mediumTime: 'h:mm:ss a',\n        shortTime: 'h:mm a'\n      },\n\n      pluralCat: function(num) {\n        if (num === 1) {\n          return 'one';\n        }\n        return 'other';\n      }\n    };\n  };\n}\n\nvar PATH_MATCH = /^([^\\?#]*)(\\?([^#]*))?(#(.*))?$/,\n    DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};\nvar $locationMinErr = minErr('$location');\n\n\n/**\n * Encode path using encodeUriSegment, ignoring forward slashes\n *\n * @param {string} path Path to encode\n * @returns {string}\n */\nfunction encodePath(path) {\n  var segments = path.split('/'),\n      i = segments.length;\n\n  while (i--) {\n    segments[i] = encodeUriSegment(segments[i]);\n  }\n\n  return segments.join('/');\n}\n\nfunction parseAbsoluteUrl(absoluteUrl, locationObj, appBase) {\n  var parsedUrl = urlResolve(absoluteUrl, appBase);\n\n  locationObj.$$protocol = parsedUrl.protocol;\n  locationObj.$$host = parsedUrl.hostname;\n  locationObj.$$port = int(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;\n}\n\n\nfunction parseAppUrl(relativeUrl, locationObj, appBase) {\n  var prefixed = (relativeUrl.charAt(0) !== '/');\n  if (prefixed) {\n    relativeUrl = '/' + relativeUrl;\n  }\n  var match = urlResolve(relativeUrl, appBase);\n  locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?\n      match.pathname.substring(1) : match.pathname);\n  locationObj.$$search = parseKeyValue(match.search);\n  locationObj.$$hash = decodeURIComponent(match.hash);\n\n  // make sure path starts with '/';\n  if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {\n    locationObj.$$path = '/' + locationObj.$$path;\n  }\n}\n\n\n/**\n *\n * @param {string} begin\n * @param {string} whole\n * @returns {string} returns text from whole after begin or undefined if it does not begin with\n *                   expected string.\n */\nfunction beginsWith(begin, whole) {\n  if (whole.indexOf(begin) === 0) {\n    return whole.substr(begin.length);\n  }\n}\n\n\nfunction stripHash(url) {\n  var index = url.indexOf('#');\n  return index == -1 ? url : url.substr(0, index);\n}\n\n\nfunction stripFile(url) {\n  return url.substr(0, stripHash(url).lastIndexOf('/') + 1);\n}\n\n/* return the server only (scheme://host:port) */\nfunction serverBase(url) {\n  return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));\n}\n\n\n/**\n * LocationHtml5Url represents an url\n * This object is exposed as $location service when HTML5 mode is enabled and supported\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} basePrefix url path prefix\n */\nfunction LocationHtml5Url(appBase, basePrefix) {\n  this.$$html5 = true;\n  basePrefix = basePrefix || '';\n  var appBaseNoFile = stripFile(appBase);\n  parseAbsoluteUrl(appBase, this, appBase);\n\n\n  /**\n   * Parse given html5 (regular) url string into properties\n   * @param {string} newAbsoluteUrl HTML5 url\n   * @private\n   */\n  this.$$parse = function(url) {\n    var pathUrl = beginsWith(appBaseNoFile, url);\n    if (!isString(pathUrl)) {\n      throw $locationMinErr('ipthprfx', 'Invalid url \"{0}\", missing path prefix \"{1}\".', url,\n          appBaseNoFile);\n    }\n\n    parseAppUrl(pathUrl, this, appBase);\n\n    if (!this.$$path) {\n      this.$$path = '/';\n    }\n\n    this.$$compose();\n  };\n\n  /**\n   * Compose url and update `absUrl` property\n   * @private\n   */\n  this.$$compose = function() {\n    var search = toKeyValue(this.$$search),\n        hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n    this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n    this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'\n  };\n\n  this.$$rewrite = function(url) {\n    var appUrl, prevAppUrl;\n\n    if ( (appUrl = beginsWith(appBase, url)) !== undefined ) {\n      prevAppUrl = appUrl;\n      if ( (appUrl = beginsWith(basePrefix, appUrl)) !== undefined ) {\n        return appBaseNoFile + (beginsWith('/', appUrl) || appUrl);\n      } else {\n        return appBase + prevAppUrl;\n      }\n    } else if ( (appUrl = beginsWith(appBaseNoFile, url)) !== undefined ) {\n      return appBaseNoFile + appUrl;\n    } else if (appBaseNoFile == url + '/') {\n      return appBaseNoFile;\n    }\n  };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when developer doesn't opt into html5 mode.\n * It also serves as the base class for html5 mode fallback on legacy browsers.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangUrl(appBase, hashPrefix) {\n  var appBaseNoFile = stripFile(appBase);\n\n  parseAbsoluteUrl(appBase, this, appBase);\n\n\n  /**\n   * Parse given hashbang url into properties\n   * @param {string} url Hashbang url\n   * @private\n   */\n  this.$$parse = function(url) {\n    var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);\n    var withoutHashUrl = withoutBaseUrl.charAt(0) == '#'\n        ? beginsWith(hashPrefix, withoutBaseUrl)\n        : (this.$$html5)\n          ? withoutBaseUrl\n          : '';\n\n    if (!isString(withoutHashUrl)) {\n      throw $locationMinErr('ihshprfx', 'Invalid url \"{0}\", missing hash prefix \"{1}\".', url,\n          hashPrefix);\n    }\n    parseAppUrl(withoutHashUrl, this, appBase);\n\n    this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);\n\n    this.$$compose();\n\n    /*\n     * In Windows, on an anchor node on documents loaded from\n     * the filesystem, the browser will return a pathname\n     * prefixed with the drive name ('/C:/path') when a\n     * pathname without a drive is set:\n     *  * a.setAttribute('href', '/foo')\n     *   * a.pathname === '/C:/foo' //true\n     *\n     * Inside of Angular, we're always using pathnames that\n     * do not include drive names for routing.\n     */\n    function removeWindowsDriveName (path, url, base) {\n      /*\n      Matches paths for file protocol on windows,\n      such as /C:/foo/bar, and captures only /foo/bar.\n      */\n      var windowsFilePathExp = /^\\/?.*?:(\\/.*)/;\n\n      var firstPathSegmentMatch;\n\n      //Get the relative path from the input URL.\n      if (url.indexOf(base) === 0) {\n        url = url.replace(base, '');\n      }\n\n      /*\n       * The input URL intentionally contains a\n       * first path segment that ends with a colon.\n       */\n      if (windowsFilePathExp.exec(url)) {\n        return path;\n      }\n\n      firstPathSegmentMatch = windowsFilePathExp.exec(path);\n      return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;\n    }\n  };\n\n  /**\n   * Compose hashbang url and update `absUrl` property\n   * @private\n   */\n  this.$$compose = function() {\n    var search = toKeyValue(this.$$search),\n        hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n    this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n    this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');\n  };\n\n  this.$$rewrite = function(url) {\n    if(stripHash(appBase) == stripHash(url)) {\n      return url;\n    }\n  };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when html5 history api is enabled but the browser\n * does not support it.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangInHtml5Url(appBase, hashPrefix) {\n  this.$$html5 = true;\n  LocationHashbangUrl.apply(this, arguments);\n\n  var appBaseNoFile = stripFile(appBase);\n\n  this.$$rewrite = function(url) {\n    var appUrl;\n\n    if ( appBase == stripHash(url) ) {\n      return url;\n    } else if ( (appUrl = beginsWith(appBaseNoFile, url)) ) {\n      return appBase + hashPrefix + appUrl;\n    } else if ( appBaseNoFile === url + '/') {\n      return appBaseNoFile;\n    }\n  };\n}\n\n\nLocationHashbangInHtml5Url.prototype =\n  LocationHashbangUrl.prototype =\n  LocationHtml5Url.prototype = {\n\n  /**\n   * Are we in html5 mode?\n   * @private\n   */\n  $$html5: false,\n\n  /**\n   * Has any change been replacing ?\n   * @private\n   */\n  $$replace: false,\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#absUrl\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return full url representation with all segments encoded according to rules specified in\n   * {@link http://www.ietf.org/rfc/rfc3986.txt RFC 3986}.\n   *\n   * @return {string} full url\n   */\n  absUrl: locationGetter('$$absUrl'),\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#url\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return url (e.g. `/path?a=b#hash`) when called without any parameter.\n   *\n   * Change path, search and hash, when called with parameter and return `$location`.\n   *\n   * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)\n   * @param {string=} replace The path that will be changed\n   * @return {string} url\n   */\n  url: function(url, replace) {\n    if (isUndefined(url))\n      return this.$$url;\n\n    var match = PATH_MATCH.exec(url);\n    if (match[1]) this.path(decodeURIComponent(match[1]));\n    if (match[2] || match[1]) this.search(match[3] || '');\n    this.hash(match[5] || '', replace);\n\n    return this;\n  },\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#protocol\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return protocol of current url.\n   *\n   * @return {string} protocol of current url\n   */\n  protocol: locationGetter('$$protocol'),\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#host\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return host of current url.\n   *\n   * @return {string} host of current url.\n   */\n  host: locationGetter('$$host'),\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#port\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return port of current url.\n   *\n   * @return {Number} port\n   */\n  port: locationGetter('$$port'),\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#path\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return path of current url when called without any parameter.\n   *\n   * Change path when called with parameter and return `$location`.\n   *\n   * Note: Path should always begin with forward slash (/), this method will add the forward slash\n   * if it is missing.\n   *\n   * @param {string=} path New path\n   * @return {string} path\n   */\n  path: locationGetterSetter('$$path', function(path) {\n    return path.charAt(0) == '/' ? path : '/' + path;\n  }),\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#search\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return search part (as object) of current url when called without any parameter.\n   *\n   * Change search part when called with parameter and return `$location`.\n   *\n   * @param {string|Object.<string>|Object.<Array.<string>>} search New search params - string or\n   * hash object. Hash object may contain an array of values, which will be decoded as duplicates in\n   * the url.\n   *\n   * @param {(string|Array<string>)=} paramValue If `search` is a string, then `paramValue` will override only a\n   * single search parameter. If `paramValue` is an array, it will set the parameter as a\n   * comma-separated value. If `paramValue` is `null`, the parameter will be deleted.\n   *\n   * @return {string} search\n   */\n  search: function(search, paramValue) {\n    switch (arguments.length) {\n      case 0:\n        return this.$$search;\n      case 1:\n        if (isString(search)) {\n          this.$$search = parseKeyValue(search);\n        } else if (isObject(search)) {\n          this.$$search = search;\n        } else {\n          throw $locationMinErr('isrcharg',\n              'The first argument of the `$location#search()` call must be a string or an object.');\n        }\n        break;\n      default:\n        if (isUndefined(paramValue) || paramValue === null) {\n          delete this.$$search[search];\n        } else {\n          this.$$search[search] = paramValue;\n        }\n    }\n\n    this.$$compose();\n    return this;\n  },\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#hash\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return hash fragment when called without any parameter.\n   *\n   * Change hash fragment when called with parameter and return `$location`.\n   *\n   * @param {string=} hash New hash fragment\n   * @return {string} hash\n   */\n  hash: locationGetterSetter('$$hash', identity),\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#replace\n   * @methodOf ng.$location\n   *\n   * @description\n   * If called, all changes to $location during current `$digest` will be replacing current history\n   * record, instead of adding new one.\n   */\n  replace: function() {\n    this.$$replace = true;\n    return this;\n  }\n};\n\nfunction locationGetter(property) {\n  return function() {\n    return this[property];\n  };\n}\n\n\nfunction locationGetterSetter(property, preprocess) {\n  return function(value) {\n    if (isUndefined(value))\n      return this[property];\n\n    this[property] = preprocess(value);\n    this.$$compose();\n\n    return this;\n  };\n}\n\n\n/**\n * @ngdoc object\n * @name ng.$location\n *\n * @requires $browser\n * @requires $sniffer\n * @requires $rootElement\n *\n * @description\n * The $location service parses the URL in the browser address bar (based on the\n * {@link https://developer.mozilla.org/en/window.location window.location}) and makes the URL\n * available to your application. Changes to the URL in the address bar are reflected into\n * $location service and changes to $location are reflected into the browser address bar.\n *\n * **The $location service:**\n *\n * - Exposes the current URL in the browser address bar, so you can\n *   - Watch and observe the URL.\n *   - Change the URL.\n * - Synchronizes the URL with the browser when the user\n *   - Changes the address bar.\n *   - Clicks the back or forward button (or clicks a History link).\n *   - Clicks on a link.\n * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).\n *\n * For more information see {@link guide/dev_guide.services.$location Developer Guide: Angular\n * Services: Using $location}\n */\n\n/**\n * @ngdoc object\n * @name ng.$locationProvider\n * @description\n * Use the `$locationProvider` to configure how the application deep linking paths are stored.\n */\nfunction $LocationProvider(){\n  var hashPrefix = '',\n      html5Mode = false;\n\n  /**\n   * @ngdoc property\n   * @name ng.$locationProvider#hashPrefix\n   * @methodOf ng.$locationProvider\n   * @description\n   * @param {string=} prefix Prefix for hash part (containing path and search)\n   * @returns {*} current value if used as getter or itself (chaining) if used as setter\n   */\n  this.hashPrefix = function(prefix) {\n    if (isDefined(prefix)) {\n      hashPrefix = prefix;\n      return this;\n    } else {\n      return hashPrefix;\n    }\n  };\n\n  /**\n   * @ngdoc property\n   * @name ng.$locationProvider#html5Mode\n   * @methodOf ng.$locationProvider\n   * @description\n   * @param {boolean=} mode Use HTML5 strategy if available.\n   * @returns {*} current value if used as getter or itself (chaining) if used as setter\n   */\n  this.html5Mode = function(mode) {\n    if (isDefined(mode)) {\n      html5Mode = mode;\n      return this;\n    } else {\n      return html5Mode;\n    }\n  };\n\n  /**\n   * @ngdoc event\n   * @name ng.$location#$locationChangeStart\n   * @eventOf ng.$location\n   * @eventType broadcast on root scope\n   * @description\n   * Broadcasted before a URL will change. This change can be prevented by calling\n   * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more\n   * details about event object. Upon successful change\n   * {@link ng.$location#events_$locationChangeSuccess $locationChangeSuccess} is fired.\n   *\n   * @param {Object} angularEvent Synthetic event object.\n   * @param {string} newUrl New URL\n   * @param {string=} oldUrl URL that was before it was changed.\n   */\n\n  /**\n   * @ngdoc event\n   * @name ng.$location#$locationChangeSuccess\n   * @eventOf ng.$location\n   * @eventType broadcast on root scope\n   * @description\n   * Broadcasted after a URL was changed.\n   *\n   * @param {Object} angularEvent Synthetic event object.\n   * @param {string} newUrl New URL\n   * @param {string=} oldUrl URL that was before it was changed.\n   */\n\n  this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement',\n      function( $rootScope,   $browser,   $sniffer,   $rootElement) {\n    var $location,\n        LocationMode,\n        baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''\n        initialUrl = $browser.url(),\n        appBase;\n\n    if (html5Mode) {\n      appBase = serverBase(initialUrl) + (baseHref || '/');\n      LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;\n    } else {\n      appBase = stripHash(initialUrl);\n      LocationMode = LocationHashbangUrl;\n    }\n    $location = new LocationMode(appBase, '#' + hashPrefix);\n    $location.$$parse($location.$$rewrite(initialUrl));\n\n    $rootElement.on('click', function(event) {\n      // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)\n      // currently we open nice url link and redirect then\n\n      if (event.ctrlKey || event.metaKey || event.which == 2) return;\n\n      var elm = jqLite(event.target);\n\n      // traverse the DOM up to find first A tag\n      while (lowercase(elm[0].nodeName) !== 'a') {\n        // ignore rewriting if no A tag (reached root element, or no parent - removed from document)\n        if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;\n      }\n\n      var absHref = elm.prop('href');\n\n      if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {\n        // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during\n        // an animation.\n        absHref = urlResolve(absHref.animVal).href;\n      }\n\n      var rewrittenUrl = $location.$$rewrite(absHref);\n\n      if (absHref && !elm.attr('target') && rewrittenUrl && !event.isDefaultPrevented()) {\n        event.preventDefault();\n        if (rewrittenUrl != $browser.url()) {\n          // update location manually\n          $location.$$parse(rewrittenUrl);\n          $rootScope.$apply();\n          // hack to work around FF6 bug 684208 when scenario runner clicks on links\n          window.angular['ff-684208-preventDefault'] = true;\n        }\n      }\n    });\n\n\n    // rewrite hashbang url <> html5 url\n    if ($location.absUrl() != initialUrl) {\n      $browser.url($location.absUrl(), true);\n    }\n\n    // update $location when $browser url changes\n    $browser.onUrlChange(function(newUrl) {\n      if ($location.absUrl() != newUrl) {\n        $rootScope.$evalAsync(function() {\n          var oldUrl = $location.absUrl();\n\n          $location.$$parse(newUrl);\n          if ($rootScope.$broadcast('$locationChangeStart', newUrl,\n                                    oldUrl).defaultPrevented) {\n            $location.$$parse(oldUrl);\n            $browser.url(oldUrl);\n          } else {\n            afterLocationChange(oldUrl);\n          }\n        });\n        if (!$rootScope.$$phase) $rootScope.$digest();\n      }\n    });\n\n    // update browser\n    var changeCounter = 0;\n    $rootScope.$watch(function $locationWatch() {\n      var oldUrl = $browser.url();\n      var currentReplace = $location.$$replace;\n\n      if (!changeCounter || oldUrl != $location.absUrl()) {\n        changeCounter++;\n        $rootScope.$evalAsync(function() {\n          if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n              defaultPrevented) {\n            $location.$$parse(oldUrl);\n          } else {\n            $browser.url($location.absUrl(), currentReplace);\n            afterLocationChange(oldUrl);\n          }\n        });\n      }\n      $location.$$replace = false;\n\n      return changeCounter;\n    });\n\n    return $location;\n\n    function afterLocationChange(oldUrl) {\n      $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl);\n    }\n}];\n}\n\n/**\n * @ngdoc object\n * @name ng.$log\n * @requires $window\n *\n * @description\n * Simple service for logging. Default implementation safely writes the message\n * into the browser's console (if present).\n * \n * The main purpose of this service is to simplify debugging and troubleshooting.\n *\n * The default is to log `debug` messages. You can use\n * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.\n *\n * @example\n   <example>\n     <file name=\"script.js\">\n       function LogCtrl($scope, $log) {\n         $scope.$log = $log;\n         $scope.message = 'Hello World!';\n       }\n     </file>\n     <file name=\"index.html\">\n       <div ng-controller=\"LogCtrl\">\n         <p>Reload this page with open console, enter text and hit the log button...</p>\n         Message:\n         <input type=\"text\" ng-model=\"message\"/>\n         <button ng-click=\"$log.log(message)\">log</button>\n         <button ng-click=\"$log.warn(message)\">warn</button>\n         <button ng-click=\"$log.info(message)\">info</button>\n         <button ng-click=\"$log.error(message)\">error</button>\n       </div>\n     </file>\n   </example>\n */\n\n/**\n * @ngdoc object\n * @name ng.$logProvider\n * @description\n * Use the `$logProvider` to configure how the application logs messages\n */\nfunction $LogProvider(){\n  var debug = true,\n      self = this;\n  \n  /**\n   * @ngdoc property\n   * @name ng.$logProvider#debugEnabled\n   * @methodOf ng.$logProvider\n   * @description\n   * @param {boolean=} flag enable or disable debug level messages\n   * @returns {*} current value if used as getter or itself (chaining) if used as setter\n   */\n  this.debugEnabled = function(flag) {\n    if (isDefined(flag)) {\n      debug = flag;\n    return this;\n    } else {\n      return debug;\n    }\n  };\n  \n  this.$get = ['$window', function($window){\n    return {\n      /**\n       * @ngdoc method\n       * @name ng.$log#log\n       * @methodOf ng.$log\n       *\n       * @description\n       * Write a log message\n       */\n      log: consoleLog('log'),\n\n      /**\n       * @ngdoc method\n       * @name ng.$log#info\n       * @methodOf ng.$log\n       *\n       * @description\n       * Write an information message\n       */\n      info: consoleLog('info'),\n\n      /**\n       * @ngdoc method\n       * @name ng.$log#warn\n       * @methodOf ng.$log\n       *\n       * @description\n       * Write a warning message\n       */\n      warn: consoleLog('warn'),\n\n      /**\n       * @ngdoc method\n       * @name ng.$log#error\n       * @methodOf ng.$log\n       *\n       * @description\n       * Write an error message\n       */\n      error: consoleLog('error'),\n      \n      /**\n       * @ngdoc method\n       * @name ng.$log#debug\n       * @methodOf ng.$log\n       * \n       * @description\n       * Write a debug message\n       */\n      debug: (function () {\n        var fn = consoleLog('debug');\n\n        return function() {\n          if (debug) {\n            fn.apply(self, arguments);\n          }\n        };\n      }())\n    };\n\n    function formatError(arg) {\n      if (arg instanceof Error) {\n        if (arg.stack) {\n          arg = (arg.message && arg.stack.indexOf(arg.message) === -1)\n              ? 'Error: ' + arg.message + '\\n' + arg.stack\n              : arg.stack;\n        } else if (arg.sourceURL) {\n          arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n        }\n      }\n      return arg;\n    }\n\n    function consoleLog(type) {\n      var console = $window.console || {},\n          logFn = console[type] || console.log || noop,\n          hasApply = false;\n\n      // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.\n      // The reason behind this is that console.log has type \"object\" in IE8...\n      try {\n        hasApply = !! logFn.apply;\n      } catch (e) {}\n\n      if (hasApply) {\n        return function() {\n          var args = [];\n          forEach(arguments, function(arg) {\n            args.push(formatError(arg));\n          });\n          return logFn.apply(console, args);\n        };\n      }\n\n      // we are IE which either doesn't have window.console => this is noop and we do nothing,\n      // or we are IE where console.log doesn't have apply so we log at least first 2 args\n      return function(arg1, arg2) {\n        logFn(arg1, arg2 == null ? '' : arg2);\n      };\n    }\n  }];\n}\n\nvar $parseMinErr = minErr('$parse');\nvar promiseWarningCache = {};\nvar promiseWarning;\n\n// Sandboxing Angular Expressions\n// ------------------------------\n// Angular expressions are generally considered safe because these expressions only have direct\n// access to $scope and locals. However, one can obtain the ability to execute arbitrary JS code by\n// obtaining a reference to native JS functions such as the Function constructor.\n//\n// As an example, consider the following Angular expression:\n//\n//   {}.toString.constructor(alert(\"evil JS code\"))\n//\n// We want to prevent this type of access. For the sake of performance, during the lexing phase we\n// disallow any \"dotted\" access to any member named \"constructor\".\n//\n// For reflective calls (a[b]) we check that the value of the lookup is not the Function constructor\n// while evaluating the expression, which is a stronger but more expensive test. Since reflective\n// calls are expensive anyway, this is not such a big deal compared to static dereferencing.\n//\n// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits\n// against the expression language, but not to prevent exploits that were enabled by exposing\n// sensitive JavaScript or browser apis on Scope. Exposing such objects on a Scope is never a good\n// practice and therefore we are not even trying to protect against interaction with an object\n// explicitly exposed in this way.\n//\n// A developer could foil the name check by aliasing the Function constructor under a different\n// name on the scope.\n//\n// In general, it is not possible to access a Window object from an angular expression unless a\n// window or some DOM object that has a reference to window is published onto a Scope.\n\nfunction ensureSafeMemberName(name, fullExpression) {\n  if (name === \"constructor\") {\n    throw $parseMinErr('isecfld',\n        'Referencing \"constructor\" field in Angular expressions is disallowed! Expression: {0}',\n        fullExpression);\n  }\n  return name;\n}\n\nfunction ensureSafeObject(obj, fullExpression) {\n  // nifty check if obj is Function that is fast and works across iframes and other contexts\n  if (obj) {\n    if (obj.constructor === obj) {\n      throw $parseMinErr('isecfn',\n          'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n          fullExpression);\n    } else if (// isWindow(obj)\n        obj.document && obj.location && obj.alert && obj.setInterval) {\n      throw $parseMinErr('isecwindow',\n          'Referencing the Window in Angular expressions is disallowed! Expression: {0}',\n          fullExpression);\n    } else if (// isElement(obj)\n        obj.children && (obj.nodeName || (obj.on && obj.find))) {\n      throw $parseMinErr('isecdom',\n          'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',\n          fullExpression);\n    }\n  }\n  return obj;\n}\n\nvar OPERATORS = {\n    /* jshint bitwise : false */\n    'null':function(){return null;},\n    'true':function(){return true;},\n    'false':function(){return false;},\n    undefined:noop,\n    '+':function(self, locals, a,b){\n      a=a(self, locals); b=b(self, locals);\n      if (isDefined(a)) {\n        if (isDefined(b)) {\n          return a + b;\n        }\n        return a;\n      }\n      return isDefined(b)?b:undefined;},\n    '-':function(self, locals, a,b){\n          a=a(self, locals); b=b(self, locals);\n          return (isDefined(a)?a:0)-(isDefined(b)?b:0);\n        },\n    '*':function(self, locals, a,b){return a(self, locals)*b(self, locals);},\n    '/':function(self, locals, a,b){return a(self, locals)/b(self, locals);},\n    '%':function(self, locals, a,b){return a(self, locals)%b(self, locals);},\n    '^':function(self, locals, a,b){return a(self, locals)^b(self, locals);},\n    '=':noop,\n    '===':function(self, locals, a, b){return a(self, locals)===b(self, locals);},\n    '!==':function(self, locals, a, b){return a(self, locals)!==b(self, locals);},\n    '==':function(self, locals, a,b){return a(self, locals)==b(self, locals);},\n    '!=':function(self, locals, a,b){return a(self, locals)!=b(self, locals);},\n    '<':function(self, locals, a,b){return a(self, locals)<b(self, locals);},\n    '>':function(self, locals, a,b){return a(self, locals)>b(self, locals);},\n    '<=':function(self, locals, a,b){return a(self, locals)<=b(self, locals);},\n    '>=':function(self, locals, a,b){return a(self, locals)>=b(self, locals);},\n    '&&':function(self, locals, a,b){return a(self, locals)&&b(self, locals);},\n    '||':function(self, locals, a,b){return a(self, locals)||b(self, locals);},\n    '&':function(self, locals, a,b){return a(self, locals)&b(self, locals);},\n//    '|':function(self, locals, a,b){return a|b;},\n    '|':function(self, locals, a,b){return b(self, locals)(self, locals, a(self, locals));},\n    '!':function(self, locals, a){return !a(self, locals);}\n};\n/* jshint bitwise: true */\nvar ESCAPE = {\"n\":\"\\n\", \"f\":\"\\f\", \"r\":\"\\r\", \"t\":\"\\t\", \"v\":\"\\v\", \"'\":\"'\", '\"':'\"'};\n\n\n/////////////////////////////////////////\n\n\n/**\n * @constructor\n */\nvar Lexer = function (options) {\n  this.options = options;\n};\n\nLexer.prototype = {\n  constructor: Lexer,\n\n  lex: function (text) {\n    this.text = text;\n\n    this.index = 0;\n    this.ch = undefined;\n    this.lastCh = ':'; // can start regexp\n\n    this.tokens = [];\n\n    var token;\n    var json = [];\n\n    while (this.index < this.text.length) {\n      this.ch = this.text.charAt(this.index);\n      if (this.is('\"\\'')) {\n        this.readString(this.ch);\n      } else if (this.isNumber(this.ch) || this.is('.') && this.isNumber(this.peek())) {\n        this.readNumber();\n      } else if (this.isIdent(this.ch)) {\n        this.readIdent();\n        // identifiers can only be if the preceding char was a { or ,\n        if (this.was('{,') && json[0] === '{' &&\n            (token = this.tokens[this.tokens.length - 1])) {\n          token.json = token.text.indexOf('.') === -1;\n        }\n      } else if (this.is('(){}[].,;:?')) {\n        this.tokens.push({\n          index: this.index,\n          text: this.ch,\n          json: (this.was(':[,') && this.is('{[')) || this.is('}]:,')\n        });\n        if (this.is('{[')) json.unshift(this.ch);\n        if (this.is('}]')) json.shift();\n        this.index++;\n      } else if (this.isWhitespace(this.ch)) {\n        this.index++;\n        continue;\n      } else {\n        var ch2 = this.ch + this.peek();\n        var ch3 = ch2 + this.peek(2);\n        var fn = OPERATORS[this.ch];\n        var fn2 = OPERATORS[ch2];\n        var fn3 = OPERATORS[ch3];\n        if (fn3) {\n          this.tokens.push({index: this.index, text: ch3, fn: fn3});\n          this.index += 3;\n        } else if (fn2) {\n          this.tokens.push({index: this.index, text: ch2, fn: fn2});\n          this.index += 2;\n        } else if (fn) {\n          this.tokens.push({\n            index: this.index,\n            text: this.ch,\n            fn: fn,\n            json: (this.was('[,:') && this.is('+-'))\n          });\n          this.index += 1;\n        } else {\n          this.throwError('Unexpected next character ', this.index, this.index + 1);\n        }\n      }\n      this.lastCh = this.ch;\n    }\n    return this.tokens;\n  },\n\n  is: function(chars) {\n    return chars.indexOf(this.ch) !== -1;\n  },\n\n  was: function(chars) {\n    return chars.indexOf(this.lastCh) !== -1;\n  },\n\n  peek: function(i) {\n    var num = i || 1;\n    return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;\n  },\n\n  isNumber: function(ch) {\n    return ('0' <= ch && ch <= '9');\n  },\n\n  isWhitespace: function(ch) {\n    // IE treats non-breaking space as \\u00A0\n    return (ch === ' ' || ch === '\\r' || ch === '\\t' ||\n            ch === '\\n' || ch === '\\v' || ch === '\\u00A0');\n  },\n\n  isIdent: function(ch) {\n    return ('a' <= ch && ch <= 'z' ||\n            'A' <= ch && ch <= 'Z' ||\n            '_' === ch || ch === '$');\n  },\n\n  isExpOperator: function(ch) {\n    return (ch === '-' || ch === '+' || this.isNumber(ch));\n  },\n\n  throwError: function(error, start, end) {\n    end = end || this.index;\n    var colStr = (isDefined(start)\n            ? 's ' + start +  '-' + this.index + ' [' + this.text.substring(start, end) + ']'\n            : ' ' + end);\n    throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',\n        error, colStr, this.text);\n  },\n\n  readNumber: function() {\n    var number = '';\n    var start = this.index;\n    while (this.index < this.text.length) {\n      var ch = lowercase(this.text.charAt(this.index));\n      if (ch == '.' || this.isNumber(ch)) {\n        number += ch;\n      } else {\n        var peekCh = this.peek();\n        if (ch == 'e' && this.isExpOperator(peekCh)) {\n          number += ch;\n        } else if (this.isExpOperator(ch) &&\n            peekCh && this.isNumber(peekCh) &&\n            number.charAt(number.length - 1) == 'e') {\n          number += ch;\n        } else if (this.isExpOperator(ch) &&\n            (!peekCh || !this.isNumber(peekCh)) &&\n            number.charAt(number.length - 1) == 'e') {\n          this.throwError('Invalid exponent');\n        } else {\n          break;\n        }\n      }\n      this.index++;\n    }\n    number = 1 * number;\n    this.tokens.push({\n      index: start,\n      text: number,\n      json: true,\n      fn: function() { return number; }\n    });\n  },\n\n  readIdent: function() {\n    var parser = this;\n\n    var ident = '';\n    var start = this.index;\n\n    var lastDot, peekIndex, methodName, ch;\n\n    while (this.index < this.text.length) {\n      ch = this.text.charAt(this.index);\n      if (ch === '.' || this.isIdent(ch) || this.isNumber(ch)) {\n        if (ch === '.') lastDot = this.index;\n        ident += ch;\n      } else {\n        break;\n      }\n      this.index++;\n    }\n\n    //check if this is not a method invocation and if it is back out to last dot\n    if (lastDot) {\n      peekIndex = this.index;\n      while (peekIndex < this.text.length) {\n        ch = this.text.charAt(peekIndex);\n        if (ch === '(') {\n          methodName = ident.substr(lastDot - start + 1);\n          ident = ident.substr(0, lastDot - start);\n          this.index = peekIndex;\n          break;\n        }\n        if (this.isWhitespace(ch)) {\n          peekIndex++;\n        } else {\n          break;\n        }\n      }\n    }\n\n\n    var token = {\n      index: start,\n      text: ident\n    };\n\n    // OPERATORS is our own object so we don't need to use special hasOwnPropertyFn\n    if (OPERATORS.hasOwnProperty(ident)) {\n      token.fn = OPERATORS[ident];\n      token.json = OPERATORS[ident];\n    } else {\n      var getter = getterFn(ident, this.options, this.text);\n      token.fn = extend(function(self, locals) {\n        return (getter(self, locals));\n      }, {\n        assign: function(self, value) {\n          return setter(self, ident, value, parser.text, parser.options);\n        }\n      });\n    }\n\n    this.tokens.push(token);\n\n    if (methodName) {\n      this.tokens.push({\n        index:lastDot,\n        text: '.',\n        json: false\n      });\n      this.tokens.push({\n        index: lastDot + 1,\n        text: methodName,\n        json: false\n      });\n    }\n  },\n\n  readString: function(quote) {\n    var start = this.index;\n    this.index++;\n    var string = '';\n    var rawString = quote;\n    var escape = false;\n    while (this.index < this.text.length) {\n      var ch = this.text.charAt(this.index);\n      rawString += ch;\n      if (escape) {\n        if (ch === 'u') {\n          var hex = this.text.substring(this.index + 1, this.index + 5);\n          if (!hex.match(/[\\da-f]{4}/i))\n            this.throwError('Invalid unicode escape [\\\\u' + hex + ']');\n          this.index += 4;\n          string += String.fromCharCode(parseInt(hex, 16));\n        } else {\n          var rep = ESCAPE[ch];\n          if (rep) {\n            string += rep;\n          } else {\n            string += ch;\n          }\n        }\n        escape = false;\n      } else if (ch === '\\\\') {\n        escape = true;\n      } else if (ch === quote) {\n        this.index++;\n        this.tokens.push({\n          index: start,\n          text: rawString,\n          string: string,\n          json: true,\n          fn: function() { return string; }\n        });\n        return;\n      } else {\n        string += ch;\n      }\n      this.index++;\n    }\n    this.throwError('Unterminated quote', start);\n  }\n};\n\n\n/**\n * @constructor\n */\nvar Parser = function (lexer, $filter, options) {\n  this.lexer = lexer;\n  this.$filter = $filter;\n  this.options = options;\n};\n\nParser.ZERO = function () { return 0; };\n\nParser.prototype = {\n  constructor: Parser,\n\n  parse: function (text, json) {\n    this.text = text;\n\n    //TODO(i): strip all the obsolte json stuff from this file\n    this.json = json;\n\n    this.tokens = this.lexer.lex(text);\n\n    if (json) {\n      // The extra level of aliasing is here, just in case the lexer misses something, so that\n      // we prevent any accidental execution in JSON.\n      this.assignment = this.logicalOR;\n\n      this.functionCall =\n      this.fieldAccess =\n      this.objectIndex =\n      this.filterChain = function() {\n        this.throwError('is not valid json', {text: text, index: 0});\n      };\n    }\n\n    var value = json ? this.primary() : this.statements();\n\n    if (this.tokens.length !== 0) {\n      this.throwError('is an unexpected token', this.tokens[0]);\n    }\n\n    value.literal = !!value.literal;\n    value.constant = !!value.constant;\n\n    return value;\n  },\n\n  primary: function () {\n    var primary;\n    if (this.expect('(')) {\n      primary = this.filterChain();\n      this.consume(')');\n    } else if (this.expect('[')) {\n      primary = this.arrayDeclaration();\n    } else if (this.expect('{')) {\n      primary = this.object();\n    } else {\n      var token = this.expect();\n      primary = token.fn;\n      if (!primary) {\n        this.throwError('not a primary expression', token);\n      }\n      if (token.json) {\n        primary.constant = true;\n        primary.literal = true;\n      }\n    }\n\n    var next, context;\n    while ((next = this.expect('(', '[', '.'))) {\n      if (next.text === '(') {\n        primary = this.functionCall(primary, context);\n        context = null;\n      } else if (next.text === '[') {\n        context = primary;\n        primary = this.objectIndex(primary);\n      } else if (next.text === '.') {\n        context = primary;\n        primary = this.fieldAccess(primary);\n      } else {\n        this.throwError('IMPOSSIBLE');\n      }\n    }\n    return primary;\n  },\n\n  throwError: function(msg, token) {\n    throw $parseMinErr('syntax',\n        'Syntax Error: Token \\'{0}\\' {1} at column {2} of the expression [{3}] starting at [{4}].',\n          token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));\n  },\n\n  peekToken: function() {\n    if (this.tokens.length === 0)\n      throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n    return this.tokens[0];\n  },\n\n  peek: function(e1, e2, e3, e4) {\n    if (this.tokens.length > 0) {\n      var token = this.tokens[0];\n      var t = token.text;\n      if (t === e1 || t === e2 || t === e3 || t === e4 ||\n          (!e1 && !e2 && !e3 && !e4)) {\n        return token;\n      }\n    }\n    return false;\n  },\n\n  expect: function(e1, e2, e3, e4){\n    var token = this.peek(e1, e2, e3, e4);\n    if (token) {\n      if (this.json && !token.json) {\n        this.throwError('is not valid json', token);\n      }\n      this.tokens.shift();\n      return token;\n    }\n    return false;\n  },\n\n  consume: function(e1){\n    if (!this.expect(e1)) {\n      this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());\n    }\n  },\n\n  unaryFn: function(fn, right) {\n    return extend(function(self, locals) {\n      return fn(self, locals, right);\n    }, {\n      constant:right.constant\n    });\n  },\n\n  ternaryFn: function(left, middle, right){\n    return extend(function(self, locals){\n      return left(self, locals) ? middle(self, locals) : right(self, locals);\n    }, {\n      constant: left.constant && middle.constant && right.constant\n    });\n  },\n\n  binaryFn: function(left, fn, right) {\n    return extend(function(self, locals) {\n      return fn(self, locals, left, right);\n    }, {\n      constant:left.constant && right.constant\n    });\n  },\n\n  statements: function() {\n    var statements = [];\n    while (true) {\n      if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))\n        statements.push(this.filterChain());\n      if (!this.expect(';')) {\n        // optimize for the common case where there is only one statement.\n        // TODO(size): maybe we should not support multiple statements?\n        return (statements.length === 1)\n            ? statements[0]\n            : function(self, locals) {\n                var value;\n                for (var i = 0; i < statements.length; i++) {\n                  var statement = statements[i];\n                  if (statement) {\n                    value = statement(self, locals);\n                  }\n                }\n                return value;\n              };\n      }\n    }\n  },\n\n  filterChain: function() {\n    var left = this.expression();\n    var token;\n    while (true) {\n      if ((token = this.expect('|'))) {\n        left = this.binaryFn(left, token.fn, this.filter());\n      } else {\n        return left;\n      }\n    }\n  },\n\n  filter: function() {\n    var token = this.expect();\n    var fn = this.$filter(token.text);\n    var argsFn = [];\n    while (true) {\n      if ((token = this.expect(':'))) {\n        argsFn.push(this.expression());\n      } else {\n        var fnInvoke = function(self, locals, input) {\n          var args = [input];\n          for (var i = 0; i < argsFn.length; i++) {\n            args.push(argsFn[i](self, locals));\n          }\n          return fn.apply(self, args);\n        };\n        return function() {\n          return fnInvoke;\n        };\n      }\n    }\n  },\n\n  expression: function() {\n    return this.assignment();\n  },\n\n  assignment: function() {\n    var left = this.ternary();\n    var right;\n    var token;\n    if ((token = this.expect('='))) {\n      if (!left.assign) {\n        this.throwError('implies assignment but [' +\n            this.text.substring(0, token.index) + '] can not be assigned to', token);\n      }\n      right = this.ternary();\n      return function(scope, locals) {\n        return left.assign(scope, right(scope, locals), locals);\n      };\n    }\n    return left;\n  },\n\n  ternary: function() {\n    var left = this.logicalOR();\n    var middle;\n    var token;\n    if ((token = this.expect('?'))) {\n      middle = this.ternary();\n      if ((token = this.expect(':'))) {\n        return this.ternaryFn(left, middle, this.ternary());\n      } else {\n        this.throwError('expected :', token);\n      }\n    } else {\n      return left;\n    }\n  },\n\n  logicalOR: function() {\n    var left = this.logicalAND();\n    var token;\n    while (true) {\n      if ((token = this.expect('||'))) {\n        left = this.binaryFn(left, token.fn, this.logicalAND());\n      } else {\n        return left;\n      }\n    }\n  },\n\n  logicalAND: function() {\n    var left = this.equality();\n    var token;\n    if ((token = this.expect('&&'))) {\n      left = this.binaryFn(left, token.fn, this.logicalAND());\n    }\n    return left;\n  },\n\n  equality: function() {\n    var left = this.relational();\n    var token;\n    if ((token = this.expect('==','!=','===','!=='))) {\n      left = this.binaryFn(left, token.fn, this.equality());\n    }\n    return left;\n  },\n\n  relational: function() {\n    var left = this.additive();\n    var token;\n    if ((token = this.expect('<', '>', '<=', '>='))) {\n      left = this.binaryFn(left, token.fn, this.relational());\n    }\n    return left;\n  },\n\n  additive: function() {\n    var left = this.multiplicative();\n    var token;\n    while ((token = this.expect('+','-'))) {\n      left = this.binaryFn(left, token.fn, this.multiplicative());\n    }\n    return left;\n  },\n\n  multiplicative: function() {\n    var left = this.unary();\n    var token;\n    while ((token = this.expect('*','/','%'))) {\n      left = this.binaryFn(left, token.fn, this.unary());\n    }\n    return left;\n  },\n\n  unary: function() {\n    var token;\n    if (this.expect('+')) {\n      return this.primary();\n    } else if ((token = this.expect('-'))) {\n      return this.binaryFn(Parser.ZERO, token.fn, this.unary());\n    } else if ((token = this.expect('!'))) {\n      return this.unaryFn(token.fn, this.unary());\n    } else {\n      return this.primary();\n    }\n  },\n\n  fieldAccess: function(object) {\n    var parser = this;\n    var field = this.expect().text;\n    var getter = getterFn(field, this.options, this.text);\n\n    return extend(function(scope, locals, self) {\n      return getter(self || object(scope, locals));\n    }, {\n      assign: function(scope, value, locals) {\n        return setter(object(scope, locals), field, value, parser.text, parser.options);\n      }\n    });\n  },\n\n  objectIndex: function(obj) {\n    var parser = this;\n\n    var indexFn = this.expression();\n    this.consume(']');\n\n    return extend(function(self, locals) {\n      var o = obj(self, locals),\n          i = indexFn(self, locals),\n          v, p;\n\n      if (!o) return undefined;\n      v = ensureSafeObject(o[i], parser.text);\n      if (v && v.then && parser.options.unwrapPromises) {\n        p = v;\n        if (!('$$v' in v)) {\n          p.$$v = undefined;\n          p.then(function(val) { p.$$v = val; });\n        }\n        v = v.$$v;\n      }\n      return v;\n    }, {\n      assign: function(self, value, locals) {\n        var key = indexFn(self, locals);\n        // prevent overwriting of Function.constructor which would break ensureSafeObject check\n        var safe = ensureSafeObject(obj(self, locals), parser.text);\n        return safe[key] = value;\n      }\n    });\n  },\n\n  functionCall: function(fn, contextGetter) {\n    var argsFn = [];\n    if (this.peekToken().text !== ')') {\n      do {\n        argsFn.push(this.expression());\n      } while (this.expect(','));\n    }\n    this.consume(')');\n\n    var parser = this;\n\n    return function(scope, locals) {\n      var args = [];\n      var context = contextGetter ? contextGetter(scope, locals) : scope;\n\n      for (var i = 0; i < argsFn.length; i++) {\n        args.push(argsFn[i](scope, locals));\n      }\n      var fnPtr = fn(scope, locals, context) || noop;\n\n      ensureSafeObject(context, parser.text);\n      ensureSafeObject(fnPtr, parser.text);\n\n      // IE stupidity! (IE doesn't have apply for some native functions)\n      var v = fnPtr.apply\n            ? fnPtr.apply(context, args)\n            : fnPtr(args[0], args[1], args[2], args[3], args[4]);\n\n      return ensureSafeObject(v, parser.text);\n    };\n  },\n\n  // This is used with json array declaration\n  arrayDeclaration: function () {\n    var elementFns = [];\n    var allConstant = true;\n    if (this.peekToken().text !== ']') {\n      do {\n        var elementFn = this.expression();\n        elementFns.push(elementFn);\n        if (!elementFn.constant) {\n          allConstant = false;\n        }\n      } while (this.expect(','));\n    }\n    this.consume(']');\n\n    return extend(function(self, locals) {\n      var array = [];\n      for (var i = 0; i < elementFns.length; i++) {\n        array.push(elementFns[i](self, locals));\n      }\n      return array;\n    }, {\n      literal: true,\n      constant: allConstant\n    });\n  },\n\n  object: function () {\n    var keyValues = [];\n    var allConstant = true;\n    if (this.peekToken().text !== '}') {\n      do {\n        var token = this.expect(),\n        key = token.string || token.text;\n        this.consume(':');\n        var value = this.expression();\n        keyValues.push({key: key, value: value});\n        if (!value.constant) {\n          allConstant = false;\n        }\n      } while (this.expect(','));\n    }\n    this.consume('}');\n\n    return extend(function(self, locals) {\n      var object = {};\n      for (var i = 0; i < keyValues.length; i++) {\n        var keyValue = keyValues[i];\n        object[keyValue.key] = keyValue.value(self, locals);\n      }\n      return object;\n    }, {\n      literal: true,\n      constant: allConstant\n    });\n  }\n};\n\n\n//////////////////////////////////////////////////\n// Parser helper functions\n//////////////////////////////////////////////////\n\nfunction setter(obj, path, setValue, fullExp, options) {\n  //needed?\n  options = options || {};\n\n  var element = path.split('.'), key;\n  for (var i = 0; element.length > 1; i++) {\n    key = ensureSafeMemberName(element.shift(), fullExp);\n    var propertyObj = obj[key];\n    if (!propertyObj) {\n      propertyObj = {};\n      obj[key] = propertyObj;\n    }\n    obj = propertyObj;\n    if (obj.then && options.unwrapPromises) {\n      promiseWarning(fullExp);\n      if (!(\"$$v\" in obj)) {\n        (function(promise) {\n          promise.then(function(val) { promise.$$v = val; }); }\n        )(obj);\n      }\n      if (obj.$$v === undefined) {\n        obj.$$v = {};\n      }\n      obj = obj.$$v;\n    }\n  }\n  key = ensureSafeMemberName(element.shift(), fullExp);\n  obj[key] = setValue;\n  return setValue;\n}\n\nvar getterFnCache = {};\n\n/**\n * Implementation of the \"Black Hole\" variant from:\n * - http://jsperf.com/angularjs-parse-getter/4\n * - http://jsperf.com/path-evaluation-simplified/7\n */\nfunction cspSafeGetterFn(key0, key1, key2, key3, key4, fullExp, options) {\n  ensureSafeMemberName(key0, fullExp);\n  ensureSafeMemberName(key1, fullExp);\n  ensureSafeMemberName(key2, fullExp);\n  ensureSafeMemberName(key3, fullExp);\n  ensureSafeMemberName(key4, fullExp);\n\n  return !options.unwrapPromises\n      ? function cspSafeGetter(scope, locals) {\n          var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope;\n\n          if (pathVal == null) return pathVal;\n          pathVal = pathVal[key0];\n\n          if (!key1) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key1];\n\n          if (!key2) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key2];\n\n          if (!key3) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key3];\n\n          if (!key4) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key4];\n\n          return pathVal;\n        }\n      : function cspSafePromiseEnabledGetter(scope, locals) {\n          var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope,\n              promise;\n\n          if (pathVal == null) return pathVal;\n\n          pathVal = pathVal[key0];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n\n          if (!key1) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key1];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n\n          if (!key2) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key2];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n\n          if (!key3) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key3];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n\n          if (!key4) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key4];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n          return pathVal;\n        };\n}\n\nfunction simpleGetterFn1(key0, fullExp) {\n  ensureSafeMemberName(key0, fullExp);\n\n  return function simpleGetterFn1(scope, locals) {\n    if (scope == null) return undefined;\n    return ((locals && locals.hasOwnProperty(key0)) ? locals : scope)[key0];\n  };\n}\n\nfunction simpleGetterFn2(key0, key1, fullExp) {\n  ensureSafeMemberName(key0, fullExp);\n  ensureSafeMemberName(key1, fullExp);\n\n  return function simpleGetterFn2(scope, locals) {\n    if (scope == null) return undefined;\n    scope = ((locals && locals.hasOwnProperty(key0)) ? locals : scope)[key0];\n    return scope == null ? undefined : scope[key1];\n  };\n}\n\nfunction getterFn(path, options, fullExp) {\n  // Check whether the cache has this getter already.\n  // We can use hasOwnProperty directly on the cache because we ensure,\n  // see below, that the cache never stores a path called 'hasOwnProperty'\n  if (getterFnCache.hasOwnProperty(path)) {\n    return getterFnCache[path];\n  }\n\n  var pathKeys = path.split('.'),\n      pathKeysLength = pathKeys.length,\n      fn;\n\n  // When we have only 1 or 2 tokens, use optimized special case closures.\n  // https://jsperf.com/angularjs-parse-getter/6\n  if (!options.unwrapPromises && pathKeysLength === 1) {\n    fn = simpleGetterFn1(pathKeys[0], fullExp);\n  } else if (!options.unwrapPromises && pathKeysLength === 2) {\n    fn = simpleGetterFn2(pathKeys[0], pathKeys[1], fullExp);\n  } else if (options.csp) {\n    if (pathKeysLength < 6) {\n      fn = cspSafeGetterFn(pathKeys[0], pathKeys[1], pathKeys[2], pathKeys[3], pathKeys[4], fullExp,\n                          options);\n    } else {\n      fn = function(scope, locals) {\n        var i = 0, val;\n        do {\n          val = cspSafeGetterFn(pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++],\n                                pathKeys[i++], fullExp, options)(scope, locals);\n\n          locals = undefined; // clear after first iteration\n          scope = val;\n        } while (i < pathKeysLength);\n        return val;\n      };\n    }\n  } else {\n    var code = 'var p;\\n';\n    forEach(pathKeys, function(key, index) {\n      ensureSafeMemberName(key, fullExp);\n      code += 'if(s == null) return undefined;\\n' +\n              's='+ (index\n                      // we simply dereference 's' on any .dot notation\n                      ? 's'\n                      // but if we are first then we check locals first, and if so read it first\n                      : '((k&&k.hasOwnProperty(\"' + key + '\"))?k:s)') + '[\"' + key + '\"]' + ';\\n' +\n              (options.unwrapPromises\n                ? 'if (s && s.then) {\\n' +\n                  ' pw(\"' + fullExp.replace(/([\"\\r\\n])/g, '\\\\$1') + '\");\\n' +\n                  ' if (!(\"$$v\" in s)) {\\n' +\n                    ' p=s;\\n' +\n                    ' p.$$v = undefined;\\n' +\n                    ' p.then(function(v) {p.$$v=v;});\\n' +\n                    '}\\n' +\n                  ' s=s.$$v\\n' +\n                '}\\n'\n                : '');\n    });\n    code += 'return s;';\n\n    /* jshint -W054 */\n    var evaledFnGetter = new Function('s', 'k', 'pw', code); // s=scope, k=locals, pw=promiseWarning\n    /* jshint +W054 */\n    evaledFnGetter.toString = valueFn(code);\n    fn = options.unwrapPromises ? function(scope, locals) {\n      return evaledFnGetter(scope, locals, promiseWarning);\n    } : evaledFnGetter;\n  }\n\n  // Only cache the value if it's not going to mess up the cache object\n  // This is more performant that using Object.prototype.hasOwnProperty.call\n  if (path !== 'hasOwnProperty') {\n    getterFnCache[path] = fn;\n  }\n  return fn;\n}\n\n///////////////////////////////////\n\n/**\n * @ngdoc function\n * @name ng.$parse\n * @function\n *\n * @description\n *\n * Converts Angular {@link guide/expression expression} into a function.\n *\n * <pre>\n *   var getter = $parse('user.name');\n *   var setter = getter.assign;\n *   var context = {user:{name:'angular'}};\n *   var locals = {user:{name:'local'}};\n *\n *   expect(getter(context)).toEqual('angular');\n *   setter(context, 'newValue');\n *   expect(context.user.name).toEqual('newValue');\n *   expect(getter(context, locals)).toEqual('local');\n * </pre>\n *\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n *      are evaluated against (typically a scope object).\n *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n *      `context`.\n *\n *    The returned function also has the following properties:\n *      * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript\n *        literal.\n *      * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript\n *        constant literals.\n *      * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be\n *        set to a function to change its value on the given context.\n *\n */\n\n\n/**\n * @ngdoc object\n * @name ng.$parseProvider\n * @function\n *\n * @description\n * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}\n *  service.\n */\nfunction $ParseProvider() {\n  var cache = {};\n\n  var $parseOptions = {\n    csp: false,\n    unwrapPromises: false,\n    logPromiseWarnings: true\n  };\n\n\n  /**\n   * @deprecated Promise unwrapping via $parse is deprecated and will be removed in the future.\n   *\n   * @ngdoc method\n   * @name ng.$parseProvider#unwrapPromises\n   * @methodOf ng.$parseProvider\n   * @description\n   *\n   * **This feature is deprecated, see deprecation notes below for more info**\n   *\n   * If set to true (default is false), $parse will unwrap promises automatically when a promise is\n   * found at any part of the expression. In other words, if set to true, the expression will always\n   * result in a non-promise value.\n   *\n   * While the promise is unresolved, it's treated as undefined, but once resolved and fulfilled,\n   * the fulfillment value is used in place of the promise while evaluating the expression.\n   *\n   * **Deprecation notice**\n   *\n   * This is a feature that didn't prove to be wildly useful or popular, primarily because of the\n   * dichotomy between data access in templates (accessed as raw values) and controller code\n   * (accessed as promises).\n   *\n   * In most code we ended up resolving promises manually in controllers anyway and thus unifying\n   * the model access there.\n   *\n   * Other downsides of automatic promise unwrapping:\n   *\n   * - when building components it's often desirable to receive the raw promises\n   * - adds complexity and slows down expression evaluation\n   * - makes expression code pre-generation unattractive due to the amount of code that needs to be\n   *   generated\n   * - makes IDE auto-completion and tool support hard\n   *\n   * **Warning Logs**\n   *\n   * If the unwrapping is enabled, Angular will log a warning about each expression that unwraps a\n   * promise (to reduce the noise, each expression is logged only once). To disable this logging use\n   * `$parseProvider.logPromiseWarnings(false)` api.\n   *\n   *\n   * @param {boolean=} value New value.\n   * @returns {boolean|self} Returns the current setting when used as getter and self if used as\n   *                         setter.\n   */\n  this.unwrapPromises = function(value) {\n    if (isDefined(value)) {\n      $parseOptions.unwrapPromises = !!value;\n      return this;\n    } else {\n      return $parseOptions.unwrapPromises;\n    }\n  };\n\n\n  /**\n   * @deprecated Promise unwrapping via $parse is deprecated and will be removed in the future.\n   *\n   * @ngdoc method\n   * @name ng.$parseProvider#logPromiseWarnings\n   * @methodOf ng.$parseProvider\n   * @description\n   *\n   * Controls whether Angular should log a warning on any encounter of a promise in an expression.\n   *\n   * The default is set to `true`.\n   *\n   * This setting applies only if `$parseProvider.unwrapPromises` setting is set to true as well.\n   *\n   * @param {boolean=} value New value.\n   * @returns {boolean|self} Returns the current setting when used as getter and self if used as\n   *                         setter.\n   */\n this.logPromiseWarnings = function(value) {\n    if (isDefined(value)) {\n      $parseOptions.logPromiseWarnings = value;\n      return this;\n    } else {\n      return $parseOptions.logPromiseWarnings;\n    }\n  };\n\n\n  this.$get = ['$filter', '$sniffer', '$log', function($filter, $sniffer, $log) {\n    $parseOptions.csp = $sniffer.csp;\n\n    promiseWarning = function promiseWarningFn(fullExp) {\n      if (!$parseOptions.logPromiseWarnings || promiseWarningCache.hasOwnProperty(fullExp)) return;\n      promiseWarningCache[fullExp] = true;\n      $log.warn('[$parse] Promise found in the expression `' + fullExp + '`. ' +\n          'Automatic unwrapping of promises in Angular expressions is deprecated.');\n    };\n\n    return function(exp) {\n      var parsedExpression;\n\n      switch (typeof exp) {\n        case 'string':\n\n          if (cache.hasOwnProperty(exp)) {\n            return cache[exp];\n          }\n\n          var lexer = new Lexer($parseOptions);\n          var parser = new Parser(lexer, $filter, $parseOptions);\n          parsedExpression = parser.parse(exp, false);\n\n          if (exp !== 'hasOwnProperty') {\n            // Only cache the value if it's not going to mess up the cache object\n            // This is more performant that using Object.prototype.hasOwnProperty.call\n            cache[exp] = parsedExpression;\n          }\n\n          return parsedExpression;\n\n        case 'function':\n          return exp;\n\n        default:\n          return noop;\n      }\n    };\n  }];\n}\n\n/**\n * @ngdoc service\n * @name ng.$q\n * @requires $rootScope\n *\n * @description\n * A promise/deferred implementation inspired by [Kris Kowal's Q](https://github.com/kriskowal/q).\n *\n * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an\n * interface for interacting with an object that represents the result of an action that is\n * performed asynchronously, and may or may not be finished at any given point in time.\n *\n * From the perspective of dealing with error handling, deferred and promise APIs are to\n * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.\n *\n * <pre>\n *   // for the purpose of this example let's assume that variables `$q`, `scope` and `okToGreet`\n *   // are available in the current lexical scope (they could have been injected or passed in).\n * \n *   function asyncGreet(name) {\n *     var deferred = $q.defer();\n *\n *     setTimeout(function() {\n *       // since this fn executes async in a future turn of the event loop, we need to wrap\n *       // our code into an $apply call so that the model changes are properly observed.\n *       scope.$apply(function() {\n *         deferred.notify('About to greet ' + name + '.');\n *\n *         if (okToGreet(name)) {\n *           deferred.resolve('Hello, ' + name + '!');\n *         } else {\n *           deferred.reject('Greeting ' + name + ' is not allowed.');\n *         }\n *       });\n *     }, 1000);\n *\n *     return deferred.promise;\n *   }\n *\n *   var promise = asyncGreet('Robin Hood');\n *   promise.then(function(greeting) {\n *     alert('Success: ' + greeting);\n *   }, function(reason) {\n *     alert('Failed: ' + reason);\n *   }, function(update) {\n *     alert('Got notification: ' + update);\n *   });\n * </pre>\n *\n * At first it might not be obvious why this extra complexity is worth the trouble. The payoff\n * comes in the way of guarantees that promise and deferred APIs make, see\n * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.\n *\n * Additionally the promise api allows for composition that is very hard to do with the\n * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.\n * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the\n * section on serial or parallel joining of promises.\n *\n *\n * # The Deferred API\n *\n * A new instance of deferred is constructed by calling `$q.defer()`.\n *\n * The purpose of the deferred object is to expose the associated Promise instance as well as APIs\n * that can be used for signaling the successful or unsuccessful completion, as well as the status\n * of the task.\n *\n * **Methods**\n *\n * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection\n *   constructed via `$q.reject`, the promise will be rejected instead.\n * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to\n *   resolving it with a rejection constructed via `$q.reject`.\n * - `notify(value)` - provides updates on the status of the promise's execution. This may be called\n *   multiple times before the promise is either resolved or rejected.\n *\n * **Properties**\n *\n * - promise – `{Promise}` – promise object associated with this deferred.\n *\n *\n * # The Promise API\n *\n * A new promise instance is created when a deferred instance is created and can be retrieved by\n * calling `deferred.promise`.\n *\n * The purpose of the promise object is to allow for interested parties to get access to the result\n * of the deferred task when it completes.\n *\n * **Methods**\n *\n * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or\n *   will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously\n *   as soon as the result is available. The callbacks are called with a single argument: the result\n *   or rejection reason. Additionally, the notify callback may be called zero or more times to\n *   provide a progress indication, before the promise is resolved or rejected.\n *\n *   This method *returns a new promise* which is resolved or rejected via the return value of the\n *   `successCallback`, `errorCallback`. It also notifies via the return value of the\n *   `notifyCallback` method. The promise can not be resolved or rejected from the notifyCallback\n *   method.\n *\n * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`\n *\n * - `finally(callback)` – allows you to observe either the fulfillment or rejection of a promise,\n *   but to do so without modifying the final value. This is useful to release resources or do some\n *   clean-up that needs to be done whether the promise was rejected or resolved. See the [full\n *   specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for\n *   more information.\n *\n *   Because `finally` is a reserved word in JavaScript and reserved keywords are not supported as\n *   property names by ES3, you'll need to invoke the method like `promise['finally'](callback)` to\n *   make your code IE8 compatible.\n *\n * # Chaining promises\n *\n * Because calling the `then` method of a promise returns a new derived promise, it is easily\n * possible to create a chain of promises:\n *\n * <pre>\n *   promiseB = promiseA.then(function(result) {\n *     return result + 1;\n *   });\n *\n *   // promiseB will be resolved immediately after promiseA is resolved and its value\n *   // will be the result of promiseA incremented by 1\n * </pre>\n *\n * It is possible to create chains of any length and since a promise can be resolved with another\n * promise (which will defer its resolution further), it is possible to pause/defer resolution of\n * the promises at any point in the chain. This makes it possible to implement powerful APIs like\n * $http's response interceptors.\n *\n *\n * # Differences between Kris Kowal's Q and $q\n *\n *  There are two main differences:\n *\n * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation\n *   mechanism in angular, which means faster propagation of resolution or rejection into your\n *   models and avoiding unnecessary browser repaints, which would result in flickering UI.\n * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains\n *   all the important functionality needed for common async tasks.\n *\n *  # Testing\n *\n *  <pre>\n *    it('should simulate promise', inject(function($q, $rootScope) {\n *      var deferred = $q.defer();\n *      var promise = deferred.promise;\n *      var resolvedValue;\n *\n *      promise.then(function(value) { resolvedValue = value; });\n *      expect(resolvedValue).toBeUndefined();\n *\n *      // Simulate resolving of promise\n *      deferred.resolve(123);\n *      // Note that the 'then' function does not get called synchronously.\n *      // This is because we want the promise API to always be async, whether or not\n *      // it got called synchronously or asynchronously.\n *      expect(resolvedValue).toBeUndefined();\n *\n *      // Propagate promise resolution to 'then' functions using $apply().\n *      $rootScope.$apply();\n *      expect(resolvedValue).toEqual(123);\n *    }));\n *  </pre>\n */\nfunction $QProvider() {\n\n  this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {\n    return qFactory(function(callback) {\n      $rootScope.$evalAsync(callback);\n    }, $exceptionHandler);\n  }];\n}\n\n\n/**\n * Constructs a promise manager.\n *\n * @param {function(function)} nextTick Function for executing functions in the next turn.\n * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for\n *     debugging purposes.\n * @returns {object} Promise manager.\n */\nfunction qFactory(nextTick, exceptionHandler) {\n\n  /**\n   * @ngdoc\n   * @name ng.$q#defer\n   * @methodOf ng.$q\n   * @description\n   * Creates a `Deferred` object which represents a task which will finish in the future.\n   *\n   * @returns {Deferred} Returns a new instance of deferred.\n   */\n  var defer = function() {\n    var pending = [],\n        value, deferred;\n\n    deferred = {\n\n      resolve: function(val) {\n        if (pending) {\n          var callbacks = pending;\n          pending = undefined;\n          value = ref(val);\n\n          if (callbacks.length) {\n            nextTick(function() {\n              var callback;\n              for (var i = 0, ii = callbacks.length; i < ii; i++) {\n                callback = callbacks[i];\n                value.then(callback[0], callback[1], callback[2]);\n              }\n            });\n          }\n        }\n      },\n\n\n      reject: function(reason) {\n        deferred.resolve(createInternalRejectedPromise(reason));\n      },\n\n\n      notify: function(progress) {\n        if (pending) {\n          var callbacks = pending;\n\n          if (pending.length) {\n            nextTick(function() {\n              var callback;\n              for (var i = 0, ii = callbacks.length; i < ii; i++) {\n                callback = callbacks[i];\n                callback[2](progress);\n              }\n            });\n          }\n        }\n      },\n\n\n      promise: {\n        then: function(callback, errback, progressback) {\n          var result = defer();\n\n          var wrappedCallback = function(value) {\n            try {\n              result.resolve((isFunction(callback) ? callback : defaultCallback)(value));\n            } catch(e) {\n              result.reject(e);\n              exceptionHandler(e);\n            }\n          };\n\n          var wrappedErrback = function(reason) {\n            try {\n              result.resolve((isFunction(errback) ? errback : defaultErrback)(reason));\n            } catch(e) {\n              result.reject(e);\n              exceptionHandler(e);\n            }\n          };\n\n          var wrappedProgressback = function(progress) {\n            try {\n              result.notify((isFunction(progressback) ? progressback : defaultCallback)(progress));\n            } catch(e) {\n              exceptionHandler(e);\n            }\n          };\n\n          if (pending) {\n            pending.push([wrappedCallback, wrappedErrback, wrappedProgressback]);\n          } else {\n            value.then(wrappedCallback, wrappedErrback, wrappedProgressback);\n          }\n\n          return result.promise;\n        },\n\n        \"catch\": function(callback) {\n          return this.then(null, callback);\n        },\n\n        \"finally\": function(callback) {\n\n          function makePromise(value, resolved) {\n            var result = defer();\n            if (resolved) {\n              result.resolve(value);\n            } else {\n              result.reject(value);\n            }\n            return result.promise;\n          }\n\n          function handleCallback(value, isResolved) {\n            var callbackOutput = null;\n            try {\n              callbackOutput = (callback ||defaultCallback)();\n            } catch(e) {\n              return makePromise(e, false);\n            }\n            if (callbackOutput && isFunction(callbackOutput.then)) {\n              return callbackOutput.then(function() {\n                return makePromise(value, isResolved);\n              }, function(error) {\n                return makePromise(error, false);\n              });\n            } else {\n              return makePromise(value, isResolved);\n            }\n          }\n\n          return this.then(function(value) {\n            return handleCallback(value, true);\n          }, function(error) {\n            return handleCallback(error, false);\n          });\n        }\n      }\n    };\n\n    return deferred;\n  };\n\n\n  var ref = function(value) {\n    if (value && isFunction(value.then)) return value;\n    return {\n      then: function(callback) {\n        var result = defer();\n        nextTick(function() {\n          result.resolve(callback(value));\n        });\n        return result.promise;\n      }\n    };\n  };\n\n\n  /**\n   * @ngdoc\n   * @name ng.$q#reject\n   * @methodOf ng.$q\n   * @description\n   * Creates a promise that is resolved as rejected with the specified `reason`. This api should be\n   * used to forward rejection in a chain of promises. If you are dealing with the last promise in\n   * a promise chain, you don't need to worry about it.\n   *\n   * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of\n   * `reject` as the `throw` keyword in JavaScript. This also means that if you \"catch\" an error via\n   * a promise error callback and you want to forward the error to the promise derived from the\n   * current promise, you have to \"rethrow\" the error by returning a rejection constructed via\n   * `reject`.\n   *\n   * <pre>\n   *   promiseB = promiseA.then(function(result) {\n   *     // success: do something and resolve promiseB\n   *     //          with the old or a new result\n   *     return result;\n   *   }, function(reason) {\n   *     // error: handle the error if possible and\n   *     //        resolve promiseB with newPromiseOrValue,\n   *     //        otherwise forward the rejection to promiseB\n   *     if (canHandle(reason)) {\n   *      // handle the error and recover\n   *      return newPromiseOrValue;\n   *     }\n   *     return $q.reject(reason);\n   *   });\n   * </pre>\n   *\n   * @param {*} reason Constant, message, exception or an object representing the rejection reason.\n   * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.\n   */\n  var reject = function(reason) {\n    var result = defer();\n    result.reject(reason);\n    return result.promise;\n  };\n\n  var createInternalRejectedPromise = function(reason) {\n    return {\n      then: function(callback, errback) {\n        var result = defer();\n        nextTick(function() {\n          try {\n            result.resolve((isFunction(errback) ? errback : defaultErrback)(reason));\n          } catch(e) {\n            result.reject(e);\n            exceptionHandler(e);\n          }\n        });\n        return result.promise;\n      }\n    };\n  };\n\n\n  /**\n   * @ngdoc\n   * @name ng.$q#when\n   * @methodOf ng.$q\n   * @description\n   * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.\n   * This is useful when you are dealing with an object that might or might not be a promise, or if\n   * the promise comes from a source that can't be trusted.\n   *\n   * @param {*} value Value or a promise\n   * @returns {Promise} Returns a promise of the passed value or promise\n   */\n  var when = function(value, callback, errback, progressback) {\n    var result = defer(),\n        done;\n\n    var wrappedCallback = function(value) {\n      try {\n        return (isFunction(callback) ? callback : defaultCallback)(value);\n      } catch (e) {\n        exceptionHandler(e);\n        return reject(e);\n      }\n    };\n\n    var wrappedErrback = function(reason) {\n      try {\n        return (isFunction(errback) ? errback : defaultErrback)(reason);\n      } catch (e) {\n        exceptionHandler(e);\n        return reject(e);\n      }\n    };\n\n    var wrappedProgressback = function(progress) {\n      try {\n        return (isFunction(progressback) ? progressback : defaultCallback)(progress);\n      } catch (e) {\n        exceptionHandler(e);\n      }\n    };\n\n    nextTick(function() {\n      ref(value).then(function(value) {\n        if (done) return;\n        done = true;\n        result.resolve(ref(value).then(wrappedCallback, wrappedErrback, wrappedProgressback));\n      }, function(reason) {\n        if (done) return;\n        done = true;\n        result.resolve(wrappedErrback(reason));\n      }, function(progress) {\n        if (done) return;\n        result.notify(wrappedProgressback(progress));\n      });\n    });\n\n    return result.promise;\n  };\n\n\n  function defaultCallback(value) {\n    return value;\n  }\n\n\n  function defaultErrback(reason) {\n    return reject(reason);\n  }\n\n\n  /**\n   * @ngdoc\n   * @name ng.$q#all\n   * @methodOf ng.$q\n   * @description\n   * Combines multiple promises into a single promise that is resolved when all of the input\n   * promises are resolved.\n   *\n   * @param {Array.<Promise>|Object.<Promise>} promises An array or hash of promises.\n   * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,\n   *   each value corresponding to the promise at the same index/key in the `promises` array/hash.\n   *   If any of the promises is resolved with a rejection, this resulting promise will be rejected\n   *   with the same rejection value.\n   */\n  function all(promises) {\n    var deferred = defer(),\n        counter = 0,\n        results = isArray(promises) ? [] : {};\n\n    forEach(promises, function(promise, key) {\n      counter++;\n      ref(promise).then(function(value) {\n        if (results.hasOwnProperty(key)) return;\n        results[key] = value;\n        if (!(--counter)) deferred.resolve(results);\n      }, function(reason) {\n        if (results.hasOwnProperty(key)) return;\n        deferred.reject(reason);\n      });\n    });\n\n    if (counter === 0) {\n      deferred.resolve(results);\n    }\n\n    return deferred.promise;\n  }\n\n  return {\n    defer: defer,\n    reject: reject,\n    when: when,\n    all: all\n  };\n}\n\n/**\n * DESIGN NOTES\n *\n * The design decisions behind the scope are heavily favored for speed and memory consumption.\n *\n * The typical use of scope is to watch the expressions, which most of the time return the same\n * value as last time so we optimize the operation.\n *\n * Closures construction is expensive in terms of speed as well as memory:\n *   - No closures, instead use prototypical inheritance for API\n *   - Internal state needs to be stored on scope directly, which means that private state is\n *     exposed as $$____ properties\n *\n * Loop operations are optimized by using while(count--) { ... }\n *   - this means that in order to keep the same order of execution as addition we have to add\n *     items to the array at the beginning (shift) instead of at the end (push)\n *\n * Child scopes are created and removed often\n *   - Using an array would be slow since inserts in middle are expensive so we use linked list\n *\n * There are few watches then a lot of observers. This is why you don't want the observer to be\n * implemented in the same way as watch. Watch requires return of initialization function which\n * are expensive to construct.\n */\n\n\n/**\n * @ngdoc object\n * @name ng.$rootScopeProvider\n * @description\n *\n * Provider for the $rootScope service.\n */\n\n/**\n * @ngdoc function\n * @name ng.$rootScopeProvider#digestTtl\n * @methodOf ng.$rootScopeProvider\n * @description\n *\n * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and\n * assuming that the model is unstable.\n *\n * The current default is 10 iterations.\n *\n * In complex applications it's possible that the dependencies between `$watch`s will result in\n * several digest iterations. However if an application needs more than the default 10 digest\n * iterations for its model to stabilize then you should investigate what is causing the model to\n * continuously change during the digest.\n *\n * Increasing the TTL could have performance implications, so you should not change it without\n * proper justification.\n *\n * @param {number} limit The number of digest iterations.\n */\n\n\n/**\n * @ngdoc object\n * @name ng.$rootScope\n * @description\n *\n * Every application has a single root {@link ng.$rootScope.Scope scope}.\n * All other scopes are descendant scopes of the root scope. Scopes provide separation\n * between the model and the view, via a mechanism for watching the model for changes.\n * They also provide an event emission/broadcast and subscription facility. See the\n * {@link guide/scope developer guide on scopes}.\n */\nfunction $RootScopeProvider(){\n  var TTL = 10;\n  var $rootScopeMinErr = minErr('$rootScope');\n  var lastDirtyWatch = null;\n\n  this.digestTtl = function(value) {\n    if (arguments.length) {\n      TTL = value;\n    }\n    return TTL;\n  };\n\n  this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',\n      function( $injector,   $exceptionHandler,   $parse,   $browser) {\n\n    /**\n     * @ngdoc function\n     * @name ng.$rootScope.Scope\n     *\n     * @description\n     * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the\n     * {@link AUTO.$injector $injector}. Child scopes are created using the\n     * {@link ng.$rootScope.Scope#methods_$new $new()} method. (Most scopes are created automatically when\n     * compiled HTML template is executed.)\n     *\n     * Here is a simple scope snippet to show how you can interact with the scope.\n     * <pre>\n     * <file src=\"./test/ng/rootScopeSpec.js\" tag=\"docs1\" />\n     * </pre>\n     *\n     * # Inheritance\n     * A scope can inherit from a parent scope, as in this example:\n     * <pre>\n         var parent = $rootScope;\n         var child = parent.$new();\n\n         parent.salutation = \"Hello\";\n         child.name = \"World\";\n         expect(child.salutation).toEqual('Hello');\n\n         child.salutation = \"Welcome\";\n         expect(child.salutation).toEqual('Welcome');\n         expect(parent.salutation).toEqual('Hello');\n     * </pre>\n     *\n     *\n     * @param {Object.<string, function()>=} providers Map of service factory which need to be\n     *                                       provided for the current scope. Defaults to {@link ng}.\n     * @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should\n     *                              append/override services provided by `providers`. This is handy\n     *                              when unit-testing and having the need to override a default\n     *                              service.\n     * @returns {Object} Newly created scope.\n     *\n     */\n    function Scope() {\n      this.$id = nextUid();\n      this.$$phase = this.$parent = this.$$watchers =\n                     this.$$nextSibling = this.$$prevSibling =\n                     this.$$childHead = this.$$childTail = null;\n      this['this'] = this.$root =  this;\n      this.$$destroyed = false;\n      this.$$asyncQueue = [];\n      this.$$postDigestQueue = [];\n      this.$$listeners = {};\n      this.$$listenerCount = {};\n      this.$$isolateBindings = {};\n    }\n\n    /**\n     * @ngdoc property\n     * @name ng.$rootScope.Scope#$id\n     * @propertyOf ng.$rootScope.Scope\n     * @returns {number} Unique scope ID (monotonically increasing alphanumeric sequence) useful for\n     *   debugging.\n     */\n\n\n    Scope.prototype = {\n      constructor: Scope,\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$new\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Creates a new child {@link ng.$rootScope.Scope scope}.\n       *\n       * The parent scope will propagate the {@link ng.$rootScope.Scope#methods_$digest $digest()} and\n       * {@link ng.$rootScope.Scope#methods_$digest $digest()} events. The scope can be removed from the\n       * scope hierarchy using {@link ng.$rootScope.Scope#methods_$destroy $destroy()}.\n       *\n       * {@link ng.$rootScope.Scope#methods_$destroy $destroy()} must be called on a scope when it is\n       * desired for the scope and its child scopes to be permanently detached from the parent and\n       * thus stop participating in model change detection and listener notification by invoking.\n       *\n       * @param {boolean} isolate If true, then the scope does not prototypically inherit from the\n       *         parent scope. The scope is isolated, as it can not see parent scope properties.\n       *         When creating widgets, it is useful for the widget to not accidentally read parent\n       *         state.\n       *\n       * @returns {Object} The newly created child scope.\n       *\n       */\n      $new: function(isolate) {\n        var ChildScope,\n            child;\n\n        if (isolate) {\n          child = new Scope();\n          child.$root = this.$root;\n          // ensure that there is just one async queue per $rootScope and its children\n          child.$$asyncQueue = this.$$asyncQueue;\n          child.$$postDigestQueue = this.$$postDigestQueue;\n        } else {\n          ChildScope = function() {}; // should be anonymous; This is so that when the minifier munges\n            // the name it does not become random set of chars. This will then show up as class\n            // name in the web inspector.\n          ChildScope.prototype = this;\n          child = new ChildScope();\n          child.$id = nextUid();\n        }\n        child['this'] = child;\n        child.$$listeners = {};\n        child.$$listenerCount = {};\n        child.$parent = this;\n        child.$$watchers = child.$$nextSibling = child.$$childHead = child.$$childTail = null;\n        child.$$prevSibling = this.$$childTail;\n        if (this.$$childHead) {\n          this.$$childTail.$$nextSibling = child;\n          this.$$childTail = child;\n        } else {\n          this.$$childHead = this.$$childTail = child;\n        }\n        return child;\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$watch\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Registers a `listener` callback to be executed whenever the `watchExpression` changes.\n       *\n       * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#methods_$digest\n       *   $digest()} and should return the value that will be watched. (Since\n       *   {@link ng.$rootScope.Scope#methods_$digest $digest()} reruns when it detects changes the\n       *   `watchExpression` can execute multiple times per\n       *   {@link ng.$rootScope.Scope#methods_$digest $digest()} and should be idempotent.)\n       * - The `listener` is called only when the value from the current `watchExpression` and the\n       *   previous call to `watchExpression` are not equal (with the exception of the initial run,\n       *   see below). The inequality is determined according to\n       *   {@link angular.equals} function. To save the value of the object for later comparison,\n       *   the {@link angular.copy} function is used. It also means that watching complex options\n       *   will have adverse memory and performance implications.\n       * - The watch `listener` may change the model, which may trigger other `listener`s to fire.\n       *   This is achieved by rerunning the watchers until no changes are detected. The rerun\n       *   iteration limit is 10 to prevent an infinite loop deadlock.\n       *\n       *\n       * If you want to be notified whenever {@link ng.$rootScope.Scope#methods_$digest $digest} is called,\n       * you can register a `watchExpression` function with no `listener`. (Since `watchExpression`\n       * can execute multiple times per {@link ng.$rootScope.Scope#methods_$digest $digest} cycle when a\n       * change is detected, be prepared for multiple calls to your listener.)\n       *\n       * After a watcher is registered with the scope, the `listener` fn is called asynchronously\n       * (via {@link ng.$rootScope.Scope#methods_$evalAsync $evalAsync}) to initialize the\n       * watcher. In rare cases, this is undesirable because the listener is called when the result\n       * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you\n       * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the\n       * listener was called due to initialization.\n       *\n       * The example below contains an illustration of using a function as your $watch listener\n       *\n       *\n       * # Example\n       * <pre>\n           // let's assume that scope was dependency injected as the $rootScope\n           var scope = $rootScope;\n           scope.name = 'misko';\n           scope.counter = 0;\n\n           expect(scope.counter).toEqual(0);\n           scope.$watch('name', function(newValue, oldValue) {\n             scope.counter = scope.counter + 1;\n           });\n           expect(scope.counter).toEqual(0);\n\n           scope.$digest();\n           // no variable change\n           expect(scope.counter).toEqual(0);\n\n           scope.name = 'adam';\n           scope.$digest();\n           expect(scope.counter).toEqual(1);\n\n\n\n           // Using a listener function\n           var food;\n           scope.foodCounter = 0;\n           expect(scope.foodCounter).toEqual(0);\n           scope.$watch(\n             // This is the listener function\n             function() { return food; },\n             // This is the change handler\n             function(newValue, oldValue) {\n               if ( newValue !== oldValue ) {\n                 // Only increment the counter if the value changed\n                 scope.foodCounter = scope.foodCounter + 1;\n               }\n             }\n           );\n           // No digest has been run so the counter will be zero\n           expect(scope.foodCounter).toEqual(0);\n\n           // Run the digest but since food has not changed count will still be zero\n           scope.$digest();\n           expect(scope.foodCounter).toEqual(0);\n\n           // Update food and run digest.  Now the counter will increment\n           food = 'cheeseburger';\n           scope.$digest();\n           expect(scope.foodCounter).toEqual(1);\n\n       * </pre>\n       *\n       *\n       *\n       * @param {(function()|string)} watchExpression Expression that is evaluated on each\n       *    {@link ng.$rootScope.Scope#methods_$digest $digest} cycle. A change in the return value triggers\n       *    a call to the `listener`.\n       *\n       *    - `string`: Evaluated as {@link guide/expression expression}\n       *    - `function(scope)`: called with current `scope` as a parameter.\n       * @param {(function()|string)=} listener Callback called whenever the return value of\n       *   the `watchExpression` changes.\n       *\n       *    - `string`: Evaluated as {@link guide/expression expression}\n       *    - `function(newValue, oldValue, scope)`: called with current and previous values as\n       *      parameters.\n       *\n       * @param {boolean=} objectEquality Compare object for equality rather than for reference.\n       * @returns {function()} Returns a deregistration function for this listener.\n       */\n      $watch: function(watchExp, listener, objectEquality) {\n        var scope = this,\n            get = compileToFn(watchExp, 'watch'),\n            array = scope.$$watchers,\n            watcher = {\n              fn: listener,\n              last: initWatchVal,\n              get: get,\n              exp: watchExp,\n              eq: !!objectEquality\n            };\n\n        lastDirtyWatch = null;\n\n        // in the case user pass string, we need to compile it, do we really need this ?\n        if (!isFunction(listener)) {\n          var listenFn = compileToFn(listener || noop, 'listener');\n          watcher.fn = function(newVal, oldVal, scope) {listenFn(scope);};\n        }\n\n        if (typeof watchExp == 'string' && get.constant) {\n          var originalFn = watcher.fn;\n          watcher.fn = function(newVal, oldVal, scope) {\n            originalFn.call(this, newVal, oldVal, scope);\n            arrayRemove(array, watcher);\n          };\n        }\n\n        if (!array) {\n          array = scope.$$watchers = [];\n        }\n        // we use unshift since we use a while loop in $digest for speed.\n        // the while loop reads in reverse order.\n        array.unshift(watcher);\n\n        return function() {\n          arrayRemove(array, watcher);\n          lastDirtyWatch = null;\n        };\n      },\n\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$watchCollection\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Shallow watches the properties of an object and fires whenever any of the properties change\n       * (for arrays, this implies watching the array items; for object maps, this implies watching\n       * the properties). If a change is detected, the `listener` callback is fired.\n       *\n       * - The `obj` collection is observed via standard $watch operation and is examined on every\n       *   call to $digest() to see if any items have been added, removed, or moved.\n       * - The `listener` is called whenever anything within the `obj` has changed. Examples include\n       *   adding, removing, and moving items belonging to an object or array.\n       *\n       *\n       * # Example\n       * <pre>\n          $scope.names = ['igor', 'matias', 'misko', 'james'];\n          $scope.dataCount = 4;\n\n          $scope.$watchCollection('names', function(newNames, oldNames) {\n            $scope.dataCount = newNames.length;\n          });\n\n          expect($scope.dataCount).toEqual(4);\n          $scope.$digest();\n\n          //still at 4 ... no changes\n          expect($scope.dataCount).toEqual(4);\n\n          $scope.names.pop();\n          $scope.$digest();\n\n          //now there's been a change\n          expect($scope.dataCount).toEqual(3);\n       * </pre>\n       *\n       *\n       * @param {string|Function(scope)} obj Evaluated as {@link guide/expression expression}. The\n       *    expression value should evaluate to an object or an array which is observed on each\n       *    {@link ng.$rootScope.Scope#methods_$digest $digest} cycle. Any shallow change within the\n       *    collection will trigger a call to the `listener`.\n       *\n       * @param {function(newCollection, oldCollection, scope)} listener a callback function that is\n       *    fired with both the `newCollection` and `oldCollection` as parameters.\n       *    The `newCollection` object is the newly modified data obtained from the `obj` expression\n       *    and the `oldCollection` object is a copy of the former collection data.\n       *    The `scope` refers to the current scope.\n       *\n       * @returns {function()} Returns a de-registration function for this listener. When the\n       *    de-registration function is executed, the internal watch operation is terminated.\n       */\n      $watchCollection: function(obj, listener) {\n        var self = this;\n        var oldValue;\n        var newValue;\n        var changeDetected = 0;\n        var objGetter = $parse(obj);\n        var internalArray = [];\n        var internalObject = {};\n        var oldLength = 0;\n\n        function $watchCollectionWatch() {\n          newValue = objGetter(self);\n          var newLength, key;\n\n          if (!isObject(newValue)) {\n            if (oldValue !== newValue) {\n              oldValue = newValue;\n              changeDetected++;\n            }\n          } else if (isArrayLike(newValue)) {\n            if (oldValue !== internalArray) {\n              // we are transitioning from something which was not an array into array.\n              oldValue = internalArray;\n              oldLength = oldValue.length = 0;\n              changeDetected++;\n            }\n\n            newLength = newValue.length;\n\n            if (oldLength !== newLength) {\n              // if lengths do not match we need to trigger change notification\n              changeDetected++;\n              oldValue.length = oldLength = newLength;\n            }\n            // copy the items to oldValue and look for changes.\n            for (var i = 0; i < newLength; i++) {\n              if (oldValue[i] !== newValue[i]) {\n                changeDetected++;\n                oldValue[i] = newValue[i];\n              }\n            }\n          } else {\n            if (oldValue !== internalObject) {\n              // we are transitioning from something which was not an object into object.\n              oldValue = internalObject = {};\n              oldLength = 0;\n              changeDetected++;\n            }\n            // copy the items to oldValue and look for changes.\n            newLength = 0;\n            for (key in newValue) {\n              if (newValue.hasOwnProperty(key)) {\n                newLength++;\n                if (oldValue.hasOwnProperty(key)) {\n                  if (oldValue[key] !== newValue[key]) {\n                    changeDetected++;\n                    oldValue[key] = newValue[key];\n                  }\n                } else {\n                  oldLength++;\n                  oldValue[key] = newValue[key];\n                  changeDetected++;\n                }\n              }\n            }\n            if (oldLength > newLength) {\n              // we used to have more keys, need to find them and destroy them.\n              changeDetected++;\n              for(key in oldValue) {\n                if (oldValue.hasOwnProperty(key) && !newValue.hasOwnProperty(key)) {\n                  oldLength--;\n                  delete oldValue[key];\n                }\n              }\n            }\n          }\n          return changeDetected;\n        }\n\n        function $watchCollectionAction() {\n          listener(newValue, oldValue, self);\n        }\n\n        return this.$watch($watchCollectionWatch, $watchCollectionAction);\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$digest\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Processes all of the {@link ng.$rootScope.Scope#methods_$watch watchers} of the current scope and\n       * its children. Because a {@link ng.$rootScope.Scope#methods_$watch watcher}'s listener can change\n       * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#methods_$watch watchers}\n       * until no more listeners are firing. This means that it is possible to get into an infinite\n       * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of\n       * iterations exceeds 10.\n       *\n       * Usually, you don't call `$digest()` directly in\n       * {@link ng.directive:ngController controllers} or in\n       * {@link ng.$compileProvider#methods_directive directives}.\n       * Instead, you should call {@link ng.$rootScope.Scope#methods_$apply $apply()} (typically from within\n       * a {@link ng.$compileProvider#methods_directive directives}), which will force a `$digest()`.\n       *\n       * If you want to be notified whenever `$digest()` is called,\n       * you can register a `watchExpression` function with\n       * {@link ng.$rootScope.Scope#methods_$watch $watch()} with no `listener`.\n       *\n       * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.\n       *\n       * # Example\n       * <pre>\n           var scope = ...;\n           scope.name = 'misko';\n           scope.counter = 0;\n\n           expect(scope.counter).toEqual(0);\n           scope.$watch('name', function(newValue, oldValue) {\n             scope.counter = scope.counter + 1;\n           });\n           expect(scope.counter).toEqual(0);\n\n           scope.$digest();\n           // no variable change\n           expect(scope.counter).toEqual(0);\n\n           scope.name = 'adam';\n           scope.$digest();\n           expect(scope.counter).toEqual(1);\n       * </pre>\n       *\n       */\n      $digest: function() {\n        var watch, value, last,\n            watchers,\n            asyncQueue = this.$$asyncQueue,\n            postDigestQueue = this.$$postDigestQueue,\n            length,\n            dirty, ttl = TTL,\n            next, current, target = this,\n            watchLog = [],\n            logIdx, logMsg, asyncTask;\n\n        beginPhase('$digest');\n\n        lastDirtyWatch = null;\n\n        do { // \"while dirty\" loop\n          dirty = false;\n          current = target;\n\n          while(asyncQueue.length) {\n            try {\n              asyncTask = asyncQueue.shift();\n              asyncTask.scope.$eval(asyncTask.expression);\n            } catch (e) {\n              clearPhase();\n              $exceptionHandler(e);\n            }\n            lastDirtyWatch = null;\n          }\n\n          traverseScopesLoop:\n          do { // \"traverse the scopes\" loop\n            if ((watchers = current.$$watchers)) {\n              // process our watches\n              length = watchers.length;\n              while (length--) {\n                try {\n                  watch = watchers[length];\n                  // Most common watches are on primitives, in which case we can short\n                  // circuit it with === operator, only when === fails do we use .equals\n                  if (watch) {\n                    if ((value = watch.get(current)) !== (last = watch.last) &&\n                        !(watch.eq\n                            ? equals(value, last)\n                            : (typeof value == 'number' && typeof last == 'number'\n                               && isNaN(value) && isNaN(last)))) {\n                      dirty = true;\n                      lastDirtyWatch = watch;\n                      watch.last = watch.eq ? copy(value) : value;\n                      watch.fn(value, ((last === initWatchVal) ? value : last), current);\n                      if (ttl < 5) {\n                        logIdx = 4 - ttl;\n                        if (!watchLog[logIdx]) watchLog[logIdx] = [];\n                        logMsg = (isFunction(watch.exp))\n                            ? 'fn: ' + (watch.exp.name || watch.exp.toString())\n                            : watch.exp;\n                        logMsg += '; newVal: ' + toJson(value) + '; oldVal: ' + toJson(last);\n                        watchLog[logIdx].push(logMsg);\n                      }\n                    } else if (watch === lastDirtyWatch) {\n                      // If the most recently dirty watcher is now clean, short circuit since the remaining watchers\n                      // have already been tested.\n                      dirty = false;\n                      break traverseScopesLoop;\n                    }\n                  }\n                } catch (e) {\n                  clearPhase();\n                  $exceptionHandler(e);\n                }\n              }\n            }\n\n            // Insanity Warning: scope depth-first traversal\n            // yes, this code is a bit crazy, but it works and we have tests to prove it!\n            // this piece should be kept in sync with the traversal in $broadcast\n            if (!(next = (current.$$childHead ||\n                (current !== target && current.$$nextSibling)))) {\n              while(current !== target && !(next = current.$$nextSibling)) {\n                current = current.$parent;\n              }\n            }\n          } while ((current = next));\n\n          // `break traverseScopesLoop;` takes us to here\n\n          if((dirty || asyncQueue.length) && !(ttl--)) {\n            clearPhase();\n            throw $rootScopeMinErr('infdig',\n                '{0} $digest() iterations reached. Aborting!\\n' +\n                'Watchers fired in the last 5 iterations: {1}',\n                TTL, toJson(watchLog));\n          }\n\n        } while (dirty || asyncQueue.length);\n\n        clearPhase();\n\n        while(postDigestQueue.length) {\n          try {\n            postDigestQueue.shift()();\n          } catch (e) {\n            $exceptionHandler(e);\n          }\n        }\n      },\n\n\n      /**\n       * @ngdoc event\n       * @name ng.$rootScope.Scope#$destroy\n       * @eventOf ng.$rootScope.Scope\n       * @eventType broadcast on scope being destroyed\n       *\n       * @description\n       * Broadcasted when a scope and its children are being destroyed.\n       *\n       * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n       * clean up DOM bindings before an element is removed from the DOM.\n       */\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$destroy\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Removes the current scope (and all of its children) from the parent scope. Removal implies\n       * that calls to {@link ng.$rootScope.Scope#methods_$digest $digest()} will no longer\n       * propagate to the current scope and its children. Removal also implies that the current\n       * scope is eligible for garbage collection.\n       *\n       * The `$destroy()` is usually used by directives such as\n       * {@link ng.directive:ngRepeat ngRepeat} for managing the\n       * unrolling of the loop.\n       *\n       * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.\n       * Application code can register a `$destroy` event handler that will give it a chance to\n       * perform any necessary cleanup.\n       *\n       * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n       * clean up DOM bindings before an element is removed from the DOM.\n       */\n      $destroy: function() {\n        // we can't destroy the root scope or a scope that has been already destroyed\n        if (this.$$destroyed) return;\n        var parent = this.$parent;\n\n        this.$broadcast('$destroy');\n        this.$$destroyed = true;\n        if (this === $rootScope) return;\n\n        forEach(this.$$listenerCount, bind(null, decrementListenerCount, this));\n\n        if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;\n        if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;\n        if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;\n        if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;\n\n        // This is bogus code that works around Chrome's GC leak\n        // see: https://github.com/angular/angular.js/issues/1313#issuecomment-10378451\n        this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead =\n            this.$$childTail = null;\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$eval\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Executes the `expression` on the current scope and returns the result. Any exceptions in\n       * the expression are propagated (uncaught). This is useful when evaluating Angular\n       * expressions.\n       *\n       * # Example\n       * <pre>\n           var scope = ng.$rootScope.Scope();\n           scope.a = 1;\n           scope.b = 2;\n\n           expect(scope.$eval('a+b')).toEqual(3);\n           expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);\n       * </pre>\n       *\n       * @param {(string|function())=} expression An angular expression to be executed.\n       *\n       *    - `string`: execute using the rules as defined in  {@link guide/expression expression}.\n       *    - `function(scope)`: execute the function with the current `scope` parameter.\n       *\n       * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n       * @returns {*} The result of evaluating the expression.\n       */\n      $eval: function(expr, locals) {\n        return $parse(expr)(this, locals);\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$evalAsync\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Executes the expression on the current scope at a later point in time.\n       *\n       * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only\n       * that:\n       *\n       *   - it will execute after the function that scheduled the evaluation (preferably before DOM\n       *     rendering).\n       *   - at least one {@link ng.$rootScope.Scope#methods_$digest $digest cycle} will be performed after\n       *     `expression` execution.\n       *\n       * Any exceptions from the execution of the expression are forwarded to the\n       * {@link ng.$exceptionHandler $exceptionHandler} service.\n       *\n       * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle\n       * will be scheduled. However, it is encouraged to always call code that changes the model\n       * from within an `$apply` call. That includes code evaluated via `$evalAsync`.\n       *\n       * @param {(string|function())=} expression An angular expression to be executed.\n       *\n       *    - `string`: execute using the rules as defined in {@link guide/expression expression}.\n       *    - `function(scope)`: execute the function with the current `scope` parameter.\n       *\n       */\n      $evalAsync: function(expr) {\n        // if we are outside of an $digest loop and this is the first time we are scheduling async\n        // task also schedule async auto-flush\n        if (!$rootScope.$$phase && !$rootScope.$$asyncQueue.length) {\n          $browser.defer(function() {\n            if ($rootScope.$$asyncQueue.length) {\n              $rootScope.$digest();\n            }\n          });\n        }\n\n        this.$$asyncQueue.push({scope: this, expression: expr});\n      },\n\n      $$postDigest : function(fn) {\n        this.$$postDigestQueue.push(fn);\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$apply\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * `$apply()` is used to execute an expression in angular from outside of the angular\n       * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).\n       * Because we are calling into the angular framework we need to perform proper scope life\n       * cycle of {@link ng.$exceptionHandler exception handling},\n       * {@link ng.$rootScope.Scope#methods_$digest executing watches}.\n       *\n       * ## Life cycle\n       *\n       * # Pseudo-Code of `$apply()`\n       * <pre>\n           function $apply(expr) {\n             try {\n               return $eval(expr);\n             } catch (e) {\n               $exceptionHandler(e);\n             } finally {\n               $root.$digest();\n             }\n           }\n       * </pre>\n       *\n       *\n       * Scope's `$apply()` method transitions through the following stages:\n       *\n       * 1. The {@link guide/expression expression} is executed using the\n       *    {@link ng.$rootScope.Scope#methods_$eval $eval()} method.\n       * 2. Any exceptions from the execution of the expression are forwarded to the\n       *    {@link ng.$exceptionHandler $exceptionHandler} service.\n       * 3. The {@link ng.$rootScope.Scope#methods_$watch watch} listeners are fired immediately after the\n       *    expression was executed using the {@link ng.$rootScope.Scope#methods_$digest $digest()} method.\n       *\n       *\n       * @param {(string|function())=} exp An angular expression to be executed.\n       *\n       *    - `string`: execute using the rules as defined in {@link guide/expression expression}.\n       *    - `function(scope)`: execute the function with current `scope` parameter.\n       *\n       * @returns {*} The result of evaluating the expression.\n       */\n      $apply: function(expr) {\n        try {\n          beginPhase('$apply');\n          return this.$eval(expr);\n        } catch (e) {\n          $exceptionHandler(e);\n        } finally {\n          clearPhase();\n          try {\n            $rootScope.$digest();\n          } catch (e) {\n            $exceptionHandler(e);\n            throw e;\n          }\n        }\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$on\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Listens on events of a given type. See {@link ng.$rootScope.Scope#methods_$emit $emit} for\n       * discussion of event life cycle.\n       *\n       * The event listener function format is: `function(event, args...)`. The `event` object\n       * passed into the listener has the following attributes:\n       *\n       *   - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or\n       *     `$broadcast`-ed.\n       *   - `currentScope` - `{Scope}`: the current scope which is handling the event.\n       *   - `name` - `{string}`: name of the event.\n       *   - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel\n       *     further event propagation (available only for events that were `$emit`-ed).\n       *   - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag\n       *     to true.\n       *   - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.\n       *\n       * @param {string} name Event name to listen on.\n       * @param {function(event, args...)} listener Function to call when the event is emitted.\n       * @returns {function()} Returns a deregistration function for this listener.\n       */\n      $on: function(name, listener) {\n        var namedListeners = this.$$listeners[name];\n        if (!namedListeners) {\n          this.$$listeners[name] = namedListeners = [];\n        }\n        namedListeners.push(listener);\n\n        var current = this;\n        do {\n          if (!current.$$listenerCount[name]) {\n            current.$$listenerCount[name] = 0;\n          }\n          current.$$listenerCount[name]++;\n        } while ((current = current.$parent));\n\n        var self = this;\n        return function() {\n          namedListeners[indexOf(namedListeners, listener)] = null;\n          decrementListenerCount(self, 1, name);\n        };\n      },\n\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$emit\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Dispatches an event `name` upwards through the scope hierarchy notifying the\n       * registered {@link ng.$rootScope.Scope#methods_$on} listeners.\n       *\n       * The event life cycle starts at the scope on which `$emit` was called. All\n       * {@link ng.$rootScope.Scope#methods_$on listeners} listening for `name` event on this scope get\n       * notified. Afterwards, the event traverses upwards toward the root scope and calls all\n       * registered listeners along the way. The event will stop propagating if one of the listeners\n       * cancels it.\n       *\n       * Any exception emitted from the {@link ng.$rootScope.Scope#methods_$on listeners} will be passed\n       * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n       *\n       * @param {string} name Event name to emit.\n       * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n       * @return {Object} Event object (see {@link ng.$rootScope.Scope#methods_$on}).\n       */\n      $emit: function(name, args) {\n        var empty = [],\n            namedListeners,\n            scope = this,\n            stopPropagation = false,\n            event = {\n              name: name,\n              targetScope: scope,\n              stopPropagation: function() {stopPropagation = true;},\n              preventDefault: function() {\n                event.defaultPrevented = true;\n              },\n              defaultPrevented: false\n            },\n            listenerArgs = concat([event], arguments, 1),\n            i, length;\n\n        do {\n          namedListeners = scope.$$listeners[name] || empty;\n          event.currentScope = scope;\n          for (i=0, length=namedListeners.length; i<length; i++) {\n\n            // if listeners were deregistered, defragment the array\n            if (!namedListeners[i]) {\n              namedListeners.splice(i, 1);\n              i--;\n              length--;\n              continue;\n            }\n            try {\n              //allow all listeners attached to the current scope to run\n              namedListeners[i].apply(null, listenerArgs);\n            } catch (e) {\n              $exceptionHandler(e);\n            }\n          }\n          //if any listener on the current scope stops propagation, prevent bubbling\n          if (stopPropagation) return event;\n          //traverse upwards\n          scope = scope.$parent;\n        } while (scope);\n\n        return event;\n      },\n\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$broadcast\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Dispatches an event `name` downwards to all child scopes (and their children) notifying the\n       * registered {@link ng.$rootScope.Scope#methods_$on} listeners.\n       *\n       * The event life cycle starts at the scope on which `$broadcast` was called. All\n       * {@link ng.$rootScope.Scope#methods_$on listeners} listening for `name` event on this scope get\n       * notified. Afterwards, the event propagates to all direct and indirect scopes of the current\n       * scope and calls all registered listeners along the way. The event cannot be canceled.\n       *\n       * Any exception emitted from the {@link ng.$rootScope.Scope#methods_$on listeners} will be passed\n       * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n       *\n       * @param {string} name Event name to broadcast.\n       * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n       * @return {Object} Event object, see {@link ng.$rootScope.Scope#methods_$on}\n       */\n      $broadcast: function(name, args) {\n        var target = this,\n            current = target,\n            next = target,\n            event = {\n              name: name,\n              targetScope: target,\n              preventDefault: function() {\n                event.defaultPrevented = true;\n              },\n              defaultPrevented: false\n            },\n            listenerArgs = concat([event], arguments, 1),\n            listeners, i, length;\n\n        //down while you can, then up and next sibling or up and next sibling until back at root\n        while ((current = next)) {\n          event.currentScope = current;\n          listeners = current.$$listeners[name] || [];\n          for (i=0, length = listeners.length; i<length; i++) {\n            // if listeners were deregistered, defragment the array\n            if (!listeners[i]) {\n              listeners.splice(i, 1);\n              i--;\n              length--;\n              continue;\n            }\n\n            try {\n              listeners[i].apply(null, listenerArgs);\n            } catch(e) {\n              $exceptionHandler(e);\n            }\n          }\n\n          // Insanity Warning: scope depth-first traversal\n          // yes, this code is a bit crazy, but it works and we have tests to prove it!\n          // this piece should be kept in sync with the traversal in $digest\n          // (though it differs due to having the extra check for $$listenerCount)\n          if (!(next = ((current.$$listenerCount[name] && current.$$childHead) ||\n              (current !== target && current.$$nextSibling)))) {\n            while(current !== target && !(next = current.$$nextSibling)) {\n              current = current.$parent;\n            }\n          }\n        }\n\n        return event;\n      }\n    };\n\n    var $rootScope = new Scope();\n\n    return $rootScope;\n\n\n    function beginPhase(phase) {\n      if ($rootScope.$$phase) {\n        throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase);\n      }\n\n      $rootScope.$$phase = phase;\n    }\n\n    function clearPhase() {\n      $rootScope.$$phase = null;\n    }\n\n    function compileToFn(exp, name) {\n      var fn = $parse(exp);\n      assertArgFn(fn, name);\n      return fn;\n    }\n\n    function decrementListenerCount(current, count, name) {\n      do {\n        current.$$listenerCount[name] -= count;\n\n        if (current.$$listenerCount[name] === 0) {\n          delete current.$$listenerCount[name];\n        }\n      } while ((current = current.$parent));\n    }\n\n    /**\n     * function used as an initial value for watchers.\n     * because it's unique we can easily tell it apart from other values\n     */\n    function initWatchVal() {}\n  }];\n}\n\n/**\n * @description\n * Private service to sanitize uris for links and images. Used by $compile and $sanitize.\n */\nfunction $$SanitizeUriProvider() {\n  var aHrefSanitizationWhitelist = /^\\s*(https?|ftp|mailto|tel|file):/,\n    imgSrcSanitizationWhitelist = /^\\s*(https?|ftp|file):|data:image\\//;\n\n  /**\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during a[href] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.aHrefSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      aHrefSanitizationWhitelist = regexp;\n      return this;\n    }\n    return aHrefSanitizationWhitelist;\n  };\n\n\n  /**\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during img[src] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.imgSrcSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      imgSrcSanitizationWhitelist = regexp;\n      return this;\n    }\n    return imgSrcSanitizationWhitelist;\n  };\n\n  this.$get = function() {\n    return function sanitizeUri(uri, isImage) {\n      var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist;\n      var normalizedVal;\n      // NOTE: urlResolve() doesn't support IE < 8 so we don't sanitize for that case.\n      if (!msie || msie >= 8 ) {\n        normalizedVal = urlResolve(uri).href;\n        if (normalizedVal !== '' && !normalizedVal.match(regex)) {\n          return 'unsafe:'+normalizedVal;\n        }\n      }\n      return uri;\n    };\n  };\n}\n\nvar $sceMinErr = minErr('$sce');\n\nvar SCE_CONTEXTS = {\n  HTML: 'html',\n  CSS: 'css',\n  URL: 'url',\n  // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a\n  // url.  (e.g. ng-include, script src, templateUrl)\n  RESOURCE_URL: 'resourceUrl',\n  JS: 'js'\n};\n\n// Helper functions follow.\n\n// Copied from:\n// https://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962\n// Prereq: s is a string.\nfunction escapeForRegexp(s) {\n  return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g, '\\\\$1').\n           replace(/\\x08/g, '\\\\x08');\n}\n\n\nfunction adjustMatcher(matcher) {\n  if (matcher === 'self') {\n    return matcher;\n  } else if (isString(matcher)) {\n    // Strings match exactly except for 2 wildcards - '*' and '**'.\n    // '*' matches any character except those from the set ':/.?&'.\n    // '**' matches any character (like .* in a RegExp).\n    // More than 2 *'s raises an error as it's ill defined.\n    if (matcher.indexOf('***') > -1) {\n      throw $sceMinErr('iwcard',\n          'Illegal sequence *** in string matcher.  String: {0}', matcher);\n    }\n    matcher = escapeForRegexp(matcher).\n                  replace('\\\\*\\\\*', '.*').\n                  replace('\\\\*', '[^:/.?&;]*');\n    return new RegExp('^' + matcher + '$');\n  } else if (isRegExp(matcher)) {\n    // The only other type of matcher allowed is a Regexp.\n    // Match entire URL / disallow partial matches.\n    // Flags are reset (i.e. no global, ignoreCase or multiline)\n    return new RegExp('^' + matcher.source + '$');\n  } else {\n    throw $sceMinErr('imatcher',\n        'Matchers may only be \"self\", string patterns or RegExp objects');\n  }\n}\n\n\nfunction adjustMatchers(matchers) {\n  var adjustedMatchers = [];\n  if (isDefined(matchers)) {\n    forEach(matchers, function(matcher) {\n      adjustedMatchers.push(adjustMatcher(matcher));\n    });\n  }\n  return adjustedMatchers;\n}\n\n\n/**\n * @ngdoc service\n * @name ng.$sceDelegate\n * @function\n *\n * @description\n *\n * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict\n * Contextual Escaping (SCE)} services to AngularJS.\n *\n * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of\n * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS.  This is\n * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to\n * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things\n * work because `$sce` delegates to `$sceDelegate` for these operations.\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.\n *\n * The default instance of `$sceDelegate` should work out of the box with little pain.  While you\n * can override it completely to change the behavior of `$sce`, the common case would\n * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting\n * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as\n * templates.  Refer {@link ng.$sceDelegateProvider#methods_resourceUrlWhitelist\n * $sceDelegateProvider.resourceUrlWhitelist} and {@link\n * ng.$sceDelegateProvider#methods_resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n */\n\n/**\n * @ngdoc object\n * @name ng.$sceDelegateProvider\n * @description\n *\n * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate\n * $sceDelegate} service.  This allows one to get/set the whitelists and blacklists used to ensure\n * that the URLs used for sourcing Angular templates are safe.  Refer {@link\n * ng.$sceDelegateProvider#methods_resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and\n * {@link ng.$sceDelegateProvider#methods_resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n *\n * For the general details about this service in Angular, read the main page for {@link ng.$sce\n * Strict Contextual Escaping (SCE)}.\n *\n * **Example**:  Consider the following case. <a name=\"example\"></a>\n *\n * - your app is hosted at url `http://myapp.example.com/`\n * - but some of your templates are hosted on other domains you control such as\n *   `http://srv01.assets.example.com/`,  `http://srv02.assets.example.com/`, etc.\n * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.\n *\n * Here is what a secure configuration for this scenario might look like:\n *\n * <pre class=\"prettyprint\">\n *    angular.module('myApp', []).config(function($sceDelegateProvider) {\n *      $sceDelegateProvider.resourceUrlWhitelist([\n *        // Allow same origin resource loads.\n *        'self',\n *        // Allow loading from our assets domain.  Notice the difference between * and **.\n *        'http://srv*.assets.example.com/**']);\n *\n *      // The blacklist overrides the whitelist so the open redirect here is blocked.\n *      $sceDelegateProvider.resourceUrlBlacklist([\n *        'http://myapp.example.com/clickThru**']);\n *      });\n * </pre>\n */\n\nfunction $SceDelegateProvider() {\n  this.SCE_CONTEXTS = SCE_CONTEXTS;\n\n  // Resource URLs can also be trusted by policy.\n  var resourceUrlWhitelist = ['self'],\n      resourceUrlBlacklist = [];\n\n  /**\n   * @ngdoc function\n   * @name ng.sceDelegateProvider#resourceUrlWhitelist\n   * @methodOf ng.$sceDelegateProvider\n   * @function\n   *\n   * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value\n   *     provided.  This must be an array or null.  A snapshot of this array is used so further\n   *     changes to the array are ignored.\n   *\n   *     Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n   *     allowed in this array.\n   *\n   *     Note: **an empty whitelist array will block all URLs**!\n   *\n   * @return {Array} the currently set whitelist array.\n   *\n   * The **default value** when no whitelist has been explicitly set is `['self']` allowing only\n   * same origin resource requests.\n   *\n   * @description\n   * Sets/Gets the whitelist of trusted resource URLs.\n   */\n  this.resourceUrlWhitelist = function (value) {\n    if (arguments.length) {\n      resourceUrlWhitelist = adjustMatchers(value);\n    }\n    return resourceUrlWhitelist;\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.sceDelegateProvider#resourceUrlBlacklist\n   * @methodOf ng.$sceDelegateProvider\n   * @function\n   *\n   * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value\n   *     provided.  This must be an array or null.  A snapshot of this array is used so further\n   *     changes to the array are ignored.\n   *\n   *     Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n   *     allowed in this array.\n   *\n   *     The typical usage for the blacklist is to **block\n   *     [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as\n   *     these would otherwise be trusted but actually return content from the redirected domain.\n   *\n   *     Finally, **the blacklist overrides the whitelist** and has the final say.\n   *\n   * @return {Array} the currently set blacklist array.\n   *\n   * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there\n   * is no blacklist.)\n   *\n   * @description\n   * Sets/Gets the blacklist of trusted resource URLs.\n   */\n\n  this.resourceUrlBlacklist = function (value) {\n    if (arguments.length) {\n      resourceUrlBlacklist = adjustMatchers(value);\n    }\n    return resourceUrlBlacklist;\n  };\n\n  this.$get = ['$injector', function($injector) {\n\n    var htmlSanitizer = function htmlSanitizer(html) {\n      throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n    };\n\n    if ($injector.has('$sanitize')) {\n      htmlSanitizer = $injector.get('$sanitize');\n    }\n\n\n    function matchUrl(matcher, parsedUrl) {\n      if (matcher === 'self') {\n        return urlIsSameOrigin(parsedUrl);\n      } else {\n        // definitely a regex.  See adjustMatchers()\n        return !!matcher.exec(parsedUrl.href);\n      }\n    }\n\n    function isResourceUrlAllowedByPolicy(url) {\n      var parsedUrl = urlResolve(url.toString());\n      var i, n, allowed = false;\n      // Ensure that at least one item from the whitelist allows this url.\n      for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {\n        if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {\n          allowed = true;\n          break;\n        }\n      }\n      if (allowed) {\n        // Ensure that no item from the blacklist blocked this url.\n        for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {\n          if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {\n            allowed = false;\n            break;\n          }\n        }\n      }\n      return allowed;\n    }\n\n    function generateHolderType(Base) {\n      var holderType = function TrustedValueHolderType(trustedValue) {\n        this.$$unwrapTrustedValue = function() {\n          return trustedValue;\n        };\n      };\n      if (Base) {\n        holderType.prototype = new Base();\n      }\n      holderType.prototype.valueOf = function sceValueOf() {\n        return this.$$unwrapTrustedValue();\n      };\n      holderType.prototype.toString = function sceToString() {\n        return this.$$unwrapTrustedValue().toString();\n      };\n      return holderType;\n    }\n\n    var trustedValueHolderBase = generateHolderType(),\n        byType = {};\n\n    byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);\n\n    /**\n     * @ngdoc method\n     * @name ng.$sceDelegate#trustAs\n     * @methodOf ng.$sceDelegate\n     *\n     * @description\n     * Returns an object that is trusted by angular for use in specified strict\n     * contextual escaping contexts (such as ng-bind-html, ng-include, any src\n     * attribute interpolation, any dom event binding attribute interpolation\n     * such as for onclick,  etc.) that uses the provided value.\n     * See {@link ng.$sce $sce} for enabling strict contextual escaping.\n     *\n     * @param {string} type The kind of context in which this value is safe for use.  e.g. url,\n     *   resourceUrl, html, js and css.\n     * @param {*} value The value that that should be considered trusted/safe.\n     * @returns {*} A value that can be used to stand in for the provided `value` in places\n     * where Angular expects a $sce.trustAs() return value.\n     */\n    function trustAs(type, trustedValue) {\n      var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n      if (!Constructor) {\n        throw $sceMinErr('icontext',\n            'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',\n            type, trustedValue);\n      }\n      if (trustedValue === null || trustedValue === undefined || trustedValue === '') {\n        return trustedValue;\n      }\n      // All the current contexts in SCE_CONTEXTS happen to be strings.  In order to avoid trusting\n      // mutable objects, we ensure here that the value passed in is actually a string.\n      if (typeof trustedValue !== 'string') {\n        throw $sceMinErr('itype',\n            'Attempted to trust a non-string value in a content requiring a string: Context: {0}',\n            type);\n      }\n      return new Constructor(trustedValue);\n    }\n\n    /**\n     * @ngdoc method\n     * @name ng.$sceDelegate#valueOf\n     * @methodOf ng.$sceDelegate\n     *\n     * @description\n     * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#methods_trustAs\n     * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link\n     * ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs`}.\n     *\n     * If the passed parameter is not a value that had been returned by {@link\n     * ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs`}, returns it as-is.\n     *\n     * @param {*} value The result of a prior {@link ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs`}\n     *      call or anything else.\n     * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#methods_trustAs\n     *     `$sceDelegate.trustAs`} if `value` is the result of such a call.  Otherwise, returns\n     *     `value` unchanged.\n     */\n    function valueOf(maybeTrusted) {\n      if (maybeTrusted instanceof trustedValueHolderBase) {\n        return maybeTrusted.$$unwrapTrustedValue();\n      } else {\n        return maybeTrusted;\n      }\n    }\n\n    /**\n     * @ngdoc method\n     * @name ng.$sceDelegate#getTrusted\n     * @methodOf ng.$sceDelegate\n     *\n     * @description\n     * Takes the result of a {@link ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs`} call and\n     * returns the originally supplied value if the queried context type is a supertype of the\n     * created type.  If this condition isn't satisfied, throws an exception.\n     *\n     * @param {string} type The kind of context in which this value is to be used.\n     * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#methods_trustAs\n     *     `$sceDelegate.trustAs`} call.\n     * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#methods_trustAs\n     *     `$sceDelegate.trustAs`} if valid in this context.  Otherwise, throws an exception.\n     */\n    function getTrusted(type, maybeTrusted) {\n      if (maybeTrusted === null || maybeTrusted === undefined || maybeTrusted === '') {\n        return maybeTrusted;\n      }\n      var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n      if (constructor && maybeTrusted instanceof constructor) {\n        return maybeTrusted.$$unwrapTrustedValue();\n      }\n      // If we get here, then we may only take one of two actions.\n      // 1. sanitize the value for the requested type, or\n      // 2. throw an exception.\n      if (type === SCE_CONTEXTS.RESOURCE_URL) {\n        if (isResourceUrlAllowedByPolicy(maybeTrusted)) {\n          return maybeTrusted;\n        } else {\n          throw $sceMinErr('insecurl',\n              'Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}',\n              maybeTrusted.toString());\n        }\n      } else if (type === SCE_CONTEXTS.HTML) {\n        return htmlSanitizer(maybeTrusted);\n      }\n      throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n    }\n\n    return { trustAs: trustAs,\n             getTrusted: getTrusted,\n             valueOf: valueOf };\n  }];\n}\n\n\n/**\n * @ngdoc object\n * @name ng.$sceProvider\n * @description\n *\n * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.\n * -   enable/disable Strict Contextual Escaping (SCE) in a module\n * -   override the default implementation with a custom delegate\n *\n * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.\n */\n\n/* jshint maxlen: false*/\n\n/**\n * @ngdoc service\n * @name ng.$sce\n * @function\n *\n * @description\n *\n * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.\n *\n * # Strict Contextual Escaping\n *\n * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain\n * contexts to result in a value that is marked as safe to use for that context.  One example of\n * such a context is binding arbitrary html controlled by the user via `ng-bind-html`.  We refer\n * to these contexts as privileged or SCE contexts.\n *\n * As of version 1.2, Angular ships with SCE enabled by default.\n *\n * Note:  When enabled (the default), IE8 in quirks mode is not supported.  In this mode, IE8 allows\n * one to execute arbitrary javascript by the use of the expression() syntax.  Refer\n * <http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx> to learn more about them.\n * You can ensure your document is in standards mode and not quirks mode by adding `<!doctype html>`\n * to the top of your HTML document.\n *\n * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for\n * security vulnerabilities such as XSS, clickjacking, etc. a lot easier.\n *\n * Here's an example of a binding in a privileged context:\n *\n * <pre class=\"prettyprint\">\n *     <input ng-model=\"userHtml\">\n *     <div ng-bind-html=\"userHtml\">\n * </pre>\n *\n * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user.  With SCE\n * disabled, this application allows the user to render arbitrary HTML into the DIV.\n * In a more realistic example, one may be rendering user comments, blog articles, etc. via\n * bindings.  (HTML is just one example of a context where rendering user controlled input creates\n * security vulnerabilities.)\n *\n * For the case of HTML, you might use a library, either on the client side, or on the server side,\n * to sanitize unsafe HTML before binding to the value and rendering it in the document.\n *\n * How would you ensure that every place that used these types of bindings was bound to a value that\n * was sanitized by your library (or returned as safe for rendering by your server?)  How can you\n * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some\n * properties/fields and forgot to update the binding to the sanitized value?\n *\n * To be secure by default, you want to ensure that any such bindings are disallowed unless you can\n * determine that something explicitly says it's safe to use a value for binding in that\n * context.  You can then audit your code (a simple grep would do) to ensure that this is only done\n * for those values that you can easily tell are safe - because they were received from your server,\n * sanitized by your library, etc.  You can organize your codebase to help with this - perhaps\n * allowing only the files in a specific directory to do this.  Ensuring that the internal API\n * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.\n *\n * In the case of AngularJS' SCE service, one uses {@link ng.$sce#methods_trustAs $sce.trustAs} \n * (and shorthand methods such as {@link ng.$sce#methods_trustAsHtml $sce.trustAsHtml}, etc.) to\n * obtain values that will be accepted by SCE / privileged contexts.\n *\n *\n * ## How does it work?\n *\n * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#methods_getTrusted\n * $sce.getTrusted(context, value)} rather than to the value directly.  Directives use {@link\n * ng.$sce#methods_parse $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the\n * {@link ng.$sce#methods_getTrusted $sce.getTrusted} behind the scenes on non-constant literals.\n *\n * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link\n * ng.$sce#methods_parseAsHtml $sce.parseAsHtml(binding expression)}.  Here's the actual code (slightly\n * simplified):\n *\n * <pre class=\"prettyprint\">\n *   var ngBindHtmlDirective = ['$sce', function($sce) {\n *     return function(scope, element, attr) {\n *       scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {\n *         element.html(value || '');\n *       });\n *     };\n *   }];\n * </pre>\n *\n * ## Impact on loading templates\n *\n * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as\n * `templateUrl`'s specified by {@link guide/directive directives}.\n *\n * By default, Angular only loads templates from the same domain and protocol as the application\n * document.  This is done by calling {@link ng.$sce#methods_getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on the template URL.  To load templates from other domains and/or\n * protocols, you may either either {@link ng.$sceDelegateProvider#methods_resourceUrlWhitelist whitelist\n * them} or {@link ng.$sce#methods_trustAsResourceUrl wrap it} into a trusted value.\n *\n * *Please note*:\n * The browser's\n * {@link https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest\n * Same Origin Policy} and {@link http://www.w3.org/TR/cors/ Cross-Origin Resource Sharing (CORS)}\n * policy apply in addition to this and may further restrict whether the template is successfully\n * loaded.  This means that without the right CORS policy, loading templates from a different domain\n * won't work on all browsers.  Also, loading templates from `file://` URL does not work on some\n * browsers.\n *\n * ## This feels like too much overhead for the developer?\n *\n * It's important to remember that SCE only applies to interpolation expressions.\n *\n * If your expressions are constant literals, they're automatically trusted and you don't need to\n * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g.\n * `<div ng-bind-html=\"'<b>implicitly trusted</b>'\"></div>`) just works.\n *\n * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them\n * through {@link ng.$sce#methods_getTrusted $sce.getTrusted}.  SCE doesn't play a role here.\n *\n * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load\n * templates in `ng-include` from your application's domain without having to even know about SCE.\n * It blocks loading templates from other domains or loading templates over http from an https\n * served document.  You can change these by setting your own custom {@link\n * ng.$sceDelegateProvider#methods_resourceUrlWhitelist whitelists} and {@link\n * ng.$sceDelegateProvider#methods_resourceUrlBlacklist blacklists} for matching such URLs.\n *\n * This significantly reduces the overhead.  It is far easier to pay the small overhead and have an\n * application that's secure and can be audited to verify that with much more ease than bolting\n * security onto an application later.\n *\n * <a name=\"contexts\"></a>\n * ## What trusted context types are supported?\n *\n * | Context             | Notes          |\n * |---------------------|----------------|\n * | `$sce.HTML`         | For HTML that's safe to source into the application.  The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. |\n * | `$sce.CSS`          | For CSS that's safe to source into the application.  Currently unused.  Feel free to use it in your own directives. |\n * | `$sce.URL`          | For URLs that are safe to follow as links.  Currently unused (`<a href=` and `<img src=` sanitize their urls and don't consititute an SCE context. |\n * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contens are also safe to include in your application.  Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.)  <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |\n * | `$sce.JS`           | For JavaScript that is safe to execute in your application's context.  Currently unused.  Feel free to use it in your own directives. |\n *\n * ## Format of items in {@link ng.$sceDelegateProvider#methods_resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#methods_resourceUrlBlacklist Blacklist} <a name=\"resourceUrlPatternItem\"></a>\n *\n *  Each element in these arrays must be one of the following:\n *\n *  - **'self'**\n *    - The special **string**, `'self'`, can be used to match against all URLs of the **same\n *      domain** as the application document using the **same protocol**.\n *  - **String** (except the special value `'self'`)\n *    - The string is matched against the full *normalized / absolute URL* of the resource\n *      being tested (substring matches are not good enough.)\n *    - There are exactly **two wildcard sequences** - `*` and `**`.  All other characters\n *      match themselves.\n *    - `*`: matches zero or more occurances of any character other than one of the following 6\n *      characters: '`:`', '`/`', '`.`', '`?`', '`&`' and ';'.  It's a useful wildcard for use\n *      in a whitelist.\n *    - `**`: matches zero or more occurances of *any* character.  As such, it's not\n *      not appropriate to use in for a scheme, domain, etc. as it would match too much.  (e.g.\n *      http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might\n *      not have been the intention.)  It's usage at the very end of the path is ok.  (e.g.\n *      http://foo.example.com/templates/**).\n *  - **RegExp** (*see caveat below*)\n *    - *Caveat*:  While regular expressions are powerful and offer great flexibility,  their syntax\n *      (and all the inevitable escaping) makes them *harder to maintain*.  It's easy to\n *      accidentally introduce a bug when one updates a complex expression (imho, all regexes should\n *      have good test coverage.).  For instance, the use of `.` in the regex is correct only in a\n *      small number of cases.  A `.` character in the regex used when matching the scheme or a\n *      subdomain could be matched against a `:` or literal `.` that was likely not intended.   It\n *      is highly recommended to use the string patterns and only fall back to regular expressions\n *      if they as a last resort.\n *    - The regular expression must be an instance of RegExp (i.e. not a string.)  It is\n *      matched against the **entire** *normalized / absolute URL* of the resource being tested\n *      (even when the RegExp did not have the `^` and `$` codes.)  In addition, any flags\n *      present on the RegExp (such as multiline, global, ignoreCase) are ignored.\n *    - If you are generating your JavaScript from some other templating engine (not\n *      recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),\n *      remember to escape your regular expression (and be aware that you might need more than\n *      one level of escaping depending on your templating engine and the way you interpolated\n *      the value.)  Do make use of your platform's escaping mechanism as it might be good\n *      enough before coding your own.  e.g. Ruby has\n *      [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)\n *      and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).\n *      Javascript lacks a similar built in function for escaping.  Take a look at Google\n *      Closure library's [goog.string.regExpEscape(s)](\n *      http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.\n *\n * ## Show me an example using SCE.\n *\n * @example\n<example module=\"mySceApp\" deps=\"angular-sanitize.js\">\n<file name=\"index.html\">\n  <div ng-controller=\"myAppController as myCtrl\">\n    <i ng-bind-html=\"myCtrl.explicitlyTrustedHtml\" id=\"explicitlyTrustedHtml\"></i><br><br>\n    <b>User comments</b><br>\n    By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when\n    $sanitize is available.  If $sanitize isn't available, this results in an error instead of an\n    exploit.\n    <div class=\"well\">\n      <div ng-repeat=\"userComment in myCtrl.userComments\">\n        <b>{{userComment.name}}</b>:\n        <span ng-bind-html=\"userComment.htmlComment\" class=\"htmlComment\"></span>\n        <br>\n      </div>\n    </div>\n  </div>\n</file>\n\n<file name=\"script.js\">\n  var mySceApp = angular.module('mySceApp', ['ngSanitize']);\n\n  mySceApp.controller(\"myAppController\", function myAppController($http, $templateCache, $sce) {\n    var self = this;\n    $http.get(\"test_data.json\", {cache: $templateCache}).success(function(userComments) {\n      self.userComments = userComments;\n    });\n    self.explicitlyTrustedHtml = $sce.trustAsHtml(\n        '<span onmouseover=\"this.textContent=&quot;Explicitly trusted HTML bypasses ' +\n        'sanitization.&quot;\">Hover over this text.</span>');\n  });\n</file>\n\n<file name=\"test_data.json\">\n[\n  { \"name\": \"Alice\",\n    \"htmlComment\":\n        \"<span onmouseover='this.textContent=\\\"PWN3D!\\\"'>Is <i>anyone</i> reading this?</span>\"\n  },\n  { \"name\": \"Bob\",\n    \"htmlComment\": \"<i>Yes!</i>  Am I the only other one?\"\n  }\n]\n</file>\n\n<file name=\"protractorTest.js\">\n  describe('SCE doc demo', function() {\n    it('should sanitize untrusted values', function() {\n      expect(element(by.css('.htmlComment')).getInnerHtml())\n          .toBe('<span>Is <i>anyone</i> reading this?</span>');\n    });\n\n    it('should NOT sanitize explicitly trusted values', function() {\n      expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(\n          '<span onmouseover=\"this.textContent=&quot;Explicitly trusted HTML bypasses ' +\n          'sanitization.&quot;\">Hover over this text.</span>');\n    });\n  });\n</file>\n</example>\n *\n *\n *\n * ## Can I disable SCE completely?\n *\n * Yes, you can.  However, this is strongly discouraged.  SCE gives you a lot of security benefits\n * for little coding overhead.  It will be much harder to take an SCE disabled application and\n * either secure it on your own or enable SCE at a later stage.  It might make sense to disable SCE\n * for cases where you have a lot of existing code that was written before SCE was introduced and\n * you're migrating them a module at a time.\n *\n * That said, here's how you can completely disable SCE:\n *\n * <pre class=\"prettyprint\">\n *   angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {\n *     // Completely disable SCE.  For demonstration purposes only!\n *     // Do not use in new projects.\n *     $sceProvider.enabled(false);\n *   });\n * </pre>\n *\n */\n/* jshint maxlen: 100 */\n\nfunction $SceProvider() {\n  var enabled = true;\n\n  /**\n   * @ngdoc function\n   * @name ng.sceProvider#enabled\n   * @methodOf ng.$sceProvider\n   * @function\n   *\n   * @param {boolean=} value If provided, then enables/disables SCE.\n   * @return {boolean} true if SCE is enabled, false otherwise.\n   *\n   * @description\n   * Enables/disables SCE and returns the current value.\n   */\n  this.enabled = function (value) {\n    if (arguments.length) {\n      enabled = !!value;\n    }\n    return enabled;\n  };\n\n\n  /* Design notes on the default implementation for SCE.\n   *\n   * The API contract for the SCE delegate\n   * -------------------------------------\n   * The SCE delegate object must provide the following 3 methods:\n   *\n   * - trustAs(contextEnum, value)\n   *     This method is used to tell the SCE service that the provided value is OK to use in the\n   *     contexts specified by contextEnum.  It must return an object that will be accepted by\n   *     getTrusted() for a compatible contextEnum and return this value.\n   *\n   * - valueOf(value)\n   *     For values that were not produced by trustAs(), return them as is.  For values that were\n   *     produced by trustAs(), return the corresponding input value to trustAs.  Basically, if\n   *     trustAs is wrapping the given values into some type, this operation unwraps it when given\n   *     such a value.\n   *\n   * - getTrusted(contextEnum, value)\n   *     This function should return the a value that is safe to use in the context specified by\n   *     contextEnum or throw and exception otherwise.\n   *\n   * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be\n   * opaque or wrapped in some holder object.  That happens to be an implementation detail.  For\n   * instance, an implementation could maintain a registry of all trusted objects by context.  In\n   * such a case, trustAs() would return the same object that was passed in.  getTrusted() would\n   * return the same object passed in if it was found in the registry under a compatible context or\n   * throw an exception otherwise.  An implementation might only wrap values some of the time based\n   * on some criteria.  getTrusted() might return a value and not throw an exception for special\n   * constants or objects even if not wrapped.  All such implementations fulfill this contract.\n   *\n   *\n   * A note on the inheritance model for SCE contexts\n   * ------------------------------------------------\n   * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types.  This\n   * is purely an implementation details.\n   *\n   * The contract is simply this:\n   *\n   *     getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)\n   *     will also succeed.\n   *\n   * Inheritance happens to capture this in a natural way.  In some future, we\n   * may not use inheritance anymore.  That is OK because no code outside of\n   * sce.js and sceSpecs.js would need to be aware of this detail.\n   */\n\n  this.$get = ['$parse', '$sniffer', '$sceDelegate', function(\n                $parse,   $sniffer,   $sceDelegate) {\n    // Prereq: Ensure that we're not running in IE8 quirks mode.  In that mode, IE allows\n    // the \"expression(javascript expression)\" syntax which is insecure.\n    if (enabled && $sniffer.msie && $sniffer.msieDocumentMode < 8) {\n      throw $sceMinErr('iequirks',\n        'Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks ' +\n        'mode.  You can fix this by adding the text <!doctype html> to the top of your HTML ' +\n        'document.  See http://docs.angularjs.org/api/ng.$sce for more information.');\n    }\n\n    var sce = copy(SCE_CONTEXTS);\n\n    /**\n     * @ngdoc function\n     * @name ng.sce#isEnabled\n     * @methodOf ng.$sce\n     * @function\n     *\n     * @return {Boolean} true if SCE is enabled, false otherwise.  If you want to set the value, you\n     * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.\n     *\n     * @description\n     * Returns a boolean indicating if SCE is enabled.\n     */\n    sce.isEnabled = function () {\n      return enabled;\n    };\n    sce.trustAs = $sceDelegate.trustAs;\n    sce.getTrusted = $sceDelegate.getTrusted;\n    sce.valueOf = $sceDelegate.valueOf;\n\n    if (!enabled) {\n      sce.trustAs = sce.getTrusted = function(type, value) { return value; };\n      sce.valueOf = identity;\n    }\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#parse\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Converts Angular {@link guide/expression expression} into a function.  This is like {@link\n     * ng.$parse $parse} and is identical when the expression is a literal constant.  Otherwise, it\n     * wraps the expression in a call to {@link ng.$sce#methods_getTrusted $sce.getTrusted(*type*,\n     * *result*)}\n     *\n     * @param {string} type The kind of SCE context in which this result will be used.\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n    sce.parseAs = function sceParseAs(type, expr) {\n      var parsed = $parse(expr);\n      if (parsed.literal && parsed.constant) {\n        return parsed;\n      } else {\n        return function sceParseAsTrusted(self, locals) {\n          return sce.getTrusted(type, parsed(self, locals));\n        };\n      }\n    };\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#trustAs\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Delegates to {@link ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs`}.  As such,\n     * returns an object that is trusted by angular for use in specified strict contextual\n     * escaping contexts (such as ng-bind-html, ng-include, any src attribute\n     * interpolation, any dom event binding attribute interpolation such as for onclick,  etc.)\n     * that uses the provided value.  See * {@link ng.$sce $sce} for enabling strict contextual\n     * escaping.\n     *\n     * @param {string} type The kind of context in which this value is safe for use.  e.g. url,\n     *   resource_url, html, js and css.\n     * @param {*} value The value that that should be considered trusted/safe.\n     * @returns {*} A value that can be used to stand in for the provided `value` in places\n     * where Angular expects a $sce.trustAs() return value.\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#trustAsHtml\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsHtml(value)` →\n     *     {@link ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs($sce.HTML, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#methods_getTrustedHtml\n     *     $sce.getTrustedHtml(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the\n     *     return value of {@link ng.$sce#methods_trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#trustAsUrl\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsUrl(value)` →\n     *     {@link ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs($sce.URL, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#methods_getTrustedUrl\n     *     $sce.getTrustedUrl(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the\n     *     return value of {@link ng.$sce#methods_trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#trustAsResourceUrl\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsResourceUrl(value)` →\n     *     {@link ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#methods_getTrustedResourceUrl\n     *     $sce.getTrustedResourceUrl(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the return\n     *     value of {@link ng.$sce#methods_trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#trustAsJs\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsJs(value)` →\n     *     {@link ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs($sce.JS, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#methods_getTrustedJs\n     *     $sce.getTrustedJs(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the\n     *     return value of {@link ng.$sce#methods_trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#getTrusted\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Delegates to {@link ng.$sceDelegate#methods_getTrusted `$sceDelegate.getTrusted`}.  As such,\n     * takes the result of a {@link ng.$sce#methods_trustAs `$sce.trustAs`}() call and returns the\n     * originally supplied value if the queried context type is a supertype of the created type.\n     * If this condition isn't satisfied, throws an exception.\n     *\n     * @param {string} type The kind of context in which this value is to be used.\n     * @param {*} maybeTrusted The result of a prior {@link ng.$sce#methods_trustAs `$sce.trustAs`}\n     *                         call.\n     * @returns {*} The value the was originally provided to\n     *              {@link ng.$sce#methods_trustAs `$sce.trustAs`} if valid in this context.\n     *              Otherwise, throws an exception.\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#getTrustedHtml\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedHtml(value)` →\n     *     {@link ng.$sceDelegate#methods_getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#getTrustedCss\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedCss(value)` →\n     *     {@link ng.$sceDelegate#methods_getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#getTrustedUrl\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedUrl(value)` →\n     *     {@link ng.$sceDelegate#methods_getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#getTrustedResourceUrl\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedResourceUrl(value)` →\n     *     {@link ng.$sceDelegate#methods_getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}\n     *\n     * @param {*} value The value to pass to `$sceDelegate.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#getTrustedJs\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedJs(value)` →\n     *     {@link ng.$sceDelegate#methods_getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#parseAsHtml\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsHtml(expression string)` →\n     *     {@link ng.$sce#methods_parse `$sce.parseAs($sce.HTML, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#parseAsCss\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsCss(value)` →\n     *     {@link ng.$sce#methods_parse `$sce.parseAs($sce.CSS, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#parseAsUrl\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsUrl(value)` →\n     *     {@link ng.$sce#methods_parse `$sce.parseAs($sce.URL, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#parseAsResourceUrl\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsResourceUrl(value)` →\n     *     {@link ng.$sce#methods_parse `$sce.parseAs($sce.RESOURCE_URL, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#parseAsJs\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsJs(value)` →\n     *     {@link ng.$sce#methods_parse `$sce.parseAs($sce.JS, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    // Shorthand delegations.\n    var parse = sce.parseAs,\n        getTrusted = sce.getTrusted,\n        trustAs = sce.trustAs;\n\n    forEach(SCE_CONTEXTS, function (enumValue, name) {\n      var lName = lowercase(name);\n      sce[camelCase(\"parse_as_\" + lName)] = function (expr) {\n        return parse(enumValue, expr);\n      };\n      sce[camelCase(\"get_trusted_\" + lName)] = function (value) {\n        return getTrusted(enumValue, value);\n      };\n      sce[camelCase(\"trust_as_\" + lName)] = function (value) {\n        return trustAs(enumValue, value);\n      };\n    });\n\n    return sce;\n  }];\n}\n\n/**\n * !!! This is an undocumented \"private\" service !!!\n *\n * @name ng.$sniffer\n * @requires $window\n * @requires $document\n *\n * @property {boolean} history Does the browser support html5 history api ?\n * @property {boolean} hashchange Does the browser support hashchange event ?\n * @property {boolean} transitions Does the browser support CSS transition events ?\n * @property {boolean} animations Does the browser support CSS animation events ?\n *\n * @description\n * This is very simple implementation of testing browser's features.\n */\nfunction $SnifferProvider() {\n  this.$get = ['$window', '$document', function($window, $document) {\n    var eventSupport = {},\n        android =\n          int((/android (\\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),\n        boxee = /Boxee/i.test(($window.navigator || {}).userAgent),\n        document = $document[0] || {},\n        documentMode = document.documentMode,\n        vendorPrefix,\n        vendorRegex = /^(Moz|webkit|O|ms)(?=[A-Z])/,\n        bodyStyle = document.body && document.body.style,\n        transitions = false,\n        animations = false,\n        match;\n\n    if (bodyStyle) {\n      for(var prop in bodyStyle) {\n        if(match = vendorRegex.exec(prop)) {\n          vendorPrefix = match[0];\n          vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1);\n          break;\n        }\n      }\n\n      if(!vendorPrefix) {\n        vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit';\n      }\n\n      transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));\n      animations  = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));\n\n      if (android && (!transitions||!animations)) {\n        transitions = isString(document.body.style.webkitTransition);\n        animations = isString(document.body.style.webkitAnimation);\n      }\n    }\n\n\n    return {\n      // Android has history.pushState, but it does not update location correctly\n      // so let's not use the history API at all.\n      // https://code.google.com/p/android/issues/detail?id=17471\n      // https://github.com/angular/angular.js/issues/904\n\n      // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has\n      // so let's not use the history API also\n      // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined\n      // jshint -W018\n      history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),\n      // jshint +W018\n      hashchange: 'onhashchange' in $window &&\n                  // IE8 compatible mode lies\n                  (!documentMode || documentMode > 7),\n      hasEvent: function(event) {\n        // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have\n        // it. In particular the event is not fired when backspace or delete key are pressed or\n        // when cut operation is performed.\n        if (event == 'input' && msie == 9) return false;\n\n        if (isUndefined(eventSupport[event])) {\n          var divElm = document.createElement('div');\n          eventSupport[event] = 'on' + event in divElm;\n        }\n\n        return eventSupport[event];\n      },\n      csp: csp(),\n      vendorPrefix: vendorPrefix,\n      transitions : transitions,\n      animations : animations,\n      android: android,\n      msie : msie,\n      msieDocumentMode: documentMode\n    };\n  }];\n}\n\nfunction $TimeoutProvider() {\n  this.$get = ['$rootScope', '$browser', '$q', '$exceptionHandler',\n       function($rootScope,   $browser,   $q,   $exceptionHandler) {\n    var deferreds = {};\n\n\n     /**\n      * @ngdoc function\n      * @name ng.$timeout\n      * @requires $browser\n      *\n      * @description\n      * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch\n      * block and delegates any exceptions to\n      * {@link ng.$exceptionHandler $exceptionHandler} service.\n      *\n      * The return value of registering a timeout function is a promise, which will be resolved when\n      * the timeout is reached and the timeout function is executed.\n      *\n      * To cancel a timeout request, call `$timeout.cancel(promise)`.\n      *\n      * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to\n      * synchronously flush the queue of deferred functions.\n      *\n      * @param {function()} fn A function, whose execution should be delayed.\n      * @param {number=} [delay=0] Delay in milliseconds.\n      * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n      *   will invoke `fn` within the {@link ng.$rootScope.Scope#methods_$apply $apply} block.\n      * @returns {Promise} Promise that will be resolved when the timeout is reached. The value this\n      *   promise will be resolved with is the return value of the `fn` function.\n      * \n      */\n    function timeout(fn, delay, invokeApply) {\n      var deferred = $q.defer(),\n          promise = deferred.promise,\n          skipApply = (isDefined(invokeApply) && !invokeApply),\n          timeoutId;\n\n      timeoutId = $browser.defer(function() {\n        try {\n          deferred.resolve(fn());\n        } catch(e) {\n          deferred.reject(e);\n          $exceptionHandler(e);\n        }\n        finally {\n          delete deferreds[promise.$$timeoutId];\n        }\n\n        if (!skipApply) $rootScope.$apply();\n      }, delay);\n\n      promise.$$timeoutId = timeoutId;\n      deferreds[timeoutId] = deferred;\n\n      return promise;\n    }\n\n\n     /**\n      * @ngdoc function\n      * @name ng.$timeout#cancel\n      * @methodOf ng.$timeout\n      *\n      * @description\n      * Cancels a task associated with the `promise`. As a result of this, the promise will be\n      * resolved with a rejection.\n      *\n      * @param {Promise=} promise Promise returned by the `$timeout` function.\n      * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n      *   canceled.\n      */\n    timeout.cancel = function(promise) {\n      if (promise && promise.$$timeoutId in deferreds) {\n        deferreds[promise.$$timeoutId].reject('canceled');\n        delete deferreds[promise.$$timeoutId];\n        return $browser.defer.cancel(promise.$$timeoutId);\n      }\n      return false;\n    };\n\n    return timeout;\n  }];\n}\n\n// NOTE:  The usage of window and document instead of $window and $document here is\n// deliberate.  This service depends on the specific behavior of anchor nodes created by the\n// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and\n// cause us to break tests.  In addition, when the browser resolves a URL for XHR, it\n// doesn't know about mocked locations and resolves URLs to the real document - which is\n// exactly the behavior needed here.  There is little value is mocking these out for this\n// service.\nvar urlParsingNode = document.createElement(\"a\");\nvar originUrl = urlResolve(window.location.href, true);\n\n\n/**\n *\n * Implementation Notes for non-IE browsers\n * ----------------------------------------\n * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,\n * results both in the normalizing and parsing of the URL.  Normalizing means that a relative\n * URL will be resolved into an absolute URL in the context of the application document.\n * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related\n * properties are all populated to reflect the normalized URL.  This approach has wide\n * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc.  See\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *\n * Implementation Notes for IE\n * ---------------------------\n * IE >= 8 and <= 10 normalizes the URL when assigned to the anchor node similar to the other\n * browsers.  However, the parsed components will not be set if the URL assigned did not specify\n * them.  (e.g. if you assign a.href = \"foo\", then a.protocol, a.host, etc. will be empty.)  We\n * work around that by performing the parsing in a 2nd step by taking a previously normalized\n * URL (e.g. by assigning to a.href) and assigning it a.href again.  This correctly populates the\n * properties such as protocol, hostname, port, etc.\n *\n * IE7 does not normalize the URL when assigned to an anchor node.  (Apparently, it does, if one\n * uses the inner HTML approach to assign the URL as part of an HTML snippet -\n * http://stackoverflow.com/a/472729)  However, setting img[src] does normalize the URL.\n * Unfortunately, setting img[src] to something like \"javascript:foo\" on IE throws an exception.\n * Since the primary usage for normalizing URLs is to sanitize such URLs, we can't use that\n * method and IE < 8 is unsupported.\n *\n * References:\n *   http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement\n *   http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *   http://url.spec.whatwg.org/#urlutils\n *   https://github.com/angular/angular.js/pull/2902\n *   http://james.padolsey.com/javascript/parsing-urls-with-the-dom/\n *\n * @function\n * @param {string} url The URL to be parsed.\n * @description Normalizes and parses a URL.\n * @returns {object} Returns the normalized URL as a dictionary.\n *\n *   | member name   | Description    |\n *   |---------------|----------------|\n *   | href          | A normalized version of the provided URL if it was not an absolute URL |\n *   | protocol      | The protocol including the trailing colon                              |\n *   | host          | The host and port (if the port is non-default) of the normalizedUrl    |\n *   | search        | The search params, minus the question mark                             |\n *   | hash          | The hash string, minus the hash symbol\n *   | hostname      | The hostname\n *   | port          | The port, without \":\"\n *   | pathname      | The pathname, beginning with \"/\"\n *\n */\nfunction urlResolve(url, base) {\n  var href = url;\n\n  if (msie) {\n    // Normalize before parse.  Refer Implementation Notes on why this is\n    // done in two steps on IE.\n    urlParsingNode.setAttribute(\"href\", href);\n    href = urlParsingNode.href;\n  }\n\n  urlParsingNode.setAttribute('href', href);\n\n  // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n  return {\n    href: urlParsingNode.href,\n    protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n    host: urlParsingNode.host,\n    search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n    hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n    hostname: urlParsingNode.hostname,\n    port: urlParsingNode.port,\n    pathname: (urlParsingNode.pathname.charAt(0) === '/')\n      ? urlParsingNode.pathname\n      : '/' + urlParsingNode.pathname\n  };\n}\n\n/**\n * Parse a request URL and determine whether this is a same-origin request as the application document.\n *\n * @param {string|object} requestUrl The url of the request as a string that will be resolved\n * or a parsed URL object.\n * @returns {boolean} Whether the request is for the same origin as the application document.\n */\nfunction urlIsSameOrigin(requestUrl) {\n  var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n  return (parsed.protocol === originUrl.protocol &&\n          parsed.host === originUrl.host);\n}\n\n/**\n * @ngdoc object\n * @name ng.$window\n *\n * @description\n * A reference to the browser's `window` object. While `window`\n * is globally available in JavaScript, it causes testability problems, because\n * it is a global variable. In angular we always refer to it through the\n * `$window` service, so it may be overridden, removed or mocked for testing.\n *\n * Expressions, like the one defined for the `ngClick` directive in the example\n * below, are evaluated with respect to the current scope.  Therefore, there is\n * no risk of inadvertently coding in a dependency on a global value in such an\n * expression.\n *\n * @example\n   <doc:example>\n     <doc:source>\n       <script>\n         function Ctrl($scope, $window) {\n           $scope.greeting = 'Hello, World!';\n           $scope.doGreeting = function(greeting) {\n               $window.alert(greeting);\n           };\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n         <input type=\"text\" ng-model=\"greeting\" />\n         <button ng-click=\"doGreeting(greeting)\">ALERT</button>\n       </div>\n     </doc:source>\n     <doc:protractor>\n      it('should display the greeting in the input box', function() {\n       element(by.model('greeting')).sendKeys('Hello, E2E Tests');\n       // If we click the button it will block the test runner\n       // element(':button').click();\n      });\n     </doc:protractor>\n   </doc:example>\n */\nfunction $WindowProvider(){\n  this.$get = valueFn(window);\n}\n\n/**\n * @ngdoc object\n * @name ng.$filterProvider\n * @description\n *\n * Filters are just functions which transform input to an output. However filters need to be\n * Dependency Injected. To achieve this a filter definition consists of a factory function which is\n * annotated with dependencies and is responsible for creating a filter function.\n *\n * <pre>\n *   // Filter registration\n *   function MyModule($provide, $filterProvider) {\n *     // create a service to demonstrate injection (not always needed)\n *     $provide.value('greet', function(name){\n *       return 'Hello ' + name + '!';\n *     });\n *\n *     // register a filter factory which uses the\n *     // greet service to demonstrate DI.\n *     $filterProvider.register('greet', function(greet){\n *       // return the filter function which uses the greet service\n *       // to generate salutation\n *       return function(text) {\n *         // filters need to be forgiving so check input validity\n *         return text && greet(text) || text;\n *       };\n *     });\n *   }\n * </pre>\n *\n * The filter function is registered with the `$injector` under the filter name suffix with\n * `Filter`.\n * \n * <pre>\n *   it('should be the same instance', inject(\n *     function($filterProvider) {\n *       $filterProvider.register('reverse', function(){\n *         return ...;\n *       });\n *     },\n *     function($filter, reverseFilter) {\n *       expect($filter('reverse')).toBe(reverseFilter);\n *     });\n * </pre>\n *\n *\n * For more information about how angular filters work, and how to create your own filters, see\n * {@link guide/filter Filters} in the Angular Developer Guide.\n */\n/**\n * @ngdoc method\n * @name ng.$filterProvider#register\n * @methodOf ng.$filterProvider\n * @description\n * Register filter factory function.\n *\n * @param {String} name Name of the filter.\n * @param {function} fn The filter factory function which is injectable.\n */\n\n\n/**\n * @ngdoc function\n * @name ng.$filter\n * @function\n * @description\n * Filters are used for formatting data displayed to the user.\n *\n * The general syntax in templates is as follows:\n *\n *         {{ expression [| filter_name[:parameter_value] ... ] }}\n *\n * @param {String} name Name of the filter function to retrieve\n * @return {Function} the filter function\n */\n$FilterProvider.$inject = ['$provide'];\nfunction $FilterProvider($provide) {\n  var suffix = 'Filter';\n\n  /**\n   * @ngdoc function\n   * @name ng.$controllerProvider#register\n   * @methodOf ng.$controllerProvider\n   * @param {string|Object} name Name of the filter function, or an object map of filters where\n   *    the keys are the filter names and the values are the filter factories.\n   * @returns {Object} Registered filter instance, or if a map of filters was provided then a map\n   *    of the registered filter instances.\n   */\n  function register(name, factory) {\n    if(isObject(name)) {\n      var filters = {};\n      forEach(name, function(filter, key) {\n        filters[key] = register(key, filter);\n      });\n      return filters;\n    } else {\n      return $provide.factory(name + suffix, factory);\n    }\n  }\n  this.register = register;\n\n  this.$get = ['$injector', function($injector) {\n    return function(name) {\n      return $injector.get(name + suffix);\n    };\n  }];\n\n  ////////////////////////////////////////\n  \n  /* global\n    currencyFilter: false,\n    dateFilter: false,\n    filterFilter: false,\n    jsonFilter: false,\n    limitToFilter: false,\n    lowercaseFilter: false,\n    numberFilter: false,\n    orderByFilter: false,\n    uppercaseFilter: false,\n  */\n\n  register('currency', currencyFilter);\n  register('date', dateFilter);\n  register('filter', filterFilter);\n  register('json', jsonFilter);\n  register('limitTo', limitToFilter);\n  register('lowercase', lowercaseFilter);\n  register('number', numberFilter);\n  register('orderBy', orderByFilter);\n  register('uppercase', uppercaseFilter);\n}\n\n/**\n * @ngdoc filter\n * @name ng.filter:filter\n * @function\n *\n * @description\n * Selects a subset of items from `array` and returns it as a new array.\n *\n * @param {Array} array The source array.\n * @param {string|Object|function()} expression The predicate to be used for selecting items from\n *   `array`.\n *\n *   Can be one of:\n *\n *   - `string`: The string is evaluated as an expression and the resulting value is used for substring match against\n *     the contents of the `array`. All strings or objects with string properties in `array` that contain this string\n *     will be returned. The predicate can be negated by prefixing the string with `!`.\n *\n *   - `Object`: A pattern object can be used to filter specific properties on objects contained\n *     by `array`. For example `{name:\"M\", phone:\"1\"}` predicate will return an array of items\n *     which have property `name` containing \"M\" and property `phone` containing \"1\". A special\n *     property name `$` can be used (as in `{$:\"text\"}`) to accept a match against any\n *     property of the object. That's equivalent to the simple substring match with a `string`\n *     as described above.\n *\n *   - `function(value)`: A predicate function can be used to write arbitrary filters. The function is\n *     called for each element of `array`. The final result is an array of those elements that\n *     the predicate returned true for.\n *\n * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in\n *     determining if the expected value (from the filter expression) and actual value (from\n *     the object in the array) should be considered a match.\n *\n *   Can be one of:\n *\n *     - `function(actual, expected)`:\n *       The function will be given the object value and the predicate value to compare and\n *       should return true if the item should be included in filtered result.\n *\n *     - `true`: A shorthand for `function(actual, expected) { return angular.equals(expected, actual)}`.\n *       this is essentially strict comparison of expected and actual.\n *\n *     - `false|undefined`: A short hand for a function which will look for a substring match in case\n *       insensitive way.\n *\n * @example\n   <doc:example>\n     <doc:source>\n       <div ng-init=\"friends = [{name:'John', phone:'555-1276'},\n                                {name:'Mary', phone:'800-BIG-MARY'},\n                                {name:'Mike', phone:'555-4321'},\n                                {name:'Adam', phone:'555-5678'},\n                                {name:'Julie', phone:'555-8765'},\n                                {name:'Juliette', phone:'555-5678'}]\"></div>\n\n       Search: <input ng-model=\"searchText\">\n       <table id=\"searchTextResults\">\n         <tr><th>Name</th><th>Phone</th></tr>\n         <tr ng-repeat=\"friend in friends | filter:searchText\">\n           <td>{{friend.name}}</td>\n           <td>{{friend.phone}}</td>\n         </tr>\n       </table>\n       <hr>\n       Any: <input ng-model=\"search.$\"> <br>\n       Name only <input ng-model=\"search.name\"><br>\n       Phone only <input ng-model=\"search.phone\"><br>\n       Equality <input type=\"checkbox\" ng-model=\"strict\"><br>\n       <table id=\"searchObjResults\">\n         <tr><th>Name</th><th>Phone</th></tr>\n         <tr ng-repeat=\"friendObj in friends | filter:search:strict\">\n           <td>{{friendObj.name}}</td>\n           <td>{{friendObj.phone}}</td>\n         </tr>\n       </table>\n     </doc:source>\n     <doc:protractor>\n       var expectFriendNames = function(expectedNames, key) {\n         element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {\n           arr.forEach(function(wd, i) {\n             expect(wd.getText()).toMatch(expectedNames[i]);\n           });\n         });\n       };\n\n       it('should search across all fields when filtering with a string', function() {\n         var searchText = element(by.model('searchText'));\n         searchText.clear();\n         searchText.sendKeys('m');\n         expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');\n\n         searchText.clear();\n         searchText.sendKeys('76');\n         expectFriendNames(['John', 'Julie'], 'friend');\n       });\n\n       it('should search in specific fields when filtering with a predicate object', function() {\n         var searchAny = element(by.model('search.$'));\n         searchAny.clear();\n         searchAny.sendKeys('i');\n         expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');\n       });\n       it('should use a equal comparison when comparator is true', function() {\n         var searchName = element(by.model('search.name'));\n         var strict = element(by.model('strict'));\n         searchName.clear();\n         searchName.sendKeys('Julie');\n         strict.click();\n         expectFriendNames(['Julie'], 'friendObj');\n       });\n     </doc:protractor>\n   </doc:example>\n */\nfunction filterFilter() {\n  return function(array, expression, comparator) {\n    if (!isArray(array)) return array;\n\n    var comparatorType = typeof(comparator),\n        predicates = [];\n\n    predicates.check = function(value) {\n      for (var j = 0; j < predicates.length; j++) {\n        if(!predicates[j](value)) {\n          return false;\n        }\n      }\n      return true;\n    };\n\n    if (comparatorType !== 'function') {\n      if (comparatorType === 'boolean' && comparator) {\n        comparator = function(obj, text) {\n          return angular.equals(obj, text);\n        };\n      } else {\n        comparator = function(obj, text) {\n          text = (''+text).toLowerCase();\n          return (''+obj).toLowerCase().indexOf(text) > -1;\n        };\n      }\n    }\n\n    var search = function(obj, text){\n      if (typeof text == 'string' && text.charAt(0) === '!') {\n        return !search(obj, text.substr(1));\n      }\n      switch (typeof obj) {\n        case \"boolean\":\n        case \"number\":\n        case \"string\":\n          return comparator(obj, text);\n        case \"object\":\n          switch (typeof text) {\n            case \"object\":\n              return comparator(obj, text);\n            default:\n              for ( var objKey in obj) {\n                if (objKey.charAt(0) !== '$' && search(obj[objKey], text)) {\n                  return true;\n                }\n              }\n              break;\n          }\n          return false;\n        case \"array\":\n          for ( var i = 0; i < obj.length; i++) {\n            if (search(obj[i], text)) {\n              return true;\n            }\n          }\n          return false;\n        default:\n          return false;\n      }\n    };\n    switch (typeof expression) {\n      case \"boolean\":\n      case \"number\":\n      case \"string\":\n        // Set up expression object and fall through\n        expression = {$:expression};\n        // jshint -W086\n      case \"object\":\n        // jshint +W086\n        for (var key in expression) {\n          (function(path) {\n            if (typeof expression[path] == 'undefined') return;\n            predicates.push(function(value) {\n              return search(path == '$' ? value : (value && value[path]), expression[path]);\n            });\n          })(key);\n        }\n        break;\n      case 'function':\n        predicates.push(expression);\n        break;\n      default:\n        return array;\n    }\n    var filtered = [];\n    for ( var j = 0; j < array.length; j++) {\n      var value = array[j];\n      if (predicates.check(value)) {\n        filtered.push(value);\n      }\n    }\n    return filtered;\n  };\n}\n\n/**\n * @ngdoc filter\n * @name ng.filter:currency\n * @function\n *\n * @description\n * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default\n * symbol for current locale is used.\n *\n * @param {number} amount Input to filter.\n * @param {string=} symbol Currency symbol or identifier to be displayed.\n * @returns {string} Formatted number.\n *\n *\n * @example\n   <doc:example>\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.amount = 1234.56;\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n         <input type=\"number\" ng-model=\"amount\"> <br>\n         default currency symbol ($): <span id=\"currency-default\">{{amount | currency}}</span><br>\n         custom currency identifier (USD$): <span>{{amount | currency:\"USD$\"}}</span>\n       </div>\n     </doc:source>\n     <doc:protractor>\n       it('should init with 1234.56', function() {\n         expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');\n         expect(element(by.binding('amount | currency:\"USD$\"')).getText()).toBe('USD$1,234.56');\n       });\n       it('should update', function() {\n         if (browser.params.browser == 'safari') {\n           // Safari does not understand the minus key. See\n           // https://github.com/angular/protractor/issues/481\n           return;\n         }\n         element(by.model('amount')).clear();\n         element(by.model('amount')).sendKeys('-1234');         expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)');\n         expect(element(by.binding('amount | currency:\"USD$\"')).getText()).toBe('(USD$1,234.00)');\n       });\n     </doc:protractor>\n   </doc:example>\n */\ncurrencyFilter.$inject = ['$locale'];\nfunction currencyFilter($locale) {\n  var formats = $locale.NUMBER_FORMATS;\n  return function(amount, currencySymbol){\n    if (isUndefined(currencySymbol)) currencySymbol = formats.CURRENCY_SYM;\n    return formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, 2).\n                replace(/\\u00A4/g, currencySymbol);\n  };\n}\n\n/**\n * @ngdoc filter\n * @name ng.filter:number\n * @function\n *\n * @description\n * Formats a number as text.\n *\n * If the input is not a number an empty string is returned.\n *\n * @param {number|string} number Number to format.\n * @param {(number|string)=} fractionSize Number of decimal places to round the number to.\n * If this is not provided then the fraction size is computed from the current locale's number\n * formatting pattern. In the case of the default locale, it will be 3.\n * @returns {string} Number rounded to decimalPlaces and places a “,” after each third digit.\n *\n * @example\n   <doc:example>\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.val = 1234.56789;\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n         Enter number: <input ng-model='val'><br>\n         Default formatting: <span id='number-default'>{{val | number}}</span><br>\n         No fractions: <span>{{val | number:0}}</span><br>\n         Negative number: <span>{{-val | number:4}}</span>\n       </div>\n     </doc:source>\n     <doc:protractor>\n       it('should format numbers', function() {\n         expect(element(by.id('number-default')).getText()).toBe('1,234.568');\n         expect(element(by.binding('val | number:0')).getText()).toBe('1,235');\n         expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');\n       });\n\n       it('should update', function() {\n         element(by.model('val')).clear();\n         element(by.model('val')).sendKeys('3374.333');\n         expect(element(by.id('number-default')).getText()).toBe('3,374.333');\n         expect(element(by.binding('val | number:0')).getText()).toBe('3,374');\n         expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');\n      });\n     </doc:protractor>\n   </doc:example>\n */\n\n\nnumberFilter.$inject = ['$locale'];\nfunction numberFilter($locale) {\n  var formats = $locale.NUMBER_FORMATS;\n  return function(number, fractionSize) {\n    return formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,\n      fractionSize);\n  };\n}\n\nvar DECIMAL_SEP = '.';\nfunction formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {\n  if (isNaN(number) || !isFinite(number)) return '';\n\n  var isNegative = number < 0;\n  number = Math.abs(number);\n  var numStr = number + '',\n      formatedText = '',\n      parts = [];\n\n  var hasExponent = false;\n  if (numStr.indexOf('e') !== -1) {\n    var match = numStr.match(/([\\d\\.]+)e(-?)(\\d+)/);\n    if (match && match[2] == '-' && match[3] > fractionSize + 1) {\n      numStr = '0';\n    } else {\n      formatedText = numStr;\n      hasExponent = true;\n    }\n  }\n\n  if (!hasExponent) {\n    var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length;\n\n    // determine fractionSize if it is not specified\n    if (isUndefined(fractionSize)) {\n      fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac);\n    }\n\n    var pow = Math.pow(10, fractionSize);\n    number = Math.round(number * pow) / pow;\n    var fraction = ('' + number).split(DECIMAL_SEP);\n    var whole = fraction[0];\n    fraction = fraction[1] || '';\n\n    var i, pos = 0,\n        lgroup = pattern.lgSize,\n        group = pattern.gSize;\n\n    if (whole.length >= (lgroup + group)) {\n      pos = whole.length - lgroup;\n      for (i = 0; i < pos; i++) {\n        if ((pos - i)%group === 0 && i !== 0) {\n          formatedText += groupSep;\n        }\n        formatedText += whole.charAt(i);\n      }\n    }\n\n    for (i = pos; i < whole.length; i++) {\n      if ((whole.length - i)%lgroup === 0 && i !== 0) {\n        formatedText += groupSep;\n      }\n      formatedText += whole.charAt(i);\n    }\n\n    // format fraction part.\n    while(fraction.length < fractionSize) {\n      fraction += '0';\n    }\n\n    if (fractionSize && fractionSize !== \"0\") formatedText += decimalSep + fraction.substr(0, fractionSize);\n  } else {\n\n    if (fractionSize > 0 && number > -1 && number < 1) {\n      formatedText = number.toFixed(fractionSize);\n    }\n  }\n\n  parts.push(isNegative ? pattern.negPre : pattern.posPre);\n  parts.push(formatedText);\n  parts.push(isNegative ? pattern.negSuf : pattern.posSuf);\n  return parts.join('');\n}\n\nfunction padNumber(num, digits, trim) {\n  var neg = '';\n  if (num < 0) {\n    neg =  '-';\n    num = -num;\n  }\n  num = '' + num;\n  while(num.length < digits) num = '0' + num;\n  if (trim)\n    num = num.substr(num.length - digits);\n  return neg + num;\n}\n\n\nfunction dateGetter(name, size, offset, trim) {\n  offset = offset || 0;\n  return function(date) {\n    var value = date['get' + name]();\n    if (offset > 0 || value > -offset)\n      value += offset;\n    if (value === 0 && offset == -12 ) value = 12;\n    return padNumber(value, size, trim);\n  };\n}\n\nfunction dateStrGetter(name, shortForm) {\n  return function(date, formats) {\n    var value = date['get' + name]();\n    var get = uppercase(shortForm ? ('SHORT' + name) : name);\n\n    return formats[get][value];\n  };\n}\n\nfunction timeZoneGetter(date) {\n  var zone = -1 * date.getTimezoneOffset();\n  var paddedZone = (zone >= 0) ? \"+\" : \"\";\n\n  paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +\n                padNumber(Math.abs(zone % 60), 2);\n\n  return paddedZone;\n}\n\nfunction ampmGetter(date, formats) {\n  return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];\n}\n\nvar DATE_FORMATS = {\n  yyyy: dateGetter('FullYear', 4),\n    yy: dateGetter('FullYear', 2, 0, true),\n     y: dateGetter('FullYear', 1),\n  MMMM: dateStrGetter('Month'),\n   MMM: dateStrGetter('Month', true),\n    MM: dateGetter('Month', 2, 1),\n     M: dateGetter('Month', 1, 1),\n    dd: dateGetter('Date', 2),\n     d: dateGetter('Date', 1),\n    HH: dateGetter('Hours', 2),\n     H: dateGetter('Hours', 1),\n    hh: dateGetter('Hours', 2, -12),\n     h: dateGetter('Hours', 1, -12),\n    mm: dateGetter('Minutes', 2),\n     m: dateGetter('Minutes', 1),\n    ss: dateGetter('Seconds', 2),\n     s: dateGetter('Seconds', 1),\n     // while ISO 8601 requires fractions to be prefixed with `.` or `,`\n     // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions\n   sss: dateGetter('Milliseconds', 3),\n  EEEE: dateStrGetter('Day'),\n   EEE: dateStrGetter('Day', true),\n     a: ampmGetter,\n     Z: timeZoneGetter\n};\n\nvar DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,\n    NUMBER_STRING = /^\\-?\\d+$/;\n\n/**\n * @ngdoc filter\n * @name ng.filter:date\n * @function\n *\n * @description\n *   Formats `date` to a string based on the requested `format`.\n *\n *   `format` string can be composed of the following elements:\n *\n *   * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)\n *   * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n *   * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)\n *   * `'MMMM'`: Month in year (January-December)\n *   * `'MMM'`: Month in year (Jan-Dec)\n *   * `'MM'`: Month in year, padded (01-12)\n *   * `'M'`: Month in year (1-12)\n *   * `'dd'`: Day in month, padded (01-31)\n *   * `'d'`: Day in month (1-31)\n *   * `'EEEE'`: Day in Week,(Sunday-Saturday)\n *   * `'EEE'`: Day in Week, (Sun-Sat)\n *   * `'HH'`: Hour in day, padded (00-23)\n *   * `'H'`: Hour in day (0-23)\n *   * `'hh'`: Hour in am/pm, padded (01-12)\n *   * `'h'`: Hour in am/pm, (1-12)\n *   * `'mm'`: Minute in hour, padded (00-59)\n *   * `'m'`: Minute in hour (0-59)\n *   * `'ss'`: Second in minute, padded (00-59)\n *   * `'s'`: Second in minute (0-59)\n *   * `'.sss' or ',sss'`: Millisecond in second, padded (000-999)\n *   * `'a'`: am/pm marker\n *   * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)\n *\n *   `format` string can also be one of the following predefined\n *   {@link guide/i18n localizable formats}:\n *\n *   * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale\n *     (e.g. Sep 3, 2010 12:05:08 pm)\n *   * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US  locale (e.g. 9/3/10 12:05 pm)\n *   * `'fullDate'`: equivalent to `'EEEE, MMMM d,y'` for en_US  locale\n *     (e.g. Friday, September 3, 2010)\n *   * `'longDate'`: equivalent to `'MMMM d, y'` for en_US  locale (e.g. September 3, 2010)\n *   * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US  locale (e.g. Sep 3, 2010)\n *   * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)\n *   * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 pm)\n *   * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 pm)\n *\n *   `format` string can contain literal values. These need to be quoted with single quotes (e.g.\n *   `\"h 'in the morning'\"`). In order to output single quote, use two single quotes in a sequence\n *   (e.g. `\"h 'o''clock'\"`).\n *\n * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or\n *    number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.SSSZ and its\n *    shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is\n *    specified in the string input, the time is considered to be in the local timezone.\n * @param {string=} format Formatting rules (see Description). If not specified,\n *    `mediumDate` is used.\n * @returns {string} Formatted string or the input if input is not recognized as date/millis.\n *\n * @example\n   <doc:example>\n     <doc:source>\n       <span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:\n           <span>{{1288323623006 | date:'medium'}}</span><br>\n       <span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:\n          <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>\n       <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:\n          <span>{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}</span><br>\n     </doc:source>\n     <doc:protractor>\n       it('should format date', function() {\n         expect(element(by.binding(\"1288323623006 | date:'medium'\")).getText()).\n            toMatch(/Oct 2\\d, 2010 \\d{1,2}:\\d{2}:\\d{2} (AM|PM)/);\n         expect(element(by.binding(\"1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'\")).getText()).\n            toMatch(/2010\\-10\\-2\\d \\d{2}:\\d{2}:\\d{2} (\\-|\\+)?\\d{4}/);\n         expect(element(by.binding(\"'1288323623006' | date:'MM/dd/yyyy @ h:mma'\")).getText()).\n            toMatch(/10\\/2\\d\\/2010 @ \\d{1,2}:\\d{2}(AM|PM)/);\n       });\n     </doc:protractor>\n   </doc:example>\n */\ndateFilter.$inject = ['$locale'];\nfunction dateFilter($locale) {\n\n\n  var R_ISO8601_STR = /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n                     // 1        2       3         4          5          6          7          8  9     10      11\n  function jsonStringToDate(string) {\n    var match;\n    if (match = string.match(R_ISO8601_STR)) {\n      var date = new Date(0),\n          tzHour = 0,\n          tzMin  = 0,\n          dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n          timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n      if (match[9]) {\n        tzHour = int(match[9] + match[10]);\n        tzMin = int(match[9] + match[11]);\n      }\n      dateSetter.call(date, int(match[1]), int(match[2]) - 1, int(match[3]));\n      var h = int(match[4]||0) - tzHour;\n      var m = int(match[5]||0) - tzMin;\n      var s = int(match[6]||0);\n      var ms = Math.round(parseFloat('0.' + (match[7]||0)) * 1000);\n      timeSetter.call(date, h, m, s, ms);\n      return date;\n    }\n    return string;\n  }\n\n\n  return function(date, format) {\n    var text = '',\n        parts = [],\n        fn, match;\n\n    format = format || 'mediumDate';\n    format = $locale.DATETIME_FORMATS[format] || format;\n    if (isString(date)) {\n      if (NUMBER_STRING.test(date)) {\n        date = int(date);\n      } else {\n        date = jsonStringToDate(date);\n      }\n    }\n\n    if (isNumber(date)) {\n      date = new Date(date);\n    }\n\n    if (!isDate(date)) {\n      return date;\n    }\n\n    while(format) {\n      match = DATE_FORMATS_SPLIT.exec(format);\n      if (match) {\n        parts = concat(parts, match, 1);\n        format = parts.pop();\n      } else {\n        parts.push(format);\n        format = null;\n      }\n    }\n\n    forEach(parts, function(value){\n      fn = DATE_FORMATS[value];\n      text += fn ? fn(date, $locale.DATETIME_FORMATS)\n                 : value.replace(/(^'|'$)/g, '').replace(/''/g, \"'\");\n    });\n\n    return text;\n  };\n}\n\n\n/**\n * @ngdoc filter\n * @name ng.filter:json\n * @function\n *\n * @description\n *   Allows you to convert a JavaScript object into JSON string.\n *\n *   This filter is mostly useful for debugging. When using the double curly {{value}} notation\n *   the binding is automatically converted to JSON.\n *\n * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.\n * @returns {string} JSON string.\n *\n *\n * @example:\n   <doc:example>\n     <doc:source>\n       <pre>{{ {'name':'value'} | json }}</pre>\n     </doc:source>\n     <doc:protractor>\n       it('should jsonify filtered objects', function() {\n         expect(element(by.binding(\"{'name':'value'}\")).getText()).toMatch(/\\{\\n  \"name\": ?\"value\"\\n}/);\n       });\n     </doc:protractor>\n   </doc:example>\n *\n */\nfunction jsonFilter() {\n  return function(object) {\n    return toJson(object, true);\n  };\n}\n\n\n/**\n * @ngdoc filter\n * @name ng.filter:lowercase\n * @function\n * @description\n * Converts string to lowercase.\n * @see angular.lowercase\n */\nvar lowercaseFilter = valueFn(lowercase);\n\n\n/**\n * @ngdoc filter\n * @name ng.filter:uppercase\n * @function\n * @description\n * Converts string to uppercase.\n * @see angular.uppercase\n */\nvar uppercaseFilter = valueFn(uppercase);\n\n/**\n * @ngdoc function\n * @name ng.filter:limitTo\n * @function\n *\n * @description\n * Creates a new array or string containing only a specified number of elements. The elements\n * are taken from either the beginning or the end of the source array or string, as specified by\n * the value and sign (positive or negative) of `limit`.\n *\n * @param {Array|string} input Source array or string to be limited.\n * @param {string|number} limit The length of the returned array or string. If the `limit` number \n *     is positive, `limit` number of items from the beginning of the source array/string are copied.\n *     If the number is negative, `limit` number  of items from the end of the source array/string \n *     are copied. The `limit` will be trimmed if it exceeds `array.length`\n * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array\n *     had less than `limit` elements.\n *\n * @example\n   <doc:example>\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.numbers = [1,2,3,4,5,6,7,8,9];\n           $scope.letters = \"abcdefghi\";\n           $scope.numLimit = 3;\n           $scope.letterLimit = 3;\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n         Limit {{numbers}} to: <input type=\"integer\" ng-model=\"numLimit\">\n         <p>Output numbers: {{ numbers | limitTo:numLimit }}</p>\n         Limit {{letters}} to: <input type=\"integer\" ng-model=\"letterLimit\">\n         <p>Output letters: {{ letters | limitTo:letterLimit }}</p>\n       </div>\n     </doc:source>\n     <doc:protractor>\n       var numLimitInput = element(by.model('numLimit'));\n       var letterLimitInput = element(by.model('letterLimit'));\n       var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));\n       var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));\n\n       it('should limit the number array to first three items', function() {\n         expect(numLimitInput.getAttribute('value')).toBe('3');\n         expect(letterLimitInput.getAttribute('value')).toBe('3');\n         expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');\n         expect(limitedLetters.getText()).toEqual('Output letters: abc');\n       });\n\n       it('should update the output when -3 is entered', function() {\n         numLimitInput.clear();\n         numLimitInput.sendKeys('-3');\n         letterLimitInput.clear();\n         letterLimitInput.sendKeys('-3');\n         expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');\n         expect(limitedLetters.getText()).toEqual('Output letters: ghi');\n       });\n\n       it('should not exceed the maximum size of input array', function() {\n         numLimitInput.clear();\n         numLimitInput.sendKeys('100');\n         letterLimitInput.clear();\n         letterLimitInput.sendKeys('100');\n         expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');\n         expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');\n       });\n     </doc:protractor>\n   </doc:example>\n */\nfunction limitToFilter(){\n  return function(input, limit) {\n    if (!isArray(input) && !isString(input)) return input;\n    \n    limit = int(limit);\n\n    if (isString(input)) {\n      //NaN check on limit\n      if (limit) {\n        return limit >= 0 ? input.slice(0, limit) : input.slice(limit, input.length);\n      } else {\n        return \"\";\n      }\n    }\n\n    var out = [],\n      i, n;\n\n    // if abs(limit) exceeds maximum length, trim it\n    if (limit > input.length)\n      limit = input.length;\n    else if (limit < -input.length)\n      limit = -input.length;\n\n    if (limit > 0) {\n      i = 0;\n      n = limit;\n    } else {\n      i = input.length + limit;\n      n = input.length;\n    }\n\n    for (; i<n; i++) {\n      out.push(input[i]);\n    }\n\n    return out;\n  };\n}\n\n/**\n * @ngdoc function\n * @name ng.filter:orderBy\n * @function\n *\n * @description\n * Orders a specified `array` by the `expression` predicate.\n *\n * @param {Array} array The array to sort.\n * @param {function(*)|string|Array.<(function(*)|string)>} expression A predicate to be\n *    used by the comparator to determine the order of elements.\n *\n *    Can be one of:\n *\n *    - `function`: Getter function. The result of this function will be sorted using the\n *      `<`, `=`, `>` operator.\n *    - `string`: An Angular expression which evaluates to an object to order by, such as 'name'\n *      to sort by a property called 'name'. Optionally prefixed with `+` or `-` to control\n *      ascending or descending sort order (for example, +name or -name).\n *    - `Array`: An array of function or string predicates. The first predicate in the array\n *      is used for sorting, but when two items are equivalent, the next predicate is used.\n *\n * @param {boolean=} reverse Reverse the order the array.\n * @returns {Array} Sorted copy of the source array.\n *\n * @example\n   <doc:example>\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.friends =\n               [{name:'John', phone:'555-1212', age:10},\n                {name:'Mary', phone:'555-9876', age:19},\n                {name:'Mike', phone:'555-4321', age:21},\n                {name:'Adam', phone:'555-5678', age:35},\n                {name:'Julie', phone:'555-8765', age:29}]\n           $scope.predicate = '-age';\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n         <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>\n         <hr/>\n         [ <a href=\"\" ng-click=\"predicate=''\">unsorted</a> ]\n         <table class=\"friend\">\n           <tr>\n             <th><a href=\"\" ng-click=\"predicate = 'name'; reverse=false\">Name</a>\n                 (<a href=\"\" ng-click=\"predicate = '-name'; reverse=false\">^</a>)</th>\n             <th><a href=\"\" ng-click=\"predicate = 'phone'; reverse=!reverse\">Phone Number</a></th>\n             <th><a href=\"\" ng-click=\"predicate = 'age'; reverse=!reverse\">Age</a></th>\n           </tr>\n           <tr ng-repeat=\"friend in friends | orderBy:predicate:reverse\">\n             <td>{{friend.name}}</td>\n             <td>{{friend.phone}}</td>\n             <td>{{friend.age}}</td>\n           </tr>\n         </table>\n       </div>\n     </doc:source>\n   </doc:example>\n */\norderByFilter.$inject = ['$parse'];\nfunction orderByFilter($parse){\n  return function(array, sortPredicate, reverseOrder) {\n    if (!isArray(array)) return array;\n    if (!sortPredicate) return array;\n    sortPredicate = isArray(sortPredicate) ? sortPredicate: [sortPredicate];\n    sortPredicate = map(sortPredicate, function(predicate){\n      var descending = false, get = predicate || identity;\n      if (isString(predicate)) {\n        if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {\n          descending = predicate.charAt(0) == '-';\n          predicate = predicate.substring(1);\n        }\n        get = $parse(predicate);\n      }\n      return reverseComparator(function(a,b){\n        return compare(get(a),get(b));\n      }, descending);\n    });\n    var arrayCopy = [];\n    for ( var i = 0; i < array.length; i++) { arrayCopy.push(array[i]); }\n    return arrayCopy.sort(reverseComparator(comparator, reverseOrder));\n\n    function comparator(o1, o2){\n      for ( var i = 0; i < sortPredicate.length; i++) {\n        var comp = sortPredicate[i](o1, o2);\n        if (comp !== 0) return comp;\n      }\n      return 0;\n    }\n    function reverseComparator(comp, descending) {\n      return toBoolean(descending)\n          ? function(a,b){return comp(b,a);}\n          : comp;\n    }\n    function compare(v1, v2){\n      var t1 = typeof v1;\n      var t2 = typeof v2;\n      if (t1 == t2) {\n        if (t1 == \"string\") {\n           v1 = v1.toLowerCase();\n           v2 = v2.toLowerCase();\n        }\n        if (v1 === v2) return 0;\n        return v1 < v2 ? -1 : 1;\n      } else {\n        return t1 < t2 ? -1 : 1;\n      }\n    }\n  };\n}\n\nfunction ngDirective(directive) {\n  if (isFunction(directive)) {\n    directive = {\n      link: directive\n    };\n  }\n  directive.restrict = directive.restrict || 'AC';\n  return valueFn(directive);\n}\n\n/**\n * @ngdoc directive\n * @name ng.directive:a\n * @restrict E\n *\n * @description\n * Modifies the default behavior of the html A tag so that the default action is prevented when\n * the href attribute is empty.\n *\n * This change permits the easy creation of action links with the `ngClick` directive\n * without changing the location or causing page reloads, e.g.:\n * `<a href=\"\" ng-click=\"list.addItem()\">Add Item</a>`\n */\nvar htmlAnchorDirective = valueFn({\n  restrict: 'E',\n  compile: function(element, attr) {\n\n    if (msie <= 8) {\n\n      // turn <a href ng-click=\"..\">link</a> into a stylable link in IE\n      // but only if it doesn't have name attribute, in which case it's an anchor\n      if (!attr.href && !attr.name) {\n        attr.$set('href', '');\n      }\n\n      // add a comment node to anchors to workaround IE bug that causes element content to be reset\n      // to new attribute content if attribute is updated with value containing @ and element also\n      // contains value with @\n      // see issue #1949\n      element.append(document.createComment('IE fix'));\n    }\n\n    if (!attr.href && !attr.xlinkHref && !attr.name) {\n      return function(scope, element) {\n        // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n        var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\n                   'xlink:href' : 'href';\n        element.on('click', function(event){\n          // if we have no href url, then don't navigate anywhere.\n          if (!element.attr(href)) {\n            event.preventDefault();\n          }\n        });\n      };\n    }\n  }\n});\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngHref\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in an href attribute will\n * make the link go to the wrong URL if the user clicks it before\n * Angular has a chance to replace the `{{hash}}` markup with its\n * value. Until Angular replaces the markup the link will be broken\n * and will most likely return a 404 error.\n *\n * The `ngHref` directive solves this problem.\n *\n * The wrong way to write it:\n * <pre>\n * <a href=\"http://www.gravatar.com/avatar/{{hash}}\"/>\n * </pre>\n *\n * The correct way to write it:\n * <pre>\n * <a ng-href=\"http://www.gravatar.com/avatar/{{hash}}\"/>\n * </pre>\n *\n * @element A\n * @param {template} ngHref any string which can contain `{{}}` markup.\n *\n * @example\n * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes\n * in links and their different behaviors:\n    <doc:example>\n      <doc:source>\n        <input ng-model=\"value\" /><br />\n        <a id=\"link-1\" href ng-click=\"value = 1\">link 1</a> (link, don't reload)<br />\n        <a id=\"link-2\" href=\"\" ng-click=\"value = 2\">link 2</a> (link, don't reload)<br />\n        <a id=\"link-3\" ng-href=\"/{{'123'}}\">link 3</a> (link, reload!)<br />\n        <a id=\"link-4\" href=\"\" name=\"xx\" ng-click=\"value = 4\">anchor</a> (link, don't reload)<br />\n        <a id=\"link-5\" name=\"xxx\" ng-click=\"value = 5\">anchor</a> (no link)<br />\n        <a id=\"link-6\" ng-href=\"{{value}}\">link</a> (link, change location)\n      </doc:source>\n      <doc:protractor>\n        it('should execute ng-click but not reload when href without value', function() {\n          element(by.id('link-1')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('1');\n          expect(element(by.id('link-1')).getAttribute('href')).toBe('');\n        });\n\n        it('should execute ng-click but not reload when href empty string', function() {\n          element(by.id('link-2')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('2');\n          expect(element(by.id('link-2')).getAttribute('href')).toBe('');\n        });\n\n        it('should execute ng-click and change url when ng-href specified', function() {\n          expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\\/123$/);\n\n          element(by.id('link-3')).click();\n\n          // At this point, we navigate away from an Angular page, so we need\n          // to use browser.driver to get the base webdriver.\n\n          browser.wait(function() {\n            return browser.driver.getCurrentUrl().then(function(url) {\n              return url.match(/\\/123$/);\n            });\n          }, 1000, 'page should navigate to /123');\n        });\n\n        it('should execute ng-click but not reload when href empty string and name specified', function() {\n          element(by.id('link-4')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('4');\n          expect(element(by.id('link-4')).getAttribute('href')).toBe('');\n        });\n\n        it('should execute ng-click but not reload when no href but name specified', function() {\n          element(by.id('link-5')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('5');\n          expect(element(by.id('link-5')).getAttribute('href')).toBe(null);\n        });\n\n        it('should only change url when only ng-href', function() {\n          element(by.model('value')).clear();\n          element(by.model('value')).sendKeys('6');\n          expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\\/6$/);\n\n          element(by.id('link-6')).click();\n          expect(browser.getCurrentUrl()).toMatch(/\\/6$/);\n        });\n      </doc:protractor>\n    </doc:example>\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngSrc\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `src` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrc` directive solves this problem.\n *\n * The buggy way to write it:\n * <pre>\n * <img src=\"http://www.gravatar.com/avatar/{{hash}}\"/>\n * </pre>\n *\n * The correct way to write it:\n * <pre>\n * <img ng-src=\"http://www.gravatar.com/avatar/{{hash}}\"/>\n * </pre>\n *\n * @element IMG\n * @param {template} ngSrc any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngSrcset\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrcset` directive solves this problem.\n *\n * The buggy way to write it:\n * <pre>\n * <img srcset=\"http://www.gravatar.com/avatar/{{hash}} 2x\"/>\n * </pre>\n *\n * The correct way to write it:\n * <pre>\n * <img ng-srcset=\"http://www.gravatar.com/avatar/{{hash}} 2x\"/>\n * </pre>\n *\n * @element IMG\n * @param {template} ngSrcset any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngDisabled\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * The following markup will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:\n * <pre>\n * <div ng-init=\"scope = { isDisabled: false }\">\n *  <button disabled=\"{{scope.isDisabled}}\">Disabled</button>\n * </div>\n * </pre>\n *\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as disabled. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngDisabled` directive solves this problem for the `disabled` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n *\n * @example\n    <doc:example>\n      <doc:source>\n        Click me to toggle: <input type=\"checkbox\" ng-model=\"checked\"><br/>\n        <button ng-model=\"button\" ng-disabled=\"checked\">Button</button>\n      </doc:source>\n      <doc:protractor>\n        it('should toggle button', function() {\n          expect(element(by.css('.doc-example-live button')).getAttribute('disabled')).toBeFalsy();\n          element(by.model('checked')).click();\n          expect(element(by.css('.doc-example-live button')).getAttribute('disabled')).toBeTruthy();\n        });\n      </doc:protractor>\n    </doc:example>\n *\n * @element INPUT\n * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy, \n *     then special attribute \"disabled\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngChecked\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as checked. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngChecked` directive solves this problem for the `checked` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n    <doc:example>\n      <doc:source>\n        Check me to check both: <input type=\"checkbox\" ng-model=\"master\"><br/>\n        <input id=\"checkSlave\" type=\"checkbox\" ng-checked=\"master\">\n      </doc:source>\n      <doc:protractor>\n        it('should check both checkBoxes', function() {\n          expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();\n          element(by.model('master')).click();\n          expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();\n        });\n      </doc:protractor>\n    </doc:example>\n *\n * @element INPUT\n * @param {expression} ngChecked If the {@link guide/expression expression} is truthy, \n *     then special attribute \"checked\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngReadonly\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as readonly. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngReadonly` directive solves this problem for the `readonly` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n    <doc:example>\n      <doc:source>\n        Check me to make text readonly: <input type=\"checkbox\" ng-model=\"checked\"><br/>\n        <input type=\"text\" ng-readonly=\"checked\" value=\"I'm Angular\"/>\n      </doc:source>\n      <doc:protractor>\n        it('should toggle readonly attr', function() {\n          expect(element(by.css('.doc-example-live [type=\"text\"]')).getAttribute('readonly')).toBeFalsy();\n          element(by.model('checked')).click();\n          expect(element(by.css('.doc-example-live [type=\"text\"]')).getAttribute('readonly')).toBeTruthy();\n        });\n      </doc:protractor>\n    </doc:example>\n *\n * @element INPUT\n * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy, \n *     then special attribute \"readonly\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngSelected\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as selected. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngSelected` directive solves this problem for the `selected` atttribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * \n * @example\n    <doc:example>\n      <doc:source>\n        Check me to select: <input type=\"checkbox\" ng-model=\"selected\"><br/>\n        <select>\n          <option>Hello!</option>\n          <option id=\"greet\" ng-selected=\"selected\">Greetings!</option>\n        </select>\n      </doc:source>\n      <doc:protractor>\n        it('should select Greetings!', function() {\n          expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();\n          element(by.model('selected')).click();\n          expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();\n        });\n      </doc:protractor>\n    </doc:example>\n *\n * @element OPTION\n * @param {expression} ngSelected If the {@link guide/expression expression} is truthy, \n *     then special attribute \"selected\" will be set on the element\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngOpen\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as open. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngOpen` directive solves this problem for the `open` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n     <doc:example>\n       <doc:source>\n         Check me check multiple: <input type=\"checkbox\" ng-model=\"open\"><br/>\n         <details id=\"details\" ng-open=\"open\">\n            <summary>Show/Hide me</summary>\n         </details>\n       </doc:source>\n       <doc:protractor>\n         it('should toggle open', function() {\n           expect(element(by.id('details')).getAttribute('open')).toBeFalsy();\n           element(by.model('open')).click();\n           expect(element(by.id('details')).getAttribute('open')).toBeTruthy();\n         });\n       </doc:protractor>\n     </doc:example>\n *\n * @element DETAILS\n * @param {expression} ngOpen If the {@link guide/expression expression} is truthy, \n *     then special attribute \"open\" will be set on the element\n */\n\nvar ngAttributeAliasDirectives = {};\n\n\n// boolean attrs are evaluated\nforEach(BOOLEAN_ATTR, function(propName, attrName) {\n  // binding to multiple is not supported\n  if (propName == \"multiple\") return;\n\n  var normalized = directiveNormalize('ng-' + attrName);\n  ngAttributeAliasDirectives[normalized] = function() {\n    return {\n      priority: 100,\n      link: function(scope, element, attr) {\n        scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {\n          attr.$set(attrName, !!value);\n        });\n      }\n    };\n  };\n});\n\n\n// ng-src, ng-srcset, ng-href are interpolated\nforEach(['src', 'srcset', 'href'], function(attrName) {\n  var normalized = directiveNormalize('ng-' + attrName);\n  ngAttributeAliasDirectives[normalized] = function() {\n    return {\n      priority: 99, // it needs to run after the attributes are interpolated\n      link: function(scope, element, attr) {\n        attr.$observe(normalized, function(value) {\n          if (!value)\n             return;\n\n          attr.$set(attrName, value);\n\n          // on IE, if \"ng:src\" directive declaration is used and \"src\" attribute doesn't exist\n          // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need\n          // to set the property as well to achieve the desired effect.\n          // we use attr[attrName] value since $set can sanitize the url.\n          if (msie) element.prop(attrName, attr[attrName]);\n        });\n      }\n    };\n  };\n});\n\n/* global -nullFormCtrl */\nvar nullFormCtrl = {\n  $addControl: noop,\n  $removeControl: noop,\n  $setValidity: noop,\n  $setDirty: noop,\n  $setPristine: noop\n};\n\n/**\n * @ngdoc object\n * @name ng.directive:form.FormController\n *\n * @property {boolean} $pristine True if user has not interacted with the form yet.\n * @property {boolean} $dirty True if user has already interacted with the form.\n * @property {boolean} $valid True if all of the containing forms and controls are valid.\n * @property {boolean} $invalid True if at least one containing control or form is invalid.\n *\n * @property {Object} $error Is an object hash, containing references to all invalid controls or\n *  forms, where:\n *\n *  - keys are validation tokens (error names),\n *  - values are arrays of controls or forms that are invalid for given error name.\n *\n *\n *  Built-in validation tokens:\n *\n *  - `email`\n *  - `max`\n *  - `maxlength`\n *  - `min`\n *  - `minlength`\n *  - `number`\n *  - `pattern`\n *  - `required`\n *  - `url`\n * \n * @description\n * `FormController` keeps track of all its controls and nested forms as well as state of them,\n * such as being valid/invalid or dirty/pristine.\n *\n * Each {@link ng.directive:form form} directive creates an instance\n * of `FormController`.\n *\n */\n//asks for $scope to fool the BC controller module\nFormController.$inject = ['$element', '$attrs', '$scope'];\nfunction FormController(element, attrs) {\n  var form = this,\n      parentForm = element.parent().controller('form') || nullFormCtrl,\n      invalidCount = 0, // used to easily determine if we are valid\n      errors = form.$error = {},\n      controls = [];\n\n  // init state\n  form.$name = attrs.name || attrs.ngForm;\n  form.$dirty = false;\n  form.$pristine = true;\n  form.$valid = true;\n  form.$invalid = false;\n\n  parentForm.$addControl(form);\n\n  // Setup initial state of the control\n  element.addClass(PRISTINE_CLASS);\n  toggleValidCss(true);\n\n  // convenience method for easy toggling of classes\n  function toggleValidCss(isValid, validationErrorKey) {\n    validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n    element.\n      removeClass((isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey).\n      addClass((isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);\n  }\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:form.FormController#$addControl\n   * @methodOf ng.directive:form.FormController\n   *\n   * @description\n   * Register a control with the form.\n   *\n   * Input elements using ngModelController do this automatically when they are linked.\n   */\n  form.$addControl = function(control) {\n    // Breaking change - before, inputs whose name was \"hasOwnProperty\" were quietly ignored\n    // and not added to the scope.  Now we throw an error.\n    assertNotHasOwnProperty(control.$name, 'input');\n    controls.push(control);\n\n    if (control.$name) {\n      form[control.$name] = control;\n    }\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:form.FormController#$removeControl\n   * @methodOf ng.directive:form.FormController\n   *\n   * @description\n   * Deregister a control from the form.\n   *\n   * Input elements using ngModelController do this automatically when they are destroyed.\n   */\n  form.$removeControl = function(control) {\n    if (control.$name && form[control.$name] === control) {\n      delete form[control.$name];\n    }\n    forEach(errors, function(queue, validationToken) {\n      form.$setValidity(validationToken, true, control);\n    });\n\n    arrayRemove(controls, control);\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:form.FormController#$setValidity\n   * @methodOf ng.directive:form.FormController\n   *\n   * @description\n   * Sets the validity of a form control.\n   *\n   * This method will also propagate to parent forms.\n   */\n  form.$setValidity = function(validationToken, isValid, control) {\n    var queue = errors[validationToken];\n\n    if (isValid) {\n      if (queue) {\n        arrayRemove(queue, control);\n        if (!queue.length) {\n          invalidCount--;\n          if (!invalidCount) {\n            toggleValidCss(isValid);\n            form.$valid = true;\n            form.$invalid = false;\n          }\n          errors[validationToken] = false;\n          toggleValidCss(true, validationToken);\n          parentForm.$setValidity(validationToken, true, form);\n        }\n      }\n\n    } else {\n      if (!invalidCount) {\n        toggleValidCss(isValid);\n      }\n      if (queue) {\n        if (includes(queue, control)) return;\n      } else {\n        errors[validationToken] = queue = [];\n        invalidCount++;\n        toggleValidCss(false, validationToken);\n        parentForm.$setValidity(validationToken, false, form);\n      }\n      queue.push(control);\n\n      form.$valid = false;\n      form.$invalid = true;\n    }\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:form.FormController#$setDirty\n   * @methodOf ng.directive:form.FormController\n   *\n   * @description\n   * Sets the form to a dirty state.\n   *\n   * This method can be called to add the 'ng-dirty' class and set the form to a dirty\n   * state (ng-dirty class). This method will also propagate to parent forms.\n   */\n  form.$setDirty = function() {\n    element.removeClass(PRISTINE_CLASS).addClass(DIRTY_CLASS);\n    form.$dirty = true;\n    form.$pristine = false;\n    parentForm.$setDirty();\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:form.FormController#$setPristine\n   * @methodOf ng.directive:form.FormController\n   *\n   * @description\n   * Sets the form to its pristine state.\n   *\n   * This method can be called to remove the 'ng-dirty' class and set the form to its pristine\n   * state (ng-pristine class). This method will also propagate to all the controls contained\n   * in this form.\n   *\n   * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after\n   * saving or resetting it.\n   */\n  form.$setPristine = function () {\n    element.removeClass(DIRTY_CLASS).addClass(PRISTINE_CLASS);\n    form.$dirty = false;\n    form.$pristine = true;\n    forEach(controls, function(control) {\n      control.$setPristine();\n    });\n  };\n}\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngForm\n * @restrict EAC\n *\n * @description\n * Nestable alias of {@link ng.directive:form `form`} directive. HTML\n * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a\n * sub-group of controls needs to be determined.\n *\n * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into\n *                       related scope, under this name.\n *\n */\n\n /**\n * @ngdoc directive\n * @name ng.directive:form\n * @restrict E\n *\n * @description\n * Directive that instantiates\n * {@link ng.directive:form.FormController FormController}.\n *\n * If the `name` attribute is specified, the form controller is published onto the current scope under\n * this name.\n *\n * # Alias: {@link ng.directive:ngForm `ngForm`}\n *\n * In Angular forms can be nested. This means that the outer form is valid when all of the child\n * forms are valid as well. However, browsers do not allow nesting of `<form>` elements, so\n * Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to\n * `<form>` but can be nested.  This allows you to have nested forms, which is very useful when\n * using Angular validation directives in forms that are dynamically generated using the\n * {@link ng.directive:ngRepeat `ngRepeat`} directive. Since you cannot dynamically generate the `name`\n * attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an\n * `ngForm` directive and nest these in an outer `form` element.\n *\n *\n * # CSS classes\n *  - `ng-valid` is set if the form is valid.\n *  - `ng-invalid` is set if the form is invalid.\n *  - `ng-pristine` is set if the form is pristine.\n *  - `ng-dirty` is set if the form is dirty.\n *\n *\n * # Submitting a form and preventing the default action\n *\n * Since the role of forms in client-side Angular applications is different than in classical\n * roundtrip apps, it is desirable for the browser not to translate the form submission into a full\n * page reload that sends the data to the server. Instead some javascript logic should be triggered\n * to handle the form submission in an application-specific way.\n *\n * For this reason, Angular prevents the default action (form submission to the server) unless the\n * `<form>` element has an `action` attribute specified.\n *\n * You can use one of the following two ways to specify what javascript method should be called when\n * a form is submitted:\n *\n * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element\n * - {@link ng.directive:ngClick ngClick} directive on the first\n  *  button or input field of type submit (input[type=submit])\n *\n * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}\n * or {@link ng.directive:ngClick ngClick} directives.\n * This is because of the following form submission rules in the HTML specification:\n *\n * - If a form has only one input field then hitting enter in this field triggers form submit\n * (`ngSubmit`)\n * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter\n * doesn't trigger submit\n * - if a form has one or more input fields and one or more buttons or input[type=submit] then\n * hitting enter in any of the input fields will trigger the click handler on the *first* button or\n * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)\n *\n * @param {string=} name Name of the form. If specified, the form controller will be published into\n *                       related scope, under this name.\n *\n * @example\n    <doc:example>\n      <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.userType = 'guest';\n         }\n       </script>\n       <form name=\"myForm\" ng-controller=\"Ctrl\">\n         userType: <input name=\"input\" ng-model=\"userType\" required>\n         <span class=\"error\" ng-show=\"myForm.input.$error.required\">Required!</span><br>\n         <tt>userType = {{userType}}</tt><br>\n         <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br>\n         <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br>\n         <tt>myForm.$valid = {{myForm.$valid}}</tt><br>\n         <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br>\n        </form>\n      </doc:source>\n      <doc:protractor>\n        it('should initialize to model', function() {\n          var userType = element(by.binding('userType'));\n          var valid = element(by.binding('myForm.input.$valid'));\n\n          expect(userType.getText()).toContain('guest');\n          expect(valid.getText()).toContain('true');\n        });\n\n        it('should be invalid if empty', function() {\n          var userType = element(by.binding('userType'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var userInput = element(by.model('userType'));\n\n          userInput.clear();\n          userInput.sendKeys('');\n\n          expect(userType.getText()).toEqual('userType =');\n          expect(valid.getText()).toContain('false');\n        });\n      </doc:protractor>\n    </doc:example>\n */\nvar formDirectiveFactory = function(isNgForm) {\n  return ['$timeout', function($timeout) {\n    var formDirective = {\n      name: 'form',\n      restrict: isNgForm ? 'EAC' : 'E',\n      controller: FormController,\n      compile: function() {\n        return {\n          pre: function(scope, formElement, attr, controller) {\n            if (!attr.action) {\n              // we can't use jq events because if a form is destroyed during submission the default\n              // action is not prevented. see #1238\n              //\n              // IE 9 is not affected because it doesn't fire a submit event and try to do a full\n              // page reload if the form was destroyed by submission of the form via a click handler\n              // on a button in the form. Looks like an IE9 specific bug.\n              var preventDefaultListener = function(event) {\n                event.preventDefault\n                  ? event.preventDefault()\n                  : event.returnValue = false; // IE\n              };\n\n              addEventListenerFn(formElement[0], 'submit', preventDefaultListener);\n\n              // unregister the preventDefault listener so that we don't not leak memory but in a\n              // way that will achieve the prevention of the default action.\n              formElement.on('$destroy', function() {\n                $timeout(function() {\n                  removeEventListenerFn(formElement[0], 'submit', preventDefaultListener);\n                }, 0, false);\n              });\n            }\n\n            var parentFormCtrl = formElement.parent().controller('form'),\n                alias = attr.name || attr.ngForm;\n\n            if (alias) {\n              setter(scope, alias, controller, alias);\n            }\n            if (parentFormCtrl) {\n              formElement.on('$destroy', function() {\n                parentFormCtrl.$removeControl(controller);\n                if (alias) {\n                  setter(scope, alias, undefined, alias);\n                }\n                extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards\n              });\n            }\n          }\n        };\n      }\n    };\n\n    return formDirective;\n  }];\n};\n\nvar formDirective = formDirectiveFactory();\nvar ngFormDirective = formDirectiveFactory(true);\n\n/* global\n\n    -VALID_CLASS,\n    -INVALID_CLASS,\n    -PRISTINE_CLASS,\n    -DIRTY_CLASS\n*/\n\nvar URL_REGEXP = /^(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?$/;\nvar EMAIL_REGEXP = /^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\\.[a-z0-9-]+)*$/i;\nvar NUMBER_REGEXP = /^\\s*(\\-|\\+)?(\\d+|(\\d*(\\.\\d*)))\\s*$/;\n\nvar inputType = {\n\n  /**\n   * @ngdoc inputType\n   * @name ng.directive:input.text\n   *\n   * @description\n   * Standard HTML text input with angular data binding.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} required Adds `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n   *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n   *    patterns defined as scope expressions.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n   *\n   * @example\n      <doc:example>\n        <doc:source>\n         <script>\n           function Ctrl($scope) {\n             $scope.text = 'guest';\n             $scope.word = /^\\s*\\w*\\s*$/;\n           }\n         </script>\n         <form name=\"myForm\" ng-controller=\"Ctrl\">\n           Single word: <input type=\"text\" name=\"input\" ng-model=\"text\"\n                               ng-pattern=\"word\" required ng-trim=\"false\">\n           <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n             Required!</span>\n           <span class=\"error\" ng-show=\"myForm.input.$error.pattern\">\n             Single word only!</span>\n\n           <tt>text = {{text}}</tt><br/>\n           <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n           <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n           <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n          </form>\n        </doc:source>\n        <doc:protractor>\n          var text = element(by.binding('text'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('text'));\n\n          it('should initialize to model', function() {\n            expect(text.getText()).toContain('guest');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n\n            expect(text.getText()).toEqual('text =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if multi word', function() {\n            input.clear();\n            input.sendKeys('hello world');\n\n            expect(valid.getText()).toContain('false');\n          });\n        </doc:protractor>\n      </doc:example>\n   */\n  'text': textInputType,\n\n\n  /**\n   * @ngdoc inputType\n   * @name ng.directive:input.number\n   *\n   * @description\n   * Text input with number validation and transformation. Sets the `number` validation\n   * error if not a valid number.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n   * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n   * @param {string=} required Sets `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n   *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n   *    patterns defined as scope expressions.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <doc:example>\n        <doc:source>\n         <script>\n           function Ctrl($scope) {\n             $scope.value = 12;\n           }\n         </script>\n         <form name=\"myForm\" ng-controller=\"Ctrl\">\n           Number: <input type=\"number\" name=\"input\" ng-model=\"value\"\n                          min=\"0\" max=\"99\" required>\n           <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n             Required!</span>\n           <span class=\"error\" ng-show=\"myForm.input.$error.number\">\n             Not valid number!</span>\n           <tt>value = {{value}}</tt><br/>\n           <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n           <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n           <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n          </form>\n        </doc:source>\n        <doc:protractor>\n          var value = element(by.binding('value'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('value'));\n\n          it('should initialize to model', function() {\n            expect(value.getText()).toContain('12');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n            expect(value.getText()).toEqual('value =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if over max', function() {\n            input.clear();\n            input.sendKeys('123');\n            expect(value.getText()).toEqual('value =');\n            expect(valid.getText()).toContain('false');\n          });\n        </doc:protractor>\n      </doc:example>\n   */\n  'number': numberInputType,\n\n\n  /**\n   * @ngdoc inputType\n   * @name ng.directive:input.url\n   *\n   * @description\n   * Text input with URL validation. Sets the `url` validation error key if the content is not a\n   * valid URL.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} required Sets `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n   *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n   *    patterns defined as scope expressions.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <doc:example>\n        <doc:source>\n         <script>\n           function Ctrl($scope) {\n             $scope.text = 'http://google.com';\n           }\n         </script>\n         <form name=\"myForm\" ng-controller=\"Ctrl\">\n           URL: <input type=\"url\" name=\"input\" ng-model=\"text\" required>\n           <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n             Required!</span>\n           <span class=\"error\" ng-show=\"myForm.input.$error.url\">\n             Not valid url!</span>\n           <tt>text = {{text}}</tt><br/>\n           <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n           <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n           <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n           <tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/>\n          </form>\n        </doc:source>\n        <doc:protractor>\n          var text = element(by.binding('text'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('text'));\n\n          it('should initialize to model', function() {\n            expect(text.getText()).toContain('http://google.com');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n\n            expect(text.getText()).toEqual('text =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if not url', function() {\n            input.clear();\n            input.sendKeys('box');\n\n            expect(valid.getText()).toContain('false');\n          });\n        </doc:protractor>\n      </doc:example>\n   */\n  'url': urlInputType,\n\n\n  /**\n   * @ngdoc inputType\n   * @name ng.directive:input.email\n   *\n   * @description\n   * Text input with email validation. Sets the `email` validation error key if not a valid email\n   * address.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} required Sets `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n   *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n   *    patterns defined as scope expressions.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <doc:example>\n        <doc:source>\n         <script>\n           function Ctrl($scope) {\n             $scope.text = 'me@example.com';\n           }\n         </script>\n           <form name=\"myForm\" ng-controller=\"Ctrl\">\n             Email: <input type=\"email\" name=\"input\" ng-model=\"text\" required>\n             <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n               Required!</span>\n             <span class=\"error\" ng-show=\"myForm.input.$error.email\">\n               Not valid email!</span>\n             <tt>text = {{text}}</tt><br/>\n             <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n             <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n             <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n             <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n             <tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/>\n           </form>\n        </doc:source>\n        <doc:protractor>\n          var text = element(by.binding('text'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('text'));\n          \n          it('should initialize to model', function() {\n            expect(text.getText()).toContain('me@example.com');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n            expect(text.getText()).toEqual('text =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if not email', function() {\n            input.clear();\n            input.sendKeys('xxx');\n\n            expect(valid.getText()).toContain('false');\n          });\n        </doc:protractor>\n      </doc:example>\n   */\n  'email': emailInputType,\n\n\n  /**\n   * @ngdoc inputType\n   * @name ng.directive:input.radio\n   *\n   * @description\n   * HTML radio button.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string} value The value to which the expression should be set when selected.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   * @param {string} ngValue Angular expression which sets the value to which the expression should\n   *    be set when selected.\n   *\n   * @example\n      <doc:example>\n        <doc:source>\n         <script>\n           function Ctrl($scope) {\n             $scope.color = 'blue';\n             $scope.specialValue = {\n               \"id\": \"12345\",\n               \"value\": \"green\"\n             };\n           }\n         </script>\n         <form name=\"myForm\" ng-controller=\"Ctrl\">\n           <input type=\"radio\" ng-model=\"color\" value=\"red\">  Red <br/>\n           <input type=\"radio\" ng-model=\"color\" ng-value=\"specialValue\"> Green <br/>\n           <input type=\"radio\" ng-model=\"color\" value=\"blue\"> Blue <br/>\n           <tt>color = {{color | json}}</tt><br/>\n          </form>\n          Note that `ng-value=\"specialValue\"` sets radio item's value to be the value of `$scope.specialValue`.\n        </doc:source>\n        <doc:protractor>\n          it('should change state', function() {\n            var color = element(by.binding('color'));\n\n            expect(color.getText()).toContain('blue');\n\n            element.all(by.model('color')).get(0).click();\n\n            expect(color.getText()).toContain('red');\n          });\n        </doc:protractor>\n      </doc:example>\n   */\n  'radio': radioInputType,\n\n\n  /**\n   * @ngdoc inputType\n   * @name ng.directive:input.checkbox\n   *\n   * @description\n   * HTML checkbox.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} ngTrueValue The value to which the expression should be set when selected.\n   * @param {string=} ngFalseValue The value to which the expression should be set when not selected.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <doc:example>\n        <doc:source>\n         <script>\n           function Ctrl($scope) {\n             $scope.value1 = true;\n             $scope.value2 = 'YES'\n           }\n         </script>\n         <form name=\"myForm\" ng-controller=\"Ctrl\">\n           Value1: <input type=\"checkbox\" ng-model=\"value1\"> <br/>\n           Value2: <input type=\"checkbox\" ng-model=\"value2\"\n                          ng-true-value=\"YES\" ng-false-value=\"NO\"> <br/>\n           <tt>value1 = {{value1}}</tt><br/>\n           <tt>value2 = {{value2}}</tt><br/>\n          </form>\n        </doc:source>\n        <doc:protractor>\n          it('should change state', function() {\n            var value1 = element(by.binding('value1'));\n            var value2 = element(by.binding('value2'));\n\n            expect(value1.getText()).toContain('true');\n            expect(value2.getText()).toContain('YES');\n            \n            element(by.model('value1')).click();\n            element(by.model('value2')).click();\n\n            expect(value1.getText()).toContain('false');\n            expect(value2.getText()).toContain('NO');\n          });\n        </doc:protractor>\n      </doc:example>\n   */\n  'checkbox': checkboxInputType,\n\n  'hidden': noop,\n  'button': noop,\n  'submit': noop,\n  'reset': noop\n};\n\n// A helper function to call $setValidity and return the value / undefined,\n// a pattern that is repeated a lot in the input validation logic.\nfunction validate(ctrl, validatorName, validity, value){\n  ctrl.$setValidity(validatorName, validity);\n  return validity ? value : undefined;\n}\n\nfunction textInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  // In composition mode, users are still inputing intermediate text buffer,\n  // hold the listener until composition is done.\n  // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent\n  if (!$sniffer.android) {\n    var composing = false;\n\n    element.on('compositionstart', function(data) {\n      composing = true;\n    });\n\n    element.on('compositionend', function() {\n      composing = false;\n    });\n  }\n\n  var listener = function() {\n    if (composing) return;\n    var value = element.val();\n\n    // By default we will trim the value\n    // If the attribute ng-trim exists we will avoid trimming\n    // e.g. <input ng-model=\"foo\" ng-trim=\"false\">\n    if (toBoolean(attr.ngTrim || 'T')) {\n      value = trim(value);\n    }\n\n    if (ctrl.$viewValue !== value) {\n      if (scope.$$phase) {\n        ctrl.$setViewValue(value);\n      } else {\n        scope.$apply(function() {\n          ctrl.$setViewValue(value);\n        });\n      }\n    }\n  };\n\n  // if the browser does support \"input\" event, we are fine - except on IE9 which doesn't fire the\n  // input event on backspace, delete or cut\n  if ($sniffer.hasEvent('input')) {\n    element.on('input', listener);\n  } else {\n    var timeout;\n\n    var deferListener = function() {\n      if (!timeout) {\n        timeout = $browser.defer(function() {\n          listener();\n          timeout = null;\n        });\n      }\n    };\n\n    element.on('keydown', function(event) {\n      var key = event.keyCode;\n\n      // ignore\n      //    command            modifiers                   arrows\n      if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return;\n\n      deferListener();\n    });\n\n    // if user modifies input value using context menu in IE, we need \"paste\" and \"cut\" events to catch it\n    if ($sniffer.hasEvent('paste')) {\n      element.on('paste cut', deferListener);\n    }\n  }\n\n  // if user paste into input using mouse on older browser\n  // or form autocomplete on newer browser, we need \"change\" event to catch it\n  element.on('change', listener);\n\n  ctrl.$render = function() {\n    element.val(ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue);\n  };\n\n  // pattern validator\n  var pattern = attr.ngPattern,\n      patternValidator,\n      match;\n\n  if (pattern) {\n    var validateRegex = function(regexp, value) {\n      return validate(ctrl, 'pattern', ctrl.$isEmpty(value) || regexp.test(value), value);\n    };\n    match = pattern.match(/^\\/(.*)\\/([gim]*)$/);\n    if (match) {\n      pattern = new RegExp(match[1], match[2]);\n      patternValidator = function(value) {\n        return validateRegex(pattern, value);\n      };\n    } else {\n      patternValidator = function(value) {\n        var patternObj = scope.$eval(pattern);\n\n        if (!patternObj || !patternObj.test) {\n          throw minErr('ngPattern')('noregexp',\n            'Expected {0} to be a RegExp but was {1}. Element: {2}', pattern,\n            patternObj, startingTag(element));\n        }\n        return validateRegex(patternObj, value);\n      };\n    }\n\n    ctrl.$formatters.push(patternValidator);\n    ctrl.$parsers.push(patternValidator);\n  }\n\n  // min length validator\n  if (attr.ngMinlength) {\n    var minlength = int(attr.ngMinlength);\n    var minLengthValidator = function(value) {\n      return validate(ctrl, 'minlength', ctrl.$isEmpty(value) || value.length >= minlength, value);\n    };\n\n    ctrl.$parsers.push(minLengthValidator);\n    ctrl.$formatters.push(minLengthValidator);\n  }\n\n  // max length validator\n  if (attr.ngMaxlength) {\n    var maxlength = int(attr.ngMaxlength);\n    var maxLengthValidator = function(value) {\n      return validate(ctrl, 'maxlength', ctrl.$isEmpty(value) || value.length <= maxlength, value);\n    };\n\n    ctrl.$parsers.push(maxLengthValidator);\n    ctrl.$formatters.push(maxLengthValidator);\n  }\n}\n\nfunction numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  textInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n  ctrl.$parsers.push(function(value) {\n    var empty = ctrl.$isEmpty(value);\n    if (empty || NUMBER_REGEXP.test(value)) {\n      ctrl.$setValidity('number', true);\n      return value === '' ? null : (empty ? value : parseFloat(value));\n    } else {\n      ctrl.$setValidity('number', false);\n      return undefined;\n    }\n  });\n\n  ctrl.$formatters.push(function(value) {\n    return ctrl.$isEmpty(value) ? '' : '' + value;\n  });\n\n  if (attr.min) {\n    var minValidator = function(value) {\n      var min = parseFloat(attr.min);\n      return validate(ctrl, 'min', ctrl.$isEmpty(value) || value >= min, value);\n    };\n\n    ctrl.$parsers.push(minValidator);\n    ctrl.$formatters.push(minValidator);\n  }\n\n  if (attr.max) {\n    var maxValidator = function(value) {\n      var max = parseFloat(attr.max);\n      return validate(ctrl, 'max', ctrl.$isEmpty(value) || value <= max, value);\n    };\n\n    ctrl.$parsers.push(maxValidator);\n    ctrl.$formatters.push(maxValidator);\n  }\n\n  ctrl.$formatters.push(function(value) {\n    return validate(ctrl, 'number', ctrl.$isEmpty(value) || isNumber(value), value);\n  });\n}\n\nfunction urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  textInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n  var urlValidator = function(value) {\n    return validate(ctrl, 'url', ctrl.$isEmpty(value) || URL_REGEXP.test(value), value);\n  };\n\n  ctrl.$formatters.push(urlValidator);\n  ctrl.$parsers.push(urlValidator);\n}\n\nfunction emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  textInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n  var emailValidator = function(value) {\n    return validate(ctrl, 'email', ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value), value);\n  };\n\n  ctrl.$formatters.push(emailValidator);\n  ctrl.$parsers.push(emailValidator);\n}\n\nfunction radioInputType(scope, element, attr, ctrl) {\n  // make the name unique, if not defined\n  if (isUndefined(attr.name)) {\n    element.attr('name', nextUid());\n  }\n\n  element.on('click', function() {\n    if (element[0].checked) {\n      scope.$apply(function() {\n        ctrl.$setViewValue(attr.value);\n      });\n    }\n  });\n\n  ctrl.$render = function() {\n    var value = attr.value;\n    element[0].checked = (value == ctrl.$viewValue);\n  };\n\n  attr.$observe('value', ctrl.$render);\n}\n\nfunction checkboxInputType(scope, element, attr, ctrl) {\n  var trueValue = attr.ngTrueValue,\n      falseValue = attr.ngFalseValue;\n\n  if (!isString(trueValue)) trueValue = true;\n  if (!isString(falseValue)) falseValue = false;\n\n  element.on('click', function() {\n    scope.$apply(function() {\n      ctrl.$setViewValue(element[0].checked);\n    });\n  });\n\n  ctrl.$render = function() {\n    element[0].checked = ctrl.$viewValue;\n  };\n\n  // Override the standard `$isEmpty` because a value of `false` means empty in a checkbox.\n  ctrl.$isEmpty = function(value) {\n    return value !== trueValue;\n  };\n\n  ctrl.$formatters.push(function(value) {\n    return value === trueValue;\n  });\n\n  ctrl.$parsers.push(function(value) {\n    return value ? trueValue : falseValue;\n  });\n}\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:textarea\n * @restrict E\n *\n * @description\n * HTML textarea element control with angular data-binding. The data-binding and validation\n * properties of this element are exactly the same as those of the\n * {@link ng.directive:input input element}.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n *    `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n *    minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n *    maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n *    patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n *    interaction with the input element.\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:input\n * @restrict E\n *\n * @description\n * HTML input element control with angular data-binding. Input control follows HTML5 input types\n * and polyfills the HTML5 validation behavior for older browsers.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {boolean=} ngRequired Sets `required` attribute if set to true\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n *    minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n *    maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n *    patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n *    interaction with the input element.\n *\n * @example\n    <doc:example>\n      <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.user = {name: 'guest', last: 'visitor'};\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n         <form name=\"myForm\">\n           User name: <input type=\"text\" name=\"userName\" ng-model=\"user.name\" required>\n           <span class=\"error\" ng-show=\"myForm.userName.$error.required\">\n             Required!</span><br>\n           Last name: <input type=\"text\" name=\"lastName\" ng-model=\"user.last\"\n             ng-minlength=\"3\" ng-maxlength=\"10\">\n           <span class=\"error\" ng-show=\"myForm.lastName.$error.minlength\">\n             Too short!</span>\n           <span class=\"error\" ng-show=\"myForm.lastName.$error.maxlength\">\n             Too long!</span><br>\n         </form>\n         <hr>\n         <tt>user = {{user}}</tt><br/>\n         <tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br>\n         <tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br>\n         <tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br>\n         <tt>myForm.lastName.$error = {{myForm.lastName.$error}}</tt><br>\n         <tt>myForm.$valid = {{myForm.$valid}}</tt><br>\n         <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br>\n         <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br>\n         <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br>\n       </div>\n      </doc:source>\n      <doc:protractor>\n        var user = element(by.binding('{{user}}'));\n        var userNameValid = element(by.binding('myForm.userName.$valid'));\n        var lastNameValid = element(by.binding('myForm.lastName.$valid'));\n        var lastNameError = element(by.binding('myForm.lastName.$error'));\n        var formValid = element(by.binding('myForm.$valid'));\n        var userNameInput = element(by.model('user.name'));\n        var userLastInput = element(by.model('user.last'));\n\n        it('should initialize to model', function() {\n          expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"visitor\"}');\n          expect(userNameValid.getText()).toContain('true');\n          expect(formValid.getText()).toContain('true');\n        });\n\n        it('should be invalid if empty when required', function() {\n          userNameInput.clear();\n          userNameInput.sendKeys('');\n\n          expect(user.getText()).toContain('{\"last\":\"visitor\"}');\n          expect(userNameValid.getText()).toContain('false');\n          expect(formValid.getText()).toContain('false');\n        });\n\n        it('should be valid if empty when min length is set', function() {\n          userLastInput.clear();\n          userLastInput.sendKeys('');\n\n          expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"\"}');\n          expect(lastNameValid.getText()).toContain('true');\n          expect(formValid.getText()).toContain('true');\n        });\n\n        it('should be invalid if less than required min length', function() {\n          userLastInput.clear();\n          userLastInput.sendKeys('xx');\n\n          expect(user.getText()).toContain('{\"name\":\"guest\"}');\n          expect(lastNameValid.getText()).toContain('false');\n          expect(lastNameError.getText()).toContain('minlength');\n          expect(formValid.getText()).toContain('false');\n        });\n\n        it('should be invalid if longer than max length', function() {\n          userLastInput.clear();\n          userLastInput.sendKeys('some ridiculously long name');\n\n          expect(user.getText()).toContain('{\"name\":\"guest\"}');\n          expect(lastNameValid.getText()).toContain('false');\n          expect(lastNameError.getText()).toContain('maxlength');\n          expect(formValid.getText()).toContain('false');\n        });\n      </doc:protractor>\n    </doc:example>\n */\nvar inputDirective = ['$browser', '$sniffer', function($browser, $sniffer) {\n  return {\n    restrict: 'E',\n    require: '?ngModel',\n    link: function(scope, element, attr, ctrl) {\n      if (ctrl) {\n        (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrl, $sniffer,\n                                                            $browser);\n      }\n    }\n  };\n}];\n\nvar VALID_CLASS = 'ng-valid',\n    INVALID_CLASS = 'ng-invalid',\n    PRISTINE_CLASS = 'ng-pristine',\n    DIRTY_CLASS = 'ng-dirty';\n\n/**\n * @ngdoc object\n * @name ng.directive:ngModel.NgModelController\n *\n * @property {string} $viewValue Actual string value in the view.\n * @property {*} $modelValue The value in the model, that the control is bound to.\n * @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever\n       the control reads value from the DOM.  Each function is called, in turn, passing the value\n       through to the next. Used to sanitize / convert the value as well as validation.\n       For validation, the parsers should update the validity state using\n       {@link ng.directive:ngModel.NgModelController#methods_$setValidity $setValidity()},\n       and return `undefined` for invalid values.\n\n *\n * @property {Array.<Function>} $formatters Array of functions to execute, as a pipeline, whenever\n       the model value changes. Each function is called, in turn, passing the value through to the\n       next. Used to format / convert values for display in the control and validation.\n *      <pre>\n *      function formatter(value) {\n *        if (value) {\n *          return value.toUpperCase();\n *        }\n *      }\n *      ngModel.$formatters.push(formatter);\n *      </pre>\n *\n * @property {Array.<Function>} $viewChangeListeners Array of functions to execute whenever the\n *     view value has changed. It is called with no arguments, and its return value is ignored.\n *     This can be used in place of additional $watches against the model value.\n *\n * @property {Object} $error An object hash with all errors as keys.\n *\n * @property {boolean} $pristine True if user has not interacted with the control yet.\n * @property {boolean} $dirty True if user has already interacted with the control.\n * @property {boolean} $valid True if there is no error.\n * @property {boolean} $invalid True if at least one error on the control.\n *\n * @description\n *\n * `NgModelController` provides API for the `ng-model` directive. The controller contains\n * services for data-binding, validation, CSS updates, and value formatting and parsing. It\n * purposefully does not contain any logic which deals with DOM rendering or listening to\n * DOM events. Such DOM related logic should be provided by other directives which make use of\n * `NgModelController` for data-binding.\n *\n * ## Custom Control Example\n * This example shows how to use `NgModelController` with a custom control to achieve\n * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)\n * collaborate together to achieve the desired result.\n *\n * Note that `contenteditable` is an HTML5 attribute, which tells the browser to let the element\n * contents be edited in place by the user.  This will not work on older browsers.\n *\n * <example module=\"customControl\">\n    <file name=\"style.css\">\n      [contenteditable] {\n        border: 1px solid black;\n        background-color: white;\n        min-height: 20px;\n      }\n\n      .ng-invalid {\n        border: 1px solid red;\n      }\n\n    </file>\n    <file name=\"script.js\">\n      angular.module('customControl', []).\n        directive('contenteditable', function() {\n          return {\n            restrict: 'A', // only activate on element attribute\n            require: '?ngModel', // get a hold of NgModelController\n            link: function(scope, element, attrs, ngModel) {\n              if(!ngModel) return; // do nothing if no ng-model\n\n              // Specify how UI should be updated\n              ngModel.$render = function() {\n                element.html(ngModel.$viewValue || '');\n              };\n\n              // Listen for change events to enable binding\n              element.on('blur keyup change', function() {\n                scope.$apply(read);\n              });\n              read(); // initialize\n\n              // Write data to the model\n              function read() {\n                var html = element.html();\n                // When we clear the content editable the browser leaves a <br> behind\n                // If strip-br attribute is provided then we strip this out\n                if( attrs.stripBr && html == '<br>' ) {\n                  html = '';\n                }\n                ngModel.$setViewValue(html);\n              }\n            }\n          };\n        });\n    </file>\n    <file name=\"index.html\">\n      <form name=\"myForm\">\n       <div contenteditable\n            name=\"myWidget\" ng-model=\"userContent\"\n            strip-br=\"true\"\n            required>Change me!</div>\n        <span ng-show=\"myForm.myWidget.$error.required\">Required!</span>\n       <hr>\n       <textarea ng-model=\"userContent\"></textarea>\n      </form>\n    </file>\n    <file name=\"protractorTest.js\">\n      it('should data-bind and become invalid', function() {\n        if (browser.params.browser = 'safari') {\n          // SafariDriver can't handle contenteditable.\n          return;\n        };\n        var contentEditable = element(by.css('.doc-example-live [contenteditable]'));\n\n        expect(contentEditable.getText()).toEqual('Change me!');\n\n        // Firefox driver doesn't trigger the proper events on 'clear', so do this hack\n        contentEditable.click();\n        contentEditable.sendKeys(protractor.Key.chord(protractor.Key.COMMAND, \"a\"));\n        contentEditable.sendKeys(protractor.Key.BACK_SPACE);\n\n        expect(contentEditable.getText()).toEqual('');\n        expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);\n      });\n    </file>\n * </example>\n *\n *\n */\nvar NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse',\n    function($scope, $exceptionHandler, $attr, $element, $parse) {\n  this.$viewValue = Number.NaN;\n  this.$modelValue = Number.NaN;\n  this.$parsers = [];\n  this.$formatters = [];\n  this.$viewChangeListeners = [];\n  this.$pristine = true;\n  this.$dirty = false;\n  this.$valid = true;\n  this.$invalid = false;\n  this.$name = $attr.name;\n\n  var ngModelGet = $parse($attr.ngModel),\n      ngModelSet = ngModelGet.assign;\n\n  if (!ngModelSet) {\n    throw minErr('ngModel')('nonassign', \"Expression '{0}' is non-assignable. Element: {1}\",\n        $attr.ngModel, startingTag($element));\n  }\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:ngModel.NgModelController#$render\n   * @methodOf ng.directive:ngModel.NgModelController\n   *\n   * @description\n   * Called when the view needs to be updated. It is expected that the user of the ng-model\n   * directive will implement this method.\n   */\n  this.$render = noop;\n\n  /**\n   * @ngdoc function\n   * @name { ng.directive:ngModel.NgModelController#$isEmpty\n   * @methodOf ng.directive:ngModel.NgModelController\n   *\n   * @description\n   * This is called when we need to determine if the value of the input is empty.\n   *\n   * For instance, the required directive does this to work out if the input has data or not.\n   * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.\n   *\n   * You can override this for input directives whose concept of being empty is different to the\n   * default. The `checkboxInputType` directive does this because in its case a value of `false`\n   * implies empty.\n   */\n  this.$isEmpty = function(value) {\n    return isUndefined(value) || value === '' || value === null || value !== value;\n  };\n\n  var parentForm = $element.inheritedData('$formController') || nullFormCtrl,\n      invalidCount = 0, // used to easily determine if we are valid\n      $error = this.$error = {}; // keep invalid keys here\n\n\n  // Setup initial state of the control\n  $element.addClass(PRISTINE_CLASS);\n  toggleValidCss(true);\n\n  // convenience method for easy toggling of classes\n  function toggleValidCss(isValid, validationErrorKey) {\n    validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n    $element.\n      removeClass((isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey).\n      addClass((isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);\n  }\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:ngModel.NgModelController#$setValidity\n   * @methodOf ng.directive:ngModel.NgModelController\n   *\n   * @description\n   * Change the validity state, and notifies the form when the control changes validity. (i.e. it\n   * does not notify form if given validator is already marked as invalid).\n   *\n   * This method should be called by validators - i.e. the parser or formatter functions.\n   *\n   * @param {string} validationErrorKey Name of the validator. the `validationErrorKey` will assign\n   *        to `$error[validationErrorKey]=isValid` so that it is available for data-binding.\n   *        The `validationErrorKey` should be in camelCase and will get converted into dash-case\n   *        for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`\n   *        class and can be bound to as  `{{someForm.someControl.$error.myError}}` .\n   * @param {boolean} isValid Whether the current state is valid (true) or invalid (false).\n   */\n  this.$setValidity = function(validationErrorKey, isValid) {\n    // Purposeful use of ! here to cast isValid to boolean in case it is undefined\n    // jshint -W018\n    if ($error[validationErrorKey] === !isValid) return;\n    // jshint +W018\n\n    if (isValid) {\n      if ($error[validationErrorKey]) invalidCount--;\n      if (!invalidCount) {\n        toggleValidCss(true);\n        this.$valid = true;\n        this.$invalid = false;\n      }\n    } else {\n      toggleValidCss(false);\n      this.$invalid = true;\n      this.$valid = false;\n      invalidCount++;\n    }\n\n    $error[validationErrorKey] = !isValid;\n    toggleValidCss(isValid, validationErrorKey);\n\n    parentForm.$setValidity(validationErrorKey, isValid, this);\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:ngModel.NgModelController#$setPristine\n   * @methodOf ng.directive:ngModel.NgModelController\n   *\n   * @description\n   * Sets the control to its pristine state.\n   *\n   * This method can be called to remove the 'ng-dirty' class and set the control to its pristine\n   * state (ng-pristine class).\n   */\n  this.$setPristine = function () {\n    this.$dirty = false;\n    this.$pristine = true;\n    $element.removeClass(DIRTY_CLASS).addClass(PRISTINE_CLASS);\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:ngModel.NgModelController#$setViewValue\n   * @methodOf ng.directive:ngModel.NgModelController\n   *\n   * @description\n   * Update the view value.\n   *\n   * This method should be called when the view value changes, typically from within a DOM event handler.\n   * For example {@link ng.directive:input input} and\n   * {@link ng.directive:select select} directives call it.\n   *\n   * It will update the $viewValue, then pass this value through each of the functions in `$parsers`,\n   * which includes any validators. The value that comes out of this `$parsers` pipeline, be applied to\n   * `$modelValue` and the **expression** specified in the `ng-model` attribute.\n   *\n   * Lastly, all the registered change listeners, in the `$viewChangeListeners` list, are called.\n   *\n   * Note that calling this function does not trigger a `$digest`.\n   *\n   * @param {string} value Value from the view.\n   */\n  this.$setViewValue = function(value) {\n    this.$viewValue = value;\n\n    // change to dirty\n    if (this.$pristine) {\n      this.$dirty = true;\n      this.$pristine = false;\n      $element.removeClass(PRISTINE_CLASS).addClass(DIRTY_CLASS);\n      parentForm.$setDirty();\n    }\n\n    forEach(this.$parsers, function(fn) {\n      value = fn(value);\n    });\n\n    if (this.$modelValue !== value) {\n      this.$modelValue = value;\n      ngModelSet($scope, value);\n      forEach(this.$viewChangeListeners, function(listener) {\n        try {\n          listener();\n        } catch(e) {\n          $exceptionHandler(e);\n        }\n      });\n    }\n  };\n\n  // model -> value\n  var ctrl = this;\n\n  $scope.$watch(function ngModelWatch() {\n    var value = ngModelGet($scope);\n\n    // if scope model value and ngModel value are out of sync\n    if (ctrl.$modelValue !== value) {\n\n      var formatters = ctrl.$formatters,\n          idx = formatters.length;\n\n      ctrl.$modelValue = value;\n      while(idx--) {\n        value = formatters[idx](value);\n      }\n\n      if (ctrl.$viewValue !== value) {\n        ctrl.$viewValue = value;\n        ctrl.$render();\n      }\n    }\n\n    return value;\n  });\n}];\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngModel\n *\n * @element input\n *\n * @description\n * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a\n * property on the scope using {@link ng.directive:ngModel.NgModelController NgModelController},\n * which is created and exposed by this directive.\n *\n * `ngModel` is responsible for:\n *\n * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`\n *   require.\n * - Providing validation behavior (i.e. required, number, email, url).\n * - Keeping the state of the control (valid/invalid, dirty/pristine, validation errors).\n * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`).\n * - Registering the control with its parent {@link ng.directive:form form}.\n *\n * Note: `ngModel` will try to bind to the property given by evaluating the expression on the\n * current scope. If the property doesn't already exist on this scope, it will be created\n * implicitly and added to the scope.\n *\n * For best practices on using `ngModel`, see:\n *\n *  - {@link https://github.com/angular/angular.js/wiki/Understanding-Scopes}\n *\n * For basic examples, how to use `ngModel`, see:\n *\n *  - {@link ng.directive:input input}\n *    - {@link ng.directive:input.text text}\n *    - {@link ng.directive:input.checkbox checkbox}\n *    - {@link ng.directive:input.radio radio}\n *    - {@link ng.directive:input.number number}\n *    - {@link ng.directive:input.email email}\n *    - {@link ng.directive:input.url url}\n *  - {@link ng.directive:select select}\n *  - {@link ng.directive:textarea textarea}\n *\n */\nvar ngModelDirective = function() {\n  return {\n    require: ['ngModel', '^?form'],\n    controller: NgModelController,\n    link: function(scope, element, attr, ctrls) {\n      // notify others, especially parent forms\n\n      var modelCtrl = ctrls[0],\n          formCtrl = ctrls[1] || nullFormCtrl;\n\n      formCtrl.$addControl(modelCtrl);\n\n      scope.$on('$destroy', function() {\n        formCtrl.$removeControl(modelCtrl);\n      });\n    }\n  };\n};\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngChange\n *\n * @description\n * Evaluate the given expression when the user changes the input.\n * The expression is evaluated immediately, unlike the JavaScript onchange event\n * which only triggers at the end of a change (usually, when the user leaves the\n * form element or presses the return key).\n * The expression is not evaluated when the value change is coming from the model.\n *\n * Note, this directive requires `ngModel` to be present.\n *\n * @element input\n * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change\n * in input value.\n *\n * @example\n * <doc:example>\n *   <doc:source>\n *     <script>\n *       function Controller($scope) {\n *         $scope.counter = 0;\n *         $scope.change = function() {\n *           $scope.counter++;\n *         };\n *       }\n *     </script>\n *     <div ng-controller=\"Controller\">\n *       <input type=\"checkbox\" ng-model=\"confirmed\" ng-change=\"change()\" id=\"ng-change-example1\" />\n *       <input type=\"checkbox\" ng-model=\"confirmed\" id=\"ng-change-example2\" />\n *       <label for=\"ng-change-example2\">Confirmed</label><br />\n *       <tt>debug = {{confirmed}}</tt><br/>\n *       <tt>counter = {{counter}}</tt><br/>\n *     </div>\n *   </doc:source>\n *   <doc:protractor>\n *     var counter = element(by.binding('counter'));\n *     var debug = element(by.binding('confirmed'));\n *\n *     it('should evaluate the expression if changing from view', function() {\n *       expect(counter.getText()).toContain('0');\n *\n *       element(by.id('ng-change-example1')).click();\n *\n *       expect(counter.getText()).toContain('1');\n *       expect(debug.getText()).toContain('true');\n *     });\n *\n *     it('should not evaluate the expression if changing from model', function() {\n *       element(by.id('ng-change-example2')).click();\n\n *       expect(counter.getText()).toContain('0');\n *       expect(debug.getText()).toContain('true');\n *     });\n *   </doc:protractor>\n * </doc:example>\n */\nvar ngChangeDirective = valueFn({\n  require: 'ngModel',\n  link: function(scope, element, attr, ctrl) {\n    ctrl.$viewChangeListeners.push(function() {\n      scope.$eval(attr.ngChange);\n    });\n  }\n});\n\n\nvar requiredDirective = function() {\n  return {\n    require: '?ngModel',\n    link: function(scope, elm, attr, ctrl) {\n      if (!ctrl) return;\n      attr.required = true; // force truthy in case we are on non input element\n\n      var validator = function(value) {\n        if (attr.required && ctrl.$isEmpty(value)) {\n          ctrl.$setValidity('required', false);\n          return;\n        } else {\n          ctrl.$setValidity('required', true);\n          return value;\n        }\n      };\n\n      ctrl.$formatters.push(validator);\n      ctrl.$parsers.unshift(validator);\n\n      attr.$observe('required', function() {\n        validator(ctrl.$viewValue);\n      });\n    }\n  };\n};\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngList\n *\n * @description\n * Text input that converts between a delimited string and an array of strings. The delimiter\n * can be a fixed string (by default a comma) or a regular expression.\n *\n * @element input\n * @param {string=} ngList optional delimiter that should be used to split the value. If\n *   specified in form `/something/` then the value will be converted into a regular expression.\n *\n * @example\n    <doc:example>\n      <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.names = ['igor', 'misko', 'vojta'];\n         }\n       </script>\n       <form name=\"myForm\" ng-controller=\"Ctrl\">\n         List: <input name=\"namesInput\" ng-model=\"names\" ng-list required>\n         <span class=\"error\" ng-show=\"myForm.namesInput.$error.required\">\n           Required!</span>\n         <br>\n         <tt>names = {{names}}</tt><br/>\n         <tt>myForm.namesInput.$valid = {{myForm.namesInput.$valid}}</tt><br/>\n         <tt>myForm.namesInput.$error = {{myForm.namesInput.$error}}</tt><br/>\n         <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n         <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n        </form>\n      </doc:source>\n      <doc:protractor>\n        var listInput = element(by.model('names'));\n        var names = element(by.binding('{{names}}'));\n        var valid = element(by.binding('myForm.namesInput.$valid'));\n        var error = element(by.css('span.error'));\n\n        it('should initialize to model', function() {\n          expect(names.getText()).toContain('[\"igor\",\"misko\",\"vojta\"]');\n          expect(valid.getText()).toContain('true');\n          expect(error.getCssValue('display')).toBe('none');\n        });\n\n        it('should be invalid if empty', function() {\n          listInput.clear();\n          listInput.sendKeys('');\n\n          expect(names.getText()).toContain('');\n          expect(valid.getText()).toContain('false');\n          expect(error.getCssValue('display')).not.toBe('none');        });\n      </doc:protractor>\n    </doc:example>\n */\nvar ngListDirective = function() {\n  return {\n    require: 'ngModel',\n    link: function(scope, element, attr, ctrl) {\n      var match = /\\/(.*)\\//.exec(attr.ngList),\n          separator = match && new RegExp(match[1]) || attr.ngList || ',';\n\n      var parse = function(viewValue) {\n        // If the viewValue is invalid (say required but empty) it will be `undefined`\n        if (isUndefined(viewValue)) return;\n\n        var list = [];\n\n        if (viewValue) {\n          forEach(viewValue.split(separator), function(value) {\n            if (value) list.push(trim(value));\n          });\n        }\n\n        return list;\n      };\n\n      ctrl.$parsers.push(parse);\n      ctrl.$formatters.push(function(value) {\n        if (isArray(value)) {\n          return value.join(', ');\n        }\n\n        return undefined;\n      });\n\n      // Override the standard $isEmpty because an empty array means the input is empty.\n      ctrl.$isEmpty = function(value) {\n        return !value || !value.length;\n      };\n    }\n  };\n};\n\n\nvar CONSTANT_VALUE_REGEXP = /^(true|false|\\d+)$/;\n/**\n * @ngdoc directive\n * @name ng.directive:ngValue\n *\n * @description\n * Binds the given expression to the value of `input[select]` or `input[radio]`, so\n * that when the element is selected, the `ngModel` of that element is set to the\n * bound value.\n *\n * `ngValue` is useful when dynamically generating lists of radio buttons using `ng-repeat`, as\n * shown below.\n *\n * @element input\n * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute\n *   of the `input` element\n *\n * @example\n    <doc:example>\n      <doc:source>\n       <script>\n          function Ctrl($scope) {\n            $scope.names = ['pizza', 'unicorns', 'robots'];\n            $scope.my = { favorite: 'unicorns' };\n          }\n       </script>\n        <form ng-controller=\"Ctrl\">\n          <h2>Which is your favorite?</h2>\n            <label ng-repeat=\"name in names\" for=\"{{name}}\">\n              {{name}}\n              <input type=\"radio\"\n                     ng-model=\"my.favorite\"\n                     ng-value=\"name\"\n                     id=\"{{name}}\"\n                     name=\"favorite\">\n            </label>\n          <div>You chose {{my.favorite}}</div>\n        </form>\n      </doc:source>\n      <doc:protractor>\n        var favorite = element(by.binding('my.favorite'));\n\n        it('should initialize to model', function() {\n          expect(favorite.getText()).toContain('unicorns');\n        });\n        it('should bind the values to the inputs', function() {\n          element.all(by.model('my.favorite')).get(0).click();\n          expect(favorite.getText()).toContain('pizza');\n        });\n      </doc:protractor>\n    </doc:example>\n */\nvar ngValueDirective = function() {\n  return {\n    priority: 100,\n    compile: function(tpl, tplAttr) {\n      if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {\n        return function ngValueConstantLink(scope, elm, attr) {\n          attr.$set('value', scope.$eval(attr.ngValue));\n        };\n      } else {\n        return function ngValueLink(scope, elm, attr) {\n          scope.$watch(attr.ngValue, function valueWatchAction(value) {\n            attr.$set('value', value);\n          });\n        };\n      }\n    }\n  };\n};\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngBind\n * @restrict AC\n *\n * @description\n * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element\n * with the value of a given expression, and to update the text content when the value of that\n * expression changes.\n *\n * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like\n * `{{ expression }}` which is similar but less verbose.\n *\n * It is preferrable to use `ngBind` instead of `{{ expression }}` when a template is momentarily\n * displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an\n * element attribute, it makes the bindings invisible to the user while the page is loading.\n *\n * An alternative solution to this problem would be using the\n * {@link ng.directive:ngCloak ngCloak} directive.\n *\n *\n * @element ANY\n * @param {expression} ngBind {@link guide/expression Expression} to evaluate.\n *\n * @example\n * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.\n   <doc:example>\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.name = 'Whirled';\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n         Enter name: <input type=\"text\" ng-model=\"name\"><br>\n         Hello <span ng-bind=\"name\"></span>!\n       </div>\n     </doc:source>\n     <doc:protractor>\n       it('should check ng-bind', function() {\n         var exampleContainer = $('.doc-example-live');\n         var nameInput = element(by.model('name'));\n\n         expect(exampleContainer.findElement(by.binding('name')).getText()).toBe('Whirled');\n         nameInput.clear();\n         nameInput.sendKeys('world');\n         expect(exampleContainer.findElement(by.binding('name')).getText()).toBe('world');\n       });\n     </doc:protractor>\n   </doc:example>\n */\nvar ngBindDirective = ngDirective(function(scope, element, attr) {\n  element.addClass('ng-binding').data('$binding', attr.ngBind);\n  scope.$watch(attr.ngBind, function ngBindWatchAction(value) {\n    // We are purposefully using == here rather than === because we want to\n    // catch when value is \"null or undefined\"\n    // jshint -W041\n    element.text(value == undefined ? '' : value);\n  });\n});\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngBindTemplate\n *\n * @description\n * The `ngBindTemplate` directive specifies that the element\n * text content should be replaced with the interpolation of the template\n * in the `ngBindTemplate` attribute.\n * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`\n * expressions. This directive is needed since some HTML elements\n * (such as TITLE and OPTION) cannot contain SPAN elements.\n *\n * @element ANY\n * @param {string} ngBindTemplate template of form\n *   <tt>{{</tt> <tt>expression</tt> <tt>}}</tt> to eval.\n *\n * @example\n * Try it here: enter text in text box and watch the greeting change.\n   <doc:example>\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.salutation = 'Hello';\n           $scope.name = 'World';\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n        Salutation: <input type=\"text\" ng-model=\"salutation\"><br>\n        Name: <input type=\"text\" ng-model=\"name\"><br>\n        <pre ng-bind-template=\"{{salutation}} {{name}}!\"></pre>\n       </div>\n     </doc:source>\n     <doc:protractor>\n       it('should check ng-bind', function() {\n         var salutationElem = element(by.binding('salutation'));\n         var salutationInput = element(by.model('salutation'));\n         var nameInput = element(by.model('name'));\n\n         expect(salutationElem.getText()).toBe('Hello World!');\n\n         salutationInput.clear();\n         salutationInput.sendKeys('Greetings');\n         nameInput.clear();\n         nameInput.sendKeys('user');\n\n         expect(salutationElem.getText()).toBe('Greetings user!');\n       });\n     </doc:protractor>\n   </doc:example>\n */\nvar ngBindTemplateDirective = ['$interpolate', function($interpolate) {\n  return function(scope, element, attr) {\n    // TODO: move this to scenario runner\n    var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));\n    element.addClass('ng-binding').data('$binding', interpolateFn);\n    attr.$observe('ngBindTemplate', function(value) {\n      element.text(value);\n    });\n  };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngBindHtml\n *\n * @description\n * Creates a binding that will innerHTML the result of evaluating the `expression` into the current\n * element in a secure way.  By default, the innerHTML-ed content will be sanitized using the {@link\n * ngSanitize.$sanitize $sanitize} service.  To utilize this functionality, ensure that `$sanitize`\n * is available, for example, by including {@link ngSanitize} in your module's dependencies (not in\n * core Angular.)  You may also bypass sanitization for values you know are safe. To do so, bind to\n * an explicitly trusted value via {@link ng.$sce#methods_trustAsHtml $sce.trustAsHtml}.  See the example\n * under {@link ng.$sce#Example Strict Contextual Escaping (SCE)}.\n *\n * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you\n * will have an exception (instead of an exploit.)\n *\n * @element ANY\n * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.\n *\n * @example\n   Try it here: enter text in text box and watch the greeting change.\n \n   <example module=\"ngBindHtmlExample\" deps=\"angular-sanitize.js\">\n     <file name=\"index.html\">\n       <div ng-controller=\"ngBindHtmlCtrl\">\n        <p ng-bind-html=\"myHTML\"></p>\n       </div>\n     </file>\n     \n     <file name=\"script.js\">\n       angular.module('ngBindHtmlExample', ['ngSanitize'])\n\n       .controller('ngBindHtmlCtrl', ['$scope', function ngBindHtmlCtrl($scope) {\n         $scope.myHTML =\n            'I am an <code>HTML</code>string with <a href=\"#\">links!</a> and other <em>stuff</em>';\n       }]);\n     </file>\n\n     <file name=\"protractorTest.js\">\n       it('should check ng-bind-html', function() {\n         expect(element(by.binding('myHTML')).getText()).toBe(\n             'I am an HTMLstring with links! and other stuff');\n       });\n     </file>\n   </example>\n */\nvar ngBindHtmlDirective = ['$sce', '$parse', function($sce, $parse) {\n  return function(scope, element, attr) {\n    element.addClass('ng-binding').data('$binding', attr.ngBindHtml);\n\n    var parsed = $parse(attr.ngBindHtml);\n    function getStringValue() { return (parsed(scope) || '').toString(); }\n\n    scope.$watch(getStringValue, function ngBindHtmlWatchAction(value) {\n      element.html($sce.getTrustedHtml(parsed(scope)) || '');\n    });\n  };\n}];\n\nfunction classDirective(name, selector) {\n  name = 'ngClass' + name;\n  return function() {\n    return {\n      restrict: 'AC',\n      link: function(scope, element, attr) {\n        var oldVal;\n\n        scope.$watch(attr[name], ngClassWatchAction, true);\n\n        attr.$observe('class', function(value) {\n          ngClassWatchAction(scope.$eval(attr[name]));\n        });\n\n\n        if (name !== 'ngClass') {\n          scope.$watch('$index', function($index, old$index) {\n            // jshint bitwise: false\n            var mod = $index & 1;\n            if (mod !== old$index & 1) {\n              var classes = flattenClasses(scope.$eval(attr[name]));\n              mod === selector ?\n                attr.$addClass(classes) :\n                attr.$removeClass(classes);\n            }\n          });\n        }\n\n\n        function ngClassWatchAction(newVal) {\n          if (selector === true || scope.$index % 2 === selector) {\n            var newClasses = flattenClasses(newVal || '');\n            if(!oldVal) {\n              attr.$addClass(newClasses);\n            } else if(!equals(newVal,oldVal)) {\n              attr.$updateClass(newClasses, flattenClasses(oldVal));\n            }\n          }\n          oldVal = copy(newVal);\n        }\n\n\n        function flattenClasses(classVal) {\n          if(isArray(classVal)) {\n            return classVal.join(' ');\n          } else if (isObject(classVal)) {\n            var classes = [], i = 0;\n            forEach(classVal, function(v, k) {\n              if (v) {\n                classes.push(k);\n              }\n            });\n            return classes.join(' ');\n          }\n\n          return classVal;\n        }\n      }\n    };\n  };\n}\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngClass\n * @restrict AC\n *\n * @description\n * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding\n * an expression that represents all classes to be added.\n *\n * The directive won't add duplicate classes if a particular class was already set.\n *\n * When the expression changes, the previously added classes are removed and only then the\n * new classes are added.\n *\n * @animations\n * add - happens just before the class is applied to the element\n * remove - happens just before the class is removed from the element\n *\n * @element ANY\n * @param {expression} ngClass {@link guide/expression Expression} to eval. The result\n *   of the evaluation can be a string representing space delimited class\n *   names, an array, or a map of class names to boolean values. In the case of a map, the\n *   names of the properties whose values are truthy will be added as css classes to the\n *   element.\n *\n * @example Example that demonstrates basic bindings via ngClass directive.\n   <example>\n     <file name=\"index.html\">\n       <p ng-class=\"{strike: deleted, bold: important, red: error}\">Map Syntax Example</p>\n       <input type=\"checkbox\" ng-model=\"deleted\"> deleted (apply \"strike\" class)<br>\n       <input type=\"checkbox\" ng-model=\"important\"> important (apply \"bold\" class)<br>\n       <input type=\"checkbox\" ng-model=\"error\"> error (apply \"red\" class)\n       <hr>\n       <p ng-class=\"style\">Using String Syntax</p>\n       <input type=\"text\" ng-model=\"style\" placeholder=\"Type: bold strike red\">\n       <hr>\n       <p ng-class=\"[style1, style2, style3]\">Using Array Syntax</p>\n       <input ng-model=\"style1\" placeholder=\"Type: bold, strike or red\"><br>\n       <input ng-model=\"style2\" placeholder=\"Type: bold, strike or red\"><br>\n       <input ng-model=\"style3\" placeholder=\"Type: bold, strike or red\"><br>\n     </file>\n     <file name=\"style.css\">\n       .strike {\n         text-decoration: line-through;\n       }\n       .bold {\n           font-weight: bold;\n       }\n       .red {\n           color: red;\n       }\n     </file>\n     <file name=\"protractorTest.js\">\n       var ps = element.all(by.css('.doc-example-live p'));\n\n       it('should let you toggle the class', function() {\n\n         expect(ps.first().getAttribute('class')).not.toMatch(/bold/);\n         expect(ps.first().getAttribute('class')).not.toMatch(/red/);\n\n         element(by.model('important')).click();\n         expect(ps.first().getAttribute('class')).toMatch(/bold/);\n\n         element(by.model('error')).click();\n         expect(ps.first().getAttribute('class')).toMatch(/red/);\n       });\n\n       it('should let you toggle string example', function() {\n         expect(ps.get(1).getAttribute('class')).toBe('');\n         element(by.model('style')).clear();\n         element(by.model('style')).sendKeys('red');\n         expect(ps.get(1).getAttribute('class')).toBe('red');\n       });\n\n       it('array example should have 3 classes', function() {\n         expect(ps.last().getAttribute('class')).toBe('');\n         element(by.model('style1')).sendKeys('bold');\n         element(by.model('style2')).sendKeys('strike');\n         element(by.model('style3')).sendKeys('red');\n         expect(ps.last().getAttribute('class')).toBe('bold strike red');\n       });\n     </file>\n   </example>\n\n   ## Animations\n\n   The example below demonstrates how to perform animations using ngClass.\n\n   <example animations=\"true\">\n     <file name=\"index.html\">\n      <input id=\"setbtn\" type=\"button\" value=\"set\" ng-click=\"myVar='my-class'\">\n      <input id=\"clearbtn\" type=\"button\" value=\"clear\" ng-click=\"myVar=''\">\n      <br>\n      <span class=\"base-class\" ng-class=\"myVar\">Sample Text</span>\n     </file>\n     <file name=\"style.css\">\n       .base-class {\n         -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n         transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n       }\n\n       .base-class.my-class {\n         color: red;\n         font-size:3em;\n       }\n     </file>\n     <file name=\"protractorTest.js\">\n       it('should check ng-class', function() {\n         expect(element(by.css('.base-class')).getAttribute('class')).not.\n           toMatch(/my-class/);\n\n         element(by.id('setbtn')).click();\n\n         expect(element(by.css('.base-class')).getAttribute('class')).\n           toMatch(/my-class/);\n\n         element(by.id('clearbtn')).click();\n\n         expect(element(by.css('.base-class')).getAttribute('class')).not.\n           toMatch(/my-class/);\n       });\n     </file>\n   </example>\n\n\n   ## ngClass and pre-existing CSS3 Transitions/Animations\n   The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.\n   Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder\n   any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure\n   to view the step by step details of {@link ngAnimate.$animate#methods_addclass $animate.addClass} and\n   {@link ngAnimate.$animate#methods_removeclass $animate.removeClass}.\n */\nvar ngClassDirective = classDirective('', true);\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngClassOdd\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result\n *   of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n        <ol ng-init=\"names=['John', 'Mary', 'Cate', 'Suz']\">\n          <li ng-repeat=\"name in names\">\n           <span ng-class-odd=\"'odd'\" ng-class-even=\"'even'\">\n             {{name}}\n           </span>\n          </li>\n        </ol>\n     </file>\n     <file name=\"style.css\">\n       .odd {\n         color: red;\n       }\n       .even {\n         color: blue;\n       }\n     </file>\n     <file name=\"protractorTest.js\">\n       it('should check ng-class-odd and ng-class-even', function() {\n         expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n           toMatch(/odd/);\n         expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n           toMatch(/even/);\n       });\n     </file>\n   </example>\n */\nvar ngClassOddDirective = classDirective('Odd', 0);\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngClassEven\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The\n *   result of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n        <ol ng-init=\"names=['John', 'Mary', 'Cate', 'Suz']\">\n          <li ng-repeat=\"name in names\">\n           <span ng-class-odd=\"'odd'\" ng-class-even=\"'even'\">\n             {{name}} &nbsp; &nbsp; &nbsp;\n           </span>\n          </li>\n        </ol>\n     </file>\n     <file name=\"style.css\">\n       .odd {\n         color: red;\n       }\n       .even {\n         color: blue;\n       }\n     </file>\n     <file name=\"protractorTest.js\">\n       it('should check ng-class-odd and ng-class-even', function() {\n         expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n           toMatch(/odd/);\n         expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n           toMatch(/even/);\n       });\n     </file>\n   </example>\n */\nvar ngClassEvenDirective = classDirective('Even', 1);\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngCloak\n * @restrict AC\n *\n * @description\n * The `ngCloak` directive is used to prevent the Angular html template from being briefly\n * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this\n * directive to avoid the undesirable flicker effect caused by the html template display.\n *\n * The directive can be applied to the `<body>` element, but the preferred usage is to apply\n * multiple `ngCloak` directives to small portions of the page to permit progressive rendering\n * of the browser view.\n *\n * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and\n * `angular.min.js`.\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * <pre>\n * [ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {\n *   display: none !important;\n * }\n * </pre>\n *\n * When this css rule is loaded by the browser, all html elements (including their children) that\n * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive\n * during the compilation of the template it deletes the `ngCloak` element attribute, making\n * the compiled element visible.\n *\n * For the best result, the `angular.js` script must be loaded in the head section of the html\n * document; alternatively, the css rule above must be included in the external stylesheet of the\n * application.\n *\n * Legacy browsers, like IE7, do not provide attribute selector support (added in CSS 2.1) so they\n * cannot match the `[ng\\:cloak]` selector. To work around this limitation, you must add the css\n * class `ng-cloak` in addition to the `ngCloak` directive as shown in the example below.\n *\n * @element ANY\n *\n * @example\n   <doc:example>\n     <doc:source>\n        <div id=\"template1\" ng-cloak>{{ 'hello' }}</div>\n        <div id=\"template2\" ng-cloak class=\"ng-cloak\">{{ 'hello IE7' }}</div>\n     </doc:source>\n     <doc:protractor>\n       it('should remove the template directive and css class', function() {\n         expect($('.doc-example-live #template1').getAttribute('ng-cloak')).\n           toBeNull();\n         expect($('.doc-example-live #template2').getAttribute('ng-cloak')).\n           toBeNull();\n       });\n     </doc:protractor>\n   </doc:example>\n *\n */\nvar ngCloakDirective = ngDirective({\n  compile: function(element, attr) {\n    attr.$set('ngCloak', undefined);\n    element.removeClass('ng-cloak');\n  }\n});\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngController\n *\n * @description\n * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular\n * supports the principles behind the Model-View-Controller design pattern.\n *\n * MVC components in angular:\n *\n * * Model — The Model is scope properties; scopes are attached to the DOM where scope properties\n *   are accessed through bindings.\n * * View — The template (HTML with data bindings) that is rendered into the View.\n * * Controller — The `ngController` directive specifies a Controller class; the class contains business\n *   logic behind the application to decorate the scope with functions and values\n *\n * Note that you can also attach controllers to the DOM by declaring it in a route definition\n * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller\n * again using `ng-controller` in the template itself.  This will cause the controller to be attached\n * and executed twice.\n *\n * @element ANY\n * @scope\n * @param {expression} ngController Name of a globally accessible constructor function or an\n *     {@link guide/expression expression} that on the current scope evaluates to a\n *     constructor function. The controller instance can be published into a scope property\n *     by specifying `as propertyName`.\n *\n * @example\n * Here is a simple form for editing user contact information. Adding, removing, clearing, and\n * greeting are methods declared on the controller (see source tab). These methods can\n * easily be called from the angular markup. Notice that the scope becomes the `this` for the\n * controller's instance. This allows for easy access to the view data from the controller. Also\n * notice that any changes to the data are automatically reflected in the View without the need\n * for a manual update. The example is shown in two different declaration styles you may use\n * according to preference.\n   <doc:example>\n     <doc:source>\n      <script>\n        function SettingsController1() {\n          this.name = \"John Smith\";\n          this.contacts = [\n            {type: 'phone', value: '408 555 1212'},\n            {type: 'email', value: 'john.smith@example.org'} ];\n          };\n\n        SettingsController1.prototype.greet = function() {\n          alert(this.name);\n        };\n\n        SettingsController1.prototype.addContact = function() {\n          this.contacts.push({type: 'email', value: 'yourname@example.org'});\n        };\n\n        SettingsController1.prototype.removeContact = function(contactToRemove) {\n         var index = this.contacts.indexOf(contactToRemove);\n          this.contacts.splice(index, 1);\n        };\n\n        SettingsController1.prototype.clearContact = function(contact) {\n          contact.type = 'phone';\n          contact.value = '';\n        };\n      </script>\n      <div id=\"ctrl-as-exmpl\" ng-controller=\"SettingsController1 as settings\">\n        Name: <input type=\"text\" ng-model=\"settings.name\"/>\n        [ <a href=\"\" ng-click=\"settings.greet()\">greet</a> ]<br/>\n        Contact:\n        <ul>\n          <li ng-repeat=\"contact in settings.contacts\">\n            <select ng-model=\"contact.type\">\n               <option>phone</option>\n               <option>email</option>\n            </select>\n            <input type=\"text\" ng-model=\"contact.value\"/>\n            [ <a href=\"\" ng-click=\"settings.clearContact(contact)\">clear</a>\n            | <a href=\"\" ng-click=\"settings.removeContact(contact)\">X</a> ]\n          </li>\n          <li>[ <a href=\"\" ng-click=\"settings.addContact()\">add</a> ]</li>\n       </ul>\n      </div>\n     </doc:source>\n     <doc:protractor>\n       it('should check controller as', function() {\n         var container = element(by.id('ctrl-as-exmpl'));\n\n         expect(container.findElement(by.model('settings.name'))\n             .getAttribute('value')).toBe('John Smith');\n\n         var firstRepeat =\n             container.findElement(by.repeater('contact in settings.contacts').row(0));\n         var secondRepeat =\n             container.findElement(by.repeater('contact in settings.contacts').row(1));\n\n         expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value'))\n             .toBe('408 555 1212');\n         expect(secondRepeat.findElement(by.model('contact.value')).getAttribute('value'))\n             .toBe('john.smith@example.org');\n\n         firstRepeat.findElement(by.linkText('clear')).click()\n\n         expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value'))\n             .toBe('');\n\n         container.findElement(by.linkText('add')).click();\n\n         expect(container.findElement(by.repeater('contact in settings.contacts').row(2))\n             .findElement(by.model('contact.value'))\n             .getAttribute('value'))\n             .toBe('yourname@example.org');\n       });\n     </doc:protractor>\n   </doc:example>\n    <doc:example>\n     <doc:source>\n      <script>\n        function SettingsController2($scope) {\n          $scope.name = \"John Smith\";\n          $scope.contacts = [\n            {type:'phone', value:'408 555 1212'},\n            {type:'email', value:'john.smith@example.org'} ];\n\n          $scope.greet = function() {\n           alert(this.name);\n          };\n\n          $scope.addContact = function() {\n           this.contacts.push({type:'email', value:'yourname@example.org'});\n          };\n\n          $scope.removeContact = function(contactToRemove) {\n           var index = this.contacts.indexOf(contactToRemove);\n           this.contacts.splice(index, 1);\n          };\n\n          $scope.clearContact = function(contact) {\n           contact.type = 'phone';\n           contact.value = '';\n          };\n        }\n      </script>\n      <div id=\"ctrl-exmpl\" ng-controller=\"SettingsController2\">\n        Name: <input type=\"text\" ng-model=\"name\"/>\n        [ <a href=\"\" ng-click=\"greet()\">greet</a> ]<br/>\n        Contact:\n        <ul>\n          <li ng-repeat=\"contact in contacts\">\n            <select ng-model=\"contact.type\">\n               <option>phone</option>\n               <option>email</option>\n            </select>\n            <input type=\"text\" ng-model=\"contact.value\"/>\n            [ <a href=\"\" ng-click=\"clearContact(contact)\">clear</a>\n            | <a href=\"\" ng-click=\"removeContact(contact)\">X</a> ]\n          </li>\n          <li>[ <a href=\"\" ng-click=\"addContact()\">add</a> ]</li>\n       </ul>\n      </div>\n     </doc:source>\n     <doc:protractor>\n       it('should check controller', function() {\n         var container = element(by.id('ctrl-exmpl'));\n\n         expect(container.findElement(by.model('name'))\n             .getAttribute('value')).toBe('John Smith');\n\n         var firstRepeat =\n             container.findElement(by.repeater('contact in contacts').row(0));\n         var secondRepeat =\n             container.findElement(by.repeater('contact in contacts').row(1));\n\n         expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value'))\n             .toBe('408 555 1212');\n         expect(secondRepeat.findElement(by.model('contact.value')).getAttribute('value'))\n             .toBe('john.smith@example.org');\n\n         firstRepeat.findElement(by.linkText('clear')).click()\n\n         expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value'))\n             .toBe('');\n\n         container.findElement(by.linkText('add')).click();\n\n         expect(container.findElement(by.repeater('contact in contacts').row(2))\n             .findElement(by.model('contact.value'))\n             .getAttribute('value'))\n             .toBe('yourname@example.org');\n       });\n     </doc:protractor>\n   </doc:example>\n\n */\nvar ngControllerDirective = [function() {\n  return {\n    scope: true,\n    controller: '@',\n    priority: 500\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngCsp\n *\n * @element html\n * @description\n * Enables [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) support.\n *\n * This is necessary when developing things like Google Chrome Extensions.\n *\n * CSP forbids apps to use `eval` or `Function(string)` generated functions (among other things).\n * For us to be compatible, we just need to implement the \"getterFn\" in $parse without violating\n * any of these restrictions.\n *\n * AngularJS uses `Function(string)` generated functions as a speed optimization. Applying the `ngCsp`\n * directive will cause Angular to use CSP compatibility mode. When this mode is on AngularJS will\n * evaluate all expressions up to 30% slower than in non-CSP mode, but no security violations will\n * be raised.\n *\n * CSP forbids JavaScript to inline stylesheet rules. In non CSP mode Angular automatically\n * includes some CSS rules (e.g. {@link ng.directive:ngCloak ngCloak}).\n * To make those directives work in CSP mode, include the `angular-csp.css` manually.\n *\n * In order to use this feature put the `ngCsp` directive on the root element of the application.\n *\n * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*\n *\n * @example\n * This example shows how to apply the `ngCsp` directive to the `html` tag.\n   <pre>\n     <!doctype html>\n     <html ng-app ng-csp>\n     ...\n     ...\n     </html>\n   </pre>\n */\n\n// ngCsp is not implemented as a proper directive any more, because we need it be processed while we bootstrap\n// the system (before $parse is instantiated), for this reason we just have a csp() fn that looks for ng-csp attribute\n// anywhere in the current doc\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngClick\n *\n * @description\n * The ngClick directive allows you to specify custom behavior when\n * an element is clicked.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon\n * click. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-click=\"count = count + 1\" ng-init=\"count=0\">\n        Increment\n      </button>\n      count: {{count}}\n     </doc:source>\n     <doc:protractor>\n       it('should check ng-click', function() {\n         expect(element(by.binding('count')).getText()).toMatch('0');\n         element(by.css('.doc-example-live button')).click();\n         expect(element(by.binding('count')).getText()).toMatch('1');\n       });\n     </doc:protractor>\n   </doc:example>\n */\n/*\n * A directive that allows creation of custom onclick handlers that are defined as angular\n * expressions and are compiled and executed within the current scope.\n *\n * Events that are handled via these handler are always configured not to propagate further.\n */\nvar ngEventDirectives = {};\nforEach(\n  'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),\n  function(name) {\n    var directiveName = directiveNormalize('ng-' + name);\n    ngEventDirectives[directiveName] = ['$parse', function($parse) {\n      return {\n        compile: function($element, attr) {\n          var fn = $parse(attr[directiveName]);\n          return function(scope, element, attr) {\n            element.on(lowercase(name), function(event) {\n              scope.$apply(function() {\n                fn(scope, {$event:event});\n              });\n            });\n          };\n        }\n      };\n    }];\n  }\n);\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngDblclick\n *\n * @description\n * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon\n * a dblclick. (The Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-dblclick=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (on double click)\n      </button>\n      count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngMousedown\n *\n * @description\n * The ngMousedown directive allows you to specify custom behavior on mousedown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon\n * mousedown. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-mousedown=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (on mouse down)\n      </button>\n      count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngMouseup\n *\n * @description\n * Specify custom behavior on mouseup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon\n * mouseup. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-mouseup=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (on mouse up)\n      </button>\n      count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngMouseover\n *\n * @description\n * Specify custom behavior on mouseover event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon\n * mouseover. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-mouseover=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse is over)\n      </button>\n      count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngMouseenter\n *\n * @description\n * Specify custom behavior on mouseenter event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon\n * mouseenter. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-mouseenter=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse enters)\n      </button>\n      count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngMouseleave\n *\n * @description\n * Specify custom behavior on mouseleave event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon\n * mouseleave. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-mouseleave=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse leaves)\n      </button>\n      count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngMousemove\n *\n * @description\n * Specify custom behavior on mousemove event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon\n * mousemove. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-mousemove=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse moves)\n      </button>\n      count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngKeydown\n *\n * @description\n * Specify custom behavior on keydown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon\n * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <input ng-keydown=\"count = count + 1\" ng-init=\"count=0\">\n      key down count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngKeyup\n *\n * @description\n * Specify custom behavior on keyup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon\n * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <input ng-keyup=\"count = count + 1\" ng-init=\"count=0\">\n      key up count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngKeypress\n *\n * @description\n * Specify custom behavior on keypress event.\n *\n * @element ANY\n * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon\n * keypress. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <input ng-keypress=\"count = count + 1\" ng-init=\"count=0\">\n      key press count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngSubmit\n *\n * @description\n * Enables binding angular expressions to onsubmit events.\n *\n * Additionally it prevents the default action (which for form means sending the request to the\n * server and reloading the current page) **but only if the form does not contain an `action`\n * attribute**.\n *\n * @element form\n * @priority 0\n * @param {expression} ngSubmit {@link guide/expression Expression} to eval. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <script>\n        function Ctrl($scope) {\n          $scope.list = [];\n          $scope.text = 'hello';\n          $scope.submit = function() {\n            if (this.text) {\n              this.list.push(this.text);\n              this.text = '';\n            }\n          };\n        }\n      </script>\n      <form ng-submit=\"submit()\" ng-controller=\"Ctrl\">\n        Enter text and hit enter:\n        <input type=\"text\" ng-model=\"text\" name=\"text\" />\n        <input type=\"submit\" id=\"submit\" value=\"Submit\" />\n        <pre>list={{list}}</pre>\n      </form>\n     </doc:source>\n     <doc:protractor>\n       it('should check ng-submit', function() {\n         expect(element(by.binding('list')).getText()).toBe('list=[]');\n         element(by.css('.doc-example-live #submit')).click();\n         expect(element(by.binding('list')).getText()).toContain('hello');\n         expect(element(by.input('text')).getAttribute('value')).toBe('');\n       });\n       it('should ignore empty strings', function() {\n         expect(element(by.binding('list')).getText()).toBe('list=[]');\n         element(by.css('.doc-example-live #submit')).click();\n         element(by.css('.doc-example-live #submit')).click();\n         expect(element(by.binding('list')).getText()).toContain('hello');\n        });\n     </doc:protractor>\n   </doc:example>\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngFocus\n *\n * @description\n * Specify custom behavior on focus event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon\n * focus. (Event object is available as `$event`)\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngBlur\n *\n * @description\n * Specify custom behavior on blur event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon\n * blur. (Event object is available as `$event`)\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngCopy\n *\n * @description\n * Specify custom behavior on copy event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon\n * copy. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <input ng-copy=\"copied=true\" ng-init=\"copied=false; value='copy me'\" ng-model=\"value\">\n      copied: {{copied}}\n     </doc:source>\n   </doc:example>\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngCut\n *\n * @description\n * Specify custom behavior on cut event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon\n * cut. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <input ng-cut=\"cut=true\" ng-init=\"cut=false; value='cut me'\" ng-model=\"value\">\n      cut: {{cut}}\n     </doc:source>\n   </doc:example>\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngPaste\n *\n * @description\n * Specify custom behavior on paste event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon\n * paste. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <input ng-paste=\"paste=true\" ng-init=\"paste=false\" placeholder='paste here'>\n      pasted: {{paste}}\n     </doc:source>\n   </doc:example>\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngIf\n * @restrict A\n *\n * @description\n * The `ngIf` directive removes or recreates a portion of the DOM tree based on an\n * {expression}. If the expression assigned to `ngIf` evaluates to a false\n * value then the element is removed from the DOM, otherwise a clone of the\n * element is reinserted into the DOM.\n *\n * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the\n * element in the DOM rather than changing its visibility via the `display` css property.  A common\n * case when this difference is significant is when using css selectors that rely on an element's\n * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.\n *\n * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope\n * is created when the element is restored.  The scope created within `ngIf` inherits from\n * its parent scope using\n * {@link https://github.com/angular/angular.js/wiki/The-Nuances-of-Scope-Prototypal-Inheritance prototypal inheritance}.\n * An important implication of this is if `ngModel` is used within `ngIf` to bind to\n * a javascript primitive defined in the parent scope. In this case any modifications made to the\n * variable within the child scope will override (hide) the value in the parent scope.\n *\n * Also, `ngIf` recreates elements using their compiled state. An example of this behavior\n * is if an element's class attribute is directly modified after it's compiled, using something like\n * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element\n * the added class will be lost because the original compiled state is used to regenerate the element.\n *\n * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`\n * and `leave` effects.\n *\n * @animations\n * enter - happens just after the ngIf contents change and a new DOM element is created and injected into the ngIf container\n * leave - happens just before the ngIf contents are removed from the DOM\n *\n * @element ANY\n * @scope\n * @priority 600\n * @param {expression} ngIf If the {@link guide/expression expression} is falsy then\n *     the element is removed from the DOM tree. If it is truthy a copy of the compiled\n *     element is added to the DOM tree.\n *\n * @example\n  <example animations=\"true\">\n    <file name=\"index.html\">\n      Click me: <input type=\"checkbox\" ng-model=\"checked\" ng-init=\"checked=true\" /><br/>\n      Show when checked:\n      <span ng-if=\"checked\" class=\"animate-if\">\n        I'm removed when the checkbox is unchecked.\n      </span>\n    </file>\n    <file name=\"animations.css\">\n      .animate-if {\n        background:white;\n        border:1px solid black;\n        padding:10px;\n      }\n\n      .animate-if.ng-enter, .animate-if.ng-leave {\n        -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n        transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n      }\n\n      .animate-if.ng-enter,\n      .animate-if.ng-leave.ng-leave-active {\n        opacity:0;\n      }\n\n      .animate-if.ng-leave,\n      .animate-if.ng-enter.ng-enter-active {\n        opacity:1;\n      }\n    </file>\n  </example>\n */\nvar ngIfDirective = ['$animate', function($animate) {\n  return {\n    transclude: 'element',\n    priority: 600,\n    terminal: true,\n    restrict: 'A',\n    $$tlb: true,\n    link: function ($scope, $element, $attr, ctrl, $transclude) {\n        var block, childScope;\n        $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {\n\n          if (toBoolean(value)) {\n            if (!childScope) {\n              childScope = $scope.$new();\n              $transclude(childScope, function (clone) {\n                clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ');\n                // Note: We only need the first/last node of the cloned nodes.\n                // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n                // by a directive with templateUrl when it's template arrives.\n                block = {\n                  clone: clone\n                };\n                $animate.enter(clone, $element.parent(), $element);\n              });\n            }\n          } else {\n\n            if (childScope) {\n              childScope.$destroy();\n              childScope = null;\n            }\n\n            if (block) {\n              $animate.leave(getBlockElements(block.clone));\n              block = null;\n            }\n          }\n        });\n    }\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngInclude\n * @restrict ECA\n *\n * @description\n * Fetches, compiles and includes an external HTML fragment.\n *\n * By default, the template URL is restricted to the same domain and protocol as the\n * application document. This is done by calling {@link ng.$sce#methods_getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols\n * you may either {@link ng.$sceDelegateProvider#methods_resourceUrlWhitelist whitelist them} or\n * {@link ng.$sce#methods_trustAsResourceUrl wrap them} as trusted values. Refer to Angular's {@link\n * ng.$sce Strict Contextual Escaping}.\n *\n * In addition, the browser's\n * {@link https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest\n * Same Origin Policy} and {@link http://www.w3.org/TR/cors/ Cross-Origin Resource Sharing\n * (CORS)} policy may further restrict whether the template is successfully loaded.\n * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`\n * access on some browsers.\n *\n * @animations\n * enter - animation is used to bring new content into the browser.\n * leave - animation is used to animate existing content away.\n *\n * The enter and leave animation occur concurrently.\n *\n * @scope\n * @priority 400\n *\n * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,\n *                 make sure you wrap it in quotes, e.g. `src=\"'myPartialTemplate.html'\"`.\n * @param {string=} onload Expression to evaluate when a new partial is loaded.\n *\n * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll\n *                  $anchorScroll} to scroll the viewport after the content is loaded.\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 expression evaluates to truthy value.\n *\n * @example\n  <example animations=\"true\">\n    <file name=\"index.html\">\n     <div ng-controller=\"Ctrl\">\n       <select ng-model=\"template\" ng-options=\"t.name for t in templates\">\n        <option value=\"\">(blank)</option>\n       </select>\n       url of the template: <tt>{{template.url}}</tt>\n       <hr/>\n       <div class=\"slide-animate-container\">\n         <div class=\"slide-animate\" ng-include=\"template.url\"></div>\n       </div>\n     </div>\n    </file>\n    <file name=\"script.js\">\n      function Ctrl($scope) {\n        $scope.templates =\n          [ { name: 'template1.html', url: 'template1.html'}\n          , { name: 'template2.html', url: 'template2.html'} ];\n        $scope.template = $scope.templates[0];\n      }\n     </file>\n    <file name=\"template1.html\">\n      Content of template1.html\n    </file>\n    <file name=\"template2.html\">\n      Content of template2.html\n    </file>\n    <file name=\"animations.css\">\n      .slide-animate-container {\n        position:relative;\n        background:white;\n        border:1px solid black;\n        height:40px;\n        overflow:hidden;\n      }\n\n      .slide-animate {\n        padding:10px;\n      }\n\n      .slide-animate.ng-enter, .slide-animate.ng-leave {\n        -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n        transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n        position:absolute;\n        top:0;\n        left:0;\n        right:0;\n        bottom:0;\n        display:block;\n        padding:10px;\n      }\n\n      .slide-animate.ng-enter {\n        top:-50px;\n      }\n      .slide-animate.ng-enter.ng-enter-active {\n        top:0;\n      }\n\n      .slide-animate.ng-leave {\n        top:0;\n      }\n      .slide-animate.ng-leave.ng-leave-active {\n        top:50px;\n      }\n    </file>\n    <file name=\"protractorTest.js\">\n      var templateSelect = element(by.model('template'));\n      var includeElem = element(by.css('.doc-example-live [ng-include]'));\n\n      it('should load template1.html', function() {\n        expect(includeElem.getText()).toMatch(/Content of template1.html/);\n      });\n\n      it('should load template2.html', function() {\n        if (browser.params.browser == 'firefox') {\n          // Firefox can't handle using selects\n          // See https://github.com/angular/protractor/issues/480\n          return;\n        }\n        templateSelect.click();\n        templateSelect.element.all(by.css('option')).get(2).click();\n        expect(includeElem.getText()).toMatch(/Content of template2.html/);\n      });\n\n      it('should change to blank', function() {\n        if (browser.params.browser == 'firefox') {\n          // Firefox can't handle using selects\n          return;\n        }\n        templateSelect.click();\n        templateSelect.element.all(by.css('option')).get(0).click();\n        expect(includeElem.isPresent()).toBe(false);\n      });\n    </file>\n  </example>\n */\n\n\n/**\n * @ngdoc event\n * @name ng.directive:ngInclude#$includeContentRequested\n * @eventOf ng.directive:ngInclude\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted every time the ngInclude content is requested.\n */\n\n\n/**\n * @ngdoc event\n * @name ng.directive:ngInclude#$includeContentLoaded\n * @eventOf ng.directive:ngInclude\n * @eventType emit on the current ngInclude scope\n * @description\n * Emitted every time the ngInclude content is reloaded.\n */\nvar ngIncludeDirective = ['$http', '$templateCache', '$anchorScroll', '$animate', '$sce',\n                  function($http,   $templateCache,   $anchorScroll,   $animate,   $sce) {\n  return {\n    restrict: 'ECA',\n    priority: 400,\n    terminal: true,\n    transclude: 'element',\n    controller: angular.noop,\n    compile: function(element, attr) {\n      var srcExp = attr.ngInclude || attr.src,\n          onloadExp = attr.onload || '',\n          autoScrollExp = attr.autoscroll;\n\n      return function(scope, $element, $attr, ctrl, $transclude) {\n        var changeCounter = 0,\n            currentScope,\n            currentElement;\n\n        var cleanupLastIncludeContent = function() {\n          if (currentScope) {\n            currentScope.$destroy();\n            currentScope = null;\n          }\n          if(currentElement) {\n            $animate.leave(currentElement);\n            currentElement = null;\n          }\n        };\n\n        scope.$watch($sce.parseAsResourceUrl(srcExp), function ngIncludeWatchAction(src) {\n          var afterAnimation = function() {\n            if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {\n              $anchorScroll();\n            }\n          };\n          var thisChangeId = ++changeCounter;\n\n          if (src) {\n            $http.get(src, {cache: $templateCache}).success(function(response) {\n              if (thisChangeId !== changeCounter) return;\n              var newScope = scope.$new();\n              ctrl.template = response;\n\n              // Note: This will also link all children of ng-include that were contained in the original\n              // html. If that content contains controllers, ... they could pollute/change the scope.\n              // However, using ng-include 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                cleanupLastIncludeContent();\n                $animate.enter(clone, null, $element, afterAnimation);\n              });\n\n              currentScope = newScope;\n              currentElement = clone;\n\n              currentScope.$emit('$includeContentLoaded');\n              scope.$eval(onloadExp);\n            }).error(function() {\n              if (thisChangeId === changeCounter) cleanupLastIncludeContent();\n            });\n            scope.$emit('$includeContentRequested');\n          } else {\n            cleanupLastIncludeContent();\n            ctrl.template = null;\n          }\n        });\n      };\n    }\n  };\n}];\n\n// This directive is called during the $transclude call of the first `ngInclude` 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 ngInclude\n// is called.\nvar ngIncludeFillContentDirective = ['$compile',\n  function($compile) {\n    return {\n      restrict: 'ECA',\n      priority: -400,\n      require: 'ngInclude',\n      link: function(scope, $element, $attr, ctrl) {\n        $element.html(ctrl.template);\n        $compile($element.contents())(scope);\n      }\n    };\n  }];\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngInit\n * @restrict AC\n *\n * @description\n * The `ngInit` directive allows you to evaluate an expression in the\n * current scope.\n *\n * <div class=\"alert alert-error\">\n * The only appropriate use of `ngInit` is for aliasing special properties of\n * {@link api/ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below. Besides this case, you\n * should use {@link guide/controller controllers} rather than `ngInit`\n * to initialize values on a scope.\n * </div>\n * <div class=\"alert alert-warning\">\n * **Note**: If you have assignment in `ngInit` along with {@link api/ng.$filter `$filter`}, make\n * sure you have parenthesis for correct precedence:\n * <pre class=\"prettyprint\">\n *   <div ng-init=\"test1 = (data | orderBy:'name')\"></div>\n * </pre>\n * </div>\n *\n * @priority 450\n *\n * @element ANY\n * @param {expression} ngInit {@link guide/expression Expression} to eval.\n *\n * @example\n   <doc:example>\n     <doc:source>\n   <script>\n     function Ctrl($scope) {\n       $scope.list = [['a', 'b'], ['c', 'd']];\n     }\n   </script>\n   <div ng-controller=\"Ctrl\">\n     <div ng-repeat=\"innerList in list\" ng-init=\"outerIndex = $index\">\n       <div ng-repeat=\"value in innerList\" ng-init=\"innerIndex = $index\">\n          <span class=\"example-init\">list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};</span>\n       </div>\n     </div>\n   </div>\n     </doc:source>\n     <doc:protractor>\n       it('should alias index positions', function() {\n         var elements = element.all(by.css('.example-init'));\n         expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');\n         expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');\n         expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');\n         expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');\n       });\n     </doc:protractor>\n   </doc:example>\n */\nvar ngInitDirective = ngDirective({\n  priority: 450,\n  compile: function() {\n    return {\n      pre: function(scope, element, attrs) {\n        scope.$eval(attrs.ngInit);\n      }\n    };\n  }\n});\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngNonBindable\n * @restrict AC\n * @priority 1000\n *\n * @description\n * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current\n * DOM element. This is useful if the element contains what appears to be Angular directives and\n * bindings but which should be ignored by Angular. This could be the case if you have a site that\n * displays snippets of code, for instance.\n *\n * @element ANY\n *\n * @example\n * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,\n * but the one wrapped in `ngNonBindable` is left alone.\n *\n * @example\n    <doc:example>\n      <doc:source>\n        <div>Normal: {{1 + 2}}</div>\n        <div ng-non-bindable>Ignored: {{1 + 2}}</div>\n      </doc:source>\n      <doc:protractor>\n       it('should check ng-non-bindable', function() {\n         expect(element(by.binding('1 + 2')).getText()).toContain('3');\n         expect(element.all(by.css('.doc-example-live div')).last().getText()).toMatch(/1 \\+ 2/);\n       });\n      </doc:protractor>\n    </doc:example>\n */\nvar ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngPluralize\n * @restrict EA\n *\n * @description\n * # Overview\n * `ngPluralize` is a directive that displays messages according to en-US localization rules.\n * These rules are bundled with angular.js, but can be overridden\n * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive\n * by specifying the mappings between\n * {@link http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html\n * plural categories} and the strings to be displayed.\n *\n * # Plural categories and explicit number rules\n * There are two\n * {@link http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html\n * plural categories} in Angular's default en-US locale: \"one\" and \"other\".\n *\n * While a plural category may match many numbers (for example, in en-US locale, \"other\" can match\n * any number that is not 1), an explicit number rule can only match one number. For example, the\n * explicit number rule for \"3\" matches the number 3. There are examples of plural categories\n * and explicit number rules throughout the rest of this documentation.\n *\n * # Configuring ngPluralize\n * You configure ngPluralize by providing 2 attributes: `count` and `when`.\n * You can also provide an optional attribute, `offset`.\n *\n * The value of the `count` attribute can be either a string or an {@link guide/expression\n * Angular expression}; these are evaluated on the current scope for its bound value.\n *\n * The `when` attribute specifies the mappings between plural categories and the actual\n * string to be displayed. The value of the attribute should be a JSON object.\n *\n * The following example shows how to configure ngPluralize:\n *\n * <pre>\n * <ng-pluralize count=\"personCount\"\n                 when=\"{'0': 'Nobody is viewing.',\n *                      'one': '1 person is viewing.',\n *                      'other': '{} people are viewing.'}\">\n * </ng-pluralize>\n *</pre>\n *\n * In the example, `\"0: Nobody is viewing.\"` is an explicit number rule. If you did not\n * specify this rule, 0 would be matched to the \"other\" category and \"0 people are viewing\"\n * would be shown instead of \"Nobody is viewing\". You can specify an explicit number rule for\n * other numbers, for example 12, so that instead of showing \"12 people are viewing\", you can\n * show \"a dozen people are viewing\".\n *\n * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted\n * into pluralized strings. In the previous example, Angular will replace `{}` with\n * <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder\n * for <span ng-non-bindable>{{numberExpression}}</span>.\n *\n * # Configuring ngPluralize with offset\n * The `offset` attribute allows further customization of pluralized text, which can result in\n * a better user experience. For example, instead of the message \"4 people are viewing this document\",\n * you might display \"John, Kate and 2 others are viewing this document\".\n * The offset attribute allows you to offset a number by any desired value.\n * Let's take a look at an example:\n *\n * <pre>\n * <ng-pluralize count=\"personCount\" offset=2\n *               when=\"{'0': 'Nobody is viewing.',\n *                      '1': '{{person1}} is viewing.',\n *                      '2': '{{person1}} and {{person2}} are viewing.',\n *                      'one': '{{person1}}, {{person2}} and one other person are viewing.',\n *                      'other': '{{person1}}, {{person2}} and {} other people are viewing.'}\">\n * </ng-pluralize>\n * </pre>\n *\n * Notice that we are still using two plural categories(one, other), but we added\n * three explicit number rules 0, 1 and 2.\n * When one person, perhaps John, views the document, \"John is viewing\" will be shown.\n * When three people view the document, no explicit number rule is found, so\n * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.\n * In this case, plural category 'one' is matched and \"John, Marry and one other person are viewing\"\n * is shown.\n *\n * Note that when you specify offsets, you must provide explicit number rules for\n * numbers from 0 up to and including the offset. If you use an offset of 3, for example,\n * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for\n * plural categories \"one\" and \"other\".\n *\n * @param {string|expression} count The variable to be bounded to.\n * @param {string} when The mapping between plural category to its corresponding strings.\n * @param {number=} offset Offset to deduct from the total number.\n *\n * @example\n    <doc:example>\n      <doc:source>\n        <script>\n          function Ctrl($scope) {\n            $scope.person1 = 'Igor';\n            $scope.person2 = 'Misko';\n            $scope.personCount = 1;\n          }\n        </script>\n        <div ng-controller=\"Ctrl\">\n          Person 1:<input type=\"text\" ng-model=\"person1\" value=\"Igor\" /><br/>\n          Person 2:<input type=\"text\" ng-model=\"person2\" value=\"Misko\" /><br/>\n          Number of People:<input type=\"text\" ng-model=\"personCount\" value=\"1\" /><br/>\n\n          <!--- Example with simple pluralization rules for en locale --->\n          Without Offset:\n          <ng-pluralize count=\"personCount\"\n                        when=\"{'0': 'Nobody is viewing.',\n                               'one': '1 person is viewing.',\n                               'other': '{} people are viewing.'}\">\n          </ng-pluralize><br>\n\n          <!--- Example with offset --->\n          With Offset(2):\n          <ng-pluralize count=\"personCount\" offset=2\n                        when=\"{'0': 'Nobody is viewing.',\n                               '1': '{{person1}} is viewing.',\n                               '2': '{{person1}} and {{person2}} are viewing.',\n                               'one': '{{person1}}, {{person2}} and one other person are viewing.',\n                               'other': '{{person1}}, {{person2}} and {} other people are viewing.'}\">\n          </ng-pluralize>\n        </div>\n      </doc:source>\n      <doc:protractor>\n        it('should show correct pluralized string', function() {\n          var withoutOffset = element.all(by.css('ng-pluralize')).get(0);\n          var withOffset = element.all(by.css('ng-pluralize')).get(1);\n          var countInput = element(by.model('personCount'));\n\n          expect(withoutOffset.getText()).toEqual('1 person is viewing.');\n          expect(withOffset.getText()).toEqual('Igor is viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('0');\n\n          expect(withoutOffset.getText()).toEqual('Nobody is viewing.');\n          expect(withOffset.getText()).toEqual('Nobody is viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('2');\n\n          expect(withoutOffset.getText()).toEqual('2 people are viewing.');\n          expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('3');\n\n          expect(withoutOffset.getText()).toEqual('3 people are viewing.');\n          expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('4');\n\n          expect(withoutOffset.getText()).toEqual('4 people are viewing.');\n          expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');\n        });\n        it('should show data-bound names', function() {\n          var withOffset = element.all(by.css('ng-pluralize')).get(1);\n          var personCount = element(by.model('personCount'));\n          var person1 = element(by.model('person1'));\n          var person2 = element(by.model('person2'));\n          personCount.clear();\n          personCount.sendKeys('4');\n          person1.clear();\n          person1.sendKeys('Di');\n          person2.clear();\n          person2.sendKeys('Vojta');\n          expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');\n        });\n      </doc:protractor>\n    </doc:example>\n */\nvar ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interpolate) {\n  var BRACE = /{}/g;\n  return {\n    restrict: 'EA',\n    link: function(scope, element, attr) {\n      var numberExp = attr.count,\n          whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs\n          offset = attr.offset || 0,\n          whens = scope.$eval(whenExp) || {},\n          whensExpFns = {},\n          startSymbol = $interpolate.startSymbol(),\n          endSymbol = $interpolate.endSymbol(),\n          isWhen = /^when(Minus)?(.+)$/;\n\n      forEach(attr, function(expression, attributeName) {\n        if (isWhen.test(attributeName)) {\n          whens[lowercase(attributeName.replace('when', '').replace('Minus', '-'))] =\n            element.attr(attr.$attr[attributeName]);\n        }\n      });\n      forEach(whens, function(expression, key) {\n        whensExpFns[key] =\n          $interpolate(expression.replace(BRACE, startSymbol + numberExp + '-' +\n            offset + endSymbol));\n      });\n\n      scope.$watch(function ngPluralizeWatch() {\n        var value = parseFloat(scope.$eval(numberExp));\n\n        if (!isNaN(value)) {\n          //if explicit number rule such as 1, 2, 3... is defined, just use it. Otherwise,\n          //check it against pluralization rules in $locale service\n          if (!(value in whens)) value = $locale.pluralCat(value - offset);\n           return whensExpFns[value](scope, element, true);\n        } else {\n          return '';\n        }\n      }, function ngPluralizeWatchAction(newVal) {\n        element.text(newVal);\n      });\n    }\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngRepeat\n *\n * @description\n * The `ngRepeat` directive instantiates a template once per item from a collection. Each template\n * instance gets its own scope, where the given loop variable is set to the current collection item,\n * and `$index` is set to the item index or key.\n *\n * Special properties are exposed on the local scope of each template instance, including:\n *\n * | Variable  | Type            | Details                                                                     |\n * |-----------|-----------------|-----------------------------------------------------------------------------|\n * | `$index`  | {@type number}  | iterator offset of the repeated element (0..length-1)                       |\n * | `$first`  | {@type boolean} | true if the repeated element is first in the iterator.                      |\n * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |\n * | `$last`   | {@type boolean} | true if the repeated element is last in the iterator.                       |\n * | `$even`   | {@type boolean} | true if the iterator position `$index` is even (otherwise false).           |\n * | `$odd`    | {@type boolean} | true if the iterator position `$index` is odd (otherwise false).            |\n *\n * Creating aliases for these properties is possible with {@link api/ng.directive:ngInit `ngInit`}.\n * This may be useful when, for instance, nesting ngRepeats.\n *\n * # Special repeat start and end points\n * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending\n * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.\n * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)\n * up to and including the ending HTML tag where **ng-repeat-end** is placed.\n *\n * The example below makes use of this feature:\n * <pre>\n *   <header ng-repeat-start=\"item in items\">\n *     Header {{ item }}\n *   </header>\n *   <div class=\"body\">\n *     Body {{ item }}\n *   </div>\n *   <footer ng-repeat-end>\n *     Footer {{ item }}\n *   </footer>\n * </pre>\n *\n * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:\n * <pre>\n *   <header>\n *     Header A\n *   </header>\n *   <div class=\"body\">\n *     Body A\n *   </div>\n *   <footer>\n *     Footer A\n *   </footer>\n *   <header>\n *     Header B\n *   </header>\n *   <div class=\"body\">\n *     Body B\n *   </div>\n *   <footer>\n *     Footer B\n *   </footer>\n * </pre>\n *\n * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such\n * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).\n *\n * @animations\n * enter - when a new item is added to the list or when an item is revealed after a filter\n * leave - when an item is removed from the list or when an item is filtered out\n * move - when an adjacent item is filtered out causing a reorder or when the item contents are reordered\n *\n * @element ANY\n * @scope\n * @priority 1000\n * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These\n *   formats are currently supported:\n *\n *   * `variable in expression` – where variable is the user defined loop variable and `expression`\n *     is a scope expression giving the collection to enumerate.\n *\n *     For example: `album in artist.albums`.\n *\n *   * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers,\n *     and `expression` is the scope expression giving the collection to enumerate.\n *\n *     For example: `(name, age) in {'adam':10, 'amalie':12}`.\n *\n *   * `variable in expression track by tracking_expression` – You can also provide an optional tracking function\n *     which can be used to associate the objects in the collection with the DOM elements. If no tracking function\n *     is specified the ng-repeat associates elements by identity in the collection. It is an error to have\n *     more than one tracking function to resolve to the same key. (This would mean that two distinct objects are\n *     mapped to the same DOM element, which is not possible.)  Filters should be applied to the expression,\n *     before specifying a tracking expression.\n *\n *     For example: `item in items` is equivalent to `item in items track by $id(item)'. This implies that the DOM elements\n *     will be associated by item identity in the array.\n *\n *     For example: `item in items track by $id(item)`. A built in `$id()` function can be used to assign a unique\n *     `$$hashKey` property to each item in the array. This property is then used as a key to associated DOM elements\n *     with the corresponding item in the array by identity. Moving the same object in array would move the DOM\n *     element in the same way in the DOM.\n *\n *     For example: `item in items track by item.id` is a typical pattern when the items come from the database. In this\n *     case the object identity does not matter. Two objects are considered equivalent as long as their `id`\n *     property is same.\n *\n *     For example: `item in items | filter:searchText track by item.id` is a pattern that might be used to apply a filter\n *     to items in conjunction with a tracking expression.\n *\n * @example\n * This example initializes the scope to a list of names and\n * then uses `ngRepeat` to display every person:\n  <example animations=\"true\">\n    <file name=\"index.html\">\n      <div ng-init=\"friends = [\n        {name:'John', age:25, gender:'boy'},\n        {name:'Jessie', age:30, gender:'girl'},\n        {name:'Johanna', age:28, gender:'girl'},\n        {name:'Joy', age:15, gender:'girl'},\n        {name:'Mary', age:28, gender:'girl'},\n        {name:'Peter', age:95, gender:'boy'},\n        {name:'Sebastian', age:50, gender:'boy'},\n        {name:'Erika', age:27, gender:'girl'},\n        {name:'Patrick', age:40, gender:'boy'},\n        {name:'Samantha', age:60, gender:'girl'}\n      ]\">\n        I have {{friends.length}} friends. They are:\n        <input type=\"search\" ng-model=\"q\" placeholder=\"filter friends...\" />\n        <ul class=\"example-animate-container\">\n          <li class=\"animate-repeat\" ng-repeat=\"friend in friends | filter:q\">\n            [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.\n          </li>\n        </ul>\n      </div>\n    </file>\n    <file name=\"animations.css\">\n      .example-animate-container {\n        background:white;\n        border:1px solid black;\n        list-style:none;\n        margin:0;\n        padding:0 10px;\n      }\n\n      .animate-repeat {\n        line-height:40px;\n        list-style:none;\n        box-sizing:border-box;\n      }\n\n      .animate-repeat.ng-move,\n      .animate-repeat.ng-enter,\n      .animate-repeat.ng-leave {\n        -webkit-transition:all linear 0.5s;\n        transition:all linear 0.5s;\n      }\n\n      .animate-repeat.ng-leave.ng-leave-active,\n      .animate-repeat.ng-move,\n      .animate-repeat.ng-enter {\n        opacity:0;\n        max-height:0;\n      }\n\n      .animate-repeat.ng-leave,\n      .animate-repeat.ng-move.ng-move-active,\n      .animate-repeat.ng-enter.ng-enter-active {\n        opacity:1;\n        max-height:40px;\n      }\n    </file>\n    <file name=\"protractorTest.js\">\n      var friends = element(by.css('.doc-example-live'))\n          .element.all(by.repeater('friend in friends'));\n\n      it('should render initial data set', function() {\n        expect(friends.count()).toBe(10);\n        expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');\n        expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');\n        expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');\n        expect(element(by.binding('friends.length')).getText())\n            .toMatch(\"I have 10 friends. They are:\");\n      });\n\n       it('should update repeater when filter predicate changes', function() {\n         expect(friends.count()).toBe(10);\n\n         element(by.css('.doc-example-live')).element(by.model('q')).sendKeys('ma');\n\n         expect(friends.count()).toBe(2);\n         expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');\n         expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');\n       });\n      </file>\n    </example>\n */\nvar ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {\n  var NG_REMOVED = '$$NG_REMOVED';\n  var ngRepeatMinErr = minErr('ngRepeat');\n  return {\n    transclude: 'element',\n    priority: 1000,\n    terminal: true,\n    $$tlb: true,\n    link: function($scope, $element, $attr, ctrl, $transclude){\n        var expression = $attr.ngRepeat;\n        var match = expression.match(/^\\s*([\\s\\S]+?)\\s+in\\s+([\\s\\S]+?)(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/),\n          trackByExp, trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn,\n          lhs, rhs, valueIdentifier, keyIdentifier,\n          hashFnLocals = {$id: hashKey};\n\n        if (!match) {\n          throw ngRepeatMinErr('iexp', \"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.\",\n            expression);\n        }\n\n        lhs = match[1];\n        rhs = match[2];\n        trackByExp = match[3];\n\n        if (trackByExp) {\n          trackByExpGetter = $parse(trackByExp);\n          trackByIdExpFn = function(key, value, index) {\n            // assign key, value, and $index to the locals so that they can be used in hash functions\n            if (keyIdentifier) hashFnLocals[keyIdentifier] = key;\n            hashFnLocals[valueIdentifier] = value;\n            hashFnLocals.$index = index;\n            return trackByExpGetter($scope, hashFnLocals);\n          };\n        } else {\n          trackByIdArrayFn = function(key, value) {\n            return hashKey(value);\n          };\n          trackByIdObjFn = function(key) {\n            return key;\n          };\n        }\n\n        match = lhs.match(/^(?:([\\$\\w]+)|\\(([\\$\\w]+)\\s*,\\s*([\\$\\w]+)\\))$/);\n        if (!match) {\n          throw ngRepeatMinErr('iidexp', \"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.\",\n                                                                    lhs);\n        }\n        valueIdentifier = match[3] || match[1];\n        keyIdentifier = match[2];\n\n        // Store a list of elements from previous run. This is a hash where key is the item from the\n        // iterator, and the value is objects with following properties.\n        //   - scope: bound scope\n        //   - element: previous element.\n        //   - index: position\n        var lastBlockMap = {};\n\n        //watch props\n        $scope.$watchCollection(rhs, function ngRepeatAction(collection){\n          var index, length,\n              previousNode = $element[0],     // current position of the node\n              nextNode,\n              // Same as lastBlockMap but it has the current state. It will become the\n              // lastBlockMap on the next iteration.\n              nextBlockMap = {},\n              arrayLength,\n              childScope,\n              key, value, // key/value of iteration\n              trackById,\n              trackByIdFn,\n              collectionKeys,\n              block,       // last object information {scope, element, id}\n              nextBlockOrder = [],\n              elementsToRemove;\n\n\n          if (isArrayLike(collection)) {\n            collectionKeys = collection;\n            trackByIdFn = trackByIdExpFn || trackByIdArrayFn;\n          } else {\n            trackByIdFn = trackByIdExpFn || trackByIdObjFn;\n            // if object, extract keys, sort them and use to determine order of iteration over obj props\n            collectionKeys = [];\n            for (key in collection) {\n              if (collection.hasOwnProperty(key) && key.charAt(0) != '$') {\n                collectionKeys.push(key);\n              }\n            }\n            collectionKeys.sort();\n          }\n\n          arrayLength = collectionKeys.length;\n\n          // locate existing items\n          length = nextBlockOrder.length = collectionKeys.length;\n          for(index = 0; index < length; index++) {\n           key = (collection === collectionKeys) ? index : collectionKeys[index];\n           value = collection[key];\n           trackById = trackByIdFn(key, value, index);\n           assertNotHasOwnProperty(trackById, '`track by` id');\n           if(lastBlockMap.hasOwnProperty(trackById)) {\n             block = lastBlockMap[trackById];\n             delete lastBlockMap[trackById];\n             nextBlockMap[trackById] = block;\n             nextBlockOrder[index] = block;\n           } else if (nextBlockMap.hasOwnProperty(trackById)) {\n             // restore lastBlockMap\n             forEach(nextBlockOrder, function(block) {\n               if (block && block.scope) lastBlockMap[block.id] = block;\n             });\n             // This is a duplicate and we need to throw an error\n             throw ngRepeatMinErr('dupes', \"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}\",\n                                                                                                                                                    expression,       trackById);\n           } else {\n             // new never before seen block\n             nextBlockOrder[index] = { id: trackById };\n             nextBlockMap[trackById] = false;\n           }\n         }\n\n          // remove existing items\n          for (key in lastBlockMap) {\n            // lastBlockMap is our own object so we don't need to use special hasOwnPropertyFn\n            if (lastBlockMap.hasOwnProperty(key)) {\n              block = lastBlockMap[key];\n              elementsToRemove = getBlockElements(block.clone);\n              $animate.leave(elementsToRemove);\n              forEach(elementsToRemove, function(element) { element[NG_REMOVED] = true; });\n              block.scope.$destroy();\n            }\n          }\n\n          // we are not using forEach for perf reasons (trying to avoid #call)\n          for (index = 0, length = collectionKeys.length; index < length; index++) {\n            key = (collection === collectionKeys) ? index : collectionKeys[index];\n            value = collection[key];\n            block = nextBlockOrder[index];\n            if (nextBlockOrder[index - 1]) previousNode = getBlockEnd(nextBlockOrder[index - 1]);\n\n            if (block.scope) {\n              // if we have already seen this object, then we need to reuse the\n              // associated scope/element\n              childScope = block.scope;\n\n              nextNode = previousNode;\n              do {\n                nextNode = nextNode.nextSibling;\n              } while(nextNode && nextNode[NG_REMOVED]);\n\n              if (getBlockStart(block) != nextNode) {\n                // existing item which got moved\n                $animate.move(getBlockElements(block.clone), null, jqLite(previousNode));\n              }\n              previousNode = getBlockEnd(block);\n            } else {\n              // new item which we don't know about\n              childScope = $scope.$new();\n            }\n\n            childScope[valueIdentifier] = value;\n            if (keyIdentifier) childScope[keyIdentifier] = key;\n            childScope.$index = index;\n            childScope.$first = (index === 0);\n            childScope.$last = (index === (arrayLength - 1));\n            childScope.$middle = !(childScope.$first || childScope.$last);\n            // jshint bitwise: false\n            childScope.$odd = !(childScope.$even = (index&1) === 0);\n            // jshint bitwise: true\n\n            if (!block.scope) {\n              $transclude(childScope, function(clone) {\n                clone[clone.length++] = document.createComment(' end ngRepeat: ' + expression + ' ');\n                $animate.enter(clone, null, jqLite(previousNode));\n                previousNode = clone;\n                block.scope = childScope;\n                // Note: We only need the first/last node of the cloned nodes.\n                // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n                // by a directive with templateUrl when it's template arrives.\n                block.clone = clone;\n                nextBlockMap[block.id] = block;\n              });\n            }\n          }\n          lastBlockMap = nextBlockMap;\n        });\n    }\n  };\n\n  function getBlockStart(block) {\n    return block.clone[0];\n  }\n\n  function getBlockEnd(block) {\n    return block.clone[block.clone.length - 1];\n  }\n}];\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngShow\n *\n * @description\n * The `ngShow` directive shows or hides the given HTML element based on the expression\n * provided to the ngShow attribute. The element is shown or hidden by removing or adding\n * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * <pre>\n * <!-- when $scope.myValue is truthy (element is visible) -->\n * <div ng-show=\"myValue\"></div>\n *\n * <!-- when $scope.myValue is falsy (element is hidden) -->\n * <div ng-show=\"myValue\" class=\"ng-hide\"></div>\n * </pre>\n *\n * When the ngShow expression evaluates to false then the ng-hide CSS class is added to the class attribute\n * on the element causing it to become hidden. When true, the ng-hide CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the .ng-hide CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding .ng-hide\n *\n * If you wish to change the hide behavior with ngShow/ngHide then this can be achieved by\n * restating the styles for the .ng-hide class in CSS:\n * <pre>\n * .ng-hide {\n *   //!annotate CSS Specificity|Not to worry, this will override the AngularJS default...\n *   display:block!important;\n *\n *   //this is just another form of hiding an element\n *   position:absolute;\n *   top:-9999px;\n *   left:-9999px;\n * }\n * </pre>\n *\n * Just remember to include the important flag so the CSS override will function.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Here is a list of values that ngShow will consider as a falsy value (case insensitive):<br />\n * \"f\" / \"0\" / \"false\" / \"no\" / \"n\" / \"[]\"\n * </div>\n * \n * ## A note about animations with ngShow\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass except that\n * you must also include the !important flag to override the display property\n * so that you can perform an animation when the element is hidden during the time of the animation.\n *\n * <pre>\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n *   transition:0.5s linear all;\n *   display:block!important;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * </pre>\n *\n * @animations\n * addClass: .ng-hide - happens after the ngShow expression evaluates to a truthy value and the just before contents are set to visible\n * removeClass: .ng-hide - happens after the ngShow expression evaluates to a non truthy value and just before the contents are set to hidden\n *\n * @element ANY\n * @param {expression} ngShow If the {@link guide/expression expression} is truthy\n *     then the element is shown or hidden respectively.\n *\n * @example\n  <example animations=\"true\">\n    <file name=\"index.html\">\n      Click me: <input type=\"checkbox\" ng-model=\"checked\"><br/>\n      <div>\n        Show:\n        <div class=\"check-element animate-show\" ng-show=\"checked\">\n          <span class=\"icon-thumbs-up\"></span> I show up when your checkbox is checked.\n        </div>\n      </div>\n      <div>\n        Hide:\n        <div class=\"check-element animate-show\" ng-hide=\"checked\">\n          <span class=\"icon-thumbs-down\"></span> I hide when your checkbox is checked.\n        </div>\n      </div>\n    </file>\n    <file name=\"animations.css\">\n      .animate-show {\n        -webkit-transition:all linear 0.5s;\n        transition:all linear 0.5s;\n        line-height:20px;\n        opacity:1;\n        padding:10px;\n        border:1px solid black;\n        background:white;\n      }\n\n      .animate-show.ng-hide-add,\n      .animate-show.ng-hide-remove {\n        display:block!important;\n      }\n\n      .animate-show.ng-hide {\n        line-height:0;\n        opacity:0;\n        padding:0 10px;\n      }\n\n      .check-element {\n        padding:10px;\n        border:1px solid black;\n        background:white;\n      }\n    </file>\n    <file name=\"protractorTest.js\">\n      var thumbsUp = element(by.css('.doc-example-live span.icon-thumbs-up'));\n      var thumbsDown = element(by.css('.doc-example-live span.icon-thumbs-down'));\n\n      it('should check ng-show / ng-hide', function() {\n        expect(thumbsUp.isDisplayed()).toBeFalsy();\n        expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n        element(by.model('checked')).click();\n\n        expect(thumbsUp.isDisplayed()).toBeTruthy();\n        expect(thumbsDown.isDisplayed()).toBeFalsy();\n      });\n    </file>\n  </example>\n */\nvar ngShowDirective = ['$animate', function($animate) {\n  return function(scope, element, attr) {\n    scope.$watch(attr.ngShow, function ngShowWatchAction(value){\n      $animate[toBoolean(value) ? 'removeClass' : 'addClass'](element, 'ng-hide');\n    });\n  };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngHide\n *\n * @description\n * The `ngHide` directive shows or hides the given HTML element based on the expression\n * provided to the ngHide attribute. The element is shown or hidden by removing or adding\n * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * <pre>\n * <!-- when $scope.myValue is truthy (element is hidden) -->\n * <div ng-hide=\"myValue\"></div>\n *\n * <!-- when $scope.myValue is falsy (element is visible) -->\n * <div ng-hide=\"myValue\" class=\"ng-hide\"></div>\n * </pre>\n *\n * When the ngHide expression evaluates to true then the .ng-hide CSS class is added to the class attribute\n * on the element causing it to become hidden. When false, the ng-hide CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the .ng-hide CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding .ng-hide\n *\n * If you wish to change the hide behavior with ngShow/ngHide then this can be achieved by\n * restating the styles for the .ng-hide class in CSS:\n * <pre>\n * .ng-hide {\n *   //!annotate CSS Specificity|Not to worry, this will override the AngularJS default...\n *   display:block!important;\n *\n *   //this is just another form of hiding an element\n *   position:absolute;\n *   top:-9999px;\n *   left:-9999px;\n * }\n * </pre>\n *\n * Just remember to include the important flag so the CSS override will function.\n * \n * <div class=\"alert alert-warning\">\n * **Note:** Here is a list of values that ngHide will consider as a falsy value (case insensitive):<br />\n * \"f\" / \"0\" / \"false\" / \"no\" / \"n\" / \"[]\"\n * </div>\n *\n * ## A note about animations with ngHide\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass, except that\n * you must also include the !important flag to override the display property so\n * that you can perform an animation when the element is hidden during the time of the animation.\n *\n * <pre>\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n *   transition:0.5s linear all;\n *   display:block!important;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * </pre>\n *\n * @animations\n * removeClass: .ng-hide - happens after the ngHide expression evaluates to a truthy value and just before the contents are set to hidden\n * addClass: .ng-hide - happens after the ngHide expression evaluates to a non truthy value and just before the contents are set to visible\n *\n * @element ANY\n * @param {expression} ngHide If the {@link guide/expression expression} is truthy then\n *     the element is shown or hidden respectively.\n *\n * @example\n  <example animations=\"true\">\n    <file name=\"index.html\">\n      Click me: <input type=\"checkbox\" ng-model=\"checked\"><br/>\n      <div>\n        Show:\n        <div class=\"check-element animate-hide\" ng-show=\"checked\">\n          <span class=\"icon-thumbs-up\"></span> I show up when your checkbox is checked.\n        </div>\n      </div>\n      <div>\n        Hide:\n        <div class=\"check-element animate-hide\" ng-hide=\"checked\">\n          <span class=\"icon-thumbs-down\"></span> I hide when your checkbox is checked.\n        </div>\n      </div>\n    </file>\n    <file name=\"animations.css\">\n      .animate-hide {\n        -webkit-transition:all linear 0.5s;\n        transition:all linear 0.5s;\n        line-height:20px;\n        opacity:1;\n        padding:10px;\n        border:1px solid black;\n        background:white;\n      }\n\n      .animate-hide.ng-hide-add,\n      .animate-hide.ng-hide-remove {\n        display:block!important;\n      }\n\n      .animate-hide.ng-hide {\n        line-height:0;\n        opacity:0;\n        padding:0 10px;\n      }\n\n      .check-element {\n        padding:10px;\n        border:1px solid black;\n        background:white;\n      }\n    </file>\n    <file name=\"protractorTest.js\">\n      var thumbsUp = element(by.css('.doc-example-live span.icon-thumbs-up'));\n      var thumbsDown = element(by.css('.doc-example-live span.icon-thumbs-down'));\n\n      it('should check ng-show / ng-hide', function() {\n        expect(thumbsUp.isDisplayed()).toBeFalsy();\n        expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n        element(by.model('checked')).click();\n\n        expect(thumbsUp.isDisplayed()).toBeTruthy();\n        expect(thumbsDown.isDisplayed()).toBeFalsy();\n      });\n    </file>\n  </example>\n */\nvar ngHideDirective = ['$animate', function($animate) {\n  return function(scope, element, attr) {\n    scope.$watch(attr.ngHide, function ngHideWatchAction(value){\n      $animate[toBoolean(value) ? 'addClass' : 'removeClass'](element, 'ng-hide');\n    });\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngStyle\n * @restrict AC\n *\n * @description\n * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.\n *\n * @element ANY\n * @param {expression} ngStyle {@link guide/expression Expression} which evals to an\n *      object whose keys are CSS style names and values are corresponding values for those CSS\n *      keys.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n        <input type=\"button\" value=\"set\" ng-click=\"myStyle={color:'red'}\">\n        <input type=\"button\" value=\"clear\" ng-click=\"myStyle={}\">\n        <br/>\n        <span ng-style=\"myStyle\">Sample Text</span>\n        <pre>myStyle={{myStyle}}</pre>\n     </file>\n     <file name=\"style.css\">\n       span {\n         color: black;\n       }\n     </file>\n     <file name=\"protractorTest.js\">\n       var colorSpan = element(by.css('.doc-example-live span'));\n\n       it('should check ng-style', function() {\n         expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n         element(by.css('.doc-example-live input[value=set]')).click();\n         expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');\n         element(by.css('.doc-example-live input[value=clear]')).click();\n         expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n       });\n     </file>\n   </example>\n */\nvar ngStyleDirective = ngDirective(function(scope, element, attr) {\n  scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {\n    if (oldStyles && (newStyles !== oldStyles)) {\n      forEach(oldStyles, function(val, style) { element.css(style, '');});\n    }\n    if (newStyles) element.css(newStyles);\n  }, true);\n});\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngSwitch\n * @restrict EA\n *\n * @description\n * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.\n * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location\n * as specified in the template.\n *\n * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it\n * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element\n * matches the value obtained from the evaluated expression. In other words, you define a container element\n * (where you place the directive), place an expression on the **`on=\"...\"` attribute**\n * (or the **`ng-switch=\"...\"` attribute**), define any inner elements inside of the directive and place\n * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on\n * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default\n * attribute is displayed.\n *\n * <div class=\"alert alert-info\">\n * Be aware that the attribute values to match against cannot be expressions. They are interpreted\n * as literal string values to match against.\n * For example, **`ng-switch-when=\"someVal\"`** will match against the string `\"someVal\"` not against the\n * value of the expression `$scope.someVal`.\n * </div>\n\n * @animations\n * enter - happens after the ngSwitch contents change and the matched child element is placed inside the container\n * leave - happens just after the ngSwitch contents change and just before the former contents are removed from the DOM\n *\n * @usage\n * <ANY ng-switch=\"expression\">\n *   <ANY ng-switch-when=\"matchValue1\">...</ANY>\n *   <ANY ng-switch-when=\"matchValue2\">...</ANY>\n *   <ANY ng-switch-default>...</ANY>\n * </ANY>\n *\n *\n * @scope\n * @priority 800\n * @param {*} ngSwitch|on expression to match against <tt>ng-switch-when</tt>.\n * @paramDescription\n * On child elements add:\n *\n * * `ngSwitchWhen`: the case statement to match against. If match then this\n *   case will be displayed. If the same match appears multiple times, all the\n *   elements will be displayed.\n * * `ngSwitchDefault`: the default case when no other case match. If there\n *   are multiple default cases, all of them will be displayed when no other\n *   case match.\n *\n *\n * @example\n  <example animations=\"true\">\n    <file name=\"index.html\">\n      <div ng-controller=\"Ctrl\">\n        <select ng-model=\"selection\" ng-options=\"item for item in items\">\n        </select>\n        <tt>selection={{selection}}</tt>\n        <hr/>\n        <div class=\"animate-switch-container\"\n          ng-switch on=\"selection\">\n            <div class=\"animate-switch\" ng-switch-when=\"settings\">Settings Div</div>\n            <div class=\"animate-switch\" ng-switch-when=\"home\">Home Span</div>\n            <div class=\"animate-switch\" ng-switch-default>default</div>\n        </div>\n      </div>\n    </file>\n    <file name=\"script.js\">\n      function Ctrl($scope) {\n        $scope.items = ['settings', 'home', 'other'];\n        $scope.selection = $scope.items[0];\n      }\n    </file>\n    <file name=\"animations.css\">\n      .animate-switch-container {\n        position:relative;\n        background:white;\n        border:1px solid black;\n        height:40px;\n        overflow:hidden;\n      }\n\n      .animate-switch {\n        padding:10px;\n      }\n\n      .animate-switch.ng-animate {\n        -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n        transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n        position:absolute;\n        top:0;\n        left:0;\n        right:0;\n        bottom:0;\n      }\n\n      .animate-switch.ng-leave.ng-leave-active,\n      .animate-switch.ng-enter {\n        top:-50px;\n      }\n      .animate-switch.ng-leave,\n      .animate-switch.ng-enter.ng-enter-active {\n        top:0;\n      }\n    </file>\n    <file name=\"protractorTest.js\">\n      var switchElem = element(by.css('.doc-example-live [ng-switch]'));\n      var select = element(by.model('selection'));\n\n      it('should start in settings', function() {\n        expect(switchElem.getText()).toMatch(/Settings Div/);\n      });\n      it('should change to home', function() {\n        select.element.all(by.css('option')).get(1).click();\n        expect(switchElem.getText()).toMatch(/Home Span/);\n      });\n      it('should select default', function() {\n        select.element.all(by.css('option')).get(2).click();\n        expect(switchElem.getText()).toMatch(/default/);\n      });\n    </file>\n  </example>\n */\nvar ngSwitchDirective = ['$animate', function($animate) {\n  return {\n    restrict: 'EA',\n    require: 'ngSwitch',\n\n    // asks for $scope to fool the BC controller module\n    controller: ['$scope', function ngSwitchController() {\n     this.cases = {};\n    }],\n    link: function(scope, element, attr, ngSwitchController) {\n      var watchExpr = attr.ngSwitch || attr.on,\n          selectedTranscludes,\n          selectedElements,\n          selectedScopes = [];\n\n      scope.$watch(watchExpr, function ngSwitchWatchAction(value) {\n        for (var i= 0, ii=selectedScopes.length; i<ii; i++) {\n          selectedScopes[i].$destroy();\n          $animate.leave(selectedElements[i]);\n        }\n\n        selectedElements = [];\n        selectedScopes = [];\n\n        if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {\n          scope.$eval(attr.change);\n          forEach(selectedTranscludes, function(selectedTransclude) {\n            var selectedScope = scope.$new();\n            selectedScopes.push(selectedScope);\n            selectedTransclude.transclude(selectedScope, function(caseElement) {\n              var anchor = selectedTransclude.element;\n\n              selectedElements.push(caseElement);\n              $animate.enter(caseElement, anchor.parent(), anchor);\n            });\n          });\n        }\n      });\n    }\n  };\n}];\n\nvar ngSwitchWhenDirective = ngDirective({\n  transclude: 'element',\n  priority: 800,\n  require: '^ngSwitch',\n  link: function(scope, element, attrs, ctrl, $transclude) {\n    ctrl.cases['!' + attrs.ngSwitchWhen] = (ctrl.cases['!' + attrs.ngSwitchWhen] || []);\n    ctrl.cases['!' + attrs.ngSwitchWhen].push({ transclude: $transclude, element: element });\n  }\n});\n\nvar ngSwitchDefaultDirective = ngDirective({\n  transclude: 'element',\n  priority: 800,\n  require: '^ngSwitch',\n  link: function(scope, element, attr, ctrl, $transclude) {\n    ctrl.cases['?'] = (ctrl.cases['?'] || []);\n    ctrl.cases['?'].push({ transclude: $transclude, element: element });\n   }\n});\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngTransclude\n * @restrict AC\n *\n * @description\n * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.\n *\n * Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.\n *\n * @element ANY\n *\n * @example\n   <doc:example module=\"transclude\">\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.title = 'Lorem Ipsum';\n           $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';\n         }\n\n         angular.module('transclude', [])\n          .directive('pane', function(){\n             return {\n               restrict: 'E',\n               transclude: true,\n               scope: { title:'@' },\n               template: '<div style=\"border: 1px solid black;\">' +\n                           '<div style=\"background-color: gray\">{{title}}</div>' +\n                           '<div ng-transclude></div>' +\n                         '</div>'\n             };\n         });\n       </script>\n       <div ng-controller=\"Ctrl\">\n         <input ng-model=\"title\"><br>\n         <textarea ng-model=\"text\"></textarea> <br/>\n         <pane title=\"{{title}}\">{{text}}</pane>\n       </div>\n     </doc:source>\n     <doc:protractor>\n        it('should have transcluded', function() {\n          var titleElement = element(by.model('title'));\n          titleElement.clear();\n          titleElement.sendKeys('TITLE');\n          var textElement = element(by.model('text'));\n          textElement.clear();\n          textElement.sendKeys('TEXT');\n          expect(element(by.binding('title')).getText()).toEqual('TITLE');\n          expect(element(by.binding('text')).getText()).toEqual('TEXT');\n        });\n     </doc:protractor>\n   </doc:example>\n *\n */\nvar ngTranscludeDirective = ngDirective({\n  controller: ['$element', '$transclude', function($element, $transclude) {\n    if (!$transclude) {\n      throw minErr('ngTransclude')('orphan',\n          'Illegal use of ngTransclude directive in the template! ' +\n          'No parent directive that requires a transclusion found. ' +\n          'Element: {0}',\n          startingTag($element));\n    }\n\n    // remember the transclusion fn but call it during linking so that we don't process transclusion before directives on\n    // the parent element even when the transclusion replaces the current element. (we can't use priority here because\n    // that applies only to compile fns and not controllers\n    this.$transclude = $transclude;\n  }],\n\n  link: function($scope, $element, $attrs, controller) {\n    controller.$transclude(function(clone) {\n      $element.empty();\n      $element.append(clone);\n    });\n  }\n});\n\n/**\n * @ngdoc directive\n * @name ng.directive:script\n * @restrict E\n *\n * @description\n * Load the content of a `<script>` element into {@link api/ng.$templateCache `$templateCache`}, so that the\n * template can be used by {@link api/ng.directive:ngInclude `ngInclude`},\n * {@link api/ngRoute.directive:ngView `ngView`}, or {@link guide/directive directives}. The type of the\n * `<script>` element must be specified as `text/ng-template`, and a cache name for the template must be\n * assigned through the element's `id`, which can then be used as a directive's `templateUrl`.\n *\n * @param {'text/ng-template'} type Must be set to `'text/ng-template'`.\n * @param {string} id Cache name of the template.\n *\n * @example\n  <doc:example>\n    <doc:source>\n      <script type=\"text/ng-template\" id=\"/tpl.html\">\n        Content of the template.\n      </script>\n\n      <a ng-click=\"currentTpl='/tpl.html'\" id=\"tpl-link\">Load inlined template</a>\n      <div id=\"tpl-content\" ng-include src=\"currentTpl\"></div>\n    </doc:source>\n    <doc:protractor>\n      it('should load template defined inside script tag', function() {\n        element(by.css('#tpl-link')).click();\n        expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);\n      });\n    </doc:protractor>\n  </doc:example>\n */\nvar scriptDirective = ['$templateCache', function($templateCache) {\n  return {\n    restrict: 'E',\n    terminal: true,\n    compile: function(element, attr) {\n      if (attr.type == 'text/ng-template') {\n        var templateUrl = attr.id,\n            // IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent\n            text = element[0].text;\n\n        $templateCache.put(templateUrl, text);\n      }\n    }\n  };\n}];\n\nvar ngOptionsMinErr = minErr('ngOptions');\n/**\n * @ngdoc directive\n * @name ng.directive:select\n * @restrict E\n *\n * @description\n * HTML `SELECT` element with angular data-binding.\n *\n * # `ngOptions`\n *\n * The `ngOptions` attribute can be used to dynamically generate a list of `<option>`\n * elements for the `<select>` element using the array or object obtained by evaluating the\n * `ngOptions` comprehension_expression.\n *\n * When an item in the `<select>` menu is selected, the array element or object property\n * represented by the selected option will be bound to the model identified by the `ngModel`\n * directive.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** `ngModel` compares by reference, not value. This is important when binding to an\n * array of objects. See an example {@link http://jsfiddle.net/qWzTb/ in this jsfiddle}.\n * </div>\n *\n * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can\n * be nested into the `<select>` element. This element will then represent the `null` or \"not selected\"\n * option. See example below for demonstration.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** `ngOptions` provides an iterator facility for the `<option>` element which should be used instead\n * of {@link ng.directive:ngRepeat ngRepeat} when you want the\n * `select` model to be bound to a non-string value. This is because an option element can only\n * be bound to string values at present.\n * </div>\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required The control is considered valid only if value is entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n *    `required` when you want to data-bind to the `required` attribute.\n * @param {comprehension_expression=} ngOptions in one of the following forms:\n *\n *   * for array data sources:\n *     * `label` **`for`** `value` **`in`** `array`\n *     * `select` **`as`** `label` **`for`** `value` **`in`** `array`\n *     * `label`  **`group by`** `group` **`for`** `value` **`in`** `array`\n *     * `select` **`as`** `label` **`group by`** `group` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`\n *   * for object data sources:\n *     * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n *     * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n *     * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`\n *     * `select` **`as`** `label` **`group by`** `group`\n *         **`for` `(`**`key`**`,`** `value`**`) in`** `object`\n *\n * Where:\n *\n *   * `array` / `object`: an expression which evaluates to an array / object to iterate over.\n *   * `value`: local variable which will refer to each item in the `array` or each property value\n *      of `object` during iteration.\n *   * `key`: local variable which will refer to a property name in `object` during iteration.\n *   * `label`: The result of this expression will be the label for `<option>` element. The\n *     `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).\n *   * `select`: The result of this expression will be bound to the model of the parent `<select>`\n *      element. If not specified, `select` expression will default to `value`.\n *   * `group`: The result of this expression will be used to group options using the `<optgroup>`\n *      DOM element.\n *   * `trackexpr`: Used when working with an array of objects. The result of this expression will be\n *      used to identify the objects in the array. The `trackexpr` will most likely refer to the\n *     `value` variable (e.g. `value.propertyName`).\n *\n * @example\n    <doc:example>\n      <doc:source>\n        <script>\n        function MyCntrl($scope) {\n          $scope.colors = [\n            {name:'black', shade:'dark'},\n            {name:'white', shade:'light'},\n            {name:'red', shade:'dark'},\n            {name:'blue', shade:'dark'},\n            {name:'yellow', shade:'light'}\n          ];\n          $scope.color = $scope.colors[2]; // red\n        }\n        </script>\n        <div ng-controller=\"MyCntrl\">\n          <ul>\n            <li ng-repeat=\"color in colors\">\n              Name: <input ng-model=\"color.name\">\n              [<a href ng-click=\"colors.splice($index, 1)\">X</a>]\n            </li>\n            <li>\n              [<a href ng-click=\"colors.push({})\">add</a>]\n            </li>\n          </ul>\n          <hr/>\n          Color (null not allowed):\n          <select ng-model=\"color\" ng-options=\"c.name for c in colors\"></select><br>\n\n          Color (null allowed):\n          <span  class=\"nullable\">\n            <select ng-model=\"color\" ng-options=\"c.name for c in colors\">\n              <option value=\"\">-- choose color --</option>\n            </select>\n          </span><br/>\n\n          Color grouped by shade:\n          <select ng-model=\"color\" ng-options=\"c.name group by c.shade for c in colors\">\n          </select><br/>\n\n\n          Select <a href ng-click=\"color={name:'not in list'}\">bogus</a>.<br>\n          <hr/>\n          Currently selected: {{ {selected_color:color}  }}\n          <div style=\"border:solid 1px black; height:20px\"\n               ng-style=\"{'background-color':color.name}\">\n          </div>\n        </div>\n      </doc:source>\n      <doc:protractor>\n         it('should check ng-options', function() {\n           expect(element(by.binding('{selected_color:color}')).getText()).toMatch('red');\n           element.all(by.select('color')).first().click();\n           element.all(by.css('select[ng-model=\"color\"] option')).first().click();\n           expect(element(by.binding('{selected_color:color}')).getText()).toMatch('black');\n           element(by.css('.nullable select[ng-model=\"color\"]')).click();\n           element.all(by.css('.nullable select[ng-model=\"color\"] option')).first().click();\n           expect(element(by.binding('{selected_color:color}')).getText()).toMatch('null');\n         });\n      </doc:protractor>\n    </doc:example>\n */\n\nvar ngOptionsDirective = valueFn({ terminal: true });\n// jshint maxlen: false\nvar selectDirective = ['$compile', '$parse', function($compile,   $parse) {\n                         //000011111111110000000000022222222220000000000000000000003333333333000000000000004444444444444440000000005555555555555550000000666666666666666000000000000000777777777700000000000000000008888888888\n  var NG_OPTIONS_REGEXP = /^\\s*([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+group\\s+by\\s+([\\s\\S]+?))?\\s+for\\s+(?:([\\$\\w][\\$\\w]*)|(?:\\(\\s*([\\$\\w][\\$\\w]*)\\s*,\\s*([\\$\\w][\\$\\w]*)\\s*\\)))\\s+in\\s+([\\s\\S]+?)(?:\\s+track\\s+by\\s+([\\s\\S]+?))?$/,\n      nullModelCtrl = {$setViewValue: noop};\n// jshint maxlen: 100\n\n  return {\n    restrict: 'E',\n    require: ['select', '?ngModel'],\n    controller: ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {\n      var self = this,\n          optionsMap = {},\n          ngModelCtrl = nullModelCtrl,\n          nullOption,\n          unknownOption;\n\n\n      self.databound = $attrs.ngModel;\n\n\n      self.init = function(ngModelCtrl_, nullOption_, unknownOption_) {\n        ngModelCtrl = ngModelCtrl_;\n        nullOption = nullOption_;\n        unknownOption = unknownOption_;\n      };\n\n\n      self.addOption = function(value) {\n        assertNotHasOwnProperty(value, '\"option value\"');\n        optionsMap[value] = true;\n\n        if (ngModelCtrl.$viewValue == value) {\n          $element.val(value);\n          if (unknownOption.parent()) unknownOption.remove();\n        }\n      };\n\n\n      self.removeOption = function(value) {\n        if (this.hasOption(value)) {\n          delete optionsMap[value];\n          if (ngModelCtrl.$viewValue == value) {\n            this.renderUnknownOption(value);\n          }\n        }\n      };\n\n\n      self.renderUnknownOption = function(val) {\n        var unknownVal = '? ' + hashKey(val) + ' ?';\n        unknownOption.val(unknownVal);\n        $element.prepend(unknownOption);\n        $element.val(unknownVal);\n        unknownOption.prop('selected', true); // needed for IE\n      };\n\n\n      self.hasOption = function(value) {\n        return optionsMap.hasOwnProperty(value);\n      };\n\n      $scope.$on('$destroy', function() {\n        // disable unknown option so that we don't do work when the whole select is being destroyed\n        self.renderUnknownOption = noop;\n      });\n    }],\n\n    link: function(scope, element, attr, ctrls) {\n      // if ngModel is not defined, we don't need to do anything\n      if (!ctrls[1]) return;\n\n      var selectCtrl = ctrls[0],\n          ngModelCtrl = ctrls[1],\n          multiple = attr.multiple,\n          optionsExp = attr.ngOptions,\n          nullOption = false, // if false, user will not be able to select it (used by ngOptions)\n          emptyOption,\n          // we can't just jqLite('<option>') since jqLite is not smart enough\n          // to create it in <select> and IE barfs otherwise.\n          optionTemplate = jqLite(document.createElement('option')),\n          optGroupTemplate =jqLite(document.createElement('optgroup')),\n          unknownOption = optionTemplate.clone();\n\n      // find \"null\" option\n      for(var i = 0, children = element.children(), ii = children.length; i < ii; i++) {\n        if (children[i].value === '') {\n          emptyOption = nullOption = children.eq(i);\n          break;\n        }\n      }\n\n      selectCtrl.init(ngModelCtrl, nullOption, unknownOption);\n\n      // required validator\n      if (multiple) {\n        ngModelCtrl.$isEmpty = function(value) {\n          return !value || value.length === 0;\n        };\n      }\n\n      if (optionsExp) setupAsOptions(scope, element, ngModelCtrl);\n      else if (multiple) setupAsMultiple(scope, element, ngModelCtrl);\n      else setupAsSingle(scope, element, ngModelCtrl, selectCtrl);\n\n\n      ////////////////////////////\n\n\n\n      function setupAsSingle(scope, selectElement, ngModelCtrl, selectCtrl) {\n        ngModelCtrl.$render = function() {\n          var viewValue = ngModelCtrl.$viewValue;\n\n          if (selectCtrl.hasOption(viewValue)) {\n            if (unknownOption.parent()) unknownOption.remove();\n            selectElement.val(viewValue);\n            if (viewValue === '') emptyOption.prop('selected', true); // to make IE9 happy\n          } else {\n            if (isUndefined(viewValue) && emptyOption) {\n              selectElement.val('');\n            } else {\n              selectCtrl.renderUnknownOption(viewValue);\n            }\n          }\n        };\n\n        selectElement.on('change', function() {\n          scope.$apply(function() {\n            if (unknownOption.parent()) unknownOption.remove();\n            ngModelCtrl.$setViewValue(selectElement.val());\n          });\n        });\n      }\n\n      function setupAsMultiple(scope, selectElement, ctrl) {\n        var lastView;\n        ctrl.$render = function() {\n          var items = new HashMap(ctrl.$viewValue);\n          forEach(selectElement.find('option'), function(option) {\n            option.selected = isDefined(items.get(option.value));\n          });\n        };\n\n        // we have to do it on each watch since ngModel watches reference, but\n        // we need to work of an array, so we need to see if anything was inserted/removed\n        scope.$watch(function selectMultipleWatch() {\n          if (!equals(lastView, ctrl.$viewValue)) {\n            lastView = copy(ctrl.$viewValue);\n            ctrl.$render();\n          }\n        });\n\n        selectElement.on('change', function() {\n          scope.$apply(function() {\n            var array = [];\n            forEach(selectElement.find('option'), function(option) {\n              if (option.selected) {\n                array.push(option.value);\n              }\n            });\n            ctrl.$setViewValue(array);\n          });\n        });\n      }\n\n      function setupAsOptions(scope, selectElement, ctrl) {\n        var match;\n\n        if (! (match = optionsExp.match(NG_OPTIONS_REGEXP))) {\n          throw ngOptionsMinErr('iexp',\n            \"Expected expression in form of \" +\n            \"'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'\" +\n            \" but got '{0}'. Element: {1}\",\n            optionsExp, startingTag(selectElement));\n        }\n\n        var displayFn = $parse(match[2] || match[1]),\n            valueName = match[4] || match[6],\n            keyName = match[5],\n            groupByFn = $parse(match[3] || ''),\n            valueFn = $parse(match[2] ? match[1] : valueName),\n            valuesFn = $parse(match[7]),\n            track = match[8],\n            trackFn = track ? $parse(match[8]) : null,\n            // This is an array of array of existing option groups in DOM.\n            // We try to reuse these if possible\n            // - optionGroupsCache[0] is the options with no option group\n            // - optionGroupsCache[?][0] is the parent: either the SELECT or OPTGROUP element\n            optionGroupsCache = [[{element: selectElement, label:''}]];\n\n        if (nullOption) {\n          // compile the element since there might be bindings in it\n          $compile(nullOption)(scope);\n\n          // remove the class, which is added automatically because we recompile the element and it\n          // becomes the compilation root\n          nullOption.removeClass('ng-scope');\n\n          // we need to remove it before calling selectElement.empty() because otherwise IE will\n          // remove the label from the element. wtf?\n          nullOption.remove();\n        }\n\n        // clear contents, we'll add what's needed based on the model\n        selectElement.empty();\n\n        selectElement.on('change', function() {\n          scope.$apply(function() {\n            var optionGroup,\n                collection = valuesFn(scope) || [],\n                locals = {},\n                key, value, optionElement, index, groupIndex, length, groupLength, trackIndex;\n\n            if (multiple) {\n              value = [];\n              for (groupIndex = 0, groupLength = optionGroupsCache.length;\n                   groupIndex < groupLength;\n                   groupIndex++) {\n                // list of options for that group. (first item has the parent)\n                optionGroup = optionGroupsCache[groupIndex];\n\n                for(index = 1, length = optionGroup.length; index < length; index++) {\n                  if ((optionElement = optionGroup[index].element)[0].selected) {\n                    key = optionElement.val();\n                    if (keyName) locals[keyName] = key;\n                    if (trackFn) {\n                      for (trackIndex = 0; trackIndex < collection.length; trackIndex++) {\n                        locals[valueName] = collection[trackIndex];\n                        if (trackFn(scope, locals) == key) break;\n                      }\n                    } else {\n                      locals[valueName] = collection[key];\n                    }\n                    value.push(valueFn(scope, locals));\n                  }\n                }\n              }\n            } else {\n              key = selectElement.val();\n              if (key == '?') {\n                value = undefined;\n              } else if (key === ''){\n                value = null;\n              } else {\n                if (trackFn) {\n                  for (trackIndex = 0; trackIndex < collection.length; trackIndex++) {\n                    locals[valueName] = collection[trackIndex];\n                    if (trackFn(scope, locals) == key) {\n                      value = valueFn(scope, locals);\n                      break;\n                    }\n                  }\n                } else {\n                  locals[valueName] = collection[key];\n                  if (keyName) locals[keyName] = key;\n                  value = valueFn(scope, locals);\n                }\n              }\n            }\n            ctrl.$setViewValue(value);\n          });\n        });\n\n        ctrl.$render = render;\n\n        // TODO(vojta): can't we optimize this ?\n        scope.$watch(render);\n\n        function render() {\n              // Temporary location for the option groups before we render them\n          var optionGroups = {'':[]},\n              optionGroupNames = [''],\n              optionGroupName,\n              optionGroup,\n              option,\n              existingParent, existingOptions, existingOption,\n              modelValue = ctrl.$modelValue,\n              values = valuesFn(scope) || [],\n              keys = keyName ? sortedKeys(values) : values,\n              key,\n              groupLength, length,\n              groupIndex, index,\n              locals = {},\n              selected,\n              selectedSet = false, // nothing is selected yet\n              lastElement,\n              element,\n              label;\n\n          if (multiple) {\n            if (trackFn && isArray(modelValue)) {\n              selectedSet = new HashMap([]);\n              for (var trackIndex = 0; trackIndex < modelValue.length; trackIndex++) {\n                locals[valueName] = modelValue[trackIndex];\n                selectedSet.put(trackFn(scope, locals), modelValue[trackIndex]);\n              }\n            } else {\n              selectedSet = new HashMap(modelValue);\n            }\n          }\n\n          // We now build up the list of options we need (we merge later)\n          for (index = 0; length = keys.length, index < length; index++) {\n\n            key = index;\n            if (keyName) {\n              key = keys[index];\n              if ( key.charAt(0) === '$' ) continue;\n              locals[keyName] = key;\n            }\n\n            locals[valueName] = values[key];\n\n            optionGroupName = groupByFn(scope, locals) || '';\n            if (!(optionGroup = optionGroups[optionGroupName])) {\n              optionGroup = optionGroups[optionGroupName] = [];\n              optionGroupNames.push(optionGroupName);\n            }\n            if (multiple) {\n              selected = isDefined(\n                selectedSet.remove(trackFn ? trackFn(scope, locals) : valueFn(scope, locals))\n              );\n            } else {\n              if (trackFn) {\n                var modelCast = {};\n                modelCast[valueName] = modelValue;\n                selected = trackFn(scope, modelCast) === trackFn(scope, locals);\n              } else {\n                selected = modelValue === valueFn(scope, locals);\n              }\n              selectedSet = selectedSet || selected; // see if at least one item is selected\n            }\n            label = displayFn(scope, locals); // what will be seen by the user\n\n            // doing displayFn(scope, locals) || '' overwrites zero values\n            label = isDefined(label) ? label : '';\n            optionGroup.push({\n              // either the index into array or key from object\n              id: trackFn ? trackFn(scope, locals) : (keyName ? keys[index] : index),\n              label: label,\n              selected: selected                   // determine if we should be selected\n            });\n          }\n          if (!multiple) {\n            if (nullOption || modelValue === null) {\n              // insert null option if we have a placeholder, or the model is null\n              optionGroups[''].unshift({id:'', label:'', selected:!selectedSet});\n            } else if (!selectedSet) {\n              // option could not be found, we have to insert the undefined item\n              optionGroups[''].unshift({id:'?', label:'', selected:true});\n            }\n          }\n\n          // Now we need to update the list of DOM nodes to match the optionGroups we computed above\n          for (groupIndex = 0, groupLength = optionGroupNames.length;\n               groupIndex < groupLength;\n               groupIndex++) {\n            // current option group name or '' if no group\n            optionGroupName = optionGroupNames[groupIndex];\n\n            // list of options for that group. (first item has the parent)\n            optionGroup = optionGroups[optionGroupName];\n\n            if (optionGroupsCache.length <= groupIndex) {\n              // we need to grow the optionGroups\n              existingParent = {\n                element: optGroupTemplate.clone().attr('label', optionGroupName),\n                label: optionGroup.label\n              };\n              existingOptions = [existingParent];\n              optionGroupsCache.push(existingOptions);\n              selectElement.append(existingParent.element);\n            } else {\n              existingOptions = optionGroupsCache[groupIndex];\n              existingParent = existingOptions[0];  // either SELECT (no group) or OPTGROUP element\n\n              // update the OPTGROUP label if not the same.\n              if (existingParent.label != optionGroupName) {\n                existingParent.element.attr('label', existingParent.label = optionGroupName);\n              }\n            }\n\n            lastElement = null;  // start at the beginning\n            for(index = 0, length = optionGroup.length; index < length; index++) {\n              option = optionGroup[index];\n              if ((existingOption = existingOptions[index+1])) {\n                // reuse elements\n                lastElement = existingOption.element;\n                if (existingOption.label !== option.label) {\n                  lastElement.text(existingOption.label = option.label);\n                }\n                if (existingOption.id !== option.id) {\n                  lastElement.val(existingOption.id = option.id);\n                }\n                // lastElement.prop('selected') provided by jQuery has side-effects\n                if (lastElement[0].selected !== option.selected) {\n                  lastElement.prop('selected', (existingOption.selected = option.selected));\n                }\n              } else {\n                // grow elements\n\n                // if it's a null option\n                if (option.id === '' && nullOption) {\n                  // put back the pre-compiled element\n                  element = nullOption;\n                } else {\n                  // jQuery(v1.4.2) Bug: We should be able to chain the method calls, but\n                  // in this version of jQuery on some browser the .text() returns a string\n                  // rather then the element.\n                  (element = optionTemplate.clone())\n                      .val(option.id)\n                      .attr('selected', option.selected)\n                      .text(option.label);\n                }\n\n                existingOptions.push(existingOption = {\n                    element: element,\n                    label: option.label,\n                    id: option.id,\n                    selected: option.selected\n                });\n                if (lastElement) {\n                  lastElement.after(element);\n                } else {\n                  existingParent.element.append(element);\n                }\n                lastElement = element;\n              }\n            }\n            // remove any excessive OPTIONs in a group\n            index++; // increment since the existingOptions[0] is parent element not OPTION\n            while(existingOptions.length > index) {\n              existingOptions.pop().element.remove();\n            }\n          }\n          // remove any excessive OPTGROUPs from select\n          while(optionGroupsCache.length > groupIndex) {\n            optionGroupsCache.pop()[0].element.remove();\n          }\n        }\n      }\n    }\n  };\n}];\n\nvar optionDirective = ['$interpolate', function($interpolate) {\n  var nullSelectCtrl = {\n    addOption: noop,\n    removeOption: noop\n  };\n\n  return {\n    restrict: 'E',\n    priority: 100,\n    compile: function(element, attr) {\n      if (isUndefined(attr.value)) {\n        var interpolateFn = $interpolate(element.text(), true);\n        if (!interpolateFn) {\n          attr.$set('value', element.text());\n        }\n      }\n\n      return function (scope, element, attr) {\n        var selectCtrlName = '$selectController',\n            parent = element.parent(),\n            selectCtrl = parent.data(selectCtrlName) ||\n              parent.parent().data(selectCtrlName); // in case we are in optgroup\n\n        if (selectCtrl && selectCtrl.databound) {\n          // For some reason Opera defaults to true and if not overridden this messes up the repeater.\n          // We don't want the view to drive the initialization of the model anyway.\n          element.prop('selected', false);\n        } else {\n          selectCtrl = nullSelectCtrl;\n        }\n\n        if (interpolateFn) {\n          scope.$watch(interpolateFn, function interpolateWatchAction(newVal, oldVal) {\n            attr.$set('value', newVal);\n            if (newVal !== oldVal) selectCtrl.removeOption(oldVal);\n            selectCtrl.addOption(newVal);\n          });\n        } else {\n          selectCtrl.addOption(attr.value);\n        }\n\n        element.on('$destroy', function() {\n          selectCtrl.removeOption(attr.value);\n        });\n      };\n    }\n  };\n}];\n\nvar styleDirective = valueFn({\n  restrict: 'E',\n  terminal: true\n});\n\n  //try to bind to jquery now so that one can write angular.element().read()\n  //but we will rebind on bootstrap again.\n  bindJQuery();\n\n  publishExternalAPI(angular);\n\n  jqLite(document).ready(function() {\n    angularInit(document, bootstrap);\n  });\n\n})(window, document);\n\n!angular.$$csp() && angular.element(document).find('head').prepend('<style type=\"text/css\">@charset \"UTF-8\";[ng\\\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\\\:form{display:block;}</style>');"
  },
  {
    "path": "ionic1/official/maps/www/lib/ionic/js/angular-ui/angular-ui-router.js",
    "content": "/**\n * State-based routing for AngularJS\n * @version v0.2.7\n * @link http://angular-ui.github.com/\n * @license MIT License, http://www.opensource.org/licenses/MIT\n */\n\n/* commonjs package manager support (eg componentjs) */\nif (typeof module !== \"undefined\" && typeof exports !== \"undefined\" && module.exports === exports){\n  module.exports = 'ui.router';\n}\n\n(function (window, angular, undefined) {\n/*jshint globalstrict:true*/\n/*global angular:false*/\n'use strict';\n\nvar isDefined = angular.isDefined,\n    isFunction = angular.isFunction,\n    isString = angular.isString,\n    isObject = angular.isObject,\n    isArray = angular.isArray,\n    forEach = angular.forEach,\n    extend = angular.extend,\n    copy = angular.copy;\n\nfunction inherit(parent, extra) {\n  return extend(new (extend(function() {}, { prototype: parent }))(), extra);\n}\n\nfunction merge(dst) {\n  forEach(arguments, function(obj) {\n    if (obj !== dst) {\n      forEach(obj, function(value, key) {\n        if (!dst.hasOwnProperty(key)) dst[key] = value;\n      });\n    }\n  });\n  return dst;\n}\n\n/**\n * Finds the common ancestor path between two states.\n *\n * @param {Object} first The first state.\n * @param {Object} second The second state.\n * @return {Array} Returns an array of state names in descending order, not including the root.\n */\nfunction ancestors(first, second) {\n  var path = [];\n\n  for (var n in first.path) {\n    if (first.path[n] === \"\") continue;\n    if (!second.path[n]) break;\n    path.push(first.path[n]);\n  }\n  return path;\n}\n\n/**\n * IE8-safe wrapper for `Object.keys()`.\n *\n * @param {Object} object A JavaScript object.\n * @return {Array} Returns the keys of the object as an array.\n */\nfunction keys(object) {\n  if (Object.keys) {\n    return Object.keys(object);\n  }\n  var result = [];\n\n  angular.forEach(object, function(val, key) {\n    result.push(key);\n  });\n  return result;\n}\n\n/**\n * IE8-safe wrapper for `Array.prototype.indexOf()`.\n *\n * @param {Array} array A JavaScript array.\n * @param {*} value A value to search the array for.\n * @return {Number} Returns the array index value of `value`, or `-1` if not present.\n */\nfunction arraySearch(array, value) {\n  if (Array.prototype.indexOf) {\n    return array.indexOf(value, Number(arguments[2]) || 0);\n  }\n  var len = array.length >>> 0, from = Number(arguments[2]) || 0;\n  from = (from < 0) ? Math.ceil(from) : Math.floor(from);\n\n  if (from < 0) from += len;\n\n  for (; from < len; from++) {\n    if (from in array && array[from] === value) return from;\n  }\n  return -1;\n}\n\n/**\n * Merges a set of parameters with all parameters inherited between the common parents of the\n * current state and a given destination state.\n *\n * @param {Object} currentParams The value of the current state parameters ($stateParams).\n * @param {Object} newParams The set of parameters which will be composited with inherited params.\n * @param {Object} $current Internal definition of object representing the current state.\n * @param {Object} $to Internal definition of object representing state to transition to.\n */\nfunction inheritParams(currentParams, newParams, $current, $to) {\n  var parents = ancestors($current, $to), parentParams, inherited = {}, inheritList = [];\n\n  for (var i in parents) {\n    if (!parents[i].params || !parents[i].params.length) continue;\n    parentParams = parents[i].params;\n\n    for (var j in parentParams) {\n      if (arraySearch(inheritList, parentParams[j]) >= 0) continue;\n      inheritList.push(parentParams[j]);\n      inherited[parentParams[j]] = currentParams[parentParams[j]];\n    }\n  }\n  return extend({}, inherited, newParams);\n}\n\n/**\n * Normalizes a set of values to string or `null`, filtering them by a list of keys.\n *\n * @param {Array} keys The list of keys to normalize/return.\n * @param {Object} values An object hash of values to normalize.\n * @return {Object} Returns an object hash of normalized string values.\n */\nfunction normalize(keys, values) {\n  var normalized = {};\n\n  forEach(keys, function (name) {\n    var value = values[name];\n    normalized[name] = (value != null) ? String(value) : null;\n  });\n  return normalized;\n}\n\n/**\n * Performs a non-strict comparison of the subset of two objects, defined by a list of keys.\n *\n * @param {Object} a The first object.\n * @param {Object} b The second object.\n * @param {Array} keys The list of keys within each object to compare. If the list is empty or not specified,\n *                     it defaults to the list of keys in `a`.\n * @return {Boolean} Returns `true` if the keys match, otherwise `false`.\n */\nfunction equalForKeys(a, b, keys) {\n  if (!keys) {\n    keys = [];\n    for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility\n  }\n\n  for (var i=0; i<keys.length; i++) {\n    var k = keys[i];\n    if (a[k] != b[k]) return false; // Not '===', values aren't necessarily normalized\n  }\n  return true;\n}\n\n/**\n * Returns the subset of an object, based on a list of keys.\n *\n * @param {Array} keys\n * @param {Object} values\n * @return {Boolean} Returns a subset of `values`.\n */\nfunction filterByKeys(keys, values) {\n  var filtered = {};\n\n  forEach(keys, function (name) {\n    filtered[name] = values[name];\n  });\n  return filtered;\n}\n\nangular.module('ui.router.util', ['ng']);\nangular.module('ui.router.router', ['ui.router.util']);\nangular.module('ui.router.state', ['ui.router.router', 'ui.router.util']);\nangular.module('ui.router', ['ui.router.state']);\nangular.module('ui.router.compat', ['ui.router']);\n\n\n/**\n * Service (`ui-util`). Manages resolution of (acyclic) graphs of promises.\n * @module $resolve\n * @requires $q\n * @requires $injector\n */\n$Resolve.$inject = ['$q', '$injector'];\nfunction $Resolve(  $q,    $injector) {\n  \n  var VISIT_IN_PROGRESS = 1,\n      VISIT_DONE = 2,\n      NOTHING = {},\n      NO_DEPENDENCIES = [],\n      NO_LOCALS = NOTHING,\n      NO_PARENT = extend($q.when(NOTHING), { $$promises: NOTHING, $$values: NOTHING });\n  \n\n  /**\n   * Studies a set of invocables that are likely to be used multiple times.\n   *      $resolve.study(invocables)(locals, parent, self)\n   * is equivalent to\n   *      $resolve.resolve(invocables, locals, parent, self)\n   * but the former is more efficient (in fact `resolve` just calls `study` internally).\n   * See {@link module:$resolve/resolve} for details.\n   * @function\n   * @param {Object} invocables\n   * @return {Function}\n   */\n  this.study = function (invocables) {\n    if (!isObject(invocables)) throw new Error(\"'invocables' must be an object\");\n    \n    // Perform a topological sort of invocables to build an ordered plan\n    var plan = [], cycle = [], visited = {};\n    function visit(value, key) {\n      if (visited[key] === VISIT_DONE) return;\n      \n      cycle.push(key);\n      if (visited[key] === VISIT_IN_PROGRESS) {\n        cycle.splice(0, cycle.indexOf(key));\n        throw new Error(\"Cyclic dependency: \" + cycle.join(\" -> \"));\n      }\n      visited[key] = VISIT_IN_PROGRESS;\n      \n      if (isString(value)) {\n        plan.push(key, [ function() { return $injector.get(value); }], NO_DEPENDENCIES);\n      } else {\n        var params = $injector.annotate(value);\n        forEach(params, function (param) {\n          if (param !== key && invocables.hasOwnProperty(param)) visit(invocables[param], param);\n        });\n        plan.push(key, value, params);\n      }\n      \n      cycle.pop();\n      visited[key] = VISIT_DONE;\n    }\n    forEach(invocables, visit);\n    invocables = cycle = visited = null; // plan is all that's required\n    \n    function isResolve(value) {\n      return isObject(value) && value.then && value.$$promises;\n    }\n    \n    return function (locals, parent, self) {\n      if (isResolve(locals) && self === undefined) {\n        self = parent; parent = locals; locals = null;\n      }\n      if (!locals) locals = NO_LOCALS;\n      else if (!isObject(locals)) {\n        throw new Error(\"'locals' must be an object\");\n      }       \n      if (!parent) parent = NO_PARENT;\n      else if (!isResolve(parent)) {\n        throw new Error(\"'parent' must be a promise returned by $resolve.resolve()\");\n      }\n      \n      // To complete the overall resolution, we have to wait for the parent\n      // promise and for the promise for each invokable in our plan.\n      var resolution = $q.defer(),\n          result = resolution.promise,\n          promises = result.$$promises = {},\n          values = extend({}, locals),\n          wait = 1 + plan.length/3,\n          merged = false;\n          \n      function done() {\n        // Merge parent values we haven't got yet and publish our own $$values\n        if (!--wait) {\n          if (!merged) merge(values, parent.$$values); \n          result.$$values = values;\n          result.$$promises = true; // keep for isResolve()\n          resolution.resolve(values);\n        }\n      }\n      \n      function fail(reason) {\n        result.$$failure = reason;\n        resolution.reject(reason);\n      }\n      \n      // Short-circuit if parent has already failed\n      if (isDefined(parent.$$failure)) {\n        fail(parent.$$failure);\n        return result;\n      }\n      \n      // Merge parent values if the parent has already resolved, or merge\n      // parent promises and wait if the parent resolve is still in progress.\n      if (parent.$$values) {\n        merged = merge(values, parent.$$values);\n        done();\n      } else {\n        extend(promises, parent.$$promises);\n        parent.then(done, fail);\n      }\n      \n      // Process each invocable in the plan, but ignore any where a local of the same name exists.\n      for (var i=0, ii=plan.length; i<ii; i+=3) {\n        if (locals.hasOwnProperty(plan[i])) done();\n        else invoke(plan[i], plan[i+1], plan[i+2]);\n      }\n      \n      function invoke(key, invocable, params) {\n        // Create a deferred for this invocation. Failures will propagate to the resolution as well.\n        var invocation = $q.defer(), waitParams = 0;\n        function onfailure(reason) {\n          invocation.reject(reason);\n          fail(reason);\n        }\n        // Wait for any parameter that we have a promise for (either from parent or from this\n        // resolve; in that case study() will have made sure it's ordered before us in the plan).\n        forEach(params, function (dep) {\n          if (promises.hasOwnProperty(dep) && !locals.hasOwnProperty(dep)) {\n            waitParams++;\n            promises[dep].then(function (result) {\n              values[dep] = result;\n              if (!(--waitParams)) proceed();\n            }, onfailure);\n          }\n        });\n        if (!waitParams) proceed();\n        function proceed() {\n          if (isDefined(result.$$failure)) return;\n          try {\n            invocation.resolve($injector.invoke(invocable, self, values));\n            invocation.promise.then(function (result) {\n              values[key] = result;\n              done();\n            }, onfailure);\n          } catch (e) {\n            onfailure(e);\n          }\n        }\n        // Publish promise synchronously; invocations further down in the plan may depend on it.\n        promises[key] = invocation.promise;\n      }\n      \n      return result;\n    };\n  };\n  \n  /**\n   * Resolves a set of invocables. An invocable is a function to be invoked via `$injector.invoke()`,\n   * and can have an arbitrary number of dependencies. An invocable can either return a value directly,\n   * or a `$q` promise. If a promise is returned it will be resolved and the resulting value will be\n   * used instead. Dependencies of invocables are resolved (in this order of precedence)\n   *\n   * - from the specified `locals`\n   * - from another invocable that is part of this `$resolve` call\n   * - from an invocable that is inherited from a `parent` call to `$resolve` (or recursively\n   *   from any ancestor `$resolve` of that parent).\n   *\n   * The return value of `$resolve` is a promise for an object that contains (in this order of precedence)\n   *\n   * - any `locals` (if specified)\n   * - the resolved return values of all injectables\n   * - any values inherited from a `parent` call to `$resolve` (if specified)\n   *\n   * The promise will resolve after the `parent` promise (if any) and all promises returned by injectables\n   * have been resolved. If any invocable (or `$injector.invoke`) throws an exception, or if a promise\n   * returned by an invocable is rejected, the `$resolve` promise is immediately rejected with the same error.\n   * A rejection of a `parent` promise (if specified) will likewise be propagated immediately. Once the\n   * `$resolve` promise has been rejected, no further invocables will be called.\n   * \n   * Cyclic dependencies between invocables are not permitted and will caues `$resolve` to throw an\n   * error. As a special case, an injectable can depend on a parameter with the same name as the injectable,\n   * which will be fulfilled from the `parent` injectable of the same name. This allows inherited values\n   * to be decorated. Note that in this case any other injectable in the same `$resolve` with the same\n   * dependency would see the decorated value, not the inherited value.\n   *\n   * Note that missing dependencies -- unlike cyclic dependencies -- will cause an (asynchronous) rejection\n   * of the `$resolve` promise rather than a (synchronous) exception.\n   *\n   * Invocables are invoked eagerly as soon as all dependencies are available. This is true even for\n   * dependencies inherited from a `parent` call to `$resolve`.\n   *\n   * As a special case, an invocable can be a string, in which case it is taken to be a service name\n   * to be passed to `$injector.get()`. This is supported primarily for backwards-compatibility with the\n   * `resolve` property of `$routeProvider` routes.\n   *\n   * @function\n   * @param {Object.<string, Function|string>} invocables  functions to invoke or `$injector` services to fetch.\n   * @param {Object.<string, *>} [locals]  values to make available to the injectables\n   * @param {Promise.<Object>} [parent]  a promise returned by another call to `$resolve`.\n   * @param {Object} [self]  the `this` for the invoked methods\n   * @return {Promise.<Object>}  Promise for an object that contains the resolved return value\n   *    of all invocables, as well as any inherited and local values.\n   */\n  this.resolve = function (invocables, locals, parent, self) {\n    return this.study(invocables)(locals, parent, self);\n  };\n}\n\nangular.module('ui.router.util').service('$resolve', $Resolve);\n\n\n/**\n * Service. Manages loading of templates.\n * @constructor\n * @name $templateFactory\n * @requires $http\n * @requires $templateCache\n * @requires $injector\n */\n$TemplateFactory.$inject = ['$http', '$templateCache', '$injector'];\nfunction $TemplateFactory(  $http,   $templateCache,   $injector) {\n\n  /**\n   * Creates a template from a configuration object. \n   * @function\n   * @name $templateFactory#fromConfig\n   * @methodOf $templateFactory\n   * @param {Object} config  Configuration object for which to load a template. The following\n   *    properties are search in the specified order, and the first one that is defined is\n   *    used to create the template:\n   * @param {string|Function} config.template  html string template or function to load via\n   *    {@link $templateFactory#fromString fromString}.\n   * @param {string|Function} config.templateUrl  url to load or a function returning the url\n   *    to load via {@link $templateFactory#fromUrl fromUrl}.\n   * @param {Function} config.templateProvider  function to invoke via\n   *    {@link $templateFactory#fromProvider fromProvider}.\n   * @param {Object} params  Parameters to pass to the template function.\n   * @param {Object} [locals] Locals to pass to `invoke` if the template is loaded via a\n   *      `templateProvider`. Defaults to `{ params: params }`.\n   * @return {string|Promise.<string>}  The template html as a string, or a promise for that string,\n   *      or `null` if no template is configured.\n   */\n  this.fromConfig = function (config, params, locals) {\n    return (\n      isDefined(config.template) ? this.fromString(config.template, params) :\n      isDefined(config.templateUrl) ? this.fromUrl(config.templateUrl, params) :\n      isDefined(config.templateProvider) ? this.fromProvider(config.templateProvider, params, locals) :\n      null\n    );\n  };\n\n  /**\n   * Creates a template from a string or a function returning a string.\n   * @function\n   * @name $templateFactory#fromString\n   * @methodOf $templateFactory\n   * @param {string|Function} template  html template as a string or function that returns an html\n   *      template as a string.\n   * @param {Object} params  Parameters to pass to the template function.\n   * @return {string|Promise.<string>}  The template html as a string, or a promise for that string.\n   */\n  this.fromString = function (template, params) {\n    return isFunction(template) ? template(params) : template;\n  };\n\n  /**\n   * Loads a template from the a URL via `$http` and `$templateCache`.\n   * @function\n   * @name $templateFactory#fromUrl\n   * @methodOf $templateFactory\n   * @param {string|Function} url  url of the template to load, or a function that returns a url.\n   * @param {Object} params  Parameters to pass to the url function.\n   * @return {string|Promise.<string>}  The template html as a string, or a promise for that string.\n   */\n  this.fromUrl = function (url, params) {\n    if (isFunction(url)) url = url(params);\n    if (url == null) return null;\n    else return $http\n        .get(url, { cache: $templateCache })\n        .then(function(response) { return response.data; });\n  };\n\n  /**\n   * Creates a template by invoking an injectable provider function.\n   * @function\n   * @name $templateFactory#fromUrl\n   * @methodOf $templateFactory\n   * @param {Function} provider Function to invoke via `$injector.invoke`\n   * @param {Object} params Parameters for the template.\n   * @param {Object} [locals] Locals to pass to `invoke`. Defaults to `{ params: params }`.\n   * @return {string|Promise.<string>} The template html as a string, or a promise for that string.\n   */\n  this.fromProvider = function (provider, params, locals) {\n    return $injector.invoke(provider, null, locals || { params: params });\n  };\n}\n\nangular.module('ui.router.util').service('$templateFactory', $TemplateFactory);\n\n/**\n * Matches URLs against patterns and extracts named parameters from the path or the search\n * part of the URL. A URL pattern consists of a path pattern, optionally followed by '?' and a list\n * of search parameters. Multiple search parameter names are separated by '&'. Search parameters\n * do not influence whether or not a URL is matched, but their values are passed through into\n * the matched parameters returned by {@link UrlMatcher#exec exec}.\n * \n * Path parameter placeholders can be specified using simple colon/catch-all syntax or curly brace\n * syntax, which optionally allows a regular expression for the parameter to be specified:\n *\n * * ':' name - colon placeholder\n * * '*' name - catch-all placeholder\n * * '{' name '}' - curly placeholder\n * * '{' name ':' regexp '}' - curly placeholder with regexp. Should the regexp itself contain\n *   curly braces, they must be in matched pairs or escaped with a backslash.\n *\n * Parameter names may contain only word characters (latin letters, digits, and underscore) and\n * must be unique within the pattern (across both path and search parameters). For colon \n * placeholders or curly placeholders without an explicit regexp, a path parameter matches any\n * number of characters other than '/'. For catch-all placeholders the path parameter matches\n * any number of characters.\n * \n * ### Examples\n * \n * * '/hello/' - Matches only if the path is exactly '/hello/'. There is no special treatment for\n *   trailing slashes, and patterns have to match the entire path, not just a prefix.\n * * '/user/:id' - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or\n *   '/user/bob/details'. The second path segment will be captured as the parameter 'id'.\n * * '/user/{id}' - Same as the previous example, but using curly brace syntax.\n * * '/user/{id:[^/]*}' - Same as the previous example.\n * * '/user/{id:[0-9a-fA-F]{1,8}}' - Similar to the previous example, but only matches if the id\n *   parameter consists of 1 to 8 hex digits.\n * * '/files/{path:.*}' - Matches any URL starting with '/files/' and captures the rest of the\n *   path into the parameter 'path'.\n * * '/files/*path' - ditto.\n *\n * @constructor\n * @param {string} pattern  the pattern to compile into a matcher.\n *\n * @property {string} prefix  A static prefix of this pattern. The matcher guarantees that any\n *   URL matching this matcher (i.e. any string for which {@link UrlMatcher#exec exec()} returns\n *   non-null) will start with this prefix.\n */\nfunction UrlMatcher(pattern) {\n\n  // Find all placeholders and create a compiled pattern, using either classic or curly syntax:\n  //   '*' name\n  //   ':' name\n  //   '{' name '}'\n  //   '{' name ':' regexp '}'\n  // The regular expression is somewhat complicated due to the need to allow curly braces\n  // inside the regular expression. The placeholder regexp breaks down as follows:\n  //    ([:*])(\\w+)               classic placeholder ($1 / $2)\n  //    \\{(\\w+)(?:\\:( ... ))?\\}   curly brace placeholder ($3) with optional regexp ... ($4)\n  //    (?: ... | ... | ... )+    the regexp consists of any number of atoms, an atom being either\n  //    [^{}\\\\]+                  - anything other than curly braces or backslash\n  //    \\\\.                       - a backslash escape\n  //    \\{(?:[^{}\\\\]+|\\\\.)*\\}     - a matched set of curly braces containing other atoms\n  var placeholder = /([:*])(\\w+)|\\{(\\w+)(?:\\:((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n      names = {}, compiled = '^', last = 0, m,\n      segments = this.segments = [],\n      params = this.params = [];\n\n  function addParameter(id) {\n    if (!/^\\w+(-+\\w+)*$/.test(id)) throw new Error(\"Invalid parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n    if (names[id]) throw new Error(\"Duplicate parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n    names[id] = true;\n    params.push(id);\n  }\n\n  function quoteRegExp(string) {\n    return string.replace(/[\\\\\\[\\]\\^$*+?.()|{}]/g, \"\\\\$&\");\n  }\n\n  this.source = pattern;\n\n  // Split into static segments separated by path parameter placeholders.\n  // The number of segments is always 1 more than the number of parameters.\n  var id, regexp, segment;\n  while ((m = placeholder.exec(pattern))) {\n    id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n    regexp = m[4] || (m[1] == '*' ? '.*' : '[^/]*');\n    segment = pattern.substring(last, m.index);\n    if (segment.indexOf('?') >= 0) break; // we're into the search part\n    compiled += quoteRegExp(segment) + '(' + regexp + ')';\n    addParameter(id);\n    segments.push(segment);\n    last = placeholder.lastIndex;\n  }\n  segment = pattern.substring(last);\n\n  // Find any search parameter names and remove them from the last segment\n  var i = segment.indexOf('?');\n  if (i >= 0) {\n    var search = this.sourceSearch = segment.substring(i);\n    segment = segment.substring(0, i);\n    this.sourcePath = pattern.substring(0, last+i);\n\n    // Allow parameters to be separated by '?' as well as '&' to make concat() easier\n    forEach(search.substring(1).split(/[&?]/), addParameter);\n  } else {\n    this.sourcePath = pattern;\n    this.sourceSearch = '';\n  }\n\n  compiled += quoteRegExp(segment) + '$';\n  segments.push(segment);\n  this.regexp = new RegExp(compiled);\n  this.prefix = segments[0];\n}\n\n/**\n * Returns a new matcher for a pattern constructed by appending the path part and adding the\n * search parameters of the specified pattern to this pattern. The current pattern is not\n * modified. This can be understood as creating a pattern for URLs that are relative to (or\n * suffixes of) the current pattern.\n *\n * ### Example\n * The following two matchers are equivalent:\n * ```\n * new UrlMatcher('/user/{id}?q').concat('/details?date');\n * new UrlMatcher('/user/{id}/details?q&date');\n * ```\n *\n * @param {string} pattern  The pattern to append.\n * @return {UrlMatcher}  A matcher for the concatenated pattern.\n */\nUrlMatcher.prototype.concat = function (pattern) {\n  // Because order of search parameters is irrelevant, we can add our own search\n  // parameters to the end of the new pattern. Parse the new pattern by itself\n  // and then join the bits together, but it's much easier to do this on a string level.\n  return new UrlMatcher(this.sourcePath + pattern + this.sourceSearch);\n};\n\nUrlMatcher.prototype.toString = function () {\n  return this.source;\n};\n\n/**\n * Tests the specified path against this matcher, and returns an object containing the captured\n * parameter values, or null if the path does not match. The returned object contains the values\n * of any search parameters that are mentioned in the pattern, but their value may be null if\n * they are not present in `searchParams`. This means that search parameters are always treated\n * as optional.\n *\n * ### Example\n * ```\n * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', { x:'1', q:'hello' });\n * // returns { id:'bob', q:'hello', r:null }\n * ```\n *\n * @param {string} path  The URL path to match, e.g. `$location.path()`.\n * @param {Object} searchParams  URL search parameters, e.g. `$location.search()`.\n * @return {Object}  The captured parameter values.\n */\nUrlMatcher.prototype.exec = function (path, searchParams) {\n  var m = this.regexp.exec(path);\n  if (!m) return null;\n\n  var params = this.params, nTotal = params.length,\n    nPath = this.segments.length-1,\n    values = {}, i;\n\n  if (nPath !== m.length - 1) throw new Error(\"Unbalanced capture group in route '\" + this.source + \"'\");\n\n  for (i=0; i<nPath; i++) values[params[i]] = m[i+1];\n  for (/**/; i<nTotal; i++) values[params[i]] = searchParams[params[i]];\n\n  return values;\n};\n\n/**\n * Returns the names of all path and search parameters of this pattern in an unspecified order.\n * @return {Array.<string>}  An array of parameter names. Must be treated as read-only. If the\n *    pattern has no parameters, an empty array is returned.\n */\nUrlMatcher.prototype.parameters = function () {\n  return this.params;\n};\n\n/**\n * Creates a URL that matches this pattern by substituting the specified values\n * for the path and search parameters. Null values for path parameters are\n * treated as empty strings.\n *\n * ### Example\n * ```\n * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });\n * // returns '/user/bob?q=yes'\n * ```\n *\n * @param {Object} values  the values to substitute for the parameters in this pattern.\n * @return {string}  the formatted URL (path and optionally search part).\n */\nUrlMatcher.prototype.format = function (values) {\n  var segments = this.segments, params = this.params;\n  if (!values) return segments.join('');\n\n  var nPath = segments.length-1, nTotal = params.length,\n    result = segments[0], i, search, value;\n\n  for (i=0; i<nPath; i++) {\n    value = values[params[i]];\n    // TODO: Maybe we should throw on null here? It's not really good style to use '' and null interchangeabley\n    if (value != null) result += encodeURIComponent(value);\n    result += segments[i+1];\n  }\n  for (/**/; i<nTotal; i++) {\n    value = values[params[i]];\n    if (value != null) {\n      result += (search ? '&' : '?') + params[i] + '=' + encodeURIComponent(value);\n      search = true;\n    }\n  }\n\n  return result;\n};\n\n/**\n * Service. Factory for {@link UrlMatcher} instances. The factory is also available to providers\n * under the name `$urlMatcherFactoryProvider`.\n * @constructor\n * @name $urlMatcherFactory\n */\nfunction $UrlMatcherFactory() {\n  /**\n   * Creates a {@link UrlMatcher} for the specified pattern.\n   * @function\n   * @name $urlMatcherFactory#compile\n   * @methodOf $urlMatcherFactory\n   * @param {string} pattern  The URL pattern.\n   * @return {UrlMatcher}  The UrlMatcher.\n   */\n  this.compile = function (pattern) {\n    return new UrlMatcher(pattern);\n  };\n\n  /**\n   * Returns true if the specified object is a UrlMatcher, or false otherwise.\n   * @function\n   * @name $urlMatcherFactory#isMatcher\n   * @methodOf $urlMatcherFactory\n   * @param {Object} o\n   * @return {boolean}\n   */\n  this.isMatcher = function (o) {\n    return isObject(o) && isFunction(o.exec) && isFunction(o.format) && isFunction(o.concat);\n  };\n\n  this.$get = function () {\n    return this;\n  };\n}\n\n// Register as a provider so it's available to other providers\nangular.module('ui.router.util').provider('$urlMatcherFactory', $UrlMatcherFactory);\n\n\n$UrlRouterProvider.$inject = ['$urlMatcherFactoryProvider'];\nfunction $UrlRouterProvider(  $urlMatcherFactory) {\n  var rules = [], \n      otherwise = null;\n\n  // Returns a string that is a prefix of all strings matching the RegExp\n  function regExpPrefix(re) {\n    var prefix = /^\\^((?:\\\\[^a-zA-Z0-9]|[^\\\\\\[\\]\\^$*+?.()|{}]+)*)/.exec(re.source);\n    return (prefix != null) ? prefix[1].replace(/\\\\(.)/g, \"$1\") : '';\n  }\n\n  // Interpolates matched values into a String.replace()-style pattern\n  function interpolate(pattern, match) {\n    return pattern.replace(/\\$(\\$|\\d{1,2})/, function (m, what) {\n      return match[what === '$' ? 0 : Number(what)];\n    });\n  }\n\n  this.rule =\n    function (rule) {\n      if (!isFunction(rule)) throw new Error(\"'rule' must be a function\");\n      rules.push(rule);\n      return this;\n    };\n\n  this.otherwise =\n    function (rule) {\n      if (isString(rule)) {\n        var redirect = rule;\n        rule = function () { return redirect; };\n      }\n      else if (!isFunction(rule)) throw new Error(\"'rule' must be a function\");\n      otherwise = rule;\n      return this;\n    };\n\n\n  function handleIfMatch($injector, handler, match) {\n    if (!match) return false;\n    var result = $injector.invoke(handler, handler, { $match: match });\n    return isDefined(result) ? result : true;\n  }\n\n  this.when =\n    function (what, handler) {\n      var redirect, handlerIsString = isString(handler);\n      if (isString(what)) what = $urlMatcherFactory.compile(what);\n\n      if (!handlerIsString && !isFunction(handler) && !isArray(handler))\n        throw new Error(\"invalid 'handler' in when()\");\n\n      var strategies = {\n        matcher: function (what, handler) {\n          if (handlerIsString) {\n            redirect = $urlMatcherFactory.compile(handler);\n            handler = ['$match', function ($match) { return redirect.format($match); }];\n          }\n          return extend(function ($injector, $location) {\n            return handleIfMatch($injector, handler, what.exec($location.path(), $location.search()));\n          }, {\n            prefix: isString(what.prefix) ? what.prefix : ''\n          });\n        },\n        regex: function (what, handler) {\n          if (what.global || what.sticky) throw new Error(\"when() RegExp must not be global or sticky\");\n\n          if (handlerIsString) {\n            redirect = handler;\n            handler = ['$match', function ($match) { return interpolate(redirect, $match); }];\n          }\n          return extend(function ($injector, $location) {\n            return handleIfMatch($injector, handler, what.exec($location.path()));\n          }, {\n            prefix: regExpPrefix(what)\n          });\n        }\n      };\n\n      var check = { matcher: $urlMatcherFactory.isMatcher(what), regex: what instanceof RegExp };\n\n      for (var n in check) {\n        if (check[n]) {\n          return this.rule(strategies[n](what, handler));\n        }\n      }\n\n      throw new Error(\"invalid 'what' in when()\");\n    };\n\n  this.$get =\n    [        '$location', '$rootScope', '$injector',\n    function ($location,   $rootScope,   $injector) {\n      // TODO: Optimize groups of rules with non-empty prefix into some sort of decision tree\n      function update(evt) {\n        if (evt && evt.defaultPrevented) return;\n        function check(rule) {\n          var handled = rule($injector, $location);\n          if (handled) {\n            if (isString(handled)) $location.replace().url(handled);\n            return true;\n          }\n          return false;\n        }\n        var n=rules.length, i;\n        for (i=0; i<n; i++) {\n          if (check(rules[i])) return;\n        }\n        // always check otherwise last to allow dynamic updates to the set of rules\n        if (otherwise) check(otherwise);\n      }\n\n      $rootScope.$on('$locationChangeSuccess', update);\n\n      return {\n        sync: function () {\n          update();\n        }\n      };\n    }];\n}\n\nangular.module('ui.router.router').provider('$urlRouter', $UrlRouterProvider);\n\n$StateProvider.$inject = ['$urlRouterProvider', '$urlMatcherFactoryProvider', '$locationProvider'];\nfunction $StateProvider(   $urlRouterProvider,   $urlMatcherFactory,           $locationProvider) {\n\n  var root, states = {}, $state, queue = {}, abstractKey = 'abstract';\n\n  // Builds state properties from definition passed to registerState()\n  var stateBuilder = {\n\n    // Derive parent state from a hierarchical name only if 'parent' is not explicitly defined.\n    // state.children = [];\n    // if (parent) parent.children.push(state);\n    parent: function(state) {\n      if (isDefined(state.parent) && state.parent) return findState(state.parent);\n      // regex matches any valid composite state name\n      // would match \"contact.list\" but not \"contacts\"\n      var compositeName = /^(.+)\\.[^.]+$/.exec(state.name);\n      return compositeName ? findState(compositeName[1]) : root;\n    },\n\n    // inherit 'data' from parent and override by own values (if any)\n    data: function(state) {\n      if (state.parent && state.parent.data) {\n        state.data = state.self.data = extend({}, state.parent.data, state.data);\n      }\n      return state.data;\n    },\n\n    // Build a URLMatcher if necessary, either via a relative or absolute URL\n    url: function(state) {\n      var url = state.url;\n\n      if (isString(url)) {\n        if (url.charAt(0) == '^') {\n          return $urlMatcherFactory.compile(url.substring(1));\n        }\n        return (state.parent.navigable || root).url.concat(url);\n      }\n\n      if ($urlMatcherFactory.isMatcher(url) || url == null) {\n        return url;\n      }\n      throw new Error(\"Invalid url '\" + url + \"' in state '\" + state + \"'\");\n    },\n\n    // Keep track of the closest ancestor state that has a URL (i.e. is navigable)\n    navigable: function(state) {\n      return state.url ? state : (state.parent ? state.parent.navigable : null);\n    },\n\n    // Derive parameters for this state and ensure they're a super-set of parent's parameters\n    params: function(state) {\n      if (!state.params) {\n        return state.url ? state.url.parameters() : state.parent.params;\n      }\n      if (!isArray(state.params)) throw new Error(\"Invalid params in state '\" + state + \"'\");\n      if (state.url) throw new Error(\"Both params and url specicified in state '\" + state + \"'\");\n      return state.params;\n    },\n\n    // If there is no explicit multi-view configuration, make one up so we don't have\n    // to handle both cases in the view directive later. Note that having an explicit\n    // 'views' property will mean the default unnamed view properties are ignored. This\n    // is also a good time to resolve view names to absolute names, so everything is a\n    // straight lookup at link time.\n    views: function(state) {\n      var views = {};\n\n      forEach(isDefined(state.views) ? state.views : { '': state }, function (view, name) {\n        if (name.indexOf('@') < 0) name += '@' + state.parent.name;\n        views[name] = view;\n      });\n      return views;\n    },\n\n    ownParams: function(state) {\n      if (!state.parent) {\n        return state.params;\n      }\n      var paramNames = {}; forEach(state.params, function (p) { paramNames[p] = true; });\n\n      forEach(state.parent.params, function (p) {\n        if (!paramNames[p]) {\n          throw new Error(\"Missing required parameter '\" + p + \"' in state '\" + state.name + \"'\");\n        }\n        paramNames[p] = false;\n      });\n      var ownParams = [];\n\n      forEach(paramNames, function (own, p) {\n        if (own) ownParams.push(p);\n      });\n      return ownParams;\n    },\n\n    // Keep a full path from the root down to this state as this is needed for state activation.\n    path: function(state) {\n      return state.parent ? state.parent.path.concat(state) : []; // exclude root from path\n    },\n\n    // Speed up $state.contains() as it's used a lot\n    includes: function(state) {\n      var includes = state.parent ? extend({}, state.parent.includes) : {};\n      includes[state.name] = true;\n      return includes;\n    },\n\n    $delegates: {}\n  };\n\n  function isRelative(stateName) {\n    return stateName.indexOf(\".\") === 0 || stateName.indexOf(\"^\") === 0;\n  }\n\n  function findState(stateOrName, base) {\n    var isStr = isString(stateOrName),\n        name  = isStr ? stateOrName : stateOrName.name,\n        path  = isRelative(name);\n\n    if (path) {\n      if (!base) throw new Error(\"No reference point given for path '\"  + name + \"'\");\n      var rel = name.split(\".\"), i = 0, pathLength = rel.length, current = base;\n\n      for (; i < pathLength; i++) {\n        if (rel[i] === \"\" && i === 0) {\n          current = base;\n          continue;\n        }\n        if (rel[i] === \"^\") {\n          if (!current.parent) throw new Error(\"Path '\" + name + \"' not valid for state '\" + base.name + \"'\");\n          current = current.parent;\n          continue;\n        }\n        break;\n      }\n      rel = rel.slice(i).join(\".\");\n      name = current.name + (current.name && rel ? \".\" : \"\") + rel;\n    }\n    var state = states[name];\n\n    if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) {\n      return state;\n    }\n    return undefined;\n  }\n\n  function queueState(parentName, state) {\n    if (!queue[parentName]) {\n      queue[parentName] = [];\n    }\n    queue[parentName].push(state);\n  }\n\n  function registerState(state) {\n    // Wrap a new object around the state so we can store our private details easily.\n    state = inherit(state, {\n      self: state,\n      resolve: state.resolve || {},\n      toString: function() { return this.name; }\n    });\n\n    var name = state.name;\n    if (!isString(name) || name.indexOf('@') >= 0) throw new Error(\"State must have a valid name\");\n    if (states.hasOwnProperty(name)) throw new Error(\"State '\" + name + \"'' is already defined\");\n\n    // Get parent name\n    var parentName = (name.indexOf('.') !== -1) ? name.substring(0, name.lastIndexOf('.'))\n        : (isString(state.parent)) ? state.parent\n        : '';\n\n    // If parent is not registered yet, add state to queue and register later\n    if (parentName && !states[parentName]) {\n      return queueState(parentName, state.self);\n    }\n\n    for (var key in stateBuilder) {\n      if (isFunction(stateBuilder[key])) state[key] = stateBuilder[key](state, stateBuilder.$delegates[key]);\n    }\n    states[name] = state;\n\n    // Register the state in the global state list and with $urlRouter if necessary.\n    if (!state[abstractKey] && state.url) {\n      $urlRouterProvider.when(state.url, ['$match', '$stateParams', function ($match, $stateParams) {\n        if ($state.$current.navigable != state || !equalForKeys($match, $stateParams)) {\n          $state.transitionTo(state, $match, { location: false });\n        }\n      }]);\n    }\n\n    // Register any queued children\n    if (queue[name]) {\n      for (var i = 0; i < queue[name].length; i++) {\n        registerState(queue[name][i]);\n      }\n    }\n\n    return state;\n  }\n\n\n  // Implicit root state that is always active\n  root = registerState({\n    name: '',\n    url: '^',\n    views: null,\n    'abstract': true\n  });\n  root.navigable = null;\n\n\n  // .decorator()\n  // .decorator(name)\n  // .decorator(name, function)\n  this.decorator = decorator;\n  function decorator(name, func) {\n    /*jshint validthis: true */\n    if (isString(name) && !isDefined(func)) {\n      return stateBuilder[name];\n    }\n    if (!isFunction(func) || !isString(name)) {\n      return this;\n    }\n    if (stateBuilder[name] && !stateBuilder.$delegates[name]) {\n      stateBuilder.$delegates[name] = stateBuilder[name];\n    }\n    stateBuilder[name] = func;\n    return this;\n  }\n\n  // .state(state)\n  // .state(name, state)\n  this.state = state;\n  function state(name, definition) {\n    /*jshint validthis: true */\n    if (isObject(name)) definition = name;\n    else definition.name = name;\n    registerState(definition);\n    return this;\n  }\n\n  // $urlRouter is injected just to ensure it gets instantiated\n  this.$get = $get;\n  $get.$inject = ['$rootScope', '$q', '$view', '$injector', '$resolve', '$stateParams', '$location', '$urlRouter'];\n  function $get(   $rootScope,   $q,   $view,   $injector,   $resolve,   $stateParams,   $location,   $urlRouter) {\n\n    var TransitionSuperseded = $q.reject(new Error('transition superseded'));\n    var TransitionPrevented = $q.reject(new Error('transition prevented'));\n    var TransitionAborted = $q.reject(new Error('transition aborted'));\n    var TransitionFailed = $q.reject(new Error('transition failed'));\n    var currentLocation = $location.url();\n\n    function syncUrl() {\n      if ($location.url() !== currentLocation) {\n        $location.url(currentLocation);\n        $location.replace();\n      }\n    }\n\n    root.locals = { resolve: null, globals: { $stateParams: {} } };\n    $state = {\n      params: {},\n      current: root.self,\n      $current: root,\n      transition: null\n    };\n\n    $state.reload = function reload() {\n      $state.transitionTo($state.current, $stateParams, { reload: true, inherit: false, notify: false });\n    };\n\n    $state.go = function go(to, params, options) {\n      return this.transitionTo(to, params, extend({ inherit: true, relative: $state.$current }, options));\n    };\n\n    $state.transitionTo = function transitionTo(to, toParams, options) {\n      toParams = toParams || {};\n      options = extend({\n        location: true, inherit: false, relative: null, notify: true, reload: false, $retry: false\n      }, options || {});\n\n      var from = $state.$current, fromParams = $state.params, fromPath = from.path;\n      var evt, toState = findState(to, options.relative);\n\n      if (!isDefined(toState)) {\n        // Broadcast not found event and abort the transition if prevented\n        var redirect = { to: to, toParams: toParams, options: options };\n        evt = $rootScope.$broadcast('$stateNotFound', redirect, from.self, fromParams);\n        if (evt.defaultPrevented) {\n          syncUrl();\n          return TransitionAborted;\n        }\n\n        // Allow the handler to return a promise to defer state lookup retry\n        if (evt.retry) {\n          if (options.$retry) {\n            syncUrl();\n            return TransitionFailed;\n          }\n          var retryTransition = $state.transition = $q.when(evt.retry);\n          retryTransition.then(function() {\n            if (retryTransition !== $state.transition) return TransitionSuperseded;\n            redirect.options.$retry = true;\n            return $state.transitionTo(redirect.to, redirect.toParams, redirect.options);\n          }, function() {\n            return TransitionAborted;\n          });\n          syncUrl();\n          return retryTransition;\n        }\n\n        // Always retry once if the $stateNotFound was not prevented\n        // (handles either redirect changed or state lazy-definition)\n        to = redirect.to;\n        toParams = redirect.toParams;\n        options = redirect.options;\n        toState = findState(to, options.relative);\n        if (!isDefined(toState)) {\n          if (options.relative) throw new Error(\"Could not resolve '\" + to + \"' from state '\" + options.relative + \"'\");\n          throw new Error(\"No such state '\" + to + \"'\");\n        }\n      }\n      if (toState[abstractKey]) throw new Error(\"Cannot transition to abstract state '\" + to + \"'\");\n      if (options.inherit) toParams = inheritParams($stateParams, toParams || {}, $state.$current, toState);\n      to = toState;\n\n      var toPath = to.path;\n\n      // Starting from the root of the path, keep all levels that haven't changed\n      var keep, state, locals = root.locals, toLocals = [];\n      for (keep = 0, state = toPath[keep];\n           state && state === fromPath[keep] && equalForKeys(toParams, fromParams, state.ownParams) && !options.reload;\n           keep++, state = toPath[keep]) {\n        locals = toLocals[keep] = state.locals;\n      }\n\n      // If we're going to the same state and all locals are kept, we've got nothing to do.\n      // But clear 'transition', as we still want to cancel any other pending transitions.\n      // TODO: We may not want to bump 'transition' if we're called from a location change that we've initiated ourselves,\n      // because we might accidentally abort a legitimate transition initiated from code?\n      if (shouldTriggerReload(to, from, locals, options) ) {\n        if ( to.self.reloadOnSearch !== false )\n          syncUrl();\n        $state.transition = null;\n        return $q.when($state.current);\n      }\n\n      // Normalize/filter parameters before we pass them to event handlers etc.\n      toParams = normalize(to.params, toParams || {});\n\n      // Broadcast start event and cancel the transition if requested\n      if (options.notify) {\n        evt = $rootScope.$broadcast('$stateChangeStart', to.self, toParams, from.self, fromParams);\n        if (evt.defaultPrevented) {\n          syncUrl();\n          return TransitionPrevented;\n        }\n      }\n\n      // Resolve locals for the remaining states, but don't update any global state just\n      // yet -- if anything fails to resolve the current state needs to remain untouched.\n      // We also set up an inheritance chain for the locals here. This allows the view directive\n      // to quickly look up the correct definition for each view in the current state. Even\n      // though we create the locals object itself outside resolveState(), it is initially\n      // empty and gets filled asynchronously. We need to keep track of the promise for the\n      // (fully resolved) current locals, and pass this down the chain.\n      var resolved = $q.when(locals);\n      for (var l=keep; l<toPath.length; l++, state=toPath[l]) {\n        locals = toLocals[l] = inherit(locals);\n        resolved = resolveState(state, toParams, state===to, resolved, locals);\n      }\n\n      // Once everything is resolved, we are ready to perform the actual transition\n      // and return a promise for the new state. We also keep track of what the\n      // current promise is, so that we can detect overlapping transitions and\n      // keep only the outcome of the last transition.\n      var transition = $state.transition = resolved.then(function () {\n        var l, entering, exiting;\n\n        if ($state.transition !== transition) return TransitionSuperseded;\n\n        // Exit 'from' states not kept\n        for (l=fromPath.length-1; l>=keep; l--) {\n          exiting = fromPath[l];\n          if (exiting.self.onExit) {\n            $injector.invoke(exiting.self.onExit, exiting.self, exiting.locals.globals);\n          }\n          exiting.locals = null;\n        }\n\n        // Enter 'to' states not kept\n        for (l=keep; l<toPath.length; l++) {\n          entering = toPath[l];\n          entering.locals = toLocals[l];\n          if (entering.self.onEnter) {\n            $injector.invoke(entering.self.onEnter, entering.self, entering.locals.globals);\n          }\n        }\n\n        // Run it again, to catch any transitions in callbacks\n        if ($state.transition !== transition) return TransitionSuperseded;\n\n        // Update globals in $state\n        $state.$current = to;\n        $state.current = to.self;\n        $state.params = toParams;\n        copy($state.params, $stateParams);\n        $state.transition = null;\n\n        // Update $location\n        var toNav = to.navigable;\n        if (options.location && toNav) {\n          $location.url(toNav.url.format(toNav.locals.globals.$stateParams));\n\n          if (options.location === 'replace') {\n            $location.replace();\n          }\n        }\n\n        if (options.notify) {\n          $rootScope.$broadcast('$stateChangeSuccess', to.self, toParams, from.self, fromParams);\n        }\n        currentLocation = $location.url();\n\n        return $state.current;\n      }, function (error) {\n        if ($state.transition !== transition) return TransitionSuperseded;\n\n        $state.transition = null;\n        $rootScope.$broadcast('$stateChangeError', to.self, toParams, from.self, fromParams, error);\n        syncUrl();\n\n        return $q.reject(error);\n      });\n\n      return transition;\n    };\n\n    $state.is = function is(stateOrName, params) {\n      var state = findState(stateOrName);\n\n      if (!isDefined(state)) {\n        return undefined;\n      }\n\n      if ($state.$current !== state) {\n        return false;\n      }\n\n      return isDefined(params) ? angular.equals($stateParams, params) : true;\n    };\n\n    $state.includes = function includes(stateOrName, params) {\n      var state = findState(stateOrName);\n      if (!isDefined(state)) {\n        return undefined;\n      }\n\n      if (!isDefined($state.$current.includes[state.name])) {\n        return false;\n      }\n\n      var validParams = true;\n      angular.forEach(params, function(value, key) {\n        if (!isDefined($stateParams[key]) || $stateParams[key] !== value) {\n          validParams = false;\n        }\n      });\n      return validParams;\n    };\n\n    $state.href = function href(stateOrName, params, options) {\n      options = extend({ lossy: true, inherit: false, absolute: false, relative: $state.$current }, options || {});\n      var state = findState(stateOrName, options.relative);\n      if (!isDefined(state)) return null;\n\n      params = inheritParams($stateParams, params || {}, $state.$current, state);\n      var nav = (state && options.lossy) ? state.navigable : state;\n      var url = (nav && nav.url) ? nav.url.format(normalize(state.params, params || {})) : null;\n      if (!$locationProvider.html5Mode() && url) {\n        url = \"#\" + $locationProvider.hashPrefix() + url;\n      }\n      if (options.absolute && url) {\n        url = $location.protocol() + '://' + \n              $location.host() + \n              ($location.port() == 80 || $location.port() == 443 ? '' : ':' + $location.port()) + \n              (!$locationProvider.html5Mode() && url ? '/' : '') + \n              url;\n      }\n      return url;\n    };\n\n    $state.get = function (stateOrName, context) {\n      if (!isDefined(stateOrName)) {\n        var list = [];\n        forEach(states, function(state) { list.push(state.self); });\n        return list;\n      }\n      var state = findState(stateOrName, context);\n      return (state && state.self) ? state.self : null;\n    };\n\n    function resolveState(state, params, paramsAreFiltered, inherited, dst) {\n      // Make a restricted $stateParams with only the parameters that apply to this state if\n      // necessary. In addition to being available to the controller and onEnter/onExit callbacks,\n      // we also need $stateParams to be available for any $injector calls we make during the\n      // dependency resolution process.\n      var $stateParams = (paramsAreFiltered) ? params : filterByKeys(state.params, params);\n      var locals = { $stateParams: $stateParams };\n\n      // Resolve 'global' dependencies for the state, i.e. those not specific to a view.\n      // We're also including $stateParams in this; that way the parameters are restricted\n      // to the set that should be visible to the state, and are independent of when we update\n      // the global $state and $stateParams values.\n      dst.resolve = $resolve.resolve(state.resolve, locals, dst.resolve, state);\n      var promises = [ dst.resolve.then(function (globals) {\n        dst.globals = globals;\n      }) ];\n      if (inherited) promises.push(inherited);\n\n      // Resolve template and dependencies for all views.\n      forEach(state.views, function (view, name) {\n        var injectables = (view.resolve && view.resolve !== state.resolve ? view.resolve : {});\n        injectables.$template = [ function () {\n          return $view.load(name, { view: view, locals: locals, params: $stateParams, notify: false }) || '';\n        }];\n\n        promises.push($resolve.resolve(injectables, locals, dst.resolve, state).then(function (result) {\n          // References to the controller (only instantiated at link time)\n          if (isFunction(view.controllerProvider) || isArray(view.controllerProvider)) {\n            var injectLocals = angular.extend({}, injectables, locals);\n            result.$$controller = $injector.invoke(view.controllerProvider, null, injectLocals);\n          } else {\n            result.$$controller = view.controller;\n          }\n          // Provide access to the state itself for internal use\n          result.$$state = state;\n          dst[name] = result;\n        }));\n      });\n\n      // Wait for all the promises and then return the activation object\n      return $q.all(promises).then(function (values) {\n        return dst;\n      });\n    }\n\n    return $state;\n  }\n\n  function shouldTriggerReload(to, from, locals, options) {\n    if ( to === from && ((locals === from.locals && !options.reload) || (to.self.reloadOnSearch === false)) ) {\n      return true;\n    }\n  }\n}\n\nangular.module('ui.router.state')\n  .value('$stateParams', {})\n  .provider('$state', $StateProvider);\n\n\n$ViewProvider.$inject = [];\nfunction $ViewProvider() {\n\n  this.$get = $get;\n  $get.$inject = ['$rootScope', '$templateFactory'];\n  function $get(   $rootScope,   $templateFactory) {\n    return {\n      // $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... })\n      load: function load(name, options) {\n        var result, defaults = {\n          template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {}\n        };\n        options = extend(defaults, options);\n\n        if (options.view) {\n          result = $templateFactory.fromConfig(options.view, options.params, options.locals);\n        }\n        if (result && options.notify) {\n          $rootScope.$broadcast('$viewContentLoading', options);\n        }\n        return result;\n      }\n    };\n  }\n}\n\nangular.module('ui.router.state').provider('$view', $ViewProvider);\n\n\n$ViewDirective.$inject = ['$state', '$compile', '$controller', '$injector', '$anchorScroll'];\nfunction $ViewDirective(   $state,   $compile,   $controller,   $injector,   $anchorScroll) {\n  var $animator = $injector.has('$animator') ? $injector.get('$animator') : false;\n  var viewIsUpdating = false;\n\n  var directive = {\n    restrict: 'ECA',\n    terminal: true,\n    priority: 1000,\n    transclude: true,\n    compile: function (element, attr, transclude) {\n      return function(scope, element, attr) {\n        var viewScope, viewLocals,\n            name = attr[directive.name] || attr.name || '',\n            onloadExp = attr.onload || '',\n            animate = $animator && $animator(scope, attr),\n            initialView = transclude(scope);\n\n        // Returns a set of DOM manipulation functions based on whether animation\n        // should be performed\n        var renderer = function(doAnimate) {\n          return ({\n            \"true\": {\n              remove: function(element) { animate.leave(element.contents(), element); },\n              restore: function(compiled, element) { animate.enter(compiled, element); },\n              populate: function(template, element) {\n                var contents = angular.element('<div></div>').html(template).contents();\n                animate.enter(contents, element);\n                return contents;\n              }\n            },\n            \"false\": {\n              remove: function(element) { element.html(''); },\n              restore: function(compiled, element) { element.append(compiled); },\n              populate: function(template, element) {\n                element.html(template);\n                return element.contents();\n              }\n            }\n          })[doAnimate.toString()];\n        };\n\n        // Put back the compiled initial view\n        element.append(initialView);\n\n        // Find the details of the parent view directive (if any) and use it\n        // to derive our own qualified view name, then hang our own details\n        // off the DOM so child directives can find it.\n        var parent = element.parent().inheritedData('$uiView');\n        if (name.indexOf('@') < 0) name  = name + '@' + (parent ? parent.state.name : '');\n        var view = { name: name, state: null };\n        element.data('$uiView', view);\n\n        var eventHook = function() {\n          if (viewIsUpdating) return;\n          viewIsUpdating = true;\n\n          try { updateView(true); } catch (e) {\n            viewIsUpdating = false;\n            throw e;\n          }\n          viewIsUpdating = false;\n        };\n\n        scope.$on('$stateChangeSuccess', eventHook);\n        scope.$on('$viewContentLoading', eventHook);\n        updateView(false);\n\n        function updateView(doAnimate) {\n          var locals = $state.$current && $state.$current.locals[name];\n          if (locals === viewLocals) return; // nothing to do\n          var render = renderer(animate && doAnimate);\n\n          // Remove existing content\n          render.remove(element);\n\n          // Destroy previous view scope\n          if (viewScope) {\n            viewScope.$destroy();\n            viewScope = null;\n          }\n\n          if (!locals) {\n            viewLocals = null;\n            view.state = null;\n\n            // Restore the initial view\n            return render.restore(initialView, element);\n          }\n\n          viewLocals = locals;\n          view.state = locals.$$state;\n\n          var link = $compile(render.populate(locals.$template, element));\n          viewScope = scope.$new();\n\n          if (locals.$$controller) {\n            locals.$scope = viewScope;\n            var controller = $controller(locals.$$controller, locals);\n            element.children().data('$ngControllerController', controller);\n          }\n          link(viewScope);\n          viewScope.$emit('$viewContentLoaded');\n          if (onloadExp) viewScope.$eval(onloadExp);\n\n          // TODO: This seems strange, shouldn't $anchorScroll listen for $viewContentLoaded if necessary?\n          // $anchorScroll might listen on event...\n          $anchorScroll();\n        }\n      };\n    }\n  };\n  return directive;\n}\n\nangular.module('ui.router.state').directive('uiView', $ViewDirective);\n\nfunction parseStateRef(ref) {\n  var parsed = ref.replace(/\\n/g, \" \").match(/^([^(]+?)\\s*(\\((.*)\\))?$/);\n  if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n  return { state: parsed[1], paramExpr: parsed[3] || null };\n}\n\nfunction stateContext(el) {\n  var stateData = el.parent().inheritedData('$uiView');\n\n  if (stateData && stateData.state && stateData.state.name) {\n    return stateData.state;\n  }\n}\n\n$StateRefDirective.$inject = ['$state', '$timeout'];\nfunction $StateRefDirective($state, $timeout) {\n  return {\n    restrict: 'A',\n    require: '?^uiSrefActive',\n    link: function(scope, element, attrs, uiSrefActive) {\n      var ref = parseStateRef(attrs.uiSref);\n      var params = null, url = null, base = stateContext(element) || $state.$current;\n      var isForm = element[0].nodeName === \"FORM\";\n      var attr = isForm ? \"action\" : \"href\", nav = true;\n\n      var update = function(newVal) {\n        if (newVal) params = newVal;\n        if (!nav) return;\n\n        var newHref = $state.href(ref.state, params, { relative: base });\n\n        if (!newHref) {\n          nav = false;\n          return false;\n        }\n        element[0][attr] = newHref;\n        if (uiSrefActive) {\n          uiSrefActive.$$setStateInfo(ref.state, params);\n        }\n      };\n\n      if (ref.paramExpr) {\n        scope.$watch(ref.paramExpr, function(newVal, oldVal) {\n          if (newVal !== params) update(newVal);\n        }, true);\n        params = scope.$eval(ref.paramExpr);\n      }\n      update();\n\n      if (isForm) return;\n\n      element.bind(\"click\", function(e) {\n        var button = e.which || e.button;\n\n        if ((button === 0 || button == 1) && !e.ctrlKey && !e.metaKey && !e.shiftKey) {\n          // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n          $timeout(function() {\n            scope.$apply(function() {\n              $state.go(ref.state, params, { relative: base });\n            });\n          });\n          e.preventDefault();\n        }\n      });\n    }\n  };\n}\n\n$StateActiveDirective.$inject = ['$state', '$stateParams', '$interpolate'];\nfunction $StateActiveDirective($state, $stateParams, $interpolate) {\n  return {\n    restrict: \"A\",\n    controller: function($scope, $element, $attrs) {\n      var state, params, activeClass;\n\n      // There probably isn't much point in $observing this\n      activeClass = $interpolate($attrs.uiSrefActive || '', false)($scope);\n\n      // Allow uiSref to communicate with uiSrefActive\n      this.$$setStateInfo = function(newState, newParams) {\n        state = $state.get(newState, stateContext($element));\n        params = newParams;\n        update();\n      };\n\n      $scope.$on('$stateChangeSuccess', update);\n\n      // Update route state\n      function update() {\n        if ($state.$current.self === state && matchesParams()) {\n          $element.addClass(activeClass);\n        } else {\n          $element.removeClass(activeClass);\n        }\n      }\n\n      function matchesParams() {\n        return !params || equalForKeys(params, $stateParams);\n      }\n    }\n  };\n}\n\nangular.module('ui.router.state')\n  .directive('uiSref', $StateRefDirective)\n  .directive('uiSrefActive', $StateActiveDirective);\n\n$RouteProvider.$inject = ['$stateProvider', '$urlRouterProvider'];\nfunction $RouteProvider(  $stateProvider,    $urlRouterProvider) {\n\n  var routes = [];\n\n  onEnterRoute.$inject = ['$$state'];\n  function onEnterRoute(   $$state) {\n    /*jshint validthis: true */\n    this.locals = $$state.locals.globals;\n    this.params = this.locals.$stateParams;\n  }\n\n  function onExitRoute() {\n    /*jshint validthis: true */\n    this.locals = null;\n    this.params = null;\n  }\n\n  this.when = when;\n  function when(url, route) {\n    /*jshint validthis: true */\n    if (route.redirectTo != null) {\n      // Redirect, configure directly on $urlRouterProvider\n      var redirect = route.redirectTo, handler;\n      if (isString(redirect)) {\n        handler = redirect; // leave $urlRouterProvider to handle\n      } else if (isFunction(redirect)) {\n        // Adapt to $urlRouterProvider API\n        handler = function (params, $location) {\n          return redirect(params, $location.path(), $location.search());\n        };\n      } else {\n        throw new Error(\"Invalid 'redirectTo' in when()\");\n      }\n      $urlRouterProvider.when(url, handler);\n    } else {\n      // Regular route, configure as state\n      $stateProvider.state(inherit(route, {\n        parent: null,\n        name: 'route:' + encodeURIComponent(url),\n        url: url,\n        onEnter: onEnterRoute,\n        onExit: onExitRoute\n      }));\n    }\n    routes.push(route);\n    return this;\n  }\n\n  this.$get = $get;\n  $get.$inject = ['$state', '$rootScope', '$routeParams'];\n  function $get(   $state,   $rootScope,   $routeParams) {\n\n    var $route = {\n      routes: routes,\n      params: $routeParams,\n      current: undefined\n    };\n\n    function stateAsRoute(state) {\n      return (state.name !== '') ? state : undefined;\n    }\n\n    $rootScope.$on('$stateChangeStart', function (ev, to, toParams, from, fromParams) {\n      $rootScope.$broadcast('$routeChangeStart', stateAsRoute(to), stateAsRoute(from));\n    });\n\n    $rootScope.$on('$stateChangeSuccess', function (ev, to, toParams, from, fromParams) {\n      $route.current = stateAsRoute(to);\n      $rootScope.$broadcast('$routeChangeSuccess', stateAsRoute(to), stateAsRoute(from));\n      copy(toParams, $route.params);\n    });\n\n    $rootScope.$on('$stateChangeError', function (ev, to, toParams, from, fromParams, error) {\n      $rootScope.$broadcast('$routeChangeError', stateAsRoute(to), stateAsRoute(from), error);\n    });\n\n    return $route;\n  }\n}\n\nangular.module('ui.router.compat')\n  .provider('$route', $RouteProvider)\n  .directive('ngView', $ViewDirective);\n})(window, window.angular);\n"
  },
  {
    "path": "ionic1/official/maps/www/lib/ionic/js/ionic-angular.js",
    "content": "/*!\n * Copyright 2014 Drifty Co.\n * http://drifty.com/\n *\n * Ionic, v0.9.27\n * A powerful HTML5 mobile app framework.\n * http://ionicframework.com/\n *\n * By @maxlynch, @benjsperry, @adamdbradley <3\n *\n * Licensed under the MIT license. Please see LICENSE for more information.\n *\n */\n\n(function() {\n/**\n * Create a wrapping module to ease having to include too many\n * modules.\n */\n\n/**\n * @ngdoc module\n * @name ionic\n * @description\n * Ionic main module.\n */\n\nangular.module('ionic.service', [\n  'ionic.service.bind',\n  'ionic.service.platform',\n  'ionic.service.actionSheet',\n  'ionic.service.gesture',\n  'ionic.service.loading',\n  'ionic.service.modal',\n  'ionic.service.popup',\n  'ionic.service.templateLoad',\n  'ionic.service.view',\n  'ionic.decorator.location'\n]);\n\nangular.module('ionic.ui', [\n    'ionic.ui.checkbox',\n    'ionic.ui.content',\n    'ionic.ui.header',\n    'ionic.ui.list',\n    'ionic.ui.navBar',\n    'ionic.ui.popup',\n    'ionic.ui.radio',\n    'ionic.ui.scroll',\n    'ionic.ui.sideMenu',\n    'ionic.ui.slideBox',\n    'ionic.ui.tabs',\n    'ionic.ui.toggle',\n    'ionic.ui.touch',\n    'ionic.ui.viewState'\n]);\n\nangular.module('ionic', [\n    'ionic.service',\n    'ionic.ui',\n\n    // Angular deps\n    'ngAnimate',\n    'ngSanitize',\n    'ui.router'\n]);\n\n\nangular.element.prototype.addClass = function(cssClasses) {\n  var x, y, cssClass, el, splitClasses, existingClasses;\n  if (cssClasses && cssClasses != 'ng-scope' && cssClasses != 'ng-isolate-scope') {\n    for(x=0; x<this.length; x++) {\n      el = this[x];\n      if(el.setAttribute) {\n\n        if(cssClasses.indexOf(' ') < 0) {\n          el.classList.add(cssClasses);\n        } else {\n          existingClasses = (' ' + (el.getAttribute('class') || '') + ' ')\n            .replace(/[\\n\\t]/g, \" \");\n          splitClasses = cssClasses.split(' ');\n\n          for (y=0; y<splitClasses.length; y++) {\n            cssClass = splitClasses[y].trim();\n            if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {\n              existingClasses += cssClass + ' ';\n            }\n          }\n          el.setAttribute('class', existingClasses.trim());\n        }\n      }\n    }\n  }\n  return this;\n};\n\nangular.element.prototype.removeClass = function(cssClasses) {\n  var x, y, splitClasses, cssClass, el;\n  if (cssClasses) {\n    for(x=0; x<this.length; x++) {\n      el = this[x];\n      if(el.getAttribute) {\n        if(cssClasses.indexOf(' ') < 0) {\n          el.classList.remove(cssClasses);\n        } else {\n          splitClasses = cssClasses.split(' ');\n\n          for (y=0; y<splitClasses.length; y++) {\n            cssClass = splitClasses[y];\n            el.setAttribute('class', (\n                (\" \" + (el.getAttribute('class') || '') + \" \")\n                .replace(/[\\n\\t]/g, \" \")\n                .replace(\" \" + cssClass.trim() + \" \", \" \")).trim()\n            );\n          }\n        }\n      }\n    }\n  }\n  return this;\n};\n\n\nfunction delegateService(methodNames) {\n  return ['$log', function($log) {\n    var delegate = this;\n\n    var instances = this._instances = [];\n    this._registerInstance = function(instance, handle) {\n      handle || (handle = ionic.Utils.nextUid());\n\n      instance.$$delegateHandle = handle;\n      instances.push(instance);\n\n      return function deregister() {\n        var index = instances.indexOf(instance);\n        if (index !== -1) {\n          instances.splice(index, 1);\n        }\n      };\n    };\n\n    this.forHandle = function(handle) {\n      if (!handle) {\n        return delegate;\n      }\n      return new InstanceForHandle(handle);\n    };\n\n    /*\n     * Creates a new object that will have all the methodNames given,\n     * and call them on the given the controller instance matching given\n     * handle.\n     * The reason we don't just let forHandle return the controller instance\n     * itself is that the controller instance might not exist yet.\n     *\n     * We want people to be able to do\n     * `var instance = $ionicScrollDelegate.forHandle('foo')` on controller\n     * instantiation, but on controller instantiation a child directive\n     * may not have been compiled yet!\n     *\n     * So this is our way of solving this problem: we create an object\n     * that will only try to fetch the controller with given handle\n     * once the methods are actually called.\n     */\n    function InstanceForHandle(handle) {\n      this.handle = handle;\n    }\n    methodNames.forEach(function(methodName) {\n      InstanceForHandle.prototype[methodName] = function() {\n        var handle = this.handle;\n        var instancesToUse = instances.filter(function(instance) {\n          return instance.$$delegateHandle === handle;\n        });\n        if (!instancesToUse.length) {\n          return $log.warn(\n            'Delegate for handle \"'+this.handle+'\" could not find a',\n            'corresponding element with delegate-handle=\"'+this.handle+'\"!',\n            methodName, 'was not called!');\n        }\n        return callMethod(instancesToUse, methodName, arguments);\n      };\n      delegate[methodName] = function() {\n        return callMethod(instances, methodName, arguments);\n      };\n\n      function callMethod(instancesToUse, methodName, args) {\n        var finalResult;\n        var result;\n        instancesToUse.forEach(function(instance) {\n          result = instance[methodName].apply(instance, args);\n          if (!angular.isDefined(finalResult)) {\n            finalResult = result;\n          }\n        });\n        return finalResult;\n      }\n    });\n  }];\n}\n\nangular.module('ionic.service.actionSheet', ['ionic.service.templateLoad', 'ionic.service.platform', 'ionic.ui.actionSheet', 'ngAnimate'])\n\n/**\n * @ngdoc service\n * @name $ionicActionSheet\n * @module ionic\n * @description\n * The Action Sheet is a slide-up pane that lets the user choose from a set of options.\n * Dangerous options are highlighted in red and made obvious.\n *\n * There are easy ways to cancel out of the action sheet, such as tapping the backdrop or even\n * hitting escape on the keyboard for desktop testing.\n *\n * ![Action Sheet](http://ionicframework.com.s3.amazonaws.com/docs/controllers/actionSheet.gif)\n *\n * @usage\n * To trigger an Action Sheet in your code, use the $ionicActionSheet service in your angular controllers:\n *\n * ```js\n * angular.module('mySuperApp', ['ionic'])\n * .controller(function($scope, $ionicActionSheet) {\n *\n *  // Triggered on a button click, or some other target\n *  $scope.show = function() {\n *\n *    // Show the action sheet\n *    $ionicActionSheet.show({\n *      buttons: [\n *        { text: 'Share' },\n *        { text: 'Move' },\n *      ],\n *      destructiveText: 'Delete',\n *      titleText: 'Modify your album',\n *      cancelText: 'Cancel',\n *      buttonClicked: function(index) {\n *        return true;\n *      }\n *    });\n *\n *  };\n * });\n * ```\n *\n */\n.factory('$ionicActionSheet', ['$rootScope', '$document', '$compile', '$animate', '$timeout', '$ionicTemplateLoader', '$ionicPlatform',\nfunction($rootScope, $document, $compile, $animate, $timeout, $ionicTemplateLoader, $ionicPlatform) {\n\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicActionSheet#show\n     * @description\n     * Load and return a new action sheet.\n     *\n     * A new isolated scope will be created for the\n     * action sheet and the new element will be appended into the body.\n     *\n     * @param {object} opts The options for this ActionSheet. Properties:\n     *\n     *  - `[Object]` `buttons` Which buttons to show.  Each button is an object with a `text` field.\n     *  - `{string}` `titleText` The title to show on the action sheet.\n     *  - `{string=}` `cancelText` The text for a 'cancel' button on the action sheet.\n     *  - `{string=}` `destructiveText` The text for a 'danger' on the action sheet.\n     *  - `{function=}` `cancel` Called if the cancel button is pressed or the backdrop is tapped.\n     *  - `{function=}` `buttonClicked` Called when one of the non-destructive buttons is clicked,\n     *     with the index of the button that was clicked. Return true to close the action sheet,\n     *     or false to keep it opened.\n     *  - `{function=}` `destructiveButtonClicked` Called when the destructive button is clicked.\n     *     Return true to close the action sheet, or false to keep it opened.\n     */\n    show: function(opts) {\n      var scope = $rootScope.$new(true);\n\n      angular.extend(scope, opts);\n\n      // Compile the template\n      var element = $compile('<ion-action-sheet buttons=\"buttons\"></ion-action-sheet>')(scope);\n\n      // Grab the sheet element for animation\n      var sheetEl = angular.element(element[0].querySelector('.action-sheet-wrapper'));\n\n      var hideSheet = function(didCancel) {\n        sheetEl.removeClass('action-sheet-up');\n        if(didCancel) {\n          $timeout(function(){\n            opts.cancel();\n          }, 200);\n        }\n\n        $animate.removeClass(element, 'active', function() {\n          scope.$destroy();\n        });\n\n        $document[0].body.classList.remove('action-sheet-open');\n\n        scope.$deregisterBackButton && scope.$deregisterBackButton();\n      };\n\n      // Support Android back button to close\n      scope.$deregisterBackButton = $ionicPlatform.registerBackButtonAction(function(){\n        hideSheet();\n      }, 300);\n\n      scope.cancel = function() {\n        hideSheet(true);\n      };\n\n      scope.buttonClicked = function(index) {\n        // Check if the button click event returned true, which means\n        // we can close the action sheet\n        if((opts.buttonClicked && opts.buttonClicked(index)) === true) {\n          hideSheet(false);\n        }\n      };\n\n      scope.destructiveButtonClicked = function() {\n        // Check if the destructive button click event returned true, which means\n        // we can close the action sheet\n        if((opts.destructiveButtonClicked && opts.destructiveButtonClicked()) === true) {\n          hideSheet(false);\n        }\n      };\n\n      $document[0].body.appendChild(element[0]);\n\n      $document[0].body.classList.add('action-sheet-open');\n\n      var sheet = new ionic.views.ActionSheet({el: element[0] });\n      scope.sheet = sheet;\n\n      $animate.addClass(element, 'active');\n\n      $timeout(function(){\n        sheetEl.addClass('action-sheet-up');\n      }, 20);\n\n      return sheet;\n    }\n  };\n\n}]);\n\nangular.module('ionic.service.bind', [])\n/**\n * @private\n */\n.factory('$ionicBind', ['$parse', '$interpolate', function($parse, $interpolate) {\n  var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n  return function(scope, attrs, bindDefinition) {\n    angular.forEach(bindDefinition || {}, function (definition, scopeName) {\n      //Adapted from angular.js $compile\n      var match = definition.match(LOCAL_REGEXP) || [],\n        attrName = match[3] || scopeName,\n        mode = match[1], // @, =, or &\n        parentGet,\n        unwatch;\n\n      switch(mode) {\n        case '@':\n          if (!attrs[attrName]) {\n            return;\n          }\n          attrs.$observe(attrName, function(value) {\n            scope[scopeName] = value;\n          });\n          // we trigger an interpolation to ensure\n          // the value is there for use immediately\n          if (attrs[attrName]) {\n            scope[scopeName] = $interpolate(attrs[attrName])(scope);\n          }\n          break;\n\n        case '=':\n          if (!attrs[attrName]) {\n            return;\n          }\n          unwatch = scope.$watch(attrs[attrName], function(value) {\n            scope[scopeName] = value;\n          });\n          //Destroy parent scope watcher when this scope is destroyed\n          scope.$on('$destroy', unwatch);\n          break;\n\n        case '&':\n          /* jshint -W044 */\n          if (attrs[attrName] && attrs[attrName].match(RegExp(scopeName + '\\(.*?\\)'))) {\n            throw new Error('& expression binding \"' + scopeName + '\" looks like it will recursively call \"' +\n                          attrs[attrName] + '\" and cause a stack overflow! Please choose a different scopeName.');\n          }\n          parentGet = $parse(attrs[attrName]);\n          scope[scopeName] = function(locals) {\n            return parentGet(scope, locals);\n          };\n          break;\n      }\n    });\n  };\n}]);\n\nangular.module('ionic.service.gesture', [])\n\n/**\n * @ngdoc service\n * @name $ionicGesture\n * @module ionic\n * @description An angular service exposing ionic\n * {@link ionic.utility:ionic.EventController}'s gestures.\n */\n.factory('$ionicGesture', [function() {\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicGesture#on\n     * @description Add an event listener for a gesture on an element. See {@link ionic.utility:ionic.EventController#onGesture}.\n     * @param {string} eventType The gesture event to listen for.\n     * @param {function(e)} callback The function to call when the gesture\n     * happens.\n     * @param {element} $element The angular element to listen for the event on.\n     */\n    on: function(eventType, cb, $element) {\n      return window.ionic.onGesture(eventType, cb, $element[0]);\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicGesture#on\n     * @description Remove an event listener for a gesture on an element. See {@link ionic.utility:ionic.EventController#offGesture}.\n     * @param {string} eventType The gesture event to remove the listener for.\n     * @param {function(e)} callback The listener to remove.\n     * @param {element} $element The angular element that was listening for the event.\n     */\n    off: function(gesture, eventType, cb) {\n      return window.ionic.offGesture(gesture, eventType, cb);\n    }\n  };\n}]);\n\nangular.module('ionic.service.loading', ['ionic.ui.loading'])\n\n/**\n * @ngdoc service\n * @name $ionicLoading\n * @module ionic\n * @description\n * An overlay that can be used to indicate activity while blocking user\n * interaction.\n *\n * @usage\n * ```js\n * angular.module('LoadingApp', ['ionic'])\n * .controller('LoadingCtrl', function($scope, $ionicLoading) {\n *   $scope.show = function() {\n *     $scope.loading = $ionicLoading.show({\n *       content: 'Loading',\n *     });\n *   };\n *   $scope.hide = function(){\n *     $scope.loading.hide();\n *   };\n * });\n * ```\n */\n.factory('$ionicLoading', ['$rootScope', '$document', '$compile', function($rootScope, $document, $compile) {\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicLoading#show\n     * @param {object} opts The options for the indicator. Available properties:\n     *  - `{string=}` `content` The content of the indicator. Default: none.\n     *  - `{string=}` `animation` The animation of the indicator.\n     *    Default: 'fade-in'.\n     *  - `{boolean=}` `showBackdrop` Whether to show a backdrop. Default: true.\n     *  - `{number=}` `maxWidth` The maximum width of the indicator, in pixels.\n     *    Default: 200.\n     *  - `{number=}` `showDelay` How many milliseconds to delay showing the\n     *    indicator.  Default: 0.\n     * @returns {object} A shown loader with the following methods:\n     *  - `hide()` - Hides the loader.\n     *  - `show()` - Shows the loader.\n     *  - `setContent(string)` - Sets the html content of the loader.\n     */\n    show: function(opts) {\n      var defaults = {\n        content: '',\n        animation: 'fade-in',\n        showBackdrop: true,\n        maxWidth: 200,\n        showDelay: 0\n      };\n\n      opts = angular.extend(defaults, opts);\n\n      var scope = $rootScope.$new(true);\n      angular.extend(scope, opts);\n\n      // Make sure there is only one loading element on the page at one point in time\n      var existing = angular.element($document[0].querySelector('.loading-backdrop'));\n      if(existing.length) {\n        existing.remove();\n      }\n\n      // Compile the template\n      var element = $compile('<ion-loading>' + opts.content + '</ion-loading>')(scope);\n\n      $document[0].body.appendChild(element[0]);\n\n      var loading = new ionic.views.Loading({\n        el: element[0],\n        maxWidth: opts.maxWidth,\n        showDelay: opts.showDelay\n      });\n\n      loading.show();\n\n      scope.loading = loading;\n\n      return loading;\n    }\n  };\n}]);\n\nangular.module('ionic.service.modal', ['ionic.service.templateLoad', 'ionic.service.platform', 'ionic.ui.modal'])\n\n/**\n * @ngdoc service\n * @name $ionicModal\n * @module ionic\n * @controller ionicModal\n * @description\n * The Modal is a content pane that can go over the user's main view\n * temporarily.  Usually used for making a choice or editing an item.\n *\n * @usage\n * ```html\n * <script id=\"my-modal.html\" type=\"text/ng-template\">\n *   <div class=\"modal\">\n *     <ion-header-bar title=\"My Modal Title\"></ion-header-bar>\n *     <ion-content>\n *       Hello!\n *     </ion-content>\n *   </div>\n * </script>\n * ```\n * ```js\n * angular.module('testApp', ['ionic'])\n * .controller('MyController', function($scope, $ionicModal) {\n *   $ionicModal.fromTemplateUrl('modal.html', {\n *     scope: $scope,\n *     animation: 'slide-in-up'\n *   }).then(function(modal) {\n *     $scope.modal = modal;\n *   });\n *   $scope.openModal = function() {\n *     $scope.modal.show();\n *   };\n *   $scope.closeModal = function() {\n *     $scope.modal.hide();\n *   };\n *   //Cleanup the modal when we're done with it!\n *   $scope.$on('$destroy', function() {\n *     $scope.modal.remove();\n *   });\n * });\n * ```\n */\n.factory('$ionicModal', ['$rootScope', '$document', '$compile', '$timeout', '$ionicPlatform', '$ionicTemplateLoader',\n                function( $rootScope,   $document,   $compile,   $timeout,   $ionicPlatform,   $ionicTemplateLoader) {\n\n  /**\n   * @ngdoc controller\n   * @name ionicModal\n   * @module ionic\n   * @description\n   * Instantiated by the {@link ionic.service:$ionicModal} service.\n   *\n   * Hint: Be sure to call [remove()](#remove) when you are done with each modal\n   * to clean it up and avoid memory leaks.\n   */\n  var ModalView = ionic.views.Modal.inherit({\n    /**\n     * @ngdoc method\n     * @name ionicModal#initialize\n     * @description Creates a new modal controller instance.\n     * @param {object} options An options object with the following properties:\n     *  - `{object=}` `scope` The scope to be a child of.\n     *    Default: creates a child of $rootScope.\n     *  - `{string=}` `animation` The animation to show & hide with.\n     *    Default: 'slide-in-up'\n     *  - `{boolean=}` `focusFirstInput` Whether to autofocus the first input of\n     *    the modal when shown.  Default: false.\n     */\n    initialize: function(opts) {\n      ionic.views.Modal.prototype.initialize.call(this, opts);\n      this.animation = opts.animation || 'slide-in-up';\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#show\n     * @description Show this modal instance.\n     */\n    show: function() {\n      var self = this;\n      var modalEl = angular.element(self.modalEl);\n\n      self.el.classList.remove('hide');\n\n      $document[0].body.classList.add('modal-open');\n\n      self._isShown = true;\n\n      if(!self.el.parentElement) {\n        modalEl.addClass(self.animation);\n        $document[0].body.appendChild(self.el);\n      }\n\n      modalEl.addClass('ng-enter active')\n             .removeClass('ng-leave ng-leave-active');\n\n      $timeout(function(){\n        modalEl.addClass('ng-enter-active');\n        self.scope.$parent && self.scope.$parent.$broadcast('modal.shown');\n        self.el.classList.add('active');\n      }, 20);\n\n      self._deregisterBackButton = $ionicPlatform.registerBackButtonAction(function(){\n        self.hide();\n      }, 200);\n\n      ionic.views.Modal.prototype.show.call(self);\n\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#hide\n     * @description Hide this modal instance.\n     */\n    hide: function() {\n      var self = this;\n      self._isShown = false;\n      var modalEl = angular.element(self.modalEl);\n\n      self.el.classList.remove('active');\n      modalEl.addClass('ng-leave');\n\n      $timeout(function(){\n        modalEl.addClass('ng-leave-active')\n               .removeClass('ng-enter ng-enter-active active');\n      }, 20);\n\n      $timeout(function(){\n        $document[0].body.classList.remove('modal-open');\n        self.el.classList.add('hide');\n      }, 350);\n\n      ionic.views.Modal.prototype.hide.call(self);\n\n      self.scope.$parent && self.scope.$parent.$broadcast('modal.hidden');\n\n      self._deregisterBackButton && self._deregisterBackButton();\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#remove\n     * @description Remove this modal instance from the DOM and clean up.\n     */\n    remove: function() {\n      var self = this;\n      self.hide();\n      self.scope.$parent && self.scope.$parent.$broadcast('modal.removed');\n\n      $timeout(function(){\n        self.scope.$destroy();\n        self.el && self.el.parentElement && self.el.parentElement.removeChild(self.el);\n      }, 750);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#isShown\n     * @returns boolean Whether this modal is currently shown.\n     */\n    isShown: function() {\n      return !!this._isShown;\n    }\n  });\n\n  var createModal = function(templateString, options) {\n    // Create a new scope for the modal\n    var scope = options.scope && options.scope.$new() || $rootScope.$new(true);\n\n    // Compile the template\n    var element = $compile('<ion-modal>' + templateString + '</ion-modal>')(scope);\n\n    options.el = element[0];\n    options.modalEl = options.el.querySelector('.modal');\n    var modal = new ModalView(options);\n\n    modal.scope = scope;\n\n    // If this wasn't a defined scope, we can assign 'modal' to the isolated scope\n    // we created\n    if(!options.scope) {\n      scope.modal = modal;\n    }\n\n    return modal;\n  };\n\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicModal#fromTemplate\n     * @param {string} templateString The template string to use as the modal's\n     * content.\n     * @param {object} options Options to be passed {@link ionic.controller:ionicModal#initialize ionicModal#initialize} method.\n     * @returns {object} An instance of an {@link ionic.controller:ionicModal}\n     * controller.\n     */\n    fromTemplate: function(templateString, options) {\n      var modal = createModal(templateString, options || {});\n      return modal;\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicModal#fromTemplateUrl\n     * @param {string} templateUrl The url to load the template from.\n     * @param {object} options Options to be passed {@link ionic.controller:ionicModal#initialize ionicModal#initialize} method.\n     * options object.\n     * @returns {promise} A promise that will be resolved with an instance of\n     * an {@link ionic.controller:ionicModal} controller.\n     */\n    fromTemplateUrl: function(url, options, _) {\n      var cb;\n      //Deprecated: allow a callback as second parameter. Now we return a promise.\n      if (angular.isFunction(options)) {\n        cb = options;\n        options = _;\n      }\n      return $ionicTemplateLoader.load(url).then(function(templateString) {\n        var modal = createModal(templateString, options || {});\n        cb && cb(modal);\n        return modal;\n      });\n    }\n  };\n}]);\n\n(function(ionic) {'use strict';\n\nangular.module('ionic.service.platform', [])\n\n/**\n * @ngdoc service\n * @name $ionicPlatform\n * @module ionic\n * @description\n * An angular abstraction of {@link ionic.utility:ionic.Platform}.\n *\n * Used to detect the current platform, as well as do things like override the\n * Android back button in PhoneGap/Cordova.\n */\n.provider('$ionicPlatform', function() {\n\n  return {\n    $get: ['$q', '$rootScope', function($q, $rootScope) {\n      return {\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#onHardwareBackButton\n         * @description\n         * Some platforms have a hardware back button, so this is one way to\n         * bind to it.\n         * @param {function} callback the callback to trigger when this event occurs\n         */\n        onHardwareBackButton: function(cb) {\n          ionic.Platform.ready(function() {\n            document.addEventListener('backbutton', cb, false);\n          });\n        },\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#offHardwareBackButton\n         * @description\n         * Remove an event listener for the backbutton.\n         * @param {function} callback The listener function that was\n         * originally bound.\n         */\n        offHardwareBackButton: function(fn) {\n          ionic.Platform.ready(function() {\n            document.removeEventListener('backbutton', fn);\n          });\n        },\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#registerBackButtonAction\n         * @description\n         * Register a hardware back button action. Only one action will execute\n         * when the back button is clicked, so this method decides which of\n         * the registered back button actions has the highest priority.\n         *\n         * For example, if an actionsheet is showing, the back button should\n         * close the actionsheet, but it should not also go back a page view\n         * or close a modal which may be open.\n         *\n         * @param {function} callback Called when the back button is pressed,\n         * if this listener is the highest priority.\n         * @param {number} priority Only the highest priority will execute.\n         * @param {*=} actionId The id to assign this action. Default: a\n         * random unique id.\n         * @returns {function} A function that, when called, will deregister\n         * this backButtonAction.\n         */\n        registerBackButtonAction: function(fn, priority, actionId) {\n          var self = this;\n\n          if(!self._hasBackButtonHandler) {\n            // add a back button listener if one hasn't been setup yet\n            $rootScope.$backButtonActions = {};\n            self.onHardwareBackButton(self.hardwareBackButtonClick);\n            self._hasBackButtonHandler = true;\n          }\n\n          var action = {\n            id: (actionId ? actionId : ionic.Utils.nextUid()),\n            priority: (priority ? priority : 0),\n            fn: fn\n          };\n          $rootScope.$backButtonActions[action.id] = action;\n\n          // return a function to de-register this back button action\n          return function() {\n            delete $rootScope.$backButtonActions[action.id];\n          };\n        },\n\n        /**\n         * @private\n         */\n        hardwareBackButtonClick: function(e){\n          // loop through all the registered back button actions\n          // and only run the last one of the highest priority\n          var priorityAction, actionId;\n          for(actionId in $rootScope.$backButtonActions) {\n            if(!priorityAction || $rootScope.$backButtonActions[actionId].priority >= priorityAction.priority) {\n              priorityAction = $rootScope.$backButtonActions[actionId];\n            }\n          }\n          if(priorityAction) {\n            priorityAction.fn(e);\n            return priorityAction;\n          }\n        },\n\n        is: function(type) {\n          return ionic.Platform.is(type);\n        },\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#ready\n         * @description\n         * Trigger a callback once the device is ready,\n         * or immediately if the device is already ready.\n         * @param {function} callback The function to call.\n         */\n        ready: function(cb) {\n          var q = $q.defer();\n\n          ionic.Platform.ready(function(){\n            q.resolve();\n            cb();\n          });\n\n          return q.promise;\n        }\n      };\n    }]\n  };\n\n});\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\nangular.module('ionic.service.popup', ['ionic.service.templateLoad'])\n\n/**\n * @ngdoc service\n * @name $ionicPopup\n * @module ionic\n * @restrict E\n * @codepen zkmhJ\n * @description\n *\n * The Ionic Popup service makes it easy to programatically create and show popup\n * windows that require the user to respond in order to continue:\n *\n * The popup system has support for nicer versions of the built in `alert()` `prompt()` and `confirm()` functions\n * you are used to in the browser, but with more powerful support for customizing input types in the case of\n * prompt, or customizing the look of the window.\n *\n * But the true power of the Popup is when a built-in popup just won't cut it. Luckily, the popup window\n * has full support for arbitrary popup content, and a simple promise-based system for returning data\n * entered by the user.\n *\n * @usage\n * To trigger a Popup in your code, use the $ionicPopup service in your angular controllers:\n *\n * ```js\n * angular.module('mySuperApp', ['ionic'])\n * .controller(function($scope, $ionicPopup) {\n *\n *  // Triggered on a button click, or some other target\n    $scope.showPopup = function() {\n      $scope.data = {}\n\n      // An elaborate, custom popup\n      $ionicPopup.show({\n        templateUrl: 'popup-template.html',\n        title: 'Enter Wi-Fi Password',\n        subTitle: 'Please use normal things',\n        scope: $scope,\n        buttons: [\n          { text: 'Cancel', onTap: function(e) { return true; } },\n          {\n            text: '<b>Save</b>',\n            type: 'button-positive',\n            onTap: function(e) {\n              return $scope.data.wifi;\n            }\n          },\n        ]\n      }).then(function(res) {\n        console.log('Tapped!', res);\n      }, function(err) {\n        console.log('Err:', err);\n      }, function(popup) {\n        // If you need to access the popup directly, do it in the notify method\n        // This is also where you can programatically close the popup:\n        // popup.close();\n      });\n\n      // A confirm dialog\n      $scope.showConfirm = function() {\n        $ionicPopup.confirm({\n          title: 'Consume Ice Cream',\n          content: 'Are you sure you want to eat this ice cream?'\n        }).then(function(res) {\n          if(res) {\n            console.log('You are sure');\n          } else {\n            console.log('You are not sure');\n          }\n        });\n      };\n\n      // A prompt dialog\n      $scope.showPrompt = function() {\n        $ionicPopup.prompt({\n          title: 'ID Check',\n          content: 'What is your name?'\n        }).then(function(res) {\n          console.log('Your name is', res);\n        });\n      };\n\n      // A prompt with password input dialog\n      $scope.showPasswordPrompt = function() {\n        $ionicPopup.prompt({\n          title: 'Password Check',\n          content: 'Enter your secret password',\n          inputType: 'password',\n          inputPlaceholder: 'Your password'\n        }).then(function(res) {\n          console.log('Your password is', res);\n        });\n      };\n\n      // An alert dialog\n      $scope.showAlert = function() {\n        $ionicPopup.alert({\n          title: 'Don\\'t eat that!',\n          content: 'It might taste good'\n        }).then(function(res) {\n          console.log('Thank you for not eating my delicious ice cream cone');\n        });\n      };\n    };\n  });\n  ```\n\n\n */\n.factory('$ionicPopup', ['$rootScope', '$q', '$document', '$compile', '$timeout', '$ionicTemplateLoader',\n  function($rootScope, $q, $document, $compile, $timeout, $ionicTemplateLoader) {\n\n  // TODO: Make this configurable\n  var popupOptions = {\n    // How long to wait after a popup is already shown to show another one\n    stackPushDelay: 50\n  }\n\n  // Center the given popup\n  var positionPopup = function(popup) {\n    popup.el.style.marginLeft = (-popup.el.offsetWidth) / 2 + 'px';\n    popup.el.style.marginTop = (-popup.el.offsetHeight) / 2 + 'px';\n  };\n\n  // Hide the body of the given popup if it's empty\n  var hideBody = function(popup) {\n    var bodyEl = popup.el.querySelector('.popup-body');\n    if(bodyEl && bodyEl.innerHTML.trim() == '') {\n      bodyEl.style.display = 'none';\n    }\n  };\n\n  var focusLastButton = function(popup) {\n    var buttons, lastButton;\n    buttons = popup.el.querySelectorAll('button');\n    lastButton = buttons[buttons.length-1];\n    if(lastButton) {\n      lastButton.focus();\n    }\n  }\n\n  // Show a single popup\n  var showSinglePopup = function(popup, opts) {\n    var _this = this;\n\n    ionic.requestAnimationFrame(function() {\n      hideBody(popup);\n      positionPopup(popup);\n      popup.el.classList.remove('popup-hidden');\n      popup.el.classList.add('popup-showing');\n      popup.el.classList.add('active');\n\n      focusLastButton(popup);\n    });\n  };\n\n  // Show a popup that was already shown at one point in the past\n  var reshowSinglePopup = function(popup) {\n    ionic.requestAnimationFrame(function() {\n      popup.el.classList.remove('popup-hidden');\n      popup.el.classList.add('popup-showing');\n      popup.el.classList.add('active');\n      focusLastButton(popup);\n    });\n  };\n\n  // Hide a single popup\n  var hideSinglePopup = function(popup) {\n    ionic.requestAnimationFrame(function() {\n      popup.el.classList.remove('active');\n      popup.el.classList.add('popup-hidden');\n    });\n  };\n\n  // Remove a popup once and for all\n  var removeSinglePopup = function(popup) {\n    // Force a reflow so the animation will actually run\n    popup.el.offsetWidth;\n\n    popup.el.classList.remove('active');\n    popup.el.classList.add('popup-hidden');\n\n    $timeout(function() {\n      popup.el.remove();\n    }, 400);\n  };\n\n\n  /**\n   * Popup stack and directive\n   */\n\n  var popupStack = [];\n  var backdropEl = null;\n\n  // Show the backdrop element\n  var showBackdrop = function() {\n    var el = $compile('<ion-popup-backdrop></ion-popup-backdrop>')($rootScope.$new(true));\n    $document[0].body.appendChild(el[0]);\n    backdropEl = el;\n    $document[0].body.classList.add('popup-open');\n  };\n\n  // Remove the backdrop element\n  var removeBackdrop = function() {\n    backdropEl.remove();\n    $timeout(function(){\n      $document[0].body.classList.remove('popup-open');\n    }, 300);\n  };\n\n  // Push the new popup onto the stack with the given data and scope.\n  // If this is the first one in the stack, show the backdrop, otherwise don't.\n  var pushAndShow = function(popup, data) {\n    var lastPopup = popupStack[popupStack.length-1];\n\n    popupStack.push(popup);\n\n    // If this is the first popup, show the backdrop\n    if(popupStack.length == 1) {\n      showBackdrop();\n    }\n\n    // If we have an existing popup, add a delay between hiding and showing it\n    if(lastPopup) {\n      hideSinglePopup(lastPopup);\n      $timeout(function() {\n        showSinglePopup(popup);\n      }, popupOptions.stackPushDelay);\n    } else {\n      // Otherwise, immediately show it\n      showSinglePopup(popup);\n    }\n\n  };\n\n  // Pop the current popup off the stack. If there are other popups, show them\n  // otherwise hide the backdrop.\n  var popAndRemove = function(popup) {\n    var lastPopup = popupStack.pop();\n    var nextPopup = popupStack[popupStack.length-1];\n    removeSinglePopup(lastPopup);\n\n    if(nextPopup) {\n      reshowSinglePopup(nextPopup);\n    } else {\n      removeBackdrop();\n    }\n  };\n\n  // Append the element to the screen, create the popup view,\n  // and add the popup to the scope\n  var constructPopupOnScope = function(element, scope) {\n    var popup = {\n      el: element[0],\n      scope: scope,\n      close: function() {\n        popAndRemove(this);\n      }\n    };\n\n    scope.popup = popup;\n\n    return popup;\n  }\n\n  var buildPopupTemplate = function(opts, content) {\n    return '<ion-popup title=\"' + opts.title + '\" buttons=\"buttons\" on-button-tap=\"onButtonTap(button, event)\" on-close=\"onClose(button, result, event)\">'\n        + (content || '') +\n      '</ion-popup>';\n  };\n\n\n  // Given an options object, build a new popup window and return a promise\n  // which will contain the constructed popup at a later date. Perhaps at a later\n  // year even. At this point, it's hard to say.\n  var createPopup = function(opts, responseDeferred) {\n    var q = $q.defer();\n\n    // Create some defaults\n    var defaults = {\n      title: '',\n      animation: 'fade-in',\n    };\n\n    opts = angular.extend(defaults, opts);\n\n    // Create a new scope, and bind some of the options stuff to that scope\n    var scope = opts.scope && opts.scope.$new() || $rootScope.$new(true);\n    angular.extend(scope, opts);\n\n    scope.onClose = function(button, result, event) {\n      popAndRemove(scope.popup);\n      responseDeferred.resolve(result);\n    };\n\n    // Check if we need to load a template for the content of the popup\n    if(opts.templateUrl) {\n\n      // Load the template externally\n      $ionicTemplateLoader.load(opts.templateUrl).then(function(templateString) {\n\n        var popupTemplate = buildPopupTemplate(opts, templateString);\n        var element = $compile(popupTemplate)(scope);\n        $document[0].body.appendChild(element[0]);\n        q.resolve(constructPopupOnScope(element, scope));\n\n      }, function(err) {\n        // Error building the popup\n        q.reject(err);\n      });\n\n    } else {\n      // Compile the template\n      var popupTemplate = buildPopupTemplate(opts, opts.content);\n      var element = $compile(popupTemplate)(scope);\n      $document[0].body.appendChild(element[0]);\n      q.resolve(constructPopupOnScope(element, scope));\n    }\n\n    return q.promise;\n  };\n\n\n\n  // Public API\n  return {\n    /**\n     * @private\n     */\n    showPopup: function(data) {\n      var q = $q.defer();\n\n      createPopup(data, q).then(function(popup, scope) {\n\n        // Send the popup back\n        q.notify(popup);\n\n        // We constructed the popup, push it on the stack and show it\n        pushAndShow(popup, data);\n\n      }, function(err) {\n        console.error('Unable to load popup:', err);\n      });\n\n      return q.promise;\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicPopup#show\n     * @description show a complex popup. This is the master show function for all popups\n     * @param {data} object The options for showing a popup, of the form:\n     * @returns {Promise} an Angular promise which resolves when the user enters the correct data, and also\n     * sends the constructed popup in the notify function (for programatic closing, as shown in the example above).\n     * ```\n     * {\n     *   content: '', // String. The content of the popup\n     *   title: '', // String. The title of the popup\n     *   subTitle: '', // String (optional). The sub-title of the popup\n     *   templateUrl: '', // URL String (optional). The URL of a template to load as the content (instead of the `content` field)\n     *   scope: null, // Scope (optional). A scope to apply to the popup content (for using ng-model in a template, for example)\n     *   buttons:\n     *     [\n     *       {\n     *         text: 'Cancel',\n     *         type: 'button-default',\n     *         onTap: function(e) {\n     *           // e.preventDefault() is the only way to return a false value\n     *           e.preventDefault();\n     *         }\n     *       },\n     *       {\n     *         text: 'OK',\n     *         type: 'button-positive',\n     *         onTap: function(e) {\n     *           // When the user taps one of the buttons, you need to return the\n     *           // Data you want back to the popup service which will then resolve\n     *           // the promise waiting for a response.\n     *           //\n     *           // To return \"false\", call e.preventDefault();\n     *           return scope.data.response;\n     *         }\n     *       }\n     *     ]\n     *\n     * }\n     * ```\n    */\n    show: function(data) {\n      return this.showPopup(data);\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicPopup#alert\n     * @description show a simple popup with one button that the user has to tap\n     *\n     * Show a simple alert dialog\n     *\n     * ```javascript\n     *  $ionicPopup.alert({\n     *    title: 'Hey!',\n     *    content: 'Don\\'t do that!'\n     *  }).then(function(res) {\n     *    // Accepted\n     *  });\n     * ```\n     *\n     * @returns {Promise} that resolves when the alert is accepted\n     * @param {data} object The options for showing an alert, of the form:\n     *\n     * ```\n     * {\n     *   content: '', // String. The content of the popup\n     *   title: '', // String. The title of the popup\n     *   okText: '', // String. The text of the OK button\n     *   okType: '', // String (default: button-positive). The type of the OK button\n     * }\n     * ```\n    */\n    alert: function(opts) {\n      return this.showPopup({\n        content: opts.content || '',\n        title: opts.title || '',\n        buttons: [\n          {\n            text: opts.okText || 'OK',\n            type: opts.okType || 'button-positive',\n            onTap: function(e) {\n              return true;\n            }\n          }\n        ]\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicPopup#confirm\n     * @description\n     * Show a simple confirm popup with a cancel and accept button:\n     *\n     * ```javascript\n     *  $ionicPopup.confirm({\n     *    title: 'Consume Ice Cream',\n     *    content: 'Are you sure you want to eat this ice cream?'\n     *  }).then(function(res) {\n     *    if(res) {\n     *      console.log('You are sure');\n     *    } else {\n     *      console.log('You are not sure');\n     *    }\n     *  });\n     * ```\n     *\n     * @returns {Promise} that resolves with the chosen option\n     * @param {data} object The options for showing a confirm dialog, of the form:\n     *\n     * ```\n     * {\n     *   content: '', // String. The content of the popup\n     *   title: '', // String. The title of the popup\n     *   cancelText: '', // String. The text of the Cancel button\n     *   cancelType: '', // String (default: button-default). The type of the kCancel button\n     *   okText: '', // String. The text of the OK button\n     *   okType: '', // String (default: button-positive). The type of the OK button\n     * }\n     * ```\n    */\n    confirm: function(opts) {\n      return this.showPopup({\n        content: opts.content || '',\n        title: opts.title || '',\n        buttons: [\n          {\n            text: opts.cancelText || 'Cancel' ,\n            type: opts.cancelType || 'button-default',\n            onTap: function(e) { e.preventDefault(); }\n          },\n          {\n            text: opts.okText || 'OK',\n            type: opts.okType || 'button-positive',\n            onTap: function(e) {\n              return true;\n            }\n          }\n        ]\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicPopup#prompt\n     * @description show a simple prompt dialog.\n     *\n     * ```javascript\n     *  $ionicPopup.prompt({\n     *    title: 'Password Check',\n     *    content: 'Enter your secret password',\n     *    inputType: 'password',\n     *    inputPlaceholder: 'Your password'\n     *  }).then(function(res) {\n     *    console.log('Your password is', res);\n     *  });\n     * ```\n     *\n     * @returns {Promise} that resolves with the entered data\n     * @param {data} object The options for showing a prompt dialog, of the form:\n     *\n     * ```\n     * {\n     *   content: // String. The content of the popup\n     *   title: // String. The title of the popup\n     *   subTitle: // String. The sub title of the popup\n     *   inputType: // String (default: \"text\"). The type of input to use\n     *   inputPlaceholder: // String (default: \"\"). A placeholder to use for the input.\n     *   cancelText: // String. The text of the Cancel button\n     *   cancelType: // String (default: button-default). The type of the kCancel button\n     *   okText: // String. The text of the OK button\n     *   okType: // String (default: button-positive). The type of the OK button\n     * }\n     * ```\n    */\n    prompt: function(opts) {\n      var scope = $rootScope.$new(true);\n      scope.data = {};\n      return this.showPopup({\n        content: opts.content || '<input ng-model=\"data.response\" type=\"' + (opts.inputType || 'text') + '\" placeholder=\"' + (opts.inputPlaceholder || '') + '\">',\n        title: opts.title || '',\n        subTitle: opts.subTitle || '',\n        scope: scope,\n        buttons: [\n          {\n            text: opts.cancelText || 'Cancel',\n            type: opts.cancelType|| 'button-default',\n            onTap: function(e) { e.preventDefault(); }\n          },\n          {\n            text: opts.okText || 'OK',\n            type: opts.okType || 'button-positive',\n            onTap: function(e) {\n              return scope.data.response;\n            }\n          }\n        ]\n      });\n    }\n\n  };\n}]);\n\n})(ionic);\n\nangular.module('ionic.service.templateLoad', [])\n\n/**\n * @private\n */\n.factory('$ionicTemplateLoader', ['$q', '$http', '$templateCache', function($q, $http, $templateCache) {\n  return {\n    load: function(url) {\n      return $http.get(url, {cache: $templateCache})\n      .then(function(response) {\n        return response.data && response.data.trim();\n      });\n    }\n  };\n}]);\n\nangular.module('ionic.service.view', ['ui.router', 'ionic.service.platform'])\n\n\n/**\n * @private\n * TODO document\n */\n.run(['$rootScope', '$state', '$location', '$document', '$animate', '$ionicPlatform',\n  function( $rootScope,   $state,   $location,   $document,   $animate,   $ionicPlatform) {\n\n  // init the variables that keep track of the view history\n  $rootScope.$viewHistory = {\n    histories: { root: { historyId: 'root', parentHistoryId: null, stack: [], cursor: -1 } },\n    views: {},\n    backView: null,\n    forwardView: null,\n    currentView: null,\n    disabledRegistrableTagNames: []\n  };\n\n  $rootScope.$on('viewState.changeHistory', function(e, data) {\n    if(!data) return;\n\n    var hist = (data.historyId ? $rootScope.$viewHistory.histories[ data.historyId ] : null );\n    if(hist && hist.cursor > -1 && hist.cursor < hist.stack.length) {\n      // the history they're going to already exists\n      // go to it's last view in its stack\n      var view = hist.stack[ hist.cursor ];\n      return view.go(data);\n    }\n\n    // this history does not have a URL, but it does have a uiSref\n    // figure out its URL from the uiSref\n    if(!data.url && data.uiSref) {\n      data.url = $state.href(data.uiSref);\n    }\n\n    if(data.url) {\n      // don't let it start with a #, messes with $location.url()\n      if(data.url.indexOf('#') === 0) {\n        data.url = data.url.replace('#', '');\n      }\n      if(data.url !== $location.url()) {\n        // we've got a good URL, ready GO!\n        $location.url(data.url);\n      }\n    }\n  });\n\n  // Set the document title when a new view is shown\n  $rootScope.$on('viewState.viewEnter', function(e, data) {\n    if(data && data.title) {\n      $document[0].title = data.title;\n    }\n  });\n\n  // Triggered when devices with a hardware back button (Android) is clicked by the user\n  // This is a Cordova/Phonegap platform specifc method\n  function onHardwareBackButton(e) {\n    if($rootScope.$viewHistory.backView) {\n      // there is a back view, go to it\n      $rootScope.$viewHistory.backView.go();\n    } else {\n      // there is no back view, so close the app instead\n      ionic.Platform.exitApp();\n    }\n    e.preventDefault();\n    return false;\n  }\n  $ionicPlatform.registerBackButtonAction(onHardwareBackButton, 100);\n\n}])\n\n.factory('$ionicViewService', ['$rootScope', '$state', '$location', '$window', '$injector',\n                      function( $rootScope,   $state,   $location,   $window,   $injector) {\n  var $animate = $injector.has('$animate') ? $injector.get('$animate') : false;\n\n  var View = function(){};\n  View.prototype.initialize = function(data) {\n    if(data) {\n      for(var name in data) this[name] = data[name];\n      return this;\n    }\n    return null;\n  };\n  View.prototype.go = function() {\n\n    if(this.stateName) {\n      return $state.go(this.stateName, this.stateParams);\n    }\n\n    if(this.url && this.url !== $location.url()) {\n\n      if($rootScope.$viewHistory.backView === this) {\n        return $window.history.go(-1);\n      } else if($rootScope.$viewHistory.forwardView === this) {\n        return $window.history.go(1);\n      }\n\n      $location.url(this.url);\n      return;\n    }\n\n    return null;\n  };\n  View.prototype.destroy = function() {\n    if(this.scope) {\n      this.scope.$destroy && this.scope.$destroy();\n      this.scope = null;\n    }\n  };\n\n  function createViewId(stateId) {\n    return ionic.Utils.nextUid();\n  }\n\n  return {\n\n    register: function(containerScope, element) {\n\n      var viewHistory = $rootScope.$viewHistory,\n          currentStateId = this.getCurrentStateId(),\n          hist = this._getHistory(containerScope),\n          currentView = viewHistory.currentView,\n          backView = viewHistory.backView,\n          forwardView = viewHistory.forwardView,\n          nextViewOptions = this.nextViewOptions(),\n          rsp = {\n            viewId: null,\n            navAction: null,\n            navDirection: null,\n            historyId: hist.historyId\n          };\n\n      if(element && !this.isTagNameRegistrable(element)) {\n        // first check to see if this element can even be registered as a view.\n        // Certain tags are only containers for views, but are not views themselves.\n        // For example, the <ion-tabs> directive contains a <ion-tab> and the <ion-tab> is the\n        // view, but the <ion-tabs> directive itself should not be registered as a view.\n        rsp.navAction = 'disabledByTagName';\n        return rsp;\n      }\n\n      if(currentView &&\n         currentView.stateId === currentStateId &&\n         currentView.historyId === hist.historyId) {\n        // do nothing if its the same stateId in the same history\n        rsp.navAction = 'noChange';\n        return rsp;\n      }\n\n      if(viewHistory.forcedNav) {\n        // we've previously set exactly what to do\n        ionic.Utils.extend(rsp, viewHistory.forcedNav);\n        $rootScope.$viewHistory.forcedNav = null;\n\n      } else if(backView && backView.stateId === currentStateId) {\n        // they went back one, set the old current view as a forward view\n        rsp.viewId = backView.viewId;\n        rsp.navAction = 'moveBack';\n        rsp.viewId = backView.viewId;\n        if(backView.historyId === currentView.historyId) {\n          // went back in the same history\n          rsp.navDirection = 'back';\n        }\n\n      } else if(forwardView && forwardView.stateId === currentStateId) {\n        // they went to the forward one, set the forward view to no longer a forward view\n        rsp.viewId = forwardView.viewId;\n        rsp.navAction = 'moveForward';\n        if(forwardView.historyId === currentView.historyId) {\n          rsp.navDirection = 'forward';\n        }\n\n        var parentHistory = this._getParentHistoryObj(containerScope);\n        if(forwardView.historyId && parentHistory.scope) {\n          // if a history has already been created by the forward view then make sure it stays the same\n          parentHistory.scope.$historyId = forwardView.historyId;\n          rsp.historyId = forwardView.historyId;\n        }\n\n      } else if(currentView && currentView.historyId !== hist.historyId &&\n                hist.cursor > -1 && hist.stack.length > 0 && hist.cursor < hist.stack.length &&\n                hist.stack[hist.cursor].stateId === currentStateId) {\n        // they just changed to a different history and the history already has views in it\n        rsp.viewId = hist.stack[hist.cursor].viewId;\n        rsp.navAction = 'moveBack';\n\n      } else {\n\n        // set a new unique viewId\n        rsp.viewId = createViewId(currentStateId);\n\n        if(currentView) {\n          // set the forward view if there is a current view (ie: if its not the first view)\n          currentView.forwardViewId = rsp.viewId;\n\n          // its only moving forward if its in the same history\n          if(hist.historyId === currentView.historyId) {\n            rsp.navDirection = 'forward';\n          }\n          rsp.navAction = 'newView';\n\n          // check if there is a new forward view\n          if(forwardView && currentView.stateId !== forwardView.stateId) {\n            // they navigated to a new view but the stack already has a forward view\n            // since its a new view remove any forwards that existed\n            var forwardsHistory = this._getHistoryById(forwardView.historyId);\n            if(forwardsHistory) {\n              // the forward has a history\n              for(var x=forwardsHistory.stack.length - 1; x >= forwardView.index; x--) {\n                // starting from the end destroy all forwards in this history from this point\n                forwardsHistory.stack[x].destroy();\n                forwardsHistory.stack.splice(x);\n              }\n            }\n          }\n\n        } else {\n          // there's no current view, so this must be the initial view\n          rsp.navAction = 'initialView';\n        }\n\n        // add the new view\n        viewHistory.views[rsp.viewId] = this.createView({\n          viewId: rsp.viewId,\n          index: hist.stack.length,\n          historyId: hist.historyId,\n          backViewId: (currentView && currentView.viewId ? currentView.viewId : null),\n          forwardViewId: null,\n          stateId: currentStateId,\n          stateName: this.getCurrentStateName(),\n          stateParams: this.getCurrentStateParams(),\n          url: $location.url(),\n        });\n\n        if (rsp.navAction == 'moveBack') {\n          //moveBack(from, to);\n          $rootScope.$emit('$viewHistory.viewBack', currentView.viewId, rsp.viewId);\n        }\n\n        // add the new view to this history's stack\n        hist.stack.push(viewHistory.views[rsp.viewId]);\n      }\n\n      if(nextViewOptions) {\n        if(nextViewOptions.disableAnimate) rsp.navDirection = null;\n        if(nextViewOptions.disableBack) viewHistory.views[rsp.viewId].backViewId = null;\n        this.nextViewOptions(null);\n      }\n\n      this.setNavViews(rsp.viewId);\n\n      hist.cursor = viewHistory.currentView.index;\n\n      return rsp;\n    },\n\n    setNavViews: function(viewId) {\n      var viewHistory = $rootScope.$viewHistory;\n\n      viewHistory.currentView = this._getViewById(viewId);\n      viewHistory.backView = this._getBackView(viewHistory.currentView);\n      viewHistory.forwardView = this._getForwardView(viewHistory.currentView);\n\n      $rootScope.$broadcast('$viewHistory.historyChange', {\n        showBack: (viewHistory.backView && viewHistory.backView.historyId === viewHistory.currentView.historyId)\n      });\n    },\n\n    registerHistory: function(scope) {\n      scope.$historyId = ionic.Utils.nextUid();\n    },\n\n    createView: function(data) {\n      var newView = new View();\n      return newView.initialize(data);\n    },\n\n    getCurrentView: function() {\n      return $rootScope.$viewHistory.currentView;\n    },\n\n    getBackView: function() {\n      return $rootScope.$viewHistory.backView;\n    },\n\n    getForwardView: function() {\n      return $rootScope.$viewHistory.forwardView;\n    },\n\n    getNavDirection: function() {\n      return $rootScope.$viewHistory.navDirection;\n    },\n\n    getCurrentStateName: function() {\n      return ($state && $state.current ? $state.current.name : null);\n    },\n\n    isCurrentStateNavView: function(navView) {\n      return ($state &&\n              $state.current &&\n              $state.current.views &&\n              $state.current.views[navView] ? true : false);\n    },\n\n    getCurrentStateParams: function() {\n      var rtn;\n      if ($state && $state.params) {\n        for(var key in $state.params) {\n          if($state.params.hasOwnProperty(key)) {\n            rtn = rtn || {};\n            rtn[key] = $state.params[key];\n          }\n        }\n      }\n      return rtn;\n    },\n\n    getCurrentStateId: function() {\n      var id;\n      if($state && $state.current && $state.current.name) {\n        id = $state.current.name;\n        if($state.params) {\n          for(var key in $state.params) {\n            if($state.params.hasOwnProperty(key) && $state.params[key]) {\n              id += \"_\" + key + \"=\" + $state.params[key];\n            }\n          }\n        }\n        return id;\n      }\n      // if something goes wrong make sure its got a unique stateId\n      return ionic.Utils.nextUid();\n    },\n\n    goToHistoryRoot: function(historyId) {\n      if(historyId) {\n        var hist = $rootScope.$viewHistory.histories[ historyId ];\n        if(hist && hist.stack.length) {\n          if($rootScope.$viewHistory.currentView && $rootScope.$viewHistory.currentView.viewId === hist.stack[0].viewId) {\n            return;\n          }\n          $rootScope.$viewHistory.forcedNav = {\n            viewId: hist.stack[0].viewId,\n            navAction: 'moveBack',\n            navDirection: 'back'\n          };\n          hist.stack[0].go();\n        }\n      }\n    },\n\n    _getViewById: function(viewId) {\n      return (viewId ? $rootScope.$viewHistory.views[ viewId ] : null );\n    },\n\n    _getBackView: function(view) {\n      return (view ? this._getViewById(view.backViewId) : null );\n    },\n\n    _getForwardView: function(view) {\n      return (view ? this._getViewById(view.forwardViewId) : null );\n    },\n\n    _getHistoryById: function(historyId) {\n      return (historyId ? $rootScope.$viewHistory.histories[ historyId ] : null );\n    },\n\n    _getHistory: function(scope) {\n      var histObj = this._getParentHistoryObj(scope);\n\n      if( !$rootScope.$viewHistory.histories[ histObj.historyId ] ) {\n        // this history object exists in parent scope, but doesn't\n        // exist in the history data yet\n        $rootScope.$viewHistory.histories[ histObj.historyId ] = {\n          historyId: histObj.historyId,\n          parentHistoryId: this._getParentHistoryObj(histObj.scope.$parent).historyId,\n          stack: [],\n          cursor: -1\n        };\n      }\n\n      return $rootScope.$viewHistory.histories[ histObj.historyId ];\n    },\n\n    _getParentHistoryObj: function(scope) {\n      var parentScope = scope;\n      while(parentScope) {\n        if(parentScope.hasOwnProperty('$historyId')) {\n          // this parent scope has a historyId\n          return { historyId: parentScope.$historyId, scope: parentScope };\n        }\n        // nothing found keep climbing up\n        parentScope = parentScope.$parent;\n      }\n      // no history for for the parent, use the root\n      return { historyId: 'root', scope: $rootScope };\n    },\n\n    nextViewOptions: function(opts) {\n      if(arguments.length) {\n        this._nextOpts = opts;\n      } else {\n        return this._nextOpts;\n      }\n    },\n\n    getRenderer: function(navViewElement, navViewAttrs, navViewScope) {\n      var service = this;\n      var registerData;\n      var doAnimation;\n\n      // climb up the DOM and see which animation classname to use, if any\n      var animationClass = angular.isDefined(navViewScope.$nextAnimation) ?\n        navViewScope.$nextAnimation :\n        getParentAnimationClass(navViewElement[0]);\n\n      navViewScope.$nextAnimation = undefined;\n\n      function getParentAnimationClass(el) {\n        var className = '';\n        while(!className && el) {\n          className = el.getAttribute('animation');\n          el = el.parentElement;\n        }\n        return className;\n      }\n\n      function setAnimationClass() {\n        // add the animation CSS class we're gonna use to transition between views\n        if (animationClass) {\n          navViewElement[0].classList.add(animationClass);\n        }\n\n        if(registerData.navDirection === 'back') {\n          // animate like we're moving backward\n          navViewElement[0].classList.add('reverse');\n        } else {\n          // defaults to animate forward\n          // make sure the reverse class isn't already added\n          navViewElement[0].classList.remove('reverse');\n        }\n      }\n\n      return function(shouldAnimate) {\n\n        return {\n\n          enter: function(element) {\n\n            if(doAnimation && shouldAnimate) {\n              // enter with an animation\n              setAnimationClass();\n\n              element.addClass('ng-enter');\n              document.body.classList.add('disable-pointer-events');\n\n              $animate.enter(element, navViewElement, null, function() {\n                document.body.classList.remove('disable-pointer-events');\n                if (animationClass) {\n                  navViewElement[0].classList.remove(animationClass);\n                }\n              });\n              return;\n            }\n\n            // no animation\n            navViewElement.append(element);\n          },\n\n          leave: function() {\n            var element = navViewElement.contents();\n\n            if(doAnimation && shouldAnimate) {\n              // leave with an animation\n              setAnimationClass();\n\n              $animate.leave(element, function() {\n                element.remove();\n              });\n              return;\n            }\n\n            // no animation\n            element.remove();\n          },\n\n          register: function(element) {\n            // register a new view\n            registerData = service.register(navViewScope, element);\n            doAnimation = (animationClass !== null && registerData.navDirection !== null);\n            return registerData;\n          }\n\n        };\n      };\n    },\n\n    disableRegisterByTagName: function(tagName) {\n      // not every element should animate betwee transitions\n      // For example, the <ion-tabs> directive should not animate when it enters,\n      // but instead the <ion-tabs> directve would just show, and its children\n      // <ion-tab> directives would do the animating, but <ion-tabs> itself is not a view\n      $rootScope.$viewHistory.disabledRegistrableTagNames.push(tagName.toUpperCase());\n    },\n\n    isTagNameRegistrable: function(element) {\n      // check if this element has a tagName (at its root, not recursively)\n      // that shouldn't be animated, like <ion-tabs> or <ion-side-menu>\n      var x, y, disabledTags = $rootScope.$viewHistory.disabledRegistrableTagNames;\n      for(x=0; x<element.length; x++) {\n        if(element[x].nodeType !== 1) continue;\n        for(y=0; y<disabledTags.length; y++) {\n          if(element[x].tagName === disabledTags[y]) {\n            return false;\n          }\n        }\n      }\n      return true;\n    },\n\n    clearHistory: function() {\n      var\n      histories = $rootScope.$viewHistory.histories,\n      currentView = $rootScope.$viewHistory.currentView;\n\n      for(var historyId in histories) {\n\n        if(histories[historyId].stack) {\n          histories[historyId].stack = [];\n          histories[historyId].cursor = -1;\n        }\n\n        if(currentView.historyId === historyId) {\n          currentView.backViewId = null;\n          currentView.forwardViewId = null;\n          histories[historyId].stack.push(currentView);\n        } else if(histories[historyId].destroy) {\n          histories[historyId].destroy();\n        }\n\n      }\n\n      for(var viewId in $rootScope.$viewHistory.views) {\n        if(viewId !== currentView.viewId) {\n          delete $rootScope.$viewHistory.views[viewId];\n        }\n      }\n\n      this.setNavViews(currentView.viewId);\n    }\n\n  };\n\n}]);\n\nangular.module('ionic.decorator.location', [])\n\n/**\n * @private\n */\n.config(['$provide', function($provide) {\n  function $LocationDecorator($location, $timeout) {\n\n    $location.__hash = $location.hash;\n    //Fix: when window.location.hash is set, the scrollable area\n    //found nearest to body's scrollTop is set to scroll to an element\n    //with that ID.\n    $location.hash = function(value) {\n      if (angular.isDefined(value)) {\n        $timeout(function() {\n          var scroll = document.querySelector('.scroll-content');\n          if (scroll)\n            scroll.scrollTop = 0;\n        }, 0, false);\n      }\n      return $location.__hash(value);\n    };\n\n    return $location;\n  }\n  \n  $provide.decorator('$location', ['$delegate', '$timeout', $LocationDecorator]);\n}]);\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.actionSheet', [])\n\n/*\n * We don't document the ionActionSheet directive, we instead document\n * the $ionicActionSheet service\n */\n.directive('ionActionSheet', ['$document', function($document) {\n  return {\n    restrict: 'E',\n    scope: true,\n    replace: true,\n    link: function($scope, $element){\n      var keyUp = function(e) {\n        if(e.which == 27) {\n          $scope.cancel();\n          $scope.$apply();\n        }\n      };\n\n      var backdropClick = function(e) {\n        if(e.target == $element[0]) {\n          $scope.cancel();\n          $scope.$apply();\n        }\n      };\n      $scope.$on('$destroy', function() {\n        $element.remove();\n        $document.unbind('keyup', keyUp);\n      });\n\n      $document.bind('keyup', keyUp);\n      $element.bind('click', backdropClick);\n    },\n    template: '<div class=\"action-sheet-backdrop\">' +\n                '<div class=\"action-sheet-wrapper\">' +\n                  '<div class=\"action-sheet\">' +\n                    '<div class=\"action-sheet-group\">' +\n                      '<div class=\"action-sheet-title\" ng-if=\"titleText\">{{titleText}}</div>' +\n                      '<button class=\"button\" ng-click=\"buttonClicked($index)\" ng-repeat=\"button in buttons\">{{button.text}}</button>' +\n                    '</div>' +\n                    '<div class=\"action-sheet-group\" ng-if=\"destructiveText\">' +\n                      '<button class=\"button destructive\" ng-click=\"destructiveButtonClicked()\">{{destructiveText}}</button>' +\n                    '</div>' +\n                    '<div class=\"action-sheet-group\" ng-if=\"cancelText\">' +\n                      '<button class=\"button\" ng-click=\"cancel()\">{{cancelText}}</button>' +\n                    '</div>' +\n                  '</div>' +\n                '</div>' +\n              '</div>'\n  };\n}]);\n\n})();\n\n(function(ionic) {\n'use strict';\n\nangular.module('ionic.ui.header', ['ngAnimate', 'ngSanitize'])\n\n.directive('ionNavBar', TapScrollToTopDirective())\n.directive('ionHeaderBar', TapScrollToTopDirective())\n\n/**\n * @ngdoc directive\n * @name ionHeaderBar\n * @module ionic\n * @restrict E\n * @controller ionicBar as $scope.$ionicHeaderBarController\n *\n * @description\n * Adds a fixed header bar above some content.\n *\n * Is able to have left or right buttons, and additionally its title can be\n * aligned through the {@link ionic.controller:ionicBar ionicBar controller}.\n *\n * @param {string=} controller-bind The scope variable to bind this header bar's\n * {@link ionic.controller:ionicBar ionicBar controller} to.\n * Default: $scope.$ionicHeaderBarController.\n * @param {string=} align-title Where to align the title at the start.\n * Avaialble: 'left', 'right', or 'center'.  Defaults to 'center'.\n *\n * @usage\n * ```html\n * <ion-header-bar align-title=\"left\" class=\"bar-positive\">\n *   <div class=\"buttons\">\n *     <button class=\"button\" ng-click=\"doSomething()\">Left Button</button>\n *   </div>\n *   <h1 class=\"title\">Title!</h1>\n *   <div class=\"buttons\">\n *     <button class=\"button\">Right Button</button>\n *   </div>\n * </ion-header-bar>\n * <ion-content>\n *   Some content!\n * </ion-content>\n * ```\n */\n.directive('ionHeaderBar', barDirective(true))\n\n/**\n * @ngdoc directive\n * @name ionFooterBar\n * @module ionic\n * @restrict E\n * @controller ionicBar as $scope.$ionicFooterBarController\n *\n * @description\n * Adds a fixed footer bar below some content.\n *\n * Is able to have left or right buttons, and additionally its title can be\n * aligned through the {@link ionic.controller:ionicBar ionicBar controller}.\n *\n * @param {string=} controller-bind The scope variable to bind this footer bar's\n * {@link ionic.controller:ionicBar ionicBar controller} to.\n * Default: $scope.$ionicFooterBarController.\n * @param {string=} align-title Where to align the title at the start.\n * Avaialble: 'left', 'right', or 'center'.  Defaults to 'center'.\n *\n * @usage\n * ```html\n * <ion-content>\n *   Some content!\n * </ion-content>\n * <ion-footer-bar align-title=\"left\" class=\"bar-assertive\">\n *   <div class=\"buttons\">\n *     <button class=\"button\">Left Button</button>\n *   </div>\n *   <h1 class=\"title\">Title!</h1>\n *   <div class=\"buttons\" ng-click=\"doSomething()\">\n *     <button class=\"button\">Right Button</button>\n *   </div>\n * </ion-footer-bar>\n * ```\n */\n.directive('ionFooterBar', barDirective(false));\n\nfunction TapScrollToTopDirective() {\n  return ['$document', function($document) {\n    return {\n      restrict: 'E',\n      link: function($scope, $element, $attr, scrollCtrl) {\n        ionic.requestAnimationFrame(function() {\n          var scrollCtrl = $element.controller('$ionicScroll');\n          if (!scrollCtrl) {\n            return;\n          }\n\n          ionic.on('tap', onTap, $element[0]);\n          $scope.$on('$destroy', function() {\n            ionic.off('tap', onTap, $element[0]);\n          });\n\n          function onTap(e) {\n            if (ionic.DomUtil.getParentOrSelfWithClass(e.target, 'button', 4)) {\n              return;\n            }\n            var touch = e.gesture && e.gesture.touches[0] || e.detail.touches[0];\n            var bounds = $element[0].getBoundingClientRect();\n            if(ionic.DomUtil.rectContains(\n              touch.pageX, touch.pageY,\n              bounds.left, bounds.top - 20,\n              bounds.left + bounds.width, bounds.top + bounds.height)\n            ) {\n              scrollCtrl.scrollTop(true);\n            }\n          }\n        });\n      }\n    };\n  }];\n}\n\n\nfunction barDirective(isHeader) {\n  return ['$parse', function($parse) {\n    return {\n      restrict: 'E',\n      compile: function($element, $attr) {\n        $element.addClass(isHeader ? 'bar bar-header' : 'bar bar-footer');\n        return { pre: prelink };\n        function prelink($scope, $element, $attr) {\n          var hb = new ionic.views.HeaderBar({\n            el: $element[0],\n            alignTitle: $attr.alignTitle || 'center'\n          });\n\n          $parse($attr.controllerBind ||\n            (isHeader ? '$ionicHeaderBarController' : '$ionicFooterBarController')\n          ).assign($scope, hb);\n\n          var el = $element[0];\n          //just incase header is on rootscope\n          var parentScope = $scope.$parent || $scope;\n\n          if (isHeader) {\n            $scope.$watch(function() { return el.className; }, function(value) {\n              var isSubheader = value.indexOf('bar-subheader') !== -1;\n              parentScope.$hasHeader = !isSubheader;\n              parentScope.$hasSubheader = isSubheader;\n            });\n            $scope.$on('$destroy', function() {\n              parentScope.$hasHeader = parentScope.$hasSubheader = null;\n            });\n          } else {\n            $scope.$watch(function() { return el.className; }, function(value) {\n              var isSubfooter = value.indexOf('bar-subfooter') !== -1;\n              parentScope.$hasFooter = !isSubfooter;\n              parentScope.$hasSubfooter = isSubfooter;\n            });\n            $scope.$on('$destroy', function() {\n              parentScope.$hasFooter = parentScope.$hasSubfooter = null;\n            });\n            $scope.$watch('$hasTabs', function(val) {\n              $element.toggleClass('has-tabs', !!val);\n            });\n          }\n        }\n      }\n    };\n  }];\n}\n\n})(ionic);\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.checkbox', [])\n\n/**\n * @ngdoc directive\n * @name ionCheckbox\n * @module ionic\n * @restrict E\n * @description\n * No different than the HTML checkbox input, except it's styled differently.\n *\n * Behaves like any [AngularJS checkbox](http://docs.angularjs.org/api/ng/input/input[checkbox]).\n *\n * @usage\n * ```html\n * <ion-checkbox ng-model=\"isChecked\">Checkbox Label</ion-checkbox>\n * ```\n */\n.directive('ionCheckbox', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '?ngModel',\n    scope: {\n      ngModel: '=?',\n      ngValue: '=?',\n      ngChecked: '=?',\n      ngChange: '&'\n    },\n    transclude: true,\n\n    template: '<div class=\"item item-checkbox disable-pointer-events\">' +\n                '<label class=\"checkbox enable-pointer-events\">' +\n                  '<input type=\"checkbox\" ng-model=\"ngModel\" ng-value=\"ngValue\" ng-change=\"ngChange()\">' +\n                '</label>' +\n                '<div class=\"item-content\" ng-transclude></div>' +\n              '</div>',\n\n    compile: function(element, attr) {\n      var input = element.find('input');\n      if(attr.name) input.attr('name', attr.name);\n      if(attr.ngChecked) input.attr('ng-checked', 'ngChecked');\n      if(attr.ngTrueValue) input.attr('ng-true-value', attr.ngTrueValue);\n      if(attr.ngFalseValue) input.attr('ng-false-value', attr.ngFalseValue);\n    }\n\n  };\n});\n\n})();\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.content', ['ionic.ui.scroll'])\n\n/**\n * Panel is a simple 100% width and height, fixed panel. It's meant for content to be\n * added to it, or animated around.\n */\n/**\n * @ngdoc directive\n * @name ionPane\n * @module ionic\n * @restrict E\n *\n * @description A simple container that fits content, with no side effects.  Adds the 'pane' class to the element.\n */\n.directive('ionPane', function() {\n  return {\n    restrict: 'E',\n    link: function(scope, element, attr) {\n      element.addClass('pane');\n    }\n  };\n})\n\n/**\n * @ngdoc directive\n * @name ionContent\n * @module ionic\n * @restrict E\n *\n * @description\n * The ionContent directive provides an easy to use content area that can be configured\n * to use Ionic's custom Scroll View, or the built in overflow scorlling of the browser.\n *\n * While we recommend using the custom Scroll features in Ionic in most cases, sometimes\n * (for performance reasons) only the browser's native overflow scrolling will suffice,\n * and so we've made it easy to toggle between the Ionic scroll implementation and\n * overflow scrolling.\n *\n * You can implement pull-to-refresh with the {@link ionic.directive:ionRefresher}\n * directive, and infinite scrolling with the {@link ionic.directive:ionInfiniteScroll}\n * directive.\n *\n * @param {string=} delegate-handle The handle used to identify this scrollView\n * with {@link ionic.service:$ionicScrollDelegate}.\n * @param {boolean=} padding Whether to add padding to the content.\n * of the content.  Defaults to true on iOS, false on Android.\n * @param {boolean=} scroll Whether to allow scrolling of content.  Defaults to true.\n * @param {boolean=} overflow-scroll Whether to use overflow-scrolling instead of\n * Ionic scroll.\n * @param {boolean=} has-bouncing Whether to allow scrolling to bounce past the edges\n * of the content.  Defaults to true on iOS, false on Android.\n * @param {expression=} on-scroll Expression to evaluate when the content is scrolled.\n * @param {expression=} on-scroll-complete Expression to evaluate when a scroll action completes.\n */\n.directive('ionContent', [\n  '$parse',\n  '$timeout',\n  '$controller',\n  '$ionicBind',\nfunction($parse, $timeout, $controller, $ionicBind) {\n  return {\n    restrict: 'E',\n    require: '^?ionNavView',\n    scope: true,\n    compile: function(element, attr) {\n      element.addClass('scroll-content');\n\n      //We cannot transclude here because it breaks element.data() inheritance on compile\n      var innerElement = angular.element('<div class=\"scroll\"></div>');\n      innerElement.append(element.contents());\n      element.append(innerElement);\n\n      return { pre: prelink };\n      function prelink($scope, $element, $attr, navViewCtrl) {\n        var clone, sc, scrollView, scrollCtrl;\n\n        $scope.$watch(function() {\n          return ($scope.$hasHeader ? ' has-header' : '')  +\n            ($scope.$hasSubheader ? ' has-subheader' : '') +\n            ($scope.$hasFooter ? ' has-footer' : '') +\n            ($scope.$hasSubfooter ? ' has-subfooter' : '') +\n            ($scope.$hasTabs ? ' has-tabs' : '') +\n            ($scope.$hasTabsTop ? ' has-tabs-top' : '');\n        }, function(className, oldClassName) {\n          $element.removeClass(oldClassName);\n          $element.addClass(className);\n        });\n\n        $ionicBind($scope, $attr, {\n          $onScroll: '&onScroll',\n          $onScrollComplete: '&onScrollComplete',\n          hasBouncing: '@',\n          scroll: '@',\n          padding: '@',\n          hasScrollX: '@',\n          hasScrollY: '@',\n          scrollbarX: '@',\n          scrollbarY: '@',\n          startX: '@',\n          startY: '@',\n          scrollEventInterval: '@'\n        });\n\n        if (angular.isDefined($attr.padding)) {\n          $scope.$watch($attr.padding, function(newVal) {\n            innerElement.toggleClass('padding', !!newVal);\n          });\n        }\n\n        if ($scope.scroll === \"false\") {\n          //do nothing\n        } else if(attr.overflowScroll === \"true\") {\n          $element.addClass('overflow-scroll');\n        } else {\n\n          scrollCtrl = $controller('$ionicScroll', {\n            $scope: $scope,\n            scrollViewOptions: {\n              el: $element[0],\n              delegateHandle: attr.delegateHandle,\n              bouncing: $scope.$eval($scope.hasBouncing),\n              startX: $scope.$eval($scope.startX) || 0,\n              startY: $scope.$eval($scope.startY) || 0,\n              scrollbarX: $scope.$eval($scope.scrollbarX) !== false,\n              scrollbarY: $scope.$eval($scope.scrollbarY) !== false,\n              scrollingX: $scope.$eval($scope.hasScrollX) === true,\n              scrollingY: $scope.$eval($scope.hasScrollY) !== false,\n              scrollEventInterval: parseInt($scope.scrollEventInterval, 10) || 20,\n              scrollingComplete: function() {\n                $scope.$onScrollComplete({\n                  scrollTop: this.__scrollTop,\n                  scrollLeft: this.__scrollLeft\n                });\n              }\n            }\n          });\n          //Publish scrollView to parent so children can access it\n          scrollView = scrollCtrl.scrollView;\n        }\n\n      }\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionRefresher\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionContent, ionic.directive:ionScroll\n * @description\n * Allows you to add pull-to-refresh to a scrollView.\n *\n * Place it as the first child of your {@link ionic.directive:ionContent} or\n * {@link ionic.directive:ionScroll} element.\n *\n * When refreshing is complete, $broadcast the 'scroll.refreshComplete' event\n * from your controller.\n *\n * @usage\n *\n * ```html\n * <ion-content ng-controller=\"MyController\">\n *   <ion-refresher\n *     pulling-text=\"Pull to refresh...\"\n *     on-refresh=\"doRefresh()\">\n *   </ion-refresher>\n *   <ion-list>\n *     <ion-item ng-repeat=\"item in items\"></ion-item>\n *   </ion-list>\n * </ion-content>\n * ```\n * ```js\n * angular.module('testApp', ['ionic'])\n * .controller('MyController', function($scope, $http) {\n *   $scope.items = [1,2,3];\n *   $scope.doRefresh = function() {\n *     $http.get('/new-items').success(function(newItems) {\n *       $scope.items = newItems;\n *       //Stop the ion-refresher from spinning\n *       $scope.$broadcast('scroll.refreshComplete');\n *     });\n *   };\n * });\n * ```\n *\n * @param {expression=} on-refresh Called when the user pulls down enough and lets go\n * of the refresher.\n * @param {expression=} on-pulling Called when the user starts to pull down\n * on the refresher.\n * @param {string=} pulling-icon The icon to display while the user is pulling down.\n * Default: 'ion-arrow-down-c'.\n * @param {string=} pulling-text The text to display while the user is pulling down.\n * @param {string=} refreshing-icon The icon to display after user lets go of the\n * refresher.\n * @param {string=} refreshing-text The text to display after the user lets go of\n * the refresher.\n *\n */\n.directive('ionRefresher', ['$ionicBind', function($ionicBind) {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '^$ionicScroll',\n    template:\n    '<div class=\"scroll-refresher\">' +\n    '<div class=\"ionic-refresher-content\">' +\n        '<i class=\"icon {{pullingIcon}} icon-pulling\"></i>' +\n        '<span class=\"icon-pulling\" ng-bind-html=\"pullingText\"></span>' +\n        '<i class=\"icon {{refreshingIcon}} icon-refreshing\"></i>' +\n        '<span class=\"icon-refreshing\" ng-bind-html=\"refreshingText\"></span>' +\n      '</div>' +\n    '</div>',\n    compile: function($element, $attrs) {\n      if (angular.isUndefined($attrs.pullingIcon)) {\n        $attrs.$set('pullingIcon', 'ion-arrow-down-c');\n      }\n      if (angular.isUndefined($attrs.refreshingIcon)) {\n        $attrs.$set('refreshingIcon', 'ion-loading-d');\n      }\n      return function($scope, $element, $attrs, scrollCtrl) {\n        $ionicBind($scope, $attrs, {\n          pullingIcon: '@',\n          pullingText: '@',\n          refreshingIcon: '@',\n          refreshingText: '@',\n          $onRefresh: '&onRefresh',\n          $onPulling: '&onPulling'\n        });\n\n        scrollCtrl._setRefresher($scope, $element[0]);\n        $scope.$on('scroll.refreshComplete', function() {\n          $element[0].classList.remove('active');\n          scrollCtrl.scrollView.finishPullToRefresh();\n        });\n      };\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionInfiniteScroll\n * @module ionic\n * @parent ionic.directive:ionContent, ionic.directive:ionScroll\n * @restrict E\n *\n * @description\n * The ionInfiniteScroll directive allows you to call a function whenever\n * the user gets to the bottom of the page or near the bottom of the page.\n *\n * The expression you pass in for `on-infinite` is called when the user scrolls\n * greater than `distance` away from the bottom of the content.\n *\n * @param {expression} on-infinite What to call when the scroller reaches the\n * bottom.\n * @param {string=} distance The distance from the bottom that the scroll must\n * reach to trigger the on-infinite expression. Default: 1%.\n * @param {string=} icon The icon to show while loading. Default: 'ion-loading-d'.\n *\n * @usage\n * ```html\n * <ion-content ng-controller=\"MyController\">\n *   <ion-infinite-scroll\n *     on-infinite=\"loadMore()\"\n *     distance=\"1%\">\n *   </ion-infinite-scroll>\n * </ion-content>\n * ```\n * ```js\n * function MyController($scope, $http) {\n *   $scope.items = [];\n *   $scope.loadMore = function() {\n *     $http.get('/more-items').success(function(items) {\n *       useItems(items);\n *       $scope.$broadcast('scroll.infiniteScrollComplete');\n *     });\n *   };\n * }\n * ```\n *\n * An easy to way to stop infinite scroll once there is no more data to load\n * is to use angular's `ng-if` directive:\n *\n * ```html\n * <ion-infinite-scroll\n *   ng-if=\"moreDataCanBeLoaded()\"\n *   icon=\"ion-loading-c\"\n *   on-infinite=\"loadMoreData()\">\n * </ion-infinite-scroll>\n * ```\n */\n.directive('ionInfiniteScroll', ['$timeout', function($timeout) {\n  return {\n    restrict: 'E',\n    require: ['^$ionicScroll', 'ionInfiniteScroll'],\n    template:\n      '<div class=\"scroll-infinite\">' +\n        '<div class=\"scroll-infinite-content\">' +\n          '<i class=\"icon {{icon()}} icon-refreshing\"></i>' +\n        '</div>' +\n      '</div>',\n    scope: true,\n    controller: ['$scope', '$attrs', function($scope, $attrs) {\n      this.isLoading = false;\n      this.scrollView = null; //given by link function\n      this.getMaxScroll = function() {\n        var dist = $attrs.distance || '1%';\n        return dist.indexOf('%') > -1 ?\n          this.scrollView.getScrollMax().top * (1 - parseInt(dist,10) / 100) :\n          this.scrollView.getScrollMax().top - parseInt(dist, 10);\n      };\n    }],\n    link: function($scope, $element, $attrs, ctrls) {\n      var scrollCtrl = ctrls[0];\n      var infiniteScrollCtrl = ctrls[1];\n      var scrollView = infiniteScrollCtrl.scrollView = scrollCtrl.scrollView;\n\n      $scope.icon = function() {\n        return angular.isDefined($attrs.icon) ? $attrs.icon : 'ion-loading-d';\n      };\n\n      $scope.$on('scroll.infiniteScrollComplete', function() {\n        $element[0].classList.remove('active');\n        $timeout(function() {\n          scrollView.resize();\n        }, 0, false);\n        infiniteScrollCtrl.isLoading = false;\n      });\n\n      scrollCtrl.$element.on('scroll', ionic.animationFrameThrottle(function() {\n        if (!infiniteScrollCtrl.isLoading &&\n            scrollView.getValues().top >= infiniteScrollCtrl.getMaxScroll()) {\n          $element[0].classList.add('active');\n          infiniteScrollCtrl.isLoading = true;\n          $scope.$parent.$apply($attrs.onInfinite || '');\n        }\n      }));\n    }\n  };\n}]);\n\n})();\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.list', ['ngAnimate'])\n\n/**\n * @ngdoc directive\n * @name ionItem\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionList\n *\n * @description\n * The ionItem directive creates a list-item that can easily be swiped,\n * deleted, reordered, edited, and more.\n *\n * @usage\n * ```html\n * <ion-list>\n *   <ion-item ng-repeat=\"item in items\"\n *     item=\"item\"\n *     can-swipe=\"true\"\n *     left-buttons=\"myItemButtons\">\n *   </ion-item>\n * </ion-list>\n * ```\n *\n * @param {string=} item-type The type of this item.  See [the list CSS page](/docs/components/#list) for available item types.\n * @param {expression=} option-buttons The option buttons to show when swiping the item to the left (if swiping is enabled).  Defaults to the ionList parent's option-buttons setting.  The format of each button object is:\n *   ```js\n *   {\n *     text: 'Edit',\n *     type: 'Button',\n *     onTap: function(item) {}\n *   }\n *   ```\n *\n * @param {expression=} item The 'object' representing this item, to be passed in to swipe, delete, and reorder callbacks.\n * @param {boolean=} can-swipe Whether or not this item can be swiped. Defaults ot hte ionList parent's can-swipe setting.\n * @param {boolean=} can-delete Whether or not this item can be deleted. Defaults to the ionList parent's can-delete setting.\n * @param {boolean=} can-reorder Whether or not this item can be reordered. Defaults to the ionList parent's can-reorder setting.\n * @param {expression=} on-delete The expression to call when this item is deleted.\n * @param {string=} delete-icon The class name of the icon to show on this item while deleting. Defaults to the ionList parent's delete-icon setting.\n * @param {string=} reorder-icon The class name of the icon to show on this item while reordering. Defaults to the ionList parent's reorder-icon setting.\n */\n.directive('ionItem', ['$timeout', '$parse', function($timeout, $parse) {\n  return {\n    restrict: 'E',\n    require: '?^ionList',\n    replace: true,\n    transclude: true,\n\n    scope: {\n      item: '=',\n      itemType: '@',\n      canDelete: '@',\n      canReorder: '@',\n      canSwipe: '@',\n      onDelete: '&',\n      optionButtons: '&',\n      deleteIcon: '@',\n      reorderIcon: '@'\n    },\n\n    template: '<div class=\"item item-complex\">\\\n            <div class=\"item-left-edit item-delete\" ng-if=\"deleteClick !== undefined\">\\\n              <button class=\"button button-icon icon\" ng-class=\"deleteIconClass\" ng-click=\"deleteClick()\" ion-stop-event=\"click\"></button>\\\n            </div>\\\n            <a class=\"item-content\" ng-href=\"{{ href }}\" ng-transclude></a>\\\n            <div class=\"item-right-edit item-reorder\" ng-if=\"reorderIconClass !== undefined\">\\\n              <button data-ionic-action=\"reorder\" data-prevent-scroll=\"true\" class=\"button button-icon icon\" ng-class=\"reorderIconClass\"></button>\\\n            </div>\\\n            <div class=\"item-options\" ng-if=\"itemOptionButtons\">\\\n             <button ng-click=\"b.onTap(item, b)\" ion-stop-event=\"click\" class=\"button\" ng-class=\"b.type\" ng-repeat=\"b in itemOptionButtons\" ng-bind=\"b.text\"></button>\\\n           </div>\\\n          </div>',\n\n    link: function($scope, $element, $attr, list) {\n      if(!list) return;\n\n      var $parentScope = list.scope;\n      var $parentAttrs = list.attrs;\n\n      $attr.$observe('href', function(value) {\n        if(value) $scope.href = value.trim();\n      });\n\n      if(!$scope.itemType) {\n        $scope.itemType = $parentScope.itemType;\n      }\n\n      // Set this item's class, first from the item directive attr, and then the list attr if item not set\n      $element.addClass($scope.itemType || $parentScope.itemType);\n\n      $scope.itemClass = $scope.itemType;\n\n      // Decide if this item can do stuff, and follow a certain priority\n      // depending on where the value comes from\n      if(($attr.canDelete ? $scope.canDelete : $parentScope.canDelete) !== \"false\") {\n        if($attr.onDelete || $parentAttrs.onDelete) {\n\n          // only assign this method when we need to\n          // and use its existence to decide if the delete should show or not\n          $scope.deleteClick = function() {\n            if($attr.onDelete) {\n              // this item has an on-delete attribute\n              $scope.onDelete({ item: $scope.item, index: $scope.$parent.$index });\n            } else if($parentAttrs.onDelete) {\n              // run the parent list's onDelete method\n              // if it doesn't exist nothing will happen\n              $parentScope.onDelete({ item: $scope.item, index: $scope.$parent.$index });\n            }\n          };\n\n          // Set which icons to use for deleting\n          $scope.deleteIconClass = $scope.deleteIcon || $parentScope.deleteIcon || 'ion-minus-circled';\n          $element.addClass('item-left-editable');\n        }\n      }\n\n      // set the reorder Icon Class only if the item or list set can-reorder=\"true\"\n      if(($attr.canReorder ? $scope.canReorder : $parentScope.canReorder) === \"true\") {\n        $scope.reorderIconClass = $scope.reorderIcon || $parentScope.reorderIcon || 'ion-navicon';\n        $element.addClass('item-right-editable');\n      }\n\n      // Set the option buttons which can be revealed by swiping to the left\n      // if canSwipe was set to false don't even bother\n      if(($attr.canSwipe ? $scope.canSwipe : $parentScope.canSwipe) !== \"false\") {\n        $scope.itemOptionButtons = $scope.optionButtons();\n        if(typeof $scope.itemOptionButtons === \"undefined\") {\n          $scope.itemOptionButtons = $parentScope.optionButtons();\n        }\n        $element.addClass('item-swipeable');\n      }\n\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionList\n * @module ionic\n * @restrict E\n * @codepen jsHjf\n *\n * @description\n * The List is a widely used interface element in almost any mobile app,\n * and can include content ranging from basic text all the way to buttons,\n * toggles, icons, and thumbnails.\n *\n * Both the list, which contains items, and the list items themselves can be\n * any HTML element. The containing element requires the list class and each\n * list item requires the item class. Ionic also comes with pre-built Angular\n * directives to make it easier to create a complex list.\n *\n * Using the ionList and {@link ionic.directive:ionItem} directives\n * make it easy to support various interaction modes such as swipe to edit,\n * drag to reorder, and removing items.\n *\n * However, if you need just a simple list you won't be required to use the\n * directives, but rather just use the classnames.\n * This demo is a simple list without using the directives.\n *\n * See the {@link ionic.directive:ionItem} documentation for more information on list items.\n *\n * @usage\n * ```html\n * <ion-list>\n *   <ion-item ng-repeat=\"item in items\" item=\"item\">\n *   </ion-item>\n * </ion-list>\n * ```\n *\n * @param {string=} item-type The type of this item.  See [the list CSS page](/docs/components/#list) for available item types.\n * @param {expression=} on-delete Called when a child item is deleted.\n * @param {expression=} on-reorder Called when a child item is reordered.\n * @param {boolean=} show-delete Whether to show each item delete button.\n * @param {boolean=} show-reoder Whether to show each item's reorder button.\n * @param {boolean=} can-delete Whether child items are able to be deleted or not.\n * @param {boolean=} can-reorder Whether child items can be reordered or not.\n * @param {boolean=} can-swipe Whether child items can be swiped to reveal option buttons.\n * @param {string=} delete-icon The class name of the icon to show on child items while deleting.  Defaults to `ion-minus-circled`.\n * @param {string=} reorder-icon The class name to show on child items while reordering. Defaults to `ion-navicon`.\n * @param {string=} animation An animation class to apply to the list for animating when child items enter or exit the list.\n */\n.directive('ionList', ['$timeout', function($timeout) {\n  return {\n    restrict: 'E',\n    replace: true,\n    transclude: true,\n    require: '^?$ionicScroll',\n    scope: {\n      itemType: '@',\n      canDelete: '@',\n      canReorder: '@',\n      canSwipe: '@',\n      showDelete: '=',\n      showReorder: '=',\n      onDelete: '&',\n      onReorder: '&',\n      optionButtons: '&',\n      deleteIcon: '@',\n      reorderIcon: '@'\n    },\n\n    template: '<div class=\"list\" ng-class=\"{\\'list-left-editing\\': showDelete, \\'list-right-editing\\': showReorder}\" ng-transclude></div>',\n\n    controller: ['$scope', '$attrs', function($scope, $attrs) {\n      this.scope = $scope;\n      this.attrs = $attrs;\n    }],\n\n    link: function($scope, $element, $attr, ionicScrollCtrl) {\n      $scope.listView = new ionic.views.ListView({\n        canSwipe: $scope.canSwipe !== \"false\" && !!$scope.optionButtons(),\n        el: $element[0],\n        listEl: $element[0].children[0],\n        scrollEl: ionicScrollCtrl && ionicScrollCtrl.element,\n        scrollView: ionicScrollCtrl && ionicScrollCtrl.scrollView,\n        onReorder: function(el, oldIndex, newIndex) {\n          $scope.$apply(function() {\n            $scope.onReorder({el: el, start: oldIndex, end: newIndex});\n          });\n        }\n      });\n\n      if($attr.animation) {\n        $element[0].classList.add($attr.animation);\n      }\n\n      var destroyShowReorderWatch = $scope.$watch('showReorder', function(val) {\n        if(val) {\n          $element[0].classList.add('item-options-hide');\n          $scope.listView && $scope.listView.clearDragEffects();\n        } else if(val === false) {\n          // false checking is because it could be undefined\n          // if its undefined then we don't care to do anything\n          $timeout(function(){\n            $element[0].classList.remove('item-options-hide');\n          }, 250);\n        }\n      });\n\n      $scope.$on('$destroy', function () {\n        destroyShowReorderWatch();\n      });\n\n    }\n  };\n}]);\n\n})();\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.loading', [])\n\n/**\n * @private\n * $ionicLoading service is documented\n */\n.directive('ionLoading', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    transclude: true,\n    link: function($scope, $element){\n      $element.addClass($scope.animation || '');\n    },\n    template: '<div class=\"loading-backdrop\" ng-class=\"{\\'show-backdrop\\': showBackdrop}\">' +\n                '<div class=\"loading\" ng-transclude>' +\n                '</div>' +\n              '</div>'\n  };\n});\n\n})();\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.modal', [])\n\n/*\n * We don't document the ionModal directive, we instead document\n * the $ionicModal service\n */\n.directive('ionModal', [function() {\n  return {\n    restrict: 'E',\n    transclude: true,\n    replace: true,\n    template: '<div class=\"modal-backdrop\">' +\n                '<div class=\"modal-wrapper\" ng-transclude></div>' +\n              '</div>'\n  };\n}]);\n\n})();\n\n\nangular.module('ionic.ui.navBar', ['ionic.service.view', 'ngSanitize'])\n\n/**\n * @ngdoc controller\n * @name ionicNavBar\n * @module ionic\n * @description\n * Controller for the {@link ionic.directive:ionNavBar} directive.\n */\n.controller('$ionicNavBar', [\n  '$scope',\n  '$element',\n  '$ionicViewService',\n  '$animate',\n  '$compile',\nfunction($scope, $element, $ionicViewService, $animate, $compile) {\n  //Let the parent know about our controller too so that children of\n  //sibling content elements can know about us\n  $element.parent().data('$ionNavBarController', this);\n\n  var self = this;\n\n  this.leftButtonsElement = angular.element(\n    $element[0].querySelector('.buttons.left-buttons')\n  );\n  this.rightButtonsElement = angular.element(\n    $element[0].querySelector('.buttons.right-buttons')\n  );\n\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#back\n   * @description Goes back in the view history.\n   * @param {DOMEvent=} event The event object (eg from a tap event)\n   */\n  this.back = function(e) {\n    var backView = $ionicViewService.getBackView();\n    backView && backView.go();\n    e && (e.alreadyHandled = true);\n    return false;\n  };\n\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#align\n   * @description Calls {@link ionic.controller:ionicBar#align ionicBar#align} for this navBar.\n   * @param {string=} direction The direction to the align the title text towards.\n   */\n  this.align = function(direction) {\n    this._headerBarView.align(direction);\n  };\n\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#showBackButton\n   * @description\n   * Set whether the {@link ionic.directive:ionNavBackButton} should be shown (if it exists).\n   * @param {boolean} show Whether to show the back button.\n   */\n  this.showBackButton = function(show) {\n    $scope.backButtonShown = !!show;\n  };\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#showBar\n   * @description\n   * Set whether the {@link ionic.directive:ionNavBar} should be shown.\n   * @param {boolean} show Whether to show the bar.\n   */\n  this.showBar = function(show) {\n    $scope.isInvisible = !show;\n  };\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#setTitle\n   * @description\n   * Set the title for the {@link ionic.directive:ionNavBar}.\n   * @param {string} title The new title to show.\n   */\n  this.setTitle = function(title) {\n    $scope.oldTitle = $scope.title;\n    $scope.title = title || '';\n  };\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#changeTitle\n   * @description\n   * Change the title, transitioning the new title in and the old one out in a given direction.\n   * @param {string} title The new title to show.\n   * @param {string} direction The direction to transition the new title in.\n   * Available: 'forward', 'back'.\n   */\n  this.changeTitle = function(title, direction) {\n    if ($scope.title === title) {\n      return false;\n    }\n    this.setTitle(title);\n    $scope.isReverse = direction == 'back';\n    $scope.shouldAnimate = !!direction;\n\n    if (!$scope.shouldAnimate) {\n      //We're done!\n      this._headerBarView.align();\n    } else {\n      this._animateTitles();\n    }\n    return true;\n  };\n\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#getTitle\n   * @returns {string} The current title of the navbar.\n   */\n  this.getTitle = function() {\n    return $scope.title || '';\n  };\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#getPreviousTitle\n   * @returns {string} The previous title of the navbar.\n   */\n  this.getPreviousTitle = function() {\n    return $scope.oldTitle || '';\n  };\n\n  /**\n   * @private\n   * Exposed for testing\n   */\n  this._animateTitles = function() {\n    var oldTitleEl, newTitleEl, currentTitles;\n\n    //If we have any title right now\n    //(or more than one, they could be transitioning on switch),\n    //replace the first one with an oldTitle element\n    currentTitles = $element[0].querySelectorAll('.title');\n    if (currentTitles.length) {\n      oldTitleEl = $compile('<h1 class=\"title\" ng-bind-html=\"oldTitle\"></h1>')($scope);\n      angular.element(currentTitles[0]).replaceWith(oldTitleEl);\n    }\n    //Compile new title\n    newTitleEl = $compile('<h1 class=\"title invisible\" ng-bind-html=\"title\"></h1>')($scope);\n\n    //Animate in on next frame\n    ionic.requestAnimationFrame(function() {\n\n      oldTitleEl && $animate.leave(angular.element(oldTitleEl));\n\n      var insert = oldTitleEl && angular.element(oldTitleEl) || null;\n      $animate.enter(newTitleEl, $element, insert, function() {\n        self._headerBarView.align();\n      });\n\n      //Cleanup any old titles leftover (besides the one we already did replaceWith on)\n      angular.forEach(currentTitles, function(el) {\n        if (el && el.parentNode) {\n          //Use .remove() to cleanup things like .data()\n          angular.element(el).remove();\n        }\n      });\n\n      //$apply so bindings fire\n      $scope.$digest();\n\n      //Stop flicker of new title on ios7\n      ionic.requestAnimationFrame(function() {\n        newTitleEl[0].classList.remove('invisible');\n      });\n    });\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionNavBar\n * @module ionic\n * @controller ionicNavBar as $scope.$ionicNavBarController\n * @restrict E\n *\n * @description\n * If we have an {@link ionic.directive:ionNavView} directive, we can also create an\n * `<ion-nav-bar>`, which will create a topbar that updates as the application state changes.\n *\n * We can add a back button by putting an {@link ionic.directive:ionNavBackButton} inside.\n *\n * We can add buttons depending on the currently visible view using\n * {@link ionic.directive:ionNavButtons}.\n *\n * Assign an [animation class](/docs/components#animations) to the element to\n * enable animated changing of titles (recommended: 'slide-left-right' or 'nav-title-slide-ios7')\n *\n * @usage\n *\n * ```html\n * <body ng-app=\"starter\">\n *   <!-- The nav bar that will be updated as we navigate -->\n *   <ion-nav-bar class=\"bar-positive nav-title-slide-ios7\">\n *   </ion-nav-bar>\n *\n *   <!-- where the initial view template will be rendered -->\n *   <ion-nav-view></ion-nav-view>\n * </body>\n * ```\n *\n * @param controller-bind {string=} The scope expression to bind this element's\n * {@link ionic.controller:ionicNavBar ionicNavBar controller} to.\n * Default: $ionicNavBarController.\n * @param align-title {string=} Where to align the title of the navbar.\n * Available: 'left', 'right', 'center'. Defaults to 'center'.\n */\n.directive('ionNavBar', ['$ionicViewService', '$rootScope', '$animate', '$compile', '$parse',\nfunction($ionicViewService, $rootScope, $animate, $compile, $parse) {\n\n  return {\n    restrict: 'E',\n    controller: '$ionicNavBar',\n    scope: true,\n    compile: function(tElement, tAttrs) {\n      //We cannot transclude here because it breaks element.data() inheritance on compile\n      tElement\n        .addClass('bar bar-header nav-bar')\n        .append(\n          '<div class=\"buttons left-buttons\"> ' +\n          '</div>' +\n          '<h1 ng-bind-html=\"title\" class=\"title\"></h1>' +\n          '<div class=\"buttons right-buttons\"> ' +\n          '</div>'\n        );\n\n      return { pre: prelink };\n      function prelink($scope, $element, $attr, navBarCtrl) {\n        navBarCtrl._headerBarView = new ionic.views.HeaderBar({\n          el: $element[0],\n          alignTitle: $attr.alignTitle || 'center'\n        });\n\n        $parse($attr.controllerBind || '$ionicNavBarController')\n          .assign($scope, navBarCtrl);\n\n        //defaults\n        $scope.backButtonShown = false;\n        $scope.shouldAnimate = true;\n        $scope.isReverse = false;\n        $scope.isInvisible = true;\n        $scope.$parent.$hasHeader = true;\n\n        $scope.$watch(function() {\n          return ($scope.isReverse ? ' reverse' : '') +\n            ($scope.isInvisible ? ' invisible' : '') +\n            (!$scope.shouldAnimate ? ' no-animation' : '');\n        }, function(className, oldClassName) {\n          $element.removeClass(oldClassName);\n          $element.addClass(className);\n        });\n\n      }\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionNavBackButton\n * @module ionic\n * @restrict E\n * @parent ionNavBar\n * @description\n * Creates a back button inside an {@link ionic.directive:ionNavBar}.\n *\n * Will show up when the user is able to go back in the current navigation stack.\n *\n * By default, will go back when clicked.  If you wish for more advanced behavior, see the\n * examples below.\n *\n * @usage\n *\n * With default click action:\n *\n * ```html\n * <ion-nav-bar>\n *   <ion-nav-back-button class=\"button-icon\">\n *     <i class=\"ion-arrow-left-c\"></i> Back!\n *   </ion-nav-back-button>\n * </ion-nav-bar>\n * ```\n *\n * With custom click action, using {@link ionic.controller:ionicNavBar ionicNavBar controller}:\n *\n * ```html\n * <ion-nav-bar>\n *   <ion-nav-back-button class=\"button-icon\"\n *     ng-click=\"canGoBack && $ionicNavBarController.back()\">\n *     <i class=\"ion-arrow-left-c\"></i> Back\n *   </ion-nav-back-button>\n * </ion-nav-bar>\n * ```\n *\n * Displaying the previous title on the back button, again using\n * {@link ionic.controller:ionicNavBar ionicNavBar controller}.\n *\n * ```html\n * <ion-nav-bar>\n *   <ion-nav-back-button class=\"button button-icon ion-arrow-left-c\">\n *     {% raw %}{{$ionicNavBarController.getPreviousTitle() || 'Back'}}{% endraw %}\n *   </ion-nav-back-button>\n * </ion-nav-bar>\n * ```\n *\n */\n.directive('ionNavBackButton', ['$ionicNgClick', function($ionicNgClick) {\n  return {\n    restrict: 'E',\n    require: '^ionNavBar',\n    compile: function(tElement, tAttrs) {\n      tElement.addClass('button back-button');\n      return function($scope, $element, $attr, navBarCtrl) {\n        if (!$attr.ngClick) {\n          $scope.$navBack = navBarCtrl.back;\n          $ionicNgClick($scope, $element, '$navBack($event)');\n        }\n\n        //If the current viewstate does not allow a back button,\n        //always hide it.\n        var deregisterListener = $scope.$parent.$on(\n          '$viewHistory.historyChange',\n          function(e, data) {\n            $scope.hasBackButton = !!data.showBack;\n          }\n        );\n        $scope.$on('$destroy', deregisterListener);\n\n        //Make sure both that a backButton is allowed in the first place,\n        //and that it is shown by the current view.\n        $scope.$watch('!!(backButtonShown && hasBackButton)', function(val) {\n          $element.toggleClass('hide', !val);\n        });\n      };\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionNavButtons\n * @module ionic\n * @restrict E\n * @parent ionNavView\n *\n * @description\n * Use ionNavButtons to set the buttons on your {@link ionic.directive:ionNavBar}\n * from within an {@link ionic.directive:ionView}.\n *\n * Any buttons you declare will be placed onto the navbar's corresponding side,\n * and then destroyed when the user leaves their parent view.\n *\n * @usage\n * ```html\n * <ion-nav-bar>\n * </ion-nav-bar>\n * <ion-nav-view>\n *   <ion-view>\n *     <ion-nav-buttons side=\"left\">\n *       <button class=\"button\" ng-click=\"doSomething()\">\n *         I'm a button on the left of the navbar!\n *       </button>\n *     </ion-nav-buttons>\n *     <ion-content>\n *       Some super content here!\n *     </ion-content>\n *   </ion-view>\n * </ion-nav-view>\n * ```\n *\n * @param {string} side The side to place the buttons on in the parent\n * {@link ionic.directive:ionNavBar}. Available: 'left' or 'right'.\n */\n.directive('ionNavButtons', ['$compile', '$animate', function($compile, $animate) {\n  return {\n    require: '^ionNavBar',\n    restrict: 'E',\n    compile: function($element, $attrs) {\n      var content = $element.contents().remove();\n      return function($scope, $element, $attrs, navBarCtrl) {\n        var navElement = $attrs.side === 'right' ?\n          navBarCtrl.rightButtonsElement :\n          navBarCtrl.leftButtonsElement;\n\n        //Put all of our inside buttons into their own div,\n        //so we can remove them all when this element dies -\n        //even if the buttons have changed through an ng-repeat or the like,\n        //we just remove their div parent and they are gone.\n        var buttons = angular.element('<div>').append(content);\n\n        //Compile buttons inside content so they have access to everything\n        //something inside content does (eg parent ionicScroll)\n        $element.append(buttons);\n        $compile(buttons)($scope);\n\n        //Append buttons to navbar\n        $animate.enter(buttons, navElement);\n\n        //When our ion-nav-buttons container is destroyed,\n        //destroy everything in the navbar\n        $scope.$on('$destroy', function() {\n          $animate.leave(buttons);\n        });\n\n        // The original element is just a completely empty <ion-nav-buttons> element.\n        // make it invisible just to be sure it doesn't change any layout\n        $element.css('display', 'none');\n      };\n    }\n  };\n}]);\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.popup', [])\n\n/**\n * @private\n */\n.directive('ionPopupBackdrop', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    template: '<div class=\"popup-backdrop\"></div>'\n  }\n})\n\n/**\n * @private\n */\n.directive('ionPopup', ['$ionicBind', function($ionicBind) {\n  return {\n    restrict: 'E',\n    replace: true,\n    transclude: true,\n    scope: true,\n    template:\n      '<div class=\"popup\">' +\n        '<div class=\"popup-head\">' +\n          '<h3 class=\"popup-title\" ng-bind-html=\"title\"></h3>' +\n          '<h5 class=\"popup-sub-title\" ng-bind-html=\"subTitle\" ng-if=\"subTitle\"></h5>' +\n        '</div>' +\n        '<div class=\"popup-body\" ng-transclude>' +\n        '</div>' +\n        '<div class=\"popup-buttons row\">' +\n          '<button ng-repeat=\"button in buttons\" ng-click=\"_buttonTapped(button, $event)\" class=\"button col\" ng-class=\"button.type || \\'button-default\\'\" ng-bind-html=\"button.text\"></button>' +\n        '</div>' +\n      '</div>',\n    link: function($scope, $element, $attr) {\n      $ionicBind($scope, $attr, {\n        title: '@',\n        buttons: '=',\n        $onButtonTap: '&onButtonTap',\n        $onClose: '&onClose'\n      });\n\n      $scope._buttonTapped = function(button, event) {\n        var result = button.onTap && button.onTap(event);\n\n        // A way to return false\n        if(event.defaultPrevented) {\n          return $scope.$onClose({button: button, result: false, event: event });\n        }\n\n        // Truthy test to see if we should close the window\n        if(result) {\n          return $scope.$onClose({button: button, result: result, event: event });\n        }\n        $scope.$onButtonTap({button: button, event: event});\n      }\n    }\n  };\n}]);\n\n})();\n\n(function(ionic) {\n'use strict';\n\nangular.module('ionic.ui.radio', [])\n\n/**\n * @ngdoc directive\n * @name ionRadio\n * @module ionic\n * @restrict E\n * @description\n * No different than the HTML radio input, except it's styled differently.\n *\n * Behaves like any [AngularJS radio](http://docs.angularjs.org/api/ng/input/input[radio]).\n *\n * @usage\n * ```html\n * <ion-radio ng-model=\"choice\" value=\"A\">Choose A</ion-radio>\n * <ion-radio ng-model=\"choice\" value=\"B\">Choose B</ion-radio>\n * <ion-radio ng-model=\"choice\" value=\"C\">Choose C</ion-radio>\n * ```\n */\n.directive('ionRadio', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '?ngModel',\n    scope: {\n      ngModel: '=?',\n      ngValue: '=?',\n      ngChange: '&',\n      icon: '@'\n    },\n    transclude: true,\n    template: '<label class=\"item item-radio\">' +\n                '<input type=\"radio\" name=\"radio-group\"' +\n                ' ng-model=\"ngModel\" ng-value=\"ngValue\" ng-change=\"ngChange()\">' +\n                '<div class=\"item-content disable-pointer-events\" ng-transclude></div>' +\n                '<i class=\"radio-icon disable-pointer-events icon ion-checkmark\"></i>' +\n              '</label>',\n\n    compile: function(element, attr) {\n      if(attr.name) element.children().eq(0).attr('name', attr.name);\n      if(attr.icon) element.children().eq(2).removeClass('ion-checkmark').addClass(attr.icon);\n    }\n  };\n})\n\n// The radio button is a radio powered element with only\n// one possible selection in a set of options.\n.directive('ionRadioButtons', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '?ngModel',\n    scope: {\n      value: '@'\n    },\n    transclude: true,\n    template: '<div class=\"button-bar button-bar-inline\" ng-transclude></div>',\n\n    controller: ['$scope', '$element', function($scope, $element) {\n\n      this.select = function(element) {\n        var c, children = $element.children();\n        for(var i = 0; i < children.length; i++) {\n          c = children[i];\n          if(c != element[0]) {\n            c.classList.remove('active');\n          }\n        }\n      };\n\n    }],\n\n    link: function($scope, $element, $attr, ngModel) {\n      var radio;\n\n      if(ngModel) {\n        //$element.bind('tap', tapHandler);\n\n        ngModel.$render = function() {\n          var children = $element.children();\n          for(var i = 0; i < children.length; i++) {\n            children[i].classList.remove('active');\n          }\n          $scope.$parent.$broadcast('radioButton.select', ngModel.$viewValue);\n        };\n      }\n    }\n  };\n})\n\n.directive('ionButtonRadio', function() {\n  return {\n    restrict: 'CA',\n    require: ['?^ngModel', '?^ionRadioButtons'],\n    link: function($scope, $element, $attr, ctrls) {\n      var ngModel = ctrls[0];\n      var radioButtons = ctrls[1];\n      if(!ngModel || !radioButtons) { return; }\n\n      var setIt = function() {\n        $element.addClass('active');\n        ngModel.$setViewValue($scope.$eval($attr.ngValue));\n\n        radioButtons.select($element);\n      };\n\n      var clickHandler = function(e) {\n        setIt();\n      };\n\n      $scope.$on('radioButton.select', function(e, val) {\n        if(val == $scope.$eval($attr.ngValue)) {\n          $element.addClass('active');\n        }\n      });\n\n      ionic.on('tap', clickHandler, $element[0]);\n\n      $scope.$on('$destroy', function() {\n        ionic.off('tap', clickHandler);\n      });\n    }\n  };\n});\n\n})(window.ionic);\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.scroll', [])\n\n/**\n * @ngdoc directive\n * @name ionScroll\n * @module ionic\n * @restrict E\n *\n * @description\n * Creates a scrollable container for all content inside.\n *\n * @param {string=} delegate-handle The handle used to identify this scrollView\n * with {@link ionic.service:$ionicScrollDelegate}.\n * @param {string=} direction Which way to scroll. 'x' or 'y'. Default 'y'.\n * @param {boolean=} paging Whether to scroll with paging.\n * @param {expression=} on-refresh Called on pull-to-refresh, triggered by an {@link ionic.directive:ionRefresher}.\n * @param {expression=} on-scroll Called whenever the user scrolls.\n * @param {boolean=} scrollbar-x Whether to show the horizontal scrollbar. Default false.\n * @param {boolean=} scrollbar-x Whether to show the vertical scrollbar. Default true.\n */\n.directive('ionScroll', ['$parse', '$timeout', '$controller', '$ionicBind', function($parse, $timeout, $controller, $ionicBind) {\n  return {\n    restrict: 'E',\n    scope: true,\n    controller: function() {},\n    compile: function(element, attr) {\n      element.addClass('scroll-view');\n\n      //We cannot transclude here because it breaks element.data() inheritance on compile\n      var innerElement = angular.element('<div class=\"scroll\"></div>');\n      innerElement.append(element.contents());\n      element.append(innerElement);\n\n      return { pre: prelink };\n      function prelink($scope, $element, $attr) {\n        var scrollView, scrollCtrl;\n\n        $ionicBind($scope, $attr, {\n          direction: '@',\n          paging: '@',\n          $onScroll: '&onScroll',\n          scroll: '@',\n          scrollbarX: '@',\n          scrollbarY: '@',\n        });\n\n        if (angular.isDefined($attr.padding)) {\n          $scope.$watch($attr.padding, function(newVal) {\n            innerElement.toggleClass('padding', !!newVal);\n          });\n        }\n        if($scope.$eval($scope.paging) === true) {\n          innerElement.addClass('scroll-paging');\n        }\n\n        if(!$scope.direction) { $scope.direction = 'y'; }\n        var isPaging = $scope.$eval($scope.paging) === true;\n\n        var scrollViewOptions= {\n          el: $element[0],\n          delegateHandle: $attr.delegateHandle,\n          paging: isPaging,\n          scrollbarX: $scope.$eval($scope.scrollbarX) !== false,\n          scrollbarY: $scope.$eval($scope.scrollbarY) !== false,\n          scrollingX: $scope.direction.indexOf('x') >= 0,\n          scrollingY: $scope.direction.indexOf('y') >= 0\n        };\n        if (isPaging) {\n          scrollViewOptions.speedMultiplier = 0.8;\n          scrollViewOptions.bouncing = false;\n        }\n\n        scrollCtrl = $controller('$ionicScroll', {\n          $scope: $scope,\n          scrollViewOptions: scrollViewOptions\n        });\n        scrollView = $scope.$parent.scrollView = scrollCtrl.scrollView;\n      }\n    }\n  };\n}]);\n\n})();\n\n(function() {\n'use strict';\n\n/**\n * @description\n * The sideMenuCtrl lets you quickly have a draggable side\n * left and/or right menu, which a center content area.\n */\n\nangular.module('ionic.ui.sideMenu', ['ionic.service.gesture', 'ionic.service.view'])\n\n/**\n * The internal controller for the side menu controller. This\n * extends our core Ionic side menu controller and exposes\n * some side menu stuff on the current scope.\n */\n\n.run(['$ionicViewService', function($ionicViewService) {\n  // set that the side-menus directive should not animate when transitioning to it\n  $ionicViewService.disableRegisterByTagName('ion-side-menus');\n}])\n\n/**\n * @ngdoc service\n * @name $ionicSideMenuDelegate\n * @module ionic\n *\n * @description\n * Delegate for controlling the {@link ionic.directive:ionSideMenus} directive.\n *\n *\n * @usage\n *\n * ```html\n * <body ng-controller=\"MainCtrl\">\n *   <ion-side-menus>\n *     <ion-pane ion-side-menu-content>\n *       Content!\n *       <button ng-click=\"toggleLeftSideMenu()\">\n *         Toggle Left Side Menu\n *       </button>\n *     </ion-pane>\n *     <ion-side-menu side=\"left\">\n *       Left Menu!\n *     <ion-side-menu>\n *   </ion-side-menus>\n * </body>\n * ```\n * ```js\n * function MainCtrl($scope, $ionicSideMenuDelegate) {\n *   $scope.toggleLeftSideMenu = function() {\n *     $ionicSideMenuDelegate.toggleLeft();\n *   };\n * }\n * ```\n */\n.service('$ionicSideMenuDelegate', delegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#toggleLeft\n   * @description Toggle the left side menu (if it exists).\n   * @param {boolean=} isOpen Whether to open or close the menu.\n   * Default: Toggles the menu.\n   */\n  'toggleLeft',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#toggleRight\n   * @description Toggle the right side menu (if it exists).\n   * @param {boolean=} isOpen Whether to open or close the menu.\n   * Default: Toggles the menu.\n   */\n  'toggleRight',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#isOpenLeft\n   * @returns {boolean} Whether the left menu is currently opened.\n   */\n  'isOpenLeft',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#isOpenRight\n   * @returns {boolean} Whether the right menu is currently opened.\n   */\n  'isOpenRight'\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#forHandle\n   * @param {string} handle\n   * @returns `delegateInstance` A delegate instance that controls only the\n   * sideMenu with delegate-handle matching the given handle.\n   */\n]))\n\n/**\n * @ngdoc directive\n * @name ionSideMenus\n * @module ionic\n * @restrict E\n *\n * @description\n * A container element for side menu(s) and the main content. Allows the left\n * and/or right side menu to be toggled by dragging the main content area side\n * to side.\n *\n * ![Side Menu](http://ionicframework.com.s3.amazonaws.com/docs/controllers/sidemenu.gif)\n *\n * For more information on side menus, check out the documenation for\n * {@link ionic.directive:ionSideMenuContent} and\n * {@link ionic.directive:ionSideMenu}.\n *\n * @usage\n * To use side menus, add an `<ion-side-menus>` parent element,\n * an `<ion-pane ion-side-menu-content>` for the center content,\n * and one or more `<ion-side-menu>` directives.\n *\n * ```html\n * <ion-side-menus>\n *   <!-- Center content -->\n *   <ion-pane ion-side-menu-content ng-controller=\"ContentController\">\n *   </ion-pane>\n *\n *   <!-- Left menu -->\n *   <ion-side-menu side=\"left\">\n *   </ion-side-menu>\n *\n *   <!-- Right menu -->\n *   <ion-side-menu side=\"right\">\n *   </ion-side-menu>\n * </ion-side-menus>\n * ```\n * ```js\n * function ContentController($scope) {\n *   $scope.toggleLeft = function() {\n *     $scope.$$ionicSideMenuDelegateController.toggleLeft();\n *   };\n * }\n * ```\n *\n * @param {string=} controller-bind The scope variable to bind these side menus'\n * {@link ionic.controller:$ionicSideMenuDelegate $ionicSideMenuDelegate controller} to.\n * Default: $scope.$$ionicSideMenuDelegateController.\n *\n */\n.directive('ionSideMenus', function() {\n  return {\n    restrict: 'ECA',\n    controller: ['$scope', '$attrs', '$ionicSideMenuDelegate', function($scope, $attrs, $ionicSideMenuDelegate) {\n      var _this = this;\n\n      angular.extend(this, ionic.controllers.SideMenuController.prototype);\n\n      ionic.controllers.SideMenuController.call(this, {\n        left: { width: 275 },\n        right: { width: 275 }\n      });\n\n      $scope.sideMenuContentTranslateX = 0;\n\n      var deregisterInstance = $ionicSideMenuDelegate._registerInstance(\n        this, $attrs.delegateHandle\n      );\n\n      $scope.$on('$destroy', deregisterInstance);\n    }],\n    replace: true,\n    transclude: true,\n    template: '<div class=\"view\" ng-transclude></div>'\n  };\n})\n\n/**\n * @ngdoc directive\n * @name ionSideMenuContent\n * @module ionic\n * @restrict A\n * @parent ionic.directive:ionSideMenus\n *\n * @description\n * A container for the main visible content, sibling to one or more\n * {@link ionic.directive:ionSideMenu} directives.\n *\n * An attribute directive, recommended to be used as part of an `<ion-pane>` element.\n *\n * @usage\n * ```html\n * <div ion-side-menu-content\n *   drag-content=\"canDragContent()\">\n * </div>\n * ```\n * For a complete side menu example, see the\n * {@link ionic.directive:ionSideMenus} documentation.\n *\n * @param {boolean=} drag-content Whether the content can be dragged.\n *\n */\n.directive('ionSideMenuContent', ['$timeout', '$ionicGesture', function($timeout, $ionicGesture) {\n  return {\n    restrict: 'AC',\n    require: '^ionSideMenus',\n    scope: true,\n    compile: function(element, attr) {\n      return { pre: prelink };\n      function prelink($scope, $element, $attr, sideMenuCtrl) {\n\n        $element.addClass('menu-content');\n\n        if (angular.isDefined(attr.dragContent)) {\n          $scope.$watch(attr.dragContent, function(value) {\n            $scope.dragContent = value;\n          });\n        } else {\n          $scope.dragContent = true;\n        }\n\n        var defaultPrevented = false;\n        var isDragging = false;\n\n        // Listen for taps on the content to close the menu\n        function contentTap(e) {\n          if(sideMenuCtrl.getOpenAmount() !== 0) {\n            sideMenuCtrl.close();\n            e.gesture.srcEvent.preventDefault();\n          }\n        }\n        ionic.on('tap', contentTap, $element[0]);\n\n        var dragFn = function(e) {\n          if($scope.dragContent) {\n            if(defaultPrevented || e.gesture.srcEvent.defaultPrevented) {\n              return;\n            }\n            isDragging = true;\n            sideMenuCtrl._handleDrag(e);\n            e.gesture.srcEvent.preventDefault();\n          }\n        };\n\n        var dragVertFn = function(e) {\n          if(isDragging) {\n            e.gesture.srcEvent.preventDefault();\n          }\n        };\n\n        //var dragGesture = Gesture.on('drag', dragFn, $element);\n        var dragRightGesture = $ionicGesture.on('dragright', dragFn, $element);\n        var dragLeftGesture = $ionicGesture.on('dragleft', dragFn, $element);\n        var dragUpGesture = $ionicGesture.on('dragup', dragVertFn, $element);\n        var dragDownGesture = $ionicGesture.on('dragdown', dragVertFn, $element);\n\n        var dragReleaseFn = function(e) {\n          isDragging = false;\n          if(!defaultPrevented) {\n            sideMenuCtrl._endDrag(e);\n          }\n          defaultPrevented = false;\n        };\n\n        var releaseGesture = $ionicGesture.on('release', dragReleaseFn, $element);\n\n        sideMenuCtrl.setContent({\n          onDrag: function(e) {},\n          endDrag: function(e) {},\n          getTranslateX: function() {\n            return $scope.sideMenuContentTranslateX || 0;\n          },\n          setTranslateX: ionic.animationFrameThrottle(function(amount) {\n            $element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(' + amount + 'px, 0, 0)';\n            $timeout(function() {\n              $scope.sideMenuContentTranslateX = amount;\n            });\n          }),\n          enableAnimation: function() {\n            //this.el.classList.add(this.animateClass);\n            $scope.animationEnabled = true;\n            $element[0].classList.add('menu-animated');\n          },\n          disableAnimation: function() {\n            //this.el.classList.remove(this.animateClass);\n            $scope.animationEnabled = false;\n            $element[0].classList.remove('menu-animated');\n          }\n        });\n\n        // Cleanup\n        $scope.$on('$destroy', function() {\n          $ionicGesture.off(dragLeftGesture, 'dragleft', dragFn);\n          $ionicGesture.off(dragRightGesture, 'dragright', dragFn);\n          $ionicGesture.off(dragUpGesture, 'dragup', dragFn);\n          $ionicGesture.off(dragDownGesture, 'dragdown', dragFn);\n          $ionicGesture.off(releaseGesture, 'release', dragReleaseFn);\n          ionic.off('tap', contentTap, $element[0]);\n        });\n      }\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionSideMenu\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionSideMenus\n *\n * @description\n * A container for a side menu, sibling to an {@link ionic.directive:ionSideMenuContent} directive.\n *\n * @usage\n * ```html\n * <ion-side-menu\n *   side=\"left\"\n *   width=\"myWidthValue + 20\"\n *   is-enabled=\"shouldLeftSideMenuBeEnabled()\">\n * </ion-side-menu>\n * ```\n * For a complete side menu example, see the\n * {@link ionic.directive:ionSideMenus} documentation.\n *\n * @param {string} side Which side the side menu is currently on.  Allowed values: 'left' or 'right'.\n * @param {boolean=} is-enabled Whether this side menu is enabled.\n * @param {number=} width How many pixels wide the side menu should be.  Defaults to 275.\n */\n.directive('ionSideMenu', function() {\n  return {\n    restrict: 'E',\n    require: '^ionSideMenus',\n    scope: true,\n    compile: function(element, attr) {\n      angular.isUndefined(attr.isEnabled) && attr.$set('isEnabled', 'true');\n      angular.isUndefined(attr.width) && attr.$set('width', '275');\n\n      element.addClass('menu menu-' + attr.side);\n\n      return function($scope, $element, $attr, sideMenuCtrl) {\n        $scope.side = $attr.side || 'left';\n\n        var sideMenu = sideMenuCtrl[$scope.side] = new ionic.views.SideMenu({\n          width: 275,\n          el: $element[0],\n          isEnabled: true\n        });\n\n        $scope.$watch($attr.width, function(val) {\n          var numberVal = +val;\n          if (numberVal && numberVal == val) {\n            sideMenu.setWidth(+val);\n          }\n        });\n        $scope.$watch($attr.isEnabled, function(val) {\n          sideMenu.setIsEnabled(!!val);\n        });\n      };\n    }\n  };\n})\n\n/**\n * @ngdoc directive\n * @name menuToggle\n * @module ionic\n * @restrict AC\n *\n * @description\n * Toggle a side menu on the given side\n *\n * @usage\n * Below is an example of a link within a nav bar. Tapping this link would\n * automatically open the given side menu\n *\n * ```html\n * <ion-view>\n *   <ion-nav-buttons side=\"left\">\n *    <button menu-toggle=\"left\" class=\"button button-icon icon ion-navicon\"></button>\n *   </ion-nav-buttons>\n *  ...\n * </ion-view>\n * ```\n */\n.directive('menuToggle', ['$ionicViewService', function($ionicViewService) {\n  return {\n    restrict: 'AC',\n    require: '^ionSideMenus',\n    link: function($scope, $element, $attr, sideMenuCtrl) {\n      var side = $scope.$eval($attr.menuToggle) || 'left';\n      $element.bind('click', function(){\n        if(side === 'left') {\n          sideMenuCtrl.toggleLeft();\n        } else if(side === 'right') {\n          sideMenuCtrl.toggleRight();\n        }\n      });\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name menuClose\n * @module ionic\n * @restrict AC\n *\n * @description\n * Closes a side menu which is currently opened.\n *\n * @usage\n * Below is an example of a link within a side menu. Tapping this link would\n * automatically close the currently opened menu\n *\n * ```html\n * <a nav-clear menu-close href=\"#/home\" class=\"item\">Home</a>\n * ```\n */\n.directive('menuClose', ['$ionicViewService', function($ionicViewService) {\n  return {\n    restrict: 'AC',\n    require: '^ionSideMenus',\n    link: function($scope, $element, $attr, sideMenuCtrl) {\n      $element.bind('click', function(){\n        sideMenuCtrl.close();\n      });\n    }\n  };\n}]);\n\n})();\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.slideBox', [])\n\n/**\n * The internal controller for the slide box controller.\n */\n\n/**\n * @ngdoc directive\n * @name ionSlideBox\n * @module ionic\n * @restrict E\n * @controller ionicSlideBox as $scope.$ionicSlideBoxController\n * @description\n * The Slide Box is a multi-page container where each page can be swiped or dragged between:\n *\n * ![SlideBox](http://ionicframework.com.s3.amazonaws.com/docs/controllers/slideBox.gif)\n *\n * @usage\n * ```html\n * <ion-slide-box>\n *   <ion-slide>\n *     <div class=\"box blue\"><h1>BLUE</h1></div>\n *   </ion-slide>\n *   <ion-slide>\n *     <div class=\"box yellow\"><h1>YELLOW</h1></div>\n *   </ion-slide>\n *   <ion-slide>\n *     <div class=\"box pink\"><h1>PINK</h1></div>\n *   </ion-slide>\n * </ion-slide-box>\n * ```\n *\n * @param {string=} controller-bind The scope variable to bind this slide box's\n * {@link ionic.controller:ionicSlideBox ionicSlideBox controller} to.\n * Default: $scope.$ionicSlideBoxController.\n * @param {boolean=} does-continue Whether the slide box should automatically slide.\n * @param {number=} slide-interval How many milliseconds to wait to change slides (if does-continue is true). Defaults to 4000.\n * @param {boolean=} show-pager Whether a pager should be shown for this slide box.\n * @param {boolean=} disable-scroll Whether to disallow scrolling/dragging of the slide-box content.\n * @param {expression=} on-slide-changed Expression called whenever the slide is changed.\n * @param {expression=} active-slide Model to bind the current slide to.\n */\n.directive('ionSlideBox', ['$timeout', '$compile', function($timeout, $compile) {\n  return {\n    restrict: 'E',\n    replace: true,\n    transclude: true,\n    scope: {\n      doesContinue: '@',\n      slideInterval: '@',\n      showPager: '@',\n      disableScroll: '@',\n      onSlideChanged: '&',\n      activeSlide: '=?'\n    },\n    controller: ['$scope', '$element', '$attrs', '$parse', function($scope, $element, $attrs, $parse) {\n      var _this = this;\n\n      var continuous = $scope.$eval($scope.doesContinue) === true;\n      var slideInterval = continuous ? $scope.$eval($scope.slideInterval) || 4000 : 0;\n\n      var slider = new ionic.views.Slider({\n        el: $element[0],\n        auto: slideInterval,\n        disableScroll: ($scope.$eval($scope.disableScroll) === true) || false,\n        continuous: continuous,\n        startSlide: $scope.activeSlide,\n        slidesChanged: function() {\n          $scope.currentSlide = slider.currentIndex();\n\n          // Try to trigger a digest\n          $timeout(function() {});\n        },\n        callback: function(slideIndex) {\n          $scope.currentSlide = slideIndex;\n          $scope.onSlideChanged({index:$scope.currentSlide});\n          $scope.$parent.$broadcast('slideBox.slideChanged', slideIndex);\n          $scope.activeSlide = slideIndex;\n          // Try to trigger a digest\n          $timeout(function() {});\n        }\n      });\n\n      $scope.$watch('activeSlide', function(nv) {\n        if(angular.isDefined(nv)){\n          slider.slide(nv);\n        }\n      });\n\n      $scope.$on('slideBox.nextSlide', function() {\n        slider.next();\n      });\n\n      $scope.$on('slideBox.prevSlide', function() {\n        slider.prev();\n      });\n\n      $scope.$on('slideBox.setSlide', function(e, index) {\n        slider.slide(index);\n      });\n\n      $parse($attrs.controllerBind || '$ionicSlideBoxController').assign($scope.$parent, slider);\n\n      this.slidesCount = function() {\n        return slider.slidesCount();\n      };\n\n      $timeout(function() {\n        slider.load();\n      });\n    }],\n    template: '<div class=\"slider\">\\\n            <div class=\"slider-slides\" ng-transclude>\\\n            </div>\\\n          </div>',\n\n    link: function($scope, $element, $attr, slideBoxCtrl) {\n      // If the pager should show, append it to the slide box\n      if($scope.$eval($scope.showPager) !== false) {\n        var childScope = $scope.$new();\n        var pager = angular.element('<ion-pager></ion-pager>');\n        $element.append(pager);\n        $compile(pager)(childScope);\n      }\n    }\n  };\n}])\n\n.directive('ionSlide', function() {\n  return {\n    restrict: 'E',\n    require: '^ionSlideBox',\n    compile: function(element, attr) {\n      element.addClass('slider-slide');\n      return function($scope, $element, $attr) {};\n    },\n  };\n})\n\n.directive('ionPager', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '^ionSlideBox',\n    template: '<div class=\"slider-pager\"><span class=\"slider-pager-page\" ng-repeat=\"slide in numSlides() track by $index\" ng-class=\"{active: $index == currentSlide}\"><i class=\"icon ion-record\"></i></span></div>',\n    link: function($scope, $element, $attr, slideBox) {\n      var selectPage = function(index) {\n        var children = $element[0].children;\n        var length = children.length;\n        for(var i = 0; i < length; i++) {\n          if(i == index) {\n            children[i].classList.add('active');\n          } else {\n            children[i].classList.remove('active');\n          }\n        }\n      };\n\n      $scope.numSlides = function() {\n        return new Array(slideBox.slidesCount());\n      };\n\n      $scope.$watch('currentSlide', function(v) {\n        selectPage(v);\n      });\n    }\n  };\n\n});\n\n})();\n\nangular.module('ionic.ui.tabs', ['ionic.service.view'])\n\n.run(['$ionicViewService', function($ionicViewService) {\n  // set that the tabs directive should not animate when transitioning\n  // to it. Instead, the children <tab> directives would animate\n  $ionicViewService.disableRegisterByTagName('ion-tabs');\n}])\n\n/**\n * @ngdoc controller\n * @name ionicTabs\n * @module ionic\n *\n * @description\n * Controller for the {@link ionic.directive:ionTabs} directive.\n */\n.controller('ionicTabs', ['$scope', '$ionicViewService', '$element', function($scope, $ionicViewService, $element) {\n  var _selectedTab = null;\n  var self = this;\n  self.tabs = [];\n\n  /**\n   * @ngdoc method\n   * @name ionicTabs#selectedTabIndex\n   * @returns `number` The index of the selected tab, or -1.\n   */\n  self.selectedTabIndex = function() {\n    return self.tabs.indexOf(_selectedTab);\n  };\n  /**\n   * @ngdoc method\n   * @name ionicTabs#selectedTab\n   * @returns `ionTab` The selected tab or null if none selected.\n   */\n  self.selectedTab = function() {\n    return _selectedTab;\n  };\n\n  self.add = function(tab) {\n    $ionicViewService.registerHistory(tab);\n    self.tabs.push(tab);\n    if(self.tabs.length === 1) {\n      self.select(tab);\n    }\n  };\n\n  self.remove = function(tab) {\n    var tabIndex = self.tabs.indexOf(tab);\n    if (tabIndex === -1) {\n      return;\n    }\n    //Use a field like '$tabSelected' so developers won't accidentally set it in controllers etc\n    if (tab.$tabSelected) {\n      self.deselect(tab);\n      //Try to select a new tab if we're removing a tab\n      if (self.tabs.length === 1) {\n        //do nothing if there are no other tabs to select\n      } else {\n        //Select previous tab if it's the last tab, else select next tab\n        var newTabIndex = tabIndex === self.tabs.length - 1 ? tabIndex - 1 : tabIndex + 1;\n        self.select(self.tabs[newTabIndex]);\n      }\n    }\n    self.tabs.splice(tabIndex, 1);\n  };\n\n  self.deselect = function(tab) {\n    if (tab.$tabSelected) {\n      _selectedTab = null;\n      tab.$tabSelected = false;\n      (tab.onDeselect || angular.noop)();\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name ionicTabs#select\n   * @description Select the given tab or tab index.\n   *\n   * @param {ionTab|number} tabOrIndex A tab object or index of a tab to select\n   * @param {boolean=} shouldChangeHistory Whether this selection should load this tab's view history\n   * (if it exists) and use it, or just loading the default page. Default false.\n   * Hint: you probably want this to be true if you have an\n   * {@link ionic.directive:ionNavView} inside your tab.\n   */\n  self.select = function(tab, shouldEmitEvent) {\n    var tabIndex;\n    if (angular.isNumber(tab)) {\n      tabIndex = tab;\n      tab = self.tabs[tabIndex];\n    } else {\n      tabIndex = self.tabs.indexOf(tab);\n    }\n    if (!tab || tabIndex == -1) {\n      throw new Error('Cannot select tab \"' + tabIndex + '\"!');\n    }\n\n    if (_selectedTab && _selectedTab.$historyId == tab.$historyId) {\n      if (shouldEmitEvent) {\n        $ionicViewService.goToHistoryRoot(tab.$historyId);\n      }\n    } else {\n      angular.forEach(self.tabs, function(tab) {\n        self.deselect(tab);\n      });\n\n      _selectedTab = tab;\n      //Use a funny name like $tabSelected so the developer doesn't overwrite the var in a child scope\n      tab.$tabSelected = true;\n      (tab.onSelect || angular.noop)();\n\n      if (shouldEmitEvent) {\n        var viewData = {\n          type: 'tab',\n          tabIndex: tabIndex,\n          historyId: tab.$historyId,\n          navViewName: tab.navViewName,\n          hasNavView: !!tab.navViewName,\n          title: tab.title,\n          //Skip the first character of href if it's #\n          url: tab.href,\n          uiSref: tab.uiSref\n        };\n        $scope.$emit('viewState.changeHistory', viewData);\n      }\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionTabs\n * @module ionic\n * @restrict E\n * @controller ionicTabs as $scope.$ionicTabsController\n * @codepen KbrzJ\n *\n * @description\n * Powers a multi-tabbed interface with a Tab Bar and a set of \"pages\" that can be tabbed\n * through.\n *\n * Assign any [tabs class](/docs/components#tabs) or\n * [animation class](/docs/components#animation) to the element to define\n * its look and feel.\n *\n * See the {@link ionic.directive:ionTab} directive's documentation for more details on\n * individual tabs.\n *\n * @usage\n * ```html\n * <ion-tabs class=\"tabs-positive tabs-icon-only\">\n *\n *   <ion-tab title=\"Home\" icon-on=\"ion-ios7-filing\" icon-off=\"ion-ios7-filing-outline\">\n *     <!-- Tab 1 content -->\n *   </ion-tab>\n *\n *   <ion-tab title=\"About\" icon-on=\"ion-ios7-clock\" icon-off=\"ion-ios7-clock-outline\">\n *     <!-- Tab 2 content -->\n *   </ion-tab>\n *\n *   <ion-tab title=\"Settings\" icon-on=\"ion-ios7-gear\" icon-off=\"ion-ios7-gear-outline\">\n *     <!-- Tab 3 content -->\n *   </ion-tab>\n * </ion-tabs>\n * ```\n *\n * @param {string=} controller-bind The scope variable to bind these tabs'\n * {@link ionic.controller:ionicTabs ionicTabs controller} to.\n * Default: $scope.$ionicTabsController.\n */\n\n.directive('ionTabs', ['$ionicViewService', '$parse', function($ionicViewService, $parse) {\n  return {\n    restrict: 'E',\n    scope: true,\n    controller: 'ionicTabs',\n    compile: function(element, attr) {\n      element.addClass('view');\n      //We cannot transclude here because it breaks element.data() inheritance on compile\n      var innerElement = angular.element('<div class=\"tabs\"></div>');\n      innerElement.append(element.contents());\n      element.append(innerElement);\n\n      return { pre: prelink };\n      function prelink($scope, $element, $attr, tabsCtrl) {\n        $parse(attr.model || '$ionicTabsController').assign($scope, tabsCtrl);\n\n        tabsCtrl.$scope = $scope;\n        tabsCtrl.$element = $element;\n        tabsCtrl.$tabsElement = angular.element($element[0].querySelector('.tabs'));\n\n        var el = $element[0];\n        $scope.$watch(function() { return el.className; }, function(value) {\n          var isTabsTop = value.indexOf('tabs-top') !== -1;\n          var isHidden = value.indexOf('tabs-item-hide') !== -1;\n          $scope.$hasTabs = !isTabsTop && !isHidden;\n          $scope.$hasTabsTop = isTabsTop && !isHidden;\n        });\n        $scope.$on('$destroy', function() {\n          $scope.$hasTabs = $scope.$hasTabsTop = null;\n        });\n      }\n    }\n  };\n}])\n\n.controller('ionicTab', ['$scope', '$ionicViewService', '$rootScope', '$element',\nfunction($scope, $ionicViewService, $rootScope, $element) {\n  this.$scope = $scope;\n}])\n\n/**\n * @ngdoc directive\n * @name ionTab\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionTabs\n *\n * @description\n * Contains a tab's content.  The content only exists while the given tab is selected.\n *\n * Each ionTab has its own view history.\n *\n * @usage\n * ```html\n * <ion-tab\n *   title=\"Tab!\"\n *   icon=\"my-icon\"\n *   href=\"#/tab/tab-link\"\n *   on-select=\"onTabSelected()\"\n *   on-deselect=\"onTabDeselected()\">\n * </ion-tab>\n * ```\n * For a complete, working tab bar example, see the {@link ionic.directive:ionTabs} documentation.\n *\n * @param {string} title The title of the tab.\n * @param {string=} href The link that this tab will navigate to when tapped.\n * @param {string=} icon The icon of the tab. If given, this will become the default for icon-on and icon-off.\n * @param {string=} icon-on The icon of the tab while it is selected.\n * @param {string=} icon-off The icon of the tab while it is not selected.\n * @param {expression=} badge The badge to put on this tab (usually a number).\n * @param {expression=} badge-style The style of badge to put on this tab (eg tabs-positive).\n * @param {expression=} on-select Called when this tab is selected.\n * @param {expression=} on-deselect Called when this tab is deselected.\n * @param {expression=} ng-click By default, the tab will be selected on click. If ngClick is set, it will not.  You can explicitly switch tabs using {@link ionic.controller:ionicTabs#select ionicTabBar controller's select method}.\n */\n.directive('ionTab', ['$rootScope', '$animate', '$ionicBind', '$compile', '$ionicViewService',\nfunction($rootScope, $animate, $ionicBind, $compile, $ionicViewService) {\n\n  //Returns ' key=\"value\"' if value exists\n  function attrStr(k,v) {\n    return angular.isDefined(v) ? ' ' + k + '=\"' + v + '\"' : '';\n  }\n  return {\n    restrict: 'E',\n    require: ['^ionTabs', 'ionTab'],\n    replace: true,\n    controller: 'ionicTab',\n    scope: true,\n    compile: function(element, attr) {\n      //Do we have a navView?\n      var navView = element[0].querySelector('ion-nav-view') ||\n        element[0].querySelector('data-ion-nav-view');\n      var navViewName = navView && navView.getAttribute('name');\n\n      var tabNavItem = angular.element(\n        element[0].querySelector('ion-tab-nav') ||\n        element[0].querySelector('data-ion-tab-nav')\n      ).remove();\n\n      //Remove the contents of the element so we can compile them later, if tab is selected\n      var tabContent = angular.element('<div class=\"pane\">')\n        .append( element.contents().remove() );\n      return function link($scope, $element, $attr, ctrls) {\n        var childScope, childElement, tabNavElement;\n          tabsCtrl = ctrls[0],\n          tabCtrl = ctrls[1];\n\n        //Remove title attribute so browser-tooltip does not apear\n        $element[0].removeAttribute('title');\n\n        $ionicBind($scope, $attr, {\n          animate: '=',\n          onSelect: '&',\n          onDeselect: '&',\n          title: '@',\n          uiSref: '@',\n          href: '@',\n        });\n\n        tabsCtrl.add($scope);\n        $scope.$on('$destroy', function() {\n          tabsCtrl.remove($scope);\n          tabNavElement.isolateScope().$destroy();\n          tabNavElement.remove();\n        });\n\n        if (navViewName) {\n          $scope.navViewName = navViewName;\n          $scope.$on('$stateChangeSuccess', selectTabIfMatchesState);\n          selectTabIfMatchesState();\n        }\n\n        tabNavElement = angular.element(\n          '<ion-tab-nav' +\n          attrStr('ng-click', attr.ngClick) +\n          attrStr('title', attr.title) +\n          attrStr('icon', attr.icon) +\n          attrStr('icon-on', attr.iconOn) +\n          attrStr('icon-off', attr.iconOff) +\n          attrStr('badge', attr.badge) +\n          attrStr('badge-style', attr.badgeStyle) +\n          '></ion-tab-nav>'\n        );\n        tabNavElement.data('$ionTabsController', tabsCtrl);\n        tabNavElement.data('$ionTabController', tabCtrl);\n        tabsCtrl.$tabsElement.append($compile(tabNavElement)($scope));\n\n        $scope.$watch('$tabSelected', function(value) {\n          childScope && childScope.$destroy();\n          childScope = null;\n          childElement && $animate.leave(childElement);\n          childElement = null;\n          if (value) {\n            childScope = $scope.$new();\n            childElement = tabContent.clone();\n            $animate.enter(childElement, tabsCtrl.$element);\n            $compile(childElement)(childScope);\n          }\n        });\n\n        function selectTabIfMatchesState() {\n          // this tab's ui-view is the current one, go to it!\n          if ($ionicViewService.isCurrentStateNavView($scope.navViewName)) {\n            tabsCtrl.select($scope);\n          }\n        }\n      };\n    }\n  };\n}])\n\n.directive('ionTabNav', ['$ionicNgClick', function($ionicNgClick) {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: ['^ionTabs', '^ionTab'],\n    template:\n    '<a ng-class=\"{\\'tab-item-active\\': isTabActive(), \\'has-badge\\':badge}\" ' +\n      ' class=\"tab-item\">' +\n      '<span class=\"badge {{badgeStyle}}\" ng-if=\"badge\">{{badge}}</span>' +\n      '<i class=\"icon {{getIconOn()}}\" ng-if=\"getIconOn() && isTabActive()\"></i>' +\n      '<i class=\"icon {{getIconOff()}}\" ng-if=\"getIconOff() && !isTabActive()\"></i>' +\n      '<span class=\"tab-title\" ng-bind-html=\"title\"></span>' +\n    '</a>',\n    scope: {\n      title: '@',\n      icon: '@',\n      iconOn: '@',\n      iconOff: '@',\n      badge: '=',\n      badgeStyle: '@'\n    },\n    compile: function(element, attr, transclude) {\n      return function link($scope, $element, $attrs, ctrls) {\n        var tabsCtrl = ctrls[0],\n          tabCtrl = ctrls[1];\n\n        //Remove title attribute so browser-tooltip does not apear\n        $element[0].removeAttribute('title');\n\n        $scope.selectTab = function(e) {\n          e.preventDefault();\n          tabsCtrl.select(tabCtrl.$scope, true);\n        };\n        if (!$attrs.ngClick) {\n          $ionicNgClick($scope, $element, 'selectTab($event)');\n        }\n\n        $scope.getIconOn = function() {\n          return $scope.iconOn || $scope.icon;\n        };\n        $scope.getIconOff = function() {\n          return $scope.iconOff || $scope.icon;\n        };\n\n        $scope.isTabActive = function() {\n          return tabsCtrl.selectedTab() === tabCtrl.$scope;\n        };\n      };\n    }\n  };\n}]);\n\n(function(ionic) {\n'use strict';\n\nangular.module('ionic.ui.toggle', [])\n\n/**\n * @ngdoc directive\n * @name ionToggle\n * @module ionic\n * @restrict E\n *\n * @description\n * An animated switch which binds a given model to a boolean.\n *\n * Allows dragging of the switch's nub.\n *\n * Behaves like any [AngularJS checkbox](http://docs.angularjs.org/api/ng/input/input[checkbox]) otherwise.\n *\n */\n.directive('ionToggle', ['$ionicGesture', '$timeout', function($ionicGesture, $timeout) {\n\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '?ngModel',\n    scope: {\n      ngModel: '=?',\n      ngValue: '=?',\n      ngChecked: '=?',\n      ngChange: '&',\n      ngDisabled: '=?'\n    },\n    transclude: true,\n    template: '<div class=\"item item-toggle disable-pointer-events\">' +\n                '<div ng-transclude></div>' +\n                '<label class=\"toggle enable-pointer-events\">' +\n                  '<input type=\"checkbox\" ng-model=\"ngModel\" ng-value=\"ngValue\" ng-change=\"ngChange()\" ng-disabled=\"ngDisabled\">' +\n                  '<div class=\"track disable-pointer-events\">' +\n                    '<div class=\"handle\"></div>' +\n                  '</div>' +\n                '</label>' +\n              '</div>',\n\n    compile: function(element, attr) {\n      var input = element.find('input');\n      if(attr.name) input.attr('name', attr.name);\n      if(attr.ngChecked) input.attr('ng-checked', 'ngChecked');\n      if(attr.ngTrueValue) input.attr('ng-true-value', attr.ngTrueValue);\n      if(attr.ngFalseValue) input.attr('ng-false-value', attr.ngFalseValue);\n\n      return function($scope, $element, $attr) {\n         var el, checkbox, track, handle;\n\n         el = $element[0].getElementsByTagName('label')[0];\n         checkbox = el.children[0];\n         track = el.children[1];\n         handle = track.children[0];\n         \n         var ngModelController = angular.element(checkbox).controller('ngModel');\n\n         $scope.toggle = new ionic.views.Toggle({\n           el: el,\n           track: track,\n           checkbox: checkbox,\n           handle: handle,\n           onChange: function() {\n             if(checkbox.checked) {\n               ngModelController.$setViewValue(true);\n             } else {\n               ngModelController.$setViewValue(false);\n             }\n             $scope.$apply();\n           }\n         });\n\n         $scope.$on('$destroy', function() {\n           $scope.toggle.destroy();\n         });\n      };\n    }\n\n  };\n}]);\n\n})(window.ionic);\n\n\n// Similar to Angular's ngTouch, however it uses Ionic's tap detection\n// and click simulation. ngClick\n\n(function(angular, ionic) {'use strict';\n\nangular.module('ionic.ui.touch', [])\n\n  .config(['$provide', function($provide) {\n    $provide.decorator('ngClickDirective', ['$delegate', function($delegate) {\n      // drop the default ngClick directive\n      $delegate.shift();\n      return $delegate;\n    }]);\n  }])\n\n  /**\n   * @private\n   */\n  .factory('$ionicNgClick', ['$parse', function($parse) {\n    function onTap(e) {\n      // wire this up to Ionic's tap/click simulation\n      ionic.tapElement(e.target, e);\n    }\n    return function(scope, element, clickExpr) {\n      var clickHandler = $parse(clickExpr);\n\n      element.on('click', function(event) {\n        scope.$apply(function() {\n          clickHandler(scope, {$event: (event)});\n        });\n      });\n\n      ionic.on(\"release\", onTap, element[0]);\n\n      // Hack for iOS Safari's benefit. It goes searching for onclick handlers and is liable to click\n      // something else nearby.\n      element.onclick = function(event) { };\n\n      scope.$on('$destroy', function () {\n        ionic.off(\"release\", onTap, element[0]);\n      });\n    };\n  }])\n\n  .directive('ngClick', ['$ionicNgClick', function($ionicNgClick) {\n    return function(scope, element, attr) {\n      $ionicNgClick(scope, element, attr.ngClick);\n    };\n  }])\n\n  .directive('ionStopEvent', function () {\n    function stopEvent(e) {\n      e.stopPropagation();\n    }\n    return {\n      restrict: 'A',\n      link: function (scope, element, attr) {\n        element.bind(attr.ionStopEvent, stopEvent);\n      }\n    };\n  });\n\n\n})(window.angular, window.ionic);\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gesture', 'ngSanitize'])\n\n/**\n * @ngdoc directive\n * @name ionView\n * @module ionic\n * @restrict E\n * @parent ionNavView\n *\n * @description\n * A container for content, used to tell a parent {@link ionic.directive:ionNavBar}\n * about the current view.\n *\n * @usage\n * Below is an example where our page will load with a navbar containing \"My Page\" as the title.\n *\n * ```html\n * <ion-nav-bar></ion-nav-bar>\n * <ion-nav-view class=\"slide-left-right\">\n *   <ion-view title=\"My Page\">\n *     <ion-content>\n *       Hello!\n *     </ion-content>\n *   </ion-view>\n * </ion-nav-view>\n * ```\n *\n * @param {string=} title The title to display on the parent {@link ionic.directive:ionNavBar}.\n * @param {boolean=} hideBackButton Whether to hide the back button on the parent\n * {@link ionic.directive:ionNavBar} by default.\n * @param {boolean=} hideNavBar Whether to hide the parent\n * {@link ionic.directive:ionNavBar} by default.\n */\n.directive('ionView', ['$ionicViewService', '$rootScope', '$animate',\n           function( $ionicViewService,   $rootScope,   $animate) {\n  return {\n    restrict: 'EA',\n    priority: 1000,\n    require: '^?ionNavBar',\n    compile: function(tElement, tAttrs, transclude) {\n      tElement.addClass('pane');\n      tElement[0].removeAttribute('title');\n\n      return function link($scope, $element, $attr, navBarCtrl) {\n        if (!navBarCtrl) {\n          return;\n        }\n        navBarCtrl.changeTitle($attr.title, $scope.$navDirection);\n\n        $scope.$watch($attr.hideBackButton, function(value) {\n          // Should we hide a back button when this tab is shown\n          navBarCtrl.showBackButton(!value);\n        });\n\n        $scope.$watch($attr.hideNavBar, function(value) {\n          // Should the nav bar be hidden for this view or not?\n          navBarCtrl.showBar(!value);\n        });\n\n        // watch for changes in the title\n        $attr.$observe('title', function(val, oldVal) {\n          if (val) {\n            navBarCtrl.setTitle(val);\n          }\n        });\n      };\n    }\n  };\n}])\n\n\n/**\n * @ngdoc directive\n * @name ionNavView\n * @module ionic\n * @restrict E\n * @codepen HjnFx\n *\n * @description\n * As a user navigates throughout your app, Ionic is able to keep track of their\n * navigation history. By knowing their history, transitions between views\n * correctly slide either left or right, or no transition at all. An additional\n * benefit to Ionic's navigation system is its ability to manage multiple\n * histories.\n *\n * Ionic uses the AngularUI Router module so app interfaces can be organized\n * into various \"states\". Like Angular's core $route service, URLs can be used\n * to control the views. However, the AngularUI Router provides a more powerful\n * state manager in that states are bound to named, nested, and parallel views,\n * allowing more than one template to be rendered on the same page.\n * Additionally, each state is not required to be bound to a URL, and data can\n * be pushed to each state which allows much flexibility.\n *\n * The ionNavView directive is used to render templates in your application. Each template\n * is part of a state. States are usually mapped to a url, and are defined programatically\n * using angular-ui-router (see [their docs](https://github.com/angular-ui/ui-router/wiki)),\n * and remember to replace ui-view with ion-nav-view in examples).\n *\n * @usage\n * In this example, we will create a navigation view that contains our different states for the app.\n *\n * To do this, in our markup use the ionNavView top level directive, adding an\n * {@link ionic.directive:ionNavBar} directive which will render a header bar that updates as we\n * navigate through the navigation stack.\n *\n * You can any [animation class](/docs/components#animation) on the navView to have its pages slide.\n * Recommended for page transitions: 'slide-left-right', 'slide-left-right-ios7', 'slide-in-up'.\n *\n * ```html\n * <ion-nav-view class=\"slide-left-right\">\n *   <!-- Center content -->\n *   <ion-nav-bar>\n *   </ion-nav-bar>\n * </ion-nav-view>\n * ```\n *\n * Next, we need to setup our states that will be rendered.\n *\n * ```js\n * var app = angular.module('myApp', ['ionic']);\n * app.config(function($stateProvider) {\n *   $stateProvider\n *   .state('index', {\n *     url: '/',\n *     templateUrl: 'home.html'\n *   })\n *   .state('music', {\n *     url: '/music',\n *     templateUrl: 'music.html'\n *   });\n * });\n * ```\n * Then on app start, $stateProvider will look at the url, see it matches the index state,\n * and then try to load home.html into the `<ion-nav-view>`.\n *\n * Pages are loaded by the URLs given. One simple way to create templates in Angular is to put\n * them directly into your HTML file and use the `<script type=\"text/ng-template\">` syntax.\n * So here is one way to put home.html into our app:\n *\n * ```html\n * <script id=\"home\" type=\"text/ng-template\">\n *   <!-- The title of the ion-view will be shown on the navbar -->\n *   <ion-view title=\"'Home'\">\n *     <ion-content ng-controller=\"HomeCtrl\">\n *       <!-- The content of the page -->\n *       <a href=\"#/music\">Go to music page!</a>\n *     </ion-content>\n *   </ion-view>\n * </script>\n * ```\n *\n * This is good to do because the template will be cached for very fast loading, instead of\n * having to fetch them from the network.\n *\n * Please visit [AngularUI Router's docs](https://github.com/angular-ui/ui-router/wiki) for\n * more info. Below is a great video by the AngularUI Router guys that may help to explain\n * how it all works:\n *\n * <iframe width=\"560\" height=\"315\" src=\"//www.youtube.com/embed/dqJRoh8MnBo\"\n * frameborder=\"0\" allowfullscreen></iframe>\n *\n * @param {string=} name A view name. The name should be unique amongst the other views in the\n * same state. You can have views of the same name that live in different states. For more\n * information, see ui-router's [ui-view documentation](http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.directive:ui-view).\n */\n.directive('ionNavView', ['$ionicViewService', '$state', '$compile', '$controller', '$animate',\n              function( $ionicViewService,   $state,   $compile,   $controller,   $animate) {\n  // IONIC's fork of Angular UI Router, v0.2.7\n  // the navView handles registering views in the history, which animation to use, and which\n  var viewIsUpdating = false;\n\n  var directive = {\n    restrict: 'E',\n    terminal: true,\n    priority: 2000,\n    transclude: true,\n    controller: [function(){\n    }],\n    compile: function (element, attr, transclude) {\n      return function(scope, element, attr, navViewCtrl) {\n        var viewScope, viewLocals,\n            name = attr[directive.name] || attr.name || '',\n            onloadExp = attr.onload || '',\n            initialView = transclude(scope);\n\n        // Put back the compiled initial view\n        element.append(initialView);\n\n        // Find the details of the parent view directive (if any) and use it\n        // to derive our own qualified view name, then hang our own details\n        // off the DOM so child directives can find it.\n        var parent = element.parent().inheritedData('$uiView');\n        if (name.indexOf('@') < 0) name  = name + '@' + (parent ? parent.state.name : '');\n        var view = { name: name, state: null };\n        element.data('$uiView', view);\n\n        var eventHook = function() {\n          if (viewIsUpdating) return;\n          viewIsUpdating = true;\n\n          try { updateView(true); } catch (e) {\n            viewIsUpdating = false;\n            throw e;\n          }\n          viewIsUpdating = false;\n        };\n\n        scope.$on('$stateChangeSuccess', eventHook);\n        scope.$on('$viewContentLoading', eventHook);\n        updateView(false);\n\n        function updateView(doAnimate) {\n          //===false because $animate.enabled() is a noop without angular-animate included\n          if ($animate.enabled() === false) {\n            doAnimate = false;\n          }\n\n          var locals = $state.$current && $state.$current.locals[name];\n          if (locals === viewLocals) return; // nothing to do\n          var renderer = $ionicViewService.getRenderer(element, attr, scope);\n\n          // Destroy previous view scope\n          if (viewScope) {\n            viewScope.$destroy();\n            viewScope = null;\n          }\n\n          if (!locals) {\n            viewLocals = null;\n            view.state = null;\n\n            // Restore the initial view\n            return element.append(initialView);\n          }\n\n          var newElement = angular.element('<div></div>').html(locals.$template).contents();\n          var viewRegisterData = renderer().register(newElement);\n\n          // Remove existing content\n          renderer(doAnimate).leave();\n\n          viewLocals = locals;\n          view.state = locals.$$state;\n\n          renderer(doAnimate).enter(newElement);\n\n          var link = $compile(newElement);\n          viewScope = scope.$new();\n\n          viewScope.$navDirection = viewRegisterData.navDirection;\n\n          if (locals.$$controller) {\n            locals.$scope = viewScope;\n            var controller = $controller(locals.$$controller, locals);\n            element.children().data('$ngControllerController', controller);\n          }\n          link(viewScope);\n\n          var viewHistoryData = $ionicViewService._getViewById(viewRegisterData.viewId) || {};\n          viewScope.$broadcast('$viewContentLoaded', viewHistoryData);\n\n          if (onloadExp) viewScope.$eval(onloadExp);\n\n          newElement = null;\n        }\n      };\n    }\n  };\n  return directive;\n}])\n\n\n/**\n * @ngdoc directive\n * @name navClear\n * @module ionic\n * @restrict AC\n *\n * @description\n * Disables any transition animations between views, along with removing the back\n * button which would normally show on the next view. This directive is useful for\n * links within a sideMenu.\n *\n * @usage\n * Below is an example of a link within a side menu. Tapping this link would disable\n * any animations which would normally occur between views.\n *\n * ```html\n * <a nav-clear menu-close href=\"#/home\" class=\"item\">Home</a>\n * ```\n */\n.directive('navClear', ['$ionicViewService', function($ionicViewService) {\n  return {\n    restrict: 'AC',\n    link: function($scope, $element, $attr) {\n      $element.bind('click', function(){\n        $ionicViewService.nextViewOptions({\n          disableAnimate: true,\n          disableBack: true\n        });\n      });\n    }\n  };\n}]);\n\n})();\n\n/*\n(function() {\n'use strict';\n\nangular.module('ionic.ui.virtRepeat', [])\n\n.directive('ionVirtRepeat', function() {\n  return {\n    require: ['?ngModel', '^virtualList'],\n    transclude: 'element',\n    priority: 1000,\n    terminal: true,\n    compile: function(element, attr, transclude) {\n      return function($scope, $element, $attr, ctrls) {\n        var virtualList = ctrls[1];\n\n        virtualList.listView.renderViewport = function(high, low, start, end) {\n        };\n      };\n    }\n  };\n});\n})(ionic);\n*/\n\n/*\n(function() {\n'use strict';\n\n// Turn the expression supplied to the directive:\n//\n//     a in b\n//\n// into `{ value: \"a\", collection: \"b\" }`\nfunction parseRepeatExpression(expression){\n  var match = expression.match(/^\\s*([\\$\\w]+)\\s+in\\s+(\\S*)\\s*$/);\n  if (! match) {\n    throw new Error(\"Expected sfVirtualRepeat in form of '_item_ in _collection_' but got '\" +\n                    expression + \"'.\");\n  }\n  return {\n    value: match[1],\n    collection: match[2]\n  };\n}\n\n// Utility to filter out elements by tag name\nfunction isTagNameInList(element, list){\n  var t, tag = element.tagName.toUpperCase();\n  for( t = 0; t < list.length; t++ ){\n    if( list[t] === tag ){\n      return true;\n    }\n  }\n  return false;\n}\n\n\n// Utility to find the viewport/content elements given the start element:\nfunction findViewportAndContent(startElement){\n  var root = $rootElement[0];\n  var e, n;\n  // Somewhere between the grandparent and the root node\n  for( e = startElement.parent().parent()[0]; e !== root; e = e.parentNode ){\n    // is an element\n    if( e.nodeType != 1 ) break;\n    // that isn't in the blacklist (tables etc.),\n    if( isTagNameInList(e, DONT_WORK_AS_VIEWPORTS) ) continue;\n    // has a single child element (the content),\n    if( e.childElementCount != 1 ) continue;\n    // which is not in the blacklist\n    if( isTagNameInList(e.firstElementChild, DONT_WORK_AS_CONTENT) ) continue;\n    // and no text.\n    for( n = e.firstChild; n; n = n.nextSibling ){\n      if( n.nodeType == 3 && /\\S/g.test(n.textContent) ){\n        break;\n      }\n    }\n    if( n === null ){\n      // That element should work as a viewport.\n      return {\n        viewport: angular.element(e),\n        content: angular.element(e.firstElementChild)\n      };\n    }\n  }\n  throw new Error(\"No suitable viewport element\");\n}\n\n// Apply explicit height and overflow styles to the viewport element.\n//\n// If the viewport has a max-height (inherited or otherwise), set max-height.\n// Otherwise, set height from the current computed value or use\n// window.innerHeight as a fallback\n//\nfunction setViewportCss(viewport){\n  var viewportCss = {'overflow': 'auto'},\n      style = window.getComputedStyle ?\n        window.getComputedStyle(viewport[0]) :\n        viewport[0].currentStyle,\n      maxHeight = style && style.getPropertyValue('max-height'),\n      height = style && style.getPropertyValue('height');\n\n  if( maxHeight && maxHeight !== '0px' ){\n    viewportCss.maxHeight = maxHeight;\n  }else if( height && height !== '0px' ){\n    viewportCss.height = height;\n  }else{\n    viewportCss.height = window.innerHeight;\n  }\n  viewport.css(viewportCss);\n}\n\n// Apply explicit styles to the content element to prevent pesky padding\n// or borders messing with our calculations:\nfunction setContentCss(content){\n  var contentCss = {\n    margin: 0,\n    padding: 0,\n    border: 0,\n    'box-sizing': 'border-box'\n  };\n  content.css(contentCss);\n}\n\n// TODO: compute outerHeight (padding + border unless box-sizing is border)\nfunction computeRowHeight(element){\n  var style = window.getComputedStyle ? window.getComputedStyle(element)\n                                      : element.currentStyle,\n      maxHeight = style && style.getPropertyValue('max-height'),\n      height = style && style.getPropertyValue('height');\n\n  if( height && height !== '0px' && height !== 'auto' ){\n    $log.info('Row height is \"%s\" from css height', height);\n  }else if( maxHeight && maxHeight !== '0px' && maxHeight !== 'none' ){\n    height = maxHeight;\n    $log.info('Row height is \"%s\" from css max-height', height);\n  }else if( element.clientHeight ){\n    height = element.clientHeight+'px';\n    $log.info('Row height is \"%s\" from client height', height);\n  }else{\n    throw new Error(\"Unable to compute height of row\");\n  }\n  angular.element(element).css('height', height);\n  return parseInt(height, 10);\n}\n\nangular.module('ionic.ui.virtualRepeat', [])\n\n//\n// A replacement for ng-repeat that supports virtual lists.\n// This is not a 1 to 1 replacement for ng-repeat. However, in situations\n// where you have huge lists, this repeater will work with our virtual\n// scrolling to only render items that are showing or will be showing\n// if a scroll is made.\n//\n.directive('ionVirtualRepeat', ['$log', function($log) {\n    return {\n      require: ['?ngModel, ^virtualList'],\n      transclude: 'element',\n      priority: 1000,\n      terminal: true,\n      compile: function(element, attr, transclude) {\n        var ident = parseRepeatExpression(attr.sfVirtualRepeat);\n\n        return function(scope, iterStartElement, attrs, ctrls, b) {\n          var virtualList = ctrls[1];\n\n          var rendered = [];\n          var rowHeight = 0;\n          var sticky = false;\n\n          var dom = virtualList.element;\n          //var dom = findViewportAndContent(iterStartElement);\n\n          // The list structure is controlled by a few simple (visible) variables:\n          var state = 'ngModel' in attrs ? scope.$eval(attrs.ngModel) : {};\n\n          function makeNewScope (idx, collection, containerScope) {\n            var childScope = containerScope.$new();\n            childScope[ident.value] = collection[idx];\n            childScope.$index = idx;\n            childScope.$first = (idx === 0);\n            childScope.$last = (idx === (collection.length - 1));\n            childScope.$middle = !(childScope.$first || childScope.$last);\n            childScope.$watch(function updateChildScopeItem(){\n              childScope[ident.value] = collection[idx];\n            });\n            return childScope;\n          }\n\n          // Given the collection and a start and end point, add the current\n          function addElements (start, end, collection, containerScope, insPoint) {\n            var frag = document.createDocumentFragment();\n            var newElements = [], element, idx, childScope;\n            for( idx = start; idx !== end; idx ++ ){\n              childScope = makeNewScope(idx, collection, containerScope);\n              element = linker(childScope, angular.noop);\n              //setElementCss(element);\n              newElements.push(element);\n              frag.appendChild(element[0]);\n            }\n            insPoint.after(frag);\n            return newElements;\n          }\n\n          function recomputeActive() {\n            // We want to set the start to the low water mark unless the current\n            // start is already between the low and high water marks.\n            var start = clip(state.firstActive, state.firstVisible - state.lowWater, state.firstVisible - state.highWater);\n            // Similarly for the end\n            var end = clip(state.firstActive + state.active,\n                           state.firstVisible + state.visible + state.lowWater,\n                           state.firstVisible + state.visible + state.highWater );\n            state.firstActive = Math.max(0, start);\n            state.active = Math.min(end, state.total) - state.firstActive;\n          }\n\n          function sfVirtualRepeatOnScroll(evt){\n            if( !rowHeight ){\n              return;\n            }\n            // Enter the angular world for the state change to take effect.\n            scope.$apply(function(){\n              state.firstVisible = Math.floor(evt.target.scrollTop / rowHeight);\n              state.visible = Math.ceil(dom.viewport[0].clientHeight / rowHeight);\n              $log.log('scroll to row %o', state.firstVisible);\n              sticky = evt.target.scrollTop + evt.target.clientHeight >= evt.target.scrollHeight;\n              recomputeActive();\n              $log.log(' state is now %o', state);\n              $log.log(' sticky = %o', sticky);\n            });\n          }\n\n          function sfVirtualRepeatWatchExpression(scope){\n            var coll = scope.$eval(ident.collection);\n            if( coll.length !== state.total ){\n              state.total = coll.length;\n              recomputeActive();\n            }\n            return {\n              start: state.firstActive,\n              active: state.active,\n              len: coll.length\n            };\n          }\n\n          function destroyActiveElements (action, count) {\n            var dead, ii, remover = Array.prototype[action];\n            for( ii = 0; ii < count; ii++ ){\n              dead = remover.call(rendered);\n              dead.scope().$destroy();\n              dead.remove();\n            }\n          }\n\n          // When the watch expression for the repeat changes, we may need to add\n          // and remove scopes and elements\n          function sfVirtualRepeatListener(newValue, oldValue, scope){\n            var oldEnd = oldValue.start + oldValue.active,\n                collection = scope.$eval(ident.collection),\n                newElements;\n            if(newValue === oldValue) {\n              $log.info('initial listen');\n              newElements = addElements(newValue.start, oldEnd, collection, scope, iterStartElement);\n              rendered = newElements;\n              if(rendered.length) {\n                rowHeight = computeRowHeight(newElements[0][0]);\n              }\n            } else {\n              var newEnd = newValue.start + newValue.active;\n              var forward = newValue.start >= oldValue.start;\n              var delta = forward ? newValue.start - oldValue.start\n                                  : oldValue.start - newValue.start;\n              var endDelta = newEnd >= oldEnd ? newEnd - oldEnd : oldEnd - newEnd;\n              var contiguous = delta < (forward ? oldValue.active : newValue.active);\n              $log.info('change by %o,%o rows %s', delta, endDelta, forward ? 'forward' : 'backward');\n              if(!contiguous) {\n                $log.info('non-contiguous change');\n                destroyActiveElements('pop', rendered.length);\n                rendered = addElements(newValue.start, newEnd, collection, scope, iterStartElement);\n              } else {\n                if(forward) {\n                  $log.info('need to remove from the top');\n                  destroyActiveElements('shift', delta);\n                } else if(delta) {\n                  $log.info('need to add at the top');\n                  newElements = addElements(\n                    newValue.start,\n                    oldValue.start,\n                    collection, scope, iterStartElement);\n                  rendered = newElements.concat(rendered);\n                }\n\n                if(newEnd < oldEnd) {\n                  $log.info('need to remove from the bottom');\n                  destroyActiveElements('pop', oldEnd - newEnd);\n                } else if(endDelta) {\n                  var lastElement = rendered[rendered.length-1];\n                  $log.info('need to add to the bottom');\n                  newElements = addElements(\n                    oldEnd,\n                    newEnd,\n                    collection, scope, lastElement);\n                  rendered = rendered.concat(newElements);\n                }\n              }\n              if(!rowHeight && rendered.length) {\n                rowHeight = computeRowHeight(rendered[0][0]);\n              }\n              dom.content.css({'padding-top': newValue.start * rowHeight + 'px'});\n            }\n            dom.content.css({'height': newValue.len * rowHeight + 'px'});\n            if(sticky) {\n              dom.viewport[0].scrollTop = dom.viewport[0].clientHeight + dom.viewport[0].scrollHeight;\n            }\n          }\n\n          //  - The index of the first active element\n          state.firstActive = 0;\n          //  - The index of the first visible element\n          state.firstVisible = 0;\n          //  - The number of elements visible in the viewport.\n          state.visible = 0;\n          // - The number of active elements\n          state.active = 0;\n          // - The total number of elements\n          state.total = 0;\n          // - The point at which we add new elements\n          state.lowWater = state.lowWater || 100;\n          // - The point at which we remove old elements\n          state.highWater = state.highWater || 300;\n          // TODO: now watch the water marks\n\n          setContentCss(dom.content);\n          setViewportCss(dom.viewport);\n          // When the user scrolls, we move the `state.firstActive`\n          dom.bind('momentumScrolled', sfVirtualRepeatOnScroll);\n\n          scope.$on('$destroy', function () {\n            dom.unbind('momentumScrolled', sfVirtualRepeatOnScroll);\n          });\n\n          // The watch on the collection is just a watch on the length of the\n          // collection. We don't care if the content changes.\n          scope.$watch(sfVirtualRepeatWatchExpression, sfVirtualRepeatListener, true);\n        };\n      }\n    };\n  }]);\n\n})(ionic);\n*/\n\nangular.module('ionic.ui.scroll')\n\n/**\n * @ngdoc service\n * @name $ionicScrollDelegate\n * @module ionic\n * @description\n * Delegate for controlling scrollViews (created by\n * {@link ionic.directive:ionContent} and\n * {@link ionic.directive:ionScroll} directives).\n *\n * Each method on $ionicScrollDelegate can be called on the service itself to control all scrollViews.  Alternatively, one can control one specific scrollView using `forHandle` and `delegate-handle`. See the example below.\n *\n * @usage\n *\n * ```html\n * <body ng-controller=\"MainCtrl\">\n *   <ion-content>\n *     <button ng-click=\"scrollTop()\">Scroll to Top!</button>\n *   </ion-content>\n * </body>\n * ```\n * ```js\n * function MainCtrl($scope, $ionicScrollDelegate) {\n *   $scope.scrollTop = function() {\n *     $ionicScrollDelegate.scrollTop();\n *   };\n * }\n * ```\n *\n * Example of advanced usage, with two scroll areas using `delegate-handle`\n * for fine control.\n *\n * ```html\n * <body ng-controller=\"MainCtrl\">\n *   <ion-content delegate-handle=\"mainScroll\">\n *     <button ng-click=\"scrollMainToTop()\">\n *       Scroll content to top!\n *     </button>\n *     <ion-scroll delegate-handle=\"small\" style=\"height: 100px;\">\n *       <button ng-click=\"scrollSmallToTop()\">\n *         Scroll small area to top!\n *       </button>\n *     </ion-scroll>\n *   </ion-content>\n * </body>\n * ```\n * ```js\n * function MainCtrl($scope, $ionicScrollDelegate) {\n *   $scope.scrollMainToTop = function() {\n *     $ionicScrollDelegate.forHandle('mainScroll').scrollTop();\n *   };\n *   $scope.scrollSmallToTop = function() {\n *     $ionicScrollDelegate.forHandle('small').scrollTop();\n *   };\n * }\n * ```\n */\n\n.service('$ionicScrollDelegate', delegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#resize\n   * @description Tell the scrollView to recalculate the size of its container.\n   */\n  'resize',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scrollTop\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'scrollTop',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scrollBottom\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'scrollBottom',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scroll\n   * @param {number} left The x-value to scroll to.\n   * @param {number} top The y-value to scroll to.\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'scrollTo',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#anchorScroll\n   * @description Tell the scrollView to scroll to the element with an id\n   * matching window.location.hash.\n   *\n   * If no matching element is found, it will scroll to top.\n   *\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'anchorScroll',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#rememberScrollPosition\n   * @description\n   * Will make it so, when this scrollView is destroyed (user leaves the page),\n   * the last scroll position the page was on will be saved, indexed by the\n   * given id.\n   *\n   * Note: for pages associated with a view under an ion-nav-view,\n   * rememberScrollPosition automatically saves their scroll.\n   *\n   * Related methods: scrollToRememberedPosition, forgetScrollPosition (below).\n   *\n   * In the following example, the scroll position of the ion-scroll element\n   * will persist, even when the user changes the toggle switch.\n   *\n   * ```html\n   * <ion-toggle ng-model=\"shouldShowScrollView\"></ion-toggle>\n   * <ion-scroll delegate-handle=\"myScroll\" ng-if=\"shouldShowScrollView\">\n   *   <div ng-controller=\"ScrollCtrl\">\n   *     <ion-list>\n   *       <ion-item ng-repeat=\"i in items\">{{i}}</ion-item>\n   *     </ion-list>\n   *   </div>\n   * </ion-scroll>\n   * ```\n   * ```js\n   * function ScrollCtrl($scope, $ionicScrollDelegate) {\n   *   var delegate = $ionicScrollDelegate.forHandle('myScroll');\n   *\n   *   // Put any unique ID here.  The point of this is: every time the controller is recreated\n   *   // we want to load the correct remembered scroll values.\n   *   delegate.rememberScrollPosition('my-scroll-id');\n   *   delegate.scrollToRememberedPosition();\n   *   $scope.items = [];\n   *   for (var i=0; i<100; i++) {\n   *     $scope.items.push(i);\n   *   }\n   * }\n   * ```\n   *\n   * @param {string} id The id to remember the scroll position of this\n   * scrollView by.\n   */\n  'rememberScrollPosition',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#forgetScrollPosition\n   * @description\n   * Stop remembering the scroll position for this scrollView.\n   */\n  'forgetScrollPosition',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scrollToRememberedPosition\n   * @description\n   * If this scrollView has an id associated with its scroll position,\n   * (through calling rememberScrollPosition), and that position is remembered,\n   * load the position and scroll to it.\n   * @param {boolean=} shouldAnimate Whether to animate the scroll.\n   */\n  'scrollToRememberedPosition'\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#forHandle\n   * @param {string} handle\n   * @returns `delegateInstance` A delegate instance that controls only the\n   * scrollView with delegate-handle matching the given handle.\n   */\n]))\n\n/**\n * @private\n */\n.factory('$$scrollValueCache', function() {\n  return {};\n})\n\n.controller('$ionicScroll', [\n  '$scope',\n  'scrollViewOptions',\n  '$timeout',\n  '$window',\n  '$$scrollValueCache',\n  '$location',\n  '$rootScope',\n  '$document',\n  '$ionicScrollDelegate',\n  '$parse', //DEPRECATED\nfunction($scope, scrollViewOptions, $timeout, $window, $$scrollValueCache, $location, $rootScope, $document, $ionicScrollDelegate, $parse) {\n\n  var self = this;\n\n  this._scrollViewOptions = scrollViewOptions; //for testing\n\n  var element = this.element = scrollViewOptions.el;\n  var $element = this.$element = angular.element(element);\n  var scrollView = this.scrollView = new ionic.views.Scroll(scrollViewOptions);\n\n  //Attach self to element as a controller so other directives can require this controller\n  //through `require: '$ionicScroll'\n  //Also attach to parent so that sibling elements can require this\n  ($element.parent().length ? $element.parent() : $element)\n    .data('$$ionicScrollController', this);\n\n  var deregisterInstance = $ionicScrollDelegate._registerInstance(\n    this, scrollViewOptions.delegateHandle\n  );\n\n  if (!angular.isDefined(scrollViewOptions.bouncing)) {\n    ionic.Platform.ready(function() {\n      scrollView.options.bouncing = !ionic.Platform.isAndroid();\n    });\n  }\n\n  var resize = angular.bind(scrollView, scrollView.resize);\n  ionic.on('resize', resize, $window);\n\n  // set by rootScope listener if needed\n  var backListenDone = angular.noop;\n\n  $scope.$on('$destroy', function() {\n    deregisterInstance();\n    ionic.off('resize', resize, $window);\n    $window.removeEventListener('resize', resize);\n    backListenDone();\n    if (self._rememberScrollId) {\n      $$scrollValueCache[self._rememberScrollId] = scrollView.getValues();\n    }\n  });\n\n  $element.on('scroll', function(e) {\n    var detail = (e.originalEvent || e).detail || {};\n    $scope.$onScroll && $scope.$onScroll({\n      event: e,\n      scrollTop: detail.scrollTop || 0,\n      scrollLeft: detail.scrollLeft || 0\n    });\n  });\n\n  $scope.$on('$viewContentLoaded', function(e, historyData) {\n    //only the top-most scroll area under a view should remember that view's\n    //scroll position\n    if (e.defaultPrevented) { return; }\n    e.preventDefault();\n\n    var viewId = historyData && historyData.viewId;\n    if (viewId) {\n      self.rememberScrollPosition(viewId);\n      self.scrollToRememberedPosition();\n\n      backListenDone = $rootScope.$on('$viewHistory.viewBack', function(e, fromViewId, toViewId) {\n        //When going back from this view, forget its saved scroll position\n        if (viewId === fromViewId) {\n          self.forgetScrollPosition();\n        }\n      });\n    }\n  });\n\n  $timeout(function() {\n    scrollView.run();\n  });\n\n  this._rememberScrollId = null;\n\n  this.resize = function() {\n    return $timeout(resize);\n  };\n\n  this.scrollTop = function(shouldAnimate) {\n    this.resize().then(function() {\n      scrollView.scrollTo(0, 0, !!shouldAnimate);\n    });\n  };\n\n  this.scrollBottom = function(shouldAnimate) {\n    this.resize().then(function() {\n      var max = scrollView.getScrollMax();\n      scrollView.scrollTo(max.left, max.top, !!shouldAnimate);\n    });\n  };\n\n  this.scrollTo = function(left, top, shouldAnimate) {\n    this.resize().then(function() {\n      scrollView.scrollTo(left, top, !!shouldAnimate);\n    });\n  };\n\n  this.anchorScroll = function(shouldAnimate) {\n    this.resize().then(function() {\n      var hash = $location.hash();\n      var elm = hash && $document[0].getElementById(hash);\n      if (hash && elm) {\n        var scroll = ionic.DomUtil.getPositionInParent(elm, self.$element);\n        scrollView.scrollTo(scroll.left, scroll.top, !!shouldAnimate);\n      } else {\n        scrollView.scrollTo(0,0, !!shouldAnimate);\n      }\n    });\n  };\n\n  this.rememberScrollPosition = function(id) {\n    if (!id) {\n      throw new Error(\"Must supply an id to remember the scroll by!\");\n    }\n    this._rememberScrollId = id;\n  };\n  this.forgetScrollPosition = function() {\n    delete $$scrollValueCache[this._rememberScrollId];\n    this._rememberScrollId = null;\n  };\n  this.scrollToRememberedPosition = function(shouldAnimate) {\n    var values = $$scrollValueCache[this._rememberScrollId];\n    if (values) {\n      this.resize().then(function() {\n        scrollView.scrollTo(+values.left, +values.top, shouldAnimate);\n      });\n    }\n  };\n\n\n\n  /**\n   * @private\n   */\n  this._setRefresher = function(refresherScope, refresherElement) {\n    var refresher = this.refresher = refresherElement;\n    var refresherHeight = self.refresher.clientHeight || 0;\n    scrollView.activatePullToRefresh(refresherHeight, function() {\n      refresher.classList.add('active');\n      refresherScope.$onPulling();\n    }, function() {\n      refresher.classList.remove('refreshing');\n      refresher.classList.remove('active');\n    }, function() {\n      refresher.classList.add('refreshing');\n      refresherScope.$onRefresh();\n    });\n  };\n}]);\n\n\n})();"
  },
  {
    "path": "ionic1/official/maps/www/lib/ionic/js/ionic.bundle.js",
    "content": "/*!\n * ionic.bundle.js is a concatenation of:\n * ionic.js, angular.js, angular-animate.js,\n * angular-ui-router.js, and ionic-angular.js\n */\n\n/*!\n * Copyright 2014 Drifty Co.\n * http://drifty.com/\n *\n * Ionic, v0.9.27\n * A powerful HTML5 mobile app framework.\n * http://ionicframework.com/\n *\n * By @maxlynch, @benjsperry, @adamdbradley <3\n *\n * Licensed under the MIT license. Please see LICENSE for more information.\n *\n */\n\n(function() {\n\n// Create namespaces\n//\nwindow.ionic = {\n  controllers: {},\n  views: {},\n  version: '0.9.27'\n};\n\n(function(ionic) {\n\n  var bezierCoord = function (x,y) {\n    if(!x) x=0;\n    if(!y) y=0;\n    return {x: x, y: y};\n  };\n\n  function B1(t) { return t*t*t; }\n  function B2(t) { return 3*t*t*(1-t); }\n  function B3(t) { return 3*t*(1-t)*(1-t); }\n  function B4(t) { return (1-t)*(1-t)*(1-t); }\n\n  ionic.Animator = {\n    // Quadratic bezier solver\n    getQuadraticBezier: function(percent,C1,C2,C3,C4) {\n      var pos = new bezierCoord();\n      pos.x = C1.x*B1(percent) + C2.x*B2(percent) + C3.x*B3(percent) + C4.x*B4(percent);\n      pos.y = C1.y*B1(percent) + C2.y*B2(percent) + C3.y*B3(percent) + C4.y*B4(percent);\n      return pos;\n    },\n\n    // Cubic bezier solver from https://github.com/arian/cubic-bezier (MIT)\n    getCubicBezier: function(x1, y1, x2, y2, duration) {\n      // Precision\n      epsilon = (1000 / 60 / duration) / 4;\n\n      var curveX = function(t){\n        var v = 1 - t;\n        return 3 * v * v * t * x1 + 3 * v * t * t * x2 + t * t * t;\n      };\n\n      var curveY = function(t){\n        var v = 1 - t;\n        return 3 * v * v * t * y1 + 3 * v * t * t * y2 + t * t * t;\n      };\n\n      var derivativeCurveX = function(t){\n        var v = 1 - t;\n        return 3 * (2 * (t - 1) * t + v * v) * x1 + 3 * (- t * t * t + 2 * v * t) * x2;\n      };\n\n      return function(t) {\n\n        var x = t, t0, t1, t2, x2, d2, i;\n\n        // First try a few iterations of Newton's method -- normally very fast.\n        for (t2 = x, i = 0; i < 8; i++){\n          x2 = curveX(t2) - x;\n          if (Math.abs(x2) < epsilon) return curveY(t2);\n          d2 = derivativeCurveX(t2);\n          if (Math.abs(d2) < 1e-6) break;\n          t2 = t2 - x2 / d2;\n        }\n\n        t0 = 0, t1 = 1, t2 = x;\n\n        if (t2 < t0) return curveY(t0);\n        if (t2 > t1) return curveY(t1);\n\n        // Fallback to the bisection method for reliability.\n        while (t0 < t1){\n          x2 = curveX(t2);\n          if (Math.abs(x2 - x) < epsilon) return curveY(t2);\n          if (x > x2) t0 = t2;\n          else t1 = t2;\n          t2 = (t1 - t0) * 0.5 + t0;\n        }\n\n        // Failure\n        return curveY(t2);\n      };\n    },\n\n    animate: function(element, className, fn) {\n      return {\n        leave: function() {\n          var endFunc = function() {\n\n            element.classList.remove('leave');\n            element.classList.remove('leave-active');\n\n            element.removeEventListener('webkitTransitionEnd', endFunc);\n            element.removeEventListener('transitionEnd', endFunc);\n          };\n          element.addEventListener('webkitTransitionEnd', endFunc);\n          element.addEventListener('transitionEnd', endFunc);\n\n          element.classList.add('leave');\n          element.classList.add('leave-active');\n          return this;\n        },\n        enter: function() {\n          var endFunc = function() {\n\n            element.classList.remove('enter');\n            element.classList.remove('enter-active');\n\n            element.removeEventListener('webkitTransitionEnd', endFunc);\n            element.removeEventListener('transitionEnd', endFunc);\n          };\n          element.addEventListener('webkitTransitionEnd', endFunc);\n          element.addEventListener('transitionEnd', endFunc);\n\n          element.classList.add('enter');\n          element.classList.add('enter-active');\n\n          return this;\n        }\n      };\n    }\n  };\n})(ionic);\n\n(function(window, document, ionic) {\n\n  var readyCallbacks = [];\n  var isDomReady = false;\n\n  function domReady() {\n    isDomReady = true;\n    for(var x=0; x<readyCallbacks.length; x++) {\n      ionic.requestAnimationFrame(readyCallbacks[x]);\n    }\n    readyCallbacks = [];\n    document.removeEventListener('DOMContentLoaded', domReady);\n  }\n  document.addEventListener('DOMContentLoaded', domReady);\n\n  // From the man himself, Mr. Paul Irish.\n  // The requestAnimationFrame polyfill\n  // Put it on window just to preserve its context\n  // without having to use .call\n  window._rAF = (function(){\n    return  window.requestAnimationFrame       ||\n            window.webkitRequestAnimationFrame ||\n            window.mozRequestAnimationFrame    ||\n            function( callback ){\n              window.setTimeout(callback, 16);\n            };\n  })();\n\n  /**\n  * @ngdoc utility\n  * @name ionic.DomUtil\n  * @module ionic\n  */\n  ionic.DomUtil = {\n    //Call with proper context\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#requestAnimationFrame\n     * @alias ionic.requestAnimationFrame\n     * @description Calls [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window.requestAnimationFrame), or a polyfill if not available.\n     * @param {function} callback The function to call when the next frame\n     * happens.\n     */\n    requestAnimationFrame: function(cb) {\n      window._rAF(cb);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#animationFrameThrottle\n     * @alias ionic.animationFrameThrottle\n     * @description\n     * When given a callback, if that callback is called 100 times between\n     * animation frames, adding Throttle will make it only run the last of\n     * the 100 calls.\n     *\n     * @param {function} callback a function which will be throttled to\n     * requestAnimationFrame\n     * @returns {function} A function which will then call the passed in callback.\n     * The passed in callback will receive the context the returned function is\n     * called with.\n     */\n    animationFrameThrottle: function(cb) {\n      var args, isQueued, context;\n      return function() {\n        args = arguments;\n        context = this;\n        if (!isQueued) {\n          isQueued = true;\n          ionic.requestAnimationFrame(function() {\n            cb.apply(context, args);\n            isQueued = false;\n          });\n        }\n      };\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getPositionInParent\n     * @description\n     * Find an element's scroll offset within its container.\n     * @param {DOMElement} element The element to find the offset of.\n     * @returns {object} A position object with the following properties:\n     *   - `{number}` `left` The left offset of the element.\n     *   - `{number}` `top` The top offset of the element.\n     */\n    getPositionInParent: function(el) {\n      return {\n        left: el.offsetLeft,\n        top: el.offsetTop\n      };\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#ready\n     * @description\n     * Call a function when the DOM is ready, or if it is already ready\n     * call the function immediately.\n     * @param {function} callback The function to be called.\n     */\n    ready: function(cb) {\n      if(isDomReady || document.readyState === \"complete\") {\n        ionic.requestAnimationFrame(cb);\n      } else {\n        readyCallbacks.push(cb);\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getTextBounds\n     * @description\n     * Get a rect representing the bounds of the given textNode.\n     * @param {DOMElement} textNode The textNode to find the bounds of.\n     * @returns {object} An object representing the bounds of the node. Properties:\n     *   - `{number}` `left` The left positton of the textNode.\n     *   - `{number}` `right` The right positton of the textNode.\n     *   - `{number}` `top` The top positton of the textNode.\n     *   - `{number}` `bottom` The bottom position of the textNode.\n     *   - `{number}` `width` The width of the textNode.\n     *   - `{number}` `height` The height of the textNode.\n     */\n    getTextBounds: function(textNode) {\n      if(document.createRange) {\n        var range = document.createRange();\n        range.selectNodeContents(textNode);\n        if(range.getBoundingClientRect) {\n          var rect = range.getBoundingClientRect();\n          if(rect) {\n            var sx = window.scrollX;\n            var sy = window.scrollY;\n\n            return {\n              top: rect.top + sy,\n              left: rect.left + sx,\n              right: rect.left + sx + rect.width,\n              bottom: rect.top + sy + rect.height,\n              width: rect.width,\n              height: rect.height\n            };\n          }\n        }\n      }\n      return null;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getChildIndex\n     * @description\n     * Get the first index of a child node within the given element of the\n     * specified type.\n     * @param {DOMElement} element The element to find the index of.\n     * @param {string} type The nodeName to match children of element against.\n     * @returns {number} The index, or -1, of a child with nodeName matching type.\n     */\n    getChildIndex: function(element, type) {\n      if(type) {\n        var ch = element.parentNode.children;\n        var c;\n        for(var i = 0, k = 0, j = ch.length; i < j; i++) {\n          c = ch[i];\n          if(c.nodeName && c.nodeName.toLowerCase() == type) {\n            if(c == element) {\n              return k;\n            }\n            k++;\n          }\n        }\n      }\n      return Array.prototype.slice.call(element.parentNode.children).indexOf(element);\n    },\n\n    /**\n     * @private\n     */\n    swapNodes: function(src, dest) {\n      dest.parentNode.insertBefore(src, dest);\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getParentWithClass\n     * @param {DOMElement} element\n     * @param {string} className\n     * @returns {DOMElement} The closest parent of element matching the\n     * className, or null.\n     */\n    getParentWithClass: function(e, className, depth) {\n      depth = depth || 10;\n      while(e.parentNode && depth--) {\n        if(e.parentNode.classList && e.parentNode.classList.contains(className)) {\n          return e.parentNode;\n        }\n        e = e.parentNode;\n      }\n      return null;\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getParentWithClass\n     * @param {DOMElement} element\n     * @param {string} className\n     * @returns {DOMElement} The closest parent or self matching the\n     * className, or null.\n     */\n    getParentOrSelfWithClass: function(e, className, depth) {\n      depth = depth || 10;\n      while(e && depth--) {\n        if(e.classList && e.classList.contains(className)) {\n          return e;\n        }\n        e = e.parentNode;\n      }\n      return null;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#rectContains\n     * @param {number} x\n     * @param {number} y\n     * @param {number} x1\n     * @param {number} y1\n     * @param {number} x2\n     * @param {number} y2\n     * @returns {boolean} Whether {x,y} fits within the rectangle defined by\n     * {x1,y1,x2,y2}.\n     */\n    rectContains: function(x, y, x1, y1, x2, y2) {\n      if(x < x1 || x > x2) return false;\n      if(y < y1 || y > y2) return false;\n      return true;\n    }\n  };\n\n  //Shortcuts\n  ionic.requestAnimationFrame = ionic.DomUtil.requestAnimationFrame;\n  ionic.animationFrameThrottle = ionic.DomUtil.animationFrameThrottle;\n})(this, document, ionic);\n\n/**\n * ion-events.js\n *\n * Author: Max Lynch <max@drifty.com>\n *\n * Framework events handles various mobile browser events, and\n * detects special events like tap/swipe/etc. and emits them\n * as custom events that can be used in an app.\n *\n * Portions lovingly adapted from github.com/maker/ratchet and github.com/alexgibson/tap.js - thanks guys!\n */\n\n(function(ionic) {\n\n  // Custom event polyfill\n  if(!window.CustomEvent) {\n    (function() {\n      var CustomEvent;\n\n      CustomEvent = function(event, params) {\n        var evt;\n        params = params || {\n          bubbles: false,\n          cancelable: false,\n          detail: undefined\n        };\n        try {\n          evt = document.createEvent(\"CustomEvent\");\n          evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n        } catch (error) {\n          // fallback for browsers that don't support createEvent('CustomEvent')\n          evt = document.createEvent(\"Event\");\n          for (var param in params) {\n            evt[param] = params[param];\n          }\n          evt.initEvent(event, params.bubbles, params.cancelable);\n        }\n        return evt;\n      };\n\n      CustomEvent.prototype = window.Event.prototype;\n\n      window.CustomEvent = CustomEvent;\n    })();\n  }\n\n\n  /**\n   * @ngdoc utility\n   * @name ionic.EventController\n   * @module ionic\n   */\n  ionic.EventController = {\n    VIRTUALIZED_EVENTS: ['tap', 'swipe', 'swiperight', 'swipeleft', 'drag', 'hold', 'release'],\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#trigger\n     * @alias ionic.trigger\n     * @param {string} eventType The event to trigger.\n     * @param {object} data The data for the event. Hint: pass in\n     * `{target: targetElement}`\n     * @param {boolean=} bubbles Whether the event should bubble up the DOM.\n     * @param {boolean=} cancelable Whether the event should be cancelable.\n     */\n    // Trigger a new event\n    trigger: function(eventType, data, bubbles, cancelable) {\n      var event = new CustomEvent(eventType, {\n        detail: data,\n        bubbles: !!bubbles,\n        cancelable: !!cancelable\n      });\n\n      // Make sure to trigger the event on the given target, or dispatch it from\n      // the window if we don't have an event target\n      data && data.target && data.target.dispatchEvent(event) || window.dispatchEvent(event);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#on\n     * @alias ionic.on\n     * @description Listen to an event on an element.\n     * @param {string} type The event to listen for.\n     * @param {function} callback The listener to be called.\n     * @param {DOMElement} element The element to listen for the event on.\n     */\n    on: function(type, callback, element) {\n      var e = element || window;\n\n      // Bind a gesture if it's a virtual event\n      for(var i = 0, j = this.VIRTUALIZED_EVENTS.length; i < j; i++) {\n        if(type == this.VIRTUALIZED_EVENTS[i]) {\n          var gesture = new ionic.Gesture(element);\n          gesture.on(type, callback);\n          return gesture;\n        }\n      }\n\n      // Otherwise bind a normal event\n      e.addEventListener(type, callback);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#off\n     * @alias ionic.off\n     * @description Remove an event listener.\n     * @param {string} type\n     * @param {function} callback\n     * @param {DOMElement} element\n     */\n    off: function(type, callback, element) {\n      element.removeEventListener(type, callback);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#onGesture\n     * @alias ionic.onGesture\n     * @description Add an event listener for a gesture on an element.\n     * @param {string} eventType The gesture event to listen for.\n     * @param {function(e)} callback The function to call when the gesture\n     * happens.\n     * @param {DOMElement} element The angular element to listen for the event on.\n     */\n    onGesture: function(type, callback, element) {\n      var gesture = new ionic.Gesture(element);\n      gesture.on(type, callback);\n      return gesture;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#offGesture\n     * @alias ionic.offGesture\n     * @description Remove an event listener for a gesture on an element.\n     * @param {string} eventType The gesture event.\n     * @param {function(e)} callback The listener that was added earlier.\n     * @param {DOMElement} element The element the listener was added on.\n     */\n    offGesture: function(gesture, type, callback) {\n      gesture.off(type, callback);\n    },\n\n    handlePopState: function(event) {\n    },\n  };\n\n\n  // Map some convenient top-level functions for event handling\n  ionic.on = function() { ionic.EventController.on.apply(ionic.EventController, arguments); };\n  ionic.off = function() { ionic.EventController.off.apply(ionic.EventController, arguments); };\n  ionic.trigger = ionic.EventController.trigger;//function() { ionic.EventController.trigger.apply(ionic.EventController.trigger, arguments); };\n  ionic.onGesture = function() { return ionic.EventController.onGesture.apply(ionic.EventController.onGesture, arguments); };\n  ionic.offGesture = function() { return ionic.EventController.offGesture.apply(ionic.EventController.offGesture, arguments); };\n\n})(window.ionic);\n\n/**\n  * Simple gesture controllers with some common gestures that emit\n  * gesture events.\n  *\n  * Ported from github.com/EightMedia/hammer.js Gestures - thanks!\n  */\n(function(ionic) {\n\n  /**\n   * ionic.Gestures\n   * use this to create instances\n   * @param   {HTMLElement}   element\n   * @param   {Object}        options\n   * @returns {ionic.Gestures.Instance}\n   * @constructor\n   */\n  ionic.Gesture = function(element, options) {\n    return new ionic.Gestures.Instance(element, options || {});\n  };\n\n  ionic.Gestures = {};\n\n  // default settings\n  ionic.Gestures.defaults = {\n    // add css to the element to prevent the browser from doing\n    // its native behavior. this doesnt prevent the scrolling,\n    // but cancels the contextmenu, tap highlighting etc\n    // set to false to disable this\n    stop_browser_behavior: 'disable-user-behavior'\n  };\n\n  // detect touchevents\n  ionic.Gestures.HAS_POINTEREVENTS = window.navigator.pointerEnabled || window.navigator.msPointerEnabled;\n  ionic.Gestures.HAS_TOUCHEVENTS = ('ontouchstart' in window);\n\n  // dont use mouseevents on mobile devices\n  ionic.Gestures.MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android|silk/i;\n  ionic.Gestures.NO_MOUSEEVENTS = ionic.Gestures.HAS_TOUCHEVENTS && window.navigator.userAgent.match(ionic.Gestures.MOBILE_REGEX);\n\n  // eventtypes per touchevent (start, move, end)\n  // are filled by ionic.Gestures.event.determineEventTypes on setup\n  ionic.Gestures.EVENT_TYPES = {};\n\n  // direction defines\n  ionic.Gestures.DIRECTION_DOWN = 'down';\n  ionic.Gestures.DIRECTION_LEFT = 'left';\n  ionic.Gestures.DIRECTION_UP = 'up';\n  ionic.Gestures.DIRECTION_RIGHT = 'right';\n\n  // pointer type\n  ionic.Gestures.POINTER_MOUSE = 'mouse';\n  ionic.Gestures.POINTER_TOUCH = 'touch';\n  ionic.Gestures.POINTER_PEN = 'pen';\n\n  // touch event defines\n  ionic.Gestures.EVENT_START = 'start';\n  ionic.Gestures.EVENT_MOVE = 'move';\n  ionic.Gestures.EVENT_END = 'end';\n\n  // hammer document where the base events are added at\n  ionic.Gestures.DOCUMENT = window.document;\n\n  // plugins namespace\n  ionic.Gestures.plugins = {};\n\n  // if the window events are set...\n  ionic.Gestures.READY = false;\n\n  /**\n   * setup events to detect gestures on the document\n   */\n  function setup() {\n    if(ionic.Gestures.READY) {\n      return;\n    }\n\n    // find what eventtypes we add listeners to\n    ionic.Gestures.event.determineEventTypes();\n\n    // Register all gestures inside ionic.Gestures.gestures\n    for(var name in ionic.Gestures.gestures) {\n      if(ionic.Gestures.gestures.hasOwnProperty(name)) {\n        ionic.Gestures.detection.register(ionic.Gestures.gestures[name]);\n      }\n    }\n\n    // Add touch events on the document\n    ionic.Gestures.event.onTouch(ionic.Gestures.DOCUMENT, ionic.Gestures.EVENT_MOVE, ionic.Gestures.detection.detect);\n    ionic.Gestures.event.onTouch(ionic.Gestures.DOCUMENT, ionic.Gestures.EVENT_END, ionic.Gestures.detection.detect);\n\n    // ionic.Gestures is ready...!\n    ionic.Gestures.READY = true;\n  }\n\n  /**\n   * create new hammer instance\n   * all methods should return the instance itself, so it is chainable.\n   * @param   {HTMLElement}       element\n   * @param   {Object}            [options={}]\n   * @returns {ionic.Gestures.Instance}\n   * @name Gesture.Instance\n   * @constructor\n   */\n  ionic.Gestures.Instance = function(element, options) {\n    var self = this;\n\n    // A null element was passed into the instance, which means\n    // whatever lookup was done to find this element failed to find it\n    // so we can't listen for events on it.\n    if(element === null) {\n      console.error('Null element passed to gesture (element does not exist). Not listening for gesture');\n      return;\n    }\n\n    // setup ionic.GesturesJS window events and register all gestures\n    // this also sets up the default options\n    setup();\n\n    this.element = element;\n\n    // start/stop detection option\n    this.enabled = true;\n\n    // merge options\n    this.options = ionic.Gestures.utils.extend(\n        ionic.Gestures.utils.extend({}, ionic.Gestures.defaults),\n        options || {});\n\n    // add some css to the element to prevent the browser from doing its native behavoir\n    if(this.options.stop_browser_behavior) {\n      ionic.Gestures.utils.stopDefaultBrowserBehavior(this.element, this.options.stop_browser_behavior);\n    }\n\n    // start detection on touchstart\n    ionic.Gestures.event.onTouch(element, ionic.Gestures.EVENT_START, function(ev) {\n      if(self.enabled) {\n        ionic.Gestures.detection.startDetect(self, ev);\n      }\n    });\n\n    // return instance\n    return this;\n  };\n\n\n  ionic.Gestures.Instance.prototype = {\n    /**\n     * bind events to the instance\n     * @param   {String}      gesture\n     * @param   {Function}    handler\n     * @returns {ionic.Gestures.Instance}\n     */\n    on: function onEvent(gesture, handler){\n      var gestures = gesture.split(' ');\n      for(var t=0; t<gestures.length; t++) {\n        this.element.addEventListener(gestures[t], handler, false);\n      }\n      return this;\n    },\n\n\n    /**\n     * unbind events to the instance\n     * @param   {String}      gesture\n     * @param   {Function}    handler\n     * @returns {ionic.Gestures.Instance}\n     */\n    off: function offEvent(gesture, handler){\n      var gestures = gesture.split(' ');\n      for(var t=0; t<gestures.length; t++) {\n        this.element.removeEventListener(gestures[t], handler, false);\n      }\n      return this;\n    },\n\n\n    /**\n     * trigger gesture event\n     * @param   {String}      gesture\n     * @param   {Object}      eventData\n     * @returns {ionic.Gestures.Instance}\n     */\n    trigger: function triggerEvent(gesture, eventData){\n      // create DOM event\n      var event = ionic.Gestures.DOCUMENT.createEvent('Event');\n      event.initEvent(gesture, true, true);\n      event.gesture = eventData;\n\n      // trigger on the target if it is in the instance element,\n      // this is for event delegation tricks\n      var element = this.element;\n      if(ionic.Gestures.utils.hasParent(eventData.target, element)) {\n        element = eventData.target;\n      }\n\n      element.dispatchEvent(event);\n      return this;\n    },\n\n\n    /**\n     * enable of disable hammer.js detection\n     * @param   {Boolean}   state\n     * @returns {ionic.Gestures.Instance}\n     */\n    enable: function enable(state) {\n      this.enabled = state;\n      return this;\n    }\n  };\n\n  /**\n   * this holds the last move event,\n   * used to fix empty touchend issue\n   * see the onTouch event for an explanation\n   * type {Object}\n   */\n  var last_move_event = null;\n\n\n  /**\n   * when the mouse is hold down, this is true\n   * type {Boolean}\n   */\n  var enable_detect = false;\n\n\n  /**\n   * when touch events have been fired, this is true\n   * type {Boolean}\n   */\n  var touch_triggered = false;\n\n\n  ionic.Gestures.event = {\n    /**\n     * simple addEventListener\n     * @param   {HTMLElement}   element\n     * @param   {String}        type\n     * @param   {Function}      handler\n     */\n    bindDom: function(element, type, handler) {\n      var types = type.split(' ');\n      for(var t=0; t<types.length; t++) {\n        element.addEventListener(types[t], handler, false);\n      }\n    },\n\n\n    /**\n     * touch events with mouse fallback\n     * @param   {HTMLElement}   element\n     * @param   {String}        eventType        like ionic.Gestures.EVENT_MOVE\n     * @param   {Function}      handler\n     */\n    onTouch: function onTouch(element, eventType, handler) {\n      var self = this;\n\n      this.bindDom(element, ionic.Gestures.EVENT_TYPES[eventType], function bindDomOnTouch(ev) {\n        var sourceEventType = ev.type.toLowerCase();\n\n        // onmouseup, but when touchend has been fired we do nothing.\n        // this is for touchdevices which also fire a mouseup on touchend\n        if(sourceEventType.match(/mouse/) && touch_triggered) {\n          return;\n        }\n\n        // mousebutton must be down or a touch event\n        else if( sourceEventType.match(/touch/) ||   // touch events are always on screen\n          sourceEventType.match(/pointerdown/) || // pointerevents touch\n          (sourceEventType.match(/mouse/) && ev.which === 1)   // mouse is pressed\n          ){\n            enable_detect = true;\n          }\n\n        // mouse isn't pressed\n        else if(sourceEventType.match(/mouse/) && ev.which !== 1) {\n          enable_detect = false;\n        }\n\n\n        // we are in a touch event, set the touch triggered bool to true,\n        // this for the conflicts that may occur on ios and android\n        if(sourceEventType.match(/touch|pointer/)) {\n          touch_triggered = true;\n        }\n\n        // count the total touches on the screen\n        var count_touches = 0;\n\n        // when touch has been triggered in this detection session\n        // and we are now handling a mouse event, we stop that to prevent conflicts\n        if(enable_detect) {\n          // update pointerevent\n          if(ionic.Gestures.HAS_POINTEREVENTS && eventType != ionic.Gestures.EVENT_END) {\n            count_touches = ionic.Gestures.PointerEvent.updatePointer(eventType, ev);\n          }\n          // touch\n          else if(sourceEventType.match(/touch/)) {\n            count_touches = ev.touches.length;\n          }\n          // mouse\n          else if(!touch_triggered) {\n            count_touches = sourceEventType.match(/up/) ? 0 : 1;\n          }\n\n          // if we are in a end event, but when we remove one touch and\n          // we still have enough, set eventType to move\n          if(count_touches > 0 && eventType == ionic.Gestures.EVENT_END) {\n            eventType = ionic.Gestures.EVENT_MOVE;\n          }\n          // no touches, force the end event\n          else if(!count_touches) {\n            eventType = ionic.Gestures.EVENT_END;\n          }\n\n          // store the last move event\n          if(count_touches || last_move_event === null) {\n            last_move_event = ev;\n          }\n\n          // trigger the handler\n          handler.call(ionic.Gestures.detection, self.collectEventData(element, eventType, self.getTouchList(last_move_event, eventType), ev));\n\n          // remove pointerevent from list\n          if(ionic.Gestures.HAS_POINTEREVENTS && eventType == ionic.Gestures.EVENT_END) {\n            count_touches = ionic.Gestures.PointerEvent.updatePointer(eventType, ev);\n          }\n        }\n\n        //debug(sourceEventType +\" \"+ eventType);\n\n        // on the end we reset everything\n        if(!count_touches) {\n          last_move_event = null;\n          enable_detect = false;\n          touch_triggered = false;\n          ionic.Gestures.PointerEvent.reset();\n        }\n      });\n    },\n\n\n    /**\n     * we have different events for each device/browser\n     * determine what we need and set them in the ionic.Gestures.EVENT_TYPES constant\n     */\n    determineEventTypes: function determineEventTypes() {\n      // determine the eventtype we want to set\n      var types;\n\n      // pointerEvents magic\n      if(ionic.Gestures.HAS_POINTEREVENTS) {\n        types = ionic.Gestures.PointerEvent.getEvents();\n      }\n      // on Android, iOS, blackberry, windows mobile we dont want any mouseevents\n      else if(ionic.Gestures.NO_MOUSEEVENTS) {\n        types = [\n          'touchstart',\n          'touchmove',\n          'touchend touchcancel'];\n      }\n      // for non pointer events browsers and mixed browsers,\n      // like chrome on windows8 touch laptop\n      else {\n        types = [\n          'touchstart mousedown',\n          'touchmove mousemove',\n          'touchend touchcancel mouseup'];\n      }\n\n      ionic.Gestures.EVENT_TYPES[ionic.Gestures.EVENT_START]  = types[0];\n      ionic.Gestures.EVENT_TYPES[ionic.Gestures.EVENT_MOVE]   = types[1];\n      ionic.Gestures.EVENT_TYPES[ionic.Gestures.EVENT_END]    = types[2];\n    },\n\n\n    /**\n     * create touchlist depending on the event\n     * @param   {Object}    ev\n     * @param   {String}    eventType   used by the fakemultitouch plugin\n     */\n    getTouchList: function getTouchList(ev/*, eventType*/) {\n      // get the fake pointerEvent touchlist\n      if(ionic.Gestures.HAS_POINTEREVENTS) {\n        return ionic.Gestures.PointerEvent.getTouchList();\n      }\n      // get the touchlist\n      else if(ev.touches) {\n        return ev.touches;\n      }\n      // make fake touchlist from mouse position\n      else {\n        ev.indentifier = 1;\n        return [ev];\n      }\n    },\n\n\n    /**\n     * collect event data for ionic.Gestures js\n     * @param   {HTMLElement}   element\n     * @param   {String}        eventType        like ionic.Gestures.EVENT_MOVE\n     * @param   {Object}        eventData\n     */\n    collectEventData: function collectEventData(element, eventType, touches, ev) {\n\n      // find out pointerType\n      var pointerType = ionic.Gestures.POINTER_TOUCH;\n      if(ev.type.match(/mouse/) || ionic.Gestures.PointerEvent.matchType(ionic.Gestures.POINTER_MOUSE, ev)) {\n        pointerType = ionic.Gestures.POINTER_MOUSE;\n      }\n\n      return {\n        center      : ionic.Gestures.utils.getCenter(touches),\n                    timeStamp   : new Date().getTime(),\n                    target      : ev.target,\n                    touches     : touches,\n                    eventType   : eventType,\n                    pointerType : pointerType,\n                    srcEvent    : ev,\n\n                    /**\n                     * prevent the browser default actions\n                     * mostly used to disable scrolling of the browser\n                     */\n                    preventDefault: function() {\n                      if(this.srcEvent.preventManipulation) {\n                        this.srcEvent.preventManipulation();\n                      }\n\n                      if(this.srcEvent.preventDefault) {\n                        //this.srcEvent.preventDefault();\n                      }\n                    },\n\n                    /**\n                     * stop bubbling the event up to its parents\n                     */\n                    stopPropagation: function() {\n                      this.srcEvent.stopPropagation();\n                    },\n\n                    /**\n                     * immediately stop gesture detection\n                     * might be useful after a swipe was detected\n                     * @return {*}\n                     */\n                    stopDetect: function() {\n                      return ionic.Gestures.detection.stopDetect();\n                    }\n      };\n    }\n  };\n\n  ionic.Gestures.PointerEvent = {\n    /**\n     * holds all pointers\n     * type {Object}\n     */\n    pointers: {},\n\n    /**\n     * get a list of pointers\n     * @returns {Array}     touchlist\n     */\n    getTouchList: function() {\n      var self = this;\n      var touchlist = [];\n\n      // we can use forEach since pointerEvents only is in IE10\n      Object.keys(self.pointers).sort().forEach(function(id) {\n        touchlist.push(self.pointers[id]);\n      });\n      return touchlist;\n    },\n\n    /**\n     * update the position of a pointer\n     * @param   {String}   type             ionic.Gestures.EVENT_END\n     * @param   {Object}   pointerEvent\n     */\n    updatePointer: function(type, pointerEvent) {\n      if(type == ionic.Gestures.EVENT_END) {\n        this.pointers = {};\n      }\n      else {\n        pointerEvent.identifier = pointerEvent.pointerId;\n        this.pointers[pointerEvent.pointerId] = pointerEvent;\n      }\n\n      return Object.keys(this.pointers).length;\n    },\n\n    /**\n     * check if ev matches pointertype\n     * @param   {String}        pointerType     ionic.Gestures.POINTER_MOUSE\n     * @param   {PointerEvent}  ev\n     */\n    matchType: function(pointerType, ev) {\n      if(!ev.pointerType) {\n        return false;\n      }\n\n      var types = {};\n      types[ionic.Gestures.POINTER_MOUSE] = (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE || ev.pointerType == ionic.Gestures.POINTER_MOUSE);\n      types[ionic.Gestures.POINTER_TOUCH] = (ev.pointerType == ev.MSPOINTER_TYPE_TOUCH || ev.pointerType == ionic.Gestures.POINTER_TOUCH);\n      types[ionic.Gestures.POINTER_PEN] = (ev.pointerType == ev.MSPOINTER_TYPE_PEN || ev.pointerType == ionic.Gestures.POINTER_PEN);\n      return types[pointerType];\n    },\n\n\n    /**\n     * get events\n     */\n    getEvents: function() {\n      return [\n        'pointerdown MSPointerDown',\n      'pointermove MSPointerMove',\n      'pointerup pointercancel MSPointerUp MSPointerCancel'\n        ];\n    },\n\n    /**\n     * reset the list\n     */\n    reset: function() {\n      this.pointers = {};\n    }\n  };\n\n\n  ionic.Gestures.utils = {\n    /**\n     * extend method,\n     * also used for cloning when dest is an empty object\n     * @param   {Object}    dest\n     * @param   {Object}    src\n     * @param\t{Boolean}\tmerge\t\tdo a merge\n     * @returns {Object}    dest\n     */\n    extend: function extend(dest, src, merge) {\n      for (var key in src) {\n        if(dest[key] !== undefined && merge) {\n          continue;\n        }\n        dest[key] = src[key];\n      }\n      return dest;\n    },\n\n\n    /**\n     * find if a node is in the given parent\n     * used for event delegation tricks\n     * @param   {HTMLElement}   node\n     * @param   {HTMLElement}   parent\n     * @returns {boolean}       has_parent\n     */\n    hasParent: function(node, parent) {\n      while(node){\n        if(node == parent) {\n          return true;\n        }\n        node = node.parentNode;\n      }\n      return false;\n    },\n\n\n    /**\n     * get the center of all the touches\n     * @param   {Array}     touches\n     * @returns {Object}    center\n     */\n    getCenter: function getCenter(touches) {\n      var valuesX = [], valuesY = [];\n\n      for(var t= 0,len=touches.length; t<len; t++) {\n        valuesX.push(touches[t].pageX);\n        valuesY.push(touches[t].pageY);\n      }\n\n      return {\n        pageX: ((Math.min.apply(Math, valuesX) + Math.max.apply(Math, valuesX)) / 2),\n          pageY: ((Math.min.apply(Math, valuesY) + Math.max.apply(Math, valuesY)) / 2)\n      };\n    },\n\n\n    /**\n     * calculate the velocity between two points\n     * @param   {Number}    delta_time\n     * @param   {Number}    delta_x\n     * @param   {Number}    delta_y\n     * @returns {Object}    velocity\n     */\n    getVelocity: function getVelocity(delta_time, delta_x, delta_y) {\n      return {\n        x: Math.abs(delta_x / delta_time) || 0,\n        y: Math.abs(delta_y / delta_time) || 0\n      };\n    },\n\n\n    /**\n     * calculate the angle between two coordinates\n     * @param   {Touch}     touch1\n     * @param   {Touch}     touch2\n     * @returns {Number}    angle\n     */\n    getAngle: function getAngle(touch1, touch2) {\n      var y = touch2.pageY - touch1.pageY,\n      x = touch2.pageX - touch1.pageX;\n      return Math.atan2(y, x) * 180 / Math.PI;\n    },\n\n\n    /**\n     * angle to direction define\n     * @param   {Touch}     touch1\n     * @param   {Touch}     touch2\n     * @returns {String}    direction constant, like ionic.Gestures.DIRECTION_LEFT\n     */\n    getDirection: function getDirection(touch1, touch2) {\n      var x = Math.abs(touch1.pageX - touch2.pageX),\n      y = Math.abs(touch1.pageY - touch2.pageY);\n\n      if(x >= y) {\n        return touch1.pageX - touch2.pageX > 0 ? ionic.Gestures.DIRECTION_LEFT : ionic.Gestures.DIRECTION_RIGHT;\n      }\n      else {\n        return touch1.pageY - touch2.pageY > 0 ? ionic.Gestures.DIRECTION_UP : ionic.Gestures.DIRECTION_DOWN;\n      }\n    },\n\n\n    /**\n     * calculate the distance between two touches\n     * @param   {Touch}     touch1\n     * @param   {Touch}     touch2\n     * @returns {Number}    distance\n     */\n    getDistance: function getDistance(touch1, touch2) {\n      var x = touch2.pageX - touch1.pageX,\n      y = touch2.pageY - touch1.pageY;\n      return Math.sqrt((x*x) + (y*y));\n    },\n\n\n    /**\n     * calculate the scale factor between two touchLists (fingers)\n     * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n     * @param   {Array}     start\n     * @param   {Array}     end\n     * @returns {Number}    scale\n     */\n    getScale: function getScale(start, end) {\n      // need two fingers...\n      if(start.length >= 2 && end.length >= 2) {\n        return this.getDistance(end[0], end[1]) /\n          this.getDistance(start[0], start[1]);\n      }\n      return 1;\n    },\n\n\n    /**\n     * calculate the rotation degrees between two touchLists (fingers)\n     * @param   {Array}     start\n     * @param   {Array}     end\n     * @returns {Number}    rotation\n     */\n    getRotation: function getRotation(start, end) {\n      // need two fingers\n      if(start.length >= 2 && end.length >= 2) {\n        return this.getAngle(end[1], end[0]) -\n          this.getAngle(start[1], start[0]);\n      }\n      return 0;\n    },\n\n\n    /**\n     * boolean if the direction is vertical\n     * @param    {String}    direction\n     * @returns  {Boolean}   is_vertical\n     */\n    isVertical: function isVertical(direction) {\n      return (direction == ionic.Gestures.DIRECTION_UP || direction == ionic.Gestures.DIRECTION_DOWN);\n    },\n\n\n    /**\n     * stop browser default behavior with css class\n     * @param   {HtmlElement}   element\n     * @param   {Object}        css_class\n     */\n    stopDefaultBrowserBehavior: function stopDefaultBrowserBehavior(element, css_class) {\n      // changed from making many style changes to just adding a preset classname\n      // less DOM manipulations, less code, and easier to control in the CSS side of things\n      // hammer.js doesn't come with CSS, but ionic does, which is why we prefer this method\n      if(element && element.classList) {\n        element.classList.add(css_class);\n        element.onselectstart = function() {\n          return false;\n        };\n      }\n    }\n  };\n\n\n  ionic.Gestures.detection = {\n    // contains all registred ionic.Gestures.gestures in the correct order\n    gestures: [],\n\n    // data of the current ionic.Gestures.gesture detection session\n    current: null,\n\n    // the previous ionic.Gestures.gesture session data\n    // is a full clone of the previous gesture.current object\n    previous: null,\n\n    // when this becomes true, no gestures are fired\n    stopped: false,\n\n\n    /**\n     * start ionic.Gestures.gesture detection\n     * @param   {ionic.Gestures.Instance}   inst\n     * @param   {Object}            eventData\n     */\n    startDetect: function startDetect(inst, eventData) {\n      // already busy with a ionic.Gestures.gesture detection on an element\n      if(this.current) {\n        return;\n      }\n\n      this.stopped = false;\n\n      this.current = {\n        inst        : inst, // reference to ionic.GesturesInstance we're working for\n        startEvent  : ionic.Gestures.utils.extend({}, eventData), // start eventData for distances, timing etc\n        lastEvent   : false, // last eventData\n        name        : '' // current gesture we're in/detected, can be 'tap', 'hold' etc\n      };\n\n      this.detect(eventData);\n    },\n\n\n    /**\n     * ionic.Gestures.gesture detection\n     * @param   {Object}    eventData\n     */\n    detect: function detect(eventData) {\n      if(!this.current || this.stopped) {\n        return;\n      }\n\n      // extend event data with calculations about scale, distance etc\n      eventData = this.extendEventData(eventData);\n\n      // instance options\n      var inst_options = this.current.inst.options;\n\n      // call ionic.Gestures.gesture handlers\n      for(var g=0,len=this.gestures.length; g<len; g++) {\n        var gesture = this.gestures[g];\n\n        // only when the instance options have enabled this gesture\n        if(!this.stopped && inst_options[gesture.name] !== false) {\n          // if a handler returns false, we stop with the detection\n          if(gesture.handler.call(gesture, eventData, this.current.inst) === false) {\n            this.stopDetect();\n            break;\n          }\n        }\n      }\n\n      // store as previous event event\n      if(this.current) {\n        this.current.lastEvent = eventData;\n      }\n\n      // endevent, but not the last touch, so dont stop\n      if(eventData.eventType == ionic.Gestures.EVENT_END && !eventData.touches.length-1) {\n        this.stopDetect();\n      }\n\n      return eventData;\n    },\n\n\n    /**\n     * clear the ionic.Gestures.gesture vars\n     * this is called on endDetect, but can also be used when a final ionic.Gestures.gesture has been detected\n     * to stop other ionic.Gestures.gestures from being fired\n     */\n    stopDetect: function stopDetect() {\n      // clone current data to the store as the previous gesture\n      // used for the double tap gesture, since this is an other gesture detect session\n      this.previous = ionic.Gestures.utils.extend({}, this.current);\n\n      // reset the current\n      this.current = null;\n\n      // stopped!\n      this.stopped = true;\n    },\n\n\n    /**\n     * extend eventData for ionic.Gestures.gestures\n     * @param   {Object}   ev\n     * @returns {Object}   ev\n     */\n    extendEventData: function extendEventData(ev) {\n      var startEv = this.current.startEvent;\n\n      // if the touches change, set the new touches over the startEvent touches\n      // this because touchevents don't have all the touches on touchstart, or the\n      // user must place his fingers at the EXACT same time on the screen, which is not realistic\n      // but, sometimes it happens that both fingers are touching at the EXACT same time\n      if(startEv && (ev.touches.length != startEv.touches.length || ev.touches === startEv.touches)) {\n        // extend 1 level deep to get the touchlist with the touch objects\n        startEv.touches = [];\n        for(var i=0,len=ev.touches.length; i<len; i++) {\n          startEv.touches.push(ionic.Gestures.utils.extend({}, ev.touches[i]));\n        }\n      }\n\n      var delta_time = ev.timeStamp - startEv.timeStamp,\n          delta_x = ev.center.pageX - startEv.center.pageX,\n          delta_y = ev.center.pageY - startEv.center.pageY,\n          velocity = ionic.Gestures.utils.getVelocity(delta_time, delta_x, delta_y);\n\n      ionic.Gestures.utils.extend(ev, {\n        deltaTime   : delta_time,\n\n        deltaX      : delta_x,\n        deltaY      : delta_y,\n\n        velocityX   : velocity.x,\n        velocityY   : velocity.y,\n\n        distance    : ionic.Gestures.utils.getDistance(startEv.center, ev.center),\n        angle       : ionic.Gestures.utils.getAngle(startEv.center, ev.center),\n        direction   : ionic.Gestures.utils.getDirection(startEv.center, ev.center),\n\n        scale       : ionic.Gestures.utils.getScale(startEv.touches, ev.touches),\n        rotation    : ionic.Gestures.utils.getRotation(startEv.touches, ev.touches),\n\n        startEvent  : startEv\n      });\n\n      return ev;\n    },\n\n\n    /**\n     * register new gesture\n     * @param   {Object}    gesture object, see gestures.js for documentation\n     * @returns {Array}     gestures\n     */\n    register: function register(gesture) {\n      // add an enable gesture options if there is no given\n      var options = gesture.defaults || {};\n      if(options[gesture.name] === undefined) {\n        options[gesture.name] = true;\n      }\n\n      // extend ionic.Gestures default options with the ionic.Gestures.gesture options\n      ionic.Gestures.utils.extend(ionic.Gestures.defaults, options, true);\n\n      // set its index\n      gesture.index = gesture.index || 1000;\n\n      // add ionic.Gestures.gesture to the list\n      this.gestures.push(gesture);\n\n      // sort the list by index\n      this.gestures.sort(function(a, b) {\n        if (a.index < b.index) {\n          return -1;\n        }\n        if (a.index > b.index) {\n          return 1;\n        }\n        return 0;\n      });\n\n      return this.gestures;\n    }\n  };\n\n\n  ionic.Gestures.gestures = ionic.Gestures.gestures || {};\n\n  /**\n   * Custom gestures\n   * ==============================\n   *\n   * Gesture object\n   * --------------------\n   * The object structure of a gesture:\n   *\n   * { name: 'mygesture',\n   *   index: 1337,\n   *   defaults: {\n   *     mygesture_option: true\n   *   }\n   *   handler: function(type, ev, inst) {\n   *     // trigger gesture event\n   *     inst.trigger(this.name, ev);\n   *   }\n   * }\n\n   * @param   {String}    name\n   * this should be the name of the gesture, lowercase\n   * it is also being used to disable/enable the gesture per instance config.\n   *\n   * @param   {Number}    [index=1000]\n   * the index of the gesture, where it is going to be in the stack of gestures detection\n   * like when you build an gesture that depends on the drag gesture, it is a good\n   * idea to place it after the index of the drag gesture.\n   *\n   * @param   {Object}    [defaults={}]\n   * the default settings of the gesture. these are added to the instance settings,\n   * and can be overruled per instance. you can also add the name of the gesture,\n   * but this is also added by default (and set to true).\n   *\n   * @param   {Function}  handler\n   * this handles the gesture detection of your custom gesture and receives the\n   * following arguments:\n   *\n   *      @param  {Object}    eventData\n   *      event data containing the following properties:\n   *          timeStamp   {Number}        time the event occurred\n   *          target      {HTMLElement}   target element\n   *          touches     {Array}         touches (fingers, pointers, mouse) on the screen\n   *          pointerType {String}        kind of pointer that was used. matches ionic.Gestures.POINTER_MOUSE|TOUCH\n   *          center      {Object}        center position of the touches. contains pageX and pageY\n   *          deltaTime   {Number}        the total time of the touches in the screen\n   *          deltaX      {Number}        the delta on x axis we haved moved\n   *          deltaY      {Number}        the delta on y axis we haved moved\n   *          velocityX   {Number}        the velocity on the x\n   *          velocityY   {Number}        the velocity on y\n   *          angle       {Number}        the angle we are moving\n   *          direction   {String}        the direction we are moving. matches ionic.Gestures.DIRECTION_UP|DOWN|LEFT|RIGHT\n   *          distance    {Number}        the distance we haved moved\n   *          scale       {Number}        scaling of the touches, needs 2 touches\n   *          rotation    {Number}        rotation of the touches, needs 2 touches *\n   *          eventType   {String}        matches ionic.Gestures.EVENT_START|MOVE|END\n   *          srcEvent    {Object}        the source event, like TouchStart or MouseDown *\n   *          startEvent  {Object}        contains the same properties as above,\n   *                                      but from the first touch. this is used to calculate\n   *                                      distances, deltaTime, scaling etc\n   *\n   *      @param  {ionic.Gestures.Instance}    inst\n   *      the instance we are doing the detection for. you can get the options from\n   *      the inst.options object and trigger the gesture event by calling inst.trigger\n   *\n   *\n   * Handle gestures\n   * --------------------\n   * inside the handler you can get/set ionic.Gestures.detectionic.current. This is the current\n   * detection sessionic. It has the following properties\n   *      @param  {String}    name\n   *      contains the name of the gesture we have detected. it has not a real function,\n   *      only to check in other gestures if something is detected.\n   *      like in the drag gesture we set it to 'drag' and in the swipe gesture we can\n   *      check if the current gesture is 'drag' by accessing ionic.Gestures.detectionic.current.name\n   *\n   *      readonly\n   *      @param  {ionic.Gestures.Instance}    inst\n   *      the instance we do the detection for\n   *\n   *      readonly\n   *      @param  {Object}    startEvent\n   *      contains the properties of the first gesture detection in this sessionic.\n   *      Used for calculations about timing, distance, etc.\n   *\n   *      readonly\n   *      @param  {Object}    lastEvent\n   *      contains all the properties of the last gesture detect in this sessionic.\n   *\n   * after the gesture detection session has been completed (user has released the screen)\n   * the ionic.Gestures.detectionic.current object is copied into ionic.Gestures.detectionic.previous,\n   * this is usefull for gestures like doubletap, where you need to know if the\n   * previous gesture was a tap\n   *\n   * options that have been set by the instance can be received by calling inst.options\n   *\n   * You can trigger a gesture event by calling inst.trigger(\"mygesture\", event).\n   * The first param is the name of your gesture, the second the event argument\n   *\n   *\n   * Register gestures\n   * --------------------\n   * When an gesture is added to the ionic.Gestures.gestures object, it is auto registered\n   * at the setup of the first ionic.Gestures instance. You can also call ionic.Gestures.detectionic.register\n   * manually and pass your gesture object as a param\n   *\n   */\n\n  /**\n   * Hold\n   * Touch stays at the same place for x time\n   * events  hold\n   */\n  ionic.Gestures.gestures.Hold = {\n    name: 'hold',\n    index: 10,\n    defaults: {\n      hold_timeout\t: 500,\n      hold_threshold\t: 1\n    },\n    timer: null,\n    handler: function holdGesture(ev, inst) {\n      switch(ev.eventType) {\n        case ionic.Gestures.EVENT_START:\n          // clear any running timers\n          clearTimeout(this.timer);\n\n          // set the gesture so we can check in the timeout if it still is\n          ionic.Gestures.detection.current.name = this.name;\n\n          // set timer and if after the timeout it still is hold,\n          // we trigger the hold event\n          this.timer = setTimeout(function() {\n            if(ionic.Gestures.detection.current.name == 'hold') {\n              inst.trigger('hold', ev);\n            }\n          }, inst.options.hold_timeout);\n          break;\n\n          // when you move or end we clear the timer\n        case ionic.Gestures.EVENT_MOVE:\n          if(ev.distance > inst.options.hold_threshold) {\n            clearTimeout(this.timer);\n          }\n          break;\n\n        case ionic.Gestures.EVENT_END:\n          clearTimeout(this.timer);\n          break;\n      }\n    }\n  };\n\n\n  /**\n   * Tap/DoubleTap\n   * Quick touch at a place or double at the same place\n   * events  tap, doubletap\n   */\n  ionic.Gestures.gestures.Tap = {\n    name: 'tap',\n    index: 100,\n    defaults: {\n      tap_max_touchtime\t: 250,\n      tap_max_distance\t: 10,\n      tap_always\t\t\t: true,\n      doubletap_distance\t: 20,\n      doubletap_interval\t: 300\n    },\n    handler: function tapGesture(ev, inst) {\n      if(ev.eventType == ionic.Gestures.EVENT_END) {\n        // previous gesture, for the double tap since these are two different gesture detections\n        var prev = ionic.Gestures.detection.previous,\n        did_doubletap = false;\n\n        // when the touchtime is higher then the max touch time\n        // or when the moving distance is too much\n        if(ev.deltaTime > inst.options.tap_max_touchtime ||\n            ev.distance > inst.options.tap_max_distance) {\n              return;\n            }\n\n        // check if double tap\n        if(prev && prev.name == 'tap' &&\n            (ev.timeStamp - prev.lastEvent.timeStamp) < inst.options.doubletap_interval &&\n            ev.distance < inst.options.doubletap_distance) {\n              inst.trigger('doubletap', ev);\n              did_doubletap = true;\n            }\n\n        // do a single tap\n        if(!did_doubletap || inst.options.tap_always) {\n          ionic.Gestures.detection.current.name = 'tap';\n          inst.trigger(ionic.Gestures.detection.current.name, ev);\n        }\n      }\n    }\n  };\n\n\n  /**\n   * Swipe\n   * triggers swipe events when the end velocity is above the threshold\n   * events  swipe, swipeleft, swiperight, swipeup, swipedown\n   */\n  ionic.Gestures.gestures.Swipe = {\n    name: 'swipe',\n    index: 40,\n    defaults: {\n      // set 0 for unlimited, but this can conflict with transform\n      swipe_max_touches  : 1,\n      swipe_velocity     : 0.7\n    },\n    handler: function swipeGesture(ev, inst) {\n      if(ev.eventType == ionic.Gestures.EVENT_END) {\n        // max touches\n        if(inst.options.swipe_max_touches > 0 &&\n            ev.touches.length > inst.options.swipe_max_touches) {\n              return;\n            }\n\n        // when the distance we moved is too small we skip this gesture\n        // or we can be already in dragging\n        if(ev.velocityX > inst.options.swipe_velocity ||\n            ev.velocityY > inst.options.swipe_velocity) {\n              // trigger swipe events\n              inst.trigger(this.name, ev);\n              inst.trigger(this.name + ev.direction, ev);\n            }\n      }\n    }\n  };\n\n\n  /**\n   * Drag\n   * Move with x fingers (default 1) around on the page. Blocking the scrolling when\n   * moving left and right is a good practice. When all the drag events are blocking\n   * you disable scrolling on that area.\n   * events  drag, drapleft, dragright, dragup, dragdown\n   */\n  ionic.Gestures.gestures.Drag = {\n    name: 'drag',\n    index: 50,\n    defaults: {\n      drag_min_distance : 10,\n      // Set correct_for_drag_min_distance to true to make the starting point of the drag\n      // be calculated from where the drag was triggered, not from where the touch started.\n      // Useful to avoid a jerk-starting drag, which can make fine-adjustments\n      // through dragging difficult, and be visually unappealing.\n      correct_for_drag_min_distance : true,\n      // set 0 for unlimited, but this can conflict with transform\n      drag_max_touches  : 1,\n      // prevent default browser behavior when dragging occurs\n      // be careful with it, it makes the element a blocking element\n      // when you are using the drag gesture, it is a good practice to set this true\n      drag_block_horizontal   : true,\n      drag_block_vertical     : true,\n      // drag_lock_to_axis keeps the drag gesture on the axis that it started on,\n      // It disallows vertical directions if the initial direction was horizontal, and vice versa.\n      drag_lock_to_axis       : false,\n      // drag lock only kicks in when distance > drag_lock_min_distance\n      // This way, locking occurs only when the distance has become large enough to reliably determine the direction\n      drag_lock_min_distance : 25\n    },\n    triggered: false,\n    handler: function dragGesture(ev, inst) {\n      // current gesture isnt drag, but dragged is true\n      // this means an other gesture is busy. now call dragend\n      if(ionic.Gestures.detection.current.name != this.name && this.triggered) {\n        inst.trigger(this.name +'end', ev);\n        this.triggered = false;\n        return;\n      }\n\n      // max touches\n      if(inst.options.drag_max_touches > 0 &&\n          ev.touches.length > inst.options.drag_max_touches) {\n            return;\n          }\n\n      switch(ev.eventType) {\n        case ionic.Gestures.EVENT_START:\n          this.triggered = false;\n          break;\n\n        case ionic.Gestures.EVENT_MOVE:\n          // when the distance we moved is too small we skip this gesture\n          // or we can be already in dragging\n          if(ev.distance < inst.options.drag_min_distance &&\n              ionic.Gestures.detection.current.name != this.name) {\n                return;\n              }\n\n          // we are dragging!\n          if(ionic.Gestures.detection.current.name != this.name) {\n            ionic.Gestures.detection.current.name = this.name;\n            if (inst.options.correct_for_drag_min_distance) {\n              // When a drag is triggered, set the event center to drag_min_distance pixels from the original event center.\n              // Without this correction, the dragged distance would jumpstart at drag_min_distance pixels instead of at 0.\n              // It might be useful to save the original start point somewhere\n              var factor = Math.abs(inst.options.drag_min_distance/ev.distance);\n              ionic.Gestures.detection.current.startEvent.center.pageX += ev.deltaX * factor;\n              ionic.Gestures.detection.current.startEvent.center.pageY += ev.deltaY * factor;\n\n              // recalculate event data using new start point\n              ev = ionic.Gestures.detection.extendEventData(ev);\n            }\n          }\n\n          // lock drag to axis?\n          if(ionic.Gestures.detection.current.lastEvent.drag_locked_to_axis || (inst.options.drag_lock_to_axis && inst.options.drag_lock_min_distance<=ev.distance)) {\n            ev.drag_locked_to_axis = true;\n          }\n          var last_direction = ionic.Gestures.detection.current.lastEvent.direction;\n          if(ev.drag_locked_to_axis && last_direction !== ev.direction) {\n            // keep direction on the axis that the drag gesture started on\n            if(ionic.Gestures.utils.isVertical(last_direction)) {\n              ev.direction = (ev.deltaY < 0) ? ionic.Gestures.DIRECTION_UP : ionic.Gestures.DIRECTION_DOWN;\n            }\n            else {\n              ev.direction = (ev.deltaX < 0) ? ionic.Gestures.DIRECTION_LEFT : ionic.Gestures.DIRECTION_RIGHT;\n            }\n          }\n\n          // first time, trigger dragstart event\n          if(!this.triggered) {\n            inst.trigger(this.name +'start', ev);\n            this.triggered = true;\n          }\n\n          // trigger normal event\n          inst.trigger(this.name, ev);\n\n          // direction event, like dragdown\n          inst.trigger(this.name + ev.direction, ev);\n\n          // block the browser events\n          if( (inst.options.drag_block_vertical && ionic.Gestures.utils.isVertical(ev.direction)) ||\n              (inst.options.drag_block_horizontal && !ionic.Gestures.utils.isVertical(ev.direction))) {\n                ev.preventDefault();\n              }\n          break;\n\n        case ionic.Gestures.EVENT_END:\n          // trigger dragend\n          if(this.triggered) {\n            inst.trigger(this.name +'end', ev);\n          }\n\n          this.triggered = false;\n          break;\n      }\n    }\n  };\n\n\n  /**\n   * Transform\n   * User want to scale or rotate with 2 fingers\n   * events  transform, pinch, pinchin, pinchout, rotate\n   */\n  ionic.Gestures.gestures.Transform = {\n    name: 'transform',\n    index: 45,\n    defaults: {\n      // factor, no scale is 1, zoomin is to 0 and zoomout until higher then 1\n      transform_min_scale     : 0.01,\n      // rotation in degrees\n      transform_min_rotation  : 1,\n      // prevent default browser behavior when two touches are on the screen\n      // but it makes the element a blocking element\n      // when you are using the transform gesture, it is a good practice to set this true\n      transform_always_block  : false\n    },\n    triggered: false,\n    handler: function transformGesture(ev, inst) {\n      // current gesture isnt drag, but dragged is true\n      // this means an other gesture is busy. now call dragend\n      if(ionic.Gestures.detection.current.name != this.name && this.triggered) {\n        inst.trigger(this.name +'end', ev);\n        this.triggered = false;\n        return;\n      }\n\n      // atleast multitouch\n      if(ev.touches.length < 2) {\n        return;\n      }\n\n      // prevent default when two fingers are on the screen\n      if(inst.options.transform_always_block) {\n        ev.preventDefault();\n      }\n\n      switch(ev.eventType) {\n        case ionic.Gestures.EVENT_START:\n          this.triggered = false;\n          break;\n\n        case ionic.Gestures.EVENT_MOVE:\n          var scale_threshold = Math.abs(1-ev.scale);\n          var rotation_threshold = Math.abs(ev.rotation);\n\n          // when the distance we moved is too small we skip this gesture\n          // or we can be already in dragging\n          if(scale_threshold < inst.options.transform_min_scale &&\n              rotation_threshold < inst.options.transform_min_rotation) {\n                return;\n              }\n\n          // we are transforming!\n          ionic.Gestures.detection.current.name = this.name;\n\n          // first time, trigger dragstart event\n          if(!this.triggered) {\n            inst.trigger(this.name +'start', ev);\n            this.triggered = true;\n          }\n\n          inst.trigger(this.name, ev); // basic transform event\n\n          // trigger rotate event\n          if(rotation_threshold > inst.options.transform_min_rotation) {\n            inst.trigger('rotate', ev);\n          }\n\n          // trigger pinch event\n          if(scale_threshold > inst.options.transform_min_scale) {\n            inst.trigger('pinch', ev);\n            inst.trigger('pinch'+ ((ev.scale < 1) ? 'in' : 'out'), ev);\n          }\n          break;\n\n        case ionic.Gestures.EVENT_END:\n          // trigger dragend\n          if(this.triggered) {\n            inst.trigger(this.name +'end', ev);\n          }\n\n          this.triggered = false;\n          break;\n      }\n    }\n  };\n\n\n  /**\n   * Touch\n   * Called as first, tells the user has touched the screen\n   * events  touch\n   */\n  ionic.Gestures.gestures.Touch = {\n    name: 'touch',\n    index: -Infinity,\n    defaults: {\n      // call preventDefault at touchstart, and makes the element blocking by\n      // disabling the scrolling of the page, but it improves gestures like\n      // transforming and dragging.\n      // be careful with using this, it can be very annoying for users to be stuck\n      // on the page\n      prevent_default: false,\n\n      // disable mouse events, so only touch (or pen!) input triggers events\n      prevent_mouseevents: false\n    },\n    handler: function touchGesture(ev, inst) {\n      if(inst.options.prevent_mouseevents && ev.pointerType == ionic.Gestures.POINTER_MOUSE) {\n        ev.stopDetect();\n        return;\n      }\n\n      if(inst.options.prevent_default) {\n        ev.preventDefault();\n      }\n\n      if(ev.eventType ==  ionic.Gestures.EVENT_START) {\n        inst.trigger(this.name, ev);\n      }\n    }\n  };\n\n\n  /**\n   * Release\n   * Called as last, tells the user has released the screen\n   * events  release\n   */\n  ionic.Gestures.gestures.Release = {\n    name: 'release',\n    index: Infinity,\n    handler: function releaseGesture(ev, inst) {\n      if(ev.eventType ==  ionic.Gestures.EVENT_END) {\n        inst.trigger(this.name, ev);\n      }\n    }\n  };\n})(window.ionic);\n\n(function(window, document, ionic) {\n\n  /**\n   * @ngdoc utility\n   * @name ionic.Platform\n   * @module ionic\n   */\n  ionic.Platform = {\n\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#isReady\n     * @returns {boolean} Whether the device is ready.\n     */\n    isReady: false,\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#isFullScreen\n     * @returns {boolean} Whether the device is fullscreen.\n     */\n    isFullScreen: false,\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#platforms\n     * @returns {Array(string)} An array of all platforms found.\n     */\n    platforms: null,\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#grade\n     * @returns {string} What grade the current platform is.\n     */\n    grade: null,\n    ua: navigator.userAgent,\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#ready\n     * @description\n     * Trigger a callback once the device is ready,\n     * or immediately if the device is already ready.\n     * @param {function} callback The function to call.\n     */\n    ready: function(cb) {\n      // run through tasks to complete now that the device is ready\n      if(this.isReady) {\n        cb();\n      } else {\n        // the platform isn't ready yet, add it to this array\n        // which will be called once the platform is ready\n        readyCallbacks.push(cb);\n      }\n    },\n\n    /**\n     * @private\n     */\n    detect: function() {\n      ionic.Platform._checkPlatforms();\n\n      ionic.requestAnimationFrame(function(){\n        // only add to the body class if we got platform info\n        for(var i = 0; i < ionic.Platform.platforms.length; i++) {\n          document.body.classList.add('platform-' + ionic.Platform.platforms[i]);\n        }\n        document.body.classList.add('grade-' + ionic.Platform.grade);\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#device\n     * @description Return the current device (given by cordova).\n     * @returns {object} The device object.\n     */\n    device: function() {\n      if(window.device) return window.device;\n      if(this.isCordova()) console.error('device plugin required');\n      return {};\n    },\n\n    _checkPlatforms: function(platforms) {\n      this.platforms = [];\n      this.grade = 'a';\n\n      if(this.isCordova()) this.platforms.push('cordova');\n      if(this.isIPad()) this.platforms.push('ipad');\n\n      var platform = this.platform();\n      if(platform) {\n        this.platforms.push(platform);\n\n        var version = this.version();\n        if(version) {\n          var v = version.toString();\n          if(v.indexOf('.') > 0) {\n            v = v.replace('.', '_');\n          } else {\n            v += '_0';\n          }\n          this.platforms.push(platform + v.split('_')[0]);\n          this.platforms.push(platform + v);\n\n          if(this.isAndroid() && version < 4.4) {\n            this.grade = (version < 4 ? 'c' : 'b');\n          }\n        }\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isCordova\n     * @returns {boolean} Whether we are running on Cordova.\n     */\n    isCordova: function() {\n      return !(!window.cordova && !window.PhoneGap && !window.phonegap);\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isIPad\n     * @returns {boolean} Whether we are running on iPad.\n     */\n    isIPad: function() {\n      return this.ua.toLowerCase().indexOf('ipad') >= 0;\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isIOS\n     * @returns {boolean} Whether we are running on iOS.\n     */\n    isIOS: function() {\n      return this.is('ios');\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isAndroid\n     * @returns {boolean} Whether we are running on Android.\n     */\n    isAndroid: function() {\n      return this.is('android');\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#platform\n     * @returns {string} The name of the current platform.\n     */\n    platform: function() {\n      // singleton to get the platform name\n      if(platformName === null) this.setPlatform(this.device().platform);\n      return platformName;\n    },\n\n    /**\n     * @private\n     */\n    setPlatform: function(n) {\n      if(typeof n != 'undefined' && n !== null && n.length) {\n        platformName = n.toLowerCase();\n      } else if(this.ua.indexOf('Android') > 0) {\n        platformName = 'android';\n      } else if(this.ua.indexOf('iPhone') > -1 || this.ua.indexOf('iPad') > -1 || this.ua.indexOf('iPod') > -1) {\n        platformName = 'ios';\n      } else {\n        platformName = '';\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#version\n     * @returns {string} The version of the current device platform.\n     */\n    version: function() {\n      // singleton to get the platform version\n      if(platformVersion === null) this.setVersion(this.device().version);\n      return platformVersion;\n    },\n\n    /**\n     * @private\n     */\n    setVersion: function(v) {\n      if(typeof v != 'undefined' && v !== null) {\n        v = v.split('.');\n        v = parseFloat(v[0] + '.' + (v.length > 1 ? v[1] : 0));\n        if(!isNaN(v)) {\n          platformVersion = v;\n          return;\n        }\n      }\n\n      platformVersion = 0;\n\n      // fallback to user-agent checking\n      var pName = this.platform();\n      var versionMatch = {\n        'android': /Android (\\d+).(\\d+)?/,\n        'ios': /OS (\\d+)_(\\d+)?/\n      };\n      if(versionMatch[pName]) {\n        v = this.ua.match( versionMatch[pName] );\n        if(v.length > 2) {\n          platformVersion = parseFloat( v[1] + '.' + v[2] );\n        }\n      }\n    },\n\n    // Check if the platform is the one detected by cordova\n    is: function(type) {\n      type = type.toLowerCase();\n      // check if it has an array of platforms\n      if(this.platforms) {\n        for(var x = 0; x < this.platforms.length; x++) {\n          if(this.platforms[x] === type) return true;\n        }\n      }\n      // exact match\n      var pName = this.platform();\n      if(pName) {\n        return pName === type.toLowerCase();\n      }\n\n      // A quick hack for to check userAgent\n      return this.ua.toLowerCase().indexOf(type) >= 0;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#exitApp\n     * @description Exit the app.\n     */\n    exitApp: function() {\n      this.ready(function(){\n        navigator.app && navigator.app.exitApp && navigator.app.exitApp();\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#showStatusBar\n     * @description Shows or hides the device status bar (in Cordova).\n     * @param {boolean} shouldShow Whether or not to show the status bar.\n     */\n    showStatusBar: function(val) {\n      // Only useful when run within cordova\n      this._showStatusBar = val;\n      this.ready(function(){\n        // run this only when or if the platform (cordova) is ready\n        ionic.requestAnimationFrame(function(){\n          if(ionic.Platform._showStatusBar) {\n            // they do not want it to be full screen\n            window.StatusBar && window.StatusBar.show();\n            document.body.classList.remove('status-bar-hide');\n          } else {\n            // it should be full screen\n            window.StatusBar && window.StatusBar.hide();\n            document.body.classList.add('status-bar-hide');\n          }\n        });\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#fullScreen\n     * @description\n     * Sets whether the app is fullscreen or not (in Cordova).\n     * @param {boolean=} showFullScreen Whether or not to set the app to fullscreen. Defaults to true.\n     * @param {boolean=} showStatusBar Whether or not to show the device's status bar. Defaults to false.\n     */\n    fullScreen: function(showFullScreen, showStatusBar) {\n      // showFullScreen: default is true if no param provided\n      this.isFullScreen = (showFullScreen !== false);\n\n      // add/remove the fullscreen classname to the body\n      ionic.DomUtil.ready(function(){\n        // run this only when or if the DOM is ready\n        ionic.requestAnimationFrame(function(){\n          if(ionic.Platform.isFullScreen) {\n            document.body.classList.add('fullscreen');\n          } else {\n            document.body.classList.remove('fullscreen');\n          }\n        });\n        // showStatusBar: default is false if no param provided\n        ionic.Platform.showStatusBar( (showStatusBar === true) );\n      });\n    }\n\n  };\n\n  var platformName = null, // just the name, like iOS or Android\n  platformVersion = null, // a float of the major and minor, like 7.1\n  readyCallbacks = [];\n\n  // setup listeners to know when the device is ready to go\n  function onWindowLoad() {\n    if(ionic.Platform.isCordova()) {\n      // the window and scripts are fully loaded, and a cordova/phonegap\n      // object exists then let's listen for the deviceready\n      document.addEventListener(\"deviceready\", onPlatformReady, false);\n    } else {\n      // the window and scripts are fully loaded, but the window object doesn't have the\n      // cordova/phonegap object, so its just a browser, not a webview wrapped w/ cordova\n      onPlatformReady();\n    }\n    window.removeEventListener(\"load\", onWindowLoad, false);\n  }\n  window.addEventListener(\"load\", onWindowLoad, false);\n\n  function onPlatformReady() {\n    // the device is all set to go, init our own stuff then fire off our event\n    ionic.Platform.isReady = true;\n    ionic.Platform.detect();\n    for(var x=0; x<readyCallbacks.length; x++) {\n      // fire off all the callbacks that were added before the platform was ready\n      readyCallbacks[x]();\n    }\n    readyCallbacks = [];\n    ionic.trigger('platformready', { target: document });\n\n    ionic.requestAnimationFrame(function(){\n      document.body.classList.add('platform-ready');\n    });\n  }\n\n})(this, document, ionic);\n\n(function(document, ionic) {\n  'use strict';\n\n  // Ionic CSS polyfills\n  ionic.CSS = {};\n\n  (function() {\n\n    // transform\n    var i, keys = ['webkitTransform', 'transform', '-webkit-transform', 'webkit-transform',\n                '-moz-transform', 'moz-transform', 'MozTransform', 'mozTransform'];\n\n    for(i = 0; i < keys.length; i++) {\n      if(document.documentElement.style[keys[i]] !== undefined) {\n        ionic.CSS.TRANSFORM = keys[i];\n        break;\n      }\n    }\n\n    // transition\n    keys = ['webkitTransition', 'mozTransition', 'transition'];\n    for(i = 0; i < keys.length; i++) {\n      if(document.documentElement.style[keys[i]] !== undefined) {\n        ionic.CSS.TRANSITION = keys[i];\n        break;\n      }\n    }\n\n  })();\n\n  // classList polyfill for them older Androids\n  // https://gist.github.com/devongovett/1381839\n  if (!(\"classList\" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== 'undefined') {\n    Object.defineProperty(HTMLElement.prototype, 'classList', {\n      get: function() {\n        var self = this;\n        function update(fn) {\n          return function() {\n            var x, classes = self.className.split(/\\s+/);\n\n            for(x=0; x<arguments.length; x++) {\n              fn(classes, classes.indexOf(arguments[x]), arguments[x]);\n            }\n\n            self.className = classes.join(\" \");\n          };\n        }\n\n        return {\n          add: update(function(classes, index, value) {\n            ~index || classes.push(value);\n          }),\n\n          remove: update(function(classes, index) {\n            ~index && classes.splice(index, 1);\n          }),\n\n          toggle: update(function(classes, index, value) {\n            ~index ? classes.splice(index, 1) : classes.push(value);\n          }),\n\n          contains: function(value) {\n            return !!~self.className.split(/\\s+/).indexOf(value);\n          },\n\n          item: function(i) {\n            return self.className.split(/\\s+/)[i] || null;\n          }\n        };\n\n      }\n    });\n  }\n\n})(document, ionic);\n\n(function(window, document, ionic) {\n  'use strict';\n\n  // polyfill use to simulate native \"tap\"\n  ionic.tapElement = function(target, e) {\n    // simulate a normal click by running the element's click method then focus on it\n\n    var ele = target.control || target;\n\n    if(ele.disabled || ele.type === 'file' || ele.type === 'range') return;\n\n    console.debug('tapElement', ele.tagName, ele.className);\n\n    var c = getCoordinates(e);\n\n    // using initMouseEvent instead of MouseEvent for our Android friends\n    var clickEvent = document.createEvent(\"MouseEvents\");\n    clickEvent.initMouseEvent('click', true, true, window,\n                              1, 0, 0, c.x, c.y,\n                              false, false, false, false, 0, null);\n\n    ele.dispatchEvent(clickEvent);\n\n    if(ele.tagName === 'INPUT' || ele.tagName === 'TEXTAREA') {\n      ele.focus();\n      e.preventDefault();\n    } else {\n      blurActive();\n    }\n\n    // remember the coordinates of this tap so if it happens again we can ignore it\n    // but only if the coordinates are not already being actively disabled\n    if( !isRecentTap(e) ) {\n      recordCoordinates(e);\n    }\n\n    if(target.control) {\n      console.debug('tapElement, target.control, stop');\n      return stopEvent(e);\n    }\n  };\n\n  function tapPolyfill(orgEvent) {\n    // if the source event wasn't from a touch event then don't use this polyfill\n    if(!orgEvent.gesture || !orgEvent.gesture.srcEvent) return;\n\n    var e = orgEvent.gesture.srcEvent; // evaluate the actual source event, not the created event by gestures.js\n    var ele = e.target;\n\n    if( isRecentTap(e) ) {\n      // if a tap in the same area just happened, don't continue\n      console.debug('tapPolyfill', 'isRecentTap', ele.tagName);\n      return stopEvent(e);\n    }\n\n    for(var x=0; x<5; x++) {\n      // climb up the DOM looking to see if the tapped element is, or has a parent, of one of these\n      // only climb up a max of 5 parents, anything more probably isn't beneficial\n      if(!ele) break;\n\n      if( ele.tagName === \"INPUT\" ||\n          ele.tagName === \"A\" ||\n          ele.tagName === \"BUTTON\" ||\n          ele.tagName === \"LABEL\" ||\n          ele.tagName === \"TEXTAREA\" ) {\n\n        return ionic.tapElement(ele, e);\n      }\n      ele = ele.parentElement;\n    }\n\n    // they didn't tap one of the above elements\n    // if the currently active element is an input, and they tapped outside\n    // of the current input, then unset its focus (blur) so the keyboard goes away\n    blurActive();\n  }\n\n  function preventGhostClick(e) {\n\n    console.debug((function(){\n      // Great for debugging, and thankfully this gets removed from the build, OMG it's ugly\n\n      if(e.target.control) {\n        // this is a label that has an associated input\n        // the native layer will send the actual event, so stop this one\n        console.debug('preventGhostClick', 'label');\n\n      } else if(isRecentTap(e)) {\n        // a tap has already happened at these coordinates recently, ignore this event\n        console.debug('preventGhostClick', 'isRecentTap', e.target.tagName);\n\n      } else if(isScrolledSinceStart(e)) {\n        // this click's coordinates are different than its touchstart/mousedown, must have been scrolling\n        console.debug('preventGhostClick', 'isScrolledSinceStart, startCoordinates, x:' + startCoordinates.x + ' y:' + startCoordinates.y);\n      }\n\n      var c = getCoordinates(e);\n      return 'click at x:' + c.x + ', y:' + c.y;\n    })());\n\n\n    if(e.target.control || isRecentTap(e) || isScrolledSinceStart(e)) {\n      return stopEvent(e);\n    }\n\n    // remember the coordinates of this click so if a tap or click in the\n    // same area quickly happened again we can ignore it\n    recordCoordinates(e);\n  }\n\n  function isRecentTap(event) {\n    // loop through the tap coordinates and see if the same area has been tapped recently\n    var tapId, existingCoordinates, currentCoordinates;\n\n    for(tapId in tapCoordinates) {\n      existingCoordinates = tapCoordinates[tapId];\n      if(!currentCoordinates) currentCoordinates = getCoordinates(event); // lazy load it when needed\n\n      if(currentCoordinates.x > existingCoordinates.x - HIT_RADIUS &&\n         currentCoordinates.x < existingCoordinates.x + HIT_RADIUS &&\n         currentCoordinates.y > existingCoordinates.y - HIT_RADIUS &&\n         currentCoordinates.y < existingCoordinates.y + HIT_RADIUS) {\n        // the current tap coordinates are in the same area as a recent tap\n        return existingCoordinates;\n      }\n    }\n  }\n\n  function isScrolledSinceStart(event) {\n    // check if this click's coordinates are different than its touchstart/mousedown\n    var c = getCoordinates(event);\n\n    // Quick check for 0,0 which could be simulated mouse click for form submission\n    if(c.x === 0 && c.y === 0) {\n      return false;\n    }\n\n    return (c.x > startCoordinates.x + 2 ||\n            c.x < startCoordinates.x - 2 ||\n            c.y > startCoordinates.y + 2 ||\n            c.y < startCoordinates.y - 2);\n  }\n\n  function recordCoordinates(event) {\n    var c = getCoordinates(event);\n    if(c.x && c.y) {\n      var tapId = Date.now();\n\n      // only record tap coordinates if we have valid ones\n      tapCoordinates[tapId] = { x: c.x, y: c.y, id: tapId };\n\n      setTimeout(function() {\n        // delete the tap coordinates after X milliseconds, basically allowing\n        // it so a tap can happen again in the same area in the future\n        delete tapCoordinates[tapId];\n      }, CLICK_PREVENT_DURATION);\n    }\n  }\n\n  function getCoordinates(event) {\n    // This method can get coordinates for both a mouse click\n    // or a touch depending on the given event\n    var gesture = (event.gesture ? event.gesture : event);\n\n    if(gesture) {\n      var touches = gesture.touches && gesture.touches.length ? gesture.touches : [gesture];\n      var e = (gesture.changedTouches && gesture.changedTouches[0]) ||\n          (gesture.originalEvent && gesture.originalEvent.changedTouches &&\n              gesture.originalEvent.changedTouches[0]) ||\n          touches[0].originalEvent || touches[0];\n\n      if(e) return { x: e.clientX || e.pageX, y: e.clientY || e.pageY };\n    }\n    return { x:0, y:0 };\n  }\n\n  var clickPreventTimerId;\n  function removeClickPrevent(e) {\n    clearTimeout(clickPreventTimerId);\n    clickPreventTimerId = setTimeout(function(){\n      var tap = isRecentTap(e);\n      if(tap) delete tapCoordinates[tap.id];\n      startCoordinates = {};\n    }, REMOVE_PREVENT_DELAY);\n  }\n\n  function stopEvent(e){\n    e.stopPropagation();\n    e.preventDefault();\n    return false;\n  }\n\n  function blurActive() {\n    var ele = document.activeElement;\n    if(ele && (ele.tagName === \"INPUT\" ||\n               ele.tagName === \"TEXTAREA\")) {\n      // using a timeout to prevent funky scrolling while a keyboard hides\n      setTimeout(function(){\n        ele.blur();\n      }, 400);\n    }\n  }\n\n  function recordStartCoordinates(e) {\n    startCoordinates = getCoordinates(e);\n  }\n\n  var tapCoordinates = {}; // used to remember coordinates to ignore if they happen again quickly\n  var startCoordinates = {}; // used to remember where the coordinates of the start of the tap\n  var CLICK_PREVENT_DURATION = 1500; // max milliseconds ghostclicks in the same area should be prevented\n  var REMOVE_PREVENT_DELAY = 380; // delay after a touchend/mouseup before removing the ghostclick prevent\n  var HIT_RADIUS = 15;\n\n  ionic.Platform.ready(function(){\n\n    if(ionic.Platform.grade === 'c') {\n      // low performing phones should have a longer ghostclick prevent\n      REMOVE_PREVENT_DELAY = 800;\n    }\n\n    // set global click handler and check if the event should stop or not\n    document.addEventListener('click', preventGhostClick, true);\n\n    // global release event listener polyfill for HTML elements that were tapped or held\n    ionic.on(\"release\", tapPolyfill, document);\n\n    // listeners used to remove ghostclick prevention\n    document.addEventListener('touchend', removeClickPrevent, false);\n    document.addEventListener('mouseup', removeClickPrevent, false);\n\n    // in the case the user touched the screen, then scrolled, it shouldn't fire the click\n    document.addEventListener('touchstart', recordStartCoordinates, false);\n    document.addEventListener('mousedown', recordStartCoordinates, false);\n  });\n\n})(this, document, ionic);\n\n(function(document, ionic) {\n  'use strict';\n\n  var queueElements = {};   // elements that should get an active state in XX milliseconds\n  var activeElements = {};  // elements that are currently active\n  var keyId = 0;            // a counter for unique keys for the above ojects\n\n  ionic.activator = {\n\n    start: function(e) {\n      // when an element is touched/clicked, it climbs up a few\n      // parents to see if it is an .item or .button element\n      ionic.requestAnimationFrame(function(){\n        var ele = e.target;\n        var eleToActivate;\n\n        for(var x=0; x<4; x++) {\n          if(!ele) break;\n          if(eleToActivate && ele.classList.contains('item')) {\n            eleToActivate = ele;\n            break;\n          }\n          if( ele.tagName == 'A' || ele.tagName == 'BUTTON' || ele.getAttribute('ng-click') ) {\n            eleToActivate = ele;\n          }\n          if( ele.classList.contains('button') ) {\n            eleToActivate = ele;\n            break;\n          }\n          ele = ele.parentElement;\n        }\n\n        if(eleToActivate) {\n          // queue that this element should be set to active\n          queueElements[keyId] = eleToActivate;\n\n          // in XX milliseconds, set the queued elements to active\n          // add listeners to clear all queued/active elements onMove\n          if(e.type === 'touchstart') {\n            document.body.removeEventListener('mousedown', ionic.activator.start);\n            document.body.addEventListener('touchmove', clear, false);\n            setTimeout(activateElements, 85);\n          } else {\n            document.body.addEventListener('mousemove', clear, false);\n            ionic.requestAnimationFrame(activateElements);\n          }\n\n          keyId = (keyId > 19 ? 0 : keyId + 1);\n        }\n\n      });\n    }\n  };\n\n  function activateElements() {\n    // activate all elements in the queue\n    for(var key in queueElements) {\n      if(queueElements[key]) {\n        queueElements[key].classList.add('active');\n        activeElements[key] = queueElements[key];\n      }\n    }\n    queueElements = {};\n  }\n\n  function deactivateElements() {\n    for(var key in activeElements) {\n      if(activeElements[key]) {\n        activeElements[key].classList.remove('active');\n        delete activeElements[key];\n      }\n    }\n  }\n\n  function onEnd(e) {\n    // clear out any active/queued elements after XX milliseconds\n    setTimeout(clear, 200);\n  }\n\n  function clear() {\n    // clear out any elements that are queued to be set to active\n    queueElements = {};\n\n    // in the next frame, remove the active class from all active elements\n    ionic.requestAnimationFrame(deactivateElements);\n\n    // remove onMove listeners that clear out active elements\n    document.body.removeEventListener('mousemove', clear);\n    document.body.removeEventListener('touchmove', clear);\n  }\n\n  // use window.onload because this doesn't need to run immediately\n  window.addEventListener('load', function(){\n    // start an active element\n    document.body.addEventListener('touchstart', ionic.activator.start, false);\n    document.body.addEventListener('mousedown', ionic.activator.start, false);\n\n    // clear all active elements after XX milliseconds\n    document.body.addEventListener('touchend', onEnd, false);\n    document.body.addEventListener('mouseup', onEnd, false);\n    document.body.addEventListener('touchcancel', onEnd, false);\n  }, false);\n\n})(document, ionic);\n\n(function(ionic) {\n\n  /* for nextUid() function below */\n  var uid = ['0','0','0'];\n\n  /**\n   * Various utilities used throughout Ionic\n   *\n   * Some of these are adopted from underscore.js and backbone.js, both also MIT licensed.\n   */\n  ionic.Utils = {\n\n    arrayMove: function (arr, old_index, new_index) {\n      if (new_index >= arr.length) {\n        var k = new_index - arr.length;\n        while ((k--) + 1) {\n          arr.push(undefined);\n        }\n      }\n      arr.splice(new_index, 0, arr.splice(old_index, 1)[0]);\n      return arr;\n    },\n\n    /**\n     * Return a function that will be called with the given context\n     */\n    proxy: function(func, context) {\n      var args = Array.prototype.slice.call(arguments, 2);\n      return function() {\n        return func.apply(context, args.concat(Array.prototype.slice.call(arguments)));\n      };\n    },\n\n    /**\n     * Only call a function once in the given interval.\n     *\n     * @param func {Function} the function to call\n     * @param wait {int} how long to wait before/after to allow function calls\n     * @param immediate {boolean} whether to call immediately or after the wait interval\n     */\n     debounce: function(func, wait, immediate) {\n      var timeout, args, context, timestamp, result;\n      return function() {\n        context = this;\n        args = arguments;\n        timestamp = new Date();\n        var later = function() {\n          var last = (new Date()) - timestamp;\n          if (last < wait) {\n            timeout = setTimeout(later, wait - last);\n          } else {\n            timeout = null;\n            if (!immediate) result = func.apply(context, args);\n          }\n        };\n        var callNow = immediate && !timeout;\n        if (!timeout) {\n          timeout = setTimeout(later, wait);\n        }\n        if (callNow) result = func.apply(context, args);\n        return result;\n      };\n    },\n\n    /**\n     * Throttle the given fun, only allowing it to be\n     * called at most every `wait` ms.\n     */\n    throttle: function(func, wait, options) {\n      var context, args, result;\n      var timeout = null;\n      var previous = 0;\n      options || (options = {});\n      var later = function() {\n        previous = options.leading === false ? 0 : Date.now();\n        timeout = null;\n        result = func.apply(context, args);\n      };\n      return function() {\n        var now = Date.now();\n        if (!previous && options.leading === false) previous = now;\n        var remaining = wait - (now - previous);\n        context = this;\n        args = arguments;\n        if (remaining <= 0) {\n          clearTimeout(timeout);\n          timeout = null;\n          previous = now;\n          result = func.apply(context, args);\n        } else if (!timeout && options.trailing !== false) {\n          timeout = setTimeout(later, remaining);\n        }\n        return result;\n      };\n    },\n     // Borrowed from Backbone.js's extend\n     // Helper function to correctly set up the prototype chain, for subclasses.\n     // Similar to `goog.inherits`, but uses a hash of prototype properties and\n     // class properties to be extended.\n    inherit: function(protoProps, staticProps) {\n      var parent = this;\n      var child;\n\n      // The constructor function for the new subclass is either defined by you\n      // (the \"constructor\" property in your `extend` definition), or defaulted\n      // by us to simply call the parent's constructor.\n      if (protoProps && protoProps.hasOwnProperty('constructor')) {\n        child = protoProps.constructor;\n      } else {\n        child = function(){ return parent.apply(this, arguments); };\n      }\n\n      // Add static properties to the constructor function, if supplied.\n      ionic.extend(child, parent, staticProps);\n\n      // Set the prototype chain to inherit from `parent`, without calling\n      // `parent`'s constructor function.\n      var Surrogate = function(){ this.constructor = child; };\n      Surrogate.prototype = parent.prototype;\n      child.prototype = new Surrogate;\n\n      // Add prototype properties (instance properties) to the subclass,\n      // if supplied.\n      if (protoProps) ionic.extend(child.prototype, protoProps);\n\n      // Set a convenience property in case the parent's prototype is needed\n      // later.\n      child.__super__ = parent.prototype;\n\n      return child;\n    },\n\n    // Extend adapted from Underscore.js\n    extend: function(obj) {\n       var args = Array.prototype.slice.call(arguments, 1);\n       for(var i = 0; i < args.length; i++) {\n         var source = args[i];\n         if (source) {\n           for (var prop in source) {\n             obj[prop] = source[prop];\n           }\n         }\n       }\n       return obj;\n    },\n\n    /**\n     * A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric\n     * characters such as '012ABC'. The reason why we are not using simply a number counter is that\n     * the number string gets longer over time, and it can also overflow, where as the nextId\n     * will grow much slower, it is a string, and it will never overflow.\n     *\n     * @returns an unique alpha-numeric string\n     */\n    nextUid: function() {\n      var index = uid.length;\n      var digit;\n\n      while(index) {\n        index--;\n        digit = uid[index].charCodeAt(0);\n        if (digit == 57 /*'9'*/) {\n          uid[index] = 'A';\n          return uid.join('');\n        }\n        if (digit == 90  /*'Z'*/) {\n          uid[index] = '0';\n        } else {\n          uid[index] = String.fromCharCode(digit + 1);\n          return uid.join('');\n        }\n      }\n      uid.unshift('0');\n      return uid.join('');\n    }\n  };\n\n  // Bind a few of the most useful functions to the ionic scope\n  ionic.inherit = ionic.Utils.inherit;\n  ionic.extend = ionic.Utils.extend;\n  ionic.throttle = ionic.Utils.throttle;\n  ionic.proxy = ionic.Utils.proxy;\n  ionic.debounce = ionic.Utils.debounce;\n\n})(window.ionic);\n\n(function(ionic) {\n\nionic.Platform.ready(function() {\n  if (ionic.Platform.is('android')) {\n    androidKeyboardFix();\n  }\n});\n\nfunction androidKeyboardFix() {\n  var rememberedDeviceWidth = window.innerWidth;\n  var rememberedDeviceHeight = window.innerHeight;\n  var keyboardHeight;\n\n  window.addEventListener('resize', resize);\n\n  function resize() {\n\n    //If the width of the window changes, we have an orientation change\n    if (rememberedDeviceWidth !== window.innerWidth) {\n      rememberedDeviceWidth = window.innerWidth;\n      rememberedDeviceHeight = window.innerHeight;\n      console.info('orientation change. deviceWidth =', rememberedDeviceWidth, ', deviceHeight =', rememberedDeviceHeight);\n\n    //If the height changes, and it's less than before, we have a keyboard open\n    } else if (rememberedDeviceHeight !== window.innerHeight &&\n               window.innerHeight < rememberedDeviceHeight) {\n      document.body.classList.add('footer-hide');\n      //Wait for next frame so document.activeElement is set\n      ionic.requestAnimationFrame(handleKeyboardChange);\n    } else {\n      //Otherwise we have a keyboard close or a *really* weird resize\n      document.body.classList.remove('footer-hide');\n    }\n\n    function handleKeyboardChange() {\n      //keyboard opens\n      keyboardHeight = rememberedDeviceHeight - window.innerHeight;\n      var activeEl = document.activeElement;\n      if (activeEl) {\n        //This event is caught by the nearest parent scrollView\n        //of the activeElement\n        ionic.trigger('scrollChildIntoView', {\n          target: activeEl\n        }, true);\n      }\n\n    }\n  }\n}\n\n})(window.ionic);\n\n(function(ionic) {\n'use strict';\n  ionic.views.View = function() {\n    this.initialize.apply(this, arguments);\n  };\n\n  ionic.views.View.inherit = ionic.inherit;\n\n  ionic.extend(ionic.views.View.prototype, {\n    initialize: function() {}\n  });\n\n})(window.ionic);\n\nvar IS_INPUT_LIKE_REGEX = /input|textarea|select/i;\nvar IS_EMBEDDED_OBJECT_REGEX = /object|embed/i;\n/*\n * Scroller\n * http://github.com/zynga/scroller\n *\n * Copyright 2011, Zynga Inc.\n * Licensed under the MIT License.\n * https://raw.github.com/zynga/scroller/master/MIT-LICENSE.txt\n *\n * Based on the work of: Unify Project (unify-project.org)\n * http://unify-project.org\n * Copyright 2011, Deutsche Telekom AG\n * License: MIT + Apache (V2)\n */\n\n/**\n * Generic animation class with support for dropped frames both optional easing and duration.\n *\n * Optional duration is useful when the lifetime is defined by another condition than time\n * e.g. speed of an animating object, etc.\n *\n * Dropped frame logic allows to keep using the same updater logic independent from the actual\n * rendering. This eases a lot of cases where it might be pretty complex to break down a state\n * based on the pure time difference.\n */\n(function(global) {\n\tvar time = Date.now || function() {\n\t\treturn +new Date();\n\t};\n\tvar desiredFrames = 60;\n\tvar millisecondsPerSecond = 1000;\n\tvar running = {};\n\tvar counter = 1;\n\n\t// Create namespaces\n\tif (!global.core) {\n\t\tvar core = global.core = { effect : {} };\n\n\t} else if (!core.effect) {\n\t\tcore.effect = {};\n\t}\n\n\tcore.effect.Animate = {\n\n\t\t/**\n\t\t * A requestAnimationFrame wrapper / polyfill.\n\t\t *\n\t\t * @param callback {Function} The callback to be invoked before the next repaint.\n\t\t * @param root {HTMLElement} The root element for the repaint\n\t\t */\n\t\trequestAnimationFrame: (function() {\n\n\t\t\t// Check for request animation Frame support\n\t\t\tvar requestFrame = global.requestAnimationFrame || global.webkitRequestAnimationFrame || global.mozRequestAnimationFrame || global.oRequestAnimationFrame;\n\t\t\tvar isNative = !!requestFrame;\n\n\t\t\tif (requestFrame && !/requestAnimationFrame\\(\\)\\s*\\{\\s*\\[native code\\]\\s*\\}/i.test(requestFrame.toString())) {\n\t\t\t\tisNative = false;\n\t\t\t}\n\n\t\t\tif (isNative) {\n\t\t\t\treturn function(callback, root) {\n\t\t\t\t\trequestFrame(callback, root)\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar TARGET_FPS = 60;\n\t\t\tvar requests = {};\n\t\t\tvar requestCount = 0;\n\t\t\tvar rafHandle = 1;\n\t\t\tvar intervalHandle = null;\n\t\t\tvar lastActive = +new Date();\n\n\t\t\treturn function(callback, root) {\n\t\t\t\tvar callbackHandle = rafHandle++;\n\n\t\t\t\t// Store callback\n\t\t\t\trequests[callbackHandle] = callback;\n\t\t\t\trequestCount++;\n\n\t\t\t\t// Create timeout at first request\n\t\t\t\tif (intervalHandle === null) {\n\n\t\t\t\t\tintervalHandle = setInterval(function() {\n\n\t\t\t\t\t\tvar time = +new Date();\n\t\t\t\t\t\tvar currentRequests = requests;\n\n\t\t\t\t\t\t// Reset data structure before executing callbacks\n\t\t\t\t\t\trequests = {};\n\t\t\t\t\t\trequestCount = 0;\n\n\t\t\t\t\t\tfor(var key in currentRequests) {\n\t\t\t\t\t\t\tif (currentRequests.hasOwnProperty(key)) {\n\t\t\t\t\t\t\t\tcurrentRequests[key](time);\n\t\t\t\t\t\t\t\tlastActive = time;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Disable the timeout when nothing happens for a certain\n\t\t\t\t\t\t// period of time\n\t\t\t\t\t\tif (time - lastActive > 2500) {\n\t\t\t\t\t\t\tclearInterval(intervalHandle);\n\t\t\t\t\t\t\tintervalHandle = null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}, 1000 / TARGET_FPS);\n\t\t\t\t}\n\n\t\t\t\treturn callbackHandle;\n\t\t\t};\n\n\t\t})(),\n\n\n\t\t/**\n\t\t * Stops the given animation.\n\t\t *\n\t\t * @param id {Integer} Unique animation ID\n\t\t * @return {Boolean} Whether the animation was stopped (aka, was running before)\n\t\t */\n\t\tstop: function(id) {\n\t\t\tvar cleared = running[id] != null;\n\t\t\tif (cleared) {\n\t\t\t\trunning[id] = null;\n\t\t\t}\n\n\t\t\treturn cleared;\n\t\t},\n\n\n\t\t/**\n\t\t * Whether the given animation is still running.\n\t\t *\n\t\t * @param id {Integer} Unique animation ID\n\t\t * @return {Boolean} Whether the animation is still running\n\t\t */\n\t\tisRunning: function(id) {\n\t\t\treturn running[id] != null;\n\t\t},\n\n\n\t\t/**\n\t\t * Start the animation.\n\t\t *\n\t\t * @param stepCallback {Function} Pointer to function which is executed on every step.\n\t\t *   Signature of the method should be `function(percent, now, virtual) { return continueWithAnimation; }`\n\t\t * @param verifyCallback {Function} Executed before every animation step.\n\t\t *   Signature of the method should be `function() { return continueWithAnimation; }`\n\t\t * @param completedCallback {Function}\n\t\t *   Signature of the method should be `function(droppedFrames, finishedAnimation) {}`\n\t\t * @param duration {Integer} Milliseconds to run the animation\n\t\t * @param easingMethod {Function} Pointer to easing function\n\t\t *   Signature of the method should be `function(percent) { return modifiedValue; }`\n\t\t * @param root {Element} Render root, when available. Used for internal\n\t\t *   usage of requestAnimationFrame.\n\t\t * @return {Integer} Identifier of animation. Can be used to stop it any time.\n\t\t */\n\t\tstart: function(stepCallback, verifyCallback, completedCallback, duration, easingMethod, root) {\n\n\t\t\tvar start = time();\n\t\t\tvar lastFrame = start;\n\t\t\tvar percent = 0;\n\t\t\tvar dropCounter = 0;\n\t\t\tvar id = counter++;\n\n\t\t\tif (!root) {\n\t\t\t\troot = document.body;\n\t\t\t}\n\n\t\t\t// Compacting running db automatically every few new animations\n\t\t\tif (id % 20 === 0) {\n\t\t\t\tvar newRunning = {};\n\t\t\t\tfor (var usedId in running) {\n\t\t\t\t\tnewRunning[usedId] = true;\n\t\t\t\t}\n\t\t\t\trunning = newRunning;\n\t\t\t}\n\n\t\t\t// This is the internal step method which is called every few milliseconds\n\t\t\tvar step = function(virtual) {\n\n\t\t\t\t// Normalize virtual value\n\t\t\t\tvar render = virtual !== true;\n\n\t\t\t\t// Get current time\n\t\t\t\tvar now = time();\n\n\t\t\t\t// Verification is executed before next animation step\n\t\t\t\tif (!running[id] || (verifyCallback && !verifyCallback(id))) {\n\n\t\t\t\t\trunning[id] = null;\n\t\t\t\t\tcompletedCallback && completedCallback(desiredFrames - (dropCounter / ((now - start) / millisecondsPerSecond)), id, false);\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\t// For the current rendering to apply let's update omitted steps in memory.\n\t\t\t\t// This is important to bring internal state variables up-to-date with progress in time.\n\t\t\t\tif (render) {\n\n\t\t\t\t\tvar droppedFrames = Math.round((now - lastFrame) / (millisecondsPerSecond / desiredFrames)) - 1;\n\t\t\t\t\tfor (var j = 0; j < Math.min(droppedFrames, 4); j++) {\n\t\t\t\t\t\tstep(true);\n\t\t\t\t\t\tdropCounter++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// Compute percent value\n\t\t\t\tif (duration) {\n\t\t\t\t\tpercent = (now - start) / duration;\n\t\t\t\t\tif (percent > 1) {\n\t\t\t\t\t\tpercent = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Execute step callback, then...\n\t\t\t\tvar value = easingMethod ? easingMethod(percent) : percent;\n\t\t\t\tif ((stepCallback(value, now, render) === false || percent === 1) && render) {\n\t\t\t\t\trunning[id] = null;\n\t\t\t\t\tcompletedCallback && completedCallback(desiredFrames - (dropCounter / ((now - start) / millisecondsPerSecond)), id, percent === 1 || duration == null);\n\t\t\t\t} else if (render) {\n\t\t\t\t\tlastFrame = now;\n\t\t\t\t\tcore.effect.Animate.requestAnimationFrame(step, root);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Mark as running\n\t\t\trunning[id] = true;\n\n\t\t\t// Init first step\n\t\t\tcore.effect.Animate.requestAnimationFrame(step, root);\n\n\t\t\t// Return unique animation ID\n\t\t\treturn id;\n\t\t}\n\t};\n})(this);\n\n/*\n * Scroller\n * http://github.com/zynga/scroller\n *\n * Copyright 2011, Zynga Inc.\n * Licensed under the MIT License.\n * https://raw.github.com/zynga/scroller/master/MIT-LICENSE.txt\n *\n * Based on the work of: Unify Project (unify-project.org)\n * http://unify-project.org\n * Copyright 2011, Deutsche Telekom AG\n * License: MIT + Apache (V2)\n */\n\nvar Scroller;\n\n(function(ionic) {\n\tvar NOOP = function(){};\n\n\t// Easing Equations (c) 2003 Robert Penner, all rights reserved.\n\t// Open source under the BSD License.\n\n\t/**\n\t * @param pos {Number} position between 0 (start of effect) and 1 (end of effect)\n\t**/\n\tvar easeOutCubic = function(pos) {\n\t\treturn (Math.pow((pos - 1), 3) + 1);\n\t};\n\n\t/**\n\t * @param pos {Number} position between 0 (start of effect) and 1 (end of effect)\n\t**/\n\tvar easeInOutCubic = function(pos) {\n\t\tif ((pos /= 0.5) < 1) {\n\t\t\treturn 0.5 * Math.pow(pos, 3);\n\t\t}\n\n\t\treturn 0.5 * (Math.pow((pos - 2), 3) + 2);\n\t};\n\n\n/**\n * ionic.views.Scroll\n * A powerful scroll view with support for bouncing, pull to refresh, and paging.\n * @param   {Object}        options options for the scroll view\n * @class A scroll view system\n * @memberof ionic.views\n */\nionic.views.Scroll = ionic.views.View.inherit({\n  initialize: function(options) {\n    var self = this;\n\n    this.__container = options.el;\n    this.__content = options.el.firstElementChild;\n\n    //Remove any scrollTop attached to these elements; they are virtual scroll now\n    //This also stops on-load-scroll-to-window.location.hash that the browser does\n    setTimeout(function() {\n      if (self.__container && self.__content) {\n        self.__container.scrollTop = 0;\n        self.__content.scrollTop = 0;\n      }\n    });\n\n\t\tthis.options = {\n\n      /** Disable scrolling on x-axis by default */\n      scrollingX: false,\n      scrollbarX: true,\n\n      /** Enable scrolling on y-axis */\n      scrollingY: true,\n      scrollbarY: true,\n\n      startX: 0,\n      startY: 0,\n\n      /** The amount to dampen mousewheel events */\n      wheelDampen: 6,\n\n      /** The minimum size the scrollbars scale to while scrolling */\n      minScrollbarSizeX: 5,\n      minScrollbarSizeY: 5,\n\n      /** Scrollbar fading after scrolling */\n      scrollbarsFade: true,\n      scrollbarFadeDelay: 300,\n      /** The initial fade delay when the pane is resized or initialized */\n      scrollbarResizeFadeDelay: 1000,\n\n      /** Enable animations for deceleration, snap back, zooming and scrolling */\n      animating: true,\n\n      /** duration for animations triggered by scrollTo/zoomTo */\n      animationDuration: 250,\n\n      /** Enable bouncing (content can be slowly moved outside and jumps back after releasing) */\n      bouncing: true,\n\n      /** Enable locking to the main axis if user moves only slightly on one of them at start */\n      locking: true,\n\n      /** Enable pagination mode (switching between full page content panes) */\n      paging: false,\n\n      /** Enable snapping of content to a configured pixel grid */\n      snapping: false,\n\n      /** Enable zooming of content via API, fingers and mouse wheel */\n      zooming: false,\n\n      /** Minimum zoom level */\n      minZoom: 0.5,\n\n      /** Maximum zoom level */\n      maxZoom: 3,\n\n      /** Multiply or decrease scrolling speed **/\n      speedMultiplier: 1,\n\n      /** Callback that is fired on the later of touch end or deceleration end,\n        provided that another scrolling action has not begun. Used to know\n        when to fade out a scrollbar. */\n      scrollingComplete: NOOP,\n\n      /** This configures the amount of change applied to deceleration when reaching boundaries  **/\n      penetrationDeceleration : 0.03,\n\n      /** This configures the amount of change applied to acceleration when reaching boundaries  **/\n      penetrationAcceleration : 0.08,\n\n      // The ms interval for triggering scroll events\n      scrollEventInterval: 50\n\t\t};\n\n\t\tfor (var key in options) {\n\t\t\tthis.options[key] = options[key];\n\t\t}\n\n    this.hintResize = ionic.debounce(function() {\n      self.resize();\n    }, 1000, true);\n\n    this.triggerScrollEvent = ionic.throttle(function() {\n      ionic.trigger('scroll', {\n        scrollTop: self.__scrollTop,\n        scrollLeft: self.__scrollLeft,\n        target: self.__container\n      });\n    }, this.options.scrollEventInterval);\n\n    this.triggerScrollEndEvent = function() {\n      ionic.trigger('scrollend', {\n        scrollTop: self.__scrollTop,\n        scrollLeft: self.__scrollLeft,\n        target: self.__container\n      });\n    };\n\n    this.__scrollLeft = this.options.startX;\n    this.__scrollTop = this.options.startY;\n\n    // Get the render update function, initialize event handlers,\n    // and calculate the size of the scroll container\n\t\tthis.__callback = this.getRenderFn();\n    this.__initEventHandlers();\n    this.__createScrollbars();\n\n  },\n\n  run: function() {\n    this.resize();\n\n    // Fade them out\n    this.__fadeScrollbars('out', this.options.scrollbarResizeFadeDelay);\n\t},\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: STATUS\n  ---------------------------------------------------------------------------\n  */\n\n  /** Whether only a single finger is used in touch handling */\n  __isSingleTouch: false,\n\n  /** Whether a touch event sequence is in progress */\n  __isTracking: false,\n\n  /** Whether a deceleration animation went to completion. */\n  __didDecelerationComplete: false,\n\n  /**\n   * Whether a gesture zoom/rotate event is in progress. Activates when\n   * a gesturestart event happens. This has higher priority than dragging.\n   */\n  __isGesturing: false,\n\n  /**\n   * Whether the user has moved by such a distance that we have enabled\n   * dragging mode. Hint: It's only enabled after some pixels of movement to\n   * not interrupt with clicks etc.\n   */\n  __isDragging: false,\n\n  /**\n   * Not touching and dragging anymore, and smoothly animating the\n   * touch sequence using deceleration.\n   */\n  __isDecelerating: false,\n\n  /**\n   * Smoothly animating the currently configured change\n   */\n  __isAnimating: false,\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: DIMENSIONS\n  ---------------------------------------------------------------------------\n  */\n\n  /** Available outer left position (from document perspective) */\n  __clientLeft: 0,\n\n  /** Available outer top position (from document perspective) */\n  __clientTop: 0,\n\n  /** Available outer width */\n  __clientWidth: 0,\n\n  /** Available outer height */\n  __clientHeight: 0,\n\n  /** Outer width of content */\n  __contentWidth: 0,\n\n  /** Outer height of content */\n  __contentHeight: 0,\n\n  /** Snapping width for content */\n  __snapWidth: 100,\n\n  /** Snapping height for content */\n  __snapHeight: 100,\n\n  /** Height to assign to refresh area */\n  __refreshHeight: null,\n\n  /** Whether the refresh process is enabled when the event is released now */\n  __refreshActive: false,\n\n  /** Callback to execute on activation. This is for signalling the user about a refresh is about to happen when he release */\n  __refreshActivate: null,\n\n  /** Callback to execute on deactivation. This is for signalling the user about the refresh being cancelled */\n  __refreshDeactivate: null,\n\n  /** Callback to execute to start the actual refresh. Call {@link #refreshFinish} when done */\n  __refreshStart: null,\n\n  /** Zoom level */\n  __zoomLevel: 1,\n\n  /** Scroll position on x-axis */\n  __scrollLeft: 0,\n\n  /** Scroll position on y-axis */\n  __scrollTop: 0,\n\n  /** Maximum allowed scroll position on x-axis */\n  __maxScrollLeft: 0,\n\n  /** Maximum allowed scroll position on y-axis */\n  __maxScrollTop: 0,\n\n  /* Scheduled left position (final position when animating) */\n  __scheduledLeft: 0,\n\n  /* Scheduled top position (final position when animating) */\n  __scheduledTop: 0,\n\n  /* Scheduled zoom level (final scale when animating) */\n  __scheduledZoom: 0,\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: LAST POSITIONS\n  ---------------------------------------------------------------------------\n  */\n\n  /** Left position of finger at start */\n  __lastTouchLeft: null,\n\n  /** Top position of finger at start */\n  __lastTouchTop: null,\n\n  /** Timestamp of last move of finger. Used to limit tracking range for deceleration speed. */\n  __lastTouchMove: null,\n\n  /** List of positions, uses three indexes for each state: left, top, timestamp */\n  __positions: null,\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: DECELERATION SUPPORT\n  ---------------------------------------------------------------------------\n  */\n\n  /** Minimum left scroll position during deceleration */\n  __minDecelerationScrollLeft: null,\n\n  /** Minimum top scroll position during deceleration */\n  __minDecelerationScrollTop: null,\n\n  /** Maximum left scroll position during deceleration */\n  __maxDecelerationScrollLeft: null,\n\n  /** Maximum top scroll position during deceleration */\n  __maxDecelerationScrollTop: null,\n\n  /** Current factor to modify horizontal scroll position with on every step */\n  __decelerationVelocityX: null,\n\n  /** Current factor to modify vertical scroll position with on every step */\n  __decelerationVelocityY: null,\n\n\n  /** the browser-specific property to use for transforms */\n  __transformProperty: null,\n  __perspectiveProperty: null,\n\n  /** scrollbar indicators */\n  __indicatorX: null,\n  __indicatorY: null,\n\n  /** Timeout for scrollbar fading */\n  __scrollbarFadeTimeout: null,\n\n  /** whether we've tried to wait for size already */\n  __didWaitForSize: null,\n  __sizerTimeout: null,\n\n  __initEventHandlers: function() {\n    var self = this;\n\n    // Event Handler\n    var container = this.__container;\n\n    //Broadcasted when keyboard is shown on some platforms.\n    //See js/utils/keyboard.js\n    container.addEventListener('scrollChildIntoView', function(e) {\n      var deviceHeight = window.innerHeight;\n      var element = e.target;\n      var elementHeight = e.target.offsetHeight;\n\n      //getBoundingClientRect() will actually give us position relative to the viewport\n      var elementDeviceTop = element.getBoundingClientRect().top;\n      var elementScrollTop = ionic.DomUtil.getPositionInParent(element, container).top;\n\n      //If the element is positioned under the keyboard...\n      if (elementDeviceTop + elementHeight > deviceHeight) {\n        //Put element in middle of visible screen\n        self.scrollTo(0, elementScrollTop + elementHeight - (deviceHeight * 0.5), true);\n      }\n\n      //Only the first scrollView parent of the element that broadcasted this event\n      //(the active element that needs to be shown) should receive this event\n      e.stopPropagation();\n    });\n\n    function shouldIgnorePress(e) {\n      // Don't react if initial down happens on a form element\n      return e.target.tagName.match(IS_INPUT_LIKE_REGEX) ||\n             e.target.isContentEditable ||\n             e.target.tagName.match(IS_EMBEDDED_OBJECT_REGEX) ||\n             e.target.dataset.preventScroll;\n    }\n\n\n    if ('ontouchstart' in window) {\n\n      container.addEventListener(\"touchstart\", function(e) {\n        if (e.defaultPrevented || shouldIgnorePress(e)) {\n          return;\n        }\n        self.doTouchStart(e.touches, e.timeStamp);\n        e.preventDefault();\n      }, false);\n\n      document.addEventListener(\"touchmove\", function(e) {\n        if(e.defaultPrevented) {\n          return;\n        }\n        self.doTouchMove(e.touches, e.timeStamp);\n      }, false);\n\n      document.addEventListener(\"touchend\", function(e) {\n        self.doTouchEnd(e.timeStamp);\n      }, false);\n\n    } else {\n\n      var mousedown = false;\n\n      container.addEventListener(\"mousedown\", function(e) {\n        if (e.defaultPrevented || shouldIgnorePress(e)) {\n          return;\n        }\n        self.doTouchStart([{\n          pageX: e.pageX,\n          pageY: e.pageY\n        }], e.timeStamp);\n\n        e.preventDefault();\n        mousedown = true;\n      }, false);\n\n      document.addEventListener(\"mousemove\", function(e) {\n        if (!mousedown || e.defaultPrevented) {\n          return;\n        }\n\n        self.doTouchMove([{\n          pageX: e.pageX,\n          pageY: e.pageY\n        }], e.timeStamp);\n\n        mousedown = true;\n      }, false);\n\n      document.addEventListener(\"mouseup\", function(e) {\n        if (!mousedown) {\n          return;\n        }\n\n        self.doTouchEnd(e.timeStamp);\n\n        mousedown = false;\n      }, false);\n\n      var wheelShowBarFn = ionic.debounce(function() {\n        self.__fadeScrollbars('in');\n      }, 500, true);\n\n      var wheelHideBarFn = ionic.debounce(function() {\n        self.__fadeScrollbars('out');\n      }, 100, false);\n\n      document.addEventListener(\"mousewheel\", function(e) {\n        wheelShowBarFn();\n        self.scrollBy(e.wheelDeltaX/self.options.wheelDampen, -e.wheelDeltaY/self.options.wheelDampen);\n        wheelHideBarFn();\n      });\n    }\n  },\n\n  /** Create a scroll bar div with the given direction **/\n  __createScrollbar: function(direction) {\n    var bar = document.createElement('div'),\n      indicator = document.createElement('div');\n\n    indicator.className = 'scroll-bar-indicator';\n\n    if(direction == 'h') {\n      bar.className = 'scroll-bar scroll-bar-h';\n    } else {\n      bar.className = 'scroll-bar scroll-bar-v';\n    }\n\n    bar.appendChild(indicator);\n    return bar;\n  },\n\n  __createScrollbars: function() {\n    var indicatorX, indicatorY;\n\n    if(this.options.scrollingX) {\n      indicatorX = {\n        el: this.__createScrollbar('h'),\n        sizeRatio: 1\n      };\n      indicatorX.indicator = indicatorX.el.children[0];\n\n      if(this.options.scrollbarX) {\n        this.__container.appendChild(indicatorX.el);\n      }\n      this.__indicatorX = indicatorX;\n    }\n\n    if(this.options.scrollingY) {\n      indicatorY = {\n        el: this.__createScrollbar('v'),\n        sizeRatio: 1\n      };\n      indicatorY.indicator = indicatorY.el.children[0];\n\n      if(this.options.scrollbarY) {\n        this.__container.appendChild(indicatorY.el);\n      }\n      this.__indicatorY = indicatorY;\n    }\n  },\n\n  __resizeScrollbars: function() {\n    var self = this;\n\n    // Update horiz bar\n    if(self.__indicatorX) {\n      var width = Math.max(Math.round(self.__clientWidth * self.__clientWidth / (self.__contentWidth)), 20);\n      if(width > self.__contentWidth) {\n        width = 0;\n      }\n      self.__indicatorX.size = width;\n      self.__indicatorX.minScale = this.options.minScrollbarSizeX / width;\n      self.__indicatorX.indicator.style.width = width + 'px';\n      self.__indicatorX.maxPos = self.__clientWidth - width;\n      self.__indicatorX.sizeRatio = self.__maxScrollLeft ? self.__indicatorX.maxPos / self.__maxScrollLeft : 1;\n    }\n\n    // Update vert bar\n    if(self.__indicatorY) {\n      var height = Math.max(Math.round(self.__clientHeight * self.__clientHeight / (self.__contentHeight)), 20);\n      if(height > self.__contentHeight) {\n        height = 0;\n      }\n      self.__indicatorY.size = height;\n      self.__indicatorY.minScale = this.options.minScrollbarSizeY / height;\n      self.__indicatorY.maxPos = self.__clientHeight - height;\n      self.__indicatorY.indicator.style.height = height + 'px';\n      self.__indicatorY.sizeRatio = self.__maxScrollTop ? self.__indicatorY.maxPos / self.__maxScrollTop : 1;\n    }\n  },\n\n  /**\n   * Move and scale the scrollbars as the page scrolls.\n   */\n  __repositionScrollbars: function() {\n    var self = this, width, heightScale,\n        widthDiff, heightDiff,\n        x, y,\n        xstop = 0, ystop = 0;\n\n    if(self.__indicatorX) {\n      // Handle the X scrollbar\n\n      // Don't go all the way to the right if we have a vertical scrollbar as well\n      if(self.__indicatorY) xstop = 10;\n\n      x = Math.round(self.__indicatorX.sizeRatio * self.__scrollLeft) || 0,\n\n      // The the difference between the last content X position, and our overscrolled one\n      widthDiff = self.__scrollLeft - (self.__maxScrollLeft - xstop);\n\n      if(self.__scrollLeft < 0) {\n\n        widthScale = Math.max(self.__indicatorX.minScale,\n            (self.__indicatorX.size - Math.abs(self.__scrollLeft)) / self.__indicatorX.size);\n\n        // Stay at left\n        x = 0;\n\n        // Make sure scale is transformed from the left/center origin point\n        self.__indicatorX.indicator.style[self.__transformOriginProperty] = 'left center';\n      } else if(widthDiff > 0) {\n\n        widthScale = Math.max(self.__indicatorX.minScale,\n            (self.__indicatorX.size - widthDiff) / self.__indicatorX.size);\n\n        // Stay at the furthest x for the scrollable viewport\n        x = self.__indicatorX.maxPos - xstop;\n\n        // Make sure scale is transformed from the right/center origin point\n        self.__indicatorX.indicator.style[self.__transformOriginProperty] = 'right center';\n\n      } else {\n\n        // Normal motion\n        x = Math.min(self.__maxScrollLeft, Math.max(0, x));\n        widthScale = 1;\n\n      }\n\n      self.__indicatorX.indicator.style[self.__transformProperty] = 'translate3d(' + x + 'px, 0, 0) scaleX(' + widthScale + ')';\n    }\n\n    if(self.__indicatorY) {\n\n      y = Math.round(self.__indicatorY.sizeRatio * self.__scrollTop) || 0;\n\n      // Don't go all the way to the right if we have a vertical scrollbar as well\n      if(self.__indicatorX) ystop = 10;\n\n      heightDiff = self.__scrollTop - (self.__maxScrollTop - ystop);\n\n      if(self.__scrollTop < 0) {\n\n        heightScale = Math.max(self.__indicatorY.minScale, (self.__indicatorY.size - Math.abs(self.__scrollTop)) / self.__indicatorY.size);\n\n        // Stay at top\n        y = 0;\n\n        // Make sure scale is transformed from the center/top origin point\n        self.__indicatorY.indicator.style[self.__transformOriginProperty] = 'center top';\n\n      } else if(heightDiff > 0) {\n\n        heightScale = Math.max(self.__indicatorY.minScale, (self.__indicatorY.size - heightDiff) / self.__indicatorY.size);\n\n        // Stay at bottom of scrollable viewport\n        y = self.__indicatorY.maxPos - ystop;\n\n        // Make sure scale is transformed from the center/bottom origin point\n        self.__indicatorY.indicator.style[self.__transformOriginProperty] = 'center bottom';\n\n      } else {\n\n        // Normal motion\n        y = Math.min(self.__maxScrollTop, Math.max(0, y));\n        heightScale = 1;\n\n      }\n\n      self.__indicatorY.indicator.style[self.__transformProperty] = 'translate3d(0,' + y + 'px, 0) scaleY(' + heightScale + ')';\n    }\n  },\n\n  __fadeScrollbars: function(direction, delay) {\n    var self = this;\n\n    if(!this.options.scrollbarsFade) {\n      return;\n    }\n\n    var className = 'scroll-bar-fade-out';\n\n    if(self.options.scrollbarsFade === true) {\n      clearTimeout(self.__scrollbarFadeTimeout);\n\n      if(direction == 'in') {\n        if(self.__indicatorX) { self.__indicatorX.indicator.classList.remove(className); }\n        if(self.__indicatorY) { self.__indicatorY.indicator.classList.remove(className); }\n      } else {\n        self.__scrollbarFadeTimeout = setTimeout(function() {\n          if(self.__indicatorX) { self.__indicatorX.indicator.classList.add(className); }\n          if(self.__indicatorY) { self.__indicatorY.indicator.classList.add(className); }\n        }, delay || self.options.scrollbarFadeDelay);\n      }\n    }\n  },\n\n  __scrollingComplete: function() {\n    var self = this;\n    self.options.scrollingComplete();\n\n    self.__fadeScrollbars('out');\n  },\n\n  resize: function() {\n    // Update Scroller dimensions for changed content\n    // Add padding to bottom of content\n    this.setDimensions(\n    \tthis.__container.clientWidth,\n    \tthis.__container.clientHeight,\n    \tMath.max(this.__content.scrollWidth, this.__content.offsetWidth),\n      Math.max(this.__content.scrollHeight, this.__content.offsetHeight)\n    );\n  },\n  /*\n  ---------------------------------------------------------------------------\n    PUBLIC API\n  ---------------------------------------------------------------------------\n  */\n\n  getRenderFn: function() {\n    var self = this;\n\n    var content = this.__content;\n\n\t  var docStyle = document.documentElement.style;\n\n    var engine;\n    if ('MozAppearance' in docStyle) {\n      engine = 'gecko';\n    } else if ('WebkitAppearance' in docStyle) {\n      engine = 'webkit';\n    } else if (typeof navigator.cpuClass === 'string') {\n      engine = 'trident';\n    }\n\n    var vendorPrefix = {\n      trident: 'ms',\n      gecko: 'Moz',\n      webkit: 'Webkit',\n      presto: 'O'\n    }[engine];\n\n    var helperElem = document.createElement(\"div\");\n    var undef;\n\n    var perspectiveProperty = vendorPrefix + \"Perspective\";\n    var transformProperty = vendorPrefix + \"Transform\";\n    var transformOriginProperty = vendorPrefix + 'TransformOrigin';\n\n    self.__perspectiveProperty = transformProperty;\n    self.__transformProperty = transformProperty;\n    self.__transformOriginProperty = transformOriginProperty;\n\n    if (helperElem.style[perspectiveProperty] !== undef) {\n\n      return function(left, top, zoom) {\n        content.style[transformProperty] = 'translate3d(' + (-left) + 'px,' + (-top) + 'px,0)';\n        self.__repositionScrollbars();\n        self.triggerScrollEvent();\n      };\n\n    } else if (helperElem.style[transformProperty] !== undef) {\n\n      return function(left, top, zoom) {\n        content.style[transformProperty] = 'translate(' + (-left) + 'px,' + (-top) + 'px)';\n        self.__repositionScrollbars();\n        self.triggerScrollEvent();\n      };\n\n    } else {\n\n      return function(left, top, zoom) {\n        content.style.marginLeft = left ? (-left/zoom) + 'px' : '';\n        content.style.marginTop = top ? (-top/zoom) + 'px' : '';\n        content.style.zoom = zoom || '';\n        self.__repositionScrollbars();\n        self.triggerScrollEvent();\n      };\n\n    }\n  },\n\n\n  /**\n   * Configures the dimensions of the client (outer) and content (inner) elements.\n   * Requires the available space for the outer element and the outer size of the inner element.\n   * All values which are falsy (null or zero etc.) are ignored and the old value is kept.\n   *\n   * @param clientWidth {Integer} Inner width of outer element\n   * @param clientHeight {Integer} Inner height of outer element\n   * @param contentWidth {Integer} Outer width of inner element\n   * @param contentHeight {Integer} Outer height of inner element\n   */\n  setDimensions: function(clientWidth, clientHeight, contentWidth, contentHeight) {\n\n    var self = this;\n\n    // Only update values which are defined\n    if (clientWidth === +clientWidth) {\n      self.__clientWidth = clientWidth;\n    }\n\n    if (clientHeight === +clientHeight) {\n      self.__clientHeight = clientHeight;\n    }\n\n    if (contentWidth === +contentWidth) {\n      self.__contentWidth = contentWidth;\n    }\n\n    if (contentHeight === +contentHeight) {\n      self.__contentHeight = contentHeight;\n    }\n\n    // Refresh maximums\n    self.__computeScrollMax();\n    self.__resizeScrollbars();\n\n    // Refresh scroll position\n    self.scrollTo(self.__scrollLeft, self.__scrollTop, true);\n\n  },\n\n\n  /**\n   * Sets the client coordinates in relation to the document.\n   *\n   * @param left {Integer} Left position of outer element\n   * @param top {Integer} Top position of outer element\n   */\n  setPosition: function(left, top) {\n\n    var self = this;\n\n    self.__clientLeft = left || 0;\n    self.__clientTop = top || 0;\n\n  },\n\n\n  /**\n   * Configures the snapping (when snapping is active)\n   *\n   * @param width {Integer} Snapping width\n   * @param height {Integer} Snapping height\n   */\n  setSnapSize: function(width, height) {\n\n    var self = this;\n\n    self.__snapWidth = width;\n    self.__snapHeight = height;\n\n  },\n\n\n  /**\n   * Activates pull-to-refresh. A special zone on the top of the list to start a list refresh whenever\n   * the user event is released during visibility of this zone. This was introduced by some apps on iOS like\n   * the official Twitter client.\n   *\n   * @param height {Integer} Height of pull-to-refresh zone on top of rendered list\n   * @param activateCallback {Function} Callback to execute on activation. This is for signalling the user about a refresh is about to happen when he release.\n   * @param deactivateCallback {Function} Callback to execute on deactivation. This is for signalling the user about the refresh being cancelled.\n   * @param startCallback {Function} Callback to execute to start the real async refresh action. Call {@link #finishPullToRefresh} after finish of refresh.\n   */\n  activatePullToRefresh: function(height, activateCallback, deactivateCallback, startCallback) {\n\n    var self = this;\n\n    self.__refreshHeight = height;\n    self.__refreshActivate = activateCallback;\n    self.__refreshDeactivate = deactivateCallback;\n    self.__refreshStart = startCallback;\n\n  },\n\n\n  /**\n   * Starts pull-to-refresh manually.\n   */\n  triggerPullToRefresh: function() {\n    // Use publish instead of scrollTo to allow scrolling to out of boundary position\n    // We don't need to normalize scrollLeft, zoomLevel, etc. here because we only y-scrolling when pull-to-refresh is enabled\n    this.__publish(this.__scrollLeft, -this.__refreshHeight, this.__zoomLevel, true);\n\n    if (this.__refreshStart) {\n      this.__refreshStart();\n    }\n  },\n\n\n  /**\n   * Signalizes that pull-to-refresh is finished.\n   */\n  finishPullToRefresh: function() {\n\n    var self = this;\n\n    self.__refreshActive = false;\n    if (self.__refreshDeactivate) {\n      self.__refreshDeactivate();\n    }\n\n    self.scrollTo(self.__scrollLeft, self.__scrollTop, true);\n\n  },\n\n\n  /**\n   * Returns the scroll position and zooming values\n   *\n   * @return {Map} `left` and `top` scroll position and `zoom` level\n   */\n  getValues: function() {\n\n    var self = this;\n\n    return {\n      left: self.__scrollLeft,\n      top: self.__scrollTop,\n      zoom: self.__zoomLevel\n    };\n\n  },\n\n\n  /**\n   * Returns the maximum scroll values\n   *\n   * @return {Map} `left` and `top` maximum scroll values\n   */\n  getScrollMax: function() {\n\n    var self = this;\n\n    return {\n      left: self.__maxScrollLeft,\n      top: self.__maxScrollTop\n    };\n\n  },\n\n\n  /**\n   * Zooms to the given level. Supports optional animation. Zooms\n   * the center when no coordinates are given.\n   *\n   * @param level {Number} Level to zoom to\n   * @param animate {Boolean} Whether to use animation\n   * @param originLeft {Number} Zoom in at given left coordinate\n   * @param originTop {Number} Zoom in at given top coordinate\n   */\n  zoomTo: function(level, animate, originLeft, originTop) {\n\n    var self = this;\n\n    if (!self.options.zooming) {\n      throw new Error(\"Zooming is not enabled!\");\n    }\n\n    // Stop deceleration\n    if (self.__isDecelerating) {\n      core.effect.Animate.stop(self.__isDecelerating);\n      self.__isDecelerating = false;\n    }\n\n    var oldLevel = self.__zoomLevel;\n\n    // Normalize input origin to center of viewport if not defined\n    if (originLeft == null) {\n      originLeft = self.__clientWidth / 2;\n    }\n\n    if (originTop == null) {\n      originTop = self.__clientHeight / 2;\n    }\n\n    // Limit level according to configuration\n    level = Math.max(Math.min(level, self.options.maxZoom), self.options.minZoom);\n\n    // Recompute maximum values while temporary tweaking maximum scroll ranges\n    self.__computeScrollMax(level);\n\n    // Recompute left and top coordinates based on new zoom level\n    var left = ((originLeft + self.__scrollLeft) * level / oldLevel) - originLeft;\n    var top = ((originTop + self.__scrollTop) * level / oldLevel) - originTop;\n\n    // Limit x-axis\n    if (left > self.__maxScrollLeft) {\n      left = self.__maxScrollLeft;\n    } else if (left < 0) {\n      left = 0;\n    }\n\n    // Limit y-axis\n    if (top > self.__maxScrollTop) {\n      top = self.__maxScrollTop;\n    } else if (top < 0) {\n      top = 0;\n    }\n\n    // Push values out\n    self.__publish(left, top, level, animate);\n\n  },\n\n\n  /**\n   * Zooms the content by the given factor.\n   *\n   * @param factor {Number} Zoom by given factor\n   * @param animate {Boolean} Whether to use animation\n   * @param originLeft {Number} Zoom in at given left coordinate\n   * @param originTop {Number} Zoom in at given top coordinate\n   */\n  zoomBy: function(factor, animate, originLeft, originTop) {\n\n    var self = this;\n\n    self.zoomTo(self.__zoomLevel * factor, animate, originLeft, originTop);\n\n  },\n\n\n  /**\n   * Scrolls to the given position. Respect limitations and snapping automatically.\n   *\n   * @param left {Number} Horizontal scroll position, keeps current if value is <code>null</code>\n   * @param top {Number} Vertical scroll position, keeps current if value is <code>null</code>\n   * @param animate {Boolean} Whether the scrolling should happen using an animation\n   * @param zoom {Number} Zoom level to go to\n   */\n  scrollTo: function(left, top, animate, zoom) {\n\n    var self = this;\n\n    // Stop deceleration\n    if (self.__isDecelerating) {\n      core.effect.Animate.stop(self.__isDecelerating);\n      self.__isDecelerating = false;\n    }\n\n    // Correct coordinates based on new zoom level\n    if (zoom != null && zoom !== self.__zoomLevel) {\n\n      if (!self.options.zooming) {\n        throw new Error(\"Zooming is not enabled!\");\n      }\n\n      left *= zoom;\n      top *= zoom;\n\n      // Recompute maximum values while temporary tweaking maximum scroll ranges\n      self.__computeScrollMax(zoom);\n\n    } else {\n\n      // Keep zoom when not defined\n      zoom = self.__zoomLevel;\n\n    }\n\n    if (!self.options.scrollingX) {\n\n      left = self.__scrollLeft;\n\n    } else {\n\n      if (self.options.paging) {\n        left = Math.round(left / self.__clientWidth) * self.__clientWidth;\n      } else if (self.options.snapping) {\n        left = Math.round(left / self.__snapWidth) * self.__snapWidth;\n      }\n\n    }\n\n    if (!self.options.scrollingY) {\n\n      top = self.__scrollTop;\n\n    } else {\n\n      if (self.options.paging) {\n        top = Math.round(top / self.__clientHeight) * self.__clientHeight;\n      } else if (self.options.snapping) {\n        top = Math.round(top / self.__snapHeight) * self.__snapHeight;\n      }\n\n    }\n\n    // Limit for allowed ranges\n    left = Math.max(Math.min(self.__maxScrollLeft, left), 0);\n    top = Math.max(Math.min(self.__maxScrollTop, top), 0);\n\n    // Don't animate when no change detected, still call publish to make sure\n    // that rendered position is really in-sync with internal data\n    if (left === self.__scrollLeft && top === self.__scrollTop) {\n      animate = false;\n    }\n\n    // Publish new values\n    self.__publish(left, top, zoom, animate);\n\n  },\n\n\n  /**\n   * Scroll by the given offset\n   *\n   * @param left {Number} Scroll x-axis by given offset\n   * @param top {Number} Scroll x-axis by given offset\n   * @param animate {Boolean} Whether to animate the given change\n   */\n  scrollBy: function(left, top, animate) {\n\n    var self = this;\n\n    var startLeft = self.__isAnimating ? self.__scheduledLeft : self.__scrollLeft;\n    var startTop = self.__isAnimating ? self.__scheduledTop : self.__scrollTop;\n\n    self.scrollTo(startLeft + (left || 0), startTop + (top || 0), animate);\n\n  },\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    EVENT CALLBACKS\n  ---------------------------------------------------------------------------\n  */\n\n  /**\n   * Mouse wheel handler for zooming support\n   */\n  doMouseZoom: function(wheelDelta, timeStamp, pageX, pageY) {\n\n    var self = this;\n    var change = wheelDelta > 0 ? 0.97 : 1.03;\n\n    return self.zoomTo(self.__zoomLevel * change, false, pageX - self.__clientLeft, pageY - self.__clientTop);\n\n  },\n\n\n  /**\n   * Touch start handler for scrolling support\n   */\n  doTouchStart: function(touches, timeStamp) {\n    this.hintResize();\n\n    // Array-like check is enough here\n    if (touches.length == null) {\n      throw new Error(\"Invalid touch list: \" + touches);\n    }\n\n    if (timeStamp instanceof Date) {\n      timeStamp = timeStamp.valueOf();\n    }\n    if (typeof timeStamp !== \"number\") {\n      throw new Error(\"Invalid timestamp value: \" + timeStamp);\n    }\n\n    var self = this;\n\n    // Reset interruptedAnimation flag\n    self.__interruptedAnimation = true;\n\n    // Stop deceleration\n    if (self.__isDecelerating) {\n      core.effect.Animate.stop(self.__isDecelerating);\n      self.__isDecelerating = false;\n      self.__interruptedAnimation = true;\n    }\n\n    // Stop animation\n    if (self.__isAnimating) {\n      core.effect.Animate.stop(self.__isAnimating);\n      self.__isAnimating = false;\n      self.__interruptedAnimation = true;\n    }\n\n    // Use center point when dealing with two fingers\n    var currentTouchLeft, currentTouchTop;\n    var isSingleTouch = touches.length === 1;\n    if (isSingleTouch) {\n      currentTouchLeft = touches[0].pageX;\n      currentTouchTop = touches[0].pageY;\n    } else {\n      currentTouchLeft = Math.abs(touches[0].pageX + touches[1].pageX) / 2;\n      currentTouchTop = Math.abs(touches[0].pageY + touches[1].pageY) / 2;\n    }\n\n    // Store initial positions\n    self.__initialTouchLeft = currentTouchLeft;\n    self.__initialTouchTop = currentTouchTop;\n\n    // Store current zoom level\n    self.__zoomLevelStart = self.__zoomLevel;\n\n    // Store initial touch positions\n    self.__lastTouchLeft = currentTouchLeft;\n    self.__lastTouchTop = currentTouchTop;\n\n    // Store initial move time stamp\n    self.__lastTouchMove = timeStamp;\n\n    // Reset initial scale\n    self.__lastScale = 1;\n\n    // Reset locking flags\n    self.__enableScrollX = !isSingleTouch && self.options.scrollingX;\n    self.__enableScrollY = !isSingleTouch && self.options.scrollingY;\n\n    // Reset tracking flag\n    self.__isTracking = true;\n\n    // Reset deceleration complete flag\n    self.__didDecelerationComplete = false;\n\n    // Dragging starts directly with two fingers, otherwise lazy with an offset\n    self.__isDragging = !isSingleTouch;\n\n    // Some features are disabled in multi touch scenarios\n    self.__isSingleTouch = isSingleTouch;\n\n    // Clearing data structure\n    self.__positions = [];\n\n  },\n\n\n  /**\n   * Touch move handler for scrolling support\n   */\n  doTouchMove: function(touches, timeStamp, scale) {\n\n    // Array-like check is enough here\n    if (touches.length == null) {\n      throw new Error(\"Invalid touch list: \" + touches);\n    }\n\n    if (timeStamp instanceof Date) {\n      timeStamp = timeStamp.valueOf();\n    }\n    if (typeof timeStamp !== \"number\") {\n      throw new Error(\"Invalid timestamp value: \" + timeStamp);\n    }\n\n    var self = this;\n\n    // Ignore event when tracking is not enabled (event might be outside of element)\n    if (!self.__isTracking) {\n      return;\n    }\n\n\n    var currentTouchLeft, currentTouchTop;\n\n    // Compute move based around of center of fingers\n    if (touches.length === 2) {\n      currentTouchLeft = Math.abs(touches[0].pageX + touches[1].pageX) / 2;\n      currentTouchTop = Math.abs(touches[0].pageY + touches[1].pageY) / 2;\n    } else {\n      currentTouchLeft = touches[0].pageX;\n      currentTouchTop = touches[0].pageY;\n    }\n\n    var positions = self.__positions;\n\n    // Are we already is dragging mode?\n    if (self.__isDragging) {\n\n      // Compute move distance\n      var moveX = currentTouchLeft - self.__lastTouchLeft;\n      var moveY = currentTouchTop - self.__lastTouchTop;\n\n      // Read previous scroll position and zooming\n      var scrollLeft = self.__scrollLeft;\n      var scrollTop = self.__scrollTop;\n      var level = self.__zoomLevel;\n\n      // Work with scaling\n      if (scale != null && self.options.zooming) {\n\n        var oldLevel = level;\n\n        // Recompute level based on previous scale and new scale\n        level = level / self.__lastScale * scale;\n\n        // Limit level according to configuration\n        level = Math.max(Math.min(level, self.options.maxZoom), self.options.minZoom);\n\n        // Only do further compution when change happened\n        if (oldLevel !== level) {\n\n          // Compute relative event position to container\n          var currentTouchLeftRel = currentTouchLeft - self.__clientLeft;\n          var currentTouchTopRel = currentTouchTop - self.__clientTop;\n\n          // Recompute left and top coordinates based on new zoom level\n          scrollLeft = ((currentTouchLeftRel + scrollLeft) * level / oldLevel) - currentTouchLeftRel;\n          scrollTop = ((currentTouchTopRel + scrollTop) * level / oldLevel) - currentTouchTopRel;\n\n          // Recompute max scroll values\n          self.__computeScrollMax(level);\n\n        }\n      }\n\n      if (self.__enableScrollX) {\n\n        scrollLeft -= moveX * this.options.speedMultiplier;\n        var maxScrollLeft = self.__maxScrollLeft;\n\n        if (scrollLeft > maxScrollLeft || scrollLeft < 0) {\n\n          // Slow down on the edges\n          if (self.options.bouncing) {\n\n            scrollLeft += (moveX / 2  * this.options.speedMultiplier);\n\n          } else if (scrollLeft > maxScrollLeft) {\n\n            scrollLeft = maxScrollLeft;\n\n          } else {\n\n            scrollLeft = 0;\n\n          }\n        }\n      }\n\n      // Compute new vertical scroll position\n      if (self.__enableScrollY) {\n\n        scrollTop -= moveY * this.options.speedMultiplier;\n        var maxScrollTop = self.__maxScrollTop;\n\n        if (scrollTop > maxScrollTop || scrollTop < 0) {\n\n          // Slow down on the edges\n          if (self.options.bouncing || (self.__refreshHeight && scrollTop < 0)) {\n\n            scrollTop += (moveY / 2 * this.options.speedMultiplier);\n\n            // Support pull-to-refresh (only when only y is scrollable)\n            if (!self.__enableScrollX && self.__refreshHeight != null) {\n\n              if (!self.__refreshActive && scrollTop <= -self.__refreshHeight) {\n\n                self.__refreshActive = true;\n                if (self.__refreshActivate) {\n                  self.__refreshActivate();\n                }\n\n              } else if (self.__refreshActive && scrollTop > -self.__refreshHeight) {\n\n                self.__refreshActive = false;\n                if (self.__refreshDeactivate) {\n                  self.__refreshDeactivate();\n                }\n\n              }\n            }\n\n          } else if (scrollTop > maxScrollTop) {\n\n            scrollTop = maxScrollTop;\n\n          } else {\n\n            scrollTop = 0;\n\n          }\n        }\n      }\n\n      // Keep list from growing infinitely (holding min 10, max 20 measure points)\n      if (positions.length > 60) {\n        positions.splice(0, 30);\n      }\n\n      // Track scroll movement for decleration\n      positions.push(scrollLeft, scrollTop, timeStamp);\n\n      // Sync scroll position\n      self.__publish(scrollLeft, scrollTop, level);\n\n    // Otherwise figure out whether we are switching into dragging mode now.\n    } else {\n\n      var minimumTrackingForScroll = self.options.locking ? 3 : 0;\n      var minimumTrackingForDrag = 5;\n\n      var distanceX = Math.abs(currentTouchLeft - self.__initialTouchLeft);\n      var distanceY = Math.abs(currentTouchTop - self.__initialTouchTop);\n\n      self.__enableScrollX = self.options.scrollingX && distanceX >= minimumTrackingForScroll;\n      self.__enableScrollY = self.options.scrollingY && distanceY >= minimumTrackingForScroll;\n\n      positions.push(self.__scrollLeft, self.__scrollTop, timeStamp);\n\n      self.__isDragging = (self.__enableScrollX || self.__enableScrollY) && (distanceX >= minimumTrackingForDrag || distanceY >= minimumTrackingForDrag);\n      if (self.__isDragging) {\n        self.__interruptedAnimation = false;\n        self.__fadeScrollbars('in');\n      }\n\n    }\n\n    // Update last touch positions and time stamp for next event\n    self.__lastTouchLeft = currentTouchLeft;\n    self.__lastTouchTop = currentTouchTop;\n    self.__lastTouchMove = timeStamp;\n    self.__lastScale = scale;\n\n  },\n\n\n  /**\n   * Touch end handler for scrolling support\n   */\n  doTouchEnd: function(timeStamp) {\n\n    if (timeStamp instanceof Date) {\n      timeStamp = timeStamp.valueOf();\n    }\n    if (typeof timeStamp !== \"number\") {\n      throw new Error(\"Invalid timestamp value: \" + timeStamp);\n    }\n\n    var self = this;\n\n    // Ignore event when tracking is not enabled (no touchstart event on element)\n    // This is required as this listener ('touchmove') sits on the document and not on the element itself.\n    if (!self.__isTracking) {\n      return;\n    }\n\n    // Not touching anymore (when two finger hit the screen there are two touch end events)\n    self.__isTracking = false;\n\n    // Be sure to reset the dragging flag now. Here we also detect whether\n    // the finger has moved fast enough to switch into a deceleration animation.\n    if (self.__isDragging) {\n\n      // Reset dragging flag\n      self.__isDragging = false;\n\n      // Start deceleration\n      // Verify that the last move detected was in some relevant time frame\n      if (self.__isSingleTouch && self.options.animating && (timeStamp - self.__lastTouchMove) <= 100) {\n\n        // Then figure out what the scroll position was about 100ms ago\n        var positions = self.__positions;\n        var endPos = positions.length - 1;\n        var startPos = endPos;\n\n        // Move pointer to position measured 100ms ago\n        for (var i = endPos; i > 0 && positions[i] > (self.__lastTouchMove - 100); i -= 3) {\n          startPos = i;\n        }\n\n        // If start and stop position is identical in a 100ms timeframe,\n        // we cannot compute any useful deceleration.\n        if (startPos !== endPos) {\n\n          // Compute relative movement between these two points\n          var timeOffset = positions[endPos] - positions[startPos];\n          var movedLeft = self.__scrollLeft - positions[startPos - 2];\n          var movedTop = self.__scrollTop - positions[startPos - 1];\n\n          // Based on 50ms compute the movement to apply for each render step\n          self.__decelerationVelocityX = movedLeft / timeOffset * (1000 / 60);\n          self.__decelerationVelocityY = movedTop / timeOffset * (1000 / 60);\n\n          // How much velocity is required to start the deceleration\n          var minVelocityToStartDeceleration = self.options.paging || self.options.snapping ? 4 : 1;\n\n          // Verify that we have enough velocity to start deceleration\n          if (Math.abs(self.__decelerationVelocityX) > minVelocityToStartDeceleration || Math.abs(self.__decelerationVelocityY) > minVelocityToStartDeceleration) {\n\n            // Deactivate pull-to-refresh when decelerating\n            if (!self.__refreshActive) {\n              self.__startDeceleration(timeStamp);\n            }\n          }\n        } else {\n          self.__scrollingComplete();\n        }\n      } else if ((timeStamp - self.__lastTouchMove) > 100) {\n        self.__scrollingComplete();\n      }\n    }\n\n    // If this was a slower move it is per default non decelerated, but this\n    // still means that we want snap back to the bounds which is done here.\n    // This is placed outside the condition above to improve edge case stability\n    // e.g. touchend fired without enabled dragging. This should normally do not\n    // have modified the scroll positions or even showed the scrollbars though.\n    if (!self.__isDecelerating) {\n\n      if (self.__refreshActive && self.__refreshStart) {\n\n        // Use publish instead of scrollTo to allow scrolling to out of boundary position\n        // We don't need to normalize scrollLeft, zoomLevel, etc. here because we only y-scrolling when pull-to-refresh is enabled\n        self.__publish(self.__scrollLeft, -self.__refreshHeight, self.__zoomLevel, true);\n\n        if (self.__refreshStart) {\n          self.__refreshStart();\n        }\n\n      } else {\n\n        if (self.__interruptedAnimation || self.__isDragging) {\n          self.__scrollingComplete();\n        }\n        self.scrollTo(self.__scrollLeft, self.__scrollTop, true, self.__zoomLevel);\n\n        // Directly signalize deactivation (nothing todo on refresh?)\n        if (self.__refreshActive) {\n\n          self.__refreshActive = false;\n          if (self.__refreshDeactivate) {\n            self.__refreshDeactivate();\n          }\n\n        }\n      }\n    }\n\n    // Fully cleanup list\n    self.__positions.length = 0;\n\n  },\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    PRIVATE API\n  ---------------------------------------------------------------------------\n  */\n\n  /**\n   * Applies the scroll position to the content element\n   *\n   * @param left {Number} Left scroll position\n   * @param top {Number} Top scroll position\n   * @param animate {Boolean} Whether animation should be used to move to the new coordinates\n   */\n  __publish: function(left, top, zoom, animate) {\n\n    var self = this;\n\n    // Remember whether we had an animation, then we try to continue based on the current \"drive\" of the animation\n    var wasAnimating = self.__isAnimating;\n    if (wasAnimating) {\n      core.effect.Animate.stop(wasAnimating);\n      self.__isAnimating = false;\n    }\n\n    if (animate && self.options.animating) {\n\n      // Keep scheduled positions for scrollBy/zoomBy functionality\n      self.__scheduledLeft = left;\n      self.__scheduledTop = top;\n      self.__scheduledZoom = zoom;\n\n      var oldLeft = self.__scrollLeft;\n      var oldTop = self.__scrollTop;\n      var oldZoom = self.__zoomLevel;\n\n      var diffLeft = left - oldLeft;\n      var diffTop = top - oldTop;\n      var diffZoom = zoom - oldZoom;\n\n      var step = function(percent, now, render) {\n\n        if (render) {\n\n          self.__scrollLeft = oldLeft + (diffLeft * percent);\n          self.__scrollTop = oldTop + (diffTop * percent);\n          self.__zoomLevel = oldZoom + (diffZoom * percent);\n\n          // Push values out\n          if (self.__callback) {\n            self.__callback(self.__scrollLeft, self.__scrollTop, self.__zoomLevel);\n          }\n\n        }\n      };\n\n      var verify = function(id) {\n        return self.__isAnimating === id;\n      };\n\n      var completed = function(renderedFramesPerSecond, animationId, wasFinished) {\n        if (animationId === self.__isAnimating) {\n          self.__isAnimating = false;\n        }\n        if (self.__didDecelerationComplete || wasFinished) {\n          self.__scrollingComplete();\n        }\n\n        if (self.options.zooming) {\n          self.__computeScrollMax();\n        }\n      };\n\n      // When continuing based on previous animation we choose an ease-out animation instead of ease-in-out\n      self.__isAnimating = core.effect.Animate.start(step, verify, completed, self.options.animationDuration, wasAnimating ? easeOutCubic : easeInOutCubic);\n\n    } else {\n\n      self.__scheduledLeft = self.__scrollLeft = left;\n      self.__scheduledTop = self.__scrollTop = top;\n      self.__scheduledZoom = self.__zoomLevel = zoom;\n\n      // Push values out\n      if (self.__callback) {\n        self.__callback(left, top, zoom);\n      }\n\n      // Fix max scroll ranges\n      if (self.options.zooming) {\n        self.__computeScrollMax();\n      }\n    }\n  },\n\n\n  /**\n   * Recomputes scroll minimum values based on client dimensions and content dimensions.\n   */\n  __computeScrollMax: function(zoomLevel) {\n\n    var self = this;\n\n    if (zoomLevel == null) {\n      zoomLevel = self.__zoomLevel;\n    }\n\n    self.__maxScrollLeft = Math.max((self.__contentWidth * zoomLevel) - self.__clientWidth, 0);\n    self.__maxScrollTop = Math.max((self.__contentHeight * zoomLevel) - self.__clientHeight, 0);\n\n    if(!self.__didWaitForSize && self.__maxScrollLeft == 0 && self.__maxScrollTop == 0) {\n      self.__didWaitForSize = true;\n      self.__waitForSize();\n    }\n  },\n\n\n  /**\n   * If the scroll view isn't sized correctly on start, wait until we have at least some size\n   */\n  __waitForSize: function() {\n\n    var self = this;\n\n    clearTimeout(self.__sizerTimeout);\n\n    var sizer = function() {\n      self.resize();\n\n      if((self.options.scrollingX && self.__maxScrollLeft == 0) || (self.options.scrollingY && self.__maxScrollTop == 0)) {\n        //self.__sizerTimeout = setTimeout(sizer, 1000);\n      }\n    };\n\n    sizer();\n    self.__sizerTimeout = setTimeout(sizer, 1000);\n  },\n\n  /*\n  ---------------------------------------------------------------------------\n    ANIMATION (DECELERATION) SUPPORT\n  ---------------------------------------------------------------------------\n  */\n\n  /**\n   * Called when a touch sequence end and the speed of the finger was high enough\n   * to switch into deceleration mode.\n   */\n  __startDeceleration: function(timeStamp) {\n\n    var self = this;\n\n    if (self.options.paging) {\n\n      var scrollLeft = Math.max(Math.min(self.__scrollLeft, self.__maxScrollLeft), 0);\n      var scrollTop = Math.max(Math.min(self.__scrollTop, self.__maxScrollTop), 0);\n      var clientWidth = self.__clientWidth;\n      var clientHeight = self.__clientHeight;\n\n      // We limit deceleration not to the min/max values of the allowed range, but to the size of the visible client area.\n      // Each page should have exactly the size of the client area.\n      self.__minDecelerationScrollLeft = Math.floor(scrollLeft / clientWidth) * clientWidth;\n      self.__minDecelerationScrollTop = Math.floor(scrollTop / clientHeight) * clientHeight;\n      self.__maxDecelerationScrollLeft = Math.ceil(scrollLeft / clientWidth) * clientWidth;\n      self.__maxDecelerationScrollTop = Math.ceil(scrollTop / clientHeight) * clientHeight;\n\n    } else {\n\n      self.__minDecelerationScrollLeft = 0;\n      self.__minDecelerationScrollTop = 0;\n      self.__maxDecelerationScrollLeft = self.__maxScrollLeft;\n      self.__maxDecelerationScrollTop = self.__maxScrollTop;\n\n    }\n\n    // Wrap class method\n    var step = function(percent, now, render) {\n      self.__stepThroughDeceleration(render);\n    };\n\n    // How much velocity is required to keep the deceleration running\n    self.__minVelocityToKeepDecelerating = self.options.snapping ? 4 : 0.1;\n\n    // Detect whether it's still worth to continue animating steps\n    // If we are already slow enough to not being user perceivable anymore, we stop the whole process here.\n    var verify = function() {\n      var shouldContinue = Math.abs(self.__decelerationVelocityX) >= self.__minVelocityToKeepDecelerating ||\n        Math.abs(self.__decelerationVelocityY) >= self.__minVelocityToKeepDecelerating;\n      if (!shouldContinue) {\n        self.__didDecelerationComplete = true;\n      }\n      return shouldContinue;\n    };\n\n    var completed = function(renderedFramesPerSecond, animationId, wasFinished) {\n      self.__isDecelerating = false;\n      if (self.__didDecelerationComplete) {\n        self.__scrollingComplete();\n      }\n\n      // Animate to grid when snapping is active, otherwise just fix out-of-boundary positions\n      if(self.options.paging) {\n        self.scrollTo(self.__scrollLeft, self.__scrollTop, self.options.snapping);\n      }\n    };\n\n    // Start animation and switch on flag\n    self.__isDecelerating = core.effect.Animate.start(step, verify, completed);\n\n  },\n\n\n  /**\n   * Called on every step of the animation\n   *\n   * @param inMemory {Boolean} Whether to not render the current step, but keep it in memory only. Used internally only!\n   */\n  __stepThroughDeceleration: function(render) {\n\n    var self = this;\n\n\n    //\n    // COMPUTE NEXT SCROLL POSITION\n    //\n\n    // Add deceleration to scroll position\n    var scrollLeft = self.__scrollLeft + self.__decelerationVelocityX;\n    var scrollTop = self.__scrollTop + self.__decelerationVelocityY;\n\n\n    //\n    // HARD LIMIT SCROLL POSITION FOR NON BOUNCING MODE\n    //\n\n    if (!self.options.bouncing) {\n\n      var scrollLeftFixed = Math.max(Math.min(self.__maxDecelerationScrollLeft, scrollLeft), self.__minDecelerationScrollLeft);\n      if (scrollLeftFixed !== scrollLeft) {\n        scrollLeft = scrollLeftFixed;\n        self.__decelerationVelocityX = 0;\n      }\n\n      var scrollTopFixed = Math.max(Math.min(self.__maxDecelerationScrollTop, scrollTop), self.__minDecelerationScrollTop);\n      if (scrollTopFixed !== scrollTop) {\n        scrollTop = scrollTopFixed;\n        self.__decelerationVelocityY = 0;\n      }\n\n    }\n\n\n    //\n    // UPDATE SCROLL POSITION\n    //\n\n    if (render) {\n\n      self.__publish(scrollLeft, scrollTop, self.__zoomLevel);\n\n    } else {\n\n      self.__scrollLeft = scrollLeft;\n      self.__scrollTop = scrollTop;\n\n    }\n\n\n    //\n    // SLOW DOWN\n    //\n\n    // Slow down velocity on every iteration\n    if (!self.options.paging) {\n\n      // This is the factor applied to every iteration of the animation\n      // to slow down the process. This should emulate natural behavior where\n      // objects slow down when the initiator of the movement is removed\n      var frictionFactor = 0.95;\n\n      self.__decelerationVelocityX *= frictionFactor;\n      self.__decelerationVelocityY *= frictionFactor;\n\n    }\n\n\n    //\n    // BOUNCING SUPPORT\n    //\n\n    if (self.options.bouncing) {\n\n      var scrollOutsideX = 0;\n      var scrollOutsideY = 0;\n\n      // This configures the amount of change applied to deceleration/acceleration when reaching boundaries\n      var penetrationDeceleration = self.options.penetrationDeceleration;\n      var penetrationAcceleration = self.options.penetrationAcceleration;\n\n      // Check limits\n      if (scrollLeft < self.__minDecelerationScrollLeft) {\n        scrollOutsideX = self.__minDecelerationScrollLeft - scrollLeft;\n      } else if (scrollLeft > self.__maxDecelerationScrollLeft) {\n        scrollOutsideX = self.__maxDecelerationScrollLeft - scrollLeft;\n      }\n\n      if (scrollTop < self.__minDecelerationScrollTop) {\n        scrollOutsideY = self.__minDecelerationScrollTop - scrollTop;\n      } else if (scrollTop > self.__maxDecelerationScrollTop) {\n        scrollOutsideY = self.__maxDecelerationScrollTop - scrollTop;\n      }\n\n      // Slow down until slow enough, then flip back to snap position\n      if (scrollOutsideX !== 0) {\n        var isHeadingOutwardsX = scrollOutsideX * self.__decelerationVelocityX <= self.__minDecelerationScrollLeft;\n        if (isHeadingOutwardsX) {\n          self.__decelerationVelocityX += scrollOutsideX * penetrationDeceleration;\n        }\n        var isStoppedX = Math.abs(self.__decelerationVelocityX) <= self.__minVelocityToKeepDecelerating;\n        //If we're not heading outwards, or if the above statement got us below minDeceleration, go back towards bounds\n        if (!isHeadingOutwardsX || isStoppedX) {\n          self.__decelerationVelocityX = scrollOutsideX * penetrationAcceleration;\n        }\n      }\n\n      if (scrollOutsideY !== 0) {\n        var isHeadingOutwardsY = scrollOutsideY * self.__decelerationVelocityY <= self.__minDecelerationScrollTop;\n        if (isHeadingOutwardsY) {\n          self.__decelerationVelocityY += scrollOutsideY * penetrationDeceleration;\n        }\n        var isStoppedY = Math.abs(self.__decelerationVelocityY) <= self.__minVelocityToKeepDecelerating;\n        //If we're not heading outwards, or if the above statement got us below minDeceleration, go back towards bounds\n        if (!isHeadingOutwardsY || isStoppedY) {\n          self.__decelerationVelocityY = scrollOutsideY * penetrationAcceleration;\n        }\n      }\n    }\n  }\n});\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n  /**\n   * An ActionSheet is the slide up menu popularized on iOS.\n   *\n   * You see it all over iOS apps, where it offers a set of options \n   * triggered after an action.\n   */\n  ionic.views.ActionSheet = ionic.views.View.inherit({\n    initialize: function(opts) {\n      this.el = opts.el;\n    },\n    show: function() {\n      // Force a reflow so the animation will actually run\n      this.el.offsetWidth;\n\n      this.el.classList.add('active');\n    },\n    hide: function() {\n      // Force a reflow so the animation will actually run\n      this.el.offsetWidth;\n      this.el.classList.remove('active');\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  /**\n   * @ngdoc controller\n   * @name ionicBar\n   * @module ionic\n   * @description\n   * Controller for the {@link ionic.directive:ionHeaderBar} and\n   * {@link ionic.directive:ionFooterBar} directives.\n   */\n  ionic.views.HeaderBar = ionic.views.View.inherit({\n    initialize: function(opts) {\n      this.el = opts.el;\n\n      ionic.extend(this, {\n        alignTitle: 'center'\n      }, opts);\n\n      this.align();\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicBar#align\n     * @description\n     * Aligns the title text with the buttons in the bar\n     * so that the title size is maximized and aligned correctly\n     * as much as possible.\n     * @param {string=} direction Which direction to align the title towards.\n     * Available: 'left', 'right', 'center'. Default: 'center'.\n     */\n    align: function(align) {\n\n      align || (align = this.alignTitle);\n\n      // Find the titleEl element\n      var titleEl = this.el.querySelector('.title');\n      if(!titleEl) {\n        return;\n      }\n\n      var i, c, childSize;\n      var childNodes = this.el.childNodes;\n      var leftWidth = 0;\n      var rightWidth = 0;\n      var isCountingRightWidth = false;\n\n      // Compute how wide the left children are\n      // Skip all titles (there may still be two titles, one leaving the dom)\n      // Once we encounter a titleEl, realize we are now counting the right-buttons, not left\n      for(i = 0; i < childNodes.length; i++) {\n        c = childNodes[i];\n        if (c.tagName && c.tagName.toLowerCase() == 'h1') {\n          isCountingRightWidth = true;\n          continue;\n        }\n\n        childSize = null;\n        if(c.nodeType == 3) {\n          childSize = ionic.DomUtil.getTextBounds(c);\n        } else if(c.nodeType == 1) {\n          childSize = c.getBoundingClientRect();\n        }\n        if(childSize) {\n          if (isCountingRightWidth) {\n            rightWidth += childSize.width;\n          } else {\n            leftWidth += childSize.width;\n          }\n        }\n      }\n\n      var self = this;\n      ionic.requestAnimationFrame(function() {\n        var margin = Math.max(leftWidth, rightWidth) + 10;\n\n        // Size and align the header titleEl based on the sizes of the left and\n        // right children, and the desired alignment mode\n        if(align == 'center') {\n          if(margin > 10) {\n            titleEl.style.left = margin + 'px';\n            titleEl.style.right = margin + 'px';\n          }\n          if(titleEl.offsetWidth < titleEl.scrollWidth) {\n            if(rightWidth > 0) {\n              titleEl.style.right = (rightWidth + 5) + 'px';\n            }\n          }\n        } else if(align == 'left') {\n          titleEl.classList.add('title-left');\n          if(leftWidth > 0) {\n            titleEl.style.left = (leftWidth + 15) + 'px';\n          }\n        } else if(align == 'right') {\n          titleEl.classList.add('title-right');\n          if(rightWidth > 0) {\n            titleEl.style.right = (rightWidth + 15) + 'px';\n          }\n        }\n      });\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  var ITEM_CLASS = 'item';\n  var ITEM_CONTENT_CLASS = 'item-content';\n  var ITEM_SLIDING_CLASS = 'item-sliding';\n  var ITEM_OPTIONS_CLASS = 'item-options';\n  var ITEM_PLACEHOLDER_CLASS = 'item-placeholder';\n  var ITEM_REORDERING_CLASS = 'item-reordering';\n  var ITEM_REORDER_BTN_CLASS = 'item-reorder';\n\n  var DragOp = function() {};\n  DragOp.prototype = {\n    start: function(e) {\n    },\n    drag: function(e) {\n    },\n    end: function(e) {\n    },\n    isSameItem: function(item) {\n      return false;\n    }\n  };\n\n\n\n  var SlideDrag = function(opts) {\n    this.dragThresholdX = opts.dragThresholdX || 10;\n    this.el = opts.el;\n  };\n\n  SlideDrag.prototype = new DragOp();\n\n  SlideDrag.prototype.start = function(e) {\n    var content, buttons, offsetX, buttonsWidth;\n\n    if(e.target.classList.contains(ITEM_CONTENT_CLASS)) {\n      content = e.target;\n    } else if(e.target.classList.contains(ITEM_CLASS)) {\n      content = e.target.querySelector('.' + ITEM_CONTENT_CLASS);\n    } else {\n      content = ionic.DomUtil.getParentWithClass(e.target, ITEM_CONTENT_CLASS);\n    }\n\n    // If we don't have a content area as one of our children (or ourselves), skip\n    if(!content) {\n      return;\n    }\n\n    // Make sure we aren't animating as we slide\n    content.classList.remove(ITEM_SLIDING_CLASS);\n\n    // Grab the starting X point for the item (for example, so we can tell whether it is open or closed to start)\n    offsetX = parseFloat(content.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]) || 0;\n\n    // Grab the buttons\n    buttons = content.parentNode.querySelector('.' + ITEM_OPTIONS_CLASS);\n    if(!buttons) {\n      return;\n    }\n\n    buttonsWidth = buttons.offsetWidth;\n\n    this._currentDrag = {\n      buttonsWidth: buttonsWidth,\n      content: content,\n      startOffsetX: offsetX\n    };\n  };\n\n  /**\n   * Check if this is the same item that was previously dragged.\n   */\n  SlideDrag.prototype.isSameItem = function(op) {\n    if(op._lastDrag && this._currentDrag) {\n      return this._currentDrag.content == op._lastDrag.content;\n    }\n    return false;\n  };\n\n  SlideDrag.prototype.clean = function(e) {\n    var lastDrag = this._lastDrag;\n\n    if(!lastDrag) return;\n\n    ionic.requestAnimationFrame(function() {\n      lastDrag.content.style[ionic.CSS.TRANSITION] = '';\n      lastDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(0, 0, 0)';\n    });\n  };\n\n  SlideDrag.prototype.drag = ionic.animationFrameThrottle(function(e) {\n    var buttonsWidth;\n\n    // We really aren't dragging\n    if(!this._currentDrag) {\n      return;\n    }\n\n    // Check if we should start dragging. Check if we've dragged past the threshold,\n    // or we are starting from the open state.\n    if(!this._isDragging &&\n        ((Math.abs(e.gesture.deltaX) > this.dragThresholdX) ||\n        (Math.abs(this._currentDrag.startOffsetX) > 0)))\n    {\n      this._isDragging = true;\n    }\n\n    if(this._isDragging) {\n      buttonsWidth = this._currentDrag.buttonsWidth;\n\n      // Grab the new X point, capping it at zero\n      var newX = Math.min(0, this._currentDrag.startOffsetX + e.gesture.deltaX);\n\n      // If the new X position is past the buttons, we need to slow down the drag (rubber band style)\n      if(newX < -buttonsWidth) {\n        // Calculate the new X position, capped at the top of the buttons\n        newX = Math.min(-buttonsWidth, -buttonsWidth + (((e.gesture.deltaX + buttonsWidth) * 0.4)));\n      }\n\n      this._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + newX + 'px, 0, 0)';\n      this._currentDrag.content.style[ionic.CSS.TRANSITION] = 'none';\n    }\n  });\n\n  SlideDrag.prototype.end = function(e, doneCallback) {\n    var _this = this;\n\n    // There is no drag, just end immediately\n    if(!this._currentDrag) {\n      doneCallback && doneCallback();\n      return;\n    }\n\n    // If we are currently dragging, we want to snap back into place\n    // The final resting point X will be the width of the exposed buttons\n    var restingPoint = -this._currentDrag.buttonsWidth;\n\n    // Check if the drag didn't clear the buttons mid-point\n    // and we aren't moving fast enough to swipe open\n    if(e.gesture.deltaX > -(this._currentDrag.buttonsWidth/2)) {\n\n      // If we are going left but too slow, or going right, go back to resting\n      if(e.gesture.direction == \"left\" && Math.abs(e.gesture.velocityX) < 0.3) {\n        restingPoint = 0;\n      } else if(e.gesture.direction == \"right\") {\n        restingPoint = 0;\n      }\n\n    }\n\n    ionic.requestAnimationFrame(function() {\n      if(restingPoint === 0) {\n        _this._currentDrag.content.style[ionic.CSS.TRANSFORM] = '';\n      } else {\n        _this._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + restingPoint + 'px, 0, 0)';\n      }\n      _this._currentDrag.content.style[ionic.CSS.TRANSITION] = '';\n\n\n      // Kill the current drag\n      _this._lastDrag = _this._currentDrag;\n      _this._currentDrag = null;\n\n      // We are done, notify caller\n      doneCallback && doneCallback();\n    });\n  };\n\n  var ReorderDrag = function(opts) {\n    this.dragThresholdY = opts.dragThresholdY || 0;\n    this.onReorder = opts.onReorder;\n    this.el = opts.el;\n    this.scrollEl = opts.scrollEl;\n    this.scrollView = opts.scrollView;\n  };\n\n  ReorderDrag.prototype = new DragOp();\n\n  ReorderDrag.prototype._moveElement = function(e) {\n    var y = (e.gesture.center.pageY - this._currentDrag.elementHeight/2);\n    this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(0, '+y+'px, 0)';\n  };\n\n  ReorderDrag.prototype.start = function(e) {\n    var content;\n\n\n    // Grab the starting Y point for the item\n    var offsetY = this.el.offsetTop;//parseFloat(this.el.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[1]) || 0;\n\n    var startIndex = ionic.DomUtil.getChildIndex(this.el, this.el.nodeName.toLowerCase());\n    var elementHeight = this.el.offsetHeight;\n    var placeholder = this.el.cloneNode(true);\n\n    // If we have a scroll pane, move our draggable element outside of it\n    // We do this because when we drag our element down below the edge of the page\n    // and scroll the scroll-pane, if the element is *part* of the scroll-pane,\n    // it will scroll 'with' the scroll-pane's contents and change position.\n    var appendToElement = (this.scrollEl || this.el).parentNode;\n\n    placeholder.classList.add(ITEM_PLACEHOLDER_CLASS);\n\n    this.el.parentNode.insertBefore(placeholder, this.el);\n    this.el.classList.add(ITEM_REORDERING_CLASS);\n\n    appendToElement.parentNode.appendChild(this.el);\n\n    this._currentDrag = {\n      elementHeight: elementHeight,\n      startIndex: startIndex,\n      placeholder: placeholder,\n      scrollHeight: scroll,\n      list: placeholder.parentNode\n    };\n\n    this._moveElement(e);\n  };\n\n  ReorderDrag.prototype.drag = ionic.animationFrameThrottle(function(e) {\n    // We really aren't dragging\n    if(!this._currentDrag) {\n      return;\n    }\n\n    var scrollY = 0;\n    var pageY = e.gesture.center.pageY;\n\n    //If we have a scrollView, check scroll boundaries for dragged element and scroll if necessary\n    if (this.scrollView) {\n      var container = this.scrollEl;\n\n      scrollY = this.scrollView.getValues().top;\n\n      var containerTop = container.offsetTop;\n      var pixelsPastTop = containerTop - pageY + this._currentDrag.elementHeight/2;\n      var pixelsPastBottom = pageY + this._currentDrag.elementHeight/2 - containerTop - container.offsetHeight;\n\n      if (e.gesture.deltaY < 0 && pixelsPastTop > 0 && scrollY > 0) {\n        this.scrollView.scrollBy(null, -pixelsPastTop);\n      }\n      if (e.gesture.deltaY > 0 && pixelsPastBottom > 0) {\n        if (scrollY < this.scrollView.getScrollMax().top) {\n          this.scrollView.scrollBy(null, pixelsPastBottom);\n        }\n      }\n    }\n\n    // Check if we should start dragging. Check if we've dragged past the threshold,\n    // or we are starting from the open state.\n    if(!this._isDragging && Math.abs(e.gesture.deltaY) > this.dragThresholdY) {\n      this._isDragging = true;\n    }\n\n    if(this._isDragging) {\n      this._moveElement(e);\n\n      this._currentDrag.currentY = scrollY + pageY - this._currentDrag.placeholder.parentNode.offsetTop;\n\n      this._reorderItems();\n    }\n  });\n\n  // When an item is dragged, we need to reorder any items for sorting purposes\n  ReorderDrag.prototype._reorderItems = function() {\n    var placeholder = this._currentDrag.placeholder;\n    var siblings = Array.prototype.slice.call(this._currentDrag.placeholder.parentNode.children);\n\n    var index = siblings.indexOf(this._currentDrag.placeholder);\n    var topSibling = siblings[Math.max(0, index - 1)];\n    var bottomSibling = siblings[Math.min(siblings.length, index+1)];\n    var thisOffsetTop = this._currentDrag.currentY;// + this._currentDrag.startOffsetTop;\n\n    if(topSibling && (thisOffsetTop < topSibling.offsetTop + topSibling.offsetHeight/2)) {\n      ionic.DomUtil.swapNodes(this._currentDrag.placeholder, topSibling);\n      return index - 1;\n    } else if(bottomSibling && thisOffsetTop > (bottomSibling.offsetTop + bottomSibling.offsetHeight/2)) {\n      ionic.DomUtil.swapNodes(bottomSibling, this._currentDrag.placeholder);\n      return index + 1;\n    }\n  };\n\n  ReorderDrag.prototype.end = function(e, doneCallback) {\n    if(!this._currentDrag) {\n      doneCallback && doneCallback();\n      return;\n    }\n\n    var placeholder = this._currentDrag.placeholder;\n    var finalPosition = ionic.DomUtil.getChildIndex(placeholder, placeholder.nodeName.toLowerCase());\n\n    // Reposition the element\n    this.el.classList.remove(ITEM_REORDERING_CLASS);\n    this.el.style[ionic.CSS.TRANSFORM] = '';\n\n    placeholder.parentNode.insertBefore(this.el, placeholder);\n    placeholder.parentNode.removeChild(placeholder);\n\n    this.onReorder && this.onReorder(this.el, this._currentDrag.startIndex, finalPosition);\n\n    this._currentDrag = null;\n    doneCallback && doneCallback();\n  };\n\n\n\n  /**\n   * The ListView handles a list of items. It will process drag animations, edit mode,\n   * and other operations that are common on mobile lists or table views.\n   */\n  ionic.views.ListView = ionic.views.View.inherit({\n    initialize: function(opts) {\n      var _this = this;\n\n      opts = ionic.extend({\n        onReorder: function(el, oldIndex, newIndex) {},\n        virtualRemoveThreshold: -200,\n        virtualAddThreshold: 200,\n        canSwipe: false\n      }, opts);\n\n      ionic.extend(this, opts);\n\n      if(!this.itemHeight && this.listEl) {\n        this.itemHeight = this.listEl.children[0] && parseInt(this.listEl.children[0].style.height, 10);\n      }\n\n      //ionic.views.ListView.__super__.initialize.call(this, opts);\n\n      this.onRefresh = opts.onRefresh || function() {};\n      this.onRefreshOpening = opts.onRefreshOpening || function() {};\n      this.onRefreshHolding = opts.onRefreshHolding || function() {};\n\n      window.ionic.onGesture('release', function(e) {\n        _this._handleEndDrag(e);\n      }, this.el);\n\n      window.ionic.onGesture('drag', function(e) {\n        _this._handleDrag(e);\n      }, this.el);\n      // Start the drag states\n      this._initDrag();\n    },\n    /**\n     * Called to tell the list to stop refreshing. This is useful\n     * if you are refreshing the list and are done with refreshing.\n     */\n    stopRefreshing: function() {\n      var refresher = this.el.querySelector('.list-refresher');\n      refresher.style.height = '0px';\n    },\n\n    /**\n     * If we scrolled and have virtual mode enabled, compute the window\n     * of active elements in order to figure out the viewport to render.\n     */\n    didScroll: function(e) {\n      if(this.isVirtual) {\n        var itemHeight = this.itemHeight;\n\n        // TODO: This would be inaccurate if we are windowed\n        var totalItems = this.listEl.children.length;\n\n        // Grab the total height of the list\n        var scrollHeight = e.target.scrollHeight;\n\n        // Get the viewport height\n        var viewportHeight = this.el.parentNode.offsetHeight;\n\n        // scrollTop is the current scroll position\n        var scrollTop = e.scrollTop;\n\n        // High water is the pixel position of the first element to include (everything before\n        // that will be removed)\n        var highWater = Math.max(0, e.scrollTop + this.virtualRemoveThreshold);\n\n        // Low water is the pixel position of the last element to include (everything after\n        // that will be removed)\n        var lowWater = Math.min(scrollHeight, Math.abs(e.scrollTop) + viewportHeight + this.virtualAddThreshold);\n\n        // Compute how many items per viewport size can show\n        var itemsPerViewport = Math.floor((lowWater - highWater) / itemHeight);\n\n        // Get the first and last elements in the list based on how many can fit\n        // between the pixel range of lowWater and highWater\n        var first = parseInt(Math.abs(highWater / itemHeight), 10);\n        var last = parseInt(Math.abs(lowWater / itemHeight), 10);\n\n        // Get the items we need to remove\n        this._virtualItemsToRemove = Array.prototype.slice.call(this.listEl.children, 0, first);\n\n        // Grab the nodes we will be showing\n        var nodes = Array.prototype.slice.call(this.listEl.children, first, first + itemsPerViewport);\n\n        this.renderViewport && this.renderViewport(highWater, lowWater, first, last);\n      }\n    },\n\n    didStopScrolling: function(e) {\n      if(this.isVirtual) {\n        for(var i = 0; i < this._virtualItemsToRemove.length; i++) {\n          var el = this._virtualItemsToRemove[i];\n          //el.parentNode.removeChild(el);\n          this.didHideItem && this.didHideItem(i);\n        }\n        // Once scrolling stops, check if we need to remove old items\n\n      }\n    },\n\n    /**\n     * Clear any active drag effects on the list.\n     */\n    clearDragEffects: function() {\n      if(this._lastDragOp) {\n        this._lastDragOp.clean && this._lastDragOp.clean();\n        this._lastDragOp = null;\n      }\n    },\n\n    _initDrag: function() {\n      //ionic.views.ListView.__super__._initDrag.call(this);\n\n      // Store the last one\n      this._lastDragOp = this._dragOp;\n\n      this._dragOp = null;\n    },\n\n    // Return the list item from the given target\n    _getItem: function(target) {\n      while(target) {\n        if(target.classList.contains(ITEM_CLASS)) {\n          return target;\n        }\n        target = target.parentNode;\n      }\n      return null;\n    },\n\n\n    _startDrag: function(e) {\n      var _this = this;\n\n      var didStart = false;\n\n      this._isDragging = false;\n\n      var lastDragOp = this._lastDragOp;\n\n      // Check if this is a reorder drag\n      if(ionic.DomUtil.getParentOrSelfWithClass(e.target, ITEM_REORDER_BTN_CLASS) && (e.gesture.direction == 'up' || e.gesture.direction == 'down')) {\n        var item = this._getItem(e.target);\n\n        if(item) {\n          this._dragOp = new ReorderDrag({\n            el: item,\n            scrollEl: this.scrollEl,\n            scrollView: this.scrollView,\n            onReorder: function(el, start, end) {\n              _this.onReorder && _this.onReorder(el, start, end);\n            }\n          });\n          this._dragOp.start(e);\n          e.preventDefault();\n        }\n      }\n\n      // Or check if this is a swipe to the side drag\n      else if(!this._didDragUpOrDown && (e.gesture.direction == 'left' || e.gesture.direction == 'right') && Math.abs(e.gesture.deltaX) > 5) {\n\n        // Make sure this is an item with buttons\n        var item = this._getItem(e.target);\n        if(item && item.querySelector('.item-options')) {\n          this._dragOp = new SlideDrag({ el: this.el });\n          this._dragOp.start(e);\n          e.preventDefault();\n        }\n      }\n\n      // If we had a last drag operation and this is a new one on a different item, clean that last one\n      if(lastDragOp && this._dragOp && !this._dragOp.isSameItem(lastDragOp) && e.defaultPrevented) {\n        lastDragOp.clean && lastDragOp.clean();\n      }\n    },\n\n\n    _handleEndDrag: function(e) {\n      var _this = this;\n\n      this._didDragUpOrDown = false;\n\n      if(!this._dragOp) {\n        //ionic.views.ListView.__super__._handleEndDrag.call(this, e);\n        return;\n      }\n\n      this._dragOp.end(e, function() {\n        _this._initDrag();\n      });\n    },\n\n    /**\n     * Process the drag event to move the item to the left or right.\n     */\n    _handleDrag: function(e) {\n      var _this = this, content, buttons;\n\n      if (!this.canSwipe) {\n        return;\n      }\n\n      if(Math.abs(e.gesture.deltaY) > 5) {\n        this._didDragUpOrDown = true;\n      }\n\n      // If we get a drag event, make sure we aren't in another drag, then check if we should\n      // start one\n      if(!this.isDragging && !this._dragOp) {\n        this._startDrag(e);\n      }\n\n      // No drag still, pass it up\n      if(!this._dragOp) {\n        //ionic.views.ListView.__super__._handleDrag.call(this, e);\n        return;\n      }\n\n      e.gesture.srcEvent.preventDefault();\n      this._dragOp.drag(e);\n    }\n\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n  /**\n   * Loading\n   *\n   * The Loading is an overlay that can be used to indicate\n   * activity while blocking user interaction.\n   */\n  ionic.views.Loading = ionic.views.View.inherit({\n    initialize: function(opts) {\n      var _this = this;\n\n      this.el = opts.el;\n\n      this.maxWidth = opts.maxWidth || 200;\n\n      this.showDelay = opts.showDelay || 0;\n\n      this._loadingBox = this.el.querySelector('.loading') || this.el;\n    },\n    show: function() {\n      var _this = this;\n\n      if(this._loadingBox) {\n        var lb = _this._loadingBox;\n\n        var width = Math.min(_this.maxWidth, Math.max(window.outerWidth - 40, lb.offsetWidth));\n\n        lb.style.width = width + 'px';\n\n        lb.style.marginLeft = (-lb.offsetWidth) / 2 + 'px';\n        lb.style.marginTop = (-lb.offsetHeight) / 2 + 'px';\n\n        // Wait 'showDelay' ms before showing the loading screen\n        this._showDelayTimeout = window.setTimeout(function() {\n          _this.el.classList.add('active');\n        }, _this.showDelay);\n      }\n    },\n    hide: function() {\n      // Force a reflow so the animation will actually run\n      this.el.offsetWidth;\n\n      // Prevent unnecessary 'show' after 'hide' has already been called\n      window.clearTimeout(this._showDelayTimeout);\n\n      this.el.classList.remove('active');\n    },\n    setContent: function(html) {\n      if (this._loadingBox) {\n        this._loadingBox.innerHTML = html || '';\n      }\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  ionic.views.Modal = ionic.views.View.inherit({\n    initialize: function(opts) {\n      opts = ionic.extend({\n        focusFirstInput: false,\n        unfocusOnHide: true,\n        focusFirstDelay: 600\n      }, opts);\n\n      ionic.extend(this, opts);\n\n      this.el = opts.el;\n    },\n    show: function() {\n      var self = this;\n\n      if(self.focusFirstInput) {\n        // Let any animations run first\n        window.setTimeout(function() {\n          var input = self.el.querySelector('input, textarea');\n          input && input.focus && input.focus();\n        }, self.focusFirstDelay);\n      }\n    },\n    hide: function() {\n      // Unfocus all elements\n      if(this.unfocusOnHide) {\n        var inputs = this.el.querySelectorAll('input, textarea');\n        // Let any animations run first\n        window.setTimeout(function() {\n          for(var i = 0; i < inputs.length; i++) {\n            inputs[i].blur && inputs[i].blur();\n          }\n        });\n      }\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  ionic.views.NavBar = ionic.views.View.inherit({\n    initialize: function(opts) {\n      this.el = opts.el;\n\n      this._titleEl = this.el.querySelector('.title');\n\n      if(opts.hidden) {\n        this.hide();\n      }\n    },\n    hide: function() {\n      this.el.classList.add('hidden');\n    },\n    show: function() {\n      this.el.classList.remove('hidden');\n    },\n    shouldGoBack: function() {},\n\n    setTitle: function(title) {\n      if(!this._titleEl) {\n        return;\n      }\n      this._titleEl.innerHTML = title;\n    },\n\n    showBackButton: function(shouldShow) {\n      var _this = this;\n\n      if(!this._currentBackButton) {\n        var back = document.createElement('a');\n        back.className = 'button back';\n        back.innerHTML = 'Back';\n\n        this._currentBackButton = back;\n        this._currentBackButton.onclick = function(event) {\n          _this.shouldGoBack && _this.shouldGoBack();\n        };\n      }\n\n      if(shouldShow && !this._currentBackButton.parentNode) {\n        // Prepend the back button\n        this.el.insertBefore(this._currentBackButton, this.el.firstChild);\n      } else if(!shouldShow && this._currentBackButton.parentNode) {\n        // Remove the back button if it's there\n        this._currentBackButton.parentNode.removeChild(this._currentBackButton);\n      }\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  /**\n   * The side menu view handles one of the side menu's in a Side Menu Controller\n   * configuration.\n   * It takes a DOM reference to that side menu element.\n   */\n  ionic.views.SideMenu = ionic.views.View.inherit({\n    initialize: function(opts) {\n      this.el = opts.el;\n      this.isEnabled = (typeof opts.isEnabled === 'undefined') ? true : opts.isEnabled;\n      this.setWidth(opts.width);\n    },\n\n    getFullWidth: function() {\n      return this.width;\n    },\n    setWidth: function(width) {\n      this.width = width;\n      this.el.style.width = width + 'px';\n    },\n    setIsEnabled: function(isEnabled) {\n      this.isEnabled = isEnabled;\n    },\n    bringUp: function() {\n      if(this.el.style.zIndex !== '0') {\n        this.el.style.zIndex = '0';\n      }\n    },\n    pushDown: function() {\n      if(this.el.style.zIndex !== '-1') {\n        this.el.style.zIndex = '-1';\n      }\n    }\n  });\n\n  ionic.views.SideMenuContent = ionic.views.View.inherit({\n    initialize: function(opts) {\n      var _this = this;\n\n      ionic.extend(this, {\n        animationClass: 'menu-animated',\n        onDrag: function(e) {},\n        onEndDrag: function(e) {},\n      }, opts);\n\n      ionic.onGesture('drag', ionic.proxy(this._onDrag, this), this.el);\n      ionic.onGesture('release', ionic.proxy(this._onEndDrag, this), this.el);\n    },\n    _onDrag: function(e) {\n      this.onDrag && this.onDrag(e);\n    },\n    _onEndDrag: function(e) {\n      this.onEndDrag && this.onEndDrag(e);\n    },\n    disableAnimation: function() {\n      this.el.classList.remove(this.animationClass);\n    },\n    enableAnimation: function() {\n      this.el.classList.add(this.animationClass);\n    },\n    getTranslateX: function() {\n      return parseFloat(this.el.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]);\n    },\n    setTranslateX: ionic.animationFrameThrottle(function(x) {\n      this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(' + x + 'px, 0, 0)';\n    })\n  });\n\n})(ionic);\n\n/*\n * Adapted from Swipe.js 2.0\n *\n * Brad Birdsall\n * Copyright 2013, MIT License\n *\n*/\n\n/**\n * @ngdoc controller\n * @name ionicSlideBox\n * @module ionic\n * @description\n * Controller for the {@link ionic.directive:ionSlideBox} directive.\n */\n\n(function(ionic) {\n'use strict';\n\nionic.views.Slider = ionic.views.View.inherit({\n  initialize: function (options) {\n    // utilities\n    var noop = function() {}; // simple no operation function\n    var offloadFn = function(fn) { setTimeout(fn || noop, 0) }; // offload a functions execution\n\n    // check browser capabilities\n    var browser = {\n      addEventListener: !!window.addEventListener,\n      touch: ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch,\n      transitions: (function(temp) {\n        var props = ['transitionProperty', 'WebkitTransition', 'MozTransition', 'OTransition', 'msTransition'];\n        for ( var i in props ) if (temp.style[ props[i] ] !== undefined) return true;\n        return false;\n      })(document.createElement('swipe'))\n    };\n\n\n    var container = options.el;\n\n    // quit if no root element\n    if (!container) return;\n    var element = container.children[0];\n    var slides, slidePos, width, length;\n    options = options || {};\n    var index = parseInt(options.startSlide, 10) || 0;\n    var speed = options.speed || 300;\n    options.continuous = options.continuous !== undefined ? options.continuous : true;\n\n    function setup() {\n\n      // cache slides\n      slides = element.children;\n      length = slides.length;\n\n      // set continuous to false if only one slide\n      if (slides.length < 2) options.continuous = false;\n\n      //special case if two slides\n      if (browser.transitions && options.continuous && slides.length < 3) {\n        element.appendChild(slides[0].cloneNode(true));\n        element.appendChild(element.children[1].cloneNode(true));\n        slides = element.children;\n      }\n\n      // create an array to store current positions of each slide\n      slidePos = new Array(slides.length);\n\n      // determine width of each slide\n      width = container.getBoundingClientRect().width || container.offsetWidth;\n\n      element.style.width = (slides.length * width) + 'px';\n\n      // stack elements\n      var pos = slides.length;\n      while(pos--) {\n\n        var slide = slides[pos];\n\n        slide.style.width = width + 'px';\n        slide.setAttribute('data-index', pos);\n\n        if (browser.transitions) {\n          slide.style.left = (pos * -width) + 'px';\n          move(pos, index > pos ? -width : (index < pos ? width : 0), 0);\n        }\n\n      }\n\n      // reposition elements before and after index\n      if (options.continuous && browser.transitions) {\n        move(circle(index-1), -width, 0);\n        move(circle(index+1), width, 0);\n      }\n\n      if (!browser.transitions) element.style.left = (index * -width) + 'px';\n\n      container.style.visibility = 'visible';\n\n      options.slidesChanged && options.slidesChanged();\n    }\n\n    function prev() {\n\n      if (options.continuous) slide(index-1);\n      else if (index) slide(index-1);\n\n    }\n\n    function next() {\n\n      if (options.continuous) slide(index+1);\n      else if (index < slides.length - 1) slide(index+1);\n\n    }\n\n    function circle(index) {\n\n      // a simple positive modulo using slides.length\n      return (slides.length + (index % slides.length)) % slides.length;\n\n    }\n\n    function slide(to, slideSpeed) {\n\n      // do nothing if already on requested slide\n      if (index == to) return;\n\n      if (browser.transitions) {\n\n        var direction = Math.abs(index-to) / (index-to); // 1: backward, -1: forward\n\n        // get the actual position of the slide\n        if (options.continuous) {\n          var natural_direction = direction;\n          direction = -slidePos[circle(to)] / width;\n\n          // if going forward but to < index, use to = slides.length + to\n          // if going backward but to > index, use to = -slides.length + to\n          if (direction !== natural_direction) to =  -direction * slides.length + to;\n\n        }\n\n        var diff = Math.abs(index-to) - 1;\n\n        // move all the slides between index and to in the right direction\n        while (diff--) move( circle((to > index ? to : index) - diff - 1), width * direction, 0);\n\n        to = circle(to);\n\n        move(index, width * direction, slideSpeed || speed);\n        move(to, 0, slideSpeed || speed);\n\n        if (options.continuous) move(circle(to - direction), -(width * direction), 0); // we need to get the next in place\n\n      } else {\n\n        to = circle(to);\n        animate(index * -width, to * -width, slideSpeed || speed);\n        //no fallback for a circular continuous if the browser does not accept transitions\n      }\n\n      index = to;\n      offloadFn(options.callback && options.callback(index, slides[index]));\n    }\n\n    function move(index, dist, speed) {\n\n      translate(index, dist, speed);\n      slidePos[index] = dist;\n\n    }\n\n    function translate(index, dist, speed) {\n\n      var slide = slides[index];\n      var style = slide && slide.style;\n\n      if (!style) return;\n\n      style.webkitTransitionDuration =\n      style.MozTransitionDuration =\n      style.msTransitionDuration =\n      style.OTransitionDuration =\n      style.transitionDuration = speed + 'ms';\n\n      style.webkitTransform = 'translate(' + dist + 'px,0)' + 'translateZ(0)';\n      style.msTransform =\n      style.MozTransform =\n      style.OTransform = 'translateX(' + dist + 'px)';\n\n    }\n\n    function animate(from, to, speed) {\n\n      // if not an animation, just reposition\n      if (!speed) {\n\n        element.style.left = to + 'px';\n        return;\n\n      }\n\n      var start = +new Date;\n\n      var timer = setInterval(function() {\n\n        var timeElap = +new Date - start;\n\n        if (timeElap > speed) {\n\n          element.style.left = to + 'px';\n\n          if (delay) begin();\n\n          options.transitionEnd && options.transitionEnd.call(event, index, slides[index]);\n\n          clearInterval(timer);\n          return;\n\n        }\n\n        element.style.left = (( (to - from) * (Math.floor((timeElap / speed) * 100) / 100) ) + from) + 'px';\n\n      }, 4);\n\n    }\n\n    // setup auto slideshow\n    var delay = options.auto || 0;\n    var interval;\n\n    function begin() {\n\n      interval = setTimeout(next, delay);\n\n    }\n\n    function stop() {\n\n      delay = options.auto || 0;\n      clearTimeout(interval);\n\n    }\n\n\n    // setup initial vars\n    var start = {};\n    var delta = {};\n    var isScrolling;\n\n    // setup event capturing\n    var events = {\n\n      handleEvent: function(event) {\n        if(event.type == 'mousedown' || event.type == 'mouseup' || event.type == 'mousemove') {\n          event.touches = [{\n            pageX: event.pageX,\n            pageY: event.pageY\n          }];\n        }\n\n        switch (event.type) {\n          case 'mousedown': this.start(event); break;\n          case 'touchstart': this.start(event); break;\n          case 'touchmove': this.move(event); break;\n          case 'mousemove': this.move(event); break;\n          case 'touchend': offloadFn(this.end(event)); break;\n          case 'mouseup': offloadFn(this.end(event)); break;\n          case 'webkitTransitionEnd':\n          case 'msTransitionEnd':\n          case 'oTransitionEnd':\n          case 'otransitionend':\n          case 'transitionend': offloadFn(this.transitionEnd(event)); break;\n          case 'resize': offloadFn(setup); break;\n        }\n\n        if (options.stopPropagation) event.stopPropagation();\n\n      },\n      start: function(event) {\n\n        var touches = event.touches[0];\n\n        // measure start values\n        start = {\n\n          // get initial touch coords\n          x: touches.pageX,\n          y: touches.pageY,\n\n          // store time to determine touch duration\n          time: +new Date\n\n        };\n\n        // used for testing first move event\n        isScrolling = undefined;\n\n        // reset delta and end measurements\n        delta = {};\n\n        // attach touchmove and touchend listeners\n        if(browser.touch) {\n          element.addEventListener('touchmove', this, false);\n          element.addEventListener('touchend', this, false);\n        } else {\n          element.addEventListener('mousemove', this, false);\n          element.addEventListener('mouseup', this, false);\n          document.addEventListener('mouseup', this, false);\n        }\n      },\n      move: function(event) {\n\n        // ensure swiping with one touch and not pinching\n        if ( event.touches.length > 1 || event.scale && event.scale !== 1) return\n\n        if (options.disableScroll) event.preventDefault();\n\n        var touches = event.touches[0];\n\n        // measure change in x and y\n        delta = {\n          x: touches.pageX - start.x,\n          y: touches.pageY - start.y\n        }\n\n        // determine if scrolling test has run - one time test\n        if ( typeof isScrolling == 'undefined') {\n          isScrolling = !!( isScrolling || Math.abs(delta.x) < Math.abs(delta.y) );\n        }\n\n        // if user is not trying to scroll vertically\n        if (!isScrolling) {\n\n          // prevent native scrolling\n          event.preventDefault();\n\n          // stop slideshow\n          stop();\n\n          // increase resistance if first or last slide\n          if (options.continuous) { // we don't add resistance at the end\n\n            translate(circle(index-1), delta.x + slidePos[circle(index-1)], 0);\n            translate(index, delta.x + slidePos[index], 0);\n            translate(circle(index+1), delta.x + slidePos[circle(index+1)], 0);\n\n          } else {\n\n            delta.x =\n              delta.x /\n                ( (!index && delta.x > 0               // if first slide and sliding left\n                  || index == slides.length - 1        // or if last slide and sliding right\n                  && delta.x < 0                       // and if sliding at all\n                ) ?\n                ( Math.abs(delta.x) / width + 1 )      // determine resistance level\n                : 1 );                                 // no resistance if false\n\n            // translate 1:1\n            translate(index-1, delta.x + slidePos[index-1], 0);\n            translate(index, delta.x + slidePos[index], 0);\n            translate(index+1, delta.x + slidePos[index+1], 0);\n          }\n\n        }\n\n      },\n      end: function(event) {\n\n        // measure duration\n        var duration = +new Date - start.time;\n\n        // determine if slide attempt triggers next/prev slide\n        var isValidSlide =\n              Number(duration) < 250               // if slide duration is less than 250ms\n              && Math.abs(delta.x) > 20            // and if slide amt is greater than 20px\n              || Math.abs(delta.x) > width/2;      // or if slide amt is greater than half the width\n\n        // determine if slide attempt is past start and end\n        var isPastBounds =\n              !index && delta.x > 0                            // if first slide and slide amt is greater than 0\n              || index == slides.length - 1 && delta.x < 0;    // or if last slide and slide amt is less than 0\n\n        if (options.continuous) isPastBounds = false;\n\n        // determine direction of swipe (true:right, false:left)\n        var direction = delta.x < 0;\n\n        // if not scrolling vertically\n        if (!isScrolling) {\n\n          if (isValidSlide && !isPastBounds) {\n\n            if (direction) {\n\n              if (options.continuous) { // we need to get the next in this direction in place\n\n                move(circle(index-1), -width, 0);\n                move(circle(index+2), width, 0);\n\n              } else {\n                move(index-1, -width, 0);\n              }\n\n              move(index, slidePos[index]-width, speed);\n              move(circle(index+1), slidePos[circle(index+1)]-width, speed);\n              index = circle(index+1);\n\n            } else {\n              if (options.continuous) { // we need to get the next in this direction in place\n\n                move(circle(index+1), width, 0);\n                move(circle(index-2), -width, 0);\n\n              } else {\n                move(index+1, width, 0);\n              }\n\n              move(index, slidePos[index]+width, speed);\n              move(circle(index-1), slidePos[circle(index-1)]+width, speed);\n              index = circle(index-1);\n\n            }\n\n            options.callback && options.callback(index, slides[index]);\n\n          } else {\n\n            if (options.continuous) {\n\n              move(circle(index-1), -width, speed);\n              move(index, 0, speed);\n              move(circle(index+1), width, speed);\n\n            } else {\n\n              move(index-1, -width, speed);\n              move(index, 0, speed);\n              move(index+1, width, speed);\n            }\n\n          }\n\n        }\n\n        // kill touchmove and touchend event listeners until touchstart called again\n        if(browser.touch) {\n          element.removeEventListener('touchmove', events, false)\n          element.removeEventListener('touchend', events, false)\n        } else {\n          element.removeEventListener('mousemove', events, false)\n          element.removeEventListener('mouseup', events, false)\n          document.removeEventListener('mouseup', events, false);\n        }\n\n      },\n      transitionEnd: function(event) {\n\n        if (parseInt(event.target.getAttribute('data-index'), 10) == index) {\n\n          if (delay) begin();\n\n          options.transitionEnd && options.transitionEnd.call(event, index, slides[index]);\n\n        }\n\n      }\n\n    }\n\n    // Public API\n    /**\n     * @ngdoc method\n     * @name ionicSlideBox#update\n     * @description\n     * Update the slidebox (for example if using Angular with ng-repeat,\n     * resize it for the elements inside).\n     */\n    this.update = function() {\n      setTimeout(setup);\n    };\n    this.setup = function() {\n      setup();\n    };\n\n    /**\n     * @ngdoc method\n     * @name ionicSlideBox#slide\n     * @param {number} to The index to slide to.\n     * @param {number=} speed The number of milliseconds for the change to take.\n     */\n    this.slide = function(to, speed) {\n      // cancel slideshow\n      stop();\n\n      slide(to, speed);\n    };\n\n    /**\n     * @ngdoc method\n     * @name ionicSlideBox#prev\n     * @description Go to the previous slide. Wraps around if at the beginning.\n     */\n    this.prev = function() {\n      // cancel slideshow\n      stop();\n\n      prev();\n    };\n\n    /**\n     * @ngdoc method\n     * @name ionicSlideBox#next\n     * @description Go to the next slide. Wraps around if at the end.\n     */\n    this.next = function() {\n      // cancel slideshow\n      stop();\n\n      next();\n    };\n\n    /**\n     * @ngdoc method\n     * @name ionicSlideBox#stop\n     * @description Stop sliding. The slideBox will not move again until\n     * explicitly told to do so.\n     */\n    this.stop = function() {\n      // cancel slideshow\n      stop();\n    };\n\n    /**\n     * @ngdoc method\n     * @name ionicSlideBox#currentIndex\n     * @returns number The index of the current slide.\n     */\n    this.currentIndex = function() {\n      // return current index position\n      return index;\n    };\n\n    /**\n     * @ngdoc method\n     * @name ionicSlideBox#slidesCount\n     * @returns number The number of slides there are currently.\n     */\n    this.slidesCount = function() {\n      // return total number of slides\n      return length;\n    };\n\n    this.kill = function() {\n      // cancel slideshow\n      stop();\n\n      // reset element\n      element.style.width = '';\n      element.style.left = '';\n\n      // reset slides\n      var pos = slides.length;\n      while(pos--) {\n\n        var slide = slides[pos];\n        slide.style.width = '';\n        slide.style.left = '';\n\n        if (browser.transitions) translate(pos, 0, 0);\n\n      }\n\n      // removed event listeners\n      if (browser.addEventListener) {\n\n        // remove current event listeners\n        element.removeEventListener('touchstart', events, false);\n        element.removeEventListener('webkitTransitionEnd', events, false);\n        element.removeEventListener('msTransitionEnd', events, false);\n        element.removeEventListener('oTransitionEnd', events, false);\n        element.removeEventListener('otransitionend', events, false);\n        element.removeEventListener('transitionend', events, false);\n        window.removeEventListener('resize', events, false);\n\n      }\n      else {\n\n        window.onresize = null;\n\n      }\n    };\n\n    this.load = function() {\n      // trigger setup\n      setup();\n\n      // start auto slideshow if applicable\n      if (delay) begin();\n\n\n      // add event listeners\n      if (browser.addEventListener) {\n\n        // set touchstart event on element\n        if (browser.touch) {\n          element.addEventListener('touchstart', events, false);\n        } else {\n          element.addEventListener('mousedown', events, false);\n        }\n\n        if (browser.transitions) {\n          element.addEventListener('webkitTransitionEnd', events, false);\n          element.addEventListener('msTransitionEnd', events, false);\n          element.addEventListener('oTransitionEnd', events, false);\n          element.addEventListener('otransitionend', events, false);\n          element.addEventListener('transitionend', events, false);\n        }\n\n        // set resize event on window\n        window.addEventListener('resize', events, false);\n\n      } else {\n\n        window.onresize = function () { setup() }; // to play nice with old IE\n\n      }\n    }\n\n  }\n});\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\nionic.views.TabBarItem = ionic.views.View.inherit({\n  initialize: function(el) {\n    this.el = el;\n\n    this._buildItem();\n  },\n\n  // Factory for creating an item from a given javascript object\n  create: function(itemData) {\n    var item = document.createElement('a');\n    item.className = 'tab-item';\n\n    // If there is an icon, add the icon element\n    if(itemData.icon) {\n      var icon = document.createElement('i');\n      icon.className = itemData.icon;\n      item.appendChild(icon);\n    }\n\n    // If there is a badge, add the badge element\n    if(itemData.badge) {\n      var badge = document.createElement('i');\n      badge.className = 'badge';\n      badge.innerHTML = itemData.badge;\n      item.appendChild(badge);\n      item.className = 'tab-item has-badge';\n    }\n\n    item.appendChild(document.createTextNode(itemData.title));\n\n    return new ionic.views.TabBarItem(item);\n  },\n\n  _buildItem: function() {\n    var _this = this, child, children = Array.prototype.slice.call(this.el.children);\n\n    for(var i = 0, j = children.length; i < j; i++) {\n      child = children[i];\n\n      // Test if this is a \"i\" tag with icon in the class name\n      // TODO: This heuristic might not be sufficient\n      if(child.tagName.toLowerCase() == 'i' && /icon/.test(child.className)) {\n        this.icon = child.className;\n      }\n\n      // Test if this is a \"i\" tag with badge in the class name\n      // TODO: This heuristic might not be sufficient\n      if(child.tagName.toLowerCase() == 'i' && /badge/.test(child.className)) {\n        this.badge = child.textContent.trim();\n      }\n    }\n\n    this.title = '';\n    for(i = 0, j = this.el.childNodes.length; i < j; i++) {\n      child = this.el.childNodes[i];\n\n      if (child.nodeName === \"#text\") {\n        this.title += child.nodeValue.trim();\n      }\n    }\n\n    this._tapHandler = function(e) {\n      _this.onTap && _this.onTap(e);\n    };\n\n    ionic.on('tap', this._tapHandler, this.el);\n  },\n  onTap: function(e) {\n  },\n\n  // Remove the event listeners from this object\n  destroy: function() {\n    ionic.off('tap', this._tapHandler, this.el);\n  },\n\n  getIcon: function() {\n    return this.icon;\n  },\n\n  getTitle: function() {\n    return this.title;\n  },\n\n  getBadge: function() {\n    return this.badge;\n  },\n\n  setSelected: function(isSelected) {\n    this.isSelected = isSelected;\n    if(isSelected) {\n      this.el.classList.add('active');\n    } else {\n      this.el.classList.remove('active');\n    }\n  }\n});\n\nionic.views.TabBar = ionic.views.View.inherit({\n  initialize: function(opts) {\n    this.el = opts.el;\n     \n    this.items = [];\n\n    this._buildItems();\n  },\n  // get all the items for the TabBar\n  getItems: function() {\n    return this.items;\n  },\n\n  // Add an item to the tab bar\n  addItem: function(item) {\n    // Create a new TabItem\n    var tabItem = ionic.views.TabBarItem.prototype.create(item);\n\n    this.appendItemElement(tabItem);\n\n    this.items.push(tabItem);\n    this._bindEventsOnItem(tabItem);\n  },\n\n  appendItemElement: function(item) {\n    if(!this.el) {\n      return;\n    }\n    this.el.appendChild(item.el);\n  },\n\n  // Remove an item from the tab bar\n  removeItem: function(index) {\n    var item = this.items[index];\n    if(!item) {\n      return;\n    }\n    item.onTap = undefined;\n    item.destroy();\n  },\n\n  _bindEventsOnItem: function(item) {\n    var _this = this;\n\n    if(!this._itemTapHandler) {\n      this._itemTapHandler = function(e) {\n        //_this.selectItem(this);\n        _this.trySelectItem(this);\n      };\n    }\n    item.onTap = this._itemTapHandler;\n  },\n\n  // Get the currently selected item\n  getSelectedItem: function() {\n    return this.selectedItem;\n  },\n\n  // Set the currently selected item by index\n  setSelectedItem: function(index) {\n    this.selectedItem = this.items[index];\n\n    // Deselect all\n    for(var i = 0, j = this.items.length; i < j; i += 1) {\n      this.items[i].setSelected(false);\n    }\n\n    // Select the new item\n    if(this.selectedItem) {\n      this.selectedItem.setSelected(true);\n      //this.onTabSelected && this.onTabSelected(this.selectedItem, index);\n    }\n  },\n\n  // Select the given item assuming we can find it in our\n  // item list.\n  selectItem: function(item) {\n    for(var i = 0, j = this.items.length; i < j; i += 1) {\n      if(this.items[i] == item) {\n        this.setSelectedItem(i);\n        return;\n      }\n    }\n  },\n\n  // Try to select a given item. This triggers an event such\n  // that the view controller managing this tab bar can decide\n  // whether to select the item or cancel it.\n  trySelectItem: function(item) {\n    for(var i = 0, j = this.items.length; i < j; i += 1) {\n      if(this.items[i] == item) {\n        this.tryTabSelect && this.tryTabSelect(i);\n        return;\n      }\n    }\n  },\n\n  // Build the initial items list from the given DOM node.\n  _buildItems: function() {\n\n    var item, items = Array.prototype.slice.call(this.el.children);\n\n    for(var i = 0, j = items.length; i < j; i += 1) {\n      item =  new ionic.views.TabBarItem(items[i]);\n      this.items[i] = item;\n      this._bindEventsOnItem(item);\n    }\n  \n    if(this.items.length > 0) {\n      this.selectedItem = this.items[0];\n    }\n\n  },\n\n  // Destroy this tab bar\n  destroy: function() {\n    for(var i = 0, j = this.items.length; i < j; i += 1) {\n      this.items[i].destroy();\n    }\n    this.items.length = 0;\n  }\n});\n\n})(window.ionic);\n\n(function(ionic) {\n'use strict';\n\n  ionic.views.Toggle = ionic.views.View.inherit({\n    initialize: function(opts) {\n      var self = this;\n\n      this.el = opts.el;\n      this.checkbox = opts.checkbox;\n      this.track = opts.track;\n      this.handle = opts.handle;\n      this.openPercent = -1;\n      this.onChange = opts.onChange || function() {};\n\n      this.triggerThreshold = opts.triggerThreshold || 20;\n\n      this.dragStartHandler = function(e) {\n        self.dragStart(e);\n      };\n      this.dragHandler = function(e) {\n        self.drag(e);\n      };\n      this.holdHandler = function(e) {\n        self.hold(e);\n      };\n      this.releaseHandler = function(e) {\n        self.release(e);\n      };\n\n      this.dragStartGesture = ionic.onGesture('dragstart', this.dragStartHandler, this.el);\n      this.dragGesture = ionic.onGesture('drag', this.dragHandler, this.el);\n      this.dragHoldGesture = ionic.onGesture('hold', this.holdHandler, this.el);\n      this.dragReleaseGesture = ionic.onGesture('release', this.releaseHandler, this.el);\n    },\n\n    destroy: function() {\n      ionic.offGesture(this.dragStartGesture, 'dragstart', this.dragStartGesture);\n      ionic.offGesture(this.dragGesture, 'drag', this.dragGesture);\n      ionic.offGesture(this.dragHoldGesture, 'hold', this.holdHandler);\n      ionic.offGesture(this.dragReleaseGesture, 'release', this.releaseHandler);\n    },\n\n    tap: function(e) {\n      if(this.el.getAttribute('disabled') !== 'disabled') {\n        this.val( !this.checkbox.checked );\n      }\n    },\n\n    dragStart: function(e) {\n      if(this.checkbox.disabled) return;\n\n      this._dragInfo = {\n        width: this.el.offsetWidth,\n        left: this.el.offsetLeft,\n        right: this.el.offsetLeft + this.el.offsetWidth,\n        triggerX: this.el.offsetWidth / 2,\n        initialState: this.checkbox.checked\n      };\n\n      // Stop any parent dragging\n      e.gesture.srcEvent.preventDefault();\n\n      // Trigger hold styles\n      this.hold(e);\n    },\n\n    drag: function(e) {\n      var self = this;\n      if(!this._dragInfo) { return; }\n\n      // Stop any parent dragging\n      e.gesture.srcEvent.preventDefault();\n\n      ionic.requestAnimationFrame(function(amount) {\n\n        var slidePageLeft = self.track.offsetLeft + (self.handle.offsetWidth / 2);\n        var slidePageRight = self.track.offsetLeft + self.track.offsetWidth - (self.handle.offsetWidth / 2);\n        var dx = e.gesture.deltaX;\n\n        var px = e.gesture.touches[0].pageX - self._dragInfo.left;\n        var mx = self._dragInfo.width - self.triggerThreshold;\n\n        // The initial state was on, so \"tend towards\" on\n        if(self._dragInfo.initialState) {\n          if(px < self.triggerThreshold) {\n            self.setOpenPercent(0);\n          } else if(px > self._dragInfo.triggerX) {\n            self.setOpenPercent(100);\n          }\n        } else {\n          // The initial state was off, so \"tend towards\" off\n          if(px < self._dragInfo.triggerX) {\n            self.setOpenPercent(0);\n          } else if(px > mx) {\n            self.setOpenPercent(100);\n          }\n        }\n      });\n    },\n\n    endDrag: function(e) {\n      this._dragInfo = null;\n    },\n\n    hold: function(e) {\n      this.el.classList.add('dragging');\n    },\n    release: function(e) {\n      this.el.classList.remove('dragging');\n      this.endDrag(e);\n    },\n\n\n    setOpenPercent: function(openPercent) {\n      // only make a change if the new open percent has changed\n      if(this.openPercent < 0 || (openPercent < (this.openPercent - 3) || openPercent > (this.openPercent + 3) ) ) {\n        this.openPercent = openPercent;\n\n        if(openPercent === 0) {\n          this.val(false);\n        } else if(openPercent === 100) {\n          this.val(true);\n        } else {\n          var openPixel = Math.round( (openPercent / 100) * this.track.offsetWidth - (this.handle.offsetWidth) );\n          openPixel = (openPixel < 1 ? 0 : openPixel);\n          this.handle.style[ionic.CSS.TRANSFORM] = 'translate3d(' + openPixel + 'px,0,0)';\n        }\n      }\n    },\n\n    val: function(value) {\n      if(value === true || value === false) {\n        if(this.handle.style[ionic.CSS.TRANSFORM] !== \"\") {\n          this.handle.style[ionic.CSS.TRANSFORM] = \"\";\n        }\n        this.checkbox.checked = value;\n        this.openPercent = (value ? 100 : 0);\n        this.onChange && this.onChange();\n      }\n      return this.checkbox.checked;\n    }\n\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n  ionic.controllers.ViewController = function(options) {\n    this.initialize.apply(this, arguments);\n  };\n\n  ionic.controllers.ViewController.inherit = ionic.inherit;\n\n  ionic.extend(ionic.controllers.ViewController.prototype, {\n    initialize: function() {},\n    // Destroy this view controller, including all child views\n    destroy: function() {\n    }\n  });\n\n})(window.ionic);\n\n(function(ionic) {\n'use strict';\n\n/**\n * The NavController makes it easy to have a stack\n * of views or screens that can be pushed and popped\n * for a dynamic navigation flow. This API is modelled\n * off of the UINavigationController in iOS.\n *\n * The NavController can drive a nav bar to show a back button\n * if the stack can be poppped to go back to the last view, and\n * it will handle updating the title of the nav bar and processing animations.\n */\nionic.controllers.NavController = ionic.controllers.ViewController.inherit({\n  initialize: function(opts) {\n    var _this = this;\n\n    this.navBar = opts.navBar;\n    this.content = opts.content;\n    this.controllers = opts.controllers || [];\n\n    this._updateNavBar();\n\n    // TODO: Is this the best way?\n    this.navBar.shouldGoBack = function() {\n      _this.pop();\n    };\n  },\n\n  /**\n   * @return {array} the array of controllers on the stack.\n   */\n  getControllers: function() {\n    return this.controllers;\n  },\n\n  /**\n   * @return {object} the controller at the top of the stack.\n   */\n  getTopController: function() {\n    return this.controllers[this.controllers.length-1];\n  },\n\n  /**\n   * Push a new controller onto the navigation stack. The new controller\n   * will automatically become the new visible view.\n   *\n   * @param {object} controller the controller to push on the stack.\n   */\n  push: function(controller) {\n    var last = this.controllers[this.controllers.length - 1];\n\n    this.controllers.push(controller);\n\n    // Indicate we are switching controllers\n    var shouldSwitch = this.switchingController && this.switchingController(controller) || true;\n\n    // Return if navigation cancelled\n    if(shouldSwitch === false)\n      return;\n\n    // Actually switch the active controllers\n    if(last) {\n      last.isVisible = false;\n      last.visibilityChanged && last.visibilityChanged('push');\n    }\n\n    // Grab the top controller on the stack\n    var next = this.controllers[this.controllers.length - 1];\n\n    next.isVisible = true;\n    // Trigger visibility change, but send 'first' if this is the first page\n    next.visibilityChanged && next.visibilityChanged(last ? 'push' : 'first');\n\n    this._updateNavBar();\n\n    return controller;\n  },\n\n  /**\n   * Pop the top controller off the stack, and show the last one. This is the\n   * \"back\" operation.\n   *\n   * @return {object} the last popped controller\n   */\n  pop: function() {\n    var next, last;\n\n    // Make sure we keep one on the stack at all times\n    if(this.controllers.length < 2) {\n      return;\n    }\n\n    // Grab the controller behind the top one on the stack\n    last = this.controllers.pop();\n    if(last) {\n      last.isVisible = false;\n      last.visibilityChanged && last.visibilityChanged('pop');\n    }\n    \n    // Remove the old one\n    //last && last.detach();\n\n    next = this.controllers[this.controllers.length - 1];\n\n    // TODO: No DOM stuff here\n    //this.content.el.appendChild(next.el);\n    next.isVisible = true;\n    next.visibilityChanged && next.visibilityChanged('pop');\n\n    // Switch to it (TODO: Animate or such things here)\n\n    this._updateNavBar();\n\n    return last;\n  },\n\n  /**\n   * Show the NavBar (if any)\n   */\n  showNavBar: function() {\n    if(this.navBar) {\n      this.navBar.show();\n    }\n  },\n\n  /**\n   * Hide the NavBar (if any)\n   */\n  hideNavBar: function() {\n    if(this.navBar) {\n      this.navBar.hide();\n    }\n  },\n\n  // Update the nav bar after a push or pop\n  _updateNavBar: function() {\n    if(!this.getTopController() || !this.navBar) {\n      return;\n    }\n\n    this.navBar.setTitle(this.getTopController().title);\n\n    if(this.controllers.length > 1) {\n      this.navBar.showBackButton(true);\n    } else {\n      this.navBar.showBackButton(false);\n    }\n  }\n});\n\n})(window.ionic);\n\n(function(ionic) {\n'use strict';\n\n  /**\n   * The SideMenuController is a controller with a left and/or right menu that\n   * can be slid out and toggled. Seen on many an app.\n   *\n   * The right or left menu can be disabled or not used at all, if desired.\n   */\n  ionic.controllers.SideMenuController = ionic.controllers.ViewController.inherit({\n    initialize: function(options) {\n      var self = this;\n\n      this.left = options.left;\n      this.right = options.right;\n      this.content = options.content;\n      this.dragThresholdX = options.dragThresholdX || 10;\n\n      this._rightShowing = false;\n      this._leftShowing = false;\n      this._isDragging = false;\n\n      if(this.content) {\n        this.content.onDrag = function(e) {\n          self._handleDrag(e);\n        };\n\n        this.content.onEndDrag =function(e) {\n          self._endDrag(e);\n        };\n      }\n    },\n    /**\n     * Set the content view controller if not passed in the constructor options.\n     *\n     * @param {object} content\n     */\n    setContent: function(content) {\n      var self = this;\n\n      this.content = content;\n\n      this.content.onDrag = function(e) {\n        self._handleDrag(e);\n      };\n\n      this.content.endDrag = function(e) {\n        self._endDrag(e);\n      };\n    },\n\n    isOpenLeft: function() {\n      return this.getOpenAmount() > 0;\n    },\n\n    isOpenRight: function() {\n      return this.getOpenAmount() < 0;\n    },\n\n    /**\n     * Toggle the left menu to open 100%\n     */\n    toggleLeft: function(shouldOpen) {\n      var openAmount = this.getOpenAmount();\n      if (arguments.length === 0) {\n        shouldOpen = openAmount <= 0;\n      }\n      this.content.enableAnimation();\n      if(!shouldOpen) {\n        this.openPercentage(0);\n      } else {\n        this.openPercentage(100);\n      }\n    },\n\n    /**\n     * Toggle the right menu to open 100%\n     */\n    toggleRight: function(shouldOpen) {\n      var openAmount = this.getOpenAmount();\n      if (arguments.length === 0) {\n        shouldOpen = openAmount >= 0;\n      }\n      this.content.enableAnimation();\n      if(!shouldOpen) {\n        this.openPercentage(0);\n      } else {\n        this.openPercentage(-100);\n      }\n    },\n\n    /**\n     * Close all menus.\n     */\n    close: function() {\n      this.openPercentage(0);\n    },\n\n    /**\n     * @return {float} The amount the side menu is open, either positive or negative for left (positive), or right (negative)\n     */\n    getOpenAmount: function() {\n      return this.content && this.content.getTranslateX() || 0;\n    },\n\n    /**\n     * @return {float} The ratio of open amount over menu width. For example, a\n     * menu of width 100 open 50 pixels would be open 50% or a ratio of 0.5. Value is negative\n     * for right menu.\n     */\n    getOpenRatio: function() {\n      var amount = this.getOpenAmount();\n      if(amount >= 0) {\n        return amount / this.left.width;\n      }\n      return amount / this.right.width;\n    },\n\n    isOpen: function() {\n      return this.getOpenRatio() == 1;\n    },\n\n    /**\n     * @return {float} The percentage of open amount over menu width. For example, a\n     * menu of width 100 open 50 pixels would be open 50%. Value is negative\n     * for right menu.\n     */\n    getOpenPercentage: function() {\n      return this.getOpenRatio() * 100;\n    },\n\n    /**\n     * Open the menu with a given percentage amount.\n     * @param {float} percentage The percentage (positive or negative for left/right) to open the menu.\n     */\n    openPercentage: function(percentage) {\n      var p = percentage / 100;\n\n      if(this.left && percentage >= 0) {\n        this.openAmount(this.left.width * p);\n      } else if(this.right && percentage < 0) {\n        var maxRight = this.right.width;\n        this.openAmount(this.right.width * p);\n      }\n    },\n\n    /**\n     * Open the menu the given pixel amount.\n     * @param {float} amount the pixel amount to open the menu. Positive value for left menu,\n     * negative value for right menu (only one menu will be visible at a time).\n     */\n    openAmount: function(amount) {\n      var maxLeft = this.left && this.left.width || 0;\n      var maxRight = this.right && this.right.width || 0;\n\n      // Check if we can move to that side, depending if the left/right panel is enabled\n      if(!(this.left && this.left.isEnabled) && amount > 0) {\n        this.content.setTranslateX(0);\n        return;\n      }\n\n      if(!(this.right && this.right.isEnabled) && amount < 0) {\n        this.content.setTranslateX(0);\n        return;\n      }\n\n      if(this._leftShowing && amount > maxLeft) {\n        this.content.setTranslateX(maxLeft);\n        return;\n      }\n\n      if(this._rightShowing && amount < -maxRight) {\n        this.content.setTranslateX(-maxRight);\n        return;\n      }\n\n      this.content.setTranslateX(amount);\n\n      if(amount >= 0) {\n        this._leftShowing = true;\n        this._rightShowing = false;\n\n        if(amount > 0) {\n          // Push the z-index of the right menu down\n          this.right && this.right.pushDown && this.right.pushDown();\n          // Bring the z-index of the left menu up\n          this.left && this.left.bringUp && this.left.bringUp();\n        }\n      } else {\n        this._rightShowing = true;\n        this._leftShowing = false;\n\n        // Bring the z-index of the right menu up\n        this.right && this.right.bringUp && this.right.bringUp();\n        // Push the z-index of the left menu down\n        this.left && this.left.pushDown && this.left.pushDown();\n      }\n    },\n\n    /**\n     * Given an event object, find the final resting position of this side\n     * menu. For example, if the user \"throws\" the content to the right and\n     * releases the touch, the left menu should snap open (animated, of course).\n     *\n     * @param {Event} e the gesture event to use for snapping\n     */\n    snapToRest: function(e) {\n      // We want to animate at the end of this\n      this.content.enableAnimation();\n      this._isDragging = false;\n\n      // Check how much the panel is open after the drag, and\n      // what the drag velocity is\n      var ratio = this.getOpenRatio();\n\n      if(ratio === 0) {\n        // Just to be safe\n        this.openPercentage(0);\n        return;\n      }\n\n      var velocityThreshold = 0.3;\n      var velocityX = e.gesture.velocityX;\n      var direction = e.gesture.direction;\n\n      // Less than half, going left\n      //if(ratio > 0 && ratio < 0.5 && direction == 'left' && velocityX < velocityThreshold) {\n      //this.openPercentage(0);\n      //}\n\n      // Going right, less than half, too slow (snap back)\n      if(ratio > 0 && ratio < 0.5 && direction == 'right' && velocityX < velocityThreshold) {\n        this.openPercentage(0);\n      }\n\n      // Going left, more than half, too slow (snap back)\n      else if(ratio > 0.5 && direction == 'left' && velocityX < velocityThreshold) {\n        this.openPercentage(100);\n      }\n\n      // Going left, less than half, too slow (snap back)\n      else if(ratio < 0 && ratio > -0.5 && direction == 'left' && velocityX < velocityThreshold) {\n        this.openPercentage(0);\n      }\n\n      // Going right, more than half, too slow (snap back)\n      else if(ratio < 0.5 && direction == 'right' && velocityX < velocityThreshold) {\n        this.openPercentage(-100);\n      }\n\n      // Going right, more than half, or quickly (snap open)\n      else if(direction == 'right' && ratio >= 0 && (ratio >= 0.5 || velocityX > velocityThreshold)) {\n        this.openPercentage(100);\n      }\n\n      // Going left, more than half, or quickly (span open)\n      else if(direction == 'left' && ratio <= 0 && (ratio <= -0.5 || velocityX > velocityThreshold)) {\n        this.openPercentage(-100);\n      }\n\n      // Snap back for safety\n      else {\n        this.openPercentage(0);\n      }\n    },\n\n    // End a drag with the given event\n    _endDrag: function(e) {\n      if(this._isDragging) {\n        this.snapToRest(e);\n      }\n      this._startX = null;\n      this._lastX = null;\n      this._offsetX = null;\n    },\n\n    // Handle a drag event\n    _handleDrag: function(e) {\n      // If we don't have start coords, grab and store them\n      if(!this._startX) {\n        this._startX = e.gesture.touches[0].pageX;\n        this._lastX = this._startX;\n      } else {\n        // Grab the current tap coords\n        this._lastX = e.gesture.touches[0].pageX;\n      }\n\n      // Calculate difference from the tap points\n      if(!this._isDragging && Math.abs(this._lastX - this._startX) > this.dragThresholdX) {\n        // if the difference is greater than threshold, start dragging using the current\n        // point as the starting point\n        this._startX = this._lastX;\n\n        this._isDragging = true;\n        // Initialize dragging\n        this.content.disableAnimation();\n        this._offsetX = this.getOpenAmount();\n      }\n\n      if(this._isDragging) {\n        this.openAmount(this._offsetX + (this._lastX - this._startX));\n      }\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n/**\n * The TabBarController handles a set of view controllers powered by a tab strip\n * at the bottom (or possibly top) of a screen.\n *\n * The API here is somewhat modelled off of UITabController in the sense that the\n * controllers actually define what the tab will look like (title, icon, etc.).\n *\n * Tabs shouldn't be interacted with through your own code. Instead, use the controller\n * methods which will power the tab bar.\n */\nionic.controllers.TabBarController = ionic.controllers.ViewController.inherit({\n  initialize: function(options) {\n    this.tabBar = options.tabBar;\n\n    this._bindEvents();\n\n    this.controllers = [];\n\n    var controllers = options.controllers || [];\n\n    for(var i = 0; i < controllers.length; i++) {\n      this.addController(controllers[i]);\n    }\n\n    // Bind or set our tabWillChange callback\n    this.controllerWillChange = options.controllerWillChange || function(controller) {};\n    this.controllerChanged = options.controllerChanged || function(controller) {};\n\n    // Try to select the first controller if we have one\n    this.setSelectedController(0);\n  },\n  // Start listening for events on our tab bar\n  _bindEvents: function() {\n    var _this = this;\n\n    this.tabBar.tryTabSelect = function(index) {\n      _this.setSelectedController(index);\n    };\n  },\n\n\n  selectController: function(index) {\n    var shouldChange = true;\n\n    // Check if we should switch to this tab. This lets the app\n    // cancel tab switches if the context isn't right, for example.\n    if(this.controllerWillChange) {\n      if(this.controllerWillChange(this.controllers[index], index) === false) {\n        shouldChange = false;\n      }\n    }\n\n    if(shouldChange) {\n      this.setSelectedController(index);\n    }\n  },\n\n  // Force the selection of a controller at the given index\n  setSelectedController: function(index) {\n    if(index >= this.controllers.length) {\n      return;\n    }\n    var lastController = this.selectedController;\n    var lastIndex = this.selectedIndex;\n\n    this.selectedController = this.controllers[index];\n    this.selectedIndex = index;\n\n    this._showController(index);\n    this.tabBar.setSelectedItem(index);\n\n    this.controllerChanged && this.controllerChanged(lastController, lastIndex, this.selectedController, this.selectedIndex);\n  },\n\n  _showController: function(index) {\n    var c;\n\n    for(var i = 0, j = this.controllers.length; i < j; i ++) {\n      c = this.controllers[i];\n      //c.detach && c.detach();\n      c.isVisible = false;\n      c.visibilityChanged && c.visibilityChanged();\n    }\n\n    c = this.controllers[index];\n    //c.attach && c.attach();\n    c.isVisible = true;\n    c.visibilityChanged && c.visibilityChanged();\n  },\n\n  _clearSelected: function() {\n    this.selectedController = null;\n    this.selectedIndex = -1;\n  },\n\n  // Return the tab at the given index\n  getController: function(index) {\n    return this.controllers[index];\n  },\n\n  // Return the current tab list\n  getControllers: function() {\n    return this.controllers;\n  },\n\n  // Get the currently selected controller\n  getSelectedController: function() {\n    return this.selectedController;\n  },\n\n  // Get the index of the currently selected controller\n  getSelectedControllerIndex: function() {\n    return this.selectedIndex;\n  },\n\n  // Add a tab\n  addController: function(controller) {\n    this.controllers.push(controller);\n\n    this.tabBar.addItem({\n      title: controller.title,\n      icon: controller.icon,\n      badge: controller.badge\n    });\n\n    // If we don't have a selected controller yet, select the first one.\n    if(!this.selectedController) {\n      this.setSelectedController(0);\n    }\n  },\n\n  // Set the tabs and select the first\n  setControllers: function(controllers) {\n    this.controllers = controllers;\n    this._clearSelected();\n    this.selectController(0);\n  },\n});\n\n})(window.ionic);\n\n})();\n/*!\n * ionic.bundle.js is a concatenation of:\n * ionic.js, angular.js, angular-animate.js,\n * angular-ui-router.js, and ionic-angular.js\n */\n\n/**\n * @license AngularJS v1.2.12\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, document, undefined) {'use strict';\n\n/**\n * @description\n *\n * This object provides a utility for producing rich Error messages within\n * Angular. It can be called as follows:\n *\n * var exampleMinErr = minErr('example');\n * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);\n *\n * The above creates an instance of minErr in the example namespace. The\n * resulting error will have a namespaced error code of example.one.  The\n * resulting error will replace {0} with the value of foo, and {1} with the\n * value of bar. The object is not restricted in the number of arguments it can\n * take.\n *\n * If fewer arguments are specified than necessary for interpolation, the extra\n * interpolation markers will be preserved in the final string.\n *\n * Since data will be parsed statically during a build step, some restrictions\n * are applied with respect to how minErr instances are created and called.\n * Instances should have names of the form namespaceMinErr for a minErr created\n * using minErr('namespace') . Error codes, namespaces and template strings\n * should all be static strings, not variables or general expressions.\n *\n * @param {string} module The namespace to use for the new minErr instance.\n * @returns {function(string, string, ...): Error} instance\n */\n\nfunction minErr(module) {\n  return function () {\n    var code = arguments[0],\n      prefix = '[' + (module ? module + ':' : '') + code + '] ',\n      template = arguments[1],\n      templateArgs = arguments,\n      stringify = function (obj) {\n        if (typeof obj === 'function') {\n          return obj.toString().replace(/ \\{[\\s\\S]*$/, '');\n        } else if (typeof obj === 'undefined') {\n          return 'undefined';\n        } else if (typeof obj !== 'string') {\n          return JSON.stringify(obj);\n        }\n        return obj;\n      },\n      message, i;\n\n    message = prefix + template.replace(/\\{\\d+\\}/g, function (match) {\n      var index = +match.slice(1, -1), arg;\n\n      if (index + 2 < templateArgs.length) {\n        arg = templateArgs[index + 2];\n        if (typeof arg === 'function') {\n          return arg.toString().replace(/ ?\\{[\\s\\S]*$/, '');\n        } else if (typeof arg === 'undefined') {\n          return 'undefined';\n        } else if (typeof arg !== 'string') {\n          return toJson(arg);\n        }\n        return arg;\n      }\n      return match;\n    });\n\n    message = message + '\\nhttp://errors.angularjs.org/1.2.12/' +\n      (module ? module + '/' : '') + code;\n    for (i = 2; i < arguments.length; i++) {\n      message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +\n        encodeURIComponent(stringify(arguments[i]));\n    }\n\n    return new Error(message);\n  };\n}\n\n/* We need to tell jshint what variables are being exported */\n/* global\n    -angular,\n    -msie,\n    -jqLite,\n    -jQuery,\n    -slice,\n    -push,\n    -toString,\n    -ngMinErr,\n    -_angular,\n    -angularModule,\n    -nodeName_,\n    -uid,\n\n    -lowercase,\n    -uppercase,\n    -manualLowercase,\n    -manualUppercase,\n    -nodeName_,\n    -isArrayLike,\n    -forEach,\n    -sortedKeys,\n    -forEachSorted,\n    -reverseParams,\n    -nextUid,\n    -setHashKey,\n    -extend,\n    -int,\n    -inherit,\n    -noop,\n    -identity,\n    -valueFn,\n    -isUndefined,\n    -isDefined,\n    -isObject,\n    -isString,\n    -isNumber,\n    -isDate,\n    -isArray,\n    -isFunction,\n    -isRegExp,\n    -isWindow,\n    -isScope,\n    -isFile,\n    -isBoolean,\n    -trim,\n    -isElement,\n    -makeMap,\n    -map,\n    -size,\n    -includes,\n    -indexOf,\n    -arrayRemove,\n    -isLeafNode,\n    -copy,\n    -shallowCopy,\n    -equals,\n    -csp,\n    -concat,\n    -sliceArgs,\n    -bind,\n    -toJsonReplacer,\n    -toJson,\n    -fromJson,\n    -toBoolean,\n    -startingTag,\n    -tryDecodeURIComponent,\n    -parseKeyValue,\n    -toKeyValue,\n    -encodeUriSegment,\n    -encodeUriQuery,\n    -angularInit,\n    -bootstrap,\n    -snake_case,\n    -bindJQuery,\n    -assertArg,\n    -assertArgFn,\n    -assertNotHasOwnProperty,\n    -getter,\n    -getBlockElements,\n\n*/\n\n////////////////////////////////////\n\n/**\n * @ngdoc function\n * @name angular.lowercase\n * @function\n *\n * @description Converts the specified string to lowercase.\n * @param {string} string String to be converted to lowercase.\n * @returns {string} Lowercased string.\n */\nvar lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};\n\n\n/**\n * @ngdoc function\n * @name angular.uppercase\n * @function\n *\n * @description Converts the specified string to uppercase.\n * @param {string} string String to be converted to uppercase.\n * @returns {string} Uppercased string.\n */\nvar uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};\n\n\nvar manualLowercase = function(s) {\n  /* jshint bitwise: false */\n  return isString(s)\n      ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})\n      : s;\n};\nvar manualUppercase = function(s) {\n  /* jshint bitwise: false */\n  return isString(s)\n      ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})\n      : s;\n};\n\n\n// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish\n// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods\n// with correct but slower alternatives.\nif ('i' !== 'I'.toLowerCase()) {\n  lowercase = manualLowercase;\n  uppercase = manualUppercase;\n}\n\n\nvar /** holds major version number for IE or NaN for real browsers */\n    msie,\n    jqLite,           // delay binding since jQuery could be loaded after us.\n    jQuery,           // delay binding\n    slice             = [].slice,\n    push              = [].push,\n    toString          = Object.prototype.toString,\n    ngMinErr          = minErr('ng'),\n\n\n    _angular          = window.angular,\n    /** @name angular */\n    angular           = window.angular || (window.angular = {}),\n    angularModule,\n    nodeName_,\n    uid               = ['0', '0', '0'];\n\n/**\n * IE 11 changed the format of the UserAgent string.\n * See http://msdn.microsoft.com/en-us/library/ms537503.aspx\n */\nmsie = int((/msie (\\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);\nif (isNaN(msie)) {\n  msie = int((/trident\\/.*; rv:(\\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);\n}\n\n\n/**\n * @private\n * @param {*} obj\n * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,\n *                   String ...)\n */\nfunction isArrayLike(obj) {\n  if (obj == null || isWindow(obj)) {\n    return false;\n  }\n\n  var length = obj.length;\n\n  if (obj.nodeType === 1 && length) {\n    return true;\n  }\n\n  return isString(obj) || isArray(obj) || length === 0 ||\n         typeof length === 'number' && length > 0 && (length - 1) in obj;\n}\n\n/**\n * @ngdoc function\n * @name angular.forEach\n * @function\n *\n * @description\n * Invokes the `iterator` function once for each item in `obj` collection, which can be either an\n * object or an array. The `iterator` function is invoked with `iterator(value, key)`, where `value`\n * is the value of an object property or an array element and `key` is the object property key or\n * array element index. Specifying a `context` for the function is optional.\n *\n * It is worth noting that `.forEach` does not iterate over inherited properties because it filters\n * using the `hasOwnProperty` method.\n *\n   <pre>\n     var values = {name: 'misko', gender: 'male'};\n     var log = [];\n     angular.forEach(values, function(value, key){\n       this.push(key + ': ' + value);\n     }, log);\n     expect(log).toEqual(['name: misko', 'gender: male']);\n   </pre>\n *\n * @param {Object|Array} obj Object to iterate over.\n * @param {Function} iterator Iterator function.\n * @param {Object=} context Object to become context (`this`) for the iterator function.\n * @returns {Object|Array} Reference to `obj`.\n */\nfunction forEach(obj, iterator, context) {\n  var key;\n  if (obj) {\n    if (isFunction(obj)){\n      for (key in obj) {\n        // Need to check if hasOwnProperty exists,\n        // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function\n        if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {\n          iterator.call(context, obj[key], key);\n        }\n      }\n    } else if (obj.forEach && obj.forEach !== forEach) {\n      obj.forEach(iterator, context);\n    } else if (isArrayLike(obj)) {\n      for (key = 0; key < obj.length; key++)\n        iterator.call(context, obj[key], key);\n    } else {\n      for (key in obj) {\n        if (obj.hasOwnProperty(key)) {\n          iterator.call(context, obj[key], key);\n        }\n      }\n    }\n  }\n  return obj;\n}\n\nfunction sortedKeys(obj) {\n  var keys = [];\n  for (var key in obj) {\n    if (obj.hasOwnProperty(key)) {\n      keys.push(key);\n    }\n  }\n  return keys.sort();\n}\n\nfunction forEachSorted(obj, iterator, context) {\n  var keys = sortedKeys(obj);\n  for ( var i = 0; i < keys.length; i++) {\n    iterator.call(context, obj[keys[i]], keys[i]);\n  }\n  return keys;\n}\n\n\n/**\n * when using forEach the params are value, key, but it is often useful to have key, value.\n * @param {function(string, *)} iteratorFn\n * @returns {function(*, string)}\n */\nfunction reverseParams(iteratorFn) {\n  return function(value, key) { iteratorFn(key, value); };\n}\n\n/**\n * A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric\n * characters such as '012ABC'. The reason why we are not using simply a number counter is that\n * the number string gets longer over time, and it can also overflow, where as the nextId\n * will grow much slower, it is a string, and it will never overflow.\n *\n * @returns an unique alpha-numeric string\n */\nfunction nextUid() {\n  var index = uid.length;\n  var digit;\n\n  while(index) {\n    index--;\n    digit = uid[index].charCodeAt(0);\n    if (digit == 57 /*'9'*/) {\n      uid[index] = 'A';\n      return uid.join('');\n    }\n    if (digit == 90  /*'Z'*/) {\n      uid[index] = '0';\n    } else {\n      uid[index] = String.fromCharCode(digit + 1);\n      return uid.join('');\n    }\n  }\n  uid.unshift('0');\n  return uid.join('');\n}\n\n\n/**\n * Set or clear the hashkey for an object.\n * @param obj object\n * @param h the hashkey (!truthy to delete the hashkey)\n */\nfunction setHashKey(obj, h) {\n  if (h) {\n    obj.$$hashKey = h;\n  }\n  else {\n    delete obj.$$hashKey;\n  }\n}\n\n/**\n * @ngdoc function\n * @name angular.extend\n * @function\n *\n * @description\n * Extends the destination object `dst` by copying all of the properties from the `src` object(s)\n * to `dst`. You can specify multiple `src` objects.\n *\n * @param {Object} dst Destination object.\n * @param {...Object} src Source object(s).\n * @returns {Object} Reference to `dst`.\n */\nfunction extend(dst) {\n  var h = dst.$$hashKey;\n  forEach(arguments, function(obj){\n    if (obj !== dst) {\n      forEach(obj, function(value, key){\n        dst[key] = value;\n      });\n    }\n  });\n\n  setHashKey(dst,h);\n  return dst;\n}\n\nfunction int(str) {\n  return parseInt(str, 10);\n}\n\n\nfunction inherit(parent, extra) {\n  return extend(new (extend(function() {}, {prototype:parent}))(), extra);\n}\n\n/**\n * @ngdoc function\n * @name angular.noop\n * @function\n *\n * @description\n * A function that performs no operations. This function can be useful when writing code in the\n * functional style.\n   <pre>\n     function foo(callback) {\n       var result = calculateResult();\n       (callback || angular.noop)(result);\n     }\n   </pre>\n */\nfunction noop() {}\nnoop.$inject = [];\n\n\n/**\n * @ngdoc function\n * @name angular.identity\n * @function\n *\n * @description\n * A function that returns its first argument. This function is useful when writing code in the\n * functional style.\n *\n   <pre>\n     function transformer(transformationFn, value) {\n       return (transformationFn || angular.identity)(value);\n     };\n   </pre>\n */\nfunction identity($) {return $;}\nidentity.$inject = [];\n\n\nfunction valueFn(value) {return function() {return value;};}\n\n/**\n * @ngdoc function\n * @name angular.isUndefined\n * @function\n *\n * @description\n * Determines if a reference is undefined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is undefined.\n */\nfunction isUndefined(value){return typeof value === 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDefined\n * @function\n *\n * @description\n * Determines if a reference is defined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is defined.\n */\nfunction isDefined(value){return typeof value !== 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isObject\n * @function\n *\n * @description\n * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not\n * considered to be objects.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Object` but not `null`.\n */\nfunction isObject(value){return value != null && typeof value === 'object';}\n\n\n/**\n * @ngdoc function\n * @name angular.isString\n * @function\n *\n * @description\n * Determines if a reference is a `String`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `String`.\n */\nfunction isString(value){return typeof value === 'string';}\n\n\n/**\n * @ngdoc function\n * @name angular.isNumber\n * @function\n *\n * @description\n * Determines if a reference is a `Number`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Number`.\n */\nfunction isNumber(value){return typeof value === 'number';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDate\n * @function\n *\n * @description\n * Determines if a value is a date.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Date`.\n */\nfunction isDate(value){\n  return toString.call(value) === '[object Date]';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isArray\n * @function\n *\n * @description\n * Determines if a reference is an `Array`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Array`.\n */\nfunction isArray(value) {\n  return toString.call(value) === '[object Array]';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isFunction\n * @function\n *\n * @description\n * Determines if a reference is a `Function`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Function`.\n */\nfunction isFunction(value){return typeof value === 'function';}\n\n\n/**\n * Determines if a value is a regular expression object.\n *\n * @private\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `RegExp`.\n */\nfunction isRegExp(value) {\n  return toString.call(value) === '[object RegExp]';\n}\n\n\n/**\n * Checks if `obj` is a window object.\n *\n * @private\n * @param {*} obj Object to check\n * @returns {boolean} True if `obj` is a window obj.\n */\nfunction isWindow(obj) {\n  return obj && obj.document && obj.location && obj.alert && obj.setInterval;\n}\n\n\nfunction isScope(obj) {\n  return obj && obj.$evalAsync && obj.$watch;\n}\n\n\nfunction isFile(obj) {\n  return toString.call(obj) === '[object File]';\n}\n\n\nfunction isBoolean(value) {\n  return typeof value === 'boolean';\n}\n\n\nvar trim = (function() {\n  // native trim is way faster: http://jsperf.com/angular-trim-test\n  // but IE doesn't have it... :-(\n  // TODO: we should move this into IE/ES5 polyfill\n  if (!String.prototype.trim) {\n    return function(value) {\n      return isString(value) ? value.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '') : value;\n    };\n  }\n  return function(value) {\n    return isString(value) ? value.trim() : value;\n  };\n})();\n\n\n/**\n * @ngdoc function\n * @name angular.isElement\n * @function\n *\n * @description\n * Determines if a reference is a DOM element (or wrapped jQuery element).\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).\n */\nfunction isElement(node) {\n  return !!(node &&\n    (node.nodeName  // we are a direct element\n    || (node.on && node.find)));  // we have an on and find method part of jQuery API\n}\n\n/**\n * @param str 'key1,key2,...'\n * @returns {object} in the form of {key1:true, key2:true, ...}\n */\nfunction makeMap(str){\n  var obj = {}, items = str.split(\",\"), i;\n  for ( i = 0; i < items.length; i++ )\n    obj[ items[i] ] = true;\n  return obj;\n}\n\n\nif (msie < 9) {\n  nodeName_ = function(element) {\n    element = element.nodeName ? element : element[0];\n    return (element.scopeName && element.scopeName != 'HTML')\n      ? uppercase(element.scopeName + ':' + element.nodeName) : element.nodeName;\n  };\n} else {\n  nodeName_ = function(element) {\n    return element.nodeName ? element.nodeName : element[0].nodeName;\n  };\n}\n\n\nfunction map(obj, iterator, context) {\n  var results = [];\n  forEach(obj, function(value, index, list) {\n    results.push(iterator.call(context, value, index, list));\n  });\n  return results;\n}\n\n\n/**\n * @description\n * Determines the number of elements in an array, the number of properties an object has, or\n * the length of a string.\n *\n * Note: This function is used to augment the Object type in Angular expressions. See\n * {@link angular.Object} for more information about Angular arrays.\n *\n * @param {Object|Array|string} obj Object, array, or string to inspect.\n * @param {boolean} [ownPropsOnly=false] Count only \"own\" properties in an object\n * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.\n */\nfunction size(obj, ownPropsOnly) {\n  var count = 0, key;\n\n  if (isArray(obj) || isString(obj)) {\n    return obj.length;\n  } else if (isObject(obj)){\n    for (key in obj)\n      if (!ownPropsOnly || obj.hasOwnProperty(key))\n        count++;\n  }\n\n  return count;\n}\n\n\nfunction includes(array, obj) {\n  return indexOf(array, obj) != -1;\n}\n\nfunction indexOf(array, obj) {\n  if (array.indexOf) return array.indexOf(obj);\n\n  for (var i = 0; i < array.length; i++) {\n    if (obj === array[i]) return i;\n  }\n  return -1;\n}\n\nfunction arrayRemove(array, value) {\n  var index = indexOf(array, value);\n  if (index >=0)\n    array.splice(index, 1);\n  return value;\n}\n\nfunction isLeafNode (node) {\n  if (node) {\n    switch (node.nodeName) {\n    case \"OPTION\":\n    case \"PRE\":\n    case \"TITLE\":\n      return true;\n    }\n  }\n  return false;\n}\n\n/**\n * @ngdoc function\n * @name angular.copy\n * @function\n *\n * @description\n * Creates a deep copy of `source`, which should be an object or an array.\n *\n * * If no destination is supplied, a copy of the object or array is created.\n * * If a destination is provided, all of its elements (for array) or properties (for objects)\n *   are deleted and then all elements/properties from the source are copied to it.\n * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.\n * * If `source` is identical to 'destination' an exception will be thrown.\n *\n * @param {*} source The source that will be used to make a copy.\n *                   Can be any type, including primitives, `null`, and `undefined`.\n * @param {(Object|Array)=} destination Destination into which the source is copied. If\n *     provided, must be of the same type as `source`.\n * @returns {*} The copy or updated `destination`, if `destination` was specified.\n *\n * @example\n <doc:example>\n <doc:source>\n <div ng-controller=\"Controller\">\n <form novalidate class=\"simple-form\">\n Name: <input type=\"text\" ng-model=\"user.name\" /><br />\n E-mail: <input type=\"email\" ng-model=\"user.email\" /><br />\n Gender: <input type=\"radio\" ng-model=\"user.gender\" value=\"male\" />male\n <input type=\"radio\" ng-model=\"user.gender\" value=\"female\" />female<br />\n <button ng-click=\"reset()\">RESET</button>\n <button ng-click=\"update(user)\">SAVE</button>\n </form>\n <pre>form = {{user | json}}</pre>\n <pre>master = {{master | json}}</pre>\n </div>\n\n <script>\n function Controller($scope) {\n    $scope.master= {};\n\n    $scope.update = function(user) {\n      // Example with 1 argument\n      $scope.master= angular.copy(user);\n    };\n\n    $scope.reset = function() {\n      // Example with 2 arguments\n      angular.copy($scope.master, $scope.user);\n    };\n\n    $scope.reset();\n  }\n </script>\n </doc:source>\n </doc:example>\n */\nfunction copy(source, destination){\n  if (isWindow(source) || isScope(source)) {\n    throw ngMinErr('cpws',\n      \"Can't copy! Making copies of Window or Scope instances is not supported.\");\n  }\n\n  if (!destination) {\n    destination = source;\n    if (source) {\n      if (isArray(source)) {\n        destination = copy(source, []);\n      } else if (isDate(source)) {\n        destination = new Date(source.getTime());\n      } else if (isRegExp(source)) {\n        destination = new RegExp(source.source);\n      } else if (isObject(source)) {\n        destination = copy(source, {});\n      }\n    }\n  } else {\n    if (source === destination) throw ngMinErr('cpi',\n      \"Can't copy! Source and destination are identical.\");\n    if (isArray(source)) {\n      destination.length = 0;\n      for ( var i = 0; i < source.length; i++) {\n        destination.push(copy(source[i]));\n      }\n    } else {\n      var h = destination.$$hashKey;\n      forEach(destination, function(value, key){\n        delete destination[key];\n      });\n      for ( var key in source) {\n        destination[key] = copy(source[key]);\n      }\n      setHashKey(destination,h);\n    }\n  }\n  return destination;\n}\n\n/**\n * Create a shallow copy of an object\n */\nfunction shallowCopy(src, dst) {\n  dst = dst || {};\n\n  for(var key in src) {\n    // shallowCopy is only ever called by $compile nodeLinkFn, which has control over src\n    // so we don't need to worry about using our custom hasOwnProperty here\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/**\n * @ngdoc function\n * @name angular.equals\n * @function\n *\n * @description\n * Determines if two objects or two values are equivalent. Supports value types, regular\n * expressions, arrays and objects.\n *\n * Two objects or values are considered equivalent if at least one of the following is true:\n *\n * * Both objects or values pass `===` comparison.\n * * Both objects or values are of the same type and all of their properties are equal by\n *   comparing them with `angular.equals`.\n * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)\n * * Both values represent the same regular expression (In JavasScript,\n *   /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual\n *   representation matches).\n *\n * During a property comparison, properties of `function` type and properties with names\n * that begin with `$` are ignored.\n *\n * Scope and DOMWindow objects are being compared only by identify (`===`).\n *\n * @param {*} o1 Object or value to compare.\n * @param {*} o2 Object or value to compare.\n * @returns {boolean} True if arguments are equal.\n */\nfunction equals(o1, o2) {\n  if (o1 === o2) return true;\n  if (o1 === null || o2 === null) return false;\n  if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n  var t1 = typeof o1, t2 = typeof o2, length, key, keySet;\n  if (t1 == t2) {\n    if (t1 == 'object') {\n      if (isArray(o1)) {\n        if (!isArray(o2)) return false;\n        if ((length = o1.length) == o2.length) {\n          for(key=0; key<length; key++) {\n            if (!equals(o1[key], o2[key])) return false;\n          }\n          return true;\n        }\n      } else if (isDate(o1)) {\n        return isDate(o2) && o1.getTime() == o2.getTime();\n      } else if (isRegExp(o1) && isRegExp(o2)) {\n        return o1.toString() == o2.toString();\n      } else {\n        if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) || isArray(o2)) return false;\n        keySet = {};\n        for(key in o1) {\n          if (key.charAt(0) === '$' || isFunction(o1[key])) continue;\n          if (!equals(o1[key], o2[key])) return false;\n          keySet[key] = true;\n        }\n        for(key in o2) {\n          if (!keySet.hasOwnProperty(key) &&\n              key.charAt(0) !== '$' &&\n              o2[key] !== undefined &&\n              !isFunction(o2[key])) return false;\n        }\n        return true;\n      }\n    }\n  }\n  return false;\n}\n\n\nfunction csp() {\n  return (document.securityPolicy && document.securityPolicy.isActive) ||\n      (document.querySelector &&\n      !!(document.querySelector('[ng-csp]') || document.querySelector('[data-ng-csp]')));\n}\n\n\nfunction concat(array1, array2, index) {\n  return array1.concat(slice.call(array2, index));\n}\n\nfunction sliceArgs(args, startIndex) {\n  return slice.call(args, startIndex || 0);\n}\n\n\n/* jshint -W101 */\n/**\n * @ngdoc function\n * @name angular.bind\n * @function\n *\n * @description\n * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for\n * `fn`). You can supply optional `args` that are prebound to the function. This feature is also\n * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as\n * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).\n *\n * @param {Object} self Context which `fn` should be evaluated in.\n * @param {function()} fn Function to be bound.\n * @param {...*} args Optional arguments to be prebound to the `fn` function call.\n * @returns {function()} Function that wraps the `fn` with all the specified bindings.\n */\n/* jshint +W101 */\nfunction bind(self, fn) {\n  var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];\n  if (isFunction(fn) && !(fn instanceof RegExp)) {\n    return curryArgs.length\n      ? function() {\n          return arguments.length\n            ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))\n            : fn.apply(self, curryArgs);\n        }\n      : function() {\n          return arguments.length\n            ? fn.apply(self, arguments)\n            : fn.call(self);\n        };\n  } else {\n    // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)\n    return fn;\n  }\n}\n\n\nfunction toJsonReplacer(key, value) {\n  var val = value;\n\n  if (typeof key === 'string' && key.charAt(0) === '$') {\n    val = undefined;\n  } else if (isWindow(value)) {\n    val = '$WINDOW';\n  } else if (value &&  document === value) {\n    val = '$DOCUMENT';\n  } else if (isScope(value)) {\n    val = '$SCOPE';\n  }\n\n  return val;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.toJson\n * @function\n *\n * @description\n * Serializes input into a JSON-formatted string. Properties with leading $ characters will be\n * stripped since angular uses this notation internally.\n *\n * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.\n * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.\n * @returns {string|undefined} JSON-ified string representing `obj`.\n */\nfunction toJson(obj, pretty) {\n  if (typeof obj === 'undefined') return undefined;\n  return JSON.stringify(obj, toJsonReplacer, pretty ? '  ' : null);\n}\n\n\n/**\n * @ngdoc function\n * @name angular.fromJson\n * @function\n *\n * @description\n * Deserializes a JSON string.\n *\n * @param {string} json JSON string to deserialize.\n * @returns {Object|Array|Date|string|number} Deserialized thingy.\n */\nfunction fromJson(json) {\n  return isString(json)\n      ? JSON.parse(json)\n      : json;\n}\n\n\nfunction toBoolean(value) {\n  if (typeof value === 'function') {\n    value = true;\n  } else if (value && value.length !== 0) {\n    var v = lowercase(\"\" + value);\n    value = !(v == 'f' || v == '0' || v == 'false' || v == 'no' || v == 'n' || v == '[]');\n  } else {\n    value = false;\n  }\n  return value;\n}\n\n/**\n * @returns {string} Returns the string representation of the element.\n */\nfunction startingTag(element) {\n  element = jqLite(element).clone();\n  try {\n    // turns out IE does not let you set .html() on elements which\n    // are not allowed to have children. So we just ignore it.\n    element.empty();\n  } catch(e) {}\n  // As Per DOM Standards\n  var TEXT_NODE = 3;\n  var elemHtml = jqLite('<div>').append(element).html();\n  try {\n    return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :\n        elemHtml.\n          match(/^(<[^>]+>)/)[1].\n          replace(/^<([\\w\\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });\n  } catch(e) {\n    return lowercase(elemHtml);\n  }\n\n}\n\n\n/////////////////////////////////////////////////\n\n/**\n * Tries to decode the URI component without throwing an exception.\n *\n * @private\n * @param str value potential URI component to check.\n * @returns {boolean} True if `value` can be decoded\n * with the decodeURIComponent function.\n */\nfunction tryDecodeURIComponent(value) {\n  try {\n    return decodeURIComponent(value);\n  } catch(e) {\n    // Ignore any invalid uri component\n  }\n}\n\n\n/**\n * Parses an escaped url query string into key-value pairs.\n * @returns Object.<(string|boolean)>\n */\nfunction parseKeyValue(/**string*/keyValue) {\n  var obj = {}, key_value, key;\n  forEach((keyValue || \"\").split('&'), function(keyValue){\n    if ( keyValue ) {\n      key_value = keyValue.split('=');\n      key = tryDecodeURIComponent(key_value[0]);\n      if ( isDefined(key) ) {\n        var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;\n        if (!obj[key]) {\n          obj[key] = val;\n        } else if(isArray(obj[key])) {\n          obj[key].push(val);\n        } else {\n          obj[key] = [obj[key],val];\n        }\n      }\n    }\n  });\n  return obj;\n}\n\nfunction toKeyValue(obj) {\n  var parts = [];\n  forEach(obj, function(value, key) {\n    if (isArray(value)) {\n      forEach(value, function(arrayValue) {\n        parts.push(encodeUriQuery(key, true) +\n                   (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));\n      });\n    } else {\n    parts.push(encodeUriQuery(key, true) +\n               (value === true ? '' : '=' + encodeUriQuery(value, true)));\n    }\n  });\n  return parts.length ? parts.join('&') : '';\n}\n\n\n/**\n * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path\n * segments:\n *    segment       = *pchar\n *    pchar         = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n *    pct-encoded   = \"%\" HEXDIG HEXDIG\n *    unreserved    = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n *    sub-delims    = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n *                     / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriSegment(val) {\n  return encodeUriQuery(val, true).\n             replace(/%26/gi, '&').\n             replace(/%3D/gi, '=').\n             replace(/%2B/gi, '+');\n}\n\n\n/**\n * This method is intended for encoding *key* or *value* parts of query component. We need a custom\n * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be\n * encoded per http://tools.ietf.org/html/rfc3986:\n *    query       = *( pchar / \"/\" / \"?\" )\n *    pchar         = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n *    unreserved    = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n *    pct-encoded   = \"%\" HEXDIG HEXDIG\n *    sub-delims    = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n *                     / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriQuery(val, pctEncodeSpaces) {\n  return encodeURIComponent(val).\n             replace(/%40/gi, '@').\n             replace(/%3A/gi, ':').\n             replace(/%24/g, '$').\n             replace(/%2C/gi, ',').\n             replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n}\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngApp\n *\n * @element ANY\n * @param {angular.Module} ngApp an optional application\n *   {@link angular.module module} name to load.\n *\n * @description\n *\n * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive\n * designates the **root element** of the application and is typically placed near the root element\n * of the page - e.g. on the `<body>` or `<html>` tags.\n *\n * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`\n * found in the document will be used to define the root element to auto-bootstrap as an\n * application. To run multiple applications in an HTML document you must manually bootstrap them using\n * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.\n *\n * You can specify an **AngularJS module** to be used as the root module for the application.  This\n * module will be loaded into the {@link AUTO.$injector} when the application is bootstrapped and\n * should contain the application code needed or have dependencies on other modules that will\n * contain the code. See {@link angular.module} for more information.\n *\n * In the example below if the `ngApp` directive were not placed on the `html` element then the\n * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`\n * would not be resolved to `3`.\n *\n * `ngApp` is the easiest, and most common, way to bootstrap an application.\n *\n <example module=\"ngAppDemo\">\n   <file name=\"index.html\">\n   <div ng-controller=\"ngAppDemoController\">\n     I can add: {{a}} + {{b}} =  {{ a+b }}\n   </file>\n   <file name=\"script.js\">\n   angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {\n     $scope.a = 1;\n     $scope.b = 2;\n   });\n   </file>\n </example>\n *\n */\nfunction angularInit(element, bootstrap) {\n  var elements = [element],\n      appElement,\n      module,\n      names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],\n      NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/;\n\n  function append(element) {\n    element && elements.push(element);\n  }\n\n  forEach(names, function(name) {\n    names[name] = true;\n    append(document.getElementById(name));\n    name = name.replace(':', '\\\\:');\n    if (element.querySelectorAll) {\n      forEach(element.querySelectorAll('.' + name), append);\n      forEach(element.querySelectorAll('.' + name + '\\\\:'), append);\n      forEach(element.querySelectorAll('[' + name + ']'), append);\n    }\n  });\n\n  forEach(elements, function(element) {\n    if (!appElement) {\n      var className = ' ' + element.className + ' ';\n      var match = NG_APP_CLASS_REGEXP.exec(className);\n      if (match) {\n        appElement = element;\n        module = (match[2] || '').replace(/\\s+/g, ',');\n      } else {\n        forEach(element.attributes, function(attr) {\n          if (!appElement && names[attr.name]) {\n            appElement = element;\n            module = attr.value;\n          }\n        });\n      }\n    }\n  });\n  if (appElement) {\n    bootstrap(appElement, module ? [module] : []);\n  }\n}\n\n/**\n * @ngdoc function\n * @name angular.bootstrap\n * @description\n * Use this function to manually start up angular application.\n *\n * See: {@link guide/bootstrap Bootstrap}\n *\n * Note that ngScenario-based end-to-end tests cannot use this function to bootstrap manually.\n * They must use {@link api/ng.directive:ngApp ngApp}.\n *\n * @param {Element} element DOM element which is the root of angular application.\n * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.\n *     Each item in the array should be the name of a predefined module or a (DI annotated)\n *     function that will be invoked by the injector as a run block.\n *     See: {@link angular.module modules}\n * @returns {AUTO.$injector} Returns the newly created injector for this app.\n */\nfunction bootstrap(element, modules) {\n  var doBootstrap = function() {\n    element = jqLite(element);\n\n    if (element.injector()) {\n      var tag = (element[0] === document) ? 'document' : startingTag(element);\n      throw ngMinErr('btstrpd', \"App Already Bootstrapped with this Element '{0}'\", tag);\n    }\n\n    modules = modules || [];\n    modules.unshift(['$provide', function($provide) {\n      $provide.value('$rootElement', element);\n    }]);\n    modules.unshift('ng');\n    var injector = createInjector(modules);\n    injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector', '$animate',\n       function(scope, element, compile, injector, animate) {\n        scope.$apply(function() {\n          element.data('$injector', injector);\n          compile(element)(scope);\n        });\n      }]\n    );\n    return injector;\n  };\n\n  var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;\n\n  if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {\n    return doBootstrap();\n  }\n\n  window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');\n  angular.resumeBootstrap = function(extraModules) {\n    forEach(extraModules, function(module) {\n      modules.push(module);\n    });\n    doBootstrap();\n  };\n}\n\nvar SNAKE_CASE_REGEXP = /[A-Z]/g;\nfunction snake_case(name, separator){\n  separator = separator || '_';\n  return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {\n    return (pos ? separator : '') + letter.toLowerCase();\n  });\n}\n\nfunction bindJQuery() {\n  // bind to jQuery if present;\n  jQuery = window.jQuery;\n  // reset to jQuery or default to us.\n  if (jQuery) {\n    jqLite = jQuery;\n    extend(jQuery.fn, {\n      scope: JQLitePrototype.scope,\n      isolateScope: JQLitePrototype.isolateScope,\n      controller: JQLitePrototype.controller,\n      injector: JQLitePrototype.injector,\n      inheritedData: JQLitePrototype.inheritedData\n    });\n    // Method signature:\n    //     jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments)\n    jqLitePatchJQueryRemove('remove', true, true, false);\n    jqLitePatchJQueryRemove('empty', false, false, false);\n    jqLitePatchJQueryRemove('html', false, false, true);\n  } else {\n    jqLite = JQLite;\n  }\n  angular.element = jqLite;\n}\n\n/**\n * throw error if the argument is falsy.\n */\nfunction assertArg(arg, name, reason) {\n  if (!arg) {\n    throw ngMinErr('areq', \"Argument '{0}' is {1}\", (name || '?'), (reason || \"required\"));\n  }\n  return arg;\n}\n\nfunction assertArgFn(arg, name, acceptArrayAnnotation) {\n  if (acceptArrayAnnotation && isArray(arg)) {\n      arg = arg[arg.length - 1];\n  }\n\n  assertArg(isFunction(arg), name, 'not a function, got ' +\n      (arg && typeof arg == 'object' ? arg.constructor.name || 'Object' : typeof arg));\n  return arg;\n}\n\n/**\n * throw error if the name given is hasOwnProperty\n * @param  {String} name    the name to test\n * @param  {String} context the context in which the name is used, such as module or directive\n */\nfunction assertNotHasOwnProperty(name, context) {\n  if (name === 'hasOwnProperty') {\n    throw ngMinErr('badname', \"hasOwnProperty is not a valid {0} name\", context);\n  }\n}\n\n/**\n * Return the value accessible from the object by path. Any undefined traversals are ignored\n * @param {Object} obj starting object\n * @param {string} path path to traverse\n * @param {boolean=true} bindFnToScope\n * @returns value as accessible by path\n */\n//TODO(misko): this function needs to be removed\nfunction getter(obj, path, bindFnToScope) {\n  if (!path) return obj;\n  var keys = path.split('.');\n  var key;\n  var lastInstance = obj;\n  var len = keys.length;\n\n  for (var i = 0; i < len; i++) {\n    key = keys[i];\n    if (obj) {\n      obj = (lastInstance = obj)[key];\n    }\n  }\n  if (!bindFnToScope && isFunction(obj)) {\n    return bind(lastInstance, obj);\n  }\n  return obj;\n}\n\n/**\n * Return the DOM siblings between the first and last node in the given array.\n * @param {Array} array like object\n * @returns jQlite object containing the elements\n */\nfunction getBlockElements(nodes) {\n  var startNode = nodes[0],\n      endNode = nodes[nodes.length - 1];\n  if (startNode === endNode) {\n    return jqLite(startNode);\n  }\n\n  var element = startNode;\n  var elements = [element];\n\n  do {\n    element = element.nextSibling;\n    if (!element) break;\n    elements.push(element);\n  } while (element !== endNode);\n\n  return jqLite(elements);\n}\n\n/**\n * @ngdoc interface\n * @name angular.Module\n * @description\n *\n * Interface for configuring angular {@link angular.module modules}.\n */\n\nfunction setupModuleLoader(window) {\n\n  var $injectorMinErr = minErr('$injector');\n  var ngMinErr = minErr('ng');\n\n  function ensure(obj, name, factory) {\n    return obj[name] || (obj[name] = factory());\n  }\n\n  var angular = ensure(window, 'angular', Object);\n\n  // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap\n  angular.$$minErr = angular.$$minErr || minErr;\n\n  return ensure(angular, 'module', function() {\n    /** @type {Object.<string, angular.Module>} */\n    var modules = {};\n\n    /**\n     * @ngdoc function\n     * @name angular.module\n     * @description\n     *\n     * The `angular.module` is a global place for creating, registering and retrieving Angular\n     * modules.\n     * All modules (angular core or 3rd party) that should be available to an application must be\n     * registered using this mechanism.\n     *\n     * When passed two or more arguments, a new module is created.  If passed only one argument, an\n     * existing module (the name passed as the first argument to `module`) is retrieved.\n     *\n     *\n     * # Module\n     *\n     * A module is a collection of services, directives, filters, and configuration information.\n     * `angular.module` is used to configure the {@link AUTO.$injector $injector}.\n     *\n     * <pre>\n     * // Create a new module\n     * var myModule = angular.module('myModule', []);\n     *\n     * // register a new service\n     * myModule.value('appName', 'MyCoolApp');\n     *\n     * // configure existing services inside initialization blocks.\n     * myModule.config(function($locationProvider) {\n     *   // Configure existing providers\n     *   $locationProvider.hashPrefix('!');\n     * });\n     * </pre>\n     *\n     * Then you can create an injector and load your modules like this:\n     *\n     * <pre>\n     * var injector = angular.injector(['ng', 'MyModule'])\n     * </pre>\n     *\n     * However it's more likely that you'll just use\n     * {@link ng.directive:ngApp ngApp} or\n     * {@link angular.bootstrap} to simplify this process for you.\n     *\n     * @param {!string} name The name of the module to create or retrieve.\n     * @param {Array.<string>=} requires If specified then new module is being created. If\n     *        unspecified then the the module is being retrieved for further configuration.\n     * @param {Function} configFn Optional configuration function for the module. Same as\n     *        {@link angular.Module#methods_config Module#config()}.\n     * @returns {module} new module with the {@link angular.Module} api.\n     */\n    return function module(name, requires, configFn) {\n      var assertNotHasOwnProperty = function(name, context) {\n        if (name === 'hasOwnProperty') {\n          throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);\n        }\n      };\n\n      assertNotHasOwnProperty(name, 'module');\n      if (requires && modules.hasOwnProperty(name)) {\n        modules[name] = null;\n      }\n      return ensure(modules, name, function() {\n        if (!requires) {\n          throw $injectorMinErr('nomod', \"Module '{0}' is not available! You either misspelled \" +\n             \"the module name or forgot to load it. If registering a module ensure that you \" +\n             \"specify the dependencies as the second argument.\", name);\n        }\n\n        /** @type {!Array.<Array.<*>>} */\n        var invokeQueue = [];\n\n        /** @type {!Array.<Function>} */\n        var runBlocks = [];\n\n        var config = invokeLater('$injector', 'invoke');\n\n        /** @type {angular.Module} */\n        var moduleInstance = {\n          // Private state\n          _invokeQueue: invokeQueue,\n          _runBlocks: runBlocks,\n\n          /**\n           * @ngdoc property\n           * @name angular.Module#requires\n           * @propertyOf angular.Module\n           * @returns {Array.<string>} List of module names which must be loaded before this module.\n           * @description\n           * Holds the list of modules which the injector will load before the current module is\n           * loaded.\n           */\n          requires: requires,\n\n          /**\n           * @ngdoc property\n           * @name angular.Module#name\n           * @propertyOf angular.Module\n           * @returns {string} Name of the module.\n           * @description\n           */\n          name: name,\n\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#provider\n           * @methodOf angular.Module\n           * @param {string} name service name\n           * @param {Function} providerType Construction function for creating new instance of the\n           *                                service.\n           * @description\n           * See {@link AUTO.$provide#provider $provide.provider()}.\n           */\n          provider: invokeLater('$provide', 'provider'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#factory\n           * @methodOf angular.Module\n           * @param {string} name service name\n           * @param {Function} providerFunction Function for creating new instance of the service.\n           * @description\n           * See {@link AUTO.$provide#factory $provide.factory()}.\n           */\n          factory: invokeLater('$provide', 'factory'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#service\n           * @methodOf angular.Module\n           * @param {string} name service name\n           * @param {Function} constructor A constructor function that will be instantiated.\n           * @description\n           * See {@link AUTO.$provide#service $provide.service()}.\n           */\n          service: invokeLater('$provide', 'service'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#value\n           * @methodOf angular.Module\n           * @param {string} name service name\n           * @param {*} object Service instance object.\n           * @description\n           * See {@link AUTO.$provide#value $provide.value()}.\n           */\n          value: invokeLater('$provide', 'value'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#constant\n           * @methodOf angular.Module\n           * @param {string} name constant name\n           * @param {*} object Constant value.\n           * @description\n           * Because the constant are fixed, they get applied before other provide methods.\n           * See {@link AUTO.$provide#constant $provide.constant()}.\n           */\n          constant: invokeLater('$provide', 'constant', 'unshift'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#animation\n           * @methodOf angular.Module\n           * @param {string} name animation name\n           * @param {Function} animationFactory Factory function for creating new instance of an\n           *                                    animation.\n           * @description\n           *\n           * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.\n           *\n           *\n           * Defines an animation hook that can be later used with\n           * {@link ngAnimate.$animate $animate} service and directives that use this service.\n           *\n           * <pre>\n           * module.animation('.animation-name', function($inject1, $inject2) {\n           *   return {\n           *     eventName : function(element, done) {\n           *       //code to run the animation\n           *       //once complete, then run done()\n           *       return function cancellationFunction(element) {\n           *         //code to cancel the animation\n           *       }\n           *     }\n           *   }\n           * })\n           * </pre>\n           *\n           * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and\n           * {@link ngAnimate ngAnimate module} for more information.\n           */\n          animation: invokeLater('$animateProvider', 'register'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#filter\n           * @methodOf angular.Module\n           * @param {string} name Filter name.\n           * @param {Function} filterFactory Factory function for creating new instance of filter.\n           * @description\n           * See {@link ng.$filterProvider#register $filterProvider.register()}.\n           */\n          filter: invokeLater('$filterProvider', 'register'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#controller\n           * @methodOf angular.Module\n           * @param {string|Object} name Controller name, or an object map of controllers where the\n           *    keys are the names and the values are the constructors.\n           * @param {Function} constructor Controller constructor function.\n           * @description\n           * See {@link ng.$controllerProvider#register $controllerProvider.register()}.\n           */\n          controller: invokeLater('$controllerProvider', 'register'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#directive\n           * @methodOf angular.Module\n           * @param {string|Object} name Directive name, or an object map of directives where the\n           *    keys are the names and the values are the factories.\n           * @param {Function} directiveFactory Factory function for creating new instance of\n           * directives.\n           * @description\n           * See {@link ng.$compileProvider#methods_directive $compileProvider.directive()}.\n           */\n          directive: invokeLater('$compileProvider', 'directive'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#config\n           * @methodOf angular.Module\n           * @param {Function} configFn Execute this function on module load. Useful for service\n           *    configuration.\n           * @description\n           * Use this method to register work which needs to be performed on module loading.\n           */\n          config: config,\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#run\n           * @methodOf angular.Module\n           * @param {Function} initializationFn Execute this function after injector creation.\n           *    Useful for application initialization.\n           * @description\n           * Use this method to register work which should be performed when the injector is done\n           * loading all modules.\n           */\n          run: function(block) {\n            runBlocks.push(block);\n            return this;\n          }\n        };\n\n        if (configFn) {\n          config(configFn);\n        }\n\n        return  moduleInstance;\n\n        /**\n         * @param {string} provider\n         * @param {string} method\n         * @param {String=} insertMethod\n         * @returns {angular.Module}\n         */\n        function invokeLater(provider, method, insertMethod) {\n          return function() {\n            invokeQueue[insertMethod || 'push']([provider, method, arguments]);\n            return moduleInstance;\n          };\n        }\n      });\n    };\n  });\n\n}\n\n/* global\n    angularModule: true,\n    version: true,\n    \n    $LocaleProvider,\n    $CompileProvider,\n    \n    htmlAnchorDirective,\n    inputDirective,\n    inputDirective,\n    formDirective,\n    scriptDirective,\n    selectDirective,\n    styleDirective,\n    optionDirective,\n    ngBindDirective,\n    ngBindHtmlDirective,\n    ngBindTemplateDirective,\n    ngClassDirective,\n    ngClassEvenDirective,\n    ngClassOddDirective,\n    ngCspDirective,\n    ngCloakDirective,\n    ngControllerDirective,\n    ngFormDirective,\n    ngHideDirective,\n    ngIfDirective,\n    ngIncludeDirective,\n    ngIncludeFillContentDirective,\n    ngInitDirective,\n    ngNonBindableDirective,\n    ngPluralizeDirective,\n    ngRepeatDirective,\n    ngShowDirective,\n    ngStyleDirective,\n    ngSwitchDirective,\n    ngSwitchWhenDirective,\n    ngSwitchDefaultDirective,\n    ngOptionsDirective,\n    ngTranscludeDirective,\n    ngModelDirective,\n    ngListDirective,\n    ngChangeDirective,\n    requiredDirective,\n    requiredDirective,\n    ngValueDirective,\n    ngAttributeAliasDirectives,\n    ngEventDirectives,\n\n    $AnchorScrollProvider,\n    $AnimateProvider,\n    $BrowserProvider,\n    $CacheFactoryProvider,\n    $ControllerProvider,\n    $DocumentProvider,\n    $ExceptionHandlerProvider,\n    $FilterProvider,\n    $InterpolateProvider,\n    $IntervalProvider,\n    $HttpProvider,\n    $HttpBackendProvider,\n    $LocationProvider,\n    $LogProvider,\n    $ParseProvider,\n    $RootScopeProvider,\n    $QProvider,\n    $$SanitizeUriProvider,\n    $SceProvider,\n    $SceDelegateProvider,\n    $SnifferProvider,\n    $TemplateCacheProvider,\n    $TimeoutProvider,\n    $WindowProvider\n*/\n\n\n/**\n * @ngdoc property\n * @name angular.version\n * @description\n * An object that contains information about the current AngularJS version. This object has the\n * following properties:\n *\n * - `full` – `{string}` – Full version string, such as \"0.9.18\".\n * - `major` – `{number}` – Major version number, such as \"0\".\n * - `minor` – `{number}` – Minor version number, such as \"9\".\n * - `dot` – `{number}` – Dot version number, such as \"18\".\n * - `codeName` – `{string}` – Code name of the release, such as \"jiggling-armfat\".\n */\nvar version = {\n  full: '1.2.12',    // all of these placeholder strings will be replaced by grunt's\n  major: 1,    // package task\n  minor: 2,\n  dot: 12,\n  codeName: 'cauliflower-eradication'\n};\n\n\nfunction publishExternalAPI(angular){\n  extend(angular, {\n    'bootstrap': bootstrap,\n    'copy': copy,\n    'extend': extend,\n    'equals': equals,\n    'element': jqLite,\n    'forEach': forEach,\n    'injector': createInjector,\n    'noop':noop,\n    'bind':bind,\n    'toJson': toJson,\n    'fromJson': fromJson,\n    'identity':identity,\n    'isUndefined': isUndefined,\n    'isDefined': isDefined,\n    'isString': isString,\n    'isFunction': isFunction,\n    'isObject': isObject,\n    'isNumber': isNumber,\n    'isElement': isElement,\n    'isArray': isArray,\n    'version': version,\n    'isDate': isDate,\n    'lowercase': lowercase,\n    'uppercase': uppercase,\n    'callbacks': {counter: 0},\n    '$$minErr': minErr,\n    '$$csp': csp\n  });\n\n  angularModule = setupModuleLoader(window);\n  try {\n    angularModule('ngLocale');\n  } catch (e) {\n    angularModule('ngLocale', []).provider('$locale', $LocaleProvider);\n  }\n\n  angularModule('ng', ['ngLocale'], ['$provide',\n    function ngModule($provide) {\n      // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.\n      $provide.provider({\n        $$sanitizeUri: $$SanitizeUriProvider\n      });\n      $provide.provider('$compile', $CompileProvider).\n        directive({\n            a: htmlAnchorDirective,\n            input: inputDirective,\n            textarea: inputDirective,\n            form: formDirective,\n            script: scriptDirective,\n            select: selectDirective,\n            style: styleDirective,\n            option: optionDirective,\n            ngBind: ngBindDirective,\n            ngBindHtml: ngBindHtmlDirective,\n            ngBindTemplate: ngBindTemplateDirective,\n            ngClass: ngClassDirective,\n            ngClassEven: ngClassEvenDirective,\n            ngClassOdd: ngClassOddDirective,\n            ngCloak: ngCloakDirective,\n            ngController: ngControllerDirective,\n            ngForm: ngFormDirective,\n            ngHide: ngHideDirective,\n            ngIf: ngIfDirective,\n            ngInclude: ngIncludeDirective,\n            ngInit: ngInitDirective,\n            ngNonBindable: ngNonBindableDirective,\n            ngPluralize: ngPluralizeDirective,\n            ngRepeat: ngRepeatDirective,\n            ngShow: ngShowDirective,\n            ngStyle: ngStyleDirective,\n            ngSwitch: ngSwitchDirective,\n            ngSwitchWhen: ngSwitchWhenDirective,\n            ngSwitchDefault: ngSwitchDefaultDirective,\n            ngOptions: ngOptionsDirective,\n            ngTransclude: ngTranscludeDirective,\n            ngModel: ngModelDirective,\n            ngList: ngListDirective,\n            ngChange: ngChangeDirective,\n            required: requiredDirective,\n            ngRequired: requiredDirective,\n            ngValue: ngValueDirective\n        }).\n        directive({\n          ngInclude: ngIncludeFillContentDirective\n        }).\n        directive(ngAttributeAliasDirectives).\n        directive(ngEventDirectives);\n      $provide.provider({\n        $anchorScroll: $AnchorScrollProvider,\n        $animate: $AnimateProvider,\n        $browser: $BrowserProvider,\n        $cacheFactory: $CacheFactoryProvider,\n        $controller: $ControllerProvider,\n        $document: $DocumentProvider,\n        $exceptionHandler: $ExceptionHandlerProvider,\n        $filter: $FilterProvider,\n        $interpolate: $InterpolateProvider,\n        $interval: $IntervalProvider,\n        $http: $HttpProvider,\n        $httpBackend: $HttpBackendProvider,\n        $location: $LocationProvider,\n        $log: $LogProvider,\n        $parse: $ParseProvider,\n        $rootScope: $RootScopeProvider,\n        $q: $QProvider,\n        $sce: $SceProvider,\n        $sceDelegate: $SceDelegateProvider,\n        $sniffer: $SnifferProvider,\n        $templateCache: $TemplateCacheProvider,\n        $timeout: $TimeoutProvider,\n        $window: $WindowProvider\n      });\n    }\n  ]);\n}\n\n/* global\n\n  -JQLitePrototype,\n  -addEventListenerFn,\n  -removeEventListenerFn,\n  -BOOLEAN_ATTR\n*/\n\n//////////////////////////////////\n//JQLite\n//////////////////////////////////\n\n/**\n * @ngdoc function\n * @name angular.element\n * @function\n *\n * @description\n * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.\n *\n * If jQuery is available, `angular.element` is an alias for the\n * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`\n * delegates to Angular's built-in subset of jQuery, called \"jQuery lite\" or \"jqLite.\"\n *\n * <div class=\"alert alert-success\">jqLite is a tiny, API-compatible subset of jQuery that allows\n * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most\n * commonly needed functionality with the goal of having a very small footprint.</div>\n *\n * To use jQuery, simply load it before `DOMContentLoaded` event fired.\n *\n * <div class=\"alert\">**Note:** all element references in Angular are always wrapped with jQuery or\n * jqLite; they are never raw DOM references.</div>\n *\n * ## Angular's jqLite\n * jqLite provides only the following jQuery methods:\n *\n * - [`addClass()`](http://api.jquery.com/addClass/)\n * - [`after()`](http://api.jquery.com/after/)\n * - [`append()`](http://api.jquery.com/append/)\n * - [`attr()`](http://api.jquery.com/attr/)\n * - [`bind()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData\n * - [`children()`](http://api.jquery.com/children/) - Does not support selectors\n * - [`clone()`](http://api.jquery.com/clone/)\n * - [`contents()`](http://api.jquery.com/contents/)\n * - [`css()`](http://api.jquery.com/css/)\n * - [`data()`](http://api.jquery.com/data/)\n * - [`empty()`](http://api.jquery.com/empty/)\n * - [`eq()`](http://api.jquery.com/eq/)\n * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name\n * - [`hasClass()`](http://api.jquery.com/hasClass/)\n * - [`html()`](http://api.jquery.com/html/)\n * - [`next()`](http://api.jquery.com/next/) - Does not support selectors\n * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData\n * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces or selectors\n * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors\n * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors\n * - [`prepend()`](http://api.jquery.com/prepend/)\n * - [`prop()`](http://api.jquery.com/prop/)\n * - [`ready()`](http://api.jquery.com/ready/)\n * - [`remove()`](http://api.jquery.com/remove/)\n * - [`removeAttr()`](http://api.jquery.com/removeAttr/)\n * - [`removeClass()`](http://api.jquery.com/removeClass/)\n * - [`removeData()`](http://api.jquery.com/removeData/)\n * - [`replaceWith()`](http://api.jquery.com/replaceWith/)\n * - [`text()`](http://api.jquery.com/text/)\n * - [`toggleClass()`](http://api.jquery.com/toggleClass/)\n * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.\n * - [`unbind()`](http://api.jquery.com/off/) - Does not support namespaces\n * - [`val()`](http://api.jquery.com/val/)\n * - [`wrap()`](http://api.jquery.com/wrap/)\n *\n * ## jQuery/jqLite Extras\n * Angular also provides the following additional methods and events to both jQuery and jqLite:\n *\n * ### Events\n * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event\n *    on all DOM nodes being removed.  This can be used to clean up any 3rd party bindings to the DOM\n *    element before it is removed.\n *\n * ### Methods\n * - `controller(name)` - retrieves the controller of the current element or its parent. By default\n *   retrieves controller associated with the `ngController` directive. If `name` is provided as\n *   camelCase directive name, then the controller for this directive will be retrieved (e.g.\n *   `'ngModel'`).\n * - `injector()` - retrieves the injector of the current element or its parent.\n * - `scope()` - retrieves the {@link api/ng.$rootScope.Scope scope} of the current\n *   element or its parent.\n * - `isolateScope()` - retrieves an isolate {@link api/ng.$rootScope.Scope scope} if one is attached directly to the\n *   current element. This getter should be used only on elements that contain a directive which starts a new isolate\n *   scope. Calling `scope()` on this element always returns the original non-isolate scope.\n * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top\n *   parent element is reached.\n *\n * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.\n * @returns {Object} jQuery object.\n */\n\nvar jqCache = JQLite.cache = {},\n    jqName = JQLite.expando = 'ng-' + new Date().getTime(),\n    jqId = 1,\n    addEventListenerFn = (window.document.addEventListener\n      ? function(element, type, fn) {element.addEventListener(type, fn, false);}\n      : function(element, type, fn) {element.attachEvent('on' + type, fn);}),\n    removeEventListenerFn = (window.document.removeEventListener\n      ? function(element, type, fn) {element.removeEventListener(type, fn, false); }\n      : function(element, type, fn) {element.detachEvent('on' + type, fn); });\n\nfunction jqNextId() { return ++jqId; }\n\n\nvar SPECIAL_CHARS_REGEXP = /([\\:\\-\\_]+(.))/g;\nvar MOZ_HACK_REGEXP = /^moz([A-Z])/;\nvar jqLiteMinErr = minErr('jqLite');\n\n/**\n * Converts snake_case to camelCase.\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction camelCase(name) {\n  return name.\n    replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {\n      return offset ? letter.toUpperCase() : letter;\n    }).\n    replace(MOZ_HACK_REGEXP, 'Moz$1');\n}\n\n/////////////////////////////////////////////\n// jQuery mutation patch\n//\n// In conjunction with bindJQuery intercepts all jQuery's DOM destruction apis and fires a\n// $destroy event on all DOM nodes being removed.\n//\n/////////////////////////////////////////////\n\nfunction jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments) {\n  var originalJqFn = jQuery.fn[name];\n  originalJqFn = originalJqFn.$original || originalJqFn;\n  removePatch.$original = originalJqFn;\n  jQuery.fn[name] = removePatch;\n\n  function removePatch(param) {\n    // jshint -W040\n    var list = filterElems && param ? [this.filter(param)] : [this],\n        fireEvent = dispatchThis,\n        set, setIndex, setLength,\n        element, childIndex, childLength, children;\n\n    if (!getterIfNoArguments || param != null) {\n      while(list.length) {\n        set = list.shift();\n        for(setIndex = 0, setLength = set.length; setIndex < setLength; setIndex++) {\n          element = jqLite(set[setIndex]);\n          if (fireEvent) {\n            element.triggerHandler('$destroy');\n          } else {\n            fireEvent = !fireEvent;\n          }\n          for(childIndex = 0, childLength = (children = element.children()).length;\n              childIndex < childLength;\n              childIndex++) {\n            list.push(jQuery(children[childIndex]));\n          }\n        }\n      }\n    }\n    return originalJqFn.apply(this, arguments);\n  }\n}\n\n/////////////////////////////////////////////\nfunction JQLite(element) {\n  if (element instanceof JQLite) {\n    return element;\n  }\n  if (isString(element)) {\n    element = trim(element);\n  }\n  if (!(this instanceof JQLite)) {\n    if (isString(element) && element.charAt(0) != '<') {\n      throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');\n    }\n    return new JQLite(element);\n  }\n\n  if (isString(element)) {\n    var div = document.createElement('div');\n    // Read about the NoScope elements here:\n    // https://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx\n    div.innerHTML = '<div>&#160;</div>' + element; // IE insanity to make NoScope elements work!\n    div.removeChild(div.firstChild); // remove the superfluous div\n    jqLiteAddNodes(this, div.childNodes);\n    var fragment = jqLite(document.createDocumentFragment());\n    fragment.append(this); // detach the elements from the temporary DOM div.\n  } else {\n    jqLiteAddNodes(this, element);\n  }\n}\n\nfunction jqLiteClone(element) {\n  return element.cloneNode(true);\n}\n\nfunction jqLiteDealoc(element){\n  jqLiteRemoveData(element);\n  for ( var i = 0, children = element.childNodes || []; i < children.length; i++) {\n    jqLiteDealoc(children[i]);\n  }\n}\n\nfunction jqLiteOff(element, type, fn, unsupported) {\n  if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');\n\n  var events = jqLiteExpandoStore(element, 'events'),\n      handle = jqLiteExpandoStore(element, 'handle');\n\n  if (!handle) return; //no listeners registered\n\n  if (isUndefined(type)) {\n    forEach(events, function(eventHandler, type) {\n      removeEventListenerFn(element, type, eventHandler);\n      delete events[type];\n    });\n  } else {\n    forEach(type.split(' '), function(type) {\n      if (isUndefined(fn)) {\n        removeEventListenerFn(element, type, events[type]);\n        delete events[type];\n      } else {\n        arrayRemove(events[type] || [], fn);\n      }\n    });\n  }\n}\n\nfunction jqLiteRemoveData(element, name) {\n  var expandoId = element[jqName],\n      expandoStore = jqCache[expandoId];\n\n  if (expandoStore) {\n    if (name) {\n      delete jqCache[expandoId].data[name];\n      return;\n    }\n\n    if (expandoStore.handle) {\n      expandoStore.events.$destroy && expandoStore.handle({}, '$destroy');\n      jqLiteOff(element);\n    }\n    delete jqCache[expandoId];\n    element[jqName] = undefined; // ie does not allow deletion of attributes on elements.\n  }\n}\n\nfunction jqLiteExpandoStore(element, key, value) {\n  var expandoId = element[jqName],\n      expandoStore = jqCache[expandoId || -1];\n\n  if (isDefined(value)) {\n    if (!expandoStore) {\n      element[jqName] = expandoId = jqNextId();\n      expandoStore = jqCache[expandoId] = {};\n    }\n    expandoStore[key] = value;\n  } else {\n    return expandoStore && expandoStore[key];\n  }\n}\n\nfunction jqLiteData(element, key, value) {\n  var data = jqLiteExpandoStore(element, 'data'),\n      isSetter = isDefined(value),\n      keyDefined = !isSetter && isDefined(key),\n      isSimpleGetter = keyDefined && !isObject(key);\n\n  if (!data && !isSimpleGetter) {\n    jqLiteExpandoStore(element, 'data', data = {});\n  }\n\n  if (isSetter) {\n    data[key] = value;\n  } else {\n    if (keyDefined) {\n      if (isSimpleGetter) {\n        // don't create data in this case.\n        return data && data[key];\n      } else {\n        extend(data, key);\n      }\n    } else {\n      return data;\n    }\n  }\n}\n\nfunction jqLiteHasClass(element, selector) {\n  if (!element.getAttribute) return false;\n  return ((\" \" + (element.getAttribute('class') || '') + \" \").replace(/[\\n\\t]/g, \" \").\n      indexOf( \" \" + selector + \" \" ) > -1);\n}\n\nfunction jqLiteRemoveClass(element, cssClasses) {\n  if (cssClasses && element.setAttribute) {\n    forEach(cssClasses.split(' '), function(cssClass) {\n      element.setAttribute('class', trim(\n          (\" \" + (element.getAttribute('class') || '') + \" \")\n          .replace(/[\\n\\t]/g, \" \")\n          .replace(\" \" + trim(cssClass) + \" \", \" \"))\n      );\n    });\n  }\n}\n\nfunction jqLiteAddClass(element, cssClasses) {\n  if (cssClasses && element.setAttribute) {\n    var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')\n                            .replace(/[\\n\\t]/g, \" \");\n\n    forEach(cssClasses.split(' '), function(cssClass) {\n      cssClass = trim(cssClass);\n      if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {\n        existingClasses += cssClass + ' ';\n      }\n    });\n\n    element.setAttribute('class', trim(existingClasses));\n  }\n}\n\nfunction jqLiteAddNodes(root, elements) {\n  if (elements) {\n    elements = (!elements.nodeName && isDefined(elements.length) && !isWindow(elements))\n      ? elements\n      : [ elements ];\n    for(var i=0; i < elements.length; i++) {\n      root.push(elements[i]);\n    }\n  }\n}\n\nfunction jqLiteController(element, name) {\n  return jqLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');\n}\n\nfunction jqLiteInheritedData(element, name, value) {\n  element = jqLite(element);\n\n  // if element is the document object work with the html element instead\n  // this makes $(document).scope() possible\n  if(element[0].nodeType == 9) {\n    element = element.find('html');\n  }\n  var names = isArray(name) ? name : [name];\n\n  while (element.length) {\n\n    for (var i = 0, ii = names.length; i < ii; i++) {\n      if ((value = element.data(names[i])) !== undefined) return value;\n    }\n    element = element.parent();\n  }\n}\n\nfunction jqLiteEmpty(element) {\n  for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {\n    jqLiteDealoc(childNodes[i]);\n  }\n  while (element.firstChild) {\n    element.removeChild(element.firstChild);\n  }\n}\n\n//////////////////////////////////////////\n// Functions which are declared directly.\n//////////////////////////////////////////\nvar JQLitePrototype = JQLite.prototype = {\n  ready: function(fn) {\n    var fired = false;\n\n    function trigger() {\n      if (fired) return;\n      fired = true;\n      fn();\n    }\n\n    // check if document already is loaded\n    if (document.readyState === 'complete'){\n      setTimeout(trigger);\n    } else {\n      this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9\n      // we can not use jqLite since we are not done loading and jQuery could be loaded later.\n      // jshint -W064\n      JQLite(window).on('load', trigger); // fallback to window.onload for others\n      // jshint +W064\n    }\n  },\n  toString: function() {\n    var value = [];\n    forEach(this, function(e){ value.push('' + e);});\n    return '[' + value.join(', ') + ']';\n  },\n\n  eq: function(index) {\n      return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);\n  },\n\n  length: 0,\n  push: push,\n  sort: [].sort,\n  splice: [].splice\n};\n\n//////////////////////////////////////////\n// Functions iterating getter/setters.\n// these functions return self on setter and\n// value on get.\n//////////////////////////////////////////\nvar BOOLEAN_ATTR = {};\nforEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {\n  BOOLEAN_ATTR[lowercase(value)] = value;\n});\nvar BOOLEAN_ELEMENTS = {};\nforEach('input,select,option,textarea,button,form,details'.split(','), function(value) {\n  BOOLEAN_ELEMENTS[uppercase(value)] = true;\n});\n\nfunction getBooleanAttrName(element, name) {\n  // check dom last since we will most likely fail on name\n  var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];\n\n  // booleanAttr is here twice to minimize DOM access\n  return booleanAttr && BOOLEAN_ELEMENTS[element.nodeName] && booleanAttr;\n}\n\nforEach({\n  data: jqLiteData,\n  inheritedData: jqLiteInheritedData,\n\n  scope: function(element) {\n    // Can't use jqLiteData here directly so we stay compatible with jQuery!\n    return jqLite(element).data('$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);\n  },\n\n  isolateScope: function(element) {\n    // Can't use jqLiteData here directly so we stay compatible with jQuery!\n    return jqLite(element).data('$isolateScope') || jqLite(element).data('$isolateScopeNoTemplate');\n  },\n\n  controller: jqLiteController ,\n\n  injector: function(element) {\n    return jqLiteInheritedData(element, '$injector');\n  },\n\n  removeAttr: function(element,name) {\n    element.removeAttribute(name);\n  },\n\n  hasClass: jqLiteHasClass,\n\n  css: function(element, name, value) {\n    name = camelCase(name);\n\n    if (isDefined(value)) {\n      element.style[name] = value;\n    } else {\n      var val;\n\n      if (msie <= 8) {\n        // this is some IE specific weirdness that jQuery 1.6.4 does not sure why\n        val = element.currentStyle && element.currentStyle[name];\n        if (val === '') val = 'auto';\n      }\n\n      val = val || element.style[name];\n\n      if (msie <= 8) {\n        // jquery weirdness :-/\n        val = (val === '') ? undefined : val;\n      }\n\n      return  val;\n    }\n  },\n\n  attr: function(element, name, value){\n    var lowercasedName = lowercase(name);\n    if (BOOLEAN_ATTR[lowercasedName]) {\n      if (isDefined(value)) {\n        if (!!value) {\n          element[name] = true;\n          element.setAttribute(name, lowercasedName);\n        } else {\n          element[name] = false;\n          element.removeAttribute(lowercasedName);\n        }\n      } else {\n        return (element[name] ||\n                 (element.attributes.getNamedItem(name)|| noop).specified)\n               ? lowercasedName\n               : undefined;\n      }\n    } else if (isDefined(value)) {\n      element.setAttribute(name, value);\n    } else if (element.getAttribute) {\n      // the extra argument \"2\" is to get the right thing for a.href in IE, see jQuery code\n      // some elements (e.g. Document) don't have get attribute, so return undefined\n      var ret = element.getAttribute(name, 2);\n      // normalize non-existing attributes to undefined (as jQuery)\n      return ret === null ? undefined : ret;\n    }\n  },\n\n  prop: function(element, name, value) {\n    if (isDefined(value)) {\n      element[name] = value;\n    } else {\n      return element[name];\n    }\n  },\n\n  text: (function() {\n    var NODE_TYPE_TEXT_PROPERTY = [];\n    if (msie < 9) {\n      NODE_TYPE_TEXT_PROPERTY[1] = 'innerText';    /** Element **/\n      NODE_TYPE_TEXT_PROPERTY[3] = 'nodeValue';    /** Text **/\n    } else {\n      NODE_TYPE_TEXT_PROPERTY[1] =                 /** Element **/\n      NODE_TYPE_TEXT_PROPERTY[3] = 'textContent';  /** Text **/\n    }\n    getText.$dv = '';\n    return getText;\n\n    function getText(element, value) {\n      var textProp = NODE_TYPE_TEXT_PROPERTY[element.nodeType];\n      if (isUndefined(value)) {\n        return textProp ? element[textProp] : '';\n      }\n      element[textProp] = value;\n    }\n  })(),\n\n  val: function(element, value) {\n    if (isUndefined(value)) {\n      if (nodeName_(element) === 'SELECT' && element.multiple) {\n        var result = [];\n        forEach(element.options, function (option) {\n          if (option.selected) {\n            result.push(option.value || option.text);\n          }\n        });\n        return result.length === 0 ? null : result;\n      }\n      return element.value;\n    }\n    element.value = value;\n  },\n\n  html: function(element, value) {\n    if (isUndefined(value)) {\n      return element.innerHTML;\n    }\n    for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {\n      jqLiteDealoc(childNodes[i]);\n    }\n    element.innerHTML = value;\n  },\n\n  empty: jqLiteEmpty\n}, function(fn, name){\n  /**\n   * Properties: writes return selection, reads return first value\n   */\n  JQLite.prototype[name] = function(arg1, arg2) {\n    var i, key;\n\n    // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it\n    // in a way that survives minification.\n    // jqLiteEmpty takes no arguments but is a setter.\n    if (fn !== jqLiteEmpty &&\n        (((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2) === undefined)) {\n      if (isObject(arg1)) {\n\n        // we are a write, but the object properties are the key/values\n        for (i = 0; i < this.length; i++) {\n          if (fn === jqLiteData) {\n            // data() takes the whole object in jQuery\n            fn(this[i], arg1);\n          } else {\n            for (key in arg1) {\n              fn(this[i], key, arg1[key]);\n            }\n          }\n        }\n        // return self for chaining\n        return this;\n      } else {\n        // we are a read, so read the first child.\n        var value = fn.$dv;\n        // Only if we have $dv do we iterate over all, otherwise it is just the first element.\n        var jj = (value === undefined) ? Math.min(this.length, 1) : this.length;\n        for (var j = 0; j < jj; j++) {\n          var nodeValue = fn(this[j], arg1, arg2);\n          value = value ? value + nodeValue : nodeValue;\n        }\n        return value;\n      }\n    } else {\n      // we are a write, so apply to all children\n      for (i = 0; i < this.length; i++) {\n        fn(this[i], arg1, arg2);\n      }\n      // return self for chaining\n      return this;\n    }\n  };\n});\n\nfunction createEventHandler(element, events) {\n  var eventHandler = function (event, type) {\n    if (!event.preventDefault) {\n      event.preventDefault = function() {\n        event.returnValue = false; //ie\n      };\n    }\n\n    if (!event.stopPropagation) {\n      event.stopPropagation = function() {\n        event.cancelBubble = true; //ie\n      };\n    }\n\n    if (!event.target) {\n      event.target = event.srcElement || document;\n    }\n\n    if (isUndefined(event.defaultPrevented)) {\n      var prevent = event.preventDefault;\n      event.preventDefault = function() {\n        event.defaultPrevented = true;\n        prevent.call(event);\n      };\n      event.defaultPrevented = false;\n    }\n\n    event.isDefaultPrevented = function() {\n      return event.defaultPrevented || event.returnValue === false;\n    };\n\n    // Copy event handlers in case event handlers array is modified during execution.\n    var eventHandlersCopy = shallowCopy(events[type || event.type] || []);\n\n    forEach(eventHandlersCopy, function(fn) {\n      fn.call(element, event);\n    });\n\n    // Remove monkey-patched methods (IE),\n    // as they would cause memory leaks in IE8.\n    if (msie <= 8) {\n      // IE7/8 does not allow to delete property on native object\n      event.preventDefault = null;\n      event.stopPropagation = null;\n      event.isDefaultPrevented = null;\n    } else {\n      // It shouldn't affect normal browsers (native methods are defined on prototype).\n      delete event.preventDefault;\n      delete event.stopPropagation;\n      delete event.isDefaultPrevented;\n    }\n  };\n  eventHandler.elem = element;\n  return eventHandler;\n}\n\n//////////////////////////////////////////\n// Functions iterating traversal.\n// These functions chain results into a single\n// selector.\n//////////////////////////////////////////\nforEach({\n  removeData: jqLiteRemoveData,\n\n  dealoc: jqLiteDealoc,\n\n  on: function onFn(element, type, fn, unsupported){\n    if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');\n\n    var events = jqLiteExpandoStore(element, 'events'),\n        handle = jqLiteExpandoStore(element, 'handle');\n\n    if (!events) jqLiteExpandoStore(element, 'events', events = {});\n    if (!handle) jqLiteExpandoStore(element, 'handle', handle = createEventHandler(element, events));\n\n    forEach(type.split(' '), function(type){\n      var eventFns = events[type];\n\n      if (!eventFns) {\n        if (type == 'mouseenter' || type == 'mouseleave') {\n          var contains = document.body.contains || document.body.compareDocumentPosition ?\n          function( a, b ) {\n            // jshint bitwise: false\n            var adown = a.nodeType === 9 ? a.documentElement : a,\n            bup = b && b.parentNode;\n            return a === bup || !!( bup && bup.nodeType === 1 && (\n              adown.contains ?\n              adown.contains( bup ) :\n              a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n              ));\n            } :\n            function( a, b ) {\n              if ( b ) {\n                while ( (b = b.parentNode) ) {\n                  if ( b === a ) {\n                    return true;\n                  }\n                }\n              }\n              return false;\n            };\n\n          events[type] = [];\n\n          // Refer to jQuery's implementation of mouseenter & mouseleave\n          // Read about mouseenter and mouseleave:\n          // https://www.quirksmode.org/js/events_mouse.html#link8\n          var eventmap = { mouseleave : \"mouseout\", mouseenter : \"mouseover\"};\n\n          onFn(element, eventmap[type], function(event) {\n            var target = this, related = event.relatedTarget;\n            // For mousenter/leave call the handler if related is outside the target.\n            // NB: No relatedTarget if the mouse left/entered the browser window\n            if ( !related || (related !== target && !contains(target, related)) ){\n              handle(event, type);\n            }\n          });\n\n        } else {\n          addEventListenerFn(element, type, handle);\n          events[type] = [];\n        }\n        eventFns = events[type];\n      }\n      eventFns.push(fn);\n    });\n  },\n\n  off: jqLiteOff,\n\n  one: function(element, type, fn) {\n    element = jqLite(element);\n\n    //add the listener twice so that when it is called\n    //you can remove the original function and still be\n    //able to call element.off(ev, fn) normally\n    element.on(type, function onFn() {\n      element.off(type, fn);\n      element.off(type, onFn);\n    });\n    element.on(type, fn);\n  },\n\n  replaceWith: function(element, replaceNode) {\n    var index, parent = element.parentNode;\n    jqLiteDealoc(element);\n    forEach(new JQLite(replaceNode), function(node){\n      if (index) {\n        parent.insertBefore(node, index.nextSibling);\n      } else {\n        parent.replaceChild(node, element);\n      }\n      index = node;\n    });\n  },\n\n  children: function(element) {\n    var children = [];\n    forEach(element.childNodes, function(element){\n      if (element.nodeType === 1)\n        children.push(element);\n    });\n    return children;\n  },\n\n  contents: function(element) {\n    return element.childNodes || [];\n  },\n\n  append: function(element, node) {\n    forEach(new JQLite(node), function(child){\n      if (element.nodeType === 1 || element.nodeType === 11) {\n        element.appendChild(child);\n      }\n    });\n  },\n\n  prepend: function(element, node) {\n    if (element.nodeType === 1) {\n      var index = element.firstChild;\n      forEach(new JQLite(node), function(child){\n        element.insertBefore(child, index);\n      });\n    }\n  },\n\n  wrap: function(element, wrapNode) {\n    wrapNode = jqLite(wrapNode)[0];\n    var parent = element.parentNode;\n    if (parent) {\n      parent.replaceChild(wrapNode, element);\n    }\n    wrapNode.appendChild(element);\n  },\n\n  remove: function(element) {\n    jqLiteDealoc(element);\n    var parent = element.parentNode;\n    if (parent) parent.removeChild(element);\n  },\n\n  after: function(element, newElement) {\n    var index = element, parent = element.parentNode;\n    forEach(new JQLite(newElement), function(node){\n      parent.insertBefore(node, index.nextSibling);\n      index = node;\n    });\n  },\n\n  addClass: jqLiteAddClass,\n  removeClass: jqLiteRemoveClass,\n\n  toggleClass: function(element, selector, condition) {\n    if (isUndefined(condition)) {\n      condition = !jqLiteHasClass(element, selector);\n    }\n    (condition ? jqLiteAddClass : jqLiteRemoveClass)(element, selector);\n  },\n\n  parent: function(element) {\n    var parent = element.parentNode;\n    return parent && parent.nodeType !== 11 ? parent : null;\n  },\n\n  next: function(element) {\n    if (element.nextElementSibling) {\n      return element.nextElementSibling;\n    }\n\n    // IE8 doesn't have nextElementSibling\n    var elm = element.nextSibling;\n    while (elm != null && elm.nodeType !== 1) {\n      elm = elm.nextSibling;\n    }\n    return elm;\n  },\n\n  find: function(element, selector) {\n    if (element.getElementsByTagName) {\n      return element.getElementsByTagName(selector);\n    } else {\n      return [];\n    }\n  },\n\n  clone: jqLiteClone,\n\n  triggerHandler: function(element, eventName, eventData) {\n    var eventFns = (jqLiteExpandoStore(element, 'events') || {})[eventName];\n\n    eventData = eventData || [];\n\n    var event = [{\n      preventDefault: noop,\n      stopPropagation: noop\n    }];\n\n    forEach(eventFns, function(fn) {\n      fn.apply(element, event.concat(eventData));\n    });\n  }\n}, function(fn, name){\n  /**\n   * chaining functions\n   */\n  JQLite.prototype[name] = function(arg1, arg2, arg3) {\n    var value;\n    for(var i=0; i < this.length; i++) {\n      if (isUndefined(value)) {\n        value = fn(this[i], arg1, arg2, arg3);\n        if (isDefined(value)) {\n          // any function which returns a value needs to be wrapped\n          value = jqLite(value);\n        }\n      } else {\n        jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));\n      }\n    }\n    return isDefined(value) ? value : this;\n  };\n\n  // bind legacy bind/unbind to on/off\n  JQLite.prototype.bind = JQLite.prototype.on;\n  JQLite.prototype.unbind = JQLite.prototype.off;\n});\n\n/**\n * Computes a hash of an 'obj'.\n * Hash of a:\n *  string is string\n *  number is number as string\n *  object is either result of calling $$hashKey function on the object or uniquely generated id,\n *         that is also assigned to the $$hashKey property of the object.\n *\n * @param obj\n * @returns {string} hash string such that the same input will have the same hash string.\n *         The resulting string key is in 'type:hashKey' format.\n */\nfunction hashKey(obj) {\n  var objType = typeof obj,\n      key;\n\n  if (objType == 'object' && obj !== null) {\n    if (typeof (key = obj.$$hashKey) == 'function') {\n      // must invoke on object to keep the right this\n      key = obj.$$hashKey();\n    } else if (key === undefined) {\n      key = obj.$$hashKey = nextUid();\n    }\n  } else {\n    key = obj;\n  }\n\n  return objType + ':' + key;\n}\n\n/**\n * HashMap which can use objects as keys\n */\nfunction HashMap(array){\n  forEach(array, this.put, this);\n}\nHashMap.prototype = {\n  /**\n   * Store key value pair\n   * @param key key to store can be any type\n   * @param value value to store can be any type\n   */\n  put: function(key, value) {\n    this[hashKey(key)] = value;\n  },\n\n  /**\n   * @param key\n   * @returns the value for the key\n   */\n  get: function(key) {\n    return this[hashKey(key)];\n  },\n\n  /**\n   * Remove the key/value pair\n   * @param key\n   */\n  remove: function(key) {\n    var value = this[key = hashKey(key)];\n    delete this[key];\n    return value;\n  }\n};\n\n/**\n * @ngdoc function\n * @name angular.injector\n * @function\n *\n * @description\n * Creates an injector function that can be used for retrieving services as well as for\n * dependency injection (see {@link guide/di dependency injection}).\n *\n\n * @param {Array.<string|Function>} modules A list of module functions or their aliases. See\n *        {@link angular.module}. The `ng` module must be explicitly added.\n * @returns {function()} Injector function. See {@link AUTO.$injector $injector}.\n *\n * @example\n * Typical usage\n * <pre>\n *   // create an injector\n *   var $injector = angular.injector(['ng']);\n *\n *   // use the injector to kick off your application\n *   // use the type inference to auto inject arguments, or use implicit injection\n *   $injector.invoke(function($rootScope, $compile, $document){\n *     $compile($document)($rootScope);\n *     $rootScope.$digest();\n *   });\n * </pre>\n *\n * Sometimes you want to get access to the injector of a currently running Angular app\n * from outside Angular. Perhaps, you want to inject and compile some markup after the\n * application has been bootstrapped. You can do this using extra `injector()` added\n * to JQuery/jqLite elements. See {@link angular.element}.\n *\n * *This is fairly rare but could be the case if a third party library is injecting the\n * markup.*\n *\n * In the following example a new block of HTML containing a `ng-controller`\n * directive is added to the end of the document body by JQuery. We then compile and link\n * it into the current AngularJS scope.\n *\n * <pre>\n * var $div = $('<div ng-controller=\"MyCtrl\">{{content.label}}</div>');\n * $(document.body).append($div);\n *\n * angular.element(document).injector().invoke(function($compile) {\n *   var scope = angular.element($div).scope();\n *   $compile($div)(scope);\n * });\n * </pre>\n */\n\n\n/**\n * @ngdoc overview\n * @name AUTO\n * @description\n *\n * Implicit module which gets automatically added to each {@link AUTO.$injector $injector}.\n */\n\nvar FN_ARGS = /^function\\s*[^\\(]*\\(\\s*([^\\)]*)\\)/m;\nvar FN_ARG_SPLIT = /,/;\nvar FN_ARG = /^\\s*(_?)(\\S+?)\\1\\s*$/;\nvar STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nvar $injectorMinErr = minErr('$injector');\nfunction annotate(fn) {\n  var $inject,\n      fnText,\n      argDecl,\n      last;\n\n  if (typeof fn == 'function') {\n    if (!($inject = fn.$inject)) {\n      $inject = [];\n      if (fn.length) {\n        fnText = fn.toString().replace(STRIP_COMMENTS, '');\n        argDecl = fnText.match(FN_ARGS);\n        forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg){\n          arg.replace(FN_ARG, function(all, underscore, name){\n            $inject.push(name);\n          });\n        });\n      }\n      fn.$inject = $inject;\n    }\n  } else if (isArray(fn)) {\n    last = fn.length - 1;\n    assertArgFn(fn[last], 'fn');\n    $inject = fn.slice(0, last);\n  } else {\n    assertArgFn(fn, 'fn', true);\n  }\n  return $inject;\n}\n\n///////////////////////////////////////\n\n/**\n * @ngdoc object\n * @name AUTO.$injector\n * @function\n *\n * @description\n *\n * `$injector` is used to retrieve object instances as defined by\n * {@link AUTO.$provide provider}, instantiate types, invoke methods,\n * and load modules.\n *\n * The following always holds true:\n *\n * <pre>\n *   var $injector = angular.injector();\n *   expect($injector.get('$injector')).toBe($injector);\n *   expect($injector.invoke(function($injector){\n *     return $injector;\n *   }).toBe($injector);\n * </pre>\n *\n * # Injection Function Annotation\n *\n * JavaScript does not have annotations, and annotations are needed for dependency injection. The\n * following are all valid ways of annotating function with injection arguments and are equivalent.\n *\n * <pre>\n *   // inferred (only works if code not minified/obfuscated)\n *   $injector.invoke(function(serviceA){});\n *\n *   // annotated\n *   function explicit(serviceA) {};\n *   explicit.$inject = ['serviceA'];\n *   $injector.invoke(explicit);\n *\n *   // inline\n *   $injector.invoke(['serviceA', function(serviceA){}]);\n * </pre>\n *\n * ## Inference\n *\n * In JavaScript calling `toString()` on a function returns the function definition. The definition\n * can then be parsed and the function arguments can be extracted. *NOTE:* This does not work with\n * minification, and obfuscation tools since these tools change the argument names.\n *\n * ## `$inject` Annotation\n * By adding a `$inject` property onto a function the injection parameters can be specified.\n *\n * ## Inline\n * As an array of injection names, where the last item in the array is the function to call.\n */\n\n/**\n * @ngdoc method\n * @name AUTO.$injector#get\n * @methodOf AUTO.$injector\n *\n * @description\n * Return an instance of the service.\n *\n * @param {string} name The name of the instance to retrieve.\n * @return {*} The instance.\n */\n\n/**\n * @ngdoc method\n * @name AUTO.$injector#invoke\n * @methodOf AUTO.$injector\n *\n * @description\n * Invoke the method and supply the method arguments from the `$injector`.\n *\n * @param {!function} fn The function to invoke. Function parameters are injected according to the\n *   {@link guide/di $inject Annotation} rules.\n * @param {Object=} self The `this` for the invoked method.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n *                         object first, before the `$injector` is consulted.\n * @returns {*} the value returned by the invoked `fn` function.\n */\n\n/**\n * @ngdoc method\n * @name AUTO.$injector#has\n * @methodOf AUTO.$injector\n *\n * @description\n * Allows the user to query if the particular service exist.\n *\n * @param {string} Name of the service to query.\n * @returns {boolean} returns true if injector has given service.\n */\n\n/**\n * @ngdoc method\n * @name AUTO.$injector#instantiate\n * @methodOf AUTO.$injector\n * @description\n * Create a new instance of JS type. The method takes a constructor function invokes the new\n * operator and supplies all of the arguments to the constructor function as specified by the\n * constructor annotation.\n *\n * @param {function} Type Annotated constructor function.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {Object} new instance of `Type`.\n */\n\n/**\n * @ngdoc method\n * @name AUTO.$injector#annotate\n * @methodOf AUTO.$injector\n *\n * @description\n * Returns an array of service names which the function is requesting for injection. This API is\n * used by the injector to determine which services need to be injected into the function when the\n * function is invoked. There are three ways in which the function can be annotated with the needed\n * dependencies.\n *\n * # Argument names\n *\n * The simplest form is to extract the dependencies from the arguments of the function. This is done\n * by converting the function into a string using `toString()` method and extracting the argument\n * names.\n * <pre>\n *   // Given\n *   function MyController($scope, $route) {\n *     // ...\n *   }\n *\n *   // Then\n *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * </pre>\n *\n * This method does not work with code minification / obfuscation. For this reason the following\n * annotation strategies are supported.\n *\n * # The `$inject` property\n *\n * If a function has an `$inject` property and its value is an array of strings, then the strings\n * represent names of services to be injected into the function.\n * <pre>\n *   // Given\n *   var MyController = function(obfuscatedScope, obfuscatedRoute) {\n *     // ...\n *   }\n *   // Define function dependencies\n *   MyController['$inject'] = ['$scope', '$route'];\n *\n *   // Then\n *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * </pre>\n *\n * # The array notation\n *\n * It is often desirable to inline Injected functions and that's when setting the `$inject` property\n * is very inconvenient. In these situations using the array notation to specify the dependencies in\n * a way that survives minification is a better choice:\n *\n * <pre>\n *   // We wish to write this (not minification / obfuscation safe)\n *   injector.invoke(function($compile, $rootScope) {\n *     // ...\n *   });\n *\n *   // We are forced to write break inlining\n *   var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {\n *     // ...\n *   };\n *   tmpFn.$inject = ['$compile', '$rootScope'];\n *   injector.invoke(tmpFn);\n *\n *   // To better support inline function the inline annotation is supported\n *   injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {\n *     // ...\n *   }]);\n *\n *   // Therefore\n *   expect(injector.annotate(\n *      ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])\n *    ).toEqual(['$compile', '$rootScope']);\n * </pre>\n *\n * @param {function|Array.<string|Function>} fn Function for which dependent service names need to\n * be retrieved as described above.\n *\n * @returns {Array.<string>} The names of the services which the function requires.\n */\n\n\n\n\n/**\n * @ngdoc object\n * @name AUTO.$provide\n *\n * @description\n *\n * The {@link AUTO.$provide $provide} service has a number of methods for registering components\n * with the {@link AUTO.$injector $injector}. Many of these functions are also exposed on\n * {@link angular.Module}.\n *\n * An Angular **service** is a singleton object created by a **service factory**.  These **service\n * factories** are functions which, in turn, are created by a **service provider**.\n * The **service providers** are constructor functions. When instantiated they must contain a\n * property called `$get`, which holds the **service factory** function.\n *\n * When you request a service, the {@link AUTO.$injector $injector} is responsible for finding the\n * correct **service provider**, instantiating it and then calling its `$get` **service factory**\n * function to get the instance of the **service**.\n *\n * Often services have no configuration options and there is no need to add methods to the service\n * provider.  The provider will be no more than a constructor function with a `$get` property. For\n * these cases the {@link AUTO.$provide $provide} service has additional helper methods to register\n * services without specifying a provider.\n *\n * * {@link AUTO.$provide#methods_provider provider(provider)} - registers a **service provider** with the\n *     {@link AUTO.$injector $injector}\n * * {@link AUTO.$provide#methods_constant constant(obj)} - registers a value/object that can be accessed by\n *     providers and services.\n * * {@link AUTO.$provide#methods_value value(obj)} - registers a value/object that can only be accessed by\n *     services, not providers.\n * * {@link AUTO.$provide#methods_factory factory(fn)} - registers a service **factory function**, `fn`,\n *     that will be wrapped in a **service provider** object, whose `$get` property will contain the\n *     given factory function.\n * * {@link AUTO.$provide#methods_service service(class)} - registers a **constructor function**, `class` that\n *     that will be wrapped in a **service provider** object, whose `$get` property will instantiate\n *      a new object using the given constructor function.\n *\n * See the individual methods for more information and examples.\n */\n\n/**\n * @ngdoc method\n * @name AUTO.$provide#provider\n * @methodOf AUTO.$provide\n * @description\n *\n * Register a **provider function** with the {@link AUTO.$injector $injector}. Provider functions\n * are constructor functions, whose instances are responsible for \"providing\" a factory for a\n * service.\n *\n * Service provider names start with the name of the service they provide followed by `Provider`.\n * For example, the {@link ng.$log $log} service has a provider called\n * {@link ng.$logProvider $logProvider}.\n *\n * Service provider objects can have additional methods which allow configuration of the provider\n * and its service. Importantly, you can configure what kind of service is created by the `$get`\n * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a\n * method {@link ng.$logProvider#debugEnabled debugEnabled}\n * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the\n * console or not.\n *\n * @param {string} name The name of the instance. NOTE: the provider will be available under `name +\n                        'Provider'` key.\n * @param {(Object|function())} provider If the provider is:\n *\n *   - `Object`: then it should have a `$get` method. The `$get` method will be invoked using\n *     {@link AUTO.$injector#invoke $injector.invoke()} when an instance needs to be created.\n *   - `Constructor`: a new instance of the provider will be created using                     \n *     {@link AUTO.$injector#instantiate $injector.instantiate()}, then treated as `object`.\n *\n * @returns {Object} registered provider instance\n\n * @example\n *\n * The following example shows how to create a simple event tracking service and register it using\n * {@link AUTO.$provide#methods_provider $provide.provider()}.\n *\n * <pre>\n *  // Define the eventTracker provider\n *  function EventTrackerProvider() {\n *    var trackingUrl = '/track';\n *\n *    // A provider method for configuring where the tracked events should been saved\n *    this.setTrackingUrl = function(url) {\n *      trackingUrl = url;\n *    };\n *\n *    // The service factory function\n *    this.$get = ['$http', function($http) {\n *      var trackedEvents = {};\n *      return {\n *        // Call this to track an event\n *        event: function(event) {\n *          var count = trackedEvents[event] || 0;\n *          count += 1;\n *          trackedEvents[event] = count;\n *          return count;\n *        },\n *        // Call this to save the tracked events to the trackingUrl\n *        save: function() {\n *          $http.post(trackingUrl, trackedEvents);\n *        }\n *      };\n *    }];\n *  }\n *\n *  describe('eventTracker', function() {\n *    var postSpy;\n *\n *    beforeEach(module(function($provide) {\n *      // Register the eventTracker provider\n *      $provide.provider('eventTracker', EventTrackerProvider);\n *    }));\n *\n *    beforeEach(module(function(eventTrackerProvider) {\n *      // Configure eventTracker provider\n *      eventTrackerProvider.setTrackingUrl('/custom-track');\n *    }));\n *\n *    it('tracks events', inject(function(eventTracker) {\n *      expect(eventTracker.event('login')).toEqual(1);\n *      expect(eventTracker.event('login')).toEqual(2);\n *    }));\n *\n *    it('saves to the tracking url', inject(function(eventTracker, $http) {\n *      postSpy = spyOn($http, 'post');\n *      eventTracker.event('login');\n *      eventTracker.save();\n *      expect(postSpy).toHaveBeenCalled();\n *      expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');\n *      expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');\n *      expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });\n *    }));\n *  });\n * </pre>\n */\n\n/**\n * @ngdoc method\n * @name AUTO.$provide#factory\n * @methodOf AUTO.$provide\n * @description\n *\n * Register a **service factory**, which will be called to return the service instance.\n * This is short for registering a service where its provider consists of only a `$get` property,\n * which is the given service factory function.\n * You should use {@link AUTO.$provide#factory $provide.factory(getFn)} if you do not need to\n * configure your service in a provider.\n *\n * @param {string} name The name of the instance.\n * @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand\n *                            for `$provide.provider(name, {$get: $getFn})`.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service\n * <pre>\n *   $provide.factory('ping', ['$http', function($http) {\n *     return function ping() {\n *       return $http.send('/ping');\n *     };\n *   }]);\n * </pre>\n * You would then inject and use this service like this:\n * <pre>\n *   someModule.controller('Ctrl', ['ping', function(ping) {\n *     ping();\n *   }]);\n * </pre>\n */\n\n\n/**\n * @ngdoc method\n * @name AUTO.$provide#service\n * @methodOf AUTO.$provide\n * @description\n *\n * Register a **service constructor**, which will be invoked with `new` to create the service\n * instance.\n * This is short for registering a service where its provider's `$get` property is the service\n * constructor function that will be used to instantiate the service instance.\n *\n * You should use {@link AUTO.$provide#methods_service $provide.service(class)} if you define your service\n * as a type/class.\n *\n * @param {string} name The name of the instance.\n * @param {Function} constructor A class (constructor function) that will be instantiated.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service using\n * {@link AUTO.$provide#methods_service $provide.service(class)}.\n * <pre>\n *   var Ping = function($http) {\n *     this.$http = $http;\n *   };\n * \n *   Ping.$inject = ['$http'];\n *   \n *   Ping.prototype.send = function() {\n *     return this.$http.get('/ping');\n *   };\n *   $provide.service('ping', Ping);\n * </pre>\n * You would then inject and use this service like this:\n * <pre>\n *   someModule.controller('Ctrl', ['ping', function(ping) {\n *     ping.send();\n *   }]);\n * </pre>\n */\n\n\n/**\n * @ngdoc method\n * @name AUTO.$provide#value\n * @methodOf AUTO.$provide\n * @description\n *\n * Register a **value service** with the {@link AUTO.$injector $injector}, such as a string, a\n * number, an array, an object or a function.  This is short for registering a service where its\n * provider's `$get` property is a factory function that takes no arguments and returns the **value\n * service**.\n *\n * Value services are similar to constant services, except that they cannot be injected into a\n * module configuration function (see {@link angular.Module#config}) but they can be overridden by\n * an Angular\n * {@link AUTO.$provide#decorator decorator}.\n *\n * @param {string} name The name of the instance.\n * @param {*} value The value.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here are some examples of creating value services.\n * <pre>\n *   $provide.value('ADMIN_USER', 'admin');\n *\n *   $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });\n *\n *   $provide.value('halfOf', function(value) {\n *     return value / 2;\n *   });\n * </pre>\n */\n\n\n/**\n * @ngdoc method\n * @name AUTO.$provide#constant\n * @methodOf AUTO.$provide\n * @description\n *\n * Register a **constant service**, such as a string, a number, an array, an object or a function,\n * with the {@link AUTO.$injector $injector}. Unlike {@link AUTO.$provide#value value} it can be\n * injected into a module configuration function (see {@link angular.Module#config}) and it cannot\n * be overridden by an Angular {@link AUTO.$provide#decorator decorator}.\n *\n * @param {string} name The name of the constant.\n * @param {*} value The constant value.\n * @returns {Object} registered instance\n *\n * @example\n * Here a some examples of creating constants:\n * <pre>\n *   $provide.constant('SHARD_HEIGHT', 306);\n *\n *   $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);\n *\n *   $provide.constant('double', function(value) {\n *     return value * 2;\n *   });\n * </pre>\n */\n\n\n/**\n * @ngdoc method\n * @name AUTO.$provide#decorator\n * @methodOf AUTO.$provide\n * @description\n *\n * Register a **service decorator** with the {@link AUTO.$injector $injector}. A service decorator\n * intercepts the creation of a service, allowing it to override or modify the behaviour of the\n * service. The object returned by the decorator may be the original service, or a new service\n * object which replaces or wraps and delegates to the original service.\n *\n * @param {string} name The name of the service to decorate.\n * @param {function()} decorator This function will be invoked when the service needs to be\n *    instantiated and should return the decorated service instance. The function is called using\n *    the {@link AUTO.$injector#invoke injector.invoke} method and is therefore fully injectable.\n *    Local injection arguments:\n *\n *    * `$delegate` - The original service instance, which can be monkey patched, configured,\n *      decorated or delegated to.\n *\n * @example\n * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting\n * calls to {@link ng.$log#error $log.warn()}.\n * <pre>\n *   $provide.decorator('$log', ['$delegate', function($delegate) {\n *     $delegate.warn = $delegate.error;\n *     return $delegate;\n *   }]);\n * </pre>\n */\n\n\nfunction createInjector(modulesToLoad) {\n  var INSTANTIATING = {},\n      providerSuffix = 'Provider',\n      path = [],\n      loadedModules = new HashMap(),\n      providerCache = {\n        $provide: {\n            provider: supportObject(provider),\n            factory: supportObject(factory),\n            service: supportObject(service),\n            value: supportObject(value),\n            constant: supportObject(constant),\n            decorator: decorator\n          }\n      },\n      providerInjector = (providerCache.$injector =\n          createInternalInjector(providerCache, function() {\n            throw $injectorMinErr('unpr', \"Unknown provider: {0}\", path.join(' <- '));\n          })),\n      instanceCache = {},\n      instanceInjector = (instanceCache.$injector =\n          createInternalInjector(instanceCache, function(servicename) {\n            var provider = providerInjector.get(servicename + providerSuffix);\n            return instanceInjector.invoke(provider.$get, provider);\n          }));\n\n\n  forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); });\n\n  return instanceInjector;\n\n  ////////////////////////////////////\n  // $provider\n  ////////////////////////////////////\n\n  function supportObject(delegate) {\n    return function(key, value) {\n      if (isObject(key)) {\n        forEach(key, reverseParams(delegate));\n      } else {\n        return delegate(key, value);\n      }\n    };\n  }\n\n  function provider(name, provider_) {\n    assertNotHasOwnProperty(name, 'service');\n    if (isFunction(provider_) || isArray(provider_)) {\n      provider_ = providerInjector.instantiate(provider_);\n    }\n    if (!provider_.$get) {\n      throw $injectorMinErr('pget', \"Provider '{0}' must define $get factory method.\", name);\n    }\n    return providerCache[name + providerSuffix] = provider_;\n  }\n\n  function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }\n\n  function service(name, constructor) {\n    return factory(name, ['$injector', function($injector) {\n      return $injector.instantiate(constructor);\n    }]);\n  }\n\n  function value(name, val) { return factory(name, valueFn(val)); }\n\n  function constant(name, value) {\n    assertNotHasOwnProperty(name, 'constant');\n    providerCache[name] = value;\n    instanceCache[name] = value;\n  }\n\n  function decorator(serviceName, decorFn) {\n    var origProvider = providerInjector.get(serviceName + providerSuffix),\n        orig$get = origProvider.$get;\n\n    origProvider.$get = function() {\n      var origInstance = instanceInjector.invoke(orig$get, origProvider);\n      return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});\n    };\n  }\n\n  ////////////////////////////////////\n  // Module Loading\n  ////////////////////////////////////\n  function loadModules(modulesToLoad){\n    var runBlocks = [], moduleFn, invokeQueue, i, ii;\n    forEach(modulesToLoad, function(module) {\n      if (loadedModules.get(module)) return;\n      loadedModules.put(module, true);\n\n      try {\n        if (isString(module)) {\n          moduleFn = angularModule(module);\n          runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);\n\n          for(invokeQueue = moduleFn._invokeQueue, i = 0, ii = invokeQueue.length; i < ii; i++) {\n            var invokeArgs = invokeQueue[i],\n                provider = providerInjector.get(invokeArgs[0]);\n\n            provider[invokeArgs[1]].apply(provider, invokeArgs[2]);\n          }\n        } else if (isFunction(module)) {\n            runBlocks.push(providerInjector.invoke(module));\n        } else if (isArray(module)) {\n            runBlocks.push(providerInjector.invoke(module));\n        } else {\n          assertArgFn(module, 'module');\n        }\n      } catch (e) {\n        if (isArray(module)) {\n          module = module[module.length - 1];\n        }\n        if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {\n          // Safari & FF's stack traces don't contain error.message content\n          // unlike those of Chrome and IE\n          // So if stack doesn't contain message, we create a new string that contains both.\n          // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.\n          /* jshint -W022 */\n          e = e.message + '\\n' + e.stack;\n        }\n        throw $injectorMinErr('modulerr', \"Failed to instantiate module {0} due to:\\n{1}\",\n                  module, e.stack || e.message || e);\n      }\n    });\n    return runBlocks;\n  }\n\n  ////////////////////////////////////\n  // internal Injector\n  ////////////////////////////////////\n\n  function createInternalInjector(cache, factory) {\n\n    function getService(serviceName) {\n      if (cache.hasOwnProperty(serviceName)) {\n        if (cache[serviceName] === INSTANTIATING) {\n          throw $injectorMinErr('cdep', 'Circular dependency found: {0}', path.join(' <- '));\n        }\n        return cache[serviceName];\n      } else {\n        try {\n          path.unshift(serviceName);\n          cache[serviceName] = INSTANTIATING;\n          return cache[serviceName] = factory(serviceName);\n        } catch (err) {\n          if (cache[serviceName] === INSTANTIATING) {\n            delete cache[serviceName];\n          }\n          throw err;\n        } finally {\n          path.shift();\n        }\n      }\n    }\n\n    function invoke(fn, self, locals){\n      var args = [],\n          $inject = annotate(fn),\n          length, i,\n          key;\n\n      for(i = 0, length = $inject.length; i < length; i++) {\n        key = $inject[i];\n        if (typeof key !== 'string') {\n          throw $injectorMinErr('itkn',\n                  'Incorrect injection token! Expected service name as string, got {0}', key);\n        }\n        args.push(\n          locals && locals.hasOwnProperty(key)\n          ? locals[key]\n          : getService(key)\n        );\n      }\n      if (!fn.$inject) {\n        // this means that we must be an array.\n        fn = fn[length];\n      }\n\n      // https://jsperf.com/angularjs-invoke-apply-vs-switch\n      // #5388\n      return fn.apply(self, args);\n    }\n\n    function instantiate(Type, locals) {\n      var Constructor = function() {},\n          instance, returnedValue;\n\n      // Check if Type is annotated and use just the given function at n-1 as parameter\n      // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);\n      Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;\n      instance = new Constructor();\n      returnedValue = invoke(Type, instance, locals);\n\n      return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;\n    }\n\n    return {\n      invoke: invoke,\n      instantiate: instantiate,\n      get: getService,\n      annotate: annotate,\n      has: function(name) {\n        return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);\n      }\n    };\n  }\n}\n\n/**\n * @ngdoc function\n * @name ng.$anchorScroll\n * @requires $window\n * @requires $location\n * @requires $rootScope\n *\n * @description\n * When called, it checks current value of `$location.hash()` and scroll to related element,\n * according to rules specified in\n * {@link http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document Html5 spec}.\n *\n * It also watches the `$location.hash()` and scrolls whenever it changes to match any anchor.\n * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`.\n * \n * @example\n   <example>\n     <file name=\"index.html\">\n       <div id=\"scrollArea\" ng-controller=\"ScrollCtrl\">\n         <a ng-click=\"gotoBottom()\">Go to bottom</a>\n         <a id=\"bottom\"></a> You're at the bottom!\n       </div>\n     </file>\n     <file name=\"script.js\">\n       function ScrollCtrl($scope, $location, $anchorScroll) {\n         $scope.gotoBottom = function (){\n           // set the location.hash to the id of\n           // the element you wish to scroll to.\n           $location.hash('bottom');\n           \n           // call $anchorScroll()\n           $anchorScroll();\n         }\n       }\n     </file>\n     <file name=\"style.css\">\n       #scrollArea {\n         height: 350px;\n         overflow: auto;\n       }\n\n       #bottom {\n         display: block;\n         margin-top: 2000px;\n       }\n     </file>\n   </example>\n */\nfunction $AnchorScrollProvider() {\n\n  var autoScrollingEnabled = true;\n\n  this.disableAutoScrolling = function() {\n    autoScrollingEnabled = false;\n  };\n\n  this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {\n    var document = $window.document;\n\n    // helper function to get first anchor from a NodeList\n    // can't use filter.filter, as it accepts only instances of Array\n    // and IE can't convert NodeList to an array using [].slice\n    // TODO(vojta): use filter if we change it to accept lists as well\n    function getFirstAnchor(list) {\n      var result = null;\n      forEach(list, function(element) {\n        if (!result && lowercase(element.nodeName) === 'a') result = element;\n      });\n      return result;\n    }\n\n    function scroll() {\n      var hash = $location.hash(), elm;\n\n      // empty hash, scroll to the top of the page\n      if (!hash) $window.scrollTo(0, 0);\n\n      // element with given id\n      else if ((elm = document.getElementById(hash))) elm.scrollIntoView();\n\n      // first anchor with given name :-D\n      else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) elm.scrollIntoView();\n\n      // no element and hash == 'top', scroll to the top of the page\n      else if (hash === 'top') $window.scrollTo(0, 0);\n    }\n\n    // does not scroll when user clicks on anchor link that is currently on\n    // (no url change, no $location.hash() change), browser native does scroll\n    if (autoScrollingEnabled) {\n      $rootScope.$watch(function autoScrollWatch() {return $location.hash();},\n        function autoScrollWatchAction() {\n          $rootScope.$evalAsync(scroll);\n        });\n    }\n\n    return scroll;\n  }];\n}\n\nvar $animateMinErr = minErr('$animate');\n\n/**\n * @ngdoc object\n * @name ng.$animateProvider\n *\n * @description\n * Default implementation of $animate that doesn't perform any animations, instead just\n * synchronously performs DOM\n * updates and calls done() callbacks.\n *\n * In order to enable animations the ngAnimate module has to be loaded.\n *\n * To see the functional implementation check out src/ngAnimate/animate.js\n */\nvar $AnimateProvider = ['$provide', function($provide) {\n\n  \n  this.$$selectors = {};\n\n\n  /**\n   * @ngdoc function\n   * @name ng.$animateProvider#register\n   * @methodOf ng.$animateProvider\n   *\n   * @description\n   * Registers a new injectable animation factory function. The factory function produces the\n   * animation object which contains callback functions for each event that is expected to be\n   * animated.\n   *\n   *   * `eventFn`: `function(Element, doneFunction)` The element to animate, the `doneFunction`\n   *   must be called once the element animation is complete. If a function is returned then the\n   *   animation service will use this function to cancel the animation whenever a cancel event is\n   *   triggered.\n   *\n   *\n   *<pre>\n   *   return {\n     *     eventFn : function(element, done) {\n     *       //code to run the animation\n     *       //once complete, then run done()\n     *       return function cancellationFunction() {\n     *         //code to cancel the animation\n     *       }\n     *     }\n     *   }\n   *</pre>\n   *\n   * @param {string} name The name of the animation.\n   * @param {function} factory The factory function that will be executed to return the animation\n   *                           object.\n   */\n  this.register = function(name, factory) {\n    var key = name + '-animation';\n    if (name && name.charAt(0) != '.') throw $animateMinErr('notcsel',\n        \"Expecting class selector starting with '.' got '{0}'.\", name);\n    this.$$selectors[name.substr(1)] = key;\n    $provide.factory(key, factory);\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.$animateProvider#classNameFilter\n   * @methodOf ng.$animateProvider\n   *\n   * @description\n   * Sets and/or returns the CSS class regular expression that is checked when performing\n   * an animation. Upon bootstrap the classNameFilter value is not set at all and will\n   * therefore enable $animate to attempt to perform an animation on any element.\n   * When setting the classNameFilter value, animations will only be performed on elements\n   * that successfully match the filter expression. This in turn can boost performance\n   * for low-powered devices as well as applications containing a lot of structural operations.\n   * @param {RegExp=} expression The className expression which will be checked against all animations\n   * @return {RegExp} The current CSS className expression value. If null then there is no expression value\n   */\n  this.classNameFilter = function(expression) {\n    if(arguments.length === 1) {\n      this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;\n    }\n    return this.$$classNameFilter;\n  };\n\n  this.$get = ['$timeout', function($timeout) {\n\n    /**\n     *\n     * @ngdoc object\n     * @name ng.$animate\n     * @description The $animate service provides rudimentary DOM manipulation functions to\n     * insert, remove and move elements within the DOM, as well as adding and removing classes.\n     * This service is the core service used by the ngAnimate $animator service which provides\n     * high-level animation hooks for CSS and JavaScript.\n     *\n     * $animate is available in the AngularJS core, however, the ngAnimate module must be included\n     * to enable full out animation support. Otherwise, $animate will only perform simple DOM\n     * manipulation operations.\n     *\n     * To learn more about enabling animation support, click here to visit the {@link ngAnimate\n     * ngAnimate module page} as well as the {@link ngAnimate.$animate ngAnimate $animate service\n     * page}.\n     */\n    return {\n\n      /**\n       *\n       * @ngdoc function\n       * @name ng.$animate#enter\n       * @methodOf ng.$animate\n       * @function\n       * @description Inserts the element into the DOM either after the `after` element or within\n       *   the `parent` element. Once complete, the done() callback will be fired (if provided).\n       * @param {jQuery/jqLite element} element the element which will be inserted into the DOM\n       * @param {jQuery/jqLite element} parent the parent element which will append the element as\n       *   a child (if the after element is not present)\n       * @param {jQuery/jqLite element} after the sibling element which will append the element\n       *   after itself\n       * @param {function=} done callback function that will be called after the element has been\n       *   inserted into the DOM\n       */\n      enter : function(element, parent, after, done) {\n        if (after) {\n          after.after(element);\n        } else {\n          if (!parent || !parent[0]) {\n            parent = after.parent();\n          }\n          parent.append(element);\n        }\n        done && $timeout(done, 0, false);\n      },\n\n      /**\n       *\n       * @ngdoc function\n       * @name ng.$animate#leave\n       * @methodOf ng.$animate\n       * @function\n       * @description Removes the element from the DOM. Once complete, the done() callback will be\n       *   fired (if provided).\n       * @param {jQuery/jqLite element} element the element which will be removed from the DOM\n       * @param {function=} done callback function that will be called after the element has been\n       *   removed from the DOM\n       */\n      leave : function(element, done) {\n        element.remove();\n        done && $timeout(done, 0, false);\n      },\n\n      /**\n       *\n       * @ngdoc function\n       * @name ng.$animate#move\n       * @methodOf ng.$animate\n       * @function\n       * @description Moves the position of the provided element within the DOM to be placed\n       * either after the `after` element or inside of the `parent` element. Once complete, the\n       * done() callback will be fired (if provided).\n       * \n       * @param {jQuery/jqLite element} element the element which will be moved around within the\n       *   DOM\n       * @param {jQuery/jqLite element} parent the parent element where the element will be\n       *   inserted into (if the after element is not present)\n       * @param {jQuery/jqLite element} after the sibling element where the element will be\n       *   positioned next to\n       * @param {function=} done the callback function (if provided) that will be fired after the\n       *   element has been moved to its new position\n       */\n      move : function(element, parent, after, done) {\n        // Do not remove element before insert. Removing will cause data associated with the\n        // element to be dropped. Insert will implicitly do the remove.\n        this.enter(element, parent, after, done);\n      },\n\n      /**\n       *\n       * @ngdoc function\n       * @name ng.$animate#addClass\n       * @methodOf ng.$animate\n       * @function\n       * @description Adds the provided className CSS class value to the provided element. Once\n       * complete, the done() callback will be fired (if provided).\n       * @param {jQuery/jqLite element} element the element which will have the className value\n       *   added to it\n       * @param {string} className the CSS class which will be added to the element\n       * @param {function=} done the callback function (if provided) that will be fired after the\n       *   className value has been added to the element\n       */\n      addClass : function(element, className, done) {\n        className = isString(className) ?\n                      className :\n                      isArray(className) ? className.join(' ') : '';\n        forEach(element, function (element) {\n          jqLiteAddClass(element, className);\n        });\n        done && $timeout(done, 0, false);\n      },\n\n      /**\n       *\n       * @ngdoc function\n       * @name ng.$animate#removeClass\n       * @methodOf ng.$animate\n       * @function\n       * @description Removes the provided className CSS class value from the provided element.\n       * Once complete, the done() callback will be fired (if provided).\n       * @param {jQuery/jqLite element} element the element which will have the className value\n       *   removed from it\n       * @param {string} className the CSS class which will be removed from the element\n       * @param {function=} done the callback function (if provided) that will be fired after the\n       *   className value has been removed from the element\n       */\n      removeClass : function(element, className, done) {\n        className = isString(className) ?\n                      className :\n                      isArray(className) ? className.join(' ') : '';\n        forEach(element, function (element) {\n          jqLiteRemoveClass(element, className);\n        });\n        done && $timeout(done, 0, false);\n      },\n\n      enabled : noop\n    };\n  }];\n}];\n\n/**\n * ! This is a private undocumented service !\n *\n * @name ng.$browser\n * @requires $log\n * @description\n * This object has two goals:\n *\n * - hide all the global state in the browser caused by the window object\n * - abstract away all the browser specific features and inconsistencies\n *\n * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`\n * service, which can be used for convenient testing of the application without the interaction with\n * the real browser apis.\n */\n/**\n * @param {object} window The global window object.\n * @param {object} document jQuery wrapped document.\n * @param {function()} XHR XMLHttpRequest constructor.\n * @param {object} $log console.log or an object with the same interface.\n * @param {object} $sniffer $sniffer service\n */\nfunction Browser(window, document, $log, $sniffer) {\n  var self = this,\n      rawDocument = document[0],\n      location = window.location,\n      history = window.history,\n      setTimeout = window.setTimeout,\n      clearTimeout = window.clearTimeout,\n      pendingDeferIds = {};\n\n  self.isMock = false;\n\n  var outstandingRequestCount = 0;\n  var outstandingRequestCallbacks = [];\n\n  // TODO(vojta): remove this temporary api\n  self.$$completeOutstandingRequest = completeOutstandingRequest;\n  self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };\n\n  /**\n   * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`\n   * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.\n   */\n  function completeOutstandingRequest(fn) {\n    try {\n      fn.apply(null, sliceArgs(arguments, 1));\n    } finally {\n      outstandingRequestCount--;\n      if (outstandingRequestCount === 0) {\n        while(outstandingRequestCallbacks.length) {\n          try {\n            outstandingRequestCallbacks.pop()();\n          } catch (e) {\n            $log.error(e);\n          }\n        }\n      }\n    }\n  }\n\n  /**\n   * @private\n   * Note: this method is used only by scenario runner\n   * TODO(vojta): prefix this method with $$ ?\n   * @param {function()} callback Function that will be called when no outstanding request\n   */\n  self.notifyWhenNoOutstandingRequests = function(callback) {\n    // force browser to execute all pollFns - this is needed so that cookies and other pollers fire\n    // at some deterministic time in respect to the test runner's actions. Leaving things up to the\n    // regular poller would result in flaky tests.\n    forEach(pollFns, function(pollFn){ pollFn(); });\n\n    if (outstandingRequestCount === 0) {\n      callback();\n    } else {\n      outstandingRequestCallbacks.push(callback);\n    }\n  };\n\n  //////////////////////////////////////////////////////////////\n  // Poll Watcher API\n  //////////////////////////////////////////////////////////////\n  var pollFns = [],\n      pollTimeout;\n\n  /**\n   * @name ng.$browser#addPollFn\n   * @methodOf ng.$browser\n   *\n   * @param {function()} fn Poll function to add\n   *\n   * @description\n   * Adds a function to the list of functions that poller periodically executes,\n   * and starts polling if not started yet.\n   *\n   * @returns {function()} the added function\n   */\n  self.addPollFn = function(fn) {\n    if (isUndefined(pollTimeout)) startPoller(100, setTimeout);\n    pollFns.push(fn);\n    return fn;\n  };\n\n  /**\n   * @param {number} interval How often should browser call poll functions (ms)\n   * @param {function()} setTimeout Reference to a real or fake `setTimeout` function.\n   *\n   * @description\n   * Configures the poller to run in the specified intervals, using the specified\n   * setTimeout fn and kicks it off.\n   */\n  function startPoller(interval, setTimeout) {\n    (function check() {\n      forEach(pollFns, function(pollFn){ pollFn(); });\n      pollTimeout = setTimeout(check, interval);\n    })();\n  }\n\n  //////////////////////////////////////////////////////////////\n  // URL API\n  //////////////////////////////////////////////////////////////\n\n  var lastBrowserUrl = location.href,\n      baseElement = document.find('base'),\n      newLocation = null;\n\n  /**\n   * @name ng.$browser#url\n   * @methodOf ng.$browser\n   *\n   * @description\n   * GETTER:\n   * Without any argument, this method just returns current value of location.href.\n   *\n   * SETTER:\n   * With at least one argument, this method sets url to new value.\n   * If html5 history api supported, pushState/replaceState is used, otherwise\n   * location.href/location.replace is used.\n   * Returns its own instance to allow chaining\n   *\n   * NOTE: this api is intended for use only by the $location service. Please use the\n   * {@link ng.$location $location service} to change url.\n   *\n   * @param {string} url New url (when used as setter)\n   * @param {boolean=} replace Should new url replace current history record ?\n   */\n  self.url = function(url, replace) {\n    // Android Browser BFCache causes location, history reference to become stale.\n    if (location !== window.location) location = window.location;\n    if (history !== window.history) history = window.history;\n\n    // setter\n    if (url) {\n      if (lastBrowserUrl == url) return;\n      lastBrowserUrl = url;\n      if ($sniffer.history) {\n        if (replace) history.replaceState(null, '', url);\n        else {\n          history.pushState(null, '', url);\n          // Crazy Opera Bug: http://my.opera.com/community/forums/topic.dml?id=1185462\n          baseElement.attr('href', baseElement.attr('href'));\n        }\n      } else {\n        newLocation = url;\n        if (replace) {\n          location.replace(url);\n        } else {\n          location.href = url;\n        }\n      }\n      return self;\n    // getter\n    } else {\n      // - newLocation is a workaround for an IE7-9 issue with location.replace and location.href\n      //   methods not updating location.href synchronously.\n      // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172\n      return newLocation || location.href.replace(/%27/g,\"'\");\n    }\n  };\n\n  var urlChangeListeners = [],\n      urlChangeInit = false;\n\n  function fireUrlChange() {\n    newLocation = null;\n    if (lastBrowserUrl == self.url()) return;\n\n    lastBrowserUrl = self.url();\n    forEach(urlChangeListeners, function(listener) {\n      listener(self.url());\n    });\n  }\n\n  /**\n   * @name ng.$browser#onUrlChange\n   * @methodOf ng.$browser\n   * @TODO(vojta): refactor to use node's syntax for events\n   *\n   * @description\n   * Register callback function that will be called, when url changes.\n   *\n   * It's only called when the url is changed from outside of angular:\n   * - user types different url into address bar\n   * - user clicks on history (forward/back) button\n   * - user clicks on a link\n   *\n   * It's not called when url is changed by $browser.url() method\n   *\n   * The listener gets called with new url as parameter.\n   *\n   * NOTE: this api is intended for use only by the $location service. Please use the\n   * {@link ng.$location $location service} to monitor url changes in angular apps.\n   *\n   * @param {function(string)} listener Listener function to be called when url changes.\n   * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.\n   */\n  self.onUrlChange = function(callback) {\n    if (!urlChangeInit) {\n      // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)\n      // don't fire popstate when user change the address bar and don't fire hashchange when url\n      // changed by push/replaceState\n\n      // html5 history api - popstate event\n      if ($sniffer.history) jqLite(window).on('popstate', fireUrlChange);\n      // hashchange event\n      if ($sniffer.hashchange) jqLite(window).on('hashchange', fireUrlChange);\n      // polling\n      else self.addPollFn(fireUrlChange);\n\n      urlChangeInit = true;\n    }\n\n    urlChangeListeners.push(callback);\n    return callback;\n  };\n\n  //////////////////////////////////////////////////////////////\n  // Misc API\n  //////////////////////////////////////////////////////////////\n\n  /**\n   * @name ng.$browser#baseHref\n   * @methodOf ng.$browser\n   *\n   * @description\n   * Returns current <base href>\n   * (always relative - without domain)\n   *\n   * @returns {string=} current <base href>\n   */\n  self.baseHref = function() {\n    var href = baseElement.attr('href');\n    return href ? href.replace(/^(https?\\:)?\\/\\/[^\\/]*/, '') : '';\n  };\n\n  //////////////////////////////////////////////////////////////\n  // Cookies API\n  //////////////////////////////////////////////////////////////\n  var lastCookies = {};\n  var lastCookieString = '';\n  var cookiePath = self.baseHref();\n\n  /**\n   * @name ng.$browser#cookies\n   * @methodOf ng.$browser\n   *\n   * @param {string=} name Cookie name\n   * @param {string=} value Cookie value\n   *\n   * @description\n   * The cookies method provides a 'private' low level access to browser cookies.\n   * It is not meant to be used directly, use the $cookie service instead.\n   *\n   * The return values vary depending on the arguments that the method was called with as follows:\n   *\n   * - cookies() -> hash of all cookies, this is NOT a copy of the internal state, so do not modify\n   *   it\n   * - cookies(name, value) -> set name to value, if value is undefined delete the cookie\n   * - cookies(name) -> the same as (name, undefined) == DELETES (no one calls it right now that\n   *   way)\n   *\n   * @returns {Object} Hash of all cookies (if called without any parameter)\n   */\n  self.cookies = function(name, value) {\n    /* global escape: false, unescape: false */\n    var cookieLength, cookieArray, cookie, i, index;\n\n    if (name) {\n      if (value === undefined) {\n        rawDocument.cookie = escape(name) + \"=;path=\" + cookiePath +\n                                \";expires=Thu, 01 Jan 1970 00:00:00 GMT\";\n      } else {\n        if (isString(value)) {\n          cookieLength = (rawDocument.cookie = escape(name) + '=' + escape(value) +\n                                ';path=' + cookiePath).length + 1;\n\n          // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:\n          // - 300 cookies\n          // - 20 cookies per unique domain\n          // - 4096 bytes per cookie\n          if (cookieLength > 4096) {\n            $log.warn(\"Cookie '\"+ name +\n              \"' possibly not set or overflowed because it was too large (\"+\n              cookieLength + \" > 4096 bytes)!\");\n          }\n        }\n      }\n    } else {\n      if (rawDocument.cookie !== lastCookieString) {\n        lastCookieString = rawDocument.cookie;\n        cookieArray = lastCookieString.split(\"; \");\n        lastCookies = {};\n\n        for (i = 0; i < cookieArray.length; i++) {\n          cookie = cookieArray[i];\n          index = cookie.indexOf('=');\n          if (index > 0) { //ignore nameless cookies\n            name = unescape(cookie.substring(0, index));\n            // the first value that is seen for a cookie is the most\n            // specific one.  values for the same cookie name that\n            // follow are for less specific paths.\n            if (lastCookies[name] === undefined) {\n              lastCookies[name] = unescape(cookie.substring(index + 1));\n            }\n          }\n        }\n      }\n      return lastCookies;\n    }\n  };\n\n\n  /**\n   * @name ng.$browser#defer\n   * @methodOf ng.$browser\n   * @param {function()} fn A function, who's execution should be deferred.\n   * @param {number=} [delay=0] of milliseconds to defer the function execution.\n   * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.\n   *\n   * @description\n   * Executes a fn asynchronously via `setTimeout(fn, delay)`.\n   *\n   * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using\n   * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed\n   * via `$browser.defer.flush()`.\n   *\n   */\n  self.defer = function(fn, delay) {\n    var timeoutId;\n    outstandingRequestCount++;\n    timeoutId = setTimeout(function() {\n      delete pendingDeferIds[timeoutId];\n      completeOutstandingRequest(fn);\n    }, delay || 0);\n    pendingDeferIds[timeoutId] = true;\n    return timeoutId;\n  };\n\n\n  /**\n   * @name ng.$browser#defer.cancel\n   * @methodOf ng.$browser.defer\n   *\n   * @description\n   * Cancels a deferred task identified with `deferId`.\n   *\n   * @param {*} deferId Token returned by the `$browser.defer` function.\n   * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n   *                    canceled.\n   */\n  self.defer.cancel = function(deferId) {\n    if (pendingDeferIds[deferId]) {\n      delete pendingDeferIds[deferId];\n      clearTimeout(deferId);\n      completeOutstandingRequest(noop);\n      return true;\n    }\n    return false;\n  };\n\n}\n\nfunction $BrowserProvider(){\n  this.$get = ['$window', '$log', '$sniffer', '$document',\n      function( $window,   $log,   $sniffer,   $document){\n        return new Browser($window, $document, $log, $sniffer);\n      }];\n}\n\n/**\n * @ngdoc object\n * @name ng.$cacheFactory\n *\n * @description\n * Factory that constructs cache objects and gives access to them.\n * \n * <pre>\n * \n *  var cache = $cacheFactory('cacheId');\n *  expect($cacheFactory.get('cacheId')).toBe(cache);\n *  expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();\n *\n *  cache.put(\"key\", \"value\");\n *  cache.put(\"another key\", \"another value\");\n *\n *  // We've specified no options on creation\n *  expect(cache.info()).toEqual({id: 'cacheId', size: 2}); \n * \n * </pre>\n *\n *\n * @param {string} cacheId Name or id of the newly created cache.\n * @param {object=} options Options object that specifies the cache behavior. Properties:\n *\n *   - `{number=}` `capacity` — turns the cache into LRU cache.\n *\n * @returns {object} Newly created cache object with the following set of methods:\n *\n * - `{object}` `info()` — Returns id, size, and options of cache.\n * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns\n *   it.\n * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.\n * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.\n * - `{void}` `removeAll()` — Removes all cached values.\n * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.\n *\n */\nfunction $CacheFactoryProvider() {\n\n  this.$get = function() {\n    var caches = {};\n\n    function cacheFactory(cacheId, options) {\n      if (cacheId in caches) {\n        throw minErr('$cacheFactory')('iid', \"CacheId '{0}' is already taken!\", cacheId);\n      }\n\n      var size = 0,\n          stats = extend({}, options, {id: cacheId}),\n          data = {},\n          capacity = (options && options.capacity) || Number.MAX_VALUE,\n          lruHash = {},\n          freshEnd = null,\n          staleEnd = null;\n\n      return caches[cacheId] = {\n\n        put: function(key, value) {\n          var lruEntry = lruHash[key] || (lruHash[key] = {key: key});\n\n          refresh(lruEntry);\n\n          if (isUndefined(value)) return;\n          if (!(key in data)) size++;\n          data[key] = value;\n\n          if (size > capacity) {\n            this.remove(staleEnd.key);\n          }\n\n          return value;\n        },\n\n\n        get: function(key) {\n          var lruEntry = lruHash[key];\n\n          if (!lruEntry) return;\n\n          refresh(lruEntry);\n\n          return data[key];\n        },\n\n\n        remove: function(key) {\n          var lruEntry = lruHash[key];\n\n          if (!lruEntry) return;\n\n          if (lruEntry == freshEnd) freshEnd = lruEntry.p;\n          if (lruEntry == staleEnd) staleEnd = lruEntry.n;\n          link(lruEntry.n,lruEntry.p);\n\n          delete lruHash[key];\n          delete data[key];\n          size--;\n        },\n\n\n        removeAll: function() {\n          data = {};\n          size = 0;\n          lruHash = {};\n          freshEnd = staleEnd = null;\n        },\n\n\n        destroy: function() {\n          data = null;\n          stats = null;\n          lruHash = null;\n          delete caches[cacheId];\n        },\n\n\n        info: function() {\n          return extend({}, stats, {size: size});\n        }\n      };\n\n\n      /**\n       * makes the `entry` the freshEnd of the LRU linked list\n       */\n      function refresh(entry) {\n        if (entry != freshEnd) {\n          if (!staleEnd) {\n            staleEnd = entry;\n          } else if (staleEnd == entry) {\n            staleEnd = entry.n;\n          }\n\n          link(entry.n, entry.p);\n          link(entry, freshEnd);\n          freshEnd = entry;\n          freshEnd.n = null;\n        }\n      }\n\n\n      /**\n       * bidirectionally links two entries of the LRU linked list\n       */\n      function link(nextEntry, prevEntry) {\n        if (nextEntry != prevEntry) {\n          if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify\n          if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify\n        }\n      }\n    }\n\n\n  /**\n   * @ngdoc method\n   * @name ng.$cacheFactory#info\n   * @methodOf ng.$cacheFactory\n   *\n   * @description\n   * Get information about all the of the caches that have been created\n   *\n   * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`\n   */\n    cacheFactory.info = function() {\n      var info = {};\n      forEach(caches, function(cache, cacheId) {\n        info[cacheId] = cache.info();\n      });\n      return info;\n    };\n\n\n  /**\n   * @ngdoc method\n   * @name ng.$cacheFactory#get\n   * @methodOf ng.$cacheFactory\n   *\n   * @description\n   * Get access to a cache object by the `cacheId` used when it was created.\n   *\n   * @param {string} cacheId Name or id of a cache to access.\n   * @returns {object} Cache object identified by the cacheId or undefined if no such cache.\n   */\n    cacheFactory.get = function(cacheId) {\n      return caches[cacheId];\n    };\n\n\n    return cacheFactory;\n  };\n}\n\n/**\n * @ngdoc object\n * @name ng.$templateCache\n *\n * @description\n * The first time a template is used, it is loaded in the template cache for quick retrieval. You\n * can load templates directly into the cache in a `script` tag, or by consuming the\n * `$templateCache` service directly.\n * \n * Adding via the `script` tag:\n * <pre>\n * <html ng-app>\n * <head>\n * <script type=\"text/ng-template\" id=\"templateId.html\">\n *   This is the content of the template\n * </script>\n * </head>\n *   ...\n * </html>\n * </pre>\n * \n * **Note:** the `script` tag containing the template does not need to be included in the `head` of\n * the document, but it must be below the `ng-app` definition.\n * \n * Adding via the $templateCache service:\n * \n * <pre>\n * var myApp = angular.module('myApp', []);\n * myApp.run(function($templateCache) {\n *   $templateCache.put('templateId.html', 'This is the content of the template');\n * });\n * </pre>\n * \n * To retrieve the template later, simply use it in your HTML:\n * <pre>\n * <div ng-include=\" 'templateId.html' \"></div>\n * </pre>\n * \n * or get it via Javascript:\n * <pre>\n * $templateCache.get('templateId.html')\n * </pre>\n * \n * See {@link ng.$cacheFactory $cacheFactory}.\n *\n */\nfunction $TemplateCacheProvider() {\n  this.$get = ['$cacheFactory', function($cacheFactory) {\n    return $cacheFactory('templates');\n  }];\n}\n\n/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!\n *\n * DOM-related variables:\n *\n * - \"node\" - DOM Node\n * - \"element\" - DOM Element or Node\n * - \"$node\" or \"$element\" - jqLite-wrapped node or element\n *\n *\n * Compiler related stuff:\n *\n * - \"linkFn\" - linking fn of a single directive\n * - \"nodeLinkFn\" - function that aggregates all linking fns for a particular node\n * - \"childLinkFn\" -  function that aggregates all linking fns for child nodes of a particular node\n * - \"compositeLinkFn\" - function that aggregates all linking fns for a compilation root (nodeList)\n */\n\n\n/**\n * @ngdoc function\n * @name ng.$compile\n * @function\n *\n * @description\n * Compiles an HTML string or DOM into a template and produces a template function, which\n * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.\n *\n * The compilation is a process of walking the DOM tree and matching DOM elements to\n * {@link ng.$compileProvider#methods_directive directives}.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** This document is an in-depth reference of all directive options.\n * For a gentle introduction to directives with examples of common use cases,\n * see the {@link guide/directive directive guide}.\n * </div>\n *\n * ## Comprehensive Directive API\n *\n * There are many different options for a directive.\n *\n * The difference resides in the return value of the factory function.\n * You can either return a \"Directive Definition Object\" (see below) that defines the directive properties,\n * or just the `postLink` function (all other properties will have the default values).\n *\n * <div class=\"alert alert-success\">\n * **Best Practice:** It's recommended to use the \"directive definition object\" form.\n * </div>\n *\n * Here's an example directive declared with a Directive Definition Object:\n *\n * <pre>\n *   var myModule = angular.module(...);\n *\n *   myModule.directive('directiveName', function factory(injectables) {\n *     var directiveDefinitionObject = {\n *       priority: 0,\n *       template: '<div></div>', // or // function(tElement, tAttrs) { ... },\n *       // or\n *       // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },\n *       replace: false,\n *       transclude: false,\n *       restrict: 'A',\n *       scope: false,\n *       controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },\n *       require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],\n *       compile: function compile(tElement, tAttrs, transclude) {\n *         return {\n *           pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n *           post: function postLink(scope, iElement, iAttrs, controller) { ... }\n *         }\n *         // or\n *         // return function postLink( ... ) { ... }\n *       },\n *       // or\n *       // link: {\n *       //  pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n *       //  post: function postLink(scope, iElement, iAttrs, controller) { ... }\n *       // }\n *       // or\n *       // link: function postLink( ... ) { ... }\n *     };\n *     return directiveDefinitionObject;\n *   });\n * </pre>\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Any unspecified options will use the default value. You can see the default values below.\n * </div>\n *\n * Therefore the above can be simplified as:\n *\n * <pre>\n *   var myModule = angular.module(...);\n *\n *   myModule.directive('directiveName', function factory(injectables) {\n *     var directiveDefinitionObject = {\n *       link: function postLink(scope, iElement, iAttrs) { ... }\n *     };\n *     return directiveDefinitionObject;\n *     // or\n *     // return function postLink(scope, iElement, iAttrs) { ... }\n *   });\n * </pre>\n *\n *\n *\n * ### Directive Definition Object\n *\n * The directive definition object provides instructions to the {@link api/ng.$compile\n * compiler}. The attributes are:\n *\n * #### `priority`\n * When there are multiple directives defined on a single DOM element, sometimes it\n * is necessary to specify the order in which the directives are applied. The `priority` is used\n * to sort the directives before their `compile` functions get called. Priority is defined as a\n * number. Directives with greater numerical `priority` are compiled first. Pre-link functions\n * are also run in priority order, but post-link functions are run in reverse order. The order\n * of directives with the same priority is undefined. The default priority is `0`.\n *\n * #### `terminal`\n * If set to true then the current `priority` will be the last set of directives\n * which will execute (any directives at the current priority will still execute\n * as the order of execution on same `priority` is undefined).\n *\n * #### `scope`\n * **If set to `true`,** then a new scope will be created for this directive. If multiple directives on the\n * same element request a new scope, only one new scope is created. The new scope rule does not\n * apply for the root of the template since the root of the template always gets a new scope.\n *\n * **If set to `{}` (object hash),** then a new \"isolate\" scope is created. The 'isolate' scope differs from\n * normal scope in that it does not prototypically inherit from the parent scope. This is useful\n * when creating reusable components, which should not accidentally read or modify data in the\n * parent scope.\n *\n * The 'isolate' scope takes an object hash which defines a set of local scope properties\n * derived from the parent scope. These local properties are useful for aliasing values for\n * templates. Locals definition is a hash of local scope property to its source:\n *\n * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is\n *   always a string since DOM attributes are strings. If no `attr` name is specified  then the\n *   attribute name is assumed to be the same as the local name.\n *   Given `<widget my-attr=\"hello {{name}}\">` and widget definition\n *   of `scope: { localName:'@myAttr' }`, then widget scope property `localName` will reflect\n *   the interpolated value of `hello {{name}}`. As the `name` attribute changes so will the\n *   `localName` property on the widget scope. The `name` is read from the parent scope (not\n *   component scope).\n *\n * * `=` or `=attr` - set up bi-directional binding between a local scope property and the\n *   parent scope property of name defined via the value of the `attr` attribute. If no `attr`\n *   name is specified then the attribute name is assumed to be the same as the local name.\n *   Given `<widget my-attr=\"parentModel\">` and widget definition of\n *   `scope: { localModel:'=myAttr' }`, then widget scope property `localModel` will reflect the\n *   value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected\n *   in `localModel` and any changes in `localModel` will reflect in `parentModel`. If the parent\n *   scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You\n *   can avoid this behavior using `=?` or `=?attr` in order to flag the property as optional.\n *\n * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope.\n *   If no `attr` name is specified then the attribute name is assumed to be the same as the\n *   local name. Given `<widget my-attr=\"count = count + value\">` and widget definition of\n *   `scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to\n *   a function wrapper for the `count = count + value` expression. Often it's desirable to\n *   pass data from the isolated scope via an expression and to the parent scope, this can be\n *   done by passing a map of local variable names and values into the expression wrapper fn.\n *   For example, if the expression is `increment(amount)` then we can specify the amount value\n *   by calling the `localFn` as `localFn({amount: 22})`.\n *\n *\n *\n * #### `controller`\n * Controller constructor function. The controller is instantiated before the\n * pre-linking phase and it is shared with other directives (see\n * `require` attribute). This allows the directives to communicate with each other and augment\n * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:\n *\n * * `$scope` - Current scope associated with the element\n * * `$element` - Current element\n * * `$attrs` - Current attributes object for the element\n * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope.\n *    The scope can be overridden by an optional first argument.\n *   `function([scope], cloneLinkingFn)`.\n *\n *\n * #### `require`\n * Require another directive and inject its controller as the fourth argument to the linking function. The\n * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the\n * injected argument will be an array in corresponding order. If no such directive can be\n * found, or if the directive does not have a controller, then an error is raised. The name can be prefixed with:\n *\n * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.\n * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.\n * * `^` - Locate the required controller by searching the element's parents. Throw an error if not found.\n * * `?^` - Attempt to locate the required controller by searching the element's parents or pass `null` to the\n *   `link` fn if not found.\n *\n *\n * #### `controllerAs`\n * Controller alias at the directive scope. An alias for the controller so it\n * can be referenced at the directive template. The directive needs to define a scope for this\n * configuration to be used. Useful in the case when directive is used as component.\n *\n *\n * #### `restrict`\n * String of subset of `EACM` which restricts the directive to a specific directive\n * declaration style. If omitted, the default (attributes only) is used.\n *\n * * `E` - Element name: `<my-directive></my-directive>`\n * * `A` - Attribute (default): `<div my-directive=\"exp\"></div>`\n * * `C` - Class: `<div class=\"my-directive: exp;\"></div>`\n * * `M` - Comment: `<!-- directive: my-directive exp -->`\n *\n *\n * #### `template`\n * replace the current element with the contents of the HTML. The replacement process\n * migrates all of the attributes / classes from the old element to the new one. See the\n * {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive\n * Directives Guide} for an example.\n *\n * You can specify `template` as a string representing the template or as a function which takes\n * two arguments `tElement` and `tAttrs` (described in the `compile` function api below) and\n * returns a string value representing the template.\n *\n *\n * #### `templateUrl`\n * Same as `template` but the template is loaded from the specified URL. Because\n * the template loading is asynchronous the compilation/linking is suspended until the template\n * is loaded.\n *\n * You can specify `templateUrl` as a string representing the URL or as a function which takes two\n * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns\n * a string value representing the url.  In either case, the template URL is passed through {@link\n * api/ng.$sce#methods_getTrustedResourceUrl $sce.getTrustedResourceUrl}.\n *\n *\n * #### `replace`\n * specify where the template should be inserted. Defaults to `false`.\n *\n * * `true` - the template will replace the current element.\n * * `false` - the template will replace the contents of the current element.\n *\n *\n * #### `transclude`\n * compile the content of the element and make it available to the directive.\n * Typically used with {@link api/ng.directive:ngTransclude\n * ngTransclude}. The advantage of transclusion is that the linking function receives a\n * transclusion function which is pre-bound to the correct scope. In a typical setup the widget\n * creates an `isolate` scope, but the transclusion is not a child, but a sibling of the `isolate`\n * scope. This makes it possible for the widget to have private state, and the transclusion to\n * be bound to the parent (pre-`isolate`) scope.\n *\n * * `true` - transclude the content of the directive.\n * * `'element'` - transclude the whole element including any directives defined at lower priority.\n *\n *\n * #### `compile`\n *\n * <pre>\n *   function compile(tElement, tAttrs, transclude) { ... }\n * </pre>\n *\n * The compile function deals with transforming the template DOM. Since most directives do not do\n * template transformation, it is not used often. Examples that require compile functions are\n * directives that transform template DOM, such as {@link\n * api/ng.directive:ngRepeat ngRepeat}, or load the contents\n * asynchronously, such as {@link api/ngRoute.directive:ngView ngView}. The\n * compile function takes the following arguments.\n *\n *   * `tElement` - template element - The element where the directive has been declared. It is\n *     safe to do template transformation on the element and child elements only.\n *\n *   * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared\n *     between all directive compile functions.\n *\n *   * `transclude` -  [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`\n *\n * <div class=\"alert alert-warning\">\n * **Note:** The template instance and the link instance may be different objects if the template has\n * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that\n * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration\n * should be done in a linking function rather than in a compile function.\n * </div>\n *\n * <div class=\"alert alert-error\">\n * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it\n *   e.g. does not know about the right outer scope. Please use the transclude function that is passed\n *   to the link function instead.\n * </div>\n\n * A compile function can have a return value which can be either a function or an object.\n *\n * * returning a (post-link) function - is equivalent to registering the linking function via the\n *   `link` property of the config object when the compile function is empty.\n *\n * * returning an object with function(s) registered via `pre` and `post` properties - allows you to\n *   control when a linking function should be called during the linking phase. See info about\n *   pre-linking and post-linking functions below.\n *\n *\n * #### `link`\n * This property is used only if the `compile` property is not defined.\n *\n * <pre>\n *   function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }\n * </pre>\n *\n * The link function is responsible for registering DOM listeners as well as updating the DOM. It is\n * executed after the template has been cloned. This is where most of the directive logic will be\n * put.\n *\n *   * `scope` - {@link api/ng.$rootScope.Scope Scope} - The scope to be used by the\n *     directive for registering {@link api/ng.$rootScope.Scope#methods_$watch watches}.\n *\n *   * `iElement` - instance element - The element where the directive is to be used. It is safe to\n *     manipulate the children of the element only in `postLink` function since the children have\n *     already been linked.\n *\n *   * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared\n *     between all directive linking functions.\n *\n *   * `controller` - a controller instance - A controller instance if at least one directive on the\n *     element defines a controller. The controller is shared among all the directives, which allows\n *     the directives to use the controllers as a communication channel.\n *\n *   * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.\n *     The scope can be overridden by an optional first argument. This is the same as the `$transclude`\n *     parameter of directive controllers.\n *     `function([scope], cloneLinkingFn)`.\n *\n *\n * #### Pre-linking function\n *\n * Executed before the child elements are linked. Not safe to do DOM transformation since the\n * compiler linking function will fail to locate the correct elements for linking.\n *\n * #### Post-linking function\n *\n * Executed after the child elements are linked. It is safe to do DOM transformation in the post-linking function.\n *\n * <a name=\"Attributes\"></a>\n * ### Attributes\n *\n * The {@link api/ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the\n * `link()` or `compile()` functions. It has a variety of uses.\n *\n * accessing *Normalized attribute names:*\n * Directives like 'ngBind' can be expressed in many ways: 'ng:bind', `data-ng-bind`, or 'x-ng-bind'.\n * the attributes object allows for normalized access to\n *   the attributes.\n *\n * * *Directive inter-communication:* All directives share the same instance of the attributes\n *   object which allows the directives to use the attributes object as inter directive\n *   communication.\n *\n * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object\n *   allowing other directives to read the interpolated value.\n *\n * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes\n *   that contain interpolation (e.g. `src=\"{{bar}}\"`). Not only is this very efficient but it's also\n *   the only way to easily get the actual value because during the linking phase the interpolation\n *   hasn't been evaluated yet and so the value is at this time set to `undefined`.\n *\n * <pre>\n * function linkingFn(scope, elm, attrs, ctrl) {\n *   // get the attribute value\n *   console.log(attrs.ngModel);\n *\n *   // change the attribute\n *   attrs.$set('ngModel', 'new value');\n *\n *   // observe changes to interpolated attribute\n *   attrs.$observe('ngModel', function(value) {\n *     console.log('ngModel has changed value to ' + value);\n *   });\n * }\n * </pre>\n *\n * Below is an example using `$compileProvider`.\n *\n * <div class=\"alert alert-warning\">\n * **Note**: Typically directives are registered with `module.directive`. The example below is\n * to illustrate how `$compile` works.\n * </div>\n *\n <doc:example module=\"compile\">\n   <doc:source>\n    <script>\n      angular.module('compile', [], function($compileProvider) {\n        // configure new 'compile' directive by passing a directive\n        // factory function. The factory function injects the '$compile'\n        $compileProvider.directive('compile', function($compile) {\n          // directive factory creates a link function\n          return function(scope, element, attrs) {\n            scope.$watch(\n              function(scope) {\n                 // watch the 'compile' expression for changes\n                return scope.$eval(attrs.compile);\n              },\n              function(value) {\n                // when the 'compile' expression changes\n                // assign it into the current DOM\n                element.html(value);\n\n                // compile the new DOM and link it to the current\n                // scope.\n                // NOTE: we only compile .childNodes so that\n                // we don't get into infinite loop compiling ourselves\n                $compile(element.contents())(scope);\n              }\n            );\n          };\n        })\n      });\n\n      function Ctrl($scope) {\n        $scope.name = 'Angular';\n        $scope.html = 'Hello {{name}}';\n      }\n    </script>\n    <div ng-controller=\"Ctrl\">\n      <input ng-model=\"name\"> <br>\n      <textarea ng-model=\"html\"></textarea> <br>\n      <div compile=\"html\"></div>\n    </div>\n   </doc:source>\n   <doc:protractor>\n     it('should auto compile', function() {\n       var textarea = $('textarea');\n       var output = $('div[compile]');\n       // The initial state reads 'Hello Angular'.\n       expect(output.getText()).toBe('Hello Angular');\n       textarea.clear();\n       textarea.sendKeys('{{name}}!');\n       expect(output.getText()).toBe('Angular!');\n     });\n   </doc:protractor>\n </doc:example>\n\n *\n *\n * @param {string|DOMElement} element Element or HTML string to compile into a template function.\n * @param {function(angular.Scope[, cloneAttachFn]} transclude function available to directives.\n * @param {number} maxPriority only apply directives lower then given priority (Only effects the\n *                 root element(s), not their children)\n * @returns {function(scope[, cloneAttachFn])} a link function which is used to bind template\n * (a DOM element/tree) to a scope. Where:\n *\n *  * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.\n *  * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the\n *  `template` and call the `cloneAttachFn` function allowing the caller to attach the\n *  cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is\n *  called as: <br> `cloneAttachFn(clonedElement, scope)` where:\n *\n *      * `clonedElement` - is a clone of the original `element` passed into the compiler.\n *      * `scope` - is the current scope with which the linking function is working with.\n *\n * Calling the linking function returns the element of the template. It is either the original\n * element passed in, or the clone of the element if the `cloneAttachFn` is provided.\n *\n * After linking the view is not updated until after a call to $digest which typically is done by\n * Angular automatically.\n *\n * If you need access to the bound view, there are two ways to do it:\n *\n * - If you are not asking the linking function to clone the template, create the DOM element(s)\n *   before you send them to the compiler and keep this reference around.\n *   <pre>\n *     var element = $compile('<p>{{total}}</p>')(scope);\n *   </pre>\n *\n * - if on the other hand, you need the element to be cloned, the view reference from the original\n *   example would not point to the clone, but rather to the original template that was cloned. In\n *   this case, you can access the clone via the cloneAttachFn:\n *   <pre>\n *     var templateElement = angular.element('<p>{{total}}</p>'),\n *         scope = ....;\n *\n *     var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {\n *       //attach the clone to DOM document at the right place\n *     });\n *\n *     //now we have reference to the cloned DOM via `clonedElement`\n *   </pre>\n *\n *\n * For information on how the compiler works, see the\n * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.\n */\n\nvar $compileMinErr = minErr('$compile');\n\n/**\n * @ngdoc service\n * @name ng.$compileProvider\n * @function\n *\n * @description\n */\n$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];\nfunction $CompileProvider($provide, $$sanitizeUriProvider) {\n  var hasDirectives = {},\n      Suffix = 'Directive',\n      COMMENT_DIRECTIVE_REGEXP = /^\\s*directive\\:\\s*([\\d\\w\\-_]+)\\s+(.*)$/,\n      CLASS_DIRECTIVE_REGEXP = /(([\\d\\w\\-_]+)(?:\\:([^;]+))?;?)/;\n\n  // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes\n  // The assumption is that future DOM event attribute names will begin with\n  // 'on' and be composed of only English letters.\n  var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;\n\n  /**\n   * @ngdoc function\n   * @name ng.$compileProvider#directive\n   * @methodOf ng.$compileProvider\n   * @function\n   *\n   * @description\n   * Register a new directive with the compiler.\n   *\n   * @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which\n   *    will match as <code>ng-bind</code>), or an object map of directives where the keys are the\n   *    names and the values are the factories.\n   * @param {function|Array} directiveFactory An injectable directive factory function. See\n   *    {@link guide/directive} for more info.\n   * @returns {ng.$compileProvider} Self for chaining.\n   */\n   this.directive = function registerDirective(name, directiveFactory) {\n    assertNotHasOwnProperty(name, 'directive');\n    if (isString(name)) {\n      assertArg(directiveFactory, 'directiveFactory');\n      if (!hasDirectives.hasOwnProperty(name)) {\n        hasDirectives[name] = [];\n        $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',\n          function($injector, $exceptionHandler) {\n            var directives = [];\n            forEach(hasDirectives[name], function(directiveFactory, index) {\n              try {\n                var directive = $injector.invoke(directiveFactory);\n                if (isFunction(directive)) {\n                  directive = { compile: valueFn(directive) };\n                } else if (!directive.compile && directive.link) {\n                  directive.compile = valueFn(directive.link);\n                }\n                directive.priority = directive.priority || 0;\n                directive.index = index;\n                directive.name = directive.name || name;\n                directive.require = directive.require || (directive.controller && directive.name);\n                directive.restrict = directive.restrict || 'A';\n                directives.push(directive);\n              } catch (e) {\n                $exceptionHandler(e);\n              }\n            });\n            return directives;\n          }]);\n      }\n      hasDirectives[name].push(directiveFactory);\n    } else {\n      forEach(name, reverseParams(registerDirective));\n    }\n    return this;\n  };\n\n\n  /**\n   * @ngdoc function\n   * @name ng.$compileProvider#aHrefSanitizationWhitelist\n   * @methodOf ng.$compileProvider\n   * @function\n   *\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during a[href] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.aHrefSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);\n      return this;\n    } else {\n      return $$sanitizeUriProvider.aHrefSanitizationWhitelist();\n    }\n  };\n\n\n  /**\n   * @ngdoc function\n   * @name ng.$compileProvider#imgSrcSanitizationWhitelist\n   * @methodOf ng.$compileProvider\n   * @function\n   *\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during img[src] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.imgSrcSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);\n      return this;\n    } else {\n      return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();\n    }\n  };\n\n  this.$get = [\n            '$injector', '$interpolate', '$exceptionHandler', '$http', '$templateCache', '$parse',\n            '$controller', '$rootScope', '$document', '$sce', '$animate', '$$sanitizeUri',\n    function($injector,   $interpolate,   $exceptionHandler,   $http,   $templateCache,   $parse,\n             $controller,   $rootScope,   $document,   $sce,   $animate,   $$sanitizeUri) {\n\n    var Attributes = function(element, attr) {\n      this.$$element = element;\n      this.$attr = attr || {};\n    };\n\n    Attributes.prototype = {\n      $normalize: directiveNormalize,\n\n\n      /**\n       * @ngdoc function\n       * @name ng.$compile.directive.Attributes#$addClass\n       * @methodOf ng.$compile.directive.Attributes\n       * @function\n       *\n       * @description\n       * Adds the CSS class value specified by the classVal parameter to the element. If animations\n       * are enabled then an animation will be triggered for the class addition.\n       *\n       * @param {string} classVal The className value that will be added to the element\n       */\n      $addClass : function(classVal) {\n        if(classVal && classVal.length > 0) {\n          $animate.addClass(this.$$element, classVal);\n        }\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$compile.directive.Attributes#$removeClass\n       * @methodOf ng.$compile.directive.Attributes\n       * @function\n       *\n       * @description\n       * Removes the CSS class value specified by the classVal parameter from the element. If\n       * animations are enabled then an animation will be triggered for the class removal.\n       *\n       * @param {string} classVal The className value that will be removed from the element\n       */\n      $removeClass : function(classVal) {\n        if(classVal && classVal.length > 0) {\n          $animate.removeClass(this.$$element, classVal);\n        }\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$compile.directive.Attributes#$updateClass\n       * @methodOf ng.$compile.directive.Attributes\n       * @function\n       *\n       * @description\n       * Adds and removes the appropriate CSS class values to the element based on the difference\n       * between the new and old CSS class values (specified as newClasses and oldClasses).\n       *\n       * @param {string} newClasses The current CSS className value\n       * @param {string} oldClasses The former CSS className value\n       */\n      $updateClass : function(newClasses, oldClasses) {\n        this.$removeClass(tokenDifference(oldClasses, newClasses));\n        this.$addClass(tokenDifference(newClasses, oldClasses));\n      },\n\n      /**\n       * Set a normalized attribute on the element in a way such that all directives\n       * can share the attribute. This function properly handles boolean attributes.\n       * @param {string} key Normalized key. (ie ngAttribute)\n       * @param {string|boolean} value The value to set. If `null` attribute will be deleted.\n       * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.\n       *     Defaults to true.\n       * @param {string=} attrName Optional none normalized name. Defaults to key.\n       */\n      $set: function(key, value, writeAttr, attrName) {\n        // TODO: decide whether or not to throw an error if \"class\"\n        //is set through this function since it may cause $updateClass to\n        //become unstable.\n\n        var booleanKey = getBooleanAttrName(this.$$element[0], key),\n            normalizedVal,\n            nodeName;\n\n        if (booleanKey) {\n          this.$$element.prop(key, value);\n          attrName = booleanKey;\n        }\n\n        this[key] = value;\n\n        // translate normalized key to actual key\n        if (attrName) {\n          this.$attr[key] = attrName;\n        } else {\n          attrName = this.$attr[key];\n          if (!attrName) {\n            this.$attr[key] = attrName = snake_case(key, '-');\n          }\n        }\n\n        nodeName = nodeName_(this.$$element);\n\n        // sanitize a[href] and img[src] values\n        if ((nodeName === 'A' && key === 'href') ||\n            (nodeName === 'IMG' && key === 'src')) {\n          this[key] = value = $$sanitizeUri(value, key === 'src');\n        }\n\n        if (writeAttr !== false) {\n          if (value === null || value === undefined) {\n            this.$$element.removeAttr(attrName);\n          } else {\n            this.$$element.attr(attrName, value);\n          }\n        }\n\n        // fire observers\n        var $$observers = this.$$observers;\n        $$observers && forEach($$observers[key], function(fn) {\n          try {\n            fn(value);\n          } catch (e) {\n            $exceptionHandler(e);\n          }\n        });\n      },\n\n\n      /**\n       * @ngdoc function\n       * @name ng.$compile.directive.Attributes#$observe\n       * @methodOf ng.$compile.directive.Attributes\n       * @function\n       *\n       * @description\n       * Observes an interpolated attribute.\n       *\n       * The observer function will be invoked once during the next `$digest` following\n       * compilation. The observer is then invoked whenever the interpolated value\n       * changes.\n       *\n       * @param {string} key Normalized key. (ie ngAttribute) .\n       * @param {function(interpolatedValue)} fn Function that will be called whenever\n                the interpolated value of the attribute changes.\n       *        See the {@link guide/directive#Attributes Directives} guide for more info.\n       * @returns {function()} the `fn` parameter.\n       */\n      $observe: function(key, fn) {\n        var attrs = this,\n            $$observers = (attrs.$$observers || (attrs.$$observers = {})),\n            listeners = ($$observers[key] || ($$observers[key] = []));\n\n        listeners.push(fn);\n        $rootScope.$evalAsync(function() {\n          if (!listeners.$$inter) {\n            // no one registered attribute interpolation function, so lets call it manually\n            fn(attrs[key]);\n          }\n        });\n        return fn;\n      }\n    };\n\n    var startSymbol = $interpolate.startSymbol(),\n        endSymbol = $interpolate.endSymbol(),\n        denormalizeTemplate = (startSymbol == '{{' || endSymbol  == '}}')\n            ? identity\n            : function denormalizeTemplate(template) {\n              return template.replace(/\\{\\{/g, startSymbol).replace(/}}/g, endSymbol);\n        },\n        NG_ATTR_BINDING = /^ngAttr[A-Z]/;\n\n\n    return compile;\n\n    //================================\n\n    function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,\n                        previousCompileContext) {\n      if (!($compileNodes instanceof jqLite)) {\n        // jquery always rewraps, whereas we need to preserve the original selector so that we can\n        // modify it.\n        $compileNodes = jqLite($compileNodes);\n      }\n      // We can not compile top level text elements since text nodes can be merged and we will\n      // not be able to attach scope data to them, so we will wrap them in <span>\n      forEach($compileNodes, function(node, index){\n        if (node.nodeType == 3 /* text node */ && node.nodeValue.match(/\\S+/) /* non-empty */ ) {\n          $compileNodes[index] = node = jqLite(node).wrap('<span></span>').parent()[0];\n        }\n      });\n      var compositeLinkFn =\n              compileNodes($compileNodes, transcludeFn, $compileNodes,\n                           maxPriority, ignoreDirective, previousCompileContext);\n      safeAddClass($compileNodes, 'ng-scope');\n      return function publicLinkFn(scope, cloneConnectFn, transcludeControllers){\n        assertArg(scope, 'scope');\n        // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart\n        // and sometimes changes the structure of the DOM.\n        var $linkNode = cloneConnectFn\n          ? JQLitePrototype.clone.call($compileNodes) // IMPORTANT!!!\n          : $compileNodes;\n\n        forEach(transcludeControllers, function(instance, name) {\n          $linkNode.data('$' + name + 'Controller', instance);\n        });\n\n        // Attach scope only to non-text nodes.\n        for(var i = 0, ii = $linkNode.length; i<ii; i++) {\n          var node = $linkNode[i],\n              nodeType = node.nodeType;\n          if (nodeType === 1 /* element */ || nodeType === 9 /* document */) {\n            $linkNode.eq(i).data('$scope', scope);\n          }\n        }\n\n        if (cloneConnectFn) cloneConnectFn($linkNode, scope);\n        if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode);\n        return $linkNode;\n      };\n    }\n\n    function safeAddClass($element, className) {\n      try {\n        $element.addClass(className);\n      } catch(e) {\n        // ignore, since it means that we are trying to set class on\n        // SVG element, where class name is read-only.\n      }\n    }\n\n    /**\n     * Compile function matches each node in nodeList against the directives. Once all directives\n     * for a particular node are collected their compile functions are executed. The compile\n     * functions return values - the linking functions - are combined into a composite linking\n     * function, which is the a linking function for the node.\n     *\n     * @param {NodeList} nodeList an array of nodes or NodeList to compile\n     * @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the\n     *        scope argument is auto-generated to the new child of the transcluded parent scope.\n     * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then\n     *        the rootElement must be set the jqLite collection of the compile root. This is\n     *        needed so that the jqLite collection items can be replaced with widgets.\n     * @param {number=} maxPriority Max directive priority.\n     * @returns {?function} A composite linking function of all of the matched directives or null.\n     */\n    function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,\n                            previousCompileContext) {\n      var linkFns = [],\n          attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound;\n\n      for (var i = 0; i < nodeList.length; i++) {\n        attrs = new Attributes();\n\n        // we must always refer to nodeList[i] since the nodes can be replaced underneath us.\n        directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,\n                                        ignoreDirective);\n\n        nodeLinkFn = (directives.length)\n            ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,\n                                      null, [], [], previousCompileContext)\n            : null;\n\n        if (nodeLinkFn && nodeLinkFn.scope) {\n          safeAddClass(jqLite(nodeList[i]), 'ng-scope');\n        }\n\n        childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||\n                      !(childNodes = nodeList[i].childNodes) ||\n                      !childNodes.length)\n            ? null\n            : compileNodes(childNodes,\n                 nodeLinkFn ? nodeLinkFn.transclude : transcludeFn);\n\n        linkFns.push(nodeLinkFn, childLinkFn);\n        linkFnFound = linkFnFound || nodeLinkFn || childLinkFn;\n        //use the previous context only for the first element in the virtual group\n        previousCompileContext = null;\n      }\n\n      // return a linking function if we have found anything, null otherwise\n      return linkFnFound ? compositeLinkFn : null;\n\n      function compositeLinkFn(scope, nodeList, $rootElement, boundTranscludeFn) {\n        var nodeLinkFn, childLinkFn, node, $node, childScope, childTranscludeFn, i, ii, n;\n\n        // copy nodeList so that linking doesn't break due to live list updates.\n        var nodeListLength = nodeList.length,\n            stableNodeList = new Array(nodeListLength);\n        for (i = 0; i < nodeListLength; i++) {\n          stableNodeList[i] = nodeList[i];\n        }\n\n        for(i = 0, n = 0, ii = linkFns.length; i < ii; n++) {\n          node = stableNodeList[n];\n          nodeLinkFn = linkFns[i++];\n          childLinkFn = linkFns[i++];\n          $node = jqLite(node);\n\n          if (nodeLinkFn) {\n            if (nodeLinkFn.scope) {\n              childScope = scope.$new();\n              $node.data('$scope', childScope);\n            } else {\n              childScope = scope;\n            }\n            childTranscludeFn = nodeLinkFn.transclude;\n            if (childTranscludeFn || (!boundTranscludeFn && transcludeFn)) {\n              nodeLinkFn(childLinkFn, childScope, node, $rootElement,\n                createBoundTranscludeFn(scope, childTranscludeFn || transcludeFn)\n              );\n            } else {\n              nodeLinkFn(childLinkFn, childScope, node, $rootElement, boundTranscludeFn);\n            }\n          } else if (childLinkFn) {\n            childLinkFn(scope, node.childNodes, undefined, boundTranscludeFn);\n          }\n        }\n      }\n    }\n\n    function createBoundTranscludeFn(scope, transcludeFn) {\n      return function boundTranscludeFn(transcludedScope, cloneFn, controllers) {\n        var scopeCreated = false;\n\n        if (!transcludedScope) {\n          transcludedScope = scope.$new();\n          transcludedScope.$$transcluded = true;\n          scopeCreated = true;\n        }\n\n        var clone = transcludeFn(transcludedScope, cloneFn, controllers);\n        if (scopeCreated) {\n          clone.on('$destroy', bind(transcludedScope, transcludedScope.$destroy));\n        }\n        return clone;\n      };\n    }\n\n    /**\n     * Looks for directives on the given node and adds them to the directive collection which is\n     * sorted.\n     *\n     * @param node Node to search.\n     * @param directives An array to which the directives are added to. This array is sorted before\n     *        the function returns.\n     * @param attrs The shared attrs object which is used to populate the normalized attributes.\n     * @param {number=} maxPriority Max directive priority.\n     */\n    function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {\n      var nodeType = node.nodeType,\n          attrsMap = attrs.$attr,\n          match,\n          className;\n\n      switch(nodeType) {\n        case 1: /* Element */\n          // use the node name: <directive>\n          addDirective(directives,\n              directiveNormalize(nodeName_(node).toLowerCase()), 'E', maxPriority, ignoreDirective);\n\n          // iterate over the attributes\n          for (var attr, name, nName, ngAttrName, value, nAttrs = node.attributes,\n                   j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {\n            var attrStartName = false;\n            var attrEndName = false;\n\n            attr = nAttrs[j];\n            if (!msie || msie >= 8 || attr.specified) {\n              name = attr.name;\n              // support ngAttr attribute binding\n              ngAttrName = directiveNormalize(name);\n              if (NG_ATTR_BINDING.test(ngAttrName)) {\n                name = snake_case(ngAttrName.substr(6), '-');\n              }\n\n              var directiveNName = ngAttrName.replace(/(Start|End)$/, '');\n              if (ngAttrName === directiveNName + 'Start') {\n                attrStartName = name;\n                attrEndName = name.substr(0, name.length - 5) + 'end';\n                name = name.substr(0, name.length - 6);\n              }\n\n              nName = directiveNormalize(name.toLowerCase());\n              attrsMap[nName] = name;\n              attrs[nName] = value = trim(attr.value);\n              if (getBooleanAttrName(node, nName)) {\n                attrs[nName] = true; // presence means true\n              }\n              addAttrInterpolateDirective(node, directives, value, nName);\n              addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,\n                            attrEndName);\n            }\n          }\n\n          // use class as directive\n          className = node.className;\n          if (isString(className) && className !== '') {\n            while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {\n              nName = directiveNormalize(match[2]);\n              if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {\n                attrs[nName] = trim(match[3]);\n              }\n              className = className.substr(match.index + match[0].length);\n            }\n          }\n          break;\n        case 3: /* Text Node */\n          addTextInterpolateDirective(directives, node.nodeValue);\n          break;\n        case 8: /* Comment */\n          try {\n            match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);\n            if (match) {\n              nName = directiveNormalize(match[1]);\n              if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {\n                attrs[nName] = trim(match[2]);\n              }\n            }\n          } catch (e) {\n            // turns out that under some circumstances IE9 throws errors when one attempts to read\n            // comment's node value.\n            // Just ignore it and continue. (Can't seem to reproduce in test case.)\n          }\n          break;\n      }\n\n      directives.sort(byPriority);\n      return directives;\n    }\n\n    /**\n     * Given a node with an directive-start it collects all of the siblings until it finds\n     * directive-end.\n     * @param node\n     * @param attrStart\n     * @param attrEnd\n     * @returns {*}\n     */\n    function groupScan(node, attrStart, attrEnd) {\n      var nodes = [];\n      var depth = 0;\n      if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {\n        var startNode = node;\n        do {\n          if (!node) {\n            throw $compileMinErr('uterdir',\n                      \"Unterminated attribute, found '{0}' but no matching '{1}' found.\",\n                      attrStart, attrEnd);\n          }\n          if (node.nodeType == 1 /** Element **/) {\n            if (node.hasAttribute(attrStart)) depth++;\n            if (node.hasAttribute(attrEnd)) depth--;\n          }\n          nodes.push(node);\n          node = node.nextSibling;\n        } while (depth > 0);\n      } else {\n        nodes.push(node);\n      }\n\n      return jqLite(nodes);\n    }\n\n    /**\n     * Wrapper for linking function which converts normal linking function into a grouped\n     * linking function.\n     * @param linkFn\n     * @param attrStart\n     * @param attrEnd\n     * @returns {Function}\n     */\n    function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {\n      return function(scope, element, attrs, controllers, transcludeFn) {\n        element = groupScan(element[0], attrStart, attrEnd);\n        return linkFn(scope, element, attrs, controllers, transcludeFn);\n      };\n    }\n\n    /**\n     * Once the directives have been collected, their compile functions are executed. This method\n     * is responsible for inlining directive templates as well as terminating the application\n     * of the directives if the terminal directive has been reached.\n     *\n     * @param {Array} directives Array of collected directives to execute their compile function.\n     *        this needs to be pre-sorted by priority order.\n     * @param {Node} compileNode The raw DOM node to apply the compile functions to\n     * @param {Object} templateAttrs The shared attribute function\n     * @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the\n     *                                                  scope argument is auto-generated to the new\n     *                                                  child of the transcluded parent scope.\n     * @param {JQLite} jqCollection If we are working on the root of the compile tree then this\n     *                              argument has the root jqLite array so that we can replace nodes\n     *                              on it.\n     * @param {Object=} originalReplaceDirective An optional directive that will be ignored when\n     *                                           compiling the transclusion.\n     * @param {Array.<Function>} preLinkFns\n     * @param {Array.<Function>} postLinkFns\n     * @param {Object} previousCompileContext Context used for previous compilation of the current\n     *                                        node\n     * @returns linkFn\n     */\n    function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,\n                                   jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,\n                                   previousCompileContext) {\n      previousCompileContext = previousCompileContext || {};\n\n      var terminalPriority = -Number.MAX_VALUE,\n          newScopeDirective,\n          controllerDirectives = previousCompileContext.controllerDirectives,\n          newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,\n          templateDirective = previousCompileContext.templateDirective,\n          nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,\n          hasTranscludeDirective = false,\n          hasElementTranscludeDirective = false,\n          $compileNode = templateAttrs.$$element = jqLite(compileNode),\n          directive,\n          directiveName,\n          $template,\n          replaceDirective = originalReplaceDirective,\n          childTranscludeFn = transcludeFn,\n          linkFn,\n          directiveValue;\n\n      // executes all directives on the current element\n      for(var i = 0, ii = directives.length; i < ii; i++) {\n        directive = directives[i];\n        var attrStart = directive.$$start;\n        var attrEnd = directive.$$end;\n\n        // collect multiblock sections\n        if (attrStart) {\n          $compileNode = groupScan(compileNode, attrStart, attrEnd);\n        }\n        $template = undefined;\n\n        if (terminalPriority > directive.priority) {\n          break; // prevent further processing of directives\n        }\n\n        if (directiveValue = directive.scope) {\n          newScopeDirective = newScopeDirective || directive;\n\n          // skip the check for directives with async templates, we'll check the derived sync\n          // directive when the template arrives\n          if (!directive.templateUrl) {\n            assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,\n                              $compileNode);\n            if (isObject(directiveValue)) {\n              newIsolateScopeDirective = directive;\n            }\n          }\n        }\n\n        directiveName = directive.name;\n\n        if (!directive.templateUrl && directive.controller) {\n          directiveValue = directive.controller;\n          controllerDirectives = controllerDirectives || {};\n          assertNoDuplicate(\"'\" + directiveName + \"' controller\",\n              controllerDirectives[directiveName], directive, $compileNode);\n          controllerDirectives[directiveName] = directive;\n        }\n\n        if (directiveValue = directive.transclude) {\n          hasTranscludeDirective = true;\n\n          // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.\n          // This option should only be used by directives that know how to safely handle element transclusion,\n          // where the transcluded nodes are added or replaced after linking.\n          if (!directive.$$tlb) {\n            assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);\n            nonTlbTranscludeDirective = directive;\n          }\n\n          if (directiveValue == 'element') {\n            hasElementTranscludeDirective = true;\n            terminalPriority = directive.priority;\n            $template = groupScan(compileNode, attrStart, attrEnd);\n            $compileNode = templateAttrs.$$element =\n                jqLite(document.createComment(' ' + directiveName + ': ' +\n                                              templateAttrs[directiveName] + ' '));\n            compileNode = $compileNode[0];\n            replaceWith(jqCollection, jqLite(sliceArgs($template)), compileNode);\n\n            childTranscludeFn = compile($template, transcludeFn, terminalPriority,\n                                        replaceDirective && replaceDirective.name, {\n                                          // Don't pass in:\n                                          // - controllerDirectives - otherwise we'll create duplicates controllers\n                                          // - newIsolateScopeDirective or templateDirective - combining templates with\n                                          //   element transclusion doesn't make sense.\n                                          //\n                                          // We need only nonTlbTranscludeDirective so that we prevent putting transclusion\n                                          // on the same element more than once.\n                                          nonTlbTranscludeDirective: nonTlbTranscludeDirective\n                                        });\n          } else {\n            $template = jqLite(jqLiteClone(compileNode)).contents();\n            $compileNode.empty(); // clear contents\n            childTranscludeFn = compile($template, transcludeFn);\n          }\n        }\n\n        if (directive.template) {\n          assertNoDuplicate('template', templateDirective, directive, $compileNode);\n          templateDirective = directive;\n\n          directiveValue = (isFunction(directive.template))\n              ? directive.template($compileNode, templateAttrs)\n              : directive.template;\n\n          directiveValue = denormalizeTemplate(directiveValue);\n\n          if (directive.replace) {\n            replaceDirective = directive;\n            $template = jqLite('<div>' +\n                                 trim(directiveValue) +\n                               '</div>').contents();\n            compileNode = $template[0];\n\n            if ($template.length != 1 || compileNode.nodeType !== 1) {\n              throw $compileMinErr('tplrt',\n                  \"Template for directive '{0}' must have exactly one root element. {1}\",\n                  directiveName, '');\n            }\n\n            replaceWith(jqCollection, $compileNode, compileNode);\n\n            var newTemplateAttrs = {$attr: {}};\n\n            // combine directives from the original node and from the template:\n            // - take the array of directives for this element\n            // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)\n            // - collect directives from the template and sort them by priority\n            // - combine directives as: processed + template + unprocessed\n            var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);\n            var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));\n\n            if (newIsolateScopeDirective) {\n              markDirectivesAsIsolate(templateDirectives);\n            }\n            directives = directives.concat(templateDirectives).concat(unprocessedDirectives);\n            mergeTemplateAttributes(templateAttrs, newTemplateAttrs);\n\n            ii = directives.length;\n          } else {\n            $compileNode.html(directiveValue);\n          }\n        }\n\n        if (directive.templateUrl) {\n          assertNoDuplicate('template', templateDirective, directive, $compileNode);\n          templateDirective = directive;\n\n          if (directive.replace) {\n            replaceDirective = directive;\n          }\n\n          nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,\n              templateAttrs, jqCollection, childTranscludeFn, preLinkFns, postLinkFns, {\n                controllerDirectives: controllerDirectives,\n                newIsolateScopeDirective: newIsolateScopeDirective,\n                templateDirective: templateDirective,\n                nonTlbTranscludeDirective: nonTlbTranscludeDirective\n              });\n          ii = directives.length;\n        } else if (directive.compile) {\n          try {\n            linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);\n            if (isFunction(linkFn)) {\n              addLinkFns(null, linkFn, attrStart, attrEnd);\n            } else if (linkFn) {\n              addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd);\n            }\n          } catch (e) {\n            $exceptionHandler(e, startingTag($compileNode));\n          }\n        }\n\n        if (directive.terminal) {\n          nodeLinkFn.terminal = true;\n          terminalPriority = Math.max(terminalPriority, directive.priority);\n        }\n\n      }\n\n      nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;\n      nodeLinkFn.transclude = hasTranscludeDirective && childTranscludeFn;\n\n      // might be normal or delayed nodeLinkFn depending on if templateUrl is present\n      return nodeLinkFn;\n\n      ////////////////////\n\n      function addLinkFns(pre, post, attrStart, attrEnd) {\n        if (pre) {\n          if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);\n          pre.require = directive.require;\n          if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n            pre = cloneAndAnnotateFn(pre, {isolateScope: true});\n          }\n          preLinkFns.push(pre);\n        }\n        if (post) {\n          if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);\n          post.require = directive.require;\n          if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n            post = cloneAndAnnotateFn(post, {isolateScope: true});\n          }\n          postLinkFns.push(post);\n        }\n      }\n\n\n      function getControllers(require, $element, elementControllers) {\n        var value, retrievalMethod = 'data', optional = false;\n        if (isString(require)) {\n          while((value = require.charAt(0)) == '^' || value == '?') {\n            require = require.substr(1);\n            if (value == '^') {\n              retrievalMethod = 'inheritedData';\n            }\n            optional = optional || value == '?';\n          }\n          value = null;\n\n          if (elementControllers && retrievalMethod === 'data') {\n            value = elementControllers[require];\n          }\n          value = value || $element[retrievalMethod]('$' + require + 'Controller');\n\n          if (!value && !optional) {\n            throw $compileMinErr('ctreq',\n                \"Controller '{0}', required by directive '{1}', can't be found!\",\n                require, directiveName);\n          }\n          return value;\n        } else if (isArray(require)) {\n          value = [];\n          forEach(require, function(require) {\n            value.push(getControllers(require, $element, elementControllers));\n          });\n        }\n        return value;\n      }\n\n\n      function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {\n        var attrs, $element, i, ii, linkFn, controller, isolateScope, elementControllers = {}, transcludeFn;\n\n        if (compileNode === linkNode) {\n          attrs = templateAttrs;\n        } else {\n          attrs = shallowCopy(templateAttrs, new Attributes(jqLite(linkNode), templateAttrs.$attr));\n        }\n        $element = attrs.$$element;\n\n        if (newIsolateScopeDirective) {\n          var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n          var $linkNode = jqLite(linkNode);\n\n          isolateScope = scope.$new(true);\n\n          if (templateDirective && (templateDirective === newIsolateScopeDirective.$$originalDirective)) {\n            $linkNode.data('$isolateScope', isolateScope) ;\n          } else {\n            $linkNode.data('$isolateScopeNoTemplate', isolateScope);\n          }\n\n\n\n          safeAddClass($linkNode, 'ng-isolate-scope');\n\n          forEach(newIsolateScopeDirective.scope, function(definition, scopeName) {\n            var match = definition.match(LOCAL_REGEXP) || [],\n                attrName = match[3] || scopeName,\n                optional = (match[2] == '?'),\n                mode = match[1], // @, =, or &\n                lastValue,\n                parentGet, parentSet, compare;\n\n            isolateScope.$$isolateBindings[scopeName] = mode + attrName;\n\n            switch (mode) {\n\n              case '@':\n                attrs.$observe(attrName, function(value) {\n                  isolateScope[scopeName] = value;\n                });\n                attrs.$$observers[attrName].$$scope = scope;\n                if( attrs[attrName] ) {\n                  // If the attribute has been provided then we trigger an interpolation to ensure\n                  // the value is there for use in the link fn\n                  isolateScope[scopeName] = $interpolate(attrs[attrName])(scope);\n                }\n                break;\n\n              case '=':\n                if (optional && !attrs[attrName]) {\n                  return;\n                }\n                parentGet = $parse(attrs[attrName]);\n                if (parentGet.literal) {\n                  compare = equals;\n                } else {\n                  compare = function(a,b) { return a === b; };\n                }\n                parentSet = parentGet.assign || function() {\n                  // reset the change, or we will throw this exception on every $digest\n                  lastValue = isolateScope[scopeName] = parentGet(scope);\n                  throw $compileMinErr('nonassign',\n                      \"Expression '{0}' used with directive '{1}' is non-assignable!\",\n                      attrs[attrName], newIsolateScopeDirective.name);\n                };\n                lastValue = isolateScope[scopeName] = parentGet(scope);\n                isolateScope.$watch(function parentValueWatch() {\n                  var parentValue = parentGet(scope);\n                  if (!compare(parentValue, isolateScope[scopeName])) {\n                    // we are out of sync and need to copy\n                    if (!compare(parentValue, lastValue)) {\n                      // parent changed and it has precedence\n                      isolateScope[scopeName] = parentValue;\n                    } else {\n                      // if the parent can be assigned then do so\n                      parentSet(scope, parentValue = isolateScope[scopeName]);\n                    }\n                  }\n                  return lastValue = parentValue;\n                }, null, parentGet.literal);\n                break;\n\n              case '&':\n                parentGet = $parse(attrs[attrName]);\n                isolateScope[scopeName] = function(locals) {\n                  return parentGet(scope, locals);\n                };\n                break;\n\n              default:\n                throw $compileMinErr('iscp',\n                    \"Invalid isolate scope definition for directive '{0}'.\" +\n                    \" Definition: {... {1}: '{2}' ...}\",\n                    newIsolateScopeDirective.name, scopeName, definition);\n            }\n          });\n        }\n        transcludeFn = boundTranscludeFn && controllersBoundTransclude;\n        if (controllerDirectives) {\n          forEach(controllerDirectives, function(directive) {\n            var locals = {\n              $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,\n              $element: $element,\n              $attrs: attrs,\n              $transclude: transcludeFn\n            }, controllerInstance;\n\n            controller = directive.controller;\n            if (controller == '@') {\n              controller = attrs[directive.name];\n            }\n\n            controllerInstance = $controller(controller, locals);\n            // For directives with element transclusion the element is a comment,\n            // but jQuery .data doesn't support attaching data to comment nodes as it's hard to\n            // clean up (http://bugs.jquery.com/ticket/8335).\n            // Instead, we save the controllers for the element in a local hash and attach to .data\n            // later, once we have the actual element.\n            elementControllers[directive.name] = controllerInstance;\n            if (!hasElementTranscludeDirective) {\n              $element.data('$' + directive.name + 'Controller', controllerInstance);\n            }\n\n            if (directive.controllerAs) {\n              locals.$scope[directive.controllerAs] = controllerInstance;\n            }\n          });\n        }\n\n        // PRELINKING\n        for(i = 0, ii = preLinkFns.length; i < ii; i++) {\n          try {\n            linkFn = preLinkFns[i];\n            linkFn(linkFn.isolateScope ? isolateScope : scope, $element, attrs,\n                linkFn.require && getControllers(linkFn.require, $element, elementControllers), transcludeFn);\n          } catch (e) {\n            $exceptionHandler(e, startingTag($element));\n          }\n        }\n\n        // RECURSION\n        // We only pass the isolate scope, if the isolate directive has a template,\n        // otherwise the child elements do not belong to the isolate directive.\n        var scopeToChild = scope;\n        if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {\n          scopeToChild = isolateScope;\n        }\n        childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);\n\n        // POSTLINKING\n        for(i = postLinkFns.length - 1; i >= 0; i--) {\n          try {\n            linkFn = postLinkFns[i];\n            linkFn(linkFn.isolateScope ? isolateScope : scope, $element, attrs,\n                linkFn.require && getControllers(linkFn.require, $element, elementControllers), transcludeFn);\n          } catch (e) {\n            $exceptionHandler(e, startingTag($element));\n          }\n        }\n\n        // This is the function that is injected as `$transclude`.\n        function controllersBoundTransclude(scope, cloneAttachFn) {\n          var transcludeControllers;\n\n          // no scope passed\n          if (arguments.length < 2) {\n            cloneAttachFn = scope;\n            scope = undefined;\n          }\n\n          if (hasElementTranscludeDirective) {\n            transcludeControllers = elementControllers;\n          }\n\n          return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers);\n        }\n      }\n    }\n\n    function markDirectivesAsIsolate(directives) {\n      // mark all directives as needing isolate scope.\n      for (var j = 0, jj = directives.length; j < jj; j++) {\n        directives[j] = inherit(directives[j], {$$isolateScope: true});\n      }\n    }\n\n    /**\n     * looks up the directive and decorates it with exception handling and proper parameters. We\n     * call this the boundDirective.\n     *\n     * @param {string} name name of the directive to look up.\n     * @param {string} location The directive must be found in specific format.\n     *   String containing any of theses characters:\n     *\n     *   * `E`: element name\n     *   * `A': attribute\n     *   * `C`: class\n     *   * `M`: comment\n     * @returns true if directive was added.\n     */\n    function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,\n                          endAttrName) {\n      if (name === ignoreDirective) return null;\n      var match = null;\n      if (hasDirectives.hasOwnProperty(name)) {\n        for(var directive, directives = $injector.get(name + Suffix),\n            i = 0, ii = directives.length; i<ii; i++) {\n          try {\n            directive = directives[i];\n            if ( (maxPriority === undefined || maxPriority > directive.priority) &&\n                 directive.restrict.indexOf(location) != -1) {\n              if (startAttrName) {\n                directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});\n              }\n              tDirectives.push(directive);\n              match = directive;\n            }\n          } catch(e) { $exceptionHandler(e); }\n        }\n      }\n      return match;\n    }\n\n\n    /**\n     * When the element is replaced with HTML template then the new attributes\n     * on the template need to be merged with the existing attributes in the DOM.\n     * The desired effect is to have both of the attributes present.\n     *\n     * @param {object} dst destination attributes (original DOM)\n     * @param {object} src source attributes (from the directive template)\n     */\n    function mergeTemplateAttributes(dst, src) {\n      var srcAttr = src.$attr,\n          dstAttr = dst.$attr,\n          $element = dst.$$element;\n\n      // reapply the old attributes to the new element\n      forEach(dst, function(value, key) {\n        if (key.charAt(0) != '$') {\n          if (src[key]) {\n            value += (key === 'style' ? ';' : ' ') + src[key];\n          }\n          dst.$set(key, value, true, srcAttr[key]);\n        }\n      });\n\n      // copy the new attributes on the old attrs object\n      forEach(src, function(value, key) {\n        if (key == 'class') {\n          safeAddClass($element, value);\n          dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;\n        } else if (key == 'style') {\n          $element.attr('style', $element.attr('style') + ';' + value);\n          dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value;\n          // `dst` will never contain hasOwnProperty as DOM parser won't let it.\n          // You will get an \"InvalidCharacterError: DOM Exception 5\" error if you\n          // have an attribute like \"has-own-property\" or \"data-has-own-property\", etc.\n        } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {\n          dst[key] = value;\n          dstAttr[key] = srcAttr[key];\n        }\n      });\n    }\n\n\n    function compileTemplateUrl(directives, $compileNode, tAttrs,\n        $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {\n      var linkQueue = [],\n          afterTemplateNodeLinkFn,\n          afterTemplateChildLinkFn,\n          beforeTemplateCompileNode = $compileNode[0],\n          origAsyncDirective = directives.shift(),\n          // The fact that we have to copy and patch the directive seems wrong!\n          derivedSyncDirective = extend({}, origAsyncDirective, {\n            templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective\n          }),\n          templateUrl = (isFunction(origAsyncDirective.templateUrl))\n              ? origAsyncDirective.templateUrl($compileNode, tAttrs)\n              : origAsyncDirective.templateUrl;\n\n      $compileNode.empty();\n\n      $http.get($sce.getTrustedResourceUrl(templateUrl), {cache: $templateCache}).\n        success(function(content) {\n          var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn;\n\n          content = denormalizeTemplate(content);\n\n          if (origAsyncDirective.replace) {\n            $template = jqLite('<div>' + trim(content) + '</div>').contents();\n            compileNode = $template[0];\n\n            if ($template.length != 1 || compileNode.nodeType !== 1) {\n              throw $compileMinErr('tplrt',\n                  \"Template for directive '{0}' must have exactly one root element. {1}\",\n                  origAsyncDirective.name, templateUrl);\n            }\n\n            tempTemplateAttrs = {$attr: {}};\n            replaceWith($rootElement, $compileNode, compileNode);\n            var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs);\n\n            if (isObject(origAsyncDirective.scope)) {\n              markDirectivesAsIsolate(templateDirectives);\n            }\n            directives = templateDirectives.concat(directives);\n            mergeTemplateAttributes(tAttrs, tempTemplateAttrs);\n          } else {\n            compileNode = beforeTemplateCompileNode;\n            $compileNode.html(content);\n          }\n\n          directives.unshift(derivedSyncDirective);\n\n          afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs,\n              childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns,\n              previousCompileContext);\n          forEach($rootElement, function(node, i) {\n            if (node == compileNode) {\n              $rootElement[i] = $compileNode[0];\n            }\n          });\n          afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn);\n\n\n          while(linkQueue.length) {\n            var scope = linkQueue.shift(),\n                beforeTemplateLinkNode = linkQueue.shift(),\n                linkRootElement = linkQueue.shift(),\n                boundTranscludeFn = linkQueue.shift(),\n                linkNode = $compileNode[0];\n\n            if (beforeTemplateLinkNode !== beforeTemplateCompileNode) {\n              var oldClasses = beforeTemplateLinkNode.className;\n              // it was cloned therefore we have to clone as well.\n              linkNode = jqLiteClone(compileNode);\n              replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode);\n\n              // Copy in CSS classes from original node\n              safeAddClass(jqLite(linkNode), oldClasses);\n            }\n            if (afterTemplateNodeLinkFn.transclude) {\n              childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude);\n            } else {\n              childBoundTranscludeFn = boundTranscludeFn;\n            }\n            afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement,\n              childBoundTranscludeFn);\n          }\n          linkQueue = null;\n        }).\n        error(function(response, code, headers, config) {\n          throw $compileMinErr('tpload', 'Failed to load template: {0}', config.url);\n        });\n\n      return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) {\n        if (linkQueue) {\n          linkQueue.push(scope);\n          linkQueue.push(node);\n          linkQueue.push(rootElement);\n          linkQueue.push(boundTranscludeFn);\n        } else {\n          afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, boundTranscludeFn);\n        }\n      };\n    }\n\n\n    /**\n     * Sorting function for bound directives.\n     */\n    function byPriority(a, b) {\n      var diff = b.priority - a.priority;\n      if (diff !== 0) return diff;\n      if (a.name !== b.name) return (a.name < b.name) ? -1 : 1;\n      return a.index - b.index;\n    }\n\n\n    function assertNoDuplicate(what, previousDirective, directive, element) {\n      if (previousDirective) {\n        throw $compileMinErr('multidir', 'Multiple directives [{0}, {1}] asking for {2} on: {3}',\n            previousDirective.name, directive.name, what, startingTag(element));\n      }\n    }\n\n\n    function addTextInterpolateDirective(directives, text) {\n      var interpolateFn = $interpolate(text, true);\n      if (interpolateFn) {\n        directives.push({\n          priority: 0,\n          compile: valueFn(function textInterpolateLinkFn(scope, node) {\n            var parent = node.parent(),\n                bindings = parent.data('$binding') || [];\n            bindings.push(interpolateFn);\n            safeAddClass(parent.data('$binding', bindings), 'ng-binding');\n            scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {\n              node[0].nodeValue = value;\n            });\n          })\n        });\n      }\n    }\n\n\n    function getTrustedContext(node, attrNormalizedName) {\n      if (attrNormalizedName == \"srcdoc\") {\n        return $sce.HTML;\n      }\n      var tag = nodeName_(node);\n      // maction[xlink:href] can source SVG.  It's not limited to <maction>.\n      if (attrNormalizedName == \"xlinkHref\" ||\n          (tag == \"FORM\" && attrNormalizedName == \"action\") ||\n          (tag != \"IMG\" && (attrNormalizedName == \"src\" ||\n                            attrNormalizedName == \"ngSrc\"))) {\n        return $sce.RESOURCE_URL;\n      }\n    }\n\n\n    function addAttrInterpolateDirective(node, directives, value, name) {\n      var interpolateFn = $interpolate(value, true);\n\n      // no interpolation found -> ignore\n      if (!interpolateFn) return;\n\n\n      if (name === \"multiple\" && nodeName_(node) === \"SELECT\") {\n        throw $compileMinErr(\"selmulti\",\n            \"Binding to the 'multiple' attribute is not supported. Element: {0}\",\n            startingTag(node));\n      }\n\n      directives.push({\n        priority: 100,\n        compile: function() {\n            return {\n              pre: function attrInterpolatePreLinkFn(scope, element, attr) {\n                var $$observers = (attr.$$observers || (attr.$$observers = {}));\n\n                if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {\n                  throw $compileMinErr('nodomevents',\n                      \"Interpolations for HTML DOM event attributes are disallowed.  Please use the \" +\n                          \"ng- versions (such as ng-click instead of onclick) instead.\");\n                }\n\n                // we need to interpolate again, in case the attribute value has been updated\n                // (e.g. by another directive's compile function)\n                interpolateFn = $interpolate(attr[name], true, getTrustedContext(node, name));\n\n                // if attribute was updated so that there is no interpolation going on we don't want to\n                // register any observers\n                if (!interpolateFn) return;\n\n                // TODO(i): this should likely be attr.$set(name, iterpolateFn(scope) so that we reset the\n                // actual attr value\n                attr[name] = interpolateFn(scope);\n                ($$observers[name] || ($$observers[name] = [])).$$inter = true;\n                (attr.$$observers && attr.$$observers[name].$$scope || scope).\n                  $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {\n                    //special case for class attribute addition + removal\n                    //so that class changes can tap into the animation\n                    //hooks provided by the $animate service. Be sure to\n                    //skip animations when the first digest occurs (when\n                    //both the new and the old values are the same) since\n                    //the CSS classes are the non-interpolated values\n                    if(name === 'class' && newValue != oldValue) {\n                      attr.$updateClass(newValue, oldValue);\n                    } else {\n                      attr.$set(name, newValue);\n                    }\n                  });\n              }\n            };\n          }\n      });\n    }\n\n\n    /**\n     * This is a special jqLite.replaceWith, which can replace items which\n     * have no parents, provided that the containing jqLite collection is provided.\n     *\n     * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes\n     *                               in the root of the tree.\n     * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep\n     *                                  the shell, but replace its DOM node reference.\n     * @param {Node} newNode The new DOM node.\n     */\n    function replaceWith($rootElement, elementsToRemove, newNode) {\n      var firstElementToRemove = elementsToRemove[0],\n          removeCount = elementsToRemove.length,\n          parent = firstElementToRemove.parentNode,\n          i, ii;\n\n      if ($rootElement) {\n        for(i = 0, ii = $rootElement.length; i < ii; i++) {\n          if ($rootElement[i] == firstElementToRemove) {\n            $rootElement[i++] = newNode;\n            for (var j = i, j2 = j + removeCount - 1,\n                     jj = $rootElement.length;\n                 j < jj; j++, j2++) {\n              if (j2 < jj) {\n                $rootElement[j] = $rootElement[j2];\n              } else {\n                delete $rootElement[j];\n              }\n            }\n            $rootElement.length -= removeCount - 1;\n            break;\n          }\n        }\n      }\n\n      if (parent) {\n        parent.replaceChild(newNode, firstElementToRemove);\n      }\n      var fragment = document.createDocumentFragment();\n      fragment.appendChild(firstElementToRemove);\n      newNode[jqLite.expando] = firstElementToRemove[jqLite.expando];\n      for (var k = 1, kk = elementsToRemove.length; k < kk; k++) {\n        var element = elementsToRemove[k];\n        jqLite(element).remove(); // must do this way to clean up expando\n        fragment.appendChild(element);\n        delete elementsToRemove[k];\n      }\n\n      elementsToRemove[0] = newNode;\n      elementsToRemove.length = 1;\n    }\n\n\n    function cloneAndAnnotateFn(fn, annotation) {\n      return extend(function() { return fn.apply(null, arguments); }, fn, annotation);\n    }\n  }];\n}\n\nvar PREFIX_REGEXP = /^(x[\\:\\-_]|data[\\:\\-_])/i;\n/**\n * Converts all accepted directives format into proper directive name.\n * All of these will become 'myDirective':\n *   my:Directive\n *   my-directive\n *   x-my-directive\n *   data-my:directive\n *\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction directiveNormalize(name) {\n  return camelCase(name.replace(PREFIX_REGEXP, ''));\n}\n\n/**\n * @ngdoc object\n * @name ng.$compile.directive.Attributes\n *\n * @description\n * A shared object between directive compile / linking functions which contains normalized DOM\n * element attributes. The values reflect current binding state `{{ }}`. The normalization is\n * needed since all of these are treated as equivalent in Angular:\n *\n *    <span ng:bind=\"a\" ng-bind=\"a\" data-ng-bind=\"a\" x-ng-bind=\"a\">\n */\n\n/**\n * @ngdoc property\n * @name ng.$compile.directive.Attributes#$attr\n * @propertyOf ng.$compile.directive.Attributes\n * @returns {object} A map of DOM element attribute names to the normalized name. This is\n *                   needed to do reverse lookup from normalized name back to actual name.\n */\n\n\n/**\n * @ngdoc function\n * @name ng.$compile.directive.Attributes#$set\n * @methodOf ng.$compile.directive.Attributes\n * @function\n *\n * @description\n * Set DOM element attribute value.\n *\n *\n * @param {string} name Normalized element attribute name of the property to modify. The name is\n *          reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}\n *          property to the original name.\n * @param {string} value Value to set the attribute to. The value can be an interpolated string.\n */\n\n\n\n/**\n * Closure compiler type information\n */\n\nfunction nodesetLinkingFn(\n  /* angular.Scope */ scope,\n  /* NodeList */ nodeList,\n  /* Element */ rootElement,\n  /* function(Function) */ boundTranscludeFn\n){}\n\nfunction directiveLinkingFn(\n  /* nodesetLinkingFn */ nodesetLinkingFn,\n  /* angular.Scope */ scope,\n  /* Node */ node,\n  /* Element */ rootElement,\n  /* function(Function) */ boundTranscludeFn\n){}\n\nfunction tokenDifference(str1, str2) {\n  var values = '',\n      tokens1 = str1.split(/\\s+/),\n      tokens2 = str2.split(/\\s+/);\n\n  outer:\n  for(var i = 0; i < tokens1.length; i++) {\n    var token = tokens1[i];\n    for(var j = 0; j < tokens2.length; j++) {\n      if(token == tokens2[j]) continue outer;\n    }\n    values += (values.length > 0 ? ' ' : '') + token;\n  }\n  return values;\n}\n\n/**\n * @ngdoc object\n * @name ng.$controllerProvider\n * @description\n * The {@link ng.$controller $controller service} is used by Angular to create new\n * controllers.\n *\n * This provider allows controller registration via the\n * {@link ng.$controllerProvider#methods_register register} method.\n */\nfunction $ControllerProvider() {\n  var controllers = {},\n      CNTRL_REG = /^(\\S+)(\\s+as\\s+(\\w+))?$/;\n\n\n  /**\n   * @ngdoc function\n   * @name ng.$controllerProvider#register\n   * @methodOf ng.$controllerProvider\n   * @param {string|Object} name Controller name, or an object map of controllers where the keys are\n   *    the names and the values are the constructors.\n   * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI\n   *    annotations in the array notation).\n   */\n  this.register = function(name, constructor) {\n    assertNotHasOwnProperty(name, 'controller');\n    if (isObject(name)) {\n      extend(controllers, name);\n    } else {\n      controllers[name] = constructor;\n    }\n  };\n\n\n  this.$get = ['$injector', '$window', function($injector, $window) {\n\n    /**\n     * @ngdoc function\n     * @name ng.$controller\n     * @requires $injector\n     *\n     * @param {Function|string} constructor If called with a function then it's considered to be the\n     *    controller constructor function. Otherwise it's considered to be a string which is used\n     *    to retrieve the controller constructor using the following steps:\n     *\n     *    * check if a controller with given name is registered via `$controllerProvider`\n     *    * check if evaluating the string on the current scope returns a constructor\n     *    * check `window[constructor]` on the global `window` object\n     *\n     * @param {Object} locals Injection locals for Controller.\n     * @return {Object} Instance of given controller.\n     *\n     * @description\n     * `$controller` service is responsible for instantiating controllers.\n     *\n     * It's just a simple call to {@link AUTO.$injector $injector}, but extracted into\n     * a service, so that one can override this service with {@link https://gist.github.com/1649788\n     * BC version}.\n     */\n    return function(expression, locals) {\n      var instance, match, constructor, identifier;\n\n      if(isString(expression)) {\n        match = expression.match(CNTRL_REG),\n        constructor = match[1],\n        identifier = match[3];\n        expression = controllers.hasOwnProperty(constructor)\n            ? controllers[constructor]\n            : getter(locals.$scope, constructor, true) || getter($window, constructor, true);\n\n        assertArgFn(expression, constructor, true);\n      }\n\n      instance = $injector.instantiate(expression, locals);\n\n      if (identifier) {\n        if (!(locals && typeof locals.$scope == 'object')) {\n          throw minErr('$controller')('noscp',\n              \"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.\",\n              constructor || expression.name, identifier);\n        }\n\n        locals.$scope[identifier] = instance;\n      }\n\n      return instance;\n    };\n  }];\n}\n\n/**\n * @ngdoc object\n * @name ng.$document\n * @requires $window\n *\n * @description\n * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.\n */\nfunction $DocumentProvider(){\n  this.$get = ['$window', function(window){\n    return jqLite(window.document);\n  }];\n}\n\n/**\n * @ngdoc function\n * @name ng.$exceptionHandler\n * @requires $log\n *\n * @description\n * Any uncaught exception in angular expressions is delegated to this service.\n * The default implementation simply delegates to `$log.error` which logs it into\n * the browser console.\n * \n * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by\n * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.\n *\n * ## Example:\n * \n * <pre>\n *   angular.module('exceptionOverride', []).factory('$exceptionHandler', function () {\n *     return function (exception, cause) {\n *       exception.message += ' (caused by \"' + cause + '\")';\n *       throw exception;\n *     };\n *   });\n * </pre>\n * \n * This example will override the normal action of `$exceptionHandler`, to make angular\n * exceptions fail hard when they happen, instead of just logging to the console.\n *\n * @param {Error} exception Exception associated with the error.\n * @param {string=} cause optional information about the context in which\n *       the error was thrown.\n *\n */\nfunction $ExceptionHandlerProvider() {\n  this.$get = ['$log', function($log) {\n    return function(exception, cause) {\n      $log.error.apply($log, arguments);\n    };\n  }];\n}\n\n/**\n * Parse headers into key value object\n *\n * @param {string} headers Raw headers as a string\n * @returns {Object} Parsed headers as key value object\n */\nfunction parseHeaders(headers) {\n  var parsed = {}, key, val, i;\n\n  if (!headers) return parsed;\n\n  forEach(headers.split('\\n'), function(line) {\n    i = line.indexOf(':');\n    key = lowercase(trim(line.substr(0, i)));\n    val = trim(line.substr(i + 1));\n\n    if (key) {\n      if (parsed[key]) {\n        parsed[key] += ', ' + val;\n      } else {\n        parsed[key] = val;\n      }\n    }\n  });\n\n  return parsed;\n}\n\n\n/**\n * Returns a function that provides access to parsed headers.\n *\n * Headers are lazy parsed when first requested.\n * @see parseHeaders\n *\n * @param {(string|Object)} headers Headers to provide access to.\n * @returns {function(string=)} Returns a getter function which if called with:\n *\n *   - if called with single an argument returns a single header value or null\n *   - if called with no arguments returns an object containing all headers.\n */\nfunction headersGetter(headers) {\n  var headersObj = isObject(headers) ? headers : undefined;\n\n  return function(name) {\n    if (!headersObj) headersObj =  parseHeaders(headers);\n\n    if (name) {\n      return headersObj[lowercase(name)] || null;\n    }\n\n    return headersObj;\n  };\n}\n\n\n/**\n * Chain all given functions\n *\n * This function is used for both request and response transforming\n *\n * @param {*} data Data to transform.\n * @param {function(string=)} headers Http headers getter fn.\n * @param {(function|Array.<function>)} fns Function or an array of functions.\n * @returns {*} Transformed data.\n */\nfunction transformData(data, headers, fns) {\n  if (isFunction(fns))\n    return fns(data, headers);\n\n  forEach(fns, function(fn) {\n    data = fn(data, headers);\n  });\n\n  return data;\n}\n\n\nfunction isSuccess(status) {\n  return 200 <= status && status < 300;\n}\n\n\nfunction $HttpProvider() {\n  var JSON_START = /^\\s*(\\[|\\{[^\\{])/,\n      JSON_END = /[\\}\\]]\\s*$/,\n      PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/,\n      CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': 'application/json;charset=utf-8'};\n\n  var defaults = this.defaults = {\n    // transform incoming response data\n    transformResponse: [function(data) {\n      if (isString(data)) {\n        // strip json vulnerability protection prefix\n        data = data.replace(PROTECTION_PREFIX, '');\n        if (JSON_START.test(data) && JSON_END.test(data))\n          data = fromJson(data);\n      }\n      return data;\n    }],\n\n    // transform outgoing request data\n    transformRequest: [function(d) {\n      return isObject(d) && !isFile(d) ? toJson(d) : d;\n    }],\n\n    // default headers\n    headers: {\n      common: {\n        'Accept': 'application/json, text/plain, */*'\n      },\n      post:   copy(CONTENT_TYPE_APPLICATION_JSON),\n      put:    copy(CONTENT_TYPE_APPLICATION_JSON),\n      patch:  copy(CONTENT_TYPE_APPLICATION_JSON)\n    },\n\n    xsrfCookieName: 'XSRF-TOKEN',\n    xsrfHeaderName: 'X-XSRF-TOKEN'\n  };\n\n  /**\n   * Are ordered by request, i.e. they are applied in the same order as the\n   * array, on request, but reverse order, on response.\n   */\n  var interceptorFactories = this.interceptors = [];\n\n  /**\n   * For historical reasons, response interceptors are ordered by the order in which\n   * they are applied to the response. (This is the opposite of interceptorFactories)\n   */\n  var responseInterceptorFactories = this.responseInterceptors = [];\n\n  this.$get = ['$httpBackend', '$browser', '$cacheFactory', '$rootScope', '$q', '$injector',\n      function($httpBackend, $browser, $cacheFactory, $rootScope, $q, $injector) {\n\n    var defaultCache = $cacheFactory('$http');\n\n    /**\n     * Interceptors stored in reverse order. Inner interceptors before outer interceptors.\n     * The reversal is needed so that we can build up the interception chain around the\n     * server request.\n     */\n    var reversedInterceptors = [];\n\n    forEach(interceptorFactories, function(interceptorFactory) {\n      reversedInterceptors.unshift(isString(interceptorFactory)\n          ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));\n    });\n\n    forEach(responseInterceptorFactories, function(interceptorFactory, index) {\n      var responseFn = isString(interceptorFactory)\n          ? $injector.get(interceptorFactory)\n          : $injector.invoke(interceptorFactory);\n\n      /**\n       * Response interceptors go before \"around\" interceptors (no real reason, just\n       * had to pick one.) But they are already reversed, so we can't use unshift, hence\n       * the splice.\n       */\n      reversedInterceptors.splice(index, 0, {\n        response: function(response) {\n          return responseFn($q.when(response));\n        },\n        responseError: function(response) {\n          return responseFn($q.reject(response));\n        }\n      });\n    });\n\n\n    /**\n     * @ngdoc function\n     * @name ng.$http\n     * @requires $httpBackend\n     * @requires $browser\n     * @requires $cacheFactory\n     * @requires $rootScope\n     * @requires $q\n     * @requires $injector\n     *\n     * @description\n     * The `$http` service is a core Angular service that facilitates communication with the remote\n     * HTTP servers via the browser's {@link https://developer.mozilla.org/en/xmlhttprequest\n     * XMLHttpRequest} object or via {@link http://en.wikipedia.org/wiki/JSONP JSONP}.\n     *\n     * For unit testing applications that use `$http` service, see\n     * {@link ngMock.$httpBackend $httpBackend mock}.\n     *\n     * For a higher level of abstraction, please check out the {@link ngResource.$resource\n     * $resource} service.\n     *\n     * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by\n     * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage\n     * it is important to familiarize yourself with these APIs and the guarantees they provide.\n     *\n     *\n     * # General usage\n     * The `$http` service is a function which takes a single argument — a configuration object —\n     * that is used to generate an HTTP request and returns  a {@link ng.$q promise}\n     * with two $http specific methods: `success` and `error`.\n     *\n     * <pre>\n     *   $http({method: 'GET', url: '/someUrl'}).\n     *     success(function(data, status, headers, config) {\n     *       // this callback will be called asynchronously\n     *       // when the response is available\n     *     }).\n     *     error(function(data, status, headers, config) {\n     *       // called asynchronously if an error occurs\n     *       // or server returns response with an error status.\n     *     });\n     * </pre>\n     *\n     * Since the returned value of calling the $http function is a `promise`, you can also use\n     * the `then` method to register callbacks, and these callbacks will receive a single argument –\n     * an object representing the response. See the API signature and type info below for more\n     * details.\n     *\n     * A response status code between 200 and 299 is considered a success status and\n     * will result in the success callback being called. Note that if the response is a redirect,\n     * XMLHttpRequest will transparently follow it, meaning that the error callback will not be\n     * called for such responses.\n     *\n     * # Writing Unit Tests that use $http\n     * When unit testing (using {@link api/ngMock ngMock}), it is necessary to call\n     * {@link api/ngMock.$httpBackend#methods_flush $httpBackend.flush()} to flush each pending\n     * request using trained responses.\n     *\n     * ```\n     * $httpBackend.expectGET(...);\n     * $http.get(...);\n     * $httpBackend.flush();\n     * ```\n     *\n     * # Shortcut methods\n     *\n     * Since all invocations of the $http service require passing in an HTTP method and URL, and\n     * POST/PUT requests require request data to be provided as well, shortcut methods\n     * were created:\n     *\n     * <pre>\n     *   $http.get('/someUrl').success(successCallback);\n     *   $http.post('/someUrl', data).success(successCallback);\n     * </pre>\n     *\n     * Complete list of shortcut methods:\n     *\n     * - {@link ng.$http#methods_get $http.get}\n     * - {@link ng.$http#methods_head $http.head}\n     * - {@link ng.$http#methods_post $http.post}\n     * - {@link ng.$http#methods_put $http.put}\n     * - {@link ng.$http#methods_delete $http.delete}\n     * - {@link ng.$http#methods_jsonp $http.jsonp}\n     *\n     *\n     * # Setting HTTP Headers\n     *\n     * The $http service will automatically add certain HTTP headers to all requests. These defaults\n     * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration\n     * object, which currently contains this default configuration:\n     *\n     * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):\n     *   - `Accept: application/json, text/plain, * / *`\n     * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)\n     *   - `Content-Type: application/json`\n     * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)\n     *   - `Content-Type: application/json`\n     *\n     * To add or overwrite these defaults, simply add or remove a property from these configuration\n     * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object\n     * with the lowercased HTTP method name as the key, e.g.\n     * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }.\n     *\n     * The defaults can also be set at runtime via the `$http.defaults` object in the same\n     * fashion. For example:\n     *\n     * ```\n     * module.run(function($http) {\n     *   $http.defaults.headers.common.Authentication = 'Basic YmVlcDpib29w'\n     * });\n     * ```\n     *\n     * In addition, you can supply a `headers` property in the config object passed when\n     * calling `$http(config)`, which overrides the defaults without changing them globally.\n     *\n     *\n     * # Transforming Requests and Responses\n     *\n     * Both requests and responses can be transformed using transform functions. By default, Angular\n     * applies these transformations:\n     *\n     * Request transformations:\n     *\n     * - If the `data` property of the request configuration object contains an object, serialize it\n     *   into JSON format.\n     *\n     * Response transformations:\n     *\n     *  - If XSRF prefix is detected, strip it (see Security Considerations section below).\n     *  - If JSON response is detected, deserialize it using a JSON parser.\n     *\n     * To globally augment or override the default transforms, modify the\n     * `$httpProvider.defaults.transformRequest` and `$httpProvider.defaults.transformResponse`\n     * properties. These properties are by default an array of transform functions, which allows you\n     * to `push` or `unshift` a new transformation function into the transformation chain. You can\n     * also decide to completely override any default transformations by assigning your\n     * transformation functions to these properties directly without the array wrapper.  These defaults\n     * are again available on the $http factory at run-time, which may be useful if you have run-time\n     * services you wish to be involved in your transformations.\n     *\n     * Similarly, to locally override the request/response transforms, augment the\n     * `transformRequest` and/or `transformResponse` properties of the configuration object passed\n     * into `$http`.\n     *\n     *\n     * # Caching\n     *\n     * To enable caching, set the request configuration `cache` property to `true` (to use default\n     * cache) or to a custom cache object (built with {@link ng.$cacheFactory `$cacheFactory`}).\n     * When the cache is enabled, `$http` stores the response from the server in the specified\n     * cache. The next time the same request is made, the response is served from the cache without\n     * sending a request to the server.\n     *\n     * Note that even if the response is served from cache, delivery of the data is asynchronous in\n     * the same way that real requests are.\n     *\n     * If there are multiple GET requests for the same URL that should be cached using the same\n     * cache, but the cache is not populated yet, only one request to the server will be made and\n     * the remaining requests will be fulfilled using the response from the first request.\n     *\n     * You can change the default cache to a new object (built with\n     * {@link ng.$cacheFactory `$cacheFactory`}) by updating the\n     * {@link ng.$http#properties_defaults `$http.defaults.cache`} property. All requests who set\n     * their `cache` property to `true` will now use this cache object.\n     *\n     * If you set the default cache to `false` then only requests that specify their own custom\n     * cache object will be cached.\n     *\n     * # Interceptors\n     *\n     * Before you start creating interceptors, be sure to understand the\n     * {@link ng.$q $q and deferred/promise APIs}.\n     *\n     * For purposes of global error handling, authentication, or any kind of synchronous or\n     * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be\n     * able to intercept requests before they are handed to the server and\n     * responses before they are handed over to the application code that\n     * initiated these requests. The interceptors leverage the {@link ng.$q\n     * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.\n     *\n     * The interceptors are service factories that are registered with the `$httpProvider` by\n     * adding them to the `$httpProvider.interceptors` array. The factory is called and\n     * injected with dependencies (if specified) and returns the interceptor.\n     *\n     * There are two kinds of interceptors (and two kinds of rejection interceptors):\n     *\n     *   * `request`: interceptors get called with http `config` object. The function is free to\n     *     modify the `config` or create a new one. The function needs to return the `config`\n     *     directly or as a promise.\n     *   * `requestError`: interceptor gets called when a previous interceptor threw an error or\n     *     resolved with a rejection.\n     *   * `response`: interceptors get called with http `response` object. The function is free to\n     *     modify the `response` or create a new one. The function needs to return the `response`\n     *     directly or as a promise.\n     *   * `responseError`: interceptor gets called when a previous interceptor threw an error or\n     *     resolved with a rejection.\n     *\n     *\n     * <pre>\n     *   // register the interceptor as a service\n     *   $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n     *     return {\n     *       // optional method\n     *       'request': function(config) {\n     *         // do something on success\n     *         return config || $q.when(config);\n     *       },\n     *\n     *       // optional method\n     *      'requestError': function(rejection) {\n     *         // do something on error\n     *         if (canRecover(rejection)) {\n     *           return responseOrNewPromise\n     *         }\n     *         return $q.reject(rejection);\n     *       },\n     *\n     *\n     *\n     *       // optional method\n     *       'response': function(response) {\n     *         // do something on success\n     *         return response || $q.when(response);\n     *       },\n     *\n     *       // optional method\n     *      'responseError': function(rejection) {\n     *         // do something on error\n     *         if (canRecover(rejection)) {\n     *           return responseOrNewPromise\n     *         }\n     *         return $q.reject(rejection);\n     *       }\n     *     };\n     *   });\n     *\n     *   $httpProvider.interceptors.push('myHttpInterceptor');\n     *\n     *\n     *   // alternatively, register the interceptor via an anonymous factory\n     *   $httpProvider.interceptors.push(function($q, dependency1, dependency2) {\n     *     return {\n     *      'request': function(config) {\n     *          // same as above\n     *       },\n     *\n     *       'response': function(response) {\n     *          // same as above\n     *       }\n     *     };\n     *   });\n     * </pre>\n     *\n     * # Response interceptors (DEPRECATED)\n     *\n     * Before you start creating interceptors, be sure to understand the\n     * {@link ng.$q $q and deferred/promise APIs}.\n     *\n     * For purposes of global error handling, authentication or any kind of synchronous or\n     * asynchronous preprocessing of received responses, it is desirable to be able to intercept\n     * responses for http requests before they are handed over to the application code that\n     * initiated these requests. The response interceptors leverage the {@link ng.$q\n     * promise apis} to fulfil this need for both synchronous and asynchronous preprocessing.\n     *\n     * The interceptors are service factories that are registered with the $httpProvider by\n     * adding them to the `$httpProvider.responseInterceptors` array. The factory is called and\n     * injected with dependencies (if specified) and returns the interceptor  — a function that\n     * takes a {@link ng.$q promise} and returns the original or a new promise.\n     *\n     * <pre>\n     *   // register the interceptor as a service\n     *   $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n     *     return function(promise) {\n     *       return promise.then(function(response) {\n     *         // do something on success\n     *         return response;\n     *       }, function(response) {\n     *         // do something on error\n     *         if (canRecover(response)) {\n     *           return responseOrNewPromise\n     *         }\n     *         return $q.reject(response);\n     *       });\n     *     }\n     *   });\n     *\n     *   $httpProvider.responseInterceptors.push('myHttpInterceptor');\n     *\n     *\n     *   // register the interceptor via an anonymous factory\n     *   $httpProvider.responseInterceptors.push(function($q, dependency1, dependency2) {\n     *     return function(promise) {\n     *       // same as above\n     *     }\n     *   });\n     * </pre>\n     *\n     *\n     * # Security Considerations\n     *\n     * When designing web applications, consider security threats from:\n     *\n     * - {@link http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx\n     *   JSON vulnerability}\n     * - {@link http://en.wikipedia.org/wiki/Cross-site_request_forgery XSRF}\n     *\n     * Both server and the client must cooperate in order to eliminate these threats. Angular comes\n     * pre-configured with strategies that address these issues, but for this to work backend server\n     * cooperation is required.\n     *\n     * ## JSON Vulnerability Protection\n     *\n     * A {@link http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx\n     * JSON vulnerability} allows third party website to turn your JSON resource URL into\n     * {@link http://en.wikipedia.org/wiki/JSONP JSONP} request under some conditions. To\n     * counter this your server can prefix all JSON requests with following string `\")]}',\\n\"`.\n     * Angular will automatically strip the prefix before processing it as JSON.\n     *\n     * For example if your server needs to return:\n     * <pre>\n     * ['one','two']\n     * </pre>\n     *\n     * which is vulnerable to attack, your server can return:\n     * <pre>\n     * )]}',\n     * ['one','two']\n     * </pre>\n     *\n     * Angular will strip the prefix, before processing the JSON.\n     *\n     *\n     * ## Cross Site Request Forgery (XSRF) Protection\n     *\n     * {@link http://en.wikipedia.org/wiki/Cross-site_request_forgery XSRF} is a technique by which\n     * an unauthorized site can gain your user's private data. Angular provides a mechanism\n     * to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie\n     * (by default, `XSRF-TOKEN`) and sets it as an HTTP header (`X-XSRF-TOKEN`). Since only\n     * JavaScript that runs on your domain could read the cookie, your server can be assured that\n     * the XHR came from JavaScript running on your domain. The header will not be set for\n     * cross-domain requests.\n     *\n     * To take advantage of this, your server needs to set a token in a JavaScript readable session\n     * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the\n     * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure\n     * that only JavaScript running on your domain could have sent the request. The token must be\n     * unique for each user and must be verifiable by the server (to prevent the JavaScript from\n     * making up its own tokens). We recommend that the token is a digest of your site's\n     * authentication cookie with a {@link https://en.wikipedia.org/wiki/Salt_(cryptography) salt}\n     * for added security.\n     *\n     * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName\n     * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time,\n     * or the per-request config object.\n     *\n     *\n     * @param {object} config Object describing the request to be made and how it should be\n     *    processed. The object has following properties:\n     *\n     *    - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)\n     *    - **url** – `{string}` – Absolute or relative URL of the resource that is being requested.\n     *    - **params** – `{Object.<string|Object>}` – Map of strings or objects which will be turned\n     *      to `?key1=value1&key2=value2` after the url. If the value is not a string, it will be\n     *      JSONified.\n     *    - **data** – `{string|Object}` – Data to be sent as the request message data.\n     *    - **headers** – `{Object}` – Map of strings or functions which return strings representing\n     *      HTTP headers to send to the server. If the return value of a function is null, the\n     *      header will not be sent.\n     *    - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token.\n     *    - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token.\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     *    - **transformResponse** –\n     *      `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –\n     *      transform function or an array of such functions. The transform function takes the http\n     *      response body and headers and returns its transformed (typically deserialized) version.\n     *    - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the\n     *      GET request, otherwise if a cache instance built with\n     *      {@link ng.$cacheFactory $cacheFactory}, this cache will be used for\n     *      caching.\n     *    - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}\n     *      that should abort the request when resolved.\n     *    - **withCredentials** - `{boolean}` - whether to to set the `withCredentials` flag on the\n     *      XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5\n     *      requests with credentials} for more information.\n     *    - **responseType** - `{string}` - see {@link\n     *      https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType requestType}.\n     *\n     * @returns {HttpPromise} Returns a {@link ng.$q promise} object with the\n     *   standard `then` method and two http specific methods: `success` and `error`. The `then`\n     *   method takes two arguments a success and an error callback which will be called with a\n     *   response object. The `success` and `error` methods take a single argument - a function that\n     *   will be called when the request succeeds or fails respectively. The arguments passed into\n     *   these functions are destructured representation of the response object passed into the\n     *   `then` method. The response object has these properties:\n     *\n     *   - **data** – `{string|Object}` – The response body transformed with the transform\n     *     functions.\n     *   - **status** – `{number}` – HTTP status code of the response.\n     *   - **headers** – `{function([headerName])}` – Header getter function.\n     *   - **config** – `{Object}` – The configuration object that was used to generate the request.\n     *\n     * @property {Array.<Object>} pendingRequests Array of config objects for currently pending\n     *   requests. This is primarily meant to be used for debugging purposes.\n     *\n     *\n     * @example\n<example>\n<file name=\"index.html\">\n  <div ng-controller=\"FetchCtrl\">\n    <select ng-model=\"method\">\n      <option>GET</option>\n      <option>JSONP</option>\n    </select>\n    <input type=\"text\" ng-model=\"url\" size=\"80\"/>\n    <button id=\"fetchbtn\" ng-click=\"fetch()\">fetch</button><br>\n    <button id=\"samplegetbtn\" ng-click=\"updateModel('GET', 'http-hello.html')\">Sample GET</button>\n    <button id=\"samplejsonpbtn\"\n      ng-click=\"updateModel('JSONP',\n                    'http://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')\">\n      Sample JSONP\n    </button>\n    <button id=\"invalidjsonpbtn\"\n      ng-click=\"updateModel('JSONP', 'http://angularjs.org/doesntexist&callback=JSON_CALLBACK')\">\n        Invalid JSONP\n      </button>\n    <pre>http status code: {{status}}</pre>\n    <pre>http response data: {{data}}</pre>\n  </div>\n</file>\n<file name=\"script.js\">\n  function FetchCtrl($scope, $http, $templateCache) {\n    $scope.method = 'GET';\n    $scope.url = 'http-hello.html';\n\n    $scope.fetch = function() {\n      $scope.code = null;\n      $scope.response = null;\n\n      $http({method: $scope.method, url: $scope.url, cache: $templateCache}).\n        success(function(data, status) {\n          $scope.status = status;\n          $scope.data = data;\n        }).\n        error(function(data, status) {\n          $scope.data = data || \"Request failed\";\n          $scope.status = status;\n      });\n    };\n\n    $scope.updateModel = function(method, url) {\n      $scope.method = method;\n      $scope.url = url;\n    };\n  }\n</file>\n<file name=\"http-hello.html\">\n  Hello, $http!\n</file>\n<file name=\"protractorTest.js\">\n  var status = element(by.binding('status'));\n  var data = element(by.binding('data'));\n  var fetchBtn = element(by.id('fetchbtn'));\n  var sampleGetBtn = element(by.id('samplegetbtn'));\n  var sampleJsonpBtn = element(by.id('samplejsonpbtn'));\n  var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));\n\n  it('should make an xhr GET request', function() {\n    sampleGetBtn.click();\n    fetchBtn.click();\n    expect(status.getText()).toMatch('200');\n    expect(data.getText()).toMatch(/Hello, \\$http!/)\n  });\n\n  it('should make a JSONP request to angularjs.org', function() {\n    sampleJsonpBtn.click();\n    fetchBtn.click();\n    expect(status.getText()).toMatch('200');\n    expect(data.getText()).toMatch(/Super Hero!/);\n  });\n\n  it('should make JSONP request to invalid URL and invoke the error handler',\n      function() {\n    invalidJsonpBtn.click();\n    fetchBtn.click();\n    expect(status.getText()).toMatch('0');\n    expect(data.getText()).toMatch('Request failed');\n  });\n</file>\n</example>\n     */\n    function $http(requestConfig) {\n      var config = {\n        transformRequest: defaults.transformRequest,\n        transformResponse: defaults.transformResponse\n      };\n      var headers = mergeHeaders(requestConfig);\n\n      extend(config, requestConfig);\n      config.headers = headers;\n      config.method = uppercase(config.method);\n\n      var xsrfValue = urlIsSameOrigin(config.url)\n          ? $browser.cookies()[config.xsrfCookieName || defaults.xsrfCookieName]\n          : undefined;\n      if (xsrfValue) {\n        headers[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;\n      }\n\n\n      var serverRequest = function(config) {\n        headers = config.headers;\n        var reqData = transformData(config.data, headersGetter(headers), config.transformRequest);\n\n        // strip content-type if data is undefined\n        if (isUndefined(config.data)) {\n          forEach(headers, function(value, header) {\n            if (lowercase(header) === 'content-type') {\n                delete headers[header];\n            }\n          });\n        }\n\n        if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {\n          config.withCredentials = defaults.withCredentials;\n        }\n\n        // send request\n        return sendReq(config, reqData, headers).then(transformResponse, transformResponse);\n      };\n\n      var chain = [serverRequest, undefined];\n      var promise = $q.when(config);\n\n      // apply interceptors\n      forEach(reversedInterceptors, function(interceptor) {\n        if (interceptor.request || interceptor.requestError) {\n          chain.unshift(interceptor.request, interceptor.requestError);\n        }\n        if (interceptor.response || interceptor.responseError) {\n          chain.push(interceptor.response, interceptor.responseError);\n        }\n      });\n\n      while(chain.length) {\n        var thenFn = chain.shift();\n        var rejectFn = chain.shift();\n\n        promise = promise.then(thenFn, rejectFn);\n      }\n\n      promise.success = function(fn) {\n        promise.then(function(response) {\n          fn(response.data, response.status, response.headers, config);\n        });\n        return promise;\n      };\n\n      promise.error = function(fn) {\n        promise.then(null, function(response) {\n          fn(response.data, response.status, response.headers, config);\n        });\n        return promise;\n      };\n\n      return promise;\n\n      function transformResponse(response) {\n        // make a copy since the response must be cacheable\n        var resp = extend({}, response, {\n          data: transformData(response.data, response.headers, config.transformResponse)\n        });\n        return (isSuccess(response.status))\n          ? resp\n          : $q.reject(resp);\n      }\n\n      function mergeHeaders(config) {\n        var defHeaders = defaults.headers,\n            reqHeaders = extend({}, config.headers),\n            defHeaderName, lowercaseDefHeaderName, reqHeaderName;\n\n        defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);\n\n        // execute if header value is function\n        execHeaders(defHeaders);\n        execHeaders(reqHeaders);\n\n        // using for-in instead of forEach to avoid unecessary iteration after header has been found\n        defaultHeadersIteration:\n        for (defHeaderName in defHeaders) {\n          lowercaseDefHeaderName = lowercase(defHeaderName);\n\n          for (reqHeaderName in reqHeaders) {\n            if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {\n              continue defaultHeadersIteration;\n            }\n          }\n\n          reqHeaders[defHeaderName] = defHeaders[defHeaderName];\n        }\n\n        return reqHeaders;\n\n        function execHeaders(headers) {\n          var headerContent;\n\n          forEach(headers, function(headerFn, header) {\n            if (isFunction(headerFn)) {\n              headerContent = headerFn();\n              if (headerContent != null) {\n                headers[header] = headerContent;\n              } else {\n                delete headers[header];\n              }\n            }\n          });\n        }\n      }\n    }\n\n    $http.pendingRequests = [];\n\n    /**\n     * @ngdoc method\n     * @name ng.$http#get\n     * @methodOf ng.$http\n     *\n     * @description\n     * Shortcut method to perform `GET` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$http#delete\n     * @methodOf ng.$http\n     *\n     * @description\n     * Shortcut method to perform `DELETE` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$http#head\n     * @methodOf ng.$http\n     *\n     * @description\n     * Shortcut method to perform `HEAD` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$http#jsonp\n     * @methodOf ng.$http\n     *\n     * @description\n     * Shortcut method to perform `JSONP` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request.\n     *                     Should contain `JSON_CALLBACK` string.\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n    createShortMethods('get', 'delete', 'head', 'jsonp');\n\n    /**\n     * @ngdoc method\n     * @name ng.$http#post\n     * @methodOf ng.$http\n     *\n     * @description\n     * Shortcut method to perform `POST` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {*} data Request content\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$http#put\n     * @methodOf ng.$http\n     *\n     * @description\n     * Shortcut method to perform `PUT` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {*} data Request content\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n    createShortMethodsWithData('post', 'put');\n\n        /**\n         * @ngdoc property\n         * @name ng.$http#defaults\n         * @propertyOf ng.$http\n         *\n         * @description\n         * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of\n         * default headers, withCredentials as well as request and response transformations.\n         *\n         * See \"Setting HTTP Headers\" and \"Transforming Requests and Responses\" sections above.\n         */\n    $http.defaults = defaults;\n\n\n    return $http;\n\n\n    function createShortMethods(names) {\n      forEach(arguments, function(name) {\n        $http[name] = function(url, config) {\n          return $http(extend(config || {}, {\n            method: name,\n            url: url\n          }));\n        };\n      });\n    }\n\n\n    function createShortMethodsWithData(name) {\n      forEach(arguments, function(name) {\n        $http[name] = function(url, data, config) {\n          return $http(extend(config || {}, {\n            method: name,\n            url: url,\n            data: data\n          }));\n        };\n      });\n    }\n\n\n    /**\n     * Makes the request.\n     *\n     * !!! ACCESSES CLOSURE VARS:\n     * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests\n     */\n    function sendReq(config, reqData, reqHeaders) {\n      var deferred = $q.defer(),\n          promise = deferred.promise,\n          cache,\n          cachedResp,\n          url = buildUrl(config.url, config.params);\n\n      $http.pendingRequests.push(config);\n      promise.then(removePendingReq, removePendingReq);\n\n\n      if ((config.cache || defaults.cache) && config.cache !== false && config.method == 'GET') {\n        cache = isObject(config.cache) ? config.cache\n              : isObject(defaults.cache) ? defaults.cache\n              : defaultCache;\n      }\n\n      if (cache) {\n        cachedResp = cache.get(url);\n        if (isDefined(cachedResp)) {\n          if (cachedResp.then) {\n            // cached request has already been sent, but there is no response yet\n            cachedResp.then(removePendingReq, removePendingReq);\n            return cachedResp;\n          } else {\n            // serving from cache\n            if (isArray(cachedResp)) {\n              resolvePromise(cachedResp[1], cachedResp[0], copy(cachedResp[2]));\n            } else {\n              resolvePromise(cachedResp, 200, {});\n            }\n          }\n        } else {\n          // put the promise for the non-transformed response into cache as a placeholder\n          cache.put(url, promise);\n        }\n      }\n\n      // if we won't have the response in cache, send the request to the backend\n      if (isUndefined(cachedResp)) {\n        $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,\n            config.withCredentials, config.responseType);\n      }\n\n      return promise;\n\n\n      /**\n       * Callback registered to $httpBackend():\n       *  - caches the response if desired\n       *  - resolves the raw $http promise\n       *  - calls $apply\n       */\n      function done(status, response, headersString) {\n        if (cache) {\n          if (isSuccess(status)) {\n            cache.put(url, [status, response, parseHeaders(headersString)]);\n          } else {\n            // remove promise from the cache\n            cache.remove(url);\n          }\n        }\n\n        resolvePromise(response, status, headersString);\n        if (!$rootScope.$$phase) $rootScope.$apply();\n      }\n\n\n      /**\n       * Resolves the raw $http promise.\n       */\n      function resolvePromise(response, status, headers) {\n        // normalize internal statuses to 0\n        status = Math.max(status, 0);\n\n        (isSuccess(status) ? deferred.resolve : deferred.reject)({\n          data: response,\n          status: status,\n          headers: headersGetter(headers),\n          config: config\n        });\n      }\n\n\n      function removePendingReq() {\n        var idx = indexOf($http.pendingRequests, config);\n        if (idx !== -1) $http.pendingRequests.splice(idx, 1);\n      }\n    }\n\n\n    function buildUrl(url, params) {\n          if (!params) return url;\n          var parts = [];\n          forEachSorted(params, function(value, key) {\n            if (value === null || isUndefined(value)) return;\n            if (!isArray(value)) value = [value];\n\n            forEach(value, function(v) {\n              if (isObject(v)) {\n                v = toJson(v);\n              }\n              parts.push(encodeUriQuery(key) + '=' +\n                         encodeUriQuery(v));\n            });\n          });\n          return url + ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');\n        }\n\n\n  }];\n}\n\nfunction createXhr(method) {\n    //if IE and the method is not RFC2616 compliant, or if XMLHttpRequest\n    //is not available, try getting an ActiveXObject. Otherwise, use XMLHttpRequest\n    //if it is available\n    if (msie <= 8 && (!method.match(/^(get|post|head|put|delete|options)$/i) ||\n      !window.XMLHttpRequest)) {\n      return new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n    } else if (window.XMLHttpRequest) {\n      return new window.XMLHttpRequest();\n    }\n\n    throw minErr('$httpBackend')('noxhr', \"This browser does not support XMLHttpRequest.\");\n}\n\n/**\n * @ngdoc object\n * @name ng.$httpBackend\n * @requires $browser\n * @requires $window\n * @requires $document\n *\n * @description\n * HTTP backend used by the {@link ng.$http service} that delegates to\n * XMLHttpRequest object or JSONP and deals with browser incompatibilities.\n *\n * You should never need to use this service directly, instead use the higher-level abstractions:\n * {@link ng.$http $http} or {@link ngResource.$resource $resource}.\n *\n * During testing this implementation is swapped with {@link ngMock.$httpBackend mock\n * $httpBackend} which can be trained with responses.\n */\nfunction $HttpBackendProvider() {\n  this.$get = ['$browser', '$window', '$document', function($browser, $window, $document) {\n    return createHttpBackend($browser, createXhr, $browser.defer, $window.angular.callbacks, $document[0]);\n  }];\n}\n\nfunction createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {\n  var ABORTED = -1;\n\n  // TODO(vojta): fix the signature\n  return function(method, url, post, callback, headers, timeout, withCredentials, responseType) {\n    var status;\n    $browser.$$incOutstandingRequestCount();\n    url = url || $browser.url();\n\n    if (lowercase(method) == 'jsonp') {\n      var callbackId = '_' + (callbacks.counter++).toString(36);\n      callbacks[callbackId] = function(data) {\n        callbacks[callbackId].data = data;\n      };\n\n      var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),\n          function() {\n        if (callbacks[callbackId].data) {\n          completeRequest(callback, 200, callbacks[callbackId].data);\n        } else {\n          completeRequest(callback, status || -2);\n        }\n        callbacks[callbackId] = angular.noop;\n      });\n    } else {\n\n      var xhr = createXhr(method);\n\n      xhr.open(method, url, true);\n      forEach(headers, function(value, key) {\n        if (isDefined(value)) {\n            xhr.setRequestHeader(key, value);\n        }\n      });\n\n      // In IE6 and 7, this might be called synchronously when xhr.send below is called and the\n      // response is in the cache. the promise api will ensure that to the app code the api is\n      // always async\n      xhr.onreadystatechange = function() {\n        // onreadystatechange might get called multiple times with readyState === 4 on mobile webkit caused by\n        // xhrs that are resolved while the app is in the background (see #5426).\n        // since calling completeRequest sets the `xhr` variable to null, we just check if it's not null before\n        // continuing\n        //\n        // we can't set xhr.onreadystatechange to undefined or delete it because that breaks IE8 (method=PATCH) and\n        // Safari respectively.\n        if (xhr && xhr.readyState == 4) {\n          var responseHeaders = null,\n              response = null;\n\n          if(status !== ABORTED) {\n            responseHeaders = xhr.getAllResponseHeaders();\n\n            // responseText is the old-school way of retrieving response (supported by IE8 & 9)\n            // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)\n            response = ('response' in xhr) ? xhr.response : xhr.responseText;\n          }\n\n          completeRequest(callback,\n              status || xhr.status,\n              response,\n              responseHeaders);\n        }\n      };\n\n      if (withCredentials) {\n        xhr.withCredentials = true;\n      }\n\n      if (responseType) {\n        try {\n          xhr.responseType = responseType;\n        } catch (e) {\n          // WebKit added support for the json responseType value on 09/03/2013\n          // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are\n          // known to throw when setting the value \"json\" as the response type. Other older\n          // browsers implementing the responseType \n          //\n          // The json response type can be ignored if not supported, because JSON payloads are\n          // parsed on the client-side regardless.\n          if (responseType !== 'json') {\n            throw e;\n          }\n        }\n      }\n\n      xhr.send(post || null);\n    }\n\n    if (timeout > 0) {\n      var timeoutId = $browserDefer(timeoutRequest, timeout);\n    } else if (timeout && timeout.then) {\n      timeout.then(timeoutRequest);\n    }\n\n\n    function timeoutRequest() {\n      status = ABORTED;\n      jsonpDone && jsonpDone();\n      xhr && xhr.abort();\n    }\n\n    function completeRequest(callback, status, response, headersString) {\n      // cancel timeout and subsequent timeout promise resolution\n      timeoutId && $browserDefer.cancel(timeoutId);\n      jsonpDone = xhr = null;\n\n      // fix status code when it is 0 (0 status is undocumented).\n      // Occurs when accessing file resources.\n      // On Android 4.1 stock browser it occurs while retrieving files from application cache.\n      status = (status === 0) ? (response ? 200 : 404) : status;\n\n      // normalize IE bug (http://bugs.jquery.com/ticket/1450)\n      status = status == 1223 ? 204 : status;\n\n      callback(status, response, headersString);\n      $browser.$$completeOutstandingRequest(noop);\n    }\n  };\n\n  function jsonpReq(url, done) {\n    // we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.:\n    // - fetches local scripts via XHR and evals them\n    // - adds and immediately removes script elements from the document\n    var script = rawDocument.createElement('script'),\n        doneWrapper = function() {\n          script.onreadystatechange = script.onload = script.onerror = null;\n          rawDocument.body.removeChild(script);\n          if (done) done();\n        };\n\n    script.type = 'text/javascript';\n    script.src = url;\n\n    if (msie && msie <= 8) {\n      script.onreadystatechange = function() {\n        if (/loaded|complete/.test(script.readyState)) {\n          doneWrapper();\n        }\n      };\n    } else {\n      script.onload = script.onerror = function() {\n        doneWrapper();\n      };\n    }\n\n    rawDocument.body.appendChild(script);\n    return doneWrapper;\n  }\n}\n\nvar $interpolateMinErr = minErr('$interpolate');\n\n/**\n * @ngdoc object\n * @name ng.$interpolateProvider\n * @function\n *\n * @description\n *\n * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.\n *\n * @example\n<doc:example module=\"customInterpolationApp\">\n<doc:source>\n<script>\n  var customInterpolationApp = angular.module('customInterpolationApp', []);\n\n  customInterpolationApp.config(function($interpolateProvider) {\n    $interpolateProvider.startSymbol('//');\n    $interpolateProvider.endSymbol('//');\n  });\n\n\n  customInterpolationApp.controller('DemoController', function DemoController() {\n      this.label = \"This binding is brought you by // interpolation symbols.\";\n  });\n</script>\n<div ng-app=\"App\" ng-controller=\"DemoController as demo\">\n    //demo.label//\n</div>\n</doc:source>\n<doc:protractor>\n  it('should interpolate binding with custom symbols', function() {\n    expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');\n  });\n</doc:protractor>\n</doc:example>\n */\nfunction $InterpolateProvider() {\n  var startSymbol = '{{';\n  var endSymbol = '}}';\n\n  /**\n   * @ngdoc method\n   * @name ng.$interpolateProvider#startSymbol\n   * @methodOf ng.$interpolateProvider\n   * @description\n   * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.\n   *\n   * @param {string=} value new value to set the starting symbol to.\n   * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n   */\n  this.startSymbol = function(value){\n    if (value) {\n      startSymbol = value;\n      return this;\n    } else {\n      return startSymbol;\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name ng.$interpolateProvider#endSymbol\n   * @methodOf ng.$interpolateProvider\n   * @description\n   * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n   *\n   * @param {string=} value new value to set the ending symbol to.\n   * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n   */\n  this.endSymbol = function(value){\n    if (value) {\n      endSymbol = value;\n      return this;\n    } else {\n      return endSymbol;\n    }\n  };\n\n\n  this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {\n    var startSymbolLength = startSymbol.length,\n        endSymbolLength = endSymbol.length;\n\n    /**\n     * @ngdoc function\n     * @name ng.$interpolate\n     * @function\n     *\n     * @requires $parse\n     * @requires $sce\n     *\n     * @description\n     *\n     * Compiles a string with markup into an interpolation function. This service is used by the\n     * HTML {@link ng.$compile $compile} service for data binding. See\n     * {@link ng.$interpolateProvider $interpolateProvider} for configuring the\n     * interpolation markup.\n     *\n     *\n       <pre>\n         var $interpolate = ...; // injected\n         var exp = $interpolate('Hello {{name | uppercase}}!');\n         expect(exp({name:'Angular'}).toEqual('Hello ANGULAR!');\n       </pre>\n     *\n     *\n     * @param {string} text The text with markup to interpolate.\n     * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have\n     *    embedded expression in order to return an interpolation function. Strings with no\n     *    embedded expression will return null for the interpolation function.\n     * @param {string=} trustedContext when provided, the returned function passes the interpolated\n     *    result through {@link ng.$sce#methods_getTrusted $sce.getTrusted(interpolatedResult,\n     *    trustedContext)} before returning it.  Refer to the {@link ng.$sce $sce} service that\n     *    provides Strict Contextual Escaping for details.\n     * @returns {function(context)} an interpolation function which is used to compute the\n     *    interpolated string. The function has these parameters:\n     *\n     *    * `context`: an object against which any expressions embedded in the strings are evaluated\n     *      against.\n     *\n     */\n    function $interpolate(text, mustHaveExpression, trustedContext) {\n      var startIndex,\n          endIndex,\n          index = 0,\n          parts = [],\n          length = text.length,\n          hasInterpolation = false,\n          fn,\n          exp,\n          concat = [];\n\n      while(index < length) {\n        if ( ((startIndex = text.indexOf(startSymbol, index)) != -1) &&\n             ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1) ) {\n          (index != startIndex) && parts.push(text.substring(index, startIndex));\n          parts.push(fn = $parse(exp = text.substring(startIndex + startSymbolLength, endIndex)));\n          fn.exp = exp;\n          index = endIndex + endSymbolLength;\n          hasInterpolation = true;\n        } else {\n          // we did not find anything, so we have to add the remainder to the parts array\n          (index != length) && parts.push(text.substring(index));\n          index = length;\n        }\n      }\n\n      if (!(length = parts.length)) {\n        // we added, nothing, must have been an empty string.\n        parts.push('');\n        length = 1;\n      }\n\n      // Concatenating expressions makes it hard to reason about whether some combination of\n      // concatenated values are unsafe to use and could easily lead to XSS.  By requiring that a\n      // single expression be used for iframe[src], object[src], etc., we ensure that the value\n      // that's used is assigned or constructed by some JS code somewhere that is more testable or\n      // make it obvious that you bound the value to some user controlled value.  This helps reduce\n      // the load when auditing for XSS issues.\n      if (trustedContext && parts.length > 1) {\n          throw $interpolateMinErr('noconcat',\n              \"Error while interpolating: {0}\\nStrict Contextual Escaping disallows \" +\n              \"interpolations that concatenate multiple expressions when a trusted value is \" +\n              \"required.  See http://docs.angularjs.org/api/ng.$sce\", text);\n      }\n\n      if (!mustHaveExpression  || hasInterpolation) {\n        concat.length = length;\n        fn = function(context) {\n          try {\n            for(var i = 0, ii = length, part; i<ii; i++) {\n              if (typeof (part = parts[i]) == 'function') {\n                part = part(context);\n                if (trustedContext) {\n                  part = $sce.getTrusted(trustedContext, part);\n                } else {\n                  part = $sce.valueOf(part);\n                }\n                if (part === null || isUndefined(part)) {\n                  part = '';\n                } else if (typeof part != 'string') {\n                  part = toJson(part);\n                }\n              }\n              concat[i] = part;\n            }\n            return concat.join('');\n          }\n          catch(err) {\n            var newErr = $interpolateMinErr('interr', \"Can't interpolate: {0}\\n{1}\", text,\n                err.toString());\n            $exceptionHandler(newErr);\n          }\n        };\n        fn.exp = text;\n        fn.parts = parts;\n        return fn;\n      }\n    }\n\n\n    /**\n     * @ngdoc method\n     * @name ng.$interpolate#startSymbol\n     * @methodOf ng.$interpolate\n     * @description\n     * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.\n     *\n     * Use {@link ng.$interpolateProvider#startSymbol $interpolateProvider#startSymbol} to change\n     * the symbol.\n     *\n     * @returns {string} start symbol.\n     */\n    $interpolate.startSymbol = function() {\n      return startSymbol;\n    };\n\n\n    /**\n     * @ngdoc method\n     * @name ng.$interpolate#endSymbol\n     * @methodOf ng.$interpolate\n     * @description\n     * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n     *\n     * Use {@link ng.$interpolateProvider#endSymbol $interpolateProvider#endSymbol} to change\n     * the symbol.\n     *\n     * @returns {string} start symbol.\n     */\n    $interpolate.endSymbol = function() {\n      return endSymbol;\n    };\n\n    return $interpolate;\n  }];\n}\n\nfunction $IntervalProvider() {\n  this.$get = ['$rootScope', '$window', '$q',\n       function($rootScope,   $window,   $q) {\n    var intervals = {};\n\n\n     /**\n      * @ngdoc function\n      * @name ng.$interval\n      *\n      * @description\n      * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay`\n      * milliseconds.\n      *\n      * The return value of registering an interval function is a promise. This promise will be\n      * notified upon each tick of the interval, and will be resolved after `count` iterations, or\n      * run indefinitely if `count` is not defined. The value of the notification will be the\n      * number of iterations that have run.\n      * To cancel an interval, call `$interval.cancel(promise)`.\n      *\n      * In tests you can use {@link ngMock.$interval#methods_flush `$interval.flush(millis)`} to\n      * move forward by `millis` milliseconds and trigger any functions scheduled to run in that\n      * time.\n      *\n      * <div class=\"alert alert-warning\">\n      * **Note**: Intervals created by this service must be explicitly destroyed when you are finished\n      * with them.  In particular they are not automatically destroyed when a controller's scope or a\n      * directive's element are destroyed.\n      * You should take this into consideration and make sure to always cancel the interval at the\n      * appropriate moment.  See the example below for more details on how and when to do this.\n      * </div>\n      *\n      * @param {function()} fn A function that should be called repeatedly.\n      * @param {number} delay Number of milliseconds between each function call.\n      * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat\n      *   indefinitely.\n      * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n      *   will invoke `fn` within the {@link ng.$rootScope.Scope#methods_$apply $apply} block.\n      * @returns {promise} A promise which will be notified on each iteration.\n      *\n      * @example\n      <doc:example module=\"time\">\n        <doc:source>\n          <script>\n            function Ctrl2($scope,$interval) {\n              $scope.format = 'M/d/yy h:mm:ss a';\n              $scope.blood_1 = 100;\n              $scope.blood_2 = 120;\n\n              var stop;\n              $scope.fight = function() {\n                // Don't start a new fight if we are already fighting\n                if ( angular.isDefined(stop) ) return;\n\n                stop = $interval(function() {\n                  if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {\n                      $scope.blood_1 = $scope.blood_1 - 3;\n                      $scope.blood_2 = $scope.blood_2 - 4;\n                  } else {\n                      $scope.stopFight();\n                  }\n                }, 100);\n              };\n\n              $scope.stopFight = function() {\n                if (angular.isDefined(stop)) {\n                  $interval.cancel(stop);\n                  stop = undefined;\n                }\n              };\n\n              $scope.resetFight = function() {\n                $scope.blood_1 = 100;\n                $scope.blood_2 = 120;\n              }\n\n              $scope.$on('$destroy', function() {\n                // Make sure that the interval is destroyed too\n                $scope.stopFight();\n              });\n            }\n\n            angular.module('time', [])\n              // Register the 'myCurrentTime' directive factory method.\n              // We inject $interval and dateFilter service since the factory method is DI.\n              .directive('myCurrentTime', function($interval, dateFilter) {\n                // return the directive link function. (compile function not needed)\n                return function(scope, element, attrs) {\n                  var format,  // date format\n                  stopTime; // so that we can cancel the time updates\n\n                  // used to update the UI\n                  function updateTime() {\n                    element.text(dateFilter(new Date(), format));\n                  }\n\n                  // watch the expression, and update the UI on change.\n                  scope.$watch(attrs.myCurrentTime, function(value) {\n                    format = value;\n                    updateTime();\n                  });\n\n                  stopTime = $interval(updateTime, 1000);\n\n                  // listen on DOM destroy (removal) event, and cancel the next UI update\n                  // to prevent updating time ofter the DOM element was removed.\n                  element.bind('$destroy', function() {\n                    $interval.cancel(stopTime);\n                  });\n                }\n              });\n          </script>\n\n          <div>\n            <div ng-controller=\"Ctrl2\">\n              Date format: <input ng-model=\"format\"> <hr/>\n              Current time is: <span my-current-time=\"format\"></span>\n              <hr/>\n              Blood 1 : <font color='red'>{{blood_1}}</font>\n              Blood 2 : <font color='red'>{{blood_2}}</font>\n              <button type=\"button\" data-ng-click=\"fight()\">Fight</button>\n              <button type=\"button\" data-ng-click=\"stopFight()\">StopFight</button>\n              <button type=\"button\" data-ng-click=\"resetFight()\">resetFight</button>\n            </div>\n          </div>\n\n        </doc:source>\n      </doc:example>\n      */\n    function interval(fn, delay, count, invokeApply) {\n      var setInterval = $window.setInterval,\n          clearInterval = $window.clearInterval,\n          deferred = $q.defer(),\n          promise = deferred.promise,\n          iteration = 0,\n          skipApply = (isDefined(invokeApply) && !invokeApply);\n\n      count = isDefined(count) ? count : 0;\n\n      promise.then(null, null, fn);\n\n      promise.$$intervalId = setInterval(function tick() {\n        deferred.notify(iteration++);\n\n        if (count > 0 && iteration >= count) {\n          deferred.resolve(iteration);\n          clearInterval(promise.$$intervalId);\n          delete intervals[promise.$$intervalId];\n        }\n\n        if (!skipApply) $rootScope.$apply();\n\n      }, delay);\n\n      intervals[promise.$$intervalId] = deferred;\n\n      return promise;\n    }\n\n\n     /**\n      * @ngdoc function\n      * @name ng.$interval#cancel\n      * @methodOf ng.$interval\n      *\n      * @description\n      * Cancels a task associated with the `promise`.\n      *\n      * @param {number} promise Promise returned by the `$interval` function.\n      * @returns {boolean} Returns `true` if the task was successfully canceled.\n      */\n    interval.cancel = function(promise) {\n      if (promise && promise.$$intervalId in intervals) {\n        intervals[promise.$$intervalId].reject('canceled');\n        clearInterval(promise.$$intervalId);\n        delete intervals[promise.$$intervalId];\n        return true;\n      }\n      return false;\n    };\n\n    return interval;\n  }];\n}\n\n/**\n * @ngdoc object\n * @name ng.$locale\n *\n * @description\n * $locale service provides localization rules for various Angular components. As of right now the\n * only public api is:\n *\n * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)\n */\nfunction $LocaleProvider(){\n  this.$get = function() {\n    return {\n      id: 'en-us',\n\n      NUMBER_FORMATS: {\n        DECIMAL_SEP: '.',\n        GROUP_SEP: ',',\n        PATTERNS: [\n          { // Decimal Pattern\n            minInt: 1,\n            minFrac: 0,\n            maxFrac: 3,\n            posPre: '',\n            posSuf: '',\n            negPre: '-',\n            negSuf: '',\n            gSize: 3,\n            lgSize: 3\n          },{ //Currency Pattern\n            minInt: 1,\n            minFrac: 2,\n            maxFrac: 2,\n            posPre: '\\u00A4',\n            posSuf: '',\n            negPre: '(\\u00A4',\n            negSuf: ')',\n            gSize: 3,\n            lgSize: 3\n          }\n        ],\n        CURRENCY_SYM: '$'\n      },\n\n      DATETIME_FORMATS: {\n        MONTH:\n            'January,February,March,April,May,June,July,August,September,October,November,December'\n            .split(','),\n        SHORTMONTH:  'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),\n        DAY: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),\n        SHORTDAY: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','),\n        AMPMS: ['AM','PM'],\n        medium: 'MMM d, y h:mm:ss a',\n        short: 'M/d/yy h:mm a',\n        fullDate: 'EEEE, MMMM d, y',\n        longDate: 'MMMM d, y',\n        mediumDate: 'MMM d, y',\n        shortDate: 'M/d/yy',\n        mediumTime: 'h:mm:ss a',\n        shortTime: 'h:mm a'\n      },\n\n      pluralCat: function(num) {\n        if (num === 1) {\n          return 'one';\n        }\n        return 'other';\n      }\n    };\n  };\n}\n\nvar PATH_MATCH = /^([^\\?#]*)(\\?([^#]*))?(#(.*))?$/,\n    DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};\nvar $locationMinErr = minErr('$location');\n\n\n/**\n * Encode path using encodeUriSegment, ignoring forward slashes\n *\n * @param {string} path Path to encode\n * @returns {string}\n */\nfunction encodePath(path) {\n  var segments = path.split('/'),\n      i = segments.length;\n\n  while (i--) {\n    segments[i] = encodeUriSegment(segments[i]);\n  }\n\n  return segments.join('/');\n}\n\nfunction parseAbsoluteUrl(absoluteUrl, locationObj, appBase) {\n  var parsedUrl = urlResolve(absoluteUrl, appBase);\n\n  locationObj.$$protocol = parsedUrl.protocol;\n  locationObj.$$host = parsedUrl.hostname;\n  locationObj.$$port = int(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;\n}\n\n\nfunction parseAppUrl(relativeUrl, locationObj, appBase) {\n  var prefixed = (relativeUrl.charAt(0) !== '/');\n  if (prefixed) {\n    relativeUrl = '/' + relativeUrl;\n  }\n  var match = urlResolve(relativeUrl, appBase);\n  locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?\n      match.pathname.substring(1) : match.pathname);\n  locationObj.$$search = parseKeyValue(match.search);\n  locationObj.$$hash = decodeURIComponent(match.hash);\n\n  // make sure path starts with '/';\n  if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {\n    locationObj.$$path = '/' + locationObj.$$path;\n  }\n}\n\n\n/**\n *\n * @param {string} begin\n * @param {string} whole\n * @returns {string} returns text from whole after begin or undefined if it does not begin with\n *                   expected string.\n */\nfunction beginsWith(begin, whole) {\n  if (whole.indexOf(begin) === 0) {\n    return whole.substr(begin.length);\n  }\n}\n\n\nfunction stripHash(url) {\n  var index = url.indexOf('#');\n  return index == -1 ? url : url.substr(0, index);\n}\n\n\nfunction stripFile(url) {\n  return url.substr(0, stripHash(url).lastIndexOf('/') + 1);\n}\n\n/* return the server only (scheme://host:port) */\nfunction serverBase(url) {\n  return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));\n}\n\n\n/**\n * LocationHtml5Url represents an url\n * This object is exposed as $location service when HTML5 mode is enabled and supported\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} basePrefix url path prefix\n */\nfunction LocationHtml5Url(appBase, basePrefix) {\n  this.$$html5 = true;\n  basePrefix = basePrefix || '';\n  var appBaseNoFile = stripFile(appBase);\n  parseAbsoluteUrl(appBase, this, appBase);\n\n\n  /**\n   * Parse given html5 (regular) url string into properties\n   * @param {string} newAbsoluteUrl HTML5 url\n   * @private\n   */\n  this.$$parse = function(url) {\n    var pathUrl = beginsWith(appBaseNoFile, url);\n    if (!isString(pathUrl)) {\n      throw $locationMinErr('ipthprfx', 'Invalid url \"{0}\", missing path prefix \"{1}\".', url,\n          appBaseNoFile);\n    }\n\n    parseAppUrl(pathUrl, this, appBase);\n\n    if (!this.$$path) {\n      this.$$path = '/';\n    }\n\n    this.$$compose();\n  };\n\n  /**\n   * Compose url and update `absUrl` property\n   * @private\n   */\n  this.$$compose = function() {\n    var search = toKeyValue(this.$$search),\n        hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n    this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n    this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'\n  };\n\n  this.$$rewrite = function(url) {\n    var appUrl, prevAppUrl;\n\n    if ( (appUrl = beginsWith(appBase, url)) !== undefined ) {\n      prevAppUrl = appUrl;\n      if ( (appUrl = beginsWith(basePrefix, appUrl)) !== undefined ) {\n        return appBaseNoFile + (beginsWith('/', appUrl) || appUrl);\n      } else {\n        return appBase + prevAppUrl;\n      }\n    } else if ( (appUrl = beginsWith(appBaseNoFile, url)) !== undefined ) {\n      return appBaseNoFile + appUrl;\n    } else if (appBaseNoFile == url + '/') {\n      return appBaseNoFile;\n    }\n  };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when developer doesn't opt into html5 mode.\n * It also serves as the base class for html5 mode fallback on legacy browsers.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangUrl(appBase, hashPrefix) {\n  var appBaseNoFile = stripFile(appBase);\n\n  parseAbsoluteUrl(appBase, this, appBase);\n\n\n  /**\n   * Parse given hashbang url into properties\n   * @param {string} url Hashbang url\n   * @private\n   */\n  this.$$parse = function(url) {\n    var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);\n    var withoutHashUrl = withoutBaseUrl.charAt(0) == '#'\n        ? beginsWith(hashPrefix, withoutBaseUrl)\n        : (this.$$html5)\n          ? withoutBaseUrl\n          : '';\n\n    if (!isString(withoutHashUrl)) {\n      throw $locationMinErr('ihshprfx', 'Invalid url \"{0}\", missing hash prefix \"{1}\".', url,\n          hashPrefix);\n    }\n    parseAppUrl(withoutHashUrl, this, appBase);\n\n    this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);\n\n    this.$$compose();\n\n    /*\n     * In Windows, on an anchor node on documents loaded from\n     * the filesystem, the browser will return a pathname\n     * prefixed with the drive name ('/C:/path') when a\n     * pathname without a drive is set:\n     *  * a.setAttribute('href', '/foo')\n     *   * a.pathname === '/C:/foo' //true\n     *\n     * Inside of Angular, we're always using pathnames that\n     * do not include drive names for routing.\n     */\n    function removeWindowsDriveName (path, url, base) {\n      /*\n      Matches paths for file protocol on windows,\n      such as /C:/foo/bar, and captures only /foo/bar.\n      */\n      var windowsFilePathExp = /^\\/?.*?:(\\/.*)/;\n\n      var firstPathSegmentMatch;\n\n      //Get the relative path from the input URL.\n      if (url.indexOf(base) === 0) {\n        url = url.replace(base, '');\n      }\n\n      /*\n       * The input URL intentionally contains a\n       * first path segment that ends with a colon.\n       */\n      if (windowsFilePathExp.exec(url)) {\n        return path;\n      }\n\n      firstPathSegmentMatch = windowsFilePathExp.exec(path);\n      return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;\n    }\n  };\n\n  /**\n   * Compose hashbang url and update `absUrl` property\n   * @private\n   */\n  this.$$compose = function() {\n    var search = toKeyValue(this.$$search),\n        hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n    this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n    this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');\n  };\n\n  this.$$rewrite = function(url) {\n    if(stripHash(appBase) == stripHash(url)) {\n      return url;\n    }\n  };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when html5 history api is enabled but the browser\n * does not support it.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangInHtml5Url(appBase, hashPrefix) {\n  this.$$html5 = true;\n  LocationHashbangUrl.apply(this, arguments);\n\n  var appBaseNoFile = stripFile(appBase);\n\n  this.$$rewrite = function(url) {\n    var appUrl;\n\n    if ( appBase == stripHash(url) ) {\n      return url;\n    } else if ( (appUrl = beginsWith(appBaseNoFile, url)) ) {\n      return appBase + hashPrefix + appUrl;\n    } else if ( appBaseNoFile === url + '/') {\n      return appBaseNoFile;\n    }\n  };\n}\n\n\nLocationHashbangInHtml5Url.prototype =\n  LocationHashbangUrl.prototype =\n  LocationHtml5Url.prototype = {\n\n  /**\n   * Are we in html5 mode?\n   * @private\n   */\n  $$html5: false,\n\n  /**\n   * Has any change been replacing ?\n   * @private\n   */\n  $$replace: false,\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#absUrl\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return full url representation with all segments encoded according to rules specified in\n   * {@link http://www.ietf.org/rfc/rfc3986.txt RFC 3986}.\n   *\n   * @return {string} full url\n   */\n  absUrl: locationGetter('$$absUrl'),\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#url\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return url (e.g. `/path?a=b#hash`) when called without any parameter.\n   *\n   * Change path, search and hash, when called with parameter and return `$location`.\n   *\n   * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)\n   * @param {string=} replace The path that will be changed\n   * @return {string} url\n   */\n  url: function(url, replace) {\n    if (isUndefined(url))\n      return this.$$url;\n\n    var match = PATH_MATCH.exec(url);\n    if (match[1]) this.path(decodeURIComponent(match[1]));\n    if (match[2] || match[1]) this.search(match[3] || '');\n    this.hash(match[5] || '', replace);\n\n    return this;\n  },\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#protocol\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return protocol of current url.\n   *\n   * @return {string} protocol of current url\n   */\n  protocol: locationGetter('$$protocol'),\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#host\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return host of current url.\n   *\n   * @return {string} host of current url.\n   */\n  host: locationGetter('$$host'),\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#port\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return port of current url.\n   *\n   * @return {Number} port\n   */\n  port: locationGetter('$$port'),\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#path\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return path of current url when called without any parameter.\n   *\n   * Change path when called with parameter and return `$location`.\n   *\n   * Note: Path should always begin with forward slash (/), this method will add the forward slash\n   * if it is missing.\n   *\n   * @param {string=} path New path\n   * @return {string} path\n   */\n  path: locationGetterSetter('$$path', function(path) {\n    return path.charAt(0) == '/' ? path : '/' + path;\n  }),\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#search\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return search part (as object) of current url when called without any parameter.\n   *\n   * Change search part when called with parameter and return `$location`.\n   *\n   * @param {string|Object.<string>|Object.<Array.<string>>} search New search params - string or\n   * hash object. Hash object may contain an array of values, which will be decoded as duplicates in\n   * the url.\n   *\n   * @param {(string|Array<string>)=} paramValue If `search` is a string, then `paramValue` will override only a\n   * single search parameter. If `paramValue` is an array, it will set the parameter as a\n   * comma-separated value. If `paramValue` is `null`, the parameter will be deleted.\n   *\n   * @return {string} search\n   */\n  search: function(search, paramValue) {\n    switch (arguments.length) {\n      case 0:\n        return this.$$search;\n      case 1:\n        if (isString(search)) {\n          this.$$search = parseKeyValue(search);\n        } else if (isObject(search)) {\n          this.$$search = search;\n        } else {\n          throw $locationMinErr('isrcharg',\n              'The first argument of the `$location#search()` call must be a string or an object.');\n        }\n        break;\n      default:\n        if (isUndefined(paramValue) || paramValue === null) {\n          delete this.$$search[search];\n        } else {\n          this.$$search[search] = paramValue;\n        }\n    }\n\n    this.$$compose();\n    return this;\n  },\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#hash\n   * @methodOf ng.$location\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return hash fragment when called without any parameter.\n   *\n   * Change hash fragment when called with parameter and return `$location`.\n   *\n   * @param {string=} hash New hash fragment\n   * @return {string} hash\n   */\n  hash: locationGetterSetter('$$hash', identity),\n\n  /**\n   * @ngdoc method\n   * @name ng.$location#replace\n   * @methodOf ng.$location\n   *\n   * @description\n   * If called, all changes to $location during current `$digest` will be replacing current history\n   * record, instead of adding new one.\n   */\n  replace: function() {\n    this.$$replace = true;\n    return this;\n  }\n};\n\nfunction locationGetter(property) {\n  return function() {\n    return this[property];\n  };\n}\n\n\nfunction locationGetterSetter(property, preprocess) {\n  return function(value) {\n    if (isUndefined(value))\n      return this[property];\n\n    this[property] = preprocess(value);\n    this.$$compose();\n\n    return this;\n  };\n}\n\n\n/**\n * @ngdoc object\n * @name ng.$location\n *\n * @requires $browser\n * @requires $sniffer\n * @requires $rootElement\n *\n * @description\n * The $location service parses the URL in the browser address bar (based on the\n * {@link https://developer.mozilla.org/en/window.location window.location}) and makes the URL\n * available to your application. Changes to the URL in the address bar are reflected into\n * $location service and changes to $location are reflected into the browser address bar.\n *\n * **The $location service:**\n *\n * - Exposes the current URL in the browser address bar, so you can\n *   - Watch and observe the URL.\n *   - Change the URL.\n * - Synchronizes the URL with the browser when the user\n *   - Changes the address bar.\n *   - Clicks the back or forward button (or clicks a History link).\n *   - Clicks on a link.\n * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).\n *\n * For more information see {@link guide/dev_guide.services.$location Developer Guide: Angular\n * Services: Using $location}\n */\n\n/**\n * @ngdoc object\n * @name ng.$locationProvider\n * @description\n * Use the `$locationProvider` to configure how the application deep linking paths are stored.\n */\nfunction $LocationProvider(){\n  var hashPrefix = '',\n      html5Mode = false;\n\n  /**\n   * @ngdoc property\n   * @name ng.$locationProvider#hashPrefix\n   * @methodOf ng.$locationProvider\n   * @description\n   * @param {string=} prefix Prefix for hash part (containing path and search)\n   * @returns {*} current value if used as getter or itself (chaining) if used as setter\n   */\n  this.hashPrefix = function(prefix) {\n    if (isDefined(prefix)) {\n      hashPrefix = prefix;\n      return this;\n    } else {\n      return hashPrefix;\n    }\n  };\n\n  /**\n   * @ngdoc property\n   * @name ng.$locationProvider#html5Mode\n   * @methodOf ng.$locationProvider\n   * @description\n   * @param {boolean=} mode Use HTML5 strategy if available.\n   * @returns {*} current value if used as getter or itself (chaining) if used as setter\n   */\n  this.html5Mode = function(mode) {\n    if (isDefined(mode)) {\n      html5Mode = mode;\n      return this;\n    } else {\n      return html5Mode;\n    }\n  };\n\n  /**\n   * @ngdoc event\n   * @name ng.$location#$locationChangeStart\n   * @eventOf ng.$location\n   * @eventType broadcast on root scope\n   * @description\n   * Broadcasted before a URL will change. This change can be prevented by calling\n   * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more\n   * details about event object. Upon successful change\n   * {@link ng.$location#events_$locationChangeSuccess $locationChangeSuccess} is fired.\n   *\n   * @param {Object} angularEvent Synthetic event object.\n   * @param {string} newUrl New URL\n   * @param {string=} oldUrl URL that was before it was changed.\n   */\n\n  /**\n   * @ngdoc event\n   * @name ng.$location#$locationChangeSuccess\n   * @eventOf ng.$location\n   * @eventType broadcast on root scope\n   * @description\n   * Broadcasted after a URL was changed.\n   *\n   * @param {Object} angularEvent Synthetic event object.\n   * @param {string} newUrl New URL\n   * @param {string=} oldUrl URL that was before it was changed.\n   */\n\n  this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement',\n      function( $rootScope,   $browser,   $sniffer,   $rootElement) {\n    var $location,\n        LocationMode,\n        baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''\n        initialUrl = $browser.url(),\n        appBase;\n\n    if (html5Mode) {\n      appBase = serverBase(initialUrl) + (baseHref || '/');\n      LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;\n    } else {\n      appBase = stripHash(initialUrl);\n      LocationMode = LocationHashbangUrl;\n    }\n    $location = new LocationMode(appBase, '#' + hashPrefix);\n    $location.$$parse($location.$$rewrite(initialUrl));\n\n    $rootElement.on('click', function(event) {\n      // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)\n      // currently we open nice url link and redirect then\n\n      if (event.ctrlKey || event.metaKey || event.which == 2) return;\n\n      var elm = jqLite(event.target);\n\n      // traverse the DOM up to find first A tag\n      while (lowercase(elm[0].nodeName) !== 'a') {\n        // ignore rewriting if no A tag (reached root element, or no parent - removed from document)\n        if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;\n      }\n\n      var absHref = elm.prop('href');\n\n      if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {\n        // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during\n        // an animation.\n        absHref = urlResolve(absHref.animVal).href;\n      }\n\n      var rewrittenUrl = $location.$$rewrite(absHref);\n\n      if (absHref && !elm.attr('target') && rewrittenUrl && !event.isDefaultPrevented()) {\n        event.preventDefault();\n        if (rewrittenUrl != $browser.url()) {\n          // update location manually\n          $location.$$parse(rewrittenUrl);\n          $rootScope.$apply();\n          // hack to work around FF6 bug 684208 when scenario runner clicks on links\n          window.angular['ff-684208-preventDefault'] = true;\n        }\n      }\n    });\n\n\n    // rewrite hashbang url <> html5 url\n    if ($location.absUrl() != initialUrl) {\n      $browser.url($location.absUrl(), true);\n    }\n\n    // update $location when $browser url changes\n    $browser.onUrlChange(function(newUrl) {\n      if ($location.absUrl() != newUrl) {\n        $rootScope.$evalAsync(function() {\n          var oldUrl = $location.absUrl();\n\n          $location.$$parse(newUrl);\n          if ($rootScope.$broadcast('$locationChangeStart', newUrl,\n                                    oldUrl).defaultPrevented) {\n            $location.$$parse(oldUrl);\n            $browser.url(oldUrl);\n          } else {\n            afterLocationChange(oldUrl);\n          }\n        });\n        if (!$rootScope.$$phase) $rootScope.$digest();\n      }\n    });\n\n    // update browser\n    var changeCounter = 0;\n    $rootScope.$watch(function $locationWatch() {\n      var oldUrl = $browser.url();\n      var currentReplace = $location.$$replace;\n\n      if (!changeCounter || oldUrl != $location.absUrl()) {\n        changeCounter++;\n        $rootScope.$evalAsync(function() {\n          if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n              defaultPrevented) {\n            $location.$$parse(oldUrl);\n          } else {\n            $browser.url($location.absUrl(), currentReplace);\n            afterLocationChange(oldUrl);\n          }\n        });\n      }\n      $location.$$replace = false;\n\n      return changeCounter;\n    });\n\n    return $location;\n\n    function afterLocationChange(oldUrl) {\n      $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl);\n    }\n}];\n}\n\n/**\n * @ngdoc object\n * @name ng.$log\n * @requires $window\n *\n * @description\n * Simple service for logging. Default implementation safely writes the message\n * into the browser's console (if present).\n * \n * The main purpose of this service is to simplify debugging and troubleshooting.\n *\n * The default is to log `debug` messages. You can use\n * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.\n *\n * @example\n   <example>\n     <file name=\"script.js\">\n       function LogCtrl($scope, $log) {\n         $scope.$log = $log;\n         $scope.message = 'Hello World!';\n       }\n     </file>\n     <file name=\"index.html\">\n       <div ng-controller=\"LogCtrl\">\n         <p>Reload this page with open console, enter text and hit the log button...</p>\n         Message:\n         <input type=\"text\" ng-model=\"message\"/>\n         <button ng-click=\"$log.log(message)\">log</button>\n         <button ng-click=\"$log.warn(message)\">warn</button>\n         <button ng-click=\"$log.info(message)\">info</button>\n         <button ng-click=\"$log.error(message)\">error</button>\n       </div>\n     </file>\n   </example>\n */\n\n/**\n * @ngdoc object\n * @name ng.$logProvider\n * @description\n * Use the `$logProvider` to configure how the application logs messages\n */\nfunction $LogProvider(){\n  var debug = true,\n      self = this;\n  \n  /**\n   * @ngdoc property\n   * @name ng.$logProvider#debugEnabled\n   * @methodOf ng.$logProvider\n   * @description\n   * @param {boolean=} flag enable or disable debug level messages\n   * @returns {*} current value if used as getter or itself (chaining) if used as setter\n   */\n  this.debugEnabled = function(flag) {\n    if (isDefined(flag)) {\n      debug = flag;\n    return this;\n    } else {\n      return debug;\n    }\n  };\n  \n  this.$get = ['$window', function($window){\n    return {\n      /**\n       * @ngdoc method\n       * @name ng.$log#log\n       * @methodOf ng.$log\n       *\n       * @description\n       * Write a log message\n       */\n      log: consoleLog('log'),\n\n      /**\n       * @ngdoc method\n       * @name ng.$log#info\n       * @methodOf ng.$log\n       *\n       * @description\n       * Write an information message\n       */\n      info: consoleLog('info'),\n\n      /**\n       * @ngdoc method\n       * @name ng.$log#warn\n       * @methodOf ng.$log\n       *\n       * @description\n       * Write a warning message\n       */\n      warn: consoleLog('warn'),\n\n      /**\n       * @ngdoc method\n       * @name ng.$log#error\n       * @methodOf ng.$log\n       *\n       * @description\n       * Write an error message\n       */\n      error: consoleLog('error'),\n      \n      /**\n       * @ngdoc method\n       * @name ng.$log#debug\n       * @methodOf ng.$log\n       * \n       * @description\n       * Write a debug message\n       */\n      debug: (function () {\n        var fn = consoleLog('debug');\n\n        return function() {\n          if (debug) {\n            fn.apply(self, arguments);\n          }\n        };\n      }())\n    };\n\n    function formatError(arg) {\n      if (arg instanceof Error) {\n        if (arg.stack) {\n          arg = (arg.message && arg.stack.indexOf(arg.message) === -1)\n              ? 'Error: ' + arg.message + '\\n' + arg.stack\n              : arg.stack;\n        } else if (arg.sourceURL) {\n          arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n        }\n      }\n      return arg;\n    }\n\n    function consoleLog(type) {\n      var console = $window.console || {},\n          logFn = console[type] || console.log || noop,\n          hasApply = false;\n\n      // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.\n      // The reason behind this is that console.log has type \"object\" in IE8...\n      try {\n        hasApply = !! logFn.apply;\n      } catch (e) {}\n\n      if (hasApply) {\n        return function() {\n          var args = [];\n          forEach(arguments, function(arg) {\n            args.push(formatError(arg));\n          });\n          return logFn.apply(console, args);\n        };\n      }\n\n      // we are IE which either doesn't have window.console => this is noop and we do nothing,\n      // or we are IE where console.log doesn't have apply so we log at least first 2 args\n      return function(arg1, arg2) {\n        logFn(arg1, arg2 == null ? '' : arg2);\n      };\n    }\n  }];\n}\n\nvar $parseMinErr = minErr('$parse');\nvar promiseWarningCache = {};\nvar promiseWarning;\n\n// Sandboxing Angular Expressions\n// ------------------------------\n// Angular expressions are generally considered safe because these expressions only have direct\n// access to $scope and locals. However, one can obtain the ability to execute arbitrary JS code by\n// obtaining a reference to native JS functions such as the Function constructor.\n//\n// As an example, consider the following Angular expression:\n//\n//   {}.toString.constructor(alert(\"evil JS code\"))\n//\n// We want to prevent this type of access. For the sake of performance, during the lexing phase we\n// disallow any \"dotted\" access to any member named \"constructor\".\n//\n// For reflective calls (a[b]) we check that the value of the lookup is not the Function constructor\n// while evaluating the expression, which is a stronger but more expensive test. Since reflective\n// calls are expensive anyway, this is not such a big deal compared to static dereferencing.\n//\n// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits\n// against the expression language, but not to prevent exploits that were enabled by exposing\n// sensitive JavaScript or browser apis on Scope. Exposing such objects on a Scope is never a good\n// practice and therefore we are not even trying to protect against interaction with an object\n// explicitly exposed in this way.\n//\n// A developer could foil the name check by aliasing the Function constructor under a different\n// name on the scope.\n//\n// In general, it is not possible to access a Window object from an angular expression unless a\n// window or some DOM object that has a reference to window is published onto a Scope.\n\nfunction ensureSafeMemberName(name, fullExpression) {\n  if (name === \"constructor\") {\n    throw $parseMinErr('isecfld',\n        'Referencing \"constructor\" field in Angular expressions is disallowed! Expression: {0}',\n        fullExpression);\n  }\n  return name;\n}\n\nfunction ensureSafeObject(obj, fullExpression) {\n  // nifty check if obj is Function that is fast and works across iframes and other contexts\n  if (obj) {\n    if (obj.constructor === obj) {\n      throw $parseMinErr('isecfn',\n          'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n          fullExpression);\n    } else if (// isWindow(obj)\n        obj.document && obj.location && obj.alert && obj.setInterval) {\n      throw $parseMinErr('isecwindow',\n          'Referencing the Window in Angular expressions is disallowed! Expression: {0}',\n          fullExpression);\n    } else if (// isElement(obj)\n        obj.children && (obj.nodeName || (obj.on && obj.find))) {\n      throw $parseMinErr('isecdom',\n          'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',\n          fullExpression);\n    }\n  }\n  return obj;\n}\n\nvar OPERATORS = {\n    /* jshint bitwise : false */\n    'null':function(){return null;},\n    'true':function(){return true;},\n    'false':function(){return false;},\n    undefined:noop,\n    '+':function(self, locals, a,b){\n      a=a(self, locals); b=b(self, locals);\n      if (isDefined(a)) {\n        if (isDefined(b)) {\n          return a + b;\n        }\n        return a;\n      }\n      return isDefined(b)?b:undefined;},\n    '-':function(self, locals, a,b){\n          a=a(self, locals); b=b(self, locals);\n          return (isDefined(a)?a:0)-(isDefined(b)?b:0);\n        },\n    '*':function(self, locals, a,b){return a(self, locals)*b(self, locals);},\n    '/':function(self, locals, a,b){return a(self, locals)/b(self, locals);},\n    '%':function(self, locals, a,b){return a(self, locals)%b(self, locals);},\n    '^':function(self, locals, a,b){return a(self, locals)^b(self, locals);},\n    '=':noop,\n    '===':function(self, locals, a, b){return a(self, locals)===b(self, locals);},\n    '!==':function(self, locals, a, b){return a(self, locals)!==b(self, locals);},\n    '==':function(self, locals, a,b){return a(self, locals)==b(self, locals);},\n    '!=':function(self, locals, a,b){return a(self, locals)!=b(self, locals);},\n    '<':function(self, locals, a,b){return a(self, locals)<b(self, locals);},\n    '>':function(self, locals, a,b){return a(self, locals)>b(self, locals);},\n    '<=':function(self, locals, a,b){return a(self, locals)<=b(self, locals);},\n    '>=':function(self, locals, a,b){return a(self, locals)>=b(self, locals);},\n    '&&':function(self, locals, a,b){return a(self, locals)&&b(self, locals);},\n    '||':function(self, locals, a,b){return a(self, locals)||b(self, locals);},\n    '&':function(self, locals, a,b){return a(self, locals)&b(self, locals);},\n//    '|':function(self, locals, a,b){return a|b;},\n    '|':function(self, locals, a,b){return b(self, locals)(self, locals, a(self, locals));},\n    '!':function(self, locals, a){return !a(self, locals);}\n};\n/* jshint bitwise: true */\nvar ESCAPE = {\"n\":\"\\n\", \"f\":\"\\f\", \"r\":\"\\r\", \"t\":\"\\t\", \"v\":\"\\v\", \"'\":\"'\", '\"':'\"'};\n\n\n/////////////////////////////////////////\n\n\n/**\n * @constructor\n */\nvar Lexer = function (options) {\n  this.options = options;\n};\n\nLexer.prototype = {\n  constructor: Lexer,\n\n  lex: function (text) {\n    this.text = text;\n\n    this.index = 0;\n    this.ch = undefined;\n    this.lastCh = ':'; // can start regexp\n\n    this.tokens = [];\n\n    var token;\n    var json = [];\n\n    while (this.index < this.text.length) {\n      this.ch = this.text.charAt(this.index);\n      if (this.is('\"\\'')) {\n        this.readString(this.ch);\n      } else if (this.isNumber(this.ch) || this.is('.') && this.isNumber(this.peek())) {\n        this.readNumber();\n      } else if (this.isIdent(this.ch)) {\n        this.readIdent();\n        // identifiers can only be if the preceding char was a { or ,\n        if (this.was('{,') && json[0] === '{' &&\n            (token = this.tokens[this.tokens.length - 1])) {\n          token.json = token.text.indexOf('.') === -1;\n        }\n      } else if (this.is('(){}[].,;:?')) {\n        this.tokens.push({\n          index: this.index,\n          text: this.ch,\n          json: (this.was(':[,') && this.is('{[')) || this.is('}]:,')\n        });\n        if (this.is('{[')) json.unshift(this.ch);\n        if (this.is('}]')) json.shift();\n        this.index++;\n      } else if (this.isWhitespace(this.ch)) {\n        this.index++;\n        continue;\n      } else {\n        var ch2 = this.ch + this.peek();\n        var ch3 = ch2 + this.peek(2);\n        var fn = OPERATORS[this.ch];\n        var fn2 = OPERATORS[ch2];\n        var fn3 = OPERATORS[ch3];\n        if (fn3) {\n          this.tokens.push({index: this.index, text: ch3, fn: fn3});\n          this.index += 3;\n        } else if (fn2) {\n          this.tokens.push({index: this.index, text: ch2, fn: fn2});\n          this.index += 2;\n        } else if (fn) {\n          this.tokens.push({\n            index: this.index,\n            text: this.ch,\n            fn: fn,\n            json: (this.was('[,:') && this.is('+-'))\n          });\n          this.index += 1;\n        } else {\n          this.throwError('Unexpected next character ', this.index, this.index + 1);\n        }\n      }\n      this.lastCh = this.ch;\n    }\n    return this.tokens;\n  },\n\n  is: function(chars) {\n    return chars.indexOf(this.ch) !== -1;\n  },\n\n  was: function(chars) {\n    return chars.indexOf(this.lastCh) !== -1;\n  },\n\n  peek: function(i) {\n    var num = i || 1;\n    return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;\n  },\n\n  isNumber: function(ch) {\n    return ('0' <= ch && ch <= '9');\n  },\n\n  isWhitespace: function(ch) {\n    // IE treats non-breaking space as \\u00A0\n    return (ch === ' ' || ch === '\\r' || ch === '\\t' ||\n            ch === '\\n' || ch === '\\v' || ch === '\\u00A0');\n  },\n\n  isIdent: function(ch) {\n    return ('a' <= ch && ch <= 'z' ||\n            'A' <= ch && ch <= 'Z' ||\n            '_' === ch || ch === '$');\n  },\n\n  isExpOperator: function(ch) {\n    return (ch === '-' || ch === '+' || this.isNumber(ch));\n  },\n\n  throwError: function(error, start, end) {\n    end = end || this.index;\n    var colStr = (isDefined(start)\n            ? 's ' + start +  '-' + this.index + ' [' + this.text.substring(start, end) + ']'\n            : ' ' + end);\n    throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',\n        error, colStr, this.text);\n  },\n\n  readNumber: function() {\n    var number = '';\n    var start = this.index;\n    while (this.index < this.text.length) {\n      var ch = lowercase(this.text.charAt(this.index));\n      if (ch == '.' || this.isNumber(ch)) {\n        number += ch;\n      } else {\n        var peekCh = this.peek();\n        if (ch == 'e' && this.isExpOperator(peekCh)) {\n          number += ch;\n        } else if (this.isExpOperator(ch) &&\n            peekCh && this.isNumber(peekCh) &&\n            number.charAt(number.length - 1) == 'e') {\n          number += ch;\n        } else if (this.isExpOperator(ch) &&\n            (!peekCh || !this.isNumber(peekCh)) &&\n            number.charAt(number.length - 1) == 'e') {\n          this.throwError('Invalid exponent');\n        } else {\n          break;\n        }\n      }\n      this.index++;\n    }\n    number = 1 * number;\n    this.tokens.push({\n      index: start,\n      text: number,\n      json: true,\n      fn: function() { return number; }\n    });\n  },\n\n  readIdent: function() {\n    var parser = this;\n\n    var ident = '';\n    var start = this.index;\n\n    var lastDot, peekIndex, methodName, ch;\n\n    while (this.index < this.text.length) {\n      ch = this.text.charAt(this.index);\n      if (ch === '.' || this.isIdent(ch) || this.isNumber(ch)) {\n        if (ch === '.') lastDot = this.index;\n        ident += ch;\n      } else {\n        break;\n      }\n      this.index++;\n    }\n\n    //check if this is not a method invocation and if it is back out to last dot\n    if (lastDot) {\n      peekIndex = this.index;\n      while (peekIndex < this.text.length) {\n        ch = this.text.charAt(peekIndex);\n        if (ch === '(') {\n          methodName = ident.substr(lastDot - start + 1);\n          ident = ident.substr(0, lastDot - start);\n          this.index = peekIndex;\n          break;\n        }\n        if (this.isWhitespace(ch)) {\n          peekIndex++;\n        } else {\n          break;\n        }\n      }\n    }\n\n\n    var token = {\n      index: start,\n      text: ident\n    };\n\n    // OPERATORS is our own object so we don't need to use special hasOwnPropertyFn\n    if (OPERATORS.hasOwnProperty(ident)) {\n      token.fn = OPERATORS[ident];\n      token.json = OPERATORS[ident];\n    } else {\n      var getter = getterFn(ident, this.options, this.text);\n      token.fn = extend(function(self, locals) {\n        return (getter(self, locals));\n      }, {\n        assign: function(self, value) {\n          return setter(self, ident, value, parser.text, parser.options);\n        }\n      });\n    }\n\n    this.tokens.push(token);\n\n    if (methodName) {\n      this.tokens.push({\n        index:lastDot,\n        text: '.',\n        json: false\n      });\n      this.tokens.push({\n        index: lastDot + 1,\n        text: methodName,\n        json: false\n      });\n    }\n  },\n\n  readString: function(quote) {\n    var start = this.index;\n    this.index++;\n    var string = '';\n    var rawString = quote;\n    var escape = false;\n    while (this.index < this.text.length) {\n      var ch = this.text.charAt(this.index);\n      rawString += ch;\n      if (escape) {\n        if (ch === 'u') {\n          var hex = this.text.substring(this.index + 1, this.index + 5);\n          if (!hex.match(/[\\da-f]{4}/i))\n            this.throwError('Invalid unicode escape [\\\\u' + hex + ']');\n          this.index += 4;\n          string += String.fromCharCode(parseInt(hex, 16));\n        } else {\n          var rep = ESCAPE[ch];\n          if (rep) {\n            string += rep;\n          } else {\n            string += ch;\n          }\n        }\n        escape = false;\n      } else if (ch === '\\\\') {\n        escape = true;\n      } else if (ch === quote) {\n        this.index++;\n        this.tokens.push({\n          index: start,\n          text: rawString,\n          string: string,\n          json: true,\n          fn: function() { return string; }\n        });\n        return;\n      } else {\n        string += ch;\n      }\n      this.index++;\n    }\n    this.throwError('Unterminated quote', start);\n  }\n};\n\n\n/**\n * @constructor\n */\nvar Parser = function (lexer, $filter, options) {\n  this.lexer = lexer;\n  this.$filter = $filter;\n  this.options = options;\n};\n\nParser.ZERO = function () { return 0; };\n\nParser.prototype = {\n  constructor: Parser,\n\n  parse: function (text, json) {\n    this.text = text;\n\n    //TODO(i): strip all the obsolte json stuff from this file\n    this.json = json;\n\n    this.tokens = this.lexer.lex(text);\n\n    if (json) {\n      // The extra level of aliasing is here, just in case the lexer misses something, so that\n      // we prevent any accidental execution in JSON.\n      this.assignment = this.logicalOR;\n\n      this.functionCall =\n      this.fieldAccess =\n      this.objectIndex =\n      this.filterChain = function() {\n        this.throwError('is not valid json', {text: text, index: 0});\n      };\n    }\n\n    var value = json ? this.primary() : this.statements();\n\n    if (this.tokens.length !== 0) {\n      this.throwError('is an unexpected token', this.tokens[0]);\n    }\n\n    value.literal = !!value.literal;\n    value.constant = !!value.constant;\n\n    return value;\n  },\n\n  primary: function () {\n    var primary;\n    if (this.expect('(')) {\n      primary = this.filterChain();\n      this.consume(')');\n    } else if (this.expect('[')) {\n      primary = this.arrayDeclaration();\n    } else if (this.expect('{')) {\n      primary = this.object();\n    } else {\n      var token = this.expect();\n      primary = token.fn;\n      if (!primary) {\n        this.throwError('not a primary expression', token);\n      }\n      if (token.json) {\n        primary.constant = true;\n        primary.literal = true;\n      }\n    }\n\n    var next, context;\n    while ((next = this.expect('(', '[', '.'))) {\n      if (next.text === '(') {\n        primary = this.functionCall(primary, context);\n        context = null;\n      } else if (next.text === '[') {\n        context = primary;\n        primary = this.objectIndex(primary);\n      } else if (next.text === '.') {\n        context = primary;\n        primary = this.fieldAccess(primary);\n      } else {\n        this.throwError('IMPOSSIBLE');\n      }\n    }\n    return primary;\n  },\n\n  throwError: function(msg, token) {\n    throw $parseMinErr('syntax',\n        'Syntax Error: Token \\'{0}\\' {1} at column {2} of the expression [{3}] starting at [{4}].',\n          token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));\n  },\n\n  peekToken: function() {\n    if (this.tokens.length === 0)\n      throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n    return this.tokens[0];\n  },\n\n  peek: function(e1, e2, e3, e4) {\n    if (this.tokens.length > 0) {\n      var token = this.tokens[0];\n      var t = token.text;\n      if (t === e1 || t === e2 || t === e3 || t === e4 ||\n          (!e1 && !e2 && !e3 && !e4)) {\n        return token;\n      }\n    }\n    return false;\n  },\n\n  expect: function(e1, e2, e3, e4){\n    var token = this.peek(e1, e2, e3, e4);\n    if (token) {\n      if (this.json && !token.json) {\n        this.throwError('is not valid json', token);\n      }\n      this.tokens.shift();\n      return token;\n    }\n    return false;\n  },\n\n  consume: function(e1){\n    if (!this.expect(e1)) {\n      this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());\n    }\n  },\n\n  unaryFn: function(fn, right) {\n    return extend(function(self, locals) {\n      return fn(self, locals, right);\n    }, {\n      constant:right.constant\n    });\n  },\n\n  ternaryFn: function(left, middle, right){\n    return extend(function(self, locals){\n      return left(self, locals) ? middle(self, locals) : right(self, locals);\n    }, {\n      constant: left.constant && middle.constant && right.constant\n    });\n  },\n\n  binaryFn: function(left, fn, right) {\n    return extend(function(self, locals) {\n      return fn(self, locals, left, right);\n    }, {\n      constant:left.constant && right.constant\n    });\n  },\n\n  statements: function() {\n    var statements = [];\n    while (true) {\n      if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))\n        statements.push(this.filterChain());\n      if (!this.expect(';')) {\n        // optimize for the common case where there is only one statement.\n        // TODO(size): maybe we should not support multiple statements?\n        return (statements.length === 1)\n            ? statements[0]\n            : function(self, locals) {\n                var value;\n                for (var i = 0; i < statements.length; i++) {\n                  var statement = statements[i];\n                  if (statement) {\n                    value = statement(self, locals);\n                  }\n                }\n                return value;\n              };\n      }\n    }\n  },\n\n  filterChain: function() {\n    var left = this.expression();\n    var token;\n    while (true) {\n      if ((token = this.expect('|'))) {\n        left = this.binaryFn(left, token.fn, this.filter());\n      } else {\n        return left;\n      }\n    }\n  },\n\n  filter: function() {\n    var token = this.expect();\n    var fn = this.$filter(token.text);\n    var argsFn = [];\n    while (true) {\n      if ((token = this.expect(':'))) {\n        argsFn.push(this.expression());\n      } else {\n        var fnInvoke = function(self, locals, input) {\n          var args = [input];\n          for (var i = 0; i < argsFn.length; i++) {\n            args.push(argsFn[i](self, locals));\n          }\n          return fn.apply(self, args);\n        };\n        return function() {\n          return fnInvoke;\n        };\n      }\n    }\n  },\n\n  expression: function() {\n    return this.assignment();\n  },\n\n  assignment: function() {\n    var left = this.ternary();\n    var right;\n    var token;\n    if ((token = this.expect('='))) {\n      if (!left.assign) {\n        this.throwError('implies assignment but [' +\n            this.text.substring(0, token.index) + '] can not be assigned to', token);\n      }\n      right = this.ternary();\n      return function(scope, locals) {\n        return left.assign(scope, right(scope, locals), locals);\n      };\n    }\n    return left;\n  },\n\n  ternary: function() {\n    var left = this.logicalOR();\n    var middle;\n    var token;\n    if ((token = this.expect('?'))) {\n      middle = this.ternary();\n      if ((token = this.expect(':'))) {\n        return this.ternaryFn(left, middle, this.ternary());\n      } else {\n        this.throwError('expected :', token);\n      }\n    } else {\n      return left;\n    }\n  },\n\n  logicalOR: function() {\n    var left = this.logicalAND();\n    var token;\n    while (true) {\n      if ((token = this.expect('||'))) {\n        left = this.binaryFn(left, token.fn, this.logicalAND());\n      } else {\n        return left;\n      }\n    }\n  },\n\n  logicalAND: function() {\n    var left = this.equality();\n    var token;\n    if ((token = this.expect('&&'))) {\n      left = this.binaryFn(left, token.fn, this.logicalAND());\n    }\n    return left;\n  },\n\n  equality: function() {\n    var left = this.relational();\n    var token;\n    if ((token = this.expect('==','!=','===','!=='))) {\n      left = this.binaryFn(left, token.fn, this.equality());\n    }\n    return left;\n  },\n\n  relational: function() {\n    var left = this.additive();\n    var token;\n    if ((token = this.expect('<', '>', '<=', '>='))) {\n      left = this.binaryFn(left, token.fn, this.relational());\n    }\n    return left;\n  },\n\n  additive: function() {\n    var left = this.multiplicative();\n    var token;\n    while ((token = this.expect('+','-'))) {\n      left = this.binaryFn(left, token.fn, this.multiplicative());\n    }\n    return left;\n  },\n\n  multiplicative: function() {\n    var left = this.unary();\n    var token;\n    while ((token = this.expect('*','/','%'))) {\n      left = this.binaryFn(left, token.fn, this.unary());\n    }\n    return left;\n  },\n\n  unary: function() {\n    var token;\n    if (this.expect('+')) {\n      return this.primary();\n    } else if ((token = this.expect('-'))) {\n      return this.binaryFn(Parser.ZERO, token.fn, this.unary());\n    } else if ((token = this.expect('!'))) {\n      return this.unaryFn(token.fn, this.unary());\n    } else {\n      return this.primary();\n    }\n  },\n\n  fieldAccess: function(object) {\n    var parser = this;\n    var field = this.expect().text;\n    var getter = getterFn(field, this.options, this.text);\n\n    return extend(function(scope, locals, self) {\n      return getter(self || object(scope, locals));\n    }, {\n      assign: function(scope, value, locals) {\n        return setter(object(scope, locals), field, value, parser.text, parser.options);\n      }\n    });\n  },\n\n  objectIndex: function(obj) {\n    var parser = this;\n\n    var indexFn = this.expression();\n    this.consume(']');\n\n    return extend(function(self, locals) {\n      var o = obj(self, locals),\n          i = indexFn(self, locals),\n          v, p;\n\n      if (!o) return undefined;\n      v = ensureSafeObject(o[i], parser.text);\n      if (v && v.then && parser.options.unwrapPromises) {\n        p = v;\n        if (!('$$v' in v)) {\n          p.$$v = undefined;\n          p.then(function(val) { p.$$v = val; });\n        }\n        v = v.$$v;\n      }\n      return v;\n    }, {\n      assign: function(self, value, locals) {\n        var key = indexFn(self, locals);\n        // prevent overwriting of Function.constructor which would break ensureSafeObject check\n        var safe = ensureSafeObject(obj(self, locals), parser.text);\n        return safe[key] = value;\n      }\n    });\n  },\n\n  functionCall: function(fn, contextGetter) {\n    var argsFn = [];\n    if (this.peekToken().text !== ')') {\n      do {\n        argsFn.push(this.expression());\n      } while (this.expect(','));\n    }\n    this.consume(')');\n\n    var parser = this;\n\n    return function(scope, locals) {\n      var args = [];\n      var context = contextGetter ? contextGetter(scope, locals) : scope;\n\n      for (var i = 0; i < argsFn.length; i++) {\n        args.push(argsFn[i](scope, locals));\n      }\n      var fnPtr = fn(scope, locals, context) || noop;\n\n      ensureSafeObject(context, parser.text);\n      ensureSafeObject(fnPtr, parser.text);\n\n      // IE stupidity! (IE doesn't have apply for some native functions)\n      var v = fnPtr.apply\n            ? fnPtr.apply(context, args)\n            : fnPtr(args[0], args[1], args[2], args[3], args[4]);\n\n      return ensureSafeObject(v, parser.text);\n    };\n  },\n\n  // This is used with json array declaration\n  arrayDeclaration: function () {\n    var elementFns = [];\n    var allConstant = true;\n    if (this.peekToken().text !== ']') {\n      do {\n        var elementFn = this.expression();\n        elementFns.push(elementFn);\n        if (!elementFn.constant) {\n          allConstant = false;\n        }\n      } while (this.expect(','));\n    }\n    this.consume(']');\n\n    return extend(function(self, locals) {\n      var array = [];\n      for (var i = 0; i < elementFns.length; i++) {\n        array.push(elementFns[i](self, locals));\n      }\n      return array;\n    }, {\n      literal: true,\n      constant: allConstant\n    });\n  },\n\n  object: function () {\n    var keyValues = [];\n    var allConstant = true;\n    if (this.peekToken().text !== '}') {\n      do {\n        var token = this.expect(),\n        key = token.string || token.text;\n        this.consume(':');\n        var value = this.expression();\n        keyValues.push({key: key, value: value});\n        if (!value.constant) {\n          allConstant = false;\n        }\n      } while (this.expect(','));\n    }\n    this.consume('}');\n\n    return extend(function(self, locals) {\n      var object = {};\n      for (var i = 0; i < keyValues.length; i++) {\n        var keyValue = keyValues[i];\n        object[keyValue.key] = keyValue.value(self, locals);\n      }\n      return object;\n    }, {\n      literal: true,\n      constant: allConstant\n    });\n  }\n};\n\n\n//////////////////////////////////////////////////\n// Parser helper functions\n//////////////////////////////////////////////////\n\nfunction setter(obj, path, setValue, fullExp, options) {\n  //needed?\n  options = options || {};\n\n  var element = path.split('.'), key;\n  for (var i = 0; element.length > 1; i++) {\n    key = ensureSafeMemberName(element.shift(), fullExp);\n    var propertyObj = obj[key];\n    if (!propertyObj) {\n      propertyObj = {};\n      obj[key] = propertyObj;\n    }\n    obj = propertyObj;\n    if (obj.then && options.unwrapPromises) {\n      promiseWarning(fullExp);\n      if (!(\"$$v\" in obj)) {\n        (function(promise) {\n          promise.then(function(val) { promise.$$v = val; }); }\n        )(obj);\n      }\n      if (obj.$$v === undefined) {\n        obj.$$v = {};\n      }\n      obj = obj.$$v;\n    }\n  }\n  key = ensureSafeMemberName(element.shift(), fullExp);\n  obj[key] = setValue;\n  return setValue;\n}\n\nvar getterFnCache = {};\n\n/**\n * Implementation of the \"Black Hole\" variant from:\n * - http://jsperf.com/angularjs-parse-getter/4\n * - http://jsperf.com/path-evaluation-simplified/7\n */\nfunction cspSafeGetterFn(key0, key1, key2, key3, key4, fullExp, options) {\n  ensureSafeMemberName(key0, fullExp);\n  ensureSafeMemberName(key1, fullExp);\n  ensureSafeMemberName(key2, fullExp);\n  ensureSafeMemberName(key3, fullExp);\n  ensureSafeMemberName(key4, fullExp);\n\n  return !options.unwrapPromises\n      ? function cspSafeGetter(scope, locals) {\n          var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope;\n\n          if (pathVal == null) return pathVal;\n          pathVal = pathVal[key0];\n\n          if (!key1) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key1];\n\n          if (!key2) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key2];\n\n          if (!key3) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key3];\n\n          if (!key4) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key4];\n\n          return pathVal;\n        }\n      : function cspSafePromiseEnabledGetter(scope, locals) {\n          var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope,\n              promise;\n\n          if (pathVal == null) return pathVal;\n\n          pathVal = pathVal[key0];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n\n          if (!key1) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key1];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n\n          if (!key2) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key2];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n\n          if (!key3) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key3];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n\n          if (!key4) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key4];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n          return pathVal;\n        };\n}\n\nfunction simpleGetterFn1(key0, fullExp) {\n  ensureSafeMemberName(key0, fullExp);\n\n  return function simpleGetterFn1(scope, locals) {\n    if (scope == null) return undefined;\n    return ((locals && locals.hasOwnProperty(key0)) ? locals : scope)[key0];\n  };\n}\n\nfunction simpleGetterFn2(key0, key1, fullExp) {\n  ensureSafeMemberName(key0, fullExp);\n  ensureSafeMemberName(key1, fullExp);\n\n  return function simpleGetterFn2(scope, locals) {\n    if (scope == null) return undefined;\n    scope = ((locals && locals.hasOwnProperty(key0)) ? locals : scope)[key0];\n    return scope == null ? undefined : scope[key1];\n  };\n}\n\nfunction getterFn(path, options, fullExp) {\n  // Check whether the cache has this getter already.\n  // We can use hasOwnProperty directly on the cache because we ensure,\n  // see below, that the cache never stores a path called 'hasOwnProperty'\n  if (getterFnCache.hasOwnProperty(path)) {\n    return getterFnCache[path];\n  }\n\n  var pathKeys = path.split('.'),\n      pathKeysLength = pathKeys.length,\n      fn;\n\n  // When we have only 1 or 2 tokens, use optimized special case closures.\n  // https://jsperf.com/angularjs-parse-getter/6\n  if (!options.unwrapPromises && pathKeysLength === 1) {\n    fn = simpleGetterFn1(pathKeys[0], fullExp);\n  } else if (!options.unwrapPromises && pathKeysLength === 2) {\n    fn = simpleGetterFn2(pathKeys[0], pathKeys[1], fullExp);\n  } else if (options.csp) {\n    if (pathKeysLength < 6) {\n      fn = cspSafeGetterFn(pathKeys[0], pathKeys[1], pathKeys[2], pathKeys[3], pathKeys[4], fullExp,\n                          options);\n    } else {\n      fn = function(scope, locals) {\n        var i = 0, val;\n        do {\n          val = cspSafeGetterFn(pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++],\n                                pathKeys[i++], fullExp, options)(scope, locals);\n\n          locals = undefined; // clear after first iteration\n          scope = val;\n        } while (i < pathKeysLength);\n        return val;\n      };\n    }\n  } else {\n    var code = 'var p;\\n';\n    forEach(pathKeys, function(key, index) {\n      ensureSafeMemberName(key, fullExp);\n      code += 'if(s == null) return undefined;\\n' +\n              's='+ (index\n                      // we simply dereference 's' on any .dot notation\n                      ? 's'\n                      // but if we are first then we check locals first, and if so read it first\n                      : '((k&&k.hasOwnProperty(\"' + key + '\"))?k:s)') + '[\"' + key + '\"]' + ';\\n' +\n              (options.unwrapPromises\n                ? 'if (s && s.then) {\\n' +\n                  ' pw(\"' + fullExp.replace(/([\"\\r\\n])/g, '\\\\$1') + '\");\\n' +\n                  ' if (!(\"$$v\" in s)) {\\n' +\n                    ' p=s;\\n' +\n                    ' p.$$v = undefined;\\n' +\n                    ' p.then(function(v) {p.$$v=v;});\\n' +\n                    '}\\n' +\n                  ' s=s.$$v\\n' +\n                '}\\n'\n                : '');\n    });\n    code += 'return s;';\n\n    /* jshint -W054 */\n    var evaledFnGetter = new Function('s', 'k', 'pw', code); // s=scope, k=locals, pw=promiseWarning\n    /* jshint +W054 */\n    evaledFnGetter.toString = valueFn(code);\n    fn = options.unwrapPromises ? function(scope, locals) {\n      return evaledFnGetter(scope, locals, promiseWarning);\n    } : evaledFnGetter;\n  }\n\n  // Only cache the value if it's not going to mess up the cache object\n  // This is more performant that using Object.prototype.hasOwnProperty.call\n  if (path !== 'hasOwnProperty') {\n    getterFnCache[path] = fn;\n  }\n  return fn;\n}\n\n///////////////////////////////////\n\n/**\n * @ngdoc function\n * @name ng.$parse\n * @function\n *\n * @description\n *\n * Converts Angular {@link guide/expression expression} into a function.\n *\n * <pre>\n *   var getter = $parse('user.name');\n *   var setter = getter.assign;\n *   var context = {user:{name:'angular'}};\n *   var locals = {user:{name:'local'}};\n *\n *   expect(getter(context)).toEqual('angular');\n *   setter(context, 'newValue');\n *   expect(context.user.name).toEqual('newValue');\n *   expect(getter(context, locals)).toEqual('local');\n * </pre>\n *\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n *      are evaluated against (typically a scope object).\n *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n *      `context`.\n *\n *    The returned function also has the following properties:\n *      * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript\n *        literal.\n *      * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript\n *        constant literals.\n *      * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be\n *        set to a function to change its value on the given context.\n *\n */\n\n\n/**\n * @ngdoc object\n * @name ng.$parseProvider\n * @function\n *\n * @description\n * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}\n *  service.\n */\nfunction $ParseProvider() {\n  var cache = {};\n\n  var $parseOptions = {\n    csp: false,\n    unwrapPromises: false,\n    logPromiseWarnings: true\n  };\n\n\n  /**\n   * @deprecated Promise unwrapping via $parse is deprecated and will be removed in the future.\n   *\n   * @ngdoc method\n   * @name ng.$parseProvider#unwrapPromises\n   * @methodOf ng.$parseProvider\n   * @description\n   *\n   * **This feature is deprecated, see deprecation notes below for more info**\n   *\n   * If set to true (default is false), $parse will unwrap promises automatically when a promise is\n   * found at any part of the expression. In other words, if set to true, the expression will always\n   * result in a non-promise value.\n   *\n   * While the promise is unresolved, it's treated as undefined, but once resolved and fulfilled,\n   * the fulfillment value is used in place of the promise while evaluating the expression.\n   *\n   * **Deprecation notice**\n   *\n   * This is a feature that didn't prove to be wildly useful or popular, primarily because of the\n   * dichotomy between data access in templates (accessed as raw values) and controller code\n   * (accessed as promises).\n   *\n   * In most code we ended up resolving promises manually in controllers anyway and thus unifying\n   * the model access there.\n   *\n   * Other downsides of automatic promise unwrapping:\n   *\n   * - when building components it's often desirable to receive the raw promises\n   * - adds complexity and slows down expression evaluation\n   * - makes expression code pre-generation unattractive due to the amount of code that needs to be\n   *   generated\n   * - makes IDE auto-completion and tool support hard\n   *\n   * **Warning Logs**\n   *\n   * If the unwrapping is enabled, Angular will log a warning about each expression that unwraps a\n   * promise (to reduce the noise, each expression is logged only once). To disable this logging use\n   * `$parseProvider.logPromiseWarnings(false)` api.\n   *\n   *\n   * @param {boolean=} value New value.\n   * @returns {boolean|self} Returns the current setting when used as getter and self if used as\n   *                         setter.\n   */\n  this.unwrapPromises = function(value) {\n    if (isDefined(value)) {\n      $parseOptions.unwrapPromises = !!value;\n      return this;\n    } else {\n      return $parseOptions.unwrapPromises;\n    }\n  };\n\n\n  /**\n   * @deprecated Promise unwrapping via $parse is deprecated and will be removed in the future.\n   *\n   * @ngdoc method\n   * @name ng.$parseProvider#logPromiseWarnings\n   * @methodOf ng.$parseProvider\n   * @description\n   *\n   * Controls whether Angular should log a warning on any encounter of a promise in an expression.\n   *\n   * The default is set to `true`.\n   *\n   * This setting applies only if `$parseProvider.unwrapPromises` setting is set to true as well.\n   *\n   * @param {boolean=} value New value.\n   * @returns {boolean|self} Returns the current setting when used as getter and self if used as\n   *                         setter.\n   */\n this.logPromiseWarnings = function(value) {\n    if (isDefined(value)) {\n      $parseOptions.logPromiseWarnings = value;\n      return this;\n    } else {\n      return $parseOptions.logPromiseWarnings;\n    }\n  };\n\n\n  this.$get = ['$filter', '$sniffer', '$log', function($filter, $sniffer, $log) {\n    $parseOptions.csp = $sniffer.csp;\n\n    promiseWarning = function promiseWarningFn(fullExp) {\n      if (!$parseOptions.logPromiseWarnings || promiseWarningCache.hasOwnProperty(fullExp)) return;\n      promiseWarningCache[fullExp] = true;\n      $log.warn('[$parse] Promise found in the expression `' + fullExp + '`. ' +\n          'Automatic unwrapping of promises in Angular expressions is deprecated.');\n    };\n\n    return function(exp) {\n      var parsedExpression;\n\n      switch (typeof exp) {\n        case 'string':\n\n          if (cache.hasOwnProperty(exp)) {\n            return cache[exp];\n          }\n\n          var lexer = new Lexer($parseOptions);\n          var parser = new Parser(lexer, $filter, $parseOptions);\n          parsedExpression = parser.parse(exp, false);\n\n          if (exp !== 'hasOwnProperty') {\n            // Only cache the value if it's not going to mess up the cache object\n            // This is more performant that using Object.prototype.hasOwnProperty.call\n            cache[exp] = parsedExpression;\n          }\n\n          return parsedExpression;\n\n        case 'function':\n          return exp;\n\n        default:\n          return noop;\n      }\n    };\n  }];\n}\n\n/**\n * @ngdoc service\n * @name ng.$q\n * @requires $rootScope\n *\n * @description\n * A promise/deferred implementation inspired by [Kris Kowal's Q](https://github.com/kriskowal/q).\n *\n * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an\n * interface for interacting with an object that represents the result of an action that is\n * performed asynchronously, and may or may not be finished at any given point in time.\n *\n * From the perspective of dealing with error handling, deferred and promise APIs are to\n * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.\n *\n * <pre>\n *   // for the purpose of this example let's assume that variables `$q`, `scope` and `okToGreet`\n *   // are available in the current lexical scope (they could have been injected or passed in).\n * \n *   function asyncGreet(name) {\n *     var deferred = $q.defer();\n *\n *     setTimeout(function() {\n *       // since this fn executes async in a future turn of the event loop, we need to wrap\n *       // our code into an $apply call so that the model changes are properly observed.\n *       scope.$apply(function() {\n *         deferred.notify('About to greet ' + name + '.');\n *\n *         if (okToGreet(name)) {\n *           deferred.resolve('Hello, ' + name + '!');\n *         } else {\n *           deferred.reject('Greeting ' + name + ' is not allowed.');\n *         }\n *       });\n *     }, 1000);\n *\n *     return deferred.promise;\n *   }\n *\n *   var promise = asyncGreet('Robin Hood');\n *   promise.then(function(greeting) {\n *     alert('Success: ' + greeting);\n *   }, function(reason) {\n *     alert('Failed: ' + reason);\n *   }, function(update) {\n *     alert('Got notification: ' + update);\n *   });\n * </pre>\n *\n * At first it might not be obvious why this extra complexity is worth the trouble. The payoff\n * comes in the way of guarantees that promise and deferred APIs make, see\n * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.\n *\n * Additionally the promise api allows for composition that is very hard to do with the\n * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.\n * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the\n * section on serial or parallel joining of promises.\n *\n *\n * # The Deferred API\n *\n * A new instance of deferred is constructed by calling `$q.defer()`.\n *\n * The purpose of the deferred object is to expose the associated Promise instance as well as APIs\n * that can be used for signaling the successful or unsuccessful completion, as well as the status\n * of the task.\n *\n * **Methods**\n *\n * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection\n *   constructed via `$q.reject`, the promise will be rejected instead.\n * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to\n *   resolving it with a rejection constructed via `$q.reject`.\n * - `notify(value)` - provides updates on the status of the promise's execution. This may be called\n *   multiple times before the promise is either resolved or rejected.\n *\n * **Properties**\n *\n * - promise – `{Promise}` – promise object associated with this deferred.\n *\n *\n * # The Promise API\n *\n * A new promise instance is created when a deferred instance is created and can be retrieved by\n * calling `deferred.promise`.\n *\n * The purpose of the promise object is to allow for interested parties to get access to the result\n * of the deferred task when it completes.\n *\n * **Methods**\n *\n * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or\n *   will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously\n *   as soon as the result is available. The callbacks are called with a single argument: the result\n *   or rejection reason. Additionally, the notify callback may be called zero or more times to\n *   provide a progress indication, before the promise is resolved or rejected.\n *\n *   This method *returns a new promise* which is resolved or rejected via the return value of the\n *   `successCallback`, `errorCallback`. It also notifies via the return value of the\n *   `notifyCallback` method. The promise can not be resolved or rejected from the notifyCallback\n *   method.\n *\n * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`\n *\n * - `finally(callback)` – allows you to observe either the fulfillment or rejection of a promise,\n *   but to do so without modifying the final value. This is useful to release resources or do some\n *   clean-up that needs to be done whether the promise was rejected or resolved. See the [full\n *   specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for\n *   more information.\n *\n *   Because `finally` is a reserved word in JavaScript and reserved keywords are not supported as\n *   property names by ES3, you'll need to invoke the method like `promise['finally'](callback)` to\n *   make your code IE8 compatible.\n *\n * # Chaining promises\n *\n * Because calling the `then` method of a promise returns a new derived promise, it is easily\n * possible to create a chain of promises:\n *\n * <pre>\n *   promiseB = promiseA.then(function(result) {\n *     return result + 1;\n *   });\n *\n *   // promiseB will be resolved immediately after promiseA is resolved and its value\n *   // will be the result of promiseA incremented by 1\n * </pre>\n *\n * It is possible to create chains of any length and since a promise can be resolved with another\n * promise (which will defer its resolution further), it is possible to pause/defer resolution of\n * the promises at any point in the chain. This makes it possible to implement powerful APIs like\n * $http's response interceptors.\n *\n *\n * # Differences between Kris Kowal's Q and $q\n *\n *  There are two main differences:\n *\n * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation\n *   mechanism in angular, which means faster propagation of resolution or rejection into your\n *   models and avoiding unnecessary browser repaints, which would result in flickering UI.\n * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains\n *   all the important functionality needed for common async tasks.\n *\n *  # Testing\n *\n *  <pre>\n *    it('should simulate promise', inject(function($q, $rootScope) {\n *      var deferred = $q.defer();\n *      var promise = deferred.promise;\n *      var resolvedValue;\n *\n *      promise.then(function(value) { resolvedValue = value; });\n *      expect(resolvedValue).toBeUndefined();\n *\n *      // Simulate resolving of promise\n *      deferred.resolve(123);\n *      // Note that the 'then' function does not get called synchronously.\n *      // This is because we want the promise API to always be async, whether or not\n *      // it got called synchronously or asynchronously.\n *      expect(resolvedValue).toBeUndefined();\n *\n *      // Propagate promise resolution to 'then' functions using $apply().\n *      $rootScope.$apply();\n *      expect(resolvedValue).toEqual(123);\n *    }));\n *  </pre>\n */\nfunction $QProvider() {\n\n  this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {\n    return qFactory(function(callback) {\n      $rootScope.$evalAsync(callback);\n    }, $exceptionHandler);\n  }];\n}\n\n\n/**\n * Constructs a promise manager.\n *\n * @param {function(function)} nextTick Function for executing functions in the next turn.\n * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for\n *     debugging purposes.\n * @returns {object} Promise manager.\n */\nfunction qFactory(nextTick, exceptionHandler) {\n\n  /**\n   * @ngdoc\n   * @name ng.$q#defer\n   * @methodOf ng.$q\n   * @description\n   * Creates a `Deferred` object which represents a task which will finish in the future.\n   *\n   * @returns {Deferred} Returns a new instance of deferred.\n   */\n  var defer = function() {\n    var pending = [],\n        value, deferred;\n\n    deferred = {\n\n      resolve: function(val) {\n        if (pending) {\n          var callbacks = pending;\n          pending = undefined;\n          value = ref(val);\n\n          if (callbacks.length) {\n            nextTick(function() {\n              var callback;\n              for (var i = 0, ii = callbacks.length; i < ii; i++) {\n                callback = callbacks[i];\n                value.then(callback[0], callback[1], callback[2]);\n              }\n            });\n          }\n        }\n      },\n\n\n      reject: function(reason) {\n        deferred.resolve(createInternalRejectedPromise(reason));\n      },\n\n\n      notify: function(progress) {\n        if (pending) {\n          var callbacks = pending;\n\n          if (pending.length) {\n            nextTick(function() {\n              var callback;\n              for (var i = 0, ii = callbacks.length; i < ii; i++) {\n                callback = callbacks[i];\n                callback[2](progress);\n              }\n            });\n          }\n        }\n      },\n\n\n      promise: {\n        then: function(callback, errback, progressback) {\n          var result = defer();\n\n          var wrappedCallback = function(value) {\n            try {\n              result.resolve((isFunction(callback) ? callback : defaultCallback)(value));\n            } catch(e) {\n              result.reject(e);\n              exceptionHandler(e);\n            }\n          };\n\n          var wrappedErrback = function(reason) {\n            try {\n              result.resolve((isFunction(errback) ? errback : defaultErrback)(reason));\n            } catch(e) {\n              result.reject(e);\n              exceptionHandler(e);\n            }\n          };\n\n          var wrappedProgressback = function(progress) {\n            try {\n              result.notify((isFunction(progressback) ? progressback : defaultCallback)(progress));\n            } catch(e) {\n              exceptionHandler(e);\n            }\n          };\n\n          if (pending) {\n            pending.push([wrappedCallback, wrappedErrback, wrappedProgressback]);\n          } else {\n            value.then(wrappedCallback, wrappedErrback, wrappedProgressback);\n          }\n\n          return result.promise;\n        },\n\n        \"catch\": function(callback) {\n          return this.then(null, callback);\n        },\n\n        \"finally\": function(callback) {\n\n          function makePromise(value, resolved) {\n            var result = defer();\n            if (resolved) {\n              result.resolve(value);\n            } else {\n              result.reject(value);\n            }\n            return result.promise;\n          }\n\n          function handleCallback(value, isResolved) {\n            var callbackOutput = null;\n            try {\n              callbackOutput = (callback ||defaultCallback)();\n            } catch(e) {\n              return makePromise(e, false);\n            }\n            if (callbackOutput && isFunction(callbackOutput.then)) {\n              return callbackOutput.then(function() {\n                return makePromise(value, isResolved);\n              }, function(error) {\n                return makePromise(error, false);\n              });\n            } else {\n              return makePromise(value, isResolved);\n            }\n          }\n\n          return this.then(function(value) {\n            return handleCallback(value, true);\n          }, function(error) {\n            return handleCallback(error, false);\n          });\n        }\n      }\n    };\n\n    return deferred;\n  };\n\n\n  var ref = function(value) {\n    if (value && isFunction(value.then)) return value;\n    return {\n      then: function(callback) {\n        var result = defer();\n        nextTick(function() {\n          result.resolve(callback(value));\n        });\n        return result.promise;\n      }\n    };\n  };\n\n\n  /**\n   * @ngdoc\n   * @name ng.$q#reject\n   * @methodOf ng.$q\n   * @description\n   * Creates a promise that is resolved as rejected with the specified `reason`. This api should be\n   * used to forward rejection in a chain of promises. If you are dealing with the last promise in\n   * a promise chain, you don't need to worry about it.\n   *\n   * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of\n   * `reject` as the `throw` keyword in JavaScript. This also means that if you \"catch\" an error via\n   * a promise error callback and you want to forward the error to the promise derived from the\n   * current promise, you have to \"rethrow\" the error by returning a rejection constructed via\n   * `reject`.\n   *\n   * <pre>\n   *   promiseB = promiseA.then(function(result) {\n   *     // success: do something and resolve promiseB\n   *     //          with the old or a new result\n   *     return result;\n   *   }, function(reason) {\n   *     // error: handle the error if possible and\n   *     //        resolve promiseB with newPromiseOrValue,\n   *     //        otherwise forward the rejection to promiseB\n   *     if (canHandle(reason)) {\n   *      // handle the error and recover\n   *      return newPromiseOrValue;\n   *     }\n   *     return $q.reject(reason);\n   *   });\n   * </pre>\n   *\n   * @param {*} reason Constant, message, exception or an object representing the rejection reason.\n   * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.\n   */\n  var reject = function(reason) {\n    var result = defer();\n    result.reject(reason);\n    return result.promise;\n  };\n\n  var createInternalRejectedPromise = function(reason) {\n    return {\n      then: function(callback, errback) {\n        var result = defer();\n        nextTick(function() {\n          try {\n            result.resolve((isFunction(errback) ? errback : defaultErrback)(reason));\n          } catch(e) {\n            result.reject(e);\n            exceptionHandler(e);\n          }\n        });\n        return result.promise;\n      }\n    };\n  };\n\n\n  /**\n   * @ngdoc\n   * @name ng.$q#when\n   * @methodOf ng.$q\n   * @description\n   * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.\n   * This is useful when you are dealing with an object that might or might not be a promise, or if\n   * the promise comes from a source that can't be trusted.\n   *\n   * @param {*} value Value or a promise\n   * @returns {Promise} Returns a promise of the passed value or promise\n   */\n  var when = function(value, callback, errback, progressback) {\n    var result = defer(),\n        done;\n\n    var wrappedCallback = function(value) {\n      try {\n        return (isFunction(callback) ? callback : defaultCallback)(value);\n      } catch (e) {\n        exceptionHandler(e);\n        return reject(e);\n      }\n    };\n\n    var wrappedErrback = function(reason) {\n      try {\n        return (isFunction(errback) ? errback : defaultErrback)(reason);\n      } catch (e) {\n        exceptionHandler(e);\n        return reject(e);\n      }\n    };\n\n    var wrappedProgressback = function(progress) {\n      try {\n        return (isFunction(progressback) ? progressback : defaultCallback)(progress);\n      } catch (e) {\n        exceptionHandler(e);\n      }\n    };\n\n    nextTick(function() {\n      ref(value).then(function(value) {\n        if (done) return;\n        done = true;\n        result.resolve(ref(value).then(wrappedCallback, wrappedErrback, wrappedProgressback));\n      }, function(reason) {\n        if (done) return;\n        done = true;\n        result.resolve(wrappedErrback(reason));\n      }, function(progress) {\n        if (done) return;\n        result.notify(wrappedProgressback(progress));\n      });\n    });\n\n    return result.promise;\n  };\n\n\n  function defaultCallback(value) {\n    return value;\n  }\n\n\n  function defaultErrback(reason) {\n    return reject(reason);\n  }\n\n\n  /**\n   * @ngdoc\n   * @name ng.$q#all\n   * @methodOf ng.$q\n   * @description\n   * Combines multiple promises into a single promise that is resolved when all of the input\n   * promises are resolved.\n   *\n   * @param {Array.<Promise>|Object.<Promise>} promises An array or hash of promises.\n   * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,\n   *   each value corresponding to the promise at the same index/key in the `promises` array/hash.\n   *   If any of the promises is resolved with a rejection, this resulting promise will be rejected\n   *   with the same rejection value.\n   */\n  function all(promises) {\n    var deferred = defer(),\n        counter = 0,\n        results = isArray(promises) ? [] : {};\n\n    forEach(promises, function(promise, key) {\n      counter++;\n      ref(promise).then(function(value) {\n        if (results.hasOwnProperty(key)) return;\n        results[key] = value;\n        if (!(--counter)) deferred.resolve(results);\n      }, function(reason) {\n        if (results.hasOwnProperty(key)) return;\n        deferred.reject(reason);\n      });\n    });\n\n    if (counter === 0) {\n      deferred.resolve(results);\n    }\n\n    return deferred.promise;\n  }\n\n  return {\n    defer: defer,\n    reject: reject,\n    when: when,\n    all: all\n  };\n}\n\n/**\n * DESIGN NOTES\n *\n * The design decisions behind the scope are heavily favored for speed and memory consumption.\n *\n * The typical use of scope is to watch the expressions, which most of the time return the same\n * value as last time so we optimize the operation.\n *\n * Closures construction is expensive in terms of speed as well as memory:\n *   - No closures, instead use prototypical inheritance for API\n *   - Internal state needs to be stored on scope directly, which means that private state is\n *     exposed as $$____ properties\n *\n * Loop operations are optimized by using while(count--) { ... }\n *   - this means that in order to keep the same order of execution as addition we have to add\n *     items to the array at the beginning (shift) instead of at the end (push)\n *\n * Child scopes are created and removed often\n *   - Using an array would be slow since inserts in middle are expensive so we use linked list\n *\n * There are few watches then a lot of observers. This is why you don't want the observer to be\n * implemented in the same way as watch. Watch requires return of initialization function which\n * are expensive to construct.\n */\n\n\n/**\n * @ngdoc object\n * @name ng.$rootScopeProvider\n * @description\n *\n * Provider for the $rootScope service.\n */\n\n/**\n * @ngdoc function\n * @name ng.$rootScopeProvider#digestTtl\n * @methodOf ng.$rootScopeProvider\n * @description\n *\n * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and\n * assuming that the model is unstable.\n *\n * The current default is 10 iterations.\n *\n * In complex applications it's possible that the dependencies between `$watch`s will result in\n * several digest iterations. However if an application needs more than the default 10 digest\n * iterations for its model to stabilize then you should investigate what is causing the model to\n * continuously change during the digest.\n *\n * Increasing the TTL could have performance implications, so you should not change it without\n * proper justification.\n *\n * @param {number} limit The number of digest iterations.\n */\n\n\n/**\n * @ngdoc object\n * @name ng.$rootScope\n * @description\n *\n * Every application has a single root {@link ng.$rootScope.Scope scope}.\n * All other scopes are descendant scopes of the root scope. Scopes provide separation\n * between the model and the view, via a mechanism for watching the model for changes.\n * They also provide an event emission/broadcast and subscription facility. See the\n * {@link guide/scope developer guide on scopes}.\n */\nfunction $RootScopeProvider(){\n  var TTL = 10;\n  var $rootScopeMinErr = minErr('$rootScope');\n  var lastDirtyWatch = null;\n\n  this.digestTtl = function(value) {\n    if (arguments.length) {\n      TTL = value;\n    }\n    return TTL;\n  };\n\n  this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',\n      function( $injector,   $exceptionHandler,   $parse,   $browser) {\n\n    /**\n     * @ngdoc function\n     * @name ng.$rootScope.Scope\n     *\n     * @description\n     * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the\n     * {@link AUTO.$injector $injector}. Child scopes are created using the\n     * {@link ng.$rootScope.Scope#methods_$new $new()} method. (Most scopes are created automatically when\n     * compiled HTML template is executed.)\n     *\n     * Here is a simple scope snippet to show how you can interact with the scope.\n     * <pre>\n     * <file src=\"./test/ng/rootScopeSpec.js\" tag=\"docs1\" />\n     * </pre>\n     *\n     * # Inheritance\n     * A scope can inherit from a parent scope, as in this example:\n     * <pre>\n         var parent = $rootScope;\n         var child = parent.$new();\n\n         parent.salutation = \"Hello\";\n         child.name = \"World\";\n         expect(child.salutation).toEqual('Hello');\n\n         child.salutation = \"Welcome\";\n         expect(child.salutation).toEqual('Welcome');\n         expect(parent.salutation).toEqual('Hello');\n     * </pre>\n     *\n     *\n     * @param {Object.<string, function()>=} providers Map of service factory which need to be\n     *                                       provided for the current scope. Defaults to {@link ng}.\n     * @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should\n     *                              append/override services provided by `providers`. This is handy\n     *                              when unit-testing and having the need to override a default\n     *                              service.\n     * @returns {Object} Newly created scope.\n     *\n     */\n    function Scope() {\n      this.$id = nextUid();\n      this.$$phase = this.$parent = this.$$watchers =\n                     this.$$nextSibling = this.$$prevSibling =\n                     this.$$childHead = this.$$childTail = null;\n      this['this'] = this.$root =  this;\n      this.$$destroyed = false;\n      this.$$asyncQueue = [];\n      this.$$postDigestQueue = [];\n      this.$$listeners = {};\n      this.$$listenerCount = {};\n      this.$$isolateBindings = {};\n    }\n\n    /**\n     * @ngdoc property\n     * @name ng.$rootScope.Scope#$id\n     * @propertyOf ng.$rootScope.Scope\n     * @returns {number} Unique scope ID (monotonically increasing alphanumeric sequence) useful for\n     *   debugging.\n     */\n\n\n    Scope.prototype = {\n      constructor: Scope,\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$new\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Creates a new child {@link ng.$rootScope.Scope scope}.\n       *\n       * The parent scope will propagate the {@link ng.$rootScope.Scope#methods_$digest $digest()} and\n       * {@link ng.$rootScope.Scope#methods_$digest $digest()} events. The scope can be removed from the\n       * scope hierarchy using {@link ng.$rootScope.Scope#methods_$destroy $destroy()}.\n       *\n       * {@link ng.$rootScope.Scope#methods_$destroy $destroy()} must be called on a scope when it is\n       * desired for the scope and its child scopes to be permanently detached from the parent and\n       * thus stop participating in model change detection and listener notification by invoking.\n       *\n       * @param {boolean} isolate If true, then the scope does not prototypically inherit from the\n       *         parent scope. The scope is isolated, as it can not see parent scope properties.\n       *         When creating widgets, it is useful for the widget to not accidentally read parent\n       *         state.\n       *\n       * @returns {Object} The newly created child scope.\n       *\n       */\n      $new: function(isolate) {\n        var ChildScope,\n            child;\n\n        if (isolate) {\n          child = new Scope();\n          child.$root = this.$root;\n          // ensure that there is just one async queue per $rootScope and its children\n          child.$$asyncQueue = this.$$asyncQueue;\n          child.$$postDigestQueue = this.$$postDigestQueue;\n        } else {\n          ChildScope = function() {}; // should be anonymous; This is so that when the minifier munges\n            // the name it does not become random set of chars. This will then show up as class\n            // name in the web inspector.\n          ChildScope.prototype = this;\n          child = new ChildScope();\n          child.$id = nextUid();\n        }\n        child['this'] = child;\n        child.$$listeners = {};\n        child.$$listenerCount = {};\n        child.$parent = this;\n        child.$$watchers = child.$$nextSibling = child.$$childHead = child.$$childTail = null;\n        child.$$prevSibling = this.$$childTail;\n        if (this.$$childHead) {\n          this.$$childTail.$$nextSibling = child;\n          this.$$childTail = child;\n        } else {\n          this.$$childHead = this.$$childTail = child;\n        }\n        return child;\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$watch\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Registers a `listener` callback to be executed whenever the `watchExpression` changes.\n       *\n       * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#methods_$digest\n       *   $digest()} and should return the value that will be watched. (Since\n       *   {@link ng.$rootScope.Scope#methods_$digest $digest()} reruns when it detects changes the\n       *   `watchExpression` can execute multiple times per\n       *   {@link ng.$rootScope.Scope#methods_$digest $digest()} and should be idempotent.)\n       * - The `listener` is called only when the value from the current `watchExpression` and the\n       *   previous call to `watchExpression` are not equal (with the exception of the initial run,\n       *   see below). The inequality is determined according to\n       *   {@link angular.equals} function. To save the value of the object for later comparison,\n       *   the {@link angular.copy} function is used. It also means that watching complex options\n       *   will have adverse memory and performance implications.\n       * - The watch `listener` may change the model, which may trigger other `listener`s to fire.\n       *   This is achieved by rerunning the watchers until no changes are detected. The rerun\n       *   iteration limit is 10 to prevent an infinite loop deadlock.\n       *\n       *\n       * If you want to be notified whenever {@link ng.$rootScope.Scope#methods_$digest $digest} is called,\n       * you can register a `watchExpression` function with no `listener`. (Since `watchExpression`\n       * can execute multiple times per {@link ng.$rootScope.Scope#methods_$digest $digest} cycle when a\n       * change is detected, be prepared for multiple calls to your listener.)\n       *\n       * After a watcher is registered with the scope, the `listener` fn is called asynchronously\n       * (via {@link ng.$rootScope.Scope#methods_$evalAsync $evalAsync}) to initialize the\n       * watcher. In rare cases, this is undesirable because the listener is called when the result\n       * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you\n       * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the\n       * listener was called due to initialization.\n       *\n       * The example below contains an illustration of using a function as your $watch listener\n       *\n       *\n       * # Example\n       * <pre>\n           // let's assume that scope was dependency injected as the $rootScope\n           var scope = $rootScope;\n           scope.name = 'misko';\n           scope.counter = 0;\n\n           expect(scope.counter).toEqual(0);\n           scope.$watch('name', function(newValue, oldValue) {\n             scope.counter = scope.counter + 1;\n           });\n           expect(scope.counter).toEqual(0);\n\n           scope.$digest();\n           // no variable change\n           expect(scope.counter).toEqual(0);\n\n           scope.name = 'adam';\n           scope.$digest();\n           expect(scope.counter).toEqual(1);\n\n\n\n           // Using a listener function\n           var food;\n           scope.foodCounter = 0;\n           expect(scope.foodCounter).toEqual(0);\n           scope.$watch(\n             // This is the listener function\n             function() { return food; },\n             // This is the change handler\n             function(newValue, oldValue) {\n               if ( newValue !== oldValue ) {\n                 // Only increment the counter if the value changed\n                 scope.foodCounter = scope.foodCounter + 1;\n               }\n             }\n           );\n           // No digest has been run so the counter will be zero\n           expect(scope.foodCounter).toEqual(0);\n\n           // Run the digest but since food has not changed count will still be zero\n           scope.$digest();\n           expect(scope.foodCounter).toEqual(0);\n\n           // Update food and run digest.  Now the counter will increment\n           food = 'cheeseburger';\n           scope.$digest();\n           expect(scope.foodCounter).toEqual(1);\n\n       * </pre>\n       *\n       *\n       *\n       * @param {(function()|string)} watchExpression Expression that is evaluated on each\n       *    {@link ng.$rootScope.Scope#methods_$digest $digest} cycle. A change in the return value triggers\n       *    a call to the `listener`.\n       *\n       *    - `string`: Evaluated as {@link guide/expression expression}\n       *    - `function(scope)`: called with current `scope` as a parameter.\n       * @param {(function()|string)=} listener Callback called whenever the return value of\n       *   the `watchExpression` changes.\n       *\n       *    - `string`: Evaluated as {@link guide/expression expression}\n       *    - `function(newValue, oldValue, scope)`: called with current and previous values as\n       *      parameters.\n       *\n       * @param {boolean=} objectEquality Compare object for equality rather than for reference.\n       * @returns {function()} Returns a deregistration function for this listener.\n       */\n      $watch: function(watchExp, listener, objectEquality) {\n        var scope = this,\n            get = compileToFn(watchExp, 'watch'),\n            array = scope.$$watchers,\n            watcher = {\n              fn: listener,\n              last: initWatchVal,\n              get: get,\n              exp: watchExp,\n              eq: !!objectEquality\n            };\n\n        lastDirtyWatch = null;\n\n        // in the case user pass string, we need to compile it, do we really need this ?\n        if (!isFunction(listener)) {\n          var listenFn = compileToFn(listener || noop, 'listener');\n          watcher.fn = function(newVal, oldVal, scope) {listenFn(scope);};\n        }\n\n        if (typeof watchExp == 'string' && get.constant) {\n          var originalFn = watcher.fn;\n          watcher.fn = function(newVal, oldVal, scope) {\n            originalFn.call(this, newVal, oldVal, scope);\n            arrayRemove(array, watcher);\n          };\n        }\n\n        if (!array) {\n          array = scope.$$watchers = [];\n        }\n        // we use unshift since we use a while loop in $digest for speed.\n        // the while loop reads in reverse order.\n        array.unshift(watcher);\n\n        return function() {\n          arrayRemove(array, watcher);\n          lastDirtyWatch = null;\n        };\n      },\n\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$watchCollection\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Shallow watches the properties of an object and fires whenever any of the properties change\n       * (for arrays, this implies watching the array items; for object maps, this implies watching\n       * the properties). If a change is detected, the `listener` callback is fired.\n       *\n       * - The `obj` collection is observed via standard $watch operation and is examined on every\n       *   call to $digest() to see if any items have been added, removed, or moved.\n       * - The `listener` is called whenever anything within the `obj` has changed. Examples include\n       *   adding, removing, and moving items belonging to an object or array.\n       *\n       *\n       * # Example\n       * <pre>\n          $scope.names = ['igor', 'matias', 'misko', 'james'];\n          $scope.dataCount = 4;\n\n          $scope.$watchCollection('names', function(newNames, oldNames) {\n            $scope.dataCount = newNames.length;\n          });\n\n          expect($scope.dataCount).toEqual(4);\n          $scope.$digest();\n\n          //still at 4 ... no changes\n          expect($scope.dataCount).toEqual(4);\n\n          $scope.names.pop();\n          $scope.$digest();\n\n          //now there's been a change\n          expect($scope.dataCount).toEqual(3);\n       * </pre>\n       *\n       *\n       * @param {string|Function(scope)} obj Evaluated as {@link guide/expression expression}. The\n       *    expression value should evaluate to an object or an array which is observed on each\n       *    {@link ng.$rootScope.Scope#methods_$digest $digest} cycle. Any shallow change within the\n       *    collection will trigger a call to the `listener`.\n       *\n       * @param {function(newCollection, oldCollection, scope)} listener a callback function that is\n       *    fired with both the `newCollection` and `oldCollection` as parameters.\n       *    The `newCollection` object is the newly modified data obtained from the `obj` expression\n       *    and the `oldCollection` object is a copy of the former collection data.\n       *    The `scope` refers to the current scope.\n       *\n       * @returns {function()} Returns a de-registration function for this listener. When the\n       *    de-registration function is executed, the internal watch operation is terminated.\n       */\n      $watchCollection: function(obj, listener) {\n        var self = this;\n        var oldValue;\n        var newValue;\n        var changeDetected = 0;\n        var objGetter = $parse(obj);\n        var internalArray = [];\n        var internalObject = {};\n        var oldLength = 0;\n\n        function $watchCollectionWatch() {\n          newValue = objGetter(self);\n          var newLength, key;\n\n          if (!isObject(newValue)) {\n            if (oldValue !== newValue) {\n              oldValue = newValue;\n              changeDetected++;\n            }\n          } else if (isArrayLike(newValue)) {\n            if (oldValue !== internalArray) {\n              // we are transitioning from something which was not an array into array.\n              oldValue = internalArray;\n              oldLength = oldValue.length = 0;\n              changeDetected++;\n            }\n\n            newLength = newValue.length;\n\n            if (oldLength !== newLength) {\n              // if lengths do not match we need to trigger change notification\n              changeDetected++;\n              oldValue.length = oldLength = newLength;\n            }\n            // copy the items to oldValue and look for changes.\n            for (var i = 0; i < newLength; i++) {\n              if (oldValue[i] !== newValue[i]) {\n                changeDetected++;\n                oldValue[i] = newValue[i];\n              }\n            }\n          } else {\n            if (oldValue !== internalObject) {\n              // we are transitioning from something which was not an object into object.\n              oldValue = internalObject = {};\n              oldLength = 0;\n              changeDetected++;\n            }\n            // copy the items to oldValue and look for changes.\n            newLength = 0;\n            for (key in newValue) {\n              if (newValue.hasOwnProperty(key)) {\n                newLength++;\n                if (oldValue.hasOwnProperty(key)) {\n                  if (oldValue[key] !== newValue[key]) {\n                    changeDetected++;\n                    oldValue[key] = newValue[key];\n                  }\n                } else {\n                  oldLength++;\n                  oldValue[key] = newValue[key];\n                  changeDetected++;\n                }\n              }\n            }\n            if (oldLength > newLength) {\n              // we used to have more keys, need to find them and destroy them.\n              changeDetected++;\n              for(key in oldValue) {\n                if (oldValue.hasOwnProperty(key) && !newValue.hasOwnProperty(key)) {\n                  oldLength--;\n                  delete oldValue[key];\n                }\n              }\n            }\n          }\n          return changeDetected;\n        }\n\n        function $watchCollectionAction() {\n          listener(newValue, oldValue, self);\n        }\n\n        return this.$watch($watchCollectionWatch, $watchCollectionAction);\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$digest\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Processes all of the {@link ng.$rootScope.Scope#methods_$watch watchers} of the current scope and\n       * its children. Because a {@link ng.$rootScope.Scope#methods_$watch watcher}'s listener can change\n       * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#methods_$watch watchers}\n       * until no more listeners are firing. This means that it is possible to get into an infinite\n       * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of\n       * iterations exceeds 10.\n       *\n       * Usually, you don't call `$digest()` directly in\n       * {@link ng.directive:ngController controllers} or in\n       * {@link ng.$compileProvider#methods_directive directives}.\n       * Instead, you should call {@link ng.$rootScope.Scope#methods_$apply $apply()} (typically from within\n       * a {@link ng.$compileProvider#methods_directive directives}), which will force a `$digest()`.\n       *\n       * If you want to be notified whenever `$digest()` is called,\n       * you can register a `watchExpression` function with\n       * {@link ng.$rootScope.Scope#methods_$watch $watch()} with no `listener`.\n       *\n       * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.\n       *\n       * # Example\n       * <pre>\n           var scope = ...;\n           scope.name = 'misko';\n           scope.counter = 0;\n\n           expect(scope.counter).toEqual(0);\n           scope.$watch('name', function(newValue, oldValue) {\n             scope.counter = scope.counter + 1;\n           });\n           expect(scope.counter).toEqual(0);\n\n           scope.$digest();\n           // no variable change\n           expect(scope.counter).toEqual(0);\n\n           scope.name = 'adam';\n           scope.$digest();\n           expect(scope.counter).toEqual(1);\n       * </pre>\n       *\n       */\n      $digest: function() {\n        var watch, value, last,\n            watchers,\n            asyncQueue = this.$$asyncQueue,\n            postDigestQueue = this.$$postDigestQueue,\n            length,\n            dirty, ttl = TTL,\n            next, current, target = this,\n            watchLog = [],\n            logIdx, logMsg, asyncTask;\n\n        beginPhase('$digest');\n\n        lastDirtyWatch = null;\n\n        do { // \"while dirty\" loop\n          dirty = false;\n          current = target;\n\n          while(asyncQueue.length) {\n            try {\n              asyncTask = asyncQueue.shift();\n              asyncTask.scope.$eval(asyncTask.expression);\n            } catch (e) {\n              clearPhase();\n              $exceptionHandler(e);\n            }\n            lastDirtyWatch = null;\n          }\n\n          traverseScopesLoop:\n          do { // \"traverse the scopes\" loop\n            if ((watchers = current.$$watchers)) {\n              // process our watches\n              length = watchers.length;\n              while (length--) {\n                try {\n                  watch = watchers[length];\n                  // Most common watches are on primitives, in which case we can short\n                  // circuit it with === operator, only when === fails do we use .equals\n                  if (watch) {\n                    if ((value = watch.get(current)) !== (last = watch.last) &&\n                        !(watch.eq\n                            ? equals(value, last)\n                            : (typeof value == 'number' && typeof last == 'number'\n                               && isNaN(value) && isNaN(last)))) {\n                      dirty = true;\n                      lastDirtyWatch = watch;\n                      watch.last = watch.eq ? copy(value) : value;\n                      watch.fn(value, ((last === initWatchVal) ? value : last), current);\n                      if (ttl < 5) {\n                        logIdx = 4 - ttl;\n                        if (!watchLog[logIdx]) watchLog[logIdx] = [];\n                        logMsg = (isFunction(watch.exp))\n                            ? 'fn: ' + (watch.exp.name || watch.exp.toString())\n                            : watch.exp;\n                        logMsg += '; newVal: ' + toJson(value) + '; oldVal: ' + toJson(last);\n                        watchLog[logIdx].push(logMsg);\n                      }\n                    } else if (watch === lastDirtyWatch) {\n                      // If the most recently dirty watcher is now clean, short circuit since the remaining watchers\n                      // have already been tested.\n                      dirty = false;\n                      break traverseScopesLoop;\n                    }\n                  }\n                } catch (e) {\n                  clearPhase();\n                  $exceptionHandler(e);\n                }\n              }\n            }\n\n            // Insanity Warning: scope depth-first traversal\n            // yes, this code is a bit crazy, but it works and we have tests to prove it!\n            // this piece should be kept in sync with the traversal in $broadcast\n            if (!(next = (current.$$childHead ||\n                (current !== target && current.$$nextSibling)))) {\n              while(current !== target && !(next = current.$$nextSibling)) {\n                current = current.$parent;\n              }\n            }\n          } while ((current = next));\n\n          // `break traverseScopesLoop;` takes us to here\n\n          if((dirty || asyncQueue.length) && !(ttl--)) {\n            clearPhase();\n            throw $rootScopeMinErr('infdig',\n                '{0} $digest() iterations reached. Aborting!\\n' +\n                'Watchers fired in the last 5 iterations: {1}',\n                TTL, toJson(watchLog));\n          }\n\n        } while (dirty || asyncQueue.length);\n\n        clearPhase();\n\n        while(postDigestQueue.length) {\n          try {\n            postDigestQueue.shift()();\n          } catch (e) {\n            $exceptionHandler(e);\n          }\n        }\n      },\n\n\n      /**\n       * @ngdoc event\n       * @name ng.$rootScope.Scope#$destroy\n       * @eventOf ng.$rootScope.Scope\n       * @eventType broadcast on scope being destroyed\n       *\n       * @description\n       * Broadcasted when a scope and its children are being destroyed.\n       *\n       * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n       * clean up DOM bindings before an element is removed from the DOM.\n       */\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$destroy\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Removes the current scope (and all of its children) from the parent scope. Removal implies\n       * that calls to {@link ng.$rootScope.Scope#methods_$digest $digest()} will no longer\n       * propagate to the current scope and its children. Removal also implies that the current\n       * scope is eligible for garbage collection.\n       *\n       * The `$destroy()` is usually used by directives such as\n       * {@link ng.directive:ngRepeat ngRepeat} for managing the\n       * unrolling of the loop.\n       *\n       * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.\n       * Application code can register a `$destroy` event handler that will give it a chance to\n       * perform any necessary cleanup.\n       *\n       * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n       * clean up DOM bindings before an element is removed from the DOM.\n       */\n      $destroy: function() {\n        // we can't destroy the root scope or a scope that has been already destroyed\n        if (this.$$destroyed) return;\n        var parent = this.$parent;\n\n        this.$broadcast('$destroy');\n        this.$$destroyed = true;\n        if (this === $rootScope) return;\n\n        forEach(this.$$listenerCount, bind(null, decrementListenerCount, this));\n\n        if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;\n        if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;\n        if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;\n        if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;\n\n        // This is bogus code that works around Chrome's GC leak\n        // see: https://github.com/angular/angular.js/issues/1313#issuecomment-10378451\n        this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead =\n            this.$$childTail = null;\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$eval\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Executes the `expression` on the current scope and returns the result. Any exceptions in\n       * the expression are propagated (uncaught). This is useful when evaluating Angular\n       * expressions.\n       *\n       * # Example\n       * <pre>\n           var scope = ng.$rootScope.Scope();\n           scope.a = 1;\n           scope.b = 2;\n\n           expect(scope.$eval('a+b')).toEqual(3);\n           expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);\n       * </pre>\n       *\n       * @param {(string|function())=} expression An angular expression to be executed.\n       *\n       *    - `string`: execute using the rules as defined in  {@link guide/expression expression}.\n       *    - `function(scope)`: execute the function with the current `scope` parameter.\n       *\n       * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n       * @returns {*} The result of evaluating the expression.\n       */\n      $eval: function(expr, locals) {\n        return $parse(expr)(this, locals);\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$evalAsync\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Executes the expression on the current scope at a later point in time.\n       *\n       * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only\n       * that:\n       *\n       *   - it will execute after the function that scheduled the evaluation (preferably before DOM\n       *     rendering).\n       *   - at least one {@link ng.$rootScope.Scope#methods_$digest $digest cycle} will be performed after\n       *     `expression` execution.\n       *\n       * Any exceptions from the execution of the expression are forwarded to the\n       * {@link ng.$exceptionHandler $exceptionHandler} service.\n       *\n       * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle\n       * will be scheduled. However, it is encouraged to always call code that changes the model\n       * from within an `$apply` call. That includes code evaluated via `$evalAsync`.\n       *\n       * @param {(string|function())=} expression An angular expression to be executed.\n       *\n       *    - `string`: execute using the rules as defined in {@link guide/expression expression}.\n       *    - `function(scope)`: execute the function with the current `scope` parameter.\n       *\n       */\n      $evalAsync: function(expr) {\n        // if we are outside of an $digest loop and this is the first time we are scheduling async\n        // task also schedule async auto-flush\n        if (!$rootScope.$$phase && !$rootScope.$$asyncQueue.length) {\n          $browser.defer(function() {\n            if ($rootScope.$$asyncQueue.length) {\n              $rootScope.$digest();\n            }\n          });\n        }\n\n        this.$$asyncQueue.push({scope: this, expression: expr});\n      },\n\n      $$postDigest : function(fn) {\n        this.$$postDigestQueue.push(fn);\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$apply\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * `$apply()` is used to execute an expression in angular from outside of the angular\n       * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).\n       * Because we are calling into the angular framework we need to perform proper scope life\n       * cycle of {@link ng.$exceptionHandler exception handling},\n       * {@link ng.$rootScope.Scope#methods_$digest executing watches}.\n       *\n       * ## Life cycle\n       *\n       * # Pseudo-Code of `$apply()`\n       * <pre>\n           function $apply(expr) {\n             try {\n               return $eval(expr);\n             } catch (e) {\n               $exceptionHandler(e);\n             } finally {\n               $root.$digest();\n             }\n           }\n       * </pre>\n       *\n       *\n       * Scope's `$apply()` method transitions through the following stages:\n       *\n       * 1. The {@link guide/expression expression} is executed using the\n       *    {@link ng.$rootScope.Scope#methods_$eval $eval()} method.\n       * 2. Any exceptions from the execution of the expression are forwarded to the\n       *    {@link ng.$exceptionHandler $exceptionHandler} service.\n       * 3. The {@link ng.$rootScope.Scope#methods_$watch watch} listeners are fired immediately after the\n       *    expression was executed using the {@link ng.$rootScope.Scope#methods_$digest $digest()} method.\n       *\n       *\n       * @param {(string|function())=} exp An angular expression to be executed.\n       *\n       *    - `string`: execute using the rules as defined in {@link guide/expression expression}.\n       *    - `function(scope)`: execute the function with current `scope` parameter.\n       *\n       * @returns {*} The result of evaluating the expression.\n       */\n      $apply: function(expr) {\n        try {\n          beginPhase('$apply');\n          return this.$eval(expr);\n        } catch (e) {\n          $exceptionHandler(e);\n        } finally {\n          clearPhase();\n          try {\n            $rootScope.$digest();\n          } catch (e) {\n            $exceptionHandler(e);\n            throw e;\n          }\n        }\n      },\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$on\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Listens on events of a given type. See {@link ng.$rootScope.Scope#methods_$emit $emit} for\n       * discussion of event life cycle.\n       *\n       * The event listener function format is: `function(event, args...)`. The `event` object\n       * passed into the listener has the following attributes:\n       *\n       *   - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or\n       *     `$broadcast`-ed.\n       *   - `currentScope` - `{Scope}`: the current scope which is handling the event.\n       *   - `name` - `{string}`: name of the event.\n       *   - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel\n       *     further event propagation (available only for events that were `$emit`-ed).\n       *   - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag\n       *     to true.\n       *   - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.\n       *\n       * @param {string} name Event name to listen on.\n       * @param {function(event, args...)} listener Function to call when the event is emitted.\n       * @returns {function()} Returns a deregistration function for this listener.\n       */\n      $on: function(name, listener) {\n        var namedListeners = this.$$listeners[name];\n        if (!namedListeners) {\n          this.$$listeners[name] = namedListeners = [];\n        }\n        namedListeners.push(listener);\n\n        var current = this;\n        do {\n          if (!current.$$listenerCount[name]) {\n            current.$$listenerCount[name] = 0;\n          }\n          current.$$listenerCount[name]++;\n        } while ((current = current.$parent));\n\n        var self = this;\n        return function() {\n          namedListeners[indexOf(namedListeners, listener)] = null;\n          decrementListenerCount(self, 1, name);\n        };\n      },\n\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$emit\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Dispatches an event `name` upwards through the scope hierarchy notifying the\n       * registered {@link ng.$rootScope.Scope#methods_$on} listeners.\n       *\n       * The event life cycle starts at the scope on which `$emit` was called. All\n       * {@link ng.$rootScope.Scope#methods_$on listeners} listening for `name` event on this scope get\n       * notified. Afterwards, the event traverses upwards toward the root scope and calls all\n       * registered listeners along the way. The event will stop propagating if one of the listeners\n       * cancels it.\n       *\n       * Any exception emitted from the {@link ng.$rootScope.Scope#methods_$on listeners} will be passed\n       * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n       *\n       * @param {string} name Event name to emit.\n       * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n       * @return {Object} Event object (see {@link ng.$rootScope.Scope#methods_$on}).\n       */\n      $emit: function(name, args) {\n        var empty = [],\n            namedListeners,\n            scope = this,\n            stopPropagation = false,\n            event = {\n              name: name,\n              targetScope: scope,\n              stopPropagation: function() {stopPropagation = true;},\n              preventDefault: function() {\n                event.defaultPrevented = true;\n              },\n              defaultPrevented: false\n            },\n            listenerArgs = concat([event], arguments, 1),\n            i, length;\n\n        do {\n          namedListeners = scope.$$listeners[name] || empty;\n          event.currentScope = scope;\n          for (i=0, length=namedListeners.length; i<length; i++) {\n\n            // if listeners were deregistered, defragment the array\n            if (!namedListeners[i]) {\n              namedListeners.splice(i, 1);\n              i--;\n              length--;\n              continue;\n            }\n            try {\n              //allow all listeners attached to the current scope to run\n              namedListeners[i].apply(null, listenerArgs);\n            } catch (e) {\n              $exceptionHandler(e);\n            }\n          }\n          //if any listener on the current scope stops propagation, prevent bubbling\n          if (stopPropagation) return event;\n          //traverse upwards\n          scope = scope.$parent;\n        } while (scope);\n\n        return event;\n      },\n\n\n      /**\n       * @ngdoc function\n       * @name ng.$rootScope.Scope#$broadcast\n       * @methodOf ng.$rootScope.Scope\n       * @function\n       *\n       * @description\n       * Dispatches an event `name` downwards to all child scopes (and their children) notifying the\n       * registered {@link ng.$rootScope.Scope#methods_$on} listeners.\n       *\n       * The event life cycle starts at the scope on which `$broadcast` was called. All\n       * {@link ng.$rootScope.Scope#methods_$on listeners} listening for `name` event on this scope get\n       * notified. Afterwards, the event propagates to all direct and indirect scopes of the current\n       * scope and calls all registered listeners along the way. The event cannot be canceled.\n       *\n       * Any exception emitted from the {@link ng.$rootScope.Scope#methods_$on listeners} will be passed\n       * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n       *\n       * @param {string} name Event name to broadcast.\n       * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n       * @return {Object} Event object, see {@link ng.$rootScope.Scope#methods_$on}\n       */\n      $broadcast: function(name, args) {\n        var target = this,\n            current = target,\n            next = target,\n            event = {\n              name: name,\n              targetScope: target,\n              preventDefault: function() {\n                event.defaultPrevented = true;\n              },\n              defaultPrevented: false\n            },\n            listenerArgs = concat([event], arguments, 1),\n            listeners, i, length;\n\n        //down while you can, then up and next sibling or up and next sibling until back at root\n        while ((current = next)) {\n          event.currentScope = current;\n          listeners = current.$$listeners[name] || [];\n          for (i=0, length = listeners.length; i<length; i++) {\n            // if listeners were deregistered, defragment the array\n            if (!listeners[i]) {\n              listeners.splice(i, 1);\n              i--;\n              length--;\n              continue;\n            }\n\n            try {\n              listeners[i].apply(null, listenerArgs);\n            } catch(e) {\n              $exceptionHandler(e);\n            }\n          }\n\n          // Insanity Warning: scope depth-first traversal\n          // yes, this code is a bit crazy, but it works and we have tests to prove it!\n          // this piece should be kept in sync with the traversal in $digest\n          // (though it differs due to having the extra check for $$listenerCount)\n          if (!(next = ((current.$$listenerCount[name] && current.$$childHead) ||\n              (current !== target && current.$$nextSibling)))) {\n            while(current !== target && !(next = current.$$nextSibling)) {\n              current = current.$parent;\n            }\n          }\n        }\n\n        return event;\n      }\n    };\n\n    var $rootScope = new Scope();\n\n    return $rootScope;\n\n\n    function beginPhase(phase) {\n      if ($rootScope.$$phase) {\n        throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase);\n      }\n\n      $rootScope.$$phase = phase;\n    }\n\n    function clearPhase() {\n      $rootScope.$$phase = null;\n    }\n\n    function compileToFn(exp, name) {\n      var fn = $parse(exp);\n      assertArgFn(fn, name);\n      return fn;\n    }\n\n    function decrementListenerCount(current, count, name) {\n      do {\n        current.$$listenerCount[name] -= count;\n\n        if (current.$$listenerCount[name] === 0) {\n          delete current.$$listenerCount[name];\n        }\n      } while ((current = current.$parent));\n    }\n\n    /**\n     * function used as an initial value for watchers.\n     * because it's unique we can easily tell it apart from other values\n     */\n    function initWatchVal() {}\n  }];\n}\n\n/**\n * @description\n * Private service to sanitize uris for links and images. Used by $compile and $sanitize.\n */\nfunction $$SanitizeUriProvider() {\n  var aHrefSanitizationWhitelist = /^\\s*(https?|ftp|mailto|tel|file):/,\n    imgSrcSanitizationWhitelist = /^\\s*(https?|ftp|file):|data:image\\//;\n\n  /**\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during a[href] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.aHrefSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      aHrefSanitizationWhitelist = regexp;\n      return this;\n    }\n    return aHrefSanitizationWhitelist;\n  };\n\n\n  /**\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during img[src] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.imgSrcSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      imgSrcSanitizationWhitelist = regexp;\n      return this;\n    }\n    return imgSrcSanitizationWhitelist;\n  };\n\n  this.$get = function() {\n    return function sanitizeUri(uri, isImage) {\n      var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist;\n      var normalizedVal;\n      // NOTE: urlResolve() doesn't support IE < 8 so we don't sanitize for that case.\n      if (!msie || msie >= 8 ) {\n        normalizedVal = urlResolve(uri).href;\n        if (normalizedVal !== '' && !normalizedVal.match(regex)) {\n          return 'unsafe:'+normalizedVal;\n        }\n      }\n      return uri;\n    };\n  };\n}\n\nvar $sceMinErr = minErr('$sce');\n\nvar SCE_CONTEXTS = {\n  HTML: 'html',\n  CSS: 'css',\n  URL: 'url',\n  // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a\n  // url.  (e.g. ng-include, script src, templateUrl)\n  RESOURCE_URL: 'resourceUrl',\n  JS: 'js'\n};\n\n// Helper functions follow.\n\n// Copied from:\n// https://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962\n// Prereq: s is a string.\nfunction escapeForRegexp(s) {\n  return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g, '\\\\$1').\n           replace(/\\x08/g, '\\\\x08');\n}\n\n\nfunction adjustMatcher(matcher) {\n  if (matcher === 'self') {\n    return matcher;\n  } else if (isString(matcher)) {\n    // Strings match exactly except for 2 wildcards - '*' and '**'.\n    // '*' matches any character except those from the set ':/.?&'.\n    // '**' matches any character (like .* in a RegExp).\n    // More than 2 *'s raises an error as it's ill defined.\n    if (matcher.indexOf('***') > -1) {\n      throw $sceMinErr('iwcard',\n          'Illegal sequence *** in string matcher.  String: {0}', matcher);\n    }\n    matcher = escapeForRegexp(matcher).\n                  replace('\\\\*\\\\*', '.*').\n                  replace('\\\\*', '[^:/.?&;]*');\n    return new RegExp('^' + matcher + '$');\n  } else if (isRegExp(matcher)) {\n    // The only other type of matcher allowed is a Regexp.\n    // Match entire URL / disallow partial matches.\n    // Flags are reset (i.e. no global, ignoreCase or multiline)\n    return new RegExp('^' + matcher.source + '$');\n  } else {\n    throw $sceMinErr('imatcher',\n        'Matchers may only be \"self\", string patterns or RegExp objects');\n  }\n}\n\n\nfunction adjustMatchers(matchers) {\n  var adjustedMatchers = [];\n  if (isDefined(matchers)) {\n    forEach(matchers, function(matcher) {\n      adjustedMatchers.push(adjustMatcher(matcher));\n    });\n  }\n  return adjustedMatchers;\n}\n\n\n/**\n * @ngdoc service\n * @name ng.$sceDelegate\n * @function\n *\n * @description\n *\n * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict\n * Contextual Escaping (SCE)} services to AngularJS.\n *\n * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of\n * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS.  This is\n * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to\n * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things\n * work because `$sce` delegates to `$sceDelegate` for these operations.\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.\n *\n * The default instance of `$sceDelegate` should work out of the box with little pain.  While you\n * can override it completely to change the behavior of `$sce`, the common case would\n * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting\n * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as\n * templates.  Refer {@link ng.$sceDelegateProvider#methods_resourceUrlWhitelist\n * $sceDelegateProvider.resourceUrlWhitelist} and {@link\n * ng.$sceDelegateProvider#methods_resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n */\n\n/**\n * @ngdoc object\n * @name ng.$sceDelegateProvider\n * @description\n *\n * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate\n * $sceDelegate} service.  This allows one to get/set the whitelists and blacklists used to ensure\n * that the URLs used for sourcing Angular templates are safe.  Refer {@link\n * ng.$sceDelegateProvider#methods_resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and\n * {@link ng.$sceDelegateProvider#methods_resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n *\n * For the general details about this service in Angular, read the main page for {@link ng.$sce\n * Strict Contextual Escaping (SCE)}.\n *\n * **Example**:  Consider the following case. <a name=\"example\"></a>\n *\n * - your app is hosted at url `http://myapp.example.com/`\n * - but some of your templates are hosted on other domains you control such as\n *   `http://srv01.assets.example.com/`,  `http://srv02.assets.example.com/`, etc.\n * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.\n *\n * Here is what a secure configuration for this scenario might look like:\n *\n * <pre class=\"prettyprint\">\n *    angular.module('myApp', []).config(function($sceDelegateProvider) {\n *      $sceDelegateProvider.resourceUrlWhitelist([\n *        // Allow same origin resource loads.\n *        'self',\n *        // Allow loading from our assets domain.  Notice the difference between * and **.\n *        'http://srv*.assets.example.com/**']);\n *\n *      // The blacklist overrides the whitelist so the open redirect here is blocked.\n *      $sceDelegateProvider.resourceUrlBlacklist([\n *        'http://myapp.example.com/clickThru**']);\n *      });\n * </pre>\n */\n\nfunction $SceDelegateProvider() {\n  this.SCE_CONTEXTS = SCE_CONTEXTS;\n\n  // Resource URLs can also be trusted by policy.\n  var resourceUrlWhitelist = ['self'],\n      resourceUrlBlacklist = [];\n\n  /**\n   * @ngdoc function\n   * @name ng.sceDelegateProvider#resourceUrlWhitelist\n   * @methodOf ng.$sceDelegateProvider\n   * @function\n   *\n   * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value\n   *     provided.  This must be an array or null.  A snapshot of this array is used so further\n   *     changes to the array are ignored.\n   *\n   *     Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n   *     allowed in this array.\n   *\n   *     Note: **an empty whitelist array will block all URLs**!\n   *\n   * @return {Array} the currently set whitelist array.\n   *\n   * The **default value** when no whitelist has been explicitly set is `['self']` allowing only\n   * same origin resource requests.\n   *\n   * @description\n   * Sets/Gets the whitelist of trusted resource URLs.\n   */\n  this.resourceUrlWhitelist = function (value) {\n    if (arguments.length) {\n      resourceUrlWhitelist = adjustMatchers(value);\n    }\n    return resourceUrlWhitelist;\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.sceDelegateProvider#resourceUrlBlacklist\n   * @methodOf ng.$sceDelegateProvider\n   * @function\n   *\n   * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value\n   *     provided.  This must be an array or null.  A snapshot of this array is used so further\n   *     changes to the array are ignored.\n   *\n   *     Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n   *     allowed in this array.\n   *\n   *     The typical usage for the blacklist is to **block\n   *     [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as\n   *     these would otherwise be trusted but actually return content from the redirected domain.\n   *\n   *     Finally, **the blacklist overrides the whitelist** and has the final say.\n   *\n   * @return {Array} the currently set blacklist array.\n   *\n   * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there\n   * is no blacklist.)\n   *\n   * @description\n   * Sets/Gets the blacklist of trusted resource URLs.\n   */\n\n  this.resourceUrlBlacklist = function (value) {\n    if (arguments.length) {\n      resourceUrlBlacklist = adjustMatchers(value);\n    }\n    return resourceUrlBlacklist;\n  };\n\n  this.$get = ['$injector', function($injector) {\n\n    var htmlSanitizer = function htmlSanitizer(html) {\n      throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n    };\n\n    if ($injector.has('$sanitize')) {\n      htmlSanitizer = $injector.get('$sanitize');\n    }\n\n\n    function matchUrl(matcher, parsedUrl) {\n      if (matcher === 'self') {\n        return urlIsSameOrigin(parsedUrl);\n      } else {\n        // definitely a regex.  See adjustMatchers()\n        return !!matcher.exec(parsedUrl.href);\n      }\n    }\n\n    function isResourceUrlAllowedByPolicy(url) {\n      var parsedUrl = urlResolve(url.toString());\n      var i, n, allowed = false;\n      // Ensure that at least one item from the whitelist allows this url.\n      for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {\n        if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {\n          allowed = true;\n          break;\n        }\n      }\n      if (allowed) {\n        // Ensure that no item from the blacklist blocked this url.\n        for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {\n          if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {\n            allowed = false;\n            break;\n          }\n        }\n      }\n      return allowed;\n    }\n\n    function generateHolderType(Base) {\n      var holderType = function TrustedValueHolderType(trustedValue) {\n        this.$$unwrapTrustedValue = function() {\n          return trustedValue;\n        };\n      };\n      if (Base) {\n        holderType.prototype = new Base();\n      }\n      holderType.prototype.valueOf = function sceValueOf() {\n        return this.$$unwrapTrustedValue();\n      };\n      holderType.prototype.toString = function sceToString() {\n        return this.$$unwrapTrustedValue().toString();\n      };\n      return holderType;\n    }\n\n    var trustedValueHolderBase = generateHolderType(),\n        byType = {};\n\n    byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);\n\n    /**\n     * @ngdoc method\n     * @name ng.$sceDelegate#trustAs\n     * @methodOf ng.$sceDelegate\n     *\n     * @description\n     * Returns an object that is trusted by angular for use in specified strict\n     * contextual escaping contexts (such as ng-bind-html, ng-include, any src\n     * attribute interpolation, any dom event binding attribute interpolation\n     * such as for onclick,  etc.) that uses the provided value.\n     * See {@link ng.$sce $sce} for enabling strict contextual escaping.\n     *\n     * @param {string} type The kind of context in which this value is safe for use.  e.g. url,\n     *   resourceUrl, html, js and css.\n     * @param {*} value The value that that should be considered trusted/safe.\n     * @returns {*} A value that can be used to stand in for the provided `value` in places\n     * where Angular expects a $sce.trustAs() return value.\n     */\n    function trustAs(type, trustedValue) {\n      var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n      if (!Constructor) {\n        throw $sceMinErr('icontext',\n            'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',\n            type, trustedValue);\n      }\n      if (trustedValue === null || trustedValue === undefined || trustedValue === '') {\n        return trustedValue;\n      }\n      // All the current contexts in SCE_CONTEXTS happen to be strings.  In order to avoid trusting\n      // mutable objects, we ensure here that the value passed in is actually a string.\n      if (typeof trustedValue !== 'string') {\n        throw $sceMinErr('itype',\n            'Attempted to trust a non-string value in a content requiring a string: Context: {0}',\n            type);\n      }\n      return new Constructor(trustedValue);\n    }\n\n    /**\n     * @ngdoc method\n     * @name ng.$sceDelegate#valueOf\n     * @methodOf ng.$sceDelegate\n     *\n     * @description\n     * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#methods_trustAs\n     * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link\n     * ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs`}.\n     *\n     * If the passed parameter is not a value that had been returned by {@link\n     * ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs`}, returns it as-is.\n     *\n     * @param {*} value The result of a prior {@link ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs`}\n     *      call or anything else.\n     * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#methods_trustAs\n     *     `$sceDelegate.trustAs`} if `value` is the result of such a call.  Otherwise, returns\n     *     `value` unchanged.\n     */\n    function valueOf(maybeTrusted) {\n      if (maybeTrusted instanceof trustedValueHolderBase) {\n        return maybeTrusted.$$unwrapTrustedValue();\n      } else {\n        return maybeTrusted;\n      }\n    }\n\n    /**\n     * @ngdoc method\n     * @name ng.$sceDelegate#getTrusted\n     * @methodOf ng.$sceDelegate\n     *\n     * @description\n     * Takes the result of a {@link ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs`} call and\n     * returns the originally supplied value if the queried context type is a supertype of the\n     * created type.  If this condition isn't satisfied, throws an exception.\n     *\n     * @param {string} type The kind of context in which this value is to be used.\n     * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#methods_trustAs\n     *     `$sceDelegate.trustAs`} call.\n     * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#methods_trustAs\n     *     `$sceDelegate.trustAs`} if valid in this context.  Otherwise, throws an exception.\n     */\n    function getTrusted(type, maybeTrusted) {\n      if (maybeTrusted === null || maybeTrusted === undefined || maybeTrusted === '') {\n        return maybeTrusted;\n      }\n      var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n      if (constructor && maybeTrusted instanceof constructor) {\n        return maybeTrusted.$$unwrapTrustedValue();\n      }\n      // If we get here, then we may only take one of two actions.\n      // 1. sanitize the value for the requested type, or\n      // 2. throw an exception.\n      if (type === SCE_CONTEXTS.RESOURCE_URL) {\n        if (isResourceUrlAllowedByPolicy(maybeTrusted)) {\n          return maybeTrusted;\n        } else {\n          throw $sceMinErr('insecurl',\n              'Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}',\n              maybeTrusted.toString());\n        }\n      } else if (type === SCE_CONTEXTS.HTML) {\n        return htmlSanitizer(maybeTrusted);\n      }\n      throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n    }\n\n    return { trustAs: trustAs,\n             getTrusted: getTrusted,\n             valueOf: valueOf };\n  }];\n}\n\n\n/**\n * @ngdoc object\n * @name ng.$sceProvider\n * @description\n *\n * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.\n * -   enable/disable Strict Contextual Escaping (SCE) in a module\n * -   override the default implementation with a custom delegate\n *\n * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.\n */\n\n/* jshint maxlen: false*/\n\n/**\n * @ngdoc service\n * @name ng.$sce\n * @function\n *\n * @description\n *\n * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.\n *\n * # Strict Contextual Escaping\n *\n * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain\n * contexts to result in a value that is marked as safe to use for that context.  One example of\n * such a context is binding arbitrary html controlled by the user via `ng-bind-html`.  We refer\n * to these contexts as privileged or SCE contexts.\n *\n * As of version 1.2, Angular ships with SCE enabled by default.\n *\n * Note:  When enabled (the default), IE8 in quirks mode is not supported.  In this mode, IE8 allows\n * one to execute arbitrary javascript by the use of the expression() syntax.  Refer\n * <http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx> to learn more about them.\n * You can ensure your document is in standards mode and not quirks mode by adding `<!doctype html>`\n * to the top of your HTML document.\n *\n * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for\n * security vulnerabilities such as XSS, clickjacking, etc. a lot easier.\n *\n * Here's an example of a binding in a privileged context:\n *\n * <pre class=\"prettyprint\">\n *     <input ng-model=\"userHtml\">\n *     <div ng-bind-html=\"userHtml\">\n * </pre>\n *\n * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user.  With SCE\n * disabled, this application allows the user to render arbitrary HTML into the DIV.\n * In a more realistic example, one may be rendering user comments, blog articles, etc. via\n * bindings.  (HTML is just one example of a context where rendering user controlled input creates\n * security vulnerabilities.)\n *\n * For the case of HTML, you might use a library, either on the client side, or on the server side,\n * to sanitize unsafe HTML before binding to the value and rendering it in the document.\n *\n * How would you ensure that every place that used these types of bindings was bound to a value that\n * was sanitized by your library (or returned as safe for rendering by your server?)  How can you\n * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some\n * properties/fields and forgot to update the binding to the sanitized value?\n *\n * To be secure by default, you want to ensure that any such bindings are disallowed unless you can\n * determine that something explicitly says it's safe to use a value for binding in that\n * context.  You can then audit your code (a simple grep would do) to ensure that this is only done\n * for those values that you can easily tell are safe - because they were received from your server,\n * sanitized by your library, etc.  You can organize your codebase to help with this - perhaps\n * allowing only the files in a specific directory to do this.  Ensuring that the internal API\n * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.\n *\n * In the case of AngularJS' SCE service, one uses {@link ng.$sce#methods_trustAs $sce.trustAs} \n * (and shorthand methods such as {@link ng.$sce#methods_trustAsHtml $sce.trustAsHtml}, etc.) to\n * obtain values that will be accepted by SCE / privileged contexts.\n *\n *\n * ## How does it work?\n *\n * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#methods_getTrusted\n * $sce.getTrusted(context, value)} rather than to the value directly.  Directives use {@link\n * ng.$sce#methods_parse $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the\n * {@link ng.$sce#methods_getTrusted $sce.getTrusted} behind the scenes on non-constant literals.\n *\n * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link\n * ng.$sce#methods_parseAsHtml $sce.parseAsHtml(binding expression)}.  Here's the actual code (slightly\n * simplified):\n *\n * <pre class=\"prettyprint\">\n *   var ngBindHtmlDirective = ['$sce', function($sce) {\n *     return function(scope, element, attr) {\n *       scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {\n *         element.html(value || '');\n *       });\n *     };\n *   }];\n * </pre>\n *\n * ## Impact on loading templates\n *\n * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as\n * `templateUrl`'s specified by {@link guide/directive directives}.\n *\n * By default, Angular only loads templates from the same domain and protocol as the application\n * document.  This is done by calling {@link ng.$sce#methods_getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on the template URL.  To load templates from other domains and/or\n * protocols, you may either either {@link ng.$sceDelegateProvider#methods_resourceUrlWhitelist whitelist\n * them} or {@link ng.$sce#methods_trustAsResourceUrl wrap it} into a trusted value.\n *\n * *Please note*:\n * The browser's\n * {@link https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest\n * Same Origin Policy} and {@link http://www.w3.org/TR/cors/ Cross-Origin Resource Sharing (CORS)}\n * policy apply in addition to this and may further restrict whether the template is successfully\n * loaded.  This means that without the right CORS policy, loading templates from a different domain\n * won't work on all browsers.  Also, loading templates from `file://` URL does not work on some\n * browsers.\n *\n * ## This feels like too much overhead for the developer?\n *\n * It's important to remember that SCE only applies to interpolation expressions.\n *\n * If your expressions are constant literals, they're automatically trusted and you don't need to\n * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g.\n * `<div ng-bind-html=\"'<b>implicitly trusted</b>'\"></div>`) just works.\n *\n * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them\n * through {@link ng.$sce#methods_getTrusted $sce.getTrusted}.  SCE doesn't play a role here.\n *\n * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load\n * templates in `ng-include` from your application's domain without having to even know about SCE.\n * It blocks loading templates from other domains or loading templates over http from an https\n * served document.  You can change these by setting your own custom {@link\n * ng.$sceDelegateProvider#methods_resourceUrlWhitelist whitelists} and {@link\n * ng.$sceDelegateProvider#methods_resourceUrlBlacklist blacklists} for matching such URLs.\n *\n * This significantly reduces the overhead.  It is far easier to pay the small overhead and have an\n * application that's secure and can be audited to verify that with much more ease than bolting\n * security onto an application later.\n *\n * <a name=\"contexts\"></a>\n * ## What trusted context types are supported?\n *\n * | Context             | Notes          |\n * |---------------------|----------------|\n * | `$sce.HTML`         | For HTML that's safe to source into the application.  The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. |\n * | `$sce.CSS`          | For CSS that's safe to source into the application.  Currently unused.  Feel free to use it in your own directives. |\n * | `$sce.URL`          | For URLs that are safe to follow as links.  Currently unused (`<a href=` and `<img src=` sanitize their urls and don't consititute an SCE context. |\n * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contens are also safe to include in your application.  Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.)  <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |\n * | `$sce.JS`           | For JavaScript that is safe to execute in your application's context.  Currently unused.  Feel free to use it in your own directives. |\n *\n * ## Format of items in {@link ng.$sceDelegateProvider#methods_resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#methods_resourceUrlBlacklist Blacklist} <a name=\"resourceUrlPatternItem\"></a>\n *\n *  Each element in these arrays must be one of the following:\n *\n *  - **'self'**\n *    - The special **string**, `'self'`, can be used to match against all URLs of the **same\n *      domain** as the application document using the **same protocol**.\n *  - **String** (except the special value `'self'`)\n *    - The string is matched against the full *normalized / absolute URL* of the resource\n *      being tested (substring matches are not good enough.)\n *    - There are exactly **two wildcard sequences** - `*` and `**`.  All other characters\n *      match themselves.\n *    - `*`: matches zero or more occurances of any character other than one of the following 6\n *      characters: '`:`', '`/`', '`.`', '`?`', '`&`' and ';'.  It's a useful wildcard for use\n *      in a whitelist.\n *    - `**`: matches zero or more occurances of *any* character.  As such, it's not\n *      not appropriate to use in for a scheme, domain, etc. as it would match too much.  (e.g.\n *      http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might\n *      not have been the intention.)  It's usage at the very end of the path is ok.  (e.g.\n *      http://foo.example.com/templates/**).\n *  - **RegExp** (*see caveat below*)\n *    - *Caveat*:  While regular expressions are powerful and offer great flexibility,  their syntax\n *      (and all the inevitable escaping) makes them *harder to maintain*.  It's easy to\n *      accidentally introduce a bug when one updates a complex expression (imho, all regexes should\n *      have good test coverage.).  For instance, the use of `.` in the regex is correct only in a\n *      small number of cases.  A `.` character in the regex used when matching the scheme or a\n *      subdomain could be matched against a `:` or literal `.` that was likely not intended.   It\n *      is highly recommended to use the string patterns and only fall back to regular expressions\n *      if they as a last resort.\n *    - The regular expression must be an instance of RegExp (i.e. not a string.)  It is\n *      matched against the **entire** *normalized / absolute URL* of the resource being tested\n *      (even when the RegExp did not have the `^` and `$` codes.)  In addition, any flags\n *      present on the RegExp (such as multiline, global, ignoreCase) are ignored.\n *    - If you are generating your JavaScript from some other templating engine (not\n *      recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),\n *      remember to escape your regular expression (and be aware that you might need more than\n *      one level of escaping depending on your templating engine and the way you interpolated\n *      the value.)  Do make use of your platform's escaping mechanism as it might be good\n *      enough before coding your own.  e.g. Ruby has\n *      [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)\n *      and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).\n *      Javascript lacks a similar built in function for escaping.  Take a look at Google\n *      Closure library's [goog.string.regExpEscape(s)](\n *      http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.\n *\n * ## Show me an example using SCE.\n *\n * @example\n<example module=\"mySceApp\" deps=\"angular-sanitize.js\">\n<file name=\"index.html\">\n  <div ng-controller=\"myAppController as myCtrl\">\n    <i ng-bind-html=\"myCtrl.explicitlyTrustedHtml\" id=\"explicitlyTrustedHtml\"></i><br><br>\n    <b>User comments</b><br>\n    By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when\n    $sanitize is available.  If $sanitize isn't available, this results in an error instead of an\n    exploit.\n    <div class=\"well\">\n      <div ng-repeat=\"userComment in myCtrl.userComments\">\n        <b>{{userComment.name}}</b>:\n        <span ng-bind-html=\"userComment.htmlComment\" class=\"htmlComment\"></span>\n        <br>\n      </div>\n    </div>\n  </div>\n</file>\n\n<file name=\"script.js\">\n  var mySceApp = angular.module('mySceApp', ['ngSanitize']);\n\n  mySceApp.controller(\"myAppController\", function myAppController($http, $templateCache, $sce) {\n    var self = this;\n    $http.get(\"test_data.json\", {cache: $templateCache}).success(function(userComments) {\n      self.userComments = userComments;\n    });\n    self.explicitlyTrustedHtml = $sce.trustAsHtml(\n        '<span onmouseover=\"this.textContent=&quot;Explicitly trusted HTML bypasses ' +\n        'sanitization.&quot;\">Hover over this text.</span>');\n  });\n</file>\n\n<file name=\"test_data.json\">\n[\n  { \"name\": \"Alice\",\n    \"htmlComment\":\n        \"<span onmouseover='this.textContent=\\\"PWN3D!\\\"'>Is <i>anyone</i> reading this?</span>\"\n  },\n  { \"name\": \"Bob\",\n    \"htmlComment\": \"<i>Yes!</i>  Am I the only other one?\"\n  }\n]\n</file>\n\n<file name=\"protractorTest.js\">\n  describe('SCE doc demo', function() {\n    it('should sanitize untrusted values', function() {\n      expect(element(by.css('.htmlComment')).getInnerHtml())\n          .toBe('<span>Is <i>anyone</i> reading this?</span>');\n    });\n\n    it('should NOT sanitize explicitly trusted values', function() {\n      expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(\n          '<span onmouseover=\"this.textContent=&quot;Explicitly trusted HTML bypasses ' +\n          'sanitization.&quot;\">Hover over this text.</span>');\n    });\n  });\n</file>\n</example>\n *\n *\n *\n * ## Can I disable SCE completely?\n *\n * Yes, you can.  However, this is strongly discouraged.  SCE gives you a lot of security benefits\n * for little coding overhead.  It will be much harder to take an SCE disabled application and\n * either secure it on your own or enable SCE at a later stage.  It might make sense to disable SCE\n * for cases where you have a lot of existing code that was written before SCE was introduced and\n * you're migrating them a module at a time.\n *\n * That said, here's how you can completely disable SCE:\n *\n * <pre class=\"prettyprint\">\n *   angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {\n *     // Completely disable SCE.  For demonstration purposes only!\n *     // Do not use in new projects.\n *     $sceProvider.enabled(false);\n *   });\n * </pre>\n *\n */\n/* jshint maxlen: 100 */\n\nfunction $SceProvider() {\n  var enabled = true;\n\n  /**\n   * @ngdoc function\n   * @name ng.sceProvider#enabled\n   * @methodOf ng.$sceProvider\n   * @function\n   *\n   * @param {boolean=} value If provided, then enables/disables SCE.\n   * @return {boolean} true if SCE is enabled, false otherwise.\n   *\n   * @description\n   * Enables/disables SCE and returns the current value.\n   */\n  this.enabled = function (value) {\n    if (arguments.length) {\n      enabled = !!value;\n    }\n    return enabled;\n  };\n\n\n  /* Design notes on the default implementation for SCE.\n   *\n   * The API contract for the SCE delegate\n   * -------------------------------------\n   * The SCE delegate object must provide the following 3 methods:\n   *\n   * - trustAs(contextEnum, value)\n   *     This method is used to tell the SCE service that the provided value is OK to use in the\n   *     contexts specified by contextEnum.  It must return an object that will be accepted by\n   *     getTrusted() for a compatible contextEnum and return this value.\n   *\n   * - valueOf(value)\n   *     For values that were not produced by trustAs(), return them as is.  For values that were\n   *     produced by trustAs(), return the corresponding input value to trustAs.  Basically, if\n   *     trustAs is wrapping the given values into some type, this operation unwraps it when given\n   *     such a value.\n   *\n   * - getTrusted(contextEnum, value)\n   *     This function should return the a value that is safe to use in the context specified by\n   *     contextEnum or throw and exception otherwise.\n   *\n   * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be\n   * opaque or wrapped in some holder object.  That happens to be an implementation detail.  For\n   * instance, an implementation could maintain a registry of all trusted objects by context.  In\n   * such a case, trustAs() would return the same object that was passed in.  getTrusted() would\n   * return the same object passed in if it was found in the registry under a compatible context or\n   * throw an exception otherwise.  An implementation might only wrap values some of the time based\n   * on some criteria.  getTrusted() might return a value and not throw an exception for special\n   * constants or objects even if not wrapped.  All such implementations fulfill this contract.\n   *\n   *\n   * A note on the inheritance model for SCE contexts\n   * ------------------------------------------------\n   * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types.  This\n   * is purely an implementation details.\n   *\n   * The contract is simply this:\n   *\n   *     getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)\n   *     will also succeed.\n   *\n   * Inheritance happens to capture this in a natural way.  In some future, we\n   * may not use inheritance anymore.  That is OK because no code outside of\n   * sce.js and sceSpecs.js would need to be aware of this detail.\n   */\n\n  this.$get = ['$parse', '$sniffer', '$sceDelegate', function(\n                $parse,   $sniffer,   $sceDelegate) {\n    // Prereq: Ensure that we're not running in IE8 quirks mode.  In that mode, IE allows\n    // the \"expression(javascript expression)\" syntax which is insecure.\n    if (enabled && $sniffer.msie && $sniffer.msieDocumentMode < 8) {\n      throw $sceMinErr('iequirks',\n        'Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks ' +\n        'mode.  You can fix this by adding the text <!doctype html> to the top of your HTML ' +\n        'document.  See http://docs.angularjs.org/api/ng.$sce for more information.');\n    }\n\n    var sce = copy(SCE_CONTEXTS);\n\n    /**\n     * @ngdoc function\n     * @name ng.sce#isEnabled\n     * @methodOf ng.$sce\n     * @function\n     *\n     * @return {Boolean} true if SCE is enabled, false otherwise.  If you want to set the value, you\n     * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.\n     *\n     * @description\n     * Returns a boolean indicating if SCE is enabled.\n     */\n    sce.isEnabled = function () {\n      return enabled;\n    };\n    sce.trustAs = $sceDelegate.trustAs;\n    sce.getTrusted = $sceDelegate.getTrusted;\n    sce.valueOf = $sceDelegate.valueOf;\n\n    if (!enabled) {\n      sce.trustAs = sce.getTrusted = function(type, value) { return value; };\n      sce.valueOf = identity;\n    }\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#parse\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Converts Angular {@link guide/expression expression} into a function.  This is like {@link\n     * ng.$parse $parse} and is identical when the expression is a literal constant.  Otherwise, it\n     * wraps the expression in a call to {@link ng.$sce#methods_getTrusted $sce.getTrusted(*type*,\n     * *result*)}\n     *\n     * @param {string} type The kind of SCE context in which this result will be used.\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n    sce.parseAs = function sceParseAs(type, expr) {\n      var parsed = $parse(expr);\n      if (parsed.literal && parsed.constant) {\n        return parsed;\n      } else {\n        return function sceParseAsTrusted(self, locals) {\n          return sce.getTrusted(type, parsed(self, locals));\n        };\n      }\n    };\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#trustAs\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Delegates to {@link ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs`}.  As such,\n     * returns an object that is trusted by angular for use in specified strict contextual\n     * escaping contexts (such as ng-bind-html, ng-include, any src attribute\n     * interpolation, any dom event binding attribute interpolation such as for onclick,  etc.)\n     * that uses the provided value.  See * {@link ng.$sce $sce} for enabling strict contextual\n     * escaping.\n     *\n     * @param {string} type The kind of context in which this value is safe for use.  e.g. url,\n     *   resource_url, html, js and css.\n     * @param {*} value The value that that should be considered trusted/safe.\n     * @returns {*} A value that can be used to stand in for the provided `value` in places\n     * where Angular expects a $sce.trustAs() return value.\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#trustAsHtml\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsHtml(value)` →\n     *     {@link ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs($sce.HTML, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#methods_getTrustedHtml\n     *     $sce.getTrustedHtml(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the\n     *     return value of {@link ng.$sce#methods_trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#trustAsUrl\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsUrl(value)` →\n     *     {@link ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs($sce.URL, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#methods_getTrustedUrl\n     *     $sce.getTrustedUrl(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the\n     *     return value of {@link ng.$sce#methods_trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#trustAsResourceUrl\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsResourceUrl(value)` →\n     *     {@link ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#methods_getTrustedResourceUrl\n     *     $sce.getTrustedResourceUrl(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the return\n     *     value of {@link ng.$sce#methods_trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#trustAsJs\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsJs(value)` →\n     *     {@link ng.$sceDelegate#methods_trustAs `$sceDelegate.trustAs($sce.JS, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#methods_getTrustedJs\n     *     $sce.getTrustedJs(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the\n     *     return value of {@link ng.$sce#methods_trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#getTrusted\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Delegates to {@link ng.$sceDelegate#methods_getTrusted `$sceDelegate.getTrusted`}.  As such,\n     * takes the result of a {@link ng.$sce#methods_trustAs `$sce.trustAs`}() call and returns the\n     * originally supplied value if the queried context type is a supertype of the created type.\n     * If this condition isn't satisfied, throws an exception.\n     *\n     * @param {string} type The kind of context in which this value is to be used.\n     * @param {*} maybeTrusted The result of a prior {@link ng.$sce#methods_trustAs `$sce.trustAs`}\n     *                         call.\n     * @returns {*} The value the was originally provided to\n     *              {@link ng.$sce#methods_trustAs `$sce.trustAs`} if valid in this context.\n     *              Otherwise, throws an exception.\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#getTrustedHtml\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedHtml(value)` →\n     *     {@link ng.$sceDelegate#methods_getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#getTrustedCss\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedCss(value)` →\n     *     {@link ng.$sceDelegate#methods_getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#getTrustedUrl\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedUrl(value)` →\n     *     {@link ng.$sceDelegate#methods_getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#getTrustedResourceUrl\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedResourceUrl(value)` →\n     *     {@link ng.$sceDelegate#methods_getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}\n     *\n     * @param {*} value The value to pass to `$sceDelegate.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#getTrustedJs\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedJs(value)` →\n     *     {@link ng.$sceDelegate#methods_getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#parseAsHtml\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsHtml(expression string)` →\n     *     {@link ng.$sce#methods_parse `$sce.parseAs($sce.HTML, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#parseAsCss\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsCss(value)` →\n     *     {@link ng.$sce#methods_parse `$sce.parseAs($sce.CSS, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#parseAsUrl\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsUrl(value)` →\n     *     {@link ng.$sce#methods_parse `$sce.parseAs($sce.URL, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#parseAsResourceUrl\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsResourceUrl(value)` →\n     *     {@link ng.$sce#methods_parse `$sce.parseAs($sce.RESOURCE_URL, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name ng.$sce#parseAsJs\n     * @methodOf ng.$sce\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsJs(value)` →\n     *     {@link ng.$sce#methods_parse `$sce.parseAs($sce.JS, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    // Shorthand delegations.\n    var parse = sce.parseAs,\n        getTrusted = sce.getTrusted,\n        trustAs = sce.trustAs;\n\n    forEach(SCE_CONTEXTS, function (enumValue, name) {\n      var lName = lowercase(name);\n      sce[camelCase(\"parse_as_\" + lName)] = function (expr) {\n        return parse(enumValue, expr);\n      };\n      sce[camelCase(\"get_trusted_\" + lName)] = function (value) {\n        return getTrusted(enumValue, value);\n      };\n      sce[camelCase(\"trust_as_\" + lName)] = function (value) {\n        return trustAs(enumValue, value);\n      };\n    });\n\n    return sce;\n  }];\n}\n\n/**\n * !!! This is an undocumented \"private\" service !!!\n *\n * @name ng.$sniffer\n * @requires $window\n * @requires $document\n *\n * @property {boolean} history Does the browser support html5 history api ?\n * @property {boolean} hashchange Does the browser support hashchange event ?\n * @property {boolean} transitions Does the browser support CSS transition events ?\n * @property {boolean} animations Does the browser support CSS animation events ?\n *\n * @description\n * This is very simple implementation of testing browser's features.\n */\nfunction $SnifferProvider() {\n  this.$get = ['$window', '$document', function($window, $document) {\n    var eventSupport = {},\n        android =\n          int((/android (\\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),\n        boxee = /Boxee/i.test(($window.navigator || {}).userAgent),\n        document = $document[0] || {},\n        documentMode = document.documentMode,\n        vendorPrefix,\n        vendorRegex = /^(Moz|webkit|O|ms)(?=[A-Z])/,\n        bodyStyle = document.body && document.body.style,\n        transitions = false,\n        animations = false,\n        match;\n\n    if (bodyStyle) {\n      for(var prop in bodyStyle) {\n        if(match = vendorRegex.exec(prop)) {\n          vendorPrefix = match[0];\n          vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1);\n          break;\n        }\n      }\n\n      if(!vendorPrefix) {\n        vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit';\n      }\n\n      transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));\n      animations  = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));\n\n      if (android && (!transitions||!animations)) {\n        transitions = isString(document.body.style.webkitTransition);\n        animations = isString(document.body.style.webkitAnimation);\n      }\n    }\n\n\n    return {\n      // Android has history.pushState, but it does not update location correctly\n      // so let's not use the history API at all.\n      // https://code.google.com/p/android/issues/detail?id=17471\n      // https://github.com/angular/angular.js/issues/904\n\n      // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has\n      // so let's not use the history API also\n      // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined\n      // jshint -W018\n      history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),\n      // jshint +W018\n      hashchange: 'onhashchange' in $window &&\n                  // IE8 compatible mode lies\n                  (!documentMode || documentMode > 7),\n      hasEvent: function(event) {\n        // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have\n        // it. In particular the event is not fired when backspace or delete key are pressed or\n        // when cut operation is performed.\n        if (event == 'input' && msie == 9) return false;\n\n        if (isUndefined(eventSupport[event])) {\n          var divElm = document.createElement('div');\n          eventSupport[event] = 'on' + event in divElm;\n        }\n\n        return eventSupport[event];\n      },\n      csp: csp(),\n      vendorPrefix: vendorPrefix,\n      transitions : transitions,\n      animations : animations,\n      android: android,\n      msie : msie,\n      msieDocumentMode: documentMode\n    };\n  }];\n}\n\nfunction $TimeoutProvider() {\n  this.$get = ['$rootScope', '$browser', '$q', '$exceptionHandler',\n       function($rootScope,   $browser,   $q,   $exceptionHandler) {\n    var deferreds = {};\n\n\n     /**\n      * @ngdoc function\n      * @name ng.$timeout\n      * @requires $browser\n      *\n      * @description\n      * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch\n      * block and delegates any exceptions to\n      * {@link ng.$exceptionHandler $exceptionHandler} service.\n      *\n      * The return value of registering a timeout function is a promise, which will be resolved when\n      * the timeout is reached and the timeout function is executed.\n      *\n      * To cancel a timeout request, call `$timeout.cancel(promise)`.\n      *\n      * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to\n      * synchronously flush the queue of deferred functions.\n      *\n      * @param {function()} fn A function, whose execution should be delayed.\n      * @param {number=} [delay=0] Delay in milliseconds.\n      * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n      *   will invoke `fn` within the {@link ng.$rootScope.Scope#methods_$apply $apply} block.\n      * @returns {Promise} Promise that will be resolved when the timeout is reached. The value this\n      *   promise will be resolved with is the return value of the `fn` function.\n      * \n      */\n    function timeout(fn, delay, invokeApply) {\n      var deferred = $q.defer(),\n          promise = deferred.promise,\n          skipApply = (isDefined(invokeApply) && !invokeApply),\n          timeoutId;\n\n      timeoutId = $browser.defer(function() {\n        try {\n          deferred.resolve(fn());\n        } catch(e) {\n          deferred.reject(e);\n          $exceptionHandler(e);\n        }\n        finally {\n          delete deferreds[promise.$$timeoutId];\n        }\n\n        if (!skipApply) $rootScope.$apply();\n      }, delay);\n\n      promise.$$timeoutId = timeoutId;\n      deferreds[timeoutId] = deferred;\n\n      return promise;\n    }\n\n\n     /**\n      * @ngdoc function\n      * @name ng.$timeout#cancel\n      * @methodOf ng.$timeout\n      *\n      * @description\n      * Cancels a task associated with the `promise`. As a result of this, the promise will be\n      * resolved with a rejection.\n      *\n      * @param {Promise=} promise Promise returned by the `$timeout` function.\n      * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n      *   canceled.\n      */\n    timeout.cancel = function(promise) {\n      if (promise && promise.$$timeoutId in deferreds) {\n        deferreds[promise.$$timeoutId].reject('canceled');\n        delete deferreds[promise.$$timeoutId];\n        return $browser.defer.cancel(promise.$$timeoutId);\n      }\n      return false;\n    };\n\n    return timeout;\n  }];\n}\n\n// NOTE:  The usage of window and document instead of $window and $document here is\n// deliberate.  This service depends on the specific behavior of anchor nodes created by the\n// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and\n// cause us to break tests.  In addition, when the browser resolves a URL for XHR, it\n// doesn't know about mocked locations and resolves URLs to the real document - which is\n// exactly the behavior needed here.  There is little value is mocking these out for this\n// service.\nvar urlParsingNode = document.createElement(\"a\");\nvar originUrl = urlResolve(window.location.href, true);\n\n\n/**\n *\n * Implementation Notes for non-IE browsers\n * ----------------------------------------\n * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,\n * results both in the normalizing and parsing of the URL.  Normalizing means that a relative\n * URL will be resolved into an absolute URL in the context of the application document.\n * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related\n * properties are all populated to reflect the normalized URL.  This approach has wide\n * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc.  See\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *\n * Implementation Notes for IE\n * ---------------------------\n * IE >= 8 and <= 10 normalizes the URL when assigned to the anchor node similar to the other\n * browsers.  However, the parsed components will not be set if the URL assigned did not specify\n * them.  (e.g. if you assign a.href = \"foo\", then a.protocol, a.host, etc. will be empty.)  We\n * work around that by performing the parsing in a 2nd step by taking a previously normalized\n * URL (e.g. by assigning to a.href) and assigning it a.href again.  This correctly populates the\n * properties such as protocol, hostname, port, etc.\n *\n * IE7 does not normalize the URL when assigned to an anchor node.  (Apparently, it does, if one\n * uses the inner HTML approach to assign the URL as part of an HTML snippet -\n * http://stackoverflow.com/a/472729)  However, setting img[src] does normalize the URL.\n * Unfortunately, setting img[src] to something like \"javascript:foo\" on IE throws an exception.\n * Since the primary usage for normalizing URLs is to sanitize such URLs, we can't use that\n * method and IE < 8 is unsupported.\n *\n * References:\n *   http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement\n *   http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *   http://url.spec.whatwg.org/#urlutils\n *   https://github.com/angular/angular.js/pull/2902\n *   http://james.padolsey.com/javascript/parsing-urls-with-the-dom/\n *\n * @function\n * @param {string} url The URL to be parsed.\n * @description Normalizes and parses a URL.\n * @returns {object} Returns the normalized URL as a dictionary.\n *\n *   | member name   | Description    |\n *   |---------------|----------------|\n *   | href          | A normalized version of the provided URL if it was not an absolute URL |\n *   | protocol      | The protocol including the trailing colon                              |\n *   | host          | The host and port (if the port is non-default) of the normalizedUrl    |\n *   | search        | The search params, minus the question mark                             |\n *   | hash          | The hash string, minus the hash symbol\n *   | hostname      | The hostname\n *   | port          | The port, without \":\"\n *   | pathname      | The pathname, beginning with \"/\"\n *\n */\nfunction urlResolve(url, base) {\n  var href = url;\n\n  if (msie) {\n    // Normalize before parse.  Refer Implementation Notes on why this is\n    // done in two steps on IE.\n    urlParsingNode.setAttribute(\"href\", href);\n    href = urlParsingNode.href;\n  }\n\n  urlParsingNode.setAttribute('href', href);\n\n  // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n  return {\n    href: urlParsingNode.href,\n    protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n    host: urlParsingNode.host,\n    search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n    hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n    hostname: urlParsingNode.hostname,\n    port: urlParsingNode.port,\n    pathname: (urlParsingNode.pathname.charAt(0) === '/')\n      ? urlParsingNode.pathname\n      : '/' + urlParsingNode.pathname\n  };\n}\n\n/**\n * Parse a request URL and determine whether this is a same-origin request as the application document.\n *\n * @param {string|object} requestUrl The url of the request as a string that will be resolved\n * or a parsed URL object.\n * @returns {boolean} Whether the request is for the same origin as the application document.\n */\nfunction urlIsSameOrigin(requestUrl) {\n  var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n  return (parsed.protocol === originUrl.protocol &&\n          parsed.host === originUrl.host);\n}\n\n/**\n * @ngdoc object\n * @name ng.$window\n *\n * @description\n * A reference to the browser's `window` object. While `window`\n * is globally available in JavaScript, it causes testability problems, because\n * it is a global variable. In angular we always refer to it through the\n * `$window` service, so it may be overridden, removed or mocked for testing.\n *\n * Expressions, like the one defined for the `ngClick` directive in the example\n * below, are evaluated with respect to the current scope.  Therefore, there is\n * no risk of inadvertently coding in a dependency on a global value in such an\n * expression.\n *\n * @example\n   <doc:example>\n     <doc:source>\n       <script>\n         function Ctrl($scope, $window) {\n           $scope.greeting = 'Hello, World!';\n           $scope.doGreeting = function(greeting) {\n               $window.alert(greeting);\n           };\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n         <input type=\"text\" ng-model=\"greeting\" />\n         <button ng-click=\"doGreeting(greeting)\">ALERT</button>\n       </div>\n     </doc:source>\n     <doc:protractor>\n      it('should display the greeting in the input box', function() {\n       element(by.model('greeting')).sendKeys('Hello, E2E Tests');\n       // If we click the button it will block the test runner\n       // element(':button').click();\n      });\n     </doc:protractor>\n   </doc:example>\n */\nfunction $WindowProvider(){\n  this.$get = valueFn(window);\n}\n\n/**\n * @ngdoc object\n * @name ng.$filterProvider\n * @description\n *\n * Filters are just functions which transform input to an output. However filters need to be\n * Dependency Injected. To achieve this a filter definition consists of a factory function which is\n * annotated with dependencies and is responsible for creating a filter function.\n *\n * <pre>\n *   // Filter registration\n *   function MyModule($provide, $filterProvider) {\n *     // create a service to demonstrate injection (not always needed)\n *     $provide.value('greet', function(name){\n *       return 'Hello ' + name + '!';\n *     });\n *\n *     // register a filter factory which uses the\n *     // greet service to demonstrate DI.\n *     $filterProvider.register('greet', function(greet){\n *       // return the filter function which uses the greet service\n *       // to generate salutation\n *       return function(text) {\n *         // filters need to be forgiving so check input validity\n *         return text && greet(text) || text;\n *       };\n *     });\n *   }\n * </pre>\n *\n * The filter function is registered with the `$injector` under the filter name suffix with\n * `Filter`.\n * \n * <pre>\n *   it('should be the same instance', inject(\n *     function($filterProvider) {\n *       $filterProvider.register('reverse', function(){\n *         return ...;\n *       });\n *     },\n *     function($filter, reverseFilter) {\n *       expect($filter('reverse')).toBe(reverseFilter);\n *     });\n * </pre>\n *\n *\n * For more information about how angular filters work, and how to create your own filters, see\n * {@link guide/filter Filters} in the Angular Developer Guide.\n */\n/**\n * @ngdoc method\n * @name ng.$filterProvider#register\n * @methodOf ng.$filterProvider\n * @description\n * Register filter factory function.\n *\n * @param {String} name Name of the filter.\n * @param {function} fn The filter factory function which is injectable.\n */\n\n\n/**\n * @ngdoc function\n * @name ng.$filter\n * @function\n * @description\n * Filters are used for formatting data displayed to the user.\n *\n * The general syntax in templates is as follows:\n *\n *         {{ expression [| filter_name[:parameter_value] ... ] }}\n *\n * @param {String} name Name of the filter function to retrieve\n * @return {Function} the filter function\n */\n$FilterProvider.$inject = ['$provide'];\nfunction $FilterProvider($provide) {\n  var suffix = 'Filter';\n\n  /**\n   * @ngdoc function\n   * @name ng.$controllerProvider#register\n   * @methodOf ng.$controllerProvider\n   * @param {string|Object} name Name of the filter function, or an object map of filters where\n   *    the keys are the filter names and the values are the filter factories.\n   * @returns {Object} Registered filter instance, or if a map of filters was provided then a map\n   *    of the registered filter instances.\n   */\n  function register(name, factory) {\n    if(isObject(name)) {\n      var filters = {};\n      forEach(name, function(filter, key) {\n        filters[key] = register(key, filter);\n      });\n      return filters;\n    } else {\n      return $provide.factory(name + suffix, factory);\n    }\n  }\n  this.register = register;\n\n  this.$get = ['$injector', function($injector) {\n    return function(name) {\n      return $injector.get(name + suffix);\n    };\n  }];\n\n  ////////////////////////////////////////\n  \n  /* global\n    currencyFilter: false,\n    dateFilter: false,\n    filterFilter: false,\n    jsonFilter: false,\n    limitToFilter: false,\n    lowercaseFilter: false,\n    numberFilter: false,\n    orderByFilter: false,\n    uppercaseFilter: false,\n  */\n\n  register('currency', currencyFilter);\n  register('date', dateFilter);\n  register('filter', filterFilter);\n  register('json', jsonFilter);\n  register('limitTo', limitToFilter);\n  register('lowercase', lowercaseFilter);\n  register('number', numberFilter);\n  register('orderBy', orderByFilter);\n  register('uppercase', uppercaseFilter);\n}\n\n/**\n * @ngdoc filter\n * @name ng.filter:filter\n * @function\n *\n * @description\n * Selects a subset of items from `array` and returns it as a new array.\n *\n * @param {Array} array The source array.\n * @param {string|Object|function()} expression The predicate to be used for selecting items from\n *   `array`.\n *\n *   Can be one of:\n *\n *   - `string`: The string is evaluated as an expression and the resulting value is used for substring match against\n *     the contents of the `array`. All strings or objects with string properties in `array` that contain this string\n *     will be returned. The predicate can be negated by prefixing the string with `!`.\n *\n *   - `Object`: A pattern object can be used to filter specific properties on objects contained\n *     by `array`. For example `{name:\"M\", phone:\"1\"}` predicate will return an array of items\n *     which have property `name` containing \"M\" and property `phone` containing \"1\". A special\n *     property name `$` can be used (as in `{$:\"text\"}`) to accept a match against any\n *     property of the object. That's equivalent to the simple substring match with a `string`\n *     as described above.\n *\n *   - `function(value)`: A predicate function can be used to write arbitrary filters. The function is\n *     called for each element of `array`. The final result is an array of those elements that\n *     the predicate returned true for.\n *\n * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in\n *     determining if the expected value (from the filter expression) and actual value (from\n *     the object in the array) should be considered a match.\n *\n *   Can be one of:\n *\n *     - `function(actual, expected)`:\n *       The function will be given the object value and the predicate value to compare and\n *       should return true if the item should be included in filtered result.\n *\n *     - `true`: A shorthand for `function(actual, expected) { return angular.equals(expected, actual)}`.\n *       this is essentially strict comparison of expected and actual.\n *\n *     - `false|undefined`: A short hand for a function which will look for a substring match in case\n *       insensitive way.\n *\n * @example\n   <doc:example>\n     <doc:source>\n       <div ng-init=\"friends = [{name:'John', phone:'555-1276'},\n                                {name:'Mary', phone:'800-BIG-MARY'},\n                                {name:'Mike', phone:'555-4321'},\n                                {name:'Adam', phone:'555-5678'},\n                                {name:'Julie', phone:'555-8765'},\n                                {name:'Juliette', phone:'555-5678'}]\"></div>\n\n       Search: <input ng-model=\"searchText\">\n       <table id=\"searchTextResults\">\n         <tr><th>Name</th><th>Phone</th></tr>\n         <tr ng-repeat=\"friend in friends | filter:searchText\">\n           <td>{{friend.name}}</td>\n           <td>{{friend.phone}}</td>\n         </tr>\n       </table>\n       <hr>\n       Any: <input ng-model=\"search.$\"> <br>\n       Name only <input ng-model=\"search.name\"><br>\n       Phone only <input ng-model=\"search.phone\"><br>\n       Equality <input type=\"checkbox\" ng-model=\"strict\"><br>\n       <table id=\"searchObjResults\">\n         <tr><th>Name</th><th>Phone</th></tr>\n         <tr ng-repeat=\"friendObj in friends | filter:search:strict\">\n           <td>{{friendObj.name}}</td>\n           <td>{{friendObj.phone}}</td>\n         </tr>\n       </table>\n     </doc:source>\n     <doc:protractor>\n       var expectFriendNames = function(expectedNames, key) {\n         element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {\n           arr.forEach(function(wd, i) {\n             expect(wd.getText()).toMatch(expectedNames[i]);\n           });\n         });\n       };\n\n       it('should search across all fields when filtering with a string', function() {\n         var searchText = element(by.model('searchText'));\n         searchText.clear();\n         searchText.sendKeys('m');\n         expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');\n\n         searchText.clear();\n         searchText.sendKeys('76');\n         expectFriendNames(['John', 'Julie'], 'friend');\n       });\n\n       it('should search in specific fields when filtering with a predicate object', function() {\n         var searchAny = element(by.model('search.$'));\n         searchAny.clear();\n         searchAny.sendKeys('i');\n         expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');\n       });\n       it('should use a equal comparison when comparator is true', function() {\n         var searchName = element(by.model('search.name'));\n         var strict = element(by.model('strict'));\n         searchName.clear();\n         searchName.sendKeys('Julie');\n         strict.click();\n         expectFriendNames(['Julie'], 'friendObj');\n       });\n     </doc:protractor>\n   </doc:example>\n */\nfunction filterFilter() {\n  return function(array, expression, comparator) {\n    if (!isArray(array)) return array;\n\n    var comparatorType = typeof(comparator),\n        predicates = [];\n\n    predicates.check = function(value) {\n      for (var j = 0; j < predicates.length; j++) {\n        if(!predicates[j](value)) {\n          return false;\n        }\n      }\n      return true;\n    };\n\n    if (comparatorType !== 'function') {\n      if (comparatorType === 'boolean' && comparator) {\n        comparator = function(obj, text) {\n          return angular.equals(obj, text);\n        };\n      } else {\n        comparator = function(obj, text) {\n          text = (''+text).toLowerCase();\n          return (''+obj).toLowerCase().indexOf(text) > -1;\n        };\n      }\n    }\n\n    var search = function(obj, text){\n      if (typeof text == 'string' && text.charAt(0) === '!') {\n        return !search(obj, text.substr(1));\n      }\n      switch (typeof obj) {\n        case \"boolean\":\n        case \"number\":\n        case \"string\":\n          return comparator(obj, text);\n        case \"object\":\n          switch (typeof text) {\n            case \"object\":\n              return comparator(obj, text);\n            default:\n              for ( var objKey in obj) {\n                if (objKey.charAt(0) !== '$' && search(obj[objKey], text)) {\n                  return true;\n                }\n              }\n              break;\n          }\n          return false;\n        case \"array\":\n          for ( var i = 0; i < obj.length; i++) {\n            if (search(obj[i], text)) {\n              return true;\n            }\n          }\n          return false;\n        default:\n          return false;\n      }\n    };\n    switch (typeof expression) {\n      case \"boolean\":\n      case \"number\":\n      case \"string\":\n        // Set up expression object and fall through\n        expression = {$:expression};\n        // jshint -W086\n      case \"object\":\n        // jshint +W086\n        for (var key in expression) {\n          (function(path) {\n            if (typeof expression[path] == 'undefined') return;\n            predicates.push(function(value) {\n              return search(path == '$' ? value : (value && value[path]), expression[path]);\n            });\n          })(key);\n        }\n        break;\n      case 'function':\n        predicates.push(expression);\n        break;\n      default:\n        return array;\n    }\n    var filtered = [];\n    for ( var j = 0; j < array.length; j++) {\n      var value = array[j];\n      if (predicates.check(value)) {\n        filtered.push(value);\n      }\n    }\n    return filtered;\n  };\n}\n\n/**\n * @ngdoc filter\n * @name ng.filter:currency\n * @function\n *\n * @description\n * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default\n * symbol for current locale is used.\n *\n * @param {number} amount Input to filter.\n * @param {string=} symbol Currency symbol or identifier to be displayed.\n * @returns {string} Formatted number.\n *\n *\n * @example\n   <doc:example>\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.amount = 1234.56;\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n         <input type=\"number\" ng-model=\"amount\"> <br>\n         default currency symbol ($): <span id=\"currency-default\">{{amount | currency}}</span><br>\n         custom currency identifier (USD$): <span>{{amount | currency:\"USD$\"}}</span>\n       </div>\n     </doc:source>\n     <doc:protractor>\n       it('should init with 1234.56', function() {\n         expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');\n         expect(element(by.binding('amount | currency:\"USD$\"')).getText()).toBe('USD$1,234.56');\n       });\n       it('should update', function() {\n         if (browser.params.browser == 'safari') {\n           // Safari does not understand the minus key. See\n           // https://github.com/angular/protractor/issues/481\n           return;\n         }\n         element(by.model('amount')).clear();\n         element(by.model('amount')).sendKeys('-1234');         expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)');\n         expect(element(by.binding('amount | currency:\"USD$\"')).getText()).toBe('(USD$1,234.00)');\n       });\n     </doc:protractor>\n   </doc:example>\n */\ncurrencyFilter.$inject = ['$locale'];\nfunction currencyFilter($locale) {\n  var formats = $locale.NUMBER_FORMATS;\n  return function(amount, currencySymbol){\n    if (isUndefined(currencySymbol)) currencySymbol = formats.CURRENCY_SYM;\n    return formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, 2).\n                replace(/\\u00A4/g, currencySymbol);\n  };\n}\n\n/**\n * @ngdoc filter\n * @name ng.filter:number\n * @function\n *\n * @description\n * Formats a number as text.\n *\n * If the input is not a number an empty string is returned.\n *\n * @param {number|string} number Number to format.\n * @param {(number|string)=} fractionSize Number of decimal places to round the number to.\n * If this is not provided then the fraction size is computed from the current locale's number\n * formatting pattern. In the case of the default locale, it will be 3.\n * @returns {string} Number rounded to decimalPlaces and places a “,” after each third digit.\n *\n * @example\n   <doc:example>\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.val = 1234.56789;\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n         Enter number: <input ng-model='val'><br>\n         Default formatting: <span id='number-default'>{{val | number}}</span><br>\n         No fractions: <span>{{val | number:0}}</span><br>\n         Negative number: <span>{{-val | number:4}}</span>\n       </div>\n     </doc:source>\n     <doc:protractor>\n       it('should format numbers', function() {\n         expect(element(by.id('number-default')).getText()).toBe('1,234.568');\n         expect(element(by.binding('val | number:0')).getText()).toBe('1,235');\n         expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');\n       });\n\n       it('should update', function() {\n         element(by.model('val')).clear();\n         element(by.model('val')).sendKeys('3374.333');\n         expect(element(by.id('number-default')).getText()).toBe('3,374.333');\n         expect(element(by.binding('val | number:0')).getText()).toBe('3,374');\n         expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');\n      });\n     </doc:protractor>\n   </doc:example>\n */\n\n\nnumberFilter.$inject = ['$locale'];\nfunction numberFilter($locale) {\n  var formats = $locale.NUMBER_FORMATS;\n  return function(number, fractionSize) {\n    return formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,\n      fractionSize);\n  };\n}\n\nvar DECIMAL_SEP = '.';\nfunction formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {\n  if (isNaN(number) || !isFinite(number)) return '';\n\n  var isNegative = number < 0;\n  number = Math.abs(number);\n  var numStr = number + '',\n      formatedText = '',\n      parts = [];\n\n  var hasExponent = false;\n  if (numStr.indexOf('e') !== -1) {\n    var match = numStr.match(/([\\d\\.]+)e(-?)(\\d+)/);\n    if (match && match[2] == '-' && match[3] > fractionSize + 1) {\n      numStr = '0';\n    } else {\n      formatedText = numStr;\n      hasExponent = true;\n    }\n  }\n\n  if (!hasExponent) {\n    var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length;\n\n    // determine fractionSize if it is not specified\n    if (isUndefined(fractionSize)) {\n      fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac);\n    }\n\n    var pow = Math.pow(10, fractionSize);\n    number = Math.round(number * pow) / pow;\n    var fraction = ('' + number).split(DECIMAL_SEP);\n    var whole = fraction[0];\n    fraction = fraction[1] || '';\n\n    var i, pos = 0,\n        lgroup = pattern.lgSize,\n        group = pattern.gSize;\n\n    if (whole.length >= (lgroup + group)) {\n      pos = whole.length - lgroup;\n      for (i = 0; i < pos; i++) {\n        if ((pos - i)%group === 0 && i !== 0) {\n          formatedText += groupSep;\n        }\n        formatedText += whole.charAt(i);\n      }\n    }\n\n    for (i = pos; i < whole.length; i++) {\n      if ((whole.length - i)%lgroup === 0 && i !== 0) {\n        formatedText += groupSep;\n      }\n      formatedText += whole.charAt(i);\n    }\n\n    // format fraction part.\n    while(fraction.length < fractionSize) {\n      fraction += '0';\n    }\n\n    if (fractionSize && fractionSize !== \"0\") formatedText += decimalSep + fraction.substr(0, fractionSize);\n  } else {\n\n    if (fractionSize > 0 && number > -1 && number < 1) {\n      formatedText = number.toFixed(fractionSize);\n    }\n  }\n\n  parts.push(isNegative ? pattern.negPre : pattern.posPre);\n  parts.push(formatedText);\n  parts.push(isNegative ? pattern.negSuf : pattern.posSuf);\n  return parts.join('');\n}\n\nfunction padNumber(num, digits, trim) {\n  var neg = '';\n  if (num < 0) {\n    neg =  '-';\n    num = -num;\n  }\n  num = '' + num;\n  while(num.length < digits) num = '0' + num;\n  if (trim)\n    num = num.substr(num.length - digits);\n  return neg + num;\n}\n\n\nfunction dateGetter(name, size, offset, trim) {\n  offset = offset || 0;\n  return function(date) {\n    var value = date['get' + name]();\n    if (offset > 0 || value > -offset)\n      value += offset;\n    if (value === 0 && offset == -12 ) value = 12;\n    return padNumber(value, size, trim);\n  };\n}\n\nfunction dateStrGetter(name, shortForm) {\n  return function(date, formats) {\n    var value = date['get' + name]();\n    var get = uppercase(shortForm ? ('SHORT' + name) : name);\n\n    return formats[get][value];\n  };\n}\n\nfunction timeZoneGetter(date) {\n  var zone = -1 * date.getTimezoneOffset();\n  var paddedZone = (zone >= 0) ? \"+\" : \"\";\n\n  paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +\n                padNumber(Math.abs(zone % 60), 2);\n\n  return paddedZone;\n}\n\nfunction ampmGetter(date, formats) {\n  return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];\n}\n\nvar DATE_FORMATS = {\n  yyyy: dateGetter('FullYear', 4),\n    yy: dateGetter('FullYear', 2, 0, true),\n     y: dateGetter('FullYear', 1),\n  MMMM: dateStrGetter('Month'),\n   MMM: dateStrGetter('Month', true),\n    MM: dateGetter('Month', 2, 1),\n     M: dateGetter('Month', 1, 1),\n    dd: dateGetter('Date', 2),\n     d: dateGetter('Date', 1),\n    HH: dateGetter('Hours', 2),\n     H: dateGetter('Hours', 1),\n    hh: dateGetter('Hours', 2, -12),\n     h: dateGetter('Hours', 1, -12),\n    mm: dateGetter('Minutes', 2),\n     m: dateGetter('Minutes', 1),\n    ss: dateGetter('Seconds', 2),\n     s: dateGetter('Seconds', 1),\n     // while ISO 8601 requires fractions to be prefixed with `.` or `,`\n     // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions\n   sss: dateGetter('Milliseconds', 3),\n  EEEE: dateStrGetter('Day'),\n   EEE: dateStrGetter('Day', true),\n     a: ampmGetter,\n     Z: timeZoneGetter\n};\n\nvar DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,\n    NUMBER_STRING = /^\\-?\\d+$/;\n\n/**\n * @ngdoc filter\n * @name ng.filter:date\n * @function\n *\n * @description\n *   Formats `date` to a string based on the requested `format`.\n *\n *   `format` string can be composed of the following elements:\n *\n *   * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)\n *   * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n *   * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)\n *   * `'MMMM'`: Month in year (January-December)\n *   * `'MMM'`: Month in year (Jan-Dec)\n *   * `'MM'`: Month in year, padded (01-12)\n *   * `'M'`: Month in year (1-12)\n *   * `'dd'`: Day in month, padded (01-31)\n *   * `'d'`: Day in month (1-31)\n *   * `'EEEE'`: Day in Week,(Sunday-Saturday)\n *   * `'EEE'`: Day in Week, (Sun-Sat)\n *   * `'HH'`: Hour in day, padded (00-23)\n *   * `'H'`: Hour in day (0-23)\n *   * `'hh'`: Hour in am/pm, padded (01-12)\n *   * `'h'`: Hour in am/pm, (1-12)\n *   * `'mm'`: Minute in hour, padded (00-59)\n *   * `'m'`: Minute in hour (0-59)\n *   * `'ss'`: Second in minute, padded (00-59)\n *   * `'s'`: Second in minute (0-59)\n *   * `'.sss' or ',sss'`: Millisecond in second, padded (000-999)\n *   * `'a'`: am/pm marker\n *   * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)\n *\n *   `format` string can also be one of the following predefined\n *   {@link guide/i18n localizable formats}:\n *\n *   * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale\n *     (e.g. Sep 3, 2010 12:05:08 pm)\n *   * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US  locale (e.g. 9/3/10 12:05 pm)\n *   * `'fullDate'`: equivalent to `'EEEE, MMMM d,y'` for en_US  locale\n *     (e.g. Friday, September 3, 2010)\n *   * `'longDate'`: equivalent to `'MMMM d, y'` for en_US  locale (e.g. September 3, 2010)\n *   * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US  locale (e.g. Sep 3, 2010)\n *   * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)\n *   * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 pm)\n *   * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 pm)\n *\n *   `format` string can contain literal values. These need to be quoted with single quotes (e.g.\n *   `\"h 'in the morning'\"`). In order to output single quote, use two single quotes in a sequence\n *   (e.g. `\"h 'o''clock'\"`).\n *\n * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or\n *    number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.SSSZ and its\n *    shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is\n *    specified in the string input, the time is considered to be in the local timezone.\n * @param {string=} format Formatting rules (see Description). If not specified,\n *    `mediumDate` is used.\n * @returns {string} Formatted string or the input if input is not recognized as date/millis.\n *\n * @example\n   <doc:example>\n     <doc:source>\n       <span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:\n           <span>{{1288323623006 | date:'medium'}}</span><br>\n       <span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:\n          <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>\n       <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:\n          <span>{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}</span><br>\n     </doc:source>\n     <doc:protractor>\n       it('should format date', function() {\n         expect(element(by.binding(\"1288323623006 | date:'medium'\")).getText()).\n            toMatch(/Oct 2\\d, 2010 \\d{1,2}:\\d{2}:\\d{2} (AM|PM)/);\n         expect(element(by.binding(\"1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'\")).getText()).\n            toMatch(/2010\\-10\\-2\\d \\d{2}:\\d{2}:\\d{2} (\\-|\\+)?\\d{4}/);\n         expect(element(by.binding(\"'1288323623006' | date:'MM/dd/yyyy @ h:mma'\")).getText()).\n            toMatch(/10\\/2\\d\\/2010 @ \\d{1,2}:\\d{2}(AM|PM)/);\n       });\n     </doc:protractor>\n   </doc:example>\n */\ndateFilter.$inject = ['$locale'];\nfunction dateFilter($locale) {\n\n\n  var R_ISO8601_STR = /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n                     // 1        2       3         4          5          6          7          8  9     10      11\n  function jsonStringToDate(string) {\n    var match;\n    if (match = string.match(R_ISO8601_STR)) {\n      var date = new Date(0),\n          tzHour = 0,\n          tzMin  = 0,\n          dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n          timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n      if (match[9]) {\n        tzHour = int(match[9] + match[10]);\n        tzMin = int(match[9] + match[11]);\n      }\n      dateSetter.call(date, int(match[1]), int(match[2]) - 1, int(match[3]));\n      var h = int(match[4]||0) - tzHour;\n      var m = int(match[5]||0) - tzMin;\n      var s = int(match[6]||0);\n      var ms = Math.round(parseFloat('0.' + (match[7]||0)) * 1000);\n      timeSetter.call(date, h, m, s, ms);\n      return date;\n    }\n    return string;\n  }\n\n\n  return function(date, format) {\n    var text = '',\n        parts = [],\n        fn, match;\n\n    format = format || 'mediumDate';\n    format = $locale.DATETIME_FORMATS[format] || format;\n    if (isString(date)) {\n      if (NUMBER_STRING.test(date)) {\n        date = int(date);\n      } else {\n        date = jsonStringToDate(date);\n      }\n    }\n\n    if (isNumber(date)) {\n      date = new Date(date);\n    }\n\n    if (!isDate(date)) {\n      return date;\n    }\n\n    while(format) {\n      match = DATE_FORMATS_SPLIT.exec(format);\n      if (match) {\n        parts = concat(parts, match, 1);\n        format = parts.pop();\n      } else {\n        parts.push(format);\n        format = null;\n      }\n    }\n\n    forEach(parts, function(value){\n      fn = DATE_FORMATS[value];\n      text += fn ? fn(date, $locale.DATETIME_FORMATS)\n                 : value.replace(/(^'|'$)/g, '').replace(/''/g, \"'\");\n    });\n\n    return text;\n  };\n}\n\n\n/**\n * @ngdoc filter\n * @name ng.filter:json\n * @function\n *\n * @description\n *   Allows you to convert a JavaScript object into JSON string.\n *\n *   This filter is mostly useful for debugging. When using the double curly {{value}} notation\n *   the binding is automatically converted to JSON.\n *\n * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.\n * @returns {string} JSON string.\n *\n *\n * @example:\n   <doc:example>\n     <doc:source>\n       <pre>{{ {'name':'value'} | json }}</pre>\n     </doc:source>\n     <doc:protractor>\n       it('should jsonify filtered objects', function() {\n         expect(element(by.binding(\"{'name':'value'}\")).getText()).toMatch(/\\{\\n  \"name\": ?\"value\"\\n}/);\n       });\n     </doc:protractor>\n   </doc:example>\n *\n */\nfunction jsonFilter() {\n  return function(object) {\n    return toJson(object, true);\n  };\n}\n\n\n/**\n * @ngdoc filter\n * @name ng.filter:lowercase\n * @function\n * @description\n * Converts string to lowercase.\n * @see angular.lowercase\n */\nvar lowercaseFilter = valueFn(lowercase);\n\n\n/**\n * @ngdoc filter\n * @name ng.filter:uppercase\n * @function\n * @description\n * Converts string to uppercase.\n * @see angular.uppercase\n */\nvar uppercaseFilter = valueFn(uppercase);\n\n/**\n * @ngdoc function\n * @name ng.filter:limitTo\n * @function\n *\n * @description\n * Creates a new array or string containing only a specified number of elements. The elements\n * are taken from either the beginning or the end of the source array or string, as specified by\n * the value and sign (positive or negative) of `limit`.\n *\n * @param {Array|string} input Source array or string to be limited.\n * @param {string|number} limit The length of the returned array or string. If the `limit` number \n *     is positive, `limit` number of items from the beginning of the source array/string are copied.\n *     If the number is negative, `limit` number  of items from the end of the source array/string \n *     are copied. The `limit` will be trimmed if it exceeds `array.length`\n * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array\n *     had less than `limit` elements.\n *\n * @example\n   <doc:example>\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.numbers = [1,2,3,4,5,6,7,8,9];\n           $scope.letters = \"abcdefghi\";\n           $scope.numLimit = 3;\n           $scope.letterLimit = 3;\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n         Limit {{numbers}} to: <input type=\"integer\" ng-model=\"numLimit\">\n         <p>Output numbers: {{ numbers | limitTo:numLimit }}</p>\n         Limit {{letters}} to: <input type=\"integer\" ng-model=\"letterLimit\">\n         <p>Output letters: {{ letters | limitTo:letterLimit }}</p>\n       </div>\n     </doc:source>\n     <doc:protractor>\n       var numLimitInput = element(by.model('numLimit'));\n       var letterLimitInput = element(by.model('letterLimit'));\n       var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));\n       var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));\n\n       it('should limit the number array to first three items', function() {\n         expect(numLimitInput.getAttribute('value')).toBe('3');\n         expect(letterLimitInput.getAttribute('value')).toBe('3');\n         expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');\n         expect(limitedLetters.getText()).toEqual('Output letters: abc');\n       });\n\n       it('should update the output when -3 is entered', function() {\n         numLimitInput.clear();\n         numLimitInput.sendKeys('-3');\n         letterLimitInput.clear();\n         letterLimitInput.sendKeys('-3');\n         expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');\n         expect(limitedLetters.getText()).toEqual('Output letters: ghi');\n       });\n\n       it('should not exceed the maximum size of input array', function() {\n         numLimitInput.clear();\n         numLimitInput.sendKeys('100');\n         letterLimitInput.clear();\n         letterLimitInput.sendKeys('100');\n         expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');\n         expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');\n       });\n     </doc:protractor>\n   </doc:example>\n */\nfunction limitToFilter(){\n  return function(input, limit) {\n    if (!isArray(input) && !isString(input)) return input;\n    \n    limit = int(limit);\n\n    if (isString(input)) {\n      //NaN check on limit\n      if (limit) {\n        return limit >= 0 ? input.slice(0, limit) : input.slice(limit, input.length);\n      } else {\n        return \"\";\n      }\n    }\n\n    var out = [],\n      i, n;\n\n    // if abs(limit) exceeds maximum length, trim it\n    if (limit > input.length)\n      limit = input.length;\n    else if (limit < -input.length)\n      limit = -input.length;\n\n    if (limit > 0) {\n      i = 0;\n      n = limit;\n    } else {\n      i = input.length + limit;\n      n = input.length;\n    }\n\n    for (; i<n; i++) {\n      out.push(input[i]);\n    }\n\n    return out;\n  };\n}\n\n/**\n * @ngdoc function\n * @name ng.filter:orderBy\n * @function\n *\n * @description\n * Orders a specified `array` by the `expression` predicate.\n *\n * @param {Array} array The array to sort.\n * @param {function(*)|string|Array.<(function(*)|string)>} expression A predicate to be\n *    used by the comparator to determine the order of elements.\n *\n *    Can be one of:\n *\n *    - `function`: Getter function. The result of this function will be sorted using the\n *      `<`, `=`, `>` operator.\n *    - `string`: An Angular expression which evaluates to an object to order by, such as 'name'\n *      to sort by a property called 'name'. Optionally prefixed with `+` or `-` to control\n *      ascending or descending sort order (for example, +name or -name).\n *    - `Array`: An array of function or string predicates. The first predicate in the array\n *      is used for sorting, but when two items are equivalent, the next predicate is used.\n *\n * @param {boolean=} reverse Reverse the order the array.\n * @returns {Array} Sorted copy of the source array.\n *\n * @example\n   <doc:example>\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.friends =\n               [{name:'John', phone:'555-1212', age:10},\n                {name:'Mary', phone:'555-9876', age:19},\n                {name:'Mike', phone:'555-4321', age:21},\n                {name:'Adam', phone:'555-5678', age:35},\n                {name:'Julie', phone:'555-8765', age:29}]\n           $scope.predicate = '-age';\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n         <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>\n         <hr/>\n         [ <a href=\"\" ng-click=\"predicate=''\">unsorted</a> ]\n         <table class=\"friend\">\n           <tr>\n             <th><a href=\"\" ng-click=\"predicate = 'name'; reverse=false\">Name</a>\n                 (<a href=\"\" ng-click=\"predicate = '-name'; reverse=false\">^</a>)</th>\n             <th><a href=\"\" ng-click=\"predicate = 'phone'; reverse=!reverse\">Phone Number</a></th>\n             <th><a href=\"\" ng-click=\"predicate = 'age'; reverse=!reverse\">Age</a></th>\n           </tr>\n           <tr ng-repeat=\"friend in friends | orderBy:predicate:reverse\">\n             <td>{{friend.name}}</td>\n             <td>{{friend.phone}}</td>\n             <td>{{friend.age}}</td>\n           </tr>\n         </table>\n       </div>\n     </doc:source>\n   </doc:example>\n */\norderByFilter.$inject = ['$parse'];\nfunction orderByFilter($parse){\n  return function(array, sortPredicate, reverseOrder) {\n    if (!isArray(array)) return array;\n    if (!sortPredicate) return array;\n    sortPredicate = isArray(sortPredicate) ? sortPredicate: [sortPredicate];\n    sortPredicate = map(sortPredicate, function(predicate){\n      var descending = false, get = predicate || identity;\n      if (isString(predicate)) {\n        if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {\n          descending = predicate.charAt(0) == '-';\n          predicate = predicate.substring(1);\n        }\n        get = $parse(predicate);\n      }\n      return reverseComparator(function(a,b){\n        return compare(get(a),get(b));\n      }, descending);\n    });\n    var arrayCopy = [];\n    for ( var i = 0; i < array.length; i++) { arrayCopy.push(array[i]); }\n    return arrayCopy.sort(reverseComparator(comparator, reverseOrder));\n\n    function comparator(o1, o2){\n      for ( var i = 0; i < sortPredicate.length; i++) {\n        var comp = sortPredicate[i](o1, o2);\n        if (comp !== 0) return comp;\n      }\n      return 0;\n    }\n    function reverseComparator(comp, descending) {\n      return toBoolean(descending)\n          ? function(a,b){return comp(b,a);}\n          : comp;\n    }\n    function compare(v1, v2){\n      var t1 = typeof v1;\n      var t2 = typeof v2;\n      if (t1 == t2) {\n        if (t1 == \"string\") {\n           v1 = v1.toLowerCase();\n           v2 = v2.toLowerCase();\n        }\n        if (v1 === v2) return 0;\n        return v1 < v2 ? -1 : 1;\n      } else {\n        return t1 < t2 ? -1 : 1;\n      }\n    }\n  };\n}\n\nfunction ngDirective(directive) {\n  if (isFunction(directive)) {\n    directive = {\n      link: directive\n    };\n  }\n  directive.restrict = directive.restrict || 'AC';\n  return valueFn(directive);\n}\n\n/**\n * @ngdoc directive\n * @name ng.directive:a\n * @restrict E\n *\n * @description\n * Modifies the default behavior of the html A tag so that the default action is prevented when\n * the href attribute is empty.\n *\n * This change permits the easy creation of action links with the `ngClick` directive\n * without changing the location or causing page reloads, e.g.:\n * `<a href=\"\" ng-click=\"list.addItem()\">Add Item</a>`\n */\nvar htmlAnchorDirective = valueFn({\n  restrict: 'E',\n  compile: function(element, attr) {\n\n    if (msie <= 8) {\n\n      // turn <a href ng-click=\"..\">link</a> into a stylable link in IE\n      // but only if it doesn't have name attribute, in which case it's an anchor\n      if (!attr.href && !attr.name) {\n        attr.$set('href', '');\n      }\n\n      // add a comment node to anchors to workaround IE bug that causes element content to be reset\n      // to new attribute content if attribute is updated with value containing @ and element also\n      // contains value with @\n      // see issue #1949\n      element.append(document.createComment('IE fix'));\n    }\n\n    if (!attr.href && !attr.xlinkHref && !attr.name) {\n      return function(scope, element) {\n        // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n        var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\n                   'xlink:href' : 'href';\n        element.on('click', function(event){\n          // if we have no href url, then don't navigate anywhere.\n          if (!element.attr(href)) {\n            event.preventDefault();\n          }\n        });\n      };\n    }\n  }\n});\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngHref\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in an href attribute will\n * make the link go to the wrong URL if the user clicks it before\n * Angular has a chance to replace the `{{hash}}` markup with its\n * value. Until Angular replaces the markup the link will be broken\n * and will most likely return a 404 error.\n *\n * The `ngHref` directive solves this problem.\n *\n * The wrong way to write it:\n * <pre>\n * <a href=\"http://www.gravatar.com/avatar/{{hash}}\"/>\n * </pre>\n *\n * The correct way to write it:\n * <pre>\n * <a ng-href=\"http://www.gravatar.com/avatar/{{hash}}\"/>\n * </pre>\n *\n * @element A\n * @param {template} ngHref any string which can contain `{{}}` markup.\n *\n * @example\n * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes\n * in links and their different behaviors:\n    <doc:example>\n      <doc:source>\n        <input ng-model=\"value\" /><br />\n        <a id=\"link-1\" href ng-click=\"value = 1\">link 1</a> (link, don't reload)<br />\n        <a id=\"link-2\" href=\"\" ng-click=\"value = 2\">link 2</a> (link, don't reload)<br />\n        <a id=\"link-3\" ng-href=\"/{{'123'}}\">link 3</a> (link, reload!)<br />\n        <a id=\"link-4\" href=\"\" name=\"xx\" ng-click=\"value = 4\">anchor</a> (link, don't reload)<br />\n        <a id=\"link-5\" name=\"xxx\" ng-click=\"value = 5\">anchor</a> (no link)<br />\n        <a id=\"link-6\" ng-href=\"{{value}}\">link</a> (link, change location)\n      </doc:source>\n      <doc:protractor>\n        it('should execute ng-click but not reload when href without value', function() {\n          element(by.id('link-1')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('1');\n          expect(element(by.id('link-1')).getAttribute('href')).toBe('');\n        });\n\n        it('should execute ng-click but not reload when href empty string', function() {\n          element(by.id('link-2')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('2');\n          expect(element(by.id('link-2')).getAttribute('href')).toBe('');\n        });\n\n        it('should execute ng-click and change url when ng-href specified', function() {\n          expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\\/123$/);\n\n          element(by.id('link-3')).click();\n\n          // At this point, we navigate away from an Angular page, so we need\n          // to use browser.driver to get the base webdriver.\n\n          browser.wait(function() {\n            return browser.driver.getCurrentUrl().then(function(url) {\n              return url.match(/\\/123$/);\n            });\n          }, 1000, 'page should navigate to /123');\n        });\n\n        it('should execute ng-click but not reload when href empty string and name specified', function() {\n          element(by.id('link-4')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('4');\n          expect(element(by.id('link-4')).getAttribute('href')).toBe('');\n        });\n\n        it('should execute ng-click but not reload when no href but name specified', function() {\n          element(by.id('link-5')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('5');\n          expect(element(by.id('link-5')).getAttribute('href')).toBe(null);\n        });\n\n        it('should only change url when only ng-href', function() {\n          element(by.model('value')).clear();\n          element(by.model('value')).sendKeys('6');\n          expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\\/6$/);\n\n          element(by.id('link-6')).click();\n          expect(browser.getCurrentUrl()).toMatch(/\\/6$/);\n        });\n      </doc:protractor>\n    </doc:example>\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngSrc\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `src` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrc` directive solves this problem.\n *\n * The buggy way to write it:\n * <pre>\n * <img src=\"http://www.gravatar.com/avatar/{{hash}}\"/>\n * </pre>\n *\n * The correct way to write it:\n * <pre>\n * <img ng-src=\"http://www.gravatar.com/avatar/{{hash}}\"/>\n * </pre>\n *\n * @element IMG\n * @param {template} ngSrc any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngSrcset\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrcset` directive solves this problem.\n *\n * The buggy way to write it:\n * <pre>\n * <img srcset=\"http://www.gravatar.com/avatar/{{hash}} 2x\"/>\n * </pre>\n *\n * The correct way to write it:\n * <pre>\n * <img ng-srcset=\"http://www.gravatar.com/avatar/{{hash}} 2x\"/>\n * </pre>\n *\n * @element IMG\n * @param {template} ngSrcset any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngDisabled\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * The following markup will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:\n * <pre>\n * <div ng-init=\"scope = { isDisabled: false }\">\n *  <button disabled=\"{{scope.isDisabled}}\">Disabled</button>\n * </div>\n * </pre>\n *\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as disabled. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngDisabled` directive solves this problem for the `disabled` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n *\n * @example\n    <doc:example>\n      <doc:source>\n        Click me to toggle: <input type=\"checkbox\" ng-model=\"checked\"><br/>\n        <button ng-model=\"button\" ng-disabled=\"checked\">Button</button>\n      </doc:source>\n      <doc:protractor>\n        it('should toggle button', function() {\n          expect(element(by.css('.doc-example-live button')).getAttribute('disabled')).toBeFalsy();\n          element(by.model('checked')).click();\n          expect(element(by.css('.doc-example-live button')).getAttribute('disabled')).toBeTruthy();\n        });\n      </doc:protractor>\n    </doc:example>\n *\n * @element INPUT\n * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy, \n *     then special attribute \"disabled\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngChecked\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as checked. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngChecked` directive solves this problem for the `checked` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n    <doc:example>\n      <doc:source>\n        Check me to check both: <input type=\"checkbox\" ng-model=\"master\"><br/>\n        <input id=\"checkSlave\" type=\"checkbox\" ng-checked=\"master\">\n      </doc:source>\n      <doc:protractor>\n        it('should check both checkBoxes', function() {\n          expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();\n          element(by.model('master')).click();\n          expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();\n        });\n      </doc:protractor>\n    </doc:example>\n *\n * @element INPUT\n * @param {expression} ngChecked If the {@link guide/expression expression} is truthy, \n *     then special attribute \"checked\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngReadonly\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as readonly. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngReadonly` directive solves this problem for the `readonly` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n    <doc:example>\n      <doc:source>\n        Check me to make text readonly: <input type=\"checkbox\" ng-model=\"checked\"><br/>\n        <input type=\"text\" ng-readonly=\"checked\" value=\"I'm Angular\"/>\n      </doc:source>\n      <doc:protractor>\n        it('should toggle readonly attr', function() {\n          expect(element(by.css('.doc-example-live [type=\"text\"]')).getAttribute('readonly')).toBeFalsy();\n          element(by.model('checked')).click();\n          expect(element(by.css('.doc-example-live [type=\"text\"]')).getAttribute('readonly')).toBeTruthy();\n        });\n      </doc:protractor>\n    </doc:example>\n *\n * @element INPUT\n * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy, \n *     then special attribute \"readonly\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngSelected\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as selected. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngSelected` directive solves this problem for the `selected` atttribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * \n * @example\n    <doc:example>\n      <doc:source>\n        Check me to select: <input type=\"checkbox\" ng-model=\"selected\"><br/>\n        <select>\n          <option>Hello!</option>\n          <option id=\"greet\" ng-selected=\"selected\">Greetings!</option>\n        </select>\n      </doc:source>\n      <doc:protractor>\n        it('should select Greetings!', function() {\n          expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();\n          element(by.model('selected')).click();\n          expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();\n        });\n      </doc:protractor>\n    </doc:example>\n *\n * @element OPTION\n * @param {expression} ngSelected If the {@link guide/expression expression} is truthy, \n *     then special attribute \"selected\" will be set on the element\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngOpen\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as open. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngOpen` directive solves this problem for the `open` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n     <doc:example>\n       <doc:source>\n         Check me check multiple: <input type=\"checkbox\" ng-model=\"open\"><br/>\n         <details id=\"details\" ng-open=\"open\">\n            <summary>Show/Hide me</summary>\n         </details>\n       </doc:source>\n       <doc:protractor>\n         it('should toggle open', function() {\n           expect(element(by.id('details')).getAttribute('open')).toBeFalsy();\n           element(by.model('open')).click();\n           expect(element(by.id('details')).getAttribute('open')).toBeTruthy();\n         });\n       </doc:protractor>\n     </doc:example>\n *\n * @element DETAILS\n * @param {expression} ngOpen If the {@link guide/expression expression} is truthy, \n *     then special attribute \"open\" will be set on the element\n */\n\nvar ngAttributeAliasDirectives = {};\n\n\n// boolean attrs are evaluated\nforEach(BOOLEAN_ATTR, function(propName, attrName) {\n  // binding to multiple is not supported\n  if (propName == \"multiple\") return;\n\n  var normalized = directiveNormalize('ng-' + attrName);\n  ngAttributeAliasDirectives[normalized] = function() {\n    return {\n      priority: 100,\n      link: function(scope, element, attr) {\n        scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {\n          attr.$set(attrName, !!value);\n        });\n      }\n    };\n  };\n});\n\n\n// ng-src, ng-srcset, ng-href are interpolated\nforEach(['src', 'srcset', 'href'], function(attrName) {\n  var normalized = directiveNormalize('ng-' + attrName);\n  ngAttributeAliasDirectives[normalized] = function() {\n    return {\n      priority: 99, // it needs to run after the attributes are interpolated\n      link: function(scope, element, attr) {\n        attr.$observe(normalized, function(value) {\n          if (!value)\n             return;\n\n          attr.$set(attrName, value);\n\n          // on IE, if \"ng:src\" directive declaration is used and \"src\" attribute doesn't exist\n          // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need\n          // to set the property as well to achieve the desired effect.\n          // we use attr[attrName] value since $set can sanitize the url.\n          if (msie) element.prop(attrName, attr[attrName]);\n        });\n      }\n    };\n  };\n});\n\n/* global -nullFormCtrl */\nvar nullFormCtrl = {\n  $addControl: noop,\n  $removeControl: noop,\n  $setValidity: noop,\n  $setDirty: noop,\n  $setPristine: noop\n};\n\n/**\n * @ngdoc object\n * @name ng.directive:form.FormController\n *\n * @property {boolean} $pristine True if user has not interacted with the form yet.\n * @property {boolean} $dirty True if user has already interacted with the form.\n * @property {boolean} $valid True if all of the containing forms and controls are valid.\n * @property {boolean} $invalid True if at least one containing control or form is invalid.\n *\n * @property {Object} $error Is an object hash, containing references to all invalid controls or\n *  forms, where:\n *\n *  - keys are validation tokens (error names),\n *  - values are arrays of controls or forms that are invalid for given error name.\n *\n *\n *  Built-in validation tokens:\n *\n *  - `email`\n *  - `max`\n *  - `maxlength`\n *  - `min`\n *  - `minlength`\n *  - `number`\n *  - `pattern`\n *  - `required`\n *  - `url`\n * \n * @description\n * `FormController` keeps track of all its controls and nested forms as well as state of them,\n * such as being valid/invalid or dirty/pristine.\n *\n * Each {@link ng.directive:form form} directive creates an instance\n * of `FormController`.\n *\n */\n//asks for $scope to fool the BC controller module\nFormController.$inject = ['$element', '$attrs', '$scope'];\nfunction FormController(element, attrs) {\n  var form = this,\n      parentForm = element.parent().controller('form') || nullFormCtrl,\n      invalidCount = 0, // used to easily determine if we are valid\n      errors = form.$error = {},\n      controls = [];\n\n  // init state\n  form.$name = attrs.name || attrs.ngForm;\n  form.$dirty = false;\n  form.$pristine = true;\n  form.$valid = true;\n  form.$invalid = false;\n\n  parentForm.$addControl(form);\n\n  // Setup initial state of the control\n  element.addClass(PRISTINE_CLASS);\n  toggleValidCss(true);\n\n  // convenience method for easy toggling of classes\n  function toggleValidCss(isValid, validationErrorKey) {\n    validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n    element.\n      removeClass((isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey).\n      addClass((isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);\n  }\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:form.FormController#$addControl\n   * @methodOf ng.directive:form.FormController\n   *\n   * @description\n   * Register a control with the form.\n   *\n   * Input elements using ngModelController do this automatically when they are linked.\n   */\n  form.$addControl = function(control) {\n    // Breaking change - before, inputs whose name was \"hasOwnProperty\" were quietly ignored\n    // and not added to the scope.  Now we throw an error.\n    assertNotHasOwnProperty(control.$name, 'input');\n    controls.push(control);\n\n    if (control.$name) {\n      form[control.$name] = control;\n    }\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:form.FormController#$removeControl\n   * @methodOf ng.directive:form.FormController\n   *\n   * @description\n   * Deregister a control from the form.\n   *\n   * Input elements using ngModelController do this automatically when they are destroyed.\n   */\n  form.$removeControl = function(control) {\n    if (control.$name && form[control.$name] === control) {\n      delete form[control.$name];\n    }\n    forEach(errors, function(queue, validationToken) {\n      form.$setValidity(validationToken, true, control);\n    });\n\n    arrayRemove(controls, control);\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:form.FormController#$setValidity\n   * @methodOf ng.directive:form.FormController\n   *\n   * @description\n   * Sets the validity of a form control.\n   *\n   * This method will also propagate to parent forms.\n   */\n  form.$setValidity = function(validationToken, isValid, control) {\n    var queue = errors[validationToken];\n\n    if (isValid) {\n      if (queue) {\n        arrayRemove(queue, control);\n        if (!queue.length) {\n          invalidCount--;\n          if (!invalidCount) {\n            toggleValidCss(isValid);\n            form.$valid = true;\n            form.$invalid = false;\n          }\n          errors[validationToken] = false;\n          toggleValidCss(true, validationToken);\n          parentForm.$setValidity(validationToken, true, form);\n        }\n      }\n\n    } else {\n      if (!invalidCount) {\n        toggleValidCss(isValid);\n      }\n      if (queue) {\n        if (includes(queue, control)) return;\n      } else {\n        errors[validationToken] = queue = [];\n        invalidCount++;\n        toggleValidCss(false, validationToken);\n        parentForm.$setValidity(validationToken, false, form);\n      }\n      queue.push(control);\n\n      form.$valid = false;\n      form.$invalid = true;\n    }\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:form.FormController#$setDirty\n   * @methodOf ng.directive:form.FormController\n   *\n   * @description\n   * Sets the form to a dirty state.\n   *\n   * This method can be called to add the 'ng-dirty' class and set the form to a dirty\n   * state (ng-dirty class). This method will also propagate to parent forms.\n   */\n  form.$setDirty = function() {\n    element.removeClass(PRISTINE_CLASS).addClass(DIRTY_CLASS);\n    form.$dirty = true;\n    form.$pristine = false;\n    parentForm.$setDirty();\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:form.FormController#$setPristine\n   * @methodOf ng.directive:form.FormController\n   *\n   * @description\n   * Sets the form to its pristine state.\n   *\n   * This method can be called to remove the 'ng-dirty' class and set the form to its pristine\n   * state (ng-pristine class). This method will also propagate to all the controls contained\n   * in this form.\n   *\n   * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after\n   * saving or resetting it.\n   */\n  form.$setPristine = function () {\n    element.removeClass(DIRTY_CLASS).addClass(PRISTINE_CLASS);\n    form.$dirty = false;\n    form.$pristine = true;\n    forEach(controls, function(control) {\n      control.$setPristine();\n    });\n  };\n}\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngForm\n * @restrict EAC\n *\n * @description\n * Nestable alias of {@link ng.directive:form `form`} directive. HTML\n * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a\n * sub-group of controls needs to be determined.\n *\n * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into\n *                       related scope, under this name.\n *\n */\n\n /**\n * @ngdoc directive\n * @name ng.directive:form\n * @restrict E\n *\n * @description\n * Directive that instantiates\n * {@link ng.directive:form.FormController FormController}.\n *\n * If the `name` attribute is specified, the form controller is published onto the current scope under\n * this name.\n *\n * # Alias: {@link ng.directive:ngForm `ngForm`}\n *\n * In Angular forms can be nested. This means that the outer form is valid when all of the child\n * forms are valid as well. However, browsers do not allow nesting of `<form>` elements, so\n * Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to\n * `<form>` but can be nested.  This allows you to have nested forms, which is very useful when\n * using Angular validation directives in forms that are dynamically generated using the\n * {@link ng.directive:ngRepeat `ngRepeat`} directive. Since you cannot dynamically generate the `name`\n * attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an\n * `ngForm` directive and nest these in an outer `form` element.\n *\n *\n * # CSS classes\n *  - `ng-valid` is set if the form is valid.\n *  - `ng-invalid` is set if the form is invalid.\n *  - `ng-pristine` is set if the form is pristine.\n *  - `ng-dirty` is set if the form is dirty.\n *\n *\n * # Submitting a form and preventing the default action\n *\n * Since the role of forms in client-side Angular applications is different than in classical\n * roundtrip apps, it is desirable for the browser not to translate the form submission into a full\n * page reload that sends the data to the server. Instead some javascript logic should be triggered\n * to handle the form submission in an application-specific way.\n *\n * For this reason, Angular prevents the default action (form submission to the server) unless the\n * `<form>` element has an `action` attribute specified.\n *\n * You can use one of the following two ways to specify what javascript method should be called when\n * a form is submitted:\n *\n * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element\n * - {@link ng.directive:ngClick ngClick} directive on the first\n  *  button or input field of type submit (input[type=submit])\n *\n * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}\n * or {@link ng.directive:ngClick ngClick} directives.\n * This is because of the following form submission rules in the HTML specification:\n *\n * - If a form has only one input field then hitting enter in this field triggers form submit\n * (`ngSubmit`)\n * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter\n * doesn't trigger submit\n * - if a form has one or more input fields and one or more buttons or input[type=submit] then\n * hitting enter in any of the input fields will trigger the click handler on the *first* button or\n * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)\n *\n * @param {string=} name Name of the form. If specified, the form controller will be published into\n *                       related scope, under this name.\n *\n * @example\n    <doc:example>\n      <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.userType = 'guest';\n         }\n       </script>\n       <form name=\"myForm\" ng-controller=\"Ctrl\">\n         userType: <input name=\"input\" ng-model=\"userType\" required>\n         <span class=\"error\" ng-show=\"myForm.input.$error.required\">Required!</span><br>\n         <tt>userType = {{userType}}</tt><br>\n         <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br>\n         <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br>\n         <tt>myForm.$valid = {{myForm.$valid}}</tt><br>\n         <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br>\n        </form>\n      </doc:source>\n      <doc:protractor>\n        it('should initialize to model', function() {\n          var userType = element(by.binding('userType'));\n          var valid = element(by.binding('myForm.input.$valid'));\n\n          expect(userType.getText()).toContain('guest');\n          expect(valid.getText()).toContain('true');\n        });\n\n        it('should be invalid if empty', function() {\n          var userType = element(by.binding('userType'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var userInput = element(by.model('userType'));\n\n          userInput.clear();\n          userInput.sendKeys('');\n\n          expect(userType.getText()).toEqual('userType =');\n          expect(valid.getText()).toContain('false');\n        });\n      </doc:protractor>\n    </doc:example>\n */\nvar formDirectiveFactory = function(isNgForm) {\n  return ['$timeout', function($timeout) {\n    var formDirective = {\n      name: 'form',\n      restrict: isNgForm ? 'EAC' : 'E',\n      controller: FormController,\n      compile: function() {\n        return {\n          pre: function(scope, formElement, attr, controller) {\n            if (!attr.action) {\n              // we can't use jq events because if a form is destroyed during submission the default\n              // action is not prevented. see #1238\n              //\n              // IE 9 is not affected because it doesn't fire a submit event and try to do a full\n              // page reload if the form was destroyed by submission of the form via a click handler\n              // on a button in the form. Looks like an IE9 specific bug.\n              var preventDefaultListener = function(event) {\n                event.preventDefault\n                  ? event.preventDefault()\n                  : event.returnValue = false; // IE\n              };\n\n              addEventListenerFn(formElement[0], 'submit', preventDefaultListener);\n\n              // unregister the preventDefault listener so that we don't not leak memory but in a\n              // way that will achieve the prevention of the default action.\n              formElement.on('$destroy', function() {\n                $timeout(function() {\n                  removeEventListenerFn(formElement[0], 'submit', preventDefaultListener);\n                }, 0, false);\n              });\n            }\n\n            var parentFormCtrl = formElement.parent().controller('form'),\n                alias = attr.name || attr.ngForm;\n\n            if (alias) {\n              setter(scope, alias, controller, alias);\n            }\n            if (parentFormCtrl) {\n              formElement.on('$destroy', function() {\n                parentFormCtrl.$removeControl(controller);\n                if (alias) {\n                  setter(scope, alias, undefined, alias);\n                }\n                extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards\n              });\n            }\n          }\n        };\n      }\n    };\n\n    return formDirective;\n  }];\n};\n\nvar formDirective = formDirectiveFactory();\nvar ngFormDirective = formDirectiveFactory(true);\n\n/* global\n\n    -VALID_CLASS,\n    -INVALID_CLASS,\n    -PRISTINE_CLASS,\n    -DIRTY_CLASS\n*/\n\nvar URL_REGEXP = /^(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?$/;\nvar EMAIL_REGEXP = /^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\\.[a-z0-9-]+)*$/i;\nvar NUMBER_REGEXP = /^\\s*(\\-|\\+)?(\\d+|(\\d*(\\.\\d*)))\\s*$/;\n\nvar inputType = {\n\n  /**\n   * @ngdoc inputType\n   * @name ng.directive:input.text\n   *\n   * @description\n   * Standard HTML text input with angular data binding.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} required Adds `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n   *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n   *    patterns defined as scope expressions.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n   *\n   * @example\n      <doc:example>\n        <doc:source>\n         <script>\n           function Ctrl($scope) {\n             $scope.text = 'guest';\n             $scope.word = /^\\s*\\w*\\s*$/;\n           }\n         </script>\n         <form name=\"myForm\" ng-controller=\"Ctrl\">\n           Single word: <input type=\"text\" name=\"input\" ng-model=\"text\"\n                               ng-pattern=\"word\" required ng-trim=\"false\">\n           <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n             Required!</span>\n           <span class=\"error\" ng-show=\"myForm.input.$error.pattern\">\n             Single word only!</span>\n\n           <tt>text = {{text}}</tt><br/>\n           <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n           <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n           <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n          </form>\n        </doc:source>\n        <doc:protractor>\n          var text = element(by.binding('text'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('text'));\n\n          it('should initialize to model', function() {\n            expect(text.getText()).toContain('guest');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n\n            expect(text.getText()).toEqual('text =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if multi word', function() {\n            input.clear();\n            input.sendKeys('hello world');\n\n            expect(valid.getText()).toContain('false');\n          });\n        </doc:protractor>\n      </doc:example>\n   */\n  'text': textInputType,\n\n\n  /**\n   * @ngdoc inputType\n   * @name ng.directive:input.number\n   *\n   * @description\n   * Text input with number validation and transformation. Sets the `number` validation\n   * error if not a valid number.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n   * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n   * @param {string=} required Sets `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n   *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n   *    patterns defined as scope expressions.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <doc:example>\n        <doc:source>\n         <script>\n           function Ctrl($scope) {\n             $scope.value = 12;\n           }\n         </script>\n         <form name=\"myForm\" ng-controller=\"Ctrl\">\n           Number: <input type=\"number\" name=\"input\" ng-model=\"value\"\n                          min=\"0\" max=\"99\" required>\n           <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n             Required!</span>\n           <span class=\"error\" ng-show=\"myForm.input.$error.number\">\n             Not valid number!</span>\n           <tt>value = {{value}}</tt><br/>\n           <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n           <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n           <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n          </form>\n        </doc:source>\n        <doc:protractor>\n          var value = element(by.binding('value'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('value'));\n\n          it('should initialize to model', function() {\n            expect(value.getText()).toContain('12');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n            expect(value.getText()).toEqual('value =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if over max', function() {\n            input.clear();\n            input.sendKeys('123');\n            expect(value.getText()).toEqual('value =');\n            expect(valid.getText()).toContain('false');\n          });\n        </doc:protractor>\n      </doc:example>\n   */\n  'number': numberInputType,\n\n\n  /**\n   * @ngdoc inputType\n   * @name ng.directive:input.url\n   *\n   * @description\n   * Text input with URL validation. Sets the `url` validation error key if the content is not a\n   * valid URL.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} required Sets `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n   *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n   *    patterns defined as scope expressions.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <doc:example>\n        <doc:source>\n         <script>\n           function Ctrl($scope) {\n             $scope.text = 'http://google.com';\n           }\n         </script>\n         <form name=\"myForm\" ng-controller=\"Ctrl\">\n           URL: <input type=\"url\" name=\"input\" ng-model=\"text\" required>\n           <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n             Required!</span>\n           <span class=\"error\" ng-show=\"myForm.input.$error.url\">\n             Not valid url!</span>\n           <tt>text = {{text}}</tt><br/>\n           <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n           <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n           <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n           <tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/>\n          </form>\n        </doc:source>\n        <doc:protractor>\n          var text = element(by.binding('text'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('text'));\n\n          it('should initialize to model', function() {\n            expect(text.getText()).toContain('http://google.com');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n\n            expect(text.getText()).toEqual('text =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if not url', function() {\n            input.clear();\n            input.sendKeys('box');\n\n            expect(valid.getText()).toContain('false');\n          });\n        </doc:protractor>\n      </doc:example>\n   */\n  'url': urlInputType,\n\n\n  /**\n   * @ngdoc inputType\n   * @name ng.directive:input.email\n   *\n   * @description\n   * Text input with email validation. Sets the `email` validation error key if not a valid email\n   * address.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} required Sets `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n   *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n   *    patterns defined as scope expressions.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <doc:example>\n        <doc:source>\n         <script>\n           function Ctrl($scope) {\n             $scope.text = 'me@example.com';\n           }\n         </script>\n           <form name=\"myForm\" ng-controller=\"Ctrl\">\n             Email: <input type=\"email\" name=\"input\" ng-model=\"text\" required>\n             <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n               Required!</span>\n             <span class=\"error\" ng-show=\"myForm.input.$error.email\">\n               Not valid email!</span>\n             <tt>text = {{text}}</tt><br/>\n             <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n             <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n             <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n             <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n             <tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/>\n           </form>\n        </doc:source>\n        <doc:protractor>\n          var text = element(by.binding('text'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('text'));\n          \n          it('should initialize to model', function() {\n            expect(text.getText()).toContain('me@example.com');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n            expect(text.getText()).toEqual('text =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if not email', function() {\n            input.clear();\n            input.sendKeys('xxx');\n\n            expect(valid.getText()).toContain('false');\n          });\n        </doc:protractor>\n      </doc:example>\n   */\n  'email': emailInputType,\n\n\n  /**\n   * @ngdoc inputType\n   * @name ng.directive:input.radio\n   *\n   * @description\n   * HTML radio button.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string} value The value to which the expression should be set when selected.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   * @param {string} ngValue Angular expression which sets the value to which the expression should\n   *    be set when selected.\n   *\n   * @example\n      <doc:example>\n        <doc:source>\n         <script>\n           function Ctrl($scope) {\n             $scope.color = 'blue';\n             $scope.specialValue = {\n               \"id\": \"12345\",\n               \"value\": \"green\"\n             };\n           }\n         </script>\n         <form name=\"myForm\" ng-controller=\"Ctrl\">\n           <input type=\"radio\" ng-model=\"color\" value=\"red\">  Red <br/>\n           <input type=\"radio\" ng-model=\"color\" ng-value=\"specialValue\"> Green <br/>\n           <input type=\"radio\" ng-model=\"color\" value=\"blue\"> Blue <br/>\n           <tt>color = {{color | json}}</tt><br/>\n          </form>\n          Note that `ng-value=\"specialValue\"` sets radio item's value to be the value of `$scope.specialValue`.\n        </doc:source>\n        <doc:protractor>\n          it('should change state', function() {\n            var color = element(by.binding('color'));\n\n            expect(color.getText()).toContain('blue');\n\n            element.all(by.model('color')).get(0).click();\n\n            expect(color.getText()).toContain('red');\n          });\n        </doc:protractor>\n      </doc:example>\n   */\n  'radio': radioInputType,\n\n\n  /**\n   * @ngdoc inputType\n   * @name ng.directive:input.checkbox\n   *\n   * @description\n   * HTML checkbox.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} ngTrueValue The value to which the expression should be set when selected.\n   * @param {string=} ngFalseValue The value to which the expression should be set when not selected.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <doc:example>\n        <doc:source>\n         <script>\n           function Ctrl($scope) {\n             $scope.value1 = true;\n             $scope.value2 = 'YES'\n           }\n         </script>\n         <form name=\"myForm\" ng-controller=\"Ctrl\">\n           Value1: <input type=\"checkbox\" ng-model=\"value1\"> <br/>\n           Value2: <input type=\"checkbox\" ng-model=\"value2\"\n                          ng-true-value=\"YES\" ng-false-value=\"NO\"> <br/>\n           <tt>value1 = {{value1}}</tt><br/>\n           <tt>value2 = {{value2}}</tt><br/>\n          </form>\n        </doc:source>\n        <doc:protractor>\n          it('should change state', function() {\n            var value1 = element(by.binding('value1'));\n            var value2 = element(by.binding('value2'));\n\n            expect(value1.getText()).toContain('true');\n            expect(value2.getText()).toContain('YES');\n            \n            element(by.model('value1')).click();\n            element(by.model('value2')).click();\n\n            expect(value1.getText()).toContain('false');\n            expect(value2.getText()).toContain('NO');\n          });\n        </doc:protractor>\n      </doc:example>\n   */\n  'checkbox': checkboxInputType,\n\n  'hidden': noop,\n  'button': noop,\n  'submit': noop,\n  'reset': noop\n};\n\n// A helper function to call $setValidity and return the value / undefined,\n// a pattern that is repeated a lot in the input validation logic.\nfunction validate(ctrl, validatorName, validity, value){\n  ctrl.$setValidity(validatorName, validity);\n  return validity ? value : undefined;\n}\n\nfunction textInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  // In composition mode, users are still inputing intermediate text buffer,\n  // hold the listener until composition is done.\n  // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent\n  if (!$sniffer.android) {\n    var composing = false;\n\n    element.on('compositionstart', function(data) {\n      composing = true;\n    });\n\n    element.on('compositionend', function() {\n      composing = false;\n    });\n  }\n\n  var listener = function() {\n    if (composing) return;\n    var value = element.val();\n\n    // By default we will trim the value\n    // If the attribute ng-trim exists we will avoid trimming\n    // e.g. <input ng-model=\"foo\" ng-trim=\"false\">\n    if (toBoolean(attr.ngTrim || 'T')) {\n      value = trim(value);\n    }\n\n    if (ctrl.$viewValue !== value) {\n      if (scope.$$phase) {\n        ctrl.$setViewValue(value);\n      } else {\n        scope.$apply(function() {\n          ctrl.$setViewValue(value);\n        });\n      }\n    }\n  };\n\n  // if the browser does support \"input\" event, we are fine - except on IE9 which doesn't fire the\n  // input event on backspace, delete or cut\n  if ($sniffer.hasEvent('input')) {\n    element.on('input', listener);\n  } else {\n    var timeout;\n\n    var deferListener = function() {\n      if (!timeout) {\n        timeout = $browser.defer(function() {\n          listener();\n          timeout = null;\n        });\n      }\n    };\n\n    element.on('keydown', function(event) {\n      var key = event.keyCode;\n\n      // ignore\n      //    command            modifiers                   arrows\n      if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return;\n\n      deferListener();\n    });\n\n    // if user modifies input value using context menu in IE, we need \"paste\" and \"cut\" events to catch it\n    if ($sniffer.hasEvent('paste')) {\n      element.on('paste cut', deferListener);\n    }\n  }\n\n  // if user paste into input using mouse on older browser\n  // or form autocomplete on newer browser, we need \"change\" event to catch it\n  element.on('change', listener);\n\n  ctrl.$render = function() {\n    element.val(ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue);\n  };\n\n  // pattern validator\n  var pattern = attr.ngPattern,\n      patternValidator,\n      match;\n\n  if (pattern) {\n    var validateRegex = function(regexp, value) {\n      return validate(ctrl, 'pattern', ctrl.$isEmpty(value) || regexp.test(value), value);\n    };\n    match = pattern.match(/^\\/(.*)\\/([gim]*)$/);\n    if (match) {\n      pattern = new RegExp(match[1], match[2]);\n      patternValidator = function(value) {\n        return validateRegex(pattern, value);\n      };\n    } else {\n      patternValidator = function(value) {\n        var patternObj = scope.$eval(pattern);\n\n        if (!patternObj || !patternObj.test) {\n          throw minErr('ngPattern')('noregexp',\n            'Expected {0} to be a RegExp but was {1}. Element: {2}', pattern,\n            patternObj, startingTag(element));\n        }\n        return validateRegex(patternObj, value);\n      };\n    }\n\n    ctrl.$formatters.push(patternValidator);\n    ctrl.$parsers.push(patternValidator);\n  }\n\n  // min length validator\n  if (attr.ngMinlength) {\n    var minlength = int(attr.ngMinlength);\n    var minLengthValidator = function(value) {\n      return validate(ctrl, 'minlength', ctrl.$isEmpty(value) || value.length >= minlength, value);\n    };\n\n    ctrl.$parsers.push(minLengthValidator);\n    ctrl.$formatters.push(minLengthValidator);\n  }\n\n  // max length validator\n  if (attr.ngMaxlength) {\n    var maxlength = int(attr.ngMaxlength);\n    var maxLengthValidator = function(value) {\n      return validate(ctrl, 'maxlength', ctrl.$isEmpty(value) || value.length <= maxlength, value);\n    };\n\n    ctrl.$parsers.push(maxLengthValidator);\n    ctrl.$formatters.push(maxLengthValidator);\n  }\n}\n\nfunction numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  textInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n  ctrl.$parsers.push(function(value) {\n    var empty = ctrl.$isEmpty(value);\n    if (empty || NUMBER_REGEXP.test(value)) {\n      ctrl.$setValidity('number', true);\n      return value === '' ? null : (empty ? value : parseFloat(value));\n    } else {\n      ctrl.$setValidity('number', false);\n      return undefined;\n    }\n  });\n\n  ctrl.$formatters.push(function(value) {\n    return ctrl.$isEmpty(value) ? '' : '' + value;\n  });\n\n  if (attr.min) {\n    var minValidator = function(value) {\n      var min = parseFloat(attr.min);\n      return validate(ctrl, 'min', ctrl.$isEmpty(value) || value >= min, value);\n    };\n\n    ctrl.$parsers.push(minValidator);\n    ctrl.$formatters.push(minValidator);\n  }\n\n  if (attr.max) {\n    var maxValidator = function(value) {\n      var max = parseFloat(attr.max);\n      return validate(ctrl, 'max', ctrl.$isEmpty(value) || value <= max, value);\n    };\n\n    ctrl.$parsers.push(maxValidator);\n    ctrl.$formatters.push(maxValidator);\n  }\n\n  ctrl.$formatters.push(function(value) {\n    return validate(ctrl, 'number', ctrl.$isEmpty(value) || isNumber(value), value);\n  });\n}\n\nfunction urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  textInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n  var urlValidator = function(value) {\n    return validate(ctrl, 'url', ctrl.$isEmpty(value) || URL_REGEXP.test(value), value);\n  };\n\n  ctrl.$formatters.push(urlValidator);\n  ctrl.$parsers.push(urlValidator);\n}\n\nfunction emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  textInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n  var emailValidator = function(value) {\n    return validate(ctrl, 'email', ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value), value);\n  };\n\n  ctrl.$formatters.push(emailValidator);\n  ctrl.$parsers.push(emailValidator);\n}\n\nfunction radioInputType(scope, element, attr, ctrl) {\n  // make the name unique, if not defined\n  if (isUndefined(attr.name)) {\n    element.attr('name', nextUid());\n  }\n\n  element.on('click', function() {\n    if (element[0].checked) {\n      scope.$apply(function() {\n        ctrl.$setViewValue(attr.value);\n      });\n    }\n  });\n\n  ctrl.$render = function() {\n    var value = attr.value;\n    element[0].checked = (value == ctrl.$viewValue);\n  };\n\n  attr.$observe('value', ctrl.$render);\n}\n\nfunction checkboxInputType(scope, element, attr, ctrl) {\n  var trueValue = attr.ngTrueValue,\n      falseValue = attr.ngFalseValue;\n\n  if (!isString(trueValue)) trueValue = true;\n  if (!isString(falseValue)) falseValue = false;\n\n  element.on('click', function() {\n    scope.$apply(function() {\n      ctrl.$setViewValue(element[0].checked);\n    });\n  });\n\n  ctrl.$render = function() {\n    element[0].checked = ctrl.$viewValue;\n  };\n\n  // Override the standard `$isEmpty` because a value of `false` means empty in a checkbox.\n  ctrl.$isEmpty = function(value) {\n    return value !== trueValue;\n  };\n\n  ctrl.$formatters.push(function(value) {\n    return value === trueValue;\n  });\n\n  ctrl.$parsers.push(function(value) {\n    return value ? trueValue : falseValue;\n  });\n}\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:textarea\n * @restrict E\n *\n * @description\n * HTML textarea element control with angular data-binding. The data-binding and validation\n * properties of this element are exactly the same as those of the\n * {@link ng.directive:input input element}.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n *    `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n *    minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n *    maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n *    patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n *    interaction with the input element.\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:input\n * @restrict E\n *\n * @description\n * HTML input element control with angular data-binding. Input control follows HTML5 input types\n * and polyfills the HTML5 validation behavior for older browsers.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {boolean=} ngRequired Sets `required` attribute if set to true\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n *    minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n *    maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n *    patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n *    interaction with the input element.\n *\n * @example\n    <doc:example>\n      <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.user = {name: 'guest', last: 'visitor'};\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n         <form name=\"myForm\">\n           User name: <input type=\"text\" name=\"userName\" ng-model=\"user.name\" required>\n           <span class=\"error\" ng-show=\"myForm.userName.$error.required\">\n             Required!</span><br>\n           Last name: <input type=\"text\" name=\"lastName\" ng-model=\"user.last\"\n             ng-minlength=\"3\" ng-maxlength=\"10\">\n           <span class=\"error\" ng-show=\"myForm.lastName.$error.minlength\">\n             Too short!</span>\n           <span class=\"error\" ng-show=\"myForm.lastName.$error.maxlength\">\n             Too long!</span><br>\n         </form>\n         <hr>\n         <tt>user = {{user}}</tt><br/>\n         <tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br>\n         <tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br>\n         <tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br>\n         <tt>myForm.lastName.$error = {{myForm.lastName.$error}}</tt><br>\n         <tt>myForm.$valid = {{myForm.$valid}}</tt><br>\n         <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br>\n         <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br>\n         <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br>\n       </div>\n      </doc:source>\n      <doc:protractor>\n        var user = element(by.binding('{{user}}'));\n        var userNameValid = element(by.binding('myForm.userName.$valid'));\n        var lastNameValid = element(by.binding('myForm.lastName.$valid'));\n        var lastNameError = element(by.binding('myForm.lastName.$error'));\n        var formValid = element(by.binding('myForm.$valid'));\n        var userNameInput = element(by.model('user.name'));\n        var userLastInput = element(by.model('user.last'));\n\n        it('should initialize to model', function() {\n          expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"visitor\"}');\n          expect(userNameValid.getText()).toContain('true');\n          expect(formValid.getText()).toContain('true');\n        });\n\n        it('should be invalid if empty when required', function() {\n          userNameInput.clear();\n          userNameInput.sendKeys('');\n\n          expect(user.getText()).toContain('{\"last\":\"visitor\"}');\n          expect(userNameValid.getText()).toContain('false');\n          expect(formValid.getText()).toContain('false');\n        });\n\n        it('should be valid if empty when min length is set', function() {\n          userLastInput.clear();\n          userLastInput.sendKeys('');\n\n          expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"\"}');\n          expect(lastNameValid.getText()).toContain('true');\n          expect(formValid.getText()).toContain('true');\n        });\n\n        it('should be invalid if less than required min length', function() {\n          userLastInput.clear();\n          userLastInput.sendKeys('xx');\n\n          expect(user.getText()).toContain('{\"name\":\"guest\"}');\n          expect(lastNameValid.getText()).toContain('false');\n          expect(lastNameError.getText()).toContain('minlength');\n          expect(formValid.getText()).toContain('false');\n        });\n\n        it('should be invalid if longer than max length', function() {\n          userLastInput.clear();\n          userLastInput.sendKeys('some ridiculously long name');\n\n          expect(user.getText()).toContain('{\"name\":\"guest\"}');\n          expect(lastNameValid.getText()).toContain('false');\n          expect(lastNameError.getText()).toContain('maxlength');\n          expect(formValid.getText()).toContain('false');\n        });\n      </doc:protractor>\n    </doc:example>\n */\nvar inputDirective = ['$browser', '$sniffer', function($browser, $sniffer) {\n  return {\n    restrict: 'E',\n    require: '?ngModel',\n    link: function(scope, element, attr, ctrl) {\n      if (ctrl) {\n        (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrl, $sniffer,\n                                                            $browser);\n      }\n    }\n  };\n}];\n\nvar VALID_CLASS = 'ng-valid',\n    INVALID_CLASS = 'ng-invalid',\n    PRISTINE_CLASS = 'ng-pristine',\n    DIRTY_CLASS = 'ng-dirty';\n\n/**\n * @ngdoc object\n * @name ng.directive:ngModel.NgModelController\n *\n * @property {string} $viewValue Actual string value in the view.\n * @property {*} $modelValue The value in the model, that the control is bound to.\n * @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever\n       the control reads value from the DOM.  Each function is called, in turn, passing the value\n       through to the next. Used to sanitize / convert the value as well as validation.\n       For validation, the parsers should update the validity state using\n       {@link ng.directive:ngModel.NgModelController#methods_$setValidity $setValidity()},\n       and return `undefined` for invalid values.\n\n *\n * @property {Array.<Function>} $formatters Array of functions to execute, as a pipeline, whenever\n       the model value changes. Each function is called, in turn, passing the value through to the\n       next. Used to format / convert values for display in the control and validation.\n *      <pre>\n *      function formatter(value) {\n *        if (value) {\n *          return value.toUpperCase();\n *        }\n *      }\n *      ngModel.$formatters.push(formatter);\n *      </pre>\n *\n * @property {Array.<Function>} $viewChangeListeners Array of functions to execute whenever the\n *     view value has changed. It is called with no arguments, and its return value is ignored.\n *     This can be used in place of additional $watches against the model value.\n *\n * @property {Object} $error An object hash with all errors as keys.\n *\n * @property {boolean} $pristine True if user has not interacted with the control yet.\n * @property {boolean} $dirty True if user has already interacted with the control.\n * @property {boolean} $valid True if there is no error.\n * @property {boolean} $invalid True if at least one error on the control.\n *\n * @description\n *\n * `NgModelController` provides API for the `ng-model` directive. The controller contains\n * services for data-binding, validation, CSS updates, and value formatting and parsing. It\n * purposefully does not contain any logic which deals with DOM rendering or listening to\n * DOM events. Such DOM related logic should be provided by other directives which make use of\n * `NgModelController` for data-binding.\n *\n * ## Custom Control Example\n * This example shows how to use `NgModelController` with a custom control to achieve\n * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)\n * collaborate together to achieve the desired result.\n *\n * Note that `contenteditable` is an HTML5 attribute, which tells the browser to let the element\n * contents be edited in place by the user.  This will not work on older browsers.\n *\n * <example module=\"customControl\">\n    <file name=\"style.css\">\n      [contenteditable] {\n        border: 1px solid black;\n        background-color: white;\n        min-height: 20px;\n      }\n\n      .ng-invalid {\n        border: 1px solid red;\n      }\n\n    </file>\n    <file name=\"script.js\">\n      angular.module('customControl', []).\n        directive('contenteditable', function() {\n          return {\n            restrict: 'A', // only activate on element attribute\n            require: '?ngModel', // get a hold of NgModelController\n            link: function(scope, element, attrs, ngModel) {\n              if(!ngModel) return; // do nothing if no ng-model\n\n              // Specify how UI should be updated\n              ngModel.$render = function() {\n                element.html(ngModel.$viewValue || '');\n              };\n\n              // Listen for change events to enable binding\n              element.on('blur keyup change', function() {\n                scope.$apply(read);\n              });\n              read(); // initialize\n\n              // Write data to the model\n              function read() {\n                var html = element.html();\n                // When we clear the content editable the browser leaves a <br> behind\n                // If strip-br attribute is provided then we strip this out\n                if( attrs.stripBr && html == '<br>' ) {\n                  html = '';\n                }\n                ngModel.$setViewValue(html);\n              }\n            }\n          };\n        });\n    </file>\n    <file name=\"index.html\">\n      <form name=\"myForm\">\n       <div contenteditable\n            name=\"myWidget\" ng-model=\"userContent\"\n            strip-br=\"true\"\n            required>Change me!</div>\n        <span ng-show=\"myForm.myWidget.$error.required\">Required!</span>\n       <hr>\n       <textarea ng-model=\"userContent\"></textarea>\n      </form>\n    </file>\n    <file name=\"protractorTest.js\">\n      it('should data-bind and become invalid', function() {\n        if (browser.params.browser = 'safari') {\n          // SafariDriver can't handle contenteditable.\n          return;\n        };\n        var contentEditable = element(by.css('.doc-example-live [contenteditable]'));\n\n        expect(contentEditable.getText()).toEqual('Change me!');\n\n        // Firefox driver doesn't trigger the proper events on 'clear', so do this hack\n        contentEditable.click();\n        contentEditable.sendKeys(protractor.Key.chord(protractor.Key.COMMAND, \"a\"));\n        contentEditable.sendKeys(protractor.Key.BACK_SPACE);\n\n        expect(contentEditable.getText()).toEqual('');\n        expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);\n      });\n    </file>\n * </example>\n *\n *\n */\nvar NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse',\n    function($scope, $exceptionHandler, $attr, $element, $parse) {\n  this.$viewValue = Number.NaN;\n  this.$modelValue = Number.NaN;\n  this.$parsers = [];\n  this.$formatters = [];\n  this.$viewChangeListeners = [];\n  this.$pristine = true;\n  this.$dirty = false;\n  this.$valid = true;\n  this.$invalid = false;\n  this.$name = $attr.name;\n\n  var ngModelGet = $parse($attr.ngModel),\n      ngModelSet = ngModelGet.assign;\n\n  if (!ngModelSet) {\n    throw minErr('ngModel')('nonassign', \"Expression '{0}' is non-assignable. Element: {1}\",\n        $attr.ngModel, startingTag($element));\n  }\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:ngModel.NgModelController#$render\n   * @methodOf ng.directive:ngModel.NgModelController\n   *\n   * @description\n   * Called when the view needs to be updated. It is expected that the user of the ng-model\n   * directive will implement this method.\n   */\n  this.$render = noop;\n\n  /**\n   * @ngdoc function\n   * @name { ng.directive:ngModel.NgModelController#$isEmpty\n   * @methodOf ng.directive:ngModel.NgModelController\n   *\n   * @description\n   * This is called when we need to determine if the value of the input is empty.\n   *\n   * For instance, the required directive does this to work out if the input has data or not.\n   * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.\n   *\n   * You can override this for input directives whose concept of being empty is different to the\n   * default. The `checkboxInputType` directive does this because in its case a value of `false`\n   * implies empty.\n   */\n  this.$isEmpty = function(value) {\n    return isUndefined(value) || value === '' || value === null || value !== value;\n  };\n\n  var parentForm = $element.inheritedData('$formController') || nullFormCtrl,\n      invalidCount = 0, // used to easily determine if we are valid\n      $error = this.$error = {}; // keep invalid keys here\n\n\n  // Setup initial state of the control\n  $element.addClass(PRISTINE_CLASS);\n  toggleValidCss(true);\n\n  // convenience method for easy toggling of classes\n  function toggleValidCss(isValid, validationErrorKey) {\n    validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n    $element.\n      removeClass((isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey).\n      addClass((isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);\n  }\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:ngModel.NgModelController#$setValidity\n   * @methodOf ng.directive:ngModel.NgModelController\n   *\n   * @description\n   * Change the validity state, and notifies the form when the control changes validity. (i.e. it\n   * does not notify form if given validator is already marked as invalid).\n   *\n   * This method should be called by validators - i.e. the parser or formatter functions.\n   *\n   * @param {string} validationErrorKey Name of the validator. the `validationErrorKey` will assign\n   *        to `$error[validationErrorKey]=isValid` so that it is available for data-binding.\n   *        The `validationErrorKey` should be in camelCase and will get converted into dash-case\n   *        for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`\n   *        class and can be bound to as  `{{someForm.someControl.$error.myError}}` .\n   * @param {boolean} isValid Whether the current state is valid (true) or invalid (false).\n   */\n  this.$setValidity = function(validationErrorKey, isValid) {\n    // Purposeful use of ! here to cast isValid to boolean in case it is undefined\n    // jshint -W018\n    if ($error[validationErrorKey] === !isValid) return;\n    // jshint +W018\n\n    if (isValid) {\n      if ($error[validationErrorKey]) invalidCount--;\n      if (!invalidCount) {\n        toggleValidCss(true);\n        this.$valid = true;\n        this.$invalid = false;\n      }\n    } else {\n      toggleValidCss(false);\n      this.$invalid = true;\n      this.$valid = false;\n      invalidCount++;\n    }\n\n    $error[validationErrorKey] = !isValid;\n    toggleValidCss(isValid, validationErrorKey);\n\n    parentForm.$setValidity(validationErrorKey, isValid, this);\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:ngModel.NgModelController#$setPristine\n   * @methodOf ng.directive:ngModel.NgModelController\n   *\n   * @description\n   * Sets the control to its pristine state.\n   *\n   * This method can be called to remove the 'ng-dirty' class and set the control to its pristine\n   * state (ng-pristine class).\n   */\n  this.$setPristine = function () {\n    this.$dirty = false;\n    this.$pristine = true;\n    $element.removeClass(DIRTY_CLASS).addClass(PRISTINE_CLASS);\n  };\n\n  /**\n   * @ngdoc function\n   * @name ng.directive:ngModel.NgModelController#$setViewValue\n   * @methodOf ng.directive:ngModel.NgModelController\n   *\n   * @description\n   * Update the view value.\n   *\n   * This method should be called when the view value changes, typically from within a DOM event handler.\n   * For example {@link ng.directive:input input} and\n   * {@link ng.directive:select select} directives call it.\n   *\n   * It will update the $viewValue, then pass this value through each of the functions in `$parsers`,\n   * which includes any validators. The value that comes out of this `$parsers` pipeline, be applied to\n   * `$modelValue` and the **expression** specified in the `ng-model` attribute.\n   *\n   * Lastly, all the registered change listeners, in the `$viewChangeListeners` list, are called.\n   *\n   * Note that calling this function does not trigger a `$digest`.\n   *\n   * @param {string} value Value from the view.\n   */\n  this.$setViewValue = function(value) {\n    this.$viewValue = value;\n\n    // change to dirty\n    if (this.$pristine) {\n      this.$dirty = true;\n      this.$pristine = false;\n      $element.removeClass(PRISTINE_CLASS).addClass(DIRTY_CLASS);\n      parentForm.$setDirty();\n    }\n\n    forEach(this.$parsers, function(fn) {\n      value = fn(value);\n    });\n\n    if (this.$modelValue !== value) {\n      this.$modelValue = value;\n      ngModelSet($scope, value);\n      forEach(this.$viewChangeListeners, function(listener) {\n        try {\n          listener();\n        } catch(e) {\n          $exceptionHandler(e);\n        }\n      });\n    }\n  };\n\n  // model -> value\n  var ctrl = this;\n\n  $scope.$watch(function ngModelWatch() {\n    var value = ngModelGet($scope);\n\n    // if scope model value and ngModel value are out of sync\n    if (ctrl.$modelValue !== value) {\n\n      var formatters = ctrl.$formatters,\n          idx = formatters.length;\n\n      ctrl.$modelValue = value;\n      while(idx--) {\n        value = formatters[idx](value);\n      }\n\n      if (ctrl.$viewValue !== value) {\n        ctrl.$viewValue = value;\n        ctrl.$render();\n      }\n    }\n\n    return value;\n  });\n}];\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngModel\n *\n * @element input\n *\n * @description\n * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a\n * property on the scope using {@link ng.directive:ngModel.NgModelController NgModelController},\n * which is created and exposed by this directive.\n *\n * `ngModel` is responsible for:\n *\n * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`\n *   require.\n * - Providing validation behavior (i.e. required, number, email, url).\n * - Keeping the state of the control (valid/invalid, dirty/pristine, validation errors).\n * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`).\n * - Registering the control with its parent {@link ng.directive:form form}.\n *\n * Note: `ngModel` will try to bind to the property given by evaluating the expression on the\n * current scope. If the property doesn't already exist on this scope, it will be created\n * implicitly and added to the scope.\n *\n * For best practices on using `ngModel`, see:\n *\n *  - {@link https://github.com/angular/angular.js/wiki/Understanding-Scopes}\n *\n * For basic examples, how to use `ngModel`, see:\n *\n *  - {@link ng.directive:input input}\n *    - {@link ng.directive:input.text text}\n *    - {@link ng.directive:input.checkbox checkbox}\n *    - {@link ng.directive:input.radio radio}\n *    - {@link ng.directive:input.number number}\n *    - {@link ng.directive:input.email email}\n *    - {@link ng.directive:input.url url}\n *  - {@link ng.directive:select select}\n *  - {@link ng.directive:textarea textarea}\n *\n */\nvar ngModelDirective = function() {\n  return {\n    require: ['ngModel', '^?form'],\n    controller: NgModelController,\n    link: function(scope, element, attr, ctrls) {\n      // notify others, especially parent forms\n\n      var modelCtrl = ctrls[0],\n          formCtrl = ctrls[1] || nullFormCtrl;\n\n      formCtrl.$addControl(modelCtrl);\n\n      scope.$on('$destroy', function() {\n        formCtrl.$removeControl(modelCtrl);\n      });\n    }\n  };\n};\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngChange\n *\n * @description\n * Evaluate the given expression when the user changes the input.\n * The expression is evaluated immediately, unlike the JavaScript onchange event\n * which only triggers at the end of a change (usually, when the user leaves the\n * form element or presses the return key).\n * The expression is not evaluated when the value change is coming from the model.\n *\n * Note, this directive requires `ngModel` to be present.\n *\n * @element input\n * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change\n * in input value.\n *\n * @example\n * <doc:example>\n *   <doc:source>\n *     <script>\n *       function Controller($scope) {\n *         $scope.counter = 0;\n *         $scope.change = function() {\n *           $scope.counter++;\n *         };\n *       }\n *     </script>\n *     <div ng-controller=\"Controller\">\n *       <input type=\"checkbox\" ng-model=\"confirmed\" ng-change=\"change()\" id=\"ng-change-example1\" />\n *       <input type=\"checkbox\" ng-model=\"confirmed\" id=\"ng-change-example2\" />\n *       <label for=\"ng-change-example2\">Confirmed</label><br />\n *       <tt>debug = {{confirmed}}</tt><br/>\n *       <tt>counter = {{counter}}</tt><br/>\n *     </div>\n *   </doc:source>\n *   <doc:protractor>\n *     var counter = element(by.binding('counter'));\n *     var debug = element(by.binding('confirmed'));\n *\n *     it('should evaluate the expression if changing from view', function() {\n *       expect(counter.getText()).toContain('0');\n *\n *       element(by.id('ng-change-example1')).click();\n *\n *       expect(counter.getText()).toContain('1');\n *       expect(debug.getText()).toContain('true');\n *     });\n *\n *     it('should not evaluate the expression if changing from model', function() {\n *       element(by.id('ng-change-example2')).click();\n\n *       expect(counter.getText()).toContain('0');\n *       expect(debug.getText()).toContain('true');\n *     });\n *   </doc:protractor>\n * </doc:example>\n */\nvar ngChangeDirective = valueFn({\n  require: 'ngModel',\n  link: function(scope, element, attr, ctrl) {\n    ctrl.$viewChangeListeners.push(function() {\n      scope.$eval(attr.ngChange);\n    });\n  }\n});\n\n\nvar requiredDirective = function() {\n  return {\n    require: '?ngModel',\n    link: function(scope, elm, attr, ctrl) {\n      if (!ctrl) return;\n      attr.required = true; // force truthy in case we are on non input element\n\n      var validator = function(value) {\n        if (attr.required && ctrl.$isEmpty(value)) {\n          ctrl.$setValidity('required', false);\n          return;\n        } else {\n          ctrl.$setValidity('required', true);\n          return value;\n        }\n      };\n\n      ctrl.$formatters.push(validator);\n      ctrl.$parsers.unshift(validator);\n\n      attr.$observe('required', function() {\n        validator(ctrl.$viewValue);\n      });\n    }\n  };\n};\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngList\n *\n * @description\n * Text input that converts between a delimited string and an array of strings. The delimiter\n * can be a fixed string (by default a comma) or a regular expression.\n *\n * @element input\n * @param {string=} ngList optional delimiter that should be used to split the value. If\n *   specified in form `/something/` then the value will be converted into a regular expression.\n *\n * @example\n    <doc:example>\n      <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.names = ['igor', 'misko', 'vojta'];\n         }\n       </script>\n       <form name=\"myForm\" ng-controller=\"Ctrl\">\n         List: <input name=\"namesInput\" ng-model=\"names\" ng-list required>\n         <span class=\"error\" ng-show=\"myForm.namesInput.$error.required\">\n           Required!</span>\n         <br>\n         <tt>names = {{names}}</tt><br/>\n         <tt>myForm.namesInput.$valid = {{myForm.namesInput.$valid}}</tt><br/>\n         <tt>myForm.namesInput.$error = {{myForm.namesInput.$error}}</tt><br/>\n         <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n         <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n        </form>\n      </doc:source>\n      <doc:protractor>\n        var listInput = element(by.model('names'));\n        var names = element(by.binding('{{names}}'));\n        var valid = element(by.binding('myForm.namesInput.$valid'));\n        var error = element(by.css('span.error'));\n\n        it('should initialize to model', function() {\n          expect(names.getText()).toContain('[\"igor\",\"misko\",\"vojta\"]');\n          expect(valid.getText()).toContain('true');\n          expect(error.getCssValue('display')).toBe('none');\n        });\n\n        it('should be invalid if empty', function() {\n          listInput.clear();\n          listInput.sendKeys('');\n\n          expect(names.getText()).toContain('');\n          expect(valid.getText()).toContain('false');\n          expect(error.getCssValue('display')).not.toBe('none');        });\n      </doc:protractor>\n    </doc:example>\n */\nvar ngListDirective = function() {\n  return {\n    require: 'ngModel',\n    link: function(scope, element, attr, ctrl) {\n      var match = /\\/(.*)\\//.exec(attr.ngList),\n          separator = match && new RegExp(match[1]) || attr.ngList || ',';\n\n      var parse = function(viewValue) {\n        // If the viewValue is invalid (say required but empty) it will be `undefined`\n        if (isUndefined(viewValue)) return;\n\n        var list = [];\n\n        if (viewValue) {\n          forEach(viewValue.split(separator), function(value) {\n            if (value) list.push(trim(value));\n          });\n        }\n\n        return list;\n      };\n\n      ctrl.$parsers.push(parse);\n      ctrl.$formatters.push(function(value) {\n        if (isArray(value)) {\n          return value.join(', ');\n        }\n\n        return undefined;\n      });\n\n      // Override the standard $isEmpty because an empty array means the input is empty.\n      ctrl.$isEmpty = function(value) {\n        return !value || !value.length;\n      };\n    }\n  };\n};\n\n\nvar CONSTANT_VALUE_REGEXP = /^(true|false|\\d+)$/;\n/**\n * @ngdoc directive\n * @name ng.directive:ngValue\n *\n * @description\n * Binds the given expression to the value of `input[select]` or `input[radio]`, so\n * that when the element is selected, the `ngModel` of that element is set to the\n * bound value.\n *\n * `ngValue` is useful when dynamically generating lists of radio buttons using `ng-repeat`, as\n * shown below.\n *\n * @element input\n * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute\n *   of the `input` element\n *\n * @example\n    <doc:example>\n      <doc:source>\n       <script>\n          function Ctrl($scope) {\n            $scope.names = ['pizza', 'unicorns', 'robots'];\n            $scope.my = { favorite: 'unicorns' };\n          }\n       </script>\n        <form ng-controller=\"Ctrl\">\n          <h2>Which is your favorite?</h2>\n            <label ng-repeat=\"name in names\" for=\"{{name}}\">\n              {{name}}\n              <input type=\"radio\"\n                     ng-model=\"my.favorite\"\n                     ng-value=\"name\"\n                     id=\"{{name}}\"\n                     name=\"favorite\">\n            </label>\n          <div>You chose {{my.favorite}}</div>\n        </form>\n      </doc:source>\n      <doc:protractor>\n        var favorite = element(by.binding('my.favorite'));\n\n        it('should initialize to model', function() {\n          expect(favorite.getText()).toContain('unicorns');\n        });\n        it('should bind the values to the inputs', function() {\n          element.all(by.model('my.favorite')).get(0).click();\n          expect(favorite.getText()).toContain('pizza');\n        });\n      </doc:protractor>\n    </doc:example>\n */\nvar ngValueDirective = function() {\n  return {\n    priority: 100,\n    compile: function(tpl, tplAttr) {\n      if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {\n        return function ngValueConstantLink(scope, elm, attr) {\n          attr.$set('value', scope.$eval(attr.ngValue));\n        };\n      } else {\n        return function ngValueLink(scope, elm, attr) {\n          scope.$watch(attr.ngValue, function valueWatchAction(value) {\n            attr.$set('value', value);\n          });\n        };\n      }\n    }\n  };\n};\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngBind\n * @restrict AC\n *\n * @description\n * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element\n * with the value of a given expression, and to update the text content when the value of that\n * expression changes.\n *\n * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like\n * `{{ expression }}` which is similar but less verbose.\n *\n * It is preferrable to use `ngBind` instead of `{{ expression }}` when a template is momentarily\n * displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an\n * element attribute, it makes the bindings invisible to the user while the page is loading.\n *\n * An alternative solution to this problem would be using the\n * {@link ng.directive:ngCloak ngCloak} directive.\n *\n *\n * @element ANY\n * @param {expression} ngBind {@link guide/expression Expression} to evaluate.\n *\n * @example\n * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.\n   <doc:example>\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.name = 'Whirled';\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n         Enter name: <input type=\"text\" ng-model=\"name\"><br>\n         Hello <span ng-bind=\"name\"></span>!\n       </div>\n     </doc:source>\n     <doc:protractor>\n       it('should check ng-bind', function() {\n         var exampleContainer = $('.doc-example-live');\n         var nameInput = element(by.model('name'));\n\n         expect(exampleContainer.findElement(by.binding('name')).getText()).toBe('Whirled');\n         nameInput.clear();\n         nameInput.sendKeys('world');\n         expect(exampleContainer.findElement(by.binding('name')).getText()).toBe('world');\n       });\n     </doc:protractor>\n   </doc:example>\n */\nvar ngBindDirective = ngDirective(function(scope, element, attr) {\n  element.addClass('ng-binding').data('$binding', attr.ngBind);\n  scope.$watch(attr.ngBind, function ngBindWatchAction(value) {\n    // We are purposefully using == here rather than === because we want to\n    // catch when value is \"null or undefined\"\n    // jshint -W041\n    element.text(value == undefined ? '' : value);\n  });\n});\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngBindTemplate\n *\n * @description\n * The `ngBindTemplate` directive specifies that the element\n * text content should be replaced with the interpolation of the template\n * in the `ngBindTemplate` attribute.\n * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`\n * expressions. This directive is needed since some HTML elements\n * (such as TITLE and OPTION) cannot contain SPAN elements.\n *\n * @element ANY\n * @param {string} ngBindTemplate template of form\n *   <tt>{{</tt> <tt>expression</tt> <tt>}}</tt> to eval.\n *\n * @example\n * Try it here: enter text in text box and watch the greeting change.\n   <doc:example>\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.salutation = 'Hello';\n           $scope.name = 'World';\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n        Salutation: <input type=\"text\" ng-model=\"salutation\"><br>\n        Name: <input type=\"text\" ng-model=\"name\"><br>\n        <pre ng-bind-template=\"{{salutation}} {{name}}!\"></pre>\n       </div>\n     </doc:source>\n     <doc:protractor>\n       it('should check ng-bind', function() {\n         var salutationElem = element(by.binding('salutation'));\n         var salutationInput = element(by.model('salutation'));\n         var nameInput = element(by.model('name'));\n\n         expect(salutationElem.getText()).toBe('Hello World!');\n\n         salutationInput.clear();\n         salutationInput.sendKeys('Greetings');\n         nameInput.clear();\n         nameInput.sendKeys('user');\n\n         expect(salutationElem.getText()).toBe('Greetings user!');\n       });\n     </doc:protractor>\n   </doc:example>\n */\nvar ngBindTemplateDirective = ['$interpolate', function($interpolate) {\n  return function(scope, element, attr) {\n    // TODO: move this to scenario runner\n    var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));\n    element.addClass('ng-binding').data('$binding', interpolateFn);\n    attr.$observe('ngBindTemplate', function(value) {\n      element.text(value);\n    });\n  };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngBindHtml\n *\n * @description\n * Creates a binding that will innerHTML the result of evaluating the `expression` into the current\n * element in a secure way.  By default, the innerHTML-ed content will be sanitized using the {@link\n * ngSanitize.$sanitize $sanitize} service.  To utilize this functionality, ensure that `$sanitize`\n * is available, for example, by including {@link ngSanitize} in your module's dependencies (not in\n * core Angular.)  You may also bypass sanitization for values you know are safe. To do so, bind to\n * an explicitly trusted value via {@link ng.$sce#methods_trustAsHtml $sce.trustAsHtml}.  See the example\n * under {@link ng.$sce#Example Strict Contextual Escaping (SCE)}.\n *\n * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you\n * will have an exception (instead of an exploit.)\n *\n * @element ANY\n * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.\n *\n * @example\n   Try it here: enter text in text box and watch the greeting change.\n \n   <example module=\"ngBindHtmlExample\" deps=\"angular-sanitize.js\">\n     <file name=\"index.html\">\n       <div ng-controller=\"ngBindHtmlCtrl\">\n        <p ng-bind-html=\"myHTML\"></p>\n       </div>\n     </file>\n     \n     <file name=\"script.js\">\n       angular.module('ngBindHtmlExample', ['ngSanitize'])\n\n       .controller('ngBindHtmlCtrl', ['$scope', function ngBindHtmlCtrl($scope) {\n         $scope.myHTML =\n            'I am an <code>HTML</code>string with <a href=\"#\">links!</a> and other <em>stuff</em>';\n       }]);\n     </file>\n\n     <file name=\"protractorTest.js\">\n       it('should check ng-bind-html', function() {\n         expect(element(by.binding('myHTML')).getText()).toBe(\n             'I am an HTMLstring with links! and other stuff');\n       });\n     </file>\n   </example>\n */\nvar ngBindHtmlDirective = ['$sce', '$parse', function($sce, $parse) {\n  return function(scope, element, attr) {\n    element.addClass('ng-binding').data('$binding', attr.ngBindHtml);\n\n    var parsed = $parse(attr.ngBindHtml);\n    function getStringValue() { return (parsed(scope) || '').toString(); }\n\n    scope.$watch(getStringValue, function ngBindHtmlWatchAction(value) {\n      element.html($sce.getTrustedHtml(parsed(scope)) || '');\n    });\n  };\n}];\n\nfunction classDirective(name, selector) {\n  name = 'ngClass' + name;\n  return function() {\n    return {\n      restrict: 'AC',\n      link: function(scope, element, attr) {\n        var oldVal;\n\n        scope.$watch(attr[name], ngClassWatchAction, true);\n\n        attr.$observe('class', function(value) {\n          ngClassWatchAction(scope.$eval(attr[name]));\n        });\n\n\n        if (name !== 'ngClass') {\n          scope.$watch('$index', function($index, old$index) {\n            // jshint bitwise: false\n            var mod = $index & 1;\n            if (mod !== old$index & 1) {\n              var classes = flattenClasses(scope.$eval(attr[name]));\n              mod === selector ?\n                attr.$addClass(classes) :\n                attr.$removeClass(classes);\n            }\n          });\n        }\n\n\n        function ngClassWatchAction(newVal) {\n          if (selector === true || scope.$index % 2 === selector) {\n            var newClasses = flattenClasses(newVal || '');\n            if(!oldVal) {\n              attr.$addClass(newClasses);\n            } else if(!equals(newVal,oldVal)) {\n              attr.$updateClass(newClasses, flattenClasses(oldVal));\n            }\n          }\n          oldVal = copy(newVal);\n        }\n\n\n        function flattenClasses(classVal) {\n          if(isArray(classVal)) {\n            return classVal.join(' ');\n          } else if (isObject(classVal)) {\n            var classes = [], i = 0;\n            forEach(classVal, function(v, k) {\n              if (v) {\n                classes.push(k);\n              }\n            });\n            return classes.join(' ');\n          }\n\n          return classVal;\n        }\n      }\n    };\n  };\n}\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngClass\n * @restrict AC\n *\n * @description\n * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding\n * an expression that represents all classes to be added.\n *\n * The directive won't add duplicate classes if a particular class was already set.\n *\n * When the expression changes, the previously added classes are removed and only then the\n * new classes are added.\n *\n * @animations\n * add - happens just before the class is applied to the element\n * remove - happens just before the class is removed from the element\n *\n * @element ANY\n * @param {expression} ngClass {@link guide/expression Expression} to eval. The result\n *   of the evaluation can be a string representing space delimited class\n *   names, an array, or a map of class names to boolean values. In the case of a map, the\n *   names of the properties whose values are truthy will be added as css classes to the\n *   element.\n *\n * @example Example that demonstrates basic bindings via ngClass directive.\n   <example>\n     <file name=\"index.html\">\n       <p ng-class=\"{strike: deleted, bold: important, red: error}\">Map Syntax Example</p>\n       <input type=\"checkbox\" ng-model=\"deleted\"> deleted (apply \"strike\" class)<br>\n       <input type=\"checkbox\" ng-model=\"important\"> important (apply \"bold\" class)<br>\n       <input type=\"checkbox\" ng-model=\"error\"> error (apply \"red\" class)\n       <hr>\n       <p ng-class=\"style\">Using String Syntax</p>\n       <input type=\"text\" ng-model=\"style\" placeholder=\"Type: bold strike red\">\n       <hr>\n       <p ng-class=\"[style1, style2, style3]\">Using Array Syntax</p>\n       <input ng-model=\"style1\" placeholder=\"Type: bold, strike or red\"><br>\n       <input ng-model=\"style2\" placeholder=\"Type: bold, strike or red\"><br>\n       <input ng-model=\"style3\" placeholder=\"Type: bold, strike or red\"><br>\n     </file>\n     <file name=\"style.css\">\n       .strike {\n         text-decoration: line-through;\n       }\n       .bold {\n           font-weight: bold;\n       }\n       .red {\n           color: red;\n       }\n     </file>\n     <file name=\"protractorTest.js\">\n       var ps = element.all(by.css('.doc-example-live p'));\n\n       it('should let you toggle the class', function() {\n\n         expect(ps.first().getAttribute('class')).not.toMatch(/bold/);\n         expect(ps.first().getAttribute('class')).not.toMatch(/red/);\n\n         element(by.model('important')).click();\n         expect(ps.first().getAttribute('class')).toMatch(/bold/);\n\n         element(by.model('error')).click();\n         expect(ps.first().getAttribute('class')).toMatch(/red/);\n       });\n\n       it('should let you toggle string example', function() {\n         expect(ps.get(1).getAttribute('class')).toBe('');\n         element(by.model('style')).clear();\n         element(by.model('style')).sendKeys('red');\n         expect(ps.get(1).getAttribute('class')).toBe('red');\n       });\n\n       it('array example should have 3 classes', function() {\n         expect(ps.last().getAttribute('class')).toBe('');\n         element(by.model('style1')).sendKeys('bold');\n         element(by.model('style2')).sendKeys('strike');\n         element(by.model('style3')).sendKeys('red');\n         expect(ps.last().getAttribute('class')).toBe('bold strike red');\n       });\n     </file>\n   </example>\n\n   ## Animations\n\n   The example below demonstrates how to perform animations using ngClass.\n\n   <example animations=\"true\">\n     <file name=\"index.html\">\n      <input id=\"setbtn\" type=\"button\" value=\"set\" ng-click=\"myVar='my-class'\">\n      <input id=\"clearbtn\" type=\"button\" value=\"clear\" ng-click=\"myVar=''\">\n      <br>\n      <span class=\"base-class\" ng-class=\"myVar\">Sample Text</span>\n     </file>\n     <file name=\"style.css\">\n       .base-class {\n         -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n         transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n       }\n\n       .base-class.my-class {\n         color: red;\n         font-size:3em;\n       }\n     </file>\n     <file name=\"protractorTest.js\">\n       it('should check ng-class', function() {\n         expect(element(by.css('.base-class')).getAttribute('class')).not.\n           toMatch(/my-class/);\n\n         element(by.id('setbtn')).click();\n\n         expect(element(by.css('.base-class')).getAttribute('class')).\n           toMatch(/my-class/);\n\n         element(by.id('clearbtn')).click();\n\n         expect(element(by.css('.base-class')).getAttribute('class')).not.\n           toMatch(/my-class/);\n       });\n     </file>\n   </example>\n\n\n   ## ngClass and pre-existing CSS3 Transitions/Animations\n   The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.\n   Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder\n   any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure\n   to view the step by step details of {@link ngAnimate.$animate#methods_addclass $animate.addClass} and\n   {@link ngAnimate.$animate#methods_removeclass $animate.removeClass}.\n */\nvar ngClassDirective = classDirective('', true);\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngClassOdd\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result\n *   of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n        <ol ng-init=\"names=['John', 'Mary', 'Cate', 'Suz']\">\n          <li ng-repeat=\"name in names\">\n           <span ng-class-odd=\"'odd'\" ng-class-even=\"'even'\">\n             {{name}}\n           </span>\n          </li>\n        </ol>\n     </file>\n     <file name=\"style.css\">\n       .odd {\n         color: red;\n       }\n       .even {\n         color: blue;\n       }\n     </file>\n     <file name=\"protractorTest.js\">\n       it('should check ng-class-odd and ng-class-even', function() {\n         expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n           toMatch(/odd/);\n         expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n           toMatch(/even/);\n       });\n     </file>\n   </example>\n */\nvar ngClassOddDirective = classDirective('Odd', 0);\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngClassEven\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The\n *   result of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n        <ol ng-init=\"names=['John', 'Mary', 'Cate', 'Suz']\">\n          <li ng-repeat=\"name in names\">\n           <span ng-class-odd=\"'odd'\" ng-class-even=\"'even'\">\n             {{name}} &nbsp; &nbsp; &nbsp;\n           </span>\n          </li>\n        </ol>\n     </file>\n     <file name=\"style.css\">\n       .odd {\n         color: red;\n       }\n       .even {\n         color: blue;\n       }\n     </file>\n     <file name=\"protractorTest.js\">\n       it('should check ng-class-odd and ng-class-even', function() {\n         expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n           toMatch(/odd/);\n         expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n           toMatch(/even/);\n       });\n     </file>\n   </example>\n */\nvar ngClassEvenDirective = classDirective('Even', 1);\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngCloak\n * @restrict AC\n *\n * @description\n * The `ngCloak` directive is used to prevent the Angular html template from being briefly\n * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this\n * directive to avoid the undesirable flicker effect caused by the html template display.\n *\n * The directive can be applied to the `<body>` element, but the preferred usage is to apply\n * multiple `ngCloak` directives to small portions of the page to permit progressive rendering\n * of the browser view.\n *\n * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and\n * `angular.min.js`.\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * <pre>\n * [ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {\n *   display: none !important;\n * }\n * </pre>\n *\n * When this css rule is loaded by the browser, all html elements (including their children) that\n * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive\n * during the compilation of the template it deletes the `ngCloak` element attribute, making\n * the compiled element visible.\n *\n * For the best result, the `angular.js` script must be loaded in the head section of the html\n * document; alternatively, the css rule above must be included in the external stylesheet of the\n * application.\n *\n * Legacy browsers, like IE7, do not provide attribute selector support (added in CSS 2.1) so they\n * cannot match the `[ng\\:cloak]` selector. To work around this limitation, you must add the css\n * class `ng-cloak` in addition to the `ngCloak` directive as shown in the example below.\n *\n * @element ANY\n *\n * @example\n   <doc:example>\n     <doc:source>\n        <div id=\"template1\" ng-cloak>{{ 'hello' }}</div>\n        <div id=\"template2\" ng-cloak class=\"ng-cloak\">{{ 'hello IE7' }}</div>\n     </doc:source>\n     <doc:protractor>\n       it('should remove the template directive and css class', function() {\n         expect($('.doc-example-live #template1').getAttribute('ng-cloak')).\n           toBeNull();\n         expect($('.doc-example-live #template2').getAttribute('ng-cloak')).\n           toBeNull();\n       });\n     </doc:protractor>\n   </doc:example>\n *\n */\nvar ngCloakDirective = ngDirective({\n  compile: function(element, attr) {\n    attr.$set('ngCloak', undefined);\n    element.removeClass('ng-cloak');\n  }\n});\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngController\n *\n * @description\n * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular\n * supports the principles behind the Model-View-Controller design pattern.\n *\n * MVC components in angular:\n *\n * * Model — The Model is scope properties; scopes are attached to the DOM where scope properties\n *   are accessed through bindings.\n * * View — The template (HTML with data bindings) that is rendered into the View.\n * * Controller — The `ngController` directive specifies a Controller class; the class contains business\n *   logic behind the application to decorate the scope with functions and values\n *\n * Note that you can also attach controllers to the DOM by declaring it in a route definition\n * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller\n * again using `ng-controller` in the template itself.  This will cause the controller to be attached\n * and executed twice.\n *\n * @element ANY\n * @scope\n * @param {expression} ngController Name of a globally accessible constructor function or an\n *     {@link guide/expression expression} that on the current scope evaluates to a\n *     constructor function. The controller instance can be published into a scope property\n *     by specifying `as propertyName`.\n *\n * @example\n * Here is a simple form for editing user contact information. Adding, removing, clearing, and\n * greeting are methods declared on the controller (see source tab). These methods can\n * easily be called from the angular markup. Notice that the scope becomes the `this` for the\n * controller's instance. This allows for easy access to the view data from the controller. Also\n * notice that any changes to the data are automatically reflected in the View without the need\n * for a manual update. The example is shown in two different declaration styles you may use\n * according to preference.\n   <doc:example>\n     <doc:source>\n      <script>\n        function SettingsController1() {\n          this.name = \"John Smith\";\n          this.contacts = [\n            {type: 'phone', value: '408 555 1212'},\n            {type: 'email', value: 'john.smith@example.org'} ];\n          };\n\n        SettingsController1.prototype.greet = function() {\n          alert(this.name);\n        };\n\n        SettingsController1.prototype.addContact = function() {\n          this.contacts.push({type: 'email', value: 'yourname@example.org'});\n        };\n\n        SettingsController1.prototype.removeContact = function(contactToRemove) {\n         var index = this.contacts.indexOf(contactToRemove);\n          this.contacts.splice(index, 1);\n        };\n\n        SettingsController1.prototype.clearContact = function(contact) {\n          contact.type = 'phone';\n          contact.value = '';\n        };\n      </script>\n      <div id=\"ctrl-as-exmpl\" ng-controller=\"SettingsController1 as settings\">\n        Name: <input type=\"text\" ng-model=\"settings.name\"/>\n        [ <a href=\"\" ng-click=\"settings.greet()\">greet</a> ]<br/>\n        Contact:\n        <ul>\n          <li ng-repeat=\"contact in settings.contacts\">\n            <select ng-model=\"contact.type\">\n               <option>phone</option>\n               <option>email</option>\n            </select>\n            <input type=\"text\" ng-model=\"contact.value\"/>\n            [ <a href=\"\" ng-click=\"settings.clearContact(contact)\">clear</a>\n            | <a href=\"\" ng-click=\"settings.removeContact(contact)\">X</a> ]\n          </li>\n          <li>[ <a href=\"\" ng-click=\"settings.addContact()\">add</a> ]</li>\n       </ul>\n      </div>\n     </doc:source>\n     <doc:protractor>\n       it('should check controller as', function() {\n         var container = element(by.id('ctrl-as-exmpl'));\n\n         expect(container.findElement(by.model('settings.name'))\n             .getAttribute('value')).toBe('John Smith');\n\n         var firstRepeat =\n             container.findElement(by.repeater('contact in settings.contacts').row(0));\n         var secondRepeat =\n             container.findElement(by.repeater('contact in settings.contacts').row(1));\n\n         expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value'))\n             .toBe('408 555 1212');\n         expect(secondRepeat.findElement(by.model('contact.value')).getAttribute('value'))\n             .toBe('john.smith@example.org');\n\n         firstRepeat.findElement(by.linkText('clear')).click()\n\n         expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value'))\n             .toBe('');\n\n         container.findElement(by.linkText('add')).click();\n\n         expect(container.findElement(by.repeater('contact in settings.contacts').row(2))\n             .findElement(by.model('contact.value'))\n             .getAttribute('value'))\n             .toBe('yourname@example.org');\n       });\n     </doc:protractor>\n   </doc:example>\n    <doc:example>\n     <doc:source>\n      <script>\n        function SettingsController2($scope) {\n          $scope.name = \"John Smith\";\n          $scope.contacts = [\n            {type:'phone', value:'408 555 1212'},\n            {type:'email', value:'john.smith@example.org'} ];\n\n          $scope.greet = function() {\n           alert(this.name);\n          };\n\n          $scope.addContact = function() {\n           this.contacts.push({type:'email', value:'yourname@example.org'});\n          };\n\n          $scope.removeContact = function(contactToRemove) {\n           var index = this.contacts.indexOf(contactToRemove);\n           this.contacts.splice(index, 1);\n          };\n\n          $scope.clearContact = function(contact) {\n           contact.type = 'phone';\n           contact.value = '';\n          };\n        }\n      </script>\n      <div id=\"ctrl-exmpl\" ng-controller=\"SettingsController2\">\n        Name: <input type=\"text\" ng-model=\"name\"/>\n        [ <a href=\"\" ng-click=\"greet()\">greet</a> ]<br/>\n        Contact:\n        <ul>\n          <li ng-repeat=\"contact in contacts\">\n            <select ng-model=\"contact.type\">\n               <option>phone</option>\n               <option>email</option>\n            </select>\n            <input type=\"text\" ng-model=\"contact.value\"/>\n            [ <a href=\"\" ng-click=\"clearContact(contact)\">clear</a>\n            | <a href=\"\" ng-click=\"removeContact(contact)\">X</a> ]\n          </li>\n          <li>[ <a href=\"\" ng-click=\"addContact()\">add</a> ]</li>\n       </ul>\n      </div>\n     </doc:source>\n     <doc:protractor>\n       it('should check controller', function() {\n         var container = element(by.id('ctrl-exmpl'));\n\n         expect(container.findElement(by.model('name'))\n             .getAttribute('value')).toBe('John Smith');\n\n         var firstRepeat =\n             container.findElement(by.repeater('contact in contacts').row(0));\n         var secondRepeat =\n             container.findElement(by.repeater('contact in contacts').row(1));\n\n         expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value'))\n             .toBe('408 555 1212');\n         expect(secondRepeat.findElement(by.model('contact.value')).getAttribute('value'))\n             .toBe('john.smith@example.org');\n\n         firstRepeat.findElement(by.linkText('clear')).click()\n\n         expect(firstRepeat.findElement(by.model('contact.value')).getAttribute('value'))\n             .toBe('');\n\n         container.findElement(by.linkText('add')).click();\n\n         expect(container.findElement(by.repeater('contact in contacts').row(2))\n             .findElement(by.model('contact.value'))\n             .getAttribute('value'))\n             .toBe('yourname@example.org');\n       });\n     </doc:protractor>\n   </doc:example>\n\n */\nvar ngControllerDirective = [function() {\n  return {\n    scope: true,\n    controller: '@',\n    priority: 500\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngCsp\n *\n * @element html\n * @description\n * Enables [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) support.\n *\n * This is necessary when developing things like Google Chrome Extensions.\n *\n * CSP forbids apps to use `eval` or `Function(string)` generated functions (among other things).\n * For us to be compatible, we just need to implement the \"getterFn\" in $parse without violating\n * any of these restrictions.\n *\n * AngularJS uses `Function(string)` generated functions as a speed optimization. Applying the `ngCsp`\n * directive will cause Angular to use CSP compatibility mode. When this mode is on AngularJS will\n * evaluate all expressions up to 30% slower than in non-CSP mode, but no security violations will\n * be raised.\n *\n * CSP forbids JavaScript to inline stylesheet rules. In non CSP mode Angular automatically\n * includes some CSS rules (e.g. {@link ng.directive:ngCloak ngCloak}).\n * To make those directives work in CSP mode, include the `angular-csp.css` manually.\n *\n * In order to use this feature put the `ngCsp` directive on the root element of the application.\n *\n * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*\n *\n * @example\n * This example shows how to apply the `ngCsp` directive to the `html` tag.\n   <pre>\n     <!doctype html>\n     <html ng-app ng-csp>\n     ...\n     ...\n     </html>\n   </pre>\n */\n\n// ngCsp is not implemented as a proper directive any more, because we need it be processed while we bootstrap\n// the system (before $parse is instantiated), for this reason we just have a csp() fn that looks for ng-csp attribute\n// anywhere in the current doc\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngClick\n *\n * @description\n * The ngClick directive allows you to specify custom behavior when\n * an element is clicked.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon\n * click. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-click=\"count = count + 1\" ng-init=\"count=0\">\n        Increment\n      </button>\n      count: {{count}}\n     </doc:source>\n     <doc:protractor>\n       it('should check ng-click', function() {\n         expect(element(by.binding('count')).getText()).toMatch('0');\n         element(by.css('.doc-example-live button')).click();\n         expect(element(by.binding('count')).getText()).toMatch('1');\n       });\n     </doc:protractor>\n   </doc:example>\n */\n/*\n * A directive that allows creation of custom onclick handlers that are defined as angular\n * expressions and are compiled and executed within the current scope.\n *\n * Events that are handled via these handler are always configured not to propagate further.\n */\nvar ngEventDirectives = {};\nforEach(\n  'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),\n  function(name) {\n    var directiveName = directiveNormalize('ng-' + name);\n    ngEventDirectives[directiveName] = ['$parse', function($parse) {\n      return {\n        compile: function($element, attr) {\n          var fn = $parse(attr[directiveName]);\n          return function(scope, element, attr) {\n            element.on(lowercase(name), function(event) {\n              scope.$apply(function() {\n                fn(scope, {$event:event});\n              });\n            });\n          };\n        }\n      };\n    }];\n  }\n);\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngDblclick\n *\n * @description\n * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon\n * a dblclick. (The Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-dblclick=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (on double click)\n      </button>\n      count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngMousedown\n *\n * @description\n * The ngMousedown directive allows you to specify custom behavior on mousedown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon\n * mousedown. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-mousedown=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (on mouse down)\n      </button>\n      count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngMouseup\n *\n * @description\n * Specify custom behavior on mouseup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon\n * mouseup. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-mouseup=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (on mouse up)\n      </button>\n      count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngMouseover\n *\n * @description\n * Specify custom behavior on mouseover event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon\n * mouseover. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-mouseover=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse is over)\n      </button>\n      count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngMouseenter\n *\n * @description\n * Specify custom behavior on mouseenter event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon\n * mouseenter. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-mouseenter=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse enters)\n      </button>\n      count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngMouseleave\n *\n * @description\n * Specify custom behavior on mouseleave event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon\n * mouseleave. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-mouseleave=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse leaves)\n      </button>\n      count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngMousemove\n *\n * @description\n * Specify custom behavior on mousemove event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon\n * mousemove. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <button ng-mousemove=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse moves)\n      </button>\n      count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngKeydown\n *\n * @description\n * Specify custom behavior on keydown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon\n * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <input ng-keydown=\"count = count + 1\" ng-init=\"count=0\">\n      key down count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngKeyup\n *\n * @description\n * Specify custom behavior on keyup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon\n * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <input ng-keyup=\"count = count + 1\" ng-init=\"count=0\">\n      key up count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngKeypress\n *\n * @description\n * Specify custom behavior on keypress event.\n *\n * @element ANY\n * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon\n * keypress. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <input ng-keypress=\"count = count + 1\" ng-init=\"count=0\">\n      key press count: {{count}}\n     </doc:source>\n   </doc:example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngSubmit\n *\n * @description\n * Enables binding angular expressions to onsubmit events.\n *\n * Additionally it prevents the default action (which for form means sending the request to the\n * server and reloading the current page) **but only if the form does not contain an `action`\n * attribute**.\n *\n * @element form\n * @priority 0\n * @param {expression} ngSubmit {@link guide/expression Expression} to eval. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <script>\n        function Ctrl($scope) {\n          $scope.list = [];\n          $scope.text = 'hello';\n          $scope.submit = function() {\n            if (this.text) {\n              this.list.push(this.text);\n              this.text = '';\n            }\n          };\n        }\n      </script>\n      <form ng-submit=\"submit()\" ng-controller=\"Ctrl\">\n        Enter text and hit enter:\n        <input type=\"text\" ng-model=\"text\" name=\"text\" />\n        <input type=\"submit\" id=\"submit\" value=\"Submit\" />\n        <pre>list={{list}}</pre>\n      </form>\n     </doc:source>\n     <doc:protractor>\n       it('should check ng-submit', function() {\n         expect(element(by.binding('list')).getText()).toBe('list=[]');\n         element(by.css('.doc-example-live #submit')).click();\n         expect(element(by.binding('list')).getText()).toContain('hello');\n         expect(element(by.input('text')).getAttribute('value')).toBe('');\n       });\n       it('should ignore empty strings', function() {\n         expect(element(by.binding('list')).getText()).toBe('list=[]');\n         element(by.css('.doc-example-live #submit')).click();\n         element(by.css('.doc-example-live #submit')).click();\n         expect(element(by.binding('list')).getText()).toContain('hello');\n        });\n     </doc:protractor>\n   </doc:example>\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngFocus\n *\n * @description\n * Specify custom behavior on focus event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon\n * focus. (Event object is available as `$event`)\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngBlur\n *\n * @description\n * Specify custom behavior on blur event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon\n * blur. (Event object is available as `$event`)\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngCopy\n *\n * @description\n * Specify custom behavior on copy event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon\n * copy. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <input ng-copy=\"copied=true\" ng-init=\"copied=false; value='copy me'\" ng-model=\"value\">\n      copied: {{copied}}\n     </doc:source>\n   </doc:example>\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngCut\n *\n * @description\n * Specify custom behavior on cut event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon\n * cut. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <input ng-cut=\"cut=true\" ng-init=\"cut=false; value='cut me'\" ng-model=\"value\">\n      cut: {{cut}}\n     </doc:source>\n   </doc:example>\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngPaste\n *\n * @description\n * Specify custom behavior on paste event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon\n * paste. (Event object is available as `$event`)\n *\n * @example\n   <doc:example>\n     <doc:source>\n      <input ng-paste=\"paste=true\" ng-init=\"paste=false\" placeholder='paste here'>\n      pasted: {{paste}}\n     </doc:source>\n   </doc:example>\n */\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngIf\n * @restrict A\n *\n * @description\n * The `ngIf` directive removes or recreates a portion of the DOM tree based on an\n * {expression}. If the expression assigned to `ngIf` evaluates to a false\n * value then the element is removed from the DOM, otherwise a clone of the\n * element is reinserted into the DOM.\n *\n * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the\n * element in the DOM rather than changing its visibility via the `display` css property.  A common\n * case when this difference is significant is when using css selectors that rely on an element's\n * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.\n *\n * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope\n * is created when the element is restored.  The scope created within `ngIf` inherits from\n * its parent scope using\n * {@link https://github.com/angular/angular.js/wiki/The-Nuances-of-Scope-Prototypal-Inheritance prototypal inheritance}.\n * An important implication of this is if `ngModel` is used within `ngIf` to bind to\n * a javascript primitive defined in the parent scope. In this case any modifications made to the\n * variable within the child scope will override (hide) the value in the parent scope.\n *\n * Also, `ngIf` recreates elements using their compiled state. An example of this behavior\n * is if an element's class attribute is directly modified after it's compiled, using something like\n * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element\n * the added class will be lost because the original compiled state is used to regenerate the element.\n *\n * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`\n * and `leave` effects.\n *\n * @animations\n * enter - happens just after the ngIf contents change and a new DOM element is created and injected into the ngIf container\n * leave - happens just before the ngIf contents are removed from the DOM\n *\n * @element ANY\n * @scope\n * @priority 600\n * @param {expression} ngIf If the {@link guide/expression expression} is falsy then\n *     the element is removed from the DOM tree. If it is truthy a copy of the compiled\n *     element is added to the DOM tree.\n *\n * @example\n  <example animations=\"true\">\n    <file name=\"index.html\">\n      Click me: <input type=\"checkbox\" ng-model=\"checked\" ng-init=\"checked=true\" /><br/>\n      Show when checked:\n      <span ng-if=\"checked\" class=\"animate-if\">\n        I'm removed when the checkbox is unchecked.\n      </span>\n    </file>\n    <file name=\"animations.css\">\n      .animate-if {\n        background:white;\n        border:1px solid black;\n        padding:10px;\n      }\n\n      .animate-if.ng-enter, .animate-if.ng-leave {\n        -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n        transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n      }\n\n      .animate-if.ng-enter,\n      .animate-if.ng-leave.ng-leave-active {\n        opacity:0;\n      }\n\n      .animate-if.ng-leave,\n      .animate-if.ng-enter.ng-enter-active {\n        opacity:1;\n      }\n    </file>\n  </example>\n */\nvar ngIfDirective = ['$animate', function($animate) {\n  return {\n    transclude: 'element',\n    priority: 600,\n    terminal: true,\n    restrict: 'A',\n    $$tlb: true,\n    link: function ($scope, $element, $attr, ctrl, $transclude) {\n        var block, childScope;\n        $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {\n\n          if (toBoolean(value)) {\n            if (!childScope) {\n              childScope = $scope.$new();\n              $transclude(childScope, function (clone) {\n                clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ');\n                // Note: We only need the first/last node of the cloned nodes.\n                // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n                // by a directive with templateUrl when it's template arrives.\n                block = {\n                  clone: clone\n                };\n                $animate.enter(clone, $element.parent(), $element);\n              });\n            }\n          } else {\n\n            if (childScope) {\n              childScope.$destroy();\n              childScope = null;\n            }\n\n            if (block) {\n              $animate.leave(getBlockElements(block.clone));\n              block = null;\n            }\n          }\n        });\n    }\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngInclude\n * @restrict ECA\n *\n * @description\n * Fetches, compiles and includes an external HTML fragment.\n *\n * By default, the template URL is restricted to the same domain and protocol as the\n * application document. This is done by calling {@link ng.$sce#methods_getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols\n * you may either {@link ng.$sceDelegateProvider#methods_resourceUrlWhitelist whitelist them} or\n * {@link ng.$sce#methods_trustAsResourceUrl wrap them} as trusted values. Refer to Angular's {@link\n * ng.$sce Strict Contextual Escaping}.\n *\n * In addition, the browser's\n * {@link https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest\n * Same Origin Policy} and {@link http://www.w3.org/TR/cors/ Cross-Origin Resource Sharing\n * (CORS)} policy may further restrict whether the template is successfully loaded.\n * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`\n * access on some browsers.\n *\n * @animations\n * enter - animation is used to bring new content into the browser.\n * leave - animation is used to animate existing content away.\n *\n * The enter and leave animation occur concurrently.\n *\n * @scope\n * @priority 400\n *\n * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,\n *                 make sure you wrap it in quotes, e.g. `src=\"'myPartialTemplate.html'\"`.\n * @param {string=} onload Expression to evaluate when a new partial is loaded.\n *\n * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll\n *                  $anchorScroll} to scroll the viewport after the content is loaded.\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 expression evaluates to truthy value.\n *\n * @example\n  <example animations=\"true\">\n    <file name=\"index.html\">\n     <div ng-controller=\"Ctrl\">\n       <select ng-model=\"template\" ng-options=\"t.name for t in templates\">\n        <option value=\"\">(blank)</option>\n       </select>\n       url of the template: <tt>{{template.url}}</tt>\n       <hr/>\n       <div class=\"slide-animate-container\">\n         <div class=\"slide-animate\" ng-include=\"template.url\"></div>\n       </div>\n     </div>\n    </file>\n    <file name=\"script.js\">\n      function Ctrl($scope) {\n        $scope.templates =\n          [ { name: 'template1.html', url: 'template1.html'}\n          , { name: 'template2.html', url: 'template2.html'} ];\n        $scope.template = $scope.templates[0];\n      }\n     </file>\n    <file name=\"template1.html\">\n      Content of template1.html\n    </file>\n    <file name=\"template2.html\">\n      Content of template2.html\n    </file>\n    <file name=\"animations.css\">\n      .slide-animate-container {\n        position:relative;\n        background:white;\n        border:1px solid black;\n        height:40px;\n        overflow:hidden;\n      }\n\n      .slide-animate {\n        padding:10px;\n      }\n\n      .slide-animate.ng-enter, .slide-animate.ng-leave {\n        -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n        transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n        position:absolute;\n        top:0;\n        left:0;\n        right:0;\n        bottom:0;\n        display:block;\n        padding:10px;\n      }\n\n      .slide-animate.ng-enter {\n        top:-50px;\n      }\n      .slide-animate.ng-enter.ng-enter-active {\n        top:0;\n      }\n\n      .slide-animate.ng-leave {\n        top:0;\n      }\n      .slide-animate.ng-leave.ng-leave-active {\n        top:50px;\n      }\n    </file>\n    <file name=\"protractorTest.js\">\n      var templateSelect = element(by.model('template'));\n      var includeElem = element(by.css('.doc-example-live [ng-include]'));\n\n      it('should load template1.html', function() {\n        expect(includeElem.getText()).toMatch(/Content of template1.html/);\n      });\n\n      it('should load template2.html', function() {\n        if (browser.params.browser == 'firefox') {\n          // Firefox can't handle using selects\n          // See https://github.com/angular/protractor/issues/480\n          return;\n        }\n        templateSelect.click();\n        templateSelect.element.all(by.css('option')).get(2).click();\n        expect(includeElem.getText()).toMatch(/Content of template2.html/);\n      });\n\n      it('should change to blank', function() {\n        if (browser.params.browser == 'firefox') {\n          // Firefox can't handle using selects\n          return;\n        }\n        templateSelect.click();\n        templateSelect.element.all(by.css('option')).get(0).click();\n        expect(includeElem.isPresent()).toBe(false);\n      });\n    </file>\n  </example>\n */\n\n\n/**\n * @ngdoc event\n * @name ng.directive:ngInclude#$includeContentRequested\n * @eventOf ng.directive:ngInclude\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted every time the ngInclude content is requested.\n */\n\n\n/**\n * @ngdoc event\n * @name ng.directive:ngInclude#$includeContentLoaded\n * @eventOf ng.directive:ngInclude\n * @eventType emit on the current ngInclude scope\n * @description\n * Emitted every time the ngInclude content is reloaded.\n */\nvar ngIncludeDirective = ['$http', '$templateCache', '$anchorScroll', '$animate', '$sce',\n                  function($http,   $templateCache,   $anchorScroll,   $animate,   $sce) {\n  return {\n    restrict: 'ECA',\n    priority: 400,\n    terminal: true,\n    transclude: 'element',\n    controller: angular.noop,\n    compile: function(element, attr) {\n      var srcExp = attr.ngInclude || attr.src,\n          onloadExp = attr.onload || '',\n          autoScrollExp = attr.autoscroll;\n\n      return function(scope, $element, $attr, ctrl, $transclude) {\n        var changeCounter = 0,\n            currentScope,\n            currentElement;\n\n        var cleanupLastIncludeContent = function() {\n          if (currentScope) {\n            currentScope.$destroy();\n            currentScope = null;\n          }\n          if(currentElement) {\n            $animate.leave(currentElement);\n            currentElement = null;\n          }\n        };\n\n        scope.$watch($sce.parseAsResourceUrl(srcExp), function ngIncludeWatchAction(src) {\n          var afterAnimation = function() {\n            if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {\n              $anchorScroll();\n            }\n          };\n          var thisChangeId = ++changeCounter;\n\n          if (src) {\n            $http.get(src, {cache: $templateCache}).success(function(response) {\n              if (thisChangeId !== changeCounter) return;\n              var newScope = scope.$new();\n              ctrl.template = response;\n\n              // Note: This will also link all children of ng-include that were contained in the original\n              // html. If that content contains controllers, ... they could pollute/change the scope.\n              // However, using ng-include 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                cleanupLastIncludeContent();\n                $animate.enter(clone, null, $element, afterAnimation);\n              });\n\n              currentScope = newScope;\n              currentElement = clone;\n\n              currentScope.$emit('$includeContentLoaded');\n              scope.$eval(onloadExp);\n            }).error(function() {\n              if (thisChangeId === changeCounter) cleanupLastIncludeContent();\n            });\n            scope.$emit('$includeContentRequested');\n          } else {\n            cleanupLastIncludeContent();\n            ctrl.template = null;\n          }\n        });\n      };\n    }\n  };\n}];\n\n// This directive is called during the $transclude call of the first `ngInclude` 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 ngInclude\n// is called.\nvar ngIncludeFillContentDirective = ['$compile',\n  function($compile) {\n    return {\n      restrict: 'ECA',\n      priority: -400,\n      require: 'ngInclude',\n      link: function(scope, $element, $attr, ctrl) {\n        $element.html(ctrl.template);\n        $compile($element.contents())(scope);\n      }\n    };\n  }];\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngInit\n * @restrict AC\n *\n * @description\n * The `ngInit` directive allows you to evaluate an expression in the\n * current scope.\n *\n * <div class=\"alert alert-error\">\n * The only appropriate use of `ngInit` is for aliasing special properties of\n * {@link api/ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below. Besides this case, you\n * should use {@link guide/controller controllers} rather than `ngInit`\n * to initialize values on a scope.\n * </div>\n * <div class=\"alert alert-warning\">\n * **Note**: If you have assignment in `ngInit` along with {@link api/ng.$filter `$filter`}, make\n * sure you have parenthesis for correct precedence:\n * <pre class=\"prettyprint\">\n *   <div ng-init=\"test1 = (data | orderBy:'name')\"></div>\n * </pre>\n * </div>\n *\n * @priority 450\n *\n * @element ANY\n * @param {expression} ngInit {@link guide/expression Expression} to eval.\n *\n * @example\n   <doc:example>\n     <doc:source>\n   <script>\n     function Ctrl($scope) {\n       $scope.list = [['a', 'b'], ['c', 'd']];\n     }\n   </script>\n   <div ng-controller=\"Ctrl\">\n     <div ng-repeat=\"innerList in list\" ng-init=\"outerIndex = $index\">\n       <div ng-repeat=\"value in innerList\" ng-init=\"innerIndex = $index\">\n          <span class=\"example-init\">list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};</span>\n       </div>\n     </div>\n   </div>\n     </doc:source>\n     <doc:protractor>\n       it('should alias index positions', function() {\n         var elements = element.all(by.css('.example-init'));\n         expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');\n         expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');\n         expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');\n         expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');\n       });\n     </doc:protractor>\n   </doc:example>\n */\nvar ngInitDirective = ngDirective({\n  priority: 450,\n  compile: function() {\n    return {\n      pre: function(scope, element, attrs) {\n        scope.$eval(attrs.ngInit);\n      }\n    };\n  }\n});\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngNonBindable\n * @restrict AC\n * @priority 1000\n *\n * @description\n * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current\n * DOM element. This is useful if the element contains what appears to be Angular directives and\n * bindings but which should be ignored by Angular. This could be the case if you have a site that\n * displays snippets of code, for instance.\n *\n * @element ANY\n *\n * @example\n * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,\n * but the one wrapped in `ngNonBindable` is left alone.\n *\n * @example\n    <doc:example>\n      <doc:source>\n        <div>Normal: {{1 + 2}}</div>\n        <div ng-non-bindable>Ignored: {{1 + 2}}</div>\n      </doc:source>\n      <doc:protractor>\n       it('should check ng-non-bindable', function() {\n         expect(element(by.binding('1 + 2')).getText()).toContain('3');\n         expect(element.all(by.css('.doc-example-live div')).last().getText()).toMatch(/1 \\+ 2/);\n       });\n      </doc:protractor>\n    </doc:example>\n */\nvar ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngPluralize\n * @restrict EA\n *\n * @description\n * # Overview\n * `ngPluralize` is a directive that displays messages according to en-US localization rules.\n * These rules are bundled with angular.js, but can be overridden\n * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive\n * by specifying the mappings between\n * {@link http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html\n * plural categories} and the strings to be displayed.\n *\n * # Plural categories and explicit number rules\n * There are two\n * {@link http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html\n * plural categories} in Angular's default en-US locale: \"one\" and \"other\".\n *\n * While a plural category may match many numbers (for example, in en-US locale, \"other\" can match\n * any number that is not 1), an explicit number rule can only match one number. For example, the\n * explicit number rule for \"3\" matches the number 3. There are examples of plural categories\n * and explicit number rules throughout the rest of this documentation.\n *\n * # Configuring ngPluralize\n * You configure ngPluralize by providing 2 attributes: `count` and `when`.\n * You can also provide an optional attribute, `offset`.\n *\n * The value of the `count` attribute can be either a string or an {@link guide/expression\n * Angular expression}; these are evaluated on the current scope for its bound value.\n *\n * The `when` attribute specifies the mappings between plural categories and the actual\n * string to be displayed. The value of the attribute should be a JSON object.\n *\n * The following example shows how to configure ngPluralize:\n *\n * <pre>\n * <ng-pluralize count=\"personCount\"\n                 when=\"{'0': 'Nobody is viewing.',\n *                      'one': '1 person is viewing.',\n *                      'other': '{} people are viewing.'}\">\n * </ng-pluralize>\n *</pre>\n *\n * In the example, `\"0: Nobody is viewing.\"` is an explicit number rule. If you did not\n * specify this rule, 0 would be matched to the \"other\" category and \"0 people are viewing\"\n * would be shown instead of \"Nobody is viewing\". You can specify an explicit number rule for\n * other numbers, for example 12, so that instead of showing \"12 people are viewing\", you can\n * show \"a dozen people are viewing\".\n *\n * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted\n * into pluralized strings. In the previous example, Angular will replace `{}` with\n * <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder\n * for <span ng-non-bindable>{{numberExpression}}</span>.\n *\n * # Configuring ngPluralize with offset\n * The `offset` attribute allows further customization of pluralized text, which can result in\n * a better user experience. For example, instead of the message \"4 people are viewing this document\",\n * you might display \"John, Kate and 2 others are viewing this document\".\n * The offset attribute allows you to offset a number by any desired value.\n * Let's take a look at an example:\n *\n * <pre>\n * <ng-pluralize count=\"personCount\" offset=2\n *               when=\"{'0': 'Nobody is viewing.',\n *                      '1': '{{person1}} is viewing.',\n *                      '2': '{{person1}} and {{person2}} are viewing.',\n *                      'one': '{{person1}}, {{person2}} and one other person are viewing.',\n *                      'other': '{{person1}}, {{person2}} and {} other people are viewing.'}\">\n * </ng-pluralize>\n * </pre>\n *\n * Notice that we are still using two plural categories(one, other), but we added\n * three explicit number rules 0, 1 and 2.\n * When one person, perhaps John, views the document, \"John is viewing\" will be shown.\n * When three people view the document, no explicit number rule is found, so\n * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.\n * In this case, plural category 'one' is matched and \"John, Marry and one other person are viewing\"\n * is shown.\n *\n * Note that when you specify offsets, you must provide explicit number rules for\n * numbers from 0 up to and including the offset. If you use an offset of 3, for example,\n * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for\n * plural categories \"one\" and \"other\".\n *\n * @param {string|expression} count The variable to be bounded to.\n * @param {string} when The mapping between plural category to its corresponding strings.\n * @param {number=} offset Offset to deduct from the total number.\n *\n * @example\n    <doc:example>\n      <doc:source>\n        <script>\n          function Ctrl($scope) {\n            $scope.person1 = 'Igor';\n            $scope.person2 = 'Misko';\n            $scope.personCount = 1;\n          }\n        </script>\n        <div ng-controller=\"Ctrl\">\n          Person 1:<input type=\"text\" ng-model=\"person1\" value=\"Igor\" /><br/>\n          Person 2:<input type=\"text\" ng-model=\"person2\" value=\"Misko\" /><br/>\n          Number of People:<input type=\"text\" ng-model=\"personCount\" value=\"1\" /><br/>\n\n          <!--- Example with simple pluralization rules for en locale --->\n          Without Offset:\n          <ng-pluralize count=\"personCount\"\n                        when=\"{'0': 'Nobody is viewing.',\n                               'one': '1 person is viewing.',\n                               'other': '{} people are viewing.'}\">\n          </ng-pluralize><br>\n\n          <!--- Example with offset --->\n          With Offset(2):\n          <ng-pluralize count=\"personCount\" offset=2\n                        when=\"{'0': 'Nobody is viewing.',\n                               '1': '{{person1}} is viewing.',\n                               '2': '{{person1}} and {{person2}} are viewing.',\n                               'one': '{{person1}}, {{person2}} and one other person are viewing.',\n                               'other': '{{person1}}, {{person2}} and {} other people are viewing.'}\">\n          </ng-pluralize>\n        </div>\n      </doc:source>\n      <doc:protractor>\n        it('should show correct pluralized string', function() {\n          var withoutOffset = element.all(by.css('ng-pluralize')).get(0);\n          var withOffset = element.all(by.css('ng-pluralize')).get(1);\n          var countInput = element(by.model('personCount'));\n\n          expect(withoutOffset.getText()).toEqual('1 person is viewing.');\n          expect(withOffset.getText()).toEqual('Igor is viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('0');\n\n          expect(withoutOffset.getText()).toEqual('Nobody is viewing.');\n          expect(withOffset.getText()).toEqual('Nobody is viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('2');\n\n          expect(withoutOffset.getText()).toEqual('2 people are viewing.');\n          expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('3');\n\n          expect(withoutOffset.getText()).toEqual('3 people are viewing.');\n          expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('4');\n\n          expect(withoutOffset.getText()).toEqual('4 people are viewing.');\n          expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');\n        });\n        it('should show data-bound names', function() {\n          var withOffset = element.all(by.css('ng-pluralize')).get(1);\n          var personCount = element(by.model('personCount'));\n          var person1 = element(by.model('person1'));\n          var person2 = element(by.model('person2'));\n          personCount.clear();\n          personCount.sendKeys('4');\n          person1.clear();\n          person1.sendKeys('Di');\n          person2.clear();\n          person2.sendKeys('Vojta');\n          expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');\n        });\n      </doc:protractor>\n    </doc:example>\n */\nvar ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interpolate) {\n  var BRACE = /{}/g;\n  return {\n    restrict: 'EA',\n    link: function(scope, element, attr) {\n      var numberExp = attr.count,\n          whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs\n          offset = attr.offset || 0,\n          whens = scope.$eval(whenExp) || {},\n          whensExpFns = {},\n          startSymbol = $interpolate.startSymbol(),\n          endSymbol = $interpolate.endSymbol(),\n          isWhen = /^when(Minus)?(.+)$/;\n\n      forEach(attr, function(expression, attributeName) {\n        if (isWhen.test(attributeName)) {\n          whens[lowercase(attributeName.replace('when', '').replace('Minus', '-'))] =\n            element.attr(attr.$attr[attributeName]);\n        }\n      });\n      forEach(whens, function(expression, key) {\n        whensExpFns[key] =\n          $interpolate(expression.replace(BRACE, startSymbol + numberExp + '-' +\n            offset + endSymbol));\n      });\n\n      scope.$watch(function ngPluralizeWatch() {\n        var value = parseFloat(scope.$eval(numberExp));\n\n        if (!isNaN(value)) {\n          //if explicit number rule such as 1, 2, 3... is defined, just use it. Otherwise,\n          //check it against pluralization rules in $locale service\n          if (!(value in whens)) value = $locale.pluralCat(value - offset);\n           return whensExpFns[value](scope, element, true);\n        } else {\n          return '';\n        }\n      }, function ngPluralizeWatchAction(newVal) {\n        element.text(newVal);\n      });\n    }\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngRepeat\n *\n * @description\n * The `ngRepeat` directive instantiates a template once per item from a collection. Each template\n * instance gets its own scope, where the given loop variable is set to the current collection item,\n * and `$index` is set to the item index or key.\n *\n * Special properties are exposed on the local scope of each template instance, including:\n *\n * | Variable  | Type            | Details                                                                     |\n * |-----------|-----------------|-----------------------------------------------------------------------------|\n * | `$index`  | {@type number}  | iterator offset of the repeated element (0..length-1)                       |\n * | `$first`  | {@type boolean} | true if the repeated element is first in the iterator.                      |\n * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |\n * | `$last`   | {@type boolean} | true if the repeated element is last in the iterator.                       |\n * | `$even`   | {@type boolean} | true if the iterator position `$index` is even (otherwise false).           |\n * | `$odd`    | {@type boolean} | true if the iterator position `$index` is odd (otherwise false).            |\n *\n * Creating aliases for these properties is possible with {@link api/ng.directive:ngInit `ngInit`}.\n * This may be useful when, for instance, nesting ngRepeats.\n *\n * # Special repeat start and end points\n * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending\n * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.\n * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)\n * up to and including the ending HTML tag where **ng-repeat-end** is placed.\n *\n * The example below makes use of this feature:\n * <pre>\n *   <header ng-repeat-start=\"item in items\">\n *     Header {{ item }}\n *   </header>\n *   <div class=\"body\">\n *     Body {{ item }}\n *   </div>\n *   <footer ng-repeat-end>\n *     Footer {{ item }}\n *   </footer>\n * </pre>\n *\n * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:\n * <pre>\n *   <header>\n *     Header A\n *   </header>\n *   <div class=\"body\">\n *     Body A\n *   </div>\n *   <footer>\n *     Footer A\n *   </footer>\n *   <header>\n *     Header B\n *   </header>\n *   <div class=\"body\">\n *     Body B\n *   </div>\n *   <footer>\n *     Footer B\n *   </footer>\n * </pre>\n *\n * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such\n * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).\n *\n * @animations\n * enter - when a new item is added to the list or when an item is revealed after a filter\n * leave - when an item is removed from the list or when an item is filtered out\n * move - when an adjacent item is filtered out causing a reorder or when the item contents are reordered\n *\n * @element ANY\n * @scope\n * @priority 1000\n * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These\n *   formats are currently supported:\n *\n *   * `variable in expression` – where variable is the user defined loop variable and `expression`\n *     is a scope expression giving the collection to enumerate.\n *\n *     For example: `album in artist.albums`.\n *\n *   * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers,\n *     and `expression` is the scope expression giving the collection to enumerate.\n *\n *     For example: `(name, age) in {'adam':10, 'amalie':12}`.\n *\n *   * `variable in expression track by tracking_expression` – You can also provide an optional tracking function\n *     which can be used to associate the objects in the collection with the DOM elements. If no tracking function\n *     is specified the ng-repeat associates elements by identity in the collection. It is an error to have\n *     more than one tracking function to resolve to the same key. (This would mean that two distinct objects are\n *     mapped to the same DOM element, which is not possible.)  Filters should be applied to the expression,\n *     before specifying a tracking expression.\n *\n *     For example: `item in items` is equivalent to `item in items track by $id(item)'. This implies that the DOM elements\n *     will be associated by item identity in the array.\n *\n *     For example: `item in items track by $id(item)`. A built in `$id()` function can be used to assign a unique\n *     `$$hashKey` property to each item in the array. This property is then used as a key to associated DOM elements\n *     with the corresponding item in the array by identity. Moving the same object in array would move the DOM\n *     element in the same way in the DOM.\n *\n *     For example: `item in items track by item.id` is a typical pattern when the items come from the database. In this\n *     case the object identity does not matter. Two objects are considered equivalent as long as their `id`\n *     property is same.\n *\n *     For example: `item in items | filter:searchText track by item.id` is a pattern that might be used to apply a filter\n *     to items in conjunction with a tracking expression.\n *\n * @example\n * This example initializes the scope to a list of names and\n * then uses `ngRepeat` to display every person:\n  <example animations=\"true\">\n    <file name=\"index.html\">\n      <div ng-init=\"friends = [\n        {name:'John', age:25, gender:'boy'},\n        {name:'Jessie', age:30, gender:'girl'},\n        {name:'Johanna', age:28, gender:'girl'},\n        {name:'Joy', age:15, gender:'girl'},\n        {name:'Mary', age:28, gender:'girl'},\n        {name:'Peter', age:95, gender:'boy'},\n        {name:'Sebastian', age:50, gender:'boy'},\n        {name:'Erika', age:27, gender:'girl'},\n        {name:'Patrick', age:40, gender:'boy'},\n        {name:'Samantha', age:60, gender:'girl'}\n      ]\">\n        I have {{friends.length}} friends. They are:\n        <input type=\"search\" ng-model=\"q\" placeholder=\"filter friends...\" />\n        <ul class=\"example-animate-container\">\n          <li class=\"animate-repeat\" ng-repeat=\"friend in friends | filter:q\">\n            [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.\n          </li>\n        </ul>\n      </div>\n    </file>\n    <file name=\"animations.css\">\n      .example-animate-container {\n        background:white;\n        border:1px solid black;\n        list-style:none;\n        margin:0;\n        padding:0 10px;\n      }\n\n      .animate-repeat {\n        line-height:40px;\n        list-style:none;\n        box-sizing:border-box;\n      }\n\n      .animate-repeat.ng-move,\n      .animate-repeat.ng-enter,\n      .animate-repeat.ng-leave {\n        -webkit-transition:all linear 0.5s;\n        transition:all linear 0.5s;\n      }\n\n      .animate-repeat.ng-leave.ng-leave-active,\n      .animate-repeat.ng-move,\n      .animate-repeat.ng-enter {\n        opacity:0;\n        max-height:0;\n      }\n\n      .animate-repeat.ng-leave,\n      .animate-repeat.ng-move.ng-move-active,\n      .animate-repeat.ng-enter.ng-enter-active {\n        opacity:1;\n        max-height:40px;\n      }\n    </file>\n    <file name=\"protractorTest.js\">\n      var friends = element(by.css('.doc-example-live'))\n          .element.all(by.repeater('friend in friends'));\n\n      it('should render initial data set', function() {\n        expect(friends.count()).toBe(10);\n        expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');\n        expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');\n        expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');\n        expect(element(by.binding('friends.length')).getText())\n            .toMatch(\"I have 10 friends. They are:\");\n      });\n\n       it('should update repeater when filter predicate changes', function() {\n         expect(friends.count()).toBe(10);\n\n         element(by.css('.doc-example-live')).element(by.model('q')).sendKeys('ma');\n\n         expect(friends.count()).toBe(2);\n         expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');\n         expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');\n       });\n      </file>\n    </example>\n */\nvar ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {\n  var NG_REMOVED = '$$NG_REMOVED';\n  var ngRepeatMinErr = minErr('ngRepeat');\n  return {\n    transclude: 'element',\n    priority: 1000,\n    terminal: true,\n    $$tlb: true,\n    link: function($scope, $element, $attr, ctrl, $transclude){\n        var expression = $attr.ngRepeat;\n        var match = expression.match(/^\\s*([\\s\\S]+?)\\s+in\\s+([\\s\\S]+?)(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/),\n          trackByExp, trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn,\n          lhs, rhs, valueIdentifier, keyIdentifier,\n          hashFnLocals = {$id: hashKey};\n\n        if (!match) {\n          throw ngRepeatMinErr('iexp', \"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.\",\n            expression);\n        }\n\n        lhs = match[1];\n        rhs = match[2];\n        trackByExp = match[3];\n\n        if (trackByExp) {\n          trackByExpGetter = $parse(trackByExp);\n          trackByIdExpFn = function(key, value, index) {\n            // assign key, value, and $index to the locals so that they can be used in hash functions\n            if (keyIdentifier) hashFnLocals[keyIdentifier] = key;\n            hashFnLocals[valueIdentifier] = value;\n            hashFnLocals.$index = index;\n            return trackByExpGetter($scope, hashFnLocals);\n          };\n        } else {\n          trackByIdArrayFn = function(key, value) {\n            return hashKey(value);\n          };\n          trackByIdObjFn = function(key) {\n            return key;\n          };\n        }\n\n        match = lhs.match(/^(?:([\\$\\w]+)|\\(([\\$\\w]+)\\s*,\\s*([\\$\\w]+)\\))$/);\n        if (!match) {\n          throw ngRepeatMinErr('iidexp', \"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.\",\n                                                                    lhs);\n        }\n        valueIdentifier = match[3] || match[1];\n        keyIdentifier = match[2];\n\n        // Store a list of elements from previous run. This is a hash where key is the item from the\n        // iterator, and the value is objects with following properties.\n        //   - scope: bound scope\n        //   - element: previous element.\n        //   - index: position\n        var lastBlockMap = {};\n\n        //watch props\n        $scope.$watchCollection(rhs, function ngRepeatAction(collection){\n          var index, length,\n              previousNode = $element[0],     // current position of the node\n              nextNode,\n              // Same as lastBlockMap but it has the current state. It will become the\n              // lastBlockMap on the next iteration.\n              nextBlockMap = {},\n              arrayLength,\n              childScope,\n              key, value, // key/value of iteration\n              trackById,\n              trackByIdFn,\n              collectionKeys,\n              block,       // last object information {scope, element, id}\n              nextBlockOrder = [],\n              elementsToRemove;\n\n\n          if (isArrayLike(collection)) {\n            collectionKeys = collection;\n            trackByIdFn = trackByIdExpFn || trackByIdArrayFn;\n          } else {\n            trackByIdFn = trackByIdExpFn || trackByIdObjFn;\n            // if object, extract keys, sort them and use to determine order of iteration over obj props\n            collectionKeys = [];\n            for (key in collection) {\n              if (collection.hasOwnProperty(key) && key.charAt(0) != '$') {\n                collectionKeys.push(key);\n              }\n            }\n            collectionKeys.sort();\n          }\n\n          arrayLength = collectionKeys.length;\n\n          // locate existing items\n          length = nextBlockOrder.length = collectionKeys.length;\n          for(index = 0; index < length; index++) {\n           key = (collection === collectionKeys) ? index : collectionKeys[index];\n           value = collection[key];\n           trackById = trackByIdFn(key, value, index);\n           assertNotHasOwnProperty(trackById, '`track by` id');\n           if(lastBlockMap.hasOwnProperty(trackById)) {\n             block = lastBlockMap[trackById];\n             delete lastBlockMap[trackById];\n             nextBlockMap[trackById] = block;\n             nextBlockOrder[index] = block;\n           } else if (nextBlockMap.hasOwnProperty(trackById)) {\n             // restore lastBlockMap\n             forEach(nextBlockOrder, function(block) {\n               if (block && block.scope) lastBlockMap[block.id] = block;\n             });\n             // This is a duplicate and we need to throw an error\n             throw ngRepeatMinErr('dupes', \"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}\",\n                                                                                                                                                    expression,       trackById);\n           } else {\n             // new never before seen block\n             nextBlockOrder[index] = { id: trackById };\n             nextBlockMap[trackById] = false;\n           }\n         }\n\n          // remove existing items\n          for (key in lastBlockMap) {\n            // lastBlockMap is our own object so we don't need to use special hasOwnPropertyFn\n            if (lastBlockMap.hasOwnProperty(key)) {\n              block = lastBlockMap[key];\n              elementsToRemove = getBlockElements(block.clone);\n              $animate.leave(elementsToRemove);\n              forEach(elementsToRemove, function(element) { element[NG_REMOVED] = true; });\n              block.scope.$destroy();\n            }\n          }\n\n          // we are not using forEach for perf reasons (trying to avoid #call)\n          for (index = 0, length = collectionKeys.length; index < length; index++) {\n            key = (collection === collectionKeys) ? index : collectionKeys[index];\n            value = collection[key];\n            block = nextBlockOrder[index];\n            if (nextBlockOrder[index - 1]) previousNode = getBlockEnd(nextBlockOrder[index - 1]);\n\n            if (block.scope) {\n              // if we have already seen this object, then we need to reuse the\n              // associated scope/element\n              childScope = block.scope;\n\n              nextNode = previousNode;\n              do {\n                nextNode = nextNode.nextSibling;\n              } while(nextNode && nextNode[NG_REMOVED]);\n\n              if (getBlockStart(block) != nextNode) {\n                // existing item which got moved\n                $animate.move(getBlockElements(block.clone), null, jqLite(previousNode));\n              }\n              previousNode = getBlockEnd(block);\n            } else {\n              // new item which we don't know about\n              childScope = $scope.$new();\n            }\n\n            childScope[valueIdentifier] = value;\n            if (keyIdentifier) childScope[keyIdentifier] = key;\n            childScope.$index = index;\n            childScope.$first = (index === 0);\n            childScope.$last = (index === (arrayLength - 1));\n            childScope.$middle = !(childScope.$first || childScope.$last);\n            // jshint bitwise: false\n            childScope.$odd = !(childScope.$even = (index&1) === 0);\n            // jshint bitwise: true\n\n            if (!block.scope) {\n              $transclude(childScope, function(clone) {\n                clone[clone.length++] = document.createComment(' end ngRepeat: ' + expression + ' ');\n                $animate.enter(clone, null, jqLite(previousNode));\n                previousNode = clone;\n                block.scope = childScope;\n                // Note: We only need the first/last node of the cloned nodes.\n                // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n                // by a directive with templateUrl when it's template arrives.\n                block.clone = clone;\n                nextBlockMap[block.id] = block;\n              });\n            }\n          }\n          lastBlockMap = nextBlockMap;\n        });\n    }\n  };\n\n  function getBlockStart(block) {\n    return block.clone[0];\n  }\n\n  function getBlockEnd(block) {\n    return block.clone[block.clone.length - 1];\n  }\n}];\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngShow\n *\n * @description\n * The `ngShow` directive shows or hides the given HTML element based on the expression\n * provided to the ngShow attribute. The element is shown or hidden by removing or adding\n * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * <pre>\n * <!-- when $scope.myValue is truthy (element is visible) -->\n * <div ng-show=\"myValue\"></div>\n *\n * <!-- when $scope.myValue is falsy (element is hidden) -->\n * <div ng-show=\"myValue\" class=\"ng-hide\"></div>\n * </pre>\n *\n * When the ngShow expression evaluates to false then the ng-hide CSS class is added to the class attribute\n * on the element causing it to become hidden. When true, the ng-hide CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the .ng-hide CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding .ng-hide\n *\n * If you wish to change the hide behavior with ngShow/ngHide then this can be achieved by\n * restating the styles for the .ng-hide class in CSS:\n * <pre>\n * .ng-hide {\n *   //!annotate CSS Specificity|Not to worry, this will override the AngularJS default...\n *   display:block!important;\n *\n *   //this is just another form of hiding an element\n *   position:absolute;\n *   top:-9999px;\n *   left:-9999px;\n * }\n * </pre>\n *\n * Just remember to include the important flag so the CSS override will function.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Here is a list of values that ngShow will consider as a falsy value (case insensitive):<br />\n * \"f\" / \"0\" / \"false\" / \"no\" / \"n\" / \"[]\"\n * </div>\n * \n * ## A note about animations with ngShow\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass except that\n * you must also include the !important flag to override the display property\n * so that you can perform an animation when the element is hidden during the time of the animation.\n *\n * <pre>\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n *   transition:0.5s linear all;\n *   display:block!important;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * </pre>\n *\n * @animations\n * addClass: .ng-hide - happens after the ngShow expression evaluates to a truthy value and the just before contents are set to visible\n * removeClass: .ng-hide - happens after the ngShow expression evaluates to a non truthy value and just before the contents are set to hidden\n *\n * @element ANY\n * @param {expression} ngShow If the {@link guide/expression expression} is truthy\n *     then the element is shown or hidden respectively.\n *\n * @example\n  <example animations=\"true\">\n    <file name=\"index.html\">\n      Click me: <input type=\"checkbox\" ng-model=\"checked\"><br/>\n      <div>\n        Show:\n        <div class=\"check-element animate-show\" ng-show=\"checked\">\n          <span class=\"icon-thumbs-up\"></span> I show up when your checkbox is checked.\n        </div>\n      </div>\n      <div>\n        Hide:\n        <div class=\"check-element animate-show\" ng-hide=\"checked\">\n          <span class=\"icon-thumbs-down\"></span> I hide when your checkbox is checked.\n        </div>\n      </div>\n    </file>\n    <file name=\"animations.css\">\n      .animate-show {\n        -webkit-transition:all linear 0.5s;\n        transition:all linear 0.5s;\n        line-height:20px;\n        opacity:1;\n        padding:10px;\n        border:1px solid black;\n        background:white;\n      }\n\n      .animate-show.ng-hide-add,\n      .animate-show.ng-hide-remove {\n        display:block!important;\n      }\n\n      .animate-show.ng-hide {\n        line-height:0;\n        opacity:0;\n        padding:0 10px;\n      }\n\n      .check-element {\n        padding:10px;\n        border:1px solid black;\n        background:white;\n      }\n    </file>\n    <file name=\"protractorTest.js\">\n      var thumbsUp = element(by.css('.doc-example-live span.icon-thumbs-up'));\n      var thumbsDown = element(by.css('.doc-example-live span.icon-thumbs-down'));\n\n      it('should check ng-show / ng-hide', function() {\n        expect(thumbsUp.isDisplayed()).toBeFalsy();\n        expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n        element(by.model('checked')).click();\n\n        expect(thumbsUp.isDisplayed()).toBeTruthy();\n        expect(thumbsDown.isDisplayed()).toBeFalsy();\n      });\n    </file>\n  </example>\n */\nvar ngShowDirective = ['$animate', function($animate) {\n  return function(scope, element, attr) {\n    scope.$watch(attr.ngShow, function ngShowWatchAction(value){\n      $animate[toBoolean(value) ? 'removeClass' : 'addClass'](element, 'ng-hide');\n    });\n  };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngHide\n *\n * @description\n * The `ngHide` directive shows or hides the given HTML element based on the expression\n * provided to the ngHide attribute. The element is shown or hidden by removing or adding\n * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * <pre>\n * <!-- when $scope.myValue is truthy (element is hidden) -->\n * <div ng-hide=\"myValue\"></div>\n *\n * <!-- when $scope.myValue is falsy (element is visible) -->\n * <div ng-hide=\"myValue\" class=\"ng-hide\"></div>\n * </pre>\n *\n * When the ngHide expression evaluates to true then the .ng-hide CSS class is added to the class attribute\n * on the element causing it to become hidden. When false, the ng-hide CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the .ng-hide CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding .ng-hide\n *\n * If you wish to change the hide behavior with ngShow/ngHide then this can be achieved by\n * restating the styles for the .ng-hide class in CSS:\n * <pre>\n * .ng-hide {\n *   //!annotate CSS Specificity|Not to worry, this will override the AngularJS default...\n *   display:block!important;\n *\n *   //this is just another form of hiding an element\n *   position:absolute;\n *   top:-9999px;\n *   left:-9999px;\n * }\n * </pre>\n *\n * Just remember to include the important flag so the CSS override will function.\n * \n * <div class=\"alert alert-warning\">\n * **Note:** Here is a list of values that ngHide will consider as a falsy value (case insensitive):<br />\n * \"f\" / \"0\" / \"false\" / \"no\" / \"n\" / \"[]\"\n * </div>\n *\n * ## A note about animations with ngHide\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass, except that\n * you must also include the !important flag to override the display property so\n * that you can perform an animation when the element is hidden during the time of the animation.\n *\n * <pre>\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n *   transition:0.5s linear all;\n *   display:block!important;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * </pre>\n *\n * @animations\n * removeClass: .ng-hide - happens after the ngHide expression evaluates to a truthy value and just before the contents are set to hidden\n * addClass: .ng-hide - happens after the ngHide expression evaluates to a non truthy value and just before the contents are set to visible\n *\n * @element ANY\n * @param {expression} ngHide If the {@link guide/expression expression} is truthy then\n *     the element is shown or hidden respectively.\n *\n * @example\n  <example animations=\"true\">\n    <file name=\"index.html\">\n      Click me: <input type=\"checkbox\" ng-model=\"checked\"><br/>\n      <div>\n        Show:\n        <div class=\"check-element animate-hide\" ng-show=\"checked\">\n          <span class=\"icon-thumbs-up\"></span> I show up when your checkbox is checked.\n        </div>\n      </div>\n      <div>\n        Hide:\n        <div class=\"check-element animate-hide\" ng-hide=\"checked\">\n          <span class=\"icon-thumbs-down\"></span> I hide when your checkbox is checked.\n        </div>\n      </div>\n    </file>\n    <file name=\"animations.css\">\n      .animate-hide {\n        -webkit-transition:all linear 0.5s;\n        transition:all linear 0.5s;\n        line-height:20px;\n        opacity:1;\n        padding:10px;\n        border:1px solid black;\n        background:white;\n      }\n\n      .animate-hide.ng-hide-add,\n      .animate-hide.ng-hide-remove {\n        display:block!important;\n      }\n\n      .animate-hide.ng-hide {\n        line-height:0;\n        opacity:0;\n        padding:0 10px;\n      }\n\n      .check-element {\n        padding:10px;\n        border:1px solid black;\n        background:white;\n      }\n    </file>\n    <file name=\"protractorTest.js\">\n      var thumbsUp = element(by.css('.doc-example-live span.icon-thumbs-up'));\n      var thumbsDown = element(by.css('.doc-example-live span.icon-thumbs-down'));\n\n      it('should check ng-show / ng-hide', function() {\n        expect(thumbsUp.isDisplayed()).toBeFalsy();\n        expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n        element(by.model('checked')).click();\n\n        expect(thumbsUp.isDisplayed()).toBeTruthy();\n        expect(thumbsDown.isDisplayed()).toBeFalsy();\n      });\n    </file>\n  </example>\n */\nvar ngHideDirective = ['$animate', function($animate) {\n  return function(scope, element, attr) {\n    scope.$watch(attr.ngHide, function ngHideWatchAction(value){\n      $animate[toBoolean(value) ? 'addClass' : 'removeClass'](element, 'ng-hide');\n    });\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngStyle\n * @restrict AC\n *\n * @description\n * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.\n *\n * @element ANY\n * @param {expression} ngStyle {@link guide/expression Expression} which evals to an\n *      object whose keys are CSS style names and values are corresponding values for those CSS\n *      keys.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n        <input type=\"button\" value=\"set\" ng-click=\"myStyle={color:'red'}\">\n        <input type=\"button\" value=\"clear\" ng-click=\"myStyle={}\">\n        <br/>\n        <span ng-style=\"myStyle\">Sample Text</span>\n        <pre>myStyle={{myStyle}}</pre>\n     </file>\n     <file name=\"style.css\">\n       span {\n         color: black;\n       }\n     </file>\n     <file name=\"protractorTest.js\">\n       var colorSpan = element(by.css('.doc-example-live span'));\n\n       it('should check ng-style', function() {\n         expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n         element(by.css('.doc-example-live input[value=set]')).click();\n         expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');\n         element(by.css('.doc-example-live input[value=clear]')).click();\n         expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n       });\n     </file>\n   </example>\n */\nvar ngStyleDirective = ngDirective(function(scope, element, attr) {\n  scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {\n    if (oldStyles && (newStyles !== oldStyles)) {\n      forEach(oldStyles, function(val, style) { element.css(style, '');});\n    }\n    if (newStyles) element.css(newStyles);\n  }, true);\n});\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngSwitch\n * @restrict EA\n *\n * @description\n * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.\n * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location\n * as specified in the template.\n *\n * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it\n * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element\n * matches the value obtained from the evaluated expression. In other words, you define a container element\n * (where you place the directive), place an expression on the **`on=\"...\"` attribute**\n * (or the **`ng-switch=\"...\"` attribute**), define any inner elements inside of the directive and place\n * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on\n * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default\n * attribute is displayed.\n *\n * <div class=\"alert alert-info\">\n * Be aware that the attribute values to match against cannot be expressions. They are interpreted\n * as literal string values to match against.\n * For example, **`ng-switch-when=\"someVal\"`** will match against the string `\"someVal\"` not against the\n * value of the expression `$scope.someVal`.\n * </div>\n\n * @animations\n * enter - happens after the ngSwitch contents change and the matched child element is placed inside the container\n * leave - happens just after the ngSwitch contents change and just before the former contents are removed from the DOM\n *\n * @usage\n * <ANY ng-switch=\"expression\">\n *   <ANY ng-switch-when=\"matchValue1\">...</ANY>\n *   <ANY ng-switch-when=\"matchValue2\">...</ANY>\n *   <ANY ng-switch-default>...</ANY>\n * </ANY>\n *\n *\n * @scope\n * @priority 800\n * @param {*} ngSwitch|on expression to match against <tt>ng-switch-when</tt>.\n * @paramDescription\n * On child elements add:\n *\n * * `ngSwitchWhen`: the case statement to match against. If match then this\n *   case will be displayed. If the same match appears multiple times, all the\n *   elements will be displayed.\n * * `ngSwitchDefault`: the default case when no other case match. If there\n *   are multiple default cases, all of them will be displayed when no other\n *   case match.\n *\n *\n * @example\n  <example animations=\"true\">\n    <file name=\"index.html\">\n      <div ng-controller=\"Ctrl\">\n        <select ng-model=\"selection\" ng-options=\"item for item in items\">\n        </select>\n        <tt>selection={{selection}}</tt>\n        <hr/>\n        <div class=\"animate-switch-container\"\n          ng-switch on=\"selection\">\n            <div class=\"animate-switch\" ng-switch-when=\"settings\">Settings Div</div>\n            <div class=\"animate-switch\" ng-switch-when=\"home\">Home Span</div>\n            <div class=\"animate-switch\" ng-switch-default>default</div>\n        </div>\n      </div>\n    </file>\n    <file name=\"script.js\">\n      function Ctrl($scope) {\n        $scope.items = ['settings', 'home', 'other'];\n        $scope.selection = $scope.items[0];\n      }\n    </file>\n    <file name=\"animations.css\">\n      .animate-switch-container {\n        position:relative;\n        background:white;\n        border:1px solid black;\n        height:40px;\n        overflow:hidden;\n      }\n\n      .animate-switch {\n        padding:10px;\n      }\n\n      .animate-switch.ng-animate {\n        -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n        transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n        position:absolute;\n        top:0;\n        left:0;\n        right:0;\n        bottom:0;\n      }\n\n      .animate-switch.ng-leave.ng-leave-active,\n      .animate-switch.ng-enter {\n        top:-50px;\n      }\n      .animate-switch.ng-leave,\n      .animate-switch.ng-enter.ng-enter-active {\n        top:0;\n      }\n    </file>\n    <file name=\"protractorTest.js\">\n      var switchElem = element(by.css('.doc-example-live [ng-switch]'));\n      var select = element(by.model('selection'));\n\n      it('should start in settings', function() {\n        expect(switchElem.getText()).toMatch(/Settings Div/);\n      });\n      it('should change to home', function() {\n        select.element.all(by.css('option')).get(1).click();\n        expect(switchElem.getText()).toMatch(/Home Span/);\n      });\n      it('should select default', function() {\n        select.element.all(by.css('option')).get(2).click();\n        expect(switchElem.getText()).toMatch(/default/);\n      });\n    </file>\n  </example>\n */\nvar ngSwitchDirective = ['$animate', function($animate) {\n  return {\n    restrict: 'EA',\n    require: 'ngSwitch',\n\n    // asks for $scope to fool the BC controller module\n    controller: ['$scope', function ngSwitchController() {\n     this.cases = {};\n    }],\n    link: function(scope, element, attr, ngSwitchController) {\n      var watchExpr = attr.ngSwitch || attr.on,\n          selectedTranscludes,\n          selectedElements,\n          selectedScopes = [];\n\n      scope.$watch(watchExpr, function ngSwitchWatchAction(value) {\n        for (var i= 0, ii=selectedScopes.length; i<ii; i++) {\n          selectedScopes[i].$destroy();\n          $animate.leave(selectedElements[i]);\n        }\n\n        selectedElements = [];\n        selectedScopes = [];\n\n        if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {\n          scope.$eval(attr.change);\n          forEach(selectedTranscludes, function(selectedTransclude) {\n            var selectedScope = scope.$new();\n            selectedScopes.push(selectedScope);\n            selectedTransclude.transclude(selectedScope, function(caseElement) {\n              var anchor = selectedTransclude.element;\n\n              selectedElements.push(caseElement);\n              $animate.enter(caseElement, anchor.parent(), anchor);\n            });\n          });\n        }\n      });\n    }\n  };\n}];\n\nvar ngSwitchWhenDirective = ngDirective({\n  transclude: 'element',\n  priority: 800,\n  require: '^ngSwitch',\n  link: function(scope, element, attrs, ctrl, $transclude) {\n    ctrl.cases['!' + attrs.ngSwitchWhen] = (ctrl.cases['!' + attrs.ngSwitchWhen] || []);\n    ctrl.cases['!' + attrs.ngSwitchWhen].push({ transclude: $transclude, element: element });\n  }\n});\n\nvar ngSwitchDefaultDirective = ngDirective({\n  transclude: 'element',\n  priority: 800,\n  require: '^ngSwitch',\n  link: function(scope, element, attr, ctrl, $transclude) {\n    ctrl.cases['?'] = (ctrl.cases['?'] || []);\n    ctrl.cases['?'].push({ transclude: $transclude, element: element });\n   }\n});\n\n/**\n * @ngdoc directive\n * @name ng.directive:ngTransclude\n * @restrict AC\n *\n * @description\n * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.\n *\n * Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.\n *\n * @element ANY\n *\n * @example\n   <doc:example module=\"transclude\">\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.title = 'Lorem Ipsum';\n           $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';\n         }\n\n         angular.module('transclude', [])\n          .directive('pane', function(){\n             return {\n               restrict: 'E',\n               transclude: true,\n               scope: { title:'@' },\n               template: '<div style=\"border: 1px solid black;\">' +\n                           '<div style=\"background-color: gray\">{{title}}</div>' +\n                           '<div ng-transclude></div>' +\n                         '</div>'\n             };\n         });\n       </script>\n       <div ng-controller=\"Ctrl\">\n         <input ng-model=\"title\"><br>\n         <textarea ng-model=\"text\"></textarea> <br/>\n         <pane title=\"{{title}}\">{{text}}</pane>\n       </div>\n     </doc:source>\n     <doc:protractor>\n        it('should have transcluded', function() {\n          var titleElement = element(by.model('title'));\n          titleElement.clear();\n          titleElement.sendKeys('TITLE');\n          var textElement = element(by.model('text'));\n          textElement.clear();\n          textElement.sendKeys('TEXT');\n          expect(element(by.binding('title')).getText()).toEqual('TITLE');\n          expect(element(by.binding('text')).getText()).toEqual('TEXT');\n        });\n     </doc:protractor>\n   </doc:example>\n *\n */\nvar ngTranscludeDirective = ngDirective({\n  controller: ['$element', '$transclude', function($element, $transclude) {\n    if (!$transclude) {\n      throw minErr('ngTransclude')('orphan',\n          'Illegal use of ngTransclude directive in the template! ' +\n          'No parent directive that requires a transclusion found. ' +\n          'Element: {0}',\n          startingTag($element));\n    }\n\n    // remember the transclusion fn but call it during linking so that we don't process transclusion before directives on\n    // the parent element even when the transclusion replaces the current element. (we can't use priority here because\n    // that applies only to compile fns and not controllers\n    this.$transclude = $transclude;\n  }],\n\n  link: function($scope, $element, $attrs, controller) {\n    controller.$transclude(function(clone) {\n      $element.empty();\n      $element.append(clone);\n    });\n  }\n});\n\n/**\n * @ngdoc directive\n * @name ng.directive:script\n * @restrict E\n *\n * @description\n * Load the content of a `<script>` element into {@link api/ng.$templateCache `$templateCache`}, so that the\n * template can be used by {@link api/ng.directive:ngInclude `ngInclude`},\n * {@link api/ngRoute.directive:ngView `ngView`}, or {@link guide/directive directives}. The type of the\n * `<script>` element must be specified as `text/ng-template`, and a cache name for the template must be\n * assigned through the element's `id`, which can then be used as a directive's `templateUrl`.\n *\n * @param {'text/ng-template'} type Must be set to `'text/ng-template'`.\n * @param {string} id Cache name of the template.\n *\n * @example\n  <doc:example>\n    <doc:source>\n      <script type=\"text/ng-template\" id=\"/tpl.html\">\n        Content of the template.\n      </script>\n\n      <a ng-click=\"currentTpl='/tpl.html'\" id=\"tpl-link\">Load inlined template</a>\n      <div id=\"tpl-content\" ng-include src=\"currentTpl\"></div>\n    </doc:source>\n    <doc:protractor>\n      it('should load template defined inside script tag', function() {\n        element(by.css('#tpl-link')).click();\n        expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);\n      });\n    </doc:protractor>\n  </doc:example>\n */\nvar scriptDirective = ['$templateCache', function($templateCache) {\n  return {\n    restrict: 'E',\n    terminal: true,\n    compile: function(element, attr) {\n      if (attr.type == 'text/ng-template') {\n        var templateUrl = attr.id,\n            // IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent\n            text = element[0].text;\n\n        $templateCache.put(templateUrl, text);\n      }\n    }\n  };\n}];\n\nvar ngOptionsMinErr = minErr('ngOptions');\n/**\n * @ngdoc directive\n * @name ng.directive:select\n * @restrict E\n *\n * @description\n * HTML `SELECT` element with angular data-binding.\n *\n * # `ngOptions`\n *\n * The `ngOptions` attribute can be used to dynamically generate a list of `<option>`\n * elements for the `<select>` element using the array or object obtained by evaluating the\n * `ngOptions` comprehension_expression.\n *\n * When an item in the `<select>` menu is selected, the array element or object property\n * represented by the selected option will be bound to the model identified by the `ngModel`\n * directive.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** `ngModel` compares by reference, not value. This is important when binding to an\n * array of objects. See an example {@link http://jsfiddle.net/qWzTb/ in this jsfiddle}.\n * </div>\n *\n * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can\n * be nested into the `<select>` element. This element will then represent the `null` or \"not selected\"\n * option. See example below for demonstration.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** `ngOptions` provides an iterator facility for the `<option>` element which should be used instead\n * of {@link ng.directive:ngRepeat ngRepeat} when you want the\n * `select` model to be bound to a non-string value. This is because an option element can only\n * be bound to string values at present.\n * </div>\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required The control is considered valid only if value is entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n *    `required` when you want to data-bind to the `required` attribute.\n * @param {comprehension_expression=} ngOptions in one of the following forms:\n *\n *   * for array data sources:\n *     * `label` **`for`** `value` **`in`** `array`\n *     * `select` **`as`** `label` **`for`** `value` **`in`** `array`\n *     * `label`  **`group by`** `group` **`for`** `value` **`in`** `array`\n *     * `select` **`as`** `label` **`group by`** `group` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`\n *   * for object data sources:\n *     * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n *     * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n *     * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`\n *     * `select` **`as`** `label` **`group by`** `group`\n *         **`for` `(`**`key`**`,`** `value`**`) in`** `object`\n *\n * Where:\n *\n *   * `array` / `object`: an expression which evaluates to an array / object to iterate over.\n *   * `value`: local variable which will refer to each item in the `array` or each property value\n *      of `object` during iteration.\n *   * `key`: local variable which will refer to a property name in `object` during iteration.\n *   * `label`: The result of this expression will be the label for `<option>` element. The\n *     `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).\n *   * `select`: The result of this expression will be bound to the model of the parent `<select>`\n *      element. If not specified, `select` expression will default to `value`.\n *   * `group`: The result of this expression will be used to group options using the `<optgroup>`\n *      DOM element.\n *   * `trackexpr`: Used when working with an array of objects. The result of this expression will be\n *      used to identify the objects in the array. The `trackexpr` will most likely refer to the\n *     `value` variable (e.g. `value.propertyName`).\n *\n * @example\n    <doc:example>\n      <doc:source>\n        <script>\n        function MyCntrl($scope) {\n          $scope.colors = [\n            {name:'black', shade:'dark'},\n            {name:'white', shade:'light'},\n            {name:'red', shade:'dark'},\n            {name:'blue', shade:'dark'},\n            {name:'yellow', shade:'light'}\n          ];\n          $scope.color = $scope.colors[2]; // red\n        }\n        </script>\n        <div ng-controller=\"MyCntrl\">\n          <ul>\n            <li ng-repeat=\"color in colors\">\n              Name: <input ng-model=\"color.name\">\n              [<a href ng-click=\"colors.splice($index, 1)\">X</a>]\n            </li>\n            <li>\n              [<a href ng-click=\"colors.push({})\">add</a>]\n            </li>\n          </ul>\n          <hr/>\n          Color (null not allowed):\n          <select ng-model=\"color\" ng-options=\"c.name for c in colors\"></select><br>\n\n          Color (null allowed):\n          <span  class=\"nullable\">\n            <select ng-model=\"color\" ng-options=\"c.name for c in colors\">\n              <option value=\"\">-- choose color --</option>\n            </select>\n          </span><br/>\n\n          Color grouped by shade:\n          <select ng-model=\"color\" ng-options=\"c.name group by c.shade for c in colors\">\n          </select><br/>\n\n\n          Select <a href ng-click=\"color={name:'not in list'}\">bogus</a>.<br>\n          <hr/>\n          Currently selected: {{ {selected_color:color}  }}\n          <div style=\"border:solid 1px black; height:20px\"\n               ng-style=\"{'background-color':color.name}\">\n          </div>\n        </div>\n      </doc:source>\n      <doc:protractor>\n         it('should check ng-options', function() {\n           expect(element(by.binding('{selected_color:color}')).getText()).toMatch('red');\n           element.all(by.select('color')).first().click();\n           element.all(by.css('select[ng-model=\"color\"] option')).first().click();\n           expect(element(by.binding('{selected_color:color}')).getText()).toMatch('black');\n           element(by.css('.nullable select[ng-model=\"color\"]')).click();\n           element.all(by.css('.nullable select[ng-model=\"color\"] option')).first().click();\n           expect(element(by.binding('{selected_color:color}')).getText()).toMatch('null');\n         });\n      </doc:protractor>\n    </doc:example>\n */\n\nvar ngOptionsDirective = valueFn({ terminal: true });\n// jshint maxlen: false\nvar selectDirective = ['$compile', '$parse', function($compile,   $parse) {\n                         //000011111111110000000000022222222220000000000000000000003333333333000000000000004444444444444440000000005555555555555550000000666666666666666000000000000000777777777700000000000000000008888888888\n  var NG_OPTIONS_REGEXP = /^\\s*([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+group\\s+by\\s+([\\s\\S]+?))?\\s+for\\s+(?:([\\$\\w][\\$\\w]*)|(?:\\(\\s*([\\$\\w][\\$\\w]*)\\s*,\\s*([\\$\\w][\\$\\w]*)\\s*\\)))\\s+in\\s+([\\s\\S]+?)(?:\\s+track\\s+by\\s+([\\s\\S]+?))?$/,\n      nullModelCtrl = {$setViewValue: noop};\n// jshint maxlen: 100\n\n  return {\n    restrict: 'E',\n    require: ['select', '?ngModel'],\n    controller: ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {\n      var self = this,\n          optionsMap = {},\n          ngModelCtrl = nullModelCtrl,\n          nullOption,\n          unknownOption;\n\n\n      self.databound = $attrs.ngModel;\n\n\n      self.init = function(ngModelCtrl_, nullOption_, unknownOption_) {\n        ngModelCtrl = ngModelCtrl_;\n        nullOption = nullOption_;\n        unknownOption = unknownOption_;\n      };\n\n\n      self.addOption = function(value) {\n        assertNotHasOwnProperty(value, '\"option value\"');\n        optionsMap[value] = true;\n\n        if (ngModelCtrl.$viewValue == value) {\n          $element.val(value);\n          if (unknownOption.parent()) unknownOption.remove();\n        }\n      };\n\n\n      self.removeOption = function(value) {\n        if (this.hasOption(value)) {\n          delete optionsMap[value];\n          if (ngModelCtrl.$viewValue == value) {\n            this.renderUnknownOption(value);\n          }\n        }\n      };\n\n\n      self.renderUnknownOption = function(val) {\n        var unknownVal = '? ' + hashKey(val) + ' ?';\n        unknownOption.val(unknownVal);\n        $element.prepend(unknownOption);\n        $element.val(unknownVal);\n        unknownOption.prop('selected', true); // needed for IE\n      };\n\n\n      self.hasOption = function(value) {\n        return optionsMap.hasOwnProperty(value);\n      };\n\n      $scope.$on('$destroy', function() {\n        // disable unknown option so that we don't do work when the whole select is being destroyed\n        self.renderUnknownOption = noop;\n      });\n    }],\n\n    link: function(scope, element, attr, ctrls) {\n      // if ngModel is not defined, we don't need to do anything\n      if (!ctrls[1]) return;\n\n      var selectCtrl = ctrls[0],\n          ngModelCtrl = ctrls[1],\n          multiple = attr.multiple,\n          optionsExp = attr.ngOptions,\n          nullOption = false, // if false, user will not be able to select it (used by ngOptions)\n          emptyOption,\n          // we can't just jqLite('<option>') since jqLite is not smart enough\n          // to create it in <select> and IE barfs otherwise.\n          optionTemplate = jqLite(document.createElement('option')),\n          optGroupTemplate =jqLite(document.createElement('optgroup')),\n          unknownOption = optionTemplate.clone();\n\n      // find \"null\" option\n      for(var i = 0, children = element.children(), ii = children.length; i < ii; i++) {\n        if (children[i].value === '') {\n          emptyOption = nullOption = children.eq(i);\n          break;\n        }\n      }\n\n      selectCtrl.init(ngModelCtrl, nullOption, unknownOption);\n\n      // required validator\n      if (multiple) {\n        ngModelCtrl.$isEmpty = function(value) {\n          return !value || value.length === 0;\n        };\n      }\n\n      if (optionsExp) setupAsOptions(scope, element, ngModelCtrl);\n      else if (multiple) setupAsMultiple(scope, element, ngModelCtrl);\n      else setupAsSingle(scope, element, ngModelCtrl, selectCtrl);\n\n\n      ////////////////////////////\n\n\n\n      function setupAsSingle(scope, selectElement, ngModelCtrl, selectCtrl) {\n        ngModelCtrl.$render = function() {\n          var viewValue = ngModelCtrl.$viewValue;\n\n          if (selectCtrl.hasOption(viewValue)) {\n            if (unknownOption.parent()) unknownOption.remove();\n            selectElement.val(viewValue);\n            if (viewValue === '') emptyOption.prop('selected', true); // to make IE9 happy\n          } else {\n            if (isUndefined(viewValue) && emptyOption) {\n              selectElement.val('');\n            } else {\n              selectCtrl.renderUnknownOption(viewValue);\n            }\n          }\n        };\n\n        selectElement.on('change', function() {\n          scope.$apply(function() {\n            if (unknownOption.parent()) unknownOption.remove();\n            ngModelCtrl.$setViewValue(selectElement.val());\n          });\n        });\n      }\n\n      function setupAsMultiple(scope, selectElement, ctrl) {\n        var lastView;\n        ctrl.$render = function() {\n          var items = new HashMap(ctrl.$viewValue);\n          forEach(selectElement.find('option'), function(option) {\n            option.selected = isDefined(items.get(option.value));\n          });\n        };\n\n        // we have to do it on each watch since ngModel watches reference, but\n        // we need to work of an array, so we need to see if anything was inserted/removed\n        scope.$watch(function selectMultipleWatch() {\n          if (!equals(lastView, ctrl.$viewValue)) {\n            lastView = copy(ctrl.$viewValue);\n            ctrl.$render();\n          }\n        });\n\n        selectElement.on('change', function() {\n          scope.$apply(function() {\n            var array = [];\n            forEach(selectElement.find('option'), function(option) {\n              if (option.selected) {\n                array.push(option.value);\n              }\n            });\n            ctrl.$setViewValue(array);\n          });\n        });\n      }\n\n      function setupAsOptions(scope, selectElement, ctrl) {\n        var match;\n\n        if (! (match = optionsExp.match(NG_OPTIONS_REGEXP))) {\n          throw ngOptionsMinErr('iexp',\n            \"Expected expression in form of \" +\n            \"'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'\" +\n            \" but got '{0}'. Element: {1}\",\n            optionsExp, startingTag(selectElement));\n        }\n\n        var displayFn = $parse(match[2] || match[1]),\n            valueName = match[4] || match[6],\n            keyName = match[5],\n            groupByFn = $parse(match[3] || ''),\n            valueFn = $parse(match[2] ? match[1] : valueName),\n            valuesFn = $parse(match[7]),\n            track = match[8],\n            trackFn = track ? $parse(match[8]) : null,\n            // This is an array of array of existing option groups in DOM.\n            // We try to reuse these if possible\n            // - optionGroupsCache[0] is the options with no option group\n            // - optionGroupsCache[?][0] is the parent: either the SELECT or OPTGROUP element\n            optionGroupsCache = [[{element: selectElement, label:''}]];\n\n        if (nullOption) {\n          // compile the element since there might be bindings in it\n          $compile(nullOption)(scope);\n\n          // remove the class, which is added automatically because we recompile the element and it\n          // becomes the compilation root\n          nullOption.removeClass('ng-scope');\n\n          // we need to remove it before calling selectElement.empty() because otherwise IE will\n          // remove the label from the element. wtf?\n          nullOption.remove();\n        }\n\n        // clear contents, we'll add what's needed based on the model\n        selectElement.empty();\n\n        selectElement.on('change', function() {\n          scope.$apply(function() {\n            var optionGroup,\n                collection = valuesFn(scope) || [],\n                locals = {},\n                key, value, optionElement, index, groupIndex, length, groupLength, trackIndex;\n\n            if (multiple) {\n              value = [];\n              for (groupIndex = 0, groupLength = optionGroupsCache.length;\n                   groupIndex < groupLength;\n                   groupIndex++) {\n                // list of options for that group. (first item has the parent)\n                optionGroup = optionGroupsCache[groupIndex];\n\n                for(index = 1, length = optionGroup.length; index < length; index++) {\n                  if ((optionElement = optionGroup[index].element)[0].selected) {\n                    key = optionElement.val();\n                    if (keyName) locals[keyName] = key;\n                    if (trackFn) {\n                      for (trackIndex = 0; trackIndex < collection.length; trackIndex++) {\n                        locals[valueName] = collection[trackIndex];\n                        if (trackFn(scope, locals) == key) break;\n                      }\n                    } else {\n                      locals[valueName] = collection[key];\n                    }\n                    value.push(valueFn(scope, locals));\n                  }\n                }\n              }\n            } else {\n              key = selectElement.val();\n              if (key == '?') {\n                value = undefined;\n              } else if (key === ''){\n                value = null;\n              } else {\n                if (trackFn) {\n                  for (trackIndex = 0; trackIndex < collection.length; trackIndex++) {\n                    locals[valueName] = collection[trackIndex];\n                    if (trackFn(scope, locals) == key) {\n                      value = valueFn(scope, locals);\n                      break;\n                    }\n                  }\n                } else {\n                  locals[valueName] = collection[key];\n                  if (keyName) locals[keyName] = key;\n                  value = valueFn(scope, locals);\n                }\n              }\n            }\n            ctrl.$setViewValue(value);\n          });\n        });\n\n        ctrl.$render = render;\n\n        // TODO(vojta): can't we optimize this ?\n        scope.$watch(render);\n\n        function render() {\n              // Temporary location for the option groups before we render them\n          var optionGroups = {'':[]},\n              optionGroupNames = [''],\n              optionGroupName,\n              optionGroup,\n              option,\n              existingParent, existingOptions, existingOption,\n              modelValue = ctrl.$modelValue,\n              values = valuesFn(scope) || [],\n              keys = keyName ? sortedKeys(values) : values,\n              key,\n              groupLength, length,\n              groupIndex, index,\n              locals = {},\n              selected,\n              selectedSet = false, // nothing is selected yet\n              lastElement,\n              element,\n              label;\n\n          if (multiple) {\n            if (trackFn && isArray(modelValue)) {\n              selectedSet = new HashMap([]);\n              for (var trackIndex = 0; trackIndex < modelValue.length; trackIndex++) {\n                locals[valueName] = modelValue[trackIndex];\n                selectedSet.put(trackFn(scope, locals), modelValue[trackIndex]);\n              }\n            } else {\n              selectedSet = new HashMap(modelValue);\n            }\n          }\n\n          // We now build up the list of options we need (we merge later)\n          for (index = 0; length = keys.length, index < length; index++) {\n\n            key = index;\n            if (keyName) {\n              key = keys[index];\n              if ( key.charAt(0) === '$' ) continue;\n              locals[keyName] = key;\n            }\n\n            locals[valueName] = values[key];\n\n            optionGroupName = groupByFn(scope, locals) || '';\n            if (!(optionGroup = optionGroups[optionGroupName])) {\n              optionGroup = optionGroups[optionGroupName] = [];\n              optionGroupNames.push(optionGroupName);\n            }\n            if (multiple) {\n              selected = isDefined(\n                selectedSet.remove(trackFn ? trackFn(scope, locals) : valueFn(scope, locals))\n              );\n            } else {\n              if (trackFn) {\n                var modelCast = {};\n                modelCast[valueName] = modelValue;\n                selected = trackFn(scope, modelCast) === trackFn(scope, locals);\n              } else {\n                selected = modelValue === valueFn(scope, locals);\n              }\n              selectedSet = selectedSet || selected; // see if at least one item is selected\n            }\n            label = displayFn(scope, locals); // what will be seen by the user\n\n            // doing displayFn(scope, locals) || '' overwrites zero values\n            label = isDefined(label) ? label : '';\n            optionGroup.push({\n              // either the index into array or key from object\n              id: trackFn ? trackFn(scope, locals) : (keyName ? keys[index] : index),\n              label: label,\n              selected: selected                   // determine if we should be selected\n            });\n          }\n          if (!multiple) {\n            if (nullOption || modelValue === null) {\n              // insert null option if we have a placeholder, or the model is null\n              optionGroups[''].unshift({id:'', label:'', selected:!selectedSet});\n            } else if (!selectedSet) {\n              // option could not be found, we have to insert the undefined item\n              optionGroups[''].unshift({id:'?', label:'', selected:true});\n            }\n          }\n\n          // Now we need to update the list of DOM nodes to match the optionGroups we computed above\n          for (groupIndex = 0, groupLength = optionGroupNames.length;\n               groupIndex < groupLength;\n               groupIndex++) {\n            // current option group name or '' if no group\n            optionGroupName = optionGroupNames[groupIndex];\n\n            // list of options for that group. (first item has the parent)\n            optionGroup = optionGroups[optionGroupName];\n\n            if (optionGroupsCache.length <= groupIndex) {\n              // we need to grow the optionGroups\n              existingParent = {\n                element: optGroupTemplate.clone().attr('label', optionGroupName),\n                label: optionGroup.label\n              };\n              existingOptions = [existingParent];\n              optionGroupsCache.push(existingOptions);\n              selectElement.append(existingParent.element);\n            } else {\n              existingOptions = optionGroupsCache[groupIndex];\n              existingParent = existingOptions[0];  // either SELECT (no group) or OPTGROUP element\n\n              // update the OPTGROUP label if not the same.\n              if (existingParent.label != optionGroupName) {\n                existingParent.element.attr('label', existingParent.label = optionGroupName);\n              }\n            }\n\n            lastElement = null;  // start at the beginning\n            for(index = 0, length = optionGroup.length; index < length; index++) {\n              option = optionGroup[index];\n              if ((existingOption = existingOptions[index+1])) {\n                // reuse elements\n                lastElement = existingOption.element;\n                if (existingOption.label !== option.label) {\n                  lastElement.text(existingOption.label = option.label);\n                }\n                if (existingOption.id !== option.id) {\n                  lastElement.val(existingOption.id = option.id);\n                }\n                // lastElement.prop('selected') provided by jQuery has side-effects\n                if (lastElement[0].selected !== option.selected) {\n                  lastElement.prop('selected', (existingOption.selected = option.selected));\n                }\n              } else {\n                // grow elements\n\n                // if it's a null option\n                if (option.id === '' && nullOption) {\n                  // put back the pre-compiled element\n                  element = nullOption;\n                } else {\n                  // jQuery(v1.4.2) Bug: We should be able to chain the method calls, but\n                  // in this version of jQuery on some browser the .text() returns a string\n                  // rather then the element.\n                  (element = optionTemplate.clone())\n                      .val(option.id)\n                      .attr('selected', option.selected)\n                      .text(option.label);\n                }\n\n                existingOptions.push(existingOption = {\n                    element: element,\n                    label: option.label,\n                    id: option.id,\n                    selected: option.selected\n                });\n                if (lastElement) {\n                  lastElement.after(element);\n                } else {\n                  existingParent.element.append(element);\n                }\n                lastElement = element;\n              }\n            }\n            // remove any excessive OPTIONs in a group\n            index++; // increment since the existingOptions[0] is parent element not OPTION\n            while(existingOptions.length > index) {\n              existingOptions.pop().element.remove();\n            }\n          }\n          // remove any excessive OPTGROUPs from select\n          while(optionGroupsCache.length > groupIndex) {\n            optionGroupsCache.pop()[0].element.remove();\n          }\n        }\n      }\n    }\n  };\n}];\n\nvar optionDirective = ['$interpolate', function($interpolate) {\n  var nullSelectCtrl = {\n    addOption: noop,\n    removeOption: noop\n  };\n\n  return {\n    restrict: 'E',\n    priority: 100,\n    compile: function(element, attr) {\n      if (isUndefined(attr.value)) {\n        var interpolateFn = $interpolate(element.text(), true);\n        if (!interpolateFn) {\n          attr.$set('value', element.text());\n        }\n      }\n\n      return function (scope, element, attr) {\n        var selectCtrlName = '$selectController',\n            parent = element.parent(),\n            selectCtrl = parent.data(selectCtrlName) ||\n              parent.parent().data(selectCtrlName); // in case we are in optgroup\n\n        if (selectCtrl && selectCtrl.databound) {\n          // For some reason Opera defaults to true and if not overridden this messes up the repeater.\n          // We don't want the view to drive the initialization of the model anyway.\n          element.prop('selected', false);\n        } else {\n          selectCtrl = nullSelectCtrl;\n        }\n\n        if (interpolateFn) {\n          scope.$watch(interpolateFn, function interpolateWatchAction(newVal, oldVal) {\n            attr.$set('value', newVal);\n            if (newVal !== oldVal) selectCtrl.removeOption(oldVal);\n            selectCtrl.addOption(newVal);\n          });\n        } else {\n          selectCtrl.addOption(attr.value);\n        }\n\n        element.on('$destroy', function() {\n          selectCtrl.removeOption(attr.value);\n        });\n      };\n    }\n  };\n}];\n\nvar styleDirective = valueFn({\n  restrict: 'E',\n  terminal: true\n});\n\n  //try to bind to jquery now so that one can write angular.element().read()\n  //but we will rebind on bootstrap again.\n  bindJQuery();\n\n  publishExternalAPI(angular);\n\n  jqLite(document).ready(function() {\n    angularInit(document, bootstrap);\n  });\n\n})(window, document);\n\n!angular.$$csp() && angular.element(document).find('head').prepend('<style type=\"text/css\">@charset \"UTF-8\";[ng\\\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\\\:form{display:block;}</style>');\n/*!\n * ionic.bundle.js is a concatenation of:\n * ionic.js, angular.js, angular-animate.js,\n * angular-ui-router.js, and ionic-angular.js\n */\n\n/**\n * @license AngularJS v1.2.12\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\n/* jshint maxlen: false */\n\n/**\n * @ngdoc overview\n * @name ngAnimate\n * @description\n *\n * # ngAnimate\n *\n * The `ngAnimate` module provides support for JavaScript, CSS3 transition and CSS3 keyframe animation hooks within existing core and custom directives.\n *\n * {@installModule animate}\n *\n * <div doc-module-components=\"ngAnimate\"></div>\n *\n * # Usage\n *\n * To see animations in action, all that is required is to define the appropriate CSS classes\n * or to register a JavaScript animation via the myModule.animation() function. The directives that support animation automatically are:\n * `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation\n * by using the `$animate` service.\n *\n * Below is a more detailed breakdown of the supported animation events provided by pre-existing ng directives:\n *\n * | Directive                                                 | Supported Animations                               |\n * |---------------------------------------------------------- |----------------------------------------------------|\n * | {@link ng.directive:ngRepeat#usage_animations ngRepeat}         | enter, leave and move                              |\n * | {@link ngRoute.directive:ngView#usage_animations ngView}        | enter and leave                                    |\n * | {@link ng.directive:ngInclude#usage_animations ngInclude}       | enter and leave                                    |\n * | {@link ng.directive:ngSwitch#usage_animations ngSwitch}         | enter and leave                                    |\n * | {@link ng.directive:ngIf#usage_animations ngIf}                 | enter and leave                                    |\n * | {@link ng.directive:ngClass#usage_animations ngClass}           | add and remove                                     |\n * | {@link ng.directive:ngShow#usage_animations ngShow & ngHide}    | add and remove (the ng-hide class value)           |\n *\n * You can find out more information about animations upon visiting each directive page.\n *\n * Below is an example of how to apply animations to a directive that supports animation hooks:\n *\n * <pre>\n * <style type=\"text/css\">\n * .slide.ng-enter, .slide.ng-leave {\n *   -webkit-transition:0.5s linear all;\n *   transition:0.5s linear all;\n * }\n *\n * .slide.ng-enter { }        /&#42; starting animations for enter &#42;/\n * .slide.ng-enter-active { } /&#42; terminal animations for enter &#42;/\n * .slide.ng-leave { }        /&#42; starting animations for leave &#42;/\n * .slide.ng-leave-active { } /&#42; terminal animations for leave &#42;/\n * </style>\n *\n * <!--\n * the animate service will automatically add .ng-enter and .ng-leave to the element\n * to trigger the CSS transition/animations\n * -->\n * <ANY class=\"slide\" ng-include=\"...\"></ANY>\n * </pre>\n *\n * Keep in mind that if an animation is running, any child elements cannot be animated until the parent element's\n * animation has completed.\n *\n * <h2>CSS-defined Animations</h2>\n * The animate service will automatically apply two CSS classes to the animated element and these two CSS classes\n * are designed to contain the start and end CSS styling. Both CSS transitions and keyframe animations are supported\n * and can be used to play along with this naming structure.\n *\n * The following code below demonstrates how to perform animations using **CSS transitions** with Angular:\n *\n * <pre>\n * <style type=\"text/css\">\n * /&#42;\n *  The animate class is apart of the element and the ng-enter class\n *  is attached to the element once the enter animation event is triggered\n * &#42;/\n * .reveal-animation.ng-enter {\n *  -webkit-transition: 1s linear all; /&#42; Safari/Chrome &#42;/\n *  transition: 1s linear all; /&#42; All other modern browsers and IE10+ &#42;/\n *\n *  /&#42; The animation preparation code &#42;/\n *  opacity: 0;\n * }\n *\n * /&#42;\n *  Keep in mind that you want to combine both CSS\n *  classes together to avoid any CSS-specificity\n *  conflicts\n * &#42;/\n * .reveal-animation.ng-enter.ng-enter-active {\n *  /&#42; The animation code itself &#42;/\n *  opacity: 1;\n * }\n * </style>\n *\n * <div class=\"view-container\">\n *   <div ng-view class=\"reveal-animation\"></div>\n * </div>\n * </pre>\n *\n * The following code below demonstrates how to perform animations using **CSS animations** with Angular:\n *\n * <pre>\n * <style type=\"text/css\">\n * .reveal-animation.ng-enter {\n *   -webkit-animation: enter_sequence 1s linear; /&#42; Safari/Chrome &#42;/\n *   animation: enter_sequence 1s linear; /&#42; IE10+ and Future Browsers &#42;/\n * }\n * &#64-webkit-keyframes enter_sequence {\n *   from { opacity:0; }\n *   to { opacity:1; }\n * }\n * &#64keyframes enter_sequence {\n *   from { opacity:0; }\n *   to { opacity:1; }\n * }\n * </style>\n *\n * <div class=\"view-container\">\n *   <div ng-view class=\"reveal-animation\"></div>\n * </div>\n * </pre>\n *\n * Both CSS3 animations and transitions can be used together and the animate service will figure out the correct duration and delay timing.\n *\n * Upon DOM mutation, the event class is added first (something like `ng-enter`), then the browser prepares itself to add\n * the active class (in this case `ng-enter-active`) which then triggers the animation. The animation module will automatically\n * detect the CSS code to determine when the animation ends. Once the animation is over then both CSS classes will be\n * removed from the DOM. If a browser does not support CSS transitions or CSS animations then the animation will start and end\n * immediately resulting in a DOM element that is at its final state. This final state is when the DOM element\n * has no CSS transition/animation classes applied to it.\n *\n * <h3>CSS Staggering Animations</h3>\n * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a\n * curtain-like effect. The ngAnimate module, as of 1.2.0, supports staggering animations and the stagger effect can be\n * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for\n * the animation. The style property expected within the stagger class can either be a **transition-delay** or an\n * **animation-delay** property (or both if your animation contains both transitions and keyframe animations).\n *\n * <pre>\n * .my-animation.ng-enter {\n *   /&#42; standard transition code &#42;/\n *   -webkit-transition: 1s linear all;\n *   transition: 1s linear all;\n *   opacity:0;\n * }\n * .my-animation.ng-enter-stagger {\n *   /&#42; this will have a 100ms delay between each successive leave animation &#42;/\n *   -webkit-transition-delay: 0.1s;\n *   transition-delay: 0.1s;\n *\n *   /&#42; in case the stagger doesn't work then these two values\n *    must be set to 0 to avoid an accidental CSS inheritance &#42;/\n *   -webkit-transition-duration: 0s;\n *   transition-duration: 0s;\n * }\n * .my-animation.ng-enter.ng-enter-active {\n *   /&#42; standard transition styles &#42;/\n *   opacity:1;\n * }\n * </pre>\n *\n * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations\n * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this\n * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation\n * will also be reset if more than 10ms has passed after the last animation has been fired.\n *\n * The following code will issue the **ng-leave-stagger** event on the element provided:\n *\n * <pre>\n * var kids = parent.children();\n *\n * $animate.leave(kids[0]); //stagger index=0\n * $animate.leave(kids[1]); //stagger index=1\n * $animate.leave(kids[2]); //stagger index=2\n * $animate.leave(kids[3]); //stagger index=3\n * $animate.leave(kids[4]); //stagger index=4\n *\n * $timeout(function() {\n *   //stagger has reset itself\n *   $animate.leave(kids[5]); //stagger index=0\n *   $animate.leave(kids[6]); //stagger index=1\n * }, 100, false);\n * </pre>\n *\n * Stagger animations are currently only supported within CSS-defined animations.\n *\n * <h2>JavaScript-defined Animations</h2>\n * In the event that you do not want to use CSS3 transitions or CSS3 animations or if you wish to offer animations on browsers that do not\n * yet support CSS transitions/animations, then you can make use of JavaScript animations defined inside of your AngularJS module.\n *\n * <pre>\n * //!annotate=\"YourApp\" Your AngularJS Module|Replace this or ngModule with the module that you used to define your application.\n * var ngModule = angular.module('YourApp', ['ngAnimate']);\n * ngModule.animation('.my-crazy-animation', function() {\n *   return {\n *     enter: function(element, done) {\n *       //run the animation here and call done when the animation is complete\n *       return function(cancelled) {\n *         //this (optional) function will be called when the animation\n *         //completes or when the animation is cancelled (the cancelled\n *         //flag will be set to true if cancelled).\n *       };\n *     },\n *     leave: function(element, done) { },\n *     move: function(element, done) { },\n *\n *     //animation that can be triggered before the class is added\n *     beforeAddClass: function(element, className, done) { },\n *\n *     //animation that can be triggered after the class is added\n *     addClass: function(element, className, done) { },\n *\n *     //animation that can be triggered before the class is removed\n *     beforeRemoveClass: function(element, className, done) { },\n *\n *     //animation that can be triggered after the class is removed\n *     removeClass: function(element, className, done) { }\n *   };\n * });\n * </pre>\n *\n * JavaScript-defined animations are created with a CSS-like class selector and a collection of events which are set to run\n * a javascript callback function. When an animation is triggered, $animate will look for a matching animation which fits\n * the element's CSS class attribute value and then run the matching animation event function (if found).\n * In other words, if the CSS classes present on the animated element match any of the JavaScript animations then the callback function will\n * be executed. It should be also noted that only simple, single class selectors are allowed (compound class selectors are not supported).\n *\n * Within a JavaScript animation, an object containing various event callback animation functions is expected to be returned.\n * As explained above, these callbacks are triggered based on the animation event. Therefore if an enter animation is run,\n * and the JavaScript animation is found, then the enter callback will handle that animation (in addition to the CSS keyframe animation\n * or transition code that is defined via a stylesheet).\n *\n */\n\nangular.module('ngAnimate', ['ng'])\n\n  /**\n   * @ngdoc object\n   * @name ngAnimate.$animateProvider\n   * @description\n   *\n   * The `$animateProvider` allows developers to register JavaScript animation event handlers directly inside of a module.\n   * When an animation is triggered, the $animate service will query the $animate service to find any animations that match\n   * the provided name value.\n   *\n   * Requires the {@link ngAnimate `ngAnimate`} module to be installed.\n   *\n   * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.\n   *\n   */\n  .factory('$$animateReflow', ['$window', '$timeout', function($window, $timeout) {\n    var requestAnimationFrame = $window.requestAnimationFrame       ||\n                                $window.webkitRequestAnimationFrame ||\n                                function(fn) {\n                                  return $timeout(fn, 10, false);\n                                };\n\n    var cancelAnimationFrame = $window.cancelAnimationFrame       ||\n                               $window.webkitCancelAnimationFrame ||\n                               function(timer) {\n                                 return $timeout.cancel(timer);\n                               };\n    return function(fn) {\n      var id = requestAnimationFrame(fn);\n      return function() {\n        cancelAnimationFrame(id);\n      };\n    };\n  }])\n\n  .config(['$provide', '$animateProvider', function($provide, $animateProvider) {\n    var noop = angular.noop;\n    var forEach = angular.forEach;\n    var selectors = $animateProvider.$$selectors;\n\n    var ELEMENT_NODE = 1;\n    var NG_ANIMATE_STATE = '$$ngAnimateState';\n    var NG_ANIMATE_CLASS_NAME = 'ng-animate';\n    var rootAnimateState = {running: true};\n\n    function extractElementNode(element) {\n      for(var i = 0; i < element.length; i++) {\n        var elm = element[i];\n        if(elm.nodeType == ELEMENT_NODE) {\n          return elm;\n        }\n      }\n    }\n\n    function isMatchingElement(elm1, elm2) {\n      return extractElementNode(elm1) == extractElementNode(elm2);\n    }\n\n    $provide.decorator('$animate', ['$delegate', '$injector', '$sniffer', '$rootElement', '$timeout', '$rootScope', '$document',\n                            function($delegate,   $injector,   $sniffer,   $rootElement,   $timeout,   $rootScope,   $document) {\n\n      $rootElement.data(NG_ANIMATE_STATE, rootAnimateState);\n\n      // disable animations during bootstrap, but once we bootstrapped, wait again\n      // for another digest until enabling animations. The reason why we digest twice\n      // is because all structural animations (enter, leave and move) all perform a\n      // post digest operation before animating. If we only wait for a single digest\n      // to pass then the structural animation would render its animation on page load.\n      // (which is what we're trying to avoid when the application first boots up.)\n      $rootScope.$$postDigest(function() {\n        $rootScope.$$postDigest(function() {\n          rootAnimateState.running = false;\n        });\n      });\n\n      var classNameFilter = $animateProvider.classNameFilter();\n      var isAnimatableClassName = !classNameFilter\n              ? function() { return true; }\n              : function(className) {\n                return classNameFilter.test(className);\n              };\n\n      function async(fn) {\n        return $timeout(fn, 0, false);\n      }\n\n      function lookup(name) {\n        if (name) {\n          var matches = [],\n              flagMap = {},\n              classes = name.substr(1).split('.');\n\n          //the empty string value is the default animation\n          //operation which performs CSS transition and keyframe\n          //animations sniffing. This is always included for each\n          //element animation procedure if the browser supports\n          //transitions and/or keyframe animations\n          if ($sniffer.transitions || $sniffer.animations) {\n            classes.push('');\n          }\n\n          for(var i=0; i < classes.length; i++) {\n            var klass = classes[i],\n                selectorFactoryName = selectors[klass];\n            if(selectorFactoryName && !flagMap[klass]) {\n              matches.push($injector.get(selectorFactoryName));\n              flagMap[klass] = true;\n            }\n          }\n          return matches;\n        }\n      }\n\n      /**\n       * @ngdoc object\n       * @name ngAnimate.$animate\n       * @function\n       *\n       * @description\n       * The `$animate` service provides animation detection support while performing DOM operations (enter, leave and move) as well as during addClass and removeClass operations.\n       * When any of these operations are run, the $animate service\n       * will examine any JavaScript-defined animations (which are defined by using the $animateProvider provider object)\n       * as well as any CSS-defined animations against the CSS classes present on the element once the DOM operation is run.\n       *\n       * The `$animate` service is used behind the scenes with pre-existing directives and animation with these directives\n       * will work out of the box without any extra configuration.\n       *\n       * Requires the {@link ngAnimate `ngAnimate`} module to be installed.\n       *\n       * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.\n       *\n       */\n      return {\n        /**\n         * @ngdoc function\n         * @name ngAnimate.$animate#enter\n         * @methodOf ngAnimate.$animate\n         * @function\n         *\n         * @description\n         * Appends the element to the parentElement element that resides in the document and then runs the enter animation. Once\n         * the animation is started, the following CSS classes will be present on the element for the duration of the animation:\n         *\n         * Below is a breakdown of each step that occurs during enter animation:\n         *\n         * | Animation Step                                                                               | What the element class attribute looks like |\n         * |----------------------------------------------------------------------------------------------|---------------------------------------------|\n         * | 1. $animate.enter(...) is called                                                             | class=\"my-animation\"                        |\n         * | 2. element is inserted into the parentElement element or beside the afterElement element     | class=\"my-animation\"                        |\n         * | 3. $animate runs any JavaScript-defined animations on the element                            | class=\"my-animation ng-animate\"             |\n         * | 4. the .ng-enter class is added to the element                                               | class=\"my-animation ng-animate ng-enter\"    |\n         * | 5. $animate scans the element styles to get the CSS transition/animation duration and delay  | class=\"my-animation ng-animate ng-enter\"    |\n         * | 6. $animate waits for 10ms (this performs a reflow)                                          | class=\"my-animation ng-animate ng-enter\"    |\n         * | 7. the .ng-enter-active and .ng-animate-active classes are added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-animate-active ng-enter ng-enter-active\" |\n         * | 8. $animate waits for X milliseconds for the animation to complete                           | class=\"my-animation ng-animate ng-animate-active ng-enter ng-enter-active\" |\n         * | 9. The animation ends and all generated CSS classes are removed from the element             | class=\"my-animation\"                        |\n         * | 10. The doneCallback() callback is fired (if provided)                                       | class=\"my-animation\"                        |\n         *\n         * @param {jQuery/jqLite element} element the element that will be the focus of the enter animation\n         * @param {jQuery/jqLite element} parentElement the parent element of the element that will be the focus of the enter animation\n         * @param {jQuery/jqLite element} afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation\n         * @param {function()=} doneCallback the callback function that will be called once the animation is complete\n        */\n        enter : function(element, parentElement, afterElement, doneCallback) {\n          this.enabled(false, element);\n          $delegate.enter(element, parentElement, afterElement);\n          $rootScope.$$postDigest(function() {\n            performAnimation('enter', 'ng-enter', element, parentElement, afterElement, noop, doneCallback);\n          });\n        },\n\n        /**\n         * @ngdoc function\n         * @name ngAnimate.$animate#leave\n         * @methodOf ngAnimate.$animate\n         * @function\n         *\n         * @description\n         * Runs the leave animation operation and, upon completion, removes the element from the DOM. Once\n         * the animation is started, the following CSS classes will be added for the duration of the animation:\n         *\n         * Below is a breakdown of each step that occurs during leave animation:\n         *\n         * | Animation Step                                                                               | What the element class attribute looks like |\n         * |----------------------------------------------------------------------------------------------|---------------------------------------------|\n         * | 1. $animate.leave(...) is called                                                             | class=\"my-animation\"                        |\n         * | 2. $animate runs any JavaScript-defined animations on the element                            | class=\"my-animation ng-animate\"             |\n         * | 3. the .ng-leave class is added to the element                                               | class=\"my-animation ng-animate ng-leave\"    |\n         * | 4. $animate scans the element styles to get the CSS transition/animation duration and delay  | class=\"my-animation ng-animate ng-leave\"    |\n         * | 5. $animate waits for 10ms (this performs a reflow)                                          | class=\"my-animation ng-animate ng-leave\"    |\n         * | 6. the .ng-leave-active and .ng-animate-active classes is added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-animate-active ng-leave ng-leave-active\" |\n         * | 7. $animate waits for X milliseconds for the animation to complete                           | class=\"my-animation ng-animate ng-animate-active ng-leave ng-leave-active\" |\n         * | 8. The animation ends and all generated CSS classes are removed from the element             | class=\"my-animation\"                        |\n         * | 9. The element is removed from the DOM                                                       | ...                                         |\n         * | 10. The doneCallback() callback is fired (if provided)                                       | ...                                         |\n         *\n         * @param {jQuery/jqLite element} element the element that will be the focus of the leave animation\n         * @param {function()=} doneCallback the callback function that will be called once the animation is complete\n        */\n        leave : function(element, doneCallback) {\n          cancelChildAnimations(element);\n          this.enabled(false, element);\n          $rootScope.$$postDigest(function() {\n            performAnimation('leave', 'ng-leave', element, null, null, function() {\n              $delegate.leave(element);\n            }, doneCallback);\n          });\n        },\n\n        /**\n         * @ngdoc function\n         * @name ngAnimate.$animate#move\n         * @methodOf ngAnimate.$animate\n         * @function\n         *\n         * @description\n         * Fires the move DOM operation. Just before the animation starts, the animate service will either append it into the parentElement container or\n         * add the element directly after the afterElement element if present. Then the move animation will be run. Once\n         * the animation is started, the following CSS classes will be added for the duration of the animation:\n         *\n         * Below is a breakdown of each step that occurs during move animation:\n         *\n         * | Animation Step                                                                               | What the element class attribute looks like |\n         * |----------------------------------------------------------------------------------------------|---------------------------------------------|\n         * | 1. $animate.move(...) is called                                                              | class=\"my-animation\"                        |\n         * | 2. element is moved into the parentElement element or beside the afterElement element        | class=\"my-animation\"                        |\n         * | 3. $animate runs any JavaScript-defined animations on the element                            | class=\"my-animation ng-animate\"             |\n         * | 4. the .ng-move class is added to the element                                                | class=\"my-animation ng-animate ng-move\"     |\n         * | 5. $animate scans the element styles to get the CSS transition/animation duration and delay  | class=\"my-animation ng-animate ng-move\"     |\n         * | 6. $animate waits for 10ms (this performs a reflow)                                          | class=\"my-animation ng-animate ng-move\"     |\n         * | 7. the .ng-move-active and .ng-animate-active classes is added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-animate-active ng-move ng-move-active\" |\n         * | 8. $animate waits for X milliseconds for the animation to complete                           | class=\"my-animation ng-animate ng-animate-active ng-move ng-move-active\" |\n         * | 9. The animation ends and all generated CSS classes are removed from the element             | class=\"my-animation\"                        |\n         * | 10. The doneCallback() callback is fired (if provided)                                       | class=\"my-animation\"                        |\n         *\n         * @param {jQuery/jqLite element} element the element that will be the focus of the move animation\n         * @param {jQuery/jqLite element} parentElement the parentElement element of the element that will be the focus of the move animation\n         * @param {jQuery/jqLite element} afterElement the sibling element (which is the previous element) of the element that will be the focus of the move animation\n         * @param {function()=} doneCallback the callback function that will be called once the animation is complete\n        */\n        move : function(element, parentElement, afterElement, doneCallback) {\n          cancelChildAnimations(element);\n          this.enabled(false, element);\n          $delegate.move(element, parentElement, afterElement);\n          $rootScope.$$postDigest(function() {\n            performAnimation('move', 'ng-move', element, parentElement, afterElement, noop, doneCallback);\n          });\n        },\n\n        /**\n         * @ngdoc function\n         * @name ngAnimate.$animate#addClass\n         * @methodOf ngAnimate.$animate\n         *\n         * @description\n         * Triggers a custom animation event based off the className variable and then attaches the className value to the element as a CSS class.\n         * Unlike the other animation methods, the animate service will suffix the className value with {@type -add} in order to provide\n         * the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if no CSS transitions\n         * or keyframes are defined on the -add or base CSS class).\n         *\n         * Below is a breakdown of each step that occurs during addClass animation:\n         *\n         * | Animation Step                                                                                 | What the element class attribute looks like |\n         * |------------------------------------------------------------------------------------------------|---------------------------------------------|\n         * | 1. $animate.addClass(element, 'super') is called                                               | class=\"my-animation\"                        |\n         * | 2. $animate runs any JavaScript-defined animations on the element                              | class=\"my-animation ng-animate\"             |\n         * | 3. the .super-add class are added to the element                                               | class=\"my-animation ng-animate super-add\"   |\n         * | 4. $animate scans the element styles to get the CSS transition/animation duration and delay    | class=\"my-animation ng-animate super-add\"   |\n         * | 5. $animate waits for 10ms (this performs a reflow)                                            | class=\"my-animation ng-animate super-add\"   |\n         * | 6. the .super, .super-add-active and .ng-animate-active classes are added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-animate-active super super-add super-add-active\"          |\n         * | 7. $animate waits for X milliseconds for the animation to complete                             | class=\"my-animation super-add super-add-active\"  |\n         * | 8. The animation ends and all generated CSS classes are removed from the element               | class=\"my-animation super\"                  |\n         * | 9. The super class is kept on the element                                                      | class=\"my-animation super\"                  |\n         * | 10. The doneCallback() callback is fired (if provided)                                         | class=\"my-animation super\"                  |\n         *\n         * @param {jQuery/jqLite element} element the element that will be animated\n         * @param {string} className the CSS class that will be added to the element and then animated\n         * @param {function()=} doneCallback the callback function that will be called once the animation is complete\n        */\n        addClass : function(element, className, doneCallback) {\n          performAnimation('addClass', className, element, null, null, function() {\n            $delegate.addClass(element, className);\n          }, doneCallback);\n        },\n\n        /**\n         * @ngdoc function\n         * @name ngAnimate.$animate#removeClass\n         * @methodOf ngAnimate.$animate\n         *\n         * @description\n         * Triggers a custom animation event based off the className variable and then removes the CSS class provided by the className value\n         * from the element. Unlike the other animation methods, the animate service will suffix the className value with {@type -remove} in\n         * order to provide the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if\n         * no CSS transitions or keyframes are defined on the -remove or base CSS classes).\n         *\n         * Below is a breakdown of each step that occurs during removeClass animation:\n         *\n         * | Animation Step                                                                                | What the element class attribute looks like     |\n         * |-----------------------------------------------------------------------------------------------|---------------------------------------------|\n         * | 1. $animate.removeClass(element, 'super') is called                                           | class=\"my-animation super\"                  |\n         * | 2. $animate runs any JavaScript-defined animations on the element                             | class=\"my-animation super ng-animate\"       |\n         * | 3. the .super-remove class are added to the element                                           | class=\"my-animation super ng-animate super-remove\"|\n         * | 4. $animate scans the element styles to get the CSS transition/animation duration and delay   | class=\"my-animation super ng-animate super-remove\"   |\n         * | 5. $animate waits for 10ms (this performs a reflow)                                           | class=\"my-animation super ng-animate super-remove\"   |\n         * | 6. the .super-remove-active and .ng-animate-active classes are added and .super is removed (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-animate-active super-remove super-remove-active\"          |\n         * | 7. $animate waits for X milliseconds for the animation to complete                            | class=\"my-animation ng-animate ng-animate-active super-remove super-remove-active\"   |\n         * | 8. The animation ends and all generated CSS classes are removed from the element              | class=\"my-animation\"                        |\n         * | 9. The doneCallback() callback is fired (if provided)                                         | class=\"my-animation\"                        |\n         *\n         *\n         * @param {jQuery/jqLite element} element the element that will be animated\n         * @param {string} className the CSS class that will be animated and then removed from the element\n         * @param {function()=} doneCallback the callback function that will be called once the animation is complete\n        */\n        removeClass : function(element, className, doneCallback) {\n          performAnimation('removeClass', className, element, null, null, function() {\n            $delegate.removeClass(element, className);\n          }, doneCallback);\n        },\n\n        /**\n         * @ngdoc function\n         * @name ngAnimate.$animate#enabled\n         * @methodOf ngAnimate.$animate\n         * @function\n         *\n         * @param {boolean=} value If provided then set the animation on or off.\n         * @param {jQuery/jqLite element=} element If provided then the element will be used to represent the enable/disable operation\n         * @return {boolean} Current animation state.\n         *\n         * @description\n         * Globally enables/disables animations.\n         *\n        */\n        enabled : function(value, element) {\n          switch(arguments.length) {\n            case 2:\n              if(value) {\n                cleanup(element);\n              } else {\n                var data = element.data(NG_ANIMATE_STATE) || {};\n                data.disabled = true;\n                element.data(NG_ANIMATE_STATE, data);\n              }\n            break;\n\n            case 1:\n              rootAnimateState.disabled = !value;\n            break;\n\n            default:\n              value = !rootAnimateState.disabled;\n            break;\n          }\n          return !!value;\n         }\n      };\n\n      /*\n        all animations call this shared animation triggering function internally.\n        The animationEvent variable refers to the JavaScript animation event that will be triggered\n        and the className value is the name of the animation that will be applied within the\n        CSS code. Element, parentElement and afterElement are provided DOM elements for the animation\n        and the onComplete callback will be fired once the animation is fully complete.\n      */\n      function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) {\n        var currentClassName, classes, node = extractElementNode(element);\n        if(node) {\n          currentClassName = node.className;\n          classes = currentClassName + ' ' + className;\n        }\n\n        //transcluded directives may sometimes fire an animation using only comment nodes\n        //best to catch this early on to prevent any animation operations from occurring\n        if(!node || !isAnimatableClassName(classes)) {\n          fireDOMOperation();\n          fireBeforeCallbackAsync();\n          fireAfterCallbackAsync();\n          closeAnimation();\n          return;\n        }\n\n        var animationLookup = (' ' + classes).replace(/\\s+/g,'.');\n        if (!parentElement) {\n          parentElement = afterElement ? afterElement.parent() : element.parent();\n        }\n\n        var matches = lookup(animationLookup);\n        var isClassBased = animationEvent == 'addClass' || animationEvent == 'removeClass';\n        var ngAnimateState = element.data(NG_ANIMATE_STATE) || {};\n\n        //skip the animation if animations are disabled, a parent is already being animated,\n        //the element is not currently attached to the document body or then completely close\n        //the animation if any matching animations are not found at all.\n        //NOTE: IE8 + IE9 should close properly (run closeAnimation()) in case a NO animation is not found.\n        if (animationsDisabled(element, parentElement) || matches.length === 0) {\n          fireDOMOperation();\n          fireBeforeCallbackAsync();\n          fireAfterCallbackAsync();\n          closeAnimation();\n          return;\n        }\n\n        var animations = [];\n\n        //only add animations if the currently running animation is not structural\n        //or if there is no animation running at all\n        var allowAnimations = isClassBased ?\n          !ngAnimateState.disabled && (!ngAnimateState.running || !ngAnimateState.structural) :\n          true;\n\n        if(allowAnimations) {\n          forEach(matches, function(animation) {\n            //add the animation to the queue to if it is allowed to be cancelled\n            if(!animation.allowCancel || animation.allowCancel(element, animationEvent, className)) {\n              var beforeFn, afterFn = animation[animationEvent];\n\n              //Special case for a leave animation since there is no point in performing an\n              //animation on a element node that has already been removed from the DOM\n              if(animationEvent == 'leave') {\n                beforeFn = afterFn;\n                afterFn = null; //this must be falsy so that the animation is skipped for leave\n              } else {\n                beforeFn = animation['before' + animationEvent.charAt(0).toUpperCase() + animationEvent.substr(1)];\n              }\n              animations.push({\n                before : beforeFn,\n                after : afterFn\n              });\n            }\n          });\n        }\n\n        //this would mean that an animation was not allowed so let the existing\n        //animation do it's thing and close this one early\n        if(animations.length === 0) {\n          fireDOMOperation();\n          fireBeforeCallbackAsync();\n          fireAfterCallbackAsync();\n          fireDoneCallbackAsync();\n          return;\n        }\n\n        var ONE_SPACE = ' ';\n        //this value will be searched for class-based CSS className lookup. Therefore,\n        //we prefix and suffix the current className value with spaces to avoid substring\n        //lookups of className tokens\n        var futureClassName = ONE_SPACE + currentClassName + ONE_SPACE;\n        if(ngAnimateState.running) {\n          //if an animation is currently running on the element then lets take the steps\n          //to cancel that animation and fire any required callbacks\n          $timeout.cancel(ngAnimateState.closeAnimationTimeout);\n          cleanup(element);\n          cancelAnimations(ngAnimateState.animations);\n\n          //in the event that the CSS is class is quickly added and removed back\n          //then we don't want to wait until after the reflow to add/remove the CSS\n          //class since both class animations may run into a race condition.\n          //The code below will check to see if that is occurring and will\n          //immediately remove the former class before the reflow so that the\n          //animation can snap back to the original animation smoothly\n          var isFullyClassBasedAnimation = isClassBased && !ngAnimateState.structural;\n          var isRevertingClassAnimation = isFullyClassBasedAnimation &&\n                                          ngAnimateState.className == className &&\n                                          animationEvent != ngAnimateState.event;\n\n          //if the class is removed during the reflow then it will revert the styles temporarily\n          //back to the base class CSS styling causing a jump-like effect to occur. This check\n          //here ensures that the domOperation is only performed after the reflow has commenced\n          if(ngAnimateState.beforeComplete || isRevertingClassAnimation) {\n            (ngAnimateState.done || noop)(true);\n          } else if(isFullyClassBasedAnimation) {\n            //class-based animations will compare element className values after cancelling the\n            //previous animation to see if the element properties already contain the final CSS\n            //class and if so then the animation will be skipped. Since the domOperation will\n            //be performed only after the reflow is complete then our element's className value\n            //will be invalid. Therefore the same string manipulation that would occur within the\n            //DOM operation will be performed below so that the class comparison is valid...\n            futureClassName = ngAnimateState.event == 'removeClass' ?\n              futureClassName.replace(ONE_SPACE + ngAnimateState.className + ONE_SPACE, ONE_SPACE) :\n              futureClassName + ngAnimateState.className + ONE_SPACE;\n          }\n        }\n\n        //There is no point in perform a class-based animation if the element already contains\n        //(on addClass) or doesn't contain (on removeClass) the className being animated.\n        //The reason why this is being called after the previous animations are cancelled\n        //is so that the CSS classes present on the element can be properly examined.\n        var classNameToken = ONE_SPACE + className + ONE_SPACE;\n        if((animationEvent == 'addClass'    && futureClassName.indexOf(classNameToken) >= 0) ||\n           (animationEvent == 'removeClass' && futureClassName.indexOf(classNameToken) == -1)) {\n          fireDOMOperation();\n          fireBeforeCallbackAsync();\n          fireAfterCallbackAsync();\n          fireDoneCallbackAsync();\n          return;\n        }\n\n        //the ng-animate class does nothing, but it's here to allow for\n        //parent animations to find and cancel child animations when needed\n        element.addClass(NG_ANIMATE_CLASS_NAME);\n\n        element.data(NG_ANIMATE_STATE, {\n          running:true,\n          event:animationEvent,\n          className:className,\n          structural:!isClassBased,\n          animations:animations,\n          done:onBeforeAnimationsComplete\n        });\n\n        //first we run the before animations and when all of those are complete\n        //then we perform the DOM operation and run the next set of animations\n        invokeRegisteredAnimationFns(animations, 'before', onBeforeAnimationsComplete);\n\n        function onBeforeAnimationsComplete(cancelled) {\n          fireDOMOperation();\n          if(cancelled === true) {\n            closeAnimation();\n            return;\n          }\n\n          //set the done function to the final done function\n          //so that the DOM event won't be executed twice by accident\n          //if the after animation is cancelled as well\n          var data = element.data(NG_ANIMATE_STATE);\n          if(data) {\n            data.done = closeAnimation;\n            element.data(NG_ANIMATE_STATE, data);\n          }\n          invokeRegisteredAnimationFns(animations, 'after', closeAnimation);\n        }\n\n        function invokeRegisteredAnimationFns(animations, phase, allAnimationFnsComplete) {\n          phase == 'after' ?\n            fireAfterCallbackAsync() :\n            fireBeforeCallbackAsync();\n\n          var endFnName = phase + 'End';\n          forEach(animations, function(animation, index) {\n            var animationPhaseCompleted = function() {\n              progress(index, phase);\n            };\n\n            //there are no before functions for enter + move since the DOM\n            //operations happen before the performAnimation method fires\n            if(phase == 'before' && (animationEvent == 'enter' || animationEvent == 'move')) {\n              animationPhaseCompleted();\n              return;\n            }\n\n            if(animation[phase]) {\n              animation[endFnName] = isClassBased ?\n                animation[phase](element, className, animationPhaseCompleted) :\n                animation[phase](element, animationPhaseCompleted);\n            } else {\n              animationPhaseCompleted();\n            }\n          });\n\n          function progress(index, phase) {\n            var phaseCompletionFlag = phase + 'Complete';\n            var currentAnimation = animations[index];\n            currentAnimation[phaseCompletionFlag] = true;\n            (currentAnimation[endFnName] || noop)();\n\n            for(var i=0;i<animations.length;i++) {\n              if(!animations[i][phaseCompletionFlag]) return;\n            }\n\n            allAnimationFnsComplete();\n          }\n        }\n\n        function fireDOMCallback(animationPhase) {\n          element.triggerHandler('$animate:' + animationPhase, {\n            event : animationEvent,\n            className : className\n          });\n        }\n\n        function fireBeforeCallbackAsync() {\n          async(function() {\n            fireDOMCallback('before');\n          });\n        }\n\n        function fireAfterCallbackAsync() {\n          async(function() {\n            fireDOMCallback('after');\n          });\n        }\n\n        function fireDoneCallbackAsync() {\n          async(function() {\n            fireDOMCallback('close');\n            doneCallback && doneCallback();\n          });\n        }\n\n        //it is less complicated to use a flag than managing and cancelling\n        //timeouts containing multiple callbacks.\n        function fireDOMOperation() {\n          if(!fireDOMOperation.hasBeenRun) {\n            fireDOMOperation.hasBeenRun = true;\n            domOperation();\n          }\n        }\n\n        function closeAnimation() {\n          if(!closeAnimation.hasBeenRun) {\n            closeAnimation.hasBeenRun = true;\n            var data = element.data(NG_ANIMATE_STATE);\n            if(data) {\n              /* only structural animations wait for reflow before removing an\n                 animation, but class-based animations don't. An example of this\n                 failing would be when a parent HTML tag has a ng-class attribute\n                 causing ALL directives below to skip animations during the digest */\n              if(isClassBased) {\n                cleanup(element);\n              } else {\n                data.closeAnimationTimeout = async(function() {\n                  cleanup(element);\n                });\n                element.data(NG_ANIMATE_STATE, data);\n              }\n            }\n            fireDoneCallbackAsync();\n          }\n        }\n      }\n\n      function cancelChildAnimations(element) {\n        var node = extractElementNode(element);\n        forEach(node.querySelectorAll('.' + NG_ANIMATE_CLASS_NAME), function(element) {\n          element = angular.element(element);\n          var data = element.data(NG_ANIMATE_STATE);\n          if(data) {\n            cancelAnimations(data.animations);\n            cleanup(element);\n          }\n        });\n      }\n\n      function cancelAnimations(animations) {\n        var isCancelledFlag = true;\n        forEach(animations, function(animation) {\n          if(!animation.beforeComplete) {\n            (animation.beforeEnd || noop)(isCancelledFlag);\n          }\n          if(!animation.afterComplete) {\n            (animation.afterEnd || noop)(isCancelledFlag);\n          }\n        });\n      }\n\n      function cleanup(element) {\n        if(isMatchingElement(element, $rootElement)) {\n          if(!rootAnimateState.disabled) {\n            rootAnimateState.running = false;\n            rootAnimateState.structural = false;\n          }\n        } else {\n          element.removeClass(NG_ANIMATE_CLASS_NAME);\n          element.removeData(NG_ANIMATE_STATE);\n        }\n      }\n\n      function animationsDisabled(element, parentElement) {\n        if (rootAnimateState.disabled) return true;\n\n        if(isMatchingElement(element, $rootElement)) {\n          return rootAnimateState.disabled || rootAnimateState.running;\n        }\n\n        do {\n          //the element did not reach the root element which means that it\n          //is not apart of the DOM. Therefore there is no reason to do\n          //any animations on it\n          if(parentElement.length === 0) break;\n\n          var isRoot = isMatchingElement(parentElement, $rootElement);\n          var state = isRoot ? rootAnimateState : parentElement.data(NG_ANIMATE_STATE);\n          var result = state && (!!state.disabled || !!state.running);\n          if(isRoot || result) {\n            return result;\n          }\n\n          if(isRoot) return true;\n        }\n        while(parentElement = parentElement.parent());\n\n        return true;\n      }\n    }]);\n\n    $animateProvider.register('', ['$window', '$sniffer', '$timeout', '$$animateReflow',\n                           function($window,   $sniffer,   $timeout,   $$animateReflow) {\n      // Detect proper transitionend/animationend event names.\n      var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;\n\n      // If unprefixed events are not supported but webkit-prefixed are, use the latter.\n      // Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.\n      // Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`\n      // but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.\n      // Register both events in case `window.onanimationend` is not supported because of that,\n      // do the same for `transitionend` as Safari is likely to exhibit similar behavior.\n      // Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit\n      // therefore there is no reason to test anymore for other vendor prefixes: http://caniuse.com/#search=transition\n      if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) {\n        CSS_PREFIX = '-webkit-';\n        TRANSITION_PROP = 'WebkitTransition';\n        TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';\n      } else {\n        TRANSITION_PROP = 'transition';\n        TRANSITIONEND_EVENT = 'transitionend';\n      }\n\n      if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) {\n        CSS_PREFIX = '-webkit-';\n        ANIMATION_PROP = 'WebkitAnimation';\n        ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';\n      } else {\n        ANIMATION_PROP = 'animation';\n        ANIMATIONEND_EVENT = 'animationend';\n      }\n\n      var DURATION_KEY = 'Duration';\n      var PROPERTY_KEY = 'Property';\n      var DELAY_KEY = 'Delay';\n      var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';\n      var NG_ANIMATE_PARENT_KEY = '$$ngAnimateKey';\n      var NG_ANIMATE_CSS_DATA_KEY = '$$ngAnimateCSS3Data';\n      var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;\n      var CLOSING_TIME_BUFFER = 1.5;\n      var ONE_SECOND = 1000;\n\n      var animationCounter = 0;\n      var lookupCache = {};\n      var parentCounter = 0;\n      var animationReflowQueue = [];\n      var animationElementQueue = [];\n      var cancelAnimationReflow;\n      var closingAnimationTime = 0;\n      var timeOut = false;\n      function afterReflow(element, callback) {\n        if(cancelAnimationReflow) {\n          cancelAnimationReflow();\n        }\n\n        animationReflowQueue.push(callback);\n\n        var node = extractElementNode(element);\n        element = angular.element(node);\n        animationElementQueue.push(element);\n\n        var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);\n\n        var stagger = elementData.stagger;\n        var staggerTime = elementData.itemIndex * (Math.max(stagger.animationDelay, stagger.transitionDelay) || 0);\n\n        var animationTime = (elementData.maxDelay + elementData.maxDuration) * CLOSING_TIME_BUFFER;\n        closingAnimationTime = Math.max(closingAnimationTime, (staggerTime + animationTime) * ONE_SECOND);\n\n        //by placing a counter we can avoid an accidental\n        //race condition which may close an animation when\n        //a follow-up animation is midway in its animation\n        elementData.animationCount = animationCounter;\n\n        cancelAnimationReflow = $$animateReflow(function() {\n          forEach(animationReflowQueue, function(fn) {\n            fn();\n          });\n\n          //copy the list of elements so that successive\n          //animations won't conflict if they're added before\n          //the closing animation timeout has run\n          var elementQueueSnapshot = [];\n          var animationCounterSnapshot = animationCounter;\n          forEach(animationElementQueue, function(elm) {\n            elementQueueSnapshot.push(elm);\n          });\n\n          $timeout(function() {\n            closeAllAnimations(elementQueueSnapshot, animationCounterSnapshot);\n            elementQueueSnapshot = null;\n          }, closingAnimationTime, false);\n\n          animationReflowQueue = [];\n          animationElementQueue = [];\n          cancelAnimationReflow = null;\n          lookupCache = {};\n          closingAnimationTime = 0;\n          animationCounter++;\n        });\n      }\n\n      function closeAllAnimations(elements, count) {\n        forEach(elements, function(element) {\n          var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);\n          if(elementData && elementData.animationCount == count) {\n            (elementData.closeAnimationFn || noop)();\n          }\n        });\n      }\n\n      function getElementAnimationDetails(element, cacheKey) {\n        var data = cacheKey ? lookupCache[cacheKey] : null;\n        if(!data) {\n          var transitionDuration = 0;\n          var transitionDelay = 0;\n          var animationDuration = 0;\n          var animationDelay = 0;\n          var transitionDelayStyle;\n          var animationDelayStyle;\n          var transitionDurationStyle;\n          var transitionPropertyStyle;\n\n          //we want all the styles defined before and after\n          forEach(element, function(element) {\n            if (element.nodeType == ELEMENT_NODE) {\n              var elementStyles = $window.getComputedStyle(element) || {};\n\n              transitionDurationStyle = elementStyles[TRANSITION_PROP + DURATION_KEY];\n\n              transitionDuration = Math.max(parseMaxTime(transitionDurationStyle), transitionDuration);\n\n              transitionPropertyStyle = elementStyles[TRANSITION_PROP + PROPERTY_KEY];\n\n              transitionDelayStyle = elementStyles[TRANSITION_PROP + DELAY_KEY];\n\n              transitionDelay  = Math.max(parseMaxTime(transitionDelayStyle), transitionDelay);\n\n              animationDelayStyle = elementStyles[ANIMATION_PROP + DELAY_KEY];\n\n              animationDelay   = Math.max(parseMaxTime(animationDelayStyle), animationDelay);\n\n              var aDuration  = parseMaxTime(elementStyles[ANIMATION_PROP + DURATION_KEY]);\n\n              if(aDuration > 0) {\n                aDuration *= parseInt(elementStyles[ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY], 10) || 1;\n              }\n\n              animationDuration = Math.max(aDuration, animationDuration);\n            }\n          });\n          data = {\n            total : 0,\n            transitionPropertyStyle: transitionPropertyStyle,\n            transitionDurationStyle: transitionDurationStyle,\n            transitionDelayStyle: transitionDelayStyle,\n            transitionDelay: transitionDelay,\n            transitionDuration: transitionDuration,\n            animationDelayStyle: animationDelayStyle,\n            animationDelay: animationDelay,\n            animationDuration: animationDuration\n          };\n          if(cacheKey) {\n            lookupCache[cacheKey] = data;\n          }\n        }\n        return data;\n      }\n\n      function parseMaxTime(str) {\n        var maxValue = 0;\n        var values = angular.isString(str) ?\n          str.split(/\\s*,\\s*/) :\n          [];\n        forEach(values, function(value) {\n          maxValue = Math.max(parseFloat(value) || 0, maxValue);\n        });\n        return maxValue;\n      }\n\n      function getCacheKey(element) {\n        var parentElement = element.parent();\n        var parentID = parentElement.data(NG_ANIMATE_PARENT_KEY);\n        if(!parentID) {\n          parentElement.data(NG_ANIMATE_PARENT_KEY, ++parentCounter);\n          parentID = parentCounter;\n        }\n        return parentID + '-' + extractElementNode(element).className;\n      }\n\n      function animateSetup(element, className, calculationDecorator) {\n        var cacheKey = getCacheKey(element);\n        var eventCacheKey = cacheKey + ' ' + className;\n        var stagger = {};\n        var itemIndex = lookupCache[eventCacheKey] ? ++lookupCache[eventCacheKey].total : 0;\n\n        if(itemIndex > 0) {\n          var staggerClassName = className + '-stagger';\n          var staggerCacheKey = cacheKey + ' ' + staggerClassName;\n          var applyClasses = !lookupCache[staggerCacheKey];\n\n          applyClasses && element.addClass(staggerClassName);\n\n          stagger = getElementAnimationDetails(element, staggerCacheKey);\n\n          applyClasses && element.removeClass(staggerClassName);\n        }\n\n        /* the animation itself may need to add/remove special CSS classes\n         * before calculating the anmation styles */\n        calculationDecorator = calculationDecorator ||\n                               function(fn) { return fn(); };\n\n        element.addClass(className);\n\n        var timings = calculationDecorator(function() {\n          return getElementAnimationDetails(element, eventCacheKey);\n        });\n\n        /* there is no point in performing a reflow if the animation\n           timeout is empty (this would cause a flicker bug normally\n           in the page. There is also no point in performing an animation\n           that only has a delay and no duration */\n        var maxDelay = Math.max(timings.transitionDelay, timings.animationDelay);\n        var maxDuration = Math.max(timings.transitionDuration, timings.animationDuration);\n        if(maxDuration === 0) {\n          element.removeClass(className);\n          return false;\n        }\n\n        //temporarily disable the transition so that the enter styles\n        //don't animate twice (this is here to avoid a bug in Chrome/FF).\n        var activeClassName = '';\n        timings.transitionDuration > 0 ?\n          blockTransitions(element) :\n          blockKeyframeAnimations(element);\n\n        forEach(className.split(' '), function(klass, i) {\n          activeClassName += (i > 0 ? ' ' : '') + klass + '-active';\n        });\n\n        element.data(NG_ANIMATE_CSS_DATA_KEY, {\n          className : className,\n          activeClassName : activeClassName,\n          maxDuration : maxDuration,\n          maxDelay : maxDelay,\n          classes : className + ' ' + activeClassName,\n          timings : timings,\n          stagger : stagger,\n          itemIndex : itemIndex\n        });\n\n        return true;\n      }\n\n      function blockTransitions(element) {\n        extractElementNode(element).style[TRANSITION_PROP + PROPERTY_KEY] = 'none';\n      }\n\n      function blockKeyframeAnimations(element) {\n        extractElementNode(element).style[ANIMATION_PROP] = 'none 0s';\n      }\n\n      function unblockTransitions(element) {\n        var prop = TRANSITION_PROP + PROPERTY_KEY;\n        var node = extractElementNode(element);\n        if(node.style[prop] && node.style[prop].length > 0) {\n          node.style[prop] = '';\n        }\n      }\n\n      function unblockKeyframeAnimations(element) {\n        var prop = ANIMATION_PROP;\n        var node = extractElementNode(element);\n        if(node.style[prop] && node.style[prop].length > 0) {\n          node.style[prop] = '';\n        }\n      }\n\n      function animateRun(element, className, activeAnimationComplete) {\n        var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);\n        var node = extractElementNode(element);\n        if(node.className.indexOf(className) == -1 || !elementData) {\n          activeAnimationComplete();\n          return;\n        }\n\n        var timings = elementData.timings;\n        var stagger = elementData.stagger;\n        var maxDuration = elementData.maxDuration;\n        var activeClassName = elementData.activeClassName;\n        var maxDelayTime = Math.max(timings.transitionDelay, timings.animationDelay) * ONE_SECOND;\n        var startTime = Date.now();\n        var css3AnimationEvents = ANIMATIONEND_EVENT + ' ' + TRANSITIONEND_EVENT;\n        var itemIndex = elementData.itemIndex;\n\n        var style = '', appliedStyles = [];\n        if(timings.transitionDuration > 0) {\n          var propertyStyle = timings.transitionPropertyStyle;\n          if(propertyStyle.indexOf('all') == -1) {\n            style += CSS_PREFIX + 'transition-property: ' + propertyStyle + ';';\n            style += CSS_PREFIX + 'transition-duration: ' + timings.transitionDurationStyle + ';';\n            appliedStyles.push(CSS_PREFIX + 'transition-property');\n            appliedStyles.push(CSS_PREFIX + 'transition-duration');\n          }\n        }\n\n        if(itemIndex > 0) {\n          if(stagger.transitionDelay > 0 && stagger.transitionDuration === 0) {\n            var delayStyle = timings.transitionDelayStyle;\n            style += CSS_PREFIX + 'transition-delay: ' +\n                     prepareStaggerDelay(delayStyle, stagger.transitionDelay, itemIndex) + '; ';\n            appliedStyles.push(CSS_PREFIX + 'transition-delay');\n          }\n\n          if(stagger.animationDelay > 0 && stagger.animationDuration === 0) {\n            style += CSS_PREFIX + 'animation-delay: ' +\n                     prepareStaggerDelay(timings.animationDelayStyle, stagger.animationDelay, itemIndex) + '; ';\n            appliedStyles.push(CSS_PREFIX + 'animation-delay');\n          }\n        }\n\n        if(appliedStyles.length > 0) {\n          //the element being animated may sometimes contain comment nodes in\n          //the jqLite object, so we're safe to use a single variable to house\n          //the styles since there is always only one element being animated\n          var oldStyle = node.getAttribute('style') || '';\n          node.setAttribute('style', oldStyle + ' ' + style);\n        }\n\n        element.on(css3AnimationEvents, onAnimationProgress);\n        element.addClass(activeClassName);\n        elementData.closeAnimationFn = function() {\n          onEnd();\n          activeAnimationComplete();\n        };\n        return onEnd;\n\n        // This will automatically be called by $animate so\n        // there is no need to attach this internally to the\n        // timeout done method.\n        function onEnd(cancelled) {\n          element.off(css3AnimationEvents, onAnimationProgress);\n          element.removeClass(activeClassName);\n          animateClose(element, className);\n          var node = extractElementNode(element);\n          for (var i in appliedStyles) {\n            node.style.removeProperty(appliedStyles[i]);\n          }\n        }\n\n        function onAnimationProgress(event) {\n          event.stopPropagation();\n          var ev = event.originalEvent || event;\n          var timeStamp = ev.$manualTimeStamp || ev.timeStamp || Date.now();\n          \n          /* Firefox (or possibly just Gecko) likes to not round values up\n           * when a ms measurement is used for the animation */\n          var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));\n\n          /* $manualTimeStamp is a mocked timeStamp value which is set\n           * within browserTrigger(). This is only here so that tests can\n           * mock animations properly. Real events fallback to event.timeStamp,\n           * or, if they don't, then a timeStamp is automatically created for them.\n           * We're checking to see if the timeStamp surpasses the expected delay,\n           * but we're using elapsedTime instead of the timeStamp on the 2nd\n           * pre-condition since animations sometimes close off early */\n          if(Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) {\n            activeAnimationComplete();\n          }\n        }\n      }\n\n      function prepareStaggerDelay(delayStyle, staggerDelay, index) {\n        var style = '';\n        forEach(delayStyle.split(','), function(val, i) {\n          style += (i > 0 ? ',' : '') +\n                   (index * staggerDelay + parseInt(val, 10)) + 's';\n        });\n        return style;\n      }\n\n      function animateBefore(element, className, calculationDecorator) {\n        if(animateSetup(element, className, calculationDecorator)) {\n          return function(cancelled) {\n            cancelled && animateClose(element, className);\n          };\n        }\n      }\n\n      function animateAfter(element, className, afterAnimationComplete) {\n        if(element.data(NG_ANIMATE_CSS_DATA_KEY)) {\n          return animateRun(element, className, afterAnimationComplete);\n        } else {\n          animateClose(element, className);\n          afterAnimationComplete();\n        }\n      }\n\n      function animate(element, className, animationComplete) {\n        //If the animateSetup function doesn't bother returning a\n        //cancellation function then it means that there is no animation\n        //to perform at all\n        var preReflowCancellation = animateBefore(element, className);\n        if(!preReflowCancellation) {\n          animationComplete();\n          return;\n        }\n\n        //There are two cancellation functions: one is before the first\n        //reflow animation and the second is during the active state\n        //animation. The first function will take care of removing the\n        //data from the element which will not make the 2nd animation\n        //happen in the first place\n        var cancel = preReflowCancellation;\n        afterReflow(element, function() {\n          unblockTransitions(element);\n          unblockKeyframeAnimations(element);\n          //once the reflow is complete then we point cancel to\n          //the new cancellation function which will remove all of the\n          //animation properties from the active animation\n          cancel = animateAfter(element, className, animationComplete);\n        });\n\n        return function(cancelled) {\n          (cancel || noop)(cancelled);\n        };\n      }\n\n      function animateClose(element, className) {\n        element.removeClass(className);\n        element.removeData(NG_ANIMATE_CSS_DATA_KEY);\n      }\n\n      return {\n        allowCancel : function(element, animationEvent, className) {\n          //always cancel the current animation if it is a\n          //structural animation\n          var oldClasses = (element.data(NG_ANIMATE_CSS_DATA_KEY) || {}).classes;\n          if(!oldClasses || ['enter','leave','move'].indexOf(animationEvent) >= 0) {\n            return true;\n          }\n\n          var parentElement = element.parent();\n          var clone = angular.element(extractElementNode(element).cloneNode());\n\n          //make the element super hidden and override any CSS style values\n          clone.attr('style','position:absolute; top:-9999px; left:-9999px');\n          clone.removeAttr('id');\n          clone.empty();\n\n          forEach(oldClasses.split(' '), function(klass) {\n            clone.removeClass(klass);\n          });\n\n          var suffix = animationEvent == 'addClass' ? '-add' : '-remove';\n          clone.addClass(suffixClasses(className, suffix));\n          parentElement.append(clone);\n\n          var timings = getElementAnimationDetails(clone);\n          clone.remove();\n\n          return Math.max(timings.transitionDuration, timings.animationDuration) > 0;\n        },\n\n        enter : function(element, animationCompleted) {\n          return animate(element, 'ng-enter', animationCompleted);\n        },\n\n        leave : function(element, animationCompleted) {\n          return animate(element, 'ng-leave', animationCompleted);\n        },\n\n        move : function(element, animationCompleted) {\n          return animate(element, 'ng-move', animationCompleted);\n        },\n\n        beforeAddClass : function(element, className, animationCompleted) {\n          var cancellationMethod = animateBefore(element, suffixClasses(className, '-add'), function(fn) {\n\n            /* when a CSS class is added to an element then the transition style that\n             * is applied is the transition defined on the element when the CSS class\n             * is added at the time of the animation. This is how CSS3 functions\n             * outside of ngAnimate. */\n            element.addClass(className);\n            var timings = fn();\n            element.removeClass(className);\n            return timings;\n          });\n\n          if(cancellationMethod) {\n            afterReflow(element, function() {\n              unblockTransitions(element);\n              unblockKeyframeAnimations(element);\n              animationCompleted();\n            });\n            return cancellationMethod;\n          }\n          animationCompleted();\n        },\n\n        addClass : function(element, className, animationCompleted) {\n          return animateAfter(element, suffixClasses(className, '-add'), animationCompleted);\n        },\n\n        beforeRemoveClass : function(element, className, animationCompleted) {\n          var cancellationMethod = animateBefore(element, suffixClasses(className, '-remove'), function(fn) {\n            /* when classes are removed from an element then the transition style\n             * that is applied is the transition defined on the element without the\n             * CSS class being there. This is how CSS3 functions outside of ngAnimate.\n             * http://plnkr.co/edit/j8OzgTNxHTb4n3zLyjGW?p=preview */\n            var klass = element.attr('class');\n            element.removeClass(className);\n            var timings = fn();\n            element.attr('class', klass);\n            return timings;\n          });\n\n          if(cancellationMethod) {\n            afterReflow(element, function() {\n              unblockTransitions(element);\n              unblockKeyframeAnimations(element);\n              animationCompleted();\n            });\n            return cancellationMethod;\n          }\n          animationCompleted();\n        },\n\n        removeClass : function(element, className, animationCompleted) {\n          return animateAfter(element, suffixClasses(className, '-remove'), animationCompleted);\n        }\n      };\n\n      function suffixClasses(classes, suffix) {\n        var className = '';\n        classes = angular.isArray(classes) ? classes : classes.split(/\\s+/);\n        forEach(classes, function(klass, i) {\n          if(klass && klass.length > 0) {\n            className += (i > 0 ? ' ' : '') + klass + suffix;\n          }\n        });\n        return className;\n      }\n    }]);\n  }]);\n\n\n})(window, window.angular);\n\n/*!\n * ionic.bundle.js is a concatenation of:\n * ionic.js, angular.js, angular-animate.js,\n * angular-ui-router.js, and ionic-angular.js\n */\n\n/**\n * @license AngularJS v1.2.12\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\nvar $sanitizeMinErr = angular.$$minErr('$sanitize');\n\n/**\n * @ngdoc overview\n * @name ngSanitize\n * @description\n *\n * # ngSanitize\n *\n * The `ngSanitize` module provides functionality to sanitize HTML.\n *\n * {@installModule sanitize}\n *\n * <div doc-module-components=\"ngSanitize\"></div>\n *\n * See {@link ngSanitize.$sanitize `$sanitize`} for usage.\n */\n\n/*\n * HTML Parser By Misko Hevery (misko@hevery.com)\n * based on:  HTML Parser By John Resig (ejohn.org)\n * Original code by Erik Arvidsson, Mozilla Public License\n * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js\n *\n * // Use like so:\n * htmlParser(htmlString, {\n *     start: function(tag, attrs, unary) {},\n *     end: function(tag) {},\n *     chars: function(text) {},\n *     comment: function(text) {}\n * });\n *\n */\n\n\n/**\n * @ngdoc service\n * @name ngSanitize.$sanitize\n * @function\n *\n * @description\n *   The input is sanitized by parsing the html into tokens. All safe tokens (from a whitelist) are\n *   then serialized back to properly escaped html string. This means that no unsafe input can make\n *   it into the returned string, however, since our parser is more strict than a typical browser\n *   parser, it's possible that some obscure input, which would be recognized as valid HTML by a\n *   browser, won't make it through the sanitizer.\n *   The whitelist is configured using the functions `aHrefSanitizationWhitelist` and\n *   `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider `$compileProvider`}.\n *\n * @param {string} html Html input.\n * @returns {string} Sanitized html.\n *\n * @example\n   <doc:example module=\"ngSanitize\">\n   <doc:source>\n     <script>\n       function Ctrl($scope, $sce) {\n         $scope.snippet =\n           '<p style=\"color:blue\">an html\\n' +\n           '<em onmouseover=\"this.textContent=\\'PWN3D!\\'\">click here</em>\\n' +\n           'snippet</p>';\n         $scope.deliberatelyTrustDangerousSnippet = function() {\n           return $sce.trustAsHtml($scope.snippet);\n         };\n       }\n     </script>\n     <div ng-controller=\"Ctrl\">\n        Snippet: <textarea ng-model=\"snippet\" cols=\"60\" rows=\"3\"></textarea>\n       <table>\n         <tr>\n           <td>Directive</td>\n           <td>How</td>\n           <td>Source</td>\n           <td>Rendered</td>\n         </tr>\n         <tr id=\"bind-html-with-sanitize\">\n           <td>ng-bind-html</td>\n           <td>Automatically uses $sanitize</td>\n           <td><pre>&lt;div ng-bind-html=\"snippet\"&gt;<br/>&lt;/div&gt;</pre></td>\n           <td><div ng-bind-html=\"snippet\"></div></td>\n         </tr>\n         <tr id=\"bind-html-with-trust\">\n           <td>ng-bind-html</td>\n           <td>Bypass $sanitize by explicitly trusting the dangerous value</td>\n           <td>\n           <pre>&lt;div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"&gt;\n&lt;/div&gt;</pre>\n           </td>\n           <td><div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"></div></td>\n         </tr>\n         <tr id=\"bind-default\">\n           <td>ng-bind</td>\n           <td>Automatically escapes</td>\n           <td><pre>&lt;div ng-bind=\"snippet\"&gt;<br/>&lt;/div&gt;</pre></td>\n           <td><div ng-bind=\"snippet\"></div></td>\n         </tr>\n       </table>\n       </div>\n   </doc:source>\n   <doc:protractor>\n     it('should sanitize the html snippet by default', function() {\n       expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).\n         toBe('<p>an html\\n<em>click here</em>\\nsnippet</p>');\n     });\n\n     it('should inline raw snippet if bound to a trusted value', function() {\n       expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).\n         toBe(\"<p style=\\\"color:blue\\\">an html\\n\" +\n              \"<em onmouseover=\\\"this.textContent='PWN3D!'\\\">click here</em>\\n\" +\n              \"snippet</p>\");\n     });\n\n     it('should escape snippet without any filter', function() {\n       expect(element(by.css('#bind-default div')).getInnerHtml()).\n         toBe(\"&lt;p style=\\\"color:blue\\\"&gt;an html\\n\" +\n              \"&lt;em onmouseover=\\\"this.textContent='PWN3D!'\\\"&gt;click here&lt;/em&gt;\\n\" +\n              \"snippet&lt;/p&gt;\");\n     });\n\n     it('should update', function() {\n       element(by.model('snippet')).clear();\n       element(by.model('snippet')).sendKeys('new <b onclick=\"alert(1)\">text</b>');\n       expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).\n         toBe('new <b>text</b>');\n       expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe(\n         'new <b onclick=\"alert(1)\">text</b>');\n       expect(element(by.css('#bind-default div')).getInnerHtml()).toBe(\n         \"new &lt;b onclick=\\\"alert(1)\\\"&gt;text&lt;/b&gt;\");\n     });\n   </doc:protractor>\n   </doc:example>\n */\nfunction $SanitizeProvider() {\n  this.$get = ['$$sanitizeUri', function($$sanitizeUri) {\n    return function(html) {\n      var buf = [];\n      htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) {\n        return !/^unsafe/.test($$sanitizeUri(uri, isImage));\n      }));\n      return buf.join('');\n    };\n  }];\n}\n\nfunction sanitizeText(chars) {\n  var buf = [];\n  var writer = htmlSanitizeWriter(buf, angular.noop);\n  writer.chars(chars);\n  return buf.join('');\n}\n\n\n// Regular Expressions for parsing tags and attributes\nvar START_TAG_REGEXP =\n       /^<\\s*([\\w:-]+)((?:\\s+[\\w:-]+(?:\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*)\\s*(\\/?)\\s*>/,\n  END_TAG_REGEXP = /^<\\s*\\/\\s*([\\w:-]+)[^>]*>/,\n  ATTR_REGEXP = /([\\w:-]+)(?:\\s*=\\s*(?:(?:\"((?:[^\"])*)\")|(?:'((?:[^'])*)')|([^>\\s]+)))?/g,\n  BEGIN_TAG_REGEXP = /^</,\n  BEGING_END_TAGE_REGEXP = /^<\\s*\\//,\n  COMMENT_REGEXP = /<!--(.*?)-->/g,\n  DOCTYPE_REGEXP = /<!DOCTYPE([^>]*?)>/i,\n  CDATA_REGEXP = /<!\\[CDATA\\[(.*?)]]>/g,\n  // Match everything outside of normal chars and \" (quote character)\n  NON_ALPHANUMERIC_REGEXP = /([^\\#-~| |!])/g;\n\n\n// Good source of info about elements and attributes\n// https://dev.w3.org/html5/spec/Overview.html#semantics\n// https://simon.html5.org/html-elements\n\n// Safe Void Elements - HTML5\n// https://dev.w3.org/html5/spec/Overview.html#void-elements\nvar voidElements = makeMap(\"area,br,col,hr,img,wbr\");\n\n// Elements that you can, intentionally, leave open (and which close themselves)\n// https://dev.w3.org/html5/spec/Overview.html#optional-tags\nvar optionalEndTagBlockElements = makeMap(\"colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr\"),\n    optionalEndTagInlineElements = makeMap(\"rp,rt\"),\n    optionalEndTagElements = angular.extend({},\n                                            optionalEndTagInlineElements,\n                                            optionalEndTagBlockElements);\n\n// Safe Block Elements - HTML5\nvar blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap(\"address,article,\" +\n        \"aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,\" +\n        \"h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul\"));\n\n// Inline Elements - HTML5\nvar inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap(\"a,abbr,acronym,b,\" +\n        \"bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,\" +\n        \"samp,small,span,strike,strong,sub,sup,time,tt,u,var\"));\n\n\n// Special Elements (can contain anything)\nvar specialElements = makeMap(\"script,style\");\n\nvar validElements = angular.extend({},\n                                   voidElements,\n                                   blockElements,\n                                   inlineElements,\n                                   optionalEndTagElements);\n\n//Attributes that have href and hence need to be sanitized\nvar uriAttrs = makeMap(\"background,cite,href,longdesc,src,usemap\");\nvar validAttrs = angular.extend({}, uriAttrs, makeMap(\n    'abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,'+\n    'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,'+\n    'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,'+\n    'scope,scrolling,shape,size,span,start,summary,target,title,type,'+\n    'valign,value,vspace,width'));\n\nfunction makeMap(str) {\n  var obj = {}, items = str.split(','), i;\n  for (i = 0; i < items.length; i++) obj[items[i]] = true;\n  return obj;\n}\n\n\n/**\n * @example\n * htmlParser(htmlString, {\n *     start: function(tag, attrs, unary) {},\n *     end: function(tag) {},\n *     chars: function(text) {},\n *     comment: function(text) {}\n * });\n *\n * @param {string} html string\n * @param {object} handler\n */\nfunction htmlParser( html, handler ) {\n  var index, chars, match, stack = [], last = html;\n  stack.last = function() { return stack[ stack.length - 1 ]; };\n\n  while ( html ) {\n    chars = true;\n\n    // Make sure we're not in a script or style element\n    if ( !stack.last() || !specialElements[ stack.last() ] ) {\n\n      // Comment\n      if ( html.indexOf(\"<!--\") === 0 ) {\n        // comments containing -- are not allowed unless they terminate the comment\n        index = html.indexOf(\"--\", 4);\n\n        if ( index >= 0 && html.lastIndexOf(\"-->\", index) === index) {\n          if (handler.comment) handler.comment( html.substring( 4, index ) );\n          html = html.substring( index + 3 );\n          chars = false;\n        }\n      // DOCTYPE\n      } else if ( DOCTYPE_REGEXP.test(html) ) {\n        match = html.match( DOCTYPE_REGEXP );\n\n        if ( match ) {\n          html = html.replace( match[0] , '');\n          chars = false;\n        }\n      // end tag\n      } else if ( BEGING_END_TAGE_REGEXP.test(html) ) {\n        match = html.match( END_TAG_REGEXP );\n\n        if ( match ) {\n          html = html.substring( match[0].length );\n          match[0].replace( END_TAG_REGEXP, parseEndTag );\n          chars = false;\n        }\n\n      // start tag\n      } else if ( BEGIN_TAG_REGEXP.test(html) ) {\n        match = html.match( START_TAG_REGEXP );\n\n        if ( match ) {\n          html = html.substring( match[0].length );\n          match[0].replace( START_TAG_REGEXP, parseStartTag );\n          chars = false;\n        }\n      }\n\n      if ( chars ) {\n        index = html.indexOf(\"<\");\n\n        var text = index < 0 ? html : html.substring( 0, index );\n        html = index < 0 ? \"\" : html.substring( index );\n\n        if (handler.chars) handler.chars( decodeEntities(text) );\n      }\n\n    } else {\n      html = html.replace(new RegExp(\"(.*)<\\\\s*\\\\/\\\\s*\" + stack.last() + \"[^>]*>\", 'i'),\n        function(all, text){\n          text = text.replace(COMMENT_REGEXP, \"$1\").replace(CDATA_REGEXP, \"$1\");\n\n          if (handler.chars) handler.chars( decodeEntities(text) );\n\n          return \"\";\n      });\n\n      parseEndTag( \"\", stack.last() );\n    }\n\n    if ( html == last ) {\n      throw $sanitizeMinErr('badparse', \"The sanitizer was unable to parse the following block \" +\n                                        \"of html: {0}\", html);\n    }\n    last = html;\n  }\n\n  // Clean up any remaining tags\n  parseEndTag();\n\n  function parseStartTag( tag, tagName, rest, unary ) {\n    tagName = angular.lowercase(tagName);\n    if ( blockElements[ tagName ] ) {\n      while ( stack.last() && inlineElements[ stack.last() ] ) {\n        parseEndTag( \"\", stack.last() );\n      }\n    }\n\n    if ( optionalEndTagElements[ tagName ] && stack.last() == tagName ) {\n      parseEndTag( \"\", tagName );\n    }\n\n    unary = voidElements[ tagName ] || !!unary;\n\n    if ( !unary )\n      stack.push( tagName );\n\n    var attrs = {};\n\n    rest.replace(ATTR_REGEXP,\n      function(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) {\n        var value = doubleQuotedValue\n          || singleQuotedValue\n          || unquotedValue\n          || '';\n\n        attrs[name] = decodeEntities(value);\n    });\n    if (handler.start) handler.start( tagName, attrs, unary );\n  }\n\n  function parseEndTag( tag, tagName ) {\n    var pos = 0, i;\n    tagName = angular.lowercase(tagName);\n    if ( tagName )\n      // Find the closest opened tag of the same type\n      for ( pos = stack.length - 1; pos >= 0; pos-- )\n        if ( stack[ pos ] == tagName )\n          break;\n\n    if ( pos >= 0 ) {\n      // Close all the open elements, up the stack\n      for ( i = stack.length - 1; i >= pos; i-- )\n        if (handler.end) handler.end( stack[ i ] );\n\n      // Remove the open elements from the stack\n      stack.length = pos;\n    }\n  }\n}\n\nvar hiddenPre=document.createElement(\"pre\");\nvar spaceRe = /^(\\s*)([\\s\\S]*?)(\\s*)$/;\n/**\n * decodes all entities into regular string\n * @param value\n * @returns {string} A string with decoded entities.\n */\nfunction decodeEntities(value) {\n  if (!value) { return ''; }\n\n  // Note: IE8 does not preserve spaces at the start/end of innerHTML\n  // so we must capture them and reattach them afterward\n  var parts = spaceRe.exec(value);\n  var spaceBefore = parts[1];\n  var spaceAfter = parts[3];\n  var content = parts[2];\n  if (content) {\n    hiddenPre.innerHTML=content.replace(/</g,\"&lt;\");\n    // innerText depends on styling as it doesn't display hidden elements.\n    // Therefore, it's better to use textContent not to cause unnecessary\n    // reflows. However, IE<9 don't support textContent so the innerText\n    // fallback is necessary.\n    content = 'textContent' in hiddenPre ?\n      hiddenPre.textContent : hiddenPre.innerText;\n  }\n  return spaceBefore + content + spaceAfter;\n}\n\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n * @returns escaped text\n */\nfunction encodeEntities(value) {\n  return value.\n    replace(/&/g, '&amp;').\n    replace(NON_ALPHANUMERIC_REGEXP, function(value){\n      return '&#' + value.charCodeAt(0) + ';';\n    }).\n    replace(/</g, '&lt;').\n    replace(/>/g, '&gt;');\n}\n\n/**\n * create an HTML/XML writer which writes to buffer\n * @param {Array} buf use buf.jain('') to get out sanitized html string\n * @returns {object} in the form of {\n *     start: function(tag, attrs, unary) {},\n *     end: function(tag) {},\n *     chars: function(text) {},\n *     comment: function(text) {}\n * }\n */\nfunction htmlSanitizeWriter(buf, uriValidator){\n  var ignore = false;\n  var out = angular.bind(buf, buf.push);\n  return {\n    start: function(tag, attrs, unary){\n      tag = angular.lowercase(tag);\n      if (!ignore && specialElements[tag]) {\n        ignore = tag;\n      }\n      if (!ignore && validElements[tag] === true) {\n        out('<');\n        out(tag);\n        angular.forEach(attrs, function(value, key){\n          var lkey=angular.lowercase(key);\n          var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background');\n          if (validAttrs[lkey] === true &&\n            (uriAttrs[lkey] !== true || uriValidator(value, isImage))) {\n            out(' ');\n            out(key);\n            out('=\"');\n            out(encodeEntities(value));\n            out('\"');\n          }\n        });\n        out(unary ? '/>' : '>');\n      }\n    },\n    end: function(tag){\n        tag = angular.lowercase(tag);\n        if (!ignore && validElements[tag] === true) {\n          out('</');\n          out(tag);\n          out('>');\n        }\n        if (tag == ignore) {\n          ignore = false;\n        }\n      },\n    chars: function(chars){\n        if (!ignore) {\n          out(encodeEntities(chars));\n        }\n      }\n  };\n}\n\n\n// define ngSanitize module and register $sanitize service\nangular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider);\n\n/* global sanitizeText: false */\n\n/**\n * @ngdoc filter\n * @name ngSanitize.filter:linky\n * @function\n *\n * @description\n * Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and\n * plain email address links.\n *\n * Requires the {@link ngSanitize `ngSanitize`} module to be installed.\n *\n * @param {string} text Input text.\n * @param {string} target Window (_blank|_self|_parent|_top) or named frame to open links in.\n * @returns {string} Html-linkified text.\n *\n * @usage\n   <span ng-bind-html=\"linky_expression | linky\"></span>\n *\n * @example\n   <doc:example module=\"ngSanitize\">\n     <doc:source>\n       <script>\n         function Ctrl($scope) {\n           $scope.snippet =\n             'Pretty text with some links:\\n'+\n             'http://angularjs.org/,\\n'+\n             'mailto:us@somewhere.org,\\n'+\n             'another@somewhere.org,\\n'+\n             'and one more: ftp://127.0.0.1/.';\n           $scope.snippetWithTarget = 'http://angularjs.org/';\n         }\n       </script>\n       <div ng-controller=\"Ctrl\">\n       Snippet: <textarea ng-model=\"snippet\" cols=\"60\" rows=\"3\"></textarea>\n       <table>\n         <tr>\n           <td>Filter</td>\n           <td>Source</td>\n           <td>Rendered</td>\n         </tr>\n         <tr id=\"linky-filter\">\n           <td>linky filter</td>\n           <td>\n             <pre>&lt;div ng-bind-html=\"snippet | linky\"&gt;<br>&lt;/div&gt;</pre>\n           </td>\n           <td>\n             <div ng-bind-html=\"snippet | linky\"></div>\n           </td>\n         </tr>\n         <tr id=\"linky-target\">\n          <td>linky target</td>\n          <td>\n            <pre>&lt;div ng-bind-html=\"snippetWithTarget | linky:'_blank'\"&gt;<br>&lt;/div&gt;</pre>\n          </td>\n          <td>\n            <div ng-bind-html=\"snippetWithTarget | linky:'_blank'\"></div>\n          </td>\n         </tr>\n         <tr id=\"escaped-html\">\n           <td>no filter</td>\n           <td><pre>&lt;div ng-bind=\"snippet\"&gt;<br>&lt;/div&gt;</pre></td>\n           <td><div ng-bind=\"snippet\"></div></td>\n         </tr>\n       </table>\n     </doc:source>\n     <doc:protractor>\n       it('should linkify the snippet with urls', function() {\n         expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).\n             toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' +\n                  'another@somewhere.org, and one more: ftp://127.0.0.1/.');\n         expect(element.all(by.css('#linky-filter a')).count()).toEqual(4);\n       });\n\n       it('should not linkify snippet without the linky filter', function() {\n         expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()).\n             toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' +\n                  'another@somewhere.org, and one more: ftp://127.0.0.1/.');\n         expect(element.all(by.css('#escaped-html a')).count()).toEqual(0);\n       });\n\n       it('should update', function() {\n         element(by.model('snippet')).clear();\n         element(by.model('snippet')).sendKeys('new http://link.');\n         expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).\n             toBe('new http://link.');\n         expect(element.all(by.css('#linky-filter a')).count()).toEqual(1);\n         expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText())\n             .toBe('new http://link.');\n       });\n\n       it('should work with the target property', function() {\n        expect(element(by.id('linky-target')).\n            element(by.binding(\"snippetWithTarget | linky:'_blank'\")).getText()).\n            toBe('http://angularjs.org/');\n        expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank');\n       });\n     </doc:protractor>\n   </doc:example>\n */\nangular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {\n  var LINKY_URL_REGEXP =\n        /((ftp|https?):\\/\\/|(mailto:)?[A-Za-z0-9._%+-]+@)\\S*[^\\s.;,(){}<>]/,\n      MAILTO_REGEXP = /^mailto:/;\n\n  return function(text, target) {\n    if (!text) return text;\n    var match;\n    var raw = text;\n    var html = [];\n    var url;\n    var i;\n    while ((match = raw.match(LINKY_URL_REGEXP))) {\n      // We can not end in these as they are sometimes found at the end of the sentence\n      url = match[0];\n      // if we did not match ftp/http/mailto then assume mailto\n      if (match[2] == match[3]) url = 'mailto:' + url;\n      i = match.index;\n      addText(raw.substr(0, i));\n      addLink(url, match[0].replace(MAILTO_REGEXP, ''));\n      raw = raw.substring(i + match[0].length);\n    }\n    addText(raw);\n    return $sanitize(html.join(''));\n\n    function addText(text) {\n      if (!text) {\n        return;\n      }\n      html.push(sanitizeText(text));\n    }\n\n    function addLink(url, text) {\n      html.push('<a ');\n      if (angular.isDefined(target)) {\n        html.push('target=\"');\n        html.push(target);\n        html.push('\" ');\n      }\n      html.push('href=\"');\n      html.push(url);\n      html.push('\">');\n      addText(text);\n      html.push('</a>');\n    }\n  };\n}]);\n\n\n})(window, window.angular);\n\n/*!\n * ionic.bundle.js is a concatenation of:\n * ionic.js, angular.js, angular-animate.js,\n * angular-ui-router.js, and ionic-angular.js\n */\n\n/**\n * State-based routing for AngularJS\n * @version v0.2.7\n * @link http://angular-ui.github.com/\n * @license MIT License, http://www.opensource.org/licenses/MIT\n */\n\n/* commonjs package manager support (eg componentjs) */\nif (typeof module !== \"undefined\" && typeof exports !== \"undefined\" && module.exports === exports){\n  module.exports = 'ui.router';\n}\n\n(function (window, angular, undefined) {\n/*jshint globalstrict:true*/\n/*global angular:false*/\n'use strict';\n\nvar isDefined = angular.isDefined,\n    isFunction = angular.isFunction,\n    isString = angular.isString,\n    isObject = angular.isObject,\n    isArray = angular.isArray,\n    forEach = angular.forEach,\n    extend = angular.extend,\n    copy = angular.copy;\n\nfunction inherit(parent, extra) {\n  return extend(new (extend(function() {}, { prototype: parent }))(), extra);\n}\n\nfunction merge(dst) {\n  forEach(arguments, function(obj) {\n    if (obj !== dst) {\n      forEach(obj, function(value, key) {\n        if (!dst.hasOwnProperty(key)) dst[key] = value;\n      });\n    }\n  });\n  return dst;\n}\n\n/**\n * Finds the common ancestor path between two states.\n *\n * @param {Object} first The first state.\n * @param {Object} second The second state.\n * @return {Array} Returns an array of state names in descending order, not including the root.\n */\nfunction ancestors(first, second) {\n  var path = [];\n\n  for (var n in first.path) {\n    if (first.path[n] === \"\") continue;\n    if (!second.path[n]) break;\n    path.push(first.path[n]);\n  }\n  return path;\n}\n\n/**\n * IE8-safe wrapper for `Object.keys()`.\n *\n * @param {Object} object A JavaScript object.\n * @return {Array} Returns the keys of the object as an array.\n */\nfunction keys(object) {\n  if (Object.keys) {\n    return Object.keys(object);\n  }\n  var result = [];\n\n  angular.forEach(object, function(val, key) {\n    result.push(key);\n  });\n  return result;\n}\n\n/**\n * IE8-safe wrapper for `Array.prototype.indexOf()`.\n *\n * @param {Array} array A JavaScript array.\n * @param {*} value A value to search the array for.\n * @return {Number} Returns the array index value of `value`, or `-1` if not present.\n */\nfunction arraySearch(array, value) {\n  if (Array.prototype.indexOf) {\n    return array.indexOf(value, Number(arguments[2]) || 0);\n  }\n  var len = array.length >>> 0, from = Number(arguments[2]) || 0;\n  from = (from < 0) ? Math.ceil(from) : Math.floor(from);\n\n  if (from < 0) from += len;\n\n  for (; from < len; from++) {\n    if (from in array && array[from] === value) return from;\n  }\n  return -1;\n}\n\n/**\n * Merges a set of parameters with all parameters inherited between the common parents of the\n * current state and a given destination state.\n *\n * @param {Object} currentParams The value of the current state parameters ($stateParams).\n * @param {Object} newParams The set of parameters which will be composited with inherited params.\n * @param {Object} $current Internal definition of object representing the current state.\n * @param {Object} $to Internal definition of object representing state to transition to.\n */\nfunction inheritParams(currentParams, newParams, $current, $to) {\n  var parents = ancestors($current, $to), parentParams, inherited = {}, inheritList = [];\n\n  for (var i in parents) {\n    if (!parents[i].params || !parents[i].params.length) continue;\n    parentParams = parents[i].params;\n\n    for (var j in parentParams) {\n      if (arraySearch(inheritList, parentParams[j]) >= 0) continue;\n      inheritList.push(parentParams[j]);\n      inherited[parentParams[j]] = currentParams[parentParams[j]];\n    }\n  }\n  return extend({}, inherited, newParams);\n}\n\n/**\n * Normalizes a set of values to string or `null`, filtering them by a list of keys.\n *\n * @param {Array} keys The list of keys to normalize/return.\n * @param {Object} values An object hash of values to normalize.\n * @return {Object} Returns an object hash of normalized string values.\n */\nfunction normalize(keys, values) {\n  var normalized = {};\n\n  forEach(keys, function (name) {\n    var value = values[name];\n    normalized[name] = (value != null) ? String(value) : null;\n  });\n  return normalized;\n}\n\n/**\n * Performs a non-strict comparison of the subset of two objects, defined by a list of keys.\n *\n * @param {Object} a The first object.\n * @param {Object} b The second object.\n * @param {Array} keys The list of keys within each object to compare. If the list is empty or not specified,\n *                     it defaults to the list of keys in `a`.\n * @return {Boolean} Returns `true` if the keys match, otherwise `false`.\n */\nfunction equalForKeys(a, b, keys) {\n  if (!keys) {\n    keys = [];\n    for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility\n  }\n\n  for (var i=0; i<keys.length; i++) {\n    var k = keys[i];\n    if (a[k] != b[k]) return false; // Not '===', values aren't necessarily normalized\n  }\n  return true;\n}\n\n/**\n * Returns the subset of an object, based on a list of keys.\n *\n * @param {Array} keys\n * @param {Object} values\n * @return {Boolean} Returns a subset of `values`.\n */\nfunction filterByKeys(keys, values) {\n  var filtered = {};\n\n  forEach(keys, function (name) {\n    filtered[name] = values[name];\n  });\n  return filtered;\n}\n\nangular.module('ui.router.util', ['ng']);\nangular.module('ui.router.router', ['ui.router.util']);\nangular.module('ui.router.state', ['ui.router.router', 'ui.router.util']);\nangular.module('ui.router', ['ui.router.state']);\nangular.module('ui.router.compat', ['ui.router']);\n\n\n/**\n * Service (`ui-util`). Manages resolution of (acyclic) graphs of promises.\n * @module $resolve\n * @requires $q\n * @requires $injector\n */\n$Resolve.$inject = ['$q', '$injector'];\nfunction $Resolve(  $q,    $injector) {\n  \n  var VISIT_IN_PROGRESS = 1,\n      VISIT_DONE = 2,\n      NOTHING = {},\n      NO_DEPENDENCIES = [],\n      NO_LOCALS = NOTHING,\n      NO_PARENT = extend($q.when(NOTHING), { $$promises: NOTHING, $$values: NOTHING });\n  \n\n  /**\n   * Studies a set of invocables that are likely to be used multiple times.\n   *      $resolve.study(invocables)(locals, parent, self)\n   * is equivalent to\n   *      $resolve.resolve(invocables, locals, parent, self)\n   * but the former is more efficient (in fact `resolve` just calls `study` internally).\n   * See {@link module:$resolve/resolve} for details.\n   * @function\n   * @param {Object} invocables\n   * @return {Function}\n   */\n  this.study = function (invocables) {\n    if (!isObject(invocables)) throw new Error(\"'invocables' must be an object\");\n    \n    // Perform a topological sort of invocables to build an ordered plan\n    var plan = [], cycle = [], visited = {};\n    function visit(value, key) {\n      if (visited[key] === VISIT_DONE) return;\n      \n      cycle.push(key);\n      if (visited[key] === VISIT_IN_PROGRESS) {\n        cycle.splice(0, cycle.indexOf(key));\n        throw new Error(\"Cyclic dependency: \" + cycle.join(\" -> \"));\n      }\n      visited[key] = VISIT_IN_PROGRESS;\n      \n      if (isString(value)) {\n        plan.push(key, [ function() { return $injector.get(value); }], NO_DEPENDENCIES);\n      } else {\n        var params = $injector.annotate(value);\n        forEach(params, function (param) {\n          if (param !== key && invocables.hasOwnProperty(param)) visit(invocables[param], param);\n        });\n        plan.push(key, value, params);\n      }\n      \n      cycle.pop();\n      visited[key] = VISIT_DONE;\n    }\n    forEach(invocables, visit);\n    invocables = cycle = visited = null; // plan is all that's required\n    \n    function isResolve(value) {\n      return isObject(value) && value.then && value.$$promises;\n    }\n    \n    return function (locals, parent, self) {\n      if (isResolve(locals) && self === undefined) {\n        self = parent; parent = locals; locals = null;\n      }\n      if (!locals) locals = NO_LOCALS;\n      else if (!isObject(locals)) {\n        throw new Error(\"'locals' must be an object\");\n      }       \n      if (!parent) parent = NO_PARENT;\n      else if (!isResolve(parent)) {\n        throw new Error(\"'parent' must be a promise returned by $resolve.resolve()\");\n      }\n      \n      // To complete the overall resolution, we have to wait for the parent\n      // promise and for the promise for each invokable in our plan.\n      var resolution = $q.defer(),\n          result = resolution.promise,\n          promises = result.$$promises = {},\n          values = extend({}, locals),\n          wait = 1 + plan.length/3,\n          merged = false;\n          \n      function done() {\n        // Merge parent values we haven't got yet and publish our own $$values\n        if (!--wait) {\n          if (!merged) merge(values, parent.$$values); \n          result.$$values = values;\n          result.$$promises = true; // keep for isResolve()\n          resolution.resolve(values);\n        }\n      }\n      \n      function fail(reason) {\n        result.$$failure = reason;\n        resolution.reject(reason);\n      }\n      \n      // Short-circuit if parent has already failed\n      if (isDefined(parent.$$failure)) {\n        fail(parent.$$failure);\n        return result;\n      }\n      \n      // Merge parent values if the parent has already resolved, or merge\n      // parent promises and wait if the parent resolve is still in progress.\n      if (parent.$$values) {\n        merged = merge(values, parent.$$values);\n        done();\n      } else {\n        extend(promises, parent.$$promises);\n        parent.then(done, fail);\n      }\n      \n      // Process each invocable in the plan, but ignore any where a local of the same name exists.\n      for (var i=0, ii=plan.length; i<ii; i+=3) {\n        if (locals.hasOwnProperty(plan[i])) done();\n        else invoke(plan[i], plan[i+1], plan[i+2]);\n      }\n      \n      function invoke(key, invocable, params) {\n        // Create a deferred for this invocation. Failures will propagate to the resolution as well.\n        var invocation = $q.defer(), waitParams = 0;\n        function onfailure(reason) {\n          invocation.reject(reason);\n          fail(reason);\n        }\n        // Wait for any parameter that we have a promise for (either from parent or from this\n        // resolve; in that case study() will have made sure it's ordered before us in the plan).\n        forEach(params, function (dep) {\n          if (promises.hasOwnProperty(dep) && !locals.hasOwnProperty(dep)) {\n            waitParams++;\n            promises[dep].then(function (result) {\n              values[dep] = result;\n              if (!(--waitParams)) proceed();\n            }, onfailure);\n          }\n        });\n        if (!waitParams) proceed();\n        function proceed() {\n          if (isDefined(result.$$failure)) return;\n          try {\n            invocation.resolve($injector.invoke(invocable, self, values));\n            invocation.promise.then(function (result) {\n              values[key] = result;\n              done();\n            }, onfailure);\n          } catch (e) {\n            onfailure(e);\n          }\n        }\n        // Publish promise synchronously; invocations further down in the plan may depend on it.\n        promises[key] = invocation.promise;\n      }\n      \n      return result;\n    };\n  };\n  \n  /**\n   * Resolves a set of invocables. An invocable is a function to be invoked via `$injector.invoke()`,\n   * and can have an arbitrary number of dependencies. An invocable can either return a value directly,\n   * or a `$q` promise. If a promise is returned it will be resolved and the resulting value will be\n   * used instead. Dependencies of invocables are resolved (in this order of precedence)\n   *\n   * - from the specified `locals`\n   * - from another invocable that is part of this `$resolve` call\n   * - from an invocable that is inherited from a `parent` call to `$resolve` (or recursively\n   *   from any ancestor `$resolve` of that parent).\n   *\n   * The return value of `$resolve` is a promise for an object that contains (in this order of precedence)\n   *\n   * - any `locals` (if specified)\n   * - the resolved return values of all injectables\n   * - any values inherited from a `parent` call to `$resolve` (if specified)\n   *\n   * The promise will resolve after the `parent` promise (if any) and all promises returned by injectables\n   * have been resolved. If any invocable (or `$injector.invoke`) throws an exception, or if a promise\n   * returned by an invocable is rejected, the `$resolve` promise is immediately rejected with the same error.\n   * A rejection of a `parent` promise (if specified) will likewise be propagated immediately. Once the\n   * `$resolve` promise has been rejected, no further invocables will be called.\n   * \n   * Cyclic dependencies between invocables are not permitted and will caues `$resolve` to throw an\n   * error. As a special case, an injectable can depend on a parameter with the same name as the injectable,\n   * which will be fulfilled from the `parent` injectable of the same name. This allows inherited values\n   * to be decorated. Note that in this case any other injectable in the same `$resolve` with the same\n   * dependency would see the decorated value, not the inherited value.\n   *\n   * Note that missing dependencies -- unlike cyclic dependencies -- will cause an (asynchronous) rejection\n   * of the `$resolve` promise rather than a (synchronous) exception.\n   *\n   * Invocables are invoked eagerly as soon as all dependencies are available. This is true even for\n   * dependencies inherited from a `parent` call to `$resolve`.\n   *\n   * As a special case, an invocable can be a string, in which case it is taken to be a service name\n   * to be passed to `$injector.get()`. This is supported primarily for backwards-compatibility with the\n   * `resolve` property of `$routeProvider` routes.\n   *\n   * @function\n   * @param {Object.<string, Function|string>} invocables  functions to invoke or `$injector` services to fetch.\n   * @param {Object.<string, *>} [locals]  values to make available to the injectables\n   * @param {Promise.<Object>} [parent]  a promise returned by another call to `$resolve`.\n   * @param {Object} [self]  the `this` for the invoked methods\n   * @return {Promise.<Object>}  Promise for an object that contains the resolved return value\n   *    of all invocables, as well as any inherited and local values.\n   */\n  this.resolve = function (invocables, locals, parent, self) {\n    return this.study(invocables)(locals, parent, self);\n  };\n}\n\nangular.module('ui.router.util').service('$resolve', $Resolve);\n\n\n/**\n * Service. Manages loading of templates.\n * @constructor\n * @name $templateFactory\n * @requires $http\n * @requires $templateCache\n * @requires $injector\n */\n$TemplateFactory.$inject = ['$http', '$templateCache', '$injector'];\nfunction $TemplateFactory(  $http,   $templateCache,   $injector) {\n\n  /**\n   * Creates a template from a configuration object. \n   * @function\n   * @name $templateFactory#fromConfig\n   * @methodOf $templateFactory\n   * @param {Object} config  Configuration object for which to load a template. The following\n   *    properties are search in the specified order, and the first one that is defined is\n   *    used to create the template:\n   * @param {string|Function} config.template  html string template or function to load via\n   *    {@link $templateFactory#fromString fromString}.\n   * @param {string|Function} config.templateUrl  url to load or a function returning the url\n   *    to load via {@link $templateFactory#fromUrl fromUrl}.\n   * @param {Function} config.templateProvider  function to invoke via\n   *    {@link $templateFactory#fromProvider fromProvider}.\n   * @param {Object} params  Parameters to pass to the template function.\n   * @param {Object} [locals] Locals to pass to `invoke` if the template is loaded via a\n   *      `templateProvider`. Defaults to `{ params: params }`.\n   * @return {string|Promise.<string>}  The template html as a string, or a promise for that string,\n   *      or `null` if no template is configured.\n   */\n  this.fromConfig = function (config, params, locals) {\n    return (\n      isDefined(config.template) ? this.fromString(config.template, params) :\n      isDefined(config.templateUrl) ? this.fromUrl(config.templateUrl, params) :\n      isDefined(config.templateProvider) ? this.fromProvider(config.templateProvider, params, locals) :\n      null\n    );\n  };\n\n  /**\n   * Creates a template from a string or a function returning a string.\n   * @function\n   * @name $templateFactory#fromString\n   * @methodOf $templateFactory\n   * @param {string|Function} template  html template as a string or function that returns an html\n   *      template as a string.\n   * @param {Object} params  Parameters to pass to the template function.\n   * @return {string|Promise.<string>}  The template html as a string, or a promise for that string.\n   */\n  this.fromString = function (template, params) {\n    return isFunction(template) ? template(params) : template;\n  };\n\n  /**\n   * Loads a template from the a URL via `$http` and `$templateCache`.\n   * @function\n   * @name $templateFactory#fromUrl\n   * @methodOf $templateFactory\n   * @param {string|Function} url  url of the template to load, or a function that returns a url.\n   * @param {Object} params  Parameters to pass to the url function.\n   * @return {string|Promise.<string>}  The template html as a string, or a promise for that string.\n   */\n  this.fromUrl = function (url, params) {\n    if (isFunction(url)) url = url(params);\n    if (url == null) return null;\n    else return $http\n        .get(url, { cache: $templateCache })\n        .then(function(response) { return response.data; });\n  };\n\n  /**\n   * Creates a template by invoking an injectable provider function.\n   * @function\n   * @name $templateFactory#fromUrl\n   * @methodOf $templateFactory\n   * @param {Function} provider Function to invoke via `$injector.invoke`\n   * @param {Object} params Parameters for the template.\n   * @param {Object} [locals] Locals to pass to `invoke`. Defaults to `{ params: params }`.\n   * @return {string|Promise.<string>} The template html as a string, or a promise for that string.\n   */\n  this.fromProvider = function (provider, params, locals) {\n    return $injector.invoke(provider, null, locals || { params: params });\n  };\n}\n\nangular.module('ui.router.util').service('$templateFactory', $TemplateFactory);\n\n/**\n * Matches URLs against patterns and extracts named parameters from the path or the search\n * part of the URL. A URL pattern consists of a path pattern, optionally followed by '?' and a list\n * of search parameters. Multiple search parameter names are separated by '&'. Search parameters\n * do not influence whether or not a URL is matched, but their values are passed through into\n * the matched parameters returned by {@link UrlMatcher#exec exec}.\n * \n * Path parameter placeholders can be specified using simple colon/catch-all syntax or curly brace\n * syntax, which optionally allows a regular expression for the parameter to be specified:\n *\n * * ':' name - colon placeholder\n * * '*' name - catch-all placeholder\n * * '{' name '}' - curly placeholder\n * * '{' name ':' regexp '}' - curly placeholder with regexp. Should the regexp itself contain\n *   curly braces, they must be in matched pairs or escaped with a backslash.\n *\n * Parameter names may contain only word characters (latin letters, digits, and underscore) and\n * must be unique within the pattern (across both path and search parameters). For colon \n * placeholders or curly placeholders without an explicit regexp, a path parameter matches any\n * number of characters other than '/'. For catch-all placeholders the path parameter matches\n * any number of characters.\n * \n * ### Examples\n * \n * * '/hello/' - Matches only if the path is exactly '/hello/'. There is no special treatment for\n *   trailing slashes, and patterns have to match the entire path, not just a prefix.\n * * '/user/:id' - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or\n *   '/user/bob/details'. The second path segment will be captured as the parameter 'id'.\n * * '/user/{id}' - Same as the previous example, but using curly brace syntax.\n * * '/user/{id:[^/]*}' - Same as the previous example.\n * * '/user/{id:[0-9a-fA-F]{1,8}}' - Similar to the previous example, but only matches if the id\n *   parameter consists of 1 to 8 hex digits.\n * * '/files/{path:.*}' - Matches any URL starting with '/files/' and captures the rest of the\n *   path into the parameter 'path'.\n * * '/files/*path' - ditto.\n *\n * @constructor\n * @param {string} pattern  the pattern to compile into a matcher.\n *\n * @property {string} prefix  A static prefix of this pattern. The matcher guarantees that any\n *   URL matching this matcher (i.e. any string for which {@link UrlMatcher#exec exec()} returns\n *   non-null) will start with this prefix.\n */\nfunction UrlMatcher(pattern) {\n\n  // Find all placeholders and create a compiled pattern, using either classic or curly syntax:\n  //   '*' name\n  //   ':' name\n  //   '{' name '}'\n  //   '{' name ':' regexp '}'\n  // The regular expression is somewhat complicated due to the need to allow curly braces\n  // inside the regular expression. The placeholder regexp breaks down as follows:\n  //    ([:*])(\\w+)               classic placeholder ($1 / $2)\n  //    \\{(\\w+)(?:\\:( ... ))?\\}   curly brace placeholder ($3) with optional regexp ... ($4)\n  //    (?: ... | ... | ... )+    the regexp consists of any number of atoms, an atom being either\n  //    [^{}\\\\]+                  - anything other than curly braces or backslash\n  //    \\\\.                       - a backslash escape\n  //    \\{(?:[^{}\\\\]+|\\\\.)*\\}     - a matched set of curly braces containing other atoms\n  var placeholder = /([:*])(\\w+)|\\{(\\w+)(?:\\:((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n      names = {}, compiled = '^', last = 0, m,\n      segments = this.segments = [],\n      params = this.params = [];\n\n  function addParameter(id) {\n    if (!/^\\w+(-+\\w+)*$/.test(id)) throw new Error(\"Invalid parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n    if (names[id]) throw new Error(\"Duplicate parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n    names[id] = true;\n    params.push(id);\n  }\n\n  function quoteRegExp(string) {\n    return string.replace(/[\\\\\\[\\]\\^$*+?.()|{}]/g, \"\\\\$&\");\n  }\n\n  this.source = pattern;\n\n  // Split into static segments separated by path parameter placeholders.\n  // The number of segments is always 1 more than the number of parameters.\n  var id, regexp, segment;\n  while ((m = placeholder.exec(pattern))) {\n    id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n    regexp = m[4] || (m[1] == '*' ? '.*' : '[^/]*');\n    segment = pattern.substring(last, m.index);\n    if (segment.indexOf('?') >= 0) break; // we're into the search part\n    compiled += quoteRegExp(segment) + '(' + regexp + ')';\n    addParameter(id);\n    segments.push(segment);\n    last = placeholder.lastIndex;\n  }\n  segment = pattern.substring(last);\n\n  // Find any search parameter names and remove them from the last segment\n  var i = segment.indexOf('?');\n  if (i >= 0) {\n    var search = this.sourceSearch = segment.substring(i);\n    segment = segment.substring(0, i);\n    this.sourcePath = pattern.substring(0, last+i);\n\n    // Allow parameters to be separated by '?' as well as '&' to make concat() easier\n    forEach(search.substring(1).split(/[&?]/), addParameter);\n  } else {\n    this.sourcePath = pattern;\n    this.sourceSearch = '';\n  }\n\n  compiled += quoteRegExp(segment) + '$';\n  segments.push(segment);\n  this.regexp = new RegExp(compiled);\n  this.prefix = segments[0];\n}\n\n/**\n * Returns a new matcher for a pattern constructed by appending the path part and adding the\n * search parameters of the specified pattern to this pattern. The current pattern is not\n * modified. This can be understood as creating a pattern for URLs that are relative to (or\n * suffixes of) the current pattern.\n *\n * ### Example\n * The following two matchers are equivalent:\n * ```\n * new UrlMatcher('/user/{id}?q').concat('/details?date');\n * new UrlMatcher('/user/{id}/details?q&date');\n * ```\n *\n * @param {string} pattern  The pattern to append.\n * @return {UrlMatcher}  A matcher for the concatenated pattern.\n */\nUrlMatcher.prototype.concat = function (pattern) {\n  // Because order of search parameters is irrelevant, we can add our own search\n  // parameters to the end of the new pattern. Parse the new pattern by itself\n  // and then join the bits together, but it's much easier to do this on a string level.\n  return new UrlMatcher(this.sourcePath + pattern + this.sourceSearch);\n};\n\nUrlMatcher.prototype.toString = function () {\n  return this.source;\n};\n\n/**\n * Tests the specified path against this matcher, and returns an object containing the captured\n * parameter values, or null if the path does not match. The returned object contains the values\n * of any search parameters that are mentioned in the pattern, but their value may be null if\n * they are not present in `searchParams`. This means that search parameters are always treated\n * as optional.\n *\n * ### Example\n * ```\n * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', { x:'1', q:'hello' });\n * // returns { id:'bob', q:'hello', r:null }\n * ```\n *\n * @param {string} path  The URL path to match, e.g. `$location.path()`.\n * @param {Object} searchParams  URL search parameters, e.g. `$location.search()`.\n * @return {Object}  The captured parameter values.\n */\nUrlMatcher.prototype.exec = function (path, searchParams) {\n  var m = this.regexp.exec(path);\n  if (!m) return null;\n\n  var params = this.params, nTotal = params.length,\n    nPath = this.segments.length-1,\n    values = {}, i;\n\n  if (nPath !== m.length - 1) throw new Error(\"Unbalanced capture group in route '\" + this.source + \"'\");\n\n  for (i=0; i<nPath; i++) values[params[i]] = m[i+1];\n  for (/**/; i<nTotal; i++) values[params[i]] = searchParams[params[i]];\n\n  return values;\n};\n\n/**\n * Returns the names of all path and search parameters of this pattern in an unspecified order.\n * @return {Array.<string>}  An array of parameter names. Must be treated as read-only. If the\n *    pattern has no parameters, an empty array is returned.\n */\nUrlMatcher.prototype.parameters = function () {\n  return this.params;\n};\n\n/**\n * Creates a URL that matches this pattern by substituting the specified values\n * for the path and search parameters. Null values for path parameters are\n * treated as empty strings.\n *\n * ### Example\n * ```\n * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });\n * // returns '/user/bob?q=yes'\n * ```\n *\n * @param {Object} values  the values to substitute for the parameters in this pattern.\n * @return {string}  the formatted URL (path and optionally search part).\n */\nUrlMatcher.prototype.format = function (values) {\n  var segments = this.segments, params = this.params;\n  if (!values) return segments.join('');\n\n  var nPath = segments.length-1, nTotal = params.length,\n    result = segments[0], i, search, value;\n\n  for (i=0; i<nPath; i++) {\n    value = values[params[i]];\n    // TODO: Maybe we should throw on null here? It's not really good style to use '' and null interchangeabley\n    if (value != null) result += encodeURIComponent(value);\n    result += segments[i+1];\n  }\n  for (/**/; i<nTotal; i++) {\n    value = values[params[i]];\n    if (value != null) {\n      result += (search ? '&' : '?') + params[i] + '=' + encodeURIComponent(value);\n      search = true;\n    }\n  }\n\n  return result;\n};\n\n/**\n * Service. Factory for {@link UrlMatcher} instances. The factory is also available to providers\n * under the name `$urlMatcherFactoryProvider`.\n * @constructor\n * @name $urlMatcherFactory\n */\nfunction $UrlMatcherFactory() {\n  /**\n   * Creates a {@link UrlMatcher} for the specified pattern.\n   * @function\n   * @name $urlMatcherFactory#compile\n   * @methodOf $urlMatcherFactory\n   * @param {string} pattern  The URL pattern.\n   * @return {UrlMatcher}  The UrlMatcher.\n   */\n  this.compile = function (pattern) {\n    return new UrlMatcher(pattern);\n  };\n\n  /**\n   * Returns true if the specified object is a UrlMatcher, or false otherwise.\n   * @function\n   * @name $urlMatcherFactory#isMatcher\n   * @methodOf $urlMatcherFactory\n   * @param {Object} o\n   * @return {boolean}\n   */\n  this.isMatcher = function (o) {\n    return isObject(o) && isFunction(o.exec) && isFunction(o.format) && isFunction(o.concat);\n  };\n\n  this.$get = function () {\n    return this;\n  };\n}\n\n// Register as a provider so it's available to other providers\nangular.module('ui.router.util').provider('$urlMatcherFactory', $UrlMatcherFactory);\n\n\n$UrlRouterProvider.$inject = ['$urlMatcherFactoryProvider'];\nfunction $UrlRouterProvider(  $urlMatcherFactory) {\n  var rules = [], \n      otherwise = null;\n\n  // Returns a string that is a prefix of all strings matching the RegExp\n  function regExpPrefix(re) {\n    var prefix = /^\\^((?:\\\\[^a-zA-Z0-9]|[^\\\\\\[\\]\\^$*+?.()|{}]+)*)/.exec(re.source);\n    return (prefix != null) ? prefix[1].replace(/\\\\(.)/g, \"$1\") : '';\n  }\n\n  // Interpolates matched values into a String.replace()-style pattern\n  function interpolate(pattern, match) {\n    return pattern.replace(/\\$(\\$|\\d{1,2})/, function (m, what) {\n      return match[what === '$' ? 0 : Number(what)];\n    });\n  }\n\n  this.rule =\n    function (rule) {\n      if (!isFunction(rule)) throw new Error(\"'rule' must be a function\");\n      rules.push(rule);\n      return this;\n    };\n\n  this.otherwise =\n    function (rule) {\n      if (isString(rule)) {\n        var redirect = rule;\n        rule = function () { return redirect; };\n      }\n      else if (!isFunction(rule)) throw new Error(\"'rule' must be a function\");\n      otherwise = rule;\n      return this;\n    };\n\n\n  function handleIfMatch($injector, handler, match) {\n    if (!match) return false;\n    var result = $injector.invoke(handler, handler, { $match: match });\n    return isDefined(result) ? result : true;\n  }\n\n  this.when =\n    function (what, handler) {\n      var redirect, handlerIsString = isString(handler);\n      if (isString(what)) what = $urlMatcherFactory.compile(what);\n\n      if (!handlerIsString && !isFunction(handler) && !isArray(handler))\n        throw new Error(\"invalid 'handler' in when()\");\n\n      var strategies = {\n        matcher: function (what, handler) {\n          if (handlerIsString) {\n            redirect = $urlMatcherFactory.compile(handler);\n            handler = ['$match', function ($match) { return redirect.format($match); }];\n          }\n          return extend(function ($injector, $location) {\n            return handleIfMatch($injector, handler, what.exec($location.path(), $location.search()));\n          }, {\n            prefix: isString(what.prefix) ? what.prefix : ''\n          });\n        },\n        regex: function (what, handler) {\n          if (what.global || what.sticky) throw new Error(\"when() RegExp must not be global or sticky\");\n\n          if (handlerIsString) {\n            redirect = handler;\n            handler = ['$match', function ($match) { return interpolate(redirect, $match); }];\n          }\n          return extend(function ($injector, $location) {\n            return handleIfMatch($injector, handler, what.exec($location.path()));\n          }, {\n            prefix: regExpPrefix(what)\n          });\n        }\n      };\n\n      var check = { matcher: $urlMatcherFactory.isMatcher(what), regex: what instanceof RegExp };\n\n      for (var n in check) {\n        if (check[n]) {\n          return this.rule(strategies[n](what, handler));\n        }\n      }\n\n      throw new Error(\"invalid 'what' in when()\");\n    };\n\n  this.$get =\n    [        '$location', '$rootScope', '$injector',\n    function ($location,   $rootScope,   $injector) {\n      // TODO: Optimize groups of rules with non-empty prefix into some sort of decision tree\n      function update(evt) {\n        if (evt && evt.defaultPrevented) return;\n        function check(rule) {\n          var handled = rule($injector, $location);\n          if (handled) {\n            if (isString(handled)) $location.replace().url(handled);\n            return true;\n          }\n          return false;\n        }\n        var n=rules.length, i;\n        for (i=0; i<n; i++) {\n          if (check(rules[i])) return;\n        }\n        // always check otherwise last to allow dynamic updates to the set of rules\n        if (otherwise) check(otherwise);\n      }\n\n      $rootScope.$on('$locationChangeSuccess', update);\n\n      return {\n        sync: function () {\n          update();\n        }\n      };\n    }];\n}\n\nangular.module('ui.router.router').provider('$urlRouter', $UrlRouterProvider);\n\n$StateProvider.$inject = ['$urlRouterProvider', '$urlMatcherFactoryProvider', '$locationProvider'];\nfunction $StateProvider(   $urlRouterProvider,   $urlMatcherFactory,           $locationProvider) {\n\n  var root, states = {}, $state, queue = {}, abstractKey = 'abstract';\n\n  // Builds state properties from definition passed to registerState()\n  var stateBuilder = {\n\n    // Derive parent state from a hierarchical name only if 'parent' is not explicitly defined.\n    // state.children = [];\n    // if (parent) parent.children.push(state);\n    parent: function(state) {\n      if (isDefined(state.parent) && state.parent) return findState(state.parent);\n      // regex matches any valid composite state name\n      // would match \"contact.list\" but not \"contacts\"\n      var compositeName = /^(.+)\\.[^.]+$/.exec(state.name);\n      return compositeName ? findState(compositeName[1]) : root;\n    },\n\n    // inherit 'data' from parent and override by own values (if any)\n    data: function(state) {\n      if (state.parent && state.parent.data) {\n        state.data = state.self.data = extend({}, state.parent.data, state.data);\n      }\n      return state.data;\n    },\n\n    // Build a URLMatcher if necessary, either via a relative or absolute URL\n    url: function(state) {\n      var url = state.url;\n\n      if (isString(url)) {\n        if (url.charAt(0) == '^') {\n          return $urlMatcherFactory.compile(url.substring(1));\n        }\n        return (state.parent.navigable || root).url.concat(url);\n      }\n\n      if ($urlMatcherFactory.isMatcher(url) || url == null) {\n        return url;\n      }\n      throw new Error(\"Invalid url '\" + url + \"' in state '\" + state + \"'\");\n    },\n\n    // Keep track of the closest ancestor state that has a URL (i.e. is navigable)\n    navigable: function(state) {\n      return state.url ? state : (state.parent ? state.parent.navigable : null);\n    },\n\n    // Derive parameters for this state and ensure they're a super-set of parent's parameters\n    params: function(state) {\n      if (!state.params) {\n        return state.url ? state.url.parameters() : state.parent.params;\n      }\n      if (!isArray(state.params)) throw new Error(\"Invalid params in state '\" + state + \"'\");\n      if (state.url) throw new Error(\"Both params and url specicified in state '\" + state + \"'\");\n      return state.params;\n    },\n\n    // If there is no explicit multi-view configuration, make one up so we don't have\n    // to handle both cases in the view directive later. Note that having an explicit\n    // 'views' property will mean the default unnamed view properties are ignored. This\n    // is also a good time to resolve view names to absolute names, so everything is a\n    // straight lookup at link time.\n    views: function(state) {\n      var views = {};\n\n      forEach(isDefined(state.views) ? state.views : { '': state }, function (view, name) {\n        if (name.indexOf('@') < 0) name += '@' + state.parent.name;\n        views[name] = view;\n      });\n      return views;\n    },\n\n    ownParams: function(state) {\n      if (!state.parent) {\n        return state.params;\n      }\n      var paramNames = {}; forEach(state.params, function (p) { paramNames[p] = true; });\n\n      forEach(state.parent.params, function (p) {\n        if (!paramNames[p]) {\n          throw new Error(\"Missing required parameter '\" + p + \"' in state '\" + state.name + \"'\");\n        }\n        paramNames[p] = false;\n      });\n      var ownParams = [];\n\n      forEach(paramNames, function (own, p) {\n        if (own) ownParams.push(p);\n      });\n      return ownParams;\n    },\n\n    // Keep a full path from the root down to this state as this is needed for state activation.\n    path: function(state) {\n      return state.parent ? state.parent.path.concat(state) : []; // exclude root from path\n    },\n\n    // Speed up $state.contains() as it's used a lot\n    includes: function(state) {\n      var includes = state.parent ? extend({}, state.parent.includes) : {};\n      includes[state.name] = true;\n      return includes;\n    },\n\n    $delegates: {}\n  };\n\n  function isRelative(stateName) {\n    return stateName.indexOf(\".\") === 0 || stateName.indexOf(\"^\") === 0;\n  }\n\n  function findState(stateOrName, base) {\n    var isStr = isString(stateOrName),\n        name  = isStr ? stateOrName : stateOrName.name,\n        path  = isRelative(name);\n\n    if (path) {\n      if (!base) throw new Error(\"No reference point given for path '\"  + name + \"'\");\n      var rel = name.split(\".\"), i = 0, pathLength = rel.length, current = base;\n\n      for (; i < pathLength; i++) {\n        if (rel[i] === \"\" && i === 0) {\n          current = base;\n          continue;\n        }\n        if (rel[i] === \"^\") {\n          if (!current.parent) throw new Error(\"Path '\" + name + \"' not valid for state '\" + base.name + \"'\");\n          current = current.parent;\n          continue;\n        }\n        break;\n      }\n      rel = rel.slice(i).join(\".\");\n      name = current.name + (current.name && rel ? \".\" : \"\") + rel;\n    }\n    var state = states[name];\n\n    if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) {\n      return state;\n    }\n    return undefined;\n  }\n\n  function queueState(parentName, state) {\n    if (!queue[parentName]) {\n      queue[parentName] = [];\n    }\n    queue[parentName].push(state);\n  }\n\n  function registerState(state) {\n    // Wrap a new object around the state so we can store our private details easily.\n    state = inherit(state, {\n      self: state,\n      resolve: state.resolve || {},\n      toString: function() { return this.name; }\n    });\n\n    var name = state.name;\n    if (!isString(name) || name.indexOf('@') >= 0) throw new Error(\"State must have a valid name\");\n    if (states.hasOwnProperty(name)) throw new Error(\"State '\" + name + \"'' is already defined\");\n\n    // Get parent name\n    var parentName = (name.indexOf('.') !== -1) ? name.substring(0, name.lastIndexOf('.'))\n        : (isString(state.parent)) ? state.parent\n        : '';\n\n    // If parent is not registered yet, add state to queue and register later\n    if (parentName && !states[parentName]) {\n      return queueState(parentName, state.self);\n    }\n\n    for (var key in stateBuilder) {\n      if (isFunction(stateBuilder[key])) state[key] = stateBuilder[key](state, stateBuilder.$delegates[key]);\n    }\n    states[name] = state;\n\n    // Register the state in the global state list and with $urlRouter if necessary.\n    if (!state[abstractKey] && state.url) {\n      $urlRouterProvider.when(state.url, ['$match', '$stateParams', function ($match, $stateParams) {\n        if ($state.$current.navigable != state || !equalForKeys($match, $stateParams)) {\n          $state.transitionTo(state, $match, { location: false });\n        }\n      }]);\n    }\n\n    // Register any queued children\n    if (queue[name]) {\n      for (var i = 0; i < queue[name].length; i++) {\n        registerState(queue[name][i]);\n      }\n    }\n\n    return state;\n  }\n\n\n  // Implicit root state that is always active\n  root = registerState({\n    name: '',\n    url: '^',\n    views: null,\n    'abstract': true\n  });\n  root.navigable = null;\n\n\n  // .decorator()\n  // .decorator(name)\n  // .decorator(name, function)\n  this.decorator = decorator;\n  function decorator(name, func) {\n    /*jshint validthis: true */\n    if (isString(name) && !isDefined(func)) {\n      return stateBuilder[name];\n    }\n    if (!isFunction(func) || !isString(name)) {\n      return this;\n    }\n    if (stateBuilder[name] && !stateBuilder.$delegates[name]) {\n      stateBuilder.$delegates[name] = stateBuilder[name];\n    }\n    stateBuilder[name] = func;\n    return this;\n  }\n\n  // .state(state)\n  // .state(name, state)\n  this.state = state;\n  function state(name, definition) {\n    /*jshint validthis: true */\n    if (isObject(name)) definition = name;\n    else definition.name = name;\n    registerState(definition);\n    return this;\n  }\n\n  // $urlRouter is injected just to ensure it gets instantiated\n  this.$get = $get;\n  $get.$inject = ['$rootScope', '$q', '$view', '$injector', '$resolve', '$stateParams', '$location', '$urlRouter'];\n  function $get(   $rootScope,   $q,   $view,   $injector,   $resolve,   $stateParams,   $location,   $urlRouter) {\n\n    var TransitionSuperseded = $q.reject(new Error('transition superseded'));\n    var TransitionPrevented = $q.reject(new Error('transition prevented'));\n    var TransitionAborted = $q.reject(new Error('transition aborted'));\n    var TransitionFailed = $q.reject(new Error('transition failed'));\n    var currentLocation = $location.url();\n\n    function syncUrl() {\n      if ($location.url() !== currentLocation) {\n        $location.url(currentLocation);\n        $location.replace();\n      }\n    }\n\n    root.locals = { resolve: null, globals: { $stateParams: {} } };\n    $state = {\n      params: {},\n      current: root.self,\n      $current: root,\n      transition: null\n    };\n\n    $state.reload = function reload() {\n      $state.transitionTo($state.current, $stateParams, { reload: true, inherit: false, notify: false });\n    };\n\n    $state.go = function go(to, params, options) {\n      return this.transitionTo(to, params, extend({ inherit: true, relative: $state.$current }, options));\n    };\n\n    $state.transitionTo = function transitionTo(to, toParams, options) {\n      toParams = toParams || {};\n      options = extend({\n        location: true, inherit: false, relative: null, notify: true, reload: false, $retry: false\n      }, options || {});\n\n      var from = $state.$current, fromParams = $state.params, fromPath = from.path;\n      var evt, toState = findState(to, options.relative);\n\n      if (!isDefined(toState)) {\n        // Broadcast not found event and abort the transition if prevented\n        var redirect = { to: to, toParams: toParams, options: options };\n        evt = $rootScope.$broadcast('$stateNotFound', redirect, from.self, fromParams);\n        if (evt.defaultPrevented) {\n          syncUrl();\n          return TransitionAborted;\n        }\n\n        // Allow the handler to return a promise to defer state lookup retry\n        if (evt.retry) {\n          if (options.$retry) {\n            syncUrl();\n            return TransitionFailed;\n          }\n          var retryTransition = $state.transition = $q.when(evt.retry);\n          retryTransition.then(function() {\n            if (retryTransition !== $state.transition) return TransitionSuperseded;\n            redirect.options.$retry = true;\n            return $state.transitionTo(redirect.to, redirect.toParams, redirect.options);\n          }, function() {\n            return TransitionAborted;\n          });\n          syncUrl();\n          return retryTransition;\n        }\n\n        // Always retry once if the $stateNotFound was not prevented\n        // (handles either redirect changed or state lazy-definition)\n        to = redirect.to;\n        toParams = redirect.toParams;\n        options = redirect.options;\n        toState = findState(to, options.relative);\n        if (!isDefined(toState)) {\n          if (options.relative) throw new Error(\"Could not resolve '\" + to + \"' from state '\" + options.relative + \"'\");\n          throw new Error(\"No such state '\" + to + \"'\");\n        }\n      }\n      if (toState[abstractKey]) throw new Error(\"Cannot transition to abstract state '\" + to + \"'\");\n      if (options.inherit) toParams = inheritParams($stateParams, toParams || {}, $state.$current, toState);\n      to = toState;\n\n      var toPath = to.path;\n\n      // Starting from the root of the path, keep all levels that haven't changed\n      var keep, state, locals = root.locals, toLocals = [];\n      for (keep = 0, state = toPath[keep];\n           state && state === fromPath[keep] && equalForKeys(toParams, fromParams, state.ownParams) && !options.reload;\n           keep++, state = toPath[keep]) {\n        locals = toLocals[keep] = state.locals;\n      }\n\n      // If we're going to the same state and all locals are kept, we've got nothing to do.\n      // But clear 'transition', as we still want to cancel any other pending transitions.\n      // TODO: We may not want to bump 'transition' if we're called from a location change that we've initiated ourselves,\n      // because we might accidentally abort a legitimate transition initiated from code?\n      if (shouldTriggerReload(to, from, locals, options) ) {\n        if ( to.self.reloadOnSearch !== false )\n          syncUrl();\n        $state.transition = null;\n        return $q.when($state.current);\n      }\n\n      // Normalize/filter parameters before we pass them to event handlers etc.\n      toParams = normalize(to.params, toParams || {});\n\n      // Broadcast start event and cancel the transition if requested\n      if (options.notify) {\n        evt = $rootScope.$broadcast('$stateChangeStart', to.self, toParams, from.self, fromParams);\n        if (evt.defaultPrevented) {\n          syncUrl();\n          return TransitionPrevented;\n        }\n      }\n\n      // Resolve locals for the remaining states, but don't update any global state just\n      // yet -- if anything fails to resolve the current state needs to remain untouched.\n      // We also set up an inheritance chain for the locals here. This allows the view directive\n      // to quickly look up the correct definition for each view in the current state. Even\n      // though we create the locals object itself outside resolveState(), it is initially\n      // empty and gets filled asynchronously. We need to keep track of the promise for the\n      // (fully resolved) current locals, and pass this down the chain.\n      var resolved = $q.when(locals);\n      for (var l=keep; l<toPath.length; l++, state=toPath[l]) {\n        locals = toLocals[l] = inherit(locals);\n        resolved = resolveState(state, toParams, state===to, resolved, locals);\n      }\n\n      // Once everything is resolved, we are ready to perform the actual transition\n      // and return a promise for the new state. We also keep track of what the\n      // current promise is, so that we can detect overlapping transitions and\n      // keep only the outcome of the last transition.\n      var transition = $state.transition = resolved.then(function () {\n        var l, entering, exiting;\n\n        if ($state.transition !== transition) return TransitionSuperseded;\n\n        // Exit 'from' states not kept\n        for (l=fromPath.length-1; l>=keep; l--) {\n          exiting = fromPath[l];\n          if (exiting.self.onExit) {\n            $injector.invoke(exiting.self.onExit, exiting.self, exiting.locals.globals);\n          }\n          exiting.locals = null;\n        }\n\n        // Enter 'to' states not kept\n        for (l=keep; l<toPath.length; l++) {\n          entering = toPath[l];\n          entering.locals = toLocals[l];\n          if (entering.self.onEnter) {\n            $injector.invoke(entering.self.onEnter, entering.self, entering.locals.globals);\n          }\n        }\n\n        // Run it again, to catch any transitions in callbacks\n        if ($state.transition !== transition) return TransitionSuperseded;\n\n        // Update globals in $state\n        $state.$current = to;\n        $state.current = to.self;\n        $state.params = toParams;\n        copy($state.params, $stateParams);\n        $state.transition = null;\n\n        // Update $location\n        var toNav = to.navigable;\n        if (options.location && toNav) {\n          $location.url(toNav.url.format(toNav.locals.globals.$stateParams));\n\n          if (options.location === 'replace') {\n            $location.replace();\n          }\n        }\n\n        if (options.notify) {\n          $rootScope.$broadcast('$stateChangeSuccess', to.self, toParams, from.self, fromParams);\n        }\n        currentLocation = $location.url();\n\n        return $state.current;\n      }, function (error) {\n        if ($state.transition !== transition) return TransitionSuperseded;\n\n        $state.transition = null;\n        $rootScope.$broadcast('$stateChangeError', to.self, toParams, from.self, fromParams, error);\n        syncUrl();\n\n        return $q.reject(error);\n      });\n\n      return transition;\n    };\n\n    $state.is = function is(stateOrName, params) {\n      var state = findState(stateOrName);\n\n      if (!isDefined(state)) {\n        return undefined;\n      }\n\n      if ($state.$current !== state) {\n        return false;\n      }\n\n      return isDefined(params) ? angular.equals($stateParams, params) : true;\n    };\n\n    $state.includes = function includes(stateOrName, params) {\n      var state = findState(stateOrName);\n      if (!isDefined(state)) {\n        return undefined;\n      }\n\n      if (!isDefined($state.$current.includes[state.name])) {\n        return false;\n      }\n\n      var validParams = true;\n      angular.forEach(params, function(value, key) {\n        if (!isDefined($stateParams[key]) || $stateParams[key] !== value) {\n          validParams = false;\n        }\n      });\n      return validParams;\n    };\n\n    $state.href = function href(stateOrName, params, options) {\n      options = extend({ lossy: true, inherit: false, absolute: false, relative: $state.$current }, options || {});\n      var state = findState(stateOrName, options.relative);\n      if (!isDefined(state)) return null;\n\n      params = inheritParams($stateParams, params || {}, $state.$current, state);\n      var nav = (state && options.lossy) ? state.navigable : state;\n      var url = (nav && nav.url) ? nav.url.format(normalize(state.params, params || {})) : null;\n      if (!$locationProvider.html5Mode() && url) {\n        url = \"#\" + $locationProvider.hashPrefix() + url;\n      }\n      if (options.absolute && url) {\n        url = $location.protocol() + '://' + \n              $location.host() + \n              ($location.port() == 80 || $location.port() == 443 ? '' : ':' + $location.port()) + \n              (!$locationProvider.html5Mode() && url ? '/' : '') + \n              url;\n      }\n      return url;\n    };\n\n    $state.get = function (stateOrName, context) {\n      if (!isDefined(stateOrName)) {\n        var list = [];\n        forEach(states, function(state) { list.push(state.self); });\n        return list;\n      }\n      var state = findState(stateOrName, context);\n      return (state && state.self) ? state.self : null;\n    };\n\n    function resolveState(state, params, paramsAreFiltered, inherited, dst) {\n      // Make a restricted $stateParams with only the parameters that apply to this state if\n      // necessary. In addition to being available to the controller and onEnter/onExit callbacks,\n      // we also need $stateParams to be available for any $injector calls we make during the\n      // dependency resolution process.\n      var $stateParams = (paramsAreFiltered) ? params : filterByKeys(state.params, params);\n      var locals = { $stateParams: $stateParams };\n\n      // Resolve 'global' dependencies for the state, i.e. those not specific to a view.\n      // We're also including $stateParams in this; that way the parameters are restricted\n      // to the set that should be visible to the state, and are independent of when we update\n      // the global $state and $stateParams values.\n      dst.resolve = $resolve.resolve(state.resolve, locals, dst.resolve, state);\n      var promises = [ dst.resolve.then(function (globals) {\n        dst.globals = globals;\n      }) ];\n      if (inherited) promises.push(inherited);\n\n      // Resolve template and dependencies for all views.\n      forEach(state.views, function (view, name) {\n        var injectables = (view.resolve && view.resolve !== state.resolve ? view.resolve : {});\n        injectables.$template = [ function () {\n          return $view.load(name, { view: view, locals: locals, params: $stateParams, notify: false }) || '';\n        }];\n\n        promises.push($resolve.resolve(injectables, locals, dst.resolve, state).then(function (result) {\n          // References to the controller (only instantiated at link time)\n          if (isFunction(view.controllerProvider) || isArray(view.controllerProvider)) {\n            var injectLocals = angular.extend({}, injectables, locals);\n            result.$$controller = $injector.invoke(view.controllerProvider, null, injectLocals);\n          } else {\n            result.$$controller = view.controller;\n          }\n          // Provide access to the state itself for internal use\n          result.$$state = state;\n          dst[name] = result;\n        }));\n      });\n\n      // Wait for all the promises and then return the activation object\n      return $q.all(promises).then(function (values) {\n        return dst;\n      });\n    }\n\n    return $state;\n  }\n\n  function shouldTriggerReload(to, from, locals, options) {\n    if ( to === from && ((locals === from.locals && !options.reload) || (to.self.reloadOnSearch === false)) ) {\n      return true;\n    }\n  }\n}\n\nangular.module('ui.router.state')\n  .value('$stateParams', {})\n  .provider('$state', $StateProvider);\n\n\n$ViewProvider.$inject = [];\nfunction $ViewProvider() {\n\n  this.$get = $get;\n  $get.$inject = ['$rootScope', '$templateFactory'];\n  function $get(   $rootScope,   $templateFactory) {\n    return {\n      // $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... })\n      load: function load(name, options) {\n        var result, defaults = {\n          template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {}\n        };\n        options = extend(defaults, options);\n\n        if (options.view) {\n          result = $templateFactory.fromConfig(options.view, options.params, options.locals);\n        }\n        if (result && options.notify) {\n          $rootScope.$broadcast('$viewContentLoading', options);\n        }\n        return result;\n      }\n    };\n  }\n}\n\nangular.module('ui.router.state').provider('$view', $ViewProvider);\n\n\n$ViewDirective.$inject = ['$state', '$compile', '$controller', '$injector', '$anchorScroll'];\nfunction $ViewDirective(   $state,   $compile,   $controller,   $injector,   $anchorScroll) {\n  var $animator = $injector.has('$animator') ? $injector.get('$animator') : false;\n  var viewIsUpdating = false;\n\n  var directive = {\n    restrict: 'ECA',\n    terminal: true,\n    priority: 1000,\n    transclude: true,\n    compile: function (element, attr, transclude) {\n      return function(scope, element, attr) {\n        var viewScope, viewLocals,\n            name = attr[directive.name] || attr.name || '',\n            onloadExp = attr.onload || '',\n            animate = $animator && $animator(scope, attr),\n            initialView = transclude(scope);\n\n        // Returns a set of DOM manipulation functions based on whether animation\n        // should be performed\n        var renderer = function(doAnimate) {\n          return ({\n            \"true\": {\n              remove: function(element) { animate.leave(element.contents(), element); },\n              restore: function(compiled, element) { animate.enter(compiled, element); },\n              populate: function(template, element) {\n                var contents = angular.element('<div></div>').html(template).contents();\n                animate.enter(contents, element);\n                return contents;\n              }\n            },\n            \"false\": {\n              remove: function(element) { element.html(''); },\n              restore: function(compiled, element) { element.append(compiled); },\n              populate: function(template, element) {\n                element.html(template);\n                return element.contents();\n              }\n            }\n          })[doAnimate.toString()];\n        };\n\n        // Put back the compiled initial view\n        element.append(initialView);\n\n        // Find the details of the parent view directive (if any) and use it\n        // to derive our own qualified view name, then hang our own details\n        // off the DOM so child directives can find it.\n        var parent = element.parent().inheritedData('$uiView');\n        if (name.indexOf('@') < 0) name  = name + '@' + (parent ? parent.state.name : '');\n        var view = { name: name, state: null };\n        element.data('$uiView', view);\n\n        var eventHook = function() {\n          if (viewIsUpdating) return;\n          viewIsUpdating = true;\n\n          try { updateView(true); } catch (e) {\n            viewIsUpdating = false;\n            throw e;\n          }\n          viewIsUpdating = false;\n        };\n\n        scope.$on('$stateChangeSuccess', eventHook);\n        scope.$on('$viewContentLoading', eventHook);\n        updateView(false);\n\n        function updateView(doAnimate) {\n          var locals = $state.$current && $state.$current.locals[name];\n          if (locals === viewLocals) return; // nothing to do\n          var render = renderer(animate && doAnimate);\n\n          // Remove existing content\n          render.remove(element);\n\n          // Destroy previous view scope\n          if (viewScope) {\n            viewScope.$destroy();\n            viewScope = null;\n          }\n\n          if (!locals) {\n            viewLocals = null;\n            view.state = null;\n\n            // Restore the initial view\n            return render.restore(initialView, element);\n          }\n\n          viewLocals = locals;\n          view.state = locals.$$state;\n\n          var link = $compile(render.populate(locals.$template, element));\n          viewScope = scope.$new();\n\n          if (locals.$$controller) {\n            locals.$scope = viewScope;\n            var controller = $controller(locals.$$controller, locals);\n            element.children().data('$ngControllerController', controller);\n          }\n          link(viewScope);\n          viewScope.$emit('$viewContentLoaded');\n          if (onloadExp) viewScope.$eval(onloadExp);\n\n          // TODO: This seems strange, shouldn't $anchorScroll listen for $viewContentLoaded if necessary?\n          // $anchorScroll might listen on event...\n          $anchorScroll();\n        }\n      };\n    }\n  };\n  return directive;\n}\n\nangular.module('ui.router.state').directive('uiView', $ViewDirective);\n\nfunction parseStateRef(ref) {\n  var parsed = ref.replace(/\\n/g, \" \").match(/^([^(]+?)\\s*(\\((.*)\\))?$/);\n  if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n  return { state: parsed[1], paramExpr: parsed[3] || null };\n}\n\nfunction stateContext(el) {\n  var stateData = el.parent().inheritedData('$uiView');\n\n  if (stateData && stateData.state && stateData.state.name) {\n    return stateData.state;\n  }\n}\n\n$StateRefDirective.$inject = ['$state', '$timeout'];\nfunction $StateRefDirective($state, $timeout) {\n  return {\n    restrict: 'A',\n    require: '?^uiSrefActive',\n    link: function(scope, element, attrs, uiSrefActive) {\n      var ref = parseStateRef(attrs.uiSref);\n      var params = null, url = null, base = stateContext(element) || $state.$current;\n      var isForm = element[0].nodeName === \"FORM\";\n      var attr = isForm ? \"action\" : \"href\", nav = true;\n\n      var update = function(newVal) {\n        if (newVal) params = newVal;\n        if (!nav) return;\n\n        var newHref = $state.href(ref.state, params, { relative: base });\n\n        if (!newHref) {\n          nav = false;\n          return false;\n        }\n        element[0][attr] = newHref;\n        if (uiSrefActive) {\n          uiSrefActive.$$setStateInfo(ref.state, params);\n        }\n      };\n\n      if (ref.paramExpr) {\n        scope.$watch(ref.paramExpr, function(newVal, oldVal) {\n          if (newVal !== params) update(newVal);\n        }, true);\n        params = scope.$eval(ref.paramExpr);\n      }\n      update();\n\n      if (isForm) return;\n\n      element.bind(\"click\", function(e) {\n        var button = e.which || e.button;\n\n        if ((button === 0 || button == 1) && !e.ctrlKey && !e.metaKey && !e.shiftKey) {\n          // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n          $timeout(function() {\n            scope.$apply(function() {\n              $state.go(ref.state, params, { relative: base });\n            });\n          });\n          e.preventDefault();\n        }\n      });\n    }\n  };\n}\n\n$StateActiveDirective.$inject = ['$state', '$stateParams', '$interpolate'];\nfunction $StateActiveDirective($state, $stateParams, $interpolate) {\n  return {\n    restrict: \"A\",\n    controller: function($scope, $element, $attrs) {\n      var state, params, activeClass;\n\n      // There probably isn't much point in $observing this\n      activeClass = $interpolate($attrs.uiSrefActive || '', false)($scope);\n\n      // Allow uiSref to communicate with uiSrefActive\n      this.$$setStateInfo = function(newState, newParams) {\n        state = $state.get(newState, stateContext($element));\n        params = newParams;\n        update();\n      };\n\n      $scope.$on('$stateChangeSuccess', update);\n\n      // Update route state\n      function update() {\n        if ($state.$current.self === state && matchesParams()) {\n          $element.addClass(activeClass);\n        } else {\n          $element.removeClass(activeClass);\n        }\n      }\n\n      function matchesParams() {\n        return !params || equalForKeys(params, $stateParams);\n      }\n    }\n  };\n}\n\nangular.module('ui.router.state')\n  .directive('uiSref', $StateRefDirective)\n  .directive('uiSrefActive', $StateActiveDirective);\n\n$RouteProvider.$inject = ['$stateProvider', '$urlRouterProvider'];\nfunction $RouteProvider(  $stateProvider,    $urlRouterProvider) {\n\n  var routes = [];\n\n  onEnterRoute.$inject = ['$$state'];\n  function onEnterRoute(   $$state) {\n    /*jshint validthis: true */\n    this.locals = $$state.locals.globals;\n    this.params = this.locals.$stateParams;\n  }\n\n  function onExitRoute() {\n    /*jshint validthis: true */\n    this.locals = null;\n    this.params = null;\n  }\n\n  this.when = when;\n  function when(url, route) {\n    /*jshint validthis: true */\n    if (route.redirectTo != null) {\n      // Redirect, configure directly on $urlRouterProvider\n      var redirect = route.redirectTo, handler;\n      if (isString(redirect)) {\n        handler = redirect; // leave $urlRouterProvider to handle\n      } else if (isFunction(redirect)) {\n        // Adapt to $urlRouterProvider API\n        handler = function (params, $location) {\n          return redirect(params, $location.path(), $location.search());\n        };\n      } else {\n        throw new Error(\"Invalid 'redirectTo' in when()\");\n      }\n      $urlRouterProvider.when(url, handler);\n    } else {\n      // Regular route, configure as state\n      $stateProvider.state(inherit(route, {\n        parent: null,\n        name: 'route:' + encodeURIComponent(url),\n        url: url,\n        onEnter: onEnterRoute,\n        onExit: onExitRoute\n      }));\n    }\n    routes.push(route);\n    return this;\n  }\n\n  this.$get = $get;\n  $get.$inject = ['$state', '$rootScope', '$routeParams'];\n  function $get(   $state,   $rootScope,   $routeParams) {\n\n    var $route = {\n      routes: routes,\n      params: $routeParams,\n      current: undefined\n    };\n\n    function stateAsRoute(state) {\n      return (state.name !== '') ? state : undefined;\n    }\n\n    $rootScope.$on('$stateChangeStart', function (ev, to, toParams, from, fromParams) {\n      $rootScope.$broadcast('$routeChangeStart', stateAsRoute(to), stateAsRoute(from));\n    });\n\n    $rootScope.$on('$stateChangeSuccess', function (ev, to, toParams, from, fromParams) {\n      $route.current = stateAsRoute(to);\n      $rootScope.$broadcast('$routeChangeSuccess', stateAsRoute(to), stateAsRoute(from));\n      copy(toParams, $route.params);\n    });\n\n    $rootScope.$on('$stateChangeError', function (ev, to, toParams, from, fromParams, error) {\n      $rootScope.$broadcast('$routeChangeError', stateAsRoute(to), stateAsRoute(from), error);\n    });\n\n    return $route;\n  }\n}\n\nangular.module('ui.router.compat')\n  .provider('$route', $RouteProvider)\n  .directive('ngView', $ViewDirective);\n})(window, window.angular);\n\n/*!\n * ionic.bundle.js is a concatenation of:\n * ionic.js, angular.js, angular-animate.js,\n * angular-ui-router.js, and ionic-angular.js\n */\n\n/*!\n * Copyright 2014 Drifty Co.\n * http://drifty.com/\n *\n * Ionic, v0.9.27\n * A powerful HTML5 mobile app framework.\n * http://ionicframework.com/\n *\n * By @maxlynch, @benjsperry, @adamdbradley <3\n *\n * Licensed under the MIT license. Please see LICENSE for more information.\n *\n */\n\n(function() {\n/**\n * Create a wrapping module to ease having to include too many\n * modules.\n */\n\n/**\n * @ngdoc module\n * @name ionic\n * @description\n * Ionic main module.\n */\n\nangular.module('ionic.service', [\n  'ionic.service.bind',\n  'ionic.service.platform',\n  'ionic.service.actionSheet',\n  'ionic.service.gesture',\n  'ionic.service.loading',\n  'ionic.service.modal',\n  'ionic.service.popup',\n  'ionic.service.templateLoad',\n  'ionic.service.view',\n  'ionic.decorator.location'\n]);\n\nangular.module('ionic.ui', [\n    'ionic.ui.checkbox',\n    'ionic.ui.content',\n    'ionic.ui.header',\n    'ionic.ui.list',\n    'ionic.ui.navBar',\n    'ionic.ui.popup',\n    'ionic.ui.radio',\n    'ionic.ui.scroll',\n    'ionic.ui.sideMenu',\n    'ionic.ui.slideBox',\n    'ionic.ui.tabs',\n    'ionic.ui.toggle',\n    'ionic.ui.touch',\n    'ionic.ui.viewState'\n]);\n\nangular.module('ionic', [\n    'ionic.service',\n    'ionic.ui',\n\n    // Angular deps\n    'ngAnimate',\n    'ngSanitize',\n    'ui.router'\n]);\n\n\nangular.element.prototype.addClass = function(cssClasses) {\n  var x, y, cssClass, el, splitClasses, existingClasses;\n  if (cssClasses && cssClasses != 'ng-scope' && cssClasses != 'ng-isolate-scope') {\n    for(x=0; x<this.length; x++) {\n      el = this[x];\n      if(el.setAttribute) {\n\n        if(cssClasses.indexOf(' ') < 0) {\n          el.classList.add(cssClasses);\n        } else {\n          existingClasses = (' ' + (el.getAttribute('class') || '') + ' ')\n            .replace(/[\\n\\t]/g, \" \");\n          splitClasses = cssClasses.split(' ');\n\n          for (y=0; y<splitClasses.length; y++) {\n            cssClass = splitClasses[y].trim();\n            if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {\n              existingClasses += cssClass + ' ';\n            }\n          }\n          el.setAttribute('class', existingClasses.trim());\n        }\n      }\n    }\n  }\n  return this;\n};\n\nangular.element.prototype.removeClass = function(cssClasses) {\n  var x, y, splitClasses, cssClass, el;\n  if (cssClasses) {\n    for(x=0; x<this.length; x++) {\n      el = this[x];\n      if(el.getAttribute) {\n        if(cssClasses.indexOf(' ') < 0) {\n          el.classList.remove(cssClasses);\n        } else {\n          splitClasses = cssClasses.split(' ');\n\n          for (y=0; y<splitClasses.length; y++) {\n            cssClass = splitClasses[y];\n            el.setAttribute('class', (\n                (\" \" + (el.getAttribute('class') || '') + \" \")\n                .replace(/[\\n\\t]/g, \" \")\n                .replace(\" \" + cssClass.trim() + \" \", \" \")).trim()\n            );\n          }\n        }\n      }\n    }\n  }\n  return this;\n};\n\n\nfunction delegateService(methodNames) {\n  return ['$log', function($log) {\n    var delegate = this;\n\n    var instances = this._instances = [];\n    this._registerInstance = function(instance, handle) {\n      handle || (handle = ionic.Utils.nextUid());\n\n      instance.$$delegateHandle = handle;\n      instances.push(instance);\n\n      return function deregister() {\n        var index = instances.indexOf(instance);\n        if (index !== -1) {\n          instances.splice(index, 1);\n        }\n      };\n    };\n\n    this.forHandle = function(handle) {\n      if (!handle) {\n        return delegate;\n      }\n      return new InstanceForHandle(handle);\n    };\n\n    /*\n     * Creates a new object that will have all the methodNames given,\n     * and call them on the given the controller instance matching given\n     * handle.\n     * The reason we don't just let forHandle return the controller instance\n     * itself is that the controller instance might not exist yet.\n     *\n     * We want people to be able to do\n     * `var instance = $ionicScrollDelegate.forHandle('foo')` on controller\n     * instantiation, but on controller instantiation a child directive\n     * may not have been compiled yet!\n     *\n     * So this is our way of solving this problem: we create an object\n     * that will only try to fetch the controller with given handle\n     * once the methods are actually called.\n     */\n    function InstanceForHandle(handle) {\n      this.handle = handle;\n    }\n    methodNames.forEach(function(methodName) {\n      InstanceForHandle.prototype[methodName] = function() {\n        var handle = this.handle;\n        var instancesToUse = instances.filter(function(instance) {\n          return instance.$$delegateHandle === handle;\n        });\n        if (!instancesToUse.length) {\n          return $log.warn(\n            'Delegate for handle \"'+this.handle+'\" could not find a',\n            'corresponding element with delegate-handle=\"'+this.handle+'\"!',\n            methodName, 'was not called!');\n        }\n        return callMethod(instancesToUse, methodName, arguments);\n      };\n      delegate[methodName] = function() {\n        return callMethod(instances, methodName, arguments);\n      };\n\n      function callMethod(instancesToUse, methodName, args) {\n        var finalResult;\n        var result;\n        instancesToUse.forEach(function(instance) {\n          result = instance[methodName].apply(instance, args);\n          if (!angular.isDefined(finalResult)) {\n            finalResult = result;\n          }\n        });\n        return finalResult;\n      }\n    });\n  }];\n}\n\nangular.module('ionic.service.actionSheet', ['ionic.service.templateLoad', 'ionic.service.platform', 'ionic.ui.actionSheet', 'ngAnimate'])\n\n/**\n * @ngdoc service\n * @name $ionicActionSheet\n * @module ionic\n * @description\n * The Action Sheet is a slide-up pane that lets the user choose from a set of options.\n * Dangerous options are highlighted in red and made obvious.\n *\n * There are easy ways to cancel out of the action sheet, such as tapping the backdrop or even\n * hitting escape on the keyboard for desktop testing.\n *\n * ![Action Sheet](http://ionicframework.com.s3.amazonaws.com/docs/controllers/actionSheet.gif)\n *\n * @usage\n * To trigger an Action Sheet in your code, use the $ionicActionSheet service in your angular controllers:\n *\n * ```js\n * angular.module('mySuperApp', ['ionic'])\n * .controller(function($scope, $ionicActionSheet) {\n *\n *  // Triggered on a button click, or some other target\n *  $scope.show = function() {\n *\n *    // Show the action sheet\n *    $ionicActionSheet.show({\n *      buttons: [\n *        { text: 'Share' },\n *        { text: 'Move' },\n *      ],\n *      destructiveText: 'Delete',\n *      titleText: 'Modify your album',\n *      cancelText: 'Cancel',\n *      buttonClicked: function(index) {\n *        return true;\n *      }\n *    });\n *\n *  };\n * });\n * ```\n *\n */\n.factory('$ionicActionSheet', ['$rootScope', '$document', '$compile', '$animate', '$timeout', '$ionicTemplateLoader', '$ionicPlatform',\nfunction($rootScope, $document, $compile, $animate, $timeout, $ionicTemplateLoader, $ionicPlatform) {\n\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicActionSheet#show\n     * @description\n     * Load and return a new action sheet.\n     *\n     * A new isolated scope will be created for the\n     * action sheet and the new element will be appended into the body.\n     *\n     * @param {object} opts The options for this ActionSheet. Properties:\n     *\n     *  - `[Object]` `buttons` Which buttons to show.  Each button is an object with a `text` field.\n     *  - `{string}` `titleText` The title to show on the action sheet.\n     *  - `{string=}` `cancelText` The text for a 'cancel' button on the action sheet.\n     *  - `{string=}` `destructiveText` The text for a 'danger' on the action sheet.\n     *  - `{function=}` `cancel` Called if the cancel button is pressed or the backdrop is tapped.\n     *  - `{function=}` `buttonClicked` Called when one of the non-destructive buttons is clicked,\n     *     with the index of the button that was clicked. Return true to close the action sheet,\n     *     or false to keep it opened.\n     *  - `{function=}` `destructiveButtonClicked` Called when the destructive button is clicked.\n     *     Return true to close the action sheet, or false to keep it opened.\n     */\n    show: function(opts) {\n      var scope = $rootScope.$new(true);\n\n      angular.extend(scope, opts);\n\n      // Compile the template\n      var element = $compile('<ion-action-sheet buttons=\"buttons\"></ion-action-sheet>')(scope);\n\n      // Grab the sheet element for animation\n      var sheetEl = angular.element(element[0].querySelector('.action-sheet-wrapper'));\n\n      var hideSheet = function(didCancel) {\n        sheetEl.removeClass('action-sheet-up');\n        if(didCancel) {\n          $timeout(function(){\n            opts.cancel();\n          }, 200);\n        }\n\n        $animate.removeClass(element, 'active', function() {\n          scope.$destroy();\n        });\n\n        $document[0].body.classList.remove('action-sheet-open');\n\n        scope.$deregisterBackButton && scope.$deregisterBackButton();\n      };\n\n      // Support Android back button to close\n      scope.$deregisterBackButton = $ionicPlatform.registerBackButtonAction(function(){\n        hideSheet();\n      }, 300);\n\n      scope.cancel = function() {\n        hideSheet(true);\n      };\n\n      scope.buttonClicked = function(index) {\n        // Check if the button click event returned true, which means\n        // we can close the action sheet\n        if((opts.buttonClicked && opts.buttonClicked(index)) === true) {\n          hideSheet(false);\n        }\n      };\n\n      scope.destructiveButtonClicked = function() {\n        // Check if the destructive button click event returned true, which means\n        // we can close the action sheet\n        if((opts.destructiveButtonClicked && opts.destructiveButtonClicked()) === true) {\n          hideSheet(false);\n        }\n      };\n\n      $document[0].body.appendChild(element[0]);\n\n      $document[0].body.classList.add('action-sheet-open');\n\n      var sheet = new ionic.views.ActionSheet({el: element[0] });\n      scope.sheet = sheet;\n\n      $animate.addClass(element, 'active');\n\n      $timeout(function(){\n        sheetEl.addClass('action-sheet-up');\n      }, 20);\n\n      return sheet;\n    }\n  };\n\n}]);\n\nangular.module('ionic.service.bind', [])\n/**\n * @private\n */\n.factory('$ionicBind', ['$parse', '$interpolate', function($parse, $interpolate) {\n  var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n  return function(scope, attrs, bindDefinition) {\n    angular.forEach(bindDefinition || {}, function (definition, scopeName) {\n      //Adapted from angular.js $compile\n      var match = definition.match(LOCAL_REGEXP) || [],\n        attrName = match[3] || scopeName,\n        mode = match[1], // @, =, or &\n        parentGet,\n        unwatch;\n\n      switch(mode) {\n        case '@':\n          if (!attrs[attrName]) {\n            return;\n          }\n          attrs.$observe(attrName, function(value) {\n            scope[scopeName] = value;\n          });\n          // we trigger an interpolation to ensure\n          // the value is there for use immediately\n          if (attrs[attrName]) {\n            scope[scopeName] = $interpolate(attrs[attrName])(scope);\n          }\n          break;\n\n        case '=':\n          if (!attrs[attrName]) {\n            return;\n          }\n          unwatch = scope.$watch(attrs[attrName], function(value) {\n            scope[scopeName] = value;\n          });\n          //Destroy parent scope watcher when this scope is destroyed\n          scope.$on('$destroy', unwatch);\n          break;\n\n        case '&':\n          /* jshint -W044 */\n          if (attrs[attrName] && attrs[attrName].match(RegExp(scopeName + '\\(.*?\\)'))) {\n            throw new Error('& expression binding \"' + scopeName + '\" looks like it will recursively call \"' +\n                          attrs[attrName] + '\" and cause a stack overflow! Please choose a different scopeName.');\n          }\n          parentGet = $parse(attrs[attrName]);\n          scope[scopeName] = function(locals) {\n            return parentGet(scope, locals);\n          };\n          break;\n      }\n    });\n  };\n}]);\n\nangular.module('ionic.service.gesture', [])\n\n/**\n * @ngdoc service\n * @name $ionicGesture\n * @module ionic\n * @description An angular service exposing ionic\n * {@link ionic.utility:ionic.EventController}'s gestures.\n */\n.factory('$ionicGesture', [function() {\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicGesture#on\n     * @description Add an event listener for a gesture on an element. See {@link ionic.utility:ionic.EventController#onGesture}.\n     * @param {string} eventType The gesture event to listen for.\n     * @param {function(e)} callback The function to call when the gesture\n     * happens.\n     * @param {element} $element The angular element to listen for the event on.\n     */\n    on: function(eventType, cb, $element) {\n      return window.ionic.onGesture(eventType, cb, $element[0]);\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicGesture#on\n     * @description Remove an event listener for a gesture on an element. See {@link ionic.utility:ionic.EventController#offGesture}.\n     * @param {string} eventType The gesture event to remove the listener for.\n     * @param {function(e)} callback The listener to remove.\n     * @param {element} $element The angular element that was listening for the event.\n     */\n    off: function(gesture, eventType, cb) {\n      return window.ionic.offGesture(gesture, eventType, cb);\n    }\n  };\n}]);\n\nangular.module('ionic.service.loading', ['ionic.ui.loading'])\n\n/**\n * @ngdoc service\n * @name $ionicLoading\n * @module ionic\n * @description\n * An overlay that can be used to indicate activity while blocking user\n * interaction.\n *\n * @usage\n * ```js\n * angular.module('LoadingApp', ['ionic'])\n * .controller('LoadingCtrl', function($scope, $ionicLoading) {\n *   $scope.show = function() {\n *     $scope.loading = $ionicLoading.show({\n *       content: 'Loading',\n *     });\n *   };\n *   $scope.hide = function(){\n *     $scope.loading.hide();\n *   };\n * });\n * ```\n */\n.factory('$ionicLoading', ['$rootScope', '$document', '$compile', function($rootScope, $document, $compile) {\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicLoading#show\n     * @param {object} opts The options for the indicator. Available properties:\n     *  - `{string=}` `content` The content of the indicator. Default: none.\n     *  - `{string=}` `animation` The animation of the indicator.\n     *    Default: 'fade-in'.\n     *  - `{boolean=}` `showBackdrop` Whether to show a backdrop. Default: true.\n     *  - `{number=}` `maxWidth` The maximum width of the indicator, in pixels.\n     *    Default: 200.\n     *  - `{number=}` `showDelay` How many milliseconds to delay showing the\n     *    indicator.  Default: 0.\n     * @returns {object} A shown loader with the following methods:\n     *  - `hide()` - Hides the loader.\n     *  - `show()` - Shows the loader.\n     *  - `setContent(string)` - Sets the html content of the loader.\n     */\n    show: function(opts) {\n      var defaults = {\n        content: '',\n        animation: 'fade-in',\n        showBackdrop: true,\n        maxWidth: 200,\n        showDelay: 0\n      };\n\n      opts = angular.extend(defaults, opts);\n\n      var scope = $rootScope.$new(true);\n      angular.extend(scope, opts);\n\n      // Make sure there is only one loading element on the page at one point in time\n      var existing = angular.element($document[0].querySelector('.loading-backdrop'));\n      if(existing.length) {\n        existing.remove();\n      }\n\n      // Compile the template\n      var element = $compile('<ion-loading>' + opts.content + '</ion-loading>')(scope);\n\n      $document[0].body.appendChild(element[0]);\n\n      var loading = new ionic.views.Loading({\n        el: element[0],\n        maxWidth: opts.maxWidth,\n        showDelay: opts.showDelay\n      });\n\n      loading.show();\n\n      scope.loading = loading;\n\n      return loading;\n    }\n  };\n}]);\n\nangular.module('ionic.service.modal', ['ionic.service.templateLoad', 'ionic.service.platform', 'ionic.ui.modal'])\n\n/**\n * @ngdoc service\n * @name $ionicModal\n * @module ionic\n * @controller ionicModal\n * @description\n * The Modal is a content pane that can go over the user's main view\n * temporarily.  Usually used for making a choice or editing an item.\n *\n * @usage\n * ```html\n * <script id=\"my-modal.html\" type=\"text/ng-template\">\n *   <div class=\"modal\">\n *     <ion-header-bar title=\"My Modal Title\"></ion-header-bar>\n *     <ion-content>\n *       Hello!\n *     </ion-content>\n *   </div>\n * </script>\n * ```\n * ```js\n * angular.module('testApp', ['ionic'])\n * .controller('MyController', function($scope, $ionicModal) {\n *   $ionicModal.fromTemplateUrl('modal.html', {\n *     scope: $scope,\n *     animation: 'slide-in-up'\n *   }).then(function(modal) {\n *     $scope.modal = modal;\n *   });\n *   $scope.openModal = function() {\n *     $scope.modal.show();\n *   };\n *   $scope.closeModal = function() {\n *     $scope.modal.hide();\n *   };\n *   //Cleanup the modal when we're done with it!\n *   $scope.$on('$destroy', function() {\n *     $scope.modal.remove();\n *   });\n * });\n * ```\n */\n.factory('$ionicModal', ['$rootScope', '$document', '$compile', '$timeout', '$ionicPlatform', '$ionicTemplateLoader',\n                function( $rootScope,   $document,   $compile,   $timeout,   $ionicPlatform,   $ionicTemplateLoader) {\n\n  /**\n   * @ngdoc controller\n   * @name ionicModal\n   * @module ionic\n   * @description\n   * Instantiated by the {@link ionic.service:$ionicModal} service.\n   *\n   * Hint: Be sure to call [remove()](#remove) when you are done with each modal\n   * to clean it up and avoid memory leaks.\n   */\n  var ModalView = ionic.views.Modal.inherit({\n    /**\n     * @ngdoc method\n     * @name ionicModal#initialize\n     * @description Creates a new modal controller instance.\n     * @param {object} options An options object with the following properties:\n     *  - `{object=}` `scope` The scope to be a child of.\n     *    Default: creates a child of $rootScope.\n     *  - `{string=}` `animation` The animation to show & hide with.\n     *    Default: 'slide-in-up'\n     *  - `{boolean=}` `focusFirstInput` Whether to autofocus the first input of\n     *    the modal when shown.  Default: false.\n     */\n    initialize: function(opts) {\n      ionic.views.Modal.prototype.initialize.call(this, opts);\n      this.animation = opts.animation || 'slide-in-up';\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#show\n     * @description Show this modal instance.\n     */\n    show: function() {\n      var self = this;\n      var modalEl = angular.element(self.modalEl);\n\n      self.el.classList.remove('hide');\n\n      $document[0].body.classList.add('modal-open');\n\n      self._isShown = true;\n\n      if(!self.el.parentElement) {\n        modalEl.addClass(self.animation);\n        $document[0].body.appendChild(self.el);\n      }\n\n      modalEl.addClass('ng-enter active')\n             .removeClass('ng-leave ng-leave-active');\n\n      $timeout(function(){\n        modalEl.addClass('ng-enter-active');\n        self.scope.$parent && self.scope.$parent.$broadcast('modal.shown');\n        self.el.classList.add('active');\n      }, 20);\n\n      self._deregisterBackButton = $ionicPlatform.registerBackButtonAction(function(){\n        self.hide();\n      }, 200);\n\n      ionic.views.Modal.prototype.show.call(self);\n\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#hide\n     * @description Hide this modal instance.\n     */\n    hide: function() {\n      var self = this;\n      self._isShown = false;\n      var modalEl = angular.element(self.modalEl);\n\n      self.el.classList.remove('active');\n      modalEl.addClass('ng-leave');\n\n      $timeout(function(){\n        modalEl.addClass('ng-leave-active')\n               .removeClass('ng-enter ng-enter-active active');\n      }, 20);\n\n      $timeout(function(){\n        $document[0].body.classList.remove('modal-open');\n        self.el.classList.add('hide');\n      }, 350);\n\n      ionic.views.Modal.prototype.hide.call(self);\n\n      self.scope.$parent && self.scope.$parent.$broadcast('modal.hidden');\n\n      self._deregisterBackButton && self._deregisterBackButton();\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#remove\n     * @description Remove this modal instance from the DOM and clean up.\n     */\n    remove: function() {\n      var self = this;\n      self.hide();\n      self.scope.$parent && self.scope.$parent.$broadcast('modal.removed');\n\n      $timeout(function(){\n        self.scope.$destroy();\n        self.el && self.el.parentElement && self.el.parentElement.removeChild(self.el);\n      }, 750);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicModal#isShown\n     * @returns boolean Whether this modal is currently shown.\n     */\n    isShown: function() {\n      return !!this._isShown;\n    }\n  });\n\n  var createModal = function(templateString, options) {\n    // Create a new scope for the modal\n    var scope = options.scope && options.scope.$new() || $rootScope.$new(true);\n\n    // Compile the template\n    var element = $compile('<ion-modal>' + templateString + '</ion-modal>')(scope);\n\n    options.el = element[0];\n    options.modalEl = options.el.querySelector('.modal');\n    var modal = new ModalView(options);\n\n    modal.scope = scope;\n\n    // If this wasn't a defined scope, we can assign 'modal' to the isolated scope\n    // we created\n    if(!options.scope) {\n      scope.modal = modal;\n    }\n\n    return modal;\n  };\n\n  return {\n    /**\n     * @ngdoc method\n     * @name $ionicModal#fromTemplate\n     * @param {string} templateString The template string to use as the modal's\n     * content.\n     * @param {object} options Options to be passed {@link ionic.controller:ionicModal#initialize ionicModal#initialize} method.\n     * @returns {object} An instance of an {@link ionic.controller:ionicModal}\n     * controller.\n     */\n    fromTemplate: function(templateString, options) {\n      var modal = createModal(templateString, options || {});\n      return modal;\n    },\n    /**\n     * @ngdoc method\n     * @name $ionicModal#fromTemplateUrl\n     * @param {string} templateUrl The url to load the template from.\n     * @param {object} options Options to be passed {@link ionic.controller:ionicModal#initialize ionicModal#initialize} method.\n     * options object.\n     * @returns {promise} A promise that will be resolved with an instance of\n     * an {@link ionic.controller:ionicModal} controller.\n     */\n    fromTemplateUrl: function(url, options, _) {\n      var cb;\n      //Deprecated: allow a callback as second parameter. Now we return a promise.\n      if (angular.isFunction(options)) {\n        cb = options;\n        options = _;\n      }\n      return $ionicTemplateLoader.load(url).then(function(templateString) {\n        var modal = createModal(templateString, options || {});\n        cb && cb(modal);\n        return modal;\n      });\n    }\n  };\n}]);\n\n(function(ionic) {'use strict';\n\nangular.module('ionic.service.platform', [])\n\n/**\n * @ngdoc service\n * @name $ionicPlatform\n * @module ionic\n * @description\n * An angular abstraction of {@link ionic.utility:ionic.Platform}.\n *\n * Used to detect the current platform, as well as do things like override the\n * Android back button in PhoneGap/Cordova.\n */\n.provider('$ionicPlatform', function() {\n\n  return {\n    $get: ['$q', '$rootScope', function($q, $rootScope) {\n      return {\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#onHardwareBackButton\n         * @description\n         * Some platforms have a hardware back button, so this is one way to\n         * bind to it.\n         * @param {function} callback the callback to trigger when this event occurs\n         */\n        onHardwareBackButton: function(cb) {\n          ionic.Platform.ready(function() {\n            document.addEventListener('backbutton', cb, false);\n          });\n        },\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#offHardwareBackButton\n         * @description\n         * Remove an event listener for the backbutton.\n         * @param {function} callback The listener function that was\n         * originally bound.\n         */\n        offHardwareBackButton: function(fn) {\n          ionic.Platform.ready(function() {\n            document.removeEventListener('backbutton', fn);\n          });\n        },\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#registerBackButtonAction\n         * @description\n         * Register a hardware back button action. Only one action will execute\n         * when the back button is clicked, so this method decides which of\n         * the registered back button actions has the highest priority.\n         *\n         * For example, if an actionsheet is showing, the back button should\n         * close the actionsheet, but it should not also go back a page view\n         * or close a modal which may be open.\n         *\n         * @param {function} callback Called when the back button is pressed,\n         * if this listener is the highest priority.\n         * @param {number} priority Only the highest priority will execute.\n         * @param {*=} actionId The id to assign this action. Default: a\n         * random unique id.\n         * @returns {function} A function that, when called, will deregister\n         * this backButtonAction.\n         */\n        registerBackButtonAction: function(fn, priority, actionId) {\n          var self = this;\n\n          if(!self._hasBackButtonHandler) {\n            // add a back button listener if one hasn't been setup yet\n            $rootScope.$backButtonActions = {};\n            self.onHardwareBackButton(self.hardwareBackButtonClick);\n            self._hasBackButtonHandler = true;\n          }\n\n          var action = {\n            id: (actionId ? actionId : ionic.Utils.nextUid()),\n            priority: (priority ? priority : 0),\n            fn: fn\n          };\n          $rootScope.$backButtonActions[action.id] = action;\n\n          // return a function to de-register this back button action\n          return function() {\n            delete $rootScope.$backButtonActions[action.id];\n          };\n        },\n\n        /**\n         * @private\n         */\n        hardwareBackButtonClick: function(e){\n          // loop through all the registered back button actions\n          // and only run the last one of the highest priority\n          var priorityAction, actionId;\n          for(actionId in $rootScope.$backButtonActions) {\n            if(!priorityAction || $rootScope.$backButtonActions[actionId].priority >= priorityAction.priority) {\n              priorityAction = $rootScope.$backButtonActions[actionId];\n            }\n          }\n          if(priorityAction) {\n            priorityAction.fn(e);\n            return priorityAction;\n          }\n        },\n\n        is: function(type) {\n          return ionic.Platform.is(type);\n        },\n\n        /**\n         * @ngdoc method\n         * @name $ionicPlatform#ready\n         * @description\n         * Trigger a callback once the device is ready,\n         * or immediately if the device is already ready.\n         * @param {function} callback The function to call.\n         */\n        ready: function(cb) {\n          var q = $q.defer();\n\n          ionic.Platform.ready(function(){\n            q.resolve();\n            cb();\n          });\n\n          return q.promise;\n        }\n      };\n    }]\n  };\n\n});\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\nangular.module('ionic.service.popup', ['ionic.service.templateLoad'])\n\n/**\n * @ngdoc service\n * @name $ionicPopup\n * @module ionic\n * @restrict E\n * @codepen zkmhJ\n * @description\n *\n * The Ionic Popup service makes it easy to programatically create and show popup\n * windows that require the user to respond in order to continue:\n *\n * The popup system has support for nicer versions of the built in `alert()` `prompt()` and `confirm()` functions\n * you are used to in the browser, but with more powerful support for customizing input types in the case of\n * prompt, or customizing the look of the window.\n *\n * But the true power of the Popup is when a built-in popup just won't cut it. Luckily, the popup window\n * has full support for arbitrary popup content, and a simple promise-based system for returning data\n * entered by the user.\n *\n * @usage\n * To trigger a Popup in your code, use the $ionicPopup service in your angular controllers:\n *\n * ```js\n * angular.module('mySuperApp', ['ionic'])\n * .controller(function($scope, $ionicPopup) {\n *\n *  // Triggered on a button click, or some other target\n    $scope.showPopup = function() {\n      $scope.data = {}\n\n      // An elaborate, custom popup\n      $ionicPopup.show({\n        templateUrl: 'popup-template.html',\n        title: 'Enter Wi-Fi Password',\n        subTitle: 'Please use normal things',\n        scope: $scope,\n        buttons: [\n          { text: 'Cancel', onTap: function(e) { return true; } },\n          {\n            text: '<b>Save</b>',\n            type: 'button-positive',\n            onTap: function(e) {\n              return $scope.data.wifi;\n            }\n          },\n        ]\n      }).then(function(res) {\n        console.log('Tapped!', res);\n      }, function(err) {\n        console.log('Err:', err);\n      }, function(popup) {\n        // If you need to access the popup directly, do it in the notify method\n        // This is also where you can programatically close the popup:\n        // popup.close();\n      });\n\n      // A confirm dialog\n      $scope.showConfirm = function() {\n        $ionicPopup.confirm({\n          title: 'Consume Ice Cream',\n          content: 'Are you sure you want to eat this ice cream?'\n        }).then(function(res) {\n          if(res) {\n            console.log('You are sure');\n          } else {\n            console.log('You are not sure');\n          }\n        });\n      };\n\n      // A prompt dialog\n      $scope.showPrompt = function() {\n        $ionicPopup.prompt({\n          title: 'ID Check',\n          content: 'What is your name?'\n        }).then(function(res) {\n          console.log('Your name is', res);\n        });\n      };\n\n      // A prompt with password input dialog\n      $scope.showPasswordPrompt = function() {\n        $ionicPopup.prompt({\n          title: 'Password Check',\n          content: 'Enter your secret password',\n          inputType: 'password',\n          inputPlaceholder: 'Your password'\n        }).then(function(res) {\n          console.log('Your password is', res);\n        });\n      };\n\n      // An alert dialog\n      $scope.showAlert = function() {\n        $ionicPopup.alert({\n          title: 'Don\\'t eat that!',\n          content: 'It might taste good'\n        }).then(function(res) {\n          console.log('Thank you for not eating my delicious ice cream cone');\n        });\n      };\n    };\n  });\n  ```\n\n\n */\n.factory('$ionicPopup', ['$rootScope', '$q', '$document', '$compile', '$timeout', '$ionicTemplateLoader',\n  function($rootScope, $q, $document, $compile, $timeout, $ionicTemplateLoader) {\n\n  // TODO: Make this configurable\n  var popupOptions = {\n    // How long to wait after a popup is already shown to show another one\n    stackPushDelay: 50\n  }\n\n  // Center the given popup\n  var positionPopup = function(popup) {\n    popup.el.style.marginLeft = (-popup.el.offsetWidth) / 2 + 'px';\n    popup.el.style.marginTop = (-popup.el.offsetHeight) / 2 + 'px';\n  };\n\n  // Hide the body of the given popup if it's empty\n  var hideBody = function(popup) {\n    var bodyEl = popup.el.querySelector('.popup-body');\n    if(bodyEl && bodyEl.innerHTML.trim() == '') {\n      bodyEl.style.display = 'none';\n    }\n  };\n\n  var focusLastButton = function(popup) {\n    var buttons, lastButton;\n    buttons = popup.el.querySelectorAll('button');\n    lastButton = buttons[buttons.length-1];\n    if(lastButton) {\n      lastButton.focus();\n    }\n  }\n\n  // Show a single popup\n  var showSinglePopup = function(popup, opts) {\n    var _this = this;\n\n    ionic.requestAnimationFrame(function() {\n      hideBody(popup);\n      positionPopup(popup);\n      popup.el.classList.remove('popup-hidden');\n      popup.el.classList.add('popup-showing');\n      popup.el.classList.add('active');\n\n      focusLastButton(popup);\n    });\n  };\n\n  // Show a popup that was already shown at one point in the past\n  var reshowSinglePopup = function(popup) {\n    ionic.requestAnimationFrame(function() {\n      popup.el.classList.remove('popup-hidden');\n      popup.el.classList.add('popup-showing');\n      popup.el.classList.add('active');\n      focusLastButton(popup);\n    });\n  };\n\n  // Hide a single popup\n  var hideSinglePopup = function(popup) {\n    ionic.requestAnimationFrame(function() {\n      popup.el.classList.remove('active');\n      popup.el.classList.add('popup-hidden');\n    });\n  };\n\n  // Remove a popup once and for all\n  var removeSinglePopup = function(popup) {\n    // Force a reflow so the animation will actually run\n    popup.el.offsetWidth;\n\n    popup.el.classList.remove('active');\n    popup.el.classList.add('popup-hidden');\n\n    $timeout(function() {\n      popup.el.remove();\n    }, 400);\n  };\n\n\n  /**\n   * Popup stack and directive\n   */\n\n  var popupStack = [];\n  var backdropEl = null;\n\n  // Show the backdrop element\n  var showBackdrop = function() {\n    var el = $compile('<ion-popup-backdrop></ion-popup-backdrop>')($rootScope.$new(true));\n    $document[0].body.appendChild(el[0]);\n    backdropEl = el;\n    $document[0].body.classList.add('popup-open');\n  };\n\n  // Remove the backdrop element\n  var removeBackdrop = function() {\n    backdropEl.remove();\n    $timeout(function(){\n      $document[0].body.classList.remove('popup-open');\n    }, 300);\n  };\n\n  // Push the new popup onto the stack with the given data and scope.\n  // If this is the first one in the stack, show the backdrop, otherwise don't.\n  var pushAndShow = function(popup, data) {\n    var lastPopup = popupStack[popupStack.length-1];\n\n    popupStack.push(popup);\n\n    // If this is the first popup, show the backdrop\n    if(popupStack.length == 1) {\n      showBackdrop();\n    }\n\n    // If we have an existing popup, add a delay between hiding and showing it\n    if(lastPopup) {\n      hideSinglePopup(lastPopup);\n      $timeout(function() {\n        showSinglePopup(popup);\n      }, popupOptions.stackPushDelay);\n    } else {\n      // Otherwise, immediately show it\n      showSinglePopup(popup);\n    }\n\n  };\n\n  // Pop the current popup off the stack. If there are other popups, show them\n  // otherwise hide the backdrop.\n  var popAndRemove = function(popup) {\n    var lastPopup = popupStack.pop();\n    var nextPopup = popupStack[popupStack.length-1];\n    removeSinglePopup(lastPopup);\n\n    if(nextPopup) {\n      reshowSinglePopup(nextPopup);\n    } else {\n      removeBackdrop();\n    }\n  };\n\n  // Append the element to the screen, create the popup view,\n  // and add the popup to the scope\n  var constructPopupOnScope = function(element, scope) {\n    var popup = {\n      el: element[0],\n      scope: scope,\n      close: function() {\n        popAndRemove(this);\n      }\n    };\n\n    scope.popup = popup;\n\n    return popup;\n  }\n\n  var buildPopupTemplate = function(opts, content) {\n    return '<ion-popup title=\"' + opts.title + '\" buttons=\"buttons\" on-button-tap=\"onButtonTap(button, event)\" on-close=\"onClose(button, result, event)\">'\n        + (content || '') +\n      '</ion-popup>';\n  };\n\n\n  // Given an options object, build a new popup window and return a promise\n  // which will contain the constructed popup at a later date. Perhaps at a later\n  // year even. At this point, it's hard to say.\n  var createPopup = function(opts, responseDeferred) {\n    var q = $q.defer();\n\n    // Create some defaults\n    var defaults = {\n      title: '',\n      animation: 'fade-in',\n    };\n\n    opts = angular.extend(defaults, opts);\n\n    // Create a new scope, and bind some of the options stuff to that scope\n    var scope = opts.scope && opts.scope.$new() || $rootScope.$new(true);\n    angular.extend(scope, opts);\n\n    scope.onClose = function(button, result, event) {\n      popAndRemove(scope.popup);\n      responseDeferred.resolve(result);\n    };\n\n    // Check if we need to load a template for the content of the popup\n    if(opts.templateUrl) {\n\n      // Load the template externally\n      $ionicTemplateLoader.load(opts.templateUrl).then(function(templateString) {\n\n        var popupTemplate = buildPopupTemplate(opts, templateString);\n        var element = $compile(popupTemplate)(scope);\n        $document[0].body.appendChild(element[0]);\n        q.resolve(constructPopupOnScope(element, scope));\n\n      }, function(err) {\n        // Error building the popup\n        q.reject(err);\n      });\n\n    } else {\n      // Compile the template\n      var popupTemplate = buildPopupTemplate(opts, opts.content);\n      var element = $compile(popupTemplate)(scope);\n      $document[0].body.appendChild(element[0]);\n      q.resolve(constructPopupOnScope(element, scope));\n    }\n\n    return q.promise;\n  };\n\n\n\n  // Public API\n  return {\n    /**\n     * @private\n     */\n    showPopup: function(data) {\n      var q = $q.defer();\n\n      createPopup(data, q).then(function(popup, scope) {\n\n        // Send the popup back\n        q.notify(popup);\n\n        // We constructed the popup, push it on the stack and show it\n        pushAndShow(popup, data);\n\n      }, function(err) {\n        console.error('Unable to load popup:', err);\n      });\n\n      return q.promise;\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicPopup#show\n     * @description show a complex popup. This is the master show function for all popups\n     * @param {data} object The options for showing a popup, of the form:\n     * @returns {Promise} an Angular promise which resolves when the user enters the correct data, and also\n     * sends the constructed popup in the notify function (for programatic closing, as shown in the example above).\n     * ```\n     * {\n     *   content: '', // String. The content of the popup\n     *   title: '', // String. The title of the popup\n     *   subTitle: '', // String (optional). The sub-title of the popup\n     *   templateUrl: '', // URL String (optional). The URL of a template to load as the content (instead of the `content` field)\n     *   scope: null, // Scope (optional). A scope to apply to the popup content (for using ng-model in a template, for example)\n     *   buttons:\n     *     [\n     *       {\n     *         text: 'Cancel',\n     *         type: 'button-default',\n     *         onTap: function(e) {\n     *           // e.preventDefault() is the only way to return a false value\n     *           e.preventDefault();\n     *         }\n     *       },\n     *       {\n     *         text: 'OK',\n     *         type: 'button-positive',\n     *         onTap: function(e) {\n     *           // When the user taps one of the buttons, you need to return the\n     *           // Data you want back to the popup service which will then resolve\n     *           // the promise waiting for a response.\n     *           //\n     *           // To return \"false\", call e.preventDefault();\n     *           return scope.data.response;\n     *         }\n     *       }\n     *     ]\n     *\n     * }\n     * ```\n    */\n    show: function(data) {\n      return this.showPopup(data);\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicPopup#alert\n     * @description show a simple popup with one button that the user has to tap\n     *\n     * Show a simple alert dialog\n     *\n     * ```javascript\n     *  $ionicPopup.alert({\n     *    title: 'Hey!',\n     *    content: 'Don\\'t do that!'\n     *  }).then(function(res) {\n     *    // Accepted\n     *  });\n     * ```\n     *\n     * @returns {Promise} that resolves when the alert is accepted\n     * @param {data} object The options for showing an alert, of the form:\n     *\n     * ```\n     * {\n     *   content: '', // String. The content of the popup\n     *   title: '', // String. The title of the popup\n     *   okText: '', // String. The text of the OK button\n     *   okType: '', // String (default: button-positive). The type of the OK button\n     * }\n     * ```\n    */\n    alert: function(opts) {\n      return this.showPopup({\n        content: opts.content || '',\n        title: opts.title || '',\n        buttons: [\n          {\n            text: opts.okText || 'OK',\n            type: opts.okType || 'button-positive',\n            onTap: function(e) {\n              return true;\n            }\n          }\n        ]\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicPopup#confirm\n     * @description\n     * Show a simple confirm popup with a cancel and accept button:\n     *\n     * ```javascript\n     *  $ionicPopup.confirm({\n     *    title: 'Consume Ice Cream',\n     *    content: 'Are you sure you want to eat this ice cream?'\n     *  }).then(function(res) {\n     *    if(res) {\n     *      console.log('You are sure');\n     *    } else {\n     *      console.log('You are not sure');\n     *    }\n     *  });\n     * ```\n     *\n     * @returns {Promise} that resolves with the chosen option\n     * @param {data} object The options for showing a confirm dialog, of the form:\n     *\n     * ```\n     * {\n     *   content: '', // String. The content of the popup\n     *   title: '', // String. The title of the popup\n     *   cancelText: '', // String. The text of the Cancel button\n     *   cancelType: '', // String (default: button-default). The type of the kCancel button\n     *   okText: '', // String. The text of the OK button\n     *   okType: '', // String (default: button-positive). The type of the OK button\n     * }\n     * ```\n    */\n    confirm: function(opts) {\n      return this.showPopup({\n        content: opts.content || '',\n        title: opts.title || '',\n        buttons: [\n          {\n            text: opts.cancelText || 'Cancel' ,\n            type: opts.cancelType || 'button-default',\n            onTap: function(e) { e.preventDefault(); }\n          },\n          {\n            text: opts.okText || 'OK',\n            type: opts.okType || 'button-positive',\n            onTap: function(e) {\n              return true;\n            }\n          }\n        ]\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name $ionicPopup#prompt\n     * @description show a simple prompt dialog.\n     *\n     * ```javascript\n     *  $ionicPopup.prompt({\n     *    title: 'Password Check',\n     *    content: 'Enter your secret password',\n     *    inputType: 'password',\n     *    inputPlaceholder: 'Your password'\n     *  }).then(function(res) {\n     *    console.log('Your password is', res);\n     *  });\n     * ```\n     *\n     * @returns {Promise} that resolves with the entered data\n     * @param {data} object The options for showing a prompt dialog, of the form:\n     *\n     * ```\n     * {\n     *   content: // String. The content of the popup\n     *   title: // String. The title of the popup\n     *   subTitle: // String. The sub title of the popup\n     *   inputType: // String (default: \"text\"). The type of input to use\n     *   inputPlaceholder: // String (default: \"\"). A placeholder to use for the input.\n     *   cancelText: // String. The text of the Cancel button\n     *   cancelType: // String (default: button-default). The type of the kCancel button\n     *   okText: // String. The text of the OK button\n     *   okType: // String (default: button-positive). The type of the OK button\n     * }\n     * ```\n    */\n    prompt: function(opts) {\n      var scope = $rootScope.$new(true);\n      scope.data = {};\n      return this.showPopup({\n        content: opts.content || '<input ng-model=\"data.response\" type=\"' + (opts.inputType || 'text') + '\" placeholder=\"' + (opts.inputPlaceholder || '') + '\">',\n        title: opts.title || '',\n        subTitle: opts.subTitle || '',\n        scope: scope,\n        buttons: [\n          {\n            text: opts.cancelText || 'Cancel',\n            type: opts.cancelType|| 'button-default',\n            onTap: function(e) { e.preventDefault(); }\n          },\n          {\n            text: opts.okText || 'OK',\n            type: opts.okType || 'button-positive',\n            onTap: function(e) {\n              return scope.data.response;\n            }\n          }\n        ]\n      });\n    }\n\n  };\n}]);\n\n})(ionic);\n\nangular.module('ionic.service.templateLoad', [])\n\n/**\n * @private\n */\n.factory('$ionicTemplateLoader', ['$q', '$http', '$templateCache', function($q, $http, $templateCache) {\n  return {\n    load: function(url) {\n      return $http.get(url, {cache: $templateCache})\n      .then(function(response) {\n        return response.data && response.data.trim();\n      });\n    }\n  };\n}]);\n\nangular.module('ionic.service.view', ['ui.router', 'ionic.service.platform'])\n\n\n/**\n * @private\n * TODO document\n */\n.run(['$rootScope', '$state', '$location', '$document', '$animate', '$ionicPlatform',\n  function( $rootScope,   $state,   $location,   $document,   $animate,   $ionicPlatform) {\n\n  // init the variables that keep track of the view history\n  $rootScope.$viewHistory = {\n    histories: { root: { historyId: 'root', parentHistoryId: null, stack: [], cursor: -1 } },\n    views: {},\n    backView: null,\n    forwardView: null,\n    currentView: null,\n    disabledRegistrableTagNames: []\n  };\n\n  $rootScope.$on('viewState.changeHistory', function(e, data) {\n    if(!data) return;\n\n    var hist = (data.historyId ? $rootScope.$viewHistory.histories[ data.historyId ] : null );\n    if(hist && hist.cursor > -1 && hist.cursor < hist.stack.length) {\n      // the history they're going to already exists\n      // go to it's last view in its stack\n      var view = hist.stack[ hist.cursor ];\n      return view.go(data);\n    }\n\n    // this history does not have a URL, but it does have a uiSref\n    // figure out its URL from the uiSref\n    if(!data.url && data.uiSref) {\n      data.url = $state.href(data.uiSref);\n    }\n\n    if(data.url) {\n      // don't let it start with a #, messes with $location.url()\n      if(data.url.indexOf('#') === 0) {\n        data.url = data.url.replace('#', '');\n      }\n      if(data.url !== $location.url()) {\n        // we've got a good URL, ready GO!\n        $location.url(data.url);\n      }\n    }\n  });\n\n  // Set the document title when a new view is shown\n  $rootScope.$on('viewState.viewEnter', function(e, data) {\n    if(data && data.title) {\n      $document[0].title = data.title;\n    }\n  });\n\n  // Triggered when devices with a hardware back button (Android) is clicked by the user\n  // This is a Cordova/Phonegap platform specifc method\n  function onHardwareBackButton(e) {\n    if($rootScope.$viewHistory.backView) {\n      // there is a back view, go to it\n      $rootScope.$viewHistory.backView.go();\n    } else {\n      // there is no back view, so close the app instead\n      ionic.Platform.exitApp();\n    }\n    e.preventDefault();\n    return false;\n  }\n  $ionicPlatform.registerBackButtonAction(onHardwareBackButton, 100);\n\n}])\n\n.factory('$ionicViewService', ['$rootScope', '$state', '$location', '$window', '$injector',\n                      function( $rootScope,   $state,   $location,   $window,   $injector) {\n  var $animate = $injector.has('$animate') ? $injector.get('$animate') : false;\n\n  var View = function(){};\n  View.prototype.initialize = function(data) {\n    if(data) {\n      for(var name in data) this[name] = data[name];\n      return this;\n    }\n    return null;\n  };\n  View.prototype.go = function() {\n\n    if(this.stateName) {\n      return $state.go(this.stateName, this.stateParams);\n    }\n\n    if(this.url && this.url !== $location.url()) {\n\n      if($rootScope.$viewHistory.backView === this) {\n        return $window.history.go(-1);\n      } else if($rootScope.$viewHistory.forwardView === this) {\n        return $window.history.go(1);\n      }\n\n      $location.url(this.url);\n      return;\n    }\n\n    return null;\n  };\n  View.prototype.destroy = function() {\n    if(this.scope) {\n      this.scope.$destroy && this.scope.$destroy();\n      this.scope = null;\n    }\n  };\n\n  function createViewId(stateId) {\n    return ionic.Utils.nextUid();\n  }\n\n  return {\n\n    register: function(containerScope, element) {\n\n      var viewHistory = $rootScope.$viewHistory,\n          currentStateId = this.getCurrentStateId(),\n          hist = this._getHistory(containerScope),\n          currentView = viewHistory.currentView,\n          backView = viewHistory.backView,\n          forwardView = viewHistory.forwardView,\n          nextViewOptions = this.nextViewOptions(),\n          rsp = {\n            viewId: null,\n            navAction: null,\n            navDirection: null,\n            historyId: hist.historyId\n          };\n\n      if(element && !this.isTagNameRegistrable(element)) {\n        // first check to see if this element can even be registered as a view.\n        // Certain tags are only containers for views, but are not views themselves.\n        // For example, the <ion-tabs> directive contains a <ion-tab> and the <ion-tab> is the\n        // view, but the <ion-tabs> directive itself should not be registered as a view.\n        rsp.navAction = 'disabledByTagName';\n        return rsp;\n      }\n\n      if(currentView &&\n         currentView.stateId === currentStateId &&\n         currentView.historyId === hist.historyId) {\n        // do nothing if its the same stateId in the same history\n        rsp.navAction = 'noChange';\n        return rsp;\n      }\n\n      if(viewHistory.forcedNav) {\n        // we've previously set exactly what to do\n        ionic.Utils.extend(rsp, viewHistory.forcedNav);\n        $rootScope.$viewHistory.forcedNav = null;\n\n      } else if(backView && backView.stateId === currentStateId) {\n        // they went back one, set the old current view as a forward view\n        rsp.viewId = backView.viewId;\n        rsp.navAction = 'moveBack';\n        rsp.viewId = backView.viewId;\n        if(backView.historyId === currentView.historyId) {\n          // went back in the same history\n          rsp.navDirection = 'back';\n        }\n\n      } else if(forwardView && forwardView.stateId === currentStateId) {\n        // they went to the forward one, set the forward view to no longer a forward view\n        rsp.viewId = forwardView.viewId;\n        rsp.navAction = 'moveForward';\n        if(forwardView.historyId === currentView.historyId) {\n          rsp.navDirection = 'forward';\n        }\n\n        var parentHistory = this._getParentHistoryObj(containerScope);\n        if(forwardView.historyId && parentHistory.scope) {\n          // if a history has already been created by the forward view then make sure it stays the same\n          parentHistory.scope.$historyId = forwardView.historyId;\n          rsp.historyId = forwardView.historyId;\n        }\n\n      } else if(currentView && currentView.historyId !== hist.historyId &&\n                hist.cursor > -1 && hist.stack.length > 0 && hist.cursor < hist.stack.length &&\n                hist.stack[hist.cursor].stateId === currentStateId) {\n        // they just changed to a different history and the history already has views in it\n        rsp.viewId = hist.stack[hist.cursor].viewId;\n        rsp.navAction = 'moveBack';\n\n      } else {\n\n        // set a new unique viewId\n        rsp.viewId = createViewId(currentStateId);\n\n        if(currentView) {\n          // set the forward view if there is a current view (ie: if its not the first view)\n          currentView.forwardViewId = rsp.viewId;\n\n          // its only moving forward if its in the same history\n          if(hist.historyId === currentView.historyId) {\n            rsp.navDirection = 'forward';\n          }\n          rsp.navAction = 'newView';\n\n          // check if there is a new forward view\n          if(forwardView && currentView.stateId !== forwardView.stateId) {\n            // they navigated to a new view but the stack already has a forward view\n            // since its a new view remove any forwards that existed\n            var forwardsHistory = this._getHistoryById(forwardView.historyId);\n            if(forwardsHistory) {\n              // the forward has a history\n              for(var x=forwardsHistory.stack.length - 1; x >= forwardView.index; x--) {\n                // starting from the end destroy all forwards in this history from this point\n                forwardsHistory.stack[x].destroy();\n                forwardsHistory.stack.splice(x);\n              }\n            }\n          }\n\n        } else {\n          // there's no current view, so this must be the initial view\n          rsp.navAction = 'initialView';\n        }\n\n        // add the new view\n        viewHistory.views[rsp.viewId] = this.createView({\n          viewId: rsp.viewId,\n          index: hist.stack.length,\n          historyId: hist.historyId,\n          backViewId: (currentView && currentView.viewId ? currentView.viewId : null),\n          forwardViewId: null,\n          stateId: currentStateId,\n          stateName: this.getCurrentStateName(),\n          stateParams: this.getCurrentStateParams(),\n          url: $location.url(),\n        });\n\n        if (rsp.navAction == 'moveBack') {\n          //moveBack(from, to);\n          $rootScope.$emit('$viewHistory.viewBack', currentView.viewId, rsp.viewId);\n        }\n\n        // add the new view to this history's stack\n        hist.stack.push(viewHistory.views[rsp.viewId]);\n      }\n\n      if(nextViewOptions) {\n        if(nextViewOptions.disableAnimate) rsp.navDirection = null;\n        if(nextViewOptions.disableBack) viewHistory.views[rsp.viewId].backViewId = null;\n        this.nextViewOptions(null);\n      }\n\n      this.setNavViews(rsp.viewId);\n\n      hist.cursor = viewHistory.currentView.index;\n\n      return rsp;\n    },\n\n    setNavViews: function(viewId) {\n      var viewHistory = $rootScope.$viewHistory;\n\n      viewHistory.currentView = this._getViewById(viewId);\n      viewHistory.backView = this._getBackView(viewHistory.currentView);\n      viewHistory.forwardView = this._getForwardView(viewHistory.currentView);\n\n      $rootScope.$broadcast('$viewHistory.historyChange', {\n        showBack: (viewHistory.backView && viewHistory.backView.historyId === viewHistory.currentView.historyId)\n      });\n    },\n\n    registerHistory: function(scope) {\n      scope.$historyId = ionic.Utils.nextUid();\n    },\n\n    createView: function(data) {\n      var newView = new View();\n      return newView.initialize(data);\n    },\n\n    getCurrentView: function() {\n      return $rootScope.$viewHistory.currentView;\n    },\n\n    getBackView: function() {\n      return $rootScope.$viewHistory.backView;\n    },\n\n    getForwardView: function() {\n      return $rootScope.$viewHistory.forwardView;\n    },\n\n    getNavDirection: function() {\n      return $rootScope.$viewHistory.navDirection;\n    },\n\n    getCurrentStateName: function() {\n      return ($state && $state.current ? $state.current.name : null);\n    },\n\n    isCurrentStateNavView: function(navView) {\n      return ($state &&\n              $state.current &&\n              $state.current.views &&\n              $state.current.views[navView] ? true : false);\n    },\n\n    getCurrentStateParams: function() {\n      var rtn;\n      if ($state && $state.params) {\n        for(var key in $state.params) {\n          if($state.params.hasOwnProperty(key)) {\n            rtn = rtn || {};\n            rtn[key] = $state.params[key];\n          }\n        }\n      }\n      return rtn;\n    },\n\n    getCurrentStateId: function() {\n      var id;\n      if($state && $state.current && $state.current.name) {\n        id = $state.current.name;\n        if($state.params) {\n          for(var key in $state.params) {\n            if($state.params.hasOwnProperty(key) && $state.params[key]) {\n              id += \"_\" + key + \"=\" + $state.params[key];\n            }\n          }\n        }\n        return id;\n      }\n      // if something goes wrong make sure its got a unique stateId\n      return ionic.Utils.nextUid();\n    },\n\n    goToHistoryRoot: function(historyId) {\n      if(historyId) {\n        var hist = $rootScope.$viewHistory.histories[ historyId ];\n        if(hist && hist.stack.length) {\n          if($rootScope.$viewHistory.currentView && $rootScope.$viewHistory.currentView.viewId === hist.stack[0].viewId) {\n            return;\n          }\n          $rootScope.$viewHistory.forcedNav = {\n            viewId: hist.stack[0].viewId,\n            navAction: 'moveBack',\n            navDirection: 'back'\n          };\n          hist.stack[0].go();\n        }\n      }\n    },\n\n    _getViewById: function(viewId) {\n      return (viewId ? $rootScope.$viewHistory.views[ viewId ] : null );\n    },\n\n    _getBackView: function(view) {\n      return (view ? this._getViewById(view.backViewId) : null );\n    },\n\n    _getForwardView: function(view) {\n      return (view ? this._getViewById(view.forwardViewId) : null );\n    },\n\n    _getHistoryById: function(historyId) {\n      return (historyId ? $rootScope.$viewHistory.histories[ historyId ] : null );\n    },\n\n    _getHistory: function(scope) {\n      var histObj = this._getParentHistoryObj(scope);\n\n      if( !$rootScope.$viewHistory.histories[ histObj.historyId ] ) {\n        // this history object exists in parent scope, but doesn't\n        // exist in the history data yet\n        $rootScope.$viewHistory.histories[ histObj.historyId ] = {\n          historyId: histObj.historyId,\n          parentHistoryId: this._getParentHistoryObj(histObj.scope.$parent).historyId,\n          stack: [],\n          cursor: -1\n        };\n      }\n\n      return $rootScope.$viewHistory.histories[ histObj.historyId ];\n    },\n\n    _getParentHistoryObj: function(scope) {\n      var parentScope = scope;\n      while(parentScope) {\n        if(parentScope.hasOwnProperty('$historyId')) {\n          // this parent scope has a historyId\n          return { historyId: parentScope.$historyId, scope: parentScope };\n        }\n        // nothing found keep climbing up\n        parentScope = parentScope.$parent;\n      }\n      // no history for for the parent, use the root\n      return { historyId: 'root', scope: $rootScope };\n    },\n\n    nextViewOptions: function(opts) {\n      if(arguments.length) {\n        this._nextOpts = opts;\n      } else {\n        return this._nextOpts;\n      }\n    },\n\n    getRenderer: function(navViewElement, navViewAttrs, navViewScope) {\n      var service = this;\n      var registerData;\n      var doAnimation;\n\n      // climb up the DOM and see which animation classname to use, if any\n      var animationClass = angular.isDefined(navViewScope.$nextAnimation) ?\n        navViewScope.$nextAnimation :\n        getParentAnimationClass(navViewElement[0]);\n\n      navViewScope.$nextAnimation = undefined;\n\n      function getParentAnimationClass(el) {\n        var className = '';\n        while(!className && el) {\n          className = el.getAttribute('animation');\n          el = el.parentElement;\n        }\n        return className;\n      }\n\n      function setAnimationClass() {\n        // add the animation CSS class we're gonna use to transition between views\n        if (animationClass) {\n          navViewElement[0].classList.add(animationClass);\n        }\n\n        if(registerData.navDirection === 'back') {\n          // animate like we're moving backward\n          navViewElement[0].classList.add('reverse');\n        } else {\n          // defaults to animate forward\n          // make sure the reverse class isn't already added\n          navViewElement[0].classList.remove('reverse');\n        }\n      }\n\n      return function(shouldAnimate) {\n\n        return {\n\n          enter: function(element) {\n\n            if(doAnimation && shouldAnimate) {\n              // enter with an animation\n              setAnimationClass();\n\n              element.addClass('ng-enter');\n              document.body.classList.add('disable-pointer-events');\n\n              $animate.enter(element, navViewElement, null, function() {\n                document.body.classList.remove('disable-pointer-events');\n                if (animationClass) {\n                  navViewElement[0].classList.remove(animationClass);\n                }\n              });\n              return;\n            }\n\n            // no animation\n            navViewElement.append(element);\n          },\n\n          leave: function() {\n            var element = navViewElement.contents();\n\n            if(doAnimation && shouldAnimate) {\n              // leave with an animation\n              setAnimationClass();\n\n              $animate.leave(element, function() {\n                element.remove();\n              });\n              return;\n            }\n\n            // no animation\n            element.remove();\n          },\n\n          register: function(element) {\n            // register a new view\n            registerData = service.register(navViewScope, element);\n            doAnimation = (animationClass !== null && registerData.navDirection !== null);\n            return registerData;\n          }\n\n        };\n      };\n    },\n\n    disableRegisterByTagName: function(tagName) {\n      // not every element should animate betwee transitions\n      // For example, the <ion-tabs> directive should not animate when it enters,\n      // but instead the <ion-tabs> directve would just show, and its children\n      // <ion-tab> directives would do the animating, but <ion-tabs> itself is not a view\n      $rootScope.$viewHistory.disabledRegistrableTagNames.push(tagName.toUpperCase());\n    },\n\n    isTagNameRegistrable: function(element) {\n      // check if this element has a tagName (at its root, not recursively)\n      // that shouldn't be animated, like <ion-tabs> or <ion-side-menu>\n      var x, y, disabledTags = $rootScope.$viewHistory.disabledRegistrableTagNames;\n      for(x=0; x<element.length; x++) {\n        if(element[x].nodeType !== 1) continue;\n        for(y=0; y<disabledTags.length; y++) {\n          if(element[x].tagName === disabledTags[y]) {\n            return false;\n          }\n        }\n      }\n      return true;\n    },\n\n    clearHistory: function() {\n      var\n      histories = $rootScope.$viewHistory.histories,\n      currentView = $rootScope.$viewHistory.currentView;\n\n      for(var historyId in histories) {\n\n        if(histories[historyId].stack) {\n          histories[historyId].stack = [];\n          histories[historyId].cursor = -1;\n        }\n\n        if(currentView.historyId === historyId) {\n          currentView.backViewId = null;\n          currentView.forwardViewId = null;\n          histories[historyId].stack.push(currentView);\n        } else if(histories[historyId].destroy) {\n          histories[historyId].destroy();\n        }\n\n      }\n\n      for(var viewId in $rootScope.$viewHistory.views) {\n        if(viewId !== currentView.viewId) {\n          delete $rootScope.$viewHistory.views[viewId];\n        }\n      }\n\n      this.setNavViews(currentView.viewId);\n    }\n\n  };\n\n}]);\n\nangular.module('ionic.decorator.location', [])\n\n/**\n * @private\n */\n.config(['$provide', function($provide) {\n  function $LocationDecorator($location, $timeout) {\n\n    $location.__hash = $location.hash;\n    //Fix: when window.location.hash is set, the scrollable area\n    //found nearest to body's scrollTop is set to scroll to an element\n    //with that ID.\n    $location.hash = function(value) {\n      if (angular.isDefined(value)) {\n        $timeout(function() {\n          var scroll = document.querySelector('.scroll-content');\n          if (scroll)\n            scroll.scrollTop = 0;\n        }, 0, false);\n      }\n      return $location.__hash(value);\n    };\n\n    return $location;\n  }\n  \n  $provide.decorator('$location', ['$delegate', '$timeout', $LocationDecorator]);\n}]);\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.actionSheet', [])\n\n/*\n * We don't document the ionActionSheet directive, we instead document\n * the $ionicActionSheet service\n */\n.directive('ionActionSheet', ['$document', function($document) {\n  return {\n    restrict: 'E',\n    scope: true,\n    replace: true,\n    link: function($scope, $element){\n      var keyUp = function(e) {\n        if(e.which == 27) {\n          $scope.cancel();\n          $scope.$apply();\n        }\n      };\n\n      var backdropClick = function(e) {\n        if(e.target == $element[0]) {\n          $scope.cancel();\n          $scope.$apply();\n        }\n      };\n      $scope.$on('$destroy', function() {\n        $element.remove();\n        $document.unbind('keyup', keyUp);\n      });\n\n      $document.bind('keyup', keyUp);\n      $element.bind('click', backdropClick);\n    },\n    template: '<div class=\"action-sheet-backdrop\">' +\n                '<div class=\"action-sheet-wrapper\">' +\n                  '<div class=\"action-sheet\">' +\n                    '<div class=\"action-sheet-group\">' +\n                      '<div class=\"action-sheet-title\" ng-if=\"titleText\">{{titleText}}</div>' +\n                      '<button class=\"button\" ng-click=\"buttonClicked($index)\" ng-repeat=\"button in buttons\">{{button.text}}</button>' +\n                    '</div>' +\n                    '<div class=\"action-sheet-group\" ng-if=\"destructiveText\">' +\n                      '<button class=\"button destructive\" ng-click=\"destructiveButtonClicked()\">{{destructiveText}}</button>' +\n                    '</div>' +\n                    '<div class=\"action-sheet-group\" ng-if=\"cancelText\">' +\n                      '<button class=\"button\" ng-click=\"cancel()\">{{cancelText}}</button>' +\n                    '</div>' +\n                  '</div>' +\n                '</div>' +\n              '</div>'\n  };\n}]);\n\n})();\n\n(function(ionic) {\n'use strict';\n\nangular.module('ionic.ui.header', ['ngAnimate', 'ngSanitize'])\n\n.directive('ionNavBar', TapScrollToTopDirective())\n.directive('ionHeaderBar', TapScrollToTopDirective())\n\n/**\n * @ngdoc directive\n * @name ionHeaderBar\n * @module ionic\n * @restrict E\n * @controller ionicBar as $scope.$ionicHeaderBarController\n *\n * @description\n * Adds a fixed header bar above some content.\n *\n * Is able to have left or right buttons, and additionally its title can be\n * aligned through the {@link ionic.controller:ionicBar ionicBar controller}.\n *\n * @param {string=} controller-bind The scope variable to bind this header bar's\n * {@link ionic.controller:ionicBar ionicBar controller} to.\n * Default: $scope.$ionicHeaderBarController.\n * @param {string=} align-title Where to align the title at the start.\n * Avaialble: 'left', 'right', or 'center'.  Defaults to 'center'.\n *\n * @usage\n * ```html\n * <ion-header-bar align-title=\"left\" class=\"bar-positive\">\n *   <div class=\"buttons\">\n *     <button class=\"button\" ng-click=\"doSomething()\">Left Button</button>\n *   </div>\n *   <h1 class=\"title\">Title!</h1>\n *   <div class=\"buttons\">\n *     <button class=\"button\">Right Button</button>\n *   </div>\n * </ion-header-bar>\n * <ion-content>\n *   Some content!\n * </ion-content>\n * ```\n */\n.directive('ionHeaderBar', barDirective(true))\n\n/**\n * @ngdoc directive\n * @name ionFooterBar\n * @module ionic\n * @restrict E\n * @controller ionicBar as $scope.$ionicFooterBarController\n *\n * @description\n * Adds a fixed footer bar below some content.\n *\n * Is able to have left or right buttons, and additionally its title can be\n * aligned through the {@link ionic.controller:ionicBar ionicBar controller}.\n *\n * @param {string=} controller-bind The scope variable to bind this footer bar's\n * {@link ionic.controller:ionicBar ionicBar controller} to.\n * Default: $scope.$ionicFooterBarController.\n * @param {string=} align-title Where to align the title at the start.\n * Avaialble: 'left', 'right', or 'center'.  Defaults to 'center'.\n *\n * @usage\n * ```html\n * <ion-content>\n *   Some content!\n * </ion-content>\n * <ion-footer-bar align-title=\"left\" class=\"bar-assertive\">\n *   <div class=\"buttons\">\n *     <button class=\"button\">Left Button</button>\n *   </div>\n *   <h1 class=\"title\">Title!</h1>\n *   <div class=\"buttons\" ng-click=\"doSomething()\">\n *     <button class=\"button\">Right Button</button>\n *   </div>\n * </ion-footer-bar>\n * ```\n */\n.directive('ionFooterBar', barDirective(false));\n\nfunction TapScrollToTopDirective() {\n  return ['$document', function($document) {\n    return {\n      restrict: 'E',\n      link: function($scope, $element, $attr, scrollCtrl) {\n        ionic.requestAnimationFrame(function() {\n          var scrollCtrl = $element.controller('$ionicScroll');\n          if (!scrollCtrl) {\n            return;\n          }\n\n          ionic.on('tap', onTap, $element[0]);\n          $scope.$on('$destroy', function() {\n            ionic.off('tap', onTap, $element[0]);\n          });\n\n          function onTap(e) {\n            if (ionic.DomUtil.getParentOrSelfWithClass(e.target, 'button', 4)) {\n              return;\n            }\n            var touch = e.gesture && e.gesture.touches[0] || e.detail.touches[0];\n            var bounds = $element[0].getBoundingClientRect();\n            if(ionic.DomUtil.rectContains(\n              touch.pageX, touch.pageY,\n              bounds.left, bounds.top - 20,\n              bounds.left + bounds.width, bounds.top + bounds.height)\n            ) {\n              scrollCtrl.scrollTop(true);\n            }\n          }\n        });\n      }\n    };\n  }];\n}\n\n\nfunction barDirective(isHeader) {\n  return ['$parse', function($parse) {\n    return {\n      restrict: 'E',\n      compile: function($element, $attr) {\n        $element.addClass(isHeader ? 'bar bar-header' : 'bar bar-footer');\n        return { pre: prelink };\n        function prelink($scope, $element, $attr) {\n          var hb = new ionic.views.HeaderBar({\n            el: $element[0],\n            alignTitle: $attr.alignTitle || 'center'\n          });\n\n          $parse($attr.controllerBind ||\n            (isHeader ? '$ionicHeaderBarController' : '$ionicFooterBarController')\n          ).assign($scope, hb);\n\n          var el = $element[0];\n          //just incase header is on rootscope\n          var parentScope = $scope.$parent || $scope;\n\n          if (isHeader) {\n            $scope.$watch(function() { return el.className; }, function(value) {\n              var isSubheader = value.indexOf('bar-subheader') !== -1;\n              parentScope.$hasHeader = !isSubheader;\n              parentScope.$hasSubheader = isSubheader;\n            });\n            $scope.$on('$destroy', function() {\n              parentScope.$hasHeader = parentScope.$hasSubheader = null;\n            });\n          } else {\n            $scope.$watch(function() { return el.className; }, function(value) {\n              var isSubfooter = value.indexOf('bar-subfooter') !== -1;\n              parentScope.$hasFooter = !isSubfooter;\n              parentScope.$hasSubfooter = isSubfooter;\n            });\n            $scope.$on('$destroy', function() {\n              parentScope.$hasFooter = parentScope.$hasSubfooter = null;\n            });\n            $scope.$watch('$hasTabs', function(val) {\n              $element.toggleClass('has-tabs', !!val);\n            });\n          }\n        }\n      }\n    };\n  }];\n}\n\n})(ionic);\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.checkbox', [])\n\n/**\n * @ngdoc directive\n * @name ionCheckbox\n * @module ionic\n * @restrict E\n * @description\n * No different than the HTML checkbox input, except it's styled differently.\n *\n * Behaves like any [AngularJS checkbox](http://docs.angularjs.org/api/ng/input/input[checkbox]).\n *\n * @usage\n * ```html\n * <ion-checkbox ng-model=\"isChecked\">Checkbox Label</ion-checkbox>\n * ```\n */\n.directive('ionCheckbox', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '?ngModel',\n    scope: {\n      ngModel: '=?',\n      ngValue: '=?',\n      ngChecked: '=?',\n      ngChange: '&'\n    },\n    transclude: true,\n\n    template: '<div class=\"item item-checkbox disable-pointer-events\">' +\n                '<label class=\"checkbox enable-pointer-events\">' +\n                  '<input type=\"checkbox\" ng-model=\"ngModel\" ng-value=\"ngValue\" ng-change=\"ngChange()\">' +\n                '</label>' +\n                '<div class=\"item-content\" ng-transclude></div>' +\n              '</div>',\n\n    compile: function(element, attr) {\n      var input = element.find('input');\n      if(attr.name) input.attr('name', attr.name);\n      if(attr.ngChecked) input.attr('ng-checked', 'ngChecked');\n      if(attr.ngTrueValue) input.attr('ng-true-value', attr.ngTrueValue);\n      if(attr.ngFalseValue) input.attr('ng-false-value', attr.ngFalseValue);\n    }\n\n  };\n});\n\n})();\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.content', ['ionic.ui.scroll'])\n\n/**\n * Panel is a simple 100% width and height, fixed panel. It's meant for content to be\n * added to it, or animated around.\n */\n/**\n * @ngdoc directive\n * @name ionPane\n * @module ionic\n * @restrict E\n *\n * @description A simple container that fits content, with no side effects.  Adds the 'pane' class to the element.\n */\n.directive('ionPane', function() {\n  return {\n    restrict: 'E',\n    link: function(scope, element, attr) {\n      element.addClass('pane');\n    }\n  };\n})\n\n/**\n * @ngdoc directive\n * @name ionContent\n * @module ionic\n * @restrict E\n *\n * @description\n * The ionContent directive provides an easy to use content area that can be configured\n * to use Ionic's custom Scroll View, or the built in overflow scorlling of the browser.\n *\n * While we recommend using the custom Scroll features in Ionic in most cases, sometimes\n * (for performance reasons) only the browser's native overflow scrolling will suffice,\n * and so we've made it easy to toggle between the Ionic scroll implementation and\n * overflow scrolling.\n *\n * You can implement pull-to-refresh with the {@link ionic.directive:ionRefresher}\n * directive, and infinite scrolling with the {@link ionic.directive:ionInfiniteScroll}\n * directive.\n *\n * @param {string=} delegate-handle The handle used to identify this scrollView\n * with {@link ionic.service:$ionicScrollDelegate}.\n * @param {boolean=} padding Whether to add padding to the content.\n * of the content.  Defaults to true on iOS, false on Android.\n * @param {boolean=} scroll Whether to allow scrolling of content.  Defaults to true.\n * @param {boolean=} overflow-scroll Whether to use overflow-scrolling instead of\n * Ionic scroll.\n * @param {boolean=} has-bouncing Whether to allow scrolling to bounce past the edges\n * of the content.  Defaults to true on iOS, false on Android.\n * @param {expression=} on-scroll Expression to evaluate when the content is scrolled.\n * @param {expression=} on-scroll-complete Expression to evaluate when a scroll action completes.\n */\n.directive('ionContent', [\n  '$parse',\n  '$timeout',\n  '$controller',\n  '$ionicBind',\nfunction($parse, $timeout, $controller, $ionicBind) {\n  return {\n    restrict: 'E',\n    require: '^?ionNavView',\n    scope: true,\n    compile: function(element, attr) {\n      element.addClass('scroll-content');\n\n      //We cannot transclude here because it breaks element.data() inheritance on compile\n      var innerElement = angular.element('<div class=\"scroll\"></div>');\n      innerElement.append(element.contents());\n      element.append(innerElement);\n\n      return { pre: prelink };\n      function prelink($scope, $element, $attr, navViewCtrl) {\n        var clone, sc, scrollView, scrollCtrl;\n\n        $scope.$watch(function() {\n          return ($scope.$hasHeader ? ' has-header' : '')  +\n            ($scope.$hasSubheader ? ' has-subheader' : '') +\n            ($scope.$hasFooter ? ' has-footer' : '') +\n            ($scope.$hasSubfooter ? ' has-subfooter' : '') +\n            ($scope.$hasTabs ? ' has-tabs' : '') +\n            ($scope.$hasTabsTop ? ' has-tabs-top' : '');\n        }, function(className, oldClassName) {\n          $element.removeClass(oldClassName);\n          $element.addClass(className);\n        });\n\n        $ionicBind($scope, $attr, {\n          $onScroll: '&onScroll',\n          $onScrollComplete: '&onScrollComplete',\n          hasBouncing: '@',\n          scroll: '@',\n          padding: '@',\n          hasScrollX: '@',\n          hasScrollY: '@',\n          scrollbarX: '@',\n          scrollbarY: '@',\n          startX: '@',\n          startY: '@',\n          scrollEventInterval: '@'\n        });\n\n        if (angular.isDefined($attr.padding)) {\n          $scope.$watch($attr.padding, function(newVal) {\n            innerElement.toggleClass('padding', !!newVal);\n          });\n        }\n\n        if ($scope.scroll === \"false\") {\n          //do nothing\n        } else if(attr.overflowScroll === \"true\") {\n          $element.addClass('overflow-scroll');\n        } else {\n\n          scrollCtrl = $controller('$ionicScroll', {\n            $scope: $scope,\n            scrollViewOptions: {\n              el: $element[0],\n              delegateHandle: attr.delegateHandle,\n              bouncing: $scope.$eval($scope.hasBouncing),\n              startX: $scope.$eval($scope.startX) || 0,\n              startY: $scope.$eval($scope.startY) || 0,\n              scrollbarX: $scope.$eval($scope.scrollbarX) !== false,\n              scrollbarY: $scope.$eval($scope.scrollbarY) !== false,\n              scrollingX: $scope.$eval($scope.hasScrollX) === true,\n              scrollingY: $scope.$eval($scope.hasScrollY) !== false,\n              scrollEventInterval: parseInt($scope.scrollEventInterval, 10) || 20,\n              scrollingComplete: function() {\n                $scope.$onScrollComplete({\n                  scrollTop: this.__scrollTop,\n                  scrollLeft: this.__scrollLeft\n                });\n              }\n            }\n          });\n          //Publish scrollView to parent so children can access it\n          scrollView = scrollCtrl.scrollView;\n        }\n\n      }\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionRefresher\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionContent, ionic.directive:ionScroll\n * @description\n * Allows you to add pull-to-refresh to a scrollView.\n *\n * Place it as the first child of your {@link ionic.directive:ionContent} or\n * {@link ionic.directive:ionScroll} element.\n *\n * When refreshing is complete, $broadcast the 'scroll.refreshComplete' event\n * from your controller.\n *\n * @usage\n *\n * ```html\n * <ion-content ng-controller=\"MyController\">\n *   <ion-refresher\n *     pulling-text=\"Pull to refresh...\"\n *     on-refresh=\"doRefresh()\">\n *   </ion-refresher>\n *   <ion-list>\n *     <ion-item ng-repeat=\"item in items\"></ion-item>\n *   </ion-list>\n * </ion-content>\n * ```\n * ```js\n * angular.module('testApp', ['ionic'])\n * .controller('MyController', function($scope, $http) {\n *   $scope.items = [1,2,3];\n *   $scope.doRefresh = function() {\n *     $http.get('/new-items').success(function(newItems) {\n *       $scope.items = newItems;\n *       //Stop the ion-refresher from spinning\n *       $scope.$broadcast('scroll.refreshComplete');\n *     });\n *   };\n * });\n * ```\n *\n * @param {expression=} on-refresh Called when the user pulls down enough and lets go\n * of the refresher.\n * @param {expression=} on-pulling Called when the user starts to pull down\n * on the refresher.\n * @param {string=} pulling-icon The icon to display while the user is pulling down.\n * Default: 'ion-arrow-down-c'.\n * @param {string=} pulling-text The text to display while the user is pulling down.\n * @param {string=} refreshing-icon The icon to display after user lets go of the\n * refresher.\n * @param {string=} refreshing-text The text to display after the user lets go of\n * the refresher.\n *\n */\n.directive('ionRefresher', ['$ionicBind', function($ionicBind) {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '^$ionicScroll',\n    template:\n    '<div class=\"scroll-refresher\">' +\n    '<div class=\"ionic-refresher-content\">' +\n        '<i class=\"icon {{pullingIcon}} icon-pulling\"></i>' +\n        '<span class=\"icon-pulling\" ng-bind-html=\"pullingText\"></span>' +\n        '<i class=\"icon {{refreshingIcon}} icon-refreshing\"></i>' +\n        '<span class=\"icon-refreshing\" ng-bind-html=\"refreshingText\"></span>' +\n      '</div>' +\n    '</div>',\n    compile: function($element, $attrs) {\n      if (angular.isUndefined($attrs.pullingIcon)) {\n        $attrs.$set('pullingIcon', 'ion-arrow-down-c');\n      }\n      if (angular.isUndefined($attrs.refreshingIcon)) {\n        $attrs.$set('refreshingIcon', 'ion-loading-d');\n      }\n      return function($scope, $element, $attrs, scrollCtrl) {\n        $ionicBind($scope, $attrs, {\n          pullingIcon: '@',\n          pullingText: '@',\n          refreshingIcon: '@',\n          refreshingText: '@',\n          $onRefresh: '&onRefresh',\n          $onPulling: '&onPulling'\n        });\n\n        scrollCtrl._setRefresher($scope, $element[0]);\n        $scope.$on('scroll.refreshComplete', function() {\n          $element[0].classList.remove('active');\n          scrollCtrl.scrollView.finishPullToRefresh();\n        });\n      };\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionInfiniteScroll\n * @module ionic\n * @parent ionic.directive:ionContent, ionic.directive:ionScroll\n * @restrict E\n *\n * @description\n * The ionInfiniteScroll directive allows you to call a function whenever\n * the user gets to the bottom of the page or near the bottom of the page.\n *\n * The expression you pass in for `on-infinite` is called when the user scrolls\n * greater than `distance` away from the bottom of the content.\n *\n * @param {expression} on-infinite What to call when the scroller reaches the\n * bottom.\n * @param {string=} distance The distance from the bottom that the scroll must\n * reach to trigger the on-infinite expression. Default: 1%.\n * @param {string=} icon The icon to show while loading. Default: 'ion-loading-d'.\n *\n * @usage\n * ```html\n * <ion-content ng-controller=\"MyController\">\n *   <ion-infinite-scroll\n *     on-infinite=\"loadMore()\"\n *     distance=\"1%\">\n *   </ion-infinite-scroll>\n * </ion-content>\n * ```\n * ```js\n * function MyController($scope, $http) {\n *   $scope.items = [];\n *   $scope.loadMore = function() {\n *     $http.get('/more-items').success(function(items) {\n *       useItems(items);\n *       $scope.$broadcast('scroll.infiniteScrollComplete');\n *     });\n *   };\n * }\n * ```\n *\n * An easy to way to stop infinite scroll once there is no more data to load\n * is to use angular's `ng-if` directive:\n *\n * ```html\n * <ion-infinite-scroll\n *   ng-if=\"moreDataCanBeLoaded()\"\n *   icon=\"ion-loading-c\"\n *   on-infinite=\"loadMoreData()\">\n * </ion-infinite-scroll>\n * ```\n */\n.directive('ionInfiniteScroll', ['$timeout', function($timeout) {\n  return {\n    restrict: 'E',\n    require: ['^$ionicScroll', 'ionInfiniteScroll'],\n    template:\n      '<div class=\"scroll-infinite\">' +\n        '<div class=\"scroll-infinite-content\">' +\n          '<i class=\"icon {{icon()}} icon-refreshing\"></i>' +\n        '</div>' +\n      '</div>',\n    scope: true,\n    controller: ['$scope', '$attrs', function($scope, $attrs) {\n      this.isLoading = false;\n      this.scrollView = null; //given by link function\n      this.getMaxScroll = function() {\n        var dist = $attrs.distance || '1%';\n        return dist.indexOf('%') > -1 ?\n          this.scrollView.getScrollMax().top * (1 - parseInt(dist,10) / 100) :\n          this.scrollView.getScrollMax().top - parseInt(dist, 10);\n      };\n    }],\n    link: function($scope, $element, $attrs, ctrls) {\n      var scrollCtrl = ctrls[0];\n      var infiniteScrollCtrl = ctrls[1];\n      var scrollView = infiniteScrollCtrl.scrollView = scrollCtrl.scrollView;\n\n      $scope.icon = function() {\n        return angular.isDefined($attrs.icon) ? $attrs.icon : 'ion-loading-d';\n      };\n\n      $scope.$on('scroll.infiniteScrollComplete', function() {\n        $element[0].classList.remove('active');\n        $timeout(function() {\n          scrollView.resize();\n        }, 0, false);\n        infiniteScrollCtrl.isLoading = false;\n      });\n\n      scrollCtrl.$element.on('scroll', ionic.animationFrameThrottle(function() {\n        if (!infiniteScrollCtrl.isLoading &&\n            scrollView.getValues().top >= infiniteScrollCtrl.getMaxScroll()) {\n          $element[0].classList.add('active');\n          infiniteScrollCtrl.isLoading = true;\n          $scope.$parent.$apply($attrs.onInfinite || '');\n        }\n      }));\n    }\n  };\n}]);\n\n})();\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.list', ['ngAnimate'])\n\n/**\n * @ngdoc directive\n * @name ionItem\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionList\n *\n * @description\n * The ionItem directive creates a list-item that can easily be swiped,\n * deleted, reordered, edited, and more.\n *\n * @usage\n * ```html\n * <ion-list>\n *   <ion-item ng-repeat=\"item in items\"\n *     item=\"item\"\n *     can-swipe=\"true\"\n *     left-buttons=\"myItemButtons\">\n *   </ion-item>\n * </ion-list>\n * ```\n *\n * @param {string=} item-type The type of this item.  See [the list CSS page](/docs/components/#list) for available item types.\n * @param {expression=} option-buttons The option buttons to show when swiping the item to the left (if swiping is enabled).  Defaults to the ionList parent's option-buttons setting.  The format of each button object is:\n *   ```js\n *   {\n *     text: 'Edit',\n *     type: 'Button',\n *     onTap: function(item) {}\n *   }\n *   ```\n *\n * @param {expression=} item The 'object' representing this item, to be passed in to swipe, delete, and reorder callbacks.\n * @param {boolean=} can-swipe Whether or not this item can be swiped. Defaults ot hte ionList parent's can-swipe setting.\n * @param {boolean=} can-delete Whether or not this item can be deleted. Defaults to the ionList parent's can-delete setting.\n * @param {boolean=} can-reorder Whether or not this item can be reordered. Defaults to the ionList parent's can-reorder setting.\n * @param {expression=} on-delete The expression to call when this item is deleted.\n * @param {string=} delete-icon The class name of the icon to show on this item while deleting. Defaults to the ionList parent's delete-icon setting.\n * @param {string=} reorder-icon The class name of the icon to show on this item while reordering. Defaults to the ionList parent's reorder-icon setting.\n */\n.directive('ionItem', ['$timeout', '$parse', function($timeout, $parse) {\n  return {\n    restrict: 'E',\n    require: '?^ionList',\n    replace: true,\n    transclude: true,\n\n    scope: {\n      item: '=',\n      itemType: '@',\n      canDelete: '@',\n      canReorder: '@',\n      canSwipe: '@',\n      onDelete: '&',\n      optionButtons: '&',\n      deleteIcon: '@',\n      reorderIcon: '@'\n    },\n\n    template: '<div class=\"item item-complex\">\\\n            <div class=\"item-left-edit item-delete\" ng-if=\"deleteClick !== undefined\">\\\n              <button class=\"button button-icon icon\" ng-class=\"deleteIconClass\" ng-click=\"deleteClick()\" ion-stop-event=\"click\"></button>\\\n            </div>\\\n            <a class=\"item-content\" ng-href=\"{{ href }}\" ng-transclude></a>\\\n            <div class=\"item-right-edit item-reorder\" ng-if=\"reorderIconClass !== undefined\">\\\n              <button data-ionic-action=\"reorder\" data-prevent-scroll=\"true\" class=\"button button-icon icon\" ng-class=\"reorderIconClass\"></button>\\\n            </div>\\\n            <div class=\"item-options\" ng-if=\"itemOptionButtons\">\\\n             <button ng-click=\"b.onTap(item, b)\" ion-stop-event=\"click\" class=\"button\" ng-class=\"b.type\" ng-repeat=\"b in itemOptionButtons\" ng-bind=\"b.text\"></button>\\\n           </div>\\\n          </div>',\n\n    link: function($scope, $element, $attr, list) {\n      if(!list) return;\n\n      var $parentScope = list.scope;\n      var $parentAttrs = list.attrs;\n\n      $attr.$observe('href', function(value) {\n        if(value) $scope.href = value.trim();\n      });\n\n      if(!$scope.itemType) {\n        $scope.itemType = $parentScope.itemType;\n      }\n\n      // Set this item's class, first from the item directive attr, and then the list attr if item not set\n      $element.addClass($scope.itemType || $parentScope.itemType);\n\n      $scope.itemClass = $scope.itemType;\n\n      // Decide if this item can do stuff, and follow a certain priority\n      // depending on where the value comes from\n      if(($attr.canDelete ? $scope.canDelete : $parentScope.canDelete) !== \"false\") {\n        if($attr.onDelete || $parentAttrs.onDelete) {\n\n          // only assign this method when we need to\n          // and use its existence to decide if the delete should show or not\n          $scope.deleteClick = function() {\n            if($attr.onDelete) {\n              // this item has an on-delete attribute\n              $scope.onDelete({ item: $scope.item, index: $scope.$parent.$index });\n            } else if($parentAttrs.onDelete) {\n              // run the parent list's onDelete method\n              // if it doesn't exist nothing will happen\n              $parentScope.onDelete({ item: $scope.item, index: $scope.$parent.$index });\n            }\n          };\n\n          // Set which icons to use for deleting\n          $scope.deleteIconClass = $scope.deleteIcon || $parentScope.deleteIcon || 'ion-minus-circled';\n          $element.addClass('item-left-editable');\n        }\n      }\n\n      // set the reorder Icon Class only if the item or list set can-reorder=\"true\"\n      if(($attr.canReorder ? $scope.canReorder : $parentScope.canReorder) === \"true\") {\n        $scope.reorderIconClass = $scope.reorderIcon || $parentScope.reorderIcon || 'ion-navicon';\n        $element.addClass('item-right-editable');\n      }\n\n      // Set the option buttons which can be revealed by swiping to the left\n      // if canSwipe was set to false don't even bother\n      if(($attr.canSwipe ? $scope.canSwipe : $parentScope.canSwipe) !== \"false\") {\n        $scope.itemOptionButtons = $scope.optionButtons();\n        if(typeof $scope.itemOptionButtons === \"undefined\") {\n          $scope.itemOptionButtons = $parentScope.optionButtons();\n        }\n        $element.addClass('item-swipeable');\n      }\n\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionList\n * @module ionic\n * @restrict E\n * @codepen jsHjf\n *\n * @description\n * The List is a widely used interface element in almost any mobile app,\n * and can include content ranging from basic text all the way to buttons,\n * toggles, icons, and thumbnails.\n *\n * Both the list, which contains items, and the list items themselves can be\n * any HTML element. The containing element requires the list class and each\n * list item requires the item class. Ionic also comes with pre-built Angular\n * directives to make it easier to create a complex list.\n *\n * Using the ionList and {@link ionic.directive:ionItem} directives\n * make it easy to support various interaction modes such as swipe to edit,\n * drag to reorder, and removing items.\n *\n * However, if you need just a simple list you won't be required to use the\n * directives, but rather just use the classnames.\n * This demo is a simple list without using the directives.\n *\n * See the {@link ionic.directive:ionItem} documentation for more information on list items.\n *\n * @usage\n * ```html\n * <ion-list>\n *   <ion-item ng-repeat=\"item in items\" item=\"item\">\n *   </ion-item>\n * </ion-list>\n * ```\n *\n * @param {string=} item-type The type of this item.  See [the list CSS page](/docs/components/#list) for available item types.\n * @param {expression=} on-delete Called when a child item is deleted.\n * @param {expression=} on-reorder Called when a child item is reordered.\n * @param {boolean=} show-delete Whether to show each item delete button.\n * @param {boolean=} show-reoder Whether to show each item's reorder button.\n * @param {boolean=} can-delete Whether child items are able to be deleted or not.\n * @param {boolean=} can-reorder Whether child items can be reordered or not.\n * @param {boolean=} can-swipe Whether child items can be swiped to reveal option buttons.\n * @param {string=} delete-icon The class name of the icon to show on child items while deleting.  Defaults to `ion-minus-circled`.\n * @param {string=} reorder-icon The class name to show on child items while reordering. Defaults to `ion-navicon`.\n * @param {string=} animation An animation class to apply to the list for animating when child items enter or exit the list.\n */\n.directive('ionList', ['$timeout', function($timeout) {\n  return {\n    restrict: 'E',\n    replace: true,\n    transclude: true,\n    require: '^?$ionicScroll',\n    scope: {\n      itemType: '@',\n      canDelete: '@',\n      canReorder: '@',\n      canSwipe: '@',\n      showDelete: '=',\n      showReorder: '=',\n      onDelete: '&',\n      onReorder: '&',\n      optionButtons: '&',\n      deleteIcon: '@',\n      reorderIcon: '@'\n    },\n\n    template: '<div class=\"list\" ng-class=\"{\\'list-left-editing\\': showDelete, \\'list-right-editing\\': showReorder}\" ng-transclude></div>',\n\n    controller: ['$scope', '$attrs', function($scope, $attrs) {\n      this.scope = $scope;\n      this.attrs = $attrs;\n    }],\n\n    link: function($scope, $element, $attr, ionicScrollCtrl) {\n      $scope.listView = new ionic.views.ListView({\n        canSwipe: $scope.canSwipe !== \"false\" && !!$scope.optionButtons(),\n        el: $element[0],\n        listEl: $element[0].children[0],\n        scrollEl: ionicScrollCtrl && ionicScrollCtrl.element,\n        scrollView: ionicScrollCtrl && ionicScrollCtrl.scrollView,\n        onReorder: function(el, oldIndex, newIndex) {\n          $scope.$apply(function() {\n            $scope.onReorder({el: el, start: oldIndex, end: newIndex});\n          });\n        }\n      });\n\n      if($attr.animation) {\n        $element[0].classList.add($attr.animation);\n      }\n\n      var destroyShowReorderWatch = $scope.$watch('showReorder', function(val) {\n        if(val) {\n          $element[0].classList.add('item-options-hide');\n          $scope.listView && $scope.listView.clearDragEffects();\n        } else if(val === false) {\n          // false checking is because it could be undefined\n          // if its undefined then we don't care to do anything\n          $timeout(function(){\n            $element[0].classList.remove('item-options-hide');\n          }, 250);\n        }\n      });\n\n      $scope.$on('$destroy', function () {\n        destroyShowReorderWatch();\n      });\n\n    }\n  };\n}]);\n\n})();\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.loading', [])\n\n/**\n * @private\n * $ionicLoading service is documented\n */\n.directive('ionLoading', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    transclude: true,\n    link: function($scope, $element){\n      $element.addClass($scope.animation || '');\n    },\n    template: '<div class=\"loading-backdrop\" ng-class=\"{\\'show-backdrop\\': showBackdrop}\">' +\n                '<div class=\"loading\" ng-transclude>' +\n                '</div>' +\n              '</div>'\n  };\n});\n\n})();\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.modal', [])\n\n/*\n * We don't document the ionModal directive, we instead document\n * the $ionicModal service\n */\n.directive('ionModal', [function() {\n  return {\n    restrict: 'E',\n    transclude: true,\n    replace: true,\n    template: '<div class=\"modal-backdrop\">' +\n                '<div class=\"modal-wrapper\" ng-transclude></div>' +\n              '</div>'\n  };\n}]);\n\n})();\n\n\nangular.module('ionic.ui.navBar', ['ionic.service.view', 'ngSanitize'])\n\n/**\n * @ngdoc controller\n * @name ionicNavBar\n * @module ionic\n * @description\n * Controller for the {@link ionic.directive:ionNavBar} directive.\n */\n.controller('$ionicNavBar', [\n  '$scope',\n  '$element',\n  '$ionicViewService',\n  '$animate',\n  '$compile',\nfunction($scope, $element, $ionicViewService, $animate, $compile) {\n  //Let the parent know about our controller too so that children of\n  //sibling content elements can know about us\n  $element.parent().data('$ionNavBarController', this);\n\n  var self = this;\n\n  this.leftButtonsElement = angular.element(\n    $element[0].querySelector('.buttons.left-buttons')\n  );\n  this.rightButtonsElement = angular.element(\n    $element[0].querySelector('.buttons.right-buttons')\n  );\n\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#back\n   * @description Goes back in the view history.\n   * @param {DOMEvent=} event The event object (eg from a tap event)\n   */\n  this.back = function(e) {\n    var backView = $ionicViewService.getBackView();\n    backView && backView.go();\n    e && (e.alreadyHandled = true);\n    return false;\n  };\n\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#align\n   * @description Calls {@link ionic.controller:ionicBar#align ionicBar#align} for this navBar.\n   * @param {string=} direction The direction to the align the title text towards.\n   */\n  this.align = function(direction) {\n    this._headerBarView.align(direction);\n  };\n\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#showBackButton\n   * @description\n   * Set whether the {@link ionic.directive:ionNavBackButton} should be shown (if it exists).\n   * @param {boolean} show Whether to show the back button.\n   */\n  this.showBackButton = function(show) {\n    $scope.backButtonShown = !!show;\n  };\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#showBar\n   * @description\n   * Set whether the {@link ionic.directive:ionNavBar} should be shown.\n   * @param {boolean} show Whether to show the bar.\n   */\n  this.showBar = function(show) {\n    $scope.isInvisible = !show;\n  };\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#setTitle\n   * @description\n   * Set the title for the {@link ionic.directive:ionNavBar}.\n   * @param {string} title The new title to show.\n   */\n  this.setTitle = function(title) {\n    $scope.oldTitle = $scope.title;\n    $scope.title = title || '';\n  };\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#changeTitle\n   * @description\n   * Change the title, transitioning the new title in and the old one out in a given direction.\n   * @param {string} title The new title to show.\n   * @param {string} direction The direction to transition the new title in.\n   * Available: 'forward', 'back'.\n   */\n  this.changeTitle = function(title, direction) {\n    if ($scope.title === title) {\n      return false;\n    }\n    this.setTitle(title);\n    $scope.isReverse = direction == 'back';\n    $scope.shouldAnimate = !!direction;\n\n    if (!$scope.shouldAnimate) {\n      //We're done!\n      this._headerBarView.align();\n    } else {\n      this._animateTitles();\n    }\n    return true;\n  };\n\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#getTitle\n   * @returns {string} The current title of the navbar.\n   */\n  this.getTitle = function() {\n    return $scope.title || '';\n  };\n  /**\n   * @ngdoc method\n   * @name ionicNavBar#getPreviousTitle\n   * @returns {string} The previous title of the navbar.\n   */\n  this.getPreviousTitle = function() {\n    return $scope.oldTitle || '';\n  };\n\n  /**\n   * @private\n   * Exposed for testing\n   */\n  this._animateTitles = function() {\n    var oldTitleEl, newTitleEl, currentTitles;\n\n    //If we have any title right now\n    //(or more than one, they could be transitioning on switch),\n    //replace the first one with an oldTitle element\n    currentTitles = $element[0].querySelectorAll('.title');\n    if (currentTitles.length) {\n      oldTitleEl = $compile('<h1 class=\"title\" ng-bind-html=\"oldTitle\"></h1>')($scope);\n      angular.element(currentTitles[0]).replaceWith(oldTitleEl);\n    }\n    //Compile new title\n    newTitleEl = $compile('<h1 class=\"title invisible\" ng-bind-html=\"title\"></h1>')($scope);\n\n    //Animate in on next frame\n    ionic.requestAnimationFrame(function() {\n\n      oldTitleEl && $animate.leave(angular.element(oldTitleEl));\n\n      var insert = oldTitleEl && angular.element(oldTitleEl) || null;\n      $animate.enter(newTitleEl, $element, insert, function() {\n        self._headerBarView.align();\n      });\n\n      //Cleanup any old titles leftover (besides the one we already did replaceWith on)\n      angular.forEach(currentTitles, function(el) {\n        if (el && el.parentNode) {\n          //Use .remove() to cleanup things like .data()\n          angular.element(el).remove();\n        }\n      });\n\n      //$apply so bindings fire\n      $scope.$digest();\n\n      //Stop flicker of new title on ios7\n      ionic.requestAnimationFrame(function() {\n        newTitleEl[0].classList.remove('invisible');\n      });\n    });\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionNavBar\n * @module ionic\n * @controller ionicNavBar as $scope.$ionicNavBarController\n * @restrict E\n *\n * @description\n * If we have an {@link ionic.directive:ionNavView} directive, we can also create an\n * `<ion-nav-bar>`, which will create a topbar that updates as the application state changes.\n *\n * We can add a back button by putting an {@link ionic.directive:ionNavBackButton} inside.\n *\n * We can add buttons depending on the currently visible view using\n * {@link ionic.directive:ionNavButtons}.\n *\n * Assign an [animation class](/docs/components#animations) to the element to\n * enable animated changing of titles (recommended: 'slide-left-right' or 'nav-title-slide-ios7')\n *\n * @usage\n *\n * ```html\n * <body ng-app=\"starter\">\n *   <!-- The nav bar that will be updated as we navigate -->\n *   <ion-nav-bar class=\"bar-positive nav-title-slide-ios7\">\n *   </ion-nav-bar>\n *\n *   <!-- where the initial view template will be rendered -->\n *   <ion-nav-view></ion-nav-view>\n * </body>\n * ```\n *\n * @param controller-bind {string=} The scope expression to bind this element's\n * {@link ionic.controller:ionicNavBar ionicNavBar controller} to.\n * Default: $ionicNavBarController.\n * @param align-title {string=} Where to align the title of the navbar.\n * Available: 'left', 'right', 'center'. Defaults to 'center'.\n */\n.directive('ionNavBar', ['$ionicViewService', '$rootScope', '$animate', '$compile', '$parse',\nfunction($ionicViewService, $rootScope, $animate, $compile, $parse) {\n\n  return {\n    restrict: 'E',\n    controller: '$ionicNavBar',\n    scope: true,\n    compile: function(tElement, tAttrs) {\n      //We cannot transclude here because it breaks element.data() inheritance on compile\n      tElement\n        .addClass('bar bar-header nav-bar')\n        .append(\n          '<div class=\"buttons left-buttons\"> ' +\n          '</div>' +\n          '<h1 ng-bind-html=\"title\" class=\"title\"></h1>' +\n          '<div class=\"buttons right-buttons\"> ' +\n          '</div>'\n        );\n\n      return { pre: prelink };\n      function prelink($scope, $element, $attr, navBarCtrl) {\n        navBarCtrl._headerBarView = new ionic.views.HeaderBar({\n          el: $element[0],\n          alignTitle: $attr.alignTitle || 'center'\n        });\n\n        $parse($attr.controllerBind || '$ionicNavBarController')\n          .assign($scope, navBarCtrl);\n\n        //defaults\n        $scope.backButtonShown = false;\n        $scope.shouldAnimate = true;\n        $scope.isReverse = false;\n        $scope.isInvisible = true;\n        $scope.$parent.$hasHeader = true;\n\n        $scope.$watch(function() {\n          return ($scope.isReverse ? ' reverse' : '') +\n            ($scope.isInvisible ? ' invisible' : '') +\n            (!$scope.shouldAnimate ? ' no-animation' : '');\n        }, function(className, oldClassName) {\n          $element.removeClass(oldClassName);\n          $element.addClass(className);\n        });\n\n      }\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionNavBackButton\n * @module ionic\n * @restrict E\n * @parent ionNavBar\n * @description\n * Creates a back button inside an {@link ionic.directive:ionNavBar}.\n *\n * Will show up when the user is able to go back in the current navigation stack.\n *\n * By default, will go back when clicked.  If you wish for more advanced behavior, see the\n * examples below.\n *\n * @usage\n *\n * With default click action:\n *\n * ```html\n * <ion-nav-bar>\n *   <ion-nav-back-button class=\"button-icon\">\n *     <i class=\"ion-arrow-left-c\"></i> Back!\n *   </ion-nav-back-button>\n * </ion-nav-bar>\n * ```\n *\n * With custom click action, using {@link ionic.controller:ionicNavBar ionicNavBar controller}:\n *\n * ```html\n * <ion-nav-bar>\n *   <ion-nav-back-button class=\"button-icon\"\n *     ng-click=\"canGoBack && $ionicNavBarController.back()\">\n *     <i class=\"ion-arrow-left-c\"></i> Back\n *   </ion-nav-back-button>\n * </ion-nav-bar>\n * ```\n *\n * Displaying the previous title on the back button, again using\n * {@link ionic.controller:ionicNavBar ionicNavBar controller}.\n *\n * ```html\n * <ion-nav-bar>\n *   <ion-nav-back-button class=\"button button-icon ion-arrow-left-c\">\n *     {% raw %}{{$ionicNavBarController.getPreviousTitle() || 'Back'}}{% endraw %}\n *   </ion-nav-back-button>\n * </ion-nav-bar>\n * ```\n *\n */\n.directive('ionNavBackButton', ['$ionicNgClick', function($ionicNgClick) {\n  return {\n    restrict: 'E',\n    require: '^ionNavBar',\n    compile: function(tElement, tAttrs) {\n      tElement.addClass('button back-button');\n      return function($scope, $element, $attr, navBarCtrl) {\n        if (!$attr.ngClick) {\n          $scope.$navBack = navBarCtrl.back;\n          $ionicNgClick($scope, $element, '$navBack($event)');\n        }\n\n        //If the current viewstate does not allow a back button,\n        //always hide it.\n        var deregisterListener = $scope.$parent.$on(\n          '$viewHistory.historyChange',\n          function(e, data) {\n            $scope.hasBackButton = !!data.showBack;\n          }\n        );\n        $scope.$on('$destroy', deregisterListener);\n\n        //Make sure both that a backButton is allowed in the first place,\n        //and that it is shown by the current view.\n        $scope.$watch('!!(backButtonShown && hasBackButton)', function(val) {\n          $element.toggleClass('hide', !val);\n        });\n      };\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionNavButtons\n * @module ionic\n * @restrict E\n * @parent ionNavView\n *\n * @description\n * Use ionNavButtons to set the buttons on your {@link ionic.directive:ionNavBar}\n * from within an {@link ionic.directive:ionView}.\n *\n * Any buttons you declare will be placed onto the navbar's corresponding side,\n * and then destroyed when the user leaves their parent view.\n *\n * @usage\n * ```html\n * <ion-nav-bar>\n * </ion-nav-bar>\n * <ion-nav-view>\n *   <ion-view>\n *     <ion-nav-buttons side=\"left\">\n *       <button class=\"button\" ng-click=\"doSomething()\">\n *         I'm a button on the left of the navbar!\n *       </button>\n *     </ion-nav-buttons>\n *     <ion-content>\n *       Some super content here!\n *     </ion-content>\n *   </ion-view>\n * </ion-nav-view>\n * ```\n *\n * @param {string} side The side to place the buttons on in the parent\n * {@link ionic.directive:ionNavBar}. Available: 'left' or 'right'.\n */\n.directive('ionNavButtons', ['$compile', '$animate', function($compile, $animate) {\n  return {\n    require: '^ionNavBar',\n    restrict: 'E',\n    compile: function($element, $attrs) {\n      var content = $element.contents().remove();\n      return function($scope, $element, $attrs, navBarCtrl) {\n        var navElement = $attrs.side === 'right' ?\n          navBarCtrl.rightButtonsElement :\n          navBarCtrl.leftButtonsElement;\n\n        //Put all of our inside buttons into their own div,\n        //so we can remove them all when this element dies -\n        //even if the buttons have changed through an ng-repeat or the like,\n        //we just remove their div parent and they are gone.\n        var buttons = angular.element('<div>').append(content);\n\n        //Compile buttons inside content so they have access to everything\n        //something inside content does (eg parent ionicScroll)\n        $element.append(buttons);\n        $compile(buttons)($scope);\n\n        //Append buttons to navbar\n        $animate.enter(buttons, navElement);\n\n        //When our ion-nav-buttons container is destroyed,\n        //destroy everything in the navbar\n        $scope.$on('$destroy', function() {\n          $animate.leave(buttons);\n        });\n\n        // The original element is just a completely empty <ion-nav-buttons> element.\n        // make it invisible just to be sure it doesn't change any layout\n        $element.css('display', 'none');\n      };\n    }\n  };\n}]);\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.popup', [])\n\n/**\n * @private\n */\n.directive('ionPopupBackdrop', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    template: '<div class=\"popup-backdrop\"></div>'\n  }\n})\n\n/**\n * @private\n */\n.directive('ionPopup', ['$ionicBind', function($ionicBind) {\n  return {\n    restrict: 'E',\n    replace: true,\n    transclude: true,\n    scope: true,\n    template:\n      '<div class=\"popup\">' +\n        '<div class=\"popup-head\">' +\n          '<h3 class=\"popup-title\" ng-bind-html=\"title\"></h3>' +\n          '<h5 class=\"popup-sub-title\" ng-bind-html=\"subTitle\" ng-if=\"subTitle\"></h5>' +\n        '</div>' +\n        '<div class=\"popup-body\" ng-transclude>' +\n        '</div>' +\n        '<div class=\"popup-buttons row\">' +\n          '<button ng-repeat=\"button in buttons\" ng-click=\"_buttonTapped(button, $event)\" class=\"button col\" ng-class=\"button.type || \\'button-default\\'\" ng-bind-html=\"button.text\"></button>' +\n        '</div>' +\n      '</div>',\n    link: function($scope, $element, $attr) {\n      $ionicBind($scope, $attr, {\n        title: '@',\n        buttons: '=',\n        $onButtonTap: '&onButtonTap',\n        $onClose: '&onClose'\n      });\n\n      $scope._buttonTapped = function(button, event) {\n        var result = button.onTap && button.onTap(event);\n\n        // A way to return false\n        if(event.defaultPrevented) {\n          return $scope.$onClose({button: button, result: false, event: event });\n        }\n\n        // Truthy test to see if we should close the window\n        if(result) {\n          return $scope.$onClose({button: button, result: result, event: event });\n        }\n        $scope.$onButtonTap({button: button, event: event});\n      }\n    }\n  };\n}]);\n\n})();\n\n(function(ionic) {\n'use strict';\n\nangular.module('ionic.ui.radio', [])\n\n/**\n * @ngdoc directive\n * @name ionRadio\n * @module ionic\n * @restrict E\n * @description\n * No different than the HTML radio input, except it's styled differently.\n *\n * Behaves like any [AngularJS radio](http://docs.angularjs.org/api/ng/input/input[radio]).\n *\n * @usage\n * ```html\n * <ion-radio ng-model=\"choice\" value=\"A\">Choose A</ion-radio>\n * <ion-radio ng-model=\"choice\" value=\"B\">Choose B</ion-radio>\n * <ion-radio ng-model=\"choice\" value=\"C\">Choose C</ion-radio>\n * ```\n */\n.directive('ionRadio', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '?ngModel',\n    scope: {\n      ngModel: '=?',\n      ngValue: '=?',\n      ngChange: '&',\n      icon: '@'\n    },\n    transclude: true,\n    template: '<label class=\"item item-radio\">' +\n                '<input type=\"radio\" name=\"radio-group\"' +\n                ' ng-model=\"ngModel\" ng-value=\"ngValue\" ng-change=\"ngChange()\">' +\n                '<div class=\"item-content disable-pointer-events\" ng-transclude></div>' +\n                '<i class=\"radio-icon disable-pointer-events icon ion-checkmark\"></i>' +\n              '</label>',\n\n    compile: function(element, attr) {\n      if(attr.name) element.children().eq(0).attr('name', attr.name);\n      if(attr.icon) element.children().eq(2).removeClass('ion-checkmark').addClass(attr.icon);\n    }\n  };\n})\n\n// The radio button is a radio powered element with only\n// one possible selection in a set of options.\n.directive('ionRadioButtons', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '?ngModel',\n    scope: {\n      value: '@'\n    },\n    transclude: true,\n    template: '<div class=\"button-bar button-bar-inline\" ng-transclude></div>',\n\n    controller: ['$scope', '$element', function($scope, $element) {\n\n      this.select = function(element) {\n        var c, children = $element.children();\n        for(var i = 0; i < children.length; i++) {\n          c = children[i];\n          if(c != element[0]) {\n            c.classList.remove('active');\n          }\n        }\n      };\n\n    }],\n\n    link: function($scope, $element, $attr, ngModel) {\n      var radio;\n\n      if(ngModel) {\n        //$element.bind('tap', tapHandler);\n\n        ngModel.$render = function() {\n          var children = $element.children();\n          for(var i = 0; i < children.length; i++) {\n            children[i].classList.remove('active');\n          }\n          $scope.$parent.$broadcast('radioButton.select', ngModel.$viewValue);\n        };\n      }\n    }\n  };\n})\n\n.directive('ionButtonRadio', function() {\n  return {\n    restrict: 'CA',\n    require: ['?^ngModel', '?^ionRadioButtons'],\n    link: function($scope, $element, $attr, ctrls) {\n      var ngModel = ctrls[0];\n      var radioButtons = ctrls[1];\n      if(!ngModel || !radioButtons) { return; }\n\n      var setIt = function() {\n        $element.addClass('active');\n        ngModel.$setViewValue($scope.$eval($attr.ngValue));\n\n        radioButtons.select($element);\n      };\n\n      var clickHandler = function(e) {\n        setIt();\n      };\n\n      $scope.$on('radioButton.select', function(e, val) {\n        if(val == $scope.$eval($attr.ngValue)) {\n          $element.addClass('active');\n        }\n      });\n\n      ionic.on('tap', clickHandler, $element[0]);\n\n      $scope.$on('$destroy', function() {\n        ionic.off('tap', clickHandler);\n      });\n    }\n  };\n});\n\n})(window.ionic);\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.scroll', [])\n\n/**\n * @ngdoc directive\n * @name ionScroll\n * @module ionic\n * @restrict E\n *\n * @description\n * Creates a scrollable container for all content inside.\n *\n * @param {string=} delegate-handle The handle used to identify this scrollView\n * with {@link ionic.service:$ionicScrollDelegate}.\n * @param {string=} direction Which way to scroll. 'x' or 'y'. Default 'y'.\n * @param {boolean=} paging Whether to scroll with paging.\n * @param {expression=} on-refresh Called on pull-to-refresh, triggered by an {@link ionic.directive:ionRefresher}.\n * @param {expression=} on-scroll Called whenever the user scrolls.\n * @param {boolean=} scrollbar-x Whether to show the horizontal scrollbar. Default false.\n * @param {boolean=} scrollbar-x Whether to show the vertical scrollbar. Default true.\n */\n.directive('ionScroll', ['$parse', '$timeout', '$controller', '$ionicBind', function($parse, $timeout, $controller, $ionicBind) {\n  return {\n    restrict: 'E',\n    scope: true,\n    controller: function() {},\n    compile: function(element, attr) {\n      element.addClass('scroll-view');\n\n      //We cannot transclude here because it breaks element.data() inheritance on compile\n      var innerElement = angular.element('<div class=\"scroll\"></div>');\n      innerElement.append(element.contents());\n      element.append(innerElement);\n\n      return { pre: prelink };\n      function prelink($scope, $element, $attr) {\n        var scrollView, scrollCtrl;\n\n        $ionicBind($scope, $attr, {\n          direction: '@',\n          paging: '@',\n          $onScroll: '&onScroll',\n          scroll: '@',\n          scrollbarX: '@',\n          scrollbarY: '@',\n        });\n\n        if (angular.isDefined($attr.padding)) {\n          $scope.$watch($attr.padding, function(newVal) {\n            innerElement.toggleClass('padding', !!newVal);\n          });\n        }\n        if($scope.$eval($scope.paging) === true) {\n          innerElement.addClass('scroll-paging');\n        }\n\n        if(!$scope.direction) { $scope.direction = 'y'; }\n        var isPaging = $scope.$eval($scope.paging) === true;\n\n        var scrollViewOptions= {\n          el: $element[0],\n          delegateHandle: $attr.delegateHandle,\n          paging: isPaging,\n          scrollbarX: $scope.$eval($scope.scrollbarX) !== false,\n          scrollbarY: $scope.$eval($scope.scrollbarY) !== false,\n          scrollingX: $scope.direction.indexOf('x') >= 0,\n          scrollingY: $scope.direction.indexOf('y') >= 0\n        };\n        if (isPaging) {\n          scrollViewOptions.speedMultiplier = 0.8;\n          scrollViewOptions.bouncing = false;\n        }\n\n        scrollCtrl = $controller('$ionicScroll', {\n          $scope: $scope,\n          scrollViewOptions: scrollViewOptions\n        });\n        scrollView = $scope.$parent.scrollView = scrollCtrl.scrollView;\n      }\n    }\n  };\n}]);\n\n})();\n\n(function() {\n'use strict';\n\n/**\n * @description\n * The sideMenuCtrl lets you quickly have a draggable side\n * left and/or right menu, which a center content area.\n */\n\nangular.module('ionic.ui.sideMenu', ['ionic.service.gesture', 'ionic.service.view'])\n\n/**\n * The internal controller for the side menu controller. This\n * extends our core Ionic side menu controller and exposes\n * some side menu stuff on the current scope.\n */\n\n.run(['$ionicViewService', function($ionicViewService) {\n  // set that the side-menus directive should not animate when transitioning to it\n  $ionicViewService.disableRegisterByTagName('ion-side-menus');\n}])\n\n/**\n * @ngdoc service\n * @name $ionicSideMenuDelegate\n * @module ionic\n *\n * @description\n * Delegate for controlling the {@link ionic.directive:ionSideMenus} directive.\n *\n *\n * @usage\n *\n * ```html\n * <body ng-controller=\"MainCtrl\">\n *   <ion-side-menus>\n *     <ion-pane ion-side-menu-content>\n *       Content!\n *       <button ng-click=\"toggleLeftSideMenu()\">\n *         Toggle Left Side Menu\n *       </button>\n *     </ion-pane>\n *     <ion-side-menu side=\"left\">\n *       Left Menu!\n *     <ion-side-menu>\n *   </ion-side-menus>\n * </body>\n * ```\n * ```js\n * function MainCtrl($scope, $ionicSideMenuDelegate) {\n *   $scope.toggleLeftSideMenu = function() {\n *     $ionicSideMenuDelegate.toggleLeft();\n *   };\n * }\n * ```\n */\n.service('$ionicSideMenuDelegate', delegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#toggleLeft\n   * @description Toggle the left side menu (if it exists).\n   * @param {boolean=} isOpen Whether to open or close the menu.\n   * Default: Toggles the menu.\n   */\n  'toggleLeft',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#toggleRight\n   * @description Toggle the right side menu (if it exists).\n   * @param {boolean=} isOpen Whether to open or close the menu.\n   * Default: Toggles the menu.\n   */\n  'toggleRight',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#isOpenLeft\n   * @returns {boolean} Whether the left menu is currently opened.\n   */\n  'isOpenLeft',\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#isOpenRight\n   * @returns {boolean} Whether the right menu is currently opened.\n   */\n  'isOpenRight'\n  /**\n   * @ngdoc method\n   * @name $ionicSideMenuDelegate#forHandle\n   * @param {string} handle\n   * @returns `delegateInstance` A delegate instance that controls only the\n   * sideMenu with delegate-handle matching the given handle.\n   */\n]))\n\n/**\n * @ngdoc directive\n * @name ionSideMenus\n * @module ionic\n * @restrict E\n *\n * @description\n * A container element for side menu(s) and the main content. Allows the left\n * and/or right side menu to be toggled by dragging the main content area side\n * to side.\n *\n * ![Side Menu](http://ionicframework.com.s3.amazonaws.com/docs/controllers/sidemenu.gif)\n *\n * For more information on side menus, check out the documenation for\n * {@link ionic.directive:ionSideMenuContent} and\n * {@link ionic.directive:ionSideMenu}.\n *\n * @usage\n * To use side menus, add an `<ion-side-menus>` parent element,\n * an `<ion-pane ion-side-menu-content>` for the center content,\n * and one or more `<ion-side-menu>` directives.\n *\n * ```html\n * <ion-side-menus>\n *   <!-- Center content -->\n *   <ion-pane ion-side-menu-content ng-controller=\"ContentController\">\n *   </ion-pane>\n *\n *   <!-- Left menu -->\n *   <ion-side-menu side=\"left\">\n *   </ion-side-menu>\n *\n *   <!-- Right menu -->\n *   <ion-side-menu side=\"right\">\n *   </ion-side-menu>\n * </ion-side-menus>\n * ```\n * ```js\n * function ContentController($scope) {\n *   $scope.toggleLeft = function() {\n *     $scope.$$ionicSideMenuDelegateController.toggleLeft();\n *   };\n * }\n * ```\n *\n * @param {string=} controller-bind The scope variable to bind these side menus'\n * {@link ionic.controller:$ionicSideMenuDelegate $ionicSideMenuDelegate controller} to.\n * Default: $scope.$$ionicSideMenuDelegateController.\n *\n */\n.directive('ionSideMenus', function() {\n  return {\n    restrict: 'ECA',\n    controller: ['$scope', '$attrs', '$ionicSideMenuDelegate', function($scope, $attrs, $ionicSideMenuDelegate) {\n      var _this = this;\n\n      angular.extend(this, ionic.controllers.SideMenuController.prototype);\n\n      ionic.controllers.SideMenuController.call(this, {\n        left: { width: 275 },\n        right: { width: 275 }\n      });\n\n      $scope.sideMenuContentTranslateX = 0;\n\n      var deregisterInstance = $ionicSideMenuDelegate._registerInstance(\n        this, $attrs.delegateHandle\n      );\n\n      $scope.$on('$destroy', deregisterInstance);\n    }],\n    replace: true,\n    transclude: true,\n    template: '<div class=\"view\" ng-transclude></div>'\n  };\n})\n\n/**\n * @ngdoc directive\n * @name ionSideMenuContent\n * @module ionic\n * @restrict A\n * @parent ionic.directive:ionSideMenus\n *\n * @description\n * A container for the main visible content, sibling to one or more\n * {@link ionic.directive:ionSideMenu} directives.\n *\n * An attribute directive, recommended to be used as part of an `<ion-pane>` element.\n *\n * @usage\n * ```html\n * <div ion-side-menu-content\n *   drag-content=\"canDragContent()\">\n * </div>\n * ```\n * For a complete side menu example, see the\n * {@link ionic.directive:ionSideMenus} documentation.\n *\n * @param {boolean=} drag-content Whether the content can be dragged.\n *\n */\n.directive('ionSideMenuContent', ['$timeout', '$ionicGesture', function($timeout, $ionicGesture) {\n  return {\n    restrict: 'AC',\n    require: '^ionSideMenus',\n    scope: true,\n    compile: function(element, attr) {\n      return { pre: prelink };\n      function prelink($scope, $element, $attr, sideMenuCtrl) {\n\n        $element.addClass('menu-content');\n\n        if (angular.isDefined(attr.dragContent)) {\n          $scope.$watch(attr.dragContent, function(value) {\n            $scope.dragContent = value;\n          });\n        } else {\n          $scope.dragContent = true;\n        }\n\n        var defaultPrevented = false;\n        var isDragging = false;\n\n        // Listen for taps on the content to close the menu\n        function contentTap(e) {\n          if(sideMenuCtrl.getOpenAmount() !== 0) {\n            sideMenuCtrl.close();\n            e.gesture.srcEvent.preventDefault();\n          }\n        }\n        ionic.on('tap', contentTap, $element[0]);\n\n        var dragFn = function(e) {\n          if($scope.dragContent) {\n            if(defaultPrevented || e.gesture.srcEvent.defaultPrevented) {\n              return;\n            }\n            isDragging = true;\n            sideMenuCtrl._handleDrag(e);\n            e.gesture.srcEvent.preventDefault();\n          }\n        };\n\n        var dragVertFn = function(e) {\n          if(isDragging) {\n            e.gesture.srcEvent.preventDefault();\n          }\n        };\n\n        //var dragGesture = Gesture.on('drag', dragFn, $element);\n        var dragRightGesture = $ionicGesture.on('dragright', dragFn, $element);\n        var dragLeftGesture = $ionicGesture.on('dragleft', dragFn, $element);\n        var dragUpGesture = $ionicGesture.on('dragup', dragVertFn, $element);\n        var dragDownGesture = $ionicGesture.on('dragdown', dragVertFn, $element);\n\n        var dragReleaseFn = function(e) {\n          isDragging = false;\n          if(!defaultPrevented) {\n            sideMenuCtrl._endDrag(e);\n          }\n          defaultPrevented = false;\n        };\n\n        var releaseGesture = $ionicGesture.on('release', dragReleaseFn, $element);\n\n        sideMenuCtrl.setContent({\n          onDrag: function(e) {},\n          endDrag: function(e) {},\n          getTranslateX: function() {\n            return $scope.sideMenuContentTranslateX || 0;\n          },\n          setTranslateX: ionic.animationFrameThrottle(function(amount) {\n            $element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(' + amount + 'px, 0, 0)';\n            $timeout(function() {\n              $scope.sideMenuContentTranslateX = amount;\n            });\n          }),\n          enableAnimation: function() {\n            //this.el.classList.add(this.animateClass);\n            $scope.animationEnabled = true;\n            $element[0].classList.add('menu-animated');\n          },\n          disableAnimation: function() {\n            //this.el.classList.remove(this.animateClass);\n            $scope.animationEnabled = false;\n            $element[0].classList.remove('menu-animated');\n          }\n        });\n\n        // Cleanup\n        $scope.$on('$destroy', function() {\n          $ionicGesture.off(dragLeftGesture, 'dragleft', dragFn);\n          $ionicGesture.off(dragRightGesture, 'dragright', dragFn);\n          $ionicGesture.off(dragUpGesture, 'dragup', dragFn);\n          $ionicGesture.off(dragDownGesture, 'dragdown', dragFn);\n          $ionicGesture.off(releaseGesture, 'release', dragReleaseFn);\n          ionic.off('tap', contentTap, $element[0]);\n        });\n      }\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionSideMenu\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionSideMenus\n *\n * @description\n * A container for a side menu, sibling to an {@link ionic.directive:ionSideMenuContent} directive.\n *\n * @usage\n * ```html\n * <ion-side-menu\n *   side=\"left\"\n *   width=\"myWidthValue + 20\"\n *   is-enabled=\"shouldLeftSideMenuBeEnabled()\">\n * </ion-side-menu>\n * ```\n * For a complete side menu example, see the\n * {@link ionic.directive:ionSideMenus} documentation.\n *\n * @param {string} side Which side the side menu is currently on.  Allowed values: 'left' or 'right'.\n * @param {boolean=} is-enabled Whether this side menu is enabled.\n * @param {number=} width How many pixels wide the side menu should be.  Defaults to 275.\n */\n.directive('ionSideMenu', function() {\n  return {\n    restrict: 'E',\n    require: '^ionSideMenus',\n    scope: true,\n    compile: function(element, attr) {\n      angular.isUndefined(attr.isEnabled) && attr.$set('isEnabled', 'true');\n      angular.isUndefined(attr.width) && attr.$set('width', '275');\n\n      element.addClass('menu menu-' + attr.side);\n\n      return function($scope, $element, $attr, sideMenuCtrl) {\n        $scope.side = $attr.side || 'left';\n\n        var sideMenu = sideMenuCtrl[$scope.side] = new ionic.views.SideMenu({\n          width: 275,\n          el: $element[0],\n          isEnabled: true\n        });\n\n        $scope.$watch($attr.width, function(val) {\n          var numberVal = +val;\n          if (numberVal && numberVal == val) {\n            sideMenu.setWidth(+val);\n          }\n        });\n        $scope.$watch($attr.isEnabled, function(val) {\n          sideMenu.setIsEnabled(!!val);\n        });\n      };\n    }\n  };\n})\n\n/**\n * @ngdoc directive\n * @name menuToggle\n * @module ionic\n * @restrict AC\n *\n * @description\n * Toggle a side menu on the given side\n *\n * @usage\n * Below is an example of a link within a nav bar. Tapping this link would\n * automatically open the given side menu\n *\n * ```html\n * <ion-view>\n *   <ion-nav-buttons side=\"left\">\n *    <button menu-toggle=\"left\" class=\"button button-icon icon ion-navicon\"></button>\n *   </ion-nav-buttons>\n *  ...\n * </ion-view>\n * ```\n */\n.directive('menuToggle', ['$ionicViewService', function($ionicViewService) {\n  return {\n    restrict: 'AC',\n    require: '^ionSideMenus',\n    link: function($scope, $element, $attr, sideMenuCtrl) {\n      var side = $scope.$eval($attr.menuToggle) || 'left';\n      $element.bind('click', function(){\n        if(side === 'left') {\n          sideMenuCtrl.toggleLeft();\n        } else if(side === 'right') {\n          sideMenuCtrl.toggleRight();\n        }\n      });\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name menuClose\n * @module ionic\n * @restrict AC\n *\n * @description\n * Closes a side menu which is currently opened.\n *\n * @usage\n * Below is an example of a link within a side menu. Tapping this link would\n * automatically close the currently opened menu\n *\n * ```html\n * <a nav-clear menu-close href=\"#/home\" class=\"item\">Home</a>\n * ```\n */\n.directive('menuClose', ['$ionicViewService', function($ionicViewService) {\n  return {\n    restrict: 'AC',\n    require: '^ionSideMenus',\n    link: function($scope, $element, $attr, sideMenuCtrl) {\n      $element.bind('click', function(){\n        sideMenuCtrl.close();\n      });\n    }\n  };\n}]);\n\n})();\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.slideBox', [])\n\n/**\n * The internal controller for the slide box controller.\n */\n\n/**\n * @ngdoc directive\n * @name ionSlideBox\n * @module ionic\n * @restrict E\n * @controller ionicSlideBox as $scope.$ionicSlideBoxController\n * @description\n * The Slide Box is a multi-page container where each page can be swiped or dragged between:\n *\n * ![SlideBox](http://ionicframework.com.s3.amazonaws.com/docs/controllers/slideBox.gif)\n *\n * @usage\n * ```html\n * <ion-slide-box>\n *   <ion-slide>\n *     <div class=\"box blue\"><h1>BLUE</h1></div>\n *   </ion-slide>\n *   <ion-slide>\n *     <div class=\"box yellow\"><h1>YELLOW</h1></div>\n *   </ion-slide>\n *   <ion-slide>\n *     <div class=\"box pink\"><h1>PINK</h1></div>\n *   </ion-slide>\n * </ion-slide-box>\n * ```\n *\n * @param {string=} controller-bind The scope variable to bind this slide box's\n * {@link ionic.controller:ionicSlideBox ionicSlideBox controller} to.\n * Default: $scope.$ionicSlideBoxController.\n * @param {boolean=} does-continue Whether the slide box should automatically slide.\n * @param {number=} slide-interval How many milliseconds to wait to change slides (if does-continue is true). Defaults to 4000.\n * @param {boolean=} show-pager Whether a pager should be shown for this slide box.\n * @param {boolean=} disable-scroll Whether to disallow scrolling/dragging of the slide-box content.\n * @param {expression=} on-slide-changed Expression called whenever the slide is changed.\n * @param {expression=} active-slide Model to bind the current slide to.\n */\n.directive('ionSlideBox', ['$timeout', '$compile', function($timeout, $compile) {\n  return {\n    restrict: 'E',\n    replace: true,\n    transclude: true,\n    scope: {\n      doesContinue: '@',\n      slideInterval: '@',\n      showPager: '@',\n      disableScroll: '@',\n      onSlideChanged: '&',\n      activeSlide: '=?'\n    },\n    controller: ['$scope', '$element', '$attrs', '$parse', function($scope, $element, $attrs, $parse) {\n      var _this = this;\n\n      var continuous = $scope.$eval($scope.doesContinue) === true;\n      var slideInterval = continuous ? $scope.$eval($scope.slideInterval) || 4000 : 0;\n\n      var slider = new ionic.views.Slider({\n        el: $element[0],\n        auto: slideInterval,\n        disableScroll: ($scope.$eval($scope.disableScroll) === true) || false,\n        continuous: continuous,\n        startSlide: $scope.activeSlide,\n        slidesChanged: function() {\n          $scope.currentSlide = slider.currentIndex();\n\n          // Try to trigger a digest\n          $timeout(function() {});\n        },\n        callback: function(slideIndex) {\n          $scope.currentSlide = slideIndex;\n          $scope.onSlideChanged({index:$scope.currentSlide});\n          $scope.$parent.$broadcast('slideBox.slideChanged', slideIndex);\n          $scope.activeSlide = slideIndex;\n          // Try to trigger a digest\n          $timeout(function() {});\n        }\n      });\n\n      $scope.$watch('activeSlide', function(nv) {\n        if(angular.isDefined(nv)){\n          slider.slide(nv);\n        }\n      });\n\n      $scope.$on('slideBox.nextSlide', function() {\n        slider.next();\n      });\n\n      $scope.$on('slideBox.prevSlide', function() {\n        slider.prev();\n      });\n\n      $scope.$on('slideBox.setSlide', function(e, index) {\n        slider.slide(index);\n      });\n\n      $parse($attrs.controllerBind || '$ionicSlideBoxController').assign($scope.$parent, slider);\n\n      this.slidesCount = function() {\n        return slider.slidesCount();\n      };\n\n      $timeout(function() {\n        slider.load();\n      });\n    }],\n    template: '<div class=\"slider\">\\\n            <div class=\"slider-slides\" ng-transclude>\\\n            </div>\\\n          </div>',\n\n    link: function($scope, $element, $attr, slideBoxCtrl) {\n      // If the pager should show, append it to the slide box\n      if($scope.$eval($scope.showPager) !== false) {\n        var childScope = $scope.$new();\n        var pager = angular.element('<ion-pager></ion-pager>');\n        $element.append(pager);\n        $compile(pager)(childScope);\n      }\n    }\n  };\n}])\n\n.directive('ionSlide', function() {\n  return {\n    restrict: 'E',\n    require: '^ionSlideBox',\n    compile: function(element, attr) {\n      element.addClass('slider-slide');\n      return function($scope, $element, $attr) {};\n    },\n  };\n})\n\n.directive('ionPager', function() {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '^ionSlideBox',\n    template: '<div class=\"slider-pager\"><span class=\"slider-pager-page\" ng-repeat=\"slide in numSlides() track by $index\" ng-class=\"{active: $index == currentSlide}\"><i class=\"icon ion-record\"></i></span></div>',\n    link: function($scope, $element, $attr, slideBox) {\n      var selectPage = function(index) {\n        var children = $element[0].children;\n        var length = children.length;\n        for(var i = 0; i < length; i++) {\n          if(i == index) {\n            children[i].classList.add('active');\n          } else {\n            children[i].classList.remove('active');\n          }\n        }\n      };\n\n      $scope.numSlides = function() {\n        return new Array(slideBox.slidesCount());\n      };\n\n      $scope.$watch('currentSlide', function(v) {\n        selectPage(v);\n      });\n    }\n  };\n\n});\n\n})();\n\nangular.module('ionic.ui.tabs', ['ionic.service.view'])\n\n.run(['$ionicViewService', function($ionicViewService) {\n  // set that the tabs directive should not animate when transitioning\n  // to it. Instead, the children <tab> directives would animate\n  $ionicViewService.disableRegisterByTagName('ion-tabs');\n}])\n\n/**\n * @ngdoc controller\n * @name ionicTabs\n * @module ionic\n *\n * @description\n * Controller for the {@link ionic.directive:ionTabs} directive.\n */\n.controller('ionicTabs', ['$scope', '$ionicViewService', '$element', function($scope, $ionicViewService, $element) {\n  var _selectedTab = null;\n  var self = this;\n  self.tabs = [];\n\n  /**\n   * @ngdoc method\n   * @name ionicTabs#selectedTabIndex\n   * @returns `number` The index of the selected tab, or -1.\n   */\n  self.selectedTabIndex = function() {\n    return self.tabs.indexOf(_selectedTab);\n  };\n  /**\n   * @ngdoc method\n   * @name ionicTabs#selectedTab\n   * @returns `ionTab` The selected tab or null if none selected.\n   */\n  self.selectedTab = function() {\n    return _selectedTab;\n  };\n\n  self.add = function(tab) {\n    $ionicViewService.registerHistory(tab);\n    self.tabs.push(tab);\n    if(self.tabs.length === 1) {\n      self.select(tab);\n    }\n  };\n\n  self.remove = function(tab) {\n    var tabIndex = self.tabs.indexOf(tab);\n    if (tabIndex === -1) {\n      return;\n    }\n    //Use a field like '$tabSelected' so developers won't accidentally set it in controllers etc\n    if (tab.$tabSelected) {\n      self.deselect(tab);\n      //Try to select a new tab if we're removing a tab\n      if (self.tabs.length === 1) {\n        //do nothing if there are no other tabs to select\n      } else {\n        //Select previous tab if it's the last tab, else select next tab\n        var newTabIndex = tabIndex === self.tabs.length - 1 ? tabIndex - 1 : tabIndex + 1;\n        self.select(self.tabs[newTabIndex]);\n      }\n    }\n    self.tabs.splice(tabIndex, 1);\n  };\n\n  self.deselect = function(tab) {\n    if (tab.$tabSelected) {\n      _selectedTab = null;\n      tab.$tabSelected = false;\n      (tab.onDeselect || angular.noop)();\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name ionicTabs#select\n   * @description Select the given tab or tab index.\n   *\n   * @param {ionTab|number} tabOrIndex A tab object or index of a tab to select\n   * @param {boolean=} shouldChangeHistory Whether this selection should load this tab's view history\n   * (if it exists) and use it, or just loading the default page. Default false.\n   * Hint: you probably want this to be true if you have an\n   * {@link ionic.directive:ionNavView} inside your tab.\n   */\n  self.select = function(tab, shouldEmitEvent) {\n    var tabIndex;\n    if (angular.isNumber(tab)) {\n      tabIndex = tab;\n      tab = self.tabs[tabIndex];\n    } else {\n      tabIndex = self.tabs.indexOf(tab);\n    }\n    if (!tab || tabIndex == -1) {\n      throw new Error('Cannot select tab \"' + tabIndex + '\"!');\n    }\n\n    if (_selectedTab && _selectedTab.$historyId == tab.$historyId) {\n      if (shouldEmitEvent) {\n        $ionicViewService.goToHistoryRoot(tab.$historyId);\n      }\n    } else {\n      angular.forEach(self.tabs, function(tab) {\n        self.deselect(tab);\n      });\n\n      _selectedTab = tab;\n      //Use a funny name like $tabSelected so the developer doesn't overwrite the var in a child scope\n      tab.$tabSelected = true;\n      (tab.onSelect || angular.noop)();\n\n      if (shouldEmitEvent) {\n        var viewData = {\n          type: 'tab',\n          tabIndex: tabIndex,\n          historyId: tab.$historyId,\n          navViewName: tab.navViewName,\n          hasNavView: !!tab.navViewName,\n          title: tab.title,\n          //Skip the first character of href if it's #\n          url: tab.href,\n          uiSref: tab.uiSref\n        };\n        $scope.$emit('viewState.changeHistory', viewData);\n      }\n    }\n  };\n}])\n\n/**\n * @ngdoc directive\n * @name ionTabs\n * @module ionic\n * @restrict E\n * @controller ionicTabs as $scope.$ionicTabsController\n * @codepen KbrzJ\n *\n * @description\n * Powers a multi-tabbed interface with a Tab Bar and a set of \"pages\" that can be tabbed\n * through.\n *\n * Assign any [tabs class](/docs/components#tabs) or\n * [animation class](/docs/components#animation) to the element to define\n * its look and feel.\n *\n * See the {@link ionic.directive:ionTab} directive's documentation for more details on\n * individual tabs.\n *\n * @usage\n * ```html\n * <ion-tabs class=\"tabs-positive tabs-icon-only\">\n *\n *   <ion-tab title=\"Home\" icon-on=\"ion-ios7-filing\" icon-off=\"ion-ios7-filing-outline\">\n *     <!-- Tab 1 content -->\n *   </ion-tab>\n *\n *   <ion-tab title=\"About\" icon-on=\"ion-ios7-clock\" icon-off=\"ion-ios7-clock-outline\">\n *     <!-- Tab 2 content -->\n *   </ion-tab>\n *\n *   <ion-tab title=\"Settings\" icon-on=\"ion-ios7-gear\" icon-off=\"ion-ios7-gear-outline\">\n *     <!-- Tab 3 content -->\n *   </ion-tab>\n * </ion-tabs>\n * ```\n *\n * @param {string=} controller-bind The scope variable to bind these tabs'\n * {@link ionic.controller:ionicTabs ionicTabs controller} to.\n * Default: $scope.$ionicTabsController.\n */\n\n.directive('ionTabs', ['$ionicViewService', '$parse', function($ionicViewService, $parse) {\n  return {\n    restrict: 'E',\n    scope: true,\n    controller: 'ionicTabs',\n    compile: function(element, attr) {\n      element.addClass('view');\n      //We cannot transclude here because it breaks element.data() inheritance on compile\n      var innerElement = angular.element('<div class=\"tabs\"></div>');\n      innerElement.append(element.contents());\n      element.append(innerElement);\n\n      return { pre: prelink };\n      function prelink($scope, $element, $attr, tabsCtrl) {\n        $parse(attr.model || '$ionicTabsController').assign($scope, tabsCtrl);\n\n        tabsCtrl.$scope = $scope;\n        tabsCtrl.$element = $element;\n        tabsCtrl.$tabsElement = angular.element($element[0].querySelector('.tabs'));\n\n        var el = $element[0];\n        $scope.$watch(function() { return el.className; }, function(value) {\n          var isTabsTop = value.indexOf('tabs-top') !== -1;\n          var isHidden = value.indexOf('tabs-item-hide') !== -1;\n          $scope.$hasTabs = !isTabsTop && !isHidden;\n          $scope.$hasTabsTop = isTabsTop && !isHidden;\n        });\n        $scope.$on('$destroy', function() {\n          $scope.$hasTabs = $scope.$hasTabsTop = null;\n        });\n      }\n    }\n  };\n}])\n\n.controller('ionicTab', ['$scope', '$ionicViewService', '$rootScope', '$element',\nfunction($scope, $ionicViewService, $rootScope, $element) {\n  this.$scope = $scope;\n}])\n\n/**\n * @ngdoc directive\n * @name ionTab\n * @module ionic\n * @restrict E\n * @parent ionic.directive:ionTabs\n *\n * @description\n * Contains a tab's content.  The content only exists while the given tab is selected.\n *\n * Each ionTab has its own view history.\n *\n * @usage\n * ```html\n * <ion-tab\n *   title=\"Tab!\"\n *   icon=\"my-icon\"\n *   href=\"#/tab/tab-link\"\n *   on-select=\"onTabSelected()\"\n *   on-deselect=\"onTabDeselected()\">\n * </ion-tab>\n * ```\n * For a complete, working tab bar example, see the {@link ionic.directive:ionTabs} documentation.\n *\n * @param {string} title The title of the tab.\n * @param {string=} href The link that this tab will navigate to when tapped.\n * @param {string=} icon The icon of the tab. If given, this will become the default for icon-on and icon-off.\n * @param {string=} icon-on The icon of the tab while it is selected.\n * @param {string=} icon-off The icon of the tab while it is not selected.\n * @param {expression=} badge The badge to put on this tab (usually a number).\n * @param {expression=} badge-style The style of badge to put on this tab (eg tabs-positive).\n * @param {expression=} on-select Called when this tab is selected.\n * @param {expression=} on-deselect Called when this tab is deselected.\n * @param {expression=} ng-click By default, the tab will be selected on click. If ngClick is set, it will not.  You can explicitly switch tabs using {@link ionic.controller:ionicTabs#select ionicTabBar controller's select method}.\n */\n.directive('ionTab', ['$rootScope', '$animate', '$ionicBind', '$compile', '$ionicViewService',\nfunction($rootScope, $animate, $ionicBind, $compile, $ionicViewService) {\n\n  //Returns ' key=\"value\"' if value exists\n  function attrStr(k,v) {\n    return angular.isDefined(v) ? ' ' + k + '=\"' + v + '\"' : '';\n  }\n  return {\n    restrict: 'E',\n    require: ['^ionTabs', 'ionTab'],\n    replace: true,\n    controller: 'ionicTab',\n    scope: true,\n    compile: function(element, attr) {\n      //Do we have a navView?\n      var navView = element[0].querySelector('ion-nav-view') ||\n        element[0].querySelector('data-ion-nav-view');\n      var navViewName = navView && navView.getAttribute('name');\n\n      var tabNavItem = angular.element(\n        element[0].querySelector('ion-tab-nav') ||\n        element[0].querySelector('data-ion-tab-nav')\n      ).remove();\n\n      //Remove the contents of the element so we can compile them later, if tab is selected\n      var tabContent = angular.element('<div class=\"pane\">')\n        .append( element.contents().remove() );\n      return function link($scope, $element, $attr, ctrls) {\n        var childScope, childElement, tabNavElement;\n          tabsCtrl = ctrls[0],\n          tabCtrl = ctrls[1];\n\n        //Remove title attribute so browser-tooltip does not apear\n        $element[0].removeAttribute('title');\n\n        $ionicBind($scope, $attr, {\n          animate: '=',\n          onSelect: '&',\n          onDeselect: '&',\n          title: '@',\n          uiSref: '@',\n          href: '@',\n        });\n\n        tabsCtrl.add($scope);\n        $scope.$on('$destroy', function() {\n          tabsCtrl.remove($scope);\n          tabNavElement.isolateScope().$destroy();\n          tabNavElement.remove();\n        });\n\n        if (navViewName) {\n          $scope.navViewName = navViewName;\n          $scope.$on('$stateChangeSuccess', selectTabIfMatchesState);\n          selectTabIfMatchesState();\n        }\n\n        tabNavElement = angular.element(\n          '<ion-tab-nav' +\n          attrStr('ng-click', attr.ngClick) +\n          attrStr('title', attr.title) +\n          attrStr('icon', attr.icon) +\n          attrStr('icon-on', attr.iconOn) +\n          attrStr('icon-off', attr.iconOff) +\n          attrStr('badge', attr.badge) +\n          attrStr('badge-style', attr.badgeStyle) +\n          '></ion-tab-nav>'\n        );\n        tabNavElement.data('$ionTabsController', tabsCtrl);\n        tabNavElement.data('$ionTabController', tabCtrl);\n        tabsCtrl.$tabsElement.append($compile(tabNavElement)($scope));\n\n        $scope.$watch('$tabSelected', function(value) {\n          childScope && childScope.$destroy();\n          childScope = null;\n          childElement && $animate.leave(childElement);\n          childElement = null;\n          if (value) {\n            childScope = $scope.$new();\n            childElement = tabContent.clone();\n            $animate.enter(childElement, tabsCtrl.$element);\n            $compile(childElement)(childScope);\n          }\n        });\n\n        function selectTabIfMatchesState() {\n          // this tab's ui-view is the current one, go to it!\n          if ($ionicViewService.isCurrentStateNavView($scope.navViewName)) {\n            tabsCtrl.select($scope);\n          }\n        }\n      };\n    }\n  };\n}])\n\n.directive('ionTabNav', ['$ionicNgClick', function($ionicNgClick) {\n  return {\n    restrict: 'E',\n    replace: true,\n    require: ['^ionTabs', '^ionTab'],\n    template:\n    '<a ng-class=\"{\\'tab-item-active\\': isTabActive(), \\'has-badge\\':badge}\" ' +\n      ' class=\"tab-item\">' +\n      '<span class=\"badge {{badgeStyle}}\" ng-if=\"badge\">{{badge}}</span>' +\n      '<i class=\"icon {{getIconOn()}}\" ng-if=\"getIconOn() && isTabActive()\"></i>' +\n      '<i class=\"icon {{getIconOff()}}\" ng-if=\"getIconOff() && !isTabActive()\"></i>' +\n      '<span class=\"tab-title\" ng-bind-html=\"title\"></span>' +\n    '</a>',\n    scope: {\n      title: '@',\n      icon: '@',\n      iconOn: '@',\n      iconOff: '@',\n      badge: '=',\n      badgeStyle: '@'\n    },\n    compile: function(element, attr, transclude) {\n      return function link($scope, $element, $attrs, ctrls) {\n        var tabsCtrl = ctrls[0],\n          tabCtrl = ctrls[1];\n\n        //Remove title attribute so browser-tooltip does not apear\n        $element[0].removeAttribute('title');\n\n        $scope.selectTab = function(e) {\n          e.preventDefault();\n          tabsCtrl.select(tabCtrl.$scope, true);\n        };\n        if (!$attrs.ngClick) {\n          $ionicNgClick($scope, $element, 'selectTab($event)');\n        }\n\n        $scope.getIconOn = function() {\n          return $scope.iconOn || $scope.icon;\n        };\n        $scope.getIconOff = function() {\n          return $scope.iconOff || $scope.icon;\n        };\n\n        $scope.isTabActive = function() {\n          return tabsCtrl.selectedTab() === tabCtrl.$scope;\n        };\n      };\n    }\n  };\n}]);\n\n(function(ionic) {\n'use strict';\n\nangular.module('ionic.ui.toggle', [])\n\n/**\n * @ngdoc directive\n * @name ionToggle\n * @module ionic\n * @restrict E\n *\n * @description\n * An animated switch which binds a given model to a boolean.\n *\n * Allows dragging of the switch's nub.\n *\n * Behaves like any [AngularJS checkbox](http://docs.angularjs.org/api/ng/input/input[checkbox]) otherwise.\n *\n */\n.directive('ionToggle', ['$ionicGesture', '$timeout', function($ionicGesture, $timeout) {\n\n  return {\n    restrict: 'E',\n    replace: true,\n    require: '?ngModel',\n    scope: {\n      ngModel: '=?',\n      ngValue: '=?',\n      ngChecked: '=?',\n      ngChange: '&',\n      ngDisabled: '=?'\n    },\n    transclude: true,\n    template: '<div class=\"item item-toggle disable-pointer-events\">' +\n                '<div ng-transclude></div>' +\n                '<label class=\"toggle enable-pointer-events\">' +\n                  '<input type=\"checkbox\" ng-model=\"ngModel\" ng-value=\"ngValue\" ng-change=\"ngChange()\" ng-disabled=\"ngDisabled\">' +\n                  '<div class=\"track disable-pointer-events\">' +\n                    '<div class=\"handle\"></div>' +\n                  '</div>' +\n                '</label>' +\n              '</div>',\n\n    compile: function(element, attr) {\n      var input = element.find('input');\n      if(attr.name) input.attr('name', attr.name);\n      if(attr.ngChecked) input.attr('ng-checked', 'ngChecked');\n      if(attr.ngTrueValue) input.attr('ng-true-value', attr.ngTrueValue);\n      if(attr.ngFalseValue) input.attr('ng-false-value', attr.ngFalseValue);\n\n      return function($scope, $element, $attr) {\n         var el, checkbox, track, handle;\n\n         el = $element[0].getElementsByTagName('label')[0];\n         checkbox = el.children[0];\n         track = el.children[1];\n         handle = track.children[0];\n         \n         var ngModelController = angular.element(checkbox).controller('ngModel');\n\n         $scope.toggle = new ionic.views.Toggle({\n           el: el,\n           track: track,\n           checkbox: checkbox,\n           handle: handle,\n           onChange: function() {\n             if(checkbox.checked) {\n               ngModelController.$setViewValue(true);\n             } else {\n               ngModelController.$setViewValue(false);\n             }\n             $scope.$apply();\n           }\n         });\n\n         $scope.$on('$destroy', function() {\n           $scope.toggle.destroy();\n         });\n      };\n    }\n\n  };\n}]);\n\n})(window.ionic);\n\n\n// Similar to Angular's ngTouch, however it uses Ionic's tap detection\n// and click simulation. ngClick\n\n(function(angular, ionic) {'use strict';\n\nangular.module('ionic.ui.touch', [])\n\n  .config(['$provide', function($provide) {\n    $provide.decorator('ngClickDirective', ['$delegate', function($delegate) {\n      // drop the default ngClick directive\n      $delegate.shift();\n      return $delegate;\n    }]);\n  }])\n\n  /**\n   * @private\n   */\n  .factory('$ionicNgClick', ['$parse', function($parse) {\n    function onTap(e) {\n      // wire this up to Ionic's tap/click simulation\n      ionic.tapElement(e.target, e);\n    }\n    return function(scope, element, clickExpr) {\n      var clickHandler = $parse(clickExpr);\n\n      element.on('click', function(event) {\n        scope.$apply(function() {\n          clickHandler(scope, {$event: (event)});\n        });\n      });\n\n      ionic.on(\"release\", onTap, element[0]);\n\n      // Hack for iOS Safari's benefit. It goes searching for onclick handlers and is liable to click\n      // something else nearby.\n      element.onclick = function(event) { };\n\n      scope.$on('$destroy', function () {\n        ionic.off(\"release\", onTap, element[0]);\n      });\n    };\n  }])\n\n  .directive('ngClick', ['$ionicNgClick', function($ionicNgClick) {\n    return function(scope, element, attr) {\n      $ionicNgClick(scope, element, attr.ngClick);\n    };\n  }])\n\n  .directive('ionStopEvent', function () {\n    function stopEvent(e) {\n      e.stopPropagation();\n    }\n    return {\n      restrict: 'A',\n      link: function (scope, element, attr) {\n        element.bind(attr.ionStopEvent, stopEvent);\n      }\n    };\n  });\n\n\n})(window.angular, window.ionic);\n\n(function() {\n'use strict';\n\nangular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gesture', 'ngSanitize'])\n\n/**\n * @ngdoc directive\n * @name ionView\n * @module ionic\n * @restrict E\n * @parent ionNavView\n *\n * @description\n * A container for content, used to tell a parent {@link ionic.directive:ionNavBar}\n * about the current view.\n *\n * @usage\n * Below is an example where our page will load with a navbar containing \"My Page\" as the title.\n *\n * ```html\n * <ion-nav-bar></ion-nav-bar>\n * <ion-nav-view class=\"slide-left-right\">\n *   <ion-view title=\"My Page\">\n *     <ion-content>\n *       Hello!\n *     </ion-content>\n *   </ion-view>\n * </ion-nav-view>\n * ```\n *\n * @param {string=} title The title to display on the parent {@link ionic.directive:ionNavBar}.\n * @param {boolean=} hideBackButton Whether to hide the back button on the parent\n * {@link ionic.directive:ionNavBar} by default.\n * @param {boolean=} hideNavBar Whether to hide the parent\n * {@link ionic.directive:ionNavBar} by default.\n */\n.directive('ionView', ['$ionicViewService', '$rootScope', '$animate',\n           function( $ionicViewService,   $rootScope,   $animate) {\n  return {\n    restrict: 'EA',\n    priority: 1000,\n    require: '^?ionNavBar',\n    compile: function(tElement, tAttrs, transclude) {\n      tElement.addClass('pane');\n      tElement[0].removeAttribute('title');\n\n      return function link($scope, $element, $attr, navBarCtrl) {\n        if (!navBarCtrl) {\n          return;\n        }\n        navBarCtrl.changeTitle($attr.title, $scope.$navDirection);\n\n        $scope.$watch($attr.hideBackButton, function(value) {\n          // Should we hide a back button when this tab is shown\n          navBarCtrl.showBackButton(!value);\n        });\n\n        $scope.$watch($attr.hideNavBar, function(value) {\n          // Should the nav bar be hidden for this view or not?\n          navBarCtrl.showBar(!value);\n        });\n\n        // watch for changes in the title\n        $attr.$observe('title', function(val, oldVal) {\n          if (val) {\n            navBarCtrl.setTitle(val);\n          }\n        });\n      };\n    }\n  };\n}])\n\n\n/**\n * @ngdoc directive\n * @name ionNavView\n * @module ionic\n * @restrict E\n * @codepen HjnFx\n *\n * @description\n * As a user navigates throughout your app, Ionic is able to keep track of their\n * navigation history. By knowing their history, transitions between views\n * correctly slide either left or right, or no transition at all. An additional\n * benefit to Ionic's navigation system is its ability to manage multiple\n * histories.\n *\n * Ionic uses the AngularUI Router module so app interfaces can be organized\n * into various \"states\". Like Angular's core $route service, URLs can be used\n * to control the views. However, the AngularUI Router provides a more powerful\n * state manager in that states are bound to named, nested, and parallel views,\n * allowing more than one template to be rendered on the same page.\n * Additionally, each state is not required to be bound to a URL, and data can\n * be pushed to each state which allows much flexibility.\n *\n * The ionNavView directive is used to render templates in your application. Each template\n * is part of a state. States are usually mapped to a url, and are defined programatically\n * using angular-ui-router (see [their docs](https://github.com/angular-ui/ui-router/wiki)),\n * and remember to replace ui-view with ion-nav-view in examples).\n *\n * @usage\n * In this example, we will create a navigation view that contains our different states for the app.\n *\n * To do this, in our markup use the ionNavView top level directive, adding an\n * {@link ionic.directive:ionNavBar} directive which will render a header bar that updates as we\n * navigate through the navigation stack.\n *\n * You can any [animation class](/docs/components#animation) on the navView to have its pages slide.\n * Recommended for page transitions: 'slide-left-right', 'slide-left-right-ios7', 'slide-in-up'.\n *\n * ```html\n * <ion-nav-view class=\"slide-left-right\">\n *   <!-- Center content -->\n *   <ion-nav-bar>\n *   </ion-nav-bar>\n * </ion-nav-view>\n * ```\n *\n * Next, we need to setup our states that will be rendered.\n *\n * ```js\n * var app = angular.module('myApp', ['ionic']);\n * app.config(function($stateProvider) {\n *   $stateProvider\n *   .state('index', {\n *     url: '/',\n *     templateUrl: 'home.html'\n *   })\n *   .state('music', {\n *     url: '/music',\n *     templateUrl: 'music.html'\n *   });\n * });\n * ```\n * Then on app start, $stateProvider will look at the url, see it matches the index state,\n * and then try to load home.html into the `<ion-nav-view>`.\n *\n * Pages are loaded by the URLs given. One simple way to create templates in Angular is to put\n * them directly into your HTML file and use the `<script type=\"text/ng-template\">` syntax.\n * So here is one way to put home.html into our app:\n *\n * ```html\n * <script id=\"home\" type=\"text/ng-template\">\n *   <!-- The title of the ion-view will be shown on the navbar -->\n *   <ion-view title=\"'Home'\">\n *     <ion-content ng-controller=\"HomeCtrl\">\n *       <!-- The content of the page -->\n *       <a href=\"#/music\">Go to music page!</a>\n *     </ion-content>\n *   </ion-view>\n * </script>\n * ```\n *\n * This is good to do because the template will be cached for very fast loading, instead of\n * having to fetch them from the network.\n *\n * Please visit [AngularUI Router's docs](https://github.com/angular-ui/ui-router/wiki) for\n * more info. Below is a great video by the AngularUI Router guys that may help to explain\n * how it all works:\n *\n * <iframe width=\"560\" height=\"315\" src=\"//www.youtube.com/embed/dqJRoh8MnBo\"\n * frameborder=\"0\" allowfullscreen></iframe>\n *\n * @param {string=} name A view name. The name should be unique amongst the other views in the\n * same state. You can have views of the same name that live in different states. For more\n * information, see ui-router's [ui-view documentation](http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.directive:ui-view).\n */\n.directive('ionNavView', ['$ionicViewService', '$state', '$compile', '$controller', '$animate',\n              function( $ionicViewService,   $state,   $compile,   $controller,   $animate) {\n  // IONIC's fork of Angular UI Router, v0.2.7\n  // the navView handles registering views in the history, which animation to use, and which\n  var viewIsUpdating = false;\n\n  var directive = {\n    restrict: 'E',\n    terminal: true,\n    priority: 2000,\n    transclude: true,\n    controller: [function(){\n    }],\n    compile: function (element, attr, transclude) {\n      return function(scope, element, attr, navViewCtrl) {\n        var viewScope, viewLocals,\n            name = attr[directive.name] || attr.name || '',\n            onloadExp = attr.onload || '',\n            initialView = transclude(scope);\n\n        // Put back the compiled initial view\n        element.append(initialView);\n\n        // Find the details of the parent view directive (if any) and use it\n        // to derive our own qualified view name, then hang our own details\n        // off the DOM so child directives can find it.\n        var parent = element.parent().inheritedData('$uiView');\n        if (name.indexOf('@') < 0) name  = name + '@' + (parent ? parent.state.name : '');\n        var view = { name: name, state: null };\n        element.data('$uiView', view);\n\n        var eventHook = function() {\n          if (viewIsUpdating) return;\n          viewIsUpdating = true;\n\n          try { updateView(true); } catch (e) {\n            viewIsUpdating = false;\n            throw e;\n          }\n          viewIsUpdating = false;\n        };\n\n        scope.$on('$stateChangeSuccess', eventHook);\n        scope.$on('$viewContentLoading', eventHook);\n        updateView(false);\n\n        function updateView(doAnimate) {\n          //===false because $animate.enabled() is a noop without angular-animate included\n          if ($animate.enabled() === false) {\n            doAnimate = false;\n          }\n\n          var locals = $state.$current && $state.$current.locals[name];\n          if (locals === viewLocals) return; // nothing to do\n          var renderer = $ionicViewService.getRenderer(element, attr, scope);\n\n          // Destroy previous view scope\n          if (viewScope) {\n            viewScope.$destroy();\n            viewScope = null;\n          }\n\n          if (!locals) {\n            viewLocals = null;\n            view.state = null;\n\n            // Restore the initial view\n            return element.append(initialView);\n          }\n\n          var newElement = angular.element('<div></div>').html(locals.$template).contents();\n          var viewRegisterData = renderer().register(newElement);\n\n          // Remove existing content\n          renderer(doAnimate).leave();\n\n          viewLocals = locals;\n          view.state = locals.$$state;\n\n          renderer(doAnimate).enter(newElement);\n\n          var link = $compile(newElement);\n          viewScope = scope.$new();\n\n          viewScope.$navDirection = viewRegisterData.navDirection;\n\n          if (locals.$$controller) {\n            locals.$scope = viewScope;\n            var controller = $controller(locals.$$controller, locals);\n            element.children().data('$ngControllerController', controller);\n          }\n          link(viewScope);\n\n          var viewHistoryData = $ionicViewService._getViewById(viewRegisterData.viewId) || {};\n          viewScope.$broadcast('$viewContentLoaded', viewHistoryData);\n\n          if (onloadExp) viewScope.$eval(onloadExp);\n\n          newElement = null;\n        }\n      };\n    }\n  };\n  return directive;\n}])\n\n\n/**\n * @ngdoc directive\n * @name navClear\n * @module ionic\n * @restrict AC\n *\n * @description\n * Disables any transition animations between views, along with removing the back\n * button which would normally show on the next view. This directive is useful for\n * links within a sideMenu.\n *\n * @usage\n * Below is an example of a link within a side menu. Tapping this link would disable\n * any animations which would normally occur between views.\n *\n * ```html\n * <a nav-clear menu-close href=\"#/home\" class=\"item\">Home</a>\n * ```\n */\n.directive('navClear', ['$ionicViewService', function($ionicViewService) {\n  return {\n    restrict: 'AC',\n    link: function($scope, $element, $attr) {\n      $element.bind('click', function(){\n        $ionicViewService.nextViewOptions({\n          disableAnimate: true,\n          disableBack: true\n        });\n      });\n    }\n  };\n}]);\n\n})();\n\n/*\n(function() {\n'use strict';\n\nangular.module('ionic.ui.virtRepeat', [])\n\n.directive('ionVirtRepeat', function() {\n  return {\n    require: ['?ngModel', '^virtualList'],\n    transclude: 'element',\n    priority: 1000,\n    terminal: true,\n    compile: function(element, attr, transclude) {\n      return function($scope, $element, $attr, ctrls) {\n        var virtualList = ctrls[1];\n\n        virtualList.listView.renderViewport = function(high, low, start, end) {\n        };\n      };\n    }\n  };\n});\n})(ionic);\n*/\n\n/*\n(function() {\n'use strict';\n\n// Turn the expression supplied to the directive:\n//\n//     a in b\n//\n// into `{ value: \"a\", collection: \"b\" }`\nfunction parseRepeatExpression(expression){\n  var match = expression.match(/^\\s*([\\$\\w]+)\\s+in\\s+(\\S*)\\s*$/);\n  if (! match) {\n    throw new Error(\"Expected sfVirtualRepeat in form of '_item_ in _collection_' but got '\" +\n                    expression + \"'.\");\n  }\n  return {\n    value: match[1],\n    collection: match[2]\n  };\n}\n\n// Utility to filter out elements by tag name\nfunction isTagNameInList(element, list){\n  var t, tag = element.tagName.toUpperCase();\n  for( t = 0; t < list.length; t++ ){\n    if( list[t] === tag ){\n      return true;\n    }\n  }\n  return false;\n}\n\n\n// Utility to find the viewport/content elements given the start element:\nfunction findViewportAndContent(startElement){\n  var root = $rootElement[0];\n  var e, n;\n  // Somewhere between the grandparent and the root node\n  for( e = startElement.parent().parent()[0]; e !== root; e = e.parentNode ){\n    // is an element\n    if( e.nodeType != 1 ) break;\n    // that isn't in the blacklist (tables etc.),\n    if( isTagNameInList(e, DONT_WORK_AS_VIEWPORTS) ) continue;\n    // has a single child element (the content),\n    if( e.childElementCount != 1 ) continue;\n    // which is not in the blacklist\n    if( isTagNameInList(e.firstElementChild, DONT_WORK_AS_CONTENT) ) continue;\n    // and no text.\n    for( n = e.firstChild; n; n = n.nextSibling ){\n      if( n.nodeType == 3 && /\\S/g.test(n.textContent) ){\n        break;\n      }\n    }\n    if( n === null ){\n      // That element should work as a viewport.\n      return {\n        viewport: angular.element(e),\n        content: angular.element(e.firstElementChild)\n      };\n    }\n  }\n  throw new Error(\"No suitable viewport element\");\n}\n\n// Apply explicit height and overflow styles to the viewport element.\n//\n// If the viewport has a max-height (inherited or otherwise), set max-height.\n// Otherwise, set height from the current computed value or use\n// window.innerHeight as a fallback\n//\nfunction setViewportCss(viewport){\n  var viewportCss = {'overflow': 'auto'},\n      style = window.getComputedStyle ?\n        window.getComputedStyle(viewport[0]) :\n        viewport[0].currentStyle,\n      maxHeight = style && style.getPropertyValue('max-height'),\n      height = style && style.getPropertyValue('height');\n\n  if( maxHeight && maxHeight !== '0px' ){\n    viewportCss.maxHeight = maxHeight;\n  }else if( height && height !== '0px' ){\n    viewportCss.height = height;\n  }else{\n    viewportCss.height = window.innerHeight;\n  }\n  viewport.css(viewportCss);\n}\n\n// Apply explicit styles to the content element to prevent pesky padding\n// or borders messing with our calculations:\nfunction setContentCss(content){\n  var contentCss = {\n    margin: 0,\n    padding: 0,\n    border: 0,\n    'box-sizing': 'border-box'\n  };\n  content.css(contentCss);\n}\n\n// TODO: compute outerHeight (padding + border unless box-sizing is border)\nfunction computeRowHeight(element){\n  var style = window.getComputedStyle ? window.getComputedStyle(element)\n                                      : element.currentStyle,\n      maxHeight = style && style.getPropertyValue('max-height'),\n      height = style && style.getPropertyValue('height');\n\n  if( height && height !== '0px' && height !== 'auto' ){\n    $log.info('Row height is \"%s\" from css height', height);\n  }else if( maxHeight && maxHeight !== '0px' && maxHeight !== 'none' ){\n    height = maxHeight;\n    $log.info('Row height is \"%s\" from css max-height', height);\n  }else if( element.clientHeight ){\n    height = element.clientHeight+'px';\n    $log.info('Row height is \"%s\" from client height', height);\n  }else{\n    throw new Error(\"Unable to compute height of row\");\n  }\n  angular.element(element).css('height', height);\n  return parseInt(height, 10);\n}\n\nangular.module('ionic.ui.virtualRepeat', [])\n\n//\n// A replacement for ng-repeat that supports virtual lists.\n// This is not a 1 to 1 replacement for ng-repeat. However, in situations\n// where you have huge lists, this repeater will work with our virtual\n// scrolling to only render items that are showing or will be showing\n// if a scroll is made.\n//\n.directive('ionVirtualRepeat', ['$log', function($log) {\n    return {\n      require: ['?ngModel, ^virtualList'],\n      transclude: 'element',\n      priority: 1000,\n      terminal: true,\n      compile: function(element, attr, transclude) {\n        var ident = parseRepeatExpression(attr.sfVirtualRepeat);\n\n        return function(scope, iterStartElement, attrs, ctrls, b) {\n          var virtualList = ctrls[1];\n\n          var rendered = [];\n          var rowHeight = 0;\n          var sticky = false;\n\n          var dom = virtualList.element;\n          //var dom = findViewportAndContent(iterStartElement);\n\n          // The list structure is controlled by a few simple (visible) variables:\n          var state = 'ngModel' in attrs ? scope.$eval(attrs.ngModel) : {};\n\n          function makeNewScope (idx, collection, containerScope) {\n            var childScope = containerScope.$new();\n            childScope[ident.value] = collection[idx];\n            childScope.$index = idx;\n            childScope.$first = (idx === 0);\n            childScope.$last = (idx === (collection.length - 1));\n            childScope.$middle = !(childScope.$first || childScope.$last);\n            childScope.$watch(function updateChildScopeItem(){\n              childScope[ident.value] = collection[idx];\n            });\n            return childScope;\n          }\n\n          // Given the collection and a start and end point, add the current\n          function addElements (start, end, collection, containerScope, insPoint) {\n            var frag = document.createDocumentFragment();\n            var newElements = [], element, idx, childScope;\n            for( idx = start; idx !== end; idx ++ ){\n              childScope = makeNewScope(idx, collection, containerScope);\n              element = linker(childScope, angular.noop);\n              //setElementCss(element);\n              newElements.push(element);\n              frag.appendChild(element[0]);\n            }\n            insPoint.after(frag);\n            return newElements;\n          }\n\n          function recomputeActive() {\n            // We want to set the start to the low water mark unless the current\n            // start is already between the low and high water marks.\n            var start = clip(state.firstActive, state.firstVisible - state.lowWater, state.firstVisible - state.highWater);\n            // Similarly for the end\n            var end = clip(state.firstActive + state.active,\n                           state.firstVisible + state.visible + state.lowWater,\n                           state.firstVisible + state.visible + state.highWater );\n            state.firstActive = Math.max(0, start);\n            state.active = Math.min(end, state.total) - state.firstActive;\n          }\n\n          function sfVirtualRepeatOnScroll(evt){\n            if( !rowHeight ){\n              return;\n            }\n            // Enter the angular world for the state change to take effect.\n            scope.$apply(function(){\n              state.firstVisible = Math.floor(evt.target.scrollTop / rowHeight);\n              state.visible = Math.ceil(dom.viewport[0].clientHeight / rowHeight);\n              $log.log('scroll to row %o', state.firstVisible);\n              sticky = evt.target.scrollTop + evt.target.clientHeight >= evt.target.scrollHeight;\n              recomputeActive();\n              $log.log(' state is now %o', state);\n              $log.log(' sticky = %o', sticky);\n            });\n          }\n\n          function sfVirtualRepeatWatchExpression(scope){\n            var coll = scope.$eval(ident.collection);\n            if( coll.length !== state.total ){\n              state.total = coll.length;\n              recomputeActive();\n            }\n            return {\n              start: state.firstActive,\n              active: state.active,\n              len: coll.length\n            };\n          }\n\n          function destroyActiveElements (action, count) {\n            var dead, ii, remover = Array.prototype[action];\n            for( ii = 0; ii < count; ii++ ){\n              dead = remover.call(rendered);\n              dead.scope().$destroy();\n              dead.remove();\n            }\n          }\n\n          // When the watch expression for the repeat changes, we may need to add\n          // and remove scopes and elements\n          function sfVirtualRepeatListener(newValue, oldValue, scope){\n            var oldEnd = oldValue.start + oldValue.active,\n                collection = scope.$eval(ident.collection),\n                newElements;\n            if(newValue === oldValue) {\n              $log.info('initial listen');\n              newElements = addElements(newValue.start, oldEnd, collection, scope, iterStartElement);\n              rendered = newElements;\n              if(rendered.length) {\n                rowHeight = computeRowHeight(newElements[0][0]);\n              }\n            } else {\n              var newEnd = newValue.start + newValue.active;\n              var forward = newValue.start >= oldValue.start;\n              var delta = forward ? newValue.start - oldValue.start\n                                  : oldValue.start - newValue.start;\n              var endDelta = newEnd >= oldEnd ? newEnd - oldEnd : oldEnd - newEnd;\n              var contiguous = delta < (forward ? oldValue.active : newValue.active);\n              $log.info('change by %o,%o rows %s', delta, endDelta, forward ? 'forward' : 'backward');\n              if(!contiguous) {\n                $log.info('non-contiguous change');\n                destroyActiveElements('pop', rendered.length);\n                rendered = addElements(newValue.start, newEnd, collection, scope, iterStartElement);\n              } else {\n                if(forward) {\n                  $log.info('need to remove from the top');\n                  destroyActiveElements('shift', delta);\n                } else if(delta) {\n                  $log.info('need to add at the top');\n                  newElements = addElements(\n                    newValue.start,\n                    oldValue.start,\n                    collection, scope, iterStartElement);\n                  rendered = newElements.concat(rendered);\n                }\n\n                if(newEnd < oldEnd) {\n                  $log.info('need to remove from the bottom');\n                  destroyActiveElements('pop', oldEnd - newEnd);\n                } else if(endDelta) {\n                  var lastElement = rendered[rendered.length-1];\n                  $log.info('need to add to the bottom');\n                  newElements = addElements(\n                    oldEnd,\n                    newEnd,\n                    collection, scope, lastElement);\n                  rendered = rendered.concat(newElements);\n                }\n              }\n              if(!rowHeight && rendered.length) {\n                rowHeight = computeRowHeight(rendered[0][0]);\n              }\n              dom.content.css({'padding-top': newValue.start * rowHeight + 'px'});\n            }\n            dom.content.css({'height': newValue.len * rowHeight + 'px'});\n            if(sticky) {\n              dom.viewport[0].scrollTop = dom.viewport[0].clientHeight + dom.viewport[0].scrollHeight;\n            }\n          }\n\n          //  - The index of the first active element\n          state.firstActive = 0;\n          //  - The index of the first visible element\n          state.firstVisible = 0;\n          //  - The number of elements visible in the viewport.\n          state.visible = 0;\n          // - The number of active elements\n          state.active = 0;\n          // - The total number of elements\n          state.total = 0;\n          // - The point at which we add new elements\n          state.lowWater = state.lowWater || 100;\n          // - The point at which we remove old elements\n          state.highWater = state.highWater || 300;\n          // TODO: now watch the water marks\n\n          setContentCss(dom.content);\n          setViewportCss(dom.viewport);\n          // When the user scrolls, we move the `state.firstActive`\n          dom.bind('momentumScrolled', sfVirtualRepeatOnScroll);\n\n          scope.$on('$destroy', function () {\n            dom.unbind('momentumScrolled', sfVirtualRepeatOnScroll);\n          });\n\n          // The watch on the collection is just a watch on the length of the\n          // collection. We don't care if the content changes.\n          scope.$watch(sfVirtualRepeatWatchExpression, sfVirtualRepeatListener, true);\n        };\n      }\n    };\n  }]);\n\n})(ionic);\n*/\n\nangular.module('ionic.ui.scroll')\n\n/**\n * @ngdoc service\n * @name $ionicScrollDelegate\n * @module ionic\n * @description\n * Delegate for controlling scrollViews (created by\n * {@link ionic.directive:ionContent} and\n * {@link ionic.directive:ionScroll} directives).\n *\n * Each method on $ionicScrollDelegate can be called on the service itself to control all scrollViews.  Alternatively, one can control one specific scrollView using `forHandle` and `delegate-handle`. See the example below.\n *\n * @usage\n *\n * ```html\n * <body ng-controller=\"MainCtrl\">\n *   <ion-content>\n *     <button ng-click=\"scrollTop()\">Scroll to Top!</button>\n *   </ion-content>\n * </body>\n * ```\n * ```js\n * function MainCtrl($scope, $ionicScrollDelegate) {\n *   $scope.scrollTop = function() {\n *     $ionicScrollDelegate.scrollTop();\n *   };\n * }\n * ```\n *\n * Example of advanced usage, with two scroll areas using `delegate-handle`\n * for fine control.\n *\n * ```html\n * <body ng-controller=\"MainCtrl\">\n *   <ion-content delegate-handle=\"mainScroll\">\n *     <button ng-click=\"scrollMainToTop()\">\n *       Scroll content to top!\n *     </button>\n *     <ion-scroll delegate-handle=\"small\" style=\"height: 100px;\">\n *       <button ng-click=\"scrollSmallToTop()\">\n *         Scroll small area to top!\n *       </button>\n *     </ion-scroll>\n *   </ion-content>\n * </body>\n * ```\n * ```js\n * function MainCtrl($scope, $ionicScrollDelegate) {\n *   $scope.scrollMainToTop = function() {\n *     $ionicScrollDelegate.forHandle('mainScroll').scrollTop();\n *   };\n *   $scope.scrollSmallToTop = function() {\n *     $ionicScrollDelegate.forHandle('small').scrollTop();\n *   };\n * }\n * ```\n */\n\n.service('$ionicScrollDelegate', delegateService([\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#resize\n   * @description Tell the scrollView to recalculate the size of its container.\n   */\n  'resize',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scrollTop\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'scrollTop',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scrollBottom\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'scrollBottom',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scroll\n   * @param {number} left The x-value to scroll to.\n   * @param {number} top The y-value to scroll to.\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'scrollTo',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#anchorScroll\n   * @description Tell the scrollView to scroll to the element with an id\n   * matching window.location.hash.\n   *\n   * If no matching element is found, it will scroll to top.\n   *\n   * @param {boolean=} shouldAnimate Whether the scroll should animate.\n   */\n  'anchorScroll',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#rememberScrollPosition\n   * @description\n   * Will make it so, when this scrollView is destroyed (user leaves the page),\n   * the last scroll position the page was on will be saved, indexed by the\n   * given id.\n   *\n   * Note: for pages associated with a view under an ion-nav-view,\n   * rememberScrollPosition automatically saves their scroll.\n   *\n   * Related methods: scrollToRememberedPosition, forgetScrollPosition (below).\n   *\n   * In the following example, the scroll position of the ion-scroll element\n   * will persist, even when the user changes the toggle switch.\n   *\n   * ```html\n   * <ion-toggle ng-model=\"shouldShowScrollView\"></ion-toggle>\n   * <ion-scroll delegate-handle=\"myScroll\" ng-if=\"shouldShowScrollView\">\n   *   <div ng-controller=\"ScrollCtrl\">\n   *     <ion-list>\n   *       <ion-item ng-repeat=\"i in items\">{{i}}</ion-item>\n   *     </ion-list>\n   *   </div>\n   * </ion-scroll>\n   * ```\n   * ```js\n   * function ScrollCtrl($scope, $ionicScrollDelegate) {\n   *   var delegate = $ionicScrollDelegate.forHandle('myScroll');\n   *\n   *   // Put any unique ID here.  The point of this is: every time the controller is recreated\n   *   // we want to load the correct remembered scroll values.\n   *   delegate.rememberScrollPosition('my-scroll-id');\n   *   delegate.scrollToRememberedPosition();\n   *   $scope.items = [];\n   *   for (var i=0; i<100; i++) {\n   *     $scope.items.push(i);\n   *   }\n   * }\n   * ```\n   *\n   * @param {string} id The id to remember the scroll position of this\n   * scrollView by.\n   */\n  'rememberScrollPosition',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#forgetScrollPosition\n   * @description\n   * Stop remembering the scroll position for this scrollView.\n   */\n  'forgetScrollPosition',\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#scrollToRememberedPosition\n   * @description\n   * If this scrollView has an id associated with its scroll position,\n   * (through calling rememberScrollPosition), and that position is remembered,\n   * load the position and scroll to it.\n   * @param {boolean=} shouldAnimate Whether to animate the scroll.\n   */\n  'scrollToRememberedPosition'\n  /**\n   * @ngdoc method\n   * @name $ionicScrollDelegate#forHandle\n   * @param {string} handle\n   * @returns `delegateInstance` A delegate instance that controls only the\n   * scrollView with delegate-handle matching the given handle.\n   */\n]))\n\n/**\n * @private\n */\n.factory('$$scrollValueCache', function() {\n  return {};\n})\n\n.controller('$ionicScroll', [\n  '$scope',\n  'scrollViewOptions',\n  '$timeout',\n  '$window',\n  '$$scrollValueCache',\n  '$location',\n  '$rootScope',\n  '$document',\n  '$ionicScrollDelegate',\n  '$parse', //DEPRECATED\nfunction($scope, scrollViewOptions, $timeout, $window, $$scrollValueCache, $location, $rootScope, $document, $ionicScrollDelegate, $parse) {\n\n  var self = this;\n\n  this._scrollViewOptions = scrollViewOptions; //for testing\n\n  var element = this.element = scrollViewOptions.el;\n  var $element = this.$element = angular.element(element);\n  var scrollView = this.scrollView = new ionic.views.Scroll(scrollViewOptions);\n\n  //Attach self to element as a controller so other directives can require this controller\n  //through `require: '$ionicScroll'\n  //Also attach to parent so that sibling elements can require this\n  ($element.parent().length ? $element.parent() : $element)\n    .data('$$ionicScrollController', this);\n\n  var deregisterInstance = $ionicScrollDelegate._registerInstance(\n    this, scrollViewOptions.delegateHandle\n  );\n\n  if (!angular.isDefined(scrollViewOptions.bouncing)) {\n    ionic.Platform.ready(function() {\n      scrollView.options.bouncing = !ionic.Platform.isAndroid();\n    });\n  }\n\n  var resize = angular.bind(scrollView, scrollView.resize);\n  ionic.on('resize', resize, $window);\n\n  // set by rootScope listener if needed\n  var backListenDone = angular.noop;\n\n  $scope.$on('$destroy', function() {\n    deregisterInstance();\n    ionic.off('resize', resize, $window);\n    $window.removeEventListener('resize', resize);\n    backListenDone();\n    if (self._rememberScrollId) {\n      $$scrollValueCache[self._rememberScrollId] = scrollView.getValues();\n    }\n  });\n\n  $element.on('scroll', function(e) {\n    var detail = (e.originalEvent || e).detail || {};\n    $scope.$onScroll && $scope.$onScroll({\n      event: e,\n      scrollTop: detail.scrollTop || 0,\n      scrollLeft: detail.scrollLeft || 0\n    });\n  });\n\n  $scope.$on('$viewContentLoaded', function(e, historyData) {\n    //only the top-most scroll area under a view should remember that view's\n    //scroll position\n    if (e.defaultPrevented) { return; }\n    e.preventDefault();\n\n    var viewId = historyData && historyData.viewId;\n    if (viewId) {\n      self.rememberScrollPosition(viewId);\n      self.scrollToRememberedPosition();\n\n      backListenDone = $rootScope.$on('$viewHistory.viewBack', function(e, fromViewId, toViewId) {\n        //When going back from this view, forget its saved scroll position\n        if (viewId === fromViewId) {\n          self.forgetScrollPosition();\n        }\n      });\n    }\n  });\n\n  $timeout(function() {\n    scrollView.run();\n  });\n\n  this._rememberScrollId = null;\n\n  this.resize = function() {\n    return $timeout(resize);\n  };\n\n  this.scrollTop = function(shouldAnimate) {\n    this.resize().then(function() {\n      scrollView.scrollTo(0, 0, !!shouldAnimate);\n    });\n  };\n\n  this.scrollBottom = function(shouldAnimate) {\n    this.resize().then(function() {\n      var max = scrollView.getScrollMax();\n      scrollView.scrollTo(max.left, max.top, !!shouldAnimate);\n    });\n  };\n\n  this.scrollTo = function(left, top, shouldAnimate) {\n    this.resize().then(function() {\n      scrollView.scrollTo(left, top, !!shouldAnimate);\n    });\n  };\n\n  this.anchorScroll = function(shouldAnimate) {\n    this.resize().then(function() {\n      var hash = $location.hash();\n      var elm = hash && $document[0].getElementById(hash);\n      if (hash && elm) {\n        var scroll = ionic.DomUtil.getPositionInParent(elm, self.$element);\n        scrollView.scrollTo(scroll.left, scroll.top, !!shouldAnimate);\n      } else {\n        scrollView.scrollTo(0,0, !!shouldAnimate);\n      }\n    });\n  };\n\n  this.rememberScrollPosition = function(id) {\n    if (!id) {\n      throw new Error(\"Must supply an id to remember the scroll by!\");\n    }\n    this._rememberScrollId = id;\n  };\n  this.forgetScrollPosition = function() {\n    delete $$scrollValueCache[this._rememberScrollId];\n    this._rememberScrollId = null;\n  };\n  this.scrollToRememberedPosition = function(shouldAnimate) {\n    var values = $$scrollValueCache[this._rememberScrollId];\n    if (values) {\n      this.resize().then(function() {\n        scrollView.scrollTo(+values.left, +values.top, shouldAnimate);\n      });\n    }\n  };\n\n\n\n  /**\n   * @private\n   */\n  this._setRefresher = function(refresherScope, refresherElement) {\n    var refresher = this.refresher = refresherElement;\n    var refresherHeight = self.refresher.clientHeight || 0;\n    scrollView.activatePullToRefresh(refresherHeight, function() {\n      refresher.classList.add('active');\n      refresherScope.$onPulling();\n    }, function() {\n      refresher.classList.remove('refreshing');\n      refresher.classList.remove('active');\n    }, function() {\n      refresher.classList.add('refreshing');\n      refresherScope.$onRefresh();\n    });\n  };\n}]);\n\n\n})();"
  },
  {
    "path": "ionic1/official/maps/www/lib/ionic/js/ionic.js",
    "content": "/*!\n * Copyright 2014 Drifty Co.\n * http://drifty.com/\n *\n * Ionic, v0.9.27\n * A powerful HTML5 mobile app framework.\n * http://ionicframework.com/\n *\n * By @maxlynch, @benjsperry, @adamdbradley <3\n *\n * Licensed under the MIT license. Please see LICENSE for more information.\n *\n */\n\n(function() {\n\n// Create namespaces\n//\nwindow.ionic = {\n  controllers: {},\n  views: {},\n  version: '0.9.27'\n};\n\n(function(ionic) {\n\n  var bezierCoord = function (x,y) {\n    if(!x) x=0;\n    if(!y) y=0;\n    return {x: x, y: y};\n  };\n\n  function B1(t) { return t*t*t; }\n  function B2(t) { return 3*t*t*(1-t); }\n  function B3(t) { return 3*t*(1-t)*(1-t); }\n  function B4(t) { return (1-t)*(1-t)*(1-t); }\n\n  ionic.Animator = {\n    // Quadratic bezier solver\n    getQuadraticBezier: function(percent,C1,C2,C3,C4) {\n      var pos = new bezierCoord();\n      pos.x = C1.x*B1(percent) + C2.x*B2(percent) + C3.x*B3(percent) + C4.x*B4(percent);\n      pos.y = C1.y*B1(percent) + C2.y*B2(percent) + C3.y*B3(percent) + C4.y*B4(percent);\n      return pos;\n    },\n\n    // Cubic bezier solver from https://github.com/arian/cubic-bezier (MIT)\n    getCubicBezier: function(x1, y1, x2, y2, duration) {\n      // Precision\n      epsilon = (1000 / 60 / duration) / 4;\n\n      var curveX = function(t){\n        var v = 1 - t;\n        return 3 * v * v * t * x1 + 3 * v * t * t * x2 + t * t * t;\n      };\n\n      var curveY = function(t){\n        var v = 1 - t;\n        return 3 * v * v * t * y1 + 3 * v * t * t * y2 + t * t * t;\n      };\n\n      var derivativeCurveX = function(t){\n        var v = 1 - t;\n        return 3 * (2 * (t - 1) * t + v * v) * x1 + 3 * (- t * t * t + 2 * v * t) * x2;\n      };\n\n      return function(t) {\n\n        var x = t, t0, t1, t2, x2, d2, i;\n\n        // First try a few iterations of Newton's method -- normally very fast.\n        for (t2 = x, i = 0; i < 8; i++){\n          x2 = curveX(t2) - x;\n          if (Math.abs(x2) < epsilon) return curveY(t2);\n          d2 = derivativeCurveX(t2);\n          if (Math.abs(d2) < 1e-6) break;\n          t2 = t2 - x2 / d2;\n        }\n\n        t0 = 0, t1 = 1, t2 = x;\n\n        if (t2 < t0) return curveY(t0);\n        if (t2 > t1) return curveY(t1);\n\n        // Fallback to the bisection method for reliability.\n        while (t0 < t1){\n          x2 = curveX(t2);\n          if (Math.abs(x2 - x) < epsilon) return curveY(t2);\n          if (x > x2) t0 = t2;\n          else t1 = t2;\n          t2 = (t1 - t0) * 0.5 + t0;\n        }\n\n        // Failure\n        return curveY(t2);\n      };\n    },\n\n    animate: function(element, className, fn) {\n      return {\n        leave: function() {\n          var endFunc = function() {\n\n            element.classList.remove('leave');\n            element.classList.remove('leave-active');\n\n            element.removeEventListener('webkitTransitionEnd', endFunc);\n            element.removeEventListener('transitionEnd', endFunc);\n          };\n          element.addEventListener('webkitTransitionEnd', endFunc);\n          element.addEventListener('transitionEnd', endFunc);\n\n          element.classList.add('leave');\n          element.classList.add('leave-active');\n          return this;\n        },\n        enter: function() {\n          var endFunc = function() {\n\n            element.classList.remove('enter');\n            element.classList.remove('enter-active');\n\n            element.removeEventListener('webkitTransitionEnd', endFunc);\n            element.removeEventListener('transitionEnd', endFunc);\n          };\n          element.addEventListener('webkitTransitionEnd', endFunc);\n          element.addEventListener('transitionEnd', endFunc);\n\n          element.classList.add('enter');\n          element.classList.add('enter-active');\n\n          return this;\n        }\n      };\n    }\n  };\n})(ionic);\n\n(function(window, document, ionic) {\n\n  var readyCallbacks = [];\n  var isDomReady = false;\n\n  function domReady() {\n    isDomReady = true;\n    for(var x=0; x<readyCallbacks.length; x++) {\n      ionic.requestAnimationFrame(readyCallbacks[x]);\n    }\n    readyCallbacks = [];\n    document.removeEventListener('DOMContentLoaded', domReady);\n  }\n  document.addEventListener('DOMContentLoaded', domReady);\n\n  // From the man himself, Mr. Paul Irish.\n  // The requestAnimationFrame polyfill\n  // Put it on window just to preserve its context\n  // without having to use .call\n  window._rAF = (function(){\n    return  window.requestAnimationFrame       ||\n            window.webkitRequestAnimationFrame ||\n            window.mozRequestAnimationFrame    ||\n            function( callback ){\n              window.setTimeout(callback, 16);\n            };\n  })();\n\n  /**\n  * @ngdoc utility\n  * @name ionic.DomUtil\n  * @module ionic\n  */\n  ionic.DomUtil = {\n    //Call with proper context\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#requestAnimationFrame\n     * @alias ionic.requestAnimationFrame\n     * @description Calls [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window.requestAnimationFrame), or a polyfill if not available.\n     * @param {function} callback The function to call when the next frame\n     * happens.\n     */\n    requestAnimationFrame: function(cb) {\n      window._rAF(cb);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#animationFrameThrottle\n     * @alias ionic.animationFrameThrottle\n     * @description\n     * When given a callback, if that callback is called 100 times between\n     * animation frames, adding Throttle will make it only run the last of\n     * the 100 calls.\n     *\n     * @param {function} callback a function which will be throttled to\n     * requestAnimationFrame\n     * @returns {function} A function which will then call the passed in callback.\n     * The passed in callback will receive the context the returned function is\n     * called with.\n     */\n    animationFrameThrottle: function(cb) {\n      var args, isQueued, context;\n      return function() {\n        args = arguments;\n        context = this;\n        if (!isQueued) {\n          isQueued = true;\n          ionic.requestAnimationFrame(function() {\n            cb.apply(context, args);\n            isQueued = false;\n          });\n        }\n      };\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getPositionInParent\n     * @description\n     * Find an element's scroll offset within its container.\n     * @param {DOMElement} element The element to find the offset of.\n     * @returns {object} A position object with the following properties:\n     *   - `{number}` `left` The left offset of the element.\n     *   - `{number}` `top` The top offset of the element.\n     */\n    getPositionInParent: function(el) {\n      return {\n        left: el.offsetLeft,\n        top: el.offsetTop\n      };\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#ready\n     * @description\n     * Call a function when the DOM is ready, or if it is already ready\n     * call the function immediately.\n     * @param {function} callback The function to be called.\n     */\n    ready: function(cb) {\n      if(isDomReady || document.readyState === \"complete\") {\n        ionic.requestAnimationFrame(cb);\n      } else {\n        readyCallbacks.push(cb);\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getTextBounds\n     * @description\n     * Get a rect representing the bounds of the given textNode.\n     * @param {DOMElement} textNode The textNode to find the bounds of.\n     * @returns {object} An object representing the bounds of the node. Properties:\n     *   - `{number}` `left` The left positton of the textNode.\n     *   - `{number}` `right` The right positton of the textNode.\n     *   - `{number}` `top` The top positton of the textNode.\n     *   - `{number}` `bottom` The bottom position of the textNode.\n     *   - `{number}` `width` The width of the textNode.\n     *   - `{number}` `height` The height of the textNode.\n     */\n    getTextBounds: function(textNode) {\n      if(document.createRange) {\n        var range = document.createRange();\n        range.selectNodeContents(textNode);\n        if(range.getBoundingClientRect) {\n          var rect = range.getBoundingClientRect();\n          if(rect) {\n            var sx = window.scrollX;\n            var sy = window.scrollY;\n\n            return {\n              top: rect.top + sy,\n              left: rect.left + sx,\n              right: rect.left + sx + rect.width,\n              bottom: rect.top + sy + rect.height,\n              width: rect.width,\n              height: rect.height\n            };\n          }\n        }\n      }\n      return null;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getChildIndex\n     * @description\n     * Get the first index of a child node within the given element of the\n     * specified type.\n     * @param {DOMElement} element The element to find the index of.\n     * @param {string} type The nodeName to match children of element against.\n     * @returns {number} The index, or -1, of a child with nodeName matching type.\n     */\n    getChildIndex: function(element, type) {\n      if(type) {\n        var ch = element.parentNode.children;\n        var c;\n        for(var i = 0, k = 0, j = ch.length; i < j; i++) {\n          c = ch[i];\n          if(c.nodeName && c.nodeName.toLowerCase() == type) {\n            if(c == element) {\n              return k;\n            }\n            k++;\n          }\n        }\n      }\n      return Array.prototype.slice.call(element.parentNode.children).indexOf(element);\n    },\n\n    /**\n     * @private\n     */\n    swapNodes: function(src, dest) {\n      dest.parentNode.insertBefore(src, dest);\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getParentWithClass\n     * @param {DOMElement} element\n     * @param {string} className\n     * @returns {DOMElement} The closest parent of element matching the\n     * className, or null.\n     */\n    getParentWithClass: function(e, className, depth) {\n      depth = depth || 10;\n      while(e.parentNode && depth--) {\n        if(e.parentNode.classList && e.parentNode.classList.contains(className)) {\n          return e.parentNode;\n        }\n        e = e.parentNode;\n      }\n      return null;\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#getParentWithClass\n     * @param {DOMElement} element\n     * @param {string} className\n     * @returns {DOMElement} The closest parent or self matching the\n     * className, or null.\n     */\n    getParentOrSelfWithClass: function(e, className, depth) {\n      depth = depth || 10;\n      while(e && depth--) {\n        if(e.classList && e.classList.contains(className)) {\n          return e;\n        }\n        e = e.parentNode;\n      }\n      return null;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.DomUtil#rectContains\n     * @param {number} x\n     * @param {number} y\n     * @param {number} x1\n     * @param {number} y1\n     * @param {number} x2\n     * @param {number} y2\n     * @returns {boolean} Whether {x,y} fits within the rectangle defined by\n     * {x1,y1,x2,y2}.\n     */\n    rectContains: function(x, y, x1, y1, x2, y2) {\n      if(x < x1 || x > x2) return false;\n      if(y < y1 || y > y2) return false;\n      return true;\n    }\n  };\n\n  //Shortcuts\n  ionic.requestAnimationFrame = ionic.DomUtil.requestAnimationFrame;\n  ionic.animationFrameThrottle = ionic.DomUtil.animationFrameThrottle;\n})(this, document, ionic);\n\n/**\n * ion-events.js\n *\n * Author: Max Lynch <max@drifty.com>\n *\n * Framework events handles various mobile browser events, and\n * detects special events like tap/swipe/etc. and emits them\n * as custom events that can be used in an app.\n *\n * Portions lovingly adapted from github.com/maker/ratchet and github.com/alexgibson/tap.js - thanks guys!\n */\n\n(function(ionic) {\n\n  // Custom event polyfill\n  if(!window.CustomEvent) {\n    (function() {\n      var CustomEvent;\n\n      CustomEvent = function(event, params) {\n        var evt;\n        params = params || {\n          bubbles: false,\n          cancelable: false,\n          detail: undefined\n        };\n        try {\n          evt = document.createEvent(\"CustomEvent\");\n          evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n        } catch (error) {\n          // fallback for browsers that don't support createEvent('CustomEvent')\n          evt = document.createEvent(\"Event\");\n          for (var param in params) {\n            evt[param] = params[param];\n          }\n          evt.initEvent(event, params.bubbles, params.cancelable);\n        }\n        return evt;\n      };\n\n      CustomEvent.prototype = window.Event.prototype;\n\n      window.CustomEvent = CustomEvent;\n    })();\n  }\n\n\n  /**\n   * @ngdoc utility\n   * @name ionic.EventController\n   * @module ionic\n   */\n  ionic.EventController = {\n    VIRTUALIZED_EVENTS: ['tap', 'swipe', 'swiperight', 'swipeleft', 'drag', 'hold', 'release'],\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#trigger\n     * @alias ionic.trigger\n     * @param {string} eventType The event to trigger.\n     * @param {object} data The data for the event. Hint: pass in\n     * `{target: targetElement}`\n     * @param {boolean=} bubbles Whether the event should bubble up the DOM.\n     * @param {boolean=} cancelable Whether the event should be cancelable.\n     */\n    // Trigger a new event\n    trigger: function(eventType, data, bubbles, cancelable) {\n      var event = new CustomEvent(eventType, {\n        detail: data,\n        bubbles: !!bubbles,\n        cancelable: !!cancelable\n      });\n\n      // Make sure to trigger the event on the given target, or dispatch it from\n      // the window if we don't have an event target\n      data && data.target && data.target.dispatchEvent(event) || window.dispatchEvent(event);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#on\n     * @alias ionic.on\n     * @description Listen to an event on an element.\n     * @param {string} type The event to listen for.\n     * @param {function} callback The listener to be called.\n     * @param {DOMElement} element The element to listen for the event on.\n     */\n    on: function(type, callback, element) {\n      var e = element || window;\n\n      // Bind a gesture if it's a virtual event\n      for(var i = 0, j = this.VIRTUALIZED_EVENTS.length; i < j; i++) {\n        if(type == this.VIRTUALIZED_EVENTS[i]) {\n          var gesture = new ionic.Gesture(element);\n          gesture.on(type, callback);\n          return gesture;\n        }\n      }\n\n      // Otherwise bind a normal event\n      e.addEventListener(type, callback);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#off\n     * @alias ionic.off\n     * @description Remove an event listener.\n     * @param {string} type\n     * @param {function} callback\n     * @param {DOMElement} element\n     */\n    off: function(type, callback, element) {\n      element.removeEventListener(type, callback);\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#onGesture\n     * @alias ionic.onGesture\n     * @description Add an event listener for a gesture on an element.\n     * @param {string} eventType The gesture event to listen for.\n     * @param {function(e)} callback The function to call when the gesture\n     * happens.\n     * @param {DOMElement} element The angular element to listen for the event on.\n     */\n    onGesture: function(type, callback, element) {\n      var gesture = new ionic.Gesture(element);\n      gesture.on(type, callback);\n      return gesture;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.EventController#offGesture\n     * @alias ionic.offGesture\n     * @description Remove an event listener for a gesture on an element.\n     * @param {string} eventType The gesture event.\n     * @param {function(e)} callback The listener that was added earlier.\n     * @param {DOMElement} element The element the listener was added on.\n     */\n    offGesture: function(gesture, type, callback) {\n      gesture.off(type, callback);\n    },\n\n    handlePopState: function(event) {\n    },\n  };\n\n\n  // Map some convenient top-level functions for event handling\n  ionic.on = function() { ionic.EventController.on.apply(ionic.EventController, arguments); };\n  ionic.off = function() { ionic.EventController.off.apply(ionic.EventController, arguments); };\n  ionic.trigger = ionic.EventController.trigger;//function() { ionic.EventController.trigger.apply(ionic.EventController.trigger, arguments); };\n  ionic.onGesture = function() { return ionic.EventController.onGesture.apply(ionic.EventController.onGesture, arguments); };\n  ionic.offGesture = function() { return ionic.EventController.offGesture.apply(ionic.EventController.offGesture, arguments); };\n\n})(window.ionic);\n\n/**\n  * Simple gesture controllers with some common gestures that emit\n  * gesture events.\n  *\n  * Ported from github.com/EightMedia/hammer.js Gestures - thanks!\n  */\n(function(ionic) {\n\n  /**\n   * ionic.Gestures\n   * use this to create instances\n   * @param   {HTMLElement}   element\n   * @param   {Object}        options\n   * @returns {ionic.Gestures.Instance}\n   * @constructor\n   */\n  ionic.Gesture = function(element, options) {\n    return new ionic.Gestures.Instance(element, options || {});\n  };\n\n  ionic.Gestures = {};\n\n  // default settings\n  ionic.Gestures.defaults = {\n    // add css to the element to prevent the browser from doing\n    // its native behavior. this doesnt prevent the scrolling,\n    // but cancels the contextmenu, tap highlighting etc\n    // set to false to disable this\n    stop_browser_behavior: 'disable-user-behavior'\n  };\n\n  // detect touchevents\n  ionic.Gestures.HAS_POINTEREVENTS = window.navigator.pointerEnabled || window.navigator.msPointerEnabled;\n  ionic.Gestures.HAS_TOUCHEVENTS = ('ontouchstart' in window);\n\n  // dont use mouseevents on mobile devices\n  ionic.Gestures.MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android|silk/i;\n  ionic.Gestures.NO_MOUSEEVENTS = ionic.Gestures.HAS_TOUCHEVENTS && window.navigator.userAgent.match(ionic.Gestures.MOBILE_REGEX);\n\n  // eventtypes per touchevent (start, move, end)\n  // are filled by ionic.Gestures.event.determineEventTypes on setup\n  ionic.Gestures.EVENT_TYPES = {};\n\n  // direction defines\n  ionic.Gestures.DIRECTION_DOWN = 'down';\n  ionic.Gestures.DIRECTION_LEFT = 'left';\n  ionic.Gestures.DIRECTION_UP = 'up';\n  ionic.Gestures.DIRECTION_RIGHT = 'right';\n\n  // pointer type\n  ionic.Gestures.POINTER_MOUSE = 'mouse';\n  ionic.Gestures.POINTER_TOUCH = 'touch';\n  ionic.Gestures.POINTER_PEN = 'pen';\n\n  // touch event defines\n  ionic.Gestures.EVENT_START = 'start';\n  ionic.Gestures.EVENT_MOVE = 'move';\n  ionic.Gestures.EVENT_END = 'end';\n\n  // hammer document where the base events are added at\n  ionic.Gestures.DOCUMENT = window.document;\n\n  // plugins namespace\n  ionic.Gestures.plugins = {};\n\n  // if the window events are set...\n  ionic.Gestures.READY = false;\n\n  /**\n   * setup events to detect gestures on the document\n   */\n  function setup() {\n    if(ionic.Gestures.READY) {\n      return;\n    }\n\n    // find what eventtypes we add listeners to\n    ionic.Gestures.event.determineEventTypes();\n\n    // Register all gestures inside ionic.Gestures.gestures\n    for(var name in ionic.Gestures.gestures) {\n      if(ionic.Gestures.gestures.hasOwnProperty(name)) {\n        ionic.Gestures.detection.register(ionic.Gestures.gestures[name]);\n      }\n    }\n\n    // Add touch events on the document\n    ionic.Gestures.event.onTouch(ionic.Gestures.DOCUMENT, ionic.Gestures.EVENT_MOVE, ionic.Gestures.detection.detect);\n    ionic.Gestures.event.onTouch(ionic.Gestures.DOCUMENT, ionic.Gestures.EVENT_END, ionic.Gestures.detection.detect);\n\n    // ionic.Gestures is ready...!\n    ionic.Gestures.READY = true;\n  }\n\n  /**\n   * create new hammer instance\n   * all methods should return the instance itself, so it is chainable.\n   * @param   {HTMLElement}       element\n   * @param   {Object}            [options={}]\n   * @returns {ionic.Gestures.Instance}\n   * @name Gesture.Instance\n   * @constructor\n   */\n  ionic.Gestures.Instance = function(element, options) {\n    var self = this;\n\n    // A null element was passed into the instance, which means\n    // whatever lookup was done to find this element failed to find it\n    // so we can't listen for events on it.\n    if(element === null) {\n      console.error('Null element passed to gesture (element does not exist). Not listening for gesture');\n      return;\n    }\n\n    // setup ionic.GesturesJS window events and register all gestures\n    // this also sets up the default options\n    setup();\n\n    this.element = element;\n\n    // start/stop detection option\n    this.enabled = true;\n\n    // merge options\n    this.options = ionic.Gestures.utils.extend(\n        ionic.Gestures.utils.extend({}, ionic.Gestures.defaults),\n        options || {});\n\n    // add some css to the element to prevent the browser from doing its native behavoir\n    if(this.options.stop_browser_behavior) {\n      ionic.Gestures.utils.stopDefaultBrowserBehavior(this.element, this.options.stop_browser_behavior);\n    }\n\n    // start detection on touchstart\n    ionic.Gestures.event.onTouch(element, ionic.Gestures.EVENT_START, function(ev) {\n      if(self.enabled) {\n        ionic.Gestures.detection.startDetect(self, ev);\n      }\n    });\n\n    // return instance\n    return this;\n  };\n\n\n  ionic.Gestures.Instance.prototype = {\n    /**\n     * bind events to the instance\n     * @param   {String}      gesture\n     * @param   {Function}    handler\n     * @returns {ionic.Gestures.Instance}\n     */\n    on: function onEvent(gesture, handler){\n      var gestures = gesture.split(' ');\n      for(var t=0; t<gestures.length; t++) {\n        this.element.addEventListener(gestures[t], handler, false);\n      }\n      return this;\n    },\n\n\n    /**\n     * unbind events to the instance\n     * @param   {String}      gesture\n     * @param   {Function}    handler\n     * @returns {ionic.Gestures.Instance}\n     */\n    off: function offEvent(gesture, handler){\n      var gestures = gesture.split(' ');\n      for(var t=0; t<gestures.length; t++) {\n        this.element.removeEventListener(gestures[t], handler, false);\n      }\n      return this;\n    },\n\n\n    /**\n     * trigger gesture event\n     * @param   {String}      gesture\n     * @param   {Object}      eventData\n     * @returns {ionic.Gestures.Instance}\n     */\n    trigger: function triggerEvent(gesture, eventData){\n      // create DOM event\n      var event = ionic.Gestures.DOCUMENT.createEvent('Event');\n      event.initEvent(gesture, true, true);\n      event.gesture = eventData;\n\n      // trigger on the target if it is in the instance element,\n      // this is for event delegation tricks\n      var element = this.element;\n      if(ionic.Gestures.utils.hasParent(eventData.target, element)) {\n        element = eventData.target;\n      }\n\n      element.dispatchEvent(event);\n      return this;\n    },\n\n\n    /**\n     * enable of disable hammer.js detection\n     * @param   {Boolean}   state\n     * @returns {ionic.Gestures.Instance}\n     */\n    enable: function enable(state) {\n      this.enabled = state;\n      return this;\n    }\n  };\n\n  /**\n   * this holds the last move event,\n   * used to fix empty touchend issue\n   * see the onTouch event for an explanation\n   * type {Object}\n   */\n  var last_move_event = null;\n\n\n  /**\n   * when the mouse is hold down, this is true\n   * type {Boolean}\n   */\n  var enable_detect = false;\n\n\n  /**\n   * when touch events have been fired, this is true\n   * type {Boolean}\n   */\n  var touch_triggered = false;\n\n\n  ionic.Gestures.event = {\n    /**\n     * simple addEventListener\n     * @param   {HTMLElement}   element\n     * @param   {String}        type\n     * @param   {Function}      handler\n     */\n    bindDom: function(element, type, handler) {\n      var types = type.split(' ');\n      for(var t=0; t<types.length; t++) {\n        element.addEventListener(types[t], handler, false);\n      }\n    },\n\n\n    /**\n     * touch events with mouse fallback\n     * @param   {HTMLElement}   element\n     * @param   {String}        eventType        like ionic.Gestures.EVENT_MOVE\n     * @param   {Function}      handler\n     */\n    onTouch: function onTouch(element, eventType, handler) {\n      var self = this;\n\n      this.bindDom(element, ionic.Gestures.EVENT_TYPES[eventType], function bindDomOnTouch(ev) {\n        var sourceEventType = ev.type.toLowerCase();\n\n        // onmouseup, but when touchend has been fired we do nothing.\n        // this is for touchdevices which also fire a mouseup on touchend\n        if(sourceEventType.match(/mouse/) && touch_triggered) {\n          return;\n        }\n\n        // mousebutton must be down or a touch event\n        else if( sourceEventType.match(/touch/) ||   // touch events are always on screen\n          sourceEventType.match(/pointerdown/) || // pointerevents touch\n          (sourceEventType.match(/mouse/) && ev.which === 1)   // mouse is pressed\n          ){\n            enable_detect = true;\n          }\n\n        // mouse isn't pressed\n        else if(sourceEventType.match(/mouse/) && ev.which !== 1) {\n          enable_detect = false;\n        }\n\n\n        // we are in a touch event, set the touch triggered bool to true,\n        // this for the conflicts that may occur on ios and android\n        if(sourceEventType.match(/touch|pointer/)) {\n          touch_triggered = true;\n        }\n\n        // count the total touches on the screen\n        var count_touches = 0;\n\n        // when touch has been triggered in this detection session\n        // and we are now handling a mouse event, we stop that to prevent conflicts\n        if(enable_detect) {\n          // update pointerevent\n          if(ionic.Gestures.HAS_POINTEREVENTS && eventType != ionic.Gestures.EVENT_END) {\n            count_touches = ionic.Gestures.PointerEvent.updatePointer(eventType, ev);\n          }\n          // touch\n          else if(sourceEventType.match(/touch/)) {\n            count_touches = ev.touches.length;\n          }\n          // mouse\n          else if(!touch_triggered) {\n            count_touches = sourceEventType.match(/up/) ? 0 : 1;\n          }\n\n          // if we are in a end event, but when we remove one touch and\n          // we still have enough, set eventType to move\n          if(count_touches > 0 && eventType == ionic.Gestures.EVENT_END) {\n            eventType = ionic.Gestures.EVENT_MOVE;\n          }\n          // no touches, force the end event\n          else if(!count_touches) {\n            eventType = ionic.Gestures.EVENT_END;\n          }\n\n          // store the last move event\n          if(count_touches || last_move_event === null) {\n            last_move_event = ev;\n          }\n\n          // trigger the handler\n          handler.call(ionic.Gestures.detection, self.collectEventData(element, eventType, self.getTouchList(last_move_event, eventType), ev));\n\n          // remove pointerevent from list\n          if(ionic.Gestures.HAS_POINTEREVENTS && eventType == ionic.Gestures.EVENT_END) {\n            count_touches = ionic.Gestures.PointerEvent.updatePointer(eventType, ev);\n          }\n        }\n\n        //debug(sourceEventType +\" \"+ eventType);\n\n        // on the end we reset everything\n        if(!count_touches) {\n          last_move_event = null;\n          enable_detect = false;\n          touch_triggered = false;\n          ionic.Gestures.PointerEvent.reset();\n        }\n      });\n    },\n\n\n    /**\n     * we have different events for each device/browser\n     * determine what we need and set them in the ionic.Gestures.EVENT_TYPES constant\n     */\n    determineEventTypes: function determineEventTypes() {\n      // determine the eventtype we want to set\n      var types;\n\n      // pointerEvents magic\n      if(ionic.Gestures.HAS_POINTEREVENTS) {\n        types = ionic.Gestures.PointerEvent.getEvents();\n      }\n      // on Android, iOS, blackberry, windows mobile we dont want any mouseevents\n      else if(ionic.Gestures.NO_MOUSEEVENTS) {\n        types = [\n          'touchstart',\n          'touchmove',\n          'touchend touchcancel'];\n      }\n      // for non pointer events browsers and mixed browsers,\n      // like chrome on windows8 touch laptop\n      else {\n        types = [\n          'touchstart mousedown',\n          'touchmove mousemove',\n          'touchend touchcancel mouseup'];\n      }\n\n      ionic.Gestures.EVENT_TYPES[ionic.Gestures.EVENT_START]  = types[0];\n      ionic.Gestures.EVENT_TYPES[ionic.Gestures.EVENT_MOVE]   = types[1];\n      ionic.Gestures.EVENT_TYPES[ionic.Gestures.EVENT_END]    = types[2];\n    },\n\n\n    /**\n     * create touchlist depending on the event\n     * @param   {Object}    ev\n     * @param   {String}    eventType   used by the fakemultitouch plugin\n     */\n    getTouchList: function getTouchList(ev/*, eventType*/) {\n      // get the fake pointerEvent touchlist\n      if(ionic.Gestures.HAS_POINTEREVENTS) {\n        return ionic.Gestures.PointerEvent.getTouchList();\n      }\n      // get the touchlist\n      else if(ev.touches) {\n        return ev.touches;\n      }\n      // make fake touchlist from mouse position\n      else {\n        ev.indentifier = 1;\n        return [ev];\n      }\n    },\n\n\n    /**\n     * collect event data for ionic.Gestures js\n     * @param   {HTMLElement}   element\n     * @param   {String}        eventType        like ionic.Gestures.EVENT_MOVE\n     * @param   {Object}        eventData\n     */\n    collectEventData: function collectEventData(element, eventType, touches, ev) {\n\n      // find out pointerType\n      var pointerType = ionic.Gestures.POINTER_TOUCH;\n      if(ev.type.match(/mouse/) || ionic.Gestures.PointerEvent.matchType(ionic.Gestures.POINTER_MOUSE, ev)) {\n        pointerType = ionic.Gestures.POINTER_MOUSE;\n      }\n\n      return {\n        center      : ionic.Gestures.utils.getCenter(touches),\n                    timeStamp   : new Date().getTime(),\n                    target      : ev.target,\n                    touches     : touches,\n                    eventType   : eventType,\n                    pointerType : pointerType,\n                    srcEvent    : ev,\n\n                    /**\n                     * prevent the browser default actions\n                     * mostly used to disable scrolling of the browser\n                     */\n                    preventDefault: function() {\n                      if(this.srcEvent.preventManipulation) {\n                        this.srcEvent.preventManipulation();\n                      }\n\n                      if(this.srcEvent.preventDefault) {\n                        //this.srcEvent.preventDefault();\n                      }\n                    },\n\n                    /**\n                     * stop bubbling the event up to its parents\n                     */\n                    stopPropagation: function() {\n                      this.srcEvent.stopPropagation();\n                    },\n\n                    /**\n                     * immediately stop gesture detection\n                     * might be useful after a swipe was detected\n                     * @return {*}\n                     */\n                    stopDetect: function() {\n                      return ionic.Gestures.detection.stopDetect();\n                    }\n      };\n    }\n  };\n\n  ionic.Gestures.PointerEvent = {\n    /**\n     * holds all pointers\n     * type {Object}\n     */\n    pointers: {},\n\n    /**\n     * get a list of pointers\n     * @returns {Array}     touchlist\n     */\n    getTouchList: function() {\n      var self = this;\n      var touchlist = [];\n\n      // we can use forEach since pointerEvents only is in IE10\n      Object.keys(self.pointers).sort().forEach(function(id) {\n        touchlist.push(self.pointers[id]);\n      });\n      return touchlist;\n    },\n\n    /**\n     * update the position of a pointer\n     * @param   {String}   type             ionic.Gestures.EVENT_END\n     * @param   {Object}   pointerEvent\n     */\n    updatePointer: function(type, pointerEvent) {\n      if(type == ionic.Gestures.EVENT_END) {\n        this.pointers = {};\n      }\n      else {\n        pointerEvent.identifier = pointerEvent.pointerId;\n        this.pointers[pointerEvent.pointerId] = pointerEvent;\n      }\n\n      return Object.keys(this.pointers).length;\n    },\n\n    /**\n     * check if ev matches pointertype\n     * @param   {String}        pointerType     ionic.Gestures.POINTER_MOUSE\n     * @param   {PointerEvent}  ev\n     */\n    matchType: function(pointerType, ev) {\n      if(!ev.pointerType) {\n        return false;\n      }\n\n      var types = {};\n      types[ionic.Gestures.POINTER_MOUSE] = (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE || ev.pointerType == ionic.Gestures.POINTER_MOUSE);\n      types[ionic.Gestures.POINTER_TOUCH] = (ev.pointerType == ev.MSPOINTER_TYPE_TOUCH || ev.pointerType == ionic.Gestures.POINTER_TOUCH);\n      types[ionic.Gestures.POINTER_PEN] = (ev.pointerType == ev.MSPOINTER_TYPE_PEN || ev.pointerType == ionic.Gestures.POINTER_PEN);\n      return types[pointerType];\n    },\n\n\n    /**\n     * get events\n     */\n    getEvents: function() {\n      return [\n        'pointerdown MSPointerDown',\n      'pointermove MSPointerMove',\n      'pointerup pointercancel MSPointerUp MSPointerCancel'\n        ];\n    },\n\n    /**\n     * reset the list\n     */\n    reset: function() {\n      this.pointers = {};\n    }\n  };\n\n\n  ionic.Gestures.utils = {\n    /**\n     * extend method,\n     * also used for cloning when dest is an empty object\n     * @param   {Object}    dest\n     * @param   {Object}    src\n     * @param\t{Boolean}\tmerge\t\tdo a merge\n     * @returns {Object}    dest\n     */\n    extend: function extend(dest, src, merge) {\n      for (var key in src) {\n        if(dest[key] !== undefined && merge) {\n          continue;\n        }\n        dest[key] = src[key];\n      }\n      return dest;\n    },\n\n\n    /**\n     * find if a node is in the given parent\n     * used for event delegation tricks\n     * @param   {HTMLElement}   node\n     * @param   {HTMLElement}   parent\n     * @returns {boolean}       has_parent\n     */\n    hasParent: function(node, parent) {\n      while(node){\n        if(node == parent) {\n          return true;\n        }\n        node = node.parentNode;\n      }\n      return false;\n    },\n\n\n    /**\n     * get the center of all the touches\n     * @param   {Array}     touches\n     * @returns {Object}    center\n     */\n    getCenter: function getCenter(touches) {\n      var valuesX = [], valuesY = [];\n\n      for(var t= 0,len=touches.length; t<len; t++) {\n        valuesX.push(touches[t].pageX);\n        valuesY.push(touches[t].pageY);\n      }\n\n      return {\n        pageX: ((Math.min.apply(Math, valuesX) + Math.max.apply(Math, valuesX)) / 2),\n          pageY: ((Math.min.apply(Math, valuesY) + Math.max.apply(Math, valuesY)) / 2)\n      };\n    },\n\n\n    /**\n     * calculate the velocity between two points\n     * @param   {Number}    delta_time\n     * @param   {Number}    delta_x\n     * @param   {Number}    delta_y\n     * @returns {Object}    velocity\n     */\n    getVelocity: function getVelocity(delta_time, delta_x, delta_y) {\n      return {\n        x: Math.abs(delta_x / delta_time) || 0,\n        y: Math.abs(delta_y / delta_time) || 0\n      };\n    },\n\n\n    /**\n     * calculate the angle between two coordinates\n     * @param   {Touch}     touch1\n     * @param   {Touch}     touch2\n     * @returns {Number}    angle\n     */\n    getAngle: function getAngle(touch1, touch2) {\n      var y = touch2.pageY - touch1.pageY,\n      x = touch2.pageX - touch1.pageX;\n      return Math.atan2(y, x) * 180 / Math.PI;\n    },\n\n\n    /**\n     * angle to direction define\n     * @param   {Touch}     touch1\n     * @param   {Touch}     touch2\n     * @returns {String}    direction constant, like ionic.Gestures.DIRECTION_LEFT\n     */\n    getDirection: function getDirection(touch1, touch2) {\n      var x = Math.abs(touch1.pageX - touch2.pageX),\n      y = Math.abs(touch1.pageY - touch2.pageY);\n\n      if(x >= y) {\n        return touch1.pageX - touch2.pageX > 0 ? ionic.Gestures.DIRECTION_LEFT : ionic.Gestures.DIRECTION_RIGHT;\n      }\n      else {\n        return touch1.pageY - touch2.pageY > 0 ? ionic.Gestures.DIRECTION_UP : ionic.Gestures.DIRECTION_DOWN;\n      }\n    },\n\n\n    /**\n     * calculate the distance between two touches\n     * @param   {Touch}     touch1\n     * @param   {Touch}     touch2\n     * @returns {Number}    distance\n     */\n    getDistance: function getDistance(touch1, touch2) {\n      var x = touch2.pageX - touch1.pageX,\n      y = touch2.pageY - touch1.pageY;\n      return Math.sqrt((x*x) + (y*y));\n    },\n\n\n    /**\n     * calculate the scale factor between two touchLists (fingers)\n     * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n     * @param   {Array}     start\n     * @param   {Array}     end\n     * @returns {Number}    scale\n     */\n    getScale: function getScale(start, end) {\n      // need two fingers...\n      if(start.length >= 2 && end.length >= 2) {\n        return this.getDistance(end[0], end[1]) /\n          this.getDistance(start[0], start[1]);\n      }\n      return 1;\n    },\n\n\n    /**\n     * calculate the rotation degrees between two touchLists (fingers)\n     * @param   {Array}     start\n     * @param   {Array}     end\n     * @returns {Number}    rotation\n     */\n    getRotation: function getRotation(start, end) {\n      // need two fingers\n      if(start.length >= 2 && end.length >= 2) {\n        return this.getAngle(end[1], end[0]) -\n          this.getAngle(start[1], start[0]);\n      }\n      return 0;\n    },\n\n\n    /**\n     * boolean if the direction is vertical\n     * @param    {String}    direction\n     * @returns  {Boolean}   is_vertical\n     */\n    isVertical: function isVertical(direction) {\n      return (direction == ionic.Gestures.DIRECTION_UP || direction == ionic.Gestures.DIRECTION_DOWN);\n    },\n\n\n    /**\n     * stop browser default behavior with css class\n     * @param   {HtmlElement}   element\n     * @param   {Object}        css_class\n     */\n    stopDefaultBrowserBehavior: function stopDefaultBrowserBehavior(element, css_class) {\n      // changed from making many style changes to just adding a preset classname\n      // less DOM manipulations, less code, and easier to control in the CSS side of things\n      // hammer.js doesn't come with CSS, but ionic does, which is why we prefer this method\n      if(element && element.classList) {\n        element.classList.add(css_class);\n        element.onselectstart = function() {\n          return false;\n        };\n      }\n    }\n  };\n\n\n  ionic.Gestures.detection = {\n    // contains all registred ionic.Gestures.gestures in the correct order\n    gestures: [],\n\n    // data of the current ionic.Gestures.gesture detection session\n    current: null,\n\n    // the previous ionic.Gestures.gesture session data\n    // is a full clone of the previous gesture.current object\n    previous: null,\n\n    // when this becomes true, no gestures are fired\n    stopped: false,\n\n\n    /**\n     * start ionic.Gestures.gesture detection\n     * @param   {ionic.Gestures.Instance}   inst\n     * @param   {Object}            eventData\n     */\n    startDetect: function startDetect(inst, eventData) {\n      // already busy with a ionic.Gestures.gesture detection on an element\n      if(this.current) {\n        return;\n      }\n\n      this.stopped = false;\n\n      this.current = {\n        inst        : inst, // reference to ionic.GesturesInstance we're working for\n        startEvent  : ionic.Gestures.utils.extend({}, eventData), // start eventData for distances, timing etc\n        lastEvent   : false, // last eventData\n        name        : '' // current gesture we're in/detected, can be 'tap', 'hold' etc\n      };\n\n      this.detect(eventData);\n    },\n\n\n    /**\n     * ionic.Gestures.gesture detection\n     * @param   {Object}    eventData\n     */\n    detect: function detect(eventData) {\n      if(!this.current || this.stopped) {\n        return;\n      }\n\n      // extend event data with calculations about scale, distance etc\n      eventData = this.extendEventData(eventData);\n\n      // instance options\n      var inst_options = this.current.inst.options;\n\n      // call ionic.Gestures.gesture handlers\n      for(var g=0,len=this.gestures.length; g<len; g++) {\n        var gesture = this.gestures[g];\n\n        // only when the instance options have enabled this gesture\n        if(!this.stopped && inst_options[gesture.name] !== false) {\n          // if a handler returns false, we stop with the detection\n          if(gesture.handler.call(gesture, eventData, this.current.inst) === false) {\n            this.stopDetect();\n            break;\n          }\n        }\n      }\n\n      // store as previous event event\n      if(this.current) {\n        this.current.lastEvent = eventData;\n      }\n\n      // endevent, but not the last touch, so dont stop\n      if(eventData.eventType == ionic.Gestures.EVENT_END && !eventData.touches.length-1) {\n        this.stopDetect();\n      }\n\n      return eventData;\n    },\n\n\n    /**\n     * clear the ionic.Gestures.gesture vars\n     * this is called on endDetect, but can also be used when a final ionic.Gestures.gesture has been detected\n     * to stop other ionic.Gestures.gestures from being fired\n     */\n    stopDetect: function stopDetect() {\n      // clone current data to the store as the previous gesture\n      // used for the double tap gesture, since this is an other gesture detect session\n      this.previous = ionic.Gestures.utils.extend({}, this.current);\n\n      // reset the current\n      this.current = null;\n\n      // stopped!\n      this.stopped = true;\n    },\n\n\n    /**\n     * extend eventData for ionic.Gestures.gestures\n     * @param   {Object}   ev\n     * @returns {Object}   ev\n     */\n    extendEventData: function extendEventData(ev) {\n      var startEv = this.current.startEvent;\n\n      // if the touches change, set the new touches over the startEvent touches\n      // this because touchevents don't have all the touches on touchstart, or the\n      // user must place his fingers at the EXACT same time on the screen, which is not realistic\n      // but, sometimes it happens that both fingers are touching at the EXACT same time\n      if(startEv && (ev.touches.length != startEv.touches.length || ev.touches === startEv.touches)) {\n        // extend 1 level deep to get the touchlist with the touch objects\n        startEv.touches = [];\n        for(var i=0,len=ev.touches.length; i<len; i++) {\n          startEv.touches.push(ionic.Gestures.utils.extend({}, ev.touches[i]));\n        }\n      }\n\n      var delta_time = ev.timeStamp - startEv.timeStamp,\n          delta_x = ev.center.pageX - startEv.center.pageX,\n          delta_y = ev.center.pageY - startEv.center.pageY,\n          velocity = ionic.Gestures.utils.getVelocity(delta_time, delta_x, delta_y);\n\n      ionic.Gestures.utils.extend(ev, {\n        deltaTime   : delta_time,\n\n        deltaX      : delta_x,\n        deltaY      : delta_y,\n\n        velocityX   : velocity.x,\n        velocityY   : velocity.y,\n\n        distance    : ionic.Gestures.utils.getDistance(startEv.center, ev.center),\n        angle       : ionic.Gestures.utils.getAngle(startEv.center, ev.center),\n        direction   : ionic.Gestures.utils.getDirection(startEv.center, ev.center),\n\n        scale       : ionic.Gestures.utils.getScale(startEv.touches, ev.touches),\n        rotation    : ionic.Gestures.utils.getRotation(startEv.touches, ev.touches),\n\n        startEvent  : startEv\n      });\n\n      return ev;\n    },\n\n\n    /**\n     * register new gesture\n     * @param   {Object}    gesture object, see gestures.js for documentation\n     * @returns {Array}     gestures\n     */\n    register: function register(gesture) {\n      // add an enable gesture options if there is no given\n      var options = gesture.defaults || {};\n      if(options[gesture.name] === undefined) {\n        options[gesture.name] = true;\n      }\n\n      // extend ionic.Gestures default options with the ionic.Gestures.gesture options\n      ionic.Gestures.utils.extend(ionic.Gestures.defaults, options, true);\n\n      // set its index\n      gesture.index = gesture.index || 1000;\n\n      // add ionic.Gestures.gesture to the list\n      this.gestures.push(gesture);\n\n      // sort the list by index\n      this.gestures.sort(function(a, b) {\n        if (a.index < b.index) {\n          return -1;\n        }\n        if (a.index > b.index) {\n          return 1;\n        }\n        return 0;\n      });\n\n      return this.gestures;\n    }\n  };\n\n\n  ionic.Gestures.gestures = ionic.Gestures.gestures || {};\n\n  /**\n   * Custom gestures\n   * ==============================\n   *\n   * Gesture object\n   * --------------------\n   * The object structure of a gesture:\n   *\n   * { name: 'mygesture',\n   *   index: 1337,\n   *   defaults: {\n   *     mygesture_option: true\n   *   }\n   *   handler: function(type, ev, inst) {\n   *     // trigger gesture event\n   *     inst.trigger(this.name, ev);\n   *   }\n   * }\n\n   * @param   {String}    name\n   * this should be the name of the gesture, lowercase\n   * it is also being used to disable/enable the gesture per instance config.\n   *\n   * @param   {Number}    [index=1000]\n   * the index of the gesture, where it is going to be in the stack of gestures detection\n   * like when you build an gesture that depends on the drag gesture, it is a good\n   * idea to place it after the index of the drag gesture.\n   *\n   * @param   {Object}    [defaults={}]\n   * the default settings of the gesture. these are added to the instance settings,\n   * and can be overruled per instance. you can also add the name of the gesture,\n   * but this is also added by default (and set to true).\n   *\n   * @param   {Function}  handler\n   * this handles the gesture detection of your custom gesture and receives the\n   * following arguments:\n   *\n   *      @param  {Object}    eventData\n   *      event data containing the following properties:\n   *          timeStamp   {Number}        time the event occurred\n   *          target      {HTMLElement}   target element\n   *          touches     {Array}         touches (fingers, pointers, mouse) on the screen\n   *          pointerType {String}        kind of pointer that was used. matches ionic.Gestures.POINTER_MOUSE|TOUCH\n   *          center      {Object}        center position of the touches. contains pageX and pageY\n   *          deltaTime   {Number}        the total time of the touches in the screen\n   *          deltaX      {Number}        the delta on x axis we haved moved\n   *          deltaY      {Number}        the delta on y axis we haved moved\n   *          velocityX   {Number}        the velocity on the x\n   *          velocityY   {Number}        the velocity on y\n   *          angle       {Number}        the angle we are moving\n   *          direction   {String}        the direction we are moving. matches ionic.Gestures.DIRECTION_UP|DOWN|LEFT|RIGHT\n   *          distance    {Number}        the distance we haved moved\n   *          scale       {Number}        scaling of the touches, needs 2 touches\n   *          rotation    {Number}        rotation of the touches, needs 2 touches *\n   *          eventType   {String}        matches ionic.Gestures.EVENT_START|MOVE|END\n   *          srcEvent    {Object}        the source event, like TouchStart or MouseDown *\n   *          startEvent  {Object}        contains the same properties as above,\n   *                                      but from the first touch. this is used to calculate\n   *                                      distances, deltaTime, scaling etc\n   *\n   *      @param  {ionic.Gestures.Instance}    inst\n   *      the instance we are doing the detection for. you can get the options from\n   *      the inst.options object and trigger the gesture event by calling inst.trigger\n   *\n   *\n   * Handle gestures\n   * --------------------\n   * inside the handler you can get/set ionic.Gestures.detectionic.current. This is the current\n   * detection sessionic. It has the following properties\n   *      @param  {String}    name\n   *      contains the name of the gesture we have detected. it has not a real function,\n   *      only to check in other gestures if something is detected.\n   *      like in the drag gesture we set it to 'drag' and in the swipe gesture we can\n   *      check if the current gesture is 'drag' by accessing ionic.Gestures.detectionic.current.name\n   *\n   *      readonly\n   *      @param  {ionic.Gestures.Instance}    inst\n   *      the instance we do the detection for\n   *\n   *      readonly\n   *      @param  {Object}    startEvent\n   *      contains the properties of the first gesture detection in this sessionic.\n   *      Used for calculations about timing, distance, etc.\n   *\n   *      readonly\n   *      @param  {Object}    lastEvent\n   *      contains all the properties of the last gesture detect in this sessionic.\n   *\n   * after the gesture detection session has been completed (user has released the screen)\n   * the ionic.Gestures.detectionic.current object is copied into ionic.Gestures.detectionic.previous,\n   * this is usefull for gestures like doubletap, where you need to know if the\n   * previous gesture was a tap\n   *\n   * options that have been set by the instance can be received by calling inst.options\n   *\n   * You can trigger a gesture event by calling inst.trigger(\"mygesture\", event).\n   * The first param is the name of your gesture, the second the event argument\n   *\n   *\n   * Register gestures\n   * --------------------\n   * When an gesture is added to the ionic.Gestures.gestures object, it is auto registered\n   * at the setup of the first ionic.Gestures instance. You can also call ionic.Gestures.detectionic.register\n   * manually and pass your gesture object as a param\n   *\n   */\n\n  /**\n   * Hold\n   * Touch stays at the same place for x time\n   * events  hold\n   */\n  ionic.Gestures.gestures.Hold = {\n    name: 'hold',\n    index: 10,\n    defaults: {\n      hold_timeout\t: 500,\n      hold_threshold\t: 1\n    },\n    timer: null,\n    handler: function holdGesture(ev, inst) {\n      switch(ev.eventType) {\n        case ionic.Gestures.EVENT_START:\n          // clear any running timers\n          clearTimeout(this.timer);\n\n          // set the gesture so we can check in the timeout if it still is\n          ionic.Gestures.detection.current.name = this.name;\n\n          // set timer and if after the timeout it still is hold,\n          // we trigger the hold event\n          this.timer = setTimeout(function() {\n            if(ionic.Gestures.detection.current.name == 'hold') {\n              inst.trigger('hold', ev);\n            }\n          }, inst.options.hold_timeout);\n          break;\n\n          // when you move or end we clear the timer\n        case ionic.Gestures.EVENT_MOVE:\n          if(ev.distance > inst.options.hold_threshold) {\n            clearTimeout(this.timer);\n          }\n          break;\n\n        case ionic.Gestures.EVENT_END:\n          clearTimeout(this.timer);\n          break;\n      }\n    }\n  };\n\n\n  /**\n   * Tap/DoubleTap\n   * Quick touch at a place or double at the same place\n   * events  tap, doubletap\n   */\n  ionic.Gestures.gestures.Tap = {\n    name: 'tap',\n    index: 100,\n    defaults: {\n      tap_max_touchtime\t: 250,\n      tap_max_distance\t: 10,\n      tap_always\t\t\t: true,\n      doubletap_distance\t: 20,\n      doubletap_interval\t: 300\n    },\n    handler: function tapGesture(ev, inst) {\n      if(ev.eventType == ionic.Gestures.EVENT_END) {\n        // previous gesture, for the double tap since these are two different gesture detections\n        var prev = ionic.Gestures.detection.previous,\n        did_doubletap = false;\n\n        // when the touchtime is higher then the max touch time\n        // or when the moving distance is too much\n        if(ev.deltaTime > inst.options.tap_max_touchtime ||\n            ev.distance > inst.options.tap_max_distance) {\n              return;\n            }\n\n        // check if double tap\n        if(prev && prev.name == 'tap' &&\n            (ev.timeStamp - prev.lastEvent.timeStamp) < inst.options.doubletap_interval &&\n            ev.distance < inst.options.doubletap_distance) {\n              inst.trigger('doubletap', ev);\n              did_doubletap = true;\n            }\n\n        // do a single tap\n        if(!did_doubletap || inst.options.tap_always) {\n          ionic.Gestures.detection.current.name = 'tap';\n          inst.trigger(ionic.Gestures.detection.current.name, ev);\n        }\n      }\n    }\n  };\n\n\n  /**\n   * Swipe\n   * triggers swipe events when the end velocity is above the threshold\n   * events  swipe, swipeleft, swiperight, swipeup, swipedown\n   */\n  ionic.Gestures.gestures.Swipe = {\n    name: 'swipe',\n    index: 40,\n    defaults: {\n      // set 0 for unlimited, but this can conflict with transform\n      swipe_max_touches  : 1,\n      swipe_velocity     : 0.7\n    },\n    handler: function swipeGesture(ev, inst) {\n      if(ev.eventType == ionic.Gestures.EVENT_END) {\n        // max touches\n        if(inst.options.swipe_max_touches > 0 &&\n            ev.touches.length > inst.options.swipe_max_touches) {\n              return;\n            }\n\n        // when the distance we moved is too small we skip this gesture\n        // or we can be already in dragging\n        if(ev.velocityX > inst.options.swipe_velocity ||\n            ev.velocityY > inst.options.swipe_velocity) {\n              // trigger swipe events\n              inst.trigger(this.name, ev);\n              inst.trigger(this.name + ev.direction, ev);\n            }\n      }\n    }\n  };\n\n\n  /**\n   * Drag\n   * Move with x fingers (default 1) around on the page. Blocking the scrolling when\n   * moving left and right is a good practice. When all the drag events are blocking\n   * you disable scrolling on that area.\n   * events  drag, drapleft, dragright, dragup, dragdown\n   */\n  ionic.Gestures.gestures.Drag = {\n    name: 'drag',\n    index: 50,\n    defaults: {\n      drag_min_distance : 10,\n      // Set correct_for_drag_min_distance to true to make the starting point of the drag\n      // be calculated from where the drag was triggered, not from where the touch started.\n      // Useful to avoid a jerk-starting drag, which can make fine-adjustments\n      // through dragging difficult, and be visually unappealing.\n      correct_for_drag_min_distance : true,\n      // set 0 for unlimited, but this can conflict with transform\n      drag_max_touches  : 1,\n      // prevent default browser behavior when dragging occurs\n      // be careful with it, it makes the element a blocking element\n      // when you are using the drag gesture, it is a good practice to set this true\n      drag_block_horizontal   : true,\n      drag_block_vertical     : true,\n      // drag_lock_to_axis keeps the drag gesture on the axis that it started on,\n      // It disallows vertical directions if the initial direction was horizontal, and vice versa.\n      drag_lock_to_axis       : false,\n      // drag lock only kicks in when distance > drag_lock_min_distance\n      // This way, locking occurs only when the distance has become large enough to reliably determine the direction\n      drag_lock_min_distance : 25\n    },\n    triggered: false,\n    handler: function dragGesture(ev, inst) {\n      // current gesture isnt drag, but dragged is true\n      // this means an other gesture is busy. now call dragend\n      if(ionic.Gestures.detection.current.name != this.name && this.triggered) {\n        inst.trigger(this.name +'end', ev);\n        this.triggered = false;\n        return;\n      }\n\n      // max touches\n      if(inst.options.drag_max_touches > 0 &&\n          ev.touches.length > inst.options.drag_max_touches) {\n            return;\n          }\n\n      switch(ev.eventType) {\n        case ionic.Gestures.EVENT_START:\n          this.triggered = false;\n          break;\n\n        case ionic.Gestures.EVENT_MOVE:\n          // when the distance we moved is too small we skip this gesture\n          // or we can be already in dragging\n          if(ev.distance < inst.options.drag_min_distance &&\n              ionic.Gestures.detection.current.name != this.name) {\n                return;\n              }\n\n          // we are dragging!\n          if(ionic.Gestures.detection.current.name != this.name) {\n            ionic.Gestures.detection.current.name = this.name;\n            if (inst.options.correct_for_drag_min_distance) {\n              // When a drag is triggered, set the event center to drag_min_distance pixels from the original event center.\n              // Without this correction, the dragged distance would jumpstart at drag_min_distance pixels instead of at 0.\n              // It might be useful to save the original start point somewhere\n              var factor = Math.abs(inst.options.drag_min_distance/ev.distance);\n              ionic.Gestures.detection.current.startEvent.center.pageX += ev.deltaX * factor;\n              ionic.Gestures.detection.current.startEvent.center.pageY += ev.deltaY * factor;\n\n              // recalculate event data using new start point\n              ev = ionic.Gestures.detection.extendEventData(ev);\n            }\n          }\n\n          // lock drag to axis?\n          if(ionic.Gestures.detection.current.lastEvent.drag_locked_to_axis || (inst.options.drag_lock_to_axis && inst.options.drag_lock_min_distance<=ev.distance)) {\n            ev.drag_locked_to_axis = true;\n          }\n          var last_direction = ionic.Gestures.detection.current.lastEvent.direction;\n          if(ev.drag_locked_to_axis && last_direction !== ev.direction) {\n            // keep direction on the axis that the drag gesture started on\n            if(ionic.Gestures.utils.isVertical(last_direction)) {\n              ev.direction = (ev.deltaY < 0) ? ionic.Gestures.DIRECTION_UP : ionic.Gestures.DIRECTION_DOWN;\n            }\n            else {\n              ev.direction = (ev.deltaX < 0) ? ionic.Gestures.DIRECTION_LEFT : ionic.Gestures.DIRECTION_RIGHT;\n            }\n          }\n\n          // first time, trigger dragstart event\n          if(!this.triggered) {\n            inst.trigger(this.name +'start', ev);\n            this.triggered = true;\n          }\n\n          // trigger normal event\n          inst.trigger(this.name, ev);\n\n          // direction event, like dragdown\n          inst.trigger(this.name + ev.direction, ev);\n\n          // block the browser events\n          if( (inst.options.drag_block_vertical && ionic.Gestures.utils.isVertical(ev.direction)) ||\n              (inst.options.drag_block_horizontal && !ionic.Gestures.utils.isVertical(ev.direction))) {\n                ev.preventDefault();\n              }\n          break;\n\n        case ionic.Gestures.EVENT_END:\n          // trigger dragend\n          if(this.triggered) {\n            inst.trigger(this.name +'end', ev);\n          }\n\n          this.triggered = false;\n          break;\n      }\n    }\n  };\n\n\n  /**\n   * Transform\n   * User want to scale or rotate with 2 fingers\n   * events  transform, pinch, pinchin, pinchout, rotate\n   */\n  ionic.Gestures.gestures.Transform = {\n    name: 'transform',\n    index: 45,\n    defaults: {\n      // factor, no scale is 1, zoomin is to 0 and zoomout until higher then 1\n      transform_min_scale     : 0.01,\n      // rotation in degrees\n      transform_min_rotation  : 1,\n      // prevent default browser behavior when two touches are on the screen\n      // but it makes the element a blocking element\n      // when you are using the transform gesture, it is a good practice to set this true\n      transform_always_block  : false\n    },\n    triggered: false,\n    handler: function transformGesture(ev, inst) {\n      // current gesture isnt drag, but dragged is true\n      // this means an other gesture is busy. now call dragend\n      if(ionic.Gestures.detection.current.name != this.name && this.triggered) {\n        inst.trigger(this.name +'end', ev);\n        this.triggered = false;\n        return;\n      }\n\n      // atleast multitouch\n      if(ev.touches.length < 2) {\n        return;\n      }\n\n      // prevent default when two fingers are on the screen\n      if(inst.options.transform_always_block) {\n        ev.preventDefault();\n      }\n\n      switch(ev.eventType) {\n        case ionic.Gestures.EVENT_START:\n          this.triggered = false;\n          break;\n\n        case ionic.Gestures.EVENT_MOVE:\n          var scale_threshold = Math.abs(1-ev.scale);\n          var rotation_threshold = Math.abs(ev.rotation);\n\n          // when the distance we moved is too small we skip this gesture\n          // or we can be already in dragging\n          if(scale_threshold < inst.options.transform_min_scale &&\n              rotation_threshold < inst.options.transform_min_rotation) {\n                return;\n              }\n\n          // we are transforming!\n          ionic.Gestures.detection.current.name = this.name;\n\n          // first time, trigger dragstart event\n          if(!this.triggered) {\n            inst.trigger(this.name +'start', ev);\n            this.triggered = true;\n          }\n\n          inst.trigger(this.name, ev); // basic transform event\n\n          // trigger rotate event\n          if(rotation_threshold > inst.options.transform_min_rotation) {\n            inst.trigger('rotate', ev);\n          }\n\n          // trigger pinch event\n          if(scale_threshold > inst.options.transform_min_scale) {\n            inst.trigger('pinch', ev);\n            inst.trigger('pinch'+ ((ev.scale < 1) ? 'in' : 'out'), ev);\n          }\n          break;\n\n        case ionic.Gestures.EVENT_END:\n          // trigger dragend\n          if(this.triggered) {\n            inst.trigger(this.name +'end', ev);\n          }\n\n          this.triggered = false;\n          break;\n      }\n    }\n  };\n\n\n  /**\n   * Touch\n   * Called as first, tells the user has touched the screen\n   * events  touch\n   */\n  ionic.Gestures.gestures.Touch = {\n    name: 'touch',\n    index: -Infinity,\n    defaults: {\n      // call preventDefault at touchstart, and makes the element blocking by\n      // disabling the scrolling of the page, but it improves gestures like\n      // transforming and dragging.\n      // be careful with using this, it can be very annoying for users to be stuck\n      // on the page\n      prevent_default: false,\n\n      // disable mouse events, so only touch (or pen!) input triggers events\n      prevent_mouseevents: false\n    },\n    handler: function touchGesture(ev, inst) {\n      if(inst.options.prevent_mouseevents && ev.pointerType == ionic.Gestures.POINTER_MOUSE) {\n        ev.stopDetect();\n        return;\n      }\n\n      if(inst.options.prevent_default) {\n        ev.preventDefault();\n      }\n\n      if(ev.eventType ==  ionic.Gestures.EVENT_START) {\n        inst.trigger(this.name, ev);\n      }\n    }\n  };\n\n\n  /**\n   * Release\n   * Called as last, tells the user has released the screen\n   * events  release\n   */\n  ionic.Gestures.gestures.Release = {\n    name: 'release',\n    index: Infinity,\n    handler: function releaseGesture(ev, inst) {\n      if(ev.eventType ==  ionic.Gestures.EVENT_END) {\n        inst.trigger(this.name, ev);\n      }\n    }\n  };\n})(window.ionic);\n\n(function(window, document, ionic) {\n\n  /**\n   * @ngdoc utility\n   * @name ionic.Platform\n   * @module ionic\n   */\n  ionic.Platform = {\n\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#isReady\n     * @returns {boolean} Whether the device is ready.\n     */\n    isReady: false,\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#isFullScreen\n     * @returns {boolean} Whether the device is fullscreen.\n     */\n    isFullScreen: false,\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#platforms\n     * @returns {Array(string)} An array of all platforms found.\n     */\n    platforms: null,\n    /**\n     * @ngdoc property\n     * @name ionic.Platform#grade\n     * @returns {string} What grade the current platform is.\n     */\n    grade: null,\n    ua: navigator.userAgent,\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#ready\n     * @description\n     * Trigger a callback once the device is ready,\n     * or immediately if the device is already ready.\n     * @param {function} callback The function to call.\n     */\n    ready: function(cb) {\n      // run through tasks to complete now that the device is ready\n      if(this.isReady) {\n        cb();\n      } else {\n        // the platform isn't ready yet, add it to this array\n        // which will be called once the platform is ready\n        readyCallbacks.push(cb);\n      }\n    },\n\n    /**\n     * @private\n     */\n    detect: function() {\n      ionic.Platform._checkPlatforms();\n\n      ionic.requestAnimationFrame(function(){\n        // only add to the body class if we got platform info\n        for(var i = 0; i < ionic.Platform.platforms.length; i++) {\n          document.body.classList.add('platform-' + ionic.Platform.platforms[i]);\n        }\n        document.body.classList.add('grade-' + ionic.Platform.grade);\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#device\n     * @description Return the current device (given by cordova).\n     * @returns {object} The device object.\n     */\n    device: function() {\n      if(window.device) return window.device;\n      if(this.isCordova()) console.error('device plugin required');\n      return {};\n    },\n\n    _checkPlatforms: function(platforms) {\n      this.platforms = [];\n      this.grade = 'a';\n\n      if(this.isCordova()) this.platforms.push('cordova');\n      if(this.isIPad()) this.platforms.push('ipad');\n\n      var platform = this.platform();\n      if(platform) {\n        this.platforms.push(platform);\n\n        var version = this.version();\n        if(version) {\n          var v = version.toString();\n          if(v.indexOf('.') > 0) {\n            v = v.replace('.', '_');\n          } else {\n            v += '_0';\n          }\n          this.platforms.push(platform + v.split('_')[0]);\n          this.platforms.push(platform + v);\n\n          if(this.isAndroid() && version < 4.4) {\n            this.grade = (version < 4 ? 'c' : 'b');\n          }\n        }\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isCordova\n     * @returns {boolean} Whether we are running on Cordova.\n     */\n    isCordova: function() {\n      return !(!window.cordova && !window.PhoneGap && !window.phonegap);\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isIPad\n     * @returns {boolean} Whether we are running on iPad.\n     */\n    isIPad: function() {\n      return this.ua.toLowerCase().indexOf('ipad') >= 0;\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isIOS\n     * @returns {boolean} Whether we are running on iOS.\n     */\n    isIOS: function() {\n      return this.is('ios');\n    },\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#isAndroid\n     * @returns {boolean} Whether we are running on Android.\n     */\n    isAndroid: function() {\n      return this.is('android');\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#platform\n     * @returns {string} The name of the current platform.\n     */\n    platform: function() {\n      // singleton to get the platform name\n      if(platformName === null) this.setPlatform(this.device().platform);\n      return platformName;\n    },\n\n    /**\n     * @private\n     */\n    setPlatform: function(n) {\n      if(typeof n != 'undefined' && n !== null && n.length) {\n        platformName = n.toLowerCase();\n      } else if(this.ua.indexOf('Android') > 0) {\n        platformName = 'android';\n      } else if(this.ua.indexOf('iPhone') > -1 || this.ua.indexOf('iPad') > -1 || this.ua.indexOf('iPod') > -1) {\n        platformName = 'ios';\n      } else {\n        platformName = '';\n      }\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#version\n     * @returns {string} The version of the current device platform.\n     */\n    version: function() {\n      // singleton to get the platform version\n      if(platformVersion === null) this.setVersion(this.device().version);\n      return platformVersion;\n    },\n\n    /**\n     * @private\n     */\n    setVersion: function(v) {\n      if(typeof v != 'undefined' && v !== null) {\n        v = v.split('.');\n        v = parseFloat(v[0] + '.' + (v.length > 1 ? v[1] : 0));\n        if(!isNaN(v)) {\n          platformVersion = v;\n          return;\n        }\n      }\n\n      platformVersion = 0;\n\n      // fallback to user-agent checking\n      var pName = this.platform();\n      var versionMatch = {\n        'android': /Android (\\d+).(\\d+)?/,\n        'ios': /OS (\\d+)_(\\d+)?/\n      };\n      if(versionMatch[pName]) {\n        v = this.ua.match( versionMatch[pName] );\n        if(v.length > 2) {\n          platformVersion = parseFloat( v[1] + '.' + v[2] );\n        }\n      }\n    },\n\n    // Check if the platform is the one detected by cordova\n    is: function(type) {\n      type = type.toLowerCase();\n      // check if it has an array of platforms\n      if(this.platforms) {\n        for(var x = 0; x < this.platforms.length; x++) {\n          if(this.platforms[x] === type) return true;\n        }\n      }\n      // exact match\n      var pName = this.platform();\n      if(pName) {\n        return pName === type.toLowerCase();\n      }\n\n      // A quick hack for to check userAgent\n      return this.ua.toLowerCase().indexOf(type) >= 0;\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#exitApp\n     * @description Exit the app.\n     */\n    exitApp: function() {\n      this.ready(function(){\n        navigator.app && navigator.app.exitApp && navigator.app.exitApp();\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#showStatusBar\n     * @description Shows or hides the device status bar (in Cordova).\n     * @param {boolean} shouldShow Whether or not to show the status bar.\n     */\n    showStatusBar: function(val) {\n      // Only useful when run within cordova\n      this._showStatusBar = val;\n      this.ready(function(){\n        // run this only when or if the platform (cordova) is ready\n        ionic.requestAnimationFrame(function(){\n          if(ionic.Platform._showStatusBar) {\n            // they do not want it to be full screen\n            window.StatusBar && window.StatusBar.show();\n            document.body.classList.remove('status-bar-hide');\n          } else {\n            // it should be full screen\n            window.StatusBar && window.StatusBar.hide();\n            document.body.classList.add('status-bar-hide');\n          }\n        });\n      });\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionic.Platform#fullScreen\n     * @description\n     * Sets whether the app is fullscreen or not (in Cordova).\n     * @param {boolean=} showFullScreen Whether or not to set the app to fullscreen. Defaults to true.\n     * @param {boolean=} showStatusBar Whether or not to show the device's status bar. Defaults to false.\n     */\n    fullScreen: function(showFullScreen, showStatusBar) {\n      // showFullScreen: default is true if no param provided\n      this.isFullScreen = (showFullScreen !== false);\n\n      // add/remove the fullscreen classname to the body\n      ionic.DomUtil.ready(function(){\n        // run this only when or if the DOM is ready\n        ionic.requestAnimationFrame(function(){\n          if(ionic.Platform.isFullScreen) {\n            document.body.classList.add('fullscreen');\n          } else {\n            document.body.classList.remove('fullscreen');\n          }\n        });\n        // showStatusBar: default is false if no param provided\n        ionic.Platform.showStatusBar( (showStatusBar === true) );\n      });\n    }\n\n  };\n\n  var platformName = null, // just the name, like iOS or Android\n  platformVersion = null, // a float of the major and minor, like 7.1\n  readyCallbacks = [];\n\n  // setup listeners to know when the device is ready to go\n  function onWindowLoad() {\n    if(ionic.Platform.isCordova()) {\n      // the window and scripts are fully loaded, and a cordova/phonegap\n      // object exists then let's listen for the deviceready\n      document.addEventListener(\"deviceready\", onPlatformReady, false);\n    } else {\n      // the window and scripts are fully loaded, but the window object doesn't have the\n      // cordova/phonegap object, so its just a browser, not a webview wrapped w/ cordova\n      onPlatformReady();\n    }\n    window.removeEventListener(\"load\", onWindowLoad, false);\n  }\n  window.addEventListener(\"load\", onWindowLoad, false);\n\n  function onPlatformReady() {\n    // the device is all set to go, init our own stuff then fire off our event\n    ionic.Platform.isReady = true;\n    ionic.Platform.detect();\n    for(var x=0; x<readyCallbacks.length; x++) {\n      // fire off all the callbacks that were added before the platform was ready\n      readyCallbacks[x]();\n    }\n    readyCallbacks = [];\n    ionic.trigger('platformready', { target: document });\n\n    ionic.requestAnimationFrame(function(){\n      document.body.classList.add('platform-ready');\n    });\n  }\n\n})(this, document, ionic);\n\n(function(document, ionic) {\n  'use strict';\n\n  // Ionic CSS polyfills\n  ionic.CSS = {};\n\n  (function() {\n\n    // transform\n    var i, keys = ['webkitTransform', 'transform', '-webkit-transform', 'webkit-transform',\n                '-moz-transform', 'moz-transform', 'MozTransform', 'mozTransform'];\n\n    for(i = 0; i < keys.length; i++) {\n      if(document.documentElement.style[keys[i]] !== undefined) {\n        ionic.CSS.TRANSFORM = keys[i];\n        break;\n      }\n    }\n\n    // transition\n    keys = ['webkitTransition', 'mozTransition', 'transition'];\n    for(i = 0; i < keys.length; i++) {\n      if(document.documentElement.style[keys[i]] !== undefined) {\n        ionic.CSS.TRANSITION = keys[i];\n        break;\n      }\n    }\n\n  })();\n\n  // classList polyfill for them older Androids\n  // https://gist.github.com/devongovett/1381839\n  if (!(\"classList\" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== 'undefined') {\n    Object.defineProperty(HTMLElement.prototype, 'classList', {\n      get: function() {\n        var self = this;\n        function update(fn) {\n          return function() {\n            var x, classes = self.className.split(/\\s+/);\n\n            for(x=0; x<arguments.length; x++) {\n              fn(classes, classes.indexOf(arguments[x]), arguments[x]);\n            }\n\n            self.className = classes.join(\" \");\n          };\n        }\n\n        return {\n          add: update(function(classes, index, value) {\n            ~index || classes.push(value);\n          }),\n\n          remove: update(function(classes, index) {\n            ~index && classes.splice(index, 1);\n          }),\n\n          toggle: update(function(classes, index, value) {\n            ~index ? classes.splice(index, 1) : classes.push(value);\n          }),\n\n          contains: function(value) {\n            return !!~self.className.split(/\\s+/).indexOf(value);\n          },\n\n          item: function(i) {\n            return self.className.split(/\\s+/)[i] || null;\n          }\n        };\n\n      }\n    });\n  }\n\n})(document, ionic);\n\n(function(window, document, ionic) {\n  'use strict';\n\n  // polyfill use to simulate native \"tap\"\n  ionic.tapElement = function(target, e) {\n    // simulate a normal click by running the element's click method then focus on it\n\n    var ele = target.control || target;\n\n    if(ele.disabled || ele.type === 'file' || ele.type === 'range') return;\n\n    console.debug('tapElement', ele.tagName, ele.className);\n\n    var c = getCoordinates(e);\n\n    // using initMouseEvent instead of MouseEvent for our Android friends\n    var clickEvent = document.createEvent(\"MouseEvents\");\n    clickEvent.initMouseEvent('click', true, true, window,\n                              1, 0, 0, c.x, c.y,\n                              false, false, false, false, 0, null);\n\n    ele.dispatchEvent(clickEvent);\n\n    if(ele.tagName === 'INPUT' || ele.tagName === 'TEXTAREA') {\n      ele.focus();\n      e.preventDefault();\n    } else {\n      blurActive();\n    }\n\n    // remember the coordinates of this tap so if it happens again we can ignore it\n    // but only if the coordinates are not already being actively disabled\n    if( !isRecentTap(e) ) {\n      recordCoordinates(e);\n    }\n\n    if(target.control) {\n      console.debug('tapElement, target.control, stop');\n      return stopEvent(e);\n    }\n  };\n\n  function tapPolyfill(orgEvent) {\n    // if the source event wasn't from a touch event then don't use this polyfill\n    if(!orgEvent.gesture || !orgEvent.gesture.srcEvent) return;\n\n    var e = orgEvent.gesture.srcEvent; // evaluate the actual source event, not the created event by gestures.js\n    var ele = e.target;\n\n    if( isRecentTap(e) ) {\n      // if a tap in the same area just happened, don't continue\n      console.debug('tapPolyfill', 'isRecentTap', ele.tagName);\n      return stopEvent(e);\n    }\n\n    for(var x=0; x<5; x++) {\n      // climb up the DOM looking to see if the tapped element is, or has a parent, of one of these\n      // only climb up a max of 5 parents, anything more probably isn't beneficial\n      if(!ele) break;\n\n      if( ele.tagName === \"INPUT\" ||\n          ele.tagName === \"A\" ||\n          ele.tagName === \"BUTTON\" ||\n          ele.tagName === \"LABEL\" ||\n          ele.tagName === \"TEXTAREA\" ) {\n\n        return ionic.tapElement(ele, e);\n      }\n      ele = ele.parentElement;\n    }\n\n    // they didn't tap one of the above elements\n    // if the currently active element is an input, and they tapped outside\n    // of the current input, then unset its focus (blur) so the keyboard goes away\n    blurActive();\n  }\n\n  function preventGhostClick(e) {\n\n    console.debug((function(){\n      // Great for debugging, and thankfully this gets removed from the build, OMG it's ugly\n\n      if(e.target.control) {\n        // this is a label that has an associated input\n        // the native layer will send the actual event, so stop this one\n        console.debug('preventGhostClick', 'label');\n\n      } else if(isRecentTap(e)) {\n        // a tap has already happened at these coordinates recently, ignore this event\n        console.debug('preventGhostClick', 'isRecentTap', e.target.tagName);\n\n      } else if(isScrolledSinceStart(e)) {\n        // this click's coordinates are different than its touchstart/mousedown, must have been scrolling\n        console.debug('preventGhostClick', 'isScrolledSinceStart, startCoordinates, x:' + startCoordinates.x + ' y:' + startCoordinates.y);\n      }\n\n      var c = getCoordinates(e);\n      return 'click at x:' + c.x + ', y:' + c.y;\n    })());\n\n\n    if(e.target.control || isRecentTap(e) || isScrolledSinceStart(e)) {\n      return stopEvent(e);\n    }\n\n    // remember the coordinates of this click so if a tap or click in the\n    // same area quickly happened again we can ignore it\n    recordCoordinates(e);\n  }\n\n  function isRecentTap(event) {\n    // loop through the tap coordinates and see if the same area has been tapped recently\n    var tapId, existingCoordinates, currentCoordinates;\n\n    for(tapId in tapCoordinates) {\n      existingCoordinates = tapCoordinates[tapId];\n      if(!currentCoordinates) currentCoordinates = getCoordinates(event); // lazy load it when needed\n\n      if(currentCoordinates.x > existingCoordinates.x - HIT_RADIUS &&\n         currentCoordinates.x < existingCoordinates.x + HIT_RADIUS &&\n         currentCoordinates.y > existingCoordinates.y - HIT_RADIUS &&\n         currentCoordinates.y < existingCoordinates.y + HIT_RADIUS) {\n        // the current tap coordinates are in the same area as a recent tap\n        return existingCoordinates;\n      }\n    }\n  }\n\n  function isScrolledSinceStart(event) {\n    // check if this click's coordinates are different than its touchstart/mousedown\n    var c = getCoordinates(event);\n\n    // Quick check for 0,0 which could be simulated mouse click for form submission\n    if(c.x === 0 && c.y === 0) {\n      return false;\n    }\n\n    return (c.x > startCoordinates.x + 2 ||\n            c.x < startCoordinates.x - 2 ||\n            c.y > startCoordinates.y + 2 ||\n            c.y < startCoordinates.y - 2);\n  }\n\n  function recordCoordinates(event) {\n    var c = getCoordinates(event);\n    if(c.x && c.y) {\n      var tapId = Date.now();\n\n      // only record tap coordinates if we have valid ones\n      tapCoordinates[tapId] = { x: c.x, y: c.y, id: tapId };\n\n      setTimeout(function() {\n        // delete the tap coordinates after X milliseconds, basically allowing\n        // it so a tap can happen again in the same area in the future\n        delete tapCoordinates[tapId];\n      }, CLICK_PREVENT_DURATION);\n    }\n  }\n\n  function getCoordinates(event) {\n    // This method can get coordinates for both a mouse click\n    // or a touch depending on the given event\n    var gesture = (event.gesture ? event.gesture : event);\n\n    if(gesture) {\n      var touches = gesture.touches && gesture.touches.length ? gesture.touches : [gesture];\n      var e = (gesture.changedTouches && gesture.changedTouches[0]) ||\n          (gesture.originalEvent && gesture.originalEvent.changedTouches &&\n              gesture.originalEvent.changedTouches[0]) ||\n          touches[0].originalEvent || touches[0];\n\n      if(e) return { x: e.clientX || e.pageX, y: e.clientY || e.pageY };\n    }\n    return { x:0, y:0 };\n  }\n\n  var clickPreventTimerId;\n  function removeClickPrevent(e) {\n    clearTimeout(clickPreventTimerId);\n    clickPreventTimerId = setTimeout(function(){\n      var tap = isRecentTap(e);\n      if(tap) delete tapCoordinates[tap.id];\n      startCoordinates = {};\n    }, REMOVE_PREVENT_DELAY);\n  }\n\n  function stopEvent(e){\n    e.stopPropagation();\n    e.preventDefault();\n    return false;\n  }\n\n  function blurActive() {\n    var ele = document.activeElement;\n    if(ele && (ele.tagName === \"INPUT\" ||\n               ele.tagName === \"TEXTAREA\")) {\n      // using a timeout to prevent funky scrolling while a keyboard hides\n      setTimeout(function(){\n        ele.blur();\n      }, 400);\n    }\n  }\n\n  function recordStartCoordinates(e) {\n    startCoordinates = getCoordinates(e);\n  }\n\n  var tapCoordinates = {}; // used to remember coordinates to ignore if they happen again quickly\n  var startCoordinates = {}; // used to remember where the coordinates of the start of the tap\n  var CLICK_PREVENT_DURATION = 1500; // max milliseconds ghostclicks in the same area should be prevented\n  var REMOVE_PREVENT_DELAY = 380; // delay after a touchend/mouseup before removing the ghostclick prevent\n  var HIT_RADIUS = 15;\n\n  ionic.Platform.ready(function(){\n\n    if(ionic.Platform.grade === 'c') {\n      // low performing phones should have a longer ghostclick prevent\n      REMOVE_PREVENT_DELAY = 800;\n    }\n\n    // set global click handler and check if the event should stop or not\n    document.addEventListener('click', preventGhostClick, true);\n\n    // global release event listener polyfill for HTML elements that were tapped or held\n    ionic.on(\"release\", tapPolyfill, document);\n\n    // listeners used to remove ghostclick prevention\n    document.addEventListener('touchend', removeClickPrevent, false);\n    document.addEventListener('mouseup', removeClickPrevent, false);\n\n    // in the case the user touched the screen, then scrolled, it shouldn't fire the click\n    document.addEventListener('touchstart', recordStartCoordinates, false);\n    document.addEventListener('mousedown', recordStartCoordinates, false);\n  });\n\n})(this, document, ionic);\n\n(function(document, ionic) {\n  'use strict';\n\n  var queueElements = {};   // elements that should get an active state in XX milliseconds\n  var activeElements = {};  // elements that are currently active\n  var keyId = 0;            // a counter for unique keys for the above ojects\n\n  ionic.activator = {\n\n    start: function(e) {\n      // when an element is touched/clicked, it climbs up a few\n      // parents to see if it is an .item or .button element\n      ionic.requestAnimationFrame(function(){\n        var ele = e.target;\n        var eleToActivate;\n\n        for(var x=0; x<4; x++) {\n          if(!ele) break;\n          if(eleToActivate && ele.classList.contains('item')) {\n            eleToActivate = ele;\n            break;\n          }\n          if( ele.tagName == 'A' || ele.tagName == 'BUTTON' || ele.getAttribute('ng-click') ) {\n            eleToActivate = ele;\n          }\n          if( ele.classList.contains('button') ) {\n            eleToActivate = ele;\n            break;\n          }\n          ele = ele.parentElement;\n        }\n\n        if(eleToActivate) {\n          // queue that this element should be set to active\n          queueElements[keyId] = eleToActivate;\n\n          // in XX milliseconds, set the queued elements to active\n          // add listeners to clear all queued/active elements onMove\n          if(e.type === 'touchstart') {\n            document.body.removeEventListener('mousedown', ionic.activator.start);\n            document.body.addEventListener('touchmove', clear, false);\n            setTimeout(activateElements, 85);\n          } else {\n            document.body.addEventListener('mousemove', clear, false);\n            ionic.requestAnimationFrame(activateElements);\n          }\n\n          keyId = (keyId > 19 ? 0 : keyId + 1);\n        }\n\n      });\n    }\n  };\n\n  function activateElements() {\n    // activate all elements in the queue\n    for(var key in queueElements) {\n      if(queueElements[key]) {\n        queueElements[key].classList.add('active');\n        activeElements[key] = queueElements[key];\n      }\n    }\n    queueElements = {};\n  }\n\n  function deactivateElements() {\n    for(var key in activeElements) {\n      if(activeElements[key]) {\n        activeElements[key].classList.remove('active');\n        delete activeElements[key];\n      }\n    }\n  }\n\n  function onEnd(e) {\n    // clear out any active/queued elements after XX milliseconds\n    setTimeout(clear, 200);\n  }\n\n  function clear() {\n    // clear out any elements that are queued to be set to active\n    queueElements = {};\n\n    // in the next frame, remove the active class from all active elements\n    ionic.requestAnimationFrame(deactivateElements);\n\n    // remove onMove listeners that clear out active elements\n    document.body.removeEventListener('mousemove', clear);\n    document.body.removeEventListener('touchmove', clear);\n  }\n\n  // use window.onload because this doesn't need to run immediately\n  window.addEventListener('load', function(){\n    // start an active element\n    document.body.addEventListener('touchstart', ionic.activator.start, false);\n    document.body.addEventListener('mousedown', ionic.activator.start, false);\n\n    // clear all active elements after XX milliseconds\n    document.body.addEventListener('touchend', onEnd, false);\n    document.body.addEventListener('mouseup', onEnd, false);\n    document.body.addEventListener('touchcancel', onEnd, false);\n  }, false);\n\n})(document, ionic);\n\n(function(ionic) {\n\n  /* for nextUid() function below */\n  var uid = ['0','0','0'];\n\n  /**\n   * Various utilities used throughout Ionic\n   *\n   * Some of these are adopted from underscore.js and backbone.js, both also MIT licensed.\n   */\n  ionic.Utils = {\n\n    arrayMove: function (arr, old_index, new_index) {\n      if (new_index >= arr.length) {\n        var k = new_index - arr.length;\n        while ((k--) + 1) {\n          arr.push(undefined);\n        }\n      }\n      arr.splice(new_index, 0, arr.splice(old_index, 1)[0]);\n      return arr;\n    },\n\n    /**\n     * Return a function that will be called with the given context\n     */\n    proxy: function(func, context) {\n      var args = Array.prototype.slice.call(arguments, 2);\n      return function() {\n        return func.apply(context, args.concat(Array.prototype.slice.call(arguments)));\n      };\n    },\n\n    /**\n     * Only call a function once in the given interval.\n     *\n     * @param func {Function} the function to call\n     * @param wait {int} how long to wait before/after to allow function calls\n     * @param immediate {boolean} whether to call immediately or after the wait interval\n     */\n     debounce: function(func, wait, immediate) {\n      var timeout, args, context, timestamp, result;\n      return function() {\n        context = this;\n        args = arguments;\n        timestamp = new Date();\n        var later = function() {\n          var last = (new Date()) - timestamp;\n          if (last < wait) {\n            timeout = setTimeout(later, wait - last);\n          } else {\n            timeout = null;\n            if (!immediate) result = func.apply(context, args);\n          }\n        };\n        var callNow = immediate && !timeout;\n        if (!timeout) {\n          timeout = setTimeout(later, wait);\n        }\n        if (callNow) result = func.apply(context, args);\n        return result;\n      };\n    },\n\n    /**\n     * Throttle the given fun, only allowing it to be\n     * called at most every `wait` ms.\n     */\n    throttle: function(func, wait, options) {\n      var context, args, result;\n      var timeout = null;\n      var previous = 0;\n      options || (options = {});\n      var later = function() {\n        previous = options.leading === false ? 0 : Date.now();\n        timeout = null;\n        result = func.apply(context, args);\n      };\n      return function() {\n        var now = Date.now();\n        if (!previous && options.leading === false) previous = now;\n        var remaining = wait - (now - previous);\n        context = this;\n        args = arguments;\n        if (remaining <= 0) {\n          clearTimeout(timeout);\n          timeout = null;\n          previous = now;\n          result = func.apply(context, args);\n        } else if (!timeout && options.trailing !== false) {\n          timeout = setTimeout(later, remaining);\n        }\n        return result;\n      };\n    },\n     // Borrowed from Backbone.js's extend\n     // Helper function to correctly set up the prototype chain, for subclasses.\n     // Similar to `goog.inherits`, but uses a hash of prototype properties and\n     // class properties to be extended.\n    inherit: function(protoProps, staticProps) {\n      var parent = this;\n      var child;\n\n      // The constructor function for the new subclass is either defined by you\n      // (the \"constructor\" property in your `extend` definition), or defaulted\n      // by us to simply call the parent's constructor.\n      if (protoProps && protoProps.hasOwnProperty('constructor')) {\n        child = protoProps.constructor;\n      } else {\n        child = function(){ return parent.apply(this, arguments); };\n      }\n\n      // Add static properties to the constructor function, if supplied.\n      ionic.extend(child, parent, staticProps);\n\n      // Set the prototype chain to inherit from `parent`, without calling\n      // `parent`'s constructor function.\n      var Surrogate = function(){ this.constructor = child; };\n      Surrogate.prototype = parent.prototype;\n      child.prototype = new Surrogate;\n\n      // Add prototype properties (instance properties) to the subclass,\n      // if supplied.\n      if (protoProps) ionic.extend(child.prototype, protoProps);\n\n      // Set a convenience property in case the parent's prototype is needed\n      // later.\n      child.__super__ = parent.prototype;\n\n      return child;\n    },\n\n    // Extend adapted from Underscore.js\n    extend: function(obj) {\n       var args = Array.prototype.slice.call(arguments, 1);\n       for(var i = 0; i < args.length; i++) {\n         var source = args[i];\n         if (source) {\n           for (var prop in source) {\n             obj[prop] = source[prop];\n           }\n         }\n       }\n       return obj;\n    },\n\n    /**\n     * A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric\n     * characters such as '012ABC'. The reason why we are not using simply a number counter is that\n     * the number string gets longer over time, and it can also overflow, where as the nextId\n     * will grow much slower, it is a string, and it will never overflow.\n     *\n     * @returns an unique alpha-numeric string\n     */\n    nextUid: function() {\n      var index = uid.length;\n      var digit;\n\n      while(index) {\n        index--;\n        digit = uid[index].charCodeAt(0);\n        if (digit == 57 /*'9'*/) {\n          uid[index] = 'A';\n          return uid.join('');\n        }\n        if (digit == 90  /*'Z'*/) {\n          uid[index] = '0';\n        } else {\n          uid[index] = String.fromCharCode(digit + 1);\n          return uid.join('');\n        }\n      }\n      uid.unshift('0');\n      return uid.join('');\n    }\n  };\n\n  // Bind a few of the most useful functions to the ionic scope\n  ionic.inherit = ionic.Utils.inherit;\n  ionic.extend = ionic.Utils.extend;\n  ionic.throttle = ionic.Utils.throttle;\n  ionic.proxy = ionic.Utils.proxy;\n  ionic.debounce = ionic.Utils.debounce;\n\n})(window.ionic);\n\n(function(ionic) {\n\nionic.Platform.ready(function() {\n  if (ionic.Platform.is('android')) {\n    androidKeyboardFix();\n  }\n});\n\nfunction androidKeyboardFix() {\n  var rememberedDeviceWidth = window.innerWidth;\n  var rememberedDeviceHeight = window.innerHeight;\n  var keyboardHeight;\n\n  window.addEventListener('resize', resize);\n\n  function resize() {\n\n    //If the width of the window changes, we have an orientation change\n    if (rememberedDeviceWidth !== window.innerWidth) {\n      rememberedDeviceWidth = window.innerWidth;\n      rememberedDeviceHeight = window.innerHeight;\n      console.info('orientation change. deviceWidth =', rememberedDeviceWidth, ', deviceHeight =', rememberedDeviceHeight);\n\n    //If the height changes, and it's less than before, we have a keyboard open\n    } else if (rememberedDeviceHeight !== window.innerHeight &&\n               window.innerHeight < rememberedDeviceHeight) {\n      document.body.classList.add('footer-hide');\n      //Wait for next frame so document.activeElement is set\n      ionic.requestAnimationFrame(handleKeyboardChange);\n    } else {\n      //Otherwise we have a keyboard close or a *really* weird resize\n      document.body.classList.remove('footer-hide');\n    }\n\n    function handleKeyboardChange() {\n      //keyboard opens\n      keyboardHeight = rememberedDeviceHeight - window.innerHeight;\n      var activeEl = document.activeElement;\n      if (activeEl) {\n        //This event is caught by the nearest parent scrollView\n        //of the activeElement\n        ionic.trigger('scrollChildIntoView', {\n          target: activeEl\n        }, true);\n      }\n\n    }\n  }\n}\n\n})(window.ionic);\n\n(function(ionic) {\n'use strict';\n  ionic.views.View = function() {\n    this.initialize.apply(this, arguments);\n  };\n\n  ionic.views.View.inherit = ionic.inherit;\n\n  ionic.extend(ionic.views.View.prototype, {\n    initialize: function() {}\n  });\n\n})(window.ionic);\n\nvar IS_INPUT_LIKE_REGEX = /input|textarea|select/i;\nvar IS_EMBEDDED_OBJECT_REGEX = /object|embed/i;\n/*\n * Scroller\n * http://github.com/zynga/scroller\n *\n * Copyright 2011, Zynga Inc.\n * Licensed under the MIT License.\n * https://raw.github.com/zynga/scroller/master/MIT-LICENSE.txt\n *\n * Based on the work of: Unify Project (unify-project.org)\n * http://unify-project.org\n * Copyright 2011, Deutsche Telekom AG\n * License: MIT + Apache (V2)\n */\n\n/**\n * Generic animation class with support for dropped frames both optional easing and duration.\n *\n * Optional duration is useful when the lifetime is defined by another condition than time\n * e.g. speed of an animating object, etc.\n *\n * Dropped frame logic allows to keep using the same updater logic independent from the actual\n * rendering. This eases a lot of cases where it might be pretty complex to break down a state\n * based on the pure time difference.\n */\n(function(global) {\n\tvar time = Date.now || function() {\n\t\treturn +new Date();\n\t};\n\tvar desiredFrames = 60;\n\tvar millisecondsPerSecond = 1000;\n\tvar running = {};\n\tvar counter = 1;\n\n\t// Create namespaces\n\tif (!global.core) {\n\t\tvar core = global.core = { effect : {} };\n\n\t} else if (!core.effect) {\n\t\tcore.effect = {};\n\t}\n\n\tcore.effect.Animate = {\n\n\t\t/**\n\t\t * A requestAnimationFrame wrapper / polyfill.\n\t\t *\n\t\t * @param callback {Function} The callback to be invoked before the next repaint.\n\t\t * @param root {HTMLElement} The root element for the repaint\n\t\t */\n\t\trequestAnimationFrame: (function() {\n\n\t\t\t// Check for request animation Frame support\n\t\t\tvar requestFrame = global.requestAnimationFrame || global.webkitRequestAnimationFrame || global.mozRequestAnimationFrame || global.oRequestAnimationFrame;\n\t\t\tvar isNative = !!requestFrame;\n\n\t\t\tif (requestFrame && !/requestAnimationFrame\\(\\)\\s*\\{\\s*\\[native code\\]\\s*\\}/i.test(requestFrame.toString())) {\n\t\t\t\tisNative = false;\n\t\t\t}\n\n\t\t\tif (isNative) {\n\t\t\t\treturn function(callback, root) {\n\t\t\t\t\trequestFrame(callback, root)\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar TARGET_FPS = 60;\n\t\t\tvar requests = {};\n\t\t\tvar requestCount = 0;\n\t\t\tvar rafHandle = 1;\n\t\t\tvar intervalHandle = null;\n\t\t\tvar lastActive = +new Date();\n\n\t\t\treturn function(callback, root) {\n\t\t\t\tvar callbackHandle = rafHandle++;\n\n\t\t\t\t// Store callback\n\t\t\t\trequests[callbackHandle] = callback;\n\t\t\t\trequestCount++;\n\n\t\t\t\t// Create timeout at first request\n\t\t\t\tif (intervalHandle === null) {\n\n\t\t\t\t\tintervalHandle = setInterval(function() {\n\n\t\t\t\t\t\tvar time = +new Date();\n\t\t\t\t\t\tvar currentRequests = requests;\n\n\t\t\t\t\t\t// Reset data structure before executing callbacks\n\t\t\t\t\t\trequests = {};\n\t\t\t\t\t\trequestCount = 0;\n\n\t\t\t\t\t\tfor(var key in currentRequests) {\n\t\t\t\t\t\t\tif (currentRequests.hasOwnProperty(key)) {\n\t\t\t\t\t\t\t\tcurrentRequests[key](time);\n\t\t\t\t\t\t\t\tlastActive = time;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Disable the timeout when nothing happens for a certain\n\t\t\t\t\t\t// period of time\n\t\t\t\t\t\tif (time - lastActive > 2500) {\n\t\t\t\t\t\t\tclearInterval(intervalHandle);\n\t\t\t\t\t\t\tintervalHandle = null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}, 1000 / TARGET_FPS);\n\t\t\t\t}\n\n\t\t\t\treturn callbackHandle;\n\t\t\t};\n\n\t\t})(),\n\n\n\t\t/**\n\t\t * Stops the given animation.\n\t\t *\n\t\t * @param id {Integer} Unique animation ID\n\t\t * @return {Boolean} Whether the animation was stopped (aka, was running before)\n\t\t */\n\t\tstop: function(id) {\n\t\t\tvar cleared = running[id] != null;\n\t\t\tif (cleared) {\n\t\t\t\trunning[id] = null;\n\t\t\t}\n\n\t\t\treturn cleared;\n\t\t},\n\n\n\t\t/**\n\t\t * Whether the given animation is still running.\n\t\t *\n\t\t * @param id {Integer} Unique animation ID\n\t\t * @return {Boolean} Whether the animation is still running\n\t\t */\n\t\tisRunning: function(id) {\n\t\t\treturn running[id] != null;\n\t\t},\n\n\n\t\t/**\n\t\t * Start the animation.\n\t\t *\n\t\t * @param stepCallback {Function} Pointer to function which is executed on every step.\n\t\t *   Signature of the method should be `function(percent, now, virtual) { return continueWithAnimation; }`\n\t\t * @param verifyCallback {Function} Executed before every animation step.\n\t\t *   Signature of the method should be `function() { return continueWithAnimation; }`\n\t\t * @param completedCallback {Function}\n\t\t *   Signature of the method should be `function(droppedFrames, finishedAnimation) {}`\n\t\t * @param duration {Integer} Milliseconds to run the animation\n\t\t * @param easingMethod {Function} Pointer to easing function\n\t\t *   Signature of the method should be `function(percent) { return modifiedValue; }`\n\t\t * @param root {Element} Render root, when available. Used for internal\n\t\t *   usage of requestAnimationFrame.\n\t\t * @return {Integer} Identifier of animation. Can be used to stop it any time.\n\t\t */\n\t\tstart: function(stepCallback, verifyCallback, completedCallback, duration, easingMethod, root) {\n\n\t\t\tvar start = time();\n\t\t\tvar lastFrame = start;\n\t\t\tvar percent = 0;\n\t\t\tvar dropCounter = 0;\n\t\t\tvar id = counter++;\n\n\t\t\tif (!root) {\n\t\t\t\troot = document.body;\n\t\t\t}\n\n\t\t\t// Compacting running db automatically every few new animations\n\t\t\tif (id % 20 === 0) {\n\t\t\t\tvar newRunning = {};\n\t\t\t\tfor (var usedId in running) {\n\t\t\t\t\tnewRunning[usedId] = true;\n\t\t\t\t}\n\t\t\t\trunning = newRunning;\n\t\t\t}\n\n\t\t\t// This is the internal step method which is called every few milliseconds\n\t\t\tvar step = function(virtual) {\n\n\t\t\t\t// Normalize virtual value\n\t\t\t\tvar render = virtual !== true;\n\n\t\t\t\t// Get current time\n\t\t\t\tvar now = time();\n\n\t\t\t\t// Verification is executed before next animation step\n\t\t\t\tif (!running[id] || (verifyCallback && !verifyCallback(id))) {\n\n\t\t\t\t\trunning[id] = null;\n\t\t\t\t\tcompletedCallback && completedCallback(desiredFrames - (dropCounter / ((now - start) / millisecondsPerSecond)), id, false);\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\t// For the current rendering to apply let's update omitted steps in memory.\n\t\t\t\t// This is important to bring internal state variables up-to-date with progress in time.\n\t\t\t\tif (render) {\n\n\t\t\t\t\tvar droppedFrames = Math.round((now - lastFrame) / (millisecondsPerSecond / desiredFrames)) - 1;\n\t\t\t\t\tfor (var j = 0; j < Math.min(droppedFrames, 4); j++) {\n\t\t\t\t\t\tstep(true);\n\t\t\t\t\t\tdropCounter++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// Compute percent value\n\t\t\t\tif (duration) {\n\t\t\t\t\tpercent = (now - start) / duration;\n\t\t\t\t\tif (percent > 1) {\n\t\t\t\t\t\tpercent = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Execute step callback, then...\n\t\t\t\tvar value = easingMethod ? easingMethod(percent) : percent;\n\t\t\t\tif ((stepCallback(value, now, render) === false || percent === 1) && render) {\n\t\t\t\t\trunning[id] = null;\n\t\t\t\t\tcompletedCallback && completedCallback(desiredFrames - (dropCounter / ((now - start) / millisecondsPerSecond)), id, percent === 1 || duration == null);\n\t\t\t\t} else if (render) {\n\t\t\t\t\tlastFrame = now;\n\t\t\t\t\tcore.effect.Animate.requestAnimationFrame(step, root);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Mark as running\n\t\t\trunning[id] = true;\n\n\t\t\t// Init first step\n\t\t\tcore.effect.Animate.requestAnimationFrame(step, root);\n\n\t\t\t// Return unique animation ID\n\t\t\treturn id;\n\t\t}\n\t};\n})(this);\n\n/*\n * Scroller\n * http://github.com/zynga/scroller\n *\n * Copyright 2011, Zynga Inc.\n * Licensed under the MIT License.\n * https://raw.github.com/zynga/scroller/master/MIT-LICENSE.txt\n *\n * Based on the work of: Unify Project (unify-project.org)\n * http://unify-project.org\n * Copyright 2011, Deutsche Telekom AG\n * License: MIT + Apache (V2)\n */\n\nvar Scroller;\n\n(function(ionic) {\n\tvar NOOP = function(){};\n\n\t// Easing Equations (c) 2003 Robert Penner, all rights reserved.\n\t// Open source under the BSD License.\n\n\t/**\n\t * @param pos {Number} position between 0 (start of effect) and 1 (end of effect)\n\t**/\n\tvar easeOutCubic = function(pos) {\n\t\treturn (Math.pow((pos - 1), 3) + 1);\n\t};\n\n\t/**\n\t * @param pos {Number} position between 0 (start of effect) and 1 (end of effect)\n\t**/\n\tvar easeInOutCubic = function(pos) {\n\t\tif ((pos /= 0.5) < 1) {\n\t\t\treturn 0.5 * Math.pow(pos, 3);\n\t\t}\n\n\t\treturn 0.5 * (Math.pow((pos - 2), 3) + 2);\n\t};\n\n\n/**\n * ionic.views.Scroll\n * A powerful scroll view with support for bouncing, pull to refresh, and paging.\n * @param   {Object}        options options for the scroll view\n * @class A scroll view system\n * @memberof ionic.views\n */\nionic.views.Scroll = ionic.views.View.inherit({\n  initialize: function(options) {\n    var self = this;\n\n    this.__container = options.el;\n    this.__content = options.el.firstElementChild;\n\n    //Remove any scrollTop attached to these elements; they are virtual scroll now\n    //This also stops on-load-scroll-to-window.location.hash that the browser does\n    setTimeout(function() {\n      if (self.__container && self.__content) {\n        self.__container.scrollTop = 0;\n        self.__content.scrollTop = 0;\n      }\n    });\n\n\t\tthis.options = {\n\n      /** Disable scrolling on x-axis by default */\n      scrollingX: false,\n      scrollbarX: true,\n\n      /** Enable scrolling on y-axis */\n      scrollingY: true,\n      scrollbarY: true,\n\n      startX: 0,\n      startY: 0,\n\n      /** The amount to dampen mousewheel events */\n      wheelDampen: 6,\n\n      /** The minimum size the scrollbars scale to while scrolling */\n      minScrollbarSizeX: 5,\n      minScrollbarSizeY: 5,\n\n      /** Scrollbar fading after scrolling */\n      scrollbarsFade: true,\n      scrollbarFadeDelay: 300,\n      /** The initial fade delay when the pane is resized or initialized */\n      scrollbarResizeFadeDelay: 1000,\n\n      /** Enable animations for deceleration, snap back, zooming and scrolling */\n      animating: true,\n\n      /** duration for animations triggered by scrollTo/zoomTo */\n      animationDuration: 250,\n\n      /** Enable bouncing (content can be slowly moved outside and jumps back after releasing) */\n      bouncing: true,\n\n      /** Enable locking to the main axis if user moves only slightly on one of them at start */\n      locking: true,\n\n      /** Enable pagination mode (switching between full page content panes) */\n      paging: false,\n\n      /** Enable snapping of content to a configured pixel grid */\n      snapping: false,\n\n      /** Enable zooming of content via API, fingers and mouse wheel */\n      zooming: false,\n\n      /** Minimum zoom level */\n      minZoom: 0.5,\n\n      /** Maximum zoom level */\n      maxZoom: 3,\n\n      /** Multiply or decrease scrolling speed **/\n      speedMultiplier: 1,\n\n      /** Callback that is fired on the later of touch end or deceleration end,\n        provided that another scrolling action has not begun. Used to know\n        when to fade out a scrollbar. */\n      scrollingComplete: NOOP,\n\n      /** This configures the amount of change applied to deceleration when reaching boundaries  **/\n      penetrationDeceleration : 0.03,\n\n      /** This configures the amount of change applied to acceleration when reaching boundaries  **/\n      penetrationAcceleration : 0.08,\n\n      // The ms interval for triggering scroll events\n      scrollEventInterval: 50\n\t\t};\n\n\t\tfor (var key in options) {\n\t\t\tthis.options[key] = options[key];\n\t\t}\n\n    this.hintResize = ionic.debounce(function() {\n      self.resize();\n    }, 1000, true);\n\n    this.triggerScrollEvent = ionic.throttle(function() {\n      ionic.trigger('scroll', {\n        scrollTop: self.__scrollTop,\n        scrollLeft: self.__scrollLeft,\n        target: self.__container\n      });\n    }, this.options.scrollEventInterval);\n\n    this.triggerScrollEndEvent = function() {\n      ionic.trigger('scrollend', {\n        scrollTop: self.__scrollTop,\n        scrollLeft: self.__scrollLeft,\n        target: self.__container\n      });\n    };\n\n    this.__scrollLeft = this.options.startX;\n    this.__scrollTop = this.options.startY;\n\n    // Get the render update function, initialize event handlers,\n    // and calculate the size of the scroll container\n\t\tthis.__callback = this.getRenderFn();\n    this.__initEventHandlers();\n    this.__createScrollbars();\n\n  },\n\n  run: function() {\n    this.resize();\n\n    // Fade them out\n    this.__fadeScrollbars('out', this.options.scrollbarResizeFadeDelay);\n\t},\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: STATUS\n  ---------------------------------------------------------------------------\n  */\n\n  /** Whether only a single finger is used in touch handling */\n  __isSingleTouch: false,\n\n  /** Whether a touch event sequence is in progress */\n  __isTracking: false,\n\n  /** Whether a deceleration animation went to completion. */\n  __didDecelerationComplete: false,\n\n  /**\n   * Whether a gesture zoom/rotate event is in progress. Activates when\n   * a gesturestart event happens. This has higher priority than dragging.\n   */\n  __isGesturing: false,\n\n  /**\n   * Whether the user has moved by such a distance that we have enabled\n   * dragging mode. Hint: It's only enabled after some pixels of movement to\n   * not interrupt with clicks etc.\n   */\n  __isDragging: false,\n\n  /**\n   * Not touching and dragging anymore, and smoothly animating the\n   * touch sequence using deceleration.\n   */\n  __isDecelerating: false,\n\n  /**\n   * Smoothly animating the currently configured change\n   */\n  __isAnimating: false,\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: DIMENSIONS\n  ---------------------------------------------------------------------------\n  */\n\n  /** Available outer left position (from document perspective) */\n  __clientLeft: 0,\n\n  /** Available outer top position (from document perspective) */\n  __clientTop: 0,\n\n  /** Available outer width */\n  __clientWidth: 0,\n\n  /** Available outer height */\n  __clientHeight: 0,\n\n  /** Outer width of content */\n  __contentWidth: 0,\n\n  /** Outer height of content */\n  __contentHeight: 0,\n\n  /** Snapping width for content */\n  __snapWidth: 100,\n\n  /** Snapping height for content */\n  __snapHeight: 100,\n\n  /** Height to assign to refresh area */\n  __refreshHeight: null,\n\n  /** Whether the refresh process is enabled when the event is released now */\n  __refreshActive: false,\n\n  /** Callback to execute on activation. This is for signalling the user about a refresh is about to happen when he release */\n  __refreshActivate: null,\n\n  /** Callback to execute on deactivation. This is for signalling the user about the refresh being cancelled */\n  __refreshDeactivate: null,\n\n  /** Callback to execute to start the actual refresh. Call {@link #refreshFinish} when done */\n  __refreshStart: null,\n\n  /** Zoom level */\n  __zoomLevel: 1,\n\n  /** Scroll position on x-axis */\n  __scrollLeft: 0,\n\n  /** Scroll position on y-axis */\n  __scrollTop: 0,\n\n  /** Maximum allowed scroll position on x-axis */\n  __maxScrollLeft: 0,\n\n  /** Maximum allowed scroll position on y-axis */\n  __maxScrollTop: 0,\n\n  /* Scheduled left position (final position when animating) */\n  __scheduledLeft: 0,\n\n  /* Scheduled top position (final position when animating) */\n  __scheduledTop: 0,\n\n  /* Scheduled zoom level (final scale when animating) */\n  __scheduledZoom: 0,\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: LAST POSITIONS\n  ---------------------------------------------------------------------------\n  */\n\n  /** Left position of finger at start */\n  __lastTouchLeft: null,\n\n  /** Top position of finger at start */\n  __lastTouchTop: null,\n\n  /** Timestamp of last move of finger. Used to limit tracking range for deceleration speed. */\n  __lastTouchMove: null,\n\n  /** List of positions, uses three indexes for each state: left, top, timestamp */\n  __positions: null,\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    INTERNAL FIELDS :: DECELERATION SUPPORT\n  ---------------------------------------------------------------------------\n  */\n\n  /** Minimum left scroll position during deceleration */\n  __minDecelerationScrollLeft: null,\n\n  /** Minimum top scroll position during deceleration */\n  __minDecelerationScrollTop: null,\n\n  /** Maximum left scroll position during deceleration */\n  __maxDecelerationScrollLeft: null,\n\n  /** Maximum top scroll position during deceleration */\n  __maxDecelerationScrollTop: null,\n\n  /** Current factor to modify horizontal scroll position with on every step */\n  __decelerationVelocityX: null,\n\n  /** Current factor to modify vertical scroll position with on every step */\n  __decelerationVelocityY: null,\n\n\n  /** the browser-specific property to use for transforms */\n  __transformProperty: null,\n  __perspectiveProperty: null,\n\n  /** scrollbar indicators */\n  __indicatorX: null,\n  __indicatorY: null,\n\n  /** Timeout for scrollbar fading */\n  __scrollbarFadeTimeout: null,\n\n  /** whether we've tried to wait for size already */\n  __didWaitForSize: null,\n  __sizerTimeout: null,\n\n  __initEventHandlers: function() {\n    var self = this;\n\n    // Event Handler\n    var container = this.__container;\n\n    //Broadcasted when keyboard is shown on some platforms.\n    //See js/utils/keyboard.js\n    container.addEventListener('scrollChildIntoView', function(e) {\n      var deviceHeight = window.innerHeight;\n      var element = e.target;\n      var elementHeight = e.target.offsetHeight;\n\n      //getBoundingClientRect() will actually give us position relative to the viewport\n      var elementDeviceTop = element.getBoundingClientRect().top;\n      var elementScrollTop = ionic.DomUtil.getPositionInParent(element, container).top;\n\n      //If the element is positioned under the keyboard...\n      if (elementDeviceTop + elementHeight > deviceHeight) {\n        //Put element in middle of visible screen\n        self.scrollTo(0, elementScrollTop + elementHeight - (deviceHeight * 0.5), true);\n      }\n\n      //Only the first scrollView parent of the element that broadcasted this event\n      //(the active element that needs to be shown) should receive this event\n      e.stopPropagation();\n    });\n\n    function shouldIgnorePress(e) {\n      // Don't react if initial down happens on a form element\n      return e.target.tagName.match(IS_INPUT_LIKE_REGEX) ||\n             e.target.isContentEditable ||\n             e.target.tagName.match(IS_EMBEDDED_OBJECT_REGEX) ||\n             e.target.dataset.preventScroll;\n    }\n\n\n    if ('ontouchstart' in window) {\n\n      container.addEventListener(\"touchstart\", function(e) {\n        if (e.defaultPrevented || shouldIgnorePress(e)) {\n          return;\n        }\n        self.doTouchStart(e.touches, e.timeStamp);\n        e.preventDefault();\n      }, false);\n\n      document.addEventListener(\"touchmove\", function(e) {\n        if(e.defaultPrevented) {\n          return;\n        }\n        self.doTouchMove(e.touches, e.timeStamp);\n      }, false);\n\n      document.addEventListener(\"touchend\", function(e) {\n        self.doTouchEnd(e.timeStamp);\n      }, false);\n\n    } else {\n\n      var mousedown = false;\n\n      container.addEventListener(\"mousedown\", function(e) {\n        if (e.defaultPrevented || shouldIgnorePress(e)) {\n          return;\n        }\n        self.doTouchStart([{\n          pageX: e.pageX,\n          pageY: e.pageY\n        }], e.timeStamp);\n\n        e.preventDefault();\n        mousedown = true;\n      }, false);\n\n      document.addEventListener(\"mousemove\", function(e) {\n        if (!mousedown || e.defaultPrevented) {\n          return;\n        }\n\n        self.doTouchMove([{\n          pageX: e.pageX,\n          pageY: e.pageY\n        }], e.timeStamp);\n\n        mousedown = true;\n      }, false);\n\n      document.addEventListener(\"mouseup\", function(e) {\n        if (!mousedown) {\n          return;\n        }\n\n        self.doTouchEnd(e.timeStamp);\n\n        mousedown = false;\n      }, false);\n\n      var wheelShowBarFn = ionic.debounce(function() {\n        self.__fadeScrollbars('in');\n      }, 500, true);\n\n      var wheelHideBarFn = ionic.debounce(function() {\n        self.__fadeScrollbars('out');\n      }, 100, false);\n\n      document.addEventListener(\"mousewheel\", function(e) {\n        wheelShowBarFn();\n        self.scrollBy(e.wheelDeltaX/self.options.wheelDampen, -e.wheelDeltaY/self.options.wheelDampen);\n        wheelHideBarFn();\n      });\n    }\n  },\n\n  /** Create a scroll bar div with the given direction **/\n  __createScrollbar: function(direction) {\n    var bar = document.createElement('div'),\n      indicator = document.createElement('div');\n\n    indicator.className = 'scroll-bar-indicator';\n\n    if(direction == 'h') {\n      bar.className = 'scroll-bar scroll-bar-h';\n    } else {\n      bar.className = 'scroll-bar scroll-bar-v';\n    }\n\n    bar.appendChild(indicator);\n    return bar;\n  },\n\n  __createScrollbars: function() {\n    var indicatorX, indicatorY;\n\n    if(this.options.scrollingX) {\n      indicatorX = {\n        el: this.__createScrollbar('h'),\n        sizeRatio: 1\n      };\n      indicatorX.indicator = indicatorX.el.children[0];\n\n      if(this.options.scrollbarX) {\n        this.__container.appendChild(indicatorX.el);\n      }\n      this.__indicatorX = indicatorX;\n    }\n\n    if(this.options.scrollingY) {\n      indicatorY = {\n        el: this.__createScrollbar('v'),\n        sizeRatio: 1\n      };\n      indicatorY.indicator = indicatorY.el.children[0];\n\n      if(this.options.scrollbarY) {\n        this.__container.appendChild(indicatorY.el);\n      }\n      this.__indicatorY = indicatorY;\n    }\n  },\n\n  __resizeScrollbars: function() {\n    var self = this;\n\n    // Update horiz bar\n    if(self.__indicatorX) {\n      var width = Math.max(Math.round(self.__clientWidth * self.__clientWidth / (self.__contentWidth)), 20);\n      if(width > self.__contentWidth) {\n        width = 0;\n      }\n      self.__indicatorX.size = width;\n      self.__indicatorX.minScale = this.options.minScrollbarSizeX / width;\n      self.__indicatorX.indicator.style.width = width + 'px';\n      self.__indicatorX.maxPos = self.__clientWidth - width;\n      self.__indicatorX.sizeRatio = self.__maxScrollLeft ? self.__indicatorX.maxPos / self.__maxScrollLeft : 1;\n    }\n\n    // Update vert bar\n    if(self.__indicatorY) {\n      var height = Math.max(Math.round(self.__clientHeight * self.__clientHeight / (self.__contentHeight)), 20);\n      if(height > self.__contentHeight) {\n        height = 0;\n      }\n      self.__indicatorY.size = height;\n      self.__indicatorY.minScale = this.options.minScrollbarSizeY / height;\n      self.__indicatorY.maxPos = self.__clientHeight - height;\n      self.__indicatorY.indicator.style.height = height + 'px';\n      self.__indicatorY.sizeRatio = self.__maxScrollTop ? self.__indicatorY.maxPos / self.__maxScrollTop : 1;\n    }\n  },\n\n  /**\n   * Move and scale the scrollbars as the page scrolls.\n   */\n  __repositionScrollbars: function() {\n    var self = this, width, heightScale,\n        widthDiff, heightDiff,\n        x, y,\n        xstop = 0, ystop = 0;\n\n    if(self.__indicatorX) {\n      // Handle the X scrollbar\n\n      // Don't go all the way to the right if we have a vertical scrollbar as well\n      if(self.__indicatorY) xstop = 10;\n\n      x = Math.round(self.__indicatorX.sizeRatio * self.__scrollLeft) || 0,\n\n      // The the difference between the last content X position, and our overscrolled one\n      widthDiff = self.__scrollLeft - (self.__maxScrollLeft - xstop);\n\n      if(self.__scrollLeft < 0) {\n\n        widthScale = Math.max(self.__indicatorX.minScale,\n            (self.__indicatorX.size - Math.abs(self.__scrollLeft)) / self.__indicatorX.size);\n\n        // Stay at left\n        x = 0;\n\n        // Make sure scale is transformed from the left/center origin point\n        self.__indicatorX.indicator.style[self.__transformOriginProperty] = 'left center';\n      } else if(widthDiff > 0) {\n\n        widthScale = Math.max(self.__indicatorX.minScale,\n            (self.__indicatorX.size - widthDiff) / self.__indicatorX.size);\n\n        // Stay at the furthest x for the scrollable viewport\n        x = self.__indicatorX.maxPos - xstop;\n\n        // Make sure scale is transformed from the right/center origin point\n        self.__indicatorX.indicator.style[self.__transformOriginProperty] = 'right center';\n\n      } else {\n\n        // Normal motion\n        x = Math.min(self.__maxScrollLeft, Math.max(0, x));\n        widthScale = 1;\n\n      }\n\n      self.__indicatorX.indicator.style[self.__transformProperty] = 'translate3d(' + x + 'px, 0, 0) scaleX(' + widthScale + ')';\n    }\n\n    if(self.__indicatorY) {\n\n      y = Math.round(self.__indicatorY.sizeRatio * self.__scrollTop) || 0;\n\n      // Don't go all the way to the right if we have a vertical scrollbar as well\n      if(self.__indicatorX) ystop = 10;\n\n      heightDiff = self.__scrollTop - (self.__maxScrollTop - ystop);\n\n      if(self.__scrollTop < 0) {\n\n        heightScale = Math.max(self.__indicatorY.minScale, (self.__indicatorY.size - Math.abs(self.__scrollTop)) / self.__indicatorY.size);\n\n        // Stay at top\n        y = 0;\n\n        // Make sure scale is transformed from the center/top origin point\n        self.__indicatorY.indicator.style[self.__transformOriginProperty] = 'center top';\n\n      } else if(heightDiff > 0) {\n\n        heightScale = Math.max(self.__indicatorY.minScale, (self.__indicatorY.size - heightDiff) / self.__indicatorY.size);\n\n        // Stay at bottom of scrollable viewport\n        y = self.__indicatorY.maxPos - ystop;\n\n        // Make sure scale is transformed from the center/bottom origin point\n        self.__indicatorY.indicator.style[self.__transformOriginProperty] = 'center bottom';\n\n      } else {\n\n        // Normal motion\n        y = Math.min(self.__maxScrollTop, Math.max(0, y));\n        heightScale = 1;\n\n      }\n\n      self.__indicatorY.indicator.style[self.__transformProperty] = 'translate3d(0,' + y + 'px, 0) scaleY(' + heightScale + ')';\n    }\n  },\n\n  __fadeScrollbars: function(direction, delay) {\n    var self = this;\n\n    if(!this.options.scrollbarsFade) {\n      return;\n    }\n\n    var className = 'scroll-bar-fade-out';\n\n    if(self.options.scrollbarsFade === true) {\n      clearTimeout(self.__scrollbarFadeTimeout);\n\n      if(direction == 'in') {\n        if(self.__indicatorX) { self.__indicatorX.indicator.classList.remove(className); }\n        if(self.__indicatorY) { self.__indicatorY.indicator.classList.remove(className); }\n      } else {\n        self.__scrollbarFadeTimeout = setTimeout(function() {\n          if(self.__indicatorX) { self.__indicatorX.indicator.classList.add(className); }\n          if(self.__indicatorY) { self.__indicatorY.indicator.classList.add(className); }\n        }, delay || self.options.scrollbarFadeDelay);\n      }\n    }\n  },\n\n  __scrollingComplete: function() {\n    var self = this;\n    self.options.scrollingComplete();\n\n    self.__fadeScrollbars('out');\n  },\n\n  resize: function() {\n    // Update Scroller dimensions for changed content\n    // Add padding to bottom of content\n    this.setDimensions(\n    \tthis.__container.clientWidth,\n    \tthis.__container.clientHeight,\n    \tMath.max(this.__content.scrollWidth, this.__content.offsetWidth),\n      Math.max(this.__content.scrollHeight, this.__content.offsetHeight)\n    );\n  },\n  /*\n  ---------------------------------------------------------------------------\n    PUBLIC API\n  ---------------------------------------------------------------------------\n  */\n\n  getRenderFn: function() {\n    var self = this;\n\n    var content = this.__content;\n\n\t  var docStyle = document.documentElement.style;\n\n    var engine;\n    if ('MozAppearance' in docStyle) {\n      engine = 'gecko';\n    } else if ('WebkitAppearance' in docStyle) {\n      engine = 'webkit';\n    } else if (typeof navigator.cpuClass === 'string') {\n      engine = 'trident';\n    }\n\n    var vendorPrefix = {\n      trident: 'ms',\n      gecko: 'Moz',\n      webkit: 'Webkit',\n      presto: 'O'\n    }[engine];\n\n    var helperElem = document.createElement(\"div\");\n    var undef;\n\n    var perspectiveProperty = vendorPrefix + \"Perspective\";\n    var transformProperty = vendorPrefix + \"Transform\";\n    var transformOriginProperty = vendorPrefix + 'TransformOrigin';\n\n    self.__perspectiveProperty = transformProperty;\n    self.__transformProperty = transformProperty;\n    self.__transformOriginProperty = transformOriginProperty;\n\n    if (helperElem.style[perspectiveProperty] !== undef) {\n\n      return function(left, top, zoom) {\n        content.style[transformProperty] = 'translate3d(' + (-left) + 'px,' + (-top) + 'px,0)';\n        self.__repositionScrollbars();\n        self.triggerScrollEvent();\n      };\n\n    } else if (helperElem.style[transformProperty] !== undef) {\n\n      return function(left, top, zoom) {\n        content.style[transformProperty] = 'translate(' + (-left) + 'px,' + (-top) + 'px)';\n        self.__repositionScrollbars();\n        self.triggerScrollEvent();\n      };\n\n    } else {\n\n      return function(left, top, zoom) {\n        content.style.marginLeft = left ? (-left/zoom) + 'px' : '';\n        content.style.marginTop = top ? (-top/zoom) + 'px' : '';\n        content.style.zoom = zoom || '';\n        self.__repositionScrollbars();\n        self.triggerScrollEvent();\n      };\n\n    }\n  },\n\n\n  /**\n   * Configures the dimensions of the client (outer) and content (inner) elements.\n   * Requires the available space for the outer element and the outer size of the inner element.\n   * All values which are falsy (null or zero etc.) are ignored and the old value is kept.\n   *\n   * @param clientWidth {Integer} Inner width of outer element\n   * @param clientHeight {Integer} Inner height of outer element\n   * @param contentWidth {Integer} Outer width of inner element\n   * @param contentHeight {Integer} Outer height of inner element\n   */\n  setDimensions: function(clientWidth, clientHeight, contentWidth, contentHeight) {\n\n    var self = this;\n\n    // Only update values which are defined\n    if (clientWidth === +clientWidth) {\n      self.__clientWidth = clientWidth;\n    }\n\n    if (clientHeight === +clientHeight) {\n      self.__clientHeight = clientHeight;\n    }\n\n    if (contentWidth === +contentWidth) {\n      self.__contentWidth = contentWidth;\n    }\n\n    if (contentHeight === +contentHeight) {\n      self.__contentHeight = contentHeight;\n    }\n\n    // Refresh maximums\n    self.__computeScrollMax();\n    self.__resizeScrollbars();\n\n    // Refresh scroll position\n    self.scrollTo(self.__scrollLeft, self.__scrollTop, true);\n\n  },\n\n\n  /**\n   * Sets the client coordinates in relation to the document.\n   *\n   * @param left {Integer} Left position of outer element\n   * @param top {Integer} Top position of outer element\n   */\n  setPosition: function(left, top) {\n\n    var self = this;\n\n    self.__clientLeft = left || 0;\n    self.__clientTop = top || 0;\n\n  },\n\n\n  /**\n   * Configures the snapping (when snapping is active)\n   *\n   * @param width {Integer} Snapping width\n   * @param height {Integer} Snapping height\n   */\n  setSnapSize: function(width, height) {\n\n    var self = this;\n\n    self.__snapWidth = width;\n    self.__snapHeight = height;\n\n  },\n\n\n  /**\n   * Activates pull-to-refresh. A special zone on the top of the list to start a list refresh whenever\n   * the user event is released during visibility of this zone. This was introduced by some apps on iOS like\n   * the official Twitter client.\n   *\n   * @param height {Integer} Height of pull-to-refresh zone on top of rendered list\n   * @param activateCallback {Function} Callback to execute on activation. This is for signalling the user about a refresh is about to happen when he release.\n   * @param deactivateCallback {Function} Callback to execute on deactivation. This is for signalling the user about the refresh being cancelled.\n   * @param startCallback {Function} Callback to execute to start the real async refresh action. Call {@link #finishPullToRefresh} after finish of refresh.\n   */\n  activatePullToRefresh: function(height, activateCallback, deactivateCallback, startCallback) {\n\n    var self = this;\n\n    self.__refreshHeight = height;\n    self.__refreshActivate = activateCallback;\n    self.__refreshDeactivate = deactivateCallback;\n    self.__refreshStart = startCallback;\n\n  },\n\n\n  /**\n   * Starts pull-to-refresh manually.\n   */\n  triggerPullToRefresh: function() {\n    // Use publish instead of scrollTo to allow scrolling to out of boundary position\n    // We don't need to normalize scrollLeft, zoomLevel, etc. here because we only y-scrolling when pull-to-refresh is enabled\n    this.__publish(this.__scrollLeft, -this.__refreshHeight, this.__zoomLevel, true);\n\n    if (this.__refreshStart) {\n      this.__refreshStart();\n    }\n  },\n\n\n  /**\n   * Signalizes that pull-to-refresh is finished.\n   */\n  finishPullToRefresh: function() {\n\n    var self = this;\n\n    self.__refreshActive = false;\n    if (self.__refreshDeactivate) {\n      self.__refreshDeactivate();\n    }\n\n    self.scrollTo(self.__scrollLeft, self.__scrollTop, true);\n\n  },\n\n\n  /**\n   * Returns the scroll position and zooming values\n   *\n   * @return {Map} `left` and `top` scroll position and `zoom` level\n   */\n  getValues: function() {\n\n    var self = this;\n\n    return {\n      left: self.__scrollLeft,\n      top: self.__scrollTop,\n      zoom: self.__zoomLevel\n    };\n\n  },\n\n\n  /**\n   * Returns the maximum scroll values\n   *\n   * @return {Map} `left` and `top` maximum scroll values\n   */\n  getScrollMax: function() {\n\n    var self = this;\n\n    return {\n      left: self.__maxScrollLeft,\n      top: self.__maxScrollTop\n    };\n\n  },\n\n\n  /**\n   * Zooms to the given level. Supports optional animation. Zooms\n   * the center when no coordinates are given.\n   *\n   * @param level {Number} Level to zoom to\n   * @param animate {Boolean} Whether to use animation\n   * @param originLeft {Number} Zoom in at given left coordinate\n   * @param originTop {Number} Zoom in at given top coordinate\n   */\n  zoomTo: function(level, animate, originLeft, originTop) {\n\n    var self = this;\n\n    if (!self.options.zooming) {\n      throw new Error(\"Zooming is not enabled!\");\n    }\n\n    // Stop deceleration\n    if (self.__isDecelerating) {\n      core.effect.Animate.stop(self.__isDecelerating);\n      self.__isDecelerating = false;\n    }\n\n    var oldLevel = self.__zoomLevel;\n\n    // Normalize input origin to center of viewport if not defined\n    if (originLeft == null) {\n      originLeft = self.__clientWidth / 2;\n    }\n\n    if (originTop == null) {\n      originTop = self.__clientHeight / 2;\n    }\n\n    // Limit level according to configuration\n    level = Math.max(Math.min(level, self.options.maxZoom), self.options.minZoom);\n\n    // Recompute maximum values while temporary tweaking maximum scroll ranges\n    self.__computeScrollMax(level);\n\n    // Recompute left and top coordinates based on new zoom level\n    var left = ((originLeft + self.__scrollLeft) * level / oldLevel) - originLeft;\n    var top = ((originTop + self.__scrollTop) * level / oldLevel) - originTop;\n\n    // Limit x-axis\n    if (left > self.__maxScrollLeft) {\n      left = self.__maxScrollLeft;\n    } else if (left < 0) {\n      left = 0;\n    }\n\n    // Limit y-axis\n    if (top > self.__maxScrollTop) {\n      top = self.__maxScrollTop;\n    } else if (top < 0) {\n      top = 0;\n    }\n\n    // Push values out\n    self.__publish(left, top, level, animate);\n\n  },\n\n\n  /**\n   * Zooms the content by the given factor.\n   *\n   * @param factor {Number} Zoom by given factor\n   * @param animate {Boolean} Whether to use animation\n   * @param originLeft {Number} Zoom in at given left coordinate\n   * @param originTop {Number} Zoom in at given top coordinate\n   */\n  zoomBy: function(factor, animate, originLeft, originTop) {\n\n    var self = this;\n\n    self.zoomTo(self.__zoomLevel * factor, animate, originLeft, originTop);\n\n  },\n\n\n  /**\n   * Scrolls to the given position. Respect limitations and snapping automatically.\n   *\n   * @param left {Number} Horizontal scroll position, keeps current if value is <code>null</code>\n   * @param top {Number} Vertical scroll position, keeps current if value is <code>null</code>\n   * @param animate {Boolean} Whether the scrolling should happen using an animation\n   * @param zoom {Number} Zoom level to go to\n   */\n  scrollTo: function(left, top, animate, zoom) {\n\n    var self = this;\n\n    // Stop deceleration\n    if (self.__isDecelerating) {\n      core.effect.Animate.stop(self.__isDecelerating);\n      self.__isDecelerating = false;\n    }\n\n    // Correct coordinates based on new zoom level\n    if (zoom != null && zoom !== self.__zoomLevel) {\n\n      if (!self.options.zooming) {\n        throw new Error(\"Zooming is not enabled!\");\n      }\n\n      left *= zoom;\n      top *= zoom;\n\n      // Recompute maximum values while temporary tweaking maximum scroll ranges\n      self.__computeScrollMax(zoom);\n\n    } else {\n\n      // Keep zoom when not defined\n      zoom = self.__zoomLevel;\n\n    }\n\n    if (!self.options.scrollingX) {\n\n      left = self.__scrollLeft;\n\n    } else {\n\n      if (self.options.paging) {\n        left = Math.round(left / self.__clientWidth) * self.__clientWidth;\n      } else if (self.options.snapping) {\n        left = Math.round(left / self.__snapWidth) * self.__snapWidth;\n      }\n\n    }\n\n    if (!self.options.scrollingY) {\n\n      top = self.__scrollTop;\n\n    } else {\n\n      if (self.options.paging) {\n        top = Math.round(top / self.__clientHeight) * self.__clientHeight;\n      } else if (self.options.snapping) {\n        top = Math.round(top / self.__snapHeight) * self.__snapHeight;\n      }\n\n    }\n\n    // Limit for allowed ranges\n    left = Math.max(Math.min(self.__maxScrollLeft, left), 0);\n    top = Math.max(Math.min(self.__maxScrollTop, top), 0);\n\n    // Don't animate when no change detected, still call publish to make sure\n    // that rendered position is really in-sync with internal data\n    if (left === self.__scrollLeft && top === self.__scrollTop) {\n      animate = false;\n    }\n\n    // Publish new values\n    self.__publish(left, top, zoom, animate);\n\n  },\n\n\n  /**\n   * Scroll by the given offset\n   *\n   * @param left {Number} Scroll x-axis by given offset\n   * @param top {Number} Scroll x-axis by given offset\n   * @param animate {Boolean} Whether to animate the given change\n   */\n  scrollBy: function(left, top, animate) {\n\n    var self = this;\n\n    var startLeft = self.__isAnimating ? self.__scheduledLeft : self.__scrollLeft;\n    var startTop = self.__isAnimating ? self.__scheduledTop : self.__scrollTop;\n\n    self.scrollTo(startLeft + (left || 0), startTop + (top || 0), animate);\n\n  },\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    EVENT CALLBACKS\n  ---------------------------------------------------------------------------\n  */\n\n  /**\n   * Mouse wheel handler for zooming support\n   */\n  doMouseZoom: function(wheelDelta, timeStamp, pageX, pageY) {\n\n    var self = this;\n    var change = wheelDelta > 0 ? 0.97 : 1.03;\n\n    return self.zoomTo(self.__zoomLevel * change, false, pageX - self.__clientLeft, pageY - self.__clientTop);\n\n  },\n\n\n  /**\n   * Touch start handler for scrolling support\n   */\n  doTouchStart: function(touches, timeStamp) {\n    this.hintResize();\n\n    // Array-like check is enough here\n    if (touches.length == null) {\n      throw new Error(\"Invalid touch list: \" + touches);\n    }\n\n    if (timeStamp instanceof Date) {\n      timeStamp = timeStamp.valueOf();\n    }\n    if (typeof timeStamp !== \"number\") {\n      throw new Error(\"Invalid timestamp value: \" + timeStamp);\n    }\n\n    var self = this;\n\n    // Reset interruptedAnimation flag\n    self.__interruptedAnimation = true;\n\n    // Stop deceleration\n    if (self.__isDecelerating) {\n      core.effect.Animate.stop(self.__isDecelerating);\n      self.__isDecelerating = false;\n      self.__interruptedAnimation = true;\n    }\n\n    // Stop animation\n    if (self.__isAnimating) {\n      core.effect.Animate.stop(self.__isAnimating);\n      self.__isAnimating = false;\n      self.__interruptedAnimation = true;\n    }\n\n    // Use center point when dealing with two fingers\n    var currentTouchLeft, currentTouchTop;\n    var isSingleTouch = touches.length === 1;\n    if (isSingleTouch) {\n      currentTouchLeft = touches[0].pageX;\n      currentTouchTop = touches[0].pageY;\n    } else {\n      currentTouchLeft = Math.abs(touches[0].pageX + touches[1].pageX) / 2;\n      currentTouchTop = Math.abs(touches[0].pageY + touches[1].pageY) / 2;\n    }\n\n    // Store initial positions\n    self.__initialTouchLeft = currentTouchLeft;\n    self.__initialTouchTop = currentTouchTop;\n\n    // Store current zoom level\n    self.__zoomLevelStart = self.__zoomLevel;\n\n    // Store initial touch positions\n    self.__lastTouchLeft = currentTouchLeft;\n    self.__lastTouchTop = currentTouchTop;\n\n    // Store initial move time stamp\n    self.__lastTouchMove = timeStamp;\n\n    // Reset initial scale\n    self.__lastScale = 1;\n\n    // Reset locking flags\n    self.__enableScrollX = !isSingleTouch && self.options.scrollingX;\n    self.__enableScrollY = !isSingleTouch && self.options.scrollingY;\n\n    // Reset tracking flag\n    self.__isTracking = true;\n\n    // Reset deceleration complete flag\n    self.__didDecelerationComplete = false;\n\n    // Dragging starts directly with two fingers, otherwise lazy with an offset\n    self.__isDragging = !isSingleTouch;\n\n    // Some features are disabled in multi touch scenarios\n    self.__isSingleTouch = isSingleTouch;\n\n    // Clearing data structure\n    self.__positions = [];\n\n  },\n\n\n  /**\n   * Touch move handler for scrolling support\n   */\n  doTouchMove: function(touches, timeStamp, scale) {\n\n    // Array-like check is enough here\n    if (touches.length == null) {\n      throw new Error(\"Invalid touch list: \" + touches);\n    }\n\n    if (timeStamp instanceof Date) {\n      timeStamp = timeStamp.valueOf();\n    }\n    if (typeof timeStamp !== \"number\") {\n      throw new Error(\"Invalid timestamp value: \" + timeStamp);\n    }\n\n    var self = this;\n\n    // Ignore event when tracking is not enabled (event might be outside of element)\n    if (!self.__isTracking) {\n      return;\n    }\n\n\n    var currentTouchLeft, currentTouchTop;\n\n    // Compute move based around of center of fingers\n    if (touches.length === 2) {\n      currentTouchLeft = Math.abs(touches[0].pageX + touches[1].pageX) / 2;\n      currentTouchTop = Math.abs(touches[0].pageY + touches[1].pageY) / 2;\n    } else {\n      currentTouchLeft = touches[0].pageX;\n      currentTouchTop = touches[0].pageY;\n    }\n\n    var positions = self.__positions;\n\n    // Are we already is dragging mode?\n    if (self.__isDragging) {\n\n      // Compute move distance\n      var moveX = currentTouchLeft - self.__lastTouchLeft;\n      var moveY = currentTouchTop - self.__lastTouchTop;\n\n      // Read previous scroll position and zooming\n      var scrollLeft = self.__scrollLeft;\n      var scrollTop = self.__scrollTop;\n      var level = self.__zoomLevel;\n\n      // Work with scaling\n      if (scale != null && self.options.zooming) {\n\n        var oldLevel = level;\n\n        // Recompute level based on previous scale and new scale\n        level = level / self.__lastScale * scale;\n\n        // Limit level according to configuration\n        level = Math.max(Math.min(level, self.options.maxZoom), self.options.minZoom);\n\n        // Only do further compution when change happened\n        if (oldLevel !== level) {\n\n          // Compute relative event position to container\n          var currentTouchLeftRel = currentTouchLeft - self.__clientLeft;\n          var currentTouchTopRel = currentTouchTop - self.__clientTop;\n\n          // Recompute left and top coordinates based on new zoom level\n          scrollLeft = ((currentTouchLeftRel + scrollLeft) * level / oldLevel) - currentTouchLeftRel;\n          scrollTop = ((currentTouchTopRel + scrollTop) * level / oldLevel) - currentTouchTopRel;\n\n          // Recompute max scroll values\n          self.__computeScrollMax(level);\n\n        }\n      }\n\n      if (self.__enableScrollX) {\n\n        scrollLeft -= moveX * this.options.speedMultiplier;\n        var maxScrollLeft = self.__maxScrollLeft;\n\n        if (scrollLeft > maxScrollLeft || scrollLeft < 0) {\n\n          // Slow down on the edges\n          if (self.options.bouncing) {\n\n            scrollLeft += (moveX / 2  * this.options.speedMultiplier);\n\n          } else if (scrollLeft > maxScrollLeft) {\n\n            scrollLeft = maxScrollLeft;\n\n          } else {\n\n            scrollLeft = 0;\n\n          }\n        }\n      }\n\n      // Compute new vertical scroll position\n      if (self.__enableScrollY) {\n\n        scrollTop -= moveY * this.options.speedMultiplier;\n        var maxScrollTop = self.__maxScrollTop;\n\n        if (scrollTop > maxScrollTop || scrollTop < 0) {\n\n          // Slow down on the edges\n          if (self.options.bouncing || (self.__refreshHeight && scrollTop < 0)) {\n\n            scrollTop += (moveY / 2 * this.options.speedMultiplier);\n\n            // Support pull-to-refresh (only when only y is scrollable)\n            if (!self.__enableScrollX && self.__refreshHeight != null) {\n\n              if (!self.__refreshActive && scrollTop <= -self.__refreshHeight) {\n\n                self.__refreshActive = true;\n                if (self.__refreshActivate) {\n                  self.__refreshActivate();\n                }\n\n              } else if (self.__refreshActive && scrollTop > -self.__refreshHeight) {\n\n                self.__refreshActive = false;\n                if (self.__refreshDeactivate) {\n                  self.__refreshDeactivate();\n                }\n\n              }\n            }\n\n          } else if (scrollTop > maxScrollTop) {\n\n            scrollTop = maxScrollTop;\n\n          } else {\n\n            scrollTop = 0;\n\n          }\n        }\n      }\n\n      // Keep list from growing infinitely (holding min 10, max 20 measure points)\n      if (positions.length > 60) {\n        positions.splice(0, 30);\n      }\n\n      // Track scroll movement for decleration\n      positions.push(scrollLeft, scrollTop, timeStamp);\n\n      // Sync scroll position\n      self.__publish(scrollLeft, scrollTop, level);\n\n    // Otherwise figure out whether we are switching into dragging mode now.\n    } else {\n\n      var minimumTrackingForScroll = self.options.locking ? 3 : 0;\n      var minimumTrackingForDrag = 5;\n\n      var distanceX = Math.abs(currentTouchLeft - self.__initialTouchLeft);\n      var distanceY = Math.abs(currentTouchTop - self.__initialTouchTop);\n\n      self.__enableScrollX = self.options.scrollingX && distanceX >= minimumTrackingForScroll;\n      self.__enableScrollY = self.options.scrollingY && distanceY >= minimumTrackingForScroll;\n\n      positions.push(self.__scrollLeft, self.__scrollTop, timeStamp);\n\n      self.__isDragging = (self.__enableScrollX || self.__enableScrollY) && (distanceX >= minimumTrackingForDrag || distanceY >= minimumTrackingForDrag);\n      if (self.__isDragging) {\n        self.__interruptedAnimation = false;\n        self.__fadeScrollbars('in');\n      }\n\n    }\n\n    // Update last touch positions and time stamp for next event\n    self.__lastTouchLeft = currentTouchLeft;\n    self.__lastTouchTop = currentTouchTop;\n    self.__lastTouchMove = timeStamp;\n    self.__lastScale = scale;\n\n  },\n\n\n  /**\n   * Touch end handler for scrolling support\n   */\n  doTouchEnd: function(timeStamp) {\n\n    if (timeStamp instanceof Date) {\n      timeStamp = timeStamp.valueOf();\n    }\n    if (typeof timeStamp !== \"number\") {\n      throw new Error(\"Invalid timestamp value: \" + timeStamp);\n    }\n\n    var self = this;\n\n    // Ignore event when tracking is not enabled (no touchstart event on element)\n    // This is required as this listener ('touchmove') sits on the document and not on the element itself.\n    if (!self.__isTracking) {\n      return;\n    }\n\n    // Not touching anymore (when two finger hit the screen there are two touch end events)\n    self.__isTracking = false;\n\n    // Be sure to reset the dragging flag now. Here we also detect whether\n    // the finger has moved fast enough to switch into a deceleration animation.\n    if (self.__isDragging) {\n\n      // Reset dragging flag\n      self.__isDragging = false;\n\n      // Start deceleration\n      // Verify that the last move detected was in some relevant time frame\n      if (self.__isSingleTouch && self.options.animating && (timeStamp - self.__lastTouchMove) <= 100) {\n\n        // Then figure out what the scroll position was about 100ms ago\n        var positions = self.__positions;\n        var endPos = positions.length - 1;\n        var startPos = endPos;\n\n        // Move pointer to position measured 100ms ago\n        for (var i = endPos; i > 0 && positions[i] > (self.__lastTouchMove - 100); i -= 3) {\n          startPos = i;\n        }\n\n        // If start and stop position is identical in a 100ms timeframe,\n        // we cannot compute any useful deceleration.\n        if (startPos !== endPos) {\n\n          // Compute relative movement between these two points\n          var timeOffset = positions[endPos] - positions[startPos];\n          var movedLeft = self.__scrollLeft - positions[startPos - 2];\n          var movedTop = self.__scrollTop - positions[startPos - 1];\n\n          // Based on 50ms compute the movement to apply for each render step\n          self.__decelerationVelocityX = movedLeft / timeOffset * (1000 / 60);\n          self.__decelerationVelocityY = movedTop / timeOffset * (1000 / 60);\n\n          // How much velocity is required to start the deceleration\n          var minVelocityToStartDeceleration = self.options.paging || self.options.snapping ? 4 : 1;\n\n          // Verify that we have enough velocity to start deceleration\n          if (Math.abs(self.__decelerationVelocityX) > minVelocityToStartDeceleration || Math.abs(self.__decelerationVelocityY) > minVelocityToStartDeceleration) {\n\n            // Deactivate pull-to-refresh when decelerating\n            if (!self.__refreshActive) {\n              self.__startDeceleration(timeStamp);\n            }\n          }\n        } else {\n          self.__scrollingComplete();\n        }\n      } else if ((timeStamp - self.__lastTouchMove) > 100) {\n        self.__scrollingComplete();\n      }\n    }\n\n    // If this was a slower move it is per default non decelerated, but this\n    // still means that we want snap back to the bounds which is done here.\n    // This is placed outside the condition above to improve edge case stability\n    // e.g. touchend fired without enabled dragging. This should normally do not\n    // have modified the scroll positions or even showed the scrollbars though.\n    if (!self.__isDecelerating) {\n\n      if (self.__refreshActive && self.__refreshStart) {\n\n        // Use publish instead of scrollTo to allow scrolling to out of boundary position\n        // We don't need to normalize scrollLeft, zoomLevel, etc. here because we only y-scrolling when pull-to-refresh is enabled\n        self.__publish(self.__scrollLeft, -self.__refreshHeight, self.__zoomLevel, true);\n\n        if (self.__refreshStart) {\n          self.__refreshStart();\n        }\n\n      } else {\n\n        if (self.__interruptedAnimation || self.__isDragging) {\n          self.__scrollingComplete();\n        }\n        self.scrollTo(self.__scrollLeft, self.__scrollTop, true, self.__zoomLevel);\n\n        // Directly signalize deactivation (nothing todo on refresh?)\n        if (self.__refreshActive) {\n\n          self.__refreshActive = false;\n          if (self.__refreshDeactivate) {\n            self.__refreshDeactivate();\n          }\n\n        }\n      }\n    }\n\n    // Fully cleanup list\n    self.__positions.length = 0;\n\n  },\n\n\n\n  /*\n  ---------------------------------------------------------------------------\n    PRIVATE API\n  ---------------------------------------------------------------------------\n  */\n\n  /**\n   * Applies the scroll position to the content element\n   *\n   * @param left {Number} Left scroll position\n   * @param top {Number} Top scroll position\n   * @param animate {Boolean} Whether animation should be used to move to the new coordinates\n   */\n  __publish: function(left, top, zoom, animate) {\n\n    var self = this;\n\n    // Remember whether we had an animation, then we try to continue based on the current \"drive\" of the animation\n    var wasAnimating = self.__isAnimating;\n    if (wasAnimating) {\n      core.effect.Animate.stop(wasAnimating);\n      self.__isAnimating = false;\n    }\n\n    if (animate && self.options.animating) {\n\n      // Keep scheduled positions for scrollBy/zoomBy functionality\n      self.__scheduledLeft = left;\n      self.__scheduledTop = top;\n      self.__scheduledZoom = zoom;\n\n      var oldLeft = self.__scrollLeft;\n      var oldTop = self.__scrollTop;\n      var oldZoom = self.__zoomLevel;\n\n      var diffLeft = left - oldLeft;\n      var diffTop = top - oldTop;\n      var diffZoom = zoom - oldZoom;\n\n      var step = function(percent, now, render) {\n\n        if (render) {\n\n          self.__scrollLeft = oldLeft + (diffLeft * percent);\n          self.__scrollTop = oldTop + (diffTop * percent);\n          self.__zoomLevel = oldZoom + (diffZoom * percent);\n\n          // Push values out\n          if (self.__callback) {\n            self.__callback(self.__scrollLeft, self.__scrollTop, self.__zoomLevel);\n          }\n\n        }\n      };\n\n      var verify = function(id) {\n        return self.__isAnimating === id;\n      };\n\n      var completed = function(renderedFramesPerSecond, animationId, wasFinished) {\n        if (animationId === self.__isAnimating) {\n          self.__isAnimating = false;\n        }\n        if (self.__didDecelerationComplete || wasFinished) {\n          self.__scrollingComplete();\n        }\n\n        if (self.options.zooming) {\n          self.__computeScrollMax();\n        }\n      };\n\n      // When continuing based on previous animation we choose an ease-out animation instead of ease-in-out\n      self.__isAnimating = core.effect.Animate.start(step, verify, completed, self.options.animationDuration, wasAnimating ? easeOutCubic : easeInOutCubic);\n\n    } else {\n\n      self.__scheduledLeft = self.__scrollLeft = left;\n      self.__scheduledTop = self.__scrollTop = top;\n      self.__scheduledZoom = self.__zoomLevel = zoom;\n\n      // Push values out\n      if (self.__callback) {\n        self.__callback(left, top, zoom);\n      }\n\n      // Fix max scroll ranges\n      if (self.options.zooming) {\n        self.__computeScrollMax();\n      }\n    }\n  },\n\n\n  /**\n   * Recomputes scroll minimum values based on client dimensions and content dimensions.\n   */\n  __computeScrollMax: function(zoomLevel) {\n\n    var self = this;\n\n    if (zoomLevel == null) {\n      zoomLevel = self.__zoomLevel;\n    }\n\n    self.__maxScrollLeft = Math.max((self.__contentWidth * zoomLevel) - self.__clientWidth, 0);\n    self.__maxScrollTop = Math.max((self.__contentHeight * zoomLevel) - self.__clientHeight, 0);\n\n    if(!self.__didWaitForSize && self.__maxScrollLeft == 0 && self.__maxScrollTop == 0) {\n      self.__didWaitForSize = true;\n      self.__waitForSize();\n    }\n  },\n\n\n  /**\n   * If the scroll view isn't sized correctly on start, wait until we have at least some size\n   */\n  __waitForSize: function() {\n\n    var self = this;\n\n    clearTimeout(self.__sizerTimeout);\n\n    var sizer = function() {\n      self.resize();\n\n      if((self.options.scrollingX && self.__maxScrollLeft == 0) || (self.options.scrollingY && self.__maxScrollTop == 0)) {\n        //self.__sizerTimeout = setTimeout(sizer, 1000);\n      }\n    };\n\n    sizer();\n    self.__sizerTimeout = setTimeout(sizer, 1000);\n  },\n\n  /*\n  ---------------------------------------------------------------------------\n    ANIMATION (DECELERATION) SUPPORT\n  ---------------------------------------------------------------------------\n  */\n\n  /**\n   * Called when a touch sequence end and the speed of the finger was high enough\n   * to switch into deceleration mode.\n   */\n  __startDeceleration: function(timeStamp) {\n\n    var self = this;\n\n    if (self.options.paging) {\n\n      var scrollLeft = Math.max(Math.min(self.__scrollLeft, self.__maxScrollLeft), 0);\n      var scrollTop = Math.max(Math.min(self.__scrollTop, self.__maxScrollTop), 0);\n      var clientWidth = self.__clientWidth;\n      var clientHeight = self.__clientHeight;\n\n      // We limit deceleration not to the min/max values of the allowed range, but to the size of the visible client area.\n      // Each page should have exactly the size of the client area.\n      self.__minDecelerationScrollLeft = Math.floor(scrollLeft / clientWidth) * clientWidth;\n      self.__minDecelerationScrollTop = Math.floor(scrollTop / clientHeight) * clientHeight;\n      self.__maxDecelerationScrollLeft = Math.ceil(scrollLeft / clientWidth) * clientWidth;\n      self.__maxDecelerationScrollTop = Math.ceil(scrollTop / clientHeight) * clientHeight;\n\n    } else {\n\n      self.__minDecelerationScrollLeft = 0;\n      self.__minDecelerationScrollTop = 0;\n      self.__maxDecelerationScrollLeft = self.__maxScrollLeft;\n      self.__maxDecelerationScrollTop = self.__maxScrollTop;\n\n    }\n\n    // Wrap class method\n    var step = function(percent, now, render) {\n      self.__stepThroughDeceleration(render);\n    };\n\n    // How much velocity is required to keep the deceleration running\n    self.__minVelocityToKeepDecelerating = self.options.snapping ? 4 : 0.1;\n\n    // Detect whether it's still worth to continue animating steps\n    // If we are already slow enough to not being user perceivable anymore, we stop the whole process here.\n    var verify = function() {\n      var shouldContinue = Math.abs(self.__decelerationVelocityX) >= self.__minVelocityToKeepDecelerating ||\n        Math.abs(self.__decelerationVelocityY) >= self.__minVelocityToKeepDecelerating;\n      if (!shouldContinue) {\n        self.__didDecelerationComplete = true;\n      }\n      return shouldContinue;\n    };\n\n    var completed = function(renderedFramesPerSecond, animationId, wasFinished) {\n      self.__isDecelerating = false;\n      if (self.__didDecelerationComplete) {\n        self.__scrollingComplete();\n      }\n\n      // Animate to grid when snapping is active, otherwise just fix out-of-boundary positions\n      if(self.options.paging) {\n        self.scrollTo(self.__scrollLeft, self.__scrollTop, self.options.snapping);\n      }\n    };\n\n    // Start animation and switch on flag\n    self.__isDecelerating = core.effect.Animate.start(step, verify, completed);\n\n  },\n\n\n  /**\n   * Called on every step of the animation\n   *\n   * @param inMemory {Boolean} Whether to not render the current step, but keep it in memory only. Used internally only!\n   */\n  __stepThroughDeceleration: function(render) {\n\n    var self = this;\n\n\n    //\n    // COMPUTE NEXT SCROLL POSITION\n    //\n\n    // Add deceleration to scroll position\n    var scrollLeft = self.__scrollLeft + self.__decelerationVelocityX;\n    var scrollTop = self.__scrollTop + self.__decelerationVelocityY;\n\n\n    //\n    // HARD LIMIT SCROLL POSITION FOR NON BOUNCING MODE\n    //\n\n    if (!self.options.bouncing) {\n\n      var scrollLeftFixed = Math.max(Math.min(self.__maxDecelerationScrollLeft, scrollLeft), self.__minDecelerationScrollLeft);\n      if (scrollLeftFixed !== scrollLeft) {\n        scrollLeft = scrollLeftFixed;\n        self.__decelerationVelocityX = 0;\n      }\n\n      var scrollTopFixed = Math.max(Math.min(self.__maxDecelerationScrollTop, scrollTop), self.__minDecelerationScrollTop);\n      if (scrollTopFixed !== scrollTop) {\n        scrollTop = scrollTopFixed;\n        self.__decelerationVelocityY = 0;\n      }\n\n    }\n\n\n    //\n    // UPDATE SCROLL POSITION\n    //\n\n    if (render) {\n\n      self.__publish(scrollLeft, scrollTop, self.__zoomLevel);\n\n    } else {\n\n      self.__scrollLeft = scrollLeft;\n      self.__scrollTop = scrollTop;\n\n    }\n\n\n    //\n    // SLOW DOWN\n    //\n\n    // Slow down velocity on every iteration\n    if (!self.options.paging) {\n\n      // This is the factor applied to every iteration of the animation\n      // to slow down the process. This should emulate natural behavior where\n      // objects slow down when the initiator of the movement is removed\n      var frictionFactor = 0.95;\n\n      self.__decelerationVelocityX *= frictionFactor;\n      self.__decelerationVelocityY *= frictionFactor;\n\n    }\n\n\n    //\n    // BOUNCING SUPPORT\n    //\n\n    if (self.options.bouncing) {\n\n      var scrollOutsideX = 0;\n      var scrollOutsideY = 0;\n\n      // This configures the amount of change applied to deceleration/acceleration when reaching boundaries\n      var penetrationDeceleration = self.options.penetrationDeceleration;\n      var penetrationAcceleration = self.options.penetrationAcceleration;\n\n      // Check limits\n      if (scrollLeft < self.__minDecelerationScrollLeft) {\n        scrollOutsideX = self.__minDecelerationScrollLeft - scrollLeft;\n      } else if (scrollLeft > self.__maxDecelerationScrollLeft) {\n        scrollOutsideX = self.__maxDecelerationScrollLeft - scrollLeft;\n      }\n\n      if (scrollTop < self.__minDecelerationScrollTop) {\n        scrollOutsideY = self.__minDecelerationScrollTop - scrollTop;\n      } else if (scrollTop > self.__maxDecelerationScrollTop) {\n        scrollOutsideY = self.__maxDecelerationScrollTop - scrollTop;\n      }\n\n      // Slow down until slow enough, then flip back to snap position\n      if (scrollOutsideX !== 0) {\n        var isHeadingOutwardsX = scrollOutsideX * self.__decelerationVelocityX <= self.__minDecelerationScrollLeft;\n        if (isHeadingOutwardsX) {\n          self.__decelerationVelocityX += scrollOutsideX * penetrationDeceleration;\n        }\n        var isStoppedX = Math.abs(self.__decelerationVelocityX) <= self.__minVelocityToKeepDecelerating;\n        //If we're not heading outwards, or if the above statement got us below minDeceleration, go back towards bounds\n        if (!isHeadingOutwardsX || isStoppedX) {\n          self.__decelerationVelocityX = scrollOutsideX * penetrationAcceleration;\n        }\n      }\n\n      if (scrollOutsideY !== 0) {\n        var isHeadingOutwardsY = scrollOutsideY * self.__decelerationVelocityY <= self.__minDecelerationScrollTop;\n        if (isHeadingOutwardsY) {\n          self.__decelerationVelocityY += scrollOutsideY * penetrationDeceleration;\n        }\n        var isStoppedY = Math.abs(self.__decelerationVelocityY) <= self.__minVelocityToKeepDecelerating;\n        //If we're not heading outwards, or if the above statement got us below minDeceleration, go back towards bounds\n        if (!isHeadingOutwardsY || isStoppedY) {\n          self.__decelerationVelocityY = scrollOutsideY * penetrationAcceleration;\n        }\n      }\n    }\n  }\n});\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n  /**\n   * An ActionSheet is the slide up menu popularized on iOS.\n   *\n   * You see it all over iOS apps, where it offers a set of options \n   * triggered after an action.\n   */\n  ionic.views.ActionSheet = ionic.views.View.inherit({\n    initialize: function(opts) {\n      this.el = opts.el;\n    },\n    show: function() {\n      // Force a reflow so the animation will actually run\n      this.el.offsetWidth;\n\n      this.el.classList.add('active');\n    },\n    hide: function() {\n      // Force a reflow so the animation will actually run\n      this.el.offsetWidth;\n      this.el.classList.remove('active');\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  /**\n   * @ngdoc controller\n   * @name ionicBar\n   * @module ionic\n   * @description\n   * Controller for the {@link ionic.directive:ionHeaderBar} and\n   * {@link ionic.directive:ionFooterBar} directives.\n   */\n  ionic.views.HeaderBar = ionic.views.View.inherit({\n    initialize: function(opts) {\n      this.el = opts.el;\n\n      ionic.extend(this, {\n        alignTitle: 'center'\n      }, opts);\n\n      this.align();\n    },\n\n    /**\n     * @ngdoc method\n     * @name ionicBar#align\n     * @description\n     * Aligns the title text with the buttons in the bar\n     * so that the title size is maximized and aligned correctly\n     * as much as possible.\n     * @param {string=} direction Which direction to align the title towards.\n     * Available: 'left', 'right', 'center'. Default: 'center'.\n     */\n    align: function(align) {\n\n      align || (align = this.alignTitle);\n\n      // Find the titleEl element\n      var titleEl = this.el.querySelector('.title');\n      if(!titleEl) {\n        return;\n      }\n\n      var i, c, childSize;\n      var childNodes = this.el.childNodes;\n      var leftWidth = 0;\n      var rightWidth = 0;\n      var isCountingRightWidth = false;\n\n      // Compute how wide the left children are\n      // Skip all titles (there may still be two titles, one leaving the dom)\n      // Once we encounter a titleEl, realize we are now counting the right-buttons, not left\n      for(i = 0; i < childNodes.length; i++) {\n        c = childNodes[i];\n        if (c.tagName && c.tagName.toLowerCase() == 'h1') {\n          isCountingRightWidth = true;\n          continue;\n        }\n\n        childSize = null;\n        if(c.nodeType == 3) {\n          childSize = ionic.DomUtil.getTextBounds(c);\n        } else if(c.nodeType == 1) {\n          childSize = c.getBoundingClientRect();\n        }\n        if(childSize) {\n          if (isCountingRightWidth) {\n            rightWidth += childSize.width;\n          } else {\n            leftWidth += childSize.width;\n          }\n        }\n      }\n\n      var self = this;\n      ionic.requestAnimationFrame(function() {\n        var margin = Math.max(leftWidth, rightWidth) + 10;\n\n        // Size and align the header titleEl based on the sizes of the left and\n        // right children, and the desired alignment mode\n        if(align == 'center') {\n          if(margin > 10) {\n            titleEl.style.left = margin + 'px';\n            titleEl.style.right = margin + 'px';\n          }\n          if(titleEl.offsetWidth < titleEl.scrollWidth) {\n            if(rightWidth > 0) {\n              titleEl.style.right = (rightWidth + 5) + 'px';\n            }\n          }\n        } else if(align == 'left') {\n          titleEl.classList.add('title-left');\n          if(leftWidth > 0) {\n            titleEl.style.left = (leftWidth + 15) + 'px';\n          }\n        } else if(align == 'right') {\n          titleEl.classList.add('title-right');\n          if(rightWidth > 0) {\n            titleEl.style.right = (rightWidth + 15) + 'px';\n          }\n        }\n      });\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  var ITEM_CLASS = 'item';\n  var ITEM_CONTENT_CLASS = 'item-content';\n  var ITEM_SLIDING_CLASS = 'item-sliding';\n  var ITEM_OPTIONS_CLASS = 'item-options';\n  var ITEM_PLACEHOLDER_CLASS = 'item-placeholder';\n  var ITEM_REORDERING_CLASS = 'item-reordering';\n  var ITEM_REORDER_BTN_CLASS = 'item-reorder';\n\n  var DragOp = function() {};\n  DragOp.prototype = {\n    start: function(e) {\n    },\n    drag: function(e) {\n    },\n    end: function(e) {\n    },\n    isSameItem: function(item) {\n      return false;\n    }\n  };\n\n\n\n  var SlideDrag = function(opts) {\n    this.dragThresholdX = opts.dragThresholdX || 10;\n    this.el = opts.el;\n  };\n\n  SlideDrag.prototype = new DragOp();\n\n  SlideDrag.prototype.start = function(e) {\n    var content, buttons, offsetX, buttonsWidth;\n\n    if(e.target.classList.contains(ITEM_CONTENT_CLASS)) {\n      content = e.target;\n    } else if(e.target.classList.contains(ITEM_CLASS)) {\n      content = e.target.querySelector('.' + ITEM_CONTENT_CLASS);\n    } else {\n      content = ionic.DomUtil.getParentWithClass(e.target, ITEM_CONTENT_CLASS);\n    }\n\n    // If we don't have a content area as one of our children (or ourselves), skip\n    if(!content) {\n      return;\n    }\n\n    // Make sure we aren't animating as we slide\n    content.classList.remove(ITEM_SLIDING_CLASS);\n\n    // Grab the starting X point for the item (for example, so we can tell whether it is open or closed to start)\n    offsetX = parseFloat(content.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]) || 0;\n\n    // Grab the buttons\n    buttons = content.parentNode.querySelector('.' + ITEM_OPTIONS_CLASS);\n    if(!buttons) {\n      return;\n    }\n\n    buttonsWidth = buttons.offsetWidth;\n\n    this._currentDrag = {\n      buttonsWidth: buttonsWidth,\n      content: content,\n      startOffsetX: offsetX\n    };\n  };\n\n  /**\n   * Check if this is the same item that was previously dragged.\n   */\n  SlideDrag.prototype.isSameItem = function(op) {\n    if(op._lastDrag && this._currentDrag) {\n      return this._currentDrag.content == op._lastDrag.content;\n    }\n    return false;\n  };\n\n  SlideDrag.prototype.clean = function(e) {\n    var lastDrag = this._lastDrag;\n\n    if(!lastDrag) return;\n\n    ionic.requestAnimationFrame(function() {\n      lastDrag.content.style[ionic.CSS.TRANSITION] = '';\n      lastDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(0, 0, 0)';\n    });\n  };\n\n  SlideDrag.prototype.drag = ionic.animationFrameThrottle(function(e) {\n    var buttonsWidth;\n\n    // We really aren't dragging\n    if(!this._currentDrag) {\n      return;\n    }\n\n    // Check if we should start dragging. Check if we've dragged past the threshold,\n    // or we are starting from the open state.\n    if(!this._isDragging &&\n        ((Math.abs(e.gesture.deltaX) > this.dragThresholdX) ||\n        (Math.abs(this._currentDrag.startOffsetX) > 0)))\n    {\n      this._isDragging = true;\n    }\n\n    if(this._isDragging) {\n      buttonsWidth = this._currentDrag.buttonsWidth;\n\n      // Grab the new X point, capping it at zero\n      var newX = Math.min(0, this._currentDrag.startOffsetX + e.gesture.deltaX);\n\n      // If the new X position is past the buttons, we need to slow down the drag (rubber band style)\n      if(newX < -buttonsWidth) {\n        // Calculate the new X position, capped at the top of the buttons\n        newX = Math.min(-buttonsWidth, -buttonsWidth + (((e.gesture.deltaX + buttonsWidth) * 0.4)));\n      }\n\n      this._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + newX + 'px, 0, 0)';\n      this._currentDrag.content.style[ionic.CSS.TRANSITION] = 'none';\n    }\n  });\n\n  SlideDrag.prototype.end = function(e, doneCallback) {\n    var _this = this;\n\n    // There is no drag, just end immediately\n    if(!this._currentDrag) {\n      doneCallback && doneCallback();\n      return;\n    }\n\n    // If we are currently dragging, we want to snap back into place\n    // The final resting point X will be the width of the exposed buttons\n    var restingPoint = -this._currentDrag.buttonsWidth;\n\n    // Check if the drag didn't clear the buttons mid-point\n    // and we aren't moving fast enough to swipe open\n    if(e.gesture.deltaX > -(this._currentDrag.buttonsWidth/2)) {\n\n      // If we are going left but too slow, or going right, go back to resting\n      if(e.gesture.direction == \"left\" && Math.abs(e.gesture.velocityX) < 0.3) {\n        restingPoint = 0;\n      } else if(e.gesture.direction == \"right\") {\n        restingPoint = 0;\n      }\n\n    }\n\n    ionic.requestAnimationFrame(function() {\n      if(restingPoint === 0) {\n        _this._currentDrag.content.style[ionic.CSS.TRANSFORM] = '';\n      } else {\n        _this._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + restingPoint + 'px, 0, 0)';\n      }\n      _this._currentDrag.content.style[ionic.CSS.TRANSITION] = '';\n\n\n      // Kill the current drag\n      _this._lastDrag = _this._currentDrag;\n      _this._currentDrag = null;\n\n      // We are done, notify caller\n      doneCallback && doneCallback();\n    });\n  };\n\n  var ReorderDrag = function(opts) {\n    this.dragThresholdY = opts.dragThresholdY || 0;\n    this.onReorder = opts.onReorder;\n    this.el = opts.el;\n    this.scrollEl = opts.scrollEl;\n    this.scrollView = opts.scrollView;\n  };\n\n  ReorderDrag.prototype = new DragOp();\n\n  ReorderDrag.prototype._moveElement = function(e) {\n    var y = (e.gesture.center.pageY - this._currentDrag.elementHeight/2);\n    this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(0, '+y+'px, 0)';\n  };\n\n  ReorderDrag.prototype.start = function(e) {\n    var content;\n\n\n    // Grab the starting Y point for the item\n    var offsetY = this.el.offsetTop;//parseFloat(this.el.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[1]) || 0;\n\n    var startIndex = ionic.DomUtil.getChildIndex(this.el, this.el.nodeName.toLowerCase());\n    var elementHeight = this.el.offsetHeight;\n    var placeholder = this.el.cloneNode(true);\n\n    // If we have a scroll pane, move our draggable element outside of it\n    // We do this because when we drag our element down below the edge of the page\n    // and scroll the scroll-pane, if the element is *part* of the scroll-pane,\n    // it will scroll 'with' the scroll-pane's contents and change position.\n    var appendToElement = (this.scrollEl || this.el).parentNode;\n\n    placeholder.classList.add(ITEM_PLACEHOLDER_CLASS);\n\n    this.el.parentNode.insertBefore(placeholder, this.el);\n    this.el.classList.add(ITEM_REORDERING_CLASS);\n\n    appendToElement.parentNode.appendChild(this.el);\n\n    this._currentDrag = {\n      elementHeight: elementHeight,\n      startIndex: startIndex,\n      placeholder: placeholder,\n      scrollHeight: scroll,\n      list: placeholder.parentNode\n    };\n\n    this._moveElement(e);\n  };\n\n  ReorderDrag.prototype.drag = ionic.animationFrameThrottle(function(e) {\n    // We really aren't dragging\n    if(!this._currentDrag) {\n      return;\n    }\n\n    var scrollY = 0;\n    var pageY = e.gesture.center.pageY;\n\n    //If we have a scrollView, check scroll boundaries for dragged element and scroll if necessary\n    if (this.scrollView) {\n      var container = this.scrollEl;\n\n      scrollY = this.scrollView.getValues().top;\n\n      var containerTop = container.offsetTop;\n      var pixelsPastTop = containerTop - pageY + this._currentDrag.elementHeight/2;\n      var pixelsPastBottom = pageY + this._currentDrag.elementHeight/2 - containerTop - container.offsetHeight;\n\n      if (e.gesture.deltaY < 0 && pixelsPastTop > 0 && scrollY > 0) {\n        this.scrollView.scrollBy(null, -pixelsPastTop);\n      }\n      if (e.gesture.deltaY > 0 && pixelsPastBottom > 0) {\n        if (scrollY < this.scrollView.getScrollMax().top) {\n          this.scrollView.scrollBy(null, pixelsPastBottom);\n        }\n      }\n    }\n\n    // Check if we should start dragging. Check if we've dragged past the threshold,\n    // or we are starting from the open state.\n    if(!this._isDragging && Math.abs(e.gesture.deltaY) > this.dragThresholdY) {\n      this._isDragging = true;\n    }\n\n    if(this._isDragging) {\n      this._moveElement(e);\n\n      this._currentDrag.currentY = scrollY + pageY - this._currentDrag.placeholder.parentNode.offsetTop;\n\n      this._reorderItems();\n    }\n  });\n\n  // When an item is dragged, we need to reorder any items for sorting purposes\n  ReorderDrag.prototype._reorderItems = function() {\n    var placeholder = this._currentDrag.placeholder;\n    var siblings = Array.prototype.slice.call(this._currentDrag.placeholder.parentNode.children);\n\n    var index = siblings.indexOf(this._currentDrag.placeholder);\n    var topSibling = siblings[Math.max(0, index - 1)];\n    var bottomSibling = siblings[Math.min(siblings.length, index+1)];\n    var thisOffsetTop = this._currentDrag.currentY;// + this._currentDrag.startOffsetTop;\n\n    if(topSibling && (thisOffsetTop < topSibling.offsetTop + topSibling.offsetHeight/2)) {\n      ionic.DomUtil.swapNodes(this._currentDrag.placeholder, topSibling);\n      return index - 1;\n    } else if(bottomSibling && thisOffsetTop > (bottomSibling.offsetTop + bottomSibling.offsetHeight/2)) {\n      ionic.DomUtil.swapNodes(bottomSibling, this._currentDrag.placeholder);\n      return index + 1;\n    }\n  };\n\n  ReorderDrag.prototype.end = function(e, doneCallback) {\n    if(!this._currentDrag) {\n      doneCallback && doneCallback();\n      return;\n    }\n\n    var placeholder = this._currentDrag.placeholder;\n    var finalPosition = ionic.DomUtil.getChildIndex(placeholder, placeholder.nodeName.toLowerCase());\n\n    // Reposition the element\n    this.el.classList.remove(ITEM_REORDERING_CLASS);\n    this.el.style[ionic.CSS.TRANSFORM] = '';\n\n    placeholder.parentNode.insertBefore(this.el, placeholder);\n    placeholder.parentNode.removeChild(placeholder);\n\n    this.onReorder && this.onReorder(this.el, this._currentDrag.startIndex, finalPosition);\n\n    this._currentDrag = null;\n    doneCallback && doneCallback();\n  };\n\n\n\n  /**\n   * The ListView handles a list of items. It will process drag animations, edit mode,\n   * and other operations that are common on mobile lists or table views.\n   */\n  ionic.views.ListView = ionic.views.View.inherit({\n    initialize: function(opts) {\n      var _this = this;\n\n      opts = ionic.extend({\n        onReorder: function(el, oldIndex, newIndex) {},\n        virtualRemoveThreshold: -200,\n        virtualAddThreshold: 200,\n        canSwipe: false\n      }, opts);\n\n      ionic.extend(this, opts);\n\n      if(!this.itemHeight && this.listEl) {\n        this.itemHeight = this.listEl.children[0] && parseInt(this.listEl.children[0].style.height, 10);\n      }\n\n      //ionic.views.ListView.__super__.initialize.call(this, opts);\n\n      this.onRefresh = opts.onRefresh || function() {};\n      this.onRefreshOpening = opts.onRefreshOpening || function() {};\n      this.onRefreshHolding = opts.onRefreshHolding || function() {};\n\n      window.ionic.onGesture('release', function(e) {\n        _this._handleEndDrag(e);\n      }, this.el);\n\n      window.ionic.onGesture('drag', function(e) {\n        _this._handleDrag(e);\n      }, this.el);\n      // Start the drag states\n      this._initDrag();\n    },\n    /**\n     * Called to tell the list to stop refreshing. This is useful\n     * if you are refreshing the list and are done with refreshing.\n     */\n    stopRefreshing: function() {\n      var refresher = this.el.querySelector('.list-refresher');\n      refresher.style.height = '0px';\n    },\n\n    /**\n     * If we scrolled and have virtual mode enabled, compute the window\n     * of active elements in order to figure out the viewport to render.\n     */\n    didScroll: function(e) {\n      if(this.isVirtual) {\n        var itemHeight = this.itemHeight;\n\n        // TODO: This would be inaccurate if we are windowed\n        var totalItems = this.listEl.children.length;\n\n        // Grab the total height of the list\n        var scrollHeight = e.target.scrollHeight;\n\n        // Get the viewport height\n        var viewportHeight = this.el.parentNode.offsetHeight;\n\n        // scrollTop is the current scroll position\n        var scrollTop = e.scrollTop;\n\n        // High water is the pixel position of the first element to include (everything before\n        // that will be removed)\n        var highWater = Math.max(0, e.scrollTop + this.virtualRemoveThreshold);\n\n        // Low water is the pixel position of the last element to include (everything after\n        // that will be removed)\n        var lowWater = Math.min(scrollHeight, Math.abs(e.scrollTop) + viewportHeight + this.virtualAddThreshold);\n\n        // Compute how many items per viewport size can show\n        var itemsPerViewport = Math.floor((lowWater - highWater) / itemHeight);\n\n        // Get the first and last elements in the list based on how many can fit\n        // between the pixel range of lowWater and highWater\n        var first = parseInt(Math.abs(highWater / itemHeight), 10);\n        var last = parseInt(Math.abs(lowWater / itemHeight), 10);\n\n        // Get the items we need to remove\n        this._virtualItemsToRemove = Array.prototype.slice.call(this.listEl.children, 0, first);\n\n        // Grab the nodes we will be showing\n        var nodes = Array.prototype.slice.call(this.listEl.children, first, first + itemsPerViewport);\n\n        this.renderViewport && this.renderViewport(highWater, lowWater, first, last);\n      }\n    },\n\n    didStopScrolling: function(e) {\n      if(this.isVirtual) {\n        for(var i = 0; i < this._virtualItemsToRemove.length; i++) {\n          var el = this._virtualItemsToRemove[i];\n          //el.parentNode.removeChild(el);\n          this.didHideItem && this.didHideItem(i);\n        }\n        // Once scrolling stops, check if we need to remove old items\n\n      }\n    },\n\n    /**\n     * Clear any active drag effects on the list.\n     */\n    clearDragEffects: function() {\n      if(this._lastDragOp) {\n        this._lastDragOp.clean && this._lastDragOp.clean();\n        this._lastDragOp = null;\n      }\n    },\n\n    _initDrag: function() {\n      //ionic.views.ListView.__super__._initDrag.call(this);\n\n      // Store the last one\n      this._lastDragOp = this._dragOp;\n\n      this._dragOp = null;\n    },\n\n    // Return the list item from the given target\n    _getItem: function(target) {\n      while(target) {\n        if(target.classList.contains(ITEM_CLASS)) {\n          return target;\n        }\n        target = target.parentNode;\n      }\n      return null;\n    },\n\n\n    _startDrag: function(e) {\n      var _this = this;\n\n      var didStart = false;\n\n      this._isDragging = false;\n\n      var lastDragOp = this._lastDragOp;\n\n      // Check if this is a reorder drag\n      if(ionic.DomUtil.getParentOrSelfWithClass(e.target, ITEM_REORDER_BTN_CLASS) && (e.gesture.direction == 'up' || e.gesture.direction == 'down')) {\n        var item = this._getItem(e.target);\n\n        if(item) {\n          this._dragOp = new ReorderDrag({\n            el: item,\n            scrollEl: this.scrollEl,\n            scrollView: this.scrollView,\n            onReorder: function(el, start, end) {\n              _this.onReorder && _this.onReorder(el, start, end);\n            }\n          });\n          this._dragOp.start(e);\n          e.preventDefault();\n        }\n      }\n\n      // Or check if this is a swipe to the side drag\n      else if(!this._didDragUpOrDown && (e.gesture.direction == 'left' || e.gesture.direction == 'right') && Math.abs(e.gesture.deltaX) > 5) {\n\n        // Make sure this is an item with buttons\n        var item = this._getItem(e.target);\n        if(item && item.querySelector('.item-options')) {\n          this._dragOp = new SlideDrag({ el: this.el });\n          this._dragOp.start(e);\n          e.preventDefault();\n        }\n      }\n\n      // If we had a last drag operation and this is a new one on a different item, clean that last one\n      if(lastDragOp && this._dragOp && !this._dragOp.isSameItem(lastDragOp) && e.defaultPrevented) {\n        lastDragOp.clean && lastDragOp.clean();\n      }\n    },\n\n\n    _handleEndDrag: function(e) {\n      var _this = this;\n\n      this._didDragUpOrDown = false;\n\n      if(!this._dragOp) {\n        //ionic.views.ListView.__super__._handleEndDrag.call(this, e);\n        return;\n      }\n\n      this._dragOp.end(e, function() {\n        _this._initDrag();\n      });\n    },\n\n    /**\n     * Process the drag event to move the item to the left or right.\n     */\n    _handleDrag: function(e) {\n      var _this = this, content, buttons;\n\n      if (!this.canSwipe) {\n        return;\n      }\n\n      if(Math.abs(e.gesture.deltaY) > 5) {\n        this._didDragUpOrDown = true;\n      }\n\n      // If we get a drag event, make sure we aren't in another drag, then check if we should\n      // start one\n      if(!this.isDragging && !this._dragOp) {\n        this._startDrag(e);\n      }\n\n      // No drag still, pass it up\n      if(!this._dragOp) {\n        //ionic.views.ListView.__super__._handleDrag.call(this, e);\n        return;\n      }\n\n      e.gesture.srcEvent.preventDefault();\n      this._dragOp.drag(e);\n    }\n\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n  /**\n   * Loading\n   *\n   * The Loading is an overlay that can be used to indicate\n   * activity while blocking user interaction.\n   */\n  ionic.views.Loading = ionic.views.View.inherit({\n    initialize: function(opts) {\n      var _this = this;\n\n      this.el = opts.el;\n\n      this.maxWidth = opts.maxWidth || 200;\n\n      this.showDelay = opts.showDelay || 0;\n\n      this._loadingBox = this.el.querySelector('.loading') || this.el;\n    },\n    show: function() {\n      var _this = this;\n\n      if(this._loadingBox) {\n        var lb = _this._loadingBox;\n\n        var width = Math.min(_this.maxWidth, Math.max(window.outerWidth - 40, lb.offsetWidth));\n\n        lb.style.width = width + 'px';\n\n        lb.style.marginLeft = (-lb.offsetWidth) / 2 + 'px';\n        lb.style.marginTop = (-lb.offsetHeight) / 2 + 'px';\n\n        // Wait 'showDelay' ms before showing the loading screen\n        this._showDelayTimeout = window.setTimeout(function() {\n          _this.el.classList.add('active');\n        }, _this.showDelay);\n      }\n    },\n    hide: function() {\n      // Force a reflow so the animation will actually run\n      this.el.offsetWidth;\n\n      // Prevent unnecessary 'show' after 'hide' has already been called\n      window.clearTimeout(this._showDelayTimeout);\n\n      this.el.classList.remove('active');\n    },\n    setContent: function(html) {\n      if (this._loadingBox) {\n        this._loadingBox.innerHTML = html || '';\n      }\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  ionic.views.Modal = ionic.views.View.inherit({\n    initialize: function(opts) {\n      opts = ionic.extend({\n        focusFirstInput: false,\n        unfocusOnHide: true,\n        focusFirstDelay: 600\n      }, opts);\n\n      ionic.extend(this, opts);\n\n      this.el = opts.el;\n    },\n    show: function() {\n      var self = this;\n\n      if(self.focusFirstInput) {\n        // Let any animations run first\n        window.setTimeout(function() {\n          var input = self.el.querySelector('input, textarea');\n          input && input.focus && input.focus();\n        }, self.focusFirstDelay);\n      }\n    },\n    hide: function() {\n      // Unfocus all elements\n      if(this.unfocusOnHide) {\n        var inputs = this.el.querySelectorAll('input, textarea');\n        // Let any animations run first\n        window.setTimeout(function() {\n          for(var i = 0; i < inputs.length; i++) {\n            inputs[i].blur && inputs[i].blur();\n          }\n        });\n      }\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  ionic.views.NavBar = ionic.views.View.inherit({\n    initialize: function(opts) {\n      this.el = opts.el;\n\n      this._titleEl = this.el.querySelector('.title');\n\n      if(opts.hidden) {\n        this.hide();\n      }\n    },\n    hide: function() {\n      this.el.classList.add('hidden');\n    },\n    show: function() {\n      this.el.classList.remove('hidden');\n    },\n    shouldGoBack: function() {},\n\n    setTitle: function(title) {\n      if(!this._titleEl) {\n        return;\n      }\n      this._titleEl.innerHTML = title;\n    },\n\n    showBackButton: function(shouldShow) {\n      var _this = this;\n\n      if(!this._currentBackButton) {\n        var back = document.createElement('a');\n        back.className = 'button back';\n        back.innerHTML = 'Back';\n\n        this._currentBackButton = back;\n        this._currentBackButton.onclick = function(event) {\n          _this.shouldGoBack && _this.shouldGoBack();\n        };\n      }\n\n      if(shouldShow && !this._currentBackButton.parentNode) {\n        // Prepend the back button\n        this.el.insertBefore(this._currentBackButton, this.el.firstChild);\n      } else if(!shouldShow && this._currentBackButton.parentNode) {\n        // Remove the back button if it's there\n        this._currentBackButton.parentNode.removeChild(this._currentBackButton);\n      }\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n  /**\n   * The side menu view handles one of the side menu's in a Side Menu Controller\n   * configuration.\n   * It takes a DOM reference to that side menu element.\n   */\n  ionic.views.SideMenu = ionic.views.View.inherit({\n    initialize: function(opts) {\n      this.el = opts.el;\n      this.isEnabled = (typeof opts.isEnabled === 'undefined') ? true : opts.isEnabled;\n      this.setWidth(opts.width);\n    },\n\n    getFullWidth: function() {\n      return this.width;\n    },\n    setWidth: function(width) {\n      this.width = width;\n      this.el.style.width = width + 'px';\n    },\n    setIsEnabled: function(isEnabled) {\n      this.isEnabled = isEnabled;\n    },\n    bringUp: function() {\n      if(this.el.style.zIndex !== '0') {\n        this.el.style.zIndex = '0';\n      }\n    },\n    pushDown: function() {\n      if(this.el.style.zIndex !== '-1') {\n        this.el.style.zIndex = '-1';\n      }\n    }\n  });\n\n  ionic.views.SideMenuContent = ionic.views.View.inherit({\n    initialize: function(opts) {\n      var _this = this;\n\n      ionic.extend(this, {\n        animationClass: 'menu-animated',\n        onDrag: function(e) {},\n        onEndDrag: function(e) {},\n      }, opts);\n\n      ionic.onGesture('drag', ionic.proxy(this._onDrag, this), this.el);\n      ionic.onGesture('release', ionic.proxy(this._onEndDrag, this), this.el);\n    },\n    _onDrag: function(e) {\n      this.onDrag && this.onDrag(e);\n    },\n    _onEndDrag: function(e) {\n      this.onEndDrag && this.onEndDrag(e);\n    },\n    disableAnimation: function() {\n      this.el.classList.remove(this.animationClass);\n    },\n    enableAnimation: function() {\n      this.el.classList.add(this.animationClass);\n    },\n    getTranslateX: function() {\n      return parseFloat(this.el.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]);\n    },\n    setTranslateX: ionic.animationFrameThrottle(function(x) {\n      this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(' + x + 'px, 0, 0)';\n    })\n  });\n\n})(ionic);\n\n/*\n * Adapted from Swipe.js 2.0\n *\n * Brad Birdsall\n * Copyright 2013, MIT License\n *\n*/\n\n/**\n * @ngdoc controller\n * @name ionicSlideBox\n * @module ionic\n * @description\n * Controller for the {@link ionic.directive:ionSlideBox} directive.\n */\n\n(function(ionic) {\n'use strict';\n\nionic.views.Slider = ionic.views.View.inherit({\n  initialize: function (options) {\n    // utilities\n    var noop = function() {}; // simple no operation function\n    var offloadFn = function(fn) { setTimeout(fn || noop, 0) }; // offload a functions execution\n\n    // check browser capabilities\n    var browser = {\n      addEventListener: !!window.addEventListener,\n      touch: ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch,\n      transitions: (function(temp) {\n        var props = ['transitionProperty', 'WebkitTransition', 'MozTransition', 'OTransition', 'msTransition'];\n        for ( var i in props ) if (temp.style[ props[i] ] !== undefined) return true;\n        return false;\n      })(document.createElement('swipe'))\n    };\n\n\n    var container = options.el;\n\n    // quit if no root element\n    if (!container) return;\n    var element = container.children[0];\n    var slides, slidePos, width, length;\n    options = options || {};\n    var index = parseInt(options.startSlide, 10) || 0;\n    var speed = options.speed || 300;\n    options.continuous = options.continuous !== undefined ? options.continuous : true;\n\n    function setup() {\n\n      // cache slides\n      slides = element.children;\n      length = slides.length;\n\n      // set continuous to false if only one slide\n      if (slides.length < 2) options.continuous = false;\n\n      //special case if two slides\n      if (browser.transitions && options.continuous && slides.length < 3) {\n        element.appendChild(slides[0].cloneNode(true));\n        element.appendChild(element.children[1].cloneNode(true));\n        slides = element.children;\n      }\n\n      // create an array to store current positions of each slide\n      slidePos = new Array(slides.length);\n\n      // determine width of each slide\n      width = container.getBoundingClientRect().width || container.offsetWidth;\n\n      element.style.width = (slides.length * width) + 'px';\n\n      // stack elements\n      var pos = slides.length;\n      while(pos--) {\n\n        var slide = slides[pos];\n\n        slide.style.width = width + 'px';\n        slide.setAttribute('data-index', pos);\n\n        if (browser.transitions) {\n          slide.style.left = (pos * -width) + 'px';\n          move(pos, index > pos ? -width : (index < pos ? width : 0), 0);\n        }\n\n      }\n\n      // reposition elements before and after index\n      if (options.continuous && browser.transitions) {\n        move(circle(index-1), -width, 0);\n        move(circle(index+1), width, 0);\n      }\n\n      if (!browser.transitions) element.style.left = (index * -width) + 'px';\n\n      container.style.visibility = 'visible';\n\n      options.slidesChanged && options.slidesChanged();\n    }\n\n    function prev() {\n\n      if (options.continuous) slide(index-1);\n      else if (index) slide(index-1);\n\n    }\n\n    function next() {\n\n      if (options.continuous) slide(index+1);\n      else if (index < slides.length - 1) slide(index+1);\n\n    }\n\n    function circle(index) {\n\n      // a simple positive modulo using slides.length\n      return (slides.length + (index % slides.length)) % slides.length;\n\n    }\n\n    function slide(to, slideSpeed) {\n\n      // do nothing if already on requested slide\n      if (index == to) return;\n\n      if (browser.transitions) {\n\n        var direction = Math.abs(index-to) / (index-to); // 1: backward, -1: forward\n\n        // get the actual position of the slide\n        if (options.continuous) {\n          var natural_direction = direction;\n          direction = -slidePos[circle(to)] / width;\n\n          // if going forward but to < index, use to = slides.length + to\n          // if going backward but to > index, use to = -slides.length + to\n          if (direction !== natural_direction) to =  -direction * slides.length + to;\n\n        }\n\n        var diff = Math.abs(index-to) - 1;\n\n        // move all the slides between index and to in the right direction\n        while (diff--) move( circle((to > index ? to : index) - diff - 1), width * direction, 0);\n\n        to = circle(to);\n\n        move(index, width * direction, slideSpeed || speed);\n        move(to, 0, slideSpeed || speed);\n\n        if (options.continuous) move(circle(to - direction), -(width * direction), 0); // we need to get the next in place\n\n      } else {\n\n        to = circle(to);\n        animate(index * -width, to * -width, slideSpeed || speed);\n        //no fallback for a circular continuous if the browser does not accept transitions\n      }\n\n      index = to;\n      offloadFn(options.callback && options.callback(index, slides[index]));\n    }\n\n    function move(index, dist, speed) {\n\n      translate(index, dist, speed);\n      slidePos[index] = dist;\n\n    }\n\n    function translate(index, dist, speed) {\n\n      var slide = slides[index];\n      var style = slide && slide.style;\n\n      if (!style) return;\n\n      style.webkitTransitionDuration =\n      style.MozTransitionDuration =\n      style.msTransitionDuration =\n      style.OTransitionDuration =\n      style.transitionDuration = speed + 'ms';\n\n      style.webkitTransform = 'translate(' + dist + 'px,0)' + 'translateZ(0)';\n      style.msTransform =\n      style.MozTransform =\n      style.OTransform = 'translateX(' + dist + 'px)';\n\n    }\n\n    function animate(from, to, speed) {\n\n      // if not an animation, just reposition\n      if (!speed) {\n\n        element.style.left = to + 'px';\n        return;\n\n      }\n\n      var start = +new Date;\n\n      var timer = setInterval(function() {\n\n        var timeElap = +new Date - start;\n\n        if (timeElap > speed) {\n\n          element.style.left = to + 'px';\n\n          if (delay) begin();\n\n          options.transitionEnd && options.transitionEnd.call(event, index, slides[index]);\n\n          clearInterval(timer);\n          return;\n\n        }\n\n        element.style.left = (( (to - from) * (Math.floor((timeElap / speed) * 100) / 100) ) + from) + 'px';\n\n      }, 4);\n\n    }\n\n    // setup auto slideshow\n    var delay = options.auto || 0;\n    var interval;\n\n    function begin() {\n\n      interval = setTimeout(next, delay);\n\n    }\n\n    function stop() {\n\n      delay = options.auto || 0;\n      clearTimeout(interval);\n\n    }\n\n\n    // setup initial vars\n    var start = {};\n    var delta = {};\n    var isScrolling;\n\n    // setup event capturing\n    var events = {\n\n      handleEvent: function(event) {\n        if(event.type == 'mousedown' || event.type == 'mouseup' || event.type == 'mousemove') {\n          event.touches = [{\n            pageX: event.pageX,\n            pageY: event.pageY\n          }];\n        }\n\n        switch (event.type) {\n          case 'mousedown': this.start(event); break;\n          case 'touchstart': this.start(event); break;\n          case 'touchmove': this.move(event); break;\n          case 'mousemove': this.move(event); break;\n          case 'touchend': offloadFn(this.end(event)); break;\n          case 'mouseup': offloadFn(this.end(event)); break;\n          case 'webkitTransitionEnd':\n          case 'msTransitionEnd':\n          case 'oTransitionEnd':\n          case 'otransitionend':\n          case 'transitionend': offloadFn(this.transitionEnd(event)); break;\n          case 'resize': offloadFn(setup); break;\n        }\n\n        if (options.stopPropagation) event.stopPropagation();\n\n      },\n      start: function(event) {\n\n        var touches = event.touches[0];\n\n        // measure start values\n        start = {\n\n          // get initial touch coords\n          x: touches.pageX,\n          y: touches.pageY,\n\n          // store time to determine touch duration\n          time: +new Date\n\n        };\n\n        // used for testing first move event\n        isScrolling = undefined;\n\n        // reset delta and end measurements\n        delta = {};\n\n        // attach touchmove and touchend listeners\n        if(browser.touch) {\n          element.addEventListener('touchmove', this, false);\n          element.addEventListener('touchend', this, false);\n        } else {\n          element.addEventListener('mousemove', this, false);\n          element.addEventListener('mouseup', this, false);\n          document.addEventListener('mouseup', this, false);\n        }\n      },\n      move: function(event) {\n\n        // ensure swiping with one touch and not pinching\n        if ( event.touches.length > 1 || event.scale && event.scale !== 1) return\n\n        if (options.disableScroll) event.preventDefault();\n\n        var touches = event.touches[0];\n\n        // measure change in x and y\n        delta = {\n          x: touches.pageX - start.x,\n          y: touches.pageY - start.y\n        }\n\n        // determine if scrolling test has run - one time test\n        if ( typeof isScrolling == 'undefined') {\n          isScrolling = !!( isScrolling || Math.abs(delta.x) < Math.abs(delta.y) );\n        }\n\n        // if user is not trying to scroll vertically\n        if (!isScrolling) {\n\n          // prevent native scrolling\n          event.preventDefault();\n\n          // stop slideshow\n          stop();\n\n          // increase resistance if first or last slide\n          if (options.continuous) { // we don't add resistance at the end\n\n            translate(circle(index-1), delta.x + slidePos[circle(index-1)], 0);\n            translate(index, delta.x + slidePos[index], 0);\n            translate(circle(index+1), delta.x + slidePos[circle(index+1)], 0);\n\n          } else {\n\n            delta.x =\n              delta.x /\n                ( (!index && delta.x > 0               // if first slide and sliding left\n                  || index == slides.length - 1        // or if last slide and sliding right\n                  && delta.x < 0                       // and if sliding at all\n                ) ?\n                ( Math.abs(delta.x) / width + 1 )      // determine resistance level\n                : 1 );                                 // no resistance if false\n\n            // translate 1:1\n            translate(index-1, delta.x + slidePos[index-1], 0);\n            translate(index, delta.x + slidePos[index], 0);\n            translate(index+1, delta.x + slidePos[index+1], 0);\n          }\n\n        }\n\n      },\n      end: function(event) {\n\n        // measure duration\n        var duration = +new Date - start.time;\n\n        // determine if slide attempt triggers next/prev slide\n        var isValidSlide =\n              Number(duration) < 250               // if slide duration is less than 250ms\n              && Math.abs(delta.x) > 20            // and if slide amt is greater than 20px\n              || Math.abs(delta.x) > width/2;      // or if slide amt is greater than half the width\n\n        // determine if slide attempt is past start and end\n        var isPastBounds =\n              !index && delta.x > 0                            // if first slide and slide amt is greater than 0\n              || index == slides.length - 1 && delta.x < 0;    // or if last slide and slide amt is less than 0\n\n        if (options.continuous) isPastBounds = false;\n\n        // determine direction of swipe (true:right, false:left)\n        var direction = delta.x < 0;\n\n        // if not scrolling vertically\n        if (!isScrolling) {\n\n          if (isValidSlide && !isPastBounds) {\n\n            if (direction) {\n\n              if (options.continuous) { // we need to get the next in this direction in place\n\n                move(circle(index-1), -width, 0);\n                move(circle(index+2), width, 0);\n\n              } else {\n                move(index-1, -width, 0);\n              }\n\n              move(index, slidePos[index]-width, speed);\n              move(circle(index+1), slidePos[circle(index+1)]-width, speed);\n              index = circle(index+1);\n\n            } else {\n              if (options.continuous) { // we need to get the next in this direction in place\n\n                move(circle(index+1), width, 0);\n                move(circle(index-2), -width, 0);\n\n              } else {\n                move(index+1, width, 0);\n              }\n\n              move(index, slidePos[index]+width, speed);\n              move(circle(index-1), slidePos[circle(index-1)]+width, speed);\n              index = circle(index-1);\n\n            }\n\n            options.callback && options.callback(index, slides[index]);\n\n          } else {\n\n            if (options.continuous) {\n\n              move(circle(index-1), -width, speed);\n              move(index, 0, speed);\n              move(circle(index+1), width, speed);\n\n            } else {\n\n              move(index-1, -width, speed);\n              move(index, 0, speed);\n              move(index+1, width, speed);\n            }\n\n          }\n\n        }\n\n        // kill touchmove and touchend event listeners until touchstart called again\n        if(browser.touch) {\n          element.removeEventListener('touchmove', events, false)\n          element.removeEventListener('touchend', events, false)\n        } else {\n          element.removeEventListener('mousemove', events, false)\n          element.removeEventListener('mouseup', events, false)\n          document.removeEventListener('mouseup', events, false);\n        }\n\n      },\n      transitionEnd: function(event) {\n\n        if (parseInt(event.target.getAttribute('data-index'), 10) == index) {\n\n          if (delay) begin();\n\n          options.transitionEnd && options.transitionEnd.call(event, index, slides[index]);\n\n        }\n\n      }\n\n    }\n\n    // Public API\n    /**\n     * @ngdoc method\n     * @name ionicSlideBox#update\n     * @description\n     * Update the slidebox (for example if using Angular with ng-repeat,\n     * resize it for the elements inside).\n     */\n    this.update = function() {\n      setTimeout(setup);\n    };\n    this.setup = function() {\n      setup();\n    };\n\n    /**\n     * @ngdoc method\n     * @name ionicSlideBox#slide\n     * @param {number} to The index to slide to.\n     * @param {number=} speed The number of milliseconds for the change to take.\n     */\n    this.slide = function(to, speed) {\n      // cancel slideshow\n      stop();\n\n      slide(to, speed);\n    };\n\n    /**\n     * @ngdoc method\n     * @name ionicSlideBox#prev\n     * @description Go to the previous slide. Wraps around if at the beginning.\n     */\n    this.prev = function() {\n      // cancel slideshow\n      stop();\n\n      prev();\n    };\n\n    /**\n     * @ngdoc method\n     * @name ionicSlideBox#next\n     * @description Go to the next slide. Wraps around if at the end.\n     */\n    this.next = function() {\n      // cancel slideshow\n      stop();\n\n      next();\n    };\n\n    /**\n     * @ngdoc method\n     * @name ionicSlideBox#stop\n     * @description Stop sliding. The slideBox will not move again until\n     * explicitly told to do so.\n     */\n    this.stop = function() {\n      // cancel slideshow\n      stop();\n    };\n\n    /**\n     * @ngdoc method\n     * @name ionicSlideBox#currentIndex\n     * @returns number The index of the current slide.\n     */\n    this.currentIndex = function() {\n      // return current index position\n      return index;\n    };\n\n    /**\n     * @ngdoc method\n     * @name ionicSlideBox#slidesCount\n     * @returns number The number of slides there are currently.\n     */\n    this.slidesCount = function() {\n      // return total number of slides\n      return length;\n    };\n\n    this.kill = function() {\n      // cancel slideshow\n      stop();\n\n      // reset element\n      element.style.width = '';\n      element.style.left = '';\n\n      // reset slides\n      var pos = slides.length;\n      while(pos--) {\n\n        var slide = slides[pos];\n        slide.style.width = '';\n        slide.style.left = '';\n\n        if (browser.transitions) translate(pos, 0, 0);\n\n      }\n\n      // removed event listeners\n      if (browser.addEventListener) {\n\n        // remove current event listeners\n        element.removeEventListener('touchstart', events, false);\n        element.removeEventListener('webkitTransitionEnd', events, false);\n        element.removeEventListener('msTransitionEnd', events, false);\n        element.removeEventListener('oTransitionEnd', events, false);\n        element.removeEventListener('otransitionend', events, false);\n        element.removeEventListener('transitionend', events, false);\n        window.removeEventListener('resize', events, false);\n\n      }\n      else {\n\n        window.onresize = null;\n\n      }\n    };\n\n    this.load = function() {\n      // trigger setup\n      setup();\n\n      // start auto slideshow if applicable\n      if (delay) begin();\n\n\n      // add event listeners\n      if (browser.addEventListener) {\n\n        // set touchstart event on element\n        if (browser.touch) {\n          element.addEventListener('touchstart', events, false);\n        } else {\n          element.addEventListener('mousedown', events, false);\n        }\n\n        if (browser.transitions) {\n          element.addEventListener('webkitTransitionEnd', events, false);\n          element.addEventListener('msTransitionEnd', events, false);\n          element.addEventListener('oTransitionEnd', events, false);\n          element.addEventListener('otransitionend', events, false);\n          element.addEventListener('transitionend', events, false);\n        }\n\n        // set resize event on window\n        window.addEventListener('resize', events, false);\n\n      } else {\n\n        window.onresize = function () { setup() }; // to play nice with old IE\n\n      }\n    }\n\n  }\n});\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\nionic.views.TabBarItem = ionic.views.View.inherit({\n  initialize: function(el) {\n    this.el = el;\n\n    this._buildItem();\n  },\n\n  // Factory for creating an item from a given javascript object\n  create: function(itemData) {\n    var item = document.createElement('a');\n    item.className = 'tab-item';\n\n    // If there is an icon, add the icon element\n    if(itemData.icon) {\n      var icon = document.createElement('i');\n      icon.className = itemData.icon;\n      item.appendChild(icon);\n    }\n\n    // If there is a badge, add the badge element\n    if(itemData.badge) {\n      var badge = document.createElement('i');\n      badge.className = 'badge';\n      badge.innerHTML = itemData.badge;\n      item.appendChild(badge);\n      item.className = 'tab-item has-badge';\n    }\n\n    item.appendChild(document.createTextNode(itemData.title));\n\n    return new ionic.views.TabBarItem(item);\n  },\n\n  _buildItem: function() {\n    var _this = this, child, children = Array.prototype.slice.call(this.el.children);\n\n    for(var i = 0, j = children.length; i < j; i++) {\n      child = children[i];\n\n      // Test if this is a \"i\" tag with icon in the class name\n      // TODO: This heuristic might not be sufficient\n      if(child.tagName.toLowerCase() == 'i' && /icon/.test(child.className)) {\n        this.icon = child.className;\n      }\n\n      // Test if this is a \"i\" tag with badge in the class name\n      // TODO: This heuristic might not be sufficient\n      if(child.tagName.toLowerCase() == 'i' && /badge/.test(child.className)) {\n        this.badge = child.textContent.trim();\n      }\n    }\n\n    this.title = '';\n    for(i = 0, j = this.el.childNodes.length; i < j; i++) {\n      child = this.el.childNodes[i];\n\n      if (child.nodeName === \"#text\") {\n        this.title += child.nodeValue.trim();\n      }\n    }\n\n    this._tapHandler = function(e) {\n      _this.onTap && _this.onTap(e);\n    };\n\n    ionic.on('tap', this._tapHandler, this.el);\n  },\n  onTap: function(e) {\n  },\n\n  // Remove the event listeners from this object\n  destroy: function() {\n    ionic.off('tap', this._tapHandler, this.el);\n  },\n\n  getIcon: function() {\n    return this.icon;\n  },\n\n  getTitle: function() {\n    return this.title;\n  },\n\n  getBadge: function() {\n    return this.badge;\n  },\n\n  setSelected: function(isSelected) {\n    this.isSelected = isSelected;\n    if(isSelected) {\n      this.el.classList.add('active');\n    } else {\n      this.el.classList.remove('active');\n    }\n  }\n});\n\nionic.views.TabBar = ionic.views.View.inherit({\n  initialize: function(opts) {\n    this.el = opts.el;\n     \n    this.items = [];\n\n    this._buildItems();\n  },\n  // get all the items for the TabBar\n  getItems: function() {\n    return this.items;\n  },\n\n  // Add an item to the tab bar\n  addItem: function(item) {\n    // Create a new TabItem\n    var tabItem = ionic.views.TabBarItem.prototype.create(item);\n\n    this.appendItemElement(tabItem);\n\n    this.items.push(tabItem);\n    this._bindEventsOnItem(tabItem);\n  },\n\n  appendItemElement: function(item) {\n    if(!this.el) {\n      return;\n    }\n    this.el.appendChild(item.el);\n  },\n\n  // Remove an item from the tab bar\n  removeItem: function(index) {\n    var item = this.items[index];\n    if(!item) {\n      return;\n    }\n    item.onTap = undefined;\n    item.destroy();\n  },\n\n  _bindEventsOnItem: function(item) {\n    var _this = this;\n\n    if(!this._itemTapHandler) {\n      this._itemTapHandler = function(e) {\n        //_this.selectItem(this);\n        _this.trySelectItem(this);\n      };\n    }\n    item.onTap = this._itemTapHandler;\n  },\n\n  // Get the currently selected item\n  getSelectedItem: function() {\n    return this.selectedItem;\n  },\n\n  // Set the currently selected item by index\n  setSelectedItem: function(index) {\n    this.selectedItem = this.items[index];\n\n    // Deselect all\n    for(var i = 0, j = this.items.length; i < j; i += 1) {\n      this.items[i].setSelected(false);\n    }\n\n    // Select the new item\n    if(this.selectedItem) {\n      this.selectedItem.setSelected(true);\n      //this.onTabSelected && this.onTabSelected(this.selectedItem, index);\n    }\n  },\n\n  // Select the given item assuming we can find it in our\n  // item list.\n  selectItem: function(item) {\n    for(var i = 0, j = this.items.length; i < j; i += 1) {\n      if(this.items[i] == item) {\n        this.setSelectedItem(i);\n        return;\n      }\n    }\n  },\n\n  // Try to select a given item. This triggers an event such\n  // that the view controller managing this tab bar can decide\n  // whether to select the item or cancel it.\n  trySelectItem: function(item) {\n    for(var i = 0, j = this.items.length; i < j; i += 1) {\n      if(this.items[i] == item) {\n        this.tryTabSelect && this.tryTabSelect(i);\n        return;\n      }\n    }\n  },\n\n  // Build the initial items list from the given DOM node.\n  _buildItems: function() {\n\n    var item, items = Array.prototype.slice.call(this.el.children);\n\n    for(var i = 0, j = items.length; i < j; i += 1) {\n      item =  new ionic.views.TabBarItem(items[i]);\n      this.items[i] = item;\n      this._bindEventsOnItem(item);\n    }\n  \n    if(this.items.length > 0) {\n      this.selectedItem = this.items[0];\n    }\n\n  },\n\n  // Destroy this tab bar\n  destroy: function() {\n    for(var i = 0, j = this.items.length; i < j; i += 1) {\n      this.items[i].destroy();\n    }\n    this.items.length = 0;\n  }\n});\n\n})(window.ionic);\n\n(function(ionic) {\n'use strict';\n\n  ionic.views.Toggle = ionic.views.View.inherit({\n    initialize: function(opts) {\n      var self = this;\n\n      this.el = opts.el;\n      this.checkbox = opts.checkbox;\n      this.track = opts.track;\n      this.handle = opts.handle;\n      this.openPercent = -1;\n      this.onChange = opts.onChange || function() {};\n\n      this.triggerThreshold = opts.triggerThreshold || 20;\n\n      this.dragStartHandler = function(e) {\n        self.dragStart(e);\n      };\n      this.dragHandler = function(e) {\n        self.drag(e);\n      };\n      this.holdHandler = function(e) {\n        self.hold(e);\n      };\n      this.releaseHandler = function(e) {\n        self.release(e);\n      };\n\n      this.dragStartGesture = ionic.onGesture('dragstart', this.dragStartHandler, this.el);\n      this.dragGesture = ionic.onGesture('drag', this.dragHandler, this.el);\n      this.dragHoldGesture = ionic.onGesture('hold', this.holdHandler, this.el);\n      this.dragReleaseGesture = ionic.onGesture('release', this.releaseHandler, this.el);\n    },\n\n    destroy: function() {\n      ionic.offGesture(this.dragStartGesture, 'dragstart', this.dragStartGesture);\n      ionic.offGesture(this.dragGesture, 'drag', this.dragGesture);\n      ionic.offGesture(this.dragHoldGesture, 'hold', this.holdHandler);\n      ionic.offGesture(this.dragReleaseGesture, 'release', this.releaseHandler);\n    },\n\n    tap: function(e) {\n      if(this.el.getAttribute('disabled') !== 'disabled') {\n        this.val( !this.checkbox.checked );\n      }\n    },\n\n    dragStart: function(e) {\n      if(this.checkbox.disabled) return;\n\n      this._dragInfo = {\n        width: this.el.offsetWidth,\n        left: this.el.offsetLeft,\n        right: this.el.offsetLeft + this.el.offsetWidth,\n        triggerX: this.el.offsetWidth / 2,\n        initialState: this.checkbox.checked\n      };\n\n      // Stop any parent dragging\n      e.gesture.srcEvent.preventDefault();\n\n      // Trigger hold styles\n      this.hold(e);\n    },\n\n    drag: function(e) {\n      var self = this;\n      if(!this._dragInfo) { return; }\n\n      // Stop any parent dragging\n      e.gesture.srcEvent.preventDefault();\n\n      ionic.requestAnimationFrame(function(amount) {\n\n        var slidePageLeft = self.track.offsetLeft + (self.handle.offsetWidth / 2);\n        var slidePageRight = self.track.offsetLeft + self.track.offsetWidth - (self.handle.offsetWidth / 2);\n        var dx = e.gesture.deltaX;\n\n        var px = e.gesture.touches[0].pageX - self._dragInfo.left;\n        var mx = self._dragInfo.width - self.triggerThreshold;\n\n        // The initial state was on, so \"tend towards\" on\n        if(self._dragInfo.initialState) {\n          if(px < self.triggerThreshold) {\n            self.setOpenPercent(0);\n          } else if(px > self._dragInfo.triggerX) {\n            self.setOpenPercent(100);\n          }\n        } else {\n          // The initial state was off, so \"tend towards\" off\n          if(px < self._dragInfo.triggerX) {\n            self.setOpenPercent(0);\n          } else if(px > mx) {\n            self.setOpenPercent(100);\n          }\n        }\n      });\n    },\n\n    endDrag: function(e) {\n      this._dragInfo = null;\n    },\n\n    hold: function(e) {\n      this.el.classList.add('dragging');\n    },\n    release: function(e) {\n      this.el.classList.remove('dragging');\n      this.endDrag(e);\n    },\n\n\n    setOpenPercent: function(openPercent) {\n      // only make a change if the new open percent has changed\n      if(this.openPercent < 0 || (openPercent < (this.openPercent - 3) || openPercent > (this.openPercent + 3) ) ) {\n        this.openPercent = openPercent;\n\n        if(openPercent === 0) {\n          this.val(false);\n        } else if(openPercent === 100) {\n          this.val(true);\n        } else {\n          var openPixel = Math.round( (openPercent / 100) * this.track.offsetWidth - (this.handle.offsetWidth) );\n          openPixel = (openPixel < 1 ? 0 : openPixel);\n          this.handle.style[ionic.CSS.TRANSFORM] = 'translate3d(' + openPixel + 'px,0,0)';\n        }\n      }\n    },\n\n    val: function(value) {\n      if(value === true || value === false) {\n        if(this.handle.style[ionic.CSS.TRANSFORM] !== \"\") {\n          this.handle.style[ionic.CSS.TRANSFORM] = \"\";\n        }\n        this.checkbox.checked = value;\n        this.openPercent = (value ? 100 : 0);\n        this.onChange && this.onChange();\n      }\n      return this.checkbox.checked;\n    }\n\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n  ionic.controllers.ViewController = function(options) {\n    this.initialize.apply(this, arguments);\n  };\n\n  ionic.controllers.ViewController.inherit = ionic.inherit;\n\n  ionic.extend(ionic.controllers.ViewController.prototype, {\n    initialize: function() {},\n    // Destroy this view controller, including all child views\n    destroy: function() {\n    }\n  });\n\n})(window.ionic);\n\n(function(ionic) {\n'use strict';\n\n/**\n * The NavController makes it easy to have a stack\n * of views or screens that can be pushed and popped\n * for a dynamic navigation flow. This API is modelled\n * off of the UINavigationController in iOS.\n *\n * The NavController can drive a nav bar to show a back button\n * if the stack can be poppped to go back to the last view, and\n * it will handle updating the title of the nav bar and processing animations.\n */\nionic.controllers.NavController = ionic.controllers.ViewController.inherit({\n  initialize: function(opts) {\n    var _this = this;\n\n    this.navBar = opts.navBar;\n    this.content = opts.content;\n    this.controllers = opts.controllers || [];\n\n    this._updateNavBar();\n\n    // TODO: Is this the best way?\n    this.navBar.shouldGoBack = function() {\n      _this.pop();\n    };\n  },\n\n  /**\n   * @return {array} the array of controllers on the stack.\n   */\n  getControllers: function() {\n    return this.controllers;\n  },\n\n  /**\n   * @return {object} the controller at the top of the stack.\n   */\n  getTopController: function() {\n    return this.controllers[this.controllers.length-1];\n  },\n\n  /**\n   * Push a new controller onto the navigation stack. The new controller\n   * will automatically become the new visible view.\n   *\n   * @param {object} controller the controller to push on the stack.\n   */\n  push: function(controller) {\n    var last = this.controllers[this.controllers.length - 1];\n\n    this.controllers.push(controller);\n\n    // Indicate we are switching controllers\n    var shouldSwitch = this.switchingController && this.switchingController(controller) || true;\n\n    // Return if navigation cancelled\n    if(shouldSwitch === false)\n      return;\n\n    // Actually switch the active controllers\n    if(last) {\n      last.isVisible = false;\n      last.visibilityChanged && last.visibilityChanged('push');\n    }\n\n    // Grab the top controller on the stack\n    var next = this.controllers[this.controllers.length - 1];\n\n    next.isVisible = true;\n    // Trigger visibility change, but send 'first' if this is the first page\n    next.visibilityChanged && next.visibilityChanged(last ? 'push' : 'first');\n\n    this._updateNavBar();\n\n    return controller;\n  },\n\n  /**\n   * Pop the top controller off the stack, and show the last one. This is the\n   * \"back\" operation.\n   *\n   * @return {object} the last popped controller\n   */\n  pop: function() {\n    var next, last;\n\n    // Make sure we keep one on the stack at all times\n    if(this.controllers.length < 2) {\n      return;\n    }\n\n    // Grab the controller behind the top one on the stack\n    last = this.controllers.pop();\n    if(last) {\n      last.isVisible = false;\n      last.visibilityChanged && last.visibilityChanged('pop');\n    }\n    \n    // Remove the old one\n    //last && last.detach();\n\n    next = this.controllers[this.controllers.length - 1];\n\n    // TODO: No DOM stuff here\n    //this.content.el.appendChild(next.el);\n    next.isVisible = true;\n    next.visibilityChanged && next.visibilityChanged('pop');\n\n    // Switch to it (TODO: Animate or such things here)\n\n    this._updateNavBar();\n\n    return last;\n  },\n\n  /**\n   * Show the NavBar (if any)\n   */\n  showNavBar: function() {\n    if(this.navBar) {\n      this.navBar.show();\n    }\n  },\n\n  /**\n   * Hide the NavBar (if any)\n   */\n  hideNavBar: function() {\n    if(this.navBar) {\n      this.navBar.hide();\n    }\n  },\n\n  // Update the nav bar after a push or pop\n  _updateNavBar: function() {\n    if(!this.getTopController() || !this.navBar) {\n      return;\n    }\n\n    this.navBar.setTitle(this.getTopController().title);\n\n    if(this.controllers.length > 1) {\n      this.navBar.showBackButton(true);\n    } else {\n      this.navBar.showBackButton(false);\n    }\n  }\n});\n\n})(window.ionic);\n\n(function(ionic) {\n'use strict';\n\n  /**\n   * The SideMenuController is a controller with a left and/or right menu that\n   * can be slid out and toggled. Seen on many an app.\n   *\n   * The right or left menu can be disabled or not used at all, if desired.\n   */\n  ionic.controllers.SideMenuController = ionic.controllers.ViewController.inherit({\n    initialize: function(options) {\n      var self = this;\n\n      this.left = options.left;\n      this.right = options.right;\n      this.content = options.content;\n      this.dragThresholdX = options.dragThresholdX || 10;\n\n      this._rightShowing = false;\n      this._leftShowing = false;\n      this._isDragging = false;\n\n      if(this.content) {\n        this.content.onDrag = function(e) {\n          self._handleDrag(e);\n        };\n\n        this.content.onEndDrag =function(e) {\n          self._endDrag(e);\n        };\n      }\n    },\n    /**\n     * Set the content view controller if not passed in the constructor options.\n     *\n     * @param {object} content\n     */\n    setContent: function(content) {\n      var self = this;\n\n      this.content = content;\n\n      this.content.onDrag = function(e) {\n        self._handleDrag(e);\n      };\n\n      this.content.endDrag = function(e) {\n        self._endDrag(e);\n      };\n    },\n\n    isOpenLeft: function() {\n      return this.getOpenAmount() > 0;\n    },\n\n    isOpenRight: function() {\n      return this.getOpenAmount() < 0;\n    },\n\n    /**\n     * Toggle the left menu to open 100%\n     */\n    toggleLeft: function(shouldOpen) {\n      var openAmount = this.getOpenAmount();\n      if (arguments.length === 0) {\n        shouldOpen = openAmount <= 0;\n      }\n      this.content.enableAnimation();\n      if(!shouldOpen) {\n        this.openPercentage(0);\n      } else {\n        this.openPercentage(100);\n      }\n    },\n\n    /**\n     * Toggle the right menu to open 100%\n     */\n    toggleRight: function(shouldOpen) {\n      var openAmount = this.getOpenAmount();\n      if (arguments.length === 0) {\n        shouldOpen = openAmount >= 0;\n      }\n      this.content.enableAnimation();\n      if(!shouldOpen) {\n        this.openPercentage(0);\n      } else {\n        this.openPercentage(-100);\n      }\n    },\n\n    /**\n     * Close all menus.\n     */\n    close: function() {\n      this.openPercentage(0);\n    },\n\n    /**\n     * @return {float} The amount the side menu is open, either positive or negative for left (positive), or right (negative)\n     */\n    getOpenAmount: function() {\n      return this.content && this.content.getTranslateX() || 0;\n    },\n\n    /**\n     * @return {float} The ratio of open amount over menu width. For example, a\n     * menu of width 100 open 50 pixels would be open 50% or a ratio of 0.5. Value is negative\n     * for right menu.\n     */\n    getOpenRatio: function() {\n      var amount = this.getOpenAmount();\n      if(amount >= 0) {\n        return amount / this.left.width;\n      }\n      return amount / this.right.width;\n    },\n\n    isOpen: function() {\n      return this.getOpenRatio() == 1;\n    },\n\n    /**\n     * @return {float} The percentage of open amount over menu width. For example, a\n     * menu of width 100 open 50 pixels would be open 50%. Value is negative\n     * for right menu.\n     */\n    getOpenPercentage: function() {\n      return this.getOpenRatio() * 100;\n    },\n\n    /**\n     * Open the menu with a given percentage amount.\n     * @param {float} percentage The percentage (positive or negative for left/right) to open the menu.\n     */\n    openPercentage: function(percentage) {\n      var p = percentage / 100;\n\n      if(this.left && percentage >= 0) {\n        this.openAmount(this.left.width * p);\n      } else if(this.right && percentage < 0) {\n        var maxRight = this.right.width;\n        this.openAmount(this.right.width * p);\n      }\n    },\n\n    /**\n     * Open the menu the given pixel amount.\n     * @param {float} amount the pixel amount to open the menu. Positive value for left menu,\n     * negative value for right menu (only one menu will be visible at a time).\n     */\n    openAmount: function(amount) {\n      var maxLeft = this.left && this.left.width || 0;\n      var maxRight = this.right && this.right.width || 0;\n\n      // Check if we can move to that side, depending if the left/right panel is enabled\n      if(!(this.left && this.left.isEnabled) && amount > 0) {\n        this.content.setTranslateX(0);\n        return;\n      }\n\n      if(!(this.right && this.right.isEnabled) && amount < 0) {\n        this.content.setTranslateX(0);\n        return;\n      }\n\n      if(this._leftShowing && amount > maxLeft) {\n        this.content.setTranslateX(maxLeft);\n        return;\n      }\n\n      if(this._rightShowing && amount < -maxRight) {\n        this.content.setTranslateX(-maxRight);\n        return;\n      }\n\n      this.content.setTranslateX(amount);\n\n      if(amount >= 0) {\n        this._leftShowing = true;\n        this._rightShowing = false;\n\n        if(amount > 0) {\n          // Push the z-index of the right menu down\n          this.right && this.right.pushDown && this.right.pushDown();\n          // Bring the z-index of the left menu up\n          this.left && this.left.bringUp && this.left.bringUp();\n        }\n      } else {\n        this._rightShowing = true;\n        this._leftShowing = false;\n\n        // Bring the z-index of the right menu up\n        this.right && this.right.bringUp && this.right.bringUp();\n        // Push the z-index of the left menu down\n        this.left && this.left.pushDown && this.left.pushDown();\n      }\n    },\n\n    /**\n     * Given an event object, find the final resting position of this side\n     * menu. For example, if the user \"throws\" the content to the right and\n     * releases the touch, the left menu should snap open (animated, of course).\n     *\n     * @param {Event} e the gesture event to use for snapping\n     */\n    snapToRest: function(e) {\n      // We want to animate at the end of this\n      this.content.enableAnimation();\n      this._isDragging = false;\n\n      // Check how much the panel is open after the drag, and\n      // what the drag velocity is\n      var ratio = this.getOpenRatio();\n\n      if(ratio === 0) {\n        // Just to be safe\n        this.openPercentage(0);\n        return;\n      }\n\n      var velocityThreshold = 0.3;\n      var velocityX = e.gesture.velocityX;\n      var direction = e.gesture.direction;\n\n      // Less than half, going left\n      //if(ratio > 0 && ratio < 0.5 && direction == 'left' && velocityX < velocityThreshold) {\n      //this.openPercentage(0);\n      //}\n\n      // Going right, less than half, too slow (snap back)\n      if(ratio > 0 && ratio < 0.5 && direction == 'right' && velocityX < velocityThreshold) {\n        this.openPercentage(0);\n      }\n\n      // Going left, more than half, too slow (snap back)\n      else if(ratio > 0.5 && direction == 'left' && velocityX < velocityThreshold) {\n        this.openPercentage(100);\n      }\n\n      // Going left, less than half, too slow (snap back)\n      else if(ratio < 0 && ratio > -0.5 && direction == 'left' && velocityX < velocityThreshold) {\n        this.openPercentage(0);\n      }\n\n      // Going right, more than half, too slow (snap back)\n      else if(ratio < 0.5 && direction == 'right' && velocityX < velocityThreshold) {\n        this.openPercentage(-100);\n      }\n\n      // Going right, more than half, or quickly (snap open)\n      else if(direction == 'right' && ratio >= 0 && (ratio >= 0.5 || velocityX > velocityThreshold)) {\n        this.openPercentage(100);\n      }\n\n      // Going left, more than half, or quickly (span open)\n      else if(direction == 'left' && ratio <= 0 && (ratio <= -0.5 || velocityX > velocityThreshold)) {\n        this.openPercentage(-100);\n      }\n\n      // Snap back for safety\n      else {\n        this.openPercentage(0);\n      }\n    },\n\n    // End a drag with the given event\n    _endDrag: function(e) {\n      if(this._isDragging) {\n        this.snapToRest(e);\n      }\n      this._startX = null;\n      this._lastX = null;\n      this._offsetX = null;\n    },\n\n    // Handle a drag event\n    _handleDrag: function(e) {\n      // If we don't have start coords, grab and store them\n      if(!this._startX) {\n        this._startX = e.gesture.touches[0].pageX;\n        this._lastX = this._startX;\n      } else {\n        // Grab the current tap coords\n        this._lastX = e.gesture.touches[0].pageX;\n      }\n\n      // Calculate difference from the tap points\n      if(!this._isDragging && Math.abs(this._lastX - this._startX) > this.dragThresholdX) {\n        // if the difference is greater than threshold, start dragging using the current\n        // point as the starting point\n        this._startX = this._lastX;\n\n        this._isDragging = true;\n        // Initialize dragging\n        this.content.disableAnimation();\n        this._offsetX = this.getOpenAmount();\n      }\n\n      if(this._isDragging) {\n        this.openAmount(this._offsetX + (this._lastX - this._startX));\n      }\n    }\n  });\n\n})(ionic);\n\n(function(ionic) {\n'use strict';\n\n/**\n * The TabBarController handles a set of view controllers powered by a tab strip\n * at the bottom (or possibly top) of a screen.\n *\n * The API here is somewhat modelled off of UITabController in the sense that the\n * controllers actually define what the tab will look like (title, icon, etc.).\n *\n * Tabs shouldn't be interacted with through your own code. Instead, use the controller\n * methods which will power the tab bar.\n */\nionic.controllers.TabBarController = ionic.controllers.ViewController.inherit({\n  initialize: function(options) {\n    this.tabBar = options.tabBar;\n\n    this._bindEvents();\n\n    this.controllers = [];\n\n    var controllers = options.controllers || [];\n\n    for(var i = 0; i < controllers.length; i++) {\n      this.addController(controllers[i]);\n    }\n\n    // Bind or set our tabWillChange callback\n    this.controllerWillChange = options.controllerWillChange || function(controller) {};\n    this.controllerChanged = options.controllerChanged || function(controller) {};\n\n    // Try to select the first controller if we have one\n    this.setSelectedController(0);\n  },\n  // Start listening for events on our tab bar\n  _bindEvents: function() {\n    var _this = this;\n\n    this.tabBar.tryTabSelect = function(index) {\n      _this.setSelectedController(index);\n    };\n  },\n\n\n  selectController: function(index) {\n    var shouldChange = true;\n\n    // Check if we should switch to this tab. This lets the app\n    // cancel tab switches if the context isn't right, for example.\n    if(this.controllerWillChange) {\n      if(this.controllerWillChange(this.controllers[index], index) === false) {\n        shouldChange = false;\n      }\n    }\n\n    if(shouldChange) {\n      this.setSelectedController(index);\n    }\n  },\n\n  // Force the selection of a controller at the given index\n  setSelectedController: function(index) {\n    if(index >= this.controllers.length) {\n      return;\n    }\n    var lastController = this.selectedController;\n    var lastIndex = this.selectedIndex;\n\n    this.selectedController = this.controllers[index];\n    this.selectedIndex = index;\n\n    this._showController(index);\n    this.tabBar.setSelectedItem(index);\n\n    this.controllerChanged && this.controllerChanged(lastController, lastIndex, this.selectedController, this.selectedIndex);\n  },\n\n  _showController: function(index) {\n    var c;\n\n    for(var i = 0, j = this.controllers.length; i < j; i ++) {\n      c = this.controllers[i];\n      //c.detach && c.detach();\n      c.isVisible = false;\n      c.visibilityChanged && c.visibilityChanged();\n    }\n\n    c = this.controllers[index];\n    //c.attach && c.attach();\n    c.isVisible = true;\n    c.visibilityChanged && c.visibilityChanged();\n  },\n\n  _clearSelected: function() {\n    this.selectedController = null;\n    this.selectedIndex = -1;\n  },\n\n  // Return the tab at the given index\n  getController: function(index) {\n    return this.controllers[index];\n  },\n\n  // Return the current tab list\n  getControllers: function() {\n    return this.controllers;\n  },\n\n  // Get the currently selected controller\n  getSelectedController: function() {\n    return this.selectedController;\n  },\n\n  // Get the index of the currently selected controller\n  getSelectedControllerIndex: function() {\n    return this.selectedIndex;\n  },\n\n  // Add a tab\n  addController: function(controller) {\n    this.controllers.push(controller);\n\n    this.tabBar.addItem({\n      title: controller.title,\n      icon: controller.icon,\n      badge: controller.badge\n    });\n\n    // If we don't have a selected controller yet, select the first one.\n    if(!this.selectedController) {\n      this.setSelectedController(0);\n    }\n  },\n\n  // Set the tabs and select the first\n  setControllers: function(controllers) {\n    this.controllers = controllers;\n    this._clearSelected();\n    this.selectController(0);\n  },\n});\n\n})(window.ionic);\n\n})();"
  },
  {
    "path": "ionic1/official/maps/www/lib/ionic/version.json",
    "content": "{\n  \"version\": \"0.9.27\",\n  \"codename\": \"salamander\",\n  \"date\": \"2014-03-24\",\n  \"time\": \"23:30:13\"\n}\n"
  },
  {
    "path": "ionic1/official/maps/www/templates/browse.html",
    "content": "<ion-view title=\"Browse\">\n  <ion-nav-buttons side=\"left\">\n    <button menu-toggle=\"left\"class=\"button button-icon icon ion-navicon\"></button>\n  </ion-nav-buttons>\n  <ion-content class=\"has-header\">\n    <h1>Browse</h1>\n  </ion-content>\n</ion-view>\n"
  },
  {
    "path": "ionic1/official/maps/www/templates/menu.html",
    "content": "<ion-side-menus>\n\n  <ion-pane ion-side-menu-content>\n    <ion-nav-bar class=\"bar-stable nav-title-slide-ios7\">\n      <ion-nav-back-button class=\"button-clear\"><i class=\"icon ion-chevron-left\"></i> Back</ion-nav-back-button>\n    </ion-nav-bar>\n    <ion-nav-view name=\"menuContent\" animation=\"slide-left-right\"></ion-nav-view>\n  </ion-pane>\n\n  <ion-side-menu side=\"left\">\n    <header class=\"bar bar-header bar-stable\">\n      <h1 class=\"title\">Left</h1>\n    </header>\n    <ion-content class=\"has-header\">\n      <ion-list>\n        <ion-item nav-clear menu-close href=\"#/app/search\">\n          Search\n        </ion-item>\n        <ion-item nav-clear menu-close href=\"#/app/browse\">\n          Browse\n        </ion-item>\n        <ion-item nav-clear menu-close href=\"#/app/playlists\">\n          Playlists\n        </ion-item>\n      </ion-list>\n    </ion-content>\n  </ion-side-menu>\n</ion-side-menus>\n"
  },
  {
    "path": "ionic1/official/maps/www/templates/playlist.html",
    "content": "<ion-view title=\"Playlist\">\n  <ion-content class=\"has-header\">\n    <h1>Playlist</h1>\n  </ion-content>\n</ion-view>\n"
  },
  {
    "path": "ionic1/official/maps/www/templates/playlists.html",
    "content": "<ion-view title=\"Playlists\">\n  <ion-nav-buttons side=\"left\">\n    <button menu-toggle=\"left\" class=\"button button-icon icon ion-navicon\"></button>\n  </ion-nav-buttons>\n  <ion-content class=\"has-header\">\n    <ion-list>\n      <ion-item ng-repeat=\"playlist in playlists\" href=\"#/app/playlists/{{playlist.id}}\">\n        {{playlist.title}}\n      </ion-item>\n    </ion-list>\n  </ion-content>\n</ion-view>\n"
  },
  {
    "path": "ionic1/official/maps/www/templates/search.html",
    "content": "<ion-view title=\"Search\">\n  <ion-nav-buttons side=\"left\">\n    <button menu-toggle=\"left\" class=\"button button-icon icon ion-navicon\"></button>\n  </ion-nav-buttons>\n  <ion-content class=\"has-header\">\n    <h1>Search</h1>\n  </ion-content>\n</ion-view>\n"
  },
  {
    "path": "ionic1/official/sidemenu/ionic.starter.json",
    "content": "{\n  \"name\": \"Sidemenu Starter\",\n  \"baseref\": \"main\"\n}\n"
  },
  {
    "path": "ionic1/official/sidemenu/www/css/style.css",
    "content": "/* Empty. Add your own CSS if you like */\n"
  },
  {
    "path": "ionic1/official/sidemenu/www/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\">\n    <meta name=\"viewport\" content=\"initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width\">\n    <title></title>\n\n    <link rel=\"manifest\" href=\"manifest.json\">\n\n    <!-- un-comment this code to enable service worker\n    <script>\n      if ('serviceWorker' in navigator) {\n        navigator.serviceWorker.register('service-worker.js')\n          .then(() => console.log('service worker installed'))\n          .catch(err => console.log('Error', err));\n      }\n    </script>-->\n\n    <link href=\"lib/ionic/css/ionic.css\" rel=\"stylesheet\">\n    <link href=\"css/style.css\" rel=\"stylesheet\">\n\n    <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above\n    <link href=\"css/ionic.app.css\" rel=\"stylesheet\">\n    -->\n\n    <!-- ionic/angularjs js -->\n    <script src=\"lib/ionic/js/ionic.bundle.js\"></script>\n\n    <!-- cordova script (this will be a 404 during development) -->\n    <script src=\"cordova.js\"></script>\n\n    <!-- your app's js -->\n    <script src=\"js/app.js\"></script>\n    <script src=\"js/controllers.js\"></script>\n  </head>\n\n  <body ng-app=\"starter\">\n    <ion-nav-view></ion-nav-view>\n  </body>\n</html>\n"
  },
  {
    "path": "ionic1/official/sidemenu/www/js/app.js",
    "content": "// Ionic Starter App\n\n// angular.module is a global place for creating, registering and retrieving Angular modules\n// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)\n// the 2nd parameter is an array of 'requires'\n// 'starter.controllers' is found in controllers.js\nangular.module('starter', ['ionic', 'starter.controllers'])\n\n.run(function($ionicPlatform) {\n  $ionicPlatform.ready(function() {\n    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard\n    // for form inputs).\n    // The reason we default this to hidden is that native apps don't usually show an accessory bar, at\n    // least on iOS. It's a dead giveaway that an app is using a Web View. However, it's sometimes\n    // useful especially with forms, though we would prefer giving the user a little more room\n    // to interact with the app.\n    if (window.cordova && window.Keyboard) {\n      window.Keyboard.hideKeyboardAccessoryBar(true);\n    }\n\n    if (window.StatusBar) {\n      // Set the statusbar to use the default style, tweak this to\n      // remove the status bar on iOS or change it to use white instead of dark colors.\n      StatusBar.styleDefault();\n    }\n  });\n})\n\n.config(function($stateProvider, $urlRouterProvider) {\n  $stateProvider\n\n    .state('app', {\n    url: '/app',\n    abstract: true,\n    templateUrl: 'templates/menu.html',\n    controller: 'AppCtrl'\n  })\n\n  .state('app.search', {\n    url: '/search',\n    views: {\n      'menuContent': {\n        templateUrl: 'templates/search.html'\n      }\n    }\n  })\n\n  .state('app.browse', {\n      url: '/browse',\n      views: {\n        'menuContent': {\n          templateUrl: 'templates/browse.html'\n        }\n      }\n    })\n    .state('app.playlists', {\n      url: '/playlists',\n      views: {\n        'menuContent': {\n          templateUrl: 'templates/playlists.html',\n          controller: 'PlaylistsCtrl'\n        }\n      }\n    })\n\n  .state('app.single', {\n    url: '/playlists/:playlistId',\n    views: {\n      'menuContent': {\n        templateUrl: 'templates/playlist.html',\n        controller: 'PlaylistCtrl'\n      }\n    }\n  });\n  // if none of the above states are matched, use this as the fallback\n  $urlRouterProvider.otherwise('/app/playlists');\n});\n"
  },
  {
    "path": "ionic1/official/sidemenu/www/js/controllers.js",
    "content": "angular.module('starter.controllers', [])\n\n.controller('AppCtrl', function($scope, $ionicModal, $timeout) {\n\n  // With the new view caching in Ionic, Controllers are only called\n  // when they are recreated or on app start, instead of every page change.\n  // To listen for when this page is active (for example, to refresh data),\n  // listen for the $ionicView.enter event:\n  //$scope.$on('$ionicView.enter', function(e) {\n  //});\n\n  // Form data for the login modal\n  $scope.loginData = {};\n\n  // Create the login modal that we will use later\n  $ionicModal.fromTemplateUrl('templates/login.html', {\n    scope: $scope\n  }).then(function(modal) {\n    $scope.modal = modal;\n  });\n\n  // Triggered in the login modal to close it\n  $scope.closeLogin = function() {\n    $scope.modal.hide();\n  };\n\n  // Open the login modal\n  $scope.login = function() {\n    $scope.modal.show();\n  };\n\n  // Perform the login action when the user submits the login form\n  $scope.doLogin = function() {\n    console.log('Doing login', $scope.loginData);\n\n    // Simulate a login delay. Remove this and replace with your login\n    // code if using a login system\n    $timeout(function() {\n      $scope.closeLogin();\n    }, 1000);\n  };\n})\n\n.controller('PlaylistsCtrl', function($scope) {\n  $scope.playlists = [\n    { title: 'Reggae', id: 1 },\n    { title: 'Chill', id: 2 },\n    { title: 'Dubstep', id: 3 },\n    { title: 'Indie', id: 4 },\n    { title: 'Rap', id: 5 },\n    { title: 'Cowbell', id: 6 }\n  ];\n})\n\n.controller('PlaylistCtrl', function($scope, $stateParams) {\n});\n"
  },
  {
    "path": "ionic1/official/sidemenu/www/templates/browse.html",
    "content": "<ion-view view-title=\"Browse\">\n  <ion-content>\n    <h1>Browse</h1>\n  </ion-content>\n</ion-view>\n"
  },
  {
    "path": "ionic1/official/sidemenu/www/templates/login.html",
    "content": "<ion-modal-view>\n  <ion-header-bar>\n    <h1 class=\"title\">Login</h1>\n    <div class=\"buttons\">\n      <button class=\"button button-clear\" ng-click=\"closeLogin()\">Close</button>\n    </div>\n  </ion-header-bar>\n  <ion-content>\n    <form ng-submit=\"doLogin()\">\n      <div class=\"list\">\n        <label class=\"item item-input\">\n          <span class=\"input-label\">Username</span>\n          <input type=\"text\" ng-model=\"loginData.username\">\n        </label>\n        <label class=\"item item-input\">\n          <span class=\"input-label\">Password</span>\n          <input type=\"password\" ng-model=\"loginData.password\">\n        </label>\n        <label class=\"item\">\n          <button class=\"button button-block button-positive\" type=\"submit\">Log in</button>\n        </label>\n      </div>\n    </form>\n  </ion-content>\n</ion-modal-view>\n"
  },
  {
    "path": "ionic1/official/sidemenu/www/templates/menu.html",
    "content": "<ion-side-menus enable-menu-with-back-views=\"false\">\n  <ion-side-menu-content>\n    <ion-nav-bar class=\"bar-stable\">\n      <ion-nav-back-button>\n      </ion-nav-back-button>\n\n      <ion-nav-buttons side=\"left\">\n        <button class=\"button button-icon button-clear ion-navicon\" menu-toggle=\"left\">\n        </button>\n      </ion-nav-buttons>\n    </ion-nav-bar>\n    <ion-nav-view name=\"menuContent\"></ion-nav-view>\n  </ion-side-menu-content>\n\n  <ion-side-menu side=\"left\">\n    <ion-header-bar class=\"bar-stable\">\n      <h1 class=\"title\">Left</h1>\n    </ion-header-bar>\n    <ion-content>\n      <ion-list>\n        <ion-item menu-close ng-click=\"login()\">\n          Login\n        </ion-item>\n        <ion-item menu-close href=\"#/app/search\">\n          Search\n        </ion-item>\n        <ion-item menu-close href=\"#/app/browse\">\n          Browse\n        </ion-item>\n        <ion-item menu-close href=\"#/app/playlists\">\n          Playlists\n        </ion-item>\n      </ion-list>\n    </ion-content>\n  </ion-side-menu>\n</ion-side-menus>\n"
  },
  {
    "path": "ionic1/official/sidemenu/www/templates/playlist.html",
    "content": "<ion-view view-title=\"Playlist\">\n  <ion-content>\n    <h1>Playlist</h1>\n  </ion-content>\n</ion-view>\n"
  },
  {
    "path": "ionic1/official/sidemenu/www/templates/playlists.html",
    "content": "<ion-view view-title=\"Playlists\">\n  <ion-content>\n    <ion-list>\n      <ion-item ng-repeat=\"playlist in playlists\" href=\"#/app/playlists/{{playlist.id}}\">\n        {{playlist.title}}\n      </ion-item>\n    </ion-list>\n  </ion-content>\n</ion-view>\n"
  },
  {
    "path": "ionic1/official/sidemenu/www/templates/search.html",
    "content": "<ion-view view-title=\"Search\">\n  <ion-content>\n    <h1>Search</h1>\n  </ion-content>\n</ion-view>\n"
  },
  {
    "path": "ionic1/official/tabs/ionic.starter.json",
    "content": "{\n  \"name\": \"Tabs Starter\",\n  \"baseref\": \"main\"\n}\n"
  },
  {
    "path": "ionic1/official/tabs/www/css/style.css",
    "content": "/* Empty. Add your own CSS if you like */\n"
  },
  {
    "path": "ionic1/official/tabs/www/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\">\n    <meta name=\"viewport\" content=\"initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width\">\n    <title></title>\n\n    <link rel=\"manifest\" href=\"manifest.json\">\n\n    <!-- un-comment this code to enable service worker\n    <script>\n      if ('serviceWorker' in navigator) {\n        navigator.serviceWorker.register('service-worker.js')\n          .then(() => console.log('service worker installed'))\n          .catch(err => console.log('Error', err));\n      }\n    </script>-->\n\n    <link href=\"lib/ionic/css/ionic.css\" rel=\"stylesheet\">\n    <link href=\"css/style.css\" rel=\"stylesheet\">\n\n    <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above\n    <link href=\"css/ionic.app.css\" rel=\"stylesheet\">\n    -->\n\n    <!-- ionic/angularjs js -->\n    <script src=\"lib/ionic/js/ionic.bundle.js\"></script>\n\n    <!-- cordova script (this will be a 404 during development) -->\n    <script src=\"cordova.js\"></script>\n\n    <!-- your app's js -->\n    <script src=\"js/app.js\"></script>\n    <script src=\"js/controllers.js\"></script>\n    <script src=\"js/services.js\"></script>\n  </head>\n  <body ng-app=\"starter\">\n    <!--\n      The nav bar that will be updated as we navigate between views.\n    -->\n    <ion-nav-bar class=\"bar-stable\">\n      <ion-nav-back-button>\n      </ion-nav-back-button>\n    </ion-nav-bar>\n    <!--\n      The views will be rendered in the <ion-nav-view> directive below\n      Templates are in the /templates folder (but you could also\n      have templates inline in this html file if you'd like).\n    -->\n    <ion-nav-view></ion-nav-view>\n  </body>\n</html>\n"
  },
  {
    "path": "ionic1/official/tabs/www/js/app.js",
    "content": "// Ionic Starter App\n\n// angular.module is a global place for creating, registering and retrieving Angular modules\n// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)\n// the 2nd parameter is an array of 'requires'\n// 'starter.services' is found in services.js\n// 'starter.controllers' is found in controllers.js\nangular.module('starter', ['ionic', 'starter.controllers', 'starter.services'])\n\n.run(function($ionicPlatform) {\n  $ionicPlatform.ready(function() {\n    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard\n    // for form inputs).\n    // The reason we default this to hidden is that native apps don't usually show an accessory bar, at\n    // least on iOS. It's a dead giveaway that an app is using a Web View. However, it's sometimes\n    // useful especially with forms, though we would prefer giving the user a little more room\n    // to interact with the app.\n    if (window.cordova && window.Keyboard) {\n      window.Keyboard.hideKeyboardAccessoryBar(true);\n    }\n\n    if (window.StatusBar) {\n      // Set the statusbar to use the default style, tweak this to\n      // remove the status bar on iOS or change it to use white instead of dark colors.\n      StatusBar.styleDefault();\n    }\n  });\n})\n\n.config(function($stateProvider, $urlRouterProvider) {\n\n  // Ionic uses AngularUI Router which uses the concept of states\n  // Learn more here: https://github.com/angular-ui/ui-router\n  // Set up the various states which the app can be in.\n  // Each state's controller can be found in controllers.js\n  $stateProvider\n\n  // setup an abstract state for the tabs directive\n    .state('tab', {\n    url: '/tab',\n    abstract: true,\n    templateUrl: 'templates/tabs.html'\n  })\n\n  // Each tab has its own nav history stack:\n\n  .state('tab.dash', {\n    url: '/dash',\n    views: {\n      'tab-dash': {\n        templateUrl: 'templates/tab-dash.html',\n        controller: 'DashCtrl'\n      }\n    }\n  })\n\n  .state('tab.chats', {\n      url: '/chats',\n      views: {\n        'tab-chats': {\n          templateUrl: 'templates/tab-chats.html',\n          controller: 'ChatsCtrl'\n        }\n      }\n    })\n    .state('tab.chat-detail', {\n      url: '/chats/:chatId',\n      views: {\n        'tab-chats': {\n          templateUrl: 'templates/chat-detail.html',\n          controller: 'ChatDetailCtrl'\n        }\n      }\n    })\n\n  .state('tab.account', {\n    url: '/account',\n    views: {\n      'tab-account': {\n        templateUrl: 'templates/tab-account.html',\n        controller: 'AccountCtrl'\n      }\n    }\n  });\n\n  // if none of the above states are matched, use this as the fallback\n  $urlRouterProvider.otherwise('/tab/dash');\n\n});\n"
  },
  {
    "path": "ionic1/official/tabs/www/js/controllers.js",
    "content": "angular.module('starter.controllers', [])\n\n.controller('DashCtrl', function($scope) {})\n\n.controller('ChatsCtrl', function($scope, Chats) {\n  // With the new view caching in Ionic, Controllers are only called\n  // when they are recreated or on app start, instead of every page change.\n  // To listen for when this page is active (for example, to refresh data),\n  // listen for the $ionicView.enter event:\n  //\n  //$scope.$on('$ionicView.enter', function(e) {\n  //});\n\n  $scope.chats = Chats.all();\n  $scope.remove = function(chat) {\n    Chats.remove(chat);\n  };\n})\n\n.controller('ChatDetailCtrl', function($scope, $stateParams, Chats) {\n  $scope.chat = Chats.get($stateParams.chatId);\n})\n\n.controller('AccountCtrl', function($scope) {\n  $scope.settings = {\n    enableFriends: true\n  };\n});\n"
  },
  {
    "path": "ionic1/official/tabs/www/js/services.js",
    "content": "angular.module('starter.services', [])\n\n.factory('Chats', function() {\n  // Might use a resource here that returns a JSON array\n\n  // Some fake testing data\n  var chats = [{\n    id: 0,\n    name: 'Ben Sparrow',\n    lastText: 'You on your way?',\n    face: 'img/ben.png'\n  }, {\n    id: 1,\n    name: 'Max Lynx',\n    lastText: 'Hey, it\\'s me',\n    face: 'img/max.png'\n  }, {\n    id: 2,\n    name: 'Adam Bradleyson',\n    lastText: 'I should buy a boat',\n    face: 'img/adam.jpg'\n  }, {\n    id: 3,\n    name: 'Perry Governor',\n    lastText: 'Look at my mukluks!',\n    face: 'img/perry.png'\n  }, {\n    id: 4,\n    name: 'Mike Harrington',\n    lastText: 'This is wicked good ice cream.',\n    face: 'img/mike.png'\n  }];\n\n  return {\n    all: function() {\n      return chats;\n    },\n    remove: function(chat) {\n      chats.splice(chats.indexOf(chat), 1);\n    },\n    get: function(chatId) {\n      for (var i = 0; i < chats.length; i++) {\n        if (chats[i].id === parseInt(chatId)) {\n          return chats[i];\n        }\n      }\n      return null;\n    }\n  };\n});\n"
  },
  {
    "path": "ionic1/official/tabs/www/templates/chat-detail.html",
    "content": "<!--\n  This template loads for the 'tab.friend-detail' state (app.js)\n  'friend' is a $scope variable created in the FriendsCtrl controller (controllers.js)\n  The FriendsCtrl pulls data from the Friends service (service.js)\n  The Friends service returns an array of friend data\n-->\n<ion-view view-title=\"{{chat.name}}\">\n  <ion-content class=\"padding\">\n    <img ng-src=\"{{chat.face}}\" style=\"width: 64px; height: 64px\">\n    <p>\n      {{chat.lastText}}\n    </p>\n  </ion-content>\n</ion-view>\n"
  },
  {
    "path": "ionic1/official/tabs/www/templates/tab-account.html",
    "content": "<ion-view view-title=\"Account\">\n  <ion-content>\n    <ion-list>\n    <ion-toggle  ng-model=\"settings.enableFriends\">\n        Enable Friends\n    </ion-toggle>\n    </ion-list>\n  </ion-content>\n</ion-view>\n"
  },
  {
    "path": "ionic1/official/tabs/www/templates/tab-chats.html",
    "content": "<ion-view view-title=\"Chats\">\n  <ion-content>\n    <ion-list>\n      <ion-item class=\"item-remove-animate item-avatar item-icon-right\" ng-repeat=\"chat in chats\" type=\"item-text-wrap\" href=\"#/tab/chats/{{chat.id}}\">\n        <img ng-src=\"{{chat.face}}\">\n        <h2>{{chat.name}}</h2>\n        <p>{{chat.lastText}}</p>\n        <i class=\"icon ion-chevron-right icon-accessory\"></i>\n\n        <ion-option-button class=\"button-assertive\" ng-click=\"remove(chat)\">\n          Delete\n        </ion-option-button>\n      </ion-item>\n    </ion-list>\n  </ion-content>\n</ion-view>\n"
  },
  {
    "path": "ionic1/official/tabs/www/templates/tab-dash.html",
    "content": "<ion-view view-title=\"Dashboard\">\n  <ion-content class=\"padding\">\n    <h2>Welcome to Ionic</h2>\n    <p>\n    This is the Ionic starter for tabs-based apps. For other starters and ready-made templates, check out the <a href=\"http://market.ionic.io/starters\" target=\"_blank\" rel=\"noopener\">Ionic Market</a>.\n    </p>\n    <p>\n      To edit the content of each tab, edit the corresponding template file in <code>www/templates/</code>. This template is <code>www/templates/tab-dash.html</code>\n    </p>\n    <p>\n    If you need help with your app, join the Ionic Community on the <a href=\"http://forum.ionicframework.com\" target=\"_blank\" rel=\"noopener\">Ionic Forum</a>. Make sure to <a href=\"http://twitter.com/ionicframework\" target=\"_blank\" rel=\"noopener\">follow us</a> on Twitter to get important updates and announcements for Ionic developers.\n    </p>\n  </ion-content>\n</ion-view>\n"
  },
  {
    "path": "ionic1/official/tabs/www/templates/tabs.html",
    "content": "<!--\nCreate tabs with an icon and label, using the tabs-positive style.\nEach tab's child <ion-nav-view> directive will have its own\nnavigation history that also transitions its views in and out.\n-->\n<ion-tabs class=\"tabs-icon-top tabs-color-active-positive\">\n\n  <!-- Dashboard Tab -->\n  <ion-tab title=\"Status\" icon-off=\"ion-ios-pulse\" icon-on=\"ion-ios-pulse-strong\" href=\"#/tab/dash\">\n    <ion-nav-view name=\"tab-dash\"></ion-nav-view>\n  </ion-tab>\n\n  <!-- Chats Tab -->\n  <ion-tab title=\"Chats\" icon-off=\"ion-ios-chatboxes-outline\" icon-on=\"ion-ios-chatboxes\" href=\"#/tab/chats\">\n    <ion-nav-view name=\"tab-chats\"></ion-nav-view>\n  </ion-tab>\n\n  <!-- Account Tab -->\n  <ion-tab title=\"Account\" icon-off=\"ion-ios-gear-outline\" icon-on=\"ion-ios-gear\" href=\"#/tab/account\">\n    <ion-nav-view name=\"tab-account\"></ion-nav-view>\n  </ion-tab>\n\n\n</ion-tabs>\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"private\": true,\n  \"scripts\": {\n    \"src:clean\": \"rimraf dist\",\n    \"src:lint\": \"npm run eslint\",\n    \"src:lint:fix\": \"npm run eslint -- --fix\",\n    \"eslint\": \"eslint . --ext .ts\",\n    \"src:build\": \"tsc\",\n    \"src:watch\": \"tsc -w\",\n    \"starters:build\": \"node ./bin/ionic-starters build\",\n    \"starters:deploy\": \"node ./bin/ionic-starters deploy\",\n    \"starters:find-redundant\": \"node ./bin/ionic-starters find-redundant\",\n    \"starters:generate-checksum\": \"node ./bin/ionic-starters generate-checksum\",\n    \"starters:test\": \"node ./bin/ionic-starters test\",\n    \"build\": \"npm run src:build && npm run starters:build\"\n  },\n  \"main\": \"./dist/index.js\",\n  \"devDependencies\": {\n    \"@ionic/cli-framework\": \"^5.1.3\",\n    \"@ionic/prettier-config\": \"^2.0.0\",\n    \"@ionic/utils-array\": \"^2.1.5\",\n    \"@ionic/utils-fs\": \"^3.1.6\",\n    \"@types/fs-extra\": \"^9.0.13\",\n    \"@types/inquirer\": \"9.0.1\",\n    \"@types/lodash\": \"^4.14.183\",\n    \"@types/minimatch\": \"^3.0.5\",\n    \"@types/minimist\": \"^1.2.2\",\n    \"@types/node\": \"^18.7.6\",\n    \"@types/tar\": \"^6.1.2\",\n    \"@typescript-eslint/eslint-plugin\": \"^6.0.0\",\n    \"@typescript-eslint/parser\": \"^6.0.0\",\n    \"aws-sdk\": \"^2.1197.0\",\n    \"colorette\": \"^2.0.19\",\n    \"cross-spawn\": \"^7.0.3\",\n    \"eslint\": \"^8.22.0\",\n    \"eslint-config-prettier\": \"^8.5.0\",\n    \"eslint-plugin-import\": \"^2.26.0\",\n    \"eslint-plugin-prettier\": \"^4.2.1\",\n    \"husky\": \"^3.1.0\",\n    \"lodash\": \"^4.17.21\",\n    \"minimatch\": \"^5.1.0\",\n    \"prettier\": \"^2.7.1\",\n    \"rimraf\": \"^3.0.2\",\n    \"tar\": \"^6.1.11\",\n    \"typescript\": \"^4.7\",\n    \"typescript-eslint-language-service\": \"^5.0.0\"\n  },\n  \"husky\": {\n    \"hooks\": {\n      \"pre-commit\": \"npm run src:lint\"\n    }\n  },\n  \"prettier\": \"@ionic/prettier-config\",\n  \"eslintConfig\": {\n    \"root\": true,\n    \"parser\": \"@typescript-eslint/parser\",\n    \"parserOptions\": {\n      \"project\": \"./tsconfig.json\"\n    },\n    \"plugins\": [\n      \"@typescript-eslint\",\n      \"prettier\"\n    ],\n    \"rules\": {\n      \"prettier/prettier\": \"error\"\n    },\n    \"ignorePatterns\": [\n      \"node_modules\",\n      \"**/*.d.ts\",\n      \"angular\",\n      \"vue\",\n      \"react\",\n      \"integrations\",\n      \"ionic-angular\",\n      \"ionic1\",\n      \"dist\",\n      \"build\",\n      \"vue-vite\",\n      \"react-vite\",\n      \"angular-standalone\"\n    ]\n  }\n}\n"
  },
  {
    "path": "react/base/.eslintrc.js",
    "content": "module.exports = {\n  root: true,\n  env: {\n    browser: true,\n    es2021: true\n  },\n  extends: [\n    'eslint:recommended',\n    'plugin:react/recommended',\n    'plugin:@typescript-eslint/recommended'\n  ],\n  parser: '@typescript-eslint/parser',\n  parserOptions: {\n    ecmaVersion: 'latest',\n    sourceType: 'module'\n  },\n  plugins: [\n    'react',\n    '@typescript-eslint'\n  ],\n  settings: {\n    react: {\n      version: 'detect'\n    }\n  },\n  rules: {\n    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',\n    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',\n  }\n}\n"
  },
  {
    "path": "react/base/.gitignore",
    "content": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pnp\n.pnp.js\n\n# testing\n/coverage\n\n# production\n/build\n\n# misc\n.DS_Store\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\n/.nx\n/.nx/cache\n/.vscode/*\n!/.vscode/extensions.json\n.idea\n\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Optional eslint cache\n.eslintcache\n"
  },
  {
    "path": "react/base/.vscode/extensions.json",
    "content": "{\n    \"recommendations\": [\n        \"Webnative.webnative\"\n    ]\n}\n"
  },
  {
    "path": "react/base/ionic.config.json",
    "content": "{\n  \"name\": \"ionic-app-base\",\n  \"app_id\": \"\",\n  \"type\": \"react\",\n  \"integrations\": {}\n}\n"
  },
  {
    "path": "react/base/package.json",
    "content": "{\n  \"name\": \"ionic-app-base\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"dependencies\": {\n    \"@ionic/react\": \"^7.0.0\",\n    \"@ionic/react-router\": \"^7.0.0\",\n    \"@testing-library/jest-dom\": \"^5.11.9\",\n    \"@testing-library/react\": \"^13.3.0\",\n    \"@testing-library/user-event\": \"^12.6.3\",\n    \"@types/jest\": \"^26.0.20\",\n    \"@types/node\": \"^12.19.15\",\n    \"@types/react\": \"^18.0.17\",\n    \"@types/react-dom\": \"^18.0.6\",\n    \"@types/react-router\": \"^5.1.11\",\n    \"@types/react-router-dom\": \"^5.1.7\",\n    \"history\": \"^4.9.0\",\n    \"ionicons\": \"^7.0.0\",\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\",\n    \"react-router\": \"^5.2.0\",\n    \"react-router-dom\": \"^5.2.0\",\n    \"react-scripts\": \"^5.0.0\",\n    \"typescript\": \"^4.1.3\",\n    \"web-vitals\": \"^0.2.4\",\n    \"workbox-background-sync\": \"^5.1.4\",\n    \"workbox-broadcast-update\": \"^5.1.4\",\n    \"workbox-cacheable-response\": \"^5.1.4\",\n    \"workbox-core\": \"^5.1.4\",\n    \"workbox-expiration\": \"^5.1.4\",\n    \"workbox-google-analytics\": \"^5.1.4\",\n    \"workbox-navigation-preload\": \"^5.1.4\",\n    \"workbox-precaching\": \"^5.1.4\",\n    \"workbox-range-requests\": \"^5.1.4\",\n    \"workbox-routing\": \"^5.1.4\",\n    \"workbox-strategies\": \"^5.1.4\",\n    \"workbox-streams\": \"^5.1.4\"\n  },\n  \"devDependencies\": {\n    \"@typescript-eslint/eslint-plugin\": \"^5.59.2\",\n    \"@typescript-eslint/parser\": \"^5.59.2\",\n    \"eslint\": \"^8.35.0\",\n    \"eslint-plugin-react\": \"^7.32.2\"\n  },\n  \"scripts\": {\n    \"start\": \"react-scripts start\",\n    \"build\": \"react-scripts build\",\n    \"test\": \"react-scripts test --transformIgnorePatterns 'node_modules/(?!(@ionic/react|@ionic/react-router|@ionic/core|@stencil/core|ionicons)/)'\",\n    \"eject\": \"react-scripts eject\",\n    \"lint\": \"eslint --ext .ts,.tsx src\"\n  },\n  \"browserslist\": [\n    \"Chrome >=79\",\n    \"ChromeAndroid >=79\",\n    \"Firefox >=70\",\n    \"Edge >=79\",\n    \"Safari >=14\",\n    \"iOS >=14\"\n  ]\n}\n"
  },
  {
    "path": "react/base/public/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Ionic App</title>\n\n    <base href=\"/\" />\n\n    <meta name=\"color-scheme\" content=\"light dark\" />\n    <meta\n      name=\"viewport\"\n      content=\"viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\"\n    />\n    <meta name=\"format-detection\" content=\"telephone=no\" />\n    <meta name=\"msapplication-tap-highlight\" content=\"no\" />\n\n    <link rel=\"manifest\" href=\"%PUBLIC_URL%/manifest.json\" />\n\n    <link rel=\"shortcut icon\" type=\"image/png\" href=\"%PUBLIC_URL%/assets/icon/favicon.png\" />\n\n    <!-- add to homescreen for ios -->\n    <meta name=\"mobile-web-app-capable\" content=\"yes\" />\n    <meta name=\"apple-mobile-web-app-title\" content=\"Ionic App\" />\n    <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\" />\n  </head>\n\n  <body>\n    <div id=\"root\"></div>\n  </body>\n\n</html>\n"
  },
  {
    "path": "react/base/public/manifest.json",
    "content": "{\n  \"short_name\": \"Ionic App\",\n  \"name\": \"My Ionic App\",\n  \"icons\": [\n    {\n      \"src\": \"assets/icon/favicon.png\",\n      \"sizes\": \"64x64 32x32 24x24 16x16\",\n      \"type\": \"image/x-icon\"\n    },\n    {\n      \"src\": \"assets/icon/icon.png\",\n      \"type\": \"image/png\",\n      \"sizes\": \"512x512\",\n      \"purpose\": \"maskable\"\n    }\n  ],\n  \"start_url\": \".\",\n  \"display\": \"standalone\",\n  \"theme_color\": \"#ffffff\",\n  \"background_color\": \"#ffffff\"\n}\n"
  },
  {
    "path": "react/base/src/App.test.tsx",
    "content": "import React from 'react';\nimport { render } from '@testing-library/react';\nimport App from './App';\n\ntest('renders without crashing', () => {\n  const { baseElement } = render(<App />);\n  expect(baseElement).toBeDefined();\n});\n"
  },
  {
    "path": "react/base/src/App.tsx",
    "content": "/* Core CSS required for Ionic components to work properly */\nimport '@ionic/react/css/core.css';\n\n/* Basic CSS for apps built with Ionic */\nimport '@ionic/react/css/normalize.css';\nimport '@ionic/react/css/structure.css';\nimport '@ionic/react/css/typography.css';\n\n/* Optional CSS utils that can be commented out */\nimport '@ionic/react/css/padding.css';\nimport '@ionic/react/css/float-elements.css';\nimport '@ionic/react/css/text-alignment.css';\nimport '@ionic/react/css/text-transformation.css';\nimport '@ionic/react/css/flex-utils.css';\nimport '@ionic/react/css/display.css';\n\n/* Theme variables */\nimport './theme/variables.css';\n\nconst App: React.FunctionComponent = () => {\n  return (\n    <div className=\"App\">\n      <header>\n      </header>\n    </div>\n  );\n}\n\nexport default App;\n"
  },
  {
    "path": "react/base/src/index.tsx",
    "content": "import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport App from './App';\nimport * as serviceWorkerRegistration from './serviceWorkerRegistration';\nimport reportWebVitals from './reportWebVitals';\n\nconst container = document.getElementById('root');\n// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\nconst root = createRoot(container!);\nroot.render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://cra.link/PWA\nserviceWorkerRegistration.unregister();\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"
  },
  {
    "path": "react/base/src/react-app-env.d.ts",
    "content": "/// <reference types=\"react-scripts\" />\n"
  },
  {
    "path": "react/base/src/reportWebVitals.ts",
    "content": "import { ReportHandler } from 'web-vitals';\n\nconst reportWebVitals = (onPerfEntry?: ReportHandler) => {\n  if (onPerfEntry && onPerfEntry instanceof Function) {\n    import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n      getCLS(onPerfEntry);\n      getFID(onPerfEntry);\n      getFCP(onPerfEntry);\n      getLCP(onPerfEntry);\n      getTTFB(onPerfEntry);\n    });\n  }\n};\n\nexport default reportWebVitals;\n"
  },
  {
    "path": "react/base/src/service-worker.ts",
    "content": "/// <reference lib=\"webworker\" />\n/* eslint-disable no-restricted-globals */\n\n// This service worker can be customized!\n// See https://developers.google.com/web/tools/workbox/modules\n// for the list of available Workbox modules, or add any other\n// code you'd like.\n// You can also remove this file if you'd prefer not to use a\n// service worker, and the Workbox build step will be skipped.\n\nimport { clientsClaim } from 'workbox-core';\nimport { ExpirationPlugin } from 'workbox-expiration';\nimport { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching';\nimport { registerRoute } from 'workbox-routing';\nimport { StaleWhileRevalidate } from 'workbox-strategies';\n\ndeclare const self: ServiceWorkerGlobalScope;\n\nclientsClaim();\n\n// Precache all of the assets generated by your build process.\n// Their URLs are injected into the manifest variable below.\n// This variable must be present somewhere in your service worker file,\n// even if you decide not to use precaching. See https://cra.link/PWA\nprecacheAndRoute(self.__WB_MANIFEST);\n\n// Set up App Shell-style routing, so that all navigation requests\n// are fulfilled with your index.html shell. Learn more at\n// https://developers.google.com/web/fundamentals/architecture/app-shell\nconst fileExtensionRegexp = new RegExp('/[^/?]+\\\\.[^/]+$');\nregisterRoute(\n  // Return false to exempt requests from being fulfilled by index.html.\n  ({ request, url }: { request: Request; url: URL }) => {\n    // If this isn't a navigation, skip.\n    if (request.mode !== 'navigate') {\n      return false;\n    }\n\n    // If this is a URL that starts with /_, skip.\n    if (url.pathname.startsWith('/_')) {\n      return false;\n    }\n\n    // If this looks like a URL for a resource, because it contains\n    // a file extension, skip.\n    if (url.pathname.match(fileExtensionRegexp)) {\n      return false;\n    }\n\n    // Return true to signal that we want to use the handler.\n    return true;\n  },\n  createHandlerBoundToURL(process.env.PUBLIC_URL + '/index.html')\n);\n\n// An example runtime caching route for requests that aren't handled by the\n// precache, in this case same-origin .png requests like those from in public/\nregisterRoute(\n  // Add in any other file extensions or routing criteria as needed.\n  ({ url }) => url.origin === self.location.origin && url.pathname.endsWith('.png'),\n  // Customize this strategy as needed, e.g., by changing to CacheFirst.\n  new StaleWhileRevalidate({\n    cacheName: 'images',\n    plugins: [\n      // Ensure that once this runtime cache reaches a maximum size the\n      // least-recently used images are removed.\n      new ExpirationPlugin({ maxEntries: 50 }),\n    ],\n  })\n);\n\n// This allows the web app to trigger skipWaiting via\n// registration.waiting.postMessage({type: 'SKIP_WAITING'})\nself.addEventListener('message', (event) => {\n  if (event.data && event.data.type === 'SKIP_WAITING') {\n    self.skipWaiting();\n  }\n});\n\n// Any other custom service worker logic can go here.\n"
  },
  {
    "path": "react/base/src/serviceWorkerRegistration.ts",
    "content": "/* eslint-disable no-console */\n\n// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://cra.link/PWA\n\nconst isLocalhost = Boolean(\n  window.location.hostname === 'localhost' ||\n    // [::1] is the IPv6 localhost address.\n    window.location.hostname === '[::1]' ||\n    // 127.0.0.0/8 are considered localhost for IPv4.\n    window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\n);\n\ntype Config = {\n  onSuccess?: (registration: ServiceWorkerRegistration) => void;\n  onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n  if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n    // The URL constructor is available in all browsers that support SW.\n    const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n    if (publicUrl.origin !== window.location.origin) {\n      // Our service worker won't work if PUBLIC_URL is on a different origin\n      // from what our page is served on. This might happen if a CDN is used to\n      // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n      return;\n    }\n\n    window.addEventListener('load', () => {\n      const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n      if (isLocalhost) {\n        // This is running on localhost. Let's check if a service worker still exists or not.\n        checkValidServiceWorker(swUrl, config);\n\n        // Add some additional logging to localhost, pointing developers to the\n        // service worker/PWA documentation.\n        navigator.serviceWorker.ready.then(() => {\n          console.log(\n            'This web app is being served cache-first by a service ' +\n              'worker. To learn more, visit https://cra.link/PWA'\n          );\n        });\n      } else {\n        // Is not localhost. Just register service worker\n        registerValidSW(swUrl, config);\n      }\n    });\n  }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n  navigator.serviceWorker\n    .register(swUrl)\n    .then((registration) => {\n      registration.onupdatefound = () => {\n        const installingWorker = registration.installing;\n        if (installingWorker == null) {\n          return;\n        }\n        installingWorker.onstatechange = () => {\n          if (installingWorker.state === 'installed') {\n            if (navigator.serviceWorker.controller) {\n              // At this point, the updated precached content has been fetched,\n              // but the previous service worker will still serve the older\n              // content until all client tabs are closed.\n              console.log(\n                'New content is available and will be used when all ' +\n                  'tabs for this page are closed. See https://cra.link/PWA.'\n              );\n\n              // Execute callback\n              if (config && config.onUpdate) {\n                config.onUpdate(registration);\n              }\n            } else {\n              // At this point, everything has been precached.\n              // It's the perfect time to display a\n              // \"Content is cached for offline use.\" message.\n              console.log('Content is cached for offline use.');\n\n              // Execute callback\n              if (config && config.onSuccess) {\n                config.onSuccess(registration);\n              }\n            }\n          }\n        };\n      };\n    })\n    .catch((error) => {\n      console.error('Error during service worker registration:', error);\n    });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n  // Check if the service worker can be found. If it can't reload the page.\n  fetch(swUrl, {\n    headers: { 'Service-Worker': 'script' },\n  })\n    .then((response) => {\n      // Ensure service worker exists, and that we really are getting a JS file.\n      const contentType = response.headers.get('content-type');\n      if (\n        response.status === 404 ||\n        (contentType != null && contentType.indexOf('javascript') === -1)\n      ) {\n        // No service worker found. Probably a different app. Reload the page.\n        navigator.serviceWorker.ready.then((registration) => {\n          registration.unregister().then(() => {\n            window.location.reload();\n          });\n        });\n      } else {\n        // Service worker found. Proceed as normal.\n        registerValidSW(swUrl, config);\n      }\n    })\n    .catch(() => {\n      console.log('No internet connection found. App is running in offline mode.');\n    });\n}\n\nexport function unregister() {\n  if ('serviceWorker' in navigator) {\n    navigator.serviceWorker.ready\n      .then((registration) => {\n        registration.unregister();\n      })\n      .catch((error) => {\n        console.error(error.message);\n      });\n  }\n}\n"
  },
  {
    "path": "react/base/src/setupTests.ts",
    "content": "/* eslint-disable @typescript-eslint/no-empty-function */\n\n// jest-dom adds custom jest matchers for asserting on DOM nodes.\n// allows you to do things like:\n// expect(element).toHaveTextContent(/react/i)\n// learn more: https://github.com/testing-library/jest-dom\nimport '@testing-library/jest-dom/extend-expect';\n\n// Mock matchmedia\nwindow.matchMedia = window.matchMedia || function() {\n  return {\n      matches: false,\n      addListener: function() {},\n      removeListener: function() {}\n  };\n};\n"
  },
  {
    "path": "react/base/src/theme/variables.css",
    "content": "/* Ionic Variables and Theming. For more info, please see:\nhttp://ionicframework.com/docs/theming/ */\n\n/** Ionic CSS Variables **/\n:root {\n  /** primary **/\n  --ion-color-primary: #3880ff;\n  --ion-color-primary-rgb: 56, 128, 255;\n  --ion-color-primary-contrast: #ffffff;\n  --ion-color-primary-contrast-rgb: 255, 255, 255;\n  --ion-color-primary-shade: #3171e0;\n  --ion-color-primary-tint: #4c8dff;\n\n  /** secondary **/\n  --ion-color-secondary: #3dc2ff;\n  --ion-color-secondary-rgb: 61, 194, 255;\n  --ion-color-secondary-contrast: #ffffff;\n  --ion-color-secondary-contrast-rgb: 255, 255, 255;\n  --ion-color-secondary-shade: #36abe0;\n  --ion-color-secondary-tint: #50c8ff;\n\n  /** tertiary **/\n  --ion-color-tertiary: #5260ff;\n  --ion-color-tertiary-rgb: 82, 96, 255;\n  --ion-color-tertiary-contrast: #ffffff;\n  --ion-color-tertiary-contrast-rgb: 255, 255, 255;\n  --ion-color-tertiary-shade: #4854e0;\n  --ion-color-tertiary-tint: #6370ff;\n\n  /** success **/\n  --ion-color-success: #2dd36f;\n  --ion-color-success-rgb: 45, 211, 111;\n  --ion-color-success-contrast: #ffffff;\n  --ion-color-success-contrast-rgb: 255, 255, 255;\n  --ion-color-success-shade: #28ba62;\n  --ion-color-success-tint: #42d77d;\n\n  /** warning **/\n  --ion-color-warning: #ffc409;\n  --ion-color-warning-rgb: 255, 196, 9;\n  --ion-color-warning-contrast: #000000;\n  --ion-color-warning-contrast-rgb: 0, 0, 0;\n  --ion-color-warning-shade: #e0ac08;\n  --ion-color-warning-tint: #ffca22;\n\n  /** danger **/\n  --ion-color-danger: #eb445a;\n  --ion-color-danger-rgb: 235, 68, 90;\n  --ion-color-danger-contrast: #ffffff;\n  --ion-color-danger-contrast-rgb: 255, 255, 255;\n  --ion-color-danger-shade: #cf3c4f;\n  --ion-color-danger-tint: #ed576b;\n\n  /** dark **/\n  --ion-color-dark: #222428;\n  --ion-color-dark-rgb: 34, 36, 40;\n  --ion-color-dark-contrast: #ffffff;\n  --ion-color-dark-contrast-rgb: 255, 255, 255;\n  --ion-color-dark-shade: #1e2023;\n  --ion-color-dark-tint: #383a3e;\n\n  /** medium **/\n  --ion-color-medium: #92949c;\n  --ion-color-medium-rgb: 146, 148, 156;\n  --ion-color-medium-contrast: #ffffff;\n  --ion-color-medium-contrast-rgb: 255, 255, 255;\n  --ion-color-medium-shade: #808289;\n  --ion-color-medium-tint: #9d9fa6;\n\n  /** light **/\n  --ion-color-light: #f4f5f8;\n  --ion-color-light-rgb: 244, 245, 248;\n  --ion-color-light-contrast: #000000;\n  --ion-color-light-contrast-rgb: 0, 0, 0;\n  --ion-color-light-shade: #d7d8da;\n  --ion-color-light-tint: #f5f6f9;\n}\n\n@media (prefers-color-scheme: dark) {\n  /*\n   * Dark Colors\n   * -------------------------------------------\n   */\n\n  body {\n    --ion-color-primary: #428cff;\n    --ion-color-primary-rgb: 66,140,255;\n    --ion-color-primary-contrast: #ffffff;\n    --ion-color-primary-contrast-rgb: 255,255,255;\n    --ion-color-primary-shade: #3a7be0;\n    --ion-color-primary-tint: #5598ff;\n\n    --ion-color-secondary: #50c8ff;\n    --ion-color-secondary-rgb: 80,200,255;\n    --ion-color-secondary-contrast: #ffffff;\n    --ion-color-secondary-contrast-rgb: 255,255,255;\n    --ion-color-secondary-shade: #46b0e0;\n    --ion-color-secondary-tint: #62ceff;\n\n    --ion-color-tertiary: #6a64ff;\n    --ion-color-tertiary-rgb: 106,100,255;\n    --ion-color-tertiary-contrast: #ffffff;\n    --ion-color-tertiary-contrast-rgb: 255,255,255;\n    --ion-color-tertiary-shade: #5d58e0;\n    --ion-color-tertiary-tint: #7974ff;\n\n    --ion-color-success: #2fdf75;\n    --ion-color-success-rgb: 47,223,117;\n    --ion-color-success-contrast: #000000;\n    --ion-color-success-contrast-rgb: 0,0,0;\n    --ion-color-success-shade: #29c467;\n    --ion-color-success-tint: #44e283;\n\n    --ion-color-warning: #ffd534;\n    --ion-color-warning-rgb: 255,213,52;\n    --ion-color-warning-contrast: #000000;\n    --ion-color-warning-contrast-rgb: 0,0,0;\n    --ion-color-warning-shade: #e0bb2e;\n    --ion-color-warning-tint: #ffd948;\n\n    --ion-color-danger: #ff4961;\n    --ion-color-danger-rgb: 255,73,97;\n    --ion-color-danger-contrast: #ffffff;\n    --ion-color-danger-contrast-rgb: 255,255,255;\n    --ion-color-danger-shade: #e04055;\n    --ion-color-danger-tint: #ff5b71;\n\n    --ion-color-dark: #f4f5f8;\n    --ion-color-dark-rgb: 244,245,248;\n    --ion-color-dark-contrast: #000000;\n    --ion-color-dark-contrast-rgb: 0,0,0;\n    --ion-color-dark-shade: #d7d8da;\n    --ion-color-dark-tint: #f5f6f9;\n\n    --ion-color-medium: #989aa2;\n    --ion-color-medium-rgb: 152,154,162;\n    --ion-color-medium-contrast: #000000;\n    --ion-color-medium-contrast-rgb: 0,0,0;\n    --ion-color-medium-shade: #86888f;\n    --ion-color-medium-tint: #a2a4ab;\n\n    --ion-color-light: #222428;\n    --ion-color-light-rgb: 34,36,40;\n    --ion-color-light-contrast: #ffffff;\n    --ion-color-light-contrast-rgb: 255,255,255;\n    --ion-color-light-shade: #1e2023;\n    --ion-color-light-tint: #383a3e;\n  }\n\n  /*\n   * iOS Dark Theme\n   * -------------------------------------------\n   */\n\n  .ios body {\n    --ion-background-color: #000000;\n    --ion-background-color-rgb: 0,0,0;\n\n    --ion-text-color: #ffffff;\n    --ion-text-color-rgb: 255,255,255;\n\n    --ion-color-step-50: #0d0d0d;\n    --ion-color-step-100: #1a1a1a;\n    --ion-color-step-150: #262626;\n    --ion-color-step-200: #333333;\n    --ion-color-step-250: #404040;\n    --ion-color-step-300: #4d4d4d;\n    --ion-color-step-350: #595959;\n    --ion-color-step-400: #666666;\n    --ion-color-step-450: #737373;\n    --ion-color-step-500: #808080;\n    --ion-color-step-550: #8c8c8c;\n    --ion-color-step-600: #999999;\n    --ion-color-step-650: #a6a6a6;\n    --ion-color-step-700: #b3b3b3;\n    --ion-color-step-750: #bfbfbf;\n    --ion-color-step-800: #cccccc;\n    --ion-color-step-850: #d9d9d9;\n    --ion-color-step-900: #e6e6e6;\n    --ion-color-step-950: #f2f2f2;\n\n    --ion-item-background: #000000;\n\n    --ion-card-background: #1c1c1d;\n  }\n\n  .ios ion-modal {\n    --ion-background-color: var(--ion-color-step-100);\n    --ion-toolbar-background: var(--ion-color-step-150);\n    --ion-toolbar-border-color: var(--ion-color-step-250);\n  }\n\n\n  /*\n   * Material Design Dark Theme\n   * -------------------------------------------\n   */\n\n  .md body {\n    --ion-background-color: #121212;\n    --ion-background-color-rgb: 18,18,18;\n\n    --ion-text-color: #ffffff;\n    --ion-text-color-rgb: 255,255,255;\n\n    --ion-border-color: #222222;\n\n    --ion-color-step-50: #1e1e1e;\n    --ion-color-step-100: #2a2a2a;\n    --ion-color-step-150: #363636;\n    --ion-color-step-200: #414141;\n    --ion-color-step-250: #4d4d4d;\n    --ion-color-step-300: #595959;\n    --ion-color-step-350: #656565;\n    --ion-color-step-400: #717171;\n    --ion-color-step-450: #7d7d7d;\n    --ion-color-step-500: #898989;\n    --ion-color-step-550: #949494;\n    --ion-color-step-600: #a0a0a0;\n    --ion-color-step-650: #acacac;\n    --ion-color-step-700: #b8b8b8;\n    --ion-color-step-750: #c4c4c4;\n    --ion-color-step-800: #d0d0d0;\n    --ion-color-step-850: #dbdbdb;\n    --ion-color-step-900: #e7e7e7;\n    --ion-color-step-950: #f3f3f3;\n\n    --ion-item-background: #1e1e1e;\n\n    --ion-toolbar-background: #1f1f1f;\n\n    --ion-tab-bar-background: #1f1f1f;\n\n    --ion-card-background: #1e1e1e;\n  }\n}\n"
  },
  {
    "path": "react/base/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"es5\",\n    \"lib\": [\n      \"dom\",\n      \"dom.iterable\",\n      \"esnext\"\n    ],\n    \"allowJs\": true,\n    \"skipLibCheck\": true,\n    \"esModuleInterop\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"strict\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"module\": \"esnext\",\n    \"moduleResolution\": \"node\",\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\"\n  },\n  \"include\": [\n    \"src\"\n  ]\n}\n"
  },
  {
    "path": "react/community/.gitkeep",
    "content": ""
  },
  {
    "path": "react/official/blank/ionic.starter.json",
    "content": "{\n  \"name\": \"Blank Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test -- --watchAll=false\"\n  }\n}\n"
  },
  {
    "path": "react/official/blank/src/App.tsx",
    "content": "import React from 'react';\nimport { Redirect, Route } from 'react-router-dom';\nimport { IonApp, IonRouterOutlet, setupIonicReact } from '@ionic/react';\nimport { IonReactRouter } from '@ionic/react-router';\nimport Home from './pages/Home';\n\n/* Core CSS required for Ionic components to work properly */\nimport '@ionic/react/css/core.css';\n\n/* Basic CSS for apps built with Ionic */\nimport '@ionic/react/css/normalize.css';\nimport '@ionic/react/css/structure.css';\nimport '@ionic/react/css/typography.css';\n\n/* Optional CSS utils that can be commented out */\nimport '@ionic/react/css/padding.css';\nimport '@ionic/react/css/float-elements.css';\nimport '@ionic/react/css/text-alignment.css';\nimport '@ionic/react/css/text-transformation.css';\nimport '@ionic/react/css/flex-utils.css';\nimport '@ionic/react/css/display.css';\n\n/* Theme variables */\nimport './theme/variables.css';\n\nsetupIonicReact();\n\nconst App: React.FC = () => (\n  <IonApp>\n    <IonReactRouter>\n      <IonRouterOutlet>\n        <Route exact path=\"/home\">\n          <Home />\n        </Route>\n        <Route exact path=\"/\">\n          <Redirect to=\"/home\" />\n        </Route>\n      </IonRouterOutlet>\n    </IonReactRouter>\n  </IonApp>\n);\n\nexport default App;\n"
  },
  {
    "path": "react/official/blank/src/components/ExploreContainer.css",
    "content": "#container {\n  text-align: center;\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n  color: #8c8c8c;\n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}"
  },
  {
    "path": "react/official/blank/src/components/ExploreContainer.tsx",
    "content": "import React from 'react';\nimport './ExploreContainer.css';\n\nconst ExploreContainer: React.FC = () => {\n  return (\n    <div id=\"container\">\n      <strong>Ready to create an app?</strong>\n      <p>Start with Ionic <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n    </div>\n  );\n};\n\nexport default ExploreContainer;\n"
  },
  {
    "path": "react/official/blank/src/pages/Home.css",
    "content": ""
  },
  {
    "path": "react/official/blank/src/pages/Home.tsx",
    "content": "import React from 'react';\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react';\nimport ExploreContainer from '../components/ExploreContainer';\nimport './Home.css';\n\nconst Home: React.FC = () => {\n  return (\n    <IonPage>\n      <IonHeader>\n        <IonToolbar>\n          <IonTitle>Blank</IonTitle>\n        </IonToolbar>\n      </IonHeader>\n      <IonContent fullscreen>\n        <IonHeader collapse=\"condense\">\n          <IonToolbar>\n            <IonTitle size=\"large\">Blank</IonTitle>\n          </IonToolbar>\n        </IonHeader>\n        <ExploreContainer />\n      </IonContent>\n    </IonPage>\n  );\n};\n\nexport default Home;\n"
  },
  {
    "path": "react/official/list/ionic.starter.json",
    "content": "{\n  \"name\": \"List Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test -- --watchAll=false\"\n  }\n}\n"
  },
  {
    "path": "react/official/list/src/App.tsx",
    "content": "import React from 'react';\nimport { Redirect, Route } from 'react-router-dom';\nimport { IonApp, IonRouterOutlet, setupIonicReact } from '@ionic/react';\nimport { IonReactRouter } from '@ionic/react-router';\nimport Home from './pages/Home';\nimport ViewMessage from './pages/ViewMessage';\n\n/* Core CSS required for Ionic components to work properly */\nimport '@ionic/react/css/core.css';\n\n/* Basic CSS for apps built with Ionic */\nimport '@ionic/react/css/normalize.css';\nimport '@ionic/react/css/structure.css';\nimport '@ionic/react/css/typography.css';\n\n/* Optional CSS utils that can be commented out */\nimport '@ionic/react/css/padding.css';\nimport '@ionic/react/css/float-elements.css';\nimport '@ionic/react/css/text-alignment.css';\nimport '@ionic/react/css/text-transformation.css';\nimport '@ionic/react/css/flex-utils.css';\nimport '@ionic/react/css/display.css';\n\n/* Theme variables */\nimport './theme/variables.css';\n\nsetupIonicReact();\n\nconst App: React.FC = () => (\n  <IonApp>\n    <IonReactRouter>\n      <IonRouterOutlet>\n        <Route path=\"/\" exact={true}>\n          <Redirect to=\"/home\" />\n        </Route>\n        <Route path=\"/home\" exact={true}>\n          <Home />\n        </Route>\n        <Route path=\"/message/:id\">\n           <ViewMessage />\n        </Route>\n      </IonRouterOutlet>\n    </IonReactRouter>\n  </IonApp>\n);\n\nexport default App;\n"
  },
  {
    "path": "react/official/list/src/components/MessageListItem.css",
    "content": "ion-item {\n  --padding-start: 0;\n  --inner-padding-end: 0;\n}\n\nion-label {\n  margin-top: 12px;\n  margin-bottom: 12px;\n}\n\nion-item h2 {\n  font-weight: 600;\n  margin: 0;\n}\n\nion-item p {\n  text-overflow: ellipsis;\n  overflow: hidden;\n  white-space: nowrap;\n  width: 95%;\n}\n\nion-item .date {\n  float: right;\n  align-items: center;\n  display: flex;\n}\n\nion-item ion-icon {\n  color: #c9c9ca;\n}\n\nion-item ion-note {\n  font-size: 15px;\n  margin-right: 8px;\n  font-weight: normal;\n}\n\nion-item ion-note.md {\n  margin-right: 14px;\n}\n\n.dot {\n  display: block;\n  height: 12px;\n  width: 12px;\n  border-radius: 50%;\n  align-self: start;\n  margin: 16px 10px 16px 16px;\n}\n\n.dot-unread {\n  background: var(--ion-color-primary);\n}\n\nion-footer ion-title {\n  font-size: 11px;\n  font-weight: normal;\n}"
  },
  {
    "path": "react/official/list/src/components/MessageListItem.tsx",
    "content": "import React from 'react';\nimport {\n  IonItem,\n  IonLabel,\n  IonNote\n  } from '@ionic/react';\nimport { Message } from '../data/messages';\nimport './MessageListItem.css';\n\ninterface MessageListItemProps {\n  message: Message;\n}\n\nconst MessageListItem: React.FC<MessageListItemProps> = ({ message }) => {\n  return (\n    <IonItem routerLink={`/message/${message.id}`} detail={false}>\n      <div slot=\"start\" className=\"dot dot-unread\"></div>\n      <IonLabel className=\"ion-text-wrap\">\n        <h2>\n          {message.fromName}\n          <span className=\"date\">\n            <IonNote>{message.date}</IonNote>\n          </span>\n        </h2>\n        <h3>{message.subject}</h3>\n        <p>\n          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n        </p>\n      </IonLabel>\n    </IonItem>\n  );\n};\n\nexport default MessageListItem;\n"
  },
  {
    "path": "react/official/list/src/data/messages.ts",
    "content": "export interface Message {\n  fromName: string;\n  subject: string;\n  date: string;\n  id: number;\n}\n\nconst messages: Message[] = [\n  {\n    fromName: 'Matt Chorsey',\n    subject: 'New event: Trip to Vegas',\n    date: '9:32 AM',\n    id: 0\n  },\n  {\n    fromName: 'Lauren Ruthford',\n    subject: 'Long time no chat',\n    date: '6:12 AM',\n    id: 1\n  },\n  {\n    fromName: 'Jordan Firth',\n    subject: 'Report Results',\n    date: '4:55 AM',\n    id: 2\n\n  },\n  {\n    fromName: 'Bill Thomas',\n    subject: 'The situation',\n    date: 'Yesterday',\n    id: 3\n  },\n  {\n    fromName: 'Joanne Pollan',\n    subject: 'Updated invitation: Swim lessons',\n    date: 'Yesterday',\n    id: 4\n  },\n  {\n    fromName: 'Andrea Cornerston',\n    subject: 'Last minute ask',\n    date: 'Yesterday',\n    id: 5\n  },\n  {\n    fromName: 'Moe Chamont',\n    subject: 'Family Calendar - Version 1',\n    date: 'Last Week',\n    id: 6\n  },\n  {\n    fromName: 'Kelly Richardson',\n    subject: 'Placeholder Headhots',\n    date: 'Last Week',\n    id: 7\n  }\n];\n\nexport const getMessages = () => messages;\n\nexport const getMessage = (id: number) => messages.find(m => m.id === id);\n"
  },
  {
    "path": "react/official/list/src/pages/Home.css",
    "content": ""
  },
  {
    "path": "react/official/list/src/pages/Home.tsx",
    "content": "import React from 'react';\nimport MessageListItem from '../components/MessageListItem';\nimport { useState } from 'react';\nimport { Message, getMessages } from '../data/messages';\nimport {\n  IonContent,\n  IonHeader,\n  IonList,\n  IonPage,\n  IonRefresher,\n  IonRefresherContent,\n  IonTitle,\n  IonToolbar,\n  useIonViewWillEnter\n} from '@ionic/react';\nimport './Home.css';\n\nconst Home: React.FC = () => {\n\n  const [messages, setMessages] = useState<Message[]>([]);\n\n  useIonViewWillEnter(() => {\n    const msgs = getMessages();\n    setMessages(msgs);\n  });\n\n  const refresh = (e: CustomEvent) => {\n    setTimeout(() => {\n      e.detail.complete();\n    }, 3000);\n  };\n\n  return (\n    <IonPage id=\"home-page\">\n      <IonHeader>\n        <IonToolbar>\n          <IonTitle>Inbox</IonTitle>\n        </IonToolbar>\n      </IonHeader>\n      <IonContent fullscreen>\n        <IonRefresher slot=\"fixed\" onIonRefresh={refresh}>\n          <IonRefresherContent></IonRefresherContent>\n        </IonRefresher>\n\n        <IonHeader collapse=\"condense\">\n          <IonToolbar>\n            <IonTitle size=\"large\">\n              Inbox\n            </IonTitle>\n          </IonToolbar>\n        </IonHeader>\n\n        <IonList>\n          {messages.map(m => <MessageListItem key={m.id} message={m} />)}\n        </IonList>\n      </IonContent>\n    </IonPage>\n  );\n};\n\nexport default Home;\n"
  },
  {
    "path": "react/official/list/src/pages/ViewMessage.css",
    "content": "#view-message-page ion-item {\n  --inner-padding-end: 0;\n  --background: transparent;\n}\n\n#view-message-page ion-label {\n  margin-top: 12px;\n  margin-bottom: 12px;\n}\n\n#view-message-page ion-item h2 {\n  font-weight: 600;\n}\n\n#view-message-page ion-item .date {\n  float: right;\n  align-items: center;\n  display: flex;\n}\n\n#view-message-page ion-item ion-icon {\n  font-size: 42px;\n  margin-right: 8px;\n}\n\n#view-message-page ion-item ion-note {\n  font-size: 15px;\n  margin-right: 12px;\n  font-weight: normal;\n}\n\n#view-message-page h1 {\n  margin: 0;\n  font-weight: bold;\n  font-size: 22px;\n}\n\n#view-message-page p {\n  line-height: 22px;\n}"
  },
  {
    "path": "react/official/list/src/pages/ViewMessage.tsx",
    "content": "import React from 'react';\nimport { useState } from 'react';\nimport { Message, getMessage } from '../data/messages';\nimport {\n  IonBackButton,\n  IonButtons,\n  IonContent,\n  IonHeader,\n  IonIcon,\n  IonItem,\n  IonLabel,\n  IonNote,\n  IonPage,\n  IonToolbar,\n  useIonViewWillEnter,\n  isPlatform\n} from '@ionic/react';\nimport { personCircle } from 'ionicons/icons';\nimport { useParams } from 'react-router';\nimport './ViewMessage.css';\n\nfunction ViewMessage() {\n  const [message, setMessage] = useState<Message>();\n  const params = useParams<{ id: string }>();\n\n  useIonViewWillEnter(() => {\n    const msg = getMessage(parseInt(params.id, 10));\n    setMessage(msg);\n  });\n\n  const getBackButtonText = () => {\n    const isIos = isPlatform('ios')\n    return isIos ? 'Inbox' : '';\n  };\n\n  return (\n    <IonPage id=\"view-message-page\">\n      <IonHeader translucent>\n        <IonToolbar>\n          <IonButtons slot=\"start\">\n            <IonBackButton text={getBackButtonText()} defaultHref=\"/home\"></IonBackButton>\n          </IonButtons>\n        </IonToolbar>\n      </IonHeader>\n\n      <IonContent fullscreen>\n        {message ? (\n          <>\n            <IonItem>\n              <IonIcon aria-hidden=\"true\" icon={personCircle} color=\"primary\"></IonIcon>\n              <IonLabel className=\"ion-text-wrap\">\n                <h2>\n                  {message.fromName}\n                  <span className=\"date\">\n                    <IonNote>{message.date}</IonNote>\n                  </span>\n                </h2>\n                <h3>\n                  To: <IonNote>Me</IonNote>\n                </h3>\n              </IonLabel>\n            </IonItem>\n\n            <div className=\"ion-padding\">\n              <h1>{message.subject}</h1>\n              <p>\n                Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do\n                eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut\n                enim ad minim veniam, quis nostrud exercitation ullamco laboris\n                nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor\n                in reprehenderit in voluptate velit esse cillum dolore eu fugiat\n                nulla pariatur. Excepteur sint occaecat cupidatat non proident,\n                sunt in culpa qui officia deserunt mollit anim id est laborum.\n              </p>\n            </div>\n          </>\n        ) : (\n          <div>Message not found</div>\n        )}\n      </IonContent>\n    </IonPage>\n  );\n}\n\nexport default ViewMessage;\n"
  },
  {
    "path": "react/official/sidemenu/ionic.starter.json",
    "content": "{\n  \"name\": \"Sidemenu Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test -- --watchAll=false\"\n  }\n}\n"
  },
  {
    "path": "react/official/sidemenu/src/App.tsx",
    "content": "import React from 'react';\nimport { IonApp, IonRouterOutlet, IonSplitPane, setupIonicReact } from '@ionic/react';\nimport { IonReactRouter } from '@ionic/react-router';\nimport { Redirect, Route } from 'react-router-dom';\nimport Menu from './components/Menu';\nimport Page from './pages/Page';\n\n/* Core CSS required for Ionic components to work properly */\nimport '@ionic/react/css/core.css';\n\n/* Basic CSS for apps built with Ionic */\nimport '@ionic/react/css/normalize.css';\nimport '@ionic/react/css/structure.css';\nimport '@ionic/react/css/typography.css';\n\n/* Optional CSS utils that can be commented out */\nimport '@ionic/react/css/padding.css';\nimport '@ionic/react/css/float-elements.css';\nimport '@ionic/react/css/text-alignment.css';\nimport '@ionic/react/css/text-transformation.css';\nimport '@ionic/react/css/flex-utils.css';\nimport '@ionic/react/css/display.css';\n\n/* Theme variables */\nimport './theme/variables.css';\n\nsetupIonicReact();\n\nconst App: React.FC = () => {\n  return (\n    <IonApp>\n      <IonReactRouter>\n        <IonSplitPane contentId=\"main\">\n          <Menu />\n          <IonRouterOutlet id=\"main\">\n            <Route path=\"/\" exact={true}>\n              <Redirect to=\"/page/Inbox\" />\n            </Route>\n            <Route path=\"/page/:name\" exact={true}>\n              <Page />\n            </Route>\n          </IonRouterOutlet>\n        </IonSplitPane>\n      </IonReactRouter>\n    </IonApp>\n  );\n};\n\nexport default App;\n"
  },
  {
    "path": "react/official/sidemenu/src/components/ExploreContainer.css",
    "content": ".container {\n  text-align: center;\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n.container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n.container p {\n  font-size: 16px;\n  line-height: 22px;\n  color: #8c8c8c;\n  margin: 0;\n}\n\n.container a {\n  text-decoration: none;\n}"
  },
  {
    "path": "react/official/sidemenu/src/components/ExploreContainer.tsx",
    "content": "import React from 'react';\nimport './ExploreContainer.css';\n\ninterface ContainerProps {\n  name: string;\n}\n\nconst ExploreContainer: React.FC<ContainerProps> = ({ name }) => {\n  return (\n    <div className=\"container\">\n      <strong>{name}</strong>\n      <p>Explore <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n    </div>\n  );\n};\n\nexport default ExploreContainer;\n"
  },
  {
    "path": "react/official/sidemenu/src/components/Menu.css",
    "content": "ion-menu ion-content {\n  --background: var(--ion-item-background, var(--ion-background-color, #fff));\n}\n\nion-menu.md ion-content {\n  --padding-start: 8px;\n  --padding-end: 8px;\n  --padding-top: 20px;\n  --padding-bottom: 20px;\n}\n\nion-menu.md ion-list {\n  padding: 20px 0;\n}\n\nion-menu.md ion-note {\n  margin-bottom: 30px;\n}\n\nion-menu.md ion-list-header, ion-menu.md ion-note {\n  padding-left: 10px;\n}\n\nion-menu.md ion-list#inbox-list {\n  border-bottom: 1px solid var(--ion-color-step-150, #d7d8da);\n}\n\nion-menu.md ion-list#inbox-list ion-list-header {\n  font-size: 22px;\n  font-weight: 600;\n  min-height: 20px;\n}\n\nion-menu.md ion-list#labels-list ion-list-header {\n  font-size: 16px;\n  margin-bottom: 18px;\n  color: #757575;\n  min-height: 26px;\n}\n\nion-menu.md ion-item {\n  --padding-start: 10px;\n  --padding-end: 10px;\n  border-radius: 4px;\n}\n\nion-menu.md ion-item.selected {\n  --background: rgba(var(--ion-color-primary-rgb), 0.14);\n}\n\nion-menu.md ion-item.selected ion-icon {\n  color: var(--ion-color-primary);\n}\n\nion-menu.md ion-item ion-icon {\n  color: #616e7e;\n}\n\nion-menu.md ion-item ion-label {\n  font-weight: 500;\n}\n\nion-menu.ios ion-content {\n  --padding-bottom: 20px;\n}\n\nion-menu.ios ion-list {\n  padding: 20px 0 0 0;\n}\n\nion-menu.ios ion-note {\n  line-height: 24px;\n  margin-bottom: 20px;\n}\n\nion-menu.ios ion-item {\n  --padding-start: 16px;\n  --padding-end: 16px;\n  --min-height: 50px;\n}\n\nion-menu.ios ion-item ion-icon {\n  font-size: 24px;\n  color: #73849a;\n}\n\nion-menu.ios ion-item .selected ion-icon {\n  color: var(--ion-color-primary);\n}\n\nion-menu.ios ion-list#labels-list ion-list-header {\n  margin-bottom: 8px;\n}\n\nion-menu.ios ion-list-header,\nion-menu.ios ion-note {\n  padding-left: 16px;\n  padding-right: 16px;\n}\n\nion-menu.ios ion-note {\n  margin-bottom: 8px;\n}\n\nion-note {\n  display: inline-block;\n  font-size: 16px;\n  color: var(--ion-color-medium-shade);\n}\n\nion-item.selected {\n  --color: var(--ion-color-primary);\n} "
  },
  {
    "path": "react/official/sidemenu/src/components/Menu.tsx",
    "content": "import React from 'react';\nimport {\n  IonContent,\n  IonIcon,\n  IonItem,\n  IonLabel,\n  IonList,\n  IonListHeader,\n  IonMenu,\n  IonMenuToggle,\n  IonNote,\n} from '@ionic/react';\n\nimport { useLocation } from 'react-router-dom';\nimport { archiveOutline, archiveSharp, bookmarkOutline, heartOutline, heartSharp, mailOutline, mailSharp, paperPlaneOutline, paperPlaneSharp, trashOutline, trashSharp, warningOutline, warningSharp } from 'ionicons/icons';\nimport './Menu.css';\n\ninterface AppPage {\n  url: string;\n  iosIcon: string;\n  mdIcon: string;\n  title: string;\n}\n\nconst appPages: AppPage[] = [\n  {\n    title: 'Inbox',\n    url: '/page/Inbox',\n    iosIcon: mailOutline,\n    mdIcon: mailSharp\n  },\n  {\n    title: 'Outbox',\n    url: '/page/Outbox',\n    iosIcon: paperPlaneOutline,\n    mdIcon: paperPlaneSharp\n  },\n  {\n    title: 'Favorites',\n    url: '/page/Favorites',\n    iosIcon: heartOutline,\n    mdIcon: heartSharp\n  },\n  {\n    title: 'Archived',\n    url: '/page/Archived',\n    iosIcon: archiveOutline,\n    mdIcon: archiveSharp\n  },\n  {\n    title: 'Trash',\n    url: '/page/Trash',\n    iosIcon: trashOutline,\n    mdIcon: trashSharp\n  },\n  {\n    title: 'Spam',\n    url: '/page/Spam',\n    iosIcon: warningOutline,\n    mdIcon: warningSharp\n  }\n];\n\nconst labels = ['Family', 'Friends', 'Notes', 'Work', 'Travel', 'Reminders'];\n\nconst Menu: React.FC = () => {\n  const location = useLocation();\n\n  return (\n    <IonMenu contentId=\"main\" type=\"overlay\">\n      <IonContent>\n        <IonList id=\"inbox-list\">\n          <IonListHeader>Inbox</IonListHeader>\n          <IonNote>hi@ionicframework.com</IonNote>\n          {appPages.map((appPage, index) => {\n            return (\n              <IonMenuToggle key={index} autoHide={false}>\n                <IonItem className={location.pathname === appPage.url ? 'selected' : ''} routerLink={appPage.url} routerDirection=\"none\" lines=\"none\" detail={false}>\n                  <IonIcon aria-hidden=\"true\" slot=\"start\" ios={appPage.iosIcon} md={appPage.mdIcon} />\n                  <IonLabel>{appPage.title}</IonLabel>\n                </IonItem>\n              </IonMenuToggle>\n            );\n          })}\n        </IonList>\n\n        <IonList id=\"labels-list\">\n          <IonListHeader>Labels</IonListHeader>\n          {labels.map((label, index) => (\n            <IonItem lines=\"none\" key={index}>\n              <IonIcon aria-hidden=\"true\" slot=\"start\" icon={bookmarkOutline} />\n              <IonLabel>{label}</IonLabel>\n            </IonItem>\n          ))}\n        </IonList>\n      </IonContent>\n    </IonMenu>\n  );\n};\n\nexport default Menu;\n"
  },
  {
    "path": "react/official/sidemenu/src/pages/Page.css",
    "content": ""
  },
  {
    "path": "react/official/sidemenu/src/pages/Page.tsx",
    "content": "import React from 'react';\nimport { IonButtons, IonContent, IonHeader, IonMenuButton, IonPage, IonTitle, IonToolbar } from '@ionic/react';\nimport { useParams } from 'react-router';\nimport ExploreContainer from '../components/ExploreContainer';\nimport './Page.css';\n\nconst Page: React.FC = () => {\n\n  const { name } = useParams<{ name: string; }>();\n\n  return (\n    <IonPage>\n      <IonHeader>\n        <IonToolbar>\n          <IonButtons slot=\"start\">\n            <IonMenuButton />\n          </IonButtons>\n          <IonTitle>{name}</IonTitle>\n        </IonToolbar>\n      </IonHeader>\n\n      <IonContent fullscreen>\n        <IonHeader collapse=\"condense\">\n          <IonToolbar>\n            <IonTitle size=\"large\">{name}</IonTitle>\n          </IonToolbar>\n        </IonHeader>\n        <ExploreContainer name={name} />\n      </IonContent>\n    </IonPage>\n  );\n};\n\nexport default Page;\n"
  },
  {
    "path": "react/official/tabs/ionic.starter.json",
    "content": "{\n  \"name\": \"Tabs Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test -- --watchAll=false\"\n  }\n}\n"
  },
  {
    "path": "react/official/tabs/src/App.tsx",
    "content": "import React from 'react';\nimport { Redirect, Route } from 'react-router-dom';\nimport {\n  IonApp,\n  IonIcon,\n  IonLabel,\n  IonRouterOutlet,\n  IonTabBar,\n  IonTabButton,\n  IonTabs,\n  setupIonicReact\n} from '@ionic/react';\nimport { IonReactRouter } from '@ionic/react-router';\nimport { ellipse, square, triangle } from 'ionicons/icons';\nimport Tab1 from './pages/Tab1';\nimport Tab2 from './pages/Tab2';\nimport Tab3 from './pages/Tab3';\n\n/* Core CSS required for Ionic components to work properly */\nimport '@ionic/react/css/core.css';\n\n/* Basic CSS for apps built with Ionic */\nimport '@ionic/react/css/normalize.css';\nimport '@ionic/react/css/structure.css';\nimport '@ionic/react/css/typography.css';\n\n/* Optional CSS utils that can be commented out */\nimport '@ionic/react/css/padding.css';\nimport '@ionic/react/css/float-elements.css';\nimport '@ionic/react/css/text-alignment.css';\nimport '@ionic/react/css/text-transformation.css';\nimport '@ionic/react/css/flex-utils.css';\nimport '@ionic/react/css/display.css';\n\n/* Theme variables */\nimport './theme/variables.css';\n\nsetupIonicReact();\n\nconst App: React.FC = () => (\n  <IonApp>\n    <IonReactRouter>\n      <IonTabs>\n        <IonRouterOutlet>\n          <Route exact path=\"/tab1\">\n            <Tab1 />\n          </Route>\n          <Route exact path=\"/tab2\">\n            <Tab2 />\n          </Route>\n          <Route path=\"/tab3\">\n            <Tab3 />\n          </Route>\n          <Route exact path=\"/\">\n            <Redirect to=\"/tab1\" />\n          </Route>\n        </IonRouterOutlet>\n        <IonTabBar slot=\"bottom\">\n          <IonTabButton tab=\"tab1\" href=\"/tab1\">\n            <IonIcon aria-hidden=\"true\" icon={triangle} />\n            <IonLabel>Tab 1</IonLabel>\n          </IonTabButton>\n          <IonTabButton tab=\"tab2\" href=\"/tab2\">\n            <IonIcon aria-hidden=\"true\" icon={ellipse} />\n            <IonLabel>Tab 2</IonLabel>\n          </IonTabButton>\n          <IonTabButton tab=\"tab3\" href=\"/tab3\">\n            <IonIcon aria-hidden=\"true\" icon={square} />\n            <IonLabel>Tab 3</IonLabel>\n          </IonTabButton>\n        </IonTabBar>\n      </IonTabs>\n    </IonReactRouter>\n  </IonApp>\n);\n\nexport default App;\n"
  },
  {
    "path": "react/official/tabs/src/components/ExploreContainer.css",
    "content": ".container {\n  text-align: center;\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n.container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n.container p {\n  font-size: 16px;\n  line-height: 22px;\n  color: #8c8c8c;\n  margin: 0;\n}\n\n.container a {\n  text-decoration: none;\n}"
  },
  {
    "path": "react/official/tabs/src/components/ExploreContainer.tsx",
    "content": "import React from 'react';\nimport './ExploreContainer.css';\n\ninterface ContainerProps {\n  name: string;\n}\n\nconst ExploreContainer: React.FC<ContainerProps> = ({ name }) => {\n  return (\n    <div className=\"container\">\n      <strong>{name}</strong>\n      <p>Explore <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n    </div>\n  );\n};\n\nexport default ExploreContainer;\n"
  },
  {
    "path": "react/official/tabs/src/pages/Tab1.css",
    "content": ""
  },
  {
    "path": "react/official/tabs/src/pages/Tab1.tsx",
    "content": "import React from 'react';\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react';\nimport ExploreContainer from '../components/ExploreContainer';\nimport './Tab1.css';\n\nconst Tab1: React.FC = () => {\n  return (\n    <IonPage>\n      <IonHeader>\n        <IonToolbar>\n          <IonTitle>Tab 1</IonTitle>\n        </IonToolbar>\n      </IonHeader>\n      <IonContent fullscreen>\n        <IonHeader collapse=\"condense\">\n          <IonToolbar>\n            <IonTitle size=\"large\">Tab 1</IonTitle>\n          </IonToolbar>\n        </IonHeader>\n        <ExploreContainer name=\"Tab 1 page\" />\n      </IonContent>\n    </IonPage>\n  );\n};\n\nexport default Tab1;\n"
  },
  {
    "path": "react/official/tabs/src/pages/Tab2.css",
    "content": ""
  },
  {
    "path": "react/official/tabs/src/pages/Tab2.tsx",
    "content": "import React from 'react';\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react';\nimport ExploreContainer from '../components/ExploreContainer';\nimport './Tab2.css';\n\nconst Tab2: React.FC = () => {\n  return (\n    <IonPage>\n      <IonHeader>\n        <IonToolbar>\n          <IonTitle>Tab 2</IonTitle>\n        </IonToolbar>\n      </IonHeader>\n      <IonContent fullscreen>\n        <IonHeader collapse=\"condense\">\n          <IonToolbar>\n            <IonTitle size=\"large\">Tab 2</IonTitle>\n          </IonToolbar>\n        </IonHeader>\n        <ExploreContainer name=\"Tab 2 page\" />\n      </IonContent>\n    </IonPage>\n  );\n};\n\nexport default Tab2;\n"
  },
  {
    "path": "react/official/tabs/src/pages/Tab3.css",
    "content": ""
  },
  {
    "path": "react/official/tabs/src/pages/Tab3.tsx",
    "content": "import React from 'react';\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react';\nimport ExploreContainer from '../components/ExploreContainer';\nimport './Tab3.css';\n\nconst Tab3: React.FC = () => {\n  return (\n    <IonPage>\n      <IonHeader>\n        <IonToolbar>\n          <IonTitle>Tab 3</IonTitle>\n        </IonToolbar>\n      </IonHeader>\n      <IonContent fullscreen>\n        <IonHeader collapse=\"condense\">\n          <IonToolbar>\n            <IonTitle size=\"large\">Tab 3</IonTitle>\n          </IonToolbar>\n        </IonHeader>\n        <ExploreContainer name=\"Tab 3 page\" />\n      </IonContent>\n    </IonPage>\n  );\n};\n\nexport default Tab3;\n"
  },
  {
    "path": "react-vite/base/.browserslistrc",
    "content": "Chrome >=79\nChromeAndroid >=79\nFirefox >=70\nEdge >=79\nSafari >=14\niOS >=14"
  },
  {
    "path": "react-vite/base/.gitignore",
    "content": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pnp\n.pnp.js\n\n# testing\n/coverage\n\n# production\n/dist\n\n# misc\n.DS_Store\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\n/.nx\n/.nx/cache\n/.vscode/*\n!/.vscode/extensions.json\n.idea\n\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Optional eslint cache\n.eslintcache\n"
  },
  {
    "path": "react-vite/base/.vscode/extensions.json",
    "content": "{\n    \"recommendations\": [\n        \"Webnative.webnative\"\n    ]\n}\n"
  },
  {
    "path": "react-vite/base/cypress/fixtures/example.json",
    "content": "{\n  \"name\": \"Using fixtures to represent data\",\n  \"email\": \"hello@cypress.io\",\n  \"body\": \"Fixtures are a great way to mock data for responses to routes\"\n}\n"
  },
  {
    "path": "react-vite/base/cypress/support/commands.ts",
    "content": "/// <reference types=\"cypress\" />\n// ***********************************************\n// This example commands.ts shows you how to\n// create various custom commands and overwrite\n// existing commands.\n//\n// For more comprehensive examples of custom\n// commands please read more here:\n// https://on.cypress.io/custom-commands\n// ***********************************************\n//\n//\n// -- This is a parent command --\n// Cypress.Commands.add('login', (email, password) => { ... })\n//\n//\n// -- This is a child command --\n// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })\n//\n//\n// -- This is a dual command --\n// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })\n//\n//\n// -- This will overwrite an existing command --\n// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })\n//\n// declare global {\n//   namespace Cypress {\n//     interface Chainable {\n//       login(email: string, password: string): Chainable<void>\n//       drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>\n//       dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>\n//       visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>\n//     }\n//   }\n// }"
  },
  {
    "path": "react-vite/base/cypress/support/e2e.ts",
    "content": "// ***********************************************************\n// This example support/e2e.ts is processed and\n// loaded automatically before your test files.\n//\n// This is a great place to put global configuration and\n// behavior that modifies Cypress.\n//\n// You can change the location of this file or turn off\n// automatically serving support files with the\n// 'supportFile' configuration option.\n//\n// You can read more here:\n// https://on.cypress.io/configuration\n// ***********************************************************\n\n// Import commands.js using ES2015 syntax:\nimport './commands'\n\n// Alternatively you can use CommonJS syntax:\n// require('./commands')"
  },
  {
    "path": "react-vite/base/cypress.config.ts",
    "content": "import { defineConfig } from \"cypress\";\n\nexport default defineConfig({\n  e2e: {\n    baseUrl: \"http://localhost:5173\",\n    setupNodeEvents(on, config) {\n      // implement node event listeners here\n    },\n  },\n});"
  },
  {
    "path": "react-vite/base/eslint.config.js",
    "content": "import js from '@eslint/js'\nimport globals from 'globals'\nimport reactHooks from 'eslint-plugin-react-hooks'\nimport reactRefresh from 'eslint-plugin-react-refresh'\nimport tseslint from 'typescript-eslint'\n\nexport default tseslint.config(\n  { ignores: ['dist', 'cypress.config.ts'] },\n  {\n    extends: [js.configs.recommended, ...tseslint.configs.recommended],\n    files: ['**/*.{ts,tsx}'],\n    languageOptions: {\n      ecmaVersion: 2020,\n      globals: globals.browser,\n    },\n    plugins: {\n      'react-hooks': reactHooks,\n      'react-refresh': reactRefresh,\n    },\n    rules: {\n      ...reactHooks.configs.recommended.rules,\n      'react-refresh/only-export-components': [\n        'warn',\n        { allowConstantExport: true },\n      ],\n      'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',\n      'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',\n    },\n  },\n)\n"
  },
  {
    "path": "react-vite/base/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Ionic App</title>\n    \n    <base href=\"/\" />\n    \n    <meta name=\"color-scheme\" content=\"light dark\" />\n    <meta\n      name=\"viewport\"\n      content=\"viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\"\n    />\n    <meta name=\"format-detection\" content=\"telephone=no\" />\n    <meta name=\"msapplication-tap-highlight\" content=\"no\" />\n    \n    <link rel=\"manifest\" href=\"/manifest.json\" />\n    \n    <link rel=\"shortcut icon\" type=\"image/png\" href=\"/favicon.png\" />\n    \n    <!-- add to homescreen for ios -->\n    <meta name=\"mobile-web-app-capable\" content=\"yes\" />\n    <meta name=\"apple-mobile-web-app-title\" content=\"Ionic App\" />\n    <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\" />\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "react-vite/base/ionic.config.json",
    "content": "{\n  \"name\": \"ionic-app-base\",\n  \"app_id\": \"\",\n  \"type\": \"react-vite\",\n  \"integrations\": {}\n}\n"
  },
  {
    "path": "react-vite/base/package.json",
    "content": "{\n  \"name\": \"ionic-app-base\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"tsc && vite build\",\n    \"preview\": \"vite preview\",\n    \"test.e2e\": \"cypress run\",\n    \"test.unit\": \"vitest\",\n    \"lint\": \"eslint\"\n  },\n  \"dependencies\": {\n    \"@ionic/react\": \"^8.5.0\",\n    \"@ionic/react-router\": \"^8.5.0\",\n    \"@types/react-router\": \"^5.1.20\",\n    \"@types/react-router-dom\": \"^5.3.3\",\n    \"ionicons\": \"^7.4.0\",\n    \"react\": \"19.0.0\",\n    \"react-dom\": \"19.0.0\",\n    \"react-router\": \"^5.3.4\",\n    \"react-router-dom\": \"^5.3.4\"\n  },\n  \"devDependencies\": {\n    \"@testing-library/dom\": \">=7.21.4\",\n    \"@testing-library/jest-dom\": \"^5.16.5\",\n    \"@testing-library/react\": \"^16.2.0\",\n    \"@testing-library/user-event\": \"^14.4.3\",\n    \"@types/react\": \"19.0.10\",\n    \"@types/react-dom\": \"19.0.4\",\n    \"@vitejs/plugin-legacy\": \"^5.0.0\",\n    \"@vitejs/plugin-react\": \"^4.0.1\",\n    \"cypress\": \"^13.5.0\",\n    \"eslint\": \"^9.20.1\",\n    \"eslint-plugin-react\": \"^7.32.2\",\n    \"eslint-plugin-react-hooks\": \"^5.1.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.19\",\n    \"globals\": \"^15.15.0\",\n    \"jsdom\": \"^22.1.0\",\n    \"terser\": \"^5.4.0\",\n    \"typescript\": \"~5.9.0\",\n    \"typescript-eslint\": \"^8.24.0\",\n    \"vite\": \"^5.0.0\",\n    \"vitest\": \"^0.34.6\"\n  }\n}\n"
  },
  {
    "path": "react-vite/base/public/manifest.json",
    "content": "{\n  \"short_name\": \"Ionic App\",\n  \"name\": \"My Ionic App\",\n  \"icons\": [\n    {\n      \"src\": \"assets/icon/favicon.png\",\n      \"sizes\": \"64x64 32x32 24x24 16x16\",\n      \"type\": \"image/x-icon\"\n    },\n    {\n      \"src\": \"assets/icon/icon.png\",\n      \"type\": \"image/png\",\n      \"sizes\": \"512x512\",\n      \"purpose\": \"maskable\"\n    }\n  ],\n  \"start_url\": \".\",\n  \"display\": \"standalone\",\n  \"theme_color\": \"#ffffff\",\n  \"background_color\": \"#ffffff\"\n}\n"
  },
  {
    "path": "react-vite/base/src/App.test.tsx",
    "content": "import React from 'react';\nimport { render } from '@testing-library/react';\nimport App from './App';\n\ntest('renders without crashing', () => {\n  const { baseElement } = render(<App />);\n  expect(baseElement).toBeDefined();\n});\n"
  },
  {
    "path": "react-vite/base/src/App.tsx",
    "content": "/* Core CSS required for Ionic components to work properly */\nimport '@ionic/react/css/core.css';\n\n/* Basic CSS for apps built with Ionic */\nimport '@ionic/react/css/normalize.css';\nimport '@ionic/react/css/structure.css';\nimport '@ionic/react/css/typography.css';\n\n/* Optional CSS utils that can be commented out */\nimport '@ionic/react/css/padding.css';\nimport '@ionic/react/css/float-elements.css';\nimport '@ionic/react/css/text-alignment.css';\nimport '@ionic/react/css/text-transformation.css';\nimport '@ionic/react/css/flex-utils.css';\nimport '@ionic/react/css/display.css';\n\n/**\n * Ionic Dark Mode\n * -----------------------------------------------------\n * For more info, please see:\n * https://ionicframework.com/docs/theming/dark-mode\n */\n\n/* import '@ionic/react/css/palettes/dark.always.css'; */\n/* import '@ionic/react/css/palettes/dark.class.css'; */\nimport '@ionic/react/css/palettes/dark.system.css';\n\n/* Theme variables */\nimport './theme/variables.css';\n\nconst App: React.FunctionComponent = () => {\n  return (\n    <div className=\"App\">\n      <header>\n      </header>\n    </div>\n  );\n}\n\nexport default App;\n"
  },
  {
    "path": "react-vite/base/src/main.tsx",
    "content": "import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport App from './App';\n\nconst container = document.getElementById('root');\nconst root = createRoot(container!);\nroot.render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>\n);"
  },
  {
    "path": "react-vite/base/src/setupTests.ts",
    "content": "// jest-dom adds custom jest matchers for asserting on DOM nodes.\n// allows you to do things like:\n// expect(element).toHaveTextContent(/react/i)\n// learn more: https://github.com/testing-library/jest-dom\nimport '@testing-library/jest-dom/extend-expect';\n\n// Mock matchmedia\nwindow.matchMedia = window.matchMedia || function() {\n  return {\n      matches: false,\n      addListener: function() {},\n      removeListener: function() {}\n  };\n};\n"
  },
  {
    "path": "react-vite/base/src/theme/variables.css",
    "content": "/* For information on how to create your own theme, please refer to:\nhttp://ionicframework.com/docs/theming/ */\n"
  },
  {
    "path": "react-vite/base/src/vite-env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "react-vite/base/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ESNext\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"DOM\", \"DOM.Iterable\", \"ESNext\"],\n    \"allowJs\": false,\n    \"skipLibCheck\": true,\n    \"esModuleInterop\": false,\n    \"allowSyntheticDefaultImports\": true,\n    \"strict\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Node\",\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\"\n  },\n  \"include\": [\"src\"],\n  \"references\": [{ \"path\": \"./tsconfig.node.json\" }]\n}\n"
  },
  {
    "path": "react-vite/base/tsconfig.node.json",
    "content": "{\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Node\",\n    \"allowSyntheticDefaultImports\": true\n  },\n  \"include\": [\"vite.config.ts\"]\n}\n"
  },
  {
    "path": "react-vite/base/vite.config.ts",
    "content": "/// <reference types=\"vitest\" />\n\nimport legacy from '@vitejs/plugin-legacy'\nimport react from '@vitejs/plugin-react'\nimport { defineConfig } from 'vite'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    react(),\n    legacy()\n  ],\n  test: {\n    globals: true,\n    environment: 'jsdom',\n    setupFiles: './src/setupTests.ts',\n  }\n})\n"
  },
  {
    "path": "react-vite/community/.gitkeep",
    "content": ""
  },
  {
    "path": "react-vite/official/blank/cypress/e2e/test.cy.ts",
    "content": "describe('My First Test', () => {\n  it('Visits the app root url', () => {\n    cy.visit('/')\n    cy.contains('#container', 'Ready to create an app?')\n  })\n})"
  },
  {
    "path": "react-vite/official/blank/ionic.starter.json",
    "content": "{\n  \"name\": \"Blank Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test.unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \\\"npm run dev\\\" \\\"npm run test.e2e\\\" --kill-others --success first\"\n  }\n}\n"
  },
  {
    "path": "react-vite/official/blank/src/App.tsx",
    "content": "import { Redirect, Route } from 'react-router-dom';\nimport { IonApp, IonRouterOutlet, setupIonicReact } from '@ionic/react';\nimport { IonReactRouter } from '@ionic/react-router';\nimport Home from './pages/Home';\n\n/* Core CSS required for Ionic components to work properly */\nimport '@ionic/react/css/core.css';\n\n/* Basic CSS for apps built with Ionic */\nimport '@ionic/react/css/normalize.css';\nimport '@ionic/react/css/structure.css';\nimport '@ionic/react/css/typography.css';\n\n/* Optional CSS utils that can be commented out */\nimport '@ionic/react/css/padding.css';\nimport '@ionic/react/css/float-elements.css';\nimport '@ionic/react/css/text-alignment.css';\nimport '@ionic/react/css/text-transformation.css';\nimport '@ionic/react/css/flex-utils.css';\nimport '@ionic/react/css/display.css';\n\n/**\n * Ionic Dark Mode\n * -----------------------------------------------------\n * For more info, please see:\n * https://ionicframework.com/docs/theming/dark-mode\n */\n\n/* import '@ionic/react/css/palettes/dark.always.css'; */\n/* import '@ionic/react/css/palettes/dark.class.css'; */\nimport '@ionic/react/css/palettes/dark.system.css';\n\n/* Theme variables */\nimport './theme/variables.css';\n\nsetupIonicReact();\n\nconst App: React.FC = () => (\n  <IonApp>\n    <IonReactRouter>\n      <IonRouterOutlet>\n        <Route exact path=\"/home\">\n          <Home />\n        </Route>\n        <Route exact path=\"/\">\n          <Redirect to=\"/home\" />\n        </Route>\n      </IonRouterOutlet>\n    </IonReactRouter>\n  </IonApp>\n);\n\nexport default App;\n"
  },
  {
    "path": "react-vite/official/blank/src/components/ExploreContainer.css",
    "content": "#container {\n  text-align: center;\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n  color: #8c8c8c;\n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}"
  },
  {
    "path": "react-vite/official/blank/src/components/ExploreContainer.tsx",
    "content": "import './ExploreContainer.css';\n\ninterface ContainerProps { }\n\nconst ExploreContainer: React.FC<ContainerProps> = () => {\n  return (\n    <div id=\"container\">\n      <strong>Ready to create an app?</strong>\n      <p>Start with Ionic <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n    </div>\n  );\n};\n\nexport default ExploreContainer;\n"
  },
  {
    "path": "react-vite/official/blank/src/pages/Home.css",
    "content": ""
  },
  {
    "path": "react-vite/official/blank/src/pages/Home.tsx",
    "content": "import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react';\nimport ExploreContainer from '../components/ExploreContainer';\nimport './Home.css';\n\nconst Home: React.FC = () => {\n  return (\n    <IonPage>\n      <IonHeader>\n        <IonToolbar>\n          <IonTitle>Blank</IonTitle>\n        </IonToolbar>\n      </IonHeader>\n      <IonContent fullscreen>\n        <IonHeader collapse=\"condense\">\n          <IonToolbar>\n            <IonTitle size=\"large\">Blank</IonTitle>\n          </IonToolbar>\n        </IonHeader>\n        <ExploreContainer />\n      </IonContent>\n    </IonPage>\n  );\n};\n\nexport default Home;\n"
  },
  {
    "path": "react-vite/official/list/cypress/e2e/test.cy.ts",
    "content": "describe('My First Test', () => {\n  it('Visits the app root url', () => {\n    cy.visit('/')\n    cy.contains('ion-header', 'Inbox')\n  })\n})"
  },
  {
    "path": "react-vite/official/list/ionic.starter.json",
    "content": "{\n  \"name\": \"List Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test.unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \\\"npm run dev\\\" \\\"npm run test.e2e\\\" --kill-others --success first\"\n  }\n}\n"
  },
  {
    "path": "react-vite/official/list/src/App.tsx",
    "content": "import { Redirect, Route } from 'react-router-dom';\nimport { IonApp, IonRouterOutlet, setupIonicReact } from '@ionic/react';\nimport { IonReactRouter } from '@ionic/react-router';\nimport Home from './pages/Home';\nimport ViewMessage from './pages/ViewMessage';\n\n/* Core CSS required for Ionic components to work properly */\nimport '@ionic/react/css/core.css';\n\n/* Basic CSS for apps built with Ionic */\nimport '@ionic/react/css/normalize.css';\nimport '@ionic/react/css/structure.css';\nimport '@ionic/react/css/typography.css';\n\n/* Optional CSS utils that can be commented out */\nimport '@ionic/react/css/padding.css';\nimport '@ionic/react/css/float-elements.css';\nimport '@ionic/react/css/text-alignment.css';\nimport '@ionic/react/css/text-transformation.css';\nimport '@ionic/react/css/flex-utils.css';\nimport '@ionic/react/css/display.css';\n\n/**\n * Ionic Dark Mode\n * -----------------------------------------------------\n * For more info, please see:\n * https://ionicframework.com/docs/theming/dark-mode\n */\n\n/* import '@ionic/react/css/palettes/dark.always.css'; */\n/* import '@ionic/react/css/palettes/dark.class.css'; */\nimport '@ionic/react/css/palettes/dark.system.css';\n\n/* Theme variables */\nimport './theme/variables.css';\n\nsetupIonicReact();\n\nconst App: React.FC = () => (\n  <IonApp>\n    <IonReactRouter>\n      <IonRouterOutlet>\n        <Route path=\"/\" exact={true}>\n          <Redirect to=\"/home\" />\n        </Route>\n        <Route path=\"/home\" exact={true}>\n          <Home />\n        </Route>\n        <Route path=\"/message/:id\">\n           <ViewMessage />\n        </Route>\n      </IonRouterOutlet>\n    </IonReactRouter>\n  </IonApp>\n);\n\nexport default App;\n"
  },
  {
    "path": "react-vite/official/list/src/components/MessageListItem.css",
    "content": "#message-list-item {\n  --padding-start: 0;\n  --inner-padding-end: 0;\n}\n\n#message-list-item ion-label {\n  margin-top: 12px;\n  margin-bottom: 12px;\n\n  overflow: hidden;\n}\n\n#message-list-item ion-label h2 {\n  font-weight: 600;\n  margin: 0;\n\n  /**\n   * With larger font scales\n   * the date/time should wrap to the next\n   * line. However, there should be\n   * space between the name and the date/time\n   * if they can appear on the same line.\n   */\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: space-between;\n}\n\n#message-list-item p {\n  white-space: nowrap;\n  width: 95%;\n}\n\n#message-list-item .date {\n  align-items: center;\n  display: flex;\n}\n\n#message-list-item ion-icon {\n  color: #c9c9ca;\n}\n\n#message-list-item ion-note {\n  font-size: 0.9375rem;\n  margin-right: 8px;\n  font-weight: normal;\n}\n\n#message-list-item ion-note.md {\n  margin-right: 14px;\n}\n\n#message-list-item .dot {\n  display: block;\n  height: 12px;\n  width: 12px;\n  border-radius: 50%;\n  align-self: start;\n  margin: 16px 10px 16px 16px;\n}\n\n#message-list-item .dot-unread {\n  background: var(--ion-color-primary);\n}\n"
  },
  {
    "path": "react-vite/official/list/src/components/MessageListItem.tsx",
    "content": "import {\n  IonItem,\n  IonLabel,\n  IonNote\n  } from '@ionic/react';\nimport { Message } from '../data/messages';\nimport './MessageListItem.css';\n\ninterface MessageListItemProps {\n  message: Message;\n}\n\nconst MessageListItem: React.FC<MessageListItemProps> = ({ message }) => {\n  return (\n    <IonItem id=\"message-list-item\" routerLink={`/message/${message.id}`} detail={false}>\n      <div slot=\"start\" className=\"dot dot-unread\"></div>\n      <IonLabel className=\"ion-text-wrap\">\n        <h2>\n          {message.fromName}\n          <span className=\"date\">\n            <IonNote>{message.date}</IonNote>\n          </span>\n        </h2>\n        <h3>{message.subject}</h3>\n        <p>\n          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n        </p>\n      </IonLabel>\n    </IonItem>\n  );\n};\n\nexport default MessageListItem;\n"
  },
  {
    "path": "react-vite/official/list/src/data/messages.ts",
    "content": "export interface Message {\n  fromName: string;\n  subject: string;\n  date: string;\n  id: number;\n}\n\nconst messages: Message[] = [\n  {\n    fromName: 'Matt Chorsey',\n    subject: 'New event: Trip to Vegas',\n    date: '9:32 AM',\n    id: 0\n  },\n  {\n    fromName: 'Lauren Ruthford',\n    subject: 'Long time no chat',\n    date: '6:12 AM',\n    id: 1\n  },\n  {\n    fromName: 'Jordan Firth',\n    subject: 'Report Results',\n    date: '4:55 AM',\n    id: 2\n\n  },\n  {\n    fromName: 'Bill Thomas',\n    subject: 'The situation',\n    date: 'Yesterday',\n    id: 3\n  },\n  {\n    fromName: 'Joanne Pollan',\n    subject: 'Updated invitation: Swim lessons',\n    date: 'Yesterday',\n    id: 4\n  },\n  {\n    fromName: 'Andrea Cornerston',\n    subject: 'Last minute ask',\n    date: 'Yesterday',\n    id: 5\n  },\n  {\n    fromName: 'Moe Chamont',\n    subject: 'Family Calendar - Version 1',\n    date: 'Last Week',\n    id: 6\n  },\n  {\n    fromName: 'Kelly Richardson',\n    subject: 'Placeholder Headhots',\n    date: 'Last Week',\n    id: 7\n  }\n];\n\nexport const getMessages = () => messages;\n\nexport const getMessage = (id: number) => messages.find(m => m.id === id);\n"
  },
  {
    "path": "react-vite/official/list/src/pages/Home.css",
    "content": ""
  },
  {
    "path": "react-vite/official/list/src/pages/Home.tsx",
    "content": "import MessageListItem from '../components/MessageListItem';\nimport { useState } from 'react';\nimport { Message, getMessages } from '../data/messages';\nimport {\n  IonContent,\n  IonHeader,\n  IonList,\n  IonPage,\n  IonRefresher,\n  IonRefresherContent,\n  IonTitle,\n  IonToolbar,\n  useIonViewWillEnter\n} from '@ionic/react';\nimport './Home.css';\n\nconst Home: React.FC = () => {\n\n  const [messages, setMessages] = useState<Message[]>([]);\n\n  useIonViewWillEnter(() => {\n    const msgs = getMessages();\n    setMessages(msgs);\n  });\n\n  const refresh = (e: CustomEvent) => {\n    setTimeout(() => {\n      e.detail.complete();\n    }, 3000);\n  };\n\n  return (\n    <IonPage id=\"home-page\">\n      <IonHeader>\n        <IonToolbar>\n          <IonTitle>Inbox</IonTitle>\n        </IonToolbar>\n      </IonHeader>\n      <IonContent fullscreen>\n        <IonRefresher slot=\"fixed\" onIonRefresh={refresh}>\n          <IonRefresherContent></IonRefresherContent>\n        </IonRefresher>\n\n        <IonHeader collapse=\"condense\">\n          <IonToolbar>\n            <IonTitle size=\"large\">\n              Inbox\n            </IonTitle>\n          </IonToolbar>\n        </IonHeader>\n\n        <IonList>\n          {messages.map(m => <MessageListItem key={m.id} message={m} />)}\n        </IonList>\n      </IonContent>\n    </IonPage>\n  );\n};\n\nexport default Home;\n"
  },
  {
    "path": "react-vite/official/list/src/pages/ViewMessage.css",
    "content": "#view-message-page ion-item {\n  --inner-padding-end: 0;\n  --background: transparent;\n}\n\n#view-message-page ion-label {\n  margin-top: 12px;\n  margin-bottom: 12px;\n}\n\n#view-message-page ion-item h2 {\n  font-weight: 600;\n  \n  /**\n   * With larger font scales\n   * the date/time should wrap to the next\n   * line. However, there should be\n   * space between the name and the date/time\n   * if they can appear on the same line.\n   */\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: space-between;\n}\n\n#view-message-page ion-item .date {\n  align-items: center;\n  display: flex;\n}\n\n#view-message-page ion-item ion-icon {\n  font-size: 42px;\n  margin-right: 8px;\n}\n\n#view-message-page ion-item ion-note {\n  font-size: 0.9375rem;\n  margin-right: 12px;\n  font-weight: normal;\n}\n\n#view-message-page h1 {\n  margin: 0;\n  font-weight: bold;\n  font-size: 1.4rem;\n}\n\n#view-message-page p {\n  line-height: 1.4;\n}"
  },
  {
    "path": "react-vite/official/list/src/pages/ViewMessage.tsx",
    "content": "import { useState } from 'react';\nimport { Message, getMessage } from '../data/messages';\nimport {\n  IonBackButton,\n  IonButtons,\n  IonContent,\n  IonHeader,\n  IonIcon,\n  IonItem,\n  IonLabel,\n  IonNote,\n  IonPage,\n  IonToolbar,\n  useIonViewWillEnter,\n} from '@ionic/react';\nimport { personCircle } from 'ionicons/icons';\nimport { useParams } from 'react-router';\nimport './ViewMessage.css';\n\nfunction ViewMessage() {\n  const [message, setMessage] = useState<Message>();\n  const params = useParams<{ id: string }>();\n\n  useIonViewWillEnter(() => {\n    const msg = getMessage(parseInt(params.id, 10));\n    setMessage(msg);\n  });\n\n  return (\n    <IonPage id=\"view-message-page\">\n      <IonHeader translucent>\n        <IonToolbar>\n          <IonButtons slot=\"start\">\n            <IonBackButton text=\"Inbox\" defaultHref=\"/home\"></IonBackButton>\n          </IonButtons>\n        </IonToolbar>\n      </IonHeader>\n\n      <IonContent fullscreen>\n        {message ? (\n          <>\n            <IonItem>\n              <IonIcon aria-hidden=\"true\" icon={personCircle} color=\"primary\"></IonIcon>\n              <IonLabel className=\"ion-text-wrap\">\n                <h2>\n                  {message.fromName}\n                  <span className=\"date\">\n                    <IonNote>{message.date}</IonNote>\n                  </span>\n                </h2>\n                <h3>\n                  To: <IonNote>Me</IonNote>\n                </h3>\n              </IonLabel>\n            </IonItem>\n\n            <div className=\"ion-padding\">\n              <h1>{message.subject}</h1>\n              <p>\n                Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do\n                eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut\n                enim ad minim veniam, quis nostrud exercitation ullamco laboris\n                nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor\n                in reprehenderit in voluptate velit esse cillum dolore eu fugiat\n                nulla pariatur. Excepteur sint occaecat cupidatat non proident,\n                sunt in culpa qui officia deserunt mollit anim id est laborum.\n              </p>\n            </div>\n          </>\n        ) : (\n          <div>Message not found</div>\n        )}\n      </IonContent>\n    </IonPage>\n  );\n}\n\nexport default ViewMessage;\n"
  },
  {
    "path": "react-vite/official/sidemenu/cypress/e2e/test.cy.ts",
    "content": "describe('My First Test', () => {\n  it('Visits the app root url', () => {\n    cy.visit('/folder/Inbox')\n    cy.contains('#container', 'Inbox')\n  })\n})\n"
  },
  {
    "path": "react-vite/official/sidemenu/ionic.starter.json",
    "content": "{\n  \"name\": \"Sidemenu Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test.unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \\\"npm run dev\\\" \\\"npm run test.e2e\\\" --kill-others --success first\"\n  }\n}\n"
  },
  {
    "path": "react-vite/official/sidemenu/src/App.tsx",
    "content": "import { IonApp, IonRouterOutlet, IonSplitPane, setupIonicReact } from '@ionic/react';\nimport { IonReactRouter } from '@ionic/react-router';\nimport { Redirect, Route } from 'react-router-dom';\nimport Menu from './components/Menu';\nimport Page from './pages/Page';\n\n/* Core CSS required for Ionic components to work properly */\nimport '@ionic/react/css/core.css';\n\n/* Basic CSS for apps built with Ionic */\nimport '@ionic/react/css/normalize.css';\nimport '@ionic/react/css/structure.css';\nimport '@ionic/react/css/typography.css';\n\n/* Optional CSS utils that can be commented out */\nimport '@ionic/react/css/padding.css';\nimport '@ionic/react/css/float-elements.css';\nimport '@ionic/react/css/text-alignment.css';\nimport '@ionic/react/css/text-transformation.css';\nimport '@ionic/react/css/flex-utils.css';\nimport '@ionic/react/css/display.css';\n\n/**\n * Ionic Dark Mode\n * -----------------------------------------------------\n * For more info, please see:\n * https://ionicframework.com/docs/theming/dark-mode\n */\n\n/* import '@ionic/react/css/palettes/dark.always.css'; */\n/* import '@ionic/react/css/palettes/dark.class.css'; */\nimport '@ionic/react/css/palettes/dark.system.css';\n\n/* Theme variables */\nimport './theme/variables.css';\n\nsetupIonicReact();\n\nconst App: React.FC = () => {\n  return (\n    <IonApp>\n      <IonReactRouter>\n        <IonSplitPane contentId=\"main\">\n          <Menu />\n          <IonRouterOutlet id=\"main\">\n            <Route path=\"/\" exact={true}>\n              <Redirect to=\"/folder/Inbox\" />\n            </Route>\n            <Route path=\"/folder/:name\" exact={true}>\n              <Page />\n            </Route>\n          </IonRouterOutlet>\n        </IonSplitPane>\n      </IonReactRouter>\n    </IonApp>\n  );\n};\n\nexport default App;\n"
  },
  {
    "path": "react-vite/official/sidemenu/src/components/ExploreContainer.css",
    "content": "#container {\n  text-align: center;\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n  color: #8c8c8c;\n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}"
  },
  {
    "path": "react-vite/official/sidemenu/src/components/ExploreContainer.tsx",
    "content": "import './ExploreContainer.css';\n\ninterface ContainerProps {\n  name: string;\n}\n\nconst ExploreContainer: React.FC<ContainerProps> = ({ name }) => {\n  return (\n    <div id=\"container\">\n      <strong>{name}</strong>\n      <p>Explore <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n    </div>\n  );\n};\n\nexport default ExploreContainer;\n"
  },
  {
    "path": "react-vite/official/sidemenu/src/components/Menu.css",
    "content": "ion-menu ion-content {\n  --background: var(--ion-item-background, var(--ion-background-color, #fff));\n}\n\nion-menu.md ion-content {\n  --padding-start: 8px;\n  --padding-end: 8px;\n  --padding-top: 20px;\n  --padding-bottom: 20px;\n}\n\nion-menu.md ion-list {\n  padding: 20px 0;\n}\n\nion-menu.md ion-note {\n  margin-bottom: 30px;\n}\n\nion-menu.md ion-list-header, ion-menu.md ion-note {\n  padding-left: 10px;\n}\n\nion-menu.md ion-list#inbox-list {\n  border-bottom: 1px solid var(--ion-background-color-step-150, #d7d8da);\n}\n\nion-menu.md ion-list#inbox-list ion-list-header {\n  font-size: 22px;\n  font-weight: 600;\n  min-height: 20px;\n}\n\nion-menu.md ion-list#labels-list ion-list-header {\n  font-size: 16px;\n  margin-bottom: 18px;\n  color: #757575;\n  min-height: 26px;\n}\n\nion-menu.md ion-item {\n  --padding-start: 10px;\n  --padding-end: 10px;\n  border-radius: 4px;\n}\n\nion-menu.md ion-item.selected {\n  --background: rgba(var(--ion-color-primary-rgb), 0.14);\n}\n\nion-menu.md ion-item.selected ion-icon {\n  color: var(--ion-color-primary);\n}\n\nion-menu.md ion-item ion-icon {\n  color: #616e7e;\n}\n\nion-menu.md ion-item ion-label {\n  font-weight: 500;\n}\n\nion-menu.ios ion-content {\n  --padding-bottom: 20px;\n}\n\nion-menu.ios ion-list {\n  padding: 20px 0 0 0;\n}\n\nion-menu.ios ion-note {\n  line-height: 24px;\n  margin-bottom: 20px;\n}\n\nion-menu.ios ion-item {\n  --padding-start: 16px;\n  --padding-end: 16px;\n  --min-height: 50px;\n}\n\nion-menu.ios ion-item ion-icon {\n  font-size: 24px;\n  color: #73849a;\n}\n\nion-menu.ios ion-item .selected ion-icon {\n  color: var(--ion-color-primary);\n}\n\nion-menu.ios ion-list#labels-list ion-list-header {\n  margin-bottom: 8px;\n}\n\nion-menu.ios ion-list-header,\nion-menu.ios ion-note {\n  padding-left: 16px;\n  padding-right: 16px;\n}\n\nion-menu.ios ion-note {\n  margin-bottom: 8px;\n}\n\nion-note {\n  display: inline-block;\n  font-size: 16px;\n  color: var(--ion-color-medium-shade);\n}\n\nion-item.selected {\n  --color: var(--ion-color-primary);\n} "
  },
  {
    "path": "react-vite/official/sidemenu/src/components/Menu.tsx",
    "content": "import {\n  IonContent,\n  IonIcon,\n  IonItem,\n  IonLabel,\n  IonList,\n  IonListHeader,\n  IonMenu,\n  IonMenuToggle,\n  IonNote,\n} from '@ionic/react';\n\nimport { useLocation } from 'react-router-dom';\nimport { archiveOutline, archiveSharp, bookmarkOutline, heartOutline, heartSharp, mailOutline, mailSharp, paperPlaneOutline, paperPlaneSharp, trashOutline, trashSharp, warningOutline, warningSharp } from 'ionicons/icons';\nimport './Menu.css';\n\ninterface AppPage {\n  url: string;\n  iosIcon: string;\n  mdIcon: string;\n  title: string;\n}\n\nconst appPages: AppPage[] = [\n  {\n    title: 'Inbox',\n    url: '/folder/Inbox',\n    iosIcon: mailOutline,\n    mdIcon: mailSharp\n  },\n  {\n    title: 'Outbox',\n    url: '/folder/Outbox',\n    iosIcon: paperPlaneOutline,\n    mdIcon: paperPlaneSharp\n  },\n  {\n    title: 'Favorites',\n    url: '/folder/Favorites',\n    iosIcon: heartOutline,\n    mdIcon: heartSharp\n  },\n  {\n    title: 'Archived',\n    url: '/folder/Archived',\n    iosIcon: archiveOutline,\n    mdIcon: archiveSharp\n  },\n  {\n    title: 'Trash',\n    url: '/folder/Trash',\n    iosIcon: trashOutline,\n    mdIcon: trashSharp\n  },\n  {\n    title: 'Spam',\n    url: '/folder/Spam',\n    iosIcon: warningOutline,\n    mdIcon: warningSharp\n  }\n];\n\nconst labels = ['Family', 'Friends', 'Notes', 'Work', 'Travel', 'Reminders'];\n\nconst Menu: React.FC = () => {\n  const location = useLocation();\n\n  return (\n    <IonMenu contentId=\"main\" type=\"overlay\">\n      <IonContent>\n        <IonList id=\"inbox-list\">\n          <IonListHeader>Inbox</IonListHeader>\n          <IonNote>hi@ionicframework.com</IonNote>\n          {appPages.map((appPage, index) => {\n            return (\n              <IonMenuToggle key={index} autoHide={false}>\n                <IonItem className={location.pathname === appPage.url ? 'selected' : ''} routerLink={appPage.url} routerDirection=\"none\" lines=\"none\" detail={false}>\n                  <IonIcon aria-hidden=\"true\" slot=\"start\" ios={appPage.iosIcon} md={appPage.mdIcon} />\n                  <IonLabel>{appPage.title}</IonLabel>\n                </IonItem>\n              </IonMenuToggle>\n            );\n          })}\n        </IonList>\n\n        <IonList id=\"labels-list\">\n          <IonListHeader>Labels</IonListHeader>\n          {labels.map((label, index) => (\n            <IonItem lines=\"none\" key={index}>\n              <IonIcon aria-hidden=\"true\" slot=\"start\" icon={bookmarkOutline} />\n              <IonLabel>{label}</IonLabel>\n            </IonItem>\n          ))}\n        </IonList>\n      </IonContent>\n    </IonMenu>\n  );\n};\n\nexport default Menu;\n"
  },
  {
    "path": "react-vite/official/sidemenu/src/pages/Page.css",
    "content": ""
  },
  {
    "path": "react-vite/official/sidemenu/src/pages/Page.tsx",
    "content": "import { IonButtons, IonContent, IonHeader, IonMenuButton, IonPage, IonTitle, IonToolbar } from '@ionic/react';\nimport { useParams } from 'react-router';\nimport ExploreContainer from '../components/ExploreContainer';\nimport './Page.css';\n\nconst Page: React.FC = () => {\n\n  const { name } = useParams<{ name: string; }>();\n\n  return (\n    <IonPage>\n      <IonHeader>\n        <IonToolbar>\n          <IonButtons slot=\"start\">\n            <IonMenuButton />\n          </IonButtons>\n          <IonTitle>{name}</IonTitle>\n        </IonToolbar>\n      </IonHeader>\n\n      <IonContent fullscreen>\n        <IonHeader collapse=\"condense\">\n          <IonToolbar>\n            <IonTitle size=\"large\">{name}</IonTitle>\n          </IonToolbar>\n        </IonHeader>\n        <ExploreContainer name={name} />\n      </IonContent>\n    </IonPage>\n  );\n};\n\nexport default Page;\n"
  },
  {
    "path": "react-vite/official/tabs/cypress/e2e/test.cy.ts",
    "content": "describe('My First Test', () => {\n  it('Visits the app root url', () => {\n    cy.visit('/')\n    cy.contains('ion-content', 'Tab 1 page')\n  })\n})"
  },
  {
    "path": "react-vite/official/tabs/ionic.starter.json",
    "content": "{\n  \"name\": \"Tabs Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test.unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \\\"npm run dev\\\" \\\"npm run test.e2e\\\" --kill-others --success first\"\n  }\n}\n"
  },
  {
    "path": "react-vite/official/tabs/src/App.tsx",
    "content": "import { Redirect, Route } from 'react-router-dom';\nimport {\n  IonApp,\n  IonIcon,\n  IonLabel,\n  IonRouterOutlet,\n  IonTabBar,\n  IonTabButton,\n  IonTabs,\n  setupIonicReact\n} from '@ionic/react';\nimport { IonReactRouter } from '@ionic/react-router';\nimport { ellipse, square, triangle } from 'ionicons/icons';\nimport Tab1 from './pages/Tab1';\nimport Tab2 from './pages/Tab2';\nimport Tab3 from './pages/Tab3';\n\n/* Core CSS required for Ionic components to work properly */\nimport '@ionic/react/css/core.css';\n\n/* Basic CSS for apps built with Ionic */\nimport '@ionic/react/css/normalize.css';\nimport '@ionic/react/css/structure.css';\nimport '@ionic/react/css/typography.css';\n\n/* Optional CSS utils that can be commented out */\nimport '@ionic/react/css/padding.css';\nimport '@ionic/react/css/float-elements.css';\nimport '@ionic/react/css/text-alignment.css';\nimport '@ionic/react/css/text-transformation.css';\nimport '@ionic/react/css/flex-utils.css';\nimport '@ionic/react/css/display.css';\n\n/**\n * Ionic Dark Mode\n * -----------------------------------------------------\n * For more info, please see:\n * https://ionicframework.com/docs/theming/dark-mode\n */\n\n/* import '@ionic/react/css/palettes/dark.always.css'; */\n/* import '@ionic/react/css/palettes/dark.class.css'; */\nimport '@ionic/react/css/palettes/dark.system.css';\n\n/* Theme variables */\nimport './theme/variables.css';\n\nsetupIonicReact();\n\nconst App: React.FC = () => (\n  <IonApp>\n    <IonReactRouter>\n      <IonTabs>\n        <IonRouterOutlet>\n          <Route exact path=\"/tab1\">\n            <Tab1 />\n          </Route>\n          <Route exact path=\"/tab2\">\n            <Tab2 />\n          </Route>\n          <Route path=\"/tab3\">\n            <Tab3 />\n          </Route>\n          <Route exact path=\"/\">\n            <Redirect to=\"/tab1\" />\n          </Route>\n        </IonRouterOutlet>\n        <IonTabBar slot=\"bottom\">\n          <IonTabButton tab=\"tab1\" href=\"/tab1\">\n            <IonIcon aria-hidden=\"true\" icon={triangle} />\n            <IonLabel>Tab 1</IonLabel>\n          </IonTabButton>\n          <IonTabButton tab=\"tab2\" href=\"/tab2\">\n            <IonIcon aria-hidden=\"true\" icon={ellipse} />\n            <IonLabel>Tab 2</IonLabel>\n          </IonTabButton>\n          <IonTabButton tab=\"tab3\" href=\"/tab3\">\n            <IonIcon aria-hidden=\"true\" icon={square} />\n            <IonLabel>Tab 3</IonLabel>\n          </IonTabButton>\n        </IonTabBar>\n      </IonTabs>\n    </IonReactRouter>\n  </IonApp>\n);\n\nexport default App;\n"
  },
  {
    "path": "react-vite/official/tabs/src/components/ExploreContainer.css",
    "content": ".container {\n  text-align: center;\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n.container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n.container p {\n  font-size: 16px;\n  line-height: 22px;\n  color: #8c8c8c;\n  margin: 0;\n}\n\n.container a {\n  text-decoration: none;\n}"
  },
  {
    "path": "react-vite/official/tabs/src/components/ExploreContainer.tsx",
    "content": "import './ExploreContainer.css';\n\ninterface ContainerProps {\n  name: string;\n}\n\nconst ExploreContainer: React.FC<ContainerProps> = ({ name }) => {\n  return (\n    <div className=\"container\">\n      <strong>{name}</strong>\n      <p>Explore <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n    </div>\n  );\n};\n\nexport default ExploreContainer;\n"
  },
  {
    "path": "react-vite/official/tabs/src/pages/Tab1.css",
    "content": ""
  },
  {
    "path": "react-vite/official/tabs/src/pages/Tab1.tsx",
    "content": "import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react';\nimport ExploreContainer from '../components/ExploreContainer';\nimport './Tab1.css';\n\nconst Tab1: React.FC = () => {\n  return (\n    <IonPage>\n      <IonHeader>\n        <IonToolbar>\n          <IonTitle>Tab 1</IonTitle>\n        </IonToolbar>\n      </IonHeader>\n      <IonContent fullscreen>\n        <IonHeader collapse=\"condense\">\n          <IonToolbar>\n            <IonTitle size=\"large\">Tab 1</IonTitle>\n          </IonToolbar>\n        </IonHeader>\n        <ExploreContainer name=\"Tab 1 page\" />\n      </IonContent>\n    </IonPage>\n  );\n};\n\nexport default Tab1;\n"
  },
  {
    "path": "react-vite/official/tabs/src/pages/Tab2.css",
    "content": ""
  },
  {
    "path": "react-vite/official/tabs/src/pages/Tab2.tsx",
    "content": "import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react';\nimport ExploreContainer from '../components/ExploreContainer';\nimport './Tab2.css';\n\nconst Tab2: React.FC = () => {\n  return (\n    <IonPage>\n      <IonHeader>\n        <IonToolbar>\n          <IonTitle>Tab 2</IonTitle>\n        </IonToolbar>\n      </IonHeader>\n      <IonContent fullscreen>\n        <IonHeader collapse=\"condense\">\n          <IonToolbar>\n            <IonTitle size=\"large\">Tab 2</IonTitle>\n          </IonToolbar>\n        </IonHeader>\n        <ExploreContainer name=\"Tab 2 page\" />\n      </IonContent>\n    </IonPage>\n  );\n};\n\nexport default Tab2;\n"
  },
  {
    "path": "react-vite/official/tabs/src/pages/Tab3.css",
    "content": ""
  },
  {
    "path": "react-vite/official/tabs/src/pages/Tab3.tsx",
    "content": "import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react';\nimport ExploreContainer from '../components/ExploreContainer';\nimport './Tab3.css';\n\nconst Tab3: React.FC = () => {\n  return (\n    <IonPage>\n      <IonHeader>\n        <IonToolbar>\n          <IonTitle>Tab 3</IonTitle>\n        </IonToolbar>\n      </IonHeader>\n      <IonContent fullscreen>\n        <IonHeader collapse=\"condense\">\n          <IonToolbar>\n            <IonTitle size=\"large\">Tab 3</IonTitle>\n          </IonToolbar>\n        </IonHeader>\n        <ExploreContainer name=\"Tab 3 page\" />\n      </IonContent>\n    </IonPage>\n  );\n};\n\nexport default Tab3;\n"
  },
  {
    "path": "src/commands/build.ts",
    "content": "import * as path from 'path';\n\nimport { bold, cyan, dim, green, red } from 'colorette';\n\nimport { Command, CommandLineInputs, CommandLineOptions, CommandMetadata } from '@ionic/cli-framework';\nimport { remove } from '@ionic/utils-fs';\n\nimport { getCommandHeader, runcmd } from '../utils';\nimport {\n  BUILD_DIRECTORY,\n  REPO_DIRECTORY,\n  buildStarter,\n  buildStarters,\n  gatherChangedBaseFiles,\n  getStarterInfoFromPath,\n} from '../lib/build';\n\nexport class BuildCommand extends Command {\n  async getMetadata(): Promise<CommandMetadata> {\n    return {\n      name: 'build',\n      summary: 'Builds all the starters',\n      inputs: [\n        {\n          name: 'starter',\n          summary: 'Path to single starter to build',\n        },\n      ],\n      options: [\n        {\n          name: 'current',\n          summary: 'Use base files as-is, do not checkout base files using baseref',\n          type: Boolean,\n        },\n        {\n          name: 'wipe',\n          summary: 'Do not wipe build directory',\n          type: Boolean,\n          default: true,\n        },\n      ],\n    };\n  }\n\n  async run(inputs: CommandLineInputs, options: CommandLineOptions) {\n    const [starter] = inputs;\n    const current = options['current'] ? true : false;\n    const wipe = options['wipe'] ? true : false;\n\n    const gitVersion = (await runcmd('git', ['--version'])).trim();\n\n    console.log(getCommandHeader('BUILD'));\n    console.log(`\\n${gitVersion}\\n`);\n\n    if (wipe) {\n      console.log(`Wiping ${bold(`${BUILD_DIRECTORY}/*`)}`);\n      await remove(`${BUILD_DIRECTORY}/*`);\n    }\n\n    const changedBaseFiles = await gatherChangedBaseFiles();\n\n    if (!current && changedBaseFiles.length > 0) {\n      console.error(\n        red(\n          `Changes detected in ${changedBaseFiles.map((p) => bold(p)).join(', ')}.\\n` +\n            `You must either commit/reset these changes OR explicitly use the ${green(\n              '--current'\n            )} flag, which ignores starter baserefs.`\n        )\n      );\n\n      process.exit(1);\n    }\n\n    if (starter) {\n      const starterDir = path.resolve(starter);\n\n      if (!starterDir.startsWith(REPO_DIRECTORY)) {\n        throw new Error(red('Starter not in this repo.'));\n      }\n\n      const [ionicType, starterType] = getStarterInfoFromPath(starterDir);\n      await buildStarter(ionicType, starterType, starterDir);\n    } else {\n      const currentSha1 = (await runcmd('git', ['rev-parse', 'HEAD'])).trim();\n      const starterList = await buildStarters({ current, sha1: currentSha1 });\n      const mismatchedStarters = starterList.starters.filter((s) => s.sha1 !== currentSha1);\n\n      if (mismatchedStarters.length > 0) {\n        const currentRef = (await runcmd('git', ['log', '-1', '--format=\"%D\"', currentSha1])).trim();\n\n        console.log(\n          `The following starters were built from a ref other than ${bold(currentRef ? currentRef : currentSha1)}:\\n` +\n            ` - ${mismatchedStarters.map((s) => `${cyan(s.id)} ${dim(`(${s.ref})`)}`).join('\\n - ')}\\n` +\n            `If this isn't what you want, consider running with the ${green(\n              '--current'\n            )} flag, which ignores starter baserefs.`\n        );\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/commands/deploy.ts",
    "content": "import * as fs from 'fs';\nimport * as path from 'path';\n\nimport * as lodash from 'lodash';\nimport * as tar from 'tar';\nimport * as minimatch from 'minimatch';\nimport * as S3 from 'aws-sdk/clients/s3';\nimport * as CloudFront from 'aws-sdk/clients/cloudfront';\n\nimport { Command, CommandLineInputs, CommandLineOptions, CommandMetadata } from '@ionic/cli-framework';\n\nimport { getCommandHeader, getDirectories, log, readStarterManifest } from '../utils';\nimport { BUILD_DIRECTORY, STARTERS_LIST_PATH } from '../lib/build';\n\nimport { bold, green } from 'colorette';\n\nconst s3 = new S3({ apiVersion: '2006-03-01' });\nconst cloudfront = new CloudFront({ apiVersion: '2017-03-25' });\n\nconst keys: string[] = [];\n\nexport class DeployCommand extends Command {\n  async getMetadata(): Promise<CommandMetadata> {\n    return {\n      name: 'deploy',\n      summary: 'Deploys the built starter templates to the CDN',\n      options: [\n        {\n          name: 'tag',\n          summary: `Deploy to a tag, such as 'next' ('latest' is production)`,\n          default: 'testing',\n        },\n        {\n          name: 'dry',\n          summary: 'Perform a dry run and do not upload anything',\n          type: Boolean,\n        },\n      ],\n    };\n  }\n\n  async run(inputs: CommandLineInputs, options: CommandLineOptions) {\n    const tag = options['tag'] ? String(options['tag']) : 'testing';\n    const dry = options['dry'] ? true : false;\n\n    console.log(getCommandHeader('DEPLOY'));\n\n    console.log(`tag: ${bold(tag)}`);\n\n    const contents = await getDirectories(BUILD_DIRECTORY);\n\n    await Promise.all(\n      contents.map(async (dir) => {\n        const id = path.basename(dir);\n        const templateFileName = `${id}.tar.gz`;\n        const templateKey = `${tag === 'latest' ? '' : `${tag}/`}${templateFileName}`;\n        const manifest = await readStarterManifest(dir);\n        const tarignore = manifest && manifest.tarignore ? manifest.tarignore : undefined;\n\n        const archive = tar.create(\n          {\n            gzip: true,\n            cwd: dir,\n            portable: true,\n            filter: (p, _stat) => {\n              const filePath = path.relative(dir, path.resolve(dir, p));\n\n              if (!tarignore) {\n                return true;\n              }\n\n              return !lodash.some(tarignore.map((rule) => minimatch(filePath, rule)));\n            },\n          },\n          ['.']\n        );\n\n        const archivePath = path.resolve(BUILD_DIRECTORY, templateFileName);\n        await writeStarter(archive, archivePath);\n\n        if (dry) {\n          log(id, green(`${bold('--dry')}: upload to ${bold(templateKey)}`));\n        } else {\n          log(id, `Archiving and uploading`);\n\n          // s3 needs a content length, and it's safe to know content length from a file\n          await upload(fs.createReadStream(archivePath), templateKey);\n          keys.push(templateKey);\n\n          log(id, green(`Uploaded to ${bold(templateKey)}`));\n        }\n      })\n    );\n\n    const startersJsonKey = `${tag === 'latest' ? '' : `${tag}/`}starters.json`;\n\n    if (dry) {\n      console.log(bold('starters.json'), green(`${bold('--dry')}: upload to ${bold(startersJsonKey)}`));\n    } else {\n      await upload(fs.createReadStream(STARTERS_LIST_PATH), startersJsonKey, { ContentType: 'application/json' });\n      keys.push(startersJsonKey);\n\n      console.log(bold('starters.json'), green(`Uploaded to ${bold(startersJsonKey)}`));\n\n      console.log(`Invalidating cache for keys:\\n${keys.map((k) => `    - ${bold(k)}`).join('\\n')}`);\n\n      const result = await cloudfront\n        .createInvalidation({\n          DistributionId: 'E1XZ2T0DZXJ521',\n          InvalidationBatch: {\n            CallerReference: String(new Date().getTime()),\n            Paths: {\n              Quantity: keys.length,\n              Items: keys.map((k) => `/${k}`),\n            },\n          },\n        })\n        .promise();\n\n      if (!result.Invalidation) {\n        throw new Error('No result from invalidation batch.');\n      }\n\n      console.log(`Invalidation ID: ${bold(result.Invalidation.Id)}`);\n    }\n  }\n}\n\nasync function writeStarter(rs: NodeJS.ReadableStream, dest: string) {\n  return new Promise<void>((resolve, reject) => {\n    const ws = fs\n      .createWriteStream(dest)\n      .on('finish', () => resolve())\n      .on('error', (err) => reject(err));\n\n    rs.pipe(ws);\n  });\n}\n\nasync function upload(rs: NodeJS.ReadableStream, key: string, params?: Partial<S3.PutObjectRequest>) {\n  await s3\n    .upload({\n      Bucket: 'ionic-starters',\n      Key: key,\n      Body: rs,\n      ...params,\n    })\n    .promise();\n}\n"
  },
  {
    "path": "src/commands/find-redundant.ts",
    "content": "import * as path from 'path';\n\nimport { bold, gray, red } from 'colorette';\nimport { Command, CommandLineInputs, CommandLineOptions, CommandMetadata } from '@ionic/cli-framework';\nimport { getFileChecksum, readdirp, stat } from '@ionic/utils-fs';\n\nimport {\n  IONIC_TYPE_DIRECTORIES,\n  REPO_DIRECTORY,\n  buildStarterId,\n  getStarterDirectories,\n  getStarterInfoFromPath,\n} from '../lib/build';\nimport { log } from '../utils';\n\nexport class FindRedundantCommand extends Command {\n  async getMetadata(): Promise<CommandMetadata> {\n    return {\n      name: 'find-redundant',\n      summary: 'Find redundant files in starters that exist as base files',\n      options: [\n        {\n          name: 'community',\n          summary: 'Include community starters',\n          type: Boolean,\n        },\n      ],\n    };\n  }\n\n  async run(inputs: CommandLineInputs, options: CommandLineOptions) {\n    const community = options['community'] ? true : false;\n\n    const redundantFiles: string[] = [];\n\n    for (const ionicType of IONIC_TYPE_DIRECTORIES) {\n      const baseDir = path.resolve(REPO_DIRECTORY, ionicType, 'base');\n      const starterDirs = await getStarterDirectories(ionicType, { community });\n\n      for (const starterDir of starterDirs) {\n        const [, starterType] = getStarterInfoFromPath(starterDir);\n        const id = buildStarterId(ionicType, starterType, starterDir);\n\n        const contents = (await readdirp(starterDir)).map((p) => p.substring(starterDir.length + 1));\n\n        for (const file of contents) {\n          const filePath = path.resolve(starterDir, file);\n          const baseFilePath = path.resolve(baseDir, file);\n\n          try {\n            const [fileStat, baseFileStat] = await Promise.all([stat(filePath), stat(baseFilePath)]);\n\n            if (!fileStat.isDirectory() && !baseFileStat.isDirectory()) {\n              const [fileChecksum, baseFileChecksum] = await Promise.all([\n                getFileChecksum(filePath),\n                getFileChecksum(baseFilePath),\n              ]);\n\n              if (fileChecksum === baseFileChecksum) {\n                log(id, red(`${bold(file)}: same file in base files`));\n                redundantFiles.push(filePath);\n              } else {\n                log(id, gray(`${bold(file)}: found in base files, but checksum differs`));\n              }\n            }\n          } catch (e) {\n            // ignore\n          }\n        }\n      }\n    }\n\n    if (redundantFiles.length > 0) {\n      console.log(\n        `The following files were identified as redundant and should be deleted:\\n` +\n          ` - ${redundantFiles.map((f) => bold(f.substring(REPO_DIRECTORY.length + 1))).join('\\n - ')}\\n`\n      );\n      process.exit(1);\n    } else {\n      console.log('No redundant files found!');\n    }\n  }\n}\n"
  },
  {
    "path": "src/commands/generate-checksum.ts",
    "content": "import * as path from 'path';\nimport { createHash } from 'crypto';\n\nimport { bold, red } from 'colorette';\n\nimport { Command, CommandLineInputs, CommandLineOptions, CommandMetadata } from '@ionic/cli-framework';\nimport { readFile, writeFile } from '@ionic/utils-fs';\n\nimport { IONIC_MANIFEST_FILE, getCommandHeader, getDirectories, log } from '../utils';\nimport { BUILD_DIRECTORY, IONIC_TYPE_DIRECTORIES, REPO_DIRECTORY } from '../lib/build';\n\nexport class GenerateChecksumCommand extends Command {\n  async getMetadata(): Promise<CommandMetadata> {\n    return {\n      name: 'generate-checksum',\n      summary: 'Generate checksum files for each starter type using package.json and manifest files',\n    };\n  }\n\n  async run(inputs: CommandLineInputs, options: CommandLineOptions) {\n    console.log(getCommandHeader('GENERATE CHECKSUM'));\n\n    const contents = await getDirectories(BUILD_DIRECTORY);\n\n    for (const type of IONIC_TYPE_DIRECTORIES) {\n      const hash = createHash('sha256');\n      const builtStarters = contents.filter((d) => path.basename(d).startsWith(type));\n      const checksumFile = `starter-checksum-${type}.sha256`;\n\n      for (const dir of builtStarters) {\n        const id = path.basename(dir);\n\n        try {\n          const pkg = await readFile(path.resolve(dir, 'package.json'), { encoding: 'utf8' });\n          const manifest = await readFile(path.resolve(dir, IONIC_MANIFEST_FILE), { encoding: 'utf8' });\n\n          log(id, `Appending to checksum file: ${bold(checksumFile)}`);\n\n          hash.update(id);\n          hash.update(pkg.trim());\n          hash.update(manifest.trim());\n        } catch (e: any) {\n          log(id, red(`Error during checksum collection: ${e.stack ? e.stack : e}`));\n        }\n      }\n\n      await writeFile(path.resolve(REPO_DIRECTORY, checksumFile), hash.digest('hex'), { encoding: 'utf8' });\n    }\n  }\n}\n"
  },
  {
    "path": "src/commands/test.ts",
    "content": "import * as path from 'path';\n\nimport { cyan, green, red } from 'colorette';\n\nimport { Command, CommandLineInputs, CommandLineOptions, CommandMetadata } from '@ionic/cli-framework';\n\nimport { getCommandHeader, getDirectories, log, readStarterManifest, runcmd } from '../utils';\nimport { BUILD_DIRECTORY } from '../lib/build';\n\nexport class TestCommand extends Command {\n  async getMetadata(): Promise<CommandMetadata> {\n    return {\n      name: 'test',\n      summary: 'Test the built starters',\n      inputs: [\n        {\n          name: 'starter',\n          summary: 'ID of built starter to test',\n        },\n      ],\n      options: [\n        {\n          name: 'type',\n          summary: 'Only test starters of this type',\n        },\n      ],\n    };\n  }\n\n  async run(inputs: CommandLineInputs, options: CommandLineOptions) {\n    const [starter] = inputs;\n    const type = options['type'] ? String(options['type']) : undefined;\n\n    console.log(getCommandHeader('TEST'));\n\n    const contents = starter ? [path.resolve(BUILD_DIRECTORY, starter)] : await getDirectories(BUILD_DIRECTORY);\n    const failedTests: string[] = [];\n    const builtStarters = type ? contents.filter((d) => path.basename(d).startsWith(type)) : contents;\n\n    if (builtStarters.length === 0) {\n      console.error('No starters found.');\n      process.exitCode = 1;\n      return;\n    }\n\n    for (const dir of builtStarters) {\n      const id = path.basename(dir);\n\n      try {\n        const manifest = await readStarterManifest(dir);\n\n        if (manifest && manifest.scripts && manifest.scripts.test) {\n          log(id, 'Installing dependencies...');\n          await runcmd('npm', ['install'], { cwd: dir, stdio: 'inherit' });\n          log(id, `> ${green(manifest.scripts.test)}`);\n          await runcmd(manifest.scripts.test, [], { cwd: dir, stdio: 'inherit', shell: true });\n        } else {\n          log(id, 'No tests defined in manifest!');\n        }\n      } catch (e) {\n        log(id, red('Test script failed!'));\n        failedTests.push(id);\n      }\n    }\n\n    if (failedTests.length > 0) {\n      console.error('\\n' + red('Starter tests failed: ') + failedTests.map((s) => cyan(s)).join(', '));\n      process.exitCode = 1;\n    }\n  }\n}\n"
  },
  {
    "path": "src/definitions.ts",
    "content": "import { PackageJson } from '@ionic/cli-framework';\n\nexport interface StarterList {\n  starters: {\n    name: string;\n    id: string;\n    type: string;\n    ref: string;\n    sha1: string;\n  }[];\n  integrations: {\n    name: string;\n    id: string;\n  }[];\n}\n\nexport interface StarterManifest {\n  name: string;\n  baseref: string;\n  tarignore?: string[];\n  scripts?: {\n    test?: string;\n  };\n  welcome?: string;\n  packageJson?: PackageJson;\n  tsconfigJson?: TsconfigJson;\n  gitignore?: string[];\n}\n\nexport type TsconfigJson = TsconfigBase & (TsconfgFiles | TsconfigExclude | TsconfigInclude);\n\nexport interface TsconfigBase {\n  compilerOptions?: {\n    charset?: string;\n    declaration?: boolean;\n    declarationDir?: string;\n    diagnostics?: boolean;\n    emitBOM?: boolean;\n    inlineSourceMap?: boolean;\n    inlineSources?: boolean;\n    jsx?: 'preserve' | 'react' | 'react-native';\n    reactNamespace?: string;\n    listFiles?: boolean;\n    mapRoot?: string;\n    module?: 'commonjs' | 'amd' | 'umd' | 'system' | 'es6' | 'es2015' | 'esnext' | 'none';\n    newLine?: 'CRLF' | 'LF';\n    noEmit?: boolean;\n    noEmitHelpers?: boolean;\n    noEmitOnError?: boolean;\n    noImplicitAny?: boolean;\n    noImplicitThis?: boolean;\n    noUnusedLocals?: boolean;\n    noUnusedParameters?: boolean;\n    noLib?: boolean;\n    noResolve?: boolean;\n    noStrictGenericChecks?: boolean;\n    skipDefaultLibCheck?: boolean;\n    skipLibCheck?: boolean;\n    outFile?: string;\n    outDir?: string;\n    preserveConstEnums?: boolean;\n    preserveSymlinks?: boolean;\n    pretty?: boolean;\n    removeComments?: boolean;\n    rootDir?: string;\n    isolatedModules?: boolean;\n    sourceMap?: boolean;\n    sourceRoot?: string;\n    suppressExcessPropertyErrors?: boolean;\n    suppressImplicitAnyIndexErrors?: boolean;\n    stripInternal?: boolean;\n    target?: 'es3' | 'es5' | 'es2015' | 'es2016' | 'es2017' | 'esnext';\n    watch?: boolean;\n    experimentalDecorators?: boolean;\n    emitDecoratorMetadata?: boolean;\n    moduleResolution?: 'classic' | 'node';\n    allowUnusedLabels?: boolean;\n    noImplicitReturns?: boolean;\n    noFallthroughCasesInSwitch?: boolean;\n    allowUnreachableCode?: boolean;\n    forceConsistentCasingInFileNames?: boolean;\n    baseUrl?: string;\n    paths?: {\n      [k: string]: any;\n    };\n    plugins?: {\n      name?: string;\n      [k: string]: any;\n    }[];\n    rootDirs?: string[];\n    typeRoots?: string[];\n    types?: string[];\n    traceResolution?: boolean;\n    allowJs?: boolean;\n    allowSyntheticDefaultImports?: boolean;\n    noImplicitUseStrict?: boolean;\n    listEmittedFiles?: boolean;\n    lib?: (\n      | 'es5'\n      | 'es6'\n      | 'es2015'\n      | 'es7'\n      | 'es2016'\n      | 'es2017'\n      | 'esnext'\n      | 'dom'\n      | 'dom.iterable'\n      | 'webworker'\n      | 'scripthost'\n      | 'es2015.core'\n      | 'es2015.collection'\n      | 'es2015.generator'\n      | 'es2015.iterable'\n      | 'es2015.promise'\n      | 'es2015.proxy'\n      | 'es2015.reflect'\n      | 'es2015.symbol'\n      | 'es2015.symbol.wellknown'\n      | 'es2016.array.include'\n      | 'es2017.object'\n      | 'es2017.sharedmemory'\n      | 'esnext.asynciterable'\n    )[];\n    strictNullChecks?: boolean;\n    maxNodeModuleJsDepth?: number;\n    importHelpers?: boolean;\n    jsxFactory?: string;\n    alwaysStrict?: boolean;\n    strict?: boolean;\n    downlevelIteration?: boolean;\n    checkJs?: boolean;\n    strictFunctionTypes?: boolean;\n  };\n  compileOnSave?: boolean;\n  typeAcquisition?: {\n    enable?: boolean;\n    include?: string[];\n    exclude?: string[];\n  };\n  extends?: string;\n}\n\nexport interface TsconfgFiles {\n  files?: string[];\n}\nexport interface TsconfigExclude {\n  exclude?: string[];\n}\nexport interface TsconfigInclude {\n  include?: string[];\n}\n"
  },
  {
    "path": "src/index.ts",
    "content": "import { CommandMap, Namespace, execute } from '@ionic/cli-framework';\n\nimport { BuildCommand } from './commands/build';\nimport { DeployCommand } from './commands/deploy';\nimport { FindRedundantCommand } from './commands/find-redundant';\nimport { GenerateChecksumCommand } from './commands/generate-checksum';\nimport { TestCommand } from './commands/test';\n\nclass StartersNamespace extends Namespace {\n  async getMetadata() {\n    return {\n      name: 'ionic-starters',\n      summary: '',\n    };\n  }\n\n  async getCommands(): Promise<CommandMap> {\n    return new CommandMap([\n      ['build', async () => new BuildCommand(this)],\n      ['deploy', async () => new DeployCommand(this)],\n      ['find-redundant', async () => new FindRedundantCommand(this)],\n      ['generate-checksum', async () => new GenerateChecksumCommand(this)],\n      ['test', async () => new TestCommand(this)],\n    ]);\n  }\n}\n\nconst namespace = new StartersNamespace();\n\nexport async function run(argv: string[], env: { [k: string]: string }) {\n  await execute({ namespace, argv, env });\n}\n"
  },
  {
    "path": "src/lib/build.ts",
    "content": "import * as path from 'path';\n\nimport { bold, cyan, green, red } from 'colorette';\nimport * as _ from 'lodash';\n\nimport { copy, remove, writeFile } from '@ionic/utils-fs';\nimport { readPackageJsonFile } from '@ionic/cli-framework/utils/node';\n\nimport { StarterList } from '../definitions';\nimport { getDirectories, log, readGitignore, readStarterManifest, readTsconfigJson, runcmd } from '../utils';\n\nexport const STARTER_TYPE_OFFICIAL = 'official';\nexport const STARTER_TYPE_COMMUNITY = 'community';\nexport const REPO_DIRECTORY = path.resolve(path.dirname(path.dirname(__dirname)));\nexport const INTEGRATIONS_DIRECTORY = path.resolve(REPO_DIRECTORY, 'integrations');\nexport const IONIC_TYPE_DIRECTORIES = [\n  'ionic1',\n  'ionic-angular',\n  'angular',\n  'angular-standalone',\n  'react',\n  'vue',\n  'react-vite',\n  'vue-vite',\n];\n\nexport const BUILD_DIRECTORY = path.resolve(REPO_DIRECTORY, 'build');\nexport const STARTERS_LIST_PATH = path.resolve(BUILD_DIRECTORY, 'starters.json');\n\nexport function getStarterInfoFromPath(starterDir: string): string[] {\n  return starterDir.substring(REPO_DIRECTORY.length + 1).split(path.sep);\n}\n\nexport function generateStarterName(starterType: string, starterDir: string) {\n  if (starterType === STARTER_TYPE_OFFICIAL) {\n    return path.basename(starterDir).toLowerCase();\n  } else if (starterType === STARTER_TYPE_COMMUNITY) {\n    const scope = path.dirname(starterDir);\n    return `${path.basename(scope)}-${path.basename(starterDir)}`.toLowerCase();\n  }\n\n  throw new Error(red(`Unknown starter type: ${starterType}`));\n}\n\nexport async function gatherChangedBaseFiles(): Promise<string[]> {\n  const changedBaseFiles: string[] = [];\n\n  for (const ionicType of IONIC_TYPE_DIRECTORIES) {\n    const baseDir = path.resolve(REPO_DIRECTORY, ionicType, 'base');\n    const baseChanges = (await runcmd('git', ['status', '--porcelain', '--', baseDir])).trim();\n\n    if (baseChanges) {\n      changedBaseFiles.push(baseDir);\n    }\n  }\n\n  return changedBaseFiles;\n}\n\nexport async function getStarterDirectories(\n  ionicType: string,\n  { community = true }: { community?: boolean } = {}\n): Promise<string[]> {\n  const officialStarterDirs = await getDirectories(path.resolve(REPO_DIRECTORY, ionicType, STARTER_TYPE_OFFICIAL));\n\n  if (community) {\n    const communityScopes = await getDirectories(path.resolve(REPO_DIRECTORY, ionicType, STARTER_TYPE_COMMUNITY));\n    const communityStarterDirs = _.flatten(\n      await Promise.all(communityScopes.map(async (scopeDir) => getDirectories(scopeDir)))\n    );\n    return [...officialStarterDirs, ...communityStarterDirs];\n  }\n\n  return officialStarterDirs;\n}\n\nexport async function buildStarters({\n  current = false,\n  sha1,\n}: {\n  current?: boolean;\n  sha1?: string;\n}): Promise<StarterList> {\n  const starterList: StarterList = { starters: [], integrations: [] };\n\n  if (!sha1) {\n    sha1 = (await runcmd('git', ['rev-parse', 'HEAD'])).trim();\n  }\n\n  const currentSha1 = sha1;\n\n  for (const ionicType of IONIC_TYPE_DIRECTORIES) {\n    const baseDir = path.resolve(REPO_DIRECTORY, ionicType, 'base');\n    const starterDirs = await getStarterDirectories(ionicType);\n\n    const refmap = new Map<string, string[]>();\n\n    await Promise.all(\n      starterDirs.map(async (starterDir) => {\n        const manifest = await readStarterManifest(starterDir);\n\n        if (manifest) {\n          let starterDirsAtRef = refmap.get(manifest.baseref);\n\n          if (!starterDirsAtRef) {\n            starterDirsAtRef = [];\n          }\n\n          starterDirsAtRef.push(starterDir);\n          refmap.set(manifest.baseref, starterDirsAtRef);\n        }\n      })\n    );\n\n    for (const [ref, starterDirsAtRef] of refmap.entries()) {\n      if (!current) {\n        console.log(`Checking out ${bold(cyan(ionicType))} base files at ${bold(ref)}`);\n        await runcmd('git', ['checkout', ref, '--', baseDir]);\n      }\n\n      await Promise.all(\n        starterDirsAtRef.map(async (starterDir) => {\n          const [, starterType, ...rest] = getStarterInfoFromPath(starterDir);\n          const id = buildStarterId(ionicType, starterType, starterDir);\n          await buildStarter(ionicType, starterType, starterDir);\n\n          const name = rest.join('/');\n          const sha1 = current ? currentSha1 : (await runcmd('git', ['rev-parse', ref])).trim();\n          starterList.starters.push({ name, id, type: ionicType, ref, sha1 });\n        })\n      );\n\n      if (!current) {\n        await runcmd('git', ['checkout', currentSha1, '--', baseDir]);\n      }\n    }\n  }\n\n  const integrationDirs = await getDirectories(INTEGRATIONS_DIRECTORY);\n\n  await Promise.all(\n    integrationDirs.map(async (integrationDir) => {\n      const name = path.basename(integrationDir);\n      const integration = `integration-${name}`;\n      await copy(integrationDir, path.resolve(BUILD_DIRECTORY, integration));\n      starterList.integrations.push({ name, id: integration });\n      log(integration, green('Copied!'));\n    })\n  );\n\n  console.log(`Writing ${cyan('starters.json')}\\n`);\n  await writeFile(STARTERS_LIST_PATH, JSON.stringify(starterList, undefined, 2), { encoding: 'utf8' });\n\n  return starterList;\n}\n\nexport function buildStarterId(ionicType: string, starterType: string, starterDir: string): string {\n  const starter = generateStarterName(starterType, starterDir);\n  const id = `${ionicType}-${starterType}-${starter}`;\n\n  return id;\n}\n\nexport async function buildStarter(ionicType: string, starterType: string, starterDir: string): Promise<void> {\n  const id = buildStarterId(ionicType, starterType, starterDir);\n  const baseDir = path.resolve(REPO_DIRECTORY, ionicType, 'base');\n  const tmpdest = path.resolve(BUILD_DIRECTORY, id);\n\n  log(id, 'Building...');\n\n  const manifest = await readStarterManifest(starterDir);\n\n  if (!manifest) {\n    throw new Error(`No starter manifest found in ${starterDir}`);\n  }\n\n  await copy(baseDir, tmpdest, {});\n  await copy(starterDir, tmpdest, {});\n\n  try {\n    await remove(path.resolve(tmpdest, '.git'));\n  } catch (e: any) {\n    if (e.code !== 'ENOENT') {\n      throw e;\n    }\n  }\n\n  const pkgPath = path.resolve(tmpdest, 'package.json');\n  const pkg = await readPackageJsonFile(pkgPath);\n\n  log(id, `Performing manifest operations for ${bold(manifest.name)}`);\n\n  if (manifest.packageJson) {\n    _.mergeWith(pkg, manifest.packageJson, (objv, v) => (_.isArray(v) ? v : undefined));\n    await writeFile(pkgPath, JSON.stringify(pkg, undefined, 2) + '\\n', { encoding: 'utf8' });\n  }\n\n  const tsconfigJson = await readTsconfigJson(tmpdest);\n\n  if (Object.keys(tsconfigJson).length > 0 && manifest.tsconfigJson) {\n    _.mergeWith(tsconfigJson, manifest.tsconfigJson, (objv, v) => (_.isArray(v) ? v : undefined));\n    await writeFile(path.resolve(tmpdest, 'tsconfig.json'), JSON.stringify(tsconfigJson, undefined, 2) + '\\n', {\n      encoding: 'utf8',\n    });\n  }\n\n  const gitignore = await readGitignore(tmpdest);\n\n  if (manifest.gitignore) {\n    const united = _.union(\n      gitignore.map((x) => x.trim()),\n      manifest.gitignore.map((x) => x.trim())\n    );\n    await writeFile(path.resolve(tmpdest, '.gitignore'), united.join('\\n') + '\\n', { encoding: 'utf8' });\n  }\n}\n"
  },
  {
    "path": "src/utils/index.ts",
    "content": "import * as path from 'path';\n\nimport { bold, cyan, dim } from 'colorette';\nimport { SpawnOptions, spawn } from 'cross-spawn';\n\nimport { filter } from '@ionic/utils-array';\nimport { readFile, readdir, stat } from '@ionic/utils-fs';\n\nimport { StarterManifest, TsconfigJson } from '../definitions';\n\nexport const IONIC_MANIFEST_FILE = 'ionic.starter.json';\n\nexport function getCommandHeader(title: string): string {\n  const separator = '-'.repeat(title.length);\n\n  return `${separator}\\n` + `${bold(cyan(title))}\\n` + `${separator}\\n`;\n}\n\nexport async function getDirectories(p: string): Promise<string[]> {\n  const contents = await readdir(p);\n  return filter(\n    contents.map((f) => path.resolve(p, f)),\n    async (f) => (await stat(f)).isDirectory()\n  );\n}\n\nexport async function readTsconfigJson(dir: string): Promise<TsconfigJson> {\n  try {\n    return JSON.parse(await readFile(path.resolve(dir, 'tsconfig.json'), { encoding: 'utf8' }));\n  } catch (e) {\n    // ignore\n  }\n\n  return {};\n}\n\nexport async function readGitignore(dir: string): Promise<string[]> {\n  try {\n    return (await readFile(path.resolve(dir, '.gitignore'), { encoding: 'utf8' })).split(/\\n/);\n  } catch (e) {\n    // ignore\n  }\n\n  return [];\n}\n\nexport async function readStarterManifest(dir: string): Promise<StarterManifest | undefined> {\n  try {\n    return JSON.parse(await readFile(path.resolve(dir, IONIC_MANIFEST_FILE), { encoding: 'utf8' }));\n  } catch (e) {\n    // ignore\n  }\n}\n\nexport async function log(id: string, msg: string) {\n  console.log(dim('=>'), cyan(id), msg);\n}\n\nexport function runcmd(command: string, args: string[] = [], opts: SpawnOptions = {}): Promise<string> {\n  return new Promise<string>((resolve, reject) => {\n    const p = spawn(command, args, opts);\n\n    const stdoutbufs: Buffer[] = [];\n    const stderrbufs: Buffer[] = [];\n\n    if (p.stdout) {\n      p.stdout.on('data', (chunk) => {\n        if (Buffer.isBuffer(chunk)) {\n          stdoutbufs.push(chunk);\n        } else {\n          stdoutbufs.push(Buffer.from(chunk));\n        }\n      });\n    }\n\n    if (p.stderr) {\n      p.stderr.on('data', (chunk) => {\n        if (Buffer.isBuffer(chunk)) {\n          stderrbufs.push(chunk);\n        } else {\n          stderrbufs.push(Buffer.from(chunk));\n        }\n      });\n    }\n\n    p.on('error', (err) => {\n      reject(err);\n    });\n\n    p.on('close', (code) => {\n      const stdout = Buffer.concat(stdoutbufs).toString();\n      const stderr = Buffer.concat(stderrbufs).toString();\n\n      if (code === 0) {\n        resolve(stdout);\n      } else {\n        reject(new Error(stderr));\n      }\n    });\n  });\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"allowUnreachableCode\": false,\n    \"baseUrl\": \"./\",\n    \"forceConsistentCasingInFileNames\": true,\n    \"module\": \"commonjs\",\n    \"moduleResolution\": \"node\",\n    \"noFallthroughCasesInSwitch\": true,\n    \"noUnusedLocals\": true,\n    \"outDir\": \"./dist\",\n    \"pretty\": true,\n    \"strict\": true,\n    \"skipLibCheck\": true,\n    \"target\": \"es2018\",\n    \"lib\": [\"es2018\"],\n    \"plugins\": [{ \"name\": \"typescript-eslint-language-service\" }]\n  },\n  \"include\": [\"types/**/*.d.ts\", \"src/**/*.ts\"],\n  \"exclude\": [\"node_modules\", \"src/**/__tests__/*.ts\"]\n}\n"
  },
  {
    "path": "types/cross-spawn.d.ts",
    "content": "declare module \"cross-spawn\" {\n  import child_process = require('child_process');\n  export = child_process;\n}\n"
  },
  {
    "path": "types/string-width.d.ts",
    "content": "declare module 'string-width' {\n  namespace stringWidth {}\n  function stringWidth(str: string): number;\n  export = stringWidth;\n}\n"
  },
  {
    "path": "vue/base/.browserslistrc",
    "content": "Chrome >=79\nChromeAndroid >=79\nFirefox >=70\nEdge >=79\nSafari >=14\niOS >=14"
  },
  {
    "path": "vue/base/.eslintrc.js",
    "content": "module.exports = {\n  root: true,\n  env: {\n    node: true\n  },\n  'extends': [\n    'plugin:vue/vue3-essential',\n    'eslint:recommended',\n    '@vue/typescript/recommended'\n  ],\n  parserOptions: {\n    ecmaVersion: 2020\n  },\n  rules: {\n    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',\n    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',\n    'vue/no-deprecated-slot-attribute': 'off',\n    '@typescript-eslint/no-explicit-any': 'off',\n  },\n  overrides: [\n    {\n      files: [\n        '**/__tests__/*.{j,t}s?(x)',\n        '**/tests/unit/**/*.spec.{j,t}s?(x)'\n      ],\n      env: {\n        jest: true\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "vue/base/.gitignore",
    "content": "# Specifies intentionally untracked files to ignore when using Git\n# http://git-scm.com/docs/gitignore\n\n*~\n*.sw[mnpcod]\n.tmp\n*.tmp\n*.tmp.*\n*.sublime-project\n*.sublime-workspace\n.DS_Store\nThumbs.db\nUserInterfaceState.xcuserstate\n$RECYCLE.BIN/\n\n*.log\nlog.txt\nnpm-debug.log*\n\n/.idea\n/.ionic\n/.sass-cache\n/.sourcemaps\n/.versions\n/.vscode/*\n!/.vscode/extensions.json\n/coverage\n/dist\n/node_modules\n/platforms\n/plugins\n/www\n"
  },
  {
    "path": "vue/base/.vscode/extensions.json",
    "content": "{\n    \"recommendations\": [\n        \"Webnative.webnative\"\n    ]\n}\n"
  },
  {
    "path": "vue/base/babel.config.js",
    "content": "module.exports = {\n  presets: [\n    '@vue/cli-plugin-babel/preset'\n  ]\n}\n"
  },
  {
    "path": "vue/base/cypress.json",
    "content": "{\n  \"pluginsFile\": \"tests/e2e/plugins/index.js\"\n}\n"
  },
  {
    "path": "vue/base/ionic.config.json",
    "content": "{\n  \"name\": \"ionic-app-base\",\n  \"app_id\": \"\",\n  \"type\": \"vue\",\n  \"integrations\": {}\n}\n"
  },
  {
    "path": "vue/base/jest.config.js",
    "content": "module.exports = {\n  preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',\n  transformIgnorePatterns: ['/node_modules/(?!@ionic/vue|@ionic/vue-router|@ionic/core|@stencil/core|ionicons)']\n}\n"
  },
  {
    "path": "vue/base/package.json",
    "content": "{\n  \"name\": \"ionic-app-base\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"serve\": \"vue-cli-service serve\",\n    \"build\": \"vue-cli-service build\",\n    \"test:unit\": \"vue-cli-service test:unit\",\n    \"test:e2e\": \"vue-cli-service test:e2e\",\n    \"lint\": \"vue-cli-service lint\"\n  },\n  \"dependencies\": {\n    \"@ionic/vue\": \"^7.0.0\",\n    \"@ionic/vue-router\": \"^7.0.0\",\n    \"core-js\": \"^3.6.5\",\n    \"ionicons\": \"^7.0.0\",\n    \"vue\": \"^3.2.47\",\n    \"vue-router\": \"^4.1.6\"\n  },\n  \"devDependencies\": {\n    \"@types/jest\": \"^27.0.2\",\n    \"@typescript-eslint/eslint-plugin\": \"^5.6.0\",\n    \"@typescript-eslint/parser\": \"^5.6.0\",\n    \"@vue/cli-plugin-babel\": \"~5.0.0-rc.1\",\n    \"@vue/cli-plugin-e2e-cypress\": \"~5.0.0-rc.1\",\n    \"@vue/cli-plugin-eslint\": \"~5.0.0-rc.1\",\n    \"@vue/cli-plugin-router\": \"~5.0.0-rc.1\",\n    \"@vue/cli-plugin-typescript\": \"~5.0.0-rc.1\",\n    \"@vue/cli-plugin-unit-jest\": \"~5.0.0-rc.1\",\n    \"@vue/cli-service\": \"~5.0.0-rc.1\",\n    \"@vue/eslint-config-typescript\": \"^11.0.2\",\n    \"@vue/test-utils\": \"^2.0.0-rc.16\",\n    \"@vue/vue3-jest\": \"^27.0.0-alpha.3\",\n    \"babel-jest\": \"^27.3.1\",\n    \"cypress\": \"^8.7.0\",\n    \"eslint\": \"^8.4.1\",\n    \"eslint-plugin-vue\": \"^9.8.0\",\n    \"jest\": \"^27.3.1\",\n    \"ts-jest\": \"^27.0.7\",\n    \"typescript\": \"^4.3.5\"\n  }\n}\n"
  },
  {
    "path": "vue/base/public/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Ionic App</title>\n\n    <base href=\"/\" />\n\n    <meta name=\"color-scheme\" content=\"light dark\" />\n    <meta\n      name=\"viewport\"\n      content=\"viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\"\n    />\n    <meta name=\"format-detection\" content=\"telephone=no\" />\n    <meta name=\"msapplication-tap-highlight\" content=\"no\" />\n\n    <link rel=\"shortcut icon\" type=\"image/png\" href=\"<%= BASE_URL %>assets/icon/favicon.png\" />\n\n    <!-- add to homescreen for ios -->\n    <meta name=\"mobile-web-app-capable\" content=\"yes\" />\n    <meta name=\"apple-mobile-web-app-title\" content=\"Ionic App\" />\n    <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\" />\n  </head>\n\n  <body>\n    <div id=\"app\"></div>\n  </body>\n\n</html>\n\n"
  },
  {
    "path": "vue/base/src/main.ts",
    "content": "import { createApp } from 'vue'\nimport App from './App.vue'\nimport router from './router';\n\nimport { IonicVue } from '@ionic/vue';\n\n/* Core CSS required for Ionic components to work properly */\nimport '@ionic/vue/css/core.css';\n\n/* Basic CSS for apps built with Ionic */\nimport '@ionic/vue/css/normalize.css';\nimport '@ionic/vue/css/structure.css';\nimport '@ionic/vue/css/typography.css';\n\n/* Optional CSS utils that can be commented out */\nimport '@ionic/vue/css/padding.css';\nimport '@ionic/vue/css/float-elements.css';\nimport '@ionic/vue/css/text-alignment.css';\nimport '@ionic/vue/css/text-transformation.css';\nimport '@ionic/vue/css/flex-utils.css';\nimport '@ionic/vue/css/display.css';\n\n/* Theme variables */\nimport './theme/variables.css';\n\nconst app = createApp(App)\n  .use(IonicVue)\n  .use(router);\n  \nrouter.isReady().then(() => {\n  app.mount('#app');\n});"
  },
  {
    "path": "vue/base/src/shims-vue.d.ts",
    "content": "/* eslint-disable */\ndeclare module '*.vue' {\n  import type { DefineComponent } from 'vue'\n  const component: DefineComponent<{}, {}, any>\n  export default component\n}\n"
  },
  {
    "path": "vue/base/src/theme/variables.css",
    "content": "/* Ionic Variables and Theming. For more info, please see:\nhttp://ionicframework.com/docs/theming/ */\n\n/** Ionic CSS Variables **/\n:root {\n  /** primary **/\n  --ion-color-primary: #3880ff;\n  --ion-color-primary-rgb: 56, 128, 255;\n  --ion-color-primary-contrast: #ffffff;\n  --ion-color-primary-contrast-rgb: 255, 255, 255;\n  --ion-color-primary-shade: #3171e0;\n  --ion-color-primary-tint: #4c8dff;\n\n  /** secondary **/\n  --ion-color-secondary: #3dc2ff;\n  --ion-color-secondary-rgb: 61, 194, 255;\n  --ion-color-secondary-contrast: #ffffff;\n  --ion-color-secondary-contrast-rgb: 255, 255, 255;\n  --ion-color-secondary-shade: #36abe0;\n  --ion-color-secondary-tint: #50c8ff;\n\n  /** tertiary **/\n  --ion-color-tertiary: #5260ff;\n  --ion-color-tertiary-rgb: 82, 96, 255;\n  --ion-color-tertiary-contrast: #ffffff;\n  --ion-color-tertiary-contrast-rgb: 255, 255, 255;\n  --ion-color-tertiary-shade: #4854e0;\n  --ion-color-tertiary-tint: #6370ff;\n\n  /** success **/\n  --ion-color-success: #2dd36f;\n  --ion-color-success-rgb: 45, 211, 111;\n  --ion-color-success-contrast: #ffffff;\n  --ion-color-success-contrast-rgb: 255, 255, 255;\n  --ion-color-success-shade: #28ba62;\n  --ion-color-success-tint: #42d77d;\n\n  /** warning **/\n  --ion-color-warning: #ffc409;\n  --ion-color-warning-rgb: 255, 196, 9;\n  --ion-color-warning-contrast: #000000;\n  --ion-color-warning-contrast-rgb: 0, 0, 0;\n  --ion-color-warning-shade: #e0ac08;\n  --ion-color-warning-tint: #ffca22;\n\n  /** danger **/\n  --ion-color-danger: #eb445a;\n  --ion-color-danger-rgb: 235, 68, 90;\n  --ion-color-danger-contrast: #ffffff;\n  --ion-color-danger-contrast-rgb: 255, 255, 255;\n  --ion-color-danger-shade: #cf3c4f;\n  --ion-color-danger-tint: #ed576b;\n\n  /** dark **/\n  --ion-color-dark: #222428;\n  --ion-color-dark-rgb: 34, 36, 40;\n  --ion-color-dark-contrast: #ffffff;\n  --ion-color-dark-contrast-rgb: 255, 255, 255;\n  --ion-color-dark-shade: #1e2023;\n  --ion-color-dark-tint: #383a3e;\n\n  /** medium **/\n  --ion-color-medium: #92949c;\n  --ion-color-medium-rgb: 146, 148, 156;\n  --ion-color-medium-contrast: #ffffff;\n  --ion-color-medium-contrast-rgb: 255, 255, 255;\n  --ion-color-medium-shade: #808289;\n  --ion-color-medium-tint: #9d9fa6;\n\n  /** light **/\n  --ion-color-light: #f4f5f8;\n  --ion-color-light-rgb: 244, 245, 248;\n  --ion-color-light-contrast: #000000;\n  --ion-color-light-contrast-rgb: 0, 0, 0;\n  --ion-color-light-shade: #d7d8da;\n  --ion-color-light-tint: #f5f6f9;\n}\n\n@media (prefers-color-scheme: dark) {\n  /*\n   * Dark Colors\n   * -------------------------------------------\n   */\n\n  body {\n    --ion-color-primary: #428cff;\n    --ion-color-primary-rgb: 66,140,255;\n    --ion-color-primary-contrast: #ffffff;\n    --ion-color-primary-contrast-rgb: 255,255,255;\n    --ion-color-primary-shade: #3a7be0;\n    --ion-color-primary-tint: #5598ff;\n\n    --ion-color-secondary: #50c8ff;\n    --ion-color-secondary-rgb: 80,200,255;\n    --ion-color-secondary-contrast: #ffffff;\n    --ion-color-secondary-contrast-rgb: 255,255,255;\n    --ion-color-secondary-shade: #46b0e0;\n    --ion-color-secondary-tint: #62ceff;\n\n    --ion-color-tertiary: #6a64ff;\n    --ion-color-tertiary-rgb: 106,100,255;\n    --ion-color-tertiary-contrast: #ffffff;\n    --ion-color-tertiary-contrast-rgb: 255,255,255;\n    --ion-color-tertiary-shade: #5d58e0;\n    --ion-color-tertiary-tint: #7974ff;\n\n    --ion-color-success: #2fdf75;\n    --ion-color-success-rgb: 47,223,117;\n    --ion-color-success-contrast: #000000;\n    --ion-color-success-contrast-rgb: 0,0,0;\n    --ion-color-success-shade: #29c467;\n    --ion-color-success-tint: #44e283;\n\n    --ion-color-warning: #ffd534;\n    --ion-color-warning-rgb: 255,213,52;\n    --ion-color-warning-contrast: #000000;\n    --ion-color-warning-contrast-rgb: 0,0,0;\n    --ion-color-warning-shade: #e0bb2e;\n    --ion-color-warning-tint: #ffd948;\n\n    --ion-color-danger: #ff4961;\n    --ion-color-danger-rgb: 255,73,97;\n    --ion-color-danger-contrast: #ffffff;\n    --ion-color-danger-contrast-rgb: 255,255,255;\n    --ion-color-danger-shade: #e04055;\n    --ion-color-danger-tint: #ff5b71;\n\n    --ion-color-dark: #f4f5f8;\n    --ion-color-dark-rgb: 244,245,248;\n    --ion-color-dark-contrast: #000000;\n    --ion-color-dark-contrast-rgb: 0,0,0;\n    --ion-color-dark-shade: #d7d8da;\n    --ion-color-dark-tint: #f5f6f9;\n\n    --ion-color-medium: #989aa2;\n    --ion-color-medium-rgb: 152,154,162;\n    --ion-color-medium-contrast: #000000;\n    --ion-color-medium-contrast-rgb: 0,0,0;\n    --ion-color-medium-shade: #86888f;\n    --ion-color-medium-tint: #a2a4ab;\n\n    --ion-color-light: #222428;\n    --ion-color-light-rgb: 34,36,40;\n    --ion-color-light-contrast: #ffffff;\n    --ion-color-light-contrast-rgb: 255,255,255;\n    --ion-color-light-shade: #1e2023;\n    --ion-color-light-tint: #383a3e;\n  }\n\n  /*\n   * iOS Dark Theme\n   * -------------------------------------------\n   */\n\n  .ios body {\n    --ion-background-color: #000000;\n    --ion-background-color-rgb: 0,0,0;\n\n    --ion-text-color: #ffffff;\n    --ion-text-color-rgb: 255,255,255;\n\n    --ion-color-step-50: #0d0d0d;\n    --ion-color-step-100: #1a1a1a;\n    --ion-color-step-150: #262626;\n    --ion-color-step-200: #333333;\n    --ion-color-step-250: #404040;\n    --ion-color-step-300: #4d4d4d;\n    --ion-color-step-350: #595959;\n    --ion-color-step-400: #666666;\n    --ion-color-step-450: #737373;\n    --ion-color-step-500: #808080;\n    --ion-color-step-550: #8c8c8c;\n    --ion-color-step-600: #999999;\n    --ion-color-step-650: #a6a6a6;\n    --ion-color-step-700: #b3b3b3;\n    --ion-color-step-750: #bfbfbf;\n    --ion-color-step-800: #cccccc;\n    --ion-color-step-850: #d9d9d9;\n    --ion-color-step-900: #e6e6e6;\n    --ion-color-step-950: #f2f2f2;\n\n    --ion-item-background: #000000;\n\n    --ion-card-background: #1c1c1d;\n  }\n\n  .ios ion-modal {\n    --ion-background-color: var(--ion-color-step-100);\n    --ion-toolbar-background: var(--ion-color-step-150);\n    --ion-toolbar-border-color: var(--ion-color-step-250);\n  }\n\n\n  /*\n   * Material Design Dark Theme\n   * -------------------------------------------\n   */\n\n  .md body {\n    --ion-background-color: #121212;\n    --ion-background-color-rgb: 18,18,18;\n\n    --ion-text-color: #ffffff;\n    --ion-text-color-rgb: 255,255,255;\n\n    --ion-border-color: #222222;\n\n    --ion-color-step-50: #1e1e1e;\n    --ion-color-step-100: #2a2a2a;\n    --ion-color-step-150: #363636;\n    --ion-color-step-200: #414141;\n    --ion-color-step-250: #4d4d4d;\n    --ion-color-step-300: #595959;\n    --ion-color-step-350: #656565;\n    --ion-color-step-400: #717171;\n    --ion-color-step-450: #7d7d7d;\n    --ion-color-step-500: #898989;\n    --ion-color-step-550: #949494;\n    --ion-color-step-600: #a0a0a0;\n    --ion-color-step-650: #acacac;\n    --ion-color-step-700: #b8b8b8;\n    --ion-color-step-750: #c4c4c4;\n    --ion-color-step-800: #d0d0d0;\n    --ion-color-step-850: #dbdbdb;\n    --ion-color-step-900: #e7e7e7;\n    --ion-color-step-950: #f3f3f3;\n\n    --ion-item-background: #1e1e1e;\n\n    --ion-toolbar-background: #1f1f1f;\n\n    --ion-tab-bar-background: #1f1f1f;\n\n    --ion-card-background: #1e1e1e;\n  }\n}"
  },
  {
    "path": "vue/base/tests/e2e/.eslintrc.js",
    "content": "module.exports = {\n  plugins: [\n    'cypress'\n  ],\n  env: {\n    mocha: true,\n    'cypress/globals': true\n  },\n  rules: {\n    strict: 'off'\n  }\n}\n"
  },
  {
    "path": "vue/base/tests/e2e/plugins/index.js",
    "content": "/* eslint-disable arrow-body-style */\n// https://docs.cypress.io/guides/guides/plugins-guide.html\n\n// if you need a custom webpack configuration you can uncomment the following import\n// and then use the `file:preprocessor` event\n// as explained in the cypress docs\n// https://docs.cypress.io/api/plugins/preprocessors-api.html#Examples\n\n// /* eslint-disable import/no-extraneous-dependencies, global-require */\n// const webpack = require('@cypress/webpack-preprocessor')\n\nmodule.exports = (on, config) => {\n  // on('file:preprocessor', webpack({\n  //  webpackOptions: require('@vue/cli-service/webpack.config'),\n  //  watchOptions: {}\n  // }))\n\n  return Object.assign({}, config, {\n    fixturesFolder: 'tests/e2e/fixtures',\n    integrationFolder: 'tests/e2e/specs',\n    screenshotsFolder: 'tests/e2e/screenshots',\n    videosFolder: 'tests/e2e/videos',\n    supportFile: 'tests/e2e/support/index.js'\n  })\n}\n"
  },
  {
    "path": "vue/base/tests/e2e/support/commands.js",
    "content": "// ***********************************************\n// This example commands.js shows you how to\n// create various custom commands and overwrite\n// existing commands.\n//\n// For more comprehensive examples of custom\n// commands please read more here:\n// https://on.cypress.io/custom-commands\n// ***********************************************\n//\n//\n// -- This is a parent command --\n// Cypress.Commands.add(\"login\", (email, password) => { ... })\n//\n//\n// -- This is a child command --\n// Cypress.Commands.add(\"drag\", { prevSubject: 'element'}, (subject, options) => { ... })\n//\n//\n// -- This is a dual command --\n// Cypress.Commands.add(\"dismiss\", { prevSubject: 'optional'}, (subject, options) => { ... })\n//\n//\n// -- This is will overwrite an existing command --\n// Cypress.Commands.overwrite(\"visit\", (originalFn, url, options) => { ... })\n"
  },
  {
    "path": "vue/base/tests/e2e/support/index.js",
    "content": "// ***********************************************************\n// This example support/index.js is processed and\n// loaded automatically before your test files.\n//\n// This is a great place to put global configuration and\n// behavior that modifies Cypress.\n//\n// You can change the location of this file or turn off\n// automatically serving support files with the\n// 'supportFile' configuration option.\n//\n// You can read more here:\n// https://on.cypress.io/configuration\n// ***********************************************************\n\n// Import commands.js using ES2015 syntax:\nimport './commands'\n\n// Alternatively you can use CommonJS syntax:\n// require('./commands')\n"
  },
  {
    "path": "vue/base/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"esnext\",\n    \"module\": \"esnext\",\n    \"strict\": true,\n    \"jsx\": \"preserve\",\n    \"importHelpers\": true,\n    \"moduleResolution\": \"node\",\n    \"skipLibCheck\": true,\n    \"esModuleInterop\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"sourceMap\": true,\n    \"baseUrl\": \".\",\n    \"types\": [\n      \"webpack-env\",\n      \"jest\"\n    ],\n    \"paths\": {\n      \"@/*\": [\n        \"src/*\"\n      ]\n    },\n    \"lib\": [\n      \"esnext\",\n      \"dom\",\n      \"dom.iterable\",\n      \"scripthost\"\n    ]\n  },\n  \"include\": [\n    \"src/**/*.ts\",\n    \"src/**/*.tsx\",\n    \"src/**/*.vue\",\n    \"tests/**/*.ts\",\n    \"tests/**/*.tsx\"\n  ],\n  \"exclude\": [\n    \"node_modules\"\n  ]\n}\n"
  },
  {
    "path": "vue/community/.gitkeep",
    "content": ""
  },
  {
    "path": "vue/official/blank/ionic.starter.json",
    "content": "{\n  \"name\": \"Blank Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test:unit\"\n  }\n}\n"
  },
  {
    "path": "vue/official/blank/src/App.vue",
    "content": "<template>\n  <ion-app>\n    <ion-router-outlet />\n  </ion-app>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonApp, IonRouterOutlet } from '@ionic/vue';\n</script>\n"
  },
  {
    "path": "vue/official/blank/src/router/index.ts",
    "content": "import { createRouter, createWebHistory } from '@ionic/vue-router';\nimport { RouteRecordRaw } from 'vue-router';\nimport HomePage from '../views/HomePage.vue'\n\nconst routes: Array<RouteRecordRaw> = [\n  {\n    path: '/',\n    redirect: '/home'\n  },\n  {\n    path: '/home',\n    name: 'Home',\n    component: HomePage\n  }\n]\n\nconst router = createRouter({\n  history: createWebHistory(process.env.BASE_URL),\n  routes\n})\n\nexport default router\n"
  },
  {
    "path": "vue/official/blank/src/views/HomePage.vue",
    "content": "<template>\n  <ion-page>\n    <ion-header :translucent=\"true\">\n      <ion-toolbar>\n        <ion-title>Blank</ion-title>\n      </ion-toolbar>\n    </ion-header>\n\n    <ion-content :fullscreen=\"true\">\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">Blank</ion-title>\n        </ion-toolbar>\n      </ion-header>\n\n      <div id=\"container\">\n        <strong>Ready to create an app?</strong>\n        <p>Start with Ionic <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n      </div>\n    </ion-content>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue';\n</script>\n\n<style scoped>\n#container {\n  text-align: center;\n  \n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n  \n  color: #8c8c8c;\n  \n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}\n</style>\n"
  },
  {
    "path": "vue/official/blank/tests/e2e/specs/test.js",
    "content": "// https://docs.cypress.io/api/introduction/api.html\n\ndescribe('My First Test', () => {\n  it('Visits the app root url', () => {\n    cy.visit('/')\n    cy.contains('#container', 'Ready to create an app?')\n  })\n})\n"
  },
  {
    "path": "vue/official/blank/tests/unit/example.spec.ts",
    "content": "import { mount } from '@vue/test-utils'\nimport HomePage from '@/views/HomePage.vue'\n\ndescribe('HomePage.vue', () => {\n  it('renders home vue', () => {\n    const wrapper = mount(HomePage)\n    expect(wrapper.text()).toMatch('Ready to create an app?')\n  })\n})\n"
  },
  {
    "path": "vue/official/list/ionic.starter.json",
    "content": "{\n  \"name\": \"List Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test:unit\"\n  }\n}\n"
  },
  {
    "path": "vue/official/list/src/App.vue",
    "content": "<template>\n  <ion-app>\n    <ion-router-outlet />\n  </ion-app>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonApp, IonRouterOutlet } from '@ionic/vue';\n</script>\n"
  },
  {
    "path": "vue/official/list/src/components/MessageListItem.vue",
    "content": "<template>\n  <ion-item v-if=\"message\" :routerLink=\"'/message/' + message.id\" :detail=\"false\" class=\"list-item\">\n    <div slot=\"start\" :class=\"!message.read ? 'dot dot-unread' : 'dot'\"></div>\n    <ion-label class=\"ion-text-wrap\">\n      <h2>\n        {{ message.fromName }}\n        <span class=\"date\">\n          <ion-note>{{ message.date }}</ion-note>\n          <ion-icon aria-hidden=\"true\" :icon=\"chevronForward\" size=\"small\" v-if=\"isIos()\"></ion-icon>\n        </span>\n      </h2>\n      <h3>{{ message.subject }}</h3>\n      <p>\n        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n      </p>\n    </ion-label>\n  </ion-item>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonIcon, IonItem, IonLabel, IonNote } from '@ionic/vue';\nimport { chevronForward } from 'ionicons/icons';\n\ndefineProps({\n  message: Object,\n});\n\nconst isIos = () => {\n  const win = window as any;\n  return win && win.Ionic && win.Ionic.mode === 'ios';\n};\n</script>\n\n<style scoped>\n.list-item {\n  --padding-start: 0;\n  --inner-padding-end: 0;\n}\n\n.list-item ion-label {\n  margin-top: 12px;\n  margin-bottom: 12px;\n}\n\n.list-item h2 {\n  font-weight: 600;\n  margin: 0;\n}\n\n.list-item p {\n  text-overflow: ellipsis;\n  overflow: hidden;\n  white-space: nowrap;\n  width: 95%;\n}\n\n.list-item .date {\n  float: right;\n  align-items: center;\n  display: flex;\n}\n\n.list-item ion-icon {\n  color: #c9c9ca;\n}\n\n.list-item ion-note {\n  font-size: 15px;\n  margin-right: 8px;\n  font-weight: normal;\n}\n\n.list-item ion-note.md {\n  margin-right: 14px;\n}\n\n.list-item .dot {\n  display: block;\n  height: 12px;\n  width: 12px;\n  border-radius: 50%;\n  align-self: start;\n  margin: 16px 10px 16px 16px;\n}\n\n.list-item .dot-unread {\n  background: var(--ion-color-primary);\n}\n</style>\n"
  },
  {
    "path": "vue/official/list/src/data/messages.ts",
    "content": "export interface Message {\n  fromName: string;\n  subject: string;\n  date: string;\n  id: number;\n}\n\nconst messages: Message[] = [\n  {\n    fromName: 'Matt Chorsey',\n    subject: 'New event: Trip to Vegas',\n    date: '9:32 AM',\n    id: 0\n  },\n  {\n    fromName: 'Lauren Ruthford',\n    subject: 'Long time no chat',\n    date: '6:12 AM',\n    id: 1\n  },\n  {\n    fromName: 'Jordan Firth',\n    subject: 'Report Results',\n    date: '4:55 AM',\n    id: 2\n\n  },\n  {\n    fromName: 'Bill Thomas',\n    subject: 'The situation',\n    date: 'Yesterday',\n    id: 3\n  },\n  {\n    fromName: 'Joanne Pollan',\n    subject: 'Updated invitation: Swim lessons',\n    date: 'Yesterday',\n    id: 4\n  },\n  {\n    fromName: 'Andrea Cornerston',\n    subject: 'Last minute ask',\n    date: 'Yesterday',\n    id: 5\n  },\n  {\n    fromName: 'Moe Chamont',\n    subject: 'Family Calendar - Version 1',\n    date: 'Last Week',\n    id: 6\n  },\n  {\n    fromName: 'Kelly Richardson',\n    subject: 'Placeholder Headhots',\n    date: 'Last Week',\n    id: 7\n  }\n];\n\nexport const getMessages = () => messages;\n\nexport const getMessage = (id: number) => messages.find(m => m.id === id);"
  },
  {
    "path": "vue/official/list/src/router/index.ts",
    "content": "import { createRouter, createWebHistory } from '@ionic/vue-router';\nimport { RouteRecordRaw } from 'vue-router';\nimport HomePage from '../views/HomePage.vue'\n\nconst routes: Array<RouteRecordRaw> = [\n  {\n    path: '/',\n    redirect: '/home'\n  },\n  {\n    path: '/home',\n    name: 'Home',\n    component: HomePage\n  },\n  {\n    path: '/message/:id',\n    component: () => import('../views/ViewMessagePage.vue')\n  }\n]\n\nconst router = createRouter({\n  history: createWebHistory(process.env.BASE_URL),\n  routes\n})\n\nexport default router\n"
  },
  {
    "path": "vue/official/list/src/views/HomePage.vue",
    "content": "<template>\n  <ion-page>\n    <ion-header :translucent=\"true\">\n      <ion-toolbar>\n        <ion-title>Inbox</ion-title>\n      </ion-toolbar>\n    </ion-header>\n\n    <ion-content :fullscreen=\"true\">\n      <ion-refresher slot=\"fixed\" @ionRefresh=\"refresh($event)\">\n        <ion-refresher-content></ion-refresher-content>\n      </ion-refresher>\n\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">Inbox</ion-title>\n        </ion-toolbar>\n      </ion-header>\n\n      <ion-list>\n        <MessageListItem v-for=\"message in messages\" :key=\"message.id\" :message=\"message\" />\n      </ion-list>\n    </ion-content>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n  IonContent,\n  IonHeader,\n  IonList,\n  IonPage,\n  IonRefresher,\n  IonRefresherContent,\n  IonTitle,\n  IonToolbar,\n} from '@ionic/vue';\nimport MessageListItem from '@/components/MessageListItem.vue';\nimport { getMessages, Message } from '@/data/messages';\nimport { ref } from 'vue';\n\nconst messages = ref<Message[]>(getMessages());\n\nconst refresh = (ev: CustomEvent) => {\n  setTimeout(() => {\n    ev.detail.complete();\n  }, 3000);\n};\n</script>\n"
  },
  {
    "path": "vue/official/list/src/views/ViewMessagePage.vue",
    "content": "<template>\n  <ion-page>\n    <ion-header :translucent=\"true\">\n      <ion-toolbar>\n        <ion-buttons slot=\"start\">\n          <ion-back-button :text=\"getBackButtonText()\" default-href=\"/\"></ion-back-button>\n        </ion-buttons>\n      </ion-toolbar>\n    </ion-header>\n\n    <ion-content :fullscreen=\"true\" v-if=\"message\">\n      <ion-item>\n        <ion-icon aria-hidden=\"true\" :icon=\"personCircle\" color=\"primary\"></ion-icon>\n        <ion-label class=\"ion-text-wrap\">\n          <h2>\n            {{ message.fromName }}\n            <span class=\"date\">\n              <ion-note>{{ message.date }}</ion-note>\n            </span>\n          </h2>\n          <h3>To: <ion-note>Me</ion-note></h3>\n        </ion-label>\n      </ion-item>\n\n      <div class=\"ion-padding\">\n        <h1>{{ message.subject }}</h1>\n        <p>\n          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n        </p>\n      </div>\n    </ion-content>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport { useRoute } from 'vue-router';\nimport {\n  IonBackButton,\n  IonButtons,\n  IonContent,\n  IonHeader,\n  IonIcon,\n  IonItem,\n  IonLabel,\n  IonNote,\n  IonPage,\n  IonToolbar,\n} from '@ionic/vue';\nimport { personCircle } from 'ionicons/icons';\nimport { getMessage } from '../data/messages';\n\nconst getBackButtonText = () => {\n  const win = window as any;\n  const mode = win && win.Ionic && win.Ionic.mode;\n  return mode === 'ios' ? 'Inbox' : '';\n};\n\nconst route = useRoute();\nconst message = getMessage(parseInt(route.params.id as string, 10));\n</script>\n\n<style scoped>\nion-item {\n  --inner-padding-end: 0;\n  --background: transparent;\n}\n\nion-label {\n  margin-top: 12px;\n  margin-bottom: 12px;\n}\n\nion-item h2 {\n  font-weight: 600;\n}\n\nion-item .date {\n  float: right;\n  align-items: center;\n  display: flex;\n}\n\nion-item ion-icon {\n  font-size: 42px;\n  margin-right: 8px;\n}\n\nion-item ion-note {\n  font-size: 15px;\n  margin-right: 12px;\n  font-weight: normal;\n}\n\nh1 {\n  margin: 0;\n  font-weight: bold;\n  font-size: 22px;\n}\n\np {\n  line-height: 22px;\n}\n</style>\n"
  },
  {
    "path": "vue/official/list/tests/e2e/specs/test.js",
    "content": "// https://docs.cypress.io/api/introduction/api.html\n\ndescribe('My First Test', () => {\n  it('Visits the app root url', () => {\n    cy.visit('/')\n    cy.contains('ion-header', 'Inbox')\n  })\n})\n"
  },
  {
    "path": "vue/official/list/tests/unit/example.spec.ts",
    "content": "import { mount } from '@vue/test-utils'\nimport HomePage from '@/views/HomePage.vue'\n\ndescribe('HomePage.vue', () => {\n  it('renders home view', () => {\n    const wrapper = mount(HomePage)\n    expect(wrapper.text()).toMatch('Inbox')\n  })\n})\n"
  },
  {
    "path": "vue/official/sidemenu/ionic.starter.json",
    "content": "{\n  \"name\": \"Sidemenu Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test:unit\"\n  }\n}\n"
  },
  {
    "path": "vue/official/sidemenu/src/App.vue",
    "content": "<template>\n  <ion-app>\n    <ion-split-pane content-id=\"main-content\">\n      <ion-menu content-id=\"main-content\" type=\"overlay\">\n        <ion-content>\n          <ion-list id=\"inbox-list\">\n            <ion-list-header>Inbox</ion-list-header>\n            <ion-note>hi@ionicframework.com</ion-note>\n\n            <ion-menu-toggle auto-hide=\"false\" v-for=\"(p, i) in appPages\" :key=\"i\">\n              <ion-item @click=\"selectedIndex = i\" router-direction=\"root\" :router-link=\"p.url\" lines=\"none\" detail=\"false\" class=\"hydrated\" :class=\"{ selected: selectedIndex === i }\">\n                <ion-icon aria-hidden=\"true\" slot=\"start\" :ios=\"p.iosIcon\" :md=\"p.mdIcon\"></ion-icon>\n                <ion-label>{{ p.title }}</ion-label>\n              </ion-item>\n            </ion-menu-toggle>\n          </ion-list>\n\n          <ion-list id=\"labels-list\">\n            <ion-list-header>Labels</ion-list-header>\n\n            <ion-item v-for=\"(label, index) in labels\" lines=\"none\" :key=\"index\">\n              <ion-icon aria-hidden=\"true\" slot=\"start\" :ios=\"bookmarkOutline\" :md=\"bookmarkSharp\"></ion-icon>\n              <ion-label>{{ label }}</ion-label>\n            </ion-item>\n          </ion-list>\n        </ion-content>\n      </ion-menu>\n      <ion-router-outlet id=\"main-content\"></ion-router-outlet>\n    </ion-split-pane>\n  </ion-app>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n  IonApp,\n  IonContent,\n  IonIcon,\n  IonItem,\n  IonLabel,\n  IonList,\n  IonListHeader,\n  IonMenu,\n  IonMenuToggle,\n  IonNote,\n  IonRouterOutlet,\n  IonSplitPane,\n} from '@ionic/vue';\nimport { ref } from 'vue';\nimport {\n  archiveOutline,\n  archiveSharp,\n  bookmarkOutline,\n  bookmarkSharp,\n  heartOutline,\n  heartSharp,\n  mailOutline,\n  mailSharp,\n  paperPlaneOutline,\n  paperPlaneSharp,\n  trashOutline,\n  trashSharp,\n  warningOutline,\n  warningSharp,\n} from 'ionicons/icons';\n\nconst selectedIndex = ref(0);\nconst appPages = [\n  {\n    title: 'Inbox',\n    url: '/folder/Inbox',\n    iosIcon: mailOutline,\n    mdIcon: mailSharp,\n  },\n  {\n    title: 'Outbox',\n    url: '/folder/Outbox',\n    iosIcon: paperPlaneOutline,\n    mdIcon: paperPlaneSharp,\n  },\n  {\n    title: 'Favorites',\n    url: '/folder/Favorites',\n    iosIcon: heartOutline,\n    mdIcon: heartSharp,\n  },\n  {\n    title: 'Archived',\n    url: '/folder/Archived',\n    iosIcon: archiveOutline,\n    mdIcon: archiveSharp,\n  },\n  {\n    title: 'Trash',\n    url: '/folder/Trash',\n    iosIcon: trashOutline,\n    mdIcon: trashSharp,\n  },\n  {\n    title: 'Spam',\n    url: '/folder/Spam',\n    iosIcon: warningOutline,\n    mdIcon: warningSharp,\n  },\n];\nconst labels = ['Family', 'Friends', 'Notes', 'Work', 'Travel', 'Reminders'];\n\nconst path = window.location.pathname.split('folder/')[1];\nif (path !== undefined) {\n  selectedIndex.value = appPages.findIndex((page) => page.title.toLowerCase() === path.toLowerCase());\n}\n</script>\n\n<style scoped>\nion-menu ion-content {\n  --background: var(--ion-item-background, var(--ion-background-color, #fff));\n}\n\nion-menu.md ion-content {\n  --padding-start: 8px;\n  --padding-end: 8px;\n  --padding-top: 20px;\n  --padding-bottom: 20px;\n}\n\nion-menu.md ion-list {\n  padding: 20px 0;\n}\n\nion-menu.md ion-note {\n  margin-bottom: 30px;\n}\n\nion-menu.md ion-list-header,\nion-menu.md ion-note {\n  padding-left: 10px;\n}\n\nion-menu.md ion-list#inbox-list {\n  border-bottom: 1px solid var(--ion-color-step-150, #d7d8da);\n}\n\nion-menu.md ion-list#inbox-list ion-list-header {\n  font-size: 22px;\n  font-weight: 600;\n\n  min-height: 20px;\n}\n\nion-menu.md ion-list#labels-list ion-list-header {\n  font-size: 16px;\n\n  margin-bottom: 18px;\n\n  color: #757575;\n\n  min-height: 26px;\n}\n\nion-menu.md ion-item {\n  --padding-start: 10px;\n  --padding-end: 10px;\n  border-radius: 4px;\n}\n\nion-menu.md ion-item.selected {\n  --background: rgba(var(--ion-color-primary-rgb), 0.14);\n}\n\nion-menu.md ion-item.selected ion-icon {\n  color: var(--ion-color-primary);\n}\n\nion-menu.md ion-item ion-icon {\n  color: #616e7e;\n}\n\nion-menu.md ion-item ion-label {\n  font-weight: 500;\n}\n\nion-menu.ios ion-content {\n  --padding-bottom: 20px;\n}\n\nion-menu.ios ion-list {\n  padding: 20px 0 0 0;\n}\n\nion-menu.ios ion-note {\n  line-height: 24px;\n  margin-bottom: 20px;\n}\n\nion-menu.ios ion-item {\n  --padding-start: 16px;\n  --padding-end: 16px;\n  --min-height: 50px;\n}\n\nion-menu.ios ion-item.selected ion-icon {\n  color: var(--ion-color-primary);\n}\n\nion-menu.ios ion-item ion-icon {\n  font-size: 24px;\n  color: #73849a;\n}\n\nion-menu.ios ion-list#labels-list ion-list-header {\n  margin-bottom: 8px;\n}\n\nion-menu.ios ion-list-header,\nion-menu.ios ion-note {\n  padding-left: 16px;\n  padding-right: 16px;\n}\n\nion-menu.ios ion-note {\n  margin-bottom: 8px;\n}\n\nion-note {\n  display: inline-block;\n  font-size: 16px;\n\n  color: var(--ion-color-medium-shade);\n}\n\nion-item.selected {\n  --color: var(--ion-color-primary);\n}\n</style>\n"
  },
  {
    "path": "vue/official/sidemenu/src/router/index.ts",
    "content": "import { createRouter, createWebHistory } from '@ionic/vue-router';\nimport { RouteRecordRaw } from 'vue-router';\n\nconst routes: Array<RouteRecordRaw> = [\n  {\n    path: '',\n    redirect: '/folder/Inbox'\n  },\n  {\n    path: '/folder/:id',\n    component: () => import ('../views/FolderPage.vue')\n  }\n]\n\nconst router = createRouter({\n  history: createWebHistory(process.env.BASE_URL),\n  routes\n})\n\nexport default router\n"
  },
  {
    "path": "vue/official/sidemenu/src/views/FolderPage.vue",
    "content": "<template>\n  <ion-page>\n    <ion-header :translucent=\"true\">\n      <ion-toolbar>\n        <ion-buttons slot=\"start\">\n          <ion-menu-button color=\"primary\"></ion-menu-button>\n        </ion-buttons>\n        <ion-title>{{ $route.params.id }}</ion-title>\n      </ion-toolbar>\n    </ion-header>\n\n    <ion-content :fullscreen=\"true\">\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">{{ $route.params.id }}</ion-title>\n        </ion-toolbar>\n      </ion-header>\n\n      <div id=\"container\">\n        <strong class=\"capitalize\">{{ $route.params.id }}</strong>\n        <p>Explore <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n      </div>\n    </ion-content>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonButtons, IonContent, IonHeader, IonMenuButton, IonPage, IonTitle, IonToolbar } from '@ionic/vue';\n</script>\n\n<style scoped>\n#container {\n  text-align: center;\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n  color: #8c8c8c;\n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}\n</style>\n"
  },
  {
    "path": "vue/official/sidemenu/tests/e2e/specs/test.js",
    "content": "// https://docs.cypress.io/api/introduction/api.html\n\ndescribe('My First Test', () => {\n  it('Visits the app root url', () => {\n    cy.visit('/folder/Inbox')\n    cy.contains('#container', 'Inbox')\n  })\n})\n"
  },
  {
    "path": "vue/official/sidemenu/tests/unit/example.spec.ts",
    "content": "import { mount } from '@vue/test-utils'\nimport FolderPage from '@/views/FolderPage.vue'\n\ndescribe('FolderPage.vue', () => {\n  it('renders folder view', () => {\n    const mockRoute = {\n      params: {\n        id: 'Outbox'\n      }\n    }\n    const wrapper = mount(FolderPage, {\n      global: {\n        mocks: {\n          $route: mockRoute\n        }\n      }\n    })\n    expect(wrapper.text()).toMatch('Explore UI Components')\n  })\n})\n"
  },
  {
    "path": "vue/official/tabs/ionic.starter.json",
    "content": "{\n  \"name\": \"Tabs Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test:unit\"\n  }\n}\n"
  },
  {
    "path": "vue/official/tabs/src/App.vue",
    "content": "<template>\n  <ion-app>\n    <ion-router-outlet />\n  </ion-app>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonApp, IonRouterOutlet } from '@ionic/vue';\n</script>\n"
  },
  {
    "path": "vue/official/tabs/src/components/ExploreContainer.vue",
    "content": "<template>\n  <div id=\"container\">\n    <strong>{{ name }}</strong>\n    <p>Explore <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\ndefineProps({\n  name: String,\n});\n</script>\n\n<style scoped>\n#container {\n  text-align: center;\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n  color: #8c8c8c;\n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}\n</style>\n"
  },
  {
    "path": "vue/official/tabs/src/router/index.ts",
    "content": "import { createRouter, createWebHistory } from '@ionic/vue-router';\nimport { RouteRecordRaw } from 'vue-router';\nimport TabsPage from '../views/TabsPage.vue'\n\nconst routes: Array<RouteRecordRaw> = [\n  {\n    path: '/',\n    redirect: '/tabs/tab1'\n  },\n  {\n    path: '/tabs/',\n    component: TabsPage,\n    children: [\n      {\n        path: '',\n        redirect: '/tabs/tab1'\n      },\n      {\n        path: 'tab1',\n        component: () => import('@/views/Tab1Page.vue')\n      },\n      {\n        path: 'tab2',\n        component: () => import('@/views/Tab2Page.vue')\n      },\n      {\n        path: 'tab3',\n        component: () => import('@/views/Tab3Page.vue')\n      }\n    ]\n  }\n]\n\nconst router = createRouter({\n  history: createWebHistory(process.env.BASE_URL),\n  routes\n})\n\nexport default router\n"
  },
  {
    "path": "vue/official/tabs/src/views/Tab1Page.vue",
    "content": "<template>\n  <ion-page>\n    <ion-header>\n      <ion-toolbar>\n        <ion-title>Tab 1</ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content :fullscreen=\"true\">\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">Tab 1</ion-title>\n        </ion-toolbar>\n      </ion-header>\n\n      <ExploreContainer name=\"Tab 1 page\" />\n    </ion-content>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonPage, IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/vue';\nimport ExploreContainer from '@/components/ExploreContainer.vue';\n</script>\n"
  },
  {
    "path": "vue/official/tabs/src/views/Tab2Page.vue",
    "content": "<template>\n  <ion-page>\n    <ion-header>\n      <ion-toolbar>\n        <ion-title>Tab 2</ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content :fullscreen=\"true\">\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">Tab 2</ion-title>\n        </ion-toolbar>\n      </ion-header>\n\n      <ExploreContainer name=\"Tab 2 page\" />\n    </ion-content>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonPage, IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/vue';\nimport ExploreContainer from '@/components/ExploreContainer.vue';\n</script>\n"
  },
  {
    "path": "vue/official/tabs/src/views/Tab3Page.vue",
    "content": "<template>\n  <ion-page>\n    <ion-header>\n      <ion-toolbar>\n        <ion-title>Tab 3</ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content :fullscreen=\"true\">\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">Tab 3</ion-title>\n        </ion-toolbar>\n      </ion-header>\n\n      <ExploreContainer name=\"Tab 3 page\" />\n    </ion-content>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonPage, IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/vue';\nimport ExploreContainer from '@/components/ExploreContainer.vue';\n</script>\n"
  },
  {
    "path": "vue/official/tabs/src/views/TabsPage.vue",
    "content": "<template>\n  <ion-page>\n    <ion-tabs>\n      <ion-router-outlet></ion-router-outlet>\n      <ion-tab-bar slot=\"bottom\">\n        <ion-tab-button tab=\"tab1\" href=\"/tabs/tab1\">\n          <ion-icon aria-hidden=\"true\" :icon=\"triangle\" />\n          <ion-label>Tab 1</ion-label>\n        </ion-tab-button>\n\n        <ion-tab-button tab=\"tab2\" href=\"/tabs/tab2\">\n          <ion-icon aria-hidden=\"true\" :icon=\"ellipse\" />\n          <ion-label>Tab 2</ion-label>\n        </ion-tab-button>\n\n        <ion-tab-button tab=\"tab3\" href=\"/tabs/tab3\">\n          <ion-icon aria-hidden=\"true\" :icon=\"square\" />\n          <ion-label>Tab 3</ion-label>\n        </ion-tab-button>\n      </ion-tab-bar>\n    </ion-tabs>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonTabBar, IonTabButton, IonTabs, IonLabel, IonIcon, IonPage, IonRouterOutlet } from '@ionic/vue';\nimport { ellipse, square, triangle } from 'ionicons/icons';\n</script>\n"
  },
  {
    "path": "vue/official/tabs/tests/e2e/specs/test.js",
    "content": "// https://docs.cypress.io/api/introduction/api.html\n\ndescribe('My First Test', () => {\n  it('Visits the app root url', () => {\n    cy.visit('/')\n    cy.contains('ion-content', 'Tab 1 page')\n  })\n})\n"
  },
  {
    "path": "vue/official/tabs/tests/unit/example.spec.ts",
    "content": "import { mount } from '@vue/test-utils'\nimport Tab1Page from '@/views/Tab1Page.vue'\n\ndescribe('Tab1Page.vue', () => {\n  it('renders tab 1 Tab1Page', () => {\n    const wrapper = mount(Tab1Page)\n    expect(wrapper.text()).toMatch('Tab 1 page')\n  })\n})\n"
  },
  {
    "path": "vue-vite/base/.browserslistrc",
    "content": "Chrome >=79\nChromeAndroid >=79\nFirefox >=70\nEdge >=79\nSafari >=14\niOS >=14"
  },
  {
    "path": "vue-vite/base/.eslintignore",
    "content": ".DS_Store\nnode_modules\n/coverage\n/dist\n/ios\n/android\n\n\n# local env files\n.env.local\n.env.*.local\n\n# Log files\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\n\n# Editor directories and files\n.idea\n.vscode\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n\n"
  },
  {
    "path": "vue-vite/base/.eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  env: {\n    node: true\n  },\n  'extends': [\n    'plugin:vue/vue3-essential',\n    'eslint:recommended',\n    '@vue/typescript/recommended'\n  ],\n  parserOptions: {\n    ecmaVersion: 2020\n  },\n  rules: {\n    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',\n    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',\n    'vue/no-deprecated-slot-attribute': 'off',\n    '@typescript-eslint/no-explicit-any': 'off',\n  }\n}\n"
  },
  {
    "path": "vue-vite/base/.gitignore",
    "content": "# Specifies intentionally untracked files to ignore when using Git\n# http://git-scm.com/docs/gitignore\n\n*~\n*.sw[mnpcod]\n.tmp\n*.tmp\n*.tmp.*\n*.sublime-project\n*.sublime-workspace\n.DS_Store\nThumbs.db\nUserInterfaceState.xcuserstate\n$RECYCLE.BIN/\n\n*.log\nlog.txt\nnpm-debug.log*\n\n/.idea\n/.ionic\n/.sass-cache\n/.sourcemaps\n/.versions\n/.vscode/*\n!/.vscode/extensions.json\n/coverage\n/dist\n/node_modules\n/platforms\n/plugins\n/www\n"
  },
  {
    "path": "vue-vite/base/.vscode/extensions.json",
    "content": "{\n    \"recommendations\": [\n        \"Webnative.webnative\"\n    ]\n}\n"
  },
  {
    "path": "vue-vite/base/cypress.config.ts",
    "content": "import { defineConfig } from 'cypress';\n\nexport default defineConfig({\n  e2e: {\n    supportFile: 'tests/e2e/support/e2e.{js,jsx,ts,tsx}',\n    specPattern: 'tests/e2e/specs/**/*.cy.{js,jsx,ts,tsx}',\n    videosFolder: 'tests/e2e/videos',\n    screenshotsFolder: 'tests/e2e/screenshots',\n    baseUrl: 'http://localhost:5173',\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    setupNodeEvents(on, config) {\n      // implement node event listeners here\n    },\n  },\n});\n"
  },
  {
    "path": "vue-vite/base/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Ionic App</title>\n\n    <base href=\"/\" />\n\n    <meta name=\"color-scheme\" content=\"light dark\" />\n    <meta\n      name=\"viewport\"\n      content=\"viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\"\n    />\n    <meta name=\"format-detection\" content=\"telephone=no\" />\n    <meta name=\"msapplication-tap-highlight\" content=\"no\" />\n\n    <link rel=\"shortcut icon\" type=\"image/png\" href=\"/favicon.png\" />\n\n    <!-- add to homescreen for ios -->\n    <meta name=\"mobile-web-app-capable\" content=\"yes\" />\n    <meta name=\"apple-mobile-web-app-title\" content=\"Ionic App\" />\n    <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\" />\n  </head>\n\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n\n</html>\n\n"
  },
  {
    "path": "vue-vite/base/ionic.config.json",
    "content": "{\n  \"name\": \"ionic-app-base\",\n  \"app_id\": \"\",\n  \"type\": \"vue-vite\",\n  \"integrations\": {}\n}\n"
  },
  {
    "path": "vue-vite/base/package.json",
    "content": "{\n  \"name\": \"ionic-app-base\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vue-tsc && vite build\",\n    \"preview\": \"vite preview\",\n    \"test:e2e\": \"cypress run\",\n    \"test:unit\": \"vitest\",\n    \"lint\": \"eslint .\"\n  },\n  \"dependencies\": {\n    \"@ionic/vue\": \"^8.0.0\",\n    \"@ionic/vue-router\": \"^8.0.0\",\n    \"ionicons\": \"^7.0.0\",\n    \"vue\": \"^3.3.0\",\n    \"vue-router\": \"^4.2.0\"\n  },\n  \"devDependencies\": {\n    \"@vitejs/plugin-legacy\": \"^5.0.0\",\n    \"@vitejs/plugin-vue\": \"^4.0.0\",\n    \"@vue/eslint-config-typescript\": \"^12.0.0\",\n    \"@vue/test-utils\": \"^2.3.0\",\n    \"cypress\": \"^13.5.0\",\n    \"eslint\": \"^8.35.0\",\n    \"eslint-plugin-vue\": \"^9.9.0\",\n    \"jsdom\": \"^22.1.0\",\n    \"terser\": \"^5.4.0\",\n    \"typescript\": \"~5.9.0\",\n    \"vite\": \"^5.0.0\",\n    \"vitest\": \"^0.34.6\",\n    \"vue-tsc\": \"^2.1.10\"\n  }\n}\n"
  },
  {
    "path": "vue-vite/base/src/main.ts",
    "content": "import { createApp } from 'vue'\nimport App from './App.vue'\nimport router from './router';\n\nimport { IonicVue } from '@ionic/vue';\n\n/* Core CSS required for Ionic components to work properly */\nimport '@ionic/vue/css/core.css';\n\n/* Basic CSS for apps built with Ionic */\nimport '@ionic/vue/css/normalize.css';\nimport '@ionic/vue/css/structure.css';\nimport '@ionic/vue/css/typography.css';\n\n/* Optional CSS utils that can be commented out */\nimport '@ionic/vue/css/padding.css';\nimport '@ionic/vue/css/float-elements.css';\nimport '@ionic/vue/css/text-alignment.css';\nimport '@ionic/vue/css/text-transformation.css';\nimport '@ionic/vue/css/flex-utils.css';\nimport '@ionic/vue/css/display.css';\n\n/**\n * Ionic Dark Mode\n * -----------------------------------------------------\n * For more info, please see:\n * https://ionicframework.com/docs/theming/dark-mode\n */\n\n/* @import '@ionic/vue/css/palettes/dark.always.css'; */\n/* @import '@ionic/vue/css/palettes/dark.class.css'; */\nimport '@ionic/vue/css/palettes/dark.system.css';\n\n/* Theme variables */\nimport './theme/variables.css';\n\nconst app = createApp(App)\n  .use(IonicVue)\n  .use(router);\n\nrouter.isReady().then(() => {\n  app.mount('#app');\n});\n"
  },
  {
    "path": "vue-vite/base/src/theme/variables.css",
    "content": "/* For information on how to create your own theme, please refer to:\nhttp://ionicframework.com/docs/theming/ */\n"
  },
  {
    "path": "vue-vite/base/src/vite-env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "vue-vite/base/tests/e2e/fixtures/example.json",
    "content": "{\n  \"name\": \"Using fixtures to represent data\",\n  \"email\": \"hello@cypress.io\",\n  \"body\": \"Fixtures are a great way to mock data for responses to routes\"\n}\n"
  },
  {
    "path": "vue-vite/base/tests/e2e/support/commands.ts",
    "content": "/// <reference types=\"cypress\" />\n// ***********************************************\n// This example commands.ts shows you how to\n// create various custom commands and overwrite\n// existing commands.\n//\n// For more comprehensive examples of custom\n// commands please read more here:\n// https://on.cypress.io/custom-commands\n// ***********************************************\n//\n//\n// -- This is a parent command --\n// Cypress.Commands.add('login', (email, password) => { ... })\n//\n//\n// -- This is a child command --\n// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })\n//\n//\n// -- This is a dual command --\n// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })\n//\n//\n// -- This will overwrite an existing command --\n// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })\n//\n// declare global {\n//   namespace Cypress {\n//     interface Chainable {\n//       login(email: string, password: string): Chainable<void>\n//       drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>\n//       dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>\n//       visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>\n//     }\n//   }\n// }"
  },
  {
    "path": "vue-vite/base/tests/e2e/support/e2e.ts",
    "content": "// ***********************************************************\n// This example support/e2e.ts is processed and\n// loaded automatically before your test files.\n//\n// This is a great place to put global configuration and\n// behavior that modifies Cypress.\n//\n// You can change the location of this file or turn off\n// automatically serving support files with the\n// 'supportFile' configuration option.\n//\n// You can read more here:\n// https://on.cypress.io/configuration\n// ***********************************************************\n\n// Import commands.js using ES2015 syntax:\nimport './commands'\n\n// Alternatively you can use CommonJS syntax:\n// require('./commands')"
  },
  {
    "path": "vue-vite/base/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ESNext\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Node\",\n    \"strict\": true,\n    \"jsx\": \"preserve\",\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"esModuleInterop\": true,\n    \"lib\": [\"ESNext\", \"DOM\"],\n    \"skipLibCheck\": true,\n    \"noEmit\": true,\n    \"paths\": {\n      \"@/*\": [\"./src/*\"]\n    }\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.d.ts\", \"src/**/*.tsx\", \"src/**/*.vue\"],\n  \"references\": [{ \"path\": \"./tsconfig.node.json\" }]\n}\n"
  },
  {
    "path": "vue-vite/base/tsconfig.node.json",
    "content": "{\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Node\",\n    \"allowSyntheticDefaultImports\": true\n  },\n  \"include\": [\"vite.config.ts\"]\n}\n"
  },
  {
    "path": "vue-vite/base/vite.config.ts",
    "content": "/// <reference types=\"vitest\" />\n\nimport legacy from '@vitejs/plugin-legacy'\nimport vue from '@vitejs/plugin-vue'\nimport path from 'path'\nimport { defineConfig } from 'vite'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    vue(),\n    legacy()\n  ],\n  resolve: {\n    alias: {\n      '@': path.resolve(__dirname, './src'),\n    },\n  },\n  test: {\n    globals: true,\n    environment: 'jsdom'\n  }\n})\n"
  },
  {
    "path": "vue-vite/community/.gitkeep",
    "content": ""
  },
  {
    "path": "vue-vite/official/blank/ionic.starter.json",
    "content": "{\n  \"name\": \"Blank Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test:unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \\\"npm run dev\\\" \\\"npm run test:e2e\\\" --kill-others --success first\"\n  }\n}\n"
  },
  {
    "path": "vue-vite/official/blank/src/App.vue",
    "content": "<template>\n  <ion-app>\n    <ion-router-outlet />\n  </ion-app>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonApp, IonRouterOutlet } from '@ionic/vue';\n</script>\n"
  },
  {
    "path": "vue-vite/official/blank/src/router/index.ts",
    "content": "import { createRouter, createWebHistory } from '@ionic/vue-router';\nimport { RouteRecordRaw } from 'vue-router';\nimport HomePage from '../views/HomePage.vue'\n\nconst routes: Array<RouteRecordRaw> = [\n  {\n    path: '/',\n    redirect: '/home'\n  },\n  {\n    path: '/home',\n    name: 'Home',\n    component: HomePage\n  }\n]\n\nconst router = createRouter({\n  history: createWebHistory(import.meta.env.BASE_URL),\n  routes\n})\n\nexport default router\n"
  },
  {
    "path": "vue-vite/official/blank/src/views/HomePage.vue",
    "content": "<template>\n  <ion-page>\n    <ion-header :translucent=\"true\">\n      <ion-toolbar>\n        <ion-title>Blank</ion-title>\n      </ion-toolbar>\n    </ion-header>\n\n    <ion-content :fullscreen=\"true\">\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">Blank</ion-title>\n        </ion-toolbar>\n      </ion-header>\n\n      <div id=\"container\">\n        <strong>Ready to create an app?</strong>\n        <p>Start with Ionic <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n      </div>\n    </ion-content>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue';\n</script>\n\n<style scoped>\n#container {\n  text-align: center;\n  \n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n  \n  color: #8c8c8c;\n  \n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}\n</style>\n"
  },
  {
    "path": "vue-vite/official/blank/tests/e2e/specs/test.cy.ts",
    "content": "describe('My First Test', () => {\n  it('Visits the app root url', () => {\n    cy.visit('/')\n    cy.contains('#container', 'Ready to create an app?')\n  })\n})\n"
  },
  {
    "path": "vue-vite/official/blank/tests/unit/example.spec.ts",
    "content": "import { mount } from '@vue/test-utils'\nimport HomePage from '@/views/HomePage.vue'\nimport { describe, expect, test } from 'vitest'\n\ndescribe('HomePage.vue', () => {\n  test('renders home vue', () => {\n    const wrapper = mount(HomePage)\n    expect(wrapper.text()).toMatch('Ready to create an app?')\n  })\n})\n"
  },
  {
    "path": "vue-vite/official/list/ionic.starter.json",
    "content": "{\n  \"name\": \"List Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test:unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \\\"npm run dev\\\" \\\"npm run test:e2e\\\" --kill-others --success first\"\n  }\n}\n"
  },
  {
    "path": "vue-vite/official/list/src/App.vue",
    "content": "<template>\n  <ion-app>\n    <ion-router-outlet />\n  </ion-app>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonApp, IonRouterOutlet } from '@ionic/vue';\n</script>\n"
  },
  {
    "path": "vue-vite/official/list/src/components/MessageListItem.vue",
    "content": "<template>\n  <ion-item v-if=\"message\" :routerLink=\"'/message/' + message.id\" :detail=\"false\" class=\"list-item\">\n    <div slot=\"start\" :class=\"!message.read ? 'dot dot-unread' : 'dot'\"></div>\n    <ion-label class=\"ion-text-wrap\">\n      <h2>\n        {{ message.fromName }}\n        <span class=\"date\">\n          <ion-note>{{ message.date }}</ion-note>\n          <ion-icon aria-hidden=\"true\" :icon=\"chevronForward\" size=\"small\" v-if=\"isIos()\"></ion-icon>\n        </span>\n      </h2>\n      <h3>{{ message.subject }}</h3>\n      <p>\n        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n      </p>\n    </ion-label>\n  </ion-item>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonIcon, IonItem, IonLabel, IonNote } from '@ionic/vue';\nimport { chevronForward } from 'ionicons/icons';\n\ndefineProps({\n  message: Object,\n});\n\nconst isIos = () => {\n  const win = window as any;\n  return win && win.Ionic && win.Ionic.mode === 'ios';\n};\n</script>\n\n<style scoped>\n.list-item {\n  --padding-start: 0;\n  --inner-padding-end: 0;\n}\n\n.list-item ion-label {\n  margin-top: 12px;\n  margin-bottom: 12px;\n}\n\n.list-item h2 {\n  font-weight: 600;\n  margin: 0;\n  \n  /**\n   * With larger font scales\n   * the date/time should wrap to the next\n   * line. However, there should be\n   * space between the name and the date/time\n   * if they can appear on the same line.\n   */\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: space-between;\n}\n\n.list-item p {\n  text-overflow: ellipsis;\n  overflow: hidden;\n  white-space: nowrap;\n  width: 95%;\n}\n\n.list-item .date {\n  align-items: center;\n  display: flex;\n}\n\n.list-item ion-icon {\n  color: #c9c9ca;\n}\n\n.list-item ion-note {\n  font-size: 0.9375rem;\n  margin-right: 8px;\n  font-weight: normal;\n}\n\n.list-item ion-note.md {\n  margin-right: 14px;\n}\n\n.list-item .dot {\n  display: block;\n  height: 12px;\n  width: 12px;\n  border-radius: 50%;\n  align-self: start;\n  margin: 16px 10px 16px 16px;\n}\n\n.list-item .dot-unread {\n  background: var(--ion-color-primary);\n}\n</style>\n"
  },
  {
    "path": "vue-vite/official/list/src/data/messages.ts",
    "content": "export interface Message {\n  fromName: string;\n  subject: string;\n  date: string;\n  id: number;\n}\n\nconst messages: Message[] = [\n  {\n    fromName: 'Matt Chorsey',\n    subject: 'New event: Trip to Vegas',\n    date: '9:32 AM',\n    id: 0\n  },\n  {\n    fromName: 'Lauren Ruthford',\n    subject: 'Long time no chat',\n    date: '6:12 AM',\n    id: 1\n  },\n  {\n    fromName: 'Jordan Firth',\n    subject: 'Report Results',\n    date: '4:55 AM',\n    id: 2\n\n  },\n  {\n    fromName: 'Bill Thomas',\n    subject: 'The situation',\n    date: 'Yesterday',\n    id: 3\n  },\n  {\n    fromName: 'Joanne Pollan',\n    subject: 'Updated invitation: Swim lessons',\n    date: 'Yesterday',\n    id: 4\n  },\n  {\n    fromName: 'Andrea Cornerston',\n    subject: 'Last minute ask',\n    date: 'Yesterday',\n    id: 5\n  },\n  {\n    fromName: 'Moe Chamont',\n    subject: 'Family Calendar - Version 1',\n    date: 'Last Week',\n    id: 6\n  },\n  {\n    fromName: 'Kelly Richardson',\n    subject: 'Placeholder Headhots',\n    date: 'Last Week',\n    id: 7\n  }\n];\n\nexport const getMessages = () => messages;\n\nexport const getMessage = (id: number) => messages.find(m => m.id === id);"
  },
  {
    "path": "vue-vite/official/list/src/router/index.ts",
    "content": "import { createRouter, createWebHistory } from '@ionic/vue-router';\nimport { RouteRecordRaw } from 'vue-router';\nimport HomePage from '../views/HomePage.vue'\n\nconst routes: Array<RouteRecordRaw> = [\n  {\n    path: '/',\n    redirect: '/home'\n  },\n  {\n    path: '/home',\n    name: 'Home',\n    component: HomePage\n  },\n  {\n    path: '/message/:id',\n    component: () => import('../views/ViewMessagePage.vue')\n  }\n]\n\nconst router = createRouter({\n  history: createWebHistory(import.meta.env.BASE_URL),\n  routes\n})\n\nexport default router\n"
  },
  {
    "path": "vue-vite/official/list/src/views/HomePage.vue",
    "content": "<template>\n  <ion-page>\n    <ion-header :translucent=\"true\">\n      <ion-toolbar>\n        <ion-title>Inbox</ion-title>\n      </ion-toolbar>\n    </ion-header>\n\n    <ion-content :fullscreen=\"true\">\n      <ion-refresher slot=\"fixed\" @ionRefresh=\"refresh($event)\">\n        <ion-refresher-content></ion-refresher-content>\n      </ion-refresher>\n\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">Inbox</ion-title>\n        </ion-toolbar>\n      </ion-header>\n\n      <ion-list>\n        <MessageListItem v-for=\"message in messages\" :key=\"message.id\" :message=\"message\" />\n      </ion-list>\n    </ion-content>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n  IonContent,\n  IonHeader,\n  IonList,\n  IonPage,\n  IonRefresher,\n  IonRefresherContent,\n  IonTitle,\n  IonToolbar,\n} from '@ionic/vue';\nimport MessageListItem from '@/components/MessageListItem.vue';\nimport { getMessages, Message } from '@/data/messages';\nimport { ref } from 'vue';\n\nconst messages = ref<Message[]>(getMessages());\n\nconst refresh = (ev: CustomEvent) => {\n  setTimeout(() => {\n    ev.detail.complete();\n  }, 3000);\n};\n</script>\n"
  },
  {
    "path": "vue-vite/official/list/src/views/ViewMessagePage.vue",
    "content": "<template>\n  <ion-page>\n    <ion-header :translucent=\"true\">\n      <ion-toolbar>\n        <ion-buttons slot=\"start\">\n          <ion-back-button :text=\"getBackButtonText()\" default-href=\"/\"></ion-back-button>\n        </ion-buttons>\n      </ion-toolbar>\n    </ion-header>\n\n    <ion-content :fullscreen=\"true\" v-if=\"message\">\n      <ion-item>\n        <ion-icon aria-hidden=\"true\" :icon=\"personCircle\" color=\"primary\"></ion-icon>\n        <ion-label class=\"ion-text-wrap\">\n          <h2>\n            {{ message.fromName }}\n            <span class=\"date\">\n              <ion-note>{{ message.date }}</ion-note>\n            </span>\n          </h2>\n          <h3>To: <ion-note>Me</ion-note></h3>\n        </ion-label>\n      </ion-item>\n\n      <div class=\"ion-padding\">\n        <h1>{{ message.subject }}</h1>\n        <p>\n          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n        </p>\n      </div>\n    </ion-content>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport { useRoute } from 'vue-router';\nimport {\n  IonBackButton,\n  IonButtons,\n  IonContent,\n  IonHeader,\n  IonIcon,\n  IonItem,\n  IonLabel,\n  IonNote,\n  IonPage,\n  IonToolbar,\n} from '@ionic/vue';\nimport { personCircle } from 'ionicons/icons';\nimport { getMessage } from '../data/messages';\n\nconst getBackButtonText = () => {\n  const win = window as any;\n  const mode = win && win.Ionic && win.Ionic.mode;\n  return mode === 'ios' ? 'Inbox' : '';\n};\n\nconst route = useRoute();\nconst message = getMessage(parseInt(route.params.id as string, 10));\n</script>\n\n<style scoped>\nion-item {\n  --inner-padding-end: 0;\n  --background: transparent;\n}\n\nion-label {\n  margin-top: 12px;\n  margin-bottom: 12px;\n}\n\nion-item h2 {\n  font-weight: 600;\n  \n  /**\n   * With larger font scales\n   * the date/time should wrap to the next\n   * line. However, there should be\n   * space between the name and the date/time\n   * if they can appear on the same line.\n   */\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: space-between;\n}\n\nion-item .date {\n  align-items: center;\n  display: flex;\n}\n\nion-item ion-icon {\n  font-size: 42px;\n  margin-right: 8px;\n}\n\nion-item ion-note {\n  font-size: 0.9375rem;\n  margin-right: 12px;\n  font-weight: normal;\n}\n\nh1 {\n  margin: 0;\n  font-weight: bold;\n  font-size: 1.4rem;\n}\n\np {\n  line-height: 1.4;\n}\n</style>\n"
  },
  {
    "path": "vue-vite/official/list/tests/e2e/specs/test.cy.ts",
    "content": "describe('My First Test', () => {\n  it('Visits the app root url', () => {\n    cy.visit('/')\n    cy.contains('ion-header', 'Inbox')\n  })\n})\n"
  },
  {
    "path": "vue-vite/official/list/tests/unit/example.spec.ts",
    "content": "import { mount } from '@vue/test-utils'\nimport HomePage from '@/views/HomePage.vue'\nimport { describe, expect, test } from 'vitest'\n\ndescribe('HomePage.vue', () => {\n  test('renders home view', () => {\n    const wrapper = mount(HomePage)\n    expect(wrapper.text()).toMatch('Inbox')\n  })\n})\n"
  },
  {
    "path": "vue-vite/official/sidemenu/ionic.starter.json",
    "content": "{\n  \"name\": \"Sidemenu Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test:unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \\\"npm run dev\\\" \\\"npm run test:e2e\\\" --kill-others --success first\"\n  }\n}\n"
  },
  {
    "path": "vue-vite/official/sidemenu/src/App.vue",
    "content": "<template>\n  <ion-app>\n    <ion-split-pane content-id=\"main-content\">\n      <ion-menu content-id=\"main-content\" type=\"overlay\">\n        <ion-content>\n          <ion-list id=\"inbox-list\">\n            <ion-list-header>Inbox</ion-list-header>\n            <ion-note>hi@ionicframework.com</ion-note>\n\n            <ion-menu-toggle :auto-hide=\"false\" v-for=\"(p, i) in appPages\" :key=\"i\">\n              <ion-item @click=\"selectedIndex = i\" router-direction=\"root\" :router-link=\"p.url\" lines=\"none\" :detail=\"false\" class=\"hydrated\" :class=\"{ selected: selectedIndex === i }\">\n                <ion-icon aria-hidden=\"true\" slot=\"start\" :ios=\"p.iosIcon\" :md=\"p.mdIcon\"></ion-icon>\n                <ion-label>{{ p.title }}</ion-label>\n              </ion-item>\n            </ion-menu-toggle>\n          </ion-list>\n\n          <ion-list id=\"labels-list\">\n            <ion-list-header>Labels</ion-list-header>\n\n            <ion-item v-for=\"(label, index) in labels\" lines=\"none\" :key=\"index\">\n              <ion-icon aria-hidden=\"true\" slot=\"start\" :ios=\"bookmarkOutline\" :md=\"bookmarkSharp\"></ion-icon>\n              <ion-label>{{ label }}</ion-label>\n            </ion-item>\n          </ion-list>\n        </ion-content>\n      </ion-menu>\n      <ion-router-outlet id=\"main-content\"></ion-router-outlet>\n    </ion-split-pane>\n  </ion-app>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n  IonApp,\n  IonContent,\n  IonIcon,\n  IonItem,\n  IonLabel,\n  IonList,\n  IonListHeader,\n  IonMenu,\n  IonMenuToggle,\n  IonNote,\n  IonRouterOutlet,\n  IonSplitPane,\n} from '@ionic/vue';\nimport { ref } from 'vue';\nimport {\n  archiveOutline,\n  archiveSharp,\n  bookmarkOutline,\n  bookmarkSharp,\n  heartOutline,\n  heartSharp,\n  mailOutline,\n  mailSharp,\n  paperPlaneOutline,\n  paperPlaneSharp,\n  trashOutline,\n  trashSharp,\n  warningOutline,\n  warningSharp,\n} from 'ionicons/icons';\n\nconst selectedIndex = ref(0);\nconst appPages = [\n  {\n    title: 'Inbox',\n    url: '/folder/Inbox',\n    iosIcon: mailOutline,\n    mdIcon: mailSharp,\n  },\n  {\n    title: 'Outbox',\n    url: '/folder/Outbox',\n    iosIcon: paperPlaneOutline,\n    mdIcon: paperPlaneSharp,\n  },\n  {\n    title: 'Favorites',\n    url: '/folder/Favorites',\n    iosIcon: heartOutline,\n    mdIcon: heartSharp,\n  },\n  {\n    title: 'Archived',\n    url: '/folder/Archived',\n    iosIcon: archiveOutline,\n    mdIcon: archiveSharp,\n  },\n  {\n    title: 'Trash',\n    url: '/folder/Trash',\n    iosIcon: trashOutline,\n    mdIcon: trashSharp,\n  },\n  {\n    title: 'Spam',\n    url: '/folder/Spam',\n    iosIcon: warningOutline,\n    mdIcon: warningSharp,\n  },\n];\nconst labels = ['Family', 'Friends', 'Notes', 'Work', 'Travel', 'Reminders'];\n\nconst path = window.location.pathname.split('folder/')[1];\nif (path !== undefined) {\n  selectedIndex.value = appPages.findIndex((page) => page.title.toLowerCase() === path.toLowerCase());\n}\n</script>\n\n<style scoped>\nion-menu ion-content {\n  --background: var(--ion-item-background, var(--ion-background-color, #fff));\n}\n\nion-menu.md ion-content {\n  --padding-start: 8px;\n  --padding-end: 8px;\n  --padding-top: 20px;\n  --padding-bottom: 20px;\n}\n\nion-menu.md ion-list {\n  padding: 20px 0;\n}\n\nion-menu.md ion-note {\n  margin-bottom: 30px;\n}\n\nion-menu.md ion-list-header,\nion-menu.md ion-note {\n  padding-left: 10px;\n}\n\nion-menu.md ion-list#inbox-list {\n  border-bottom: 1px solid var(--ion-background-color-step-150, #d7d8da);\n}\n\nion-menu.md ion-list#inbox-list ion-list-header {\n  font-size: 22px;\n  font-weight: 600;\n\n  min-height: 20px;\n}\n\nion-menu.md ion-list#labels-list ion-list-header {\n  font-size: 16px;\n\n  margin-bottom: 18px;\n\n  color: #757575;\n\n  min-height: 26px;\n}\n\nion-menu.md ion-item {\n  --padding-start: 10px;\n  --padding-end: 10px;\n  border-radius: 4px;\n}\n\nion-menu.md ion-item.selected {\n  --background: rgba(var(--ion-color-primary-rgb), 0.14);\n}\n\nion-menu.md ion-item.selected ion-icon {\n  color: var(--ion-color-primary);\n}\n\nion-menu.md ion-item ion-icon {\n  color: #616e7e;\n}\n\nion-menu.md ion-item ion-label {\n  font-weight: 500;\n}\n\nion-menu.ios ion-content {\n  --padding-bottom: 20px;\n}\n\nion-menu.ios ion-list {\n  padding: 20px 0 0 0;\n}\n\nion-menu.ios ion-note {\n  line-height: 24px;\n  margin-bottom: 20px;\n}\n\nion-menu.ios ion-item {\n  --padding-start: 16px;\n  --padding-end: 16px;\n  --min-height: 50px;\n}\n\nion-menu.ios ion-item.selected ion-icon {\n  color: var(--ion-color-primary);\n}\n\nion-menu.ios ion-item ion-icon {\n  font-size: 24px;\n  color: #73849a;\n}\n\nion-menu.ios ion-list#labels-list ion-list-header {\n  margin-bottom: 8px;\n}\n\nion-menu.ios ion-list-header,\nion-menu.ios ion-note {\n  padding-left: 16px;\n  padding-right: 16px;\n}\n\nion-menu.ios ion-note {\n  margin-bottom: 8px;\n}\n\nion-note {\n  display: inline-block;\n  font-size: 16px;\n\n  color: var(--ion-color-medium-shade);\n}\n\nion-item.selected {\n  --color: var(--ion-color-primary);\n}\n</style>\n"
  },
  {
    "path": "vue-vite/official/sidemenu/src/router/index.ts",
    "content": "import { createRouter, createWebHistory } from '@ionic/vue-router';\nimport { RouteRecordRaw } from 'vue-router';\n\nconst routes: Array<RouteRecordRaw> = [\n  {\n    path: '',\n    redirect: '/folder/Inbox'\n  },\n  {\n    path: '/folder/:id',\n    component: () => import ('../views/FolderPage.vue')\n  }\n]\n\nconst router = createRouter({\n  history: createWebHistory(import.meta.env.BASE_URL),\n  routes\n})\n\nexport default router\n"
  },
  {
    "path": "vue-vite/official/sidemenu/src/views/FolderPage.vue",
    "content": "<template>\n  <ion-page>\n    <ion-header :translucent=\"true\">\n      <ion-toolbar>\n        <ion-buttons slot=\"start\">\n          <ion-menu-button color=\"primary\"></ion-menu-button>\n        </ion-buttons>\n        <ion-title>{{ $route.params.id }}</ion-title>\n      </ion-toolbar>\n    </ion-header>\n\n    <ion-content :fullscreen=\"true\">\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">{{ $route.params.id }}</ion-title>\n        </ion-toolbar>\n      </ion-header>\n\n      <div id=\"container\">\n        <strong class=\"capitalize\">{{ $route.params.id }}</strong>\n        <p>Explore <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n      </div>\n    </ion-content>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonButtons, IonContent, IonHeader, IonMenuButton, IonPage, IonTitle, IonToolbar } from '@ionic/vue';\n</script>\n\n<style scoped>\n#container {\n  text-align: center;\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n  color: #8c8c8c;\n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}\n</style>\n"
  },
  {
    "path": "vue-vite/official/sidemenu/tests/e2e/specs/test.cy.ts",
    "content": "describe('My First Test', () => {\n  it('Visits the app root url', () => {\n    cy.visit('/folder/Inbox')\n    cy.contains('#container', 'Inbox')\n  })\n})\n"
  },
  {
    "path": "vue-vite/official/sidemenu/tests/unit/example.spec.ts",
    "content": "import { mount } from '@vue/test-utils'\nimport FolderPage from '@/views/FolderPage.vue'\nimport { describe, expect, test } from 'vitest'\n\ndescribe('FolderPage.vue', () => {\n  test('renders folder view', () => {\n    const mockRoute = {\n      params: {\n        id: 'Outbox'\n      }\n    }\n    const wrapper = mount(FolderPage, {\n      global: {\n        mocks: {\n          $route: mockRoute\n        }\n      }\n    })\n    expect(wrapper.text()).toMatch('Explore UI Components')\n  })\n})\n"
  },
  {
    "path": "vue-vite/official/tabs/ionic.starter.json",
    "content": "{\n  \"name\": \"Tabs Starter\",\n  \"baseref\": \"main\",\n  \"tarignore\": [\n    \"node_modules\",\n    \"package-lock.json\",\n    \"www\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run build && npm run test:unit -- --watch=false && npm i --no-save concurrently && ./node_modules/.bin/concurrently \\\"npm run dev\\\" \\\"npm run test:e2e\\\" --kill-others --success first\"\n  }\n}\n"
  },
  {
    "path": "vue-vite/official/tabs/src/App.vue",
    "content": "<template>\n  <ion-app>\n    <ion-router-outlet />\n  </ion-app>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonApp, IonRouterOutlet } from '@ionic/vue';\n</script>\n"
  },
  {
    "path": "vue-vite/official/tabs/src/components/ExploreContainer.vue",
    "content": "<template>\n  <div id=\"container\">\n    <strong>{{ name }}</strong>\n    <p>Explore <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ionicframework.com/docs/components\">UI Components</a></p>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\ndefineProps({\n  name: String,\n});\n</script>\n\n<style scoped>\n#container {\n  text-align: center;\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n  color: #8c8c8c;\n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}\n</style>\n"
  },
  {
    "path": "vue-vite/official/tabs/src/router/index.ts",
    "content": "import { createRouter, createWebHistory } from '@ionic/vue-router';\nimport { RouteRecordRaw } from 'vue-router';\nimport TabsPage from '../views/TabsPage.vue'\n\nconst routes: Array<RouteRecordRaw> = [\n  {\n    path: '/',\n    redirect: '/tabs/tab1'\n  },\n  {\n    path: '/tabs/',\n    component: TabsPage,\n    children: [\n      {\n        path: '',\n        redirect: '/tabs/tab1'\n      },\n      {\n        path: 'tab1',\n        component: () => import('@/views/Tab1Page.vue')\n      },\n      {\n        path: 'tab2',\n        component: () => import('@/views/Tab2Page.vue')\n      },\n      {\n        path: 'tab3',\n        component: () => import('@/views/Tab3Page.vue')\n      }\n    ]\n  }\n]\n\nconst router = createRouter({\n  history: createWebHistory(import.meta.env.BASE_URL),\n  routes\n})\n\nexport default router\n"
  },
  {
    "path": "vue-vite/official/tabs/src/views/Tab1Page.vue",
    "content": "<template>\n  <ion-page>\n    <ion-header>\n      <ion-toolbar>\n        <ion-title>Tab 1</ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content :fullscreen=\"true\">\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">Tab 1</ion-title>\n        </ion-toolbar>\n      </ion-header>\n\n      <ExploreContainer name=\"Tab 1 page\" />\n    </ion-content>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonPage, IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/vue';\nimport ExploreContainer from '@/components/ExploreContainer.vue';\n</script>\n"
  },
  {
    "path": "vue-vite/official/tabs/src/views/Tab2Page.vue",
    "content": "<template>\n  <ion-page>\n    <ion-header>\n      <ion-toolbar>\n        <ion-title>Tab 2</ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content :fullscreen=\"true\">\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">Tab 2</ion-title>\n        </ion-toolbar>\n      </ion-header>\n\n      <ExploreContainer name=\"Tab 2 page\" />\n    </ion-content>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonPage, IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/vue';\nimport ExploreContainer from '@/components/ExploreContainer.vue';\n</script>\n"
  },
  {
    "path": "vue-vite/official/tabs/src/views/Tab3Page.vue",
    "content": "<template>\n  <ion-page>\n    <ion-header>\n      <ion-toolbar>\n        <ion-title>Tab 3</ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content :fullscreen=\"true\">\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">Tab 3</ion-title>\n        </ion-toolbar>\n      </ion-header>\n\n      <ExploreContainer name=\"Tab 3 page\" />\n    </ion-content>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonPage, IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/vue';\nimport ExploreContainer from '@/components/ExploreContainer.vue';\n</script>\n"
  },
  {
    "path": "vue-vite/official/tabs/src/views/TabsPage.vue",
    "content": "<template>\n  <ion-page>\n    <ion-tabs>\n      <ion-router-outlet></ion-router-outlet>\n      <ion-tab-bar slot=\"bottom\">\n        <ion-tab-button tab=\"tab1\" href=\"/tabs/tab1\">\n          <ion-icon aria-hidden=\"true\" :icon=\"triangle\" />\n          <ion-label>Tab 1</ion-label>\n        </ion-tab-button>\n\n        <ion-tab-button tab=\"tab2\" href=\"/tabs/tab2\">\n          <ion-icon aria-hidden=\"true\" :icon=\"ellipse\" />\n          <ion-label>Tab 2</ion-label>\n        </ion-tab-button>\n\n        <ion-tab-button tab=\"tab3\" href=\"/tabs/tab3\">\n          <ion-icon aria-hidden=\"true\" :icon=\"square\" />\n          <ion-label>Tab 3</ion-label>\n        </ion-tab-button>\n      </ion-tab-bar>\n    </ion-tabs>\n  </ion-page>\n</template>\n\n<script setup lang=\"ts\">\nimport { IonTabBar, IonTabButton, IonTabs, IonLabel, IonIcon, IonPage, IonRouterOutlet } from '@ionic/vue';\nimport { ellipse, square, triangle } from 'ionicons/icons';\n</script>\n"
  },
  {
    "path": "vue-vite/official/tabs/tests/e2e/specs/test.cy.ts",
    "content": "describe('My First Test', () => {\n  it('Visits the app root url', () => {\n    cy.visit('/')\n    cy.contains('ion-content', 'Tab 1 page')\n  })\n})\n"
  },
  {
    "path": "vue-vite/official/tabs/tests/unit/example.spec.ts",
    "content": "import { mount } from '@vue/test-utils'\nimport Tab1Page from '@/views/Tab1Page.vue'\nimport { describe, expect, test } from 'vitest'\n\ndescribe('Tab1Page.vue', () => {\n  test('renders tab 1 Tab1Page', () => {\n    const wrapper = mount(Tab1Page)\n    expect(wrapper.text()).toMatch('Tab 1 page')\n  })\n})\n"
  }
]